Update to version 2.6.1.169
[toolchains/patch.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.68 for GNU patch 2.6.1.169-7096.
4 #
5 # Report bugs to <bug-patch@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10 # Foundation, Inc.
11 #
12 #
13 # This configure script is free software; the Free Software Foundation
14 # gives unlimited permission to copy, distribute and modify it.
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 if test "x$CONFIG_SHELL" = x; then
140   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141   emulate sh
142   NULLCMD=:
143   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144   # is contrary to our usage.  Disable this feature.
145   alias -g '\${1+\"\$@\"}'='\"\$@\"'
146   setopt NO_GLOB_SUBST
147 else
148   case \`(set -o) 2>/dev/null\` in #(
149   *posix*) :
150     set -o posix ;; #(
151   *) :
152      ;;
153 esac
154 fi
155 "
156   as_required="as_fn_return () { (exit \$1); }
157 as_fn_success () { as_fn_return 0; }
158 as_fn_failure () { as_fn_return 1; }
159 as_fn_ret_success () { return 0; }
160 as_fn_ret_failure () { return 1; }
161
162 exitcode=0
163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169 else
170   exitcode=1; echo positional parameters were not saved.
171 fi
172 test x\$exitcode = x0 || exit 1"
173   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177 test \$(( 1 + 1 )) = 2 || exit 1"
178   if (eval "$as_required") 2>/dev/null; then :
179   as_have_required=yes
180 else
181   as_have_required=no
182 fi
183   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185 else
186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187 as_found=false
188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189 do
190   IFS=$as_save_IFS
191   test -z "$as_dir" && as_dir=.
192   as_found=:
193   case $as_dir in #(
194          /*)
195            for as_base in sh bash ksh sh5; do
196              # Try only shells that exist, to save several forks.
197              as_shell=$as_dir/$as_base
198              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200   CONFIG_SHELL=$as_shell as_have_required=yes
201                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202   break 2
203 fi
204 fi
205            done;;
206        esac
207   as_found=false
208 done
209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211   CONFIG_SHELL=$SHELL as_have_required=yes
212 fi; }
213 IFS=$as_save_IFS
214
215
216       if test "x$CONFIG_SHELL" != x; then :
217   # We cannot yet assume a decent shell, so we have to provide a
218         # neutralization value for shells without unset; and this also
219         # works around shells that cannot unset nonexistent variables.
220         # Preserve -v and -x to the replacement shell.
221         BASH_ENV=/dev/null
222         ENV=/dev/null
223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224         export CONFIG_SHELL
225         case $- in # ((((
226           *v*x* | *x*v* ) as_opts=-vx ;;
227           *v* ) as_opts=-v ;;
228           *x* ) as_opts=-x ;;
229           * ) as_opts= ;;
230         esac
231         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
232 fi
233
234     if test x$as_have_required = xno; then :
235   $as_echo "$0: This script requires a shell more modern than all"
236   $as_echo "$0: the shells that I found on your system."
237   if test x${ZSH_VERSION+set} = xset ; then
238     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240   else
241     $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-patch@gnu.org
242 $0: about your system, including any error possibly output
243 $0: before this message. Then install a modern shell, or
244 $0: manually run the script under such a shell if you do
245 $0: have one."
246   fi
247   exit 1
248 fi
249 fi
250 fi
251 SHELL=${CONFIG_SHELL-/bin/sh}
252 export SHELL
253 # Unset more variables known to interfere with behavior of common tools.
254 CLICOLOR_FORCE= GREP_OPTIONS=
255 unset CLICOLOR_FORCE GREP_OPTIONS
256
257 ## --------------------- ##
258 ## M4sh Shell Functions. ##
259 ## --------------------- ##
260 # as_fn_unset VAR
261 # ---------------
262 # Portably unset VAR.
263 as_fn_unset ()
264 {
265   { eval $1=; unset $1;}
266 }
267 as_unset=as_fn_unset
268
269 # as_fn_set_status STATUS
270 # -----------------------
271 # Set $? to STATUS, without forking.
272 as_fn_set_status ()
273 {
274   return $1
275 } # as_fn_set_status
276
277 # as_fn_exit STATUS
278 # -----------------
279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280 as_fn_exit ()
281 {
282   set +e
283   as_fn_set_status $1
284   exit $1
285 } # as_fn_exit
286
287 # as_fn_mkdir_p
288 # -------------
289 # Create "$as_dir" as a directory, including parents if necessary.
290 as_fn_mkdir_p ()
291 {
292
293   case $as_dir in #(
294   -*) as_dir=./$as_dir;;
295   esac
296   test -d "$as_dir" || eval $as_mkdir_p || {
297     as_dirs=
298     while :; do
299       case $as_dir in #(
300       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301       *) as_qdir=$as_dir;;
302       esac
303       as_dirs="'$as_qdir' $as_dirs"
304       as_dir=`$as_dirname -- "$as_dir" ||
305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306          X"$as_dir" : 'X\(//\)[^/]' \| \
307          X"$as_dir" : 'X\(//\)$' \| \
308          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309 $as_echo X"$as_dir" |
310     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311             s//\1/
312             q
313           }
314           /^X\(\/\/\)[^/].*/{
315             s//\1/
316             q
317           }
318           /^X\(\/\/\)$/{
319             s//\1/
320             q
321           }
322           /^X\(\/\).*/{
323             s//\1/
324             q
325           }
326           s/.*/./; q'`
327       test -d "$as_dir" && break
328     done
329     test -z "$as_dirs" || eval "mkdir $as_dirs"
330   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333 } # as_fn_mkdir_p
334 # as_fn_append VAR VALUE
335 # ----------------------
336 # Append the text in VALUE to the end of the definition contained in VAR. Take
337 # advantage of any shell optimizations that allow amortized linear growth over
338 # repeated appends, instead of the typical quadratic growth present in naive
339 # implementations.
340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341   eval 'as_fn_append ()
342   {
343     eval $1+=\$2
344   }'
345 else
346   as_fn_append ()
347   {
348     eval $1=\$$1\$2
349   }
350 fi # as_fn_append
351
352 # as_fn_arith ARG...
353 # ------------------
354 # Perform arithmetic evaluation on the ARGs, and store the result in the
355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
356 # must be portable across $(()) and expr.
357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358   eval 'as_fn_arith ()
359   {
360     as_val=$(( $* ))
361   }'
362 else
363   as_fn_arith ()
364   {
365     as_val=`expr "$@" || test $? -eq 1`
366   }
367 fi # as_fn_arith
368
369
370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
371 # ----------------------------------------
372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374 # script with STATUS, using 1 if that was 0.
375 as_fn_error ()
376 {
377   as_status=$1; test $as_status -eq 0 && as_status=1
378   if test "$4"; then
379     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381   fi
382   $as_echo "$as_me: error: $2" >&2
383   as_fn_exit $as_status
384 } # as_fn_error
385
386 if expr a : '\(a\)' >/dev/null 2>&1 &&
387    test "X`expr 00001 : '.*\(...\)'`" = X001; then
388   as_expr=expr
389 else
390   as_expr=false
391 fi
392
393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394   as_basename=basename
395 else
396   as_basename=false
397 fi
398
399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400   as_dirname=dirname
401 else
402   as_dirname=false
403 fi
404
405 as_me=`$as_basename -- "$0" ||
406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407          X"$0" : 'X\(//\)$' \| \
408          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409 $as_echo X/"$0" |
410     sed '/^.*\/\([^/][^/]*\)\/*$/{
411             s//\1/
412             q
413           }
414           /^X\/\(\/\/\)$/{
415             s//\1/
416             q
417           }
418           /^X\/\(\/\).*/{
419             s//\1/
420             q
421           }
422           s/.*/./; q'`
423
424 # Avoid depending upon Character Ranges.
425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428 as_cr_digits='0123456789'
429 as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432   as_lineno_1=$LINENO as_lineno_1a=$LINENO
433   as_lineno_2=$LINENO as_lineno_2a=$LINENO
434   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
437   sed -n '
438     p
439     /[$]LINENO/=
440   ' <$as_myself |
441     sed '
442       s/[$]LINENO.*/&-/
443       t lineno
444       b
445       :lineno
446       N
447       :loop
448       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449       t loop
450       s/-\n.*//
451     ' >$as_me.lineno &&
452   chmod +x "$as_me.lineno" ||
453     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455   # Don't try to exec as it changes $[0], causing all sort of problems
456   # (the dirname of $[0] is not the place where we might find the
457   # original and so on.  Autoconf is especially sensitive to this).
458   . "./$as_me.lineno"
459   # Exit status is that of the last command.
460   exit
461 }
462
463 ECHO_C= ECHO_N= ECHO_T=
464 case `echo -n x` in #(((((
465 -n*)
466   case `echo 'xy\c'` in
467   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
468   xy)  ECHO_C='\c';;
469   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
470        ECHO_T=' ';;
471   esac;;
472 *)
473   ECHO_N='-n';;
474 esac
475
476 rm -f conf$$ conf$$.exe conf$$.file
477 if test -d conf$$.dir; then
478   rm -f conf$$.dir/conf$$.file
479 else
480   rm -f conf$$.dir
481   mkdir conf$$.dir 2>/dev/null
482 fi
483 if (echo >conf$$.file) 2>/dev/null; then
484   if ln -s conf$$.file conf$$ 2>/dev/null; then
485     as_ln_s='ln -s'
486     # ... but there are two gotchas:
487     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489     # In both cases, we have to default to `cp -p'.
490     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491       as_ln_s='cp -p'
492   elif ln conf$$.file conf$$ 2>/dev/null; then
493     as_ln_s=ln
494   else
495     as_ln_s='cp -p'
496   fi
497 else
498   as_ln_s='cp -p'
499 fi
500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501 rmdir conf$$.dir 2>/dev/null
502
503 if mkdir -p . 2>/dev/null; then
504   as_mkdir_p='mkdir -p "$as_dir"'
505 else
506   test -d ./-p && rmdir ./-p
507   as_mkdir_p=false
508 fi
509
510 if test -x / >/dev/null 2>&1; then
511   as_test_x='test -x'
512 else
513   if ls -dL / >/dev/null 2>&1; then
514     as_ls_L_option=L
515   else
516     as_ls_L_option=
517   fi
518   as_test_x='
519     eval sh -c '\''
520       if test -d "$1"; then
521         test -d "$1/.";
522       else
523         case $1 in #(
524         -*)set "./$1";;
525         esac;
526         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527         ???[sx]*):;;*)false;;esac;fi
528     '\'' sh
529   '
530 fi
531 as_executable_p=$as_test_x
532
533 # Sed expression to map a string onto a valid CPP name.
534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536 # Sed expression to map a string onto a valid variable name.
537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540 test -n "$DJDIR" || exec 7<&0 </dev/null
541 exec 6>&1
542
543 # Name of the host.
544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545 # so uname gets run too.
546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548 #
549 # Initializations.
550 #
551 ac_default_prefix=/usr/local
552 ac_clean_files=
553 ac_config_libobj_dir=.
554 LIBOBJS=
555 cross_compiling=no
556 subdirs=
557 MFLAGS=
558 MAKEFLAGS=
559
560 # Identity of this package.
561 PACKAGE_NAME='GNU patch'
562 PACKAGE_TARNAME='patch'
563 PACKAGE_VERSION='2.6.1.169-7096'
564 PACKAGE_STRING='GNU patch 2.6.1.169-7096'
565 PACKAGE_BUGREPORT='bug-patch@gnu.org'
566 PACKAGE_URL='http://www.gnu.org/software/patch/'
567
568 ac_unique_file="src/patch.c"
569 # Factoring default headers for most tests.
570 ac_includes_default="\
571 #include <stdio.h>
572 #ifdef HAVE_SYS_TYPES_H
573 # include <sys/types.h>
574 #endif
575 #ifdef HAVE_SYS_STAT_H
576 # include <sys/stat.h>
577 #endif
578 #ifdef STDC_HEADERS
579 # include <stdlib.h>
580 # include <stddef.h>
581 #else
582 # ifdef HAVE_STDLIB_H
583 #  include <stdlib.h>
584 # endif
585 #endif
586 #ifdef HAVE_STRING_H
587 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
588 #  include <memory.h>
589 # endif
590 # include <string.h>
591 #endif
592 #ifdef HAVE_STRINGS_H
593 # include <strings.h>
594 #endif
595 #ifdef HAVE_INTTYPES_H
596 # include <inttypes.h>
597 #endif
598 #ifdef HAVE_STDINT_H
599 # include <stdint.h>
600 #endif
601 #ifdef HAVE_UNISTD_H
602 # include <unistd.h>
603 #endif"
604
605 ac_func_list=
606 ac_header_list=
607 gl_getopt_required=POSIX
608 gl_getopt_required=POSIX
609 ac_subst_vars='gltests_LTLIBOBJS
610 gltests_LIBOBJS
611 gl_LTLIBOBJS
612 gl_LIBOBJS
613 CONFIG_INCLUDE
614 am__EXEEXT_FALSE
615 am__EXEEXT_TRUE
616 LTLIBOBJS
617 LIBOBJS
618 ED
619 LIB_XATTR
620 GNULIB_TEST_WARN_CFLAGS
621 GNULIB_WARN_CFLAGS
622 WERROR_CFLAGS
623 ac_ct_AR
624 LIBPATCH_LTLIBDEPS
625 LIBPATCH_LIBDEPS
626 gltests_WITNESS
627 REPLACE_TOWLOWER
628 REPLACE_ISWCNTRL
629 HAVE_WCTYPE_H
630 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
631 NEXT_WCTYPE_H
632 HAVE_ISWCNTRL
633 REPLACE_ISWBLANK
634 HAVE_WCTRANS_T
635 HAVE_WCTYPE_T
636 HAVE_ISWBLANK
637 GNULIB_TOWCTRANS
638 GNULIB_WCTRANS
639 GNULIB_ISWCTYPE
640 GNULIB_WCTYPE
641 GNULIB_ISWBLANK
642 HAVE_WINT_T
643 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
644 NEXT_WCHAR_H
645 WARN_CFLAGS
646 HAVE_FEATURES_H
647 HAVE_UNISTD_H
648 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
649 NEXT_UNISTD_H
650 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
651 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
652 TIME_H_DEFINES_STRUCT_TIMESPEC
653 NEXT_AS_FIRST_DIRECTIVE_TIME_H
654 NEXT_TIME_H
655 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
656 NEXT_SYS_STAT_H
657 NEXT_AS_FIRST_DIRECTIVE_STRING_H
658 NEXT_STRING_H
659 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
660 NEXT_STDLIB_H
661 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
662 NEXT_STDIO_H
663 GL_GENERATE_STDINT_H_FALSE
664 GL_GENERATE_STDINT_H_TRUE
665 STDINT_H
666 WINT_T_SUFFIX
667 WCHAR_T_SUFFIX
668 SIG_ATOMIC_T_SUFFIX
669 SIZE_T_SUFFIX
670 PTRDIFF_T_SUFFIX
671 HAVE_SIGNED_WINT_T
672 HAVE_SIGNED_WCHAR_T
673 HAVE_SIGNED_SIG_ATOMIC_T
674 BITSIZEOF_WINT_T
675 BITSIZEOF_WCHAR_T
676 BITSIZEOF_SIG_ATOMIC_T
677 BITSIZEOF_SIZE_T
678 BITSIZEOF_PTRDIFF_T
679 HAVE_SYS_BITYPES_H
680 HAVE_SYS_INTTYPES_H
681 HAVE_STDINT_H
682 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
683 NEXT_STDINT_H
684 HAVE_SYS_TYPES_H
685 HAVE_INTTYPES_H
686 HAVE_WCHAR_H
687 HAVE_UNSIGNED_LONG_LONG_INT
688 HAVE_LONG_LONG_INT
689 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
690 NEXT_STDDEF_H
691 GL_GENERATE_STDDEF_H_FALSE
692 GL_GENERATE_STDDEF_H_TRUE
693 STDDEF_H
694 HAVE_WCHAR_T
695 REPLACE_NULL
696 GL_GENERATE_STDARG_H_FALSE
697 GL_GENERATE_STDARG_H_TRUE
698 STDARG_H
699 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
700 NEXT_STDARG_H
701 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
702 NEXT_SIGNAL_H
703 REPLACE_VSPRINTF
704 REPLACE_VSNPRINTF
705 REPLACE_VPRINTF
706 REPLACE_VFPRINTF
707 REPLACE_VDPRINTF
708 REPLACE_VASPRINTF
709 REPLACE_TMPFILE
710 REPLACE_STDIO_WRITE_FUNCS
711 REPLACE_STDIO_READ_FUNCS
712 REPLACE_SPRINTF
713 REPLACE_SNPRINTF
714 REPLACE_RENAMEAT
715 REPLACE_RENAME
716 REPLACE_REMOVE
717 REPLACE_PRINTF
718 REPLACE_POPEN
719 REPLACE_PERROR
720 REPLACE_OBSTACK_PRINTF
721 REPLACE_GETLINE
722 REPLACE_GETDELIM
723 REPLACE_FTELLO
724 REPLACE_FTELL
725 REPLACE_FSEEKO
726 REPLACE_FSEEK
727 REPLACE_FREOPEN
728 REPLACE_FPURGE
729 REPLACE_FPRINTF
730 REPLACE_FOPEN
731 REPLACE_FFLUSH
732 REPLACE_FDOPEN
733 REPLACE_FCLOSE
734 REPLACE_DPRINTF
735 HAVE_VDPRINTF
736 HAVE_VASPRINTF
737 HAVE_RENAMEAT
738 HAVE_POPEN
739 HAVE_PCLOSE
740 HAVE_FTELLO
741 HAVE_FSEEKO
742 HAVE_DPRINTF
743 HAVE_DECL_VSNPRINTF
744 HAVE_DECL_SNPRINTF
745 HAVE_DECL_OBSTACK_PRINTF
746 HAVE_DECL_GETLINE
747 HAVE_DECL_GETDELIM
748 HAVE_DECL_FTELLO
749 HAVE_DECL_FSEEKO
750 HAVE_DECL_FPURGE
751 GNULIB_VSPRINTF_POSIX
752 GNULIB_VSNPRINTF
753 GNULIB_VPRINTF_POSIX
754 GNULIB_VPRINTF
755 GNULIB_VFPRINTF_POSIX
756 GNULIB_VFPRINTF
757 GNULIB_VDPRINTF
758 GNULIB_VSCANF
759 GNULIB_VFSCANF
760 GNULIB_VASPRINTF
761 GNULIB_TMPFILE
762 GNULIB_STDIO_H_SIGPIPE
763 GNULIB_STDIO_H_NONBLOCKING
764 GNULIB_SPRINTF_POSIX
765 GNULIB_SNPRINTF
766 GNULIB_SCANF
767 GNULIB_RENAMEAT
768 GNULIB_RENAME
769 GNULIB_REMOVE
770 GNULIB_PUTS
771 GNULIB_PUTCHAR
772 GNULIB_PUTC
773 GNULIB_PRINTF_POSIX
774 GNULIB_PRINTF
775 GNULIB_POPEN
776 GNULIB_PERROR
777 GNULIB_PCLOSE
778 GNULIB_OBSTACK_PRINTF_POSIX
779 GNULIB_OBSTACK_PRINTF
780 GNULIB_GETLINE
781 GNULIB_GETDELIM
782 GNULIB_GETCHAR
783 GNULIB_GETC
784 GNULIB_FWRITE
785 GNULIB_FTELLO
786 GNULIB_FTELL
787 GNULIB_FSEEKO
788 GNULIB_FSEEK
789 GNULIB_FSCANF
790 GNULIB_FREOPEN
791 GNULIB_FREAD
792 GNULIB_FPUTS
793 GNULIB_FPUTC
794 GNULIB_FPURGE
795 GNULIB_FPRINTF_POSIX
796 GNULIB_FPRINTF
797 GNULIB_FOPEN
798 GNULIB_FGETS
799 GNULIB_FGETC
800 GNULIB_FFLUSH
801 GNULIB_FDOPEN
802 GNULIB_FCLOSE
803 GNULIB_DPRINTF
804 REPLACE_RAISE
805 REPLACE_PTHREAD_SIGMASK
806 HAVE_SIGHANDLER_T
807 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
808 HAVE_STRUCT_SIGACTION_SA_SIGACTION
809 HAVE_SIGACTION
810 HAVE_SIGINFO_T
811 HAVE_SIGSET_T
812 HAVE_RAISE
813 HAVE_PTHREAD_SIGMASK
814 HAVE_POSIX_SIGNALBLOCKING
815 GNULIB_SIGACTION
816 GNULIB_SIGPROCMASK
817 GNULIB_SIGNAL_H_SIGPIPE
818 GNULIB_RAISE
819 GNULIB_PTHREAD_SIGMASK
820 YFLAGS
821 YACC
822 HAVE__BOOL
823 GL_GENERATE_STDBOOL_H_FALSE
824 GL_GENERATE_STDBOOL_H_TRUE
825 STDBOOL_H
826 APPLE_UNIVERSAL_BUILD
827 REPLACE_TIMEGM
828 REPLACE_NANOSLEEP
829 REPLACE_MKTIME
830 REPLACE_LOCALTIME_R
831 HAVE_TIMEGM
832 HAVE_STRPTIME
833 HAVE_NANOSLEEP
834 HAVE_DECL_LOCALTIME_R
835 GNULIB_TIME_R
836 GNULIB_TIMEGM
837 GNULIB_STRPTIME
838 GNULIB_NANOSLEEP
839 GNULIB_MKTIME
840 UNDEFINE_STRTOK_R
841 REPLACE_STRTOK_R
842 REPLACE_STRSIGNAL
843 REPLACE_STRNLEN
844 REPLACE_STRNDUP
845 REPLACE_STRNCAT
846 REPLACE_STRERROR_R
847 REPLACE_STRERROR
848 REPLACE_STRCHRNUL
849 REPLACE_STRCASESTR
850 REPLACE_STRSTR
851 REPLACE_STRDUP
852 REPLACE_STPNCPY
853 REPLACE_MEMMEM
854 REPLACE_MEMCHR
855 HAVE_STRVERSCMP
856 HAVE_DECL_STRSIGNAL
857 HAVE_DECL_STRERROR_R
858 HAVE_DECL_STRTOK_R
859 HAVE_STRCASESTR
860 HAVE_STRSEP
861 HAVE_STRPBRK
862 HAVE_DECL_STRNLEN
863 HAVE_DECL_STRNDUP
864 HAVE_DECL_STRDUP
865 HAVE_STRCHRNUL
866 HAVE_STPNCPY
867 HAVE_STPCPY
868 HAVE_RAWMEMCHR
869 HAVE_DECL_MEMRCHR
870 HAVE_MEMPCPY
871 HAVE_DECL_MEMMEM
872 HAVE_MEMCHR
873 HAVE_FFSLL
874 HAVE_FFSL
875 HAVE_MBSLEN
876 GNULIB_STRVERSCMP
877 GNULIB_STRSIGNAL
878 GNULIB_STRERROR_R
879 GNULIB_STRERROR
880 GNULIB_MBSTOK_R
881 GNULIB_MBSSEP
882 GNULIB_MBSSPN
883 GNULIB_MBSPBRK
884 GNULIB_MBSCSPN
885 GNULIB_MBSCASESTR
886 GNULIB_MBSPCASECMP
887 GNULIB_MBSNCASECMP
888 GNULIB_MBSCASECMP
889 GNULIB_MBSSTR
890 GNULIB_MBSRCHR
891 GNULIB_MBSCHR
892 GNULIB_MBSNLEN
893 GNULIB_MBSLEN
894 GNULIB_STRTOK_R
895 GNULIB_STRCASESTR
896 GNULIB_STRSTR
897 GNULIB_STRSEP
898 GNULIB_STRPBRK
899 GNULIB_STRNLEN
900 GNULIB_STRNDUP
901 GNULIB_STRNCAT
902 GNULIB_STRDUP
903 GNULIB_STRCHRNUL
904 GNULIB_STPNCPY
905 GNULIB_STPCPY
906 GNULIB_RAWMEMCHR
907 GNULIB_MEMRCHR
908 GNULIB_MEMPCPY
909 GNULIB_MEMMEM
910 GNULIB_MEMCHR
911 GNULIB_FFSLL
912 GNULIB_FFSL
913 LOCALE_FR_UTF8
914 LOCALE_ZH_CN
915 LOCALE_JA
916 REPLACE_WCSWIDTH
917 REPLACE_WCWIDTH
918 REPLACE_WCSNRTOMBS
919 REPLACE_WCSRTOMBS
920 REPLACE_WCRTOMB
921 REPLACE_MBSNRTOWCS
922 REPLACE_MBSRTOWCS
923 REPLACE_MBRLEN
924 REPLACE_MBRTOWC
925 REPLACE_MBSINIT
926 REPLACE_WCTOB
927 REPLACE_BTOWC
928 REPLACE_MBSTATE_T
929 HAVE_DECL_WCWIDTH
930 HAVE_DECL_WCTOB
931 HAVE_WCSWIDTH
932 HAVE_WCSTOK
933 HAVE_WCSSTR
934 HAVE_WCSPBRK
935 HAVE_WCSSPN
936 HAVE_WCSCSPN
937 HAVE_WCSRCHR
938 HAVE_WCSCHR
939 HAVE_WCSDUP
940 HAVE_WCSXFRM
941 HAVE_WCSCOLL
942 HAVE_WCSNCASECMP
943 HAVE_WCSCASECMP
944 HAVE_WCSNCMP
945 HAVE_WCSCMP
946 HAVE_WCSNCAT
947 HAVE_WCSCAT
948 HAVE_WCPNCPY
949 HAVE_WCSNCPY
950 HAVE_WCPCPY
951 HAVE_WCSCPY
952 HAVE_WCSNLEN
953 HAVE_WCSLEN
954 HAVE_WMEMSET
955 HAVE_WMEMMOVE
956 HAVE_WMEMCPY
957 HAVE_WMEMCMP
958 HAVE_WMEMCHR
959 HAVE_WCSNRTOMBS
960 HAVE_WCSRTOMBS
961 HAVE_WCRTOMB
962 HAVE_MBSNRTOWCS
963 HAVE_MBSRTOWCS
964 HAVE_MBRLEN
965 HAVE_MBRTOWC
966 HAVE_MBSINIT
967 HAVE_BTOWC
968 GNULIB_WCSWIDTH
969 GNULIB_WCSTOK
970 GNULIB_WCSSTR
971 GNULIB_WCSPBRK
972 GNULIB_WCSSPN
973 GNULIB_WCSCSPN
974 GNULIB_WCSRCHR
975 GNULIB_WCSCHR
976 GNULIB_WCSDUP
977 GNULIB_WCSXFRM
978 GNULIB_WCSCOLL
979 GNULIB_WCSNCASECMP
980 GNULIB_WCSCASECMP
981 GNULIB_WCSNCMP
982 GNULIB_WCSCMP
983 GNULIB_WCSNCAT
984 GNULIB_WCSCAT
985 GNULIB_WCPNCPY
986 GNULIB_WCSNCPY
987 GNULIB_WCPCPY
988 GNULIB_WCSCPY
989 GNULIB_WCSNLEN
990 GNULIB_WCSLEN
991 GNULIB_WMEMSET
992 GNULIB_WMEMMOVE
993 GNULIB_WMEMCPY
994 GNULIB_WMEMCMP
995 GNULIB_WMEMCHR
996 GNULIB_WCWIDTH
997 GNULIB_WCSNRTOMBS
998 GNULIB_WCSRTOMBS
999 GNULIB_WCRTOMB
1000 GNULIB_MBSNRTOWCS
1001 GNULIB_MBSRTOWCS
1002 GNULIB_MBRLEN
1003 GNULIB_MBRTOWC
1004 GNULIB_MBSINIT
1005 GNULIB_WCTOB
1006 GNULIB_BTOWC
1007 LOCALCHARSET_TESTS_ENVIRONMENT
1008 GLIBC21
1009 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1010 NEXT_SYS_TIME_H
1011 REPLACE_STRUCT_TIMEVAL
1012 REPLACE_GETTIMEOFDAY
1013 HAVE_SYS_TIME_H
1014 HAVE_STRUCT_TIMEVAL
1015 HAVE_GETTIMEOFDAY
1016 GNULIB_GETTIMEOFDAY
1017 LTLIBINTL
1018 LIBINTL
1019 GNULIB_GL_UNISTD_H_GETOPT
1020 GETOPT_H
1021 HAVE_GETOPT_H
1022 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1023 NEXT_GETOPT_H
1024 REPLACE_UTIMENSAT
1025 REPLACE_STAT
1026 REPLACE_MKNOD
1027 REPLACE_MKFIFO
1028 REPLACE_MKDIR
1029 REPLACE_LSTAT
1030 REPLACE_FUTIMENS
1031 REPLACE_FSTATAT
1032 REPLACE_FSTAT
1033 HAVE_UTIMENSAT
1034 HAVE_MKNODAT
1035 HAVE_MKNOD
1036 HAVE_MKFIFOAT
1037 HAVE_MKFIFO
1038 HAVE_MKDIRAT
1039 HAVE_LSTAT
1040 HAVE_LCHMOD
1041 HAVE_FUTIMENS
1042 HAVE_FSTATAT
1043 HAVE_FCHMODAT
1044 GNULIB_UTIMENSAT
1045 GNULIB_STAT
1046 GNULIB_MKNODAT
1047 GNULIB_MKNOD
1048 GNULIB_MKFIFOAT
1049 GNULIB_MKFIFO
1050 GNULIB_MKDIRAT
1051 GNULIB_LSTAT
1052 GNULIB_LCHMOD
1053 GNULIB_FUTIMENS
1054 GNULIB_FSTATAT
1055 GNULIB_FSTAT
1056 GNULIB_FCHMODAT
1057 REPLACE_ITOLD
1058 GL_GENERATE_FLOAT_H_FALSE
1059 GL_GENERATE_FLOAT_H_TRUE
1060 FLOAT_H
1061 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1062 NEXT_FLOAT_H
1063 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1064 NEXT_FCNTL_H
1065 REPLACE_OPENAT
1066 REPLACE_OPEN
1067 REPLACE_FCNTL
1068 HAVE_OPENAT
1069 HAVE_FCNTL
1070 GNULIB_OPENAT
1071 GNULIB_OPEN
1072 GNULIB_NONBLOCKING
1073 GNULIB_FCNTL
1074 EOVERFLOW_VALUE
1075 EOVERFLOW_HIDDEN
1076 ENOLINK_VALUE
1077 ENOLINK_HIDDEN
1078 EMULTIHOP_VALUE
1079 EMULTIHOP_HIDDEN
1080 GL_GENERATE_ERRNO_H_FALSE
1081 GL_GENERATE_ERRNO_H_TRUE
1082 ERRNO_H
1083 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1084 NEXT_ERRNO_H
1085 HAVE_DIRENT_H
1086 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1087 NEXT_DIRENT_H
1088 PRAGMA_COLUMNS
1089 PRAGMA_SYSTEM_HEADER
1090 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1091 INCLUDE_NEXT
1092 pkglibexecdir
1093 lispdir
1094 REPLACE_FDOPENDIR
1095 REPLACE_DIRFD
1096 REPLACE_CLOSEDIR
1097 REPLACE_OPENDIR
1098 HAVE_ALPHASORT
1099 HAVE_SCANDIR
1100 HAVE_FDOPENDIR
1101 HAVE_DECL_FDOPENDIR
1102 HAVE_DECL_DIRFD
1103 HAVE_CLOSEDIR
1104 HAVE_REWINDDIR
1105 HAVE_READDIR
1106 HAVE_OPENDIR
1107 GNULIB_ALPHASORT
1108 GNULIB_SCANDIR
1109 GNULIB_FDOPENDIR
1110 GNULIB_DIRFD
1111 GNULIB_CLOSEDIR
1112 GNULIB_REWINDDIR
1113 GNULIB_READDIR
1114 GNULIB_OPENDIR
1115 HAVE_WINSOCK2_H
1116 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1117 LIB_CLOCK_GETTIME
1118 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1119 UNISTD_H_HAVE_WINSOCK2_H
1120 REPLACE_WRITE
1121 REPLACE_USLEEP
1122 REPLACE_UNLINKAT
1123 REPLACE_UNLINK
1124 REPLACE_TTYNAME_R
1125 REPLACE_SYMLINK
1126 REPLACE_SLEEP
1127 REPLACE_RMDIR
1128 REPLACE_READLINK
1129 REPLACE_READ
1130 REPLACE_PWRITE
1131 REPLACE_PREAD
1132 REPLACE_LSEEK
1133 REPLACE_LINKAT
1134 REPLACE_LINK
1135 REPLACE_LCHOWN
1136 REPLACE_ISATTY
1137 REPLACE_GETPAGESIZE
1138 REPLACE_GETGROUPS
1139 REPLACE_GETLOGIN_R
1140 REPLACE_GETDOMAINNAME
1141 REPLACE_GETCWD
1142 REPLACE_FCHOWNAT
1143 REPLACE_DUP2
1144 REPLACE_DUP
1145 REPLACE_CLOSE
1146 REPLACE_CHOWN
1147 HAVE_SYS_PARAM_H
1148 HAVE_OS_H
1149 HAVE_DECL_TTYNAME_R
1150 HAVE_DECL_SETHOSTNAME
1151 HAVE_DECL_GETUSERSHELL
1152 HAVE_DECL_GETPAGESIZE
1153 HAVE_DECL_GETLOGIN_R
1154 HAVE_DECL_GETDOMAINNAME
1155 HAVE_DECL_FDATASYNC
1156 HAVE_DECL_FCHDIR
1157 HAVE_DECL_ENVIRON
1158 HAVE_USLEEP
1159 HAVE_UNLINKAT
1160 HAVE_SYMLINKAT
1161 HAVE_SYMLINK
1162 HAVE_SLEEP
1163 HAVE_SETHOSTNAME
1164 HAVE_READLINKAT
1165 HAVE_READLINK
1166 HAVE_PWRITE
1167 HAVE_PREAD
1168 HAVE_PIPE2
1169 HAVE_PIPE
1170 HAVE_LINKAT
1171 HAVE_LINK
1172 HAVE_LCHOWN
1173 HAVE_GROUP_MEMBER
1174 HAVE_GETPAGESIZE
1175 HAVE_GETLOGIN
1176 HAVE_GETHOSTNAME
1177 HAVE_GETGROUPS
1178 HAVE_GETDTABLESIZE
1179 HAVE_FTRUNCATE
1180 HAVE_FSYNC
1181 HAVE_FDATASYNC
1182 HAVE_FCHOWNAT
1183 HAVE_FCHDIR
1184 HAVE_FACCESSAT
1185 HAVE_EUIDACCESS
1186 HAVE_DUP3
1187 HAVE_DUP2
1188 HAVE_CHOWN
1189 GNULIB_WRITE
1190 GNULIB_USLEEP
1191 GNULIB_UNLINKAT
1192 GNULIB_UNLINK
1193 GNULIB_UNISTD_H_SIGPIPE
1194 GNULIB_UNISTD_H_NONBLOCKING
1195 GNULIB_TTYNAME_R
1196 GNULIB_SYMLINKAT
1197 GNULIB_SYMLINK
1198 GNULIB_SLEEP
1199 GNULIB_SETHOSTNAME
1200 GNULIB_RMDIR
1201 GNULIB_READLINKAT
1202 GNULIB_READLINK
1203 GNULIB_READ
1204 GNULIB_PWRITE
1205 GNULIB_PREAD
1206 GNULIB_PIPE2
1207 GNULIB_PIPE
1208 GNULIB_LSEEK
1209 GNULIB_LINKAT
1210 GNULIB_LINK
1211 GNULIB_LCHOWN
1212 GNULIB_ISATTY
1213 GNULIB_GROUP_MEMBER
1214 GNULIB_GETUSERSHELL
1215 GNULIB_GETPAGESIZE
1216 GNULIB_GETLOGIN_R
1217 GNULIB_GETLOGIN
1218 GNULIB_GETHOSTNAME
1219 GNULIB_GETGROUPS
1220 GNULIB_GETDTABLESIZE
1221 GNULIB_GETDOMAINNAME
1222 GNULIB_GETCWD
1223 GNULIB_FTRUNCATE
1224 GNULIB_FSYNC
1225 GNULIB_FDATASYNC
1226 GNULIB_FCHOWNAT
1227 GNULIB_FCHDIR
1228 GNULIB_FACCESSAT
1229 GNULIB_EUIDACCESS
1230 GNULIB_ENVIRON
1231 GNULIB_DUP3
1232 GNULIB_DUP2
1233 GNULIB_DUP
1234 GNULIB_CLOSE
1235 GNULIB_CHOWN
1236 GNULIB_CHDIR
1237 REPLACE_WCTOMB
1238 REPLACE_UNSETENV
1239 REPLACE_STRTOD
1240 REPLACE_SETENV
1241 REPLACE_REALPATH
1242 REPLACE_REALLOC
1243 REPLACE_RANDOM_R
1244 REPLACE_PUTENV
1245 REPLACE_PTSNAME_R
1246 REPLACE_MKSTEMP
1247 REPLACE_MBTOWC
1248 REPLACE_MALLOC
1249 REPLACE_CANONICALIZE_FILE_NAME
1250 REPLACE_CALLOC
1251 HAVE_DECL_UNSETENV
1252 HAVE_UNLOCKPT
1253 HAVE_SYS_LOADAVG_H
1254 HAVE_STRUCT_RANDOM_DATA
1255 HAVE_STRTOULL
1256 HAVE_STRTOLL
1257 HAVE_STRTOD
1258 HAVE_DECL_SETENV
1259 HAVE_SETENV
1260 HAVE_RPMATCH
1261 HAVE_REALPATH
1262 HAVE_RANDOM_R
1263 HAVE_RANDOM_H
1264 HAVE_RANDOM
1265 HAVE_PTSNAME_R
1266 HAVE_PTSNAME
1267 HAVE_POSIX_OPENPT
1268 HAVE_MKSTEMPS
1269 HAVE_MKSTEMP
1270 HAVE_MKOSTEMPS
1271 HAVE_MKOSTEMP
1272 HAVE_MKDTEMP
1273 HAVE_GRANTPT
1274 HAVE_GETSUBOPT
1275 HAVE_DECL_GETLOADAVG
1276 HAVE_CANONICALIZE_FILE_NAME
1277 HAVE_ATOLL
1278 HAVE__EXIT
1279 GNULIB_WCTOMB
1280 GNULIB_UNSETENV
1281 GNULIB_UNLOCKPT
1282 GNULIB_SYSTEM_POSIX
1283 GNULIB_STRTOULL
1284 GNULIB_STRTOLL
1285 GNULIB_STRTOD
1286 GNULIB_SETENV
1287 GNULIB_RPMATCH
1288 GNULIB_REALPATH
1289 GNULIB_REALLOC_POSIX
1290 GNULIB_RANDOM_R
1291 GNULIB_RANDOM
1292 GNULIB_PUTENV
1293 GNULIB_PTSNAME_R
1294 GNULIB_PTSNAME
1295 GNULIB_POSIX_OPENPT
1296 GNULIB_MKSTEMPS
1297 GNULIB_MKSTEMP
1298 GNULIB_MKOSTEMPS
1299 GNULIB_MKOSTEMP
1300 GNULIB_MKDTEMP
1301 GNULIB_MBTOWC
1302 GNULIB_MALLOC_POSIX
1303 GNULIB_GRANTPT
1304 GNULIB_GETSUBOPT
1305 GNULIB_GETLOADAVG
1306 GNULIB_CANONICALIZE_FILE_NAME
1307 GNULIB_CALLOC_POSIX
1308 GNULIB_ATOLL
1309 GNULIB__EXIT
1310 GL_GENERATE_ALLOCA_H_FALSE
1311 GL_GENERATE_ALLOCA_H_TRUE
1312 ALLOCA_H
1313 ALLOCA
1314 GL_COND_LIBTOOL_FALSE
1315 GL_COND_LIBTOOL_TRUE
1316 host_os
1317 host_vendor
1318 host_cpu
1319 host
1320 build_os
1321 build_vendor
1322 build_cpu
1323 build
1324 RANLIB
1325 ARFLAGS
1326 AR
1327 EGREP
1328 GREP
1329 CPP
1330 am__fastdepCC_FALSE
1331 am__fastdepCC_TRUE
1332 CCDEPMODE
1333 am__nodep
1334 AMDEPBACKSLASH
1335 AMDEP_FALSE
1336 AMDEP_TRUE
1337 am__quote
1338 am__include
1339 DEPDIR
1340 OBJEXT
1341 EXEEXT
1342 ac_ct_CC
1343 CPPFLAGS
1344 LDFLAGS
1345 CFLAGS
1346 CC
1347 AM_BACKSLASH
1348 AM_DEFAULT_VERBOSITY
1349 AM_DEFAULT_V
1350 AM_V
1351 am__untar
1352 am__tar
1353 AMTAR
1354 am__leading_dot
1355 SET_MAKE
1356 AWK
1357 mkdir_p
1358 MKDIR_P
1359 INSTALL_STRIP_PROGRAM
1360 STRIP
1361 install_sh
1362 MAKEINFO
1363 AUTOHEADER
1364 AUTOMAKE
1365 AUTOCONF
1366 ACLOCAL
1367 VERSION
1368 PACKAGE
1369 CYGPATH_W
1370 am__isrc
1371 INSTALL_DATA
1372 INSTALL_SCRIPT
1373 INSTALL_PROGRAM
1374 ALPHA_VERSION_FALSE
1375 ALPHA_VERSION_TRUE
1376 ENABLE_MERGE_FALSE
1377 ENABLE_MERGE_TRUE
1378 target_alias
1379 host_alias
1380 build_alias
1381 LIBS
1382 ECHO_T
1383 ECHO_N
1384 ECHO_C
1385 DEFS
1386 mandir
1387 localedir
1388 libdir
1389 psdir
1390 pdfdir
1391 dvidir
1392 htmldir
1393 infodir
1394 docdir
1395 oldincludedir
1396 includedir
1397 localstatedir
1398 sharedstatedir
1399 sysconfdir
1400 datadir
1401 datarootdir
1402 libexecdir
1403 sbindir
1404 bindir
1405 program_transform_name
1406 prefix
1407 exec_prefix
1408 PACKAGE_URL
1409 PACKAGE_BUGREPORT
1410 PACKAGE_STRING
1411 PACKAGE_VERSION
1412 PACKAGE_TARNAME
1413 PACKAGE_NAME
1414 PATH_SEPARATOR
1415 SHELL'
1416 ac_subst_files=''
1417 ac_user_opts='
1418 enable_option_checking
1419 enable_merge
1420 enable_silent_rules
1421 enable_dependency_tracking
1422 enable_largefile
1423 enable_gcc_warnings
1424 enable_xattr
1425 '
1426       ac_precious_vars='build_alias
1427 host_alias
1428 target_alias
1429 CC
1430 CFLAGS
1431 LDFLAGS
1432 LIBS
1433 CPPFLAGS
1434 CPP
1435 YACC
1436 YFLAGS'
1437
1438
1439 # Initialize some variables set by options.
1440 ac_init_help=
1441 ac_init_version=false
1442 ac_unrecognized_opts=
1443 ac_unrecognized_sep=
1444 # The variables have the same names as the options, with
1445 # dashes changed to underlines.
1446 cache_file=/dev/null
1447 exec_prefix=NONE
1448 no_create=
1449 no_recursion=
1450 prefix=NONE
1451 program_prefix=NONE
1452 program_suffix=NONE
1453 program_transform_name=s,x,x,
1454 silent=
1455 site=
1456 srcdir=
1457 verbose=
1458 x_includes=NONE
1459 x_libraries=NONE
1460
1461 # Installation directory options.
1462 # These are left unexpanded so users can "make install exec_prefix=/foo"
1463 # and all the variables that are supposed to be based on exec_prefix
1464 # by default will actually change.
1465 # Use braces instead of parens because sh, perl, etc. also accept them.
1466 # (The list follows the same order as the GNU Coding Standards.)
1467 bindir='${exec_prefix}/bin'
1468 sbindir='${exec_prefix}/sbin'
1469 libexecdir='${exec_prefix}/libexec'
1470 datarootdir='${prefix}/share'
1471 datadir='${datarootdir}'
1472 sysconfdir='${prefix}/etc'
1473 sharedstatedir='${prefix}/com'
1474 localstatedir='${prefix}/var'
1475 includedir='${prefix}/include'
1476 oldincludedir='/usr/include'
1477 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1478 infodir='${datarootdir}/info'
1479 htmldir='${docdir}'
1480 dvidir='${docdir}'
1481 pdfdir='${docdir}'
1482 psdir='${docdir}'
1483 libdir='${exec_prefix}/lib'
1484 localedir='${datarootdir}/locale'
1485 mandir='${datarootdir}/man'
1486
1487 ac_prev=
1488 ac_dashdash=
1489 for ac_option
1490 do
1491   # If the previous option needs an argument, assign it.
1492   if test -n "$ac_prev"; then
1493     eval $ac_prev=\$ac_option
1494     ac_prev=
1495     continue
1496   fi
1497
1498   case $ac_option in
1499   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1500   *=)   ac_optarg= ;;
1501   *)    ac_optarg=yes ;;
1502   esac
1503
1504   # Accept the important Cygnus configure options, so we can diagnose typos.
1505
1506   case $ac_dashdash$ac_option in
1507   --)
1508     ac_dashdash=yes ;;
1509
1510   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1511     ac_prev=bindir ;;
1512   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1513     bindir=$ac_optarg ;;
1514
1515   -build | --build | --buil | --bui | --bu)
1516     ac_prev=build_alias ;;
1517   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1518     build_alias=$ac_optarg ;;
1519
1520   -cache-file | --cache-file | --cache-fil | --cache-fi \
1521   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1522     ac_prev=cache_file ;;
1523   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1524   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1525     cache_file=$ac_optarg ;;
1526
1527   --config-cache | -C)
1528     cache_file=config.cache ;;
1529
1530   -datadir | --datadir | --datadi | --datad)
1531     ac_prev=datadir ;;
1532   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1533     datadir=$ac_optarg ;;
1534
1535   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1536   | --dataroo | --dataro | --datar)
1537     ac_prev=datarootdir ;;
1538   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1539   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1540     datarootdir=$ac_optarg ;;
1541
1542   -disable-* | --disable-*)
1543     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1544     # Reject names that are not valid shell variable names.
1545     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1546       as_fn_error $? "invalid feature name: $ac_useropt"
1547     ac_useropt_orig=$ac_useropt
1548     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1549     case $ac_user_opts in
1550       *"
1551 "enable_$ac_useropt"
1552 "*) ;;
1553       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1554          ac_unrecognized_sep=', ';;
1555     esac
1556     eval enable_$ac_useropt=no ;;
1557
1558   -docdir | --docdir | --docdi | --doc | --do)
1559     ac_prev=docdir ;;
1560   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1561     docdir=$ac_optarg ;;
1562
1563   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1564     ac_prev=dvidir ;;
1565   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1566     dvidir=$ac_optarg ;;
1567
1568   -enable-* | --enable-*)
1569     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1570     # Reject names that are not valid shell variable names.
1571     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1572       as_fn_error $? "invalid feature name: $ac_useropt"
1573     ac_useropt_orig=$ac_useropt
1574     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1575     case $ac_user_opts in
1576       *"
1577 "enable_$ac_useropt"
1578 "*) ;;
1579       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1580          ac_unrecognized_sep=', ';;
1581     esac
1582     eval enable_$ac_useropt=\$ac_optarg ;;
1583
1584   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1585   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1586   | --exec | --exe | --ex)
1587     ac_prev=exec_prefix ;;
1588   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1589   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1590   | --exec=* | --exe=* | --ex=*)
1591     exec_prefix=$ac_optarg ;;
1592
1593   -gas | --gas | --ga | --g)
1594     # Obsolete; use --with-gas.
1595     with_gas=yes ;;
1596
1597   -help | --help | --hel | --he | -h)
1598     ac_init_help=long ;;
1599   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1600     ac_init_help=recursive ;;
1601   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1602     ac_init_help=short ;;
1603
1604   -host | --host | --hos | --ho)
1605     ac_prev=host_alias ;;
1606   -host=* | --host=* | --hos=* | --ho=*)
1607     host_alias=$ac_optarg ;;
1608
1609   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1610     ac_prev=htmldir ;;
1611   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1612   | --ht=*)
1613     htmldir=$ac_optarg ;;
1614
1615   -includedir | --includedir | --includedi | --included | --include \
1616   | --includ | --inclu | --incl | --inc)
1617     ac_prev=includedir ;;
1618   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1619   | --includ=* | --inclu=* | --incl=* | --inc=*)
1620     includedir=$ac_optarg ;;
1621
1622   -infodir | --infodir | --infodi | --infod | --info | --inf)
1623     ac_prev=infodir ;;
1624   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1625     infodir=$ac_optarg ;;
1626
1627   -libdir | --libdir | --libdi | --libd)
1628     ac_prev=libdir ;;
1629   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1630     libdir=$ac_optarg ;;
1631
1632   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1633   | --libexe | --libex | --libe)
1634     ac_prev=libexecdir ;;
1635   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1636   | --libexe=* | --libex=* | --libe=*)
1637     libexecdir=$ac_optarg ;;
1638
1639   -localedir | --localedir | --localedi | --localed | --locale)
1640     ac_prev=localedir ;;
1641   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1642     localedir=$ac_optarg ;;
1643
1644   -localstatedir | --localstatedir | --localstatedi | --localstated \
1645   | --localstate | --localstat | --localsta | --localst | --locals)
1646     ac_prev=localstatedir ;;
1647   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1648   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1649     localstatedir=$ac_optarg ;;
1650
1651   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1652     ac_prev=mandir ;;
1653   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1654     mandir=$ac_optarg ;;
1655
1656   -nfp | --nfp | --nf)
1657     # Obsolete; use --without-fp.
1658     with_fp=no ;;
1659
1660   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1661   | --no-cr | --no-c | -n)
1662     no_create=yes ;;
1663
1664   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1665   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1666     no_recursion=yes ;;
1667
1668   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1669   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1670   | --oldin | --oldi | --old | --ol | --o)
1671     ac_prev=oldincludedir ;;
1672   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1673   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1674   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1675     oldincludedir=$ac_optarg ;;
1676
1677   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1678     ac_prev=prefix ;;
1679   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1680     prefix=$ac_optarg ;;
1681
1682   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1683   | --program-pre | --program-pr | --program-p)
1684     ac_prev=program_prefix ;;
1685   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1686   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1687     program_prefix=$ac_optarg ;;
1688
1689   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1690   | --program-suf | --program-su | --program-s)
1691     ac_prev=program_suffix ;;
1692   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1693   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1694     program_suffix=$ac_optarg ;;
1695
1696   -program-transform-name | --program-transform-name \
1697   | --program-transform-nam | --program-transform-na \
1698   | --program-transform-n | --program-transform- \
1699   | --program-transform | --program-transfor \
1700   | --program-transfo | --program-transf \
1701   | --program-trans | --program-tran \
1702   | --progr-tra | --program-tr | --program-t)
1703     ac_prev=program_transform_name ;;
1704   -program-transform-name=* | --program-transform-name=* \
1705   | --program-transform-nam=* | --program-transform-na=* \
1706   | --program-transform-n=* | --program-transform-=* \
1707   | --program-transform=* | --program-transfor=* \
1708   | --program-transfo=* | --program-transf=* \
1709   | --program-trans=* | --program-tran=* \
1710   | --progr-tra=* | --program-tr=* | --program-t=*)
1711     program_transform_name=$ac_optarg ;;
1712
1713   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1714     ac_prev=pdfdir ;;
1715   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1716     pdfdir=$ac_optarg ;;
1717
1718   -psdir | --psdir | --psdi | --psd | --ps)
1719     ac_prev=psdir ;;
1720   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1721     psdir=$ac_optarg ;;
1722
1723   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1724   | -silent | --silent | --silen | --sile | --sil)
1725     silent=yes ;;
1726
1727   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1728     ac_prev=sbindir ;;
1729   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1730   | --sbi=* | --sb=*)
1731     sbindir=$ac_optarg ;;
1732
1733   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1734   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1735   | --sharedst | --shareds | --shared | --share | --shar \
1736   | --sha | --sh)
1737     ac_prev=sharedstatedir ;;
1738   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1739   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1740   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1741   | --sha=* | --sh=*)
1742     sharedstatedir=$ac_optarg ;;
1743
1744   -site | --site | --sit)
1745     ac_prev=site ;;
1746   -site=* | --site=* | --sit=*)
1747     site=$ac_optarg ;;
1748
1749   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1750     ac_prev=srcdir ;;
1751   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1752     srcdir=$ac_optarg ;;
1753
1754   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1755   | --syscon | --sysco | --sysc | --sys | --sy)
1756     ac_prev=sysconfdir ;;
1757   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1758   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1759     sysconfdir=$ac_optarg ;;
1760
1761   -target | --target | --targe | --targ | --tar | --ta | --t)
1762     ac_prev=target_alias ;;
1763   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1764     target_alias=$ac_optarg ;;
1765
1766   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1767     verbose=yes ;;
1768
1769   -version | --version | --versio | --versi | --vers | -V)
1770     ac_init_version=: ;;
1771
1772   -with-* | --with-*)
1773     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1774     # Reject names that are not valid shell variable names.
1775     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1776       as_fn_error $? "invalid package name: $ac_useropt"
1777     ac_useropt_orig=$ac_useropt
1778     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1779     case $ac_user_opts in
1780       *"
1781 "with_$ac_useropt"
1782 "*) ;;
1783       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1784          ac_unrecognized_sep=', ';;
1785     esac
1786     eval with_$ac_useropt=\$ac_optarg ;;
1787
1788   -without-* | --without-*)
1789     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1790     # Reject names that are not valid shell variable names.
1791     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1792       as_fn_error $? "invalid package name: $ac_useropt"
1793     ac_useropt_orig=$ac_useropt
1794     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1795     case $ac_user_opts in
1796       *"
1797 "with_$ac_useropt"
1798 "*) ;;
1799       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1800          ac_unrecognized_sep=', ';;
1801     esac
1802     eval with_$ac_useropt=no ;;
1803
1804   --x)
1805     # Obsolete; use --with-x.
1806     with_x=yes ;;
1807
1808   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1809   | --x-incl | --x-inc | --x-in | --x-i)
1810     ac_prev=x_includes ;;
1811   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1812   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1813     x_includes=$ac_optarg ;;
1814
1815   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1816   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1817     ac_prev=x_libraries ;;
1818   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1819   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1820     x_libraries=$ac_optarg ;;
1821
1822   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1823 Try \`$0 --help' for more information"
1824     ;;
1825
1826   *=*)
1827     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1828     # Reject names that are not valid shell variable names.
1829     case $ac_envvar in #(
1830       '' | [0-9]* | *[!_$as_cr_alnum]* )
1831       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1832     esac
1833     eval $ac_envvar=\$ac_optarg
1834     export $ac_envvar ;;
1835
1836   *)
1837     # FIXME: should be removed in autoconf 3.0.
1838     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1839     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1840       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1841     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1842     ;;
1843
1844   esac
1845 done
1846
1847 if test -n "$ac_prev"; then
1848   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1849   as_fn_error $? "missing argument to $ac_option"
1850 fi
1851
1852 if test -n "$ac_unrecognized_opts"; then
1853   case $enable_option_checking in
1854     no) ;;
1855     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1856     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1857   esac
1858 fi
1859
1860 # Check all directory arguments for consistency.
1861 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1862                 datadir sysconfdir sharedstatedir localstatedir includedir \
1863                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1864                 libdir localedir mandir
1865 do
1866   eval ac_val=\$$ac_var
1867   # Remove trailing slashes.
1868   case $ac_val in
1869     */ )
1870       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1871       eval $ac_var=\$ac_val;;
1872   esac
1873   # Be sure to have absolute directory names.
1874   case $ac_val in
1875     [\\/$]* | ?:[\\/]* )  continue;;
1876     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1877   esac
1878   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1879 done
1880
1881 # There might be people who depend on the old broken behavior: `$host'
1882 # used to hold the argument of --host etc.
1883 # FIXME: To remove some day.
1884 build=$build_alias
1885 host=$host_alias
1886 target=$target_alias
1887
1888 # FIXME: To remove some day.
1889 if test "x$host_alias" != x; then
1890   if test "x$build_alias" = x; then
1891     cross_compiling=maybe
1892     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1893     If a cross compiler is detected then cross compile mode will be used" >&2
1894   elif test "x$build_alias" != "x$host_alias"; then
1895     cross_compiling=yes
1896   fi
1897 fi
1898
1899 ac_tool_prefix=
1900 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1901
1902 test "$silent" = yes && exec 6>/dev/null
1903
1904
1905 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1906 ac_ls_di=`ls -di .` &&
1907 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1908   as_fn_error $? "working directory cannot be determined"
1909 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1910   as_fn_error $? "pwd does not report name of working directory"
1911
1912
1913 # Find the source files, if location was not specified.
1914 if test -z "$srcdir"; then
1915   ac_srcdir_defaulted=yes
1916   # Try the directory containing this script, then the parent directory.
1917   ac_confdir=`$as_dirname -- "$as_myself" ||
1918 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1919          X"$as_myself" : 'X\(//\)[^/]' \| \
1920          X"$as_myself" : 'X\(//\)$' \| \
1921          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1922 $as_echo X"$as_myself" |
1923     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1924             s//\1/
1925             q
1926           }
1927           /^X\(\/\/\)[^/].*/{
1928             s//\1/
1929             q
1930           }
1931           /^X\(\/\/\)$/{
1932             s//\1/
1933             q
1934           }
1935           /^X\(\/\).*/{
1936             s//\1/
1937             q
1938           }
1939           s/.*/./; q'`
1940   srcdir=$ac_confdir
1941   if test ! -r "$srcdir/$ac_unique_file"; then
1942     srcdir=..
1943   fi
1944 else
1945   ac_srcdir_defaulted=no
1946 fi
1947 if test ! -r "$srcdir/$ac_unique_file"; then
1948   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1949   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1950 fi
1951 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1952 ac_abs_confdir=`(
1953         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1954         pwd)`
1955 # When building in place, set srcdir=.
1956 if test "$ac_abs_confdir" = "$ac_pwd"; then
1957   srcdir=.
1958 fi
1959 # Remove unnecessary trailing slashes from srcdir.
1960 # Double slashes in file names in object file debugging info
1961 # mess up M-x gdb in Emacs.
1962 case $srcdir in
1963 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1964 esac
1965 for ac_var in $ac_precious_vars; do
1966   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1967   eval ac_env_${ac_var}_value=\$${ac_var}
1968   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1969   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1970 done
1971
1972 #
1973 # Report the --help message.
1974 #
1975 if test "$ac_init_help" = "long"; then
1976   # Omit some internal or obsolete options to make the list less imposing.
1977   # This message is too long to be a string in the A/UX 3.1 sh.
1978   cat <<_ACEOF
1979 \`configure' configures GNU patch 2.6.1.169-7096 to adapt to many kinds of systems.
1980
1981 Usage: $0 [OPTION]... [VAR=VALUE]...
1982
1983 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1984 VAR=VALUE.  See below for descriptions of some of the useful variables.
1985
1986 Defaults for the options are specified in brackets.
1987
1988 Configuration:
1989   -h, --help              display this help and exit
1990       --help=short        display options specific to this package
1991       --help=recursive    display the short help of all the included packages
1992   -V, --version           display version information and exit
1993   -q, --quiet, --silent   do not print \`checking ...' messages
1994       --cache-file=FILE   cache test results in FILE [disabled]
1995   -C, --config-cache      alias for \`--cache-file=config.cache'
1996   -n, --no-create         do not create output files
1997       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1998
1999 Installation directories:
2000   --prefix=PREFIX         install architecture-independent files in PREFIX
2001                           [$ac_default_prefix]
2002   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2003                           [PREFIX]
2004
2005 By default, \`make install' will install all the files in
2006 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2007 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2008 for instance \`--prefix=\$HOME'.
2009
2010 For better control, use the options below.
2011
2012 Fine tuning of the installation directories:
2013   --bindir=DIR            user executables [EPREFIX/bin]
2014   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2015   --libexecdir=DIR        program executables [EPREFIX/libexec]
2016   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2017   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2018   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2019   --libdir=DIR            object code libraries [EPREFIX/lib]
2020   --includedir=DIR        C header files [PREFIX/include]
2021   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2022   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2023   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2024   --infodir=DIR           info documentation [DATAROOTDIR/info]
2025   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2026   --mandir=DIR            man documentation [DATAROOTDIR/man]
2027   --docdir=DIR            documentation root [DATAROOTDIR/doc/patch]
2028   --htmldir=DIR           html documentation [DOCDIR]
2029   --dvidir=DIR            dvi documentation [DOCDIR]
2030   --pdfdir=DIR            pdf documentation [DOCDIR]
2031   --psdir=DIR             ps documentation [DOCDIR]
2032 _ACEOF
2033
2034   cat <<\_ACEOF
2035
2036 Program names:
2037   --program-prefix=PREFIX            prepend PREFIX to installed program names
2038   --program-suffix=SUFFIX            append SUFFIX to installed program names
2039   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2040
2041 System types:
2042   --build=BUILD     configure for building on BUILD [guessed]
2043   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2044 _ACEOF
2045 fi
2046
2047 if test -n "$ac_init_help"; then
2048   case $ac_init_help in
2049      short | recursive ) echo "Configuration of GNU patch 2.6.1.169-7096:";;
2050    esac
2051   cat <<\_ACEOF
2052
2053 Optional Features:
2054   --disable-option-checking  ignore unrecognized --enable/--with options
2055   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2056   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2057   --disable-merge         disable support for merging
2058   --enable-silent-rules          less verbose build output (undo: `make V=1')
2059   --disable-silent-rules         verbose build output (undo: `make V=0')
2060   --disable-dependency-tracking  speeds up one-time build
2061   --enable-dependency-tracking   do not reject slow dependency extractors
2062   --disable-largefile     omit support for large files
2063   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2064   --disable-xattr         do not support extended attributes
2065
2066 Some influential environment variables:
2067   CC          C compiler command
2068   CFLAGS      C compiler flags
2069   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2070               nonstandard directory <lib dir>
2071   LIBS        libraries to pass to the linker, e.g. -l<library>
2072   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2073               you have headers in a nonstandard directory <include dir>
2074   CPP         C preprocessor
2075   YACC        The "Yet Another C Compiler" implementation to use. Defaults to
2076               'bison -y'. Values other than 'bison -y' will most likely break
2077               on most systems.
2078   YFLAGS      YFLAGS contains the list arguments that will be passed by
2079               default to Bison. This script will default YFLAGS to the empty
2080               string to avoid a default value of '-d' given by some make
2081               applications.
2082
2083 Use these variables to override the choices made by `configure' or to help
2084 it to find libraries and programs with nonstandard names/locations.
2085
2086 Report bugs to <bug-patch@gnu.org>.
2087 GNU patch home page: <http://www.gnu.org/software/patch/>.
2088 General help using GNU software: <http://www.gnu.org/gethelp/>.
2089 _ACEOF
2090 ac_status=$?
2091 fi
2092
2093 if test "$ac_init_help" = "recursive"; then
2094   # If there are subdirs, report their specific --help.
2095   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2096     test -d "$ac_dir" ||
2097       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2098       continue
2099     ac_builddir=.
2100
2101 case "$ac_dir" in
2102 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2103 *)
2104   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2105   # A ".." for each directory in $ac_dir_suffix.
2106   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2107   case $ac_top_builddir_sub in
2108   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2109   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2110   esac ;;
2111 esac
2112 ac_abs_top_builddir=$ac_pwd
2113 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2114 # for backward compatibility:
2115 ac_top_builddir=$ac_top_build_prefix
2116
2117 case $srcdir in
2118   .)  # We are building in place.
2119     ac_srcdir=.
2120     ac_top_srcdir=$ac_top_builddir_sub
2121     ac_abs_top_srcdir=$ac_pwd ;;
2122   [\\/]* | ?:[\\/]* )  # Absolute name.
2123     ac_srcdir=$srcdir$ac_dir_suffix;
2124     ac_top_srcdir=$srcdir
2125     ac_abs_top_srcdir=$srcdir ;;
2126   *) # Relative name.
2127     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2128     ac_top_srcdir=$ac_top_build_prefix$srcdir
2129     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2130 esac
2131 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2132
2133     cd "$ac_dir" || { ac_status=$?; continue; }
2134     # Check for guested configure.
2135     if test -f "$ac_srcdir/configure.gnu"; then
2136       echo &&
2137       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2138     elif test -f "$ac_srcdir/configure"; then
2139       echo &&
2140       $SHELL "$ac_srcdir/configure" --help=recursive
2141     else
2142       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2143     fi || ac_status=$?
2144     cd "$ac_pwd" || { ac_status=$?; break; }
2145   done
2146 fi
2147
2148 test -n "$ac_init_help" && exit $ac_status
2149 if $ac_init_version; then
2150   cat <<\_ACEOF
2151 GNU patch configure 2.6.1.169-7096
2152 generated by GNU Autoconf 2.68
2153
2154 Copyright (C) 2010 Free Software Foundation, Inc.
2155 This configure script is free software; the Free Software Foundation
2156 gives unlimited permission to copy, distribute and modify it.
2157 _ACEOF
2158   exit
2159 fi
2160
2161 ## ------------------------ ##
2162 ## Autoconf initialization. ##
2163 ## ------------------------ ##
2164
2165 # ac_fn_c_try_compile LINENO
2166 # --------------------------
2167 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2168 ac_fn_c_try_compile ()
2169 {
2170   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171   rm -f conftest.$ac_objext
2172   if { { ac_try="$ac_compile"
2173 case "(($ac_try" in
2174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2175   *) ac_try_echo=$ac_try;;
2176 esac
2177 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2178 $as_echo "$ac_try_echo"; } >&5
2179   (eval "$ac_compile") 2>conftest.err
2180   ac_status=$?
2181   if test -s conftest.err; then
2182     grep -v '^ *+' conftest.err >conftest.er1
2183     cat conftest.er1 >&5
2184     mv -f conftest.er1 conftest.err
2185   fi
2186   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2187   test $ac_status = 0; } && {
2188          test -z "$ac_c_werror_flag" ||
2189          test ! -s conftest.err
2190        } && test -s conftest.$ac_objext; then :
2191   ac_retval=0
2192 else
2193   $as_echo "$as_me: failed program was:" >&5
2194 sed 's/^/| /' conftest.$ac_ext >&5
2195
2196         ac_retval=1
2197 fi
2198   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199   as_fn_set_status $ac_retval
2200
2201 } # ac_fn_c_try_compile
2202
2203 # ac_fn_c_try_cpp LINENO
2204 # ----------------------
2205 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2206 ac_fn_c_try_cpp ()
2207 {
2208   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209   if { { ac_try="$ac_cpp conftest.$ac_ext"
2210 case "(($ac_try" in
2211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212   *) ac_try_echo=$ac_try;;
2213 esac
2214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215 $as_echo "$ac_try_echo"; } >&5
2216   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2217   ac_status=$?
2218   if test -s conftest.err; then
2219     grep -v '^ *+' conftest.err >conftest.er1
2220     cat conftest.er1 >&5
2221     mv -f conftest.er1 conftest.err
2222   fi
2223   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224   test $ac_status = 0; } > conftest.i && {
2225          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2226          test ! -s conftest.err
2227        }; then :
2228   ac_retval=0
2229 else
2230   $as_echo "$as_me: failed program was:" >&5
2231 sed 's/^/| /' conftest.$ac_ext >&5
2232
2233     ac_retval=1
2234 fi
2235   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2236   as_fn_set_status $ac_retval
2237
2238 } # ac_fn_c_try_cpp
2239
2240 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2241 # -------------------------------------------------------
2242 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2243 # the include files in INCLUDES and setting the cache variable VAR
2244 # accordingly.
2245 ac_fn_c_check_header_mongrel ()
2246 {
2247   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248   if eval \${$3+:} false; then :
2249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2250 $as_echo_n "checking for $2... " >&6; }
2251 if eval \${$3+:} false; then :
2252   $as_echo_n "(cached) " >&6
2253 fi
2254 eval ac_res=\$$3
2255                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2256 $as_echo "$ac_res" >&6; }
2257 else
2258   # Is the header compilable?
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2260 $as_echo_n "checking $2 usability... " >&6; }
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h.  */
2263 $4
2264 #include <$2>
2265 _ACEOF
2266 if ac_fn_c_try_compile "$LINENO"; then :
2267   ac_header_compiler=yes
2268 else
2269   ac_header_compiler=no
2270 fi
2271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2273 $as_echo "$ac_header_compiler" >&6; }
2274
2275 # Is the header present?
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2277 $as_echo_n "checking $2 presence... " >&6; }
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h.  */
2280 #include <$2>
2281 _ACEOF
2282 if ac_fn_c_try_cpp "$LINENO"; then :
2283   ac_header_preproc=yes
2284 else
2285   ac_header_preproc=no
2286 fi
2287 rm -f conftest.err conftest.i conftest.$ac_ext
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2289 $as_echo "$ac_header_preproc" >&6; }
2290
2291 # So?  What about this header?
2292 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2293   yes:no: )
2294     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2295 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2296     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2297 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2298     ;;
2299   no:yes:* )
2300     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2301 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2302     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2303 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2304     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2305 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2306     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2307 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2308     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2309 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2310 ( $as_echo "## -------------------------------- ##
2311 ## Report this to bug-patch@gnu.org ##
2312 ## -------------------------------- ##"
2313      ) | sed "s/^/$as_me: WARNING:     /" >&2
2314     ;;
2315 esac
2316   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2317 $as_echo_n "checking for $2... " >&6; }
2318 if eval \${$3+:} false; then :
2319   $as_echo_n "(cached) " >&6
2320 else
2321   eval "$3=\$ac_header_compiler"
2322 fi
2323 eval ac_res=\$$3
2324                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325 $as_echo "$ac_res" >&6; }
2326 fi
2327   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328
2329 } # ac_fn_c_check_header_mongrel
2330
2331 # ac_fn_c_try_run LINENO
2332 # ----------------------
2333 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2334 # that executables *can* be run.
2335 ac_fn_c_try_run ()
2336 {
2337   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338   if { { ac_try="$ac_link"
2339 case "(($ac_try" in
2340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341   *) ac_try_echo=$ac_try;;
2342 esac
2343 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344 $as_echo "$ac_try_echo"; } >&5
2345   (eval "$ac_link") 2>&5
2346   ac_status=$?
2347   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2348   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2349   { { case "(($ac_try" in
2350   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351   *) ac_try_echo=$ac_try;;
2352 esac
2353 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354 $as_echo "$ac_try_echo"; } >&5
2355   (eval "$ac_try") 2>&5
2356   ac_status=$?
2357   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2358   test $ac_status = 0; }; }; then :
2359   ac_retval=0
2360 else
2361   $as_echo "$as_me: program exited with status $ac_status" >&5
2362        $as_echo "$as_me: failed program was:" >&5
2363 sed 's/^/| /' conftest.$ac_ext >&5
2364
2365        ac_retval=$ac_status
2366 fi
2367   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2368   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369   as_fn_set_status $ac_retval
2370
2371 } # ac_fn_c_try_run
2372
2373 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2374 # -------------------------------------------------------
2375 # Tests whether HEADER exists and can be compiled using the include files in
2376 # INCLUDES, setting the cache variable VAR accordingly.
2377 ac_fn_c_check_header_compile ()
2378 {
2379   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2381 $as_echo_n "checking for $2... " >&6; }
2382 if eval \${$3+:} false; then :
2383   $as_echo_n "(cached) " >&6
2384 else
2385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h.  */
2387 $4
2388 #include <$2>
2389 _ACEOF
2390 if ac_fn_c_try_compile "$LINENO"; then :
2391   eval "$3=yes"
2392 else
2393   eval "$3=no"
2394 fi
2395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396 fi
2397 eval ac_res=\$$3
2398                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399 $as_echo "$ac_res" >&6; }
2400   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401
2402 } # ac_fn_c_check_header_compile
2403
2404 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2405 # -------------------------------------------
2406 # Tests whether TYPE exists after having included INCLUDES, setting cache
2407 # variable VAR accordingly.
2408 ac_fn_c_check_type ()
2409 {
2410   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2412 $as_echo_n "checking for $2... " >&6; }
2413 if eval \${$3+:} false; then :
2414   $as_echo_n "(cached) " >&6
2415 else
2416   eval "$3=no"
2417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418 /* end confdefs.h.  */
2419 $4
2420 int
2421 main ()
2422 {
2423 if (sizeof ($2))
2424          return 0;
2425   ;
2426   return 0;
2427 }
2428 _ACEOF
2429 if ac_fn_c_try_compile "$LINENO"; then :
2430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431 /* end confdefs.h.  */
2432 $4
2433 int
2434 main ()
2435 {
2436 if (sizeof (($2)))
2437             return 0;
2438   ;
2439   return 0;
2440 }
2441 _ACEOF
2442 if ac_fn_c_try_compile "$LINENO"; then :
2443
2444 else
2445   eval "$3=yes"
2446 fi
2447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2448 fi
2449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450 fi
2451 eval ac_res=\$$3
2452                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2453 $as_echo "$ac_res" >&6; }
2454   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2455
2456 } # ac_fn_c_check_type
2457
2458 # ac_fn_c_try_link LINENO
2459 # -----------------------
2460 # Try to link conftest.$ac_ext, and return whether this succeeded.
2461 ac_fn_c_try_link ()
2462 {
2463   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464   rm -f conftest.$ac_objext conftest$ac_exeext
2465   if { { ac_try="$ac_link"
2466 case "(($ac_try" in
2467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2468   *) ac_try_echo=$ac_try;;
2469 esac
2470 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2471 $as_echo "$ac_try_echo"; } >&5
2472   (eval "$ac_link") 2>conftest.err
2473   ac_status=$?
2474   if test -s conftest.err; then
2475     grep -v '^ *+' conftest.err >conftest.er1
2476     cat conftest.er1 >&5
2477     mv -f conftest.er1 conftest.err
2478   fi
2479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2480   test $ac_status = 0; } && {
2481          test -z "$ac_c_werror_flag" ||
2482          test ! -s conftest.err
2483        } && test -s conftest$ac_exeext && {
2484          test "$cross_compiling" = yes ||
2485          $as_test_x conftest$ac_exeext
2486        }; then :
2487   ac_retval=0
2488 else
2489   $as_echo "$as_me: failed program was:" >&5
2490 sed 's/^/| /' conftest.$ac_ext >&5
2491
2492         ac_retval=1
2493 fi
2494   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2495   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2496   # interfere with the next link command; also delete a directory that is
2497   # left behind by Apple's compiler.  We do this before executing the actions.
2498   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2499   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500   as_fn_set_status $ac_retval
2501
2502 } # ac_fn_c_try_link
2503
2504 # ac_fn_c_check_func LINENO FUNC VAR
2505 # ----------------------------------
2506 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2507 ac_fn_c_check_func ()
2508 {
2509   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
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   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516 /* end confdefs.h.  */
2517 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2518    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2519 #define $2 innocuous_$2
2520
2521 /* System header to define __stub macros and hopefully few prototypes,
2522     which can conflict with char $2 (); below.
2523     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2524     <limits.h> exists even on freestanding compilers.  */
2525
2526 #ifdef __STDC__
2527 # include <limits.h>
2528 #else
2529 # include <assert.h>
2530 #endif
2531
2532 #undef $2
2533
2534 /* Override any GCC internal prototype to avoid an error.
2535    Use char because int might match the return type of a GCC
2536    builtin and then its argument prototype would still apply.  */
2537 #ifdef __cplusplus
2538 extern "C"
2539 #endif
2540 char $2 ();
2541 /* The GNU C library defines this for functions which it implements
2542     to always fail with ENOSYS.  Some functions are actually named
2543     something starting with __ and the normal name is an alias.  */
2544 #if defined __stub_$2 || defined __stub___$2
2545 choke me
2546 #endif
2547
2548 int
2549 main ()
2550 {
2551 return $2 ();
2552   ;
2553   return 0;
2554 }
2555 _ACEOF
2556 if ac_fn_c_try_link "$LINENO"; then :
2557   eval "$3=yes"
2558 else
2559   eval "$3=no"
2560 fi
2561 rm -f core conftest.err conftest.$ac_objext \
2562     conftest$ac_exeext conftest.$ac_ext
2563 fi
2564 eval ac_res=\$$3
2565                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2566 $as_echo "$ac_res" >&6; }
2567   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2568
2569 } # ac_fn_c_check_func
2570
2571 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2572 # ---------------------------------------------
2573 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2574 # accordingly.
2575 ac_fn_c_check_decl ()
2576 {
2577   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2578   as_decl_name=`echo $2|sed 's/ *(.*//'`
2579   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2581 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2582 if eval \${$3+:} false; then :
2583   $as_echo_n "(cached) " >&6
2584 else
2585   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586 /* end confdefs.h.  */
2587 $4
2588 int
2589 main ()
2590 {
2591 #ifndef $as_decl_name
2592 #ifdef __cplusplus
2593   (void) $as_decl_use;
2594 #else
2595   (void) $as_decl_name;
2596 #endif
2597 #endif
2598
2599   ;
2600   return 0;
2601 }
2602 _ACEOF
2603 if ac_fn_c_try_compile "$LINENO"; then :
2604   eval "$3=yes"
2605 else
2606   eval "$3=no"
2607 fi
2608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609 fi
2610 eval ac_res=\$$3
2611                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2612 $as_echo "$ac_res" >&6; }
2613   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2614
2615 } # ac_fn_c_check_decl
2616
2617 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2618 # --------------------------------------------
2619 # Tries to find the compile-time value of EXPR in a program that includes
2620 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2621 # computed
2622 ac_fn_c_compute_int ()
2623 {
2624   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2625   if test "$cross_compiling" = yes; then
2626     # Depending upon the size, compute the lo and hi bounds.
2627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628 /* end confdefs.h.  */
2629 $4
2630 int
2631 main ()
2632 {
2633 static int test_array [1 - 2 * !(($2) >= 0)];
2634 test_array [0] = 0
2635
2636   ;
2637   return 0;
2638 }
2639 _ACEOF
2640 if ac_fn_c_try_compile "$LINENO"; then :
2641   ac_lo=0 ac_mid=0
2642   while :; do
2643     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644 /* end confdefs.h.  */
2645 $4
2646 int
2647 main ()
2648 {
2649 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2650 test_array [0] = 0
2651
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 if ac_fn_c_try_compile "$LINENO"; then :
2657   ac_hi=$ac_mid; break
2658 else
2659   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2660                         if test $ac_lo -le $ac_mid; then
2661                           ac_lo= ac_hi=
2662                           break
2663                         fi
2664                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2665 fi
2666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2667   done
2668 else
2669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2670 /* end confdefs.h.  */
2671 $4
2672 int
2673 main ()
2674 {
2675 static int test_array [1 - 2 * !(($2) < 0)];
2676 test_array [0] = 0
2677
2678   ;
2679   return 0;
2680 }
2681 _ACEOF
2682 if ac_fn_c_try_compile "$LINENO"; then :
2683   ac_hi=-1 ac_mid=-1
2684   while :; do
2685     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686 /* end confdefs.h.  */
2687 $4
2688 int
2689 main ()
2690 {
2691 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2692 test_array [0] = 0
2693
2694   ;
2695   return 0;
2696 }
2697 _ACEOF
2698 if ac_fn_c_try_compile "$LINENO"; then :
2699   ac_lo=$ac_mid; break
2700 else
2701   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2702                         if test $ac_mid -le $ac_hi; then
2703                           ac_lo= ac_hi=
2704                           break
2705                         fi
2706                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2707 fi
2708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2709   done
2710 else
2711   ac_lo= ac_hi=
2712 fi
2713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2714 fi
2715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2716 # Binary search between lo and hi bounds.
2717 while test "x$ac_lo" != "x$ac_hi"; do
2718   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720 /* end confdefs.h.  */
2721 $4
2722 int
2723 main ()
2724 {
2725 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2726 test_array [0] = 0
2727
2728   ;
2729   return 0;
2730 }
2731 _ACEOF
2732 if ac_fn_c_try_compile "$LINENO"; then :
2733   ac_hi=$ac_mid
2734 else
2735   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2736 fi
2737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2738 done
2739 case $ac_lo in #((
2740 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2741 '') ac_retval=1 ;;
2742 esac
2743   else
2744     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2745 /* end confdefs.h.  */
2746 $4
2747 static long int longval () { return $2; }
2748 static unsigned long int ulongval () { return $2; }
2749 #include <stdio.h>
2750 #include <stdlib.h>
2751 int
2752 main ()
2753 {
2754
2755   FILE *f = fopen ("conftest.val", "w");
2756   if (! f)
2757     return 1;
2758   if (($2) < 0)
2759     {
2760       long int i = longval ();
2761       if (i != ($2))
2762         return 1;
2763       fprintf (f, "%ld", i);
2764     }
2765   else
2766     {
2767       unsigned long int i = ulongval ();
2768       if (i != ($2))
2769         return 1;
2770       fprintf (f, "%lu", i);
2771     }
2772   /* Do not output a trailing newline, as this causes \r\n confusion
2773      on some platforms.  */
2774   return ferror (f) || fclose (f) != 0;
2775
2776   ;
2777   return 0;
2778 }
2779 _ACEOF
2780 if ac_fn_c_try_run "$LINENO"; then :
2781   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2782 else
2783   ac_retval=1
2784 fi
2785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2786   conftest.$ac_objext conftest.beam conftest.$ac_ext
2787 rm -f conftest.val
2788
2789   fi
2790   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791   as_fn_set_status $ac_retval
2792
2793 } # ac_fn_c_compute_int
2794
2795 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2796 # ----------------------------------------------------
2797 # Tries to find if the field MEMBER exists in type AGGR, after including
2798 # INCLUDES, setting cache variable VAR accordingly.
2799 ac_fn_c_check_member ()
2800 {
2801   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2802   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2803 $as_echo_n "checking for $2.$3... " >&6; }
2804 if eval \${$4+:} false; then :
2805   $as_echo_n "(cached) " >&6
2806 else
2807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808 /* end confdefs.h.  */
2809 $5
2810 int
2811 main ()
2812 {
2813 static $2 ac_aggr;
2814 if (ac_aggr.$3)
2815 return 0;
2816   ;
2817   return 0;
2818 }
2819 _ACEOF
2820 if ac_fn_c_try_compile "$LINENO"; then :
2821   eval "$4=yes"
2822 else
2823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824 /* end confdefs.h.  */
2825 $5
2826 int
2827 main ()
2828 {
2829 static $2 ac_aggr;
2830 if (sizeof ac_aggr.$3)
2831 return 0;
2832   ;
2833   return 0;
2834 }
2835 _ACEOF
2836 if ac_fn_c_try_compile "$LINENO"; then :
2837   eval "$4=yes"
2838 else
2839   eval "$4=no"
2840 fi
2841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842 fi
2843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2844 fi
2845 eval ac_res=\$$4
2846                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2847 $as_echo "$ac_res" >&6; }
2848   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2849
2850 } # ac_fn_c_check_member
2851 cat >config.log <<_ACEOF
2852 This file contains any messages produced by compilers while
2853 running configure, to aid debugging if configure makes a mistake.
2854
2855 It was created by GNU patch $as_me 2.6.1.169-7096, which was
2856 generated by GNU Autoconf 2.68.  Invocation command line was
2857
2858   $ $0 $@
2859
2860 _ACEOF
2861 exec 5>>config.log
2862 {
2863 cat <<_ASUNAME
2864 ## --------- ##
2865 ## Platform. ##
2866 ## --------- ##
2867
2868 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2869 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2870 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2871 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2872 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2873
2874 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2875 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2876
2877 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2878 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2879 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2880 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2881 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2882 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2883 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2884
2885 _ASUNAME
2886
2887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888 for as_dir in $PATH
2889 do
2890   IFS=$as_save_IFS
2891   test -z "$as_dir" && as_dir=.
2892     $as_echo "PATH: $as_dir"
2893   done
2894 IFS=$as_save_IFS
2895
2896 } >&5
2897
2898 cat >&5 <<_ACEOF
2899
2900
2901 ## ----------- ##
2902 ## Core tests. ##
2903 ## ----------- ##
2904
2905 _ACEOF
2906
2907
2908 # Keep a trace of the command line.
2909 # Strip out --no-create and --no-recursion so they do not pile up.
2910 # Strip out --silent because we don't want to record it for future runs.
2911 # Also quote any args containing shell meta-characters.
2912 # Make two passes to allow for proper duplicate-argument suppression.
2913 ac_configure_args=
2914 ac_configure_args0=
2915 ac_configure_args1=
2916 ac_must_keep_next=false
2917 for ac_pass in 1 2
2918 do
2919   for ac_arg
2920   do
2921     case $ac_arg in
2922     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2923     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2924     | -silent | --silent | --silen | --sile | --sil)
2925       continue ;;
2926     *\'*)
2927       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2928     esac
2929     case $ac_pass in
2930     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2931     2)
2932       as_fn_append ac_configure_args1 " '$ac_arg'"
2933       if test $ac_must_keep_next = true; then
2934         ac_must_keep_next=false # Got value, back to normal.
2935       else
2936         case $ac_arg in
2937           *=* | --config-cache | -C | -disable-* | --disable-* \
2938           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2939           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2940           | -with-* | --with-* | -without-* | --without-* | --x)
2941             case "$ac_configure_args0 " in
2942               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2943             esac
2944             ;;
2945           -* ) ac_must_keep_next=true ;;
2946         esac
2947       fi
2948       as_fn_append ac_configure_args " '$ac_arg'"
2949       ;;
2950     esac
2951   done
2952 done
2953 { ac_configure_args0=; unset ac_configure_args0;}
2954 { ac_configure_args1=; unset ac_configure_args1;}
2955
2956 # When interrupted or exit'd, cleanup temporary files, and complete
2957 # config.log.  We remove comments because anyway the quotes in there
2958 # would cause problems or look ugly.
2959 # WARNING: Use '\'' to represent an apostrophe within the trap.
2960 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2961 trap 'exit_status=$?
2962   # Save into config.log some information that might help in debugging.
2963   {
2964     echo
2965
2966     $as_echo "## ---------------- ##
2967 ## Cache variables. ##
2968 ## ---------------- ##"
2969     echo
2970     # The following way of writing the cache mishandles newlines in values,
2971 (
2972   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2973     eval ac_val=\$$ac_var
2974     case $ac_val in #(
2975     *${as_nl}*)
2976       case $ac_var in #(
2977       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2978 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2979       esac
2980       case $ac_var in #(
2981       _ | IFS | as_nl) ;; #(
2982       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2983       *) { eval $ac_var=; unset $ac_var;} ;;
2984       esac ;;
2985     esac
2986   done
2987   (set) 2>&1 |
2988     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2989     *${as_nl}ac_space=\ *)
2990       sed -n \
2991         "s/'\''/'\''\\\\'\'''\''/g;
2992           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2993       ;; #(
2994     *)
2995       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2996       ;;
2997     esac |
2998     sort
2999 )
3000     echo
3001
3002     $as_echo "## ----------------- ##
3003 ## Output variables. ##
3004 ## ----------------- ##"
3005     echo
3006     for ac_var in $ac_subst_vars
3007     do
3008       eval ac_val=\$$ac_var
3009       case $ac_val in
3010       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3011       esac
3012       $as_echo "$ac_var='\''$ac_val'\''"
3013     done | sort
3014     echo
3015
3016     if test -n "$ac_subst_files"; then
3017       $as_echo "## ------------------- ##
3018 ## File substitutions. ##
3019 ## ------------------- ##"
3020       echo
3021       for ac_var in $ac_subst_files
3022       do
3023         eval ac_val=\$$ac_var
3024         case $ac_val in
3025         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3026         esac
3027         $as_echo "$ac_var='\''$ac_val'\''"
3028       done | sort
3029       echo
3030     fi
3031
3032     if test -s confdefs.h; then
3033       $as_echo "## ----------- ##
3034 ## confdefs.h. ##
3035 ## ----------- ##"
3036       echo
3037       cat confdefs.h
3038       echo
3039     fi
3040     test "$ac_signal" != 0 &&
3041       $as_echo "$as_me: caught signal $ac_signal"
3042     $as_echo "$as_me: exit $exit_status"
3043   } >&5
3044   rm -f core *.core core.conftest.* &&
3045     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3046     exit $exit_status
3047 ' 0
3048 for ac_signal in 1 2 13 15; do
3049   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3050 done
3051 ac_signal=0
3052
3053 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3054 rm -f -r conftest* confdefs.h
3055
3056 $as_echo "/* confdefs.h */" > confdefs.h
3057
3058 # Predefined preprocessor variables.
3059
3060 cat >>confdefs.h <<_ACEOF
3061 #define PACKAGE_NAME "$PACKAGE_NAME"
3062 _ACEOF
3063
3064 cat >>confdefs.h <<_ACEOF
3065 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3066 _ACEOF
3067
3068 cat >>confdefs.h <<_ACEOF
3069 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3070 _ACEOF
3071
3072 cat >>confdefs.h <<_ACEOF
3073 #define PACKAGE_STRING "$PACKAGE_STRING"
3074 _ACEOF
3075
3076 cat >>confdefs.h <<_ACEOF
3077 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3078 _ACEOF
3079
3080 cat >>confdefs.h <<_ACEOF
3081 #define PACKAGE_URL "$PACKAGE_URL"
3082 _ACEOF
3083
3084
3085 # Let the site file select an alternate cache file if it wants to.
3086 # Prefer an explicitly selected file to automatically selected ones.
3087 ac_site_file1=NONE
3088 ac_site_file2=NONE
3089 if test -n "$CONFIG_SITE"; then
3090   # We do not want a PATH search for config.site.
3091   case $CONFIG_SITE in #((
3092     -*)  ac_site_file1=./$CONFIG_SITE;;
3093     */*) ac_site_file1=$CONFIG_SITE;;
3094     *)   ac_site_file1=./$CONFIG_SITE;;
3095   esac
3096 elif test "x$prefix" != xNONE; then
3097   ac_site_file1=$prefix/share/config.site
3098   ac_site_file2=$prefix/etc/config.site
3099 else
3100   ac_site_file1=$ac_default_prefix/share/config.site
3101   ac_site_file2=$ac_default_prefix/etc/config.site
3102 fi
3103 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3104 do
3105   test "x$ac_site_file" = xNONE && continue
3106   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3107     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3108 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3109     sed 's/^/| /' "$ac_site_file" >&5
3110     . "$ac_site_file" \
3111       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3112 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3113 as_fn_error $? "failed to load site script $ac_site_file
3114 See \`config.log' for more details" "$LINENO" 5; }
3115   fi
3116 done
3117
3118 if test -r "$cache_file"; then
3119   # Some versions of bash will fail to source /dev/null (special files
3120   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3121   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3122     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3123 $as_echo "$as_me: loading cache $cache_file" >&6;}
3124     case $cache_file in
3125       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3126       *)                      . "./$cache_file";;
3127     esac
3128   fi
3129 else
3130   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3131 $as_echo "$as_me: creating cache $cache_file" >&6;}
3132   >$cache_file
3133 fi
3134
3135 as_fn_append ac_func_list " pathconf"
3136 as_fn_append ac_func_list " canonicalize_file_name"
3137 as_fn_append ac_func_list " getcwd"
3138 as_fn_append ac_func_list " readlink"
3139 as_fn_append ac_func_list " realpath"
3140 as_fn_append ac_header_list " sys/param.h"
3141 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3142 as_fn_append ac_header_list " sys/socket.h"
3143 as_fn_append ac_header_list " dirent.h"
3144 as_fn_append ac_func_list " fdopendir"
3145 as_fn_append ac_header_list " unistd.h"
3146 as_fn_append ac_func_list " fcntl"
3147 as_fn_append ac_func_list " symlink"
3148 as_fn_append ac_func_list " getdtablesize"
3149 gl_getopt_required=GNU
3150 as_fn_append ac_header_list " getopt.h"
3151 as_fn_append ac_func_list " gettimeofday"
3152 as_fn_append ac_func_list " nanotime"
3153 as_fn_append ac_header_list " sys/time.h"
3154 as_fn_append ac_func_list " lchmod"
3155 as_fn_append ac_func_list " lstat"
3156 as_fn_append ac_func_list " mbsinit"
3157 as_fn_append ac_func_list " mbrtowc"
3158 as_fn_append ac_header_list " sys/mman.h"
3159 as_fn_append ac_func_list " mprotect"
3160 as_fn_append ac_func_list " alarm"
3161 as_fn_append ac_func_list " link"
3162 as_fn_append ac_func_list " setenv"
3163 as_fn_append ac_header_list " wchar.h"
3164 as_fn_append ac_header_list " stdint.h"
3165 as_fn_append ac_func_list " strndup"
3166 as_fn_append ac_header_list " sys/stat.h"
3167 as_fn_append ac_func_list " localtime_r"
3168 as_fn_append ac_func_list " pipe"
3169 as_fn_append ac_header_list " utime.h"
3170 as_fn_append ac_func_list " futimes"
3171 as_fn_append ac_func_list " futimesat"
3172 as_fn_append ac_func_list " futimens"
3173 as_fn_append ac_func_list " utimensat"
3174 as_fn_append ac_func_list " lutimes"
3175 as_fn_append ac_func_list " vasnprintf"
3176 as_fn_append ac_header_list " features.h"
3177 as_fn_append ac_func_list " snprintf"
3178 as_fn_append ac_func_list " iswcntrl"
3179 as_fn_append ac_header_list " wctype.h"
3180 # Check that the precious variables saved in the cache have kept the same
3181 # value.
3182 ac_cache_corrupted=false
3183 for ac_var in $ac_precious_vars; do
3184   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3185   eval ac_new_set=\$ac_env_${ac_var}_set
3186   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3187   eval ac_new_val=\$ac_env_${ac_var}_value
3188   case $ac_old_set,$ac_new_set in
3189     set,)
3190       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3191 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3192       ac_cache_corrupted=: ;;
3193     ,set)
3194       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3195 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3196       ac_cache_corrupted=: ;;
3197     ,);;
3198     *)
3199       if test "x$ac_old_val" != "x$ac_new_val"; then
3200         # differences in whitespace do not lead to failure.
3201         ac_old_val_w=`echo x $ac_old_val`
3202         ac_new_val_w=`echo x $ac_new_val`
3203         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3204           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3205 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3206           ac_cache_corrupted=:
3207         else
3208           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3209 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3210           eval $ac_var=\$ac_old_val
3211         fi
3212         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3213 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3214         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3215 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3216       fi;;
3217   esac
3218   # Pass precious variables to config.status.
3219   if test "$ac_new_set" = set; then
3220     case $ac_new_val in
3221     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3222     *) ac_arg=$ac_var=$ac_new_val ;;
3223     esac
3224     case " $ac_configure_args " in
3225       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3226       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3227     esac
3228   fi
3229 done
3230 if $ac_cache_corrupted; then
3231   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3233   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3234 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3235   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3236 fi
3237 ## -------------------- ##
3238 ## Main body of script. ##
3239 ## -------------------- ##
3240
3241 ac_ext=c
3242 ac_cpp='$CPP $CPPFLAGS'
3243 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3244 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3245 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3246
3247
3248
3249
3250 ac_aux_dir=
3251 for ac_dir in build-aux "$srcdir"/build-aux; do
3252   if test -f "$ac_dir/install-sh"; then
3253     ac_aux_dir=$ac_dir
3254     ac_install_sh="$ac_aux_dir/install-sh -c"
3255     break
3256   elif test -f "$ac_dir/install.sh"; then
3257     ac_aux_dir=$ac_dir
3258     ac_install_sh="$ac_aux_dir/install.sh -c"
3259     break
3260   elif test -f "$ac_dir/shtool"; then
3261     ac_aux_dir=$ac_dir
3262     ac_install_sh="$ac_aux_dir/shtool install -c"
3263     break
3264   fi
3265 done
3266 if test -z "$ac_aux_dir"; then
3267   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3268 fi
3269
3270 # These three variables are undocumented and unsupported,
3271 # and are intended to be withdrawn in a future Autoconf release.
3272 # They can cause serious problems if a builder's source tree is in a directory
3273 # whose full name contains unusual characters.
3274 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3275 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3276 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3277
3278
3279
3280
3281 # Check whether --enable-merge was given.
3282 if test "${enable_merge+set}" = set; then :
3283   enableval=$enable_merge;
3284 fi
3285
3286  if test "$enableval" != no; then
3287   ENABLE_MERGE_TRUE=
3288   ENABLE_MERGE_FALSE='#'
3289 else
3290   ENABLE_MERGE_TRUE='#'
3291   ENABLE_MERGE_FALSE=
3292 fi
3293
3294  if echo "$PACKAGE_VERSION" | grep -- "-[0-9a-f][0-9a-f]*\\(-dirty\\)\\?$" >/dev/null; then
3295   ALPHA_VERSION_TRUE=
3296   ALPHA_VERSION_FALSE='#'
3297 else
3298   ALPHA_VERSION_TRUE='#'
3299   ALPHA_VERSION_FALSE=
3300 fi
3301
3302
3303 am__api_version='1.11'
3304
3305 # Find a good install program.  We prefer a C program (faster),
3306 # so one script is as good as another.  But avoid the broken or
3307 # incompatible versions:
3308 # SysV /etc/install, /usr/sbin/install
3309 # SunOS /usr/etc/install
3310 # IRIX /sbin/install
3311 # AIX /bin/install
3312 # AmigaOS /C/install, which installs bootblocks on floppy discs
3313 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3314 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3315 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3316 # OS/2's system install, which has a completely different semantic
3317 # ./install, which can be erroneously created by make from ./install.sh.
3318 # Reject install programs that cannot install multiple files.
3319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3320 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3321 if test -z "$INSTALL"; then
3322 if ${ac_cv_path_install+:} false; then :
3323   $as_echo_n "(cached) " >&6
3324 else
3325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326 for as_dir in $PATH
3327 do
3328   IFS=$as_save_IFS
3329   test -z "$as_dir" && as_dir=.
3330     # Account for people who put trailing slashes in PATH elements.
3331 case $as_dir/ in #((
3332   ./ | .// | /[cC]/* | \
3333   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3334   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3335   /usr/ucb/* ) ;;
3336   *)
3337     # OSF1 and SCO ODT 3.0 have their own names for install.
3338     # Don't use installbsd from OSF since it installs stuff as root
3339     # by default.
3340     for ac_prog in ginstall scoinst install; do
3341       for ac_exec_ext in '' $ac_executable_extensions; do
3342         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3343           if test $ac_prog = install &&
3344             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3345             # AIX install.  It has an incompatible calling convention.
3346             :
3347           elif test $ac_prog = install &&
3348             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3349             # program-specific install script used by HP pwplus--don't use.
3350             :
3351           else
3352             rm -rf conftest.one conftest.two conftest.dir
3353             echo one > conftest.one
3354             echo two > conftest.two
3355             mkdir conftest.dir
3356             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3357               test -s conftest.one && test -s conftest.two &&
3358               test -s conftest.dir/conftest.one &&
3359               test -s conftest.dir/conftest.two
3360             then
3361               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3362               break 3
3363             fi
3364           fi
3365         fi
3366       done
3367     done
3368     ;;
3369 esac
3370
3371   done
3372 IFS=$as_save_IFS
3373
3374 rm -rf conftest.one conftest.two conftest.dir
3375
3376 fi
3377   if test "${ac_cv_path_install+set}" = set; then
3378     INSTALL=$ac_cv_path_install
3379   else
3380     # As a last resort, use the slow shell script.  Don't cache a
3381     # value for INSTALL within a source directory, because that will
3382     # break other packages using the cache if that directory is
3383     # removed, or if the value is a relative name.
3384     INSTALL=$ac_install_sh
3385   fi
3386 fi
3387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3388 $as_echo "$INSTALL" >&6; }
3389
3390 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3391 # It thinks the first close brace ends the variable substitution.
3392 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3393
3394 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3395
3396 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3397
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3399 $as_echo_n "checking whether build environment is sane... " >&6; }
3400 # Just in case
3401 sleep 1
3402 echo timestamp > conftest.file
3403 # Reject unsafe characters in $srcdir or the absolute working directory
3404 # name.  Accept space and tab only in the latter.
3405 am_lf='
3406 '
3407 case `pwd` in
3408   *[\\\"\#\$\&\'\`$am_lf]*)
3409     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3410 esac
3411 case $srcdir in
3412   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3413     as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3414 esac
3415
3416 # Do `set' in a subshell so we don't clobber the current shell's
3417 # arguments.  Must try -L first in case configure is actually a
3418 # symlink; some systems play weird games with the mod time of symlinks
3419 # (eg FreeBSD returns the mod time of the symlink's containing
3420 # directory).
3421 if (
3422    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3423    if test "$*" = "X"; then
3424       # -L didn't work.
3425       set X `ls -t "$srcdir/configure" conftest.file`
3426    fi
3427    rm -f conftest.file
3428    if test "$*" != "X $srcdir/configure conftest.file" \
3429       && test "$*" != "X conftest.file $srcdir/configure"; then
3430
3431       # If neither matched, then we have a broken ls.  This can happen
3432       # if, for instance, CONFIG_SHELL is bash and it inherits a
3433       # broken ls alias from the environment.  This has actually
3434       # happened.  Such a system could not be considered "sane".
3435       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3436 alias in your environment" "$LINENO" 5
3437    fi
3438
3439    test "$2" = conftest.file
3440    )
3441 then
3442    # Ok.
3443    :
3444 else
3445    as_fn_error $? "newly created file is older than distributed files!
3446 Check your system clock" "$LINENO" 5
3447 fi
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3449 $as_echo "yes" >&6; }
3450 test "$program_prefix" != NONE &&
3451   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3452 # Use a double $ so make ignores it.
3453 test "$program_suffix" != NONE &&
3454   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3455 # Double any \ or $.
3456 # By default was `s,x,x', remove it if useless.
3457 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3458 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3459
3460 # expand $ac_aux_dir to an absolute path
3461 am_aux_dir=`cd $ac_aux_dir && pwd`
3462
3463 if test x"${MISSING+set}" != xset; then
3464   case $am_aux_dir in
3465   *\ * | *\     *)
3466     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3467   *)
3468     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3469   esac
3470 fi
3471 # Use eval to expand $SHELL
3472 if eval "$MISSING --run true"; then
3473   am_missing_run="$MISSING --run "
3474 else
3475   am_missing_run=
3476   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3477 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3478 fi
3479
3480 if test x"${install_sh}" != xset; then
3481   case $am_aux_dir in
3482   *\ * | *\     *)
3483     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3484   *)
3485     install_sh="\${SHELL} $am_aux_dir/install-sh"
3486   esac
3487 fi
3488
3489 # Installed binaries are usually stripped using `strip' when the user
3490 # run `make install-strip'.  However `strip' might not be the right
3491 # tool to use in cross-compilation environments, therefore Automake
3492 # will honor the `STRIP' environment variable to overrule this program.
3493 if test "$cross_compiling" != no; then
3494   if test -n "$ac_tool_prefix"; then
3495   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3496 set dummy ${ac_tool_prefix}strip; ac_word=$2
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3498 $as_echo_n "checking for $ac_word... " >&6; }
3499 if ${ac_cv_prog_STRIP+:} false; then :
3500   $as_echo_n "(cached) " >&6
3501 else
3502   if test -n "$STRIP"; then
3503   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3504 else
3505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506 for as_dir in $PATH
3507 do
3508   IFS=$as_save_IFS
3509   test -z "$as_dir" && as_dir=.
3510     for ac_exec_ext in '' $ac_executable_extensions; do
3511   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3512     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514     break 2
3515   fi
3516 done
3517   done
3518 IFS=$as_save_IFS
3519
3520 fi
3521 fi
3522 STRIP=$ac_cv_prog_STRIP
3523 if test -n "$STRIP"; then
3524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3525 $as_echo "$STRIP" >&6; }
3526 else
3527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3528 $as_echo "no" >&6; }
3529 fi
3530
3531
3532 fi
3533 if test -z "$ac_cv_prog_STRIP"; then
3534   ac_ct_STRIP=$STRIP
3535   # Extract the first word of "strip", so it can be a program name with args.
3536 set dummy strip; ac_word=$2
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3538 $as_echo_n "checking for $ac_word... " >&6; }
3539 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3540   $as_echo_n "(cached) " >&6
3541 else
3542   if test -n "$ac_ct_STRIP"; then
3543   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3544 else
3545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546 for as_dir in $PATH
3547 do
3548   IFS=$as_save_IFS
3549   test -z "$as_dir" && as_dir=.
3550     for ac_exec_ext in '' $ac_executable_extensions; do
3551   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3552     ac_cv_prog_ac_ct_STRIP="strip"
3553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3554     break 2
3555   fi
3556 done
3557   done
3558 IFS=$as_save_IFS
3559
3560 fi
3561 fi
3562 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3563 if test -n "$ac_ct_STRIP"; then
3564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3565 $as_echo "$ac_ct_STRIP" >&6; }
3566 else
3567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568 $as_echo "no" >&6; }
3569 fi
3570
3571   if test "x$ac_ct_STRIP" = x; then
3572     STRIP=":"
3573   else
3574     case $cross_compiling:$ac_tool_warned in
3575 yes:)
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3577 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3578 ac_tool_warned=yes ;;
3579 esac
3580     STRIP=$ac_ct_STRIP
3581   fi
3582 else
3583   STRIP="$ac_cv_prog_STRIP"
3584 fi
3585
3586 fi
3587 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3588
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3590 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3591 if test -z "$MKDIR_P"; then
3592   if ${ac_cv_path_mkdir+:} false; then :
3593   $as_echo_n "(cached) " >&6
3594 else
3595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3597 do
3598   IFS=$as_save_IFS
3599   test -z "$as_dir" && as_dir=.
3600     for ac_prog in mkdir gmkdir; do
3601          for ac_exec_ext in '' $ac_executable_extensions; do
3602            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3603            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3604              'mkdir (GNU coreutils) '* | \
3605              'mkdir (coreutils) '* | \
3606              'mkdir (fileutils) '4.1*)
3607                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3608                break 3;;
3609            esac
3610          done
3611        done
3612   done
3613 IFS=$as_save_IFS
3614
3615 fi
3616
3617   test -d ./--version && rmdir ./--version
3618   if test "${ac_cv_path_mkdir+set}" = set; then
3619     MKDIR_P="$ac_cv_path_mkdir -p"
3620   else
3621     # As a last resort, use the slow shell script.  Don't cache a
3622     # value for MKDIR_P within a source directory, because that will
3623     # break other packages using the cache if that directory is
3624     # removed, or if the value is a relative name.
3625     MKDIR_P="$ac_install_sh -d"
3626   fi
3627 fi
3628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3629 $as_echo "$MKDIR_P" >&6; }
3630
3631
3632 mkdir_p="$MKDIR_P"
3633 case $mkdir_p in
3634   [\\/$]* | ?:[\\/]*) ;;
3635   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3636 esac
3637
3638 for ac_prog in gawk mawk nawk awk
3639 do
3640   # Extract the first word of "$ac_prog", so it can be a program name with args.
3641 set dummy $ac_prog; ac_word=$2
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3643 $as_echo_n "checking for $ac_word... " >&6; }
3644 if ${ac_cv_prog_AWK+:} false; then :
3645   $as_echo_n "(cached) " >&6
3646 else
3647   if test -n "$AWK"; then
3648   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3649 else
3650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3651 for as_dir in $PATH
3652 do
3653   IFS=$as_save_IFS
3654   test -z "$as_dir" && as_dir=.
3655     for ac_exec_ext in '' $ac_executable_extensions; do
3656   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3657     ac_cv_prog_AWK="$ac_prog"
3658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3659     break 2
3660   fi
3661 done
3662   done
3663 IFS=$as_save_IFS
3664
3665 fi
3666 fi
3667 AWK=$ac_cv_prog_AWK
3668 if test -n "$AWK"; then
3669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3670 $as_echo "$AWK" >&6; }
3671 else
3672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3673 $as_echo "no" >&6; }
3674 fi
3675
3676
3677   test -n "$AWK" && break
3678 done
3679
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3681 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3682 set x ${MAKE-make}
3683 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3684 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3685   $as_echo_n "(cached) " >&6
3686 else
3687   cat >conftest.make <<\_ACEOF
3688 SHELL = /bin/sh
3689 all:
3690         @echo '@@@%%%=$(MAKE)=@@@%%%'
3691 _ACEOF
3692 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3693 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3694   *@@@%%%=?*=@@@%%%*)
3695     eval ac_cv_prog_make_${ac_make}_set=yes;;
3696   *)
3697     eval ac_cv_prog_make_${ac_make}_set=no;;
3698 esac
3699 rm -f conftest.make
3700 fi
3701 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3703 $as_echo "yes" >&6; }
3704   SET_MAKE=
3705 else
3706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3707 $as_echo "no" >&6; }
3708   SET_MAKE="MAKE=${MAKE-make}"
3709 fi
3710
3711 rm -rf .tst 2>/dev/null
3712 mkdir .tst 2>/dev/null
3713 if test -d .tst; then
3714   am__leading_dot=.
3715 else
3716   am__leading_dot=_
3717 fi
3718 rmdir .tst 2>/dev/null
3719
3720 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3721   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3722   # is not polluted with repeated "-I."
3723   am__isrc=' -I$(srcdir)'
3724   # test to see if srcdir already configured
3725   if test -f $srcdir/config.status; then
3726     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3727   fi
3728 fi
3729
3730 # test whether we have cygpath
3731 if test -z "$CYGPATH_W"; then
3732   if (cygpath --version) >/dev/null 2>/dev/null; then
3733     CYGPATH_W='cygpath -w'
3734   else
3735     CYGPATH_W=echo
3736   fi
3737 fi
3738
3739
3740 # Define the identity of the package.
3741  PACKAGE='patch'
3742  VERSION='2.6.1.169-7096'
3743
3744
3745 cat >>confdefs.h <<_ACEOF
3746 #define PACKAGE "$PACKAGE"
3747 _ACEOF
3748
3749
3750 cat >>confdefs.h <<_ACEOF
3751 #define VERSION "$VERSION"
3752 _ACEOF
3753
3754 # Some tools Automake needs.
3755
3756 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3757
3758
3759 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3760
3761
3762 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3763
3764
3765 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3766
3767
3768 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3769
3770 # We need awk for the "check" target.  The system "awk" is bad on
3771 # some platforms.
3772 # Always define AMTAR for backward compatibility.  Yes, it's still used
3773 # in the wild :-(  We should find a proper way to deprecate it ...
3774 AMTAR='$${TAR-tar}'
3775
3776 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3777
3778
3779
3780
3781
3782 # Check whether --enable-silent-rules was given.
3783 if test "${enable_silent_rules+set}" = set; then :
3784   enableval=$enable_silent_rules;
3785 fi
3786
3787 case $enable_silent_rules in
3788 yes) AM_DEFAULT_VERBOSITY=0;;
3789 no)  AM_DEFAULT_VERBOSITY=1;;
3790 *)   AM_DEFAULT_VERBOSITY=0;;
3791 esac
3792 am_make=${MAKE-make}
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3794 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3795 if ${am_cv_make_support_nested_variables+:} false; then :
3796   $as_echo_n "(cached) " >&6
3797 else
3798   if $as_echo 'TRUE=$(BAR$(V))
3799 BAR0=false
3800 BAR1=true
3801 V=1
3802 am__doit:
3803         @$(TRUE)
3804 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3805   am_cv_make_support_nested_variables=yes
3806 else
3807   am_cv_make_support_nested_variables=no
3808 fi
3809 fi
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3811 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3812 if test $am_cv_make_support_nested_variables = yes; then
3813     AM_V='$(V)'
3814   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3815 else
3816   AM_V=$AM_DEFAULT_VERBOSITY
3817   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3818 fi
3819 AM_BACKSLASH='\'
3820
3821
3822 ac_config_headers="$ac_config_headers config.h:config.hin"
3823
3824
3825 ac_ext=c
3826 ac_cpp='$CPP $CPPFLAGS'
3827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3830 if test -n "$ac_tool_prefix"; then
3831   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3832 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834 $as_echo_n "checking for $ac_word... " >&6; }
3835 if ${ac_cv_prog_CC+:} false; then :
3836   $as_echo_n "(cached) " >&6
3837 else
3838   if test -n "$CC"; then
3839   ac_cv_prog_CC="$CC" # Let the user override the test.
3840 else
3841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842 for as_dir in $PATH
3843 do
3844   IFS=$as_save_IFS
3845   test -z "$as_dir" && as_dir=.
3846     for ac_exec_ext in '' $ac_executable_extensions; do
3847   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3848     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850     break 2
3851   fi
3852 done
3853   done
3854 IFS=$as_save_IFS
3855
3856 fi
3857 fi
3858 CC=$ac_cv_prog_CC
3859 if test -n "$CC"; then
3860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3861 $as_echo "$CC" >&6; }
3862 else
3863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864 $as_echo "no" >&6; }
3865 fi
3866
3867
3868 fi
3869 if test -z "$ac_cv_prog_CC"; then
3870   ac_ct_CC=$CC
3871   # Extract the first word of "gcc", so it can be a program name with args.
3872 set dummy gcc; ac_word=$2
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3874 $as_echo_n "checking for $ac_word... " >&6; }
3875 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3876   $as_echo_n "(cached) " >&6
3877 else
3878   if test -n "$ac_ct_CC"; then
3879   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3880 else
3881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882 for as_dir in $PATH
3883 do
3884   IFS=$as_save_IFS
3885   test -z "$as_dir" && as_dir=.
3886     for ac_exec_ext in '' $ac_executable_extensions; do
3887   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3888     ac_cv_prog_ac_ct_CC="gcc"
3889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3890     break 2
3891   fi
3892 done
3893   done
3894 IFS=$as_save_IFS
3895
3896 fi
3897 fi
3898 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3899 if test -n "$ac_ct_CC"; then
3900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3901 $as_echo "$ac_ct_CC" >&6; }
3902 else
3903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3904 $as_echo "no" >&6; }
3905 fi
3906
3907   if test "x$ac_ct_CC" = x; then
3908     CC=""
3909   else
3910     case $cross_compiling:$ac_tool_warned in
3911 yes:)
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3913 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3914 ac_tool_warned=yes ;;
3915 esac
3916     CC=$ac_ct_CC
3917   fi
3918 else
3919   CC="$ac_cv_prog_CC"
3920 fi
3921
3922 if test -z "$CC"; then
3923           if test -n "$ac_tool_prefix"; then
3924     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}cc; ac_word=$2
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3927 $as_echo_n "checking for $ac_word... " >&6; }
3928 if ${ac_cv_prog_CC+:} false; then :
3929   $as_echo_n "(cached) " >&6
3930 else
3931   if test -n "$CC"; then
3932   ac_cv_prog_CC="$CC" # Let the user override the test.
3933 else
3934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3935 for as_dir in $PATH
3936 do
3937   IFS=$as_save_IFS
3938   test -z "$as_dir" && as_dir=.
3939     for ac_exec_ext in '' $ac_executable_extensions; do
3940   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3941     ac_cv_prog_CC="${ac_tool_prefix}cc"
3942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3943     break 2
3944   fi
3945 done
3946   done
3947 IFS=$as_save_IFS
3948
3949 fi
3950 fi
3951 CC=$ac_cv_prog_CC
3952 if test -n "$CC"; then
3953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3954 $as_echo "$CC" >&6; }
3955 else
3956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3957 $as_echo "no" >&6; }
3958 fi
3959
3960
3961   fi
3962 fi
3963 if test -z "$CC"; then
3964   # Extract the first word of "cc", so it can be a program name with args.
3965 set dummy cc; ac_word=$2
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967 $as_echo_n "checking for $ac_word... " >&6; }
3968 if ${ac_cv_prog_CC+:} false; then :
3969   $as_echo_n "(cached) " >&6
3970 else
3971   if test -n "$CC"; then
3972   ac_cv_prog_CC="$CC" # Let the user override the test.
3973 else
3974   ac_prog_rejected=no
3975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3976 for as_dir in $PATH
3977 do
3978   IFS=$as_save_IFS
3979   test -z "$as_dir" && as_dir=.
3980     for ac_exec_ext in '' $ac_executable_extensions; do
3981   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3982     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3983        ac_prog_rejected=yes
3984        continue
3985      fi
3986     ac_cv_prog_CC="cc"
3987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3988     break 2
3989   fi
3990 done
3991   done
3992 IFS=$as_save_IFS
3993
3994 if test $ac_prog_rejected = yes; then
3995   # We found a bogon in the path, so make sure we never use it.
3996   set dummy $ac_cv_prog_CC
3997   shift
3998   if test $# != 0; then
3999     # We chose a different compiler from the bogus one.
4000     # However, it has the same basename, so the bogon will be chosen
4001     # first if we set CC to just the basename; use the full file name.
4002     shift
4003     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4004   fi
4005 fi
4006 fi
4007 fi
4008 CC=$ac_cv_prog_CC
4009 if test -n "$CC"; then
4010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4011 $as_echo "$CC" >&6; }
4012 else
4013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4014 $as_echo "no" >&6; }
4015 fi
4016
4017
4018 fi
4019 if test -z "$CC"; then
4020   if test -n "$ac_tool_prefix"; then
4021   for ac_prog in cl.exe
4022   do
4023     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4024 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026 $as_echo_n "checking for $ac_word... " >&6; }
4027 if ${ac_cv_prog_CC+:} false; then :
4028   $as_echo_n "(cached) " >&6
4029 else
4030   if test -n "$CC"; then
4031   ac_cv_prog_CC="$CC" # Let the user override the test.
4032 else
4033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4034 for as_dir in $PATH
4035 do
4036   IFS=$as_save_IFS
4037   test -z "$as_dir" && as_dir=.
4038     for ac_exec_ext in '' $ac_executable_extensions; do
4039   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4040     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4042     break 2
4043   fi
4044 done
4045   done
4046 IFS=$as_save_IFS
4047
4048 fi
4049 fi
4050 CC=$ac_cv_prog_CC
4051 if test -n "$CC"; then
4052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4053 $as_echo "$CC" >&6; }
4054 else
4055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056 $as_echo "no" >&6; }
4057 fi
4058
4059
4060     test -n "$CC" && break
4061   done
4062 fi
4063 if test -z "$CC"; then
4064   ac_ct_CC=$CC
4065   for ac_prog in cl.exe
4066 do
4067   # Extract the first word of "$ac_prog", so it can be a program name with args.
4068 set dummy $ac_prog; ac_word=$2
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070 $as_echo_n "checking for $ac_word... " >&6; }
4071 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4072   $as_echo_n "(cached) " >&6
4073 else
4074   if test -n "$ac_ct_CC"; then
4075   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4076 else
4077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4078 for as_dir in $PATH
4079 do
4080   IFS=$as_save_IFS
4081   test -z "$as_dir" && as_dir=.
4082     for ac_exec_ext in '' $ac_executable_extensions; do
4083   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4084     ac_cv_prog_ac_ct_CC="$ac_prog"
4085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4086     break 2
4087   fi
4088 done
4089   done
4090 IFS=$as_save_IFS
4091
4092 fi
4093 fi
4094 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4095 if test -n "$ac_ct_CC"; then
4096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4097 $as_echo "$ac_ct_CC" >&6; }
4098 else
4099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100 $as_echo "no" >&6; }
4101 fi
4102
4103
4104   test -n "$ac_ct_CC" && break
4105 done
4106
4107   if test "x$ac_ct_CC" = x; then
4108     CC=""
4109   else
4110     case $cross_compiling:$ac_tool_warned in
4111 yes:)
4112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4113 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4114 ac_tool_warned=yes ;;
4115 esac
4116     CC=$ac_ct_CC
4117   fi
4118 fi
4119
4120 fi
4121
4122
4123 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4125 as_fn_error $? "no acceptable C compiler found in \$PATH
4126 See \`config.log' for more details" "$LINENO" 5; }
4127
4128 # Provide some information about the compiler.
4129 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4130 set X $ac_compile
4131 ac_compiler=$2
4132 for ac_option in --version -v -V -qversion; do
4133   { { ac_try="$ac_compiler $ac_option >&5"
4134 case "(($ac_try" in
4135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4136   *) ac_try_echo=$ac_try;;
4137 esac
4138 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4139 $as_echo "$ac_try_echo"; } >&5
4140   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4141   ac_status=$?
4142   if test -s conftest.err; then
4143     sed '10a\
4144 ... rest of stderr output deleted ...
4145          10q' conftest.err >conftest.er1
4146     cat conftest.er1 >&5
4147   fi
4148   rm -f conftest.er1 conftest.err
4149   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150   test $ac_status = 0; }
4151 done
4152
4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4154 /* end confdefs.h.  */
4155
4156 int
4157 main ()
4158 {
4159
4160   ;
4161   return 0;
4162 }
4163 _ACEOF
4164 ac_clean_files_save=$ac_clean_files
4165 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4166 # Try to create an executable without -o first, disregard a.out.
4167 # It will help us diagnose broken compilers, and finding out an intuition
4168 # of exeext.
4169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4170 $as_echo_n "checking whether the C compiler works... " >&6; }
4171 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4172
4173 # The possible output files:
4174 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4175
4176 ac_rmfiles=
4177 for ac_file in $ac_files
4178 do
4179   case $ac_file in
4180     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4181     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4182   esac
4183 done
4184 rm -f $ac_rmfiles
4185
4186 if { { ac_try="$ac_link_default"
4187 case "(($ac_try" in
4188   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4189   *) ac_try_echo=$ac_try;;
4190 esac
4191 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4192 $as_echo "$ac_try_echo"; } >&5
4193   (eval "$ac_link_default") 2>&5
4194   ac_status=$?
4195   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4196   test $ac_status = 0; }; then :
4197   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4198 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4199 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4200 # so that the user can short-circuit this test for compilers unknown to
4201 # Autoconf.
4202 for ac_file in $ac_files ''
4203 do
4204   test -f "$ac_file" || continue
4205   case $ac_file in
4206     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4207         ;;
4208     [ab].out )
4209         # We found the default executable, but exeext='' is most
4210         # certainly right.
4211         break;;
4212     *.* )
4213         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4214         then :; else
4215            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4216         fi
4217         # We set ac_cv_exeext here because the later test for it is not
4218         # safe: cross compilers may not add the suffix if given an `-o'
4219         # argument, so we may need to know it at that point already.
4220         # Even if this section looks crufty: it has the advantage of
4221         # actually working.
4222         break;;
4223     * )
4224         break;;
4225   esac
4226 done
4227 test "$ac_cv_exeext" = no && ac_cv_exeext=
4228
4229 else
4230   ac_file=''
4231 fi
4232 if test -z "$ac_file"; then :
4233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4234 $as_echo "no" >&6; }
4235 $as_echo "$as_me: failed program was:" >&5
4236 sed 's/^/| /' conftest.$ac_ext >&5
4237
4238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4239 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4240 as_fn_error 77 "C compiler cannot create executables
4241 See \`config.log' for more details" "$LINENO" 5; }
4242 else
4243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4244 $as_echo "yes" >&6; }
4245 fi
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4247 $as_echo_n "checking for C compiler default output file name... " >&6; }
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4249 $as_echo "$ac_file" >&6; }
4250 ac_exeext=$ac_cv_exeext
4251
4252 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4253 ac_clean_files=$ac_clean_files_save
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4255 $as_echo_n "checking for suffix of executables... " >&6; }
4256 if { { ac_try="$ac_link"
4257 case "(($ac_try" in
4258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4259   *) ac_try_echo=$ac_try;;
4260 esac
4261 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4262 $as_echo "$ac_try_echo"; } >&5
4263   (eval "$ac_link") 2>&5
4264   ac_status=$?
4265   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4266   test $ac_status = 0; }; then :
4267   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4268 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4269 # work properly (i.e., refer to `conftest.exe'), while it won't with
4270 # `rm'.
4271 for ac_file in conftest.exe conftest conftest.*; do
4272   test -f "$ac_file" || continue
4273   case $ac_file in
4274     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4275     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4276           break;;
4277     * ) break;;
4278   esac
4279 done
4280 else
4281   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4282 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4283 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4284 See \`config.log' for more details" "$LINENO" 5; }
4285 fi
4286 rm -f conftest conftest$ac_cv_exeext
4287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4288 $as_echo "$ac_cv_exeext" >&6; }
4289
4290 rm -f conftest.$ac_ext
4291 EXEEXT=$ac_cv_exeext
4292 ac_exeext=$EXEEXT
4293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4294 /* end confdefs.h.  */
4295 #include <stdio.h>
4296 int
4297 main ()
4298 {
4299 FILE *f = fopen ("conftest.out", "w");
4300  return ferror (f) || fclose (f) != 0;
4301
4302   ;
4303   return 0;
4304 }
4305 _ACEOF
4306 ac_clean_files="$ac_clean_files conftest.out"
4307 # Check that the compiler produces executables we can run.  If not, either
4308 # the compiler is broken, or we cross compile.
4309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4310 $as_echo_n "checking whether we are cross compiling... " >&6; }
4311 if test "$cross_compiling" != yes; then
4312   { { ac_try="$ac_link"
4313 case "(($ac_try" in
4314   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4315   *) ac_try_echo=$ac_try;;
4316 esac
4317 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4318 $as_echo "$ac_try_echo"; } >&5
4319   (eval "$ac_link") 2>&5
4320   ac_status=$?
4321   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4322   test $ac_status = 0; }
4323   if { ac_try='./conftest$ac_cv_exeext'
4324   { { case "(($ac_try" in
4325   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4326   *) ac_try_echo=$ac_try;;
4327 esac
4328 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4329 $as_echo "$ac_try_echo"; } >&5
4330   (eval "$ac_try") 2>&5
4331   ac_status=$?
4332   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4333   test $ac_status = 0; }; }; then
4334     cross_compiling=no
4335   else
4336     if test "$cross_compiling" = maybe; then
4337         cross_compiling=yes
4338     else
4339         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4341 as_fn_error $? "cannot run C compiled programs.
4342 If you meant to cross compile, use \`--host'.
4343 See \`config.log' for more details" "$LINENO" 5; }
4344     fi
4345   fi
4346 fi
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4348 $as_echo "$cross_compiling" >&6; }
4349
4350 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4351 ac_clean_files=$ac_clean_files_save
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4353 $as_echo_n "checking for suffix of object files... " >&6; }
4354 if ${ac_cv_objext+:} false; then :
4355   $as_echo_n "(cached) " >&6
4356 else
4357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358 /* end confdefs.h.  */
4359
4360 int
4361 main ()
4362 {
4363
4364   ;
4365   return 0;
4366 }
4367 _ACEOF
4368 rm -f conftest.o conftest.obj
4369 if { { ac_try="$ac_compile"
4370 case "(($ac_try" in
4371   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4372   *) ac_try_echo=$ac_try;;
4373 esac
4374 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4375 $as_echo "$ac_try_echo"; } >&5
4376   (eval "$ac_compile") 2>&5
4377   ac_status=$?
4378   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4379   test $ac_status = 0; }; then :
4380   for ac_file in conftest.o conftest.obj conftest.*; do
4381   test -f "$ac_file" || continue;
4382   case $ac_file in
4383     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4384     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4385        break;;
4386   esac
4387 done
4388 else
4389   $as_echo "$as_me: failed program was:" >&5
4390 sed 's/^/| /' conftest.$ac_ext >&5
4391
4392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4394 as_fn_error $? "cannot compute suffix of object files: cannot compile
4395 See \`config.log' for more details" "$LINENO" 5; }
4396 fi
4397 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4398 fi
4399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4400 $as_echo "$ac_cv_objext" >&6; }
4401 OBJEXT=$ac_cv_objext
4402 ac_objext=$OBJEXT
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4404 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4405 if ${ac_cv_c_compiler_gnu+:} false; then :
4406   $as_echo_n "(cached) " >&6
4407 else
4408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409 /* end confdefs.h.  */
4410
4411 int
4412 main ()
4413 {
4414 #ifndef __GNUC__
4415        choke me
4416 #endif
4417
4418   ;
4419   return 0;
4420 }
4421 _ACEOF
4422 if ac_fn_c_try_compile "$LINENO"; then :
4423   ac_compiler_gnu=yes
4424 else
4425   ac_compiler_gnu=no
4426 fi
4427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4428 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4429
4430 fi
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4432 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4433 if test $ac_compiler_gnu = yes; then
4434   GCC=yes
4435 else
4436   GCC=
4437 fi
4438 ac_test_CFLAGS=${CFLAGS+set}
4439 ac_save_CFLAGS=$CFLAGS
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4441 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4442 if ${ac_cv_prog_cc_g+:} false; then :
4443   $as_echo_n "(cached) " >&6
4444 else
4445   ac_save_c_werror_flag=$ac_c_werror_flag
4446    ac_c_werror_flag=yes
4447    ac_cv_prog_cc_g=no
4448    CFLAGS="-g"
4449    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h.  */
4451
4452 int
4453 main ()
4454 {
4455
4456   ;
4457   return 0;
4458 }
4459 _ACEOF
4460 if ac_fn_c_try_compile "$LINENO"; then :
4461   ac_cv_prog_cc_g=yes
4462 else
4463   CFLAGS=""
4464       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h.  */
4466
4467 int
4468 main ()
4469 {
4470
4471   ;
4472   return 0;
4473 }
4474 _ACEOF
4475 if ac_fn_c_try_compile "$LINENO"; then :
4476
4477 else
4478   ac_c_werror_flag=$ac_save_c_werror_flag
4479          CFLAGS="-g"
4480          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4481 /* end confdefs.h.  */
4482
4483 int
4484 main ()
4485 {
4486
4487   ;
4488   return 0;
4489 }
4490 _ACEOF
4491 if ac_fn_c_try_compile "$LINENO"; then :
4492   ac_cv_prog_cc_g=yes
4493 fi
4494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4495 fi
4496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4497 fi
4498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4499    ac_c_werror_flag=$ac_save_c_werror_flag
4500 fi
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4502 $as_echo "$ac_cv_prog_cc_g" >&6; }
4503 if test "$ac_test_CFLAGS" = set; then
4504   CFLAGS=$ac_save_CFLAGS
4505 elif test $ac_cv_prog_cc_g = yes; then
4506   if test "$GCC" = yes; then
4507     CFLAGS="-g -O2"
4508   else
4509     CFLAGS="-g"
4510   fi
4511 else
4512   if test "$GCC" = yes; then
4513     CFLAGS="-O2"
4514   else
4515     CFLAGS=
4516   fi
4517 fi
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4519 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4520 if ${ac_cv_prog_cc_c89+:} false; then :
4521   $as_echo_n "(cached) " >&6
4522 else
4523   ac_cv_prog_cc_c89=no
4524 ac_save_CC=$CC
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526 /* end confdefs.h.  */
4527 #include <stdarg.h>
4528 #include <stdio.h>
4529 #include <sys/types.h>
4530 #include <sys/stat.h>
4531 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4532 struct buf { int x; };
4533 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4534 static char *e (p, i)
4535      char **p;
4536      int i;
4537 {
4538   return p[i];
4539 }
4540 static char *f (char * (*g) (char **, int), char **p, ...)
4541 {
4542   char *s;
4543   va_list v;
4544   va_start (v,p);
4545   s = g (p, va_arg (v,int));
4546   va_end (v);
4547   return s;
4548 }
4549
4550 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4551    function prototypes and stuff, but not '\xHH' hex character constants.
4552    These don't provoke an error unfortunately, instead are silently treated
4553    as 'x'.  The following induces an error, until -std is added to get
4554    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4555    array size at least.  It's necessary to write '\x00'==0 to get something
4556    that's true only with -std.  */
4557 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4558
4559 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4560    inside strings and character constants.  */
4561 #define FOO(x) 'x'
4562 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4563
4564 int test (int i, double x);
4565 struct s1 {int (*f) (int a);};
4566 struct s2 {int (*f) (double a);};
4567 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4568 int argc;
4569 char **argv;
4570 int
4571 main ()
4572 {
4573 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4574   ;
4575   return 0;
4576 }
4577 _ACEOF
4578 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4579         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4580 do
4581   CC="$ac_save_CC $ac_arg"
4582   if ac_fn_c_try_compile "$LINENO"; then :
4583   ac_cv_prog_cc_c89=$ac_arg
4584 fi
4585 rm -f core conftest.err conftest.$ac_objext
4586   test "x$ac_cv_prog_cc_c89" != "xno" && break
4587 done
4588 rm -f conftest.$ac_ext
4589 CC=$ac_save_CC
4590
4591 fi
4592 # AC_CACHE_VAL
4593 case "x$ac_cv_prog_cc_c89" in
4594   x)
4595     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4596 $as_echo "none needed" >&6; } ;;
4597   xno)
4598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4599 $as_echo "unsupported" >&6; } ;;
4600   *)
4601     CC="$CC $ac_cv_prog_cc_c89"
4602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4603 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4604 esac
4605 if test "x$ac_cv_prog_cc_c89" != xno; then :
4606
4607 fi
4608
4609 ac_ext=c
4610 ac_cpp='$CPP $CPPFLAGS'
4611 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4612 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4613 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4614 DEPDIR="${am__leading_dot}deps"
4615
4616 ac_config_commands="$ac_config_commands depfiles"
4617
4618
4619 am_make=${MAKE-make}
4620 cat > confinc << 'END'
4621 am__doit:
4622         @echo this is the am__doit target
4623 .PHONY: am__doit
4624 END
4625 # If we don't find an include directive, just comment out the code.
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4627 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4628 am__include="#"
4629 am__quote=
4630 _am_result=none
4631 # First try GNU make style include.
4632 echo "include confinc" > confmf
4633 # Ignore all kinds of additional output from `make'.
4634 case `$am_make -s -f confmf 2> /dev/null` in #(
4635 *the\ am__doit\ target*)
4636   am__include=include
4637   am__quote=
4638   _am_result=GNU
4639   ;;
4640 esac
4641 # Now try BSD make style include.
4642 if test "$am__include" = "#"; then
4643    echo '.include "confinc"' > confmf
4644    case `$am_make -s -f confmf 2> /dev/null` in #(
4645    *the\ am__doit\ target*)
4646      am__include=.include
4647      am__quote="\""
4648      _am_result=BSD
4649      ;;
4650    esac
4651 fi
4652
4653
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4655 $as_echo "$_am_result" >&6; }
4656 rm -f confinc confmf
4657
4658 # Check whether --enable-dependency-tracking was given.
4659 if test "${enable_dependency_tracking+set}" = set; then :
4660   enableval=$enable_dependency_tracking;
4661 fi
4662
4663 if test "x$enable_dependency_tracking" != xno; then
4664   am_depcomp="$ac_aux_dir/depcomp"
4665   AMDEPBACKSLASH='\'
4666   am__nodep='_no'
4667 fi
4668  if test "x$enable_dependency_tracking" != xno; then
4669   AMDEP_TRUE=
4670   AMDEP_FALSE='#'
4671 else
4672   AMDEP_TRUE='#'
4673   AMDEP_FALSE=
4674 fi
4675
4676
4677
4678 depcc="$CC"   am_compiler_list=
4679
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4681 $as_echo_n "checking dependency style of $depcc... " >&6; }
4682 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4683   $as_echo_n "(cached) " >&6
4684 else
4685   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4686   # We make a subdir and do the tests there.  Otherwise we can end up
4687   # making bogus files that we don't know about and never remove.  For
4688   # instance it was reported that on HP-UX the gcc test will end up
4689   # making a dummy file named `D' -- because `-MD' means `put the output
4690   # in D'.
4691   rm -rf conftest.dir
4692   mkdir conftest.dir
4693   # Copy depcomp to subdir because otherwise we won't find it if we're
4694   # using a relative directory.
4695   cp "$am_depcomp" conftest.dir
4696   cd conftest.dir
4697   # We will build objects and dependencies in a subdirectory because
4698   # it helps to detect inapplicable dependency modes.  For instance
4699   # both Tru64's cc and ICC support -MD to output dependencies as a
4700   # side effect of compilation, but ICC will put the dependencies in
4701   # the current directory while Tru64 will put them in the object
4702   # directory.
4703   mkdir sub
4704
4705   am_cv_CC_dependencies_compiler_type=none
4706   if test "$am_compiler_list" = ""; then
4707      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4708   fi
4709   am__universal=false
4710   case " $depcc " in #(
4711      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4712      esac
4713
4714   for depmode in $am_compiler_list; do
4715     # Setup a source with many dependencies, because some compilers
4716     # like to wrap large dependency lists on column 80 (with \), and
4717     # we should not choose a depcomp mode which is confused by this.
4718     #
4719     # We need to recreate these files for each test, as the compiler may
4720     # overwrite some of them when testing with obscure command lines.
4721     # This happens at least with the AIX C compiler.
4722     : > sub/conftest.c
4723     for i in 1 2 3 4 5 6; do
4724       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4725       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4726       # Solaris 8's {/usr,}/bin/sh.
4727       touch sub/conftst$i.h
4728     done
4729     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4730
4731     # We check with `-c' and `-o' for the sake of the "dashmstdout"
4732     # mode.  It turns out that the SunPro C++ compiler does not properly
4733     # handle `-M -o', and we need to detect this.  Also, some Intel
4734     # versions had trouble with output in subdirs
4735     am__obj=sub/conftest.${OBJEXT-o}
4736     am__minus_obj="-o $am__obj"
4737     case $depmode in
4738     gcc)
4739       # This depmode causes a compiler race in universal mode.
4740       test "$am__universal" = false || continue
4741       ;;
4742     nosideeffect)
4743       # after this tag, mechanisms are not by side-effect, so they'll
4744       # only be used when explicitly requested
4745       if test "x$enable_dependency_tracking" = xyes; then
4746         continue
4747       else
4748         break
4749       fi
4750       ;;
4751     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4752       # This compiler won't grok `-c -o', but also, the minuso test has
4753       # not run yet.  These depmodes are late enough in the game, and
4754       # so weak that their functioning should not be impacted.
4755       am__obj=conftest.${OBJEXT-o}
4756       am__minus_obj=
4757       ;;
4758     none) break ;;
4759     esac
4760     if depmode=$depmode \
4761        source=sub/conftest.c object=$am__obj \
4762        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4763        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4764          >/dev/null 2>conftest.err &&
4765        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4766        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4767        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4768        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4769       # icc doesn't choke on unknown options, it will just issue warnings
4770       # or remarks (even with -Werror).  So we grep stderr for any message
4771       # that says an option was ignored or not supported.
4772       # When given -MP, icc 7.0 and 7.1 complain thusly:
4773       #   icc: Command line warning: ignoring option '-M'; no argument required
4774       # The diagnosis changed in icc 8.0:
4775       #   icc: Command line remark: option '-MP' not supported
4776       if (grep 'ignoring option' conftest.err ||
4777           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4778         am_cv_CC_dependencies_compiler_type=$depmode
4779         break
4780       fi
4781     fi
4782   done
4783
4784   cd ..
4785   rm -rf conftest.dir
4786 else
4787   am_cv_CC_dependencies_compiler_type=none
4788 fi
4789
4790 fi
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4792 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4793 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4794
4795  if
4796   test "x$enable_dependency_tracking" != xno \
4797   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4798   am__fastdepCC_TRUE=
4799   am__fastdepCC_FALSE='#'
4800 else
4801   am__fastdepCC_TRUE='#'
4802   am__fastdepCC_FALSE=
4803 fi
4804
4805
4806    case $ac_cv_prog_cc_stdc in #(
4807   no) :
4808     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4809   *) :
4810     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4811 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4812 if ${ac_cv_prog_cc_c99+:} false; then :
4813   $as_echo_n "(cached) " >&6
4814 else
4815   ac_cv_prog_cc_c99=no
4816 ac_save_CC=$CC
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818 /* end confdefs.h.  */
4819 #include <stdarg.h>
4820 #include <stdbool.h>
4821 #include <stdlib.h>
4822 #include <wchar.h>
4823 #include <stdio.h>
4824
4825 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4826 #define debug(...) fprintf (stderr, __VA_ARGS__)
4827 #define showlist(...) puts (#__VA_ARGS__)
4828 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4829 static void
4830 test_varargs_macros (void)
4831 {
4832   int x = 1234;
4833   int y = 5678;
4834   debug ("Flag");
4835   debug ("X = %d\n", x);
4836   showlist (The first, second, and third items.);
4837   report (x>y, "x is %d but y is %d", x, y);
4838 }
4839
4840 // Check long long types.
4841 #define BIG64 18446744073709551615ull
4842 #define BIG32 4294967295ul
4843 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4844 #if !BIG_OK
4845   your preprocessor is broken;
4846 #endif
4847 #if BIG_OK
4848 #else
4849   your preprocessor is broken;
4850 #endif
4851 static long long int bignum = -9223372036854775807LL;
4852 static unsigned long long int ubignum = BIG64;
4853
4854 struct incomplete_array
4855 {
4856   int datasize;
4857   double data[];
4858 };
4859
4860 struct named_init {
4861   int number;
4862   const wchar_t *name;
4863   double average;
4864 };
4865
4866 typedef const char *ccp;
4867
4868 static inline int
4869 test_restrict (ccp restrict text)
4870 {
4871   // See if C++-style comments work.
4872   // Iterate through items via the restricted pointer.
4873   // Also check for declarations in for loops.
4874   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4875     continue;
4876   return 0;
4877 }
4878
4879 // Check varargs and va_copy.
4880 static void
4881 test_varargs (const char *format, ...)
4882 {
4883   va_list args;
4884   va_start (args, format);
4885   va_list args_copy;
4886   va_copy (args_copy, args);
4887
4888   const char *str;
4889   int number;
4890   float fnumber;
4891
4892   while (*format)
4893     {
4894       switch (*format++)
4895         {
4896         case 's': // string
4897           str = va_arg (args_copy, const char *);
4898           break;
4899         case 'd': // int
4900           number = va_arg (args_copy, int);
4901           break;
4902         case 'f': // float
4903           fnumber = va_arg (args_copy, double);
4904           break;
4905         default:
4906           break;
4907         }
4908     }
4909   va_end (args_copy);
4910   va_end (args);
4911 }
4912
4913 int
4914 main ()
4915 {
4916
4917   // Check bool.
4918   _Bool success = false;
4919
4920   // Check restrict.
4921   if (test_restrict ("String literal") == 0)
4922     success = true;
4923   char *restrict newvar = "Another string";
4924
4925   // Check varargs.
4926   test_varargs ("s, d' f .", "string", 65, 34.234);
4927   test_varargs_macros ();
4928
4929   // Check flexible array members.
4930   struct incomplete_array *ia =
4931     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4932   ia->datasize = 10;
4933   for (int i = 0; i < ia->datasize; ++i)
4934     ia->data[i] = i * 1.234;
4935
4936   // Check named initializers.
4937   struct named_init ni = {
4938     .number = 34,
4939     .name = L"Test wide string",
4940     .average = 543.34343,
4941   };
4942
4943   ni.number = 58;
4944
4945   int dynamic_array[ni.number];
4946   dynamic_array[ni.number - 1] = 543;
4947
4948   // work around unused variable warnings
4949   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4950           || dynamic_array[ni.number - 1] != 543);
4951
4952   ;
4953   return 0;
4954 }
4955 _ACEOF
4956 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
4957 do
4958   CC="$ac_save_CC $ac_arg"
4959   if ac_fn_c_try_compile "$LINENO"; then :
4960   ac_cv_prog_cc_c99=$ac_arg
4961 fi
4962 rm -f core conftest.err conftest.$ac_objext
4963   test "x$ac_cv_prog_cc_c99" != "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_c99" 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_c99"
4979     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4980 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4981 esac
4982 if test "x$ac_cv_prog_cc_c99" != xno; then :
4983   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4984 else
4985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4986 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4987 if ${ac_cv_prog_cc_c89+:} false; then :
4988   $as_echo_n "(cached) " >&6
4989 else
4990   ac_cv_prog_cc_c89=no
4991 ac_save_CC=$CC
4992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4993 /* end confdefs.h.  */
4994 #include <stdarg.h>
4995 #include <stdio.h>
4996 #include <sys/types.h>
4997 #include <sys/stat.h>
4998 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4999 struct buf { int x; };
5000 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5001 static char *e (p, i)
5002      char **p;
5003      int i;
5004 {
5005   return p[i];
5006 }
5007 static char *f (char * (*g) (char **, int), char **p, ...)
5008 {
5009   char *s;
5010   va_list v;
5011   va_start (v,p);
5012   s = g (p, va_arg (v,int));
5013   va_end (v);
5014   return s;
5015 }
5016
5017 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5018    function prototypes and stuff, but not '\xHH' hex character constants.
5019    These don't provoke an error unfortunately, instead are silently treated
5020    as 'x'.  The following induces an error, until -std is added to get
5021    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5022    array size at least.  It's necessary to write '\x00'==0 to get something
5023    that's true only with -std.  */
5024 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5025
5026 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5027    inside strings and character constants.  */
5028 #define FOO(x) 'x'
5029 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5030
5031 int test (int i, double x);
5032 struct s1 {int (*f) (int a);};
5033 struct s2 {int (*f) (double a);};
5034 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5035 int argc;
5036 char **argv;
5037 int
5038 main ()
5039 {
5040 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5041   ;
5042   return 0;
5043 }
5044 _ACEOF
5045 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5046         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5047 do
5048   CC="$ac_save_CC $ac_arg"
5049   if ac_fn_c_try_compile "$LINENO"; then :
5050   ac_cv_prog_cc_c89=$ac_arg
5051 fi
5052 rm -f core conftest.err conftest.$ac_objext
5053   test "x$ac_cv_prog_cc_c89" != "xno" && break
5054 done
5055 rm -f conftest.$ac_ext
5056 CC=$ac_save_CC
5057
5058 fi
5059 # AC_CACHE_VAL
5060 case "x$ac_cv_prog_cc_c89" in
5061   x)
5062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5063 $as_echo "none needed" >&6; } ;;
5064   xno)
5065     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5066 $as_echo "unsupported" >&6; } ;;
5067   *)
5068     CC="$CC $ac_cv_prog_cc_c89"
5069     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5070 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5071 esac
5072 if test "x$ac_cv_prog_cc_c89" != xno; then :
5073   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5074 else
5075   ac_cv_prog_cc_stdc=no
5076 fi
5077
5078 fi
5079  ;;
5080 esac
5081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5082 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5083   if ${ac_cv_prog_cc_stdc+:} false; then :
5084   $as_echo_n "(cached) " >&6
5085 fi
5086
5087   case $ac_cv_prog_cc_stdc in #(
5088   no) :
5089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5090 $as_echo "unsupported" >&6; } ;; #(
5091   '') :
5092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5093 $as_echo "none needed" >&6; } ;; #(
5094   *) :
5095     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5096 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5097 esac
5098
5099
5100 ac_ext=c
5101 ac_cpp='$CPP $CPPFLAGS'
5102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5106 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5107 # On Suns, sometimes $CPP names a directory.
5108 if test -n "$CPP" && test -d "$CPP"; then
5109   CPP=
5110 fi
5111 if test -z "$CPP"; then
5112   if ${ac_cv_prog_CPP+:} false; then :
5113   $as_echo_n "(cached) " >&6
5114 else
5115       # Double quotes because CPP needs to be expanded
5116     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5117     do
5118       ac_preproc_ok=false
5119 for ac_c_preproc_warn_flag in '' yes
5120 do
5121   # Use a header file that comes with gcc, so configuring glibc
5122   # with a fresh cross-compiler works.
5123   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5124   # <limits.h> exists even on freestanding compilers.
5125   # On the NeXT, cc -E runs the code through the compiler's parser,
5126   # not just through cpp. "Syntax error" is here to catch this case.
5127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5128 /* end confdefs.h.  */
5129 #ifdef __STDC__
5130 # include <limits.h>
5131 #else
5132 # include <assert.h>
5133 #endif
5134                      Syntax error
5135 _ACEOF
5136 if ac_fn_c_try_cpp "$LINENO"; then :
5137
5138 else
5139   # Broken: fails on valid input.
5140 continue
5141 fi
5142 rm -f conftest.err conftest.i conftest.$ac_ext
5143
5144   # OK, works on sane cases.  Now check whether nonexistent headers
5145   # can be detected and how.
5146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147 /* end confdefs.h.  */
5148 #include <ac_nonexistent.h>
5149 _ACEOF
5150 if ac_fn_c_try_cpp "$LINENO"; then :
5151   # Broken: success on invalid input.
5152 continue
5153 else
5154   # Passes both tests.
5155 ac_preproc_ok=:
5156 break
5157 fi
5158 rm -f conftest.err conftest.i conftest.$ac_ext
5159
5160 done
5161 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5162 rm -f conftest.i conftest.err conftest.$ac_ext
5163 if $ac_preproc_ok; then :
5164   break
5165 fi
5166
5167     done
5168     ac_cv_prog_CPP=$CPP
5169
5170 fi
5171   CPP=$ac_cv_prog_CPP
5172 else
5173   ac_cv_prog_CPP=$CPP
5174 fi
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5176 $as_echo "$CPP" >&6; }
5177 ac_preproc_ok=false
5178 for ac_c_preproc_warn_flag in '' yes
5179 do
5180   # Use a header file that comes with gcc, so configuring glibc
5181   # with a fresh cross-compiler works.
5182   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5183   # <limits.h> exists even on freestanding compilers.
5184   # On the NeXT, cc -E runs the code through the compiler's parser,
5185   # not just through cpp. "Syntax error" is here to catch this case.
5186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5187 /* end confdefs.h.  */
5188 #ifdef __STDC__
5189 # include <limits.h>
5190 #else
5191 # include <assert.h>
5192 #endif
5193                      Syntax error
5194 _ACEOF
5195 if ac_fn_c_try_cpp "$LINENO"; then :
5196
5197 else
5198   # Broken: fails on valid input.
5199 continue
5200 fi
5201 rm -f conftest.err conftest.i conftest.$ac_ext
5202
5203   # OK, works on sane cases.  Now check whether nonexistent headers
5204   # can be detected and how.
5205   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206 /* end confdefs.h.  */
5207 #include <ac_nonexistent.h>
5208 _ACEOF
5209 if ac_fn_c_try_cpp "$LINENO"; then :
5210   # Broken: success on invalid input.
5211 continue
5212 else
5213   # Passes both tests.
5214 ac_preproc_ok=:
5215 break
5216 fi
5217 rm -f conftest.err conftest.i conftest.$ac_ext
5218
5219 done
5220 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5221 rm -f conftest.i conftest.err conftest.$ac_ext
5222 if $ac_preproc_ok; then :
5223
5224 else
5225   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5227 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5228 See \`config.log' for more details" "$LINENO" 5; }
5229 fi
5230
5231 ac_ext=c
5232 ac_cpp='$CPP $CPPFLAGS'
5233 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5234 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5235 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5236
5237
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5239 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5240 if ${ac_cv_path_GREP+:} false; then :
5241   $as_echo_n "(cached) " >&6
5242 else
5243   if test -z "$GREP"; then
5244   ac_path_GREP_found=false
5245   # Loop through the user's path and test for each of PROGNAME-LIST
5246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5247 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5248 do
5249   IFS=$as_save_IFS
5250   test -z "$as_dir" && as_dir=.
5251     for ac_prog in grep ggrep; do
5252     for ac_exec_ext in '' $ac_executable_extensions; do
5253       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5254       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5255 # Check for GNU ac_path_GREP and select it if it is found.
5256   # Check for GNU $ac_path_GREP
5257 case `"$ac_path_GREP" --version 2>&1` in
5258 *GNU*)
5259   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5260 *)
5261   ac_count=0
5262   $as_echo_n 0123456789 >"conftest.in"
5263   while :
5264   do
5265     cat "conftest.in" "conftest.in" >"conftest.tmp"
5266     mv "conftest.tmp" "conftest.in"
5267     cp "conftest.in" "conftest.nl"
5268     $as_echo 'GREP' >> "conftest.nl"
5269     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5270     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5271     as_fn_arith $ac_count + 1 && ac_count=$as_val
5272     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5273       # Best one so far, save it but keep looking for a better one
5274       ac_cv_path_GREP="$ac_path_GREP"
5275       ac_path_GREP_max=$ac_count
5276     fi
5277     # 10*(2^10) chars as input seems more than enough
5278     test $ac_count -gt 10 && break
5279   done
5280   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5281 esac
5282
5283       $ac_path_GREP_found && break 3
5284     done
5285   done
5286   done
5287 IFS=$as_save_IFS
5288   if test -z "$ac_cv_path_GREP"; then
5289     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5290   fi
5291 else
5292   ac_cv_path_GREP=$GREP
5293 fi
5294
5295 fi
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5297 $as_echo "$ac_cv_path_GREP" >&6; }
5298  GREP="$ac_cv_path_GREP"
5299
5300
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5302 $as_echo_n "checking for egrep... " >&6; }
5303 if ${ac_cv_path_EGREP+:} false; then :
5304   $as_echo_n "(cached) " >&6
5305 else
5306   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5307    then ac_cv_path_EGREP="$GREP -E"
5308    else
5309      if test -z "$EGREP"; then
5310   ac_path_EGREP_found=false
5311   # Loop through the user's path and test for each of PROGNAME-LIST
5312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5313 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5314 do
5315   IFS=$as_save_IFS
5316   test -z "$as_dir" && as_dir=.
5317     for ac_prog in egrep; do
5318     for ac_exec_ext in '' $ac_executable_extensions; do
5319       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5320       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5321 # Check for GNU ac_path_EGREP and select it if it is found.
5322   # Check for GNU $ac_path_EGREP
5323 case `"$ac_path_EGREP" --version 2>&1` in
5324 *GNU*)
5325   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5326 *)
5327   ac_count=0
5328   $as_echo_n 0123456789 >"conftest.in"
5329   while :
5330   do
5331     cat "conftest.in" "conftest.in" >"conftest.tmp"
5332     mv "conftest.tmp" "conftest.in"
5333     cp "conftest.in" "conftest.nl"
5334     $as_echo 'EGREP' >> "conftest.nl"
5335     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5336     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5337     as_fn_arith $ac_count + 1 && ac_count=$as_val
5338     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5339       # Best one so far, save it but keep looking for a better one
5340       ac_cv_path_EGREP="$ac_path_EGREP"
5341       ac_path_EGREP_max=$ac_count
5342     fi
5343     # 10*(2^10) chars as input seems more than enough
5344     test $ac_count -gt 10 && break
5345   done
5346   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5347 esac
5348
5349       $ac_path_EGREP_found && break 3
5350     done
5351   done
5352   done
5353 IFS=$as_save_IFS
5354   if test -z "$ac_cv_path_EGREP"; then
5355     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5356   fi
5357 else
5358   ac_cv_path_EGREP=$EGREP
5359 fi
5360
5361    fi
5362 fi
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5364 $as_echo "$ac_cv_path_EGREP" >&6; }
5365  EGREP="$ac_cv_path_EGREP"
5366
5367
5368
5369
5370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5371 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5372 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375
5376       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377 /* end confdefs.h.  */
5378
5379 #ifdef __ACK__
5380 Amsterdam
5381 #endif
5382
5383 _ACEOF
5384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5385   $EGREP "Amsterdam" >/dev/null 2>&1; then :
5386   gl_cv_c_amsterdam_compiler=yes
5387 else
5388   gl_cv_c_amsterdam_compiler=no
5389 fi
5390 rm -f conftest*
5391
5392
5393 fi
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5395 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5396   if test -z "$AR"; then
5397     if test $gl_cv_c_amsterdam_compiler = yes; then
5398       AR='cc -c.a'
5399       if test -z "$ARFLAGS"; then
5400         ARFLAGS='-o'
5401       fi
5402     else
5403                   if test -n "$ac_tool_prefix"; then
5404   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5405 set dummy ${ac_tool_prefix}ar; ac_word=$2
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5407 $as_echo_n "checking for $ac_word... " >&6; }
5408 if ${ac_cv_prog_AR+:} false; then :
5409   $as_echo_n "(cached) " >&6
5410 else
5411   if test -n "$AR"; then
5412   ac_cv_prog_AR="$AR" # Let the user override the test.
5413 else
5414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5415 for as_dir in $PATH
5416 do
5417   IFS=$as_save_IFS
5418   test -z "$as_dir" && as_dir=.
5419     for ac_exec_ext in '' $ac_executable_extensions; do
5420   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5421     ac_cv_prog_AR="${ac_tool_prefix}ar"
5422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5423     break 2
5424   fi
5425 done
5426   done
5427 IFS=$as_save_IFS
5428
5429 fi
5430 fi
5431 AR=$ac_cv_prog_AR
5432 if test -n "$AR"; then
5433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5434 $as_echo "$AR" >&6; }
5435 else
5436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5437 $as_echo "no" >&6; }
5438 fi
5439
5440
5441 fi
5442 if test -z "$ac_cv_prog_AR"; then
5443   ac_ct_AR=$AR
5444   # Extract the first word of "ar", so it can be a program name with args.
5445 set dummy ar; ac_word=$2
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5447 $as_echo_n "checking for $ac_word... " >&6; }
5448 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5449   $as_echo_n "(cached) " >&6
5450 else
5451   if test -n "$ac_ct_AR"; then
5452   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5453 else
5454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5455 for as_dir in $PATH
5456 do
5457   IFS=$as_save_IFS
5458   test -z "$as_dir" && as_dir=.
5459     for ac_exec_ext in '' $ac_executable_extensions; do
5460   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5461     ac_cv_prog_ac_ct_AR="ar"
5462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5463     break 2
5464   fi
5465 done
5466   done
5467 IFS=$as_save_IFS
5468
5469 fi
5470 fi
5471 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5472 if test -n "$ac_ct_AR"; then
5473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5474 $as_echo "$ac_ct_AR" >&6; }
5475 else
5476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477 $as_echo "no" >&6; }
5478 fi
5479
5480   if test "x$ac_ct_AR" = x; then
5481     AR="ar"
5482   else
5483     case $cross_compiling:$ac_tool_warned in
5484 yes:)
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5486 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5487 ac_tool_warned=yes ;;
5488 esac
5489     AR=$ac_ct_AR
5490   fi
5491 else
5492   AR="$ac_cv_prog_AR"
5493 fi
5494
5495       if test -z "$ARFLAGS"; then
5496         ARFLAGS='cru'
5497       fi
5498     fi
5499   else
5500     if test -z "$ARFLAGS"; then
5501       ARFLAGS='cru'
5502     fi
5503   fi
5504
5505
5506   if test -z "$RANLIB"; then
5507     if test $gl_cv_c_amsterdam_compiler = yes; then
5508       RANLIB=':'
5509     else
5510             if test -n "$ac_tool_prefix"; then
5511   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5512 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5514 $as_echo_n "checking for $ac_word... " >&6; }
5515 if ${ac_cv_prog_RANLIB+:} false; then :
5516   $as_echo_n "(cached) " >&6
5517 else
5518   if test -n "$RANLIB"; then
5519   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5520 else
5521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522 for as_dir in $PATH
5523 do
5524   IFS=$as_save_IFS
5525   test -z "$as_dir" && as_dir=.
5526     for ac_exec_ext in '' $ac_executable_extensions; do
5527   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5528     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530     break 2
5531   fi
5532 done
5533   done
5534 IFS=$as_save_IFS
5535
5536 fi
5537 fi
5538 RANLIB=$ac_cv_prog_RANLIB
5539 if test -n "$RANLIB"; then
5540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5541 $as_echo "$RANLIB" >&6; }
5542 else
5543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 $as_echo "no" >&6; }
5545 fi
5546
5547
5548 fi
5549 if test -z "$ac_cv_prog_RANLIB"; then
5550   ac_ct_RANLIB=$RANLIB
5551   # Extract the first word of "ranlib", so it can be a program name with args.
5552 set dummy ranlib; ac_word=$2
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554 $as_echo_n "checking for $ac_word... " >&6; }
5555 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5556   $as_echo_n "(cached) " >&6
5557 else
5558   if test -n "$ac_ct_RANLIB"; then
5559   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5560 else
5561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562 for as_dir in $PATH
5563 do
5564   IFS=$as_save_IFS
5565   test -z "$as_dir" && as_dir=.
5566     for ac_exec_ext in '' $ac_executable_extensions; do
5567   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5568     ac_cv_prog_ac_ct_RANLIB="ranlib"
5569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570     break 2
5571   fi
5572 done
5573   done
5574 IFS=$as_save_IFS
5575
5576 fi
5577 fi
5578 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5579 if test -n "$ac_ct_RANLIB"; then
5580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5581 $as_echo "$ac_ct_RANLIB" >&6; }
5582 else
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5585 fi
5586
5587   if test "x$ac_ct_RANLIB" = x; then
5588     RANLIB=":"
5589   else
5590     case $cross_compiling:$ac_tool_warned in
5591 yes:)
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5593 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5594 ac_tool_warned=yes ;;
5595 esac
5596     RANLIB=$ac_ct_RANLIB
5597   fi
5598 else
5599   RANLIB="$ac_cv_prog_RANLIB"
5600 fi
5601
5602     fi
5603   fi
5604
5605
5606 # Make sure we can run config.sub.
5607 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5608   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5609
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5611 $as_echo_n "checking build system type... " >&6; }
5612 if ${ac_cv_build+:} false; then :
5613   $as_echo_n "(cached) " >&6
5614 else
5615   ac_build_alias=$build_alias
5616 test "x$ac_build_alias" = x &&
5617   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5618 test "x$ac_build_alias" = x &&
5619   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5620 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5621   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5622
5623 fi
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5625 $as_echo "$ac_cv_build" >&6; }
5626 case $ac_cv_build in
5627 *-*-*) ;;
5628 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5629 esac
5630 build=$ac_cv_build
5631 ac_save_IFS=$IFS; IFS='-'
5632 set x $ac_cv_build
5633 shift
5634 build_cpu=$1
5635 build_vendor=$2
5636 shift; shift
5637 # Remember, the first character of IFS is used to create $*,
5638 # except with old shells:
5639 build_os=$*
5640 IFS=$ac_save_IFS
5641 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5642
5643
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5645 $as_echo_n "checking host system type... " >&6; }
5646 if ${ac_cv_host+:} false; then :
5647   $as_echo_n "(cached) " >&6
5648 else
5649   if test "x$host_alias" = x; then
5650   ac_cv_host=$ac_cv_build
5651 else
5652   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5653     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5654 fi
5655
5656 fi
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5658 $as_echo "$ac_cv_host" >&6; }
5659 case $ac_cv_host in
5660 *-*-*) ;;
5661 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5662 esac
5663 host=$ac_cv_host
5664 ac_save_IFS=$IFS; IFS='-'
5665 set x $ac_cv_host
5666 shift
5667 host_cpu=$1
5668 host_vendor=$2
5669 shift; shift
5670 # Remember, the first character of IFS is used to create $*,
5671 # except with old shells:
5672 host_os=$*
5673 IFS=$ac_save_IFS
5674 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5675
5676
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5678 $as_echo_n "checking for ANSI C header files... " >&6; }
5679 if ${ac_cv_header_stdc+:} false; then :
5680   $as_echo_n "(cached) " >&6
5681 else
5682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5683 /* end confdefs.h.  */
5684 #include <stdlib.h>
5685 #include <stdarg.h>
5686 #include <string.h>
5687 #include <float.h>
5688
5689 int
5690 main ()
5691 {
5692
5693   ;
5694   return 0;
5695 }
5696 _ACEOF
5697 if ac_fn_c_try_compile "$LINENO"; then :
5698   ac_cv_header_stdc=yes
5699 else
5700   ac_cv_header_stdc=no
5701 fi
5702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5703
5704 if test $ac_cv_header_stdc = yes; then
5705   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5706   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707 /* end confdefs.h.  */
5708 #include <string.h>
5709
5710 _ACEOF
5711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5712   $EGREP "memchr" >/dev/null 2>&1; then :
5713
5714 else
5715   ac_cv_header_stdc=no
5716 fi
5717 rm -f conftest*
5718
5719 fi
5720
5721 if test $ac_cv_header_stdc = yes; then
5722   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724 /* end confdefs.h.  */
5725 #include <stdlib.h>
5726
5727 _ACEOF
5728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5729   $EGREP "free" >/dev/null 2>&1; then :
5730
5731 else
5732   ac_cv_header_stdc=no
5733 fi
5734 rm -f conftest*
5735
5736 fi
5737
5738 if test $ac_cv_header_stdc = yes; then
5739   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5740   if test "$cross_compiling" = yes; then :
5741   :
5742 else
5743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5744 /* end confdefs.h.  */
5745 #include <ctype.h>
5746 #include <stdlib.h>
5747 #if ((' ' & 0x0FF) == 0x020)
5748 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5749 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5750 #else
5751 # define ISLOWER(c) \
5752                    (('a' <= (c) && (c) <= 'i') \
5753                      || ('j' <= (c) && (c) <= 'r') \
5754                      || ('s' <= (c) && (c) <= 'z'))
5755 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5756 #endif
5757
5758 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5759 int
5760 main ()
5761 {
5762   int i;
5763   for (i = 0; i < 256; i++)
5764     if (XOR (islower (i), ISLOWER (i))
5765         || toupper (i) != TOUPPER (i))
5766       return 2;
5767   return 0;
5768 }
5769 _ACEOF
5770 if ac_fn_c_try_run "$LINENO"; then :
5771
5772 else
5773   ac_cv_header_stdc=no
5774 fi
5775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5776   conftest.$ac_objext conftest.beam conftest.$ac_ext
5777 fi
5778
5779 fi
5780 fi
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5782 $as_echo "$ac_cv_header_stdc" >&6; }
5783 if test $ac_cv_header_stdc = yes; then
5784
5785 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5786
5787 fi
5788
5789 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5790 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5791                   inttypes.h stdint.h unistd.h
5792 do :
5793   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5794 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5795 "
5796 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5797   cat >>confdefs.h <<_ACEOF
5798 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5799 _ACEOF
5800
5801 fi
5802
5803 done
5804
5805
5806
5807
5808
5809   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5810 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5811   MINIX=yes
5812 else
5813   MINIX=
5814 fi
5815
5816
5817   if test "$MINIX" = yes; then
5818
5819 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5820
5821
5822 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5823
5824
5825 $as_echo "#define _MINIX 1" >>confdefs.h
5826
5827   fi
5828
5829         case "$host_os" in
5830     hpux*)
5831
5832 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5833
5834       ;;
5835   esac
5836
5837
5838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5839 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5840 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5841   $as_echo_n "(cached) " >&6
5842 else
5843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5844 /* end confdefs.h.  */
5845
5846 #         define __EXTENSIONS__ 1
5847           $ac_includes_default
5848 int
5849 main ()
5850 {
5851
5852   ;
5853   return 0;
5854 }
5855 _ACEOF
5856 if ac_fn_c_try_compile "$LINENO"; then :
5857   ac_cv_safe_to_define___extensions__=yes
5858 else
5859   ac_cv_safe_to_define___extensions__=no
5860 fi
5861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5862 fi
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5864 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5865   test $ac_cv_safe_to_define___extensions__ = yes &&
5866     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5867
5868   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5869
5870   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5871
5872   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5873
5874   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5875
5876   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5877
5878
5879
5880
5881
5882
5883
5884
5885 # Check whether --enable-largefile was given.
5886 if test "${enable_largefile+set}" = set; then :
5887   enableval=$enable_largefile;
5888 fi
5889
5890 if test "$enable_largefile" != no; then
5891
5892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5893 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5894 if ${ac_cv_sys_largefile_CC+:} false; then :
5895   $as_echo_n "(cached) " >&6
5896 else
5897   ac_cv_sys_largefile_CC=no
5898      if test "$GCC" != yes; then
5899        ac_save_CC=$CC
5900        while :; do
5901          # IRIX 6.2 and later do not support large files by default,
5902          # so use the C compiler's -n32 option if that helps.
5903          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904 /* end confdefs.h.  */
5905 #include <sys/types.h>
5906  /* Check that off_t can represent 2**63 - 1 correctly.
5907     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5908     since some C++ compilers masquerading as C compilers
5909     incorrectly reject 9223372036854775807.  */
5910 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5911   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5912                        && LARGE_OFF_T % 2147483647 == 1)
5913                       ? 1 : -1];
5914 int
5915 main ()
5916 {
5917
5918   ;
5919   return 0;
5920 }
5921 _ACEOF
5922          if ac_fn_c_try_compile "$LINENO"; then :
5923   break
5924 fi
5925 rm -f core conftest.err conftest.$ac_objext
5926          CC="$CC -n32"
5927          if ac_fn_c_try_compile "$LINENO"; then :
5928   ac_cv_sys_largefile_CC=' -n32'; break
5929 fi
5930 rm -f core conftest.err conftest.$ac_objext
5931          break
5932        done
5933        CC=$ac_save_CC
5934        rm -f conftest.$ac_ext
5935     fi
5936 fi
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5938 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5939   if test "$ac_cv_sys_largefile_CC" != no; then
5940     CC=$CC$ac_cv_sys_largefile_CC
5941   fi
5942
5943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5944 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5945 if ${ac_cv_sys_file_offset_bits+:} false; then :
5946   $as_echo_n "(cached) " >&6
5947 else
5948   while :; do
5949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h.  */
5951 #include <sys/types.h>
5952  /* Check that off_t can represent 2**63 - 1 correctly.
5953     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5954     since some C++ compilers masquerading as C compilers
5955     incorrectly reject 9223372036854775807.  */
5956 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5957   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5958                        && LARGE_OFF_T % 2147483647 == 1)
5959                       ? 1 : -1];
5960 int
5961 main ()
5962 {
5963
5964   ;
5965   return 0;
5966 }
5967 _ACEOF
5968 if ac_fn_c_try_compile "$LINENO"; then :
5969   ac_cv_sys_file_offset_bits=no; break
5970 fi
5971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5973 /* end confdefs.h.  */
5974 #define _FILE_OFFSET_BITS 64
5975 #include <sys/types.h>
5976  /* Check that off_t can represent 2**63 - 1 correctly.
5977     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5978     since some C++ compilers masquerading as C compilers
5979     incorrectly reject 9223372036854775807.  */
5980 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5981   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5982                        && LARGE_OFF_T % 2147483647 == 1)
5983                       ? 1 : -1];
5984 int
5985 main ()
5986 {
5987
5988   ;
5989   return 0;
5990 }
5991 _ACEOF
5992 if ac_fn_c_try_compile "$LINENO"; then :
5993   ac_cv_sys_file_offset_bits=64; break
5994 fi
5995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5996   ac_cv_sys_file_offset_bits=unknown
5997   break
5998 done
5999 fi
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6001 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6002 case $ac_cv_sys_file_offset_bits in #(
6003   no | unknown) ;;
6004   *)
6005 cat >>confdefs.h <<_ACEOF
6006 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6007 _ACEOF
6008 ;;
6009 esac
6010 rm -rf conftest*
6011   if test $ac_cv_sys_file_offset_bits = unknown; then
6012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6013 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6014 if ${ac_cv_sys_large_files+:} false; then :
6015   $as_echo_n "(cached) " >&6
6016 else
6017   while :; do
6018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h.  */
6020 #include <sys/types.h>
6021  /* Check that off_t can represent 2**63 - 1 correctly.
6022     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6023     since some C++ compilers masquerading as C compilers
6024     incorrectly reject 9223372036854775807.  */
6025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6026   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6027                        && LARGE_OFF_T % 2147483647 == 1)
6028                       ? 1 : -1];
6029 int
6030 main ()
6031 {
6032
6033   ;
6034   return 0;
6035 }
6036 _ACEOF
6037 if ac_fn_c_try_compile "$LINENO"; then :
6038   ac_cv_sys_large_files=no; break
6039 fi
6040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042 /* end confdefs.h.  */
6043 #define _LARGE_FILES 1
6044 #include <sys/types.h>
6045  /* Check that off_t can represent 2**63 - 1 correctly.
6046     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6047     since some C++ compilers masquerading as C compilers
6048     incorrectly reject 9223372036854775807.  */
6049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6050   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6051                        && LARGE_OFF_T % 2147483647 == 1)
6052                       ? 1 : -1];
6053 int
6054 main ()
6055 {
6056
6057   ;
6058   return 0;
6059 }
6060 _ACEOF
6061 if ac_fn_c_try_compile "$LINENO"; then :
6062   ac_cv_sys_large_files=1; break
6063 fi
6064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6065   ac_cv_sys_large_files=unknown
6066   break
6067 done
6068 fi
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6070 $as_echo "$ac_cv_sys_large_files" >&6; }
6071 case $ac_cv_sys_large_files in #(
6072   no | unknown) ;;
6073   *)
6074 cat >>confdefs.h <<_ACEOF
6075 #define _LARGE_FILES $ac_cv_sys_large_files
6076 _ACEOF
6077 ;;
6078 esac
6079 rm -rf conftest*
6080   fi
6081
6082
6083 fi
6084
6085
6086
6087   # Code from module alloca-opt:
6088   # Code from module argmatch:
6089   # Code from module backupfile:
6090   # Code from module bitrotate:
6091   # Code from module c-ctype:
6092   # Code from module c-strcase:
6093   # Code from module c-strcaseeq:
6094   # Code from module canonicalize-lgpl:
6095   # Code from module chdir:
6096   # Code from module clock-time:
6097   # Code from module close:
6098   # Code from module closedir:
6099   # Code from module configmake:
6100   # Code from module d-ino:
6101   # Code from module diffseq:
6102   # Code from module dirent:
6103   # Code from module dirent-safer:
6104   # Code from module dirfd:
6105   # Code from module dirname:
6106   # Code from module dirname-lgpl:
6107   # Code from module dosname:
6108   # Code from module double-slash-root:
6109   # Code from module dup2:
6110   # Code from module environ:
6111   # Code from module errno:
6112   # Code from module error:
6113   # Code from module exitfail:
6114   # Code from module extensions:
6115
6116   # Code from module fcntl:
6117   # Code from module fcntl-h:
6118   # Code from module fd-hook:
6119   # Code from module filename:
6120   # Code from module float:
6121   # Code from module fstat:
6122   # Code from module full-write:
6123   # Code from module getdate:
6124   # Code from module getdtablesize:
6125   # Code from module getopt-gnu:
6126   # Code from module getopt-posix:
6127   # Code from module gettext-h:
6128   # Code from module gettime:
6129   # Code from module gettimeofday:
6130   # Code from module git-version-gen:
6131   # Code from module gitlog-to-changelog:
6132   # Code from module gnumakefile:
6133   # Code from module hash:
6134   # Code from module ignore-value:
6135   # Code from module include_next:
6136   # Code from module inline:
6137   # Code from module intprops:
6138   # Code from module largefile:
6139
6140   # Code from module lchmod:
6141   # Code from module linked-list:
6142   # Code from module list:
6143   # Code from module localcharset:
6144   # Code from module lstat:
6145   # Code from module maintainer-makefile:
6146   # Code from module malloc:
6147   # Code from module malloc-gnu:
6148   # Code from module malloc-posix:
6149   # Code from module malloca:
6150   # Code from module manywarnings:
6151   # Code from module mbrtowc:
6152   # Code from module mbsinit:
6153   # Code from module memchr:
6154   # Code from module minmax:
6155   # Code from module mkdir:
6156   # Code from module mktime:
6157   # Code from module msvc-inval:
6158   # Code from module msvc-nothrow:
6159   # Code from module multiarch:
6160   # Code from module nocrash:
6161   # Code from module opendir:
6162   # Code from module parse-datetime:
6163   # Code from module pathmax:
6164   # Code from module progname:
6165   # Code from module quote:
6166   # Code from module quotearg:
6167   # Code from module quotearg-simple:
6168   # Code from module raise:
6169   # Code from module readdir:
6170   # Code from module readlink:
6171   # Code from module realloc:
6172   # Code from module realloc-gnu:
6173   # Code from module realloc-posix:
6174   # Code from module rename:
6175   # Code from module rmdir:
6176   # Code from module safe-write:
6177   # Code from module same-inode:
6178   # Code from module setenv:
6179   # Code from module signal:
6180   # Code from module signal-h:
6181   # Code from module size_max:
6182   # Code from module snippet/_Noreturn:
6183   # Code from module snippet/arg-nonnull:
6184   # Code from module snippet/c++defs:
6185   # Code from module snippet/warn-on-use:
6186   # Code from module ssize_t:
6187   # Code from module stat:
6188   # Code from module stat-time:
6189   # Code from module stdarg:
6190
6191
6192
6193   # Code from module stdbool:
6194   # Code from module stddef:
6195   # Code from module stdint:
6196   # Code from module stdio:
6197   # Code from module stdlib:
6198   # Code from module streq:
6199   # Code from module strerror:
6200   # Code from module strerror-override:
6201   # Code from module string:
6202   # Code from module strndup:
6203   # Code from module strnlen:
6204   # Code from module symlink:
6205   # Code from module sys_stat:
6206   # Code from module sys_time:
6207   # Code from module tempname:
6208   # Code from module time:
6209   # Code from module time_r:
6210   # Code from module timespec:
6211   # Code from module unistd:
6212   # Code from module unistd-safer:
6213   # Code from module unlink:
6214   # Code from module unsetenv:
6215   # Code from module update-copyright:
6216   # Code from module useless-if-before-free:
6217   # Code from module utimens:
6218   # Code from module vasnprintf:
6219   # Code from module vasprintf:
6220   # Code from module vc-list-files:
6221   # Code from module verify:
6222   # Code from module verror:
6223   # Code from module warnings:
6224   # Code from module wchar:
6225   # Code from module wctype-h:
6226   # Code from module write:
6227   # Code from module xalloc:
6228   # Code from module xalloc-die:
6229   # Code from module xalloc-oversized:
6230   # Code from module xlist:
6231   # Code from module xsize:
6232   # Code from module xstrndup:
6233   # Code from module xvasprintf:
6234
6235
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6237 $as_echo_n "checking for ANSI C header files... " >&6; }
6238 if ${ac_cv_header_stdc+:} false; then :
6239   $as_echo_n "(cached) " >&6
6240 else
6241   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6242 /* end confdefs.h.  */
6243 #include <stdlib.h>
6244 #include <stdarg.h>
6245 #include <string.h>
6246 #include <float.h>
6247
6248 int
6249 main ()
6250 {
6251
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 if ac_fn_c_try_compile "$LINENO"; then :
6257   ac_cv_header_stdc=yes
6258 else
6259   ac_cv_header_stdc=no
6260 fi
6261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6262
6263 if test $ac_cv_header_stdc = yes; then
6264   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266 /* end confdefs.h.  */
6267 #include <string.h>
6268
6269 _ACEOF
6270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6271   $EGREP "memchr" >/dev/null 2>&1; then :
6272
6273 else
6274   ac_cv_header_stdc=no
6275 fi
6276 rm -f conftest*
6277
6278 fi
6279
6280 if test $ac_cv_header_stdc = yes; then
6281   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6283 /* end confdefs.h.  */
6284 #include <stdlib.h>
6285
6286 _ACEOF
6287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6288   $EGREP "free" >/dev/null 2>&1; then :
6289
6290 else
6291   ac_cv_header_stdc=no
6292 fi
6293 rm -f conftest*
6294
6295 fi
6296
6297 if test $ac_cv_header_stdc = yes; then
6298   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6299   if test "$cross_compiling" = yes; then :
6300   :
6301 else
6302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6303 /* end confdefs.h.  */
6304 #include <ctype.h>
6305 #include <stdlib.h>
6306 #if ((' ' & 0x0FF) == 0x020)
6307 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6308 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6309 #else
6310 # define ISLOWER(c) \
6311                    (('a' <= (c) && (c) <= 'i') \
6312                      || ('j' <= (c) && (c) <= 'r') \
6313                      || ('s' <= (c) && (c) <= 'z'))
6314 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6315 #endif
6316
6317 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6318 int
6319 main ()
6320 {
6321   int i;
6322   for (i = 0; i < 256; i++)
6323     if (XOR (islower (i), ISLOWER (i))
6324         || toupper (i) != TOUPPER (i))
6325       return 2;
6326   return 0;
6327 }
6328 _ACEOF
6329 if ac_fn_c_try_run "$LINENO"; then :
6330
6331 else
6332   ac_cv_header_stdc=no
6333 fi
6334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6335   conftest.$ac_objext conftest.beam conftest.$ac_ext
6336 fi
6337
6338 fi
6339 fi
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6341 $as_echo "$ac_cv_header_stdc" >&6; }
6342 if test $ac_cv_header_stdc = yes; then
6343
6344 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6345
6346 fi
6347
6348
6349
6350
6351
6352
6353           LIBC_FATAL_STDERR_=1
6354   export LIBC_FATAL_STDERR_
6355
6356 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6357 if test "x$ac_cv_type_size_t" = xyes; then :
6358
6359 else
6360
6361 cat >>confdefs.h <<_ACEOF
6362 #define size_t unsigned int
6363 _ACEOF
6364
6365 fi
6366
6367 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6368 # for constant arguments.  Useless!
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6370 $as_echo_n "checking for working alloca.h... " >&6; }
6371 if ${ac_cv_working_alloca_h+:} false; then :
6372   $as_echo_n "(cached) " >&6
6373 else
6374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6375 /* end confdefs.h.  */
6376 #include <alloca.h>
6377 int
6378 main ()
6379 {
6380 char *p = (char *) alloca (2 * sizeof (int));
6381                           if (p) return 0;
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 if ac_fn_c_try_link "$LINENO"; then :
6387   ac_cv_working_alloca_h=yes
6388 else
6389   ac_cv_working_alloca_h=no
6390 fi
6391 rm -f core conftest.err conftest.$ac_objext \
6392     conftest$ac_exeext conftest.$ac_ext
6393 fi
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6395 $as_echo "$ac_cv_working_alloca_h" >&6; }
6396 if test $ac_cv_working_alloca_h = yes; then
6397
6398 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6399
6400 fi
6401
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6403 $as_echo_n "checking for alloca... " >&6; }
6404 if ${ac_cv_func_alloca_works+:} false; then :
6405   $as_echo_n "(cached) " >&6
6406 else
6407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408 /* end confdefs.h.  */
6409 #ifdef __GNUC__
6410 # define alloca __builtin_alloca
6411 #else
6412 # ifdef _MSC_VER
6413 #  include <malloc.h>
6414 #  define alloca _alloca
6415 # else
6416 #  ifdef HAVE_ALLOCA_H
6417 #   include <alloca.h>
6418 #  else
6419 #   ifdef _AIX
6420  #pragma alloca
6421 #   else
6422 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6423 void *alloca (size_t);
6424 #    endif
6425 #   endif
6426 #  endif
6427 # endif
6428 #endif
6429
6430 int
6431 main ()
6432 {
6433 char *p = (char *) alloca (1);
6434                                     if (p) return 0;
6435   ;
6436   return 0;
6437 }
6438 _ACEOF
6439 if ac_fn_c_try_link "$LINENO"; then :
6440   ac_cv_func_alloca_works=yes
6441 else
6442   ac_cv_func_alloca_works=no
6443 fi
6444 rm -f core conftest.err conftest.$ac_objext \
6445     conftest$ac_exeext conftest.$ac_ext
6446 fi
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6448 $as_echo "$ac_cv_func_alloca_works" >&6; }
6449
6450 if test $ac_cv_func_alloca_works = yes; then
6451
6452 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6453
6454 else
6455   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6456 # that cause trouble.  Some versions do not even contain alloca or
6457 # contain a buggy version.  If you still want to use their alloca,
6458 # use ar to extract alloca.o from them instead of compiling alloca.c.
6459
6460
6461
6462
6463
6464 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6465
6466 $as_echo "#define C_ALLOCA 1" >>confdefs.h
6467
6468
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6470 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6471 if ${ac_cv_os_cray+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6475 /* end confdefs.h.  */
6476 #if defined CRAY && ! defined CRAY2
6477 webecray
6478 #else
6479 wenotbecray
6480 #endif
6481
6482 _ACEOF
6483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6484   $EGREP "webecray" >/dev/null 2>&1; then :
6485   ac_cv_os_cray=yes
6486 else
6487   ac_cv_os_cray=no
6488 fi
6489 rm -f conftest*
6490
6491 fi
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6493 $as_echo "$ac_cv_os_cray" >&6; }
6494 if test $ac_cv_os_cray = yes; then
6495   for ac_func in _getb67 GETB67 getb67; do
6496     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6497 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6498 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6499
6500 cat >>confdefs.h <<_ACEOF
6501 #define CRAY_STACKSEG_END $ac_func
6502 _ACEOF
6503
6504     break
6505 fi
6506
6507   done
6508 fi
6509
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6511 $as_echo_n "checking stack direction for C alloca... " >&6; }
6512 if ${ac_cv_c_stack_direction+:} false; then :
6513   $as_echo_n "(cached) " >&6
6514 else
6515   if test "$cross_compiling" = yes; then :
6516   ac_cv_c_stack_direction=0
6517 else
6518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6519 /* end confdefs.h.  */
6520 $ac_includes_default
6521 int
6522 find_stack_direction (int *addr, int depth)
6523 {
6524   int dir, dummy = 0;
6525   if (! addr)
6526     addr = &dummy;
6527   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6528   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6529   return dir + dummy;
6530 }
6531
6532 int
6533 main (int argc, char **argv)
6534 {
6535   return find_stack_direction (0, argc + !argv + 20) < 0;
6536 }
6537 _ACEOF
6538 if ac_fn_c_try_run "$LINENO"; then :
6539   ac_cv_c_stack_direction=1
6540 else
6541   ac_cv_c_stack_direction=-1
6542 fi
6543 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6544   conftest.$ac_objext conftest.beam conftest.$ac_ext
6545 fi
6546
6547 fi
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6549 $as_echo "$ac_cv_c_stack_direction" >&6; }
6550 cat >>confdefs.h <<_ACEOF
6551 #define STACK_DIRECTION $ac_cv_c_stack_direction
6552 _ACEOF
6553
6554
6555 fi
6556
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
6558 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
6559 if ${gl_cv_struct_dirent_d_ino+:} false; then :
6560   $as_echo_n "(cached) " >&6
6561 else
6562   if test "$cross_compiling" = yes; then :
6563   gl_cv_struct_dirent_d_ino=no
6564 else
6565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6566 /* end confdefs.h.  */
6567 #include <sys/types.h>
6568              #include <sys/stat.h>
6569              #include <dirent.h>
6570
6571 int
6572 main ()
6573 {
6574 DIR *dp = opendir (".");
6575              struct dirent *e;
6576              struct stat st;
6577              if (! dp)
6578                return 1;
6579              e = readdir (dp);
6580              if (! e)
6581                return 2;
6582              if (stat (e->d_name, &st) != 0)
6583                return 3;
6584              if (e->d_ino != st.st_ino)
6585                return 4;
6586              return 0;
6587
6588   ;
6589   return 0;
6590 }
6591 _ACEOF
6592 if ac_fn_c_try_run "$LINENO"; then :
6593   gl_cv_struct_dirent_d_ino=yes
6594 else
6595   gl_cv_struct_dirent_d_ino=no
6596 fi
6597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6598   conftest.$ac_objext conftest.beam conftest.$ac_ext
6599 fi
6600
6601 fi
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
6603 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
6604    if test $gl_cv_struct_dirent_d_ino = yes; then
6605
6606 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
6607
6608    fi
6609
6610
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
6612 $as_echo_n "checking for long file names... " >&6; }
6613 if ${ac_cv_sys_long_file_names+:} false; then :
6614   $as_echo_n "(cached) " >&6
6615 else
6616   ac_cv_sys_long_file_names=yes
6617 # Test for long file names in all the places we know might matter:
6618 #      .                the current directory, where building will happen
6619 #      $prefix/lib      where we will be installing things
6620 #      $exec_prefix/lib likewise
6621 #      $TMPDIR          if set, where it might want to write temporary files
6622 #      /tmp             where it might want to write temporary files
6623 #      /var/tmp         likewise
6624 #      /usr/tmp         likewise
6625 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
6626   # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
6627   # in the usual case where exec_prefix is '${prefix}'.
6628   case $ac_dir in #(
6629     . | /* | ?:[\\/]*) ;; #(
6630     *) continue;;
6631   esac
6632   test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
6633   ac_xdir=$ac_dir/cf$$
6634   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
6635   ac_tf1=$ac_xdir/conftest9012345
6636   ac_tf2=$ac_xdir/conftest9012346
6637   touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
6638     ac_cv_sys_long_file_names=no
6639   rm -f -r "$ac_xdir" 2>/dev/null
6640   test $ac_cv_sys_long_file_names = no && break
6641 done
6642 fi
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
6644 $as_echo "$ac_cv_sys_long_file_names" >&6; }
6645 if test $ac_cv_sys_long_file_names = yes; then
6646
6647 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
6648
6649 fi
6650
6651
6652
6653
6654   for ac_func in $ac_func_list
6655 do :
6656   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6657 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6658 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6659   cat >>confdefs.h <<_ACEOF
6660 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6661 _ACEOF
6662
6663 fi
6664 done
6665
6666
6667
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6669 $as_echo_n "checking for inline... " >&6; }
6670 if ${ac_cv_c_inline+:} false; then :
6671   $as_echo_n "(cached) " >&6
6672 else
6673   ac_cv_c_inline=no
6674 for ac_kw in inline __inline__ __inline; do
6675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676 /* end confdefs.h.  */
6677 #ifndef __cplusplus
6678 typedef int foo_t;
6679 static $ac_kw foo_t static_foo () {return 0; }
6680 $ac_kw foo_t foo () {return 0; }
6681 #endif
6682
6683 _ACEOF
6684 if ac_fn_c_try_compile "$LINENO"; then :
6685   ac_cv_c_inline=$ac_kw
6686 fi
6687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6688   test "$ac_cv_c_inline" != no && break
6689 done
6690
6691 fi
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6693 $as_echo "$ac_cv_c_inline" >&6; }
6694
6695 case $ac_cv_c_inline in
6696   inline | yes) ;;
6697   *)
6698     case $ac_cv_c_inline in
6699       no) ac_val=;;
6700       *) ac_val=$ac_cv_c_inline;;
6701     esac
6702     cat >>confdefs.h <<_ACEOF
6703 #ifndef __cplusplus
6704 #define inline $ac_val
6705 #endif
6706 _ACEOF
6707     ;;
6708 esac
6709
6710
6711   GNULIB__EXIT=0;
6712   GNULIB_ATOLL=0;
6713   GNULIB_CALLOC_POSIX=0;
6714   GNULIB_CANONICALIZE_FILE_NAME=0;
6715   GNULIB_GETLOADAVG=0;
6716   GNULIB_GETSUBOPT=0;
6717   GNULIB_GRANTPT=0;
6718   GNULIB_MALLOC_POSIX=0;
6719   GNULIB_MBTOWC=0;
6720   GNULIB_MKDTEMP=0;
6721   GNULIB_MKOSTEMP=0;
6722   GNULIB_MKOSTEMPS=0;
6723   GNULIB_MKSTEMP=0;
6724   GNULIB_MKSTEMPS=0;
6725   GNULIB_POSIX_OPENPT=0;
6726   GNULIB_PTSNAME=0;
6727   GNULIB_PTSNAME_R=0;
6728   GNULIB_PUTENV=0;
6729   GNULIB_RANDOM=0;
6730   GNULIB_RANDOM_R=0;
6731   GNULIB_REALLOC_POSIX=0;
6732   GNULIB_REALPATH=0;
6733   GNULIB_RPMATCH=0;
6734   GNULIB_SETENV=0;
6735   GNULIB_STRTOD=0;
6736   GNULIB_STRTOLL=0;
6737   GNULIB_STRTOULL=0;
6738   GNULIB_SYSTEM_POSIX=0;
6739   GNULIB_UNLOCKPT=0;
6740   GNULIB_UNSETENV=0;
6741   GNULIB_WCTOMB=0;
6742     HAVE__EXIT=1;
6743   HAVE_ATOLL=1;
6744   HAVE_CANONICALIZE_FILE_NAME=1;
6745   HAVE_DECL_GETLOADAVG=1;
6746   HAVE_GETSUBOPT=1;
6747   HAVE_GRANTPT=1;
6748   HAVE_MKDTEMP=1;
6749   HAVE_MKOSTEMP=1;
6750   HAVE_MKOSTEMPS=1;
6751   HAVE_MKSTEMP=1;
6752   HAVE_MKSTEMPS=1;
6753   HAVE_POSIX_OPENPT=1;
6754   HAVE_PTSNAME=1;
6755   HAVE_PTSNAME_R=1;
6756   HAVE_RANDOM=1;
6757   HAVE_RANDOM_H=1;
6758   HAVE_RANDOM_R=1;
6759   HAVE_REALPATH=1;
6760   HAVE_RPMATCH=1;
6761   HAVE_SETENV=1;
6762   HAVE_DECL_SETENV=1;
6763   HAVE_STRTOD=1;
6764   HAVE_STRTOLL=1;
6765   HAVE_STRTOULL=1;
6766   HAVE_STRUCT_RANDOM_DATA=1;
6767   HAVE_SYS_LOADAVG_H=0;
6768   HAVE_UNLOCKPT=1;
6769   HAVE_DECL_UNSETENV=1;
6770   REPLACE_CALLOC=0;
6771   REPLACE_CANONICALIZE_FILE_NAME=0;
6772   REPLACE_MALLOC=0;
6773   REPLACE_MBTOWC=0;
6774   REPLACE_MKSTEMP=0;
6775   REPLACE_PTSNAME_R=0;
6776   REPLACE_PUTENV=0;
6777   REPLACE_RANDOM_R=0;
6778   REPLACE_REALLOC=0;
6779   REPLACE_REALPATH=0;
6780   REPLACE_SETENV=0;
6781   REPLACE_STRTOD=0;
6782   REPLACE_UNSETENV=0;
6783   REPLACE_WCTOMB=0;
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6794 $as_echo_n "checking whether // is distinct from /... " >&6; }
6795 if ${gl_cv_double_slash_root+:} false; then :
6796   $as_echo_n "(cached) " >&6
6797 else
6798    if test x"$cross_compiling" = xyes ; then
6799         # When cross-compiling, there is no way to tell whether // is special
6800         # short of a list of hosts.  However, the only known hosts to date
6801         # that have a distinct // are Apollo DomainOS (too old to port to),
6802         # Cygwin, and z/OS.  If anyone knows of another system for which // has
6803         # special semantics and is distinct from /, please report it to
6804         # <bug-gnulib@gnu.org>.
6805         case $host in
6806           *-cygwin | i370-ibm-openedition)
6807             gl_cv_double_slash_root=yes ;;
6808           *)
6809             # Be optimistic and assume that / and // are the same when we
6810             # don't know.
6811             gl_cv_double_slash_root='unknown, assuming no' ;;
6812         esac
6813       else
6814         set x `ls -di / // 2>/dev/null`
6815         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6816           gl_cv_double_slash_root=no
6817         else
6818           gl_cv_double_slash_root=yes
6819         fi
6820       fi
6821 fi
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6823 $as_echo "$gl_cv_double_slash_root" >&6; }
6824   if test "$gl_cv_double_slash_root" = yes; then
6825
6826 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6827
6828   fi
6829
6830
6831
6832
6833
6834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6835 $as_echo_n "checking whether realpath works... " >&6; }
6836 if ${gl_cv_func_realpath_works+:} false; then :
6837   $as_echo_n "(cached) " >&6
6838 else
6839
6840     touch conftest.a
6841     mkdir conftest.d
6842     if test "$cross_compiling" = yes; then :
6843   gl_cv_func_realpath_works="guessing no"
6844 else
6845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6846 /* end confdefs.h.  */
6847
6848
6849
6850 #include <stdlib.h>
6851 #if defined __MACH__ && defined __APPLE__
6852 /* Avoid a crash on MacOS X.  */
6853 #include <mach/mach.h>
6854 #include <mach/mach_error.h>
6855 #include <mach/thread_status.h>
6856 #include <mach/exception.h>
6857 #include <mach/task.h>
6858 #include <pthread.h>
6859 /* The exception port on which our thread listens.  */
6860 static mach_port_t our_exception_port;
6861 /* The main function of the thread listening for exceptions of type
6862    EXC_BAD_ACCESS.  */
6863 static void *
6864 mach_exception_thread (void *arg)
6865 {
6866   /* Buffer for a message to be received.  */
6867   struct {
6868     mach_msg_header_t head;
6869     mach_msg_body_t msgh_body;
6870     char data[1024];
6871   } msg;
6872   mach_msg_return_t retval;
6873   /* Wait for a message on the exception port.  */
6874   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6875                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6876   if (retval != MACH_MSG_SUCCESS)
6877     abort ();
6878   exit (1);
6879 }
6880 static void
6881 nocrash_init (void)
6882 {
6883   mach_port_t self = mach_task_self ();
6884   /* Allocate a port on which the thread shall listen for exceptions.  */
6885   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6886       == KERN_SUCCESS) {
6887     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
6888     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6889                                 MACH_MSG_TYPE_MAKE_SEND)
6890         == KERN_SUCCESS) {
6891       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
6892          for us.  */
6893       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6894       /* Create the thread listening on the exception port.  */
6895       pthread_attr_t attr;
6896       pthread_t thread;
6897       if (pthread_attr_init (&attr) == 0
6898           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6899           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6900         pthread_attr_destroy (&attr);
6901         /* Replace the exception port info for these exceptions with our own.
6902            Note that we replace the exception port for the entire task, not only
6903            for a particular thread.  This has the effect that when our exception
6904            port gets the message, the thread specific exception port has already
6905            been asked, and we don't need to bother about it.
6906            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
6907         task_set_exception_ports (self, mask, our_exception_port,
6908                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6909       }
6910     }
6911   }
6912 }
6913 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6914 /* Avoid a crash on native Windows.  */
6915 #define WIN32_LEAN_AND_MEAN
6916 #include <windows.h>
6917 #include <winerror.h>
6918 static LONG WINAPI
6919 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6920 {
6921   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6922     {
6923     case EXCEPTION_ACCESS_VIOLATION:
6924     case EXCEPTION_IN_PAGE_ERROR:
6925     case EXCEPTION_STACK_OVERFLOW:
6926     case EXCEPTION_GUARD_PAGE:
6927     case EXCEPTION_PRIV_INSTRUCTION:
6928     case EXCEPTION_ILLEGAL_INSTRUCTION:
6929     case EXCEPTION_DATATYPE_MISALIGNMENT:
6930     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6931     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6932       exit (1);
6933     }
6934   return EXCEPTION_CONTINUE_SEARCH;
6935 }
6936 static void
6937 nocrash_init (void)
6938 {
6939   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6940 }
6941 #else
6942 /* Avoid a crash on POSIX systems.  */
6943 #include <signal.h>
6944 /* A POSIX signal handler.  */
6945 static void
6946 exception_handler (int sig)
6947 {
6948   exit (1);
6949 }
6950 static void
6951 nocrash_init (void)
6952 {
6953 #ifdef SIGSEGV
6954   signal (SIGSEGV, exception_handler);
6955 #endif
6956 #ifdef SIGBUS
6957   signal (SIGBUS, exception_handler);
6958 #endif
6959 }
6960 #endif
6961
6962         #include <stdlib.h>
6963         #include <string.h>
6964
6965 int
6966 main ()
6967 {
6968
6969         int result = 0;
6970         {
6971           char *name = realpath ("conftest.a", NULL);
6972           if (!(name && *name == '/'))
6973             result |= 1;
6974         }
6975         {
6976           char *name = realpath ("conftest.b/../conftest.a", NULL);
6977           if (name != NULL)
6978             result |= 2;
6979         }
6980         {
6981           char *name = realpath ("conftest.a/", NULL);
6982           if (name != NULL)
6983             result |= 4;
6984         }
6985         {
6986           char *name1 = realpath (".", NULL);
6987           char *name2 = realpath ("conftest.d//./..", NULL);
6988           if (strcmp (name1, name2) != 0)
6989             result |= 8;
6990         }
6991         return result;
6992
6993   ;
6994   return 0;
6995 }
6996
6997 _ACEOF
6998 if ac_fn_c_try_run "$LINENO"; then :
6999   gl_cv_func_realpath_works=yes
7000 else
7001   gl_cv_func_realpath_works=no
7002 fi
7003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7004   conftest.$ac_objext conftest.beam conftest.$ac_ext
7005 fi
7006
7007     rm -rf conftest.a conftest.d
7008
7009 fi
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7011 $as_echo "$gl_cv_func_realpath_works" >&6; }
7012   if test "$gl_cv_func_realpath_works" = yes; then
7013
7014 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7015
7016   fi
7017
7018
7019
7020
7021   for ac_header in $ac_header_list
7022 do :
7023   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7024 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7025 "
7026 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7027   cat >>confdefs.h <<_ACEOF
7028 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7029 _ACEOF
7030
7031 fi
7032
7033 done
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045   GNULIB_CHDIR=0;
7046   GNULIB_CHOWN=0;
7047   GNULIB_CLOSE=0;
7048   GNULIB_DUP=0;
7049   GNULIB_DUP2=0;
7050   GNULIB_DUP3=0;
7051   GNULIB_ENVIRON=0;
7052   GNULIB_EUIDACCESS=0;
7053   GNULIB_FACCESSAT=0;
7054   GNULIB_FCHDIR=0;
7055   GNULIB_FCHOWNAT=0;
7056   GNULIB_FDATASYNC=0;
7057   GNULIB_FSYNC=0;
7058   GNULIB_FTRUNCATE=0;
7059   GNULIB_GETCWD=0;
7060   GNULIB_GETDOMAINNAME=0;
7061   GNULIB_GETDTABLESIZE=0;
7062   GNULIB_GETGROUPS=0;
7063   GNULIB_GETHOSTNAME=0;
7064   GNULIB_GETLOGIN=0;
7065   GNULIB_GETLOGIN_R=0;
7066   GNULIB_GETPAGESIZE=0;
7067   GNULIB_GETUSERSHELL=0;
7068   GNULIB_GROUP_MEMBER=0;
7069   GNULIB_ISATTY=0;
7070   GNULIB_LCHOWN=0;
7071   GNULIB_LINK=0;
7072   GNULIB_LINKAT=0;
7073   GNULIB_LSEEK=0;
7074   GNULIB_PIPE=0;
7075   GNULIB_PIPE2=0;
7076   GNULIB_PREAD=0;
7077   GNULIB_PWRITE=0;
7078   GNULIB_READ=0;
7079   GNULIB_READLINK=0;
7080   GNULIB_READLINKAT=0;
7081   GNULIB_RMDIR=0;
7082   GNULIB_SETHOSTNAME=0;
7083   GNULIB_SLEEP=0;
7084   GNULIB_SYMLINK=0;
7085   GNULIB_SYMLINKAT=0;
7086   GNULIB_TTYNAME_R=0;
7087   GNULIB_UNISTD_H_NONBLOCKING=0;
7088   GNULIB_UNISTD_H_SIGPIPE=0;
7089   GNULIB_UNLINK=0;
7090   GNULIB_UNLINKAT=0;
7091   GNULIB_USLEEP=0;
7092   GNULIB_WRITE=0;
7093     HAVE_CHOWN=1;
7094   HAVE_DUP2=1;
7095   HAVE_DUP3=1;
7096   HAVE_EUIDACCESS=1;
7097   HAVE_FACCESSAT=1;
7098   HAVE_FCHDIR=1;
7099   HAVE_FCHOWNAT=1;
7100   HAVE_FDATASYNC=1;
7101   HAVE_FSYNC=1;
7102   HAVE_FTRUNCATE=1;
7103   HAVE_GETDTABLESIZE=1;
7104   HAVE_GETGROUPS=1;
7105   HAVE_GETHOSTNAME=1;
7106   HAVE_GETLOGIN=1;
7107   HAVE_GETPAGESIZE=1;
7108   HAVE_GROUP_MEMBER=1;
7109   HAVE_LCHOWN=1;
7110   HAVE_LINK=1;
7111   HAVE_LINKAT=1;
7112   HAVE_PIPE=1;
7113   HAVE_PIPE2=1;
7114   HAVE_PREAD=1;
7115   HAVE_PWRITE=1;
7116   HAVE_READLINK=1;
7117   HAVE_READLINKAT=1;
7118   HAVE_SETHOSTNAME=1;
7119   HAVE_SLEEP=1;
7120   HAVE_SYMLINK=1;
7121   HAVE_SYMLINKAT=1;
7122   HAVE_UNLINKAT=1;
7123   HAVE_USLEEP=1;
7124   HAVE_DECL_ENVIRON=1;
7125   HAVE_DECL_FCHDIR=1;
7126   HAVE_DECL_FDATASYNC=1;
7127   HAVE_DECL_GETDOMAINNAME=1;
7128   HAVE_DECL_GETLOGIN_R=1;
7129   HAVE_DECL_GETPAGESIZE=1;
7130   HAVE_DECL_GETUSERSHELL=1;
7131   HAVE_DECL_SETHOSTNAME=1;
7132   HAVE_DECL_TTYNAME_R=1;
7133   HAVE_OS_H=0;
7134   HAVE_SYS_PARAM_H=0;
7135   REPLACE_CHOWN=0;
7136   REPLACE_CLOSE=0;
7137   REPLACE_DUP=0;
7138   REPLACE_DUP2=0;
7139   REPLACE_FCHOWNAT=0;
7140   REPLACE_GETCWD=0;
7141   REPLACE_GETDOMAINNAME=0;
7142   REPLACE_GETLOGIN_R=0;
7143   REPLACE_GETGROUPS=0;
7144   REPLACE_GETPAGESIZE=0;
7145   REPLACE_ISATTY=0;
7146   REPLACE_LCHOWN=0;
7147   REPLACE_LINK=0;
7148   REPLACE_LINKAT=0;
7149   REPLACE_LSEEK=0;
7150   REPLACE_PREAD=0;
7151   REPLACE_PWRITE=0;
7152   REPLACE_READ=0;
7153   REPLACE_READLINK=0;
7154   REPLACE_RMDIR=0;
7155   REPLACE_SLEEP=0;
7156   REPLACE_SYMLINK=0;
7157   REPLACE_TTYNAME_R=0;
7158   REPLACE_UNLINK=0;
7159   REPLACE_UNLINKAT=0;
7160   REPLACE_USLEEP=0;
7161   REPLACE_WRITE=0;
7162   UNISTD_H_HAVE_WINSOCK2_H=0;
7163   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7164
7165
7166
7167
7168
7169
7170   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7171     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7172
7173 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7174
7175   else
7176     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7177   fi
7178
7179
7180
7181
7182
7183      GNULIB_OPENDIR=0;
7184   GNULIB_READDIR=0;
7185   GNULIB_REWINDDIR=0;
7186   GNULIB_CLOSEDIR=0;
7187   GNULIB_DIRFD=0;
7188   GNULIB_FDOPENDIR=0;
7189   GNULIB_SCANDIR=0;
7190   GNULIB_ALPHASORT=0;
7191     HAVE_OPENDIR=1;
7192   HAVE_READDIR=1;
7193   HAVE_REWINDDIR=1;
7194   HAVE_CLOSEDIR=1;
7195   HAVE_DECL_DIRFD=1;
7196   HAVE_DECL_FDOPENDIR=1;
7197   HAVE_FDOPENDIR=1;
7198   HAVE_SCANDIR=1;
7199   HAVE_ALPHASORT=1;
7200   REPLACE_OPENDIR=0;
7201   REPLACE_CLOSEDIR=0;
7202   REPLACE_DIRFD=0;
7203   REPLACE_FDOPENDIR=0;
7204
7205
7206
7207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7208 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7209 if ${gl_cv_have_include_next+:} false; then :
7210   $as_echo_n "(cached) " >&6
7211 else
7212   rm -rf conftestd1a conftestd1b conftestd2
7213      mkdir conftestd1a conftestd1b conftestd2
7214                                                   cat <<EOF > conftestd1a/conftest.h
7215 #define DEFINED_IN_CONFTESTD1
7216 #include_next <conftest.h>
7217 #ifdef DEFINED_IN_CONFTESTD2
7218 int foo;
7219 #else
7220 #error "include_next doesn't work"
7221 #endif
7222 EOF
7223      cat <<EOF > conftestd1b/conftest.h
7224 #define DEFINED_IN_CONFTESTD1
7225 #include <stdio.h>
7226 #include_next <conftest.h>
7227 #ifdef DEFINED_IN_CONFTESTD2
7228 int foo;
7229 #else
7230 #error "include_next doesn't work"
7231 #endif
7232 EOF
7233      cat <<EOF > conftestd2/conftest.h
7234 #ifndef DEFINED_IN_CONFTESTD1
7235 #error "include_next test doesn't work"
7236 #endif
7237 #define DEFINED_IN_CONFTESTD2
7238 EOF
7239      gl_save_CPPFLAGS="$CPPFLAGS"
7240      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7241      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7242 /* end confdefs.h.  */
7243 #include <conftest.h>
7244 _ACEOF
7245 if ac_fn_c_try_compile "$LINENO"; then :
7246   gl_cv_have_include_next=yes
7247 else
7248   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7249         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7250 /* end confdefs.h.  */
7251 #include <conftest.h>
7252 _ACEOF
7253 if ac_fn_c_try_compile "$LINENO"; then :
7254   gl_cv_have_include_next=buggy
7255 else
7256   gl_cv_have_include_next=no
7257 fi
7258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259
7260 fi
7261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7262      CPPFLAGS="$gl_save_CPPFLAGS"
7263      rm -rf conftestd1a conftestd1b conftestd2
7264
7265 fi
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7267 $as_echo "$gl_cv_have_include_next" >&6; }
7268   PRAGMA_SYSTEM_HEADER=
7269   if test $gl_cv_have_include_next = yes; then
7270     INCLUDE_NEXT=include_next
7271     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7272     if test -n "$GCC"; then
7273       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7274     fi
7275   else
7276     if test $gl_cv_have_include_next = buggy; then
7277       INCLUDE_NEXT=include
7278       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7279     else
7280       INCLUDE_NEXT=include
7281       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7282     fi
7283   fi
7284
7285
7286
7287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7288 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7289 if ${gl_cv_pragma_columns+:} false; then :
7290   $as_echo_n "(cached) " >&6
7291 else
7292        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7293 /* end confdefs.h.  */
7294
7295 #ifdef __TANDEM
7296 choke me
7297 #endif
7298
7299 _ACEOF
7300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7301   $EGREP "choke me" >/dev/null 2>&1; then :
7302   gl_cv_pragma_columns=yes
7303 else
7304   gl_cv_pragma_columns=no
7305 fi
7306 rm -f conftest*
7307
7308
7309 fi
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7311 $as_echo "$gl_cv_pragma_columns" >&6; }
7312   if test $gl_cv_pragma_columns = yes; then
7313     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7314   else
7315     PRAGMA_COLUMNS=
7316   fi
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7337 $as_echo_n "checking if environ is properly declared... " >&6; }
7338   if ${gt_cv_var_environ_declaration+:} false; then :
7339   $as_echo_n "(cached) " >&6
7340 else
7341
7342     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343 /* end confdefs.h.  */
7344 #if HAVE_UNISTD_H
7345      #include <unistd.h>
7346      #endif
7347      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
7348      #include <stdlib.h>
7349
7350            extern struct { int foo; } environ;
7351 int
7352 main ()
7353 {
7354 environ.foo = 1;
7355   ;
7356   return 0;
7357 }
7358 _ACEOF
7359 if ac_fn_c_try_compile "$LINENO"; then :
7360   gt_cv_var_environ_declaration=no
7361 else
7362   gt_cv_var_environ_declaration=yes
7363 fi
7364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365 fi
7366
7367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7368 $as_echo "$gt_cv_var_environ_declaration" >&6; }
7369   if test $gt_cv_var_environ_declaration = yes; then
7370
7371 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
7372
7373   fi
7374
7375
7376   if test $gt_cv_var_environ_declaration != yes; then
7377     HAVE_DECL_ENVIRON=0
7378   fi
7379
7380
7381
7382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7383 $as_echo_n "checking for complete errno.h... " >&6; }
7384 if ${gl_cv_header_errno_h_complete+:} false; then :
7385   $as_echo_n "(cached) " >&6
7386 else
7387
7388     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7389 /* end confdefs.h.  */
7390
7391 #include <errno.h>
7392 #if !defined ENOMSG
7393 booboo
7394 #endif
7395 #if !defined EIDRM
7396 booboo
7397 #endif
7398 #if !defined ENOLINK
7399 booboo
7400 #endif
7401 #if !defined EPROTO
7402 booboo
7403 #endif
7404 #if !defined EMULTIHOP
7405 booboo
7406 #endif
7407 #if !defined EBADMSG
7408 booboo
7409 #endif
7410 #if !defined EOVERFLOW
7411 booboo
7412 #endif
7413 #if !defined ENOTSUP
7414 booboo
7415 #endif
7416 #if !defined ENETRESET
7417 booboo
7418 #endif
7419 #if !defined ECONNABORTED
7420 booboo
7421 #endif
7422 #if !defined ESTALE
7423 booboo
7424 #endif
7425 #if !defined EDQUOT
7426 booboo
7427 #endif
7428 #if !defined ECANCELED
7429 booboo
7430 #endif
7431
7432 _ACEOF
7433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7434   $EGREP "booboo" >/dev/null 2>&1; then :
7435   gl_cv_header_errno_h_complete=no
7436 else
7437   gl_cv_header_errno_h_complete=yes
7438 fi
7439 rm -f conftest*
7440
7441
7442 fi
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7444 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
7445   if test $gl_cv_header_errno_h_complete = yes; then
7446     ERRNO_H=''
7447   else
7448
7449
7450
7451
7452
7453
7454
7455
7456      if test $gl_cv_have_include_next = yes; then
7457        gl_cv_next_errno_h='<'errno.h'>'
7458      else
7459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7460 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
7461 if ${gl_cv_next_errno_h+:} false; then :
7462   $as_echo_n "(cached) " >&6
7463 else
7464
7465                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7466 /* end confdefs.h.  */
7467 #include <errno.h>
7468
7469 _ACEOF
7470                                                                                                                         case "$host_os" in
7471                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
7472                  *)    gl_absname_cpp="$ac_cpp" ;;
7473                esac
7474
7475                case "$host_os" in
7476                  mingw*)
7477                                                                                                                                      gl_dirsep_regex='[/\\]'
7478                    ;;
7479                  *)
7480                    gl_dirsep_regex='\/'
7481                    ;;
7482                esac
7483                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7484
7485                gl_header_literal_regex=`echo 'errno.h' \
7486                                         | sed -e "$gl_make_literal_regex_sed"`
7487                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7488                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7489                    s|^/[^/]|//&|
7490                    p
7491                    q
7492                  }'
7493                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7494                       sed -n "$gl_absolute_header_sed"`'"'
7495
7496
7497 fi
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7499 $as_echo "$gl_cv_next_errno_h" >&6; }
7500      fi
7501      NEXT_ERRNO_H=$gl_cv_next_errno_h
7502
7503      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7504        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7505        gl_next_as_first_directive='<'errno.h'>'
7506      else
7507        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7508        gl_next_as_first_directive=$gl_cv_next_errno_h
7509      fi
7510      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7511
7512
7513
7514
7515     ERRNO_H='errno.h'
7516   fi
7517
7518    if test -n "$ERRNO_H"; then
7519   GL_GENERATE_ERRNO_H_TRUE=
7520   GL_GENERATE_ERRNO_H_FALSE='#'
7521 else
7522   GL_GENERATE_ERRNO_H_TRUE='#'
7523   GL_GENERATE_ERRNO_H_FALSE=
7524 fi
7525
7526
7527   if test -n "$ERRNO_H"; then
7528     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7529 $as_echo_n "checking for EMULTIHOP value... " >&6; }
7530 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7531   $as_echo_n "(cached) " >&6
7532 else
7533
7534       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7535 /* end confdefs.h.  */
7536
7537 #include <errno.h>
7538 #ifdef EMULTIHOP
7539 yes
7540 #endif
7541
7542 _ACEOF
7543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7544   $EGREP "yes" >/dev/null 2>&1; then :
7545   gl_cv_header_errno_h_EMULTIHOP=yes
7546 else
7547   gl_cv_header_errno_h_EMULTIHOP=no
7548 fi
7549 rm -f conftest*
7550
7551       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7552         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7553 /* end confdefs.h.  */
7554
7555 #define _XOPEN_SOURCE_EXTENDED 1
7556 #include <errno.h>
7557 #ifdef EMULTIHOP
7558 yes
7559 #endif
7560
7561 _ACEOF
7562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7563   $EGREP "yes" >/dev/null 2>&1; then :
7564   gl_cv_header_errno_h_EMULTIHOP=hidden
7565 fi
7566 rm -f conftest*
7567
7568         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7569                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
7570 #define _XOPEN_SOURCE_EXTENDED 1
7571 #include <errno.h>
7572 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
7573 #include <stdio.h>
7574 #include <stdlib.h>
7575 "; then :
7576
7577 fi
7578
7579         fi
7580       fi
7581
7582 fi
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7584 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7585     case $gl_cv_header_errno_h_EMULTIHOP in
7586       yes | no)
7587         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7588         ;;
7589       *)
7590         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7591         ;;
7592     esac
7593
7594
7595   fi
7596
7597
7598   if test -n "$ERRNO_H"; then
7599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7600 $as_echo_n "checking for ENOLINK value... " >&6; }
7601 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
7602   $as_echo_n "(cached) " >&6
7603 else
7604
7605       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7606 /* end confdefs.h.  */
7607
7608 #include <errno.h>
7609 #ifdef ENOLINK
7610 yes
7611 #endif
7612
7613 _ACEOF
7614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7615   $EGREP "yes" >/dev/null 2>&1; then :
7616   gl_cv_header_errno_h_ENOLINK=yes
7617 else
7618   gl_cv_header_errno_h_ENOLINK=no
7619 fi
7620 rm -f conftest*
7621
7622       if test $gl_cv_header_errno_h_ENOLINK = no; then
7623         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624 /* end confdefs.h.  */
7625
7626 #define _XOPEN_SOURCE_EXTENDED 1
7627 #include <errno.h>
7628 #ifdef ENOLINK
7629 yes
7630 #endif
7631
7632 _ACEOF
7633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7634   $EGREP "yes" >/dev/null 2>&1; then :
7635   gl_cv_header_errno_h_ENOLINK=hidden
7636 fi
7637 rm -f conftest*
7638
7639         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7640                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
7641 #define _XOPEN_SOURCE_EXTENDED 1
7642 #include <errno.h>
7643 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
7644 #include <stdio.h>
7645 #include <stdlib.h>
7646 "; then :
7647
7648 fi
7649
7650         fi
7651       fi
7652
7653 fi
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7655 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7656     case $gl_cv_header_errno_h_ENOLINK in
7657       yes | no)
7658         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7659         ;;
7660       *)
7661         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7662         ;;
7663     esac
7664
7665
7666   fi
7667
7668
7669   if test -n "$ERRNO_H"; then
7670     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7671 $as_echo_n "checking for EOVERFLOW value... " >&6; }
7672 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
7673   $as_echo_n "(cached) " >&6
7674 else
7675
7676       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7677 /* end confdefs.h.  */
7678
7679 #include <errno.h>
7680 #ifdef EOVERFLOW
7681 yes
7682 #endif
7683
7684 _ACEOF
7685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7686   $EGREP "yes" >/dev/null 2>&1; then :
7687   gl_cv_header_errno_h_EOVERFLOW=yes
7688 else
7689   gl_cv_header_errno_h_EOVERFLOW=no
7690 fi
7691 rm -f conftest*
7692
7693       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7694         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7695 /* end confdefs.h.  */
7696
7697 #define _XOPEN_SOURCE_EXTENDED 1
7698 #include <errno.h>
7699 #ifdef EOVERFLOW
7700 yes
7701 #endif
7702
7703 _ACEOF
7704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7705   $EGREP "yes" >/dev/null 2>&1; then :
7706   gl_cv_header_errno_h_EOVERFLOW=hidden
7707 fi
7708 rm -f conftest*
7709
7710         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7711                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
7712 #define _XOPEN_SOURCE_EXTENDED 1
7713 #include <errno.h>
7714 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
7715 #include <stdio.h>
7716 #include <stdlib.h>
7717 "; then :
7718
7719 fi
7720
7721         fi
7722       fi
7723
7724 fi
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7726 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7727     case $gl_cv_header_errno_h_EOVERFLOW in
7728       yes | no)
7729         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7730         ;;
7731       *)
7732         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7733         ;;
7734     esac
7735
7736
7737   fi
7738
7739
7740 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7741 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
7742   ac_have_decl=1
7743 else
7744   ac_have_decl=0
7745 fi
7746
7747 cat >>confdefs.h <<_ACEOF
7748 #define HAVE_DECL_STRERROR_R $ac_have_decl
7749 _ACEOF
7750
7751 for ac_func in strerror_r
7752 do :
7753   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7754 if test "x$ac_cv_func_strerror_r" = xyes; then :
7755   cat >>confdefs.h <<_ACEOF
7756 #define HAVE_STRERROR_R 1
7757 _ACEOF
7758
7759 fi
7760 done
7761
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7763 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
7764 if ${ac_cv_func_strerror_r_char_p+:} false; then :
7765   $as_echo_n "(cached) " >&6
7766 else
7767
7768     ac_cv_func_strerror_r_char_p=no
7769     if test $ac_cv_have_decl_strerror_r = yes; then
7770       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7771 /* end confdefs.h.  */
7772 $ac_includes_default
7773 int
7774 main ()
7775 {
7776
7777           char buf[100];
7778           char x = *strerror_r (0, buf, sizeof buf);
7779           char *p = strerror_r (0, buf, sizeof buf);
7780           return !p || x;
7781
7782   ;
7783   return 0;
7784 }
7785 _ACEOF
7786 if ac_fn_c_try_compile "$LINENO"; then :
7787   ac_cv_func_strerror_r_char_p=yes
7788 fi
7789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7790     else
7791       # strerror_r is not declared.  Choose between
7792       # systems that have relatively inaccessible declarations for the
7793       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
7794       # former has a strerror_r that returns char*, while the latter
7795       # has a strerror_r that returns `int'.
7796       # This test should segfault on the DEC system.
7797       if test "$cross_compiling" = yes; then :
7798   :
7799 else
7800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7801 /* end confdefs.h.  */
7802 $ac_includes_default
7803         extern char *strerror_r ();
7804 int
7805 main ()
7806 {
7807 char buf[100];
7808           char x = *strerror_r (0, buf, sizeof buf);
7809           return ! isalpha (x);
7810   ;
7811   return 0;
7812 }
7813 _ACEOF
7814 if ac_fn_c_try_run "$LINENO"; then :
7815   ac_cv_func_strerror_r_char_p=yes
7816 fi
7817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7818   conftest.$ac_objext conftest.beam conftest.$ac_ext
7819 fi
7820
7821     fi
7822
7823 fi
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7825 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7826 if test $ac_cv_func_strerror_r_char_p = yes; then
7827
7828 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7829
7830 fi
7831
7832
7833   GNULIB_FCNTL=0;
7834   GNULIB_NONBLOCKING=0;
7835   GNULIB_OPEN=0;
7836   GNULIB_OPENAT=0;
7837     HAVE_FCNTL=1;
7838   HAVE_OPENAT=1;
7839   REPLACE_FCNTL=0;
7840   REPLACE_OPEN=0;
7841   REPLACE_OPENAT=0;
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7853 $as_echo_n "checking for working fcntl.h... " >&6; }
7854 if ${gl_cv_header_working_fcntl_h+:} false; then :
7855   $as_echo_n "(cached) " >&6
7856 else
7857   if test "$cross_compiling" = yes; then :
7858   gl_cv_header_working_fcntl_h=cross-compiling
7859 else
7860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7861 /* end confdefs.h.  */
7862 #include <sys/types.h>
7863            #include <sys/stat.h>
7864            #if HAVE_UNISTD_H
7865            # include <unistd.h>
7866            #else /* on Windows with MSVC */
7867            # include <io.h>
7868            # include <stdlib.h>
7869            # defined sleep(n) _sleep ((n) * 1000)
7870            #endif
7871            #include <fcntl.h>
7872            #ifndef O_NOATIME
7873             #define O_NOATIME 0
7874            #endif
7875            #ifndef O_NOFOLLOW
7876             #define O_NOFOLLOW 0
7877            #endif
7878            static int const constants[] =
7879             {
7880               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7881               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7882             };
7883
7884 int
7885 main ()
7886 {
7887
7888             int result = !constants;
7889             #if HAVE_SYMLINK
7890             {
7891               static char const sym[] = "conftest.sym";
7892               if (symlink (".", sym) != 0)
7893                 result |= 2;
7894               else
7895                 {
7896                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7897                   if (fd >= 0)
7898                     {
7899                       close (fd);
7900                       result |= 4;
7901                     }
7902                 }
7903               unlink (sym);
7904             }
7905             #endif
7906             {
7907               static char const file[] = "confdefs.h";
7908               int fd = open (file, O_RDONLY | O_NOATIME);
7909               if (fd < 0)
7910                 result |= 8;
7911               else
7912                 {
7913                   struct stat st0;
7914                   if (fstat (fd, &st0) != 0)
7915                     result |= 16;
7916                   else
7917                     {
7918                       char c;
7919                       sleep (1);
7920                       if (read (fd, &c, 1) != 1)
7921                         result |= 24;
7922                       else
7923                         {
7924                           if (close (fd) != 0)
7925                             result |= 32;
7926                           else
7927                             {
7928                               struct stat st1;
7929                               if (stat (file, &st1) != 0)
7930                                 result |= 40;
7931                               else
7932                                 if (st0.st_atime != st1.st_atime)
7933                                   result |= 64;
7934                             }
7935                         }
7936                     }
7937                 }
7938             }
7939             return result;
7940   ;
7941   return 0;
7942 }
7943 _ACEOF
7944 if ac_fn_c_try_run "$LINENO"; then :
7945   gl_cv_header_working_fcntl_h=yes
7946 else
7947   case $? in #(
7948         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7949         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7950         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7951          *) gl_cv_header_working_fcntl_h='no';;
7952         esac
7953 fi
7954 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7955   conftest.$ac_objext conftest.beam conftest.$ac_ext
7956 fi
7957
7958 fi
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7960 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7961
7962   case $gl_cv_header_working_fcntl_h in #(
7963   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7964   *) ac_val=1;;
7965   esac
7966
7967 cat >>confdefs.h <<_ACEOF
7968 #define HAVE_WORKING_O_NOATIME $ac_val
7969 _ACEOF
7970
7971
7972   case $gl_cv_header_working_fcntl_h in #(
7973   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7974   *) ac_val=1;;
7975   esac
7976
7977 cat >>confdefs.h <<_ACEOF
7978 #define HAVE_WORKING_O_NOFOLLOW $ac_val
7979 _ACEOF
7980
7981
7982 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7983 if test "x$ac_cv_type_pid_t" = xyes; then :
7984
7985 else
7986
7987 cat >>confdefs.h <<_ACEOF
7988 #define pid_t int
7989 _ACEOF
7990
7991 fi
7992
7993 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7994 if test "x$ac_cv_type_mode_t" = xyes; then :
7995
7996 else
7997
7998 cat >>confdefs.h <<_ACEOF
7999 #define mode_t int
8000 _ACEOF
8001
8002 fi
8003
8004
8005      GNULIB_FCHMODAT=0;
8006   GNULIB_FSTAT=0;
8007   GNULIB_FSTATAT=0;
8008   GNULIB_FUTIMENS=0;
8009   GNULIB_LCHMOD=0;
8010   GNULIB_LSTAT=0;
8011   GNULIB_MKDIRAT=0;
8012   GNULIB_MKFIFO=0;
8013   GNULIB_MKFIFOAT=0;
8014   GNULIB_MKNOD=0;
8015   GNULIB_MKNODAT=0;
8016   GNULIB_STAT=0;
8017   GNULIB_UTIMENSAT=0;
8018     HAVE_FCHMODAT=1;
8019   HAVE_FSTATAT=1;
8020   HAVE_FUTIMENS=1;
8021   HAVE_LCHMOD=1;
8022   HAVE_LSTAT=1;
8023   HAVE_MKDIRAT=1;
8024   HAVE_MKFIFO=1;
8025   HAVE_MKFIFOAT=1;
8026   HAVE_MKNOD=1;
8027   HAVE_MKNODAT=1;
8028   HAVE_UTIMENSAT=1;
8029   REPLACE_FSTAT=0;
8030   REPLACE_FSTATAT=0;
8031   REPLACE_FUTIMENS=0;
8032   REPLACE_LSTAT=0;
8033   REPLACE_MKDIR=0;
8034   REPLACE_MKFIFO=0;
8035   REPLACE_MKNOD=0;
8036   REPLACE_STAT=0;
8037   REPLACE_UTIMENSAT=0;
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056      if test $gl_cv_have_include_next = yes; then
8057        gl_cv_next_getopt_h='<'getopt.h'>'
8058      else
8059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
8060 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
8061 if ${gl_cv_next_getopt_h+:} false; then :
8062   $as_echo_n "(cached) " >&6
8063 else
8064
8065              if test $ac_cv_header_getopt_h = yes; then
8066
8067
8068                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8069 /* end confdefs.h.  */
8070 #include <getopt.h>
8071
8072 _ACEOF
8073                                                                                                                         case "$host_os" in
8074                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
8075                  *)    gl_absname_cpp="$ac_cpp" ;;
8076                esac
8077
8078                case "$host_os" in
8079                  mingw*)
8080                                                                                                                                      gl_dirsep_regex='[/\\]'
8081                    ;;
8082                  *)
8083                    gl_dirsep_regex='\/'
8084                    ;;
8085                esac
8086                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8087
8088                gl_header_literal_regex=`echo 'getopt.h' \
8089                                         | sed -e "$gl_make_literal_regex_sed"`
8090                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8091                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8092                    s|^/[^/]|//&|
8093                    p
8094                    q
8095                  }'
8096                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8097                       sed -n "$gl_absolute_header_sed"`'"'
8098           else
8099                gl_cv_next_getopt_h='<'getopt.h'>'
8100              fi
8101
8102
8103 fi
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
8105 $as_echo "$gl_cv_next_getopt_h" >&6; }
8106      fi
8107      NEXT_GETOPT_H=$gl_cv_next_getopt_h
8108
8109      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8110        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8111        gl_next_as_first_directive='<'getopt.h'>'
8112      else
8113        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8114        gl_next_as_first_directive=$gl_cv_next_getopt_h
8115      fi
8116      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
8117
8118
8119
8120
8121   if test $ac_cv_header_getopt_h = yes; then
8122     HAVE_GETOPT_H=1
8123   else
8124     HAVE_GETOPT_H=0
8125   fi
8126
8127
8128   gl_replace_getopt=
8129
8130     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
8131     for ac_header in getopt.h
8132 do :
8133   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
8134 if test "x$ac_cv_header_getopt_h" = xyes; then :
8135   cat >>confdefs.h <<_ACEOF
8136 #define HAVE_GETOPT_H 1
8137 _ACEOF
8138
8139 else
8140   gl_replace_getopt=yes
8141 fi
8142
8143 done
8144
8145   fi
8146
8147     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
8148     for ac_func in getopt_long_only
8149 do :
8150   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
8151 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
8152   cat >>confdefs.h <<_ACEOF
8153 #define HAVE_GETOPT_LONG_ONLY 1
8154 _ACEOF
8155
8156 else
8157   gl_replace_getopt=yes
8158 fi
8159 done
8160
8161   fi
8162
8163                     if test -z "$gl_replace_getopt"; then
8164     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
8165 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
8166 if ${gl_cv_func_getopt_posix+:} false; then :
8167   $as_echo_n "(cached) " >&6
8168 else
8169
8170                                                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8171 /* end confdefs.h.  */
8172 #include <unistd.h>
8173 int
8174 main ()
8175 {
8176 int *p = &optreset; return optreset;
8177   ;
8178   return 0;
8179 }
8180 _ACEOF
8181 if ac_fn_c_try_link "$LINENO"; then :
8182   gl_optind_min=1
8183 else
8184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8185 /* end confdefs.h.  */
8186 #include <getopt.h>
8187 int
8188 main ()
8189 {
8190 return !getopt_clip;
8191   ;
8192   return 0;
8193 }
8194 _ACEOF
8195 if ac_fn_c_try_compile "$LINENO"; then :
8196   gl_optind_min=1
8197 else
8198   gl_optind_min=0
8199 fi
8200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8201 fi
8202 rm -f core conftest.err conftest.$ac_objext \
8203     conftest$ac_exeext conftest.$ac_ext
8204
8205                 gl_save_CPPFLAGS=$CPPFLAGS
8206         CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
8207         if test "$cross_compiling" = yes; then :
8208   case "$host_os" in
8209              mingw*)         gl_cv_func_getopt_posix="guessing no";;
8210              darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
8211              *)              gl_cv_func_getopt_posix="guessing yes";;
8212            esac
8213
8214 else
8215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h.  */
8217
8218 #include <unistd.h>
8219 #include <stdlib.h>
8220 #include <string.h>
8221
8222 int
8223 main ()
8224 {
8225   {
8226     static char program[] = "program";
8227     static char a[] = "-a";
8228     static char foo[] = "foo";
8229     static char bar[] = "bar";
8230     char *argv[] = { program, a, foo, bar, NULL };
8231     int c;
8232
8233     optind = OPTIND_MIN;
8234     opterr = 0;
8235
8236     c = getopt (4, argv, "ab");
8237     if (!(c == 'a'))
8238       return 1;
8239     c = getopt (4, argv, "ab");
8240     if (!(c == -1))
8241       return 2;
8242     if (!(optind == 2))
8243       return 3;
8244   }
8245   /* Some internal state exists at this point.  */
8246   {
8247     static char program[] = "program";
8248     static char donald[] = "donald";
8249     static char p[] = "-p";
8250     static char billy[] = "billy";
8251     static char duck[] = "duck";
8252     static char a[] = "-a";
8253     static char bar[] = "bar";
8254     char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
8255     int c;
8256
8257     optind = OPTIND_MIN;
8258     opterr = 0;
8259
8260     c = getopt (7, argv, "+abp:q:");
8261     if (!(c == -1))
8262       return 4;
8263     if (!(strcmp (argv[0], "program") == 0))
8264       return 5;
8265     if (!(strcmp (argv[1], "donald") == 0))
8266       return 6;
8267     if (!(strcmp (argv[2], "-p") == 0))
8268       return 7;
8269     if (!(strcmp (argv[3], "billy") == 0))
8270       return 8;
8271     if (!(strcmp (argv[4], "duck") == 0))
8272       return 9;
8273     if (!(strcmp (argv[5], "-a") == 0))
8274       return 10;
8275     if (!(strcmp (argv[6], "bar") == 0))
8276       return 11;
8277     if (!(optind == 1))
8278       return 12;
8279   }
8280   /* Detect MacOS 10.5, AIX 7.1 bug.  */
8281   {
8282     static char program[] = "program";
8283     static char ab[] = "-ab";
8284     char *argv[3] = { program, ab, NULL };
8285     optind = OPTIND_MIN;
8286     opterr = 0;
8287     if (getopt (2, argv, "ab:") != 'a')
8288       return 13;
8289     if (getopt (2, argv, "ab:") != '?')
8290       return 14;
8291     if (optopt != 'b')
8292       return 15;
8293     if (optind != 2)
8294       return 16;
8295   }
8296
8297   return 0;
8298 }
8299
8300 _ACEOF
8301 if ac_fn_c_try_run "$LINENO"; then :
8302   gl_cv_func_getopt_posix=yes
8303 else
8304   gl_cv_func_getopt_posix=no
8305 fi
8306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8307   conftest.$ac_objext conftest.beam conftest.$ac_ext
8308 fi
8309
8310         CPPFLAGS=$gl_save_CPPFLAGS
8311
8312 fi
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
8314 $as_echo "$gl_cv_func_getopt_posix" >&6; }
8315     case "$gl_cv_func_getopt_posix" in
8316       *no) gl_replace_getopt=yes ;;
8317     esac
8318   fi
8319
8320   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
8321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
8322 $as_echo_n "checking for working GNU getopt function... " >&6; }
8323 if ${gl_cv_func_getopt_gnu+:} false; then :
8324   $as_echo_n "(cached) " >&6
8325 else
8326   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
8327        # optstring is necessary for programs like m4 that have POSIX-mandated
8328        # semantics for supporting options interspersed with files.
8329        # Also, since getopt_long is a GNU extension, we require optind=0.
8330        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
8331        # so take care to revert to the correct (non-)export state.
8332        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
8333        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
8334          xx) gl_had_POSIXLY_CORRECT=exported ;;
8335          x)  gl_had_POSIXLY_CORRECT=yes      ;;
8336          *)  gl_had_POSIXLY_CORRECT=         ;;
8337        esac
8338        POSIXLY_CORRECT=1
8339        export POSIXLY_CORRECT
8340        if test "$cross_compiling" = yes; then :
8341            case $host_os:$ac_cv_have_decl_optreset in
8342            *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
8343            *:yes)               gl_cv_func_getopt_gnu=no;;
8344            *)                   gl_cv_func_getopt_gnu=yes;;
8345          esac
8346
8347 else
8348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8349 /* end confdefs.h.  */
8350 #include <getopt.h>
8351                            #include <stddef.h>
8352                            #include <string.h>
8353
8354 #include <stdlib.h>
8355 #if defined __MACH__ && defined __APPLE__
8356 /* Avoid a crash on MacOS X.  */
8357 #include <mach/mach.h>
8358 #include <mach/mach_error.h>
8359 #include <mach/thread_status.h>
8360 #include <mach/exception.h>
8361 #include <mach/task.h>
8362 #include <pthread.h>
8363 /* The exception port on which our thread listens.  */
8364 static mach_port_t our_exception_port;
8365 /* The main function of the thread listening for exceptions of type
8366    EXC_BAD_ACCESS.  */
8367 static void *
8368 mach_exception_thread (void *arg)
8369 {
8370   /* Buffer for a message to be received.  */
8371   struct {
8372     mach_msg_header_t head;
8373     mach_msg_body_t msgh_body;
8374     char data[1024];
8375   } msg;
8376   mach_msg_return_t retval;
8377   /* Wait for a message on the exception port.  */
8378   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8379                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8380   if (retval != MACH_MSG_SUCCESS)
8381     abort ();
8382   exit (1);
8383 }
8384 static void
8385 nocrash_init (void)
8386 {
8387   mach_port_t self = mach_task_self ();
8388   /* Allocate a port on which the thread shall listen for exceptions.  */
8389   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8390       == KERN_SUCCESS) {
8391     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
8392     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8393                                 MACH_MSG_TYPE_MAKE_SEND)
8394         == KERN_SUCCESS) {
8395       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
8396          for us.  */
8397       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8398       /* Create the thread listening on the exception port.  */
8399       pthread_attr_t attr;
8400       pthread_t thread;
8401       if (pthread_attr_init (&attr) == 0
8402           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8403           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8404         pthread_attr_destroy (&attr);
8405         /* Replace the exception port info for these exceptions with our own.
8406            Note that we replace the exception port for the entire task, not only
8407            for a particular thread.  This has the effect that when our exception
8408            port gets the message, the thread specific exception port has already
8409            been asked, and we don't need to bother about it.
8410            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
8411         task_set_exception_ports (self, mask, our_exception_port,
8412                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8413       }
8414     }
8415   }
8416 }
8417 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8418 /* Avoid a crash on native Windows.  */
8419 #define WIN32_LEAN_AND_MEAN
8420 #include <windows.h>
8421 #include <winerror.h>
8422 static LONG WINAPI
8423 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8424 {
8425   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8426     {
8427     case EXCEPTION_ACCESS_VIOLATION:
8428     case EXCEPTION_IN_PAGE_ERROR:
8429     case EXCEPTION_STACK_OVERFLOW:
8430     case EXCEPTION_GUARD_PAGE:
8431     case EXCEPTION_PRIV_INSTRUCTION:
8432     case EXCEPTION_ILLEGAL_INSTRUCTION:
8433     case EXCEPTION_DATATYPE_MISALIGNMENT:
8434     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8435     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8436       exit (1);
8437     }
8438   return EXCEPTION_CONTINUE_SEARCH;
8439 }
8440 static void
8441 nocrash_init (void)
8442 {
8443   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8444 }
8445 #else
8446 /* Avoid a crash on POSIX systems.  */
8447 #include <signal.h>
8448 /* A POSIX signal handler.  */
8449 static void
8450 exception_handler (int sig)
8451 {
8452   exit (1);
8453 }
8454 static void
8455 nocrash_init (void)
8456 {
8457 #ifdef SIGSEGV
8458   signal (SIGSEGV, exception_handler);
8459 #endif
8460 #ifdef SIGBUS
8461   signal (SIGBUS, exception_handler);
8462 #endif
8463 }
8464 #endif
8465
8466
8467 int
8468 main ()
8469 {
8470
8471              int result = 0;
8472
8473              nocrash_init();
8474
8475              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
8476                 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
8477                 OSF/1 5.1, Solaris 10.  */
8478              {
8479                static char conftest[] = "conftest";
8480                static char plus[] = "-+";
8481                char *argv[3] = { conftest, plus, NULL };
8482                opterr = 0;
8483                if (getopt (2, argv, "+a") != '?')
8484                  result |= 1;
8485              }
8486              /* This code succeeds on glibc 2.8, mingw,
8487                 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
8488                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
8489              {
8490                static char program[] = "program";
8491                static char p[] = "-p";
8492                static char foo[] = "foo";
8493                static char bar[] = "bar";
8494                char *argv[] = { program, p, foo, bar, NULL };
8495
8496                optind = 1;
8497                if (getopt (4, argv, "p::") != 'p')
8498                  result |= 2;
8499                else if (optarg != NULL)
8500                  result |= 4;
8501                else if (getopt (4, argv, "p::") != -1)
8502                  result |= 6;
8503                else if (optind != 2)
8504                  result |= 8;
8505              }
8506              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
8507              {
8508                static char program[] = "program";
8509                static char foo[] = "foo";
8510                static char p[] = "-p";
8511                char *argv[] = { program, foo, p, NULL };
8512                optind = 0;
8513                if (getopt (3, argv, "-p") != 1)
8514                  result |= 16;
8515                else if (getopt (3, argv, "-p") != 'p')
8516                  result |= 32;
8517              }
8518              /* This code fails on glibc 2.11.  */
8519              {
8520                static char program[] = "program";
8521                static char b[] = "-b";
8522                static char a[] = "-a";
8523                char *argv[] = { program, b, a, NULL };
8524                optind = opterr = 0;
8525                if (getopt (3, argv, "+:a:b") != 'b')
8526                  result |= 64;
8527                else if (getopt (3, argv, "+:a:b") != ':')
8528                  result |= 64;
8529              }
8530              /* This code dumps core on glibc 2.14.  */
8531              {
8532                static char program[] = "program";
8533                static char w[] = "-W";
8534                static char dummy[] = "dummy";
8535                char *argv[] = { program, w, dummy, NULL };
8536                optind = opterr = 1;
8537                if (getopt (3, argv, "W;") != 'W')
8538                  result |= 128;
8539              }
8540              return result;
8541
8542   ;
8543   return 0;
8544 }
8545 _ACEOF
8546 if ac_fn_c_try_run "$LINENO"; then :
8547   gl_cv_func_getopt_gnu=yes
8548 else
8549   gl_cv_func_getopt_gnu=no
8550 fi
8551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8552   conftest.$ac_objext conftest.beam conftest.$ac_ext
8553 fi
8554
8555        case $gl_had_POSIXLY_CORRECT in
8556          exported) ;;
8557          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
8558          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
8559        esac
8560
8561 fi
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
8563 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
8564     if test "$gl_cv_func_getopt_gnu" = "no"; then
8565       gl_replace_getopt=yes
8566     fi
8567   fi
8568
8569
8570
8571
8572
8573     REPLACE_GETOPT=0
8574
8575
8576   if test -n "$gl_replace_getopt"; then :
8577
8578       REPLACE_GETOPT=1
8579
8580 fi
8581
8582
8583   if test $REPLACE_GETOPT = 1; then
8584
8585   GETOPT_H=getopt.h
8586
8587 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
8588
8589
8590
8591   fi
8592
8593 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
8594 if test "x$ac_cv_have_decl_getenv" = xyes; then :
8595   ac_have_decl=1
8596 else
8597   ac_have_decl=0
8598 fi
8599
8600 cat >>confdefs.h <<_ACEOF
8601 #define HAVE_DECL_GETENV $ac_have_decl
8602 _ACEOF
8603
8604
8605
8606
8607
8608
8609
8610
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8612 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8613 if ${ac_cv_c_restrict+:} false; then :
8614   $as_echo_n "(cached) " >&6
8615 else
8616   ac_cv_c_restrict=no
8617    # The order here caters to the fact that C++ does not require restrict.
8618    for ac_kw in __restrict __restrict__ _Restrict restrict; do
8619      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620 /* end confdefs.h.  */
8621 typedef int * int_ptr;
8622         int foo (int_ptr $ac_kw ip) {
8623         return ip[0];
8624        }
8625 int
8626 main ()
8627 {
8628 int s[1];
8629         int * $ac_kw t = s;
8630         t[0] = 0;
8631         return foo(t)
8632   ;
8633   return 0;
8634 }
8635 _ACEOF
8636 if ac_fn_c_try_compile "$LINENO"; then :
8637   ac_cv_c_restrict=$ac_kw
8638 fi
8639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8640      test "$ac_cv_c_restrict" != no && break
8641    done
8642
8643 fi
8644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8645 $as_echo "$ac_cv_c_restrict" >&6; }
8646
8647  case $ac_cv_c_restrict in
8648    restrict) ;;
8649    no) $as_echo "#define restrict /**/" >>confdefs.h
8650  ;;
8651    *)  cat >>confdefs.h <<_ACEOF
8652 #define restrict $ac_cv_c_restrict
8653 _ACEOF
8654  ;;
8655  esac
8656
8657
8658   GNULIB_GETTIMEOFDAY=0;
8659     HAVE_GETTIMEOFDAY=1;
8660   HAVE_STRUCT_TIMEVAL=1;
8661   HAVE_SYS_TIME_H=1;
8662   REPLACE_GETTIMEOFDAY=0;
8663   REPLACE_STRUCT_TIMEVAL=0;
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680      if test $gl_cv_have_include_next = yes; then
8681        gl_cv_next_sys_time_h='<'sys/time.h'>'
8682      else
8683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
8684 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
8685 if ${gl_cv_next_sys_time_h+:} false; then :
8686   $as_echo_n "(cached) " >&6
8687 else
8688
8689              if test $ac_cv_header_sys_time_h = yes; then
8690
8691
8692                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8693 /* end confdefs.h.  */
8694 #include <sys/time.h>
8695
8696 _ACEOF
8697                                                                                                                         case "$host_os" in
8698                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
8699                  *)    gl_absname_cpp="$ac_cpp" ;;
8700                esac
8701
8702                case "$host_os" in
8703                  mingw*)
8704                                                                                                                                      gl_dirsep_regex='[/\\]'
8705                    ;;
8706                  *)
8707                    gl_dirsep_regex='\/'
8708                    ;;
8709                esac
8710                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8711
8712                gl_header_literal_regex=`echo 'sys/time.h' \
8713                                         | sed -e "$gl_make_literal_regex_sed"`
8714                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8715                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8716                    s|^/[^/]|//&|
8717                    p
8718                    q
8719                  }'
8720                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8721                       sed -n "$gl_absolute_header_sed"`'"'
8722           else
8723                gl_cv_next_sys_time_h='<'sys/time.h'>'
8724              fi
8725
8726
8727 fi
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
8729 $as_echo "$gl_cv_next_sys_time_h" >&6; }
8730      fi
8731      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
8732
8733      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8734        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8735        gl_next_as_first_directive='<'sys/time.h'>'
8736      else
8737        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8738        gl_next_as_first_directive=$gl_cv_next_sys_time_h
8739      fi
8740      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
8741
8742
8743
8744
8745
8746   if test $ac_cv_header_sys_time_h != yes; then
8747     HAVE_SYS_TIME_H=0
8748   fi
8749
8750
8751
8752
8753
8754   if test $ac_cv_header_sys_socket_h != yes; then
8755                     for ac_header in winsock2.h
8756 do :
8757   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
8758 if test "x$ac_cv_header_winsock2_h" = xyes; then :
8759   cat >>confdefs.h <<_ACEOF
8760 #define HAVE_WINSOCK2_H 1
8761 _ACEOF
8762
8763 fi
8764
8765 done
8766
8767   fi
8768   if test "$ac_cv_header_winsock2_h" = yes; then
8769     HAVE_WINSOCK2_H=1
8770     UNISTD_H_HAVE_WINSOCK2_H=1
8771     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
8772   else
8773     HAVE_WINSOCK2_H=0
8774   fi
8775
8776
8777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8778 $as_echo_n "checking for struct timeval... " >&6; }
8779 if ${gl_cv_sys_struct_timeval+:} false; then :
8780   $as_echo_n "(cached) " >&6
8781 else
8782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8783 /* end confdefs.h.  */
8784 #if HAVE_SYS_TIME_H
8785              #include <sys/time.h>
8786             #endif
8787             #include <time.h>
8788             #if HAVE_WINSOCK2_H
8789             # include <winsock2.h>
8790             #endif
8791
8792 int
8793 main ()
8794 {
8795 static struct timeval x; x.tv_sec = x.tv_usec;
8796   ;
8797   return 0;
8798 }
8799 _ACEOF
8800 if ac_fn_c_try_compile "$LINENO"; then :
8801   gl_cv_sys_struct_timeval=yes
8802 else
8803   gl_cv_sys_struct_timeval=no
8804 fi
8805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8806
8807 fi
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
8809 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
8810   if test $gl_cv_sys_struct_timeval != yes; then
8811     HAVE_STRUCT_TIMEVAL=0
8812   else
8813                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct struct timeval.tv_sec member" >&5
8814 $as_echo_n "checking for correct struct timeval.tv_sec member... " >&6; }
8815 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8816   $as_echo_n "(cached) " >&6
8817 else
8818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8819 /* end confdefs.h.  */
8820 #if HAVE_SYS_TIME_H
8821                #include <sys/time.h>
8822               #endif
8823               #include <time.h>
8824               #if HAVE_WINSOCK2_H
8825               # include <winsock2.h>
8826               #endif
8827
8828 int
8829 main ()
8830 {
8831 static struct timeval x;
8832               typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1];
8833
8834   ;
8835   return 0;
8836 }
8837 _ACEOF
8838 if ac_fn_c_try_compile "$LINENO"; then :
8839   gl_cv_sys_struct_timeval_tv_sec=yes
8840 else
8841   gl_cv_sys_struct_timeval_tv_sec=no
8842 fi
8843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8844
8845 fi
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
8847 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
8848     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
8849       REPLACE_STRUCT_TIMEVAL=1
8850     fi
8851   fi
8852
8853
8854     for gl_func in gettimeofday; do
8855     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8857 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8858 if eval \${$as_gl_Symbol+:} false; then :
8859   $as_echo_n "(cached) " >&6
8860 else
8861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862 /* end confdefs.h.  */
8863
8864 #if HAVE_SYS_TIME_H
8865 # include <sys/time.h>
8866 #endif
8867 #include <time.h>
8868
8869 int
8870 main ()
8871 {
8872 #undef $gl_func
8873   (void) $gl_func;
8874   ;
8875   return 0;
8876 }
8877 _ACEOF
8878 if ac_fn_c_try_compile "$LINENO"; then :
8879   eval "$as_gl_Symbol=yes"
8880 else
8881   eval "$as_gl_Symbol=no"
8882 fi
8883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8884 fi
8885 eval ac_res=\$$as_gl_Symbol
8886                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8887 $as_echo "$ac_res" >&6; }
8888     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8889   cat >>confdefs.h <<_ACEOF
8890 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8891 _ACEOF
8892
8893                      eval ac_cv_have_decl_$gl_func=yes
8894 fi
8895       done
8896
8897
8898
8899
8900
8901
8902
8903
8904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8905 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8906 if ${am_cv_langinfo_codeset+:} false; then :
8907   $as_echo_n "(cached) " >&6
8908 else
8909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8910 /* end confdefs.h.  */
8911 #include <langinfo.h>
8912 int
8913 main ()
8914 {
8915 char* cs = nl_langinfo(CODESET); return !cs;
8916   ;
8917   return 0;
8918 }
8919 _ACEOF
8920 if ac_fn_c_try_link "$LINENO"; then :
8921   am_cv_langinfo_codeset=yes
8922 else
8923   am_cv_langinfo_codeset=no
8924 fi
8925 rm -f core conftest.err conftest.$ac_objext \
8926     conftest$ac_exeext conftest.$ac_ext
8927
8928 fi
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8930 $as_echo "$am_cv_langinfo_codeset" >&6; }
8931   if test $am_cv_langinfo_codeset = yes; then
8932
8933 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8934
8935   fi
8936
8937 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8938 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8939   ac_have_decl=1
8940 else
8941   ac_have_decl=0
8942 fi
8943
8944 cat >>confdefs.h <<_ACEOF
8945 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8946 _ACEOF
8947
8948
8949     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
8950 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
8951 if ${ac_cv_gnu_library_2_1+:} false; then :
8952   $as_echo_n "(cached) " >&6
8953 else
8954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8955 /* end confdefs.h.  */
8956
8957 #include <features.h>
8958 #ifdef __GNU_LIBRARY__
8959  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
8960   Lucky GNU user
8961  #endif
8962 #endif
8963 #ifdef __UCLIBC__
8964  Lucky user
8965 #endif
8966
8967 _ACEOF
8968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8969   $EGREP "Lucky" >/dev/null 2>&1; then :
8970   ac_cv_gnu_library_2_1=yes
8971 else
8972   ac_cv_gnu_library_2_1=no
8973 fi
8974 rm -f conftest*
8975
8976
8977
8978 fi
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
8980 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
8981
8982     GLIBC21="$ac_cv_gnu_library_2_1"
8983
8984
8985
8986
8987
8988       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8989 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8990 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
8991   $as_echo_n "(cached) " >&6
8992 else
8993   rm -f conftest.sym conftest.file
8994      echo >conftest.file
8995      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
8996        if test "$cross_compiling" = yes; then :
8997   # When cross-compiling, be pessimistic so we will end up using the
8998           # replacement version of lstat that checks for trailing slashes and
8999           # calls lstat a second time when necessary.
9000           gl_cv_func_lstat_dereferences_slashed_symlink=no
9001
9002 else
9003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9004 /* end confdefs.h.  */
9005 $ac_includes_default
9006 int
9007 main ()
9008 {
9009 struct stat sbuf;
9010               /* Linux will dereference the symlink and fail, as required by
9011                  POSIX.  That is better in the sense that it means we will not
9012                  have to compile and use the lstat wrapper.  */
9013               return lstat ("conftest.sym/", &sbuf) == 0;
9014
9015   ;
9016   return 0;
9017 }
9018 _ACEOF
9019 if ac_fn_c_try_run "$LINENO"; then :
9020   gl_cv_func_lstat_dereferences_slashed_symlink=yes
9021 else
9022   gl_cv_func_lstat_dereferences_slashed_symlink=no
9023 fi
9024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9025   conftest.$ac_objext conftest.beam conftest.$ac_ext
9026 fi
9027
9028      else
9029        # If the 'ln -s' command failed, then we probably don't even
9030        # have an lstat function.
9031        gl_cv_func_lstat_dereferences_slashed_symlink=no
9032      fi
9033      rm -f conftest.sym conftest.file
9034
9035 fi
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9037 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9038   test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
9039
9040 cat >>confdefs.h <<_ACEOF
9041 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9042 _ACEOF
9043
9044
9045
9046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
9047 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
9048 if ${gl_cv_func_malloc_posix+:} false; then :
9049   $as_echo_n "(cached) " >&6
9050 else
9051
9052                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9053 /* end confdefs.h.  */
9054
9055 int
9056 main ()
9057 {
9058 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9059              choke me
9060              #endif
9061
9062   ;
9063   return 0;
9064 }
9065 _ACEOF
9066 if ac_fn_c_try_compile "$LINENO"; then :
9067   gl_cv_func_malloc_posix=yes
9068 else
9069   gl_cv_func_malloc_posix=no
9070 fi
9071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9072
9073 fi
9074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
9075 $as_echo "$gl_cv_func_malloc_posix" >&6; }
9076
9077
9078   for ac_header in stdlib.h
9079 do :
9080   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
9081 if test "x$ac_cv_header_stdlib_h" = xyes; then :
9082   cat >>confdefs.h <<_ACEOF
9083 #define HAVE_STDLIB_H 1
9084 _ACEOF
9085
9086 fi
9087
9088 done
9089
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
9091 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
9092 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
9093   $as_echo_n "(cached) " >&6
9094 else
9095   if test "$cross_compiling" = yes; then :
9096   ac_cv_func_malloc_0_nonnull=no
9097 else
9098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9099 /* end confdefs.h.  */
9100 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
9101 # include <stdlib.h>
9102 #else
9103 char *malloc ();
9104 #endif
9105
9106 int
9107 main ()
9108 {
9109 return ! malloc (0);
9110   ;
9111   return 0;
9112 }
9113 _ACEOF
9114 if ac_fn_c_try_run "$LINENO"; then :
9115   ac_cv_func_malloc_0_nonnull=yes
9116 else
9117   ac_cv_func_malloc_0_nonnull=no
9118 fi
9119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9120   conftest.$ac_objext conftest.beam conftest.$ac_ext
9121 fi
9122
9123 fi
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
9125 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
9126 if test $ac_cv_func_malloc_0_nonnull = yes; then :
9127   gl_cv_func_malloc_0_nonnull=1
9128 else
9129   gl_cv_func_malloc_0_nonnull=0
9130 fi
9131
9132
9133 cat >>confdefs.h <<_ACEOF
9134 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
9135 _ACEOF
9136
9137
9138
9139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9140 $as_echo_n "checking for unsigned long long int... " >&6; }
9141 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
9142   $as_echo_n "(cached) " >&6
9143 else
9144   ac_cv_type_unsigned_long_long_int=yes
9145      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9146        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9147 /* end confdefs.h.  */
9148
9149   /* For now, do not test the preprocessor; as of 2007 there are too many
9150          implementations with broken preprocessors.  Perhaps this can
9151          be revisited in 2012.  In the meantime, code should not expect
9152          #if to work with literals wider than 32 bits.  */
9153       /* Test literals.  */
9154       long long int ll = 9223372036854775807ll;
9155       long long int nll = -9223372036854775807LL;
9156       unsigned long long int ull = 18446744073709551615ULL;
9157       /* Test constant expressions.   */
9158       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9159                      ? 1 : -1)];
9160       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9161                      ? 1 : -1)];
9162       int i = 63;
9163 int
9164 main ()
9165 {
9166 /* Test availability of runtime routines for shift and division.  */
9167       long long int llmax = 9223372036854775807ll;
9168       unsigned long long int ullmax = 18446744073709551615ull;
9169       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9170               | (llmax / ll) | (llmax % ll)
9171               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9172               | (ullmax / ull) | (ullmax % ull));
9173   ;
9174   return 0;
9175 }
9176
9177 _ACEOF
9178 if ac_fn_c_try_link "$LINENO"; then :
9179
9180 else
9181   ac_cv_type_unsigned_long_long_int=no
9182 fi
9183 rm -f core conftest.err conftest.$ac_objext \
9184     conftest$ac_exeext conftest.$ac_ext
9185      fi
9186 fi
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9188 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9189   if test $ac_cv_type_unsigned_long_long_int = yes; then
9190
9191 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9192
9193   fi
9194
9195
9196
9197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9198 $as_echo_n "checking for long long int... " >&6; }
9199 if ${ac_cv_type_long_long_int+:} false; then :
9200   $as_echo_n "(cached) " >&6
9201 else
9202   ac_cv_type_long_long_int=yes
9203       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9204         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9205         if test $ac_cv_type_long_long_int = yes; then
9206                                         if test "$cross_compiling" = yes; then :
9207   :
9208 else
9209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9210 /* end confdefs.h.  */
9211 #include <limits.h>
9212                  #ifndef LLONG_MAX
9213                  # define HALF \
9214                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9215                  # define LLONG_MAX (HALF - 1 + HALF)
9216                  #endif
9217 int
9218 main ()
9219 {
9220 long long int n = 1;
9221                  int i;
9222                  for (i = 0; ; i++)
9223                    {
9224                      long long int m = n << i;
9225                      if (m >> i != n)
9226                        return 1;
9227                      if (LLONG_MAX / 2 < m)
9228                        break;
9229                    }
9230                  return 0;
9231   ;
9232   return 0;
9233 }
9234 _ACEOF
9235 if ac_fn_c_try_run "$LINENO"; then :
9236
9237 else
9238   ac_cv_type_long_long_int=no
9239 fi
9240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9241   conftest.$ac_objext conftest.beam conftest.$ac_ext
9242 fi
9243
9244         fi
9245       fi
9246 fi
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9248 $as_echo "$ac_cv_type_long_long_int" >&6; }
9249   if test $ac_cv_type_long_long_int = yes; then
9250
9251 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9252
9253   fi
9254
9255
9256   GNULIB_BTOWC=0;
9257   GNULIB_WCTOB=0;
9258   GNULIB_MBSINIT=0;
9259   GNULIB_MBRTOWC=0;
9260   GNULIB_MBRLEN=0;
9261   GNULIB_MBSRTOWCS=0;
9262   GNULIB_MBSNRTOWCS=0;
9263   GNULIB_WCRTOMB=0;
9264   GNULIB_WCSRTOMBS=0;
9265   GNULIB_WCSNRTOMBS=0;
9266   GNULIB_WCWIDTH=0;
9267   GNULIB_WMEMCHR=0;
9268   GNULIB_WMEMCMP=0;
9269   GNULIB_WMEMCPY=0;
9270   GNULIB_WMEMMOVE=0;
9271   GNULIB_WMEMSET=0;
9272   GNULIB_WCSLEN=0;
9273   GNULIB_WCSNLEN=0;
9274   GNULIB_WCSCPY=0;
9275   GNULIB_WCPCPY=0;
9276   GNULIB_WCSNCPY=0;
9277   GNULIB_WCPNCPY=0;
9278   GNULIB_WCSCAT=0;
9279   GNULIB_WCSNCAT=0;
9280   GNULIB_WCSCMP=0;
9281   GNULIB_WCSNCMP=0;
9282   GNULIB_WCSCASECMP=0;
9283   GNULIB_WCSNCASECMP=0;
9284   GNULIB_WCSCOLL=0;
9285   GNULIB_WCSXFRM=0;
9286   GNULIB_WCSDUP=0;
9287   GNULIB_WCSCHR=0;
9288   GNULIB_WCSRCHR=0;
9289   GNULIB_WCSCSPN=0;
9290   GNULIB_WCSSPN=0;
9291   GNULIB_WCSPBRK=0;
9292   GNULIB_WCSSTR=0;
9293   GNULIB_WCSTOK=0;
9294   GNULIB_WCSWIDTH=0;
9295     HAVE_BTOWC=1;
9296   HAVE_MBSINIT=1;
9297   HAVE_MBRTOWC=1;
9298   HAVE_MBRLEN=1;
9299   HAVE_MBSRTOWCS=1;
9300   HAVE_MBSNRTOWCS=1;
9301   HAVE_WCRTOMB=1;
9302   HAVE_WCSRTOMBS=1;
9303   HAVE_WCSNRTOMBS=1;
9304   HAVE_WMEMCHR=1;
9305   HAVE_WMEMCMP=1;
9306   HAVE_WMEMCPY=1;
9307   HAVE_WMEMMOVE=1;
9308   HAVE_WMEMSET=1;
9309   HAVE_WCSLEN=1;
9310   HAVE_WCSNLEN=1;
9311   HAVE_WCSCPY=1;
9312   HAVE_WCPCPY=1;
9313   HAVE_WCSNCPY=1;
9314   HAVE_WCPNCPY=1;
9315   HAVE_WCSCAT=1;
9316   HAVE_WCSNCAT=1;
9317   HAVE_WCSCMP=1;
9318   HAVE_WCSNCMP=1;
9319   HAVE_WCSCASECMP=1;
9320   HAVE_WCSNCASECMP=1;
9321   HAVE_WCSCOLL=1;
9322   HAVE_WCSXFRM=1;
9323   HAVE_WCSDUP=1;
9324   HAVE_WCSCHR=1;
9325   HAVE_WCSRCHR=1;
9326   HAVE_WCSCSPN=1;
9327   HAVE_WCSSPN=1;
9328   HAVE_WCSPBRK=1;
9329   HAVE_WCSSTR=1;
9330   HAVE_WCSTOK=1;
9331   HAVE_WCSWIDTH=1;
9332   HAVE_DECL_WCTOB=1;
9333   HAVE_DECL_WCWIDTH=1;
9334   REPLACE_MBSTATE_T=0;
9335   REPLACE_BTOWC=0;
9336   REPLACE_WCTOB=0;
9337   REPLACE_MBSINIT=0;
9338   REPLACE_MBRTOWC=0;
9339   REPLACE_MBRLEN=0;
9340   REPLACE_MBSRTOWCS=0;
9341   REPLACE_MBSNRTOWCS=0;
9342   REPLACE_WCRTOMB=0;
9343   REPLACE_WCSRTOMBS=0;
9344   REPLACE_WCSNRTOMBS=0;
9345   REPLACE_WCWIDTH=0;
9346   REPLACE_WCSWIDTH=0;
9347
9348
9349
9350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9351 $as_echo_n "checking for mbstate_t... " >&6; }
9352 if ${ac_cv_type_mbstate_t+:} false; then :
9353   $as_echo_n "(cached) " >&6
9354 else
9355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9356 /* end confdefs.h.  */
9357 $ac_includes_default
9358 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9359    <wchar.h>.
9360    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9361    included before <wchar.h>.  */
9362 #include <stddef.h>
9363 #include <stdio.h>
9364 #include <time.h>
9365 #include <wchar.h>
9366 int
9367 main ()
9368 {
9369 mbstate_t x; return sizeof x;
9370   ;
9371   return 0;
9372 }
9373 _ACEOF
9374 if ac_fn_c_try_compile "$LINENO"; then :
9375   ac_cv_type_mbstate_t=yes
9376 else
9377   ac_cv_type_mbstate_t=no
9378 fi
9379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9380 fi
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9382 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9383    if test $ac_cv_type_mbstate_t = yes; then
9384
9385 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9386
9387    else
9388
9389 $as_echo "#define mbstate_t int" >>confdefs.h
9390
9391    fi
9392
9393
9394
9395
9396
9397
9398
9399
9400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
9401 $as_echo_n "checking for a traditional japanese locale... " >&6; }
9402 if ${gt_cv_locale_ja+:} false; then :
9403   $as_echo_n "(cached) " >&6
9404 else
9405
9406     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9407 /* end confdefs.h.  */
9408
9409 #include <locale.h>
9410 #include <time.h>
9411 #if HAVE_LANGINFO_CODESET
9412 # include <langinfo.h>
9413 #endif
9414 #include <stdlib.h>
9415 #include <string.h>
9416 struct tm t;
9417 char buf[16];
9418 int main ()
9419 {
9420   const char *p;
9421   /* Check whether the given locale name is recognized by the system.  */
9422 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9423   /* On native Windows, setlocale(category, "") looks at the system settings,
9424      not at the environment variables.  Also, when an encoding suffix such
9425      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9426      category of the locale to "C".  */
9427   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9428       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9429     return 1;
9430 #else
9431   if (setlocale (LC_ALL, "") == NULL) return 1;
9432 #endif
9433   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9434      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9435      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9436      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9437      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9438      some unit tests fail.
9439      On MirBSD 10, when an unsupported locale is specified, setlocale()
9440      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
9441 #if HAVE_LANGINFO_CODESET
9442   {
9443     const char *cs = nl_langinfo (CODESET);
9444     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9445         || strcmp (cs, "UTF-8") == 0)
9446       return 1;
9447   }
9448 #endif
9449 #ifdef __CYGWIN__
9450   /* On Cygwin, avoid locale names without encoding suffix, because the
9451      locale_charset() function relies on the encoding suffix.  Note that
9452      LC_ALL is set on the command line.  */
9453   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9454 #endif
9455   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
9456      on Cygwin 1.5.x.  */
9457   if (MB_CUR_MAX == 1)
9458     return 1;
9459   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
9460      This excludes the UTF-8 encoding (except on MirBSD).  */
9461   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9462   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
9463   for (p = buf; *p != '\0'; p++)
9464     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
9465       return 1;
9466   return 0;
9467 }
9468
9469 _ACEOF
9470     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9471   (eval $ac_link) 2>&5
9472   ac_status=$?
9473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9474   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9475       case "$host_os" in
9476         # Handle native Windows specially, because there setlocale() interprets
9477         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9478         # "fr" or "fra" as "French" or "French_France.1252",
9479         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9480         # "ja" as "Japanese" or "Japanese_Japan.932",
9481         # and similar.
9482         mingw*)
9483           # Note that on native Windows, the Japanese locale is
9484           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
9485           # cannot use it here.
9486           gt_cv_locale_ja=none
9487           ;;
9488         *)
9489           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9490           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
9491           # configure script would override the LC_ALL setting. Likewise for
9492           # LC_CTYPE, which is also set at the beginning of the configure script.
9493           # Test for the AIX locale name.
9494           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9495             gt_cv_locale_ja=ja_JP
9496           else
9497             # Test for the locale name with explicit encoding suffix.
9498             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9499               gt_cv_locale_ja=ja_JP.EUC-JP
9500             else
9501               # Test for the HP-UX, OSF/1, NetBSD locale name.
9502               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9503                 gt_cv_locale_ja=ja_JP.eucJP
9504               else
9505                 # Test for the IRIX, FreeBSD locale name.
9506                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9507                   gt_cv_locale_ja=ja_JP.EUC
9508                 else
9509                   # Test for the Solaris 7 locale name.
9510                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9511                     gt_cv_locale_ja=ja
9512                   else
9513                     # Special test for NetBSD 1.6.
9514                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
9515                       gt_cv_locale_ja=ja_JP.eucJP
9516                     else
9517                       # None found.
9518                       gt_cv_locale_ja=none
9519                     fi
9520                   fi
9521                 fi
9522               fi
9523             fi
9524           fi
9525           ;;
9526       esac
9527     fi
9528     rm -fr conftest*
9529
9530 fi
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
9532 $as_echo "$gt_cv_locale_ja" >&6; }
9533   LOCALE_JA=$gt_cv_locale_ja
9534
9535
9536
9537
9538
9539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
9540 $as_echo_n "checking for a transitional chinese locale... " >&6; }
9541 if ${gt_cv_locale_zh_CN+:} false; then :
9542   $as_echo_n "(cached) " >&6
9543 else
9544
9545     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9546 /* end confdefs.h.  */
9547
9548 #include <locale.h>
9549 #include <stdlib.h>
9550 #include <time.h>
9551 #if HAVE_LANGINFO_CODESET
9552 # include <langinfo.h>
9553 #endif
9554 #include <stdlib.h>
9555 #include <string.h>
9556 struct tm t;
9557 char buf[16];
9558 int main ()
9559 {
9560   const char *p;
9561   /* Check whether the given locale name is recognized by the system.  */
9562 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9563   /* On native Windows, setlocale(category, "") looks at the system settings,
9564      not at the environment variables.  Also, when an encoding suffix such
9565      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9566      category of the locale to "C".  */
9567   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9568       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9569     return 1;
9570 #else
9571   if (setlocale (LC_ALL, "") == NULL) return 1;
9572 #endif
9573   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9574      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9575      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9576      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9577      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9578      some unit tests fail.
9579      On MirBSD 10, when an unsupported locale is specified, setlocale()
9580      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
9581 #if HAVE_LANGINFO_CODESET
9582   {
9583     const char *cs = nl_langinfo (CODESET);
9584     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9585         || strcmp (cs, "UTF-8") == 0)
9586       return 1;
9587   }
9588 #endif
9589 #ifdef __CYGWIN__
9590   /* On Cygwin, avoid locale names without encoding suffix, because the
9591      locale_charset() function relies on the encoding suffix.  Note that
9592      LC_ALL is set on the command line.  */
9593   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9594 #endif
9595   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
9596      This excludes the UTF-8 encoding (except on MirBSD).  */
9597   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9598   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
9599   for (p = buf; *p != '\0'; p++)
9600     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
9601       return 1;
9602   /* Check whether a typical GB18030 multibyte sequence is recognized as a
9603      single wide character.  This excludes the GB2312 and GBK encodings.  */
9604   if (mblen ("\203\062\332\066", 5) != 4)
9605     return 1;
9606   return 0;
9607 }
9608
9609 _ACEOF
9610     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9611   (eval $ac_link) 2>&5
9612   ac_status=$?
9613   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9614   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9615       case "$host_os" in
9616         # Handle native Windows specially, because there setlocale() interprets
9617         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9618         # "fr" or "fra" as "French" or "French_France.1252",
9619         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9620         # "ja" as "Japanese" or "Japanese_Japan.932",
9621         # and similar.
9622         mingw*)
9623           # Test for the hypothetical native Windows locale name.
9624           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9625             gt_cv_locale_zh_CN=Chinese_China.54936
9626           else
9627             # None found.
9628             gt_cv_locale_zh_CN=none
9629           fi
9630           ;;
9631         solaris2.8)
9632           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
9633           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
9634           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
9635           gt_cv_locale_zh_CN=none
9636           ;;
9637         *)
9638           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9639           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
9640           # configure script would override the LC_ALL setting. Likewise for
9641           # LC_CTYPE, which is also set at the beginning of the configure script.
9642           # Test for the locale name without encoding suffix.
9643           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9644             gt_cv_locale_zh_CN=zh_CN
9645           else
9646             # Test for the locale name with explicit encoding suffix.
9647             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9648               gt_cv_locale_zh_CN=zh_CN.GB18030
9649             else
9650               # None found.
9651               gt_cv_locale_zh_CN=none
9652             fi
9653           fi
9654           ;;
9655       esac
9656     else
9657       # If there was a link error, due to mblen(), the system is so old that
9658       # it certainly doesn't have a chinese locale.
9659       gt_cv_locale_zh_CN=none
9660     fi
9661     rm -fr conftest*
9662
9663 fi
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
9665 $as_echo "$gt_cv_locale_zh_CN" >&6; }
9666   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
9667
9668
9669
9670
9671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
9672 $as_echo_n "checking for a french Unicode locale... " >&6; }
9673 if ${gt_cv_locale_fr_utf8+:} false; then :
9674   $as_echo_n "(cached) " >&6
9675 else
9676
9677     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h.  */
9679
9680 #include <locale.h>
9681 #include <time.h>
9682 #if HAVE_LANGINFO_CODESET
9683 # include <langinfo.h>
9684 #endif
9685 #include <stdlib.h>
9686 #include <string.h>
9687 struct tm t;
9688 char buf[16];
9689 int main () {
9690   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
9691      imitates locale dependent behaviour by looking at the environment
9692      variables, and all locales use the UTF-8 encoding.  */
9693 #if !(defined __BEOS__ || defined __HAIKU__)
9694   /* Check whether the given locale name is recognized by the system.  */
9695 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9696   /* On native Windows, setlocale(category, "") looks at the system settings,
9697      not at the environment variables.  Also, when an encoding suffix such
9698      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9699      category of the locale to "C".  */
9700   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9701       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9702     return 1;
9703 # else
9704   if (setlocale (LC_ALL, "") == NULL) return 1;
9705 # endif
9706   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9707      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9708      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9709      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9710      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9711      some unit tests fail.  */
9712 # if HAVE_LANGINFO_CODESET
9713   {
9714     const char *cs = nl_langinfo (CODESET);
9715     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
9716       return 1;
9717   }
9718 # endif
9719 # ifdef __CYGWIN__
9720   /* On Cygwin, avoid locale names without encoding suffix, because the
9721      locale_charset() function relies on the encoding suffix.  Note that
9722      LC_ALL is set on the command line.  */
9723   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9724 # endif
9725   /* Check whether in the abbreviation of the second month, the second
9726      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
9727      two bytes long, with UTF-8 encoding.  */
9728   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9729   if (strftime (buf, sizeof (buf), "%b", &t) < 4
9730       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
9731     return 1;
9732 #endif
9733 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
9734   /* Check whether the decimal separator is a comma.
9735      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
9736      are nl_langinfo(RADIXCHAR) are both ".".  */
9737   if (localeconv () ->decimal_point[0] != ',') return 1;
9738 #endif
9739   return 0;
9740 }
9741
9742 _ACEOF
9743     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9744   (eval $ac_link) 2>&5
9745   ac_status=$?
9746   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9747   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9748       case "$host_os" in
9749         # Handle native Windows specially, because there setlocale() interprets
9750         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9751         # "fr" or "fra" as "French" or "French_France.1252",
9752         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9753         # "ja" as "Japanese" or "Japanese_Japan.932",
9754         # and similar.
9755         mingw*)
9756           # Test for the hypothetical native Windows locale name.
9757           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9758             gt_cv_locale_fr_utf8=French_France.65001
9759           else
9760             # None found.
9761             gt_cv_locale_fr_utf8=none
9762           fi
9763           ;;
9764         *)
9765           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9766           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
9767           # configure script would override the LC_ALL setting. Likewise for
9768           # LC_CTYPE, which is also set at the beginning of the configure script.
9769           # Test for the usual locale name.
9770           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9771             gt_cv_locale_fr_utf8=fr_FR
9772           else
9773             # Test for the locale name with explicit encoding suffix.
9774             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9775               gt_cv_locale_fr_utf8=fr_FR.UTF-8
9776             else
9777               # Test for the Solaris 7 locale name.
9778               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9779                 gt_cv_locale_fr_utf8=fr.UTF-8
9780               else
9781                 # None found.
9782                 gt_cv_locale_fr_utf8=none
9783               fi
9784             fi
9785           fi
9786           ;;
9787       esac
9788     fi
9789     rm -fr conftest*
9790
9791 fi
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
9793 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
9794   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
9795
9796
9797
9798
9799
9800
9801
9802   GNULIB_FFSL=0;
9803   GNULIB_FFSLL=0;
9804   GNULIB_MEMCHR=0;
9805   GNULIB_MEMMEM=0;
9806   GNULIB_MEMPCPY=0;
9807   GNULIB_MEMRCHR=0;
9808   GNULIB_RAWMEMCHR=0;
9809   GNULIB_STPCPY=0;
9810   GNULIB_STPNCPY=0;
9811   GNULIB_STRCHRNUL=0;
9812   GNULIB_STRDUP=0;
9813   GNULIB_STRNCAT=0;
9814   GNULIB_STRNDUP=0;
9815   GNULIB_STRNLEN=0;
9816   GNULIB_STRPBRK=0;
9817   GNULIB_STRSEP=0;
9818   GNULIB_STRSTR=0;
9819   GNULIB_STRCASESTR=0;
9820   GNULIB_STRTOK_R=0;
9821   GNULIB_MBSLEN=0;
9822   GNULIB_MBSNLEN=0;
9823   GNULIB_MBSCHR=0;
9824   GNULIB_MBSRCHR=0;
9825   GNULIB_MBSSTR=0;
9826   GNULIB_MBSCASECMP=0;
9827   GNULIB_MBSNCASECMP=0;
9828   GNULIB_MBSPCASECMP=0;
9829   GNULIB_MBSCASESTR=0;
9830   GNULIB_MBSCSPN=0;
9831   GNULIB_MBSPBRK=0;
9832   GNULIB_MBSSPN=0;
9833   GNULIB_MBSSEP=0;
9834   GNULIB_MBSTOK_R=0;
9835   GNULIB_STRERROR=0;
9836   GNULIB_STRERROR_R=0;
9837   GNULIB_STRSIGNAL=0;
9838   GNULIB_STRVERSCMP=0;
9839   HAVE_MBSLEN=0;
9840     HAVE_FFSL=1;
9841   HAVE_FFSLL=1;
9842   HAVE_MEMCHR=1;
9843   HAVE_DECL_MEMMEM=1;
9844   HAVE_MEMPCPY=1;
9845   HAVE_DECL_MEMRCHR=1;
9846   HAVE_RAWMEMCHR=1;
9847   HAVE_STPCPY=1;
9848   HAVE_STPNCPY=1;
9849   HAVE_STRCHRNUL=1;
9850   HAVE_DECL_STRDUP=1;
9851   HAVE_DECL_STRNDUP=1;
9852   HAVE_DECL_STRNLEN=1;
9853   HAVE_STRPBRK=1;
9854   HAVE_STRSEP=1;
9855   HAVE_STRCASESTR=1;
9856   HAVE_DECL_STRTOK_R=1;
9857   HAVE_DECL_STRERROR_R=1;
9858   HAVE_DECL_STRSIGNAL=1;
9859   HAVE_STRVERSCMP=1;
9860   REPLACE_MEMCHR=0;
9861   REPLACE_MEMMEM=0;
9862   REPLACE_STPNCPY=0;
9863   REPLACE_STRDUP=0;
9864   REPLACE_STRSTR=0;
9865   REPLACE_STRCASESTR=0;
9866   REPLACE_STRCHRNUL=0;
9867   REPLACE_STRERROR=0;
9868   REPLACE_STRERROR_R=0;
9869   REPLACE_STRNCAT=0;
9870   REPLACE_STRNDUP=0;
9871   REPLACE_STRNLEN=0;
9872   REPLACE_STRSIGNAL=0;
9873   REPLACE_STRTOK_R=0;
9874   UNDEFINE_STRTOK_R=0;
9875
9876
9877
9878
9879
9880   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
9881   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
9882   # irrelevant for anonymous mappings.
9883   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
9884 if test "x$ac_cv_func_mmap" = xyes; then :
9885   gl_have_mmap=yes
9886 else
9887   gl_have_mmap=no
9888 fi
9889
9890
9891   # Try to allow MAP_ANONYMOUS.
9892   gl_have_mmap_anonymous=no
9893   if test $gl_have_mmap = yes; then
9894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
9895 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
9896     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h.  */
9898
9899 #include <sys/mman.h>
9900 #ifdef MAP_ANONYMOUS
9901     I cant identify this map
9902 #endif
9903
9904 _ACEOF
9905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9906   $EGREP "I cant identify this map" >/dev/null 2>&1; then :
9907   gl_have_mmap_anonymous=yes
9908 fi
9909 rm -f conftest*
9910
9911     if test $gl_have_mmap_anonymous != yes; then
9912       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9913 /* end confdefs.h.  */
9914
9915 #include <sys/mman.h>
9916 #ifdef MAP_ANON
9917     I cant identify this map
9918 #endif
9919
9920 _ACEOF
9921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9922   $EGREP "I cant identify this map" >/dev/null 2>&1; then :
9923
9924 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
9925
9926          gl_have_mmap_anonymous=yes
9927 fi
9928 rm -f conftest*
9929
9930     fi
9931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
9932 $as_echo "$gl_have_mmap_anonymous" >&6; }
9933     if test $gl_have_mmap_anonymous = yes; then
9934
9935 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
9936
9937     fi
9938   fi
9939
9940
9941
9942
9943
9944
9945   if test $HAVE_MEMCHR = 1; then
9946     # Detect platform-specific bugs in some versions of glibc:
9947     # memchr should not dereference anything with length 0
9948     #   http://bugzilla.redhat.com/499689
9949     # memchr should not dereference overestimated length after a match
9950     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
9951     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
9952     # Assume that memchr works on platforms that lack mprotect.
9953     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
9954 $as_echo_n "checking whether memchr works... " >&6; }
9955 if ${gl_cv_func_memchr_works+:} false; then :
9956   $as_echo_n "(cached) " >&6
9957 else
9958   if test "$cross_compiling" = yes; then :
9959          gl_cv_func_memchr_works="guessing no"
9960 else
9961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9962 /* end confdefs.h.  */
9963
9964 #include <string.h>
9965 #if HAVE_SYS_MMAN_H
9966 # include <fcntl.h>
9967 # include <unistd.h>
9968 # include <sys/types.h>
9969 # include <sys/mman.h>
9970 # ifndef MAP_FILE
9971 #  define MAP_FILE 0
9972 # endif
9973 #endif
9974
9975 int
9976 main ()
9977 {
9978
9979   int result = 0;
9980   char *fence = NULL;
9981 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
9982 # if HAVE_MAP_ANONYMOUS
9983   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
9984   const int fd = -1;
9985 # else /* !HAVE_MAP_ANONYMOUS */
9986   const int flags = MAP_FILE | MAP_PRIVATE;
9987   int fd = open ("/dev/zero", O_RDONLY, 0666);
9988   if (fd >= 0)
9989 # endif
9990     {
9991       int pagesize = getpagesize ();
9992       char *two_pages =
9993         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
9994                        flags, fd, 0);
9995       if (two_pages != (char *)(-1)
9996           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
9997         fence = two_pages + pagesize;
9998     }
9999 #endif
10000   if (fence)
10001     {
10002       if (memchr (fence, 0, 0))
10003         result |= 1;
10004       strcpy (fence - 9, "12345678");
10005       if (memchr (fence - 9, 0, 79) != fence - 1)
10006         result |= 2;
10007       if (memchr (fence - 1, 0, 3) != fence - 1)
10008         result |= 4;
10009     }
10010   return result;
10011
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 if ac_fn_c_try_run "$LINENO"; then :
10017   gl_cv_func_memchr_works=yes
10018 else
10019   gl_cv_func_memchr_works=no
10020 fi
10021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10022   conftest.$ac_objext conftest.beam conftest.$ac_ext
10023 fi
10024
10025 fi
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
10027 $as_echo "$gl_cv_func_memchr_works" >&6; }
10028     if test "$gl_cv_func_memchr_works" != yes; then
10029       REPLACE_MEMCHR=1
10030     fi
10031   fi
10032
10033
10034
10035
10036
10037   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
10038 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
10039 if ${gl_cv_minmax_in_limits_h+:} false; then :
10040   $as_echo_n "(cached) " >&6
10041 else
10042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10043 /* end confdefs.h.  */
10044 #include <limits.h>
10045             int x = MIN (42, 17);
10046 int
10047 main ()
10048 {
10049
10050   ;
10051   return 0;
10052 }
10053 _ACEOF
10054 if ac_fn_c_try_compile "$LINENO"; then :
10055   gl_cv_minmax_in_limits_h=yes
10056 else
10057   gl_cv_minmax_in_limits_h=no
10058 fi
10059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10060 fi
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
10062 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
10063   if test $gl_cv_minmax_in_limits_h = yes; then
10064
10065 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
10066
10067   fi
10068
10069
10070
10071
10072
10073
10074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
10075 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
10076 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
10077   $as_echo_n "(cached) " >&6
10078 else
10079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080 /* end confdefs.h.  */
10081 #include <sys/param.h>
10082             int x = MIN (42, 17);
10083 int
10084 main ()
10085 {
10086
10087   ;
10088   return 0;
10089 }
10090 _ACEOF
10091 if ac_fn_c_try_compile "$LINENO"; then :
10092   gl_cv_minmax_in_sys_param_h=yes
10093 else
10094   gl_cv_minmax_in_sys_param_h=no
10095 fi
10096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10097 fi
10098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
10099 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
10100   if test $gl_cv_minmax_in_sys_param_h = yes; then
10101
10102 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
10103
10104   fi
10105
10106
10107
10108
10109
10110   GNULIB_MKTIME=0;
10111   GNULIB_NANOSLEEP=0;
10112   GNULIB_STRPTIME=0;
10113   GNULIB_TIMEGM=0;
10114   GNULIB_TIME_R=0;
10115     HAVE_DECL_LOCALTIME_R=1;
10116   HAVE_NANOSLEEP=1;
10117   HAVE_STRPTIME=1;
10118   HAVE_TIMEGM=1;
10119         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
10120   REPLACE_MKTIME=GNULIB_PORTCHECK;
10121   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
10122   REPLACE_TIMEGM=GNULIB_PORTCHECK;
10123
10124
10125
10126
10127     gl_cv_c_multiarch=no
10128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10129 /* end confdefs.h.  */
10130 #ifndef __APPLE_CC__
10131          not a universal capable compiler
10132         #endif
10133         typedef int dummy;
10134
10135 _ACEOF
10136 if ac_fn_c_try_compile "$LINENO"; then :
10137
10138                arch=
10139      prev=
10140      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10141        if test -n "$prev"; then
10142          case $word in
10143            i?86 | x86_64 | ppc | ppc64)
10144              if test -z "$arch" || test "$arch" = "$word"; then
10145                arch="$word"
10146              else
10147                gl_cv_c_multiarch=yes
10148              fi
10149              ;;
10150          esac
10151          prev=
10152        else
10153          if test "x$word" = "x-arch"; then
10154            prev=arch
10155          fi
10156        fi
10157      done
10158
10159 fi
10160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10161   if test $gl_cv_c_multiarch = yes; then
10162     APPLE_UNIVERSAL_BUILD=1
10163   else
10164     APPLE_UNIVERSAL_BUILD=0
10165   fi
10166
10167
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
10169 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
10170 if ${ac_cv_header_stdbool_h+:} false; then :
10171   $as_echo_n "(cached) " >&6
10172 else
10173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10174 /* end confdefs.h.  */
10175
10176              #include <stdbool.h>
10177              #ifndef bool
10178               "error: bool is not defined"
10179              #endif
10180              #ifndef false
10181               "error: false is not defined"
10182              #endif
10183              #if false
10184               "error: false is not 0"
10185              #endif
10186              #ifndef true
10187               "error: true is not defined"
10188              #endif
10189              #if true != 1
10190               "error: true is not 1"
10191              #endif
10192              #ifndef __bool_true_false_are_defined
10193               "error: __bool_true_false_are_defined is not defined"
10194              #endif
10195
10196              struct s { _Bool s: 1; _Bool t; } s;
10197
10198              char a[true == 1 ? 1 : -1];
10199              char b[false == 0 ? 1 : -1];
10200              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
10201              char d[(bool) 0.5 == true ? 1 : -1];
10202              /* See body of main program for 'e'.  */
10203              char f[(_Bool) 0.0 == false ? 1 : -1];
10204              char g[true];
10205              char h[sizeof (_Bool)];
10206              char i[sizeof s.t];
10207              enum { j = false, k = true, l = false * true, m = true * 256 };
10208              /* The following fails for
10209                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
10210              _Bool n[m];
10211              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
10212              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
10213              /* Catch a bug in an HP-UX C compiler.  See
10214                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
10215                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
10216               */
10217              _Bool q = true;
10218              _Bool *pq = &q;
10219
10220 int
10221 main ()
10222 {
10223
10224              bool e = &s;
10225              *pq |= q;
10226              *pq |= ! q;
10227              /* Refer to every declared value, to avoid compiler optimizations.  */
10228              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
10229                      + !m + !n + !o + !p + !q + !pq);
10230
10231   ;
10232   return 0;
10233 }
10234 _ACEOF
10235 if ac_fn_c_try_compile "$LINENO"; then :
10236   ac_cv_header_stdbool_h=yes
10237 else
10238   ac_cv_header_stdbool_h=no
10239 fi
10240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10241 fi
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
10243 $as_echo "$ac_cv_header_stdbool_h" >&6; }
10244    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
10245 if test "x$ac_cv_type__Bool" = xyes; then :
10246
10247 cat >>confdefs.h <<_ACEOF
10248 #define HAVE__BOOL 1
10249 _ACEOF
10250
10251
10252 fi
10253
10254
10255
10256
10257
10258   # Define two additional variables used in the Makefile substitution.
10259
10260   if test "$ac_cv_header_stdbool_h" = yes; then
10261     STDBOOL_H=''
10262   else
10263     STDBOOL_H='stdbool.h'
10264   fi
10265
10266    if test -n "$STDBOOL_H"; then
10267   GL_GENERATE_STDBOOL_H_TRUE=
10268   GL_GENERATE_STDBOOL_H_FALSE='#'
10269 else
10270   GL_GENERATE_STDBOOL_H_TRUE='#'
10271   GL_GENERATE_STDBOOL_H_FALSE=
10272 fi
10273
10274
10275   if test "$ac_cv_type__Bool" = yes; then
10276     HAVE__BOOL=1
10277   else
10278     HAVE__BOOL=0
10279   fi
10280
10281
10282
10283   # parse-datetime.y works with bison only.
10284   : ${YACC='bison -y'}
10285
10286
10287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
10288 $as_echo_n "checking for compound literals... " >&6; }
10289 if ${gl_cv_compound_literals+:} false; then :
10290   $as_echo_n "(cached) " >&6
10291 else
10292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10293 /* end confdefs.h.  */
10294 struct s { int i, j; };
10295 int
10296 main ()
10297 {
10298 struct s t = (struct s) { 3, 4 };
10299         if (t.i != 0) return 0;
10300   ;
10301   return 0;
10302 }
10303 _ACEOF
10304 if ac_fn_c_try_compile "$LINENO"; then :
10305   gl_cv_compound_literals=yes
10306 else
10307   gl_cv_compound_literals=no
10308 fi
10309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10310 fi
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
10312 $as_echo "$gl_cv_compound_literals" >&6; }
10313   if test $gl_cv_compound_literals = yes; then
10314
10315 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
10316
10317   fi
10318
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10320 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10321 if ${ac_cv_struct_tm+:} false; then :
10322   $as_echo_n "(cached) " >&6
10323 else
10324   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325 /* end confdefs.h.  */
10326 #include <sys/types.h>
10327 #include <time.h>
10328
10329 int
10330 main ()
10331 {
10332 struct tm tm;
10333                                      int *p = &tm.tm_sec;
10334                                      return !p;
10335   ;
10336   return 0;
10337 }
10338 _ACEOF
10339 if ac_fn_c_try_compile "$LINENO"; then :
10340   ac_cv_struct_tm=time.h
10341 else
10342   ac_cv_struct_tm=sys/time.h
10343 fi
10344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10345 fi
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10347 $as_echo "$ac_cv_struct_tm" >&6; }
10348 if test $ac_cv_struct_tm = sys/time.h; then
10349
10350 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10351
10352 fi
10353
10354
10355  ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
10356 "
10357 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
10358
10359 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
10360
10361 fi
10362
10363
10364
10365   GNULIB_PTHREAD_SIGMASK=0;
10366   GNULIB_RAISE=0;
10367   GNULIB_SIGNAL_H_SIGPIPE=0;
10368   GNULIB_SIGPROCMASK=0;
10369   GNULIB_SIGACTION=0;
10370     HAVE_POSIX_SIGNALBLOCKING=1;
10371   HAVE_PTHREAD_SIGMASK=1;
10372   HAVE_RAISE=1;
10373   HAVE_SIGSET_T=1;
10374   HAVE_SIGINFO_T=1;
10375   HAVE_SIGACTION=1;
10376   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
10377
10378   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
10379
10380   HAVE_SIGHANDLER_T=1;
10381   REPLACE_PTHREAD_SIGMASK=0;
10382   REPLACE_RAISE=0;
10383
10384
10385   GNULIB_DPRINTF=0;
10386   GNULIB_FCLOSE=0;
10387   GNULIB_FDOPEN=0;
10388   GNULIB_FFLUSH=0;
10389   GNULIB_FGETC=0;
10390   GNULIB_FGETS=0;
10391   GNULIB_FOPEN=0;
10392   GNULIB_FPRINTF=0;
10393   GNULIB_FPRINTF_POSIX=0;
10394   GNULIB_FPURGE=0;
10395   GNULIB_FPUTC=0;
10396   GNULIB_FPUTS=0;
10397   GNULIB_FREAD=0;
10398   GNULIB_FREOPEN=0;
10399   GNULIB_FSCANF=0;
10400   GNULIB_FSEEK=0;
10401   GNULIB_FSEEKO=0;
10402   GNULIB_FTELL=0;
10403   GNULIB_FTELLO=0;
10404   GNULIB_FWRITE=0;
10405   GNULIB_GETC=0;
10406   GNULIB_GETCHAR=0;
10407   GNULIB_GETDELIM=0;
10408   GNULIB_GETLINE=0;
10409   GNULIB_OBSTACK_PRINTF=0;
10410   GNULIB_OBSTACK_PRINTF_POSIX=0;
10411   GNULIB_PCLOSE=0;
10412   GNULIB_PERROR=0;
10413   GNULIB_POPEN=0;
10414   GNULIB_PRINTF=0;
10415   GNULIB_PRINTF_POSIX=0;
10416   GNULIB_PUTC=0;
10417   GNULIB_PUTCHAR=0;
10418   GNULIB_PUTS=0;
10419   GNULIB_REMOVE=0;
10420   GNULIB_RENAME=0;
10421   GNULIB_RENAMEAT=0;
10422   GNULIB_SCANF=0;
10423   GNULIB_SNPRINTF=0;
10424   GNULIB_SPRINTF_POSIX=0;
10425   GNULIB_STDIO_H_NONBLOCKING=0;
10426   GNULIB_STDIO_H_SIGPIPE=0;
10427   GNULIB_TMPFILE=0;
10428   GNULIB_VASPRINTF=0;
10429   GNULIB_VFSCANF=0;
10430   GNULIB_VSCANF=0;
10431   GNULIB_VDPRINTF=0;
10432   GNULIB_VFPRINTF=0;
10433   GNULIB_VFPRINTF_POSIX=0;
10434   GNULIB_VPRINTF=0;
10435   GNULIB_VPRINTF_POSIX=0;
10436   GNULIB_VSNPRINTF=0;
10437   GNULIB_VSPRINTF_POSIX=0;
10438     HAVE_DECL_FPURGE=1;
10439   HAVE_DECL_FSEEKO=1;
10440   HAVE_DECL_FTELLO=1;
10441   HAVE_DECL_GETDELIM=1;
10442   HAVE_DECL_GETLINE=1;
10443   HAVE_DECL_OBSTACK_PRINTF=1;
10444   HAVE_DECL_SNPRINTF=1;
10445   HAVE_DECL_VSNPRINTF=1;
10446   HAVE_DPRINTF=1;
10447   HAVE_FSEEKO=1;
10448   HAVE_FTELLO=1;
10449   HAVE_PCLOSE=1;
10450   HAVE_POPEN=1;
10451   HAVE_RENAMEAT=1;
10452   HAVE_VASPRINTF=1;
10453   HAVE_VDPRINTF=1;
10454   REPLACE_DPRINTF=0;
10455   REPLACE_FCLOSE=0;
10456   REPLACE_FDOPEN=0;
10457   REPLACE_FFLUSH=0;
10458   REPLACE_FOPEN=0;
10459   REPLACE_FPRINTF=0;
10460   REPLACE_FPURGE=0;
10461   REPLACE_FREOPEN=0;
10462   REPLACE_FSEEK=0;
10463   REPLACE_FSEEKO=0;
10464   REPLACE_FTELL=0;
10465   REPLACE_FTELLO=0;
10466   REPLACE_GETDELIM=0;
10467   REPLACE_GETLINE=0;
10468   REPLACE_OBSTACK_PRINTF=0;
10469   REPLACE_PERROR=0;
10470   REPLACE_POPEN=0;
10471   REPLACE_PRINTF=0;
10472   REPLACE_REMOVE=0;
10473   REPLACE_RENAME=0;
10474   REPLACE_RENAMEAT=0;
10475   REPLACE_SNPRINTF=0;
10476   REPLACE_SPRINTF=0;
10477   REPLACE_STDIO_READ_FUNCS=0;
10478   REPLACE_STDIO_WRITE_FUNCS=0;
10479   REPLACE_TMPFILE=0;
10480   REPLACE_VASPRINTF=0;
10481   REPLACE_VDPRINTF=0;
10482   REPLACE_VFPRINTF=0;
10483   REPLACE_VPRINTF=0;
10484   REPLACE_VSNPRINTF=0;
10485   REPLACE_VSPRINTF=0;
10486
10487
10488
10489
10490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
10491 $as_echo_n "checking for ssize_t... " >&6; }
10492 if ${gt_cv_ssize_t+:} false; then :
10493   $as_echo_n "(cached) " >&6
10494 else
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497 #include <sys/types.h>
10498 int
10499 main ()
10500 {
10501 int x = sizeof (ssize_t *) + sizeof (ssize_t);
10502             return !x;
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 if ac_fn_c_try_compile "$LINENO"; then :
10508   gt_cv_ssize_t=yes
10509 else
10510   gt_cv_ssize_t=no
10511 fi
10512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10513 fi
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
10515 $as_echo "$gt_cv_ssize_t" >&6; }
10516   if test $gt_cv_ssize_t = no; then
10517
10518 $as_echo "#define ssize_t int" >>confdefs.h
10519
10520   fi
10521
10522 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
10523 if test "x$ac_cv_have_decl_setenv" = xyes; then :
10524   ac_have_decl=1
10525 else
10526   ac_have_decl=0
10527 fi
10528
10529 cat >>confdefs.h <<_ACEOF
10530 #define HAVE_DECL_SETENV $ac_have_decl
10531 _ACEOF
10532
10533
10534
10535
10536
10537
10538   if test $ac_cv_have_decl_setenv = no; then
10539     HAVE_DECL_SETENV=0
10540   fi
10541
10542
10543
10544
10545
10546   for ac_header in search.h
10547 do :
10548   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
10549 if test "x$ac_cv_header_search_h" = xyes; then :
10550   cat >>confdefs.h <<_ACEOF
10551 #define HAVE_SEARCH_H 1
10552 _ACEOF
10553
10554 fi
10555
10556 done
10557
10558   for ac_func in tsearch
10559 do :
10560   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
10561 if test "x$ac_cv_func_tsearch" = xyes; then :
10562   cat >>confdefs.h <<_ACEOF
10563 #define HAVE_TSEARCH 1
10564 _ACEOF
10565
10566 fi
10567 done
10568
10569
10570
10571
10572   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
10573       #include <signal.h>
10574       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
10575       #include <sys/types.h>
10576
10577 "
10578 if test "x$ac_cv_type_sigset_t" = xyes; then :
10579
10580 cat >>confdefs.h <<_ACEOF
10581 #define HAVE_SIGSET_T 1
10582 _ACEOF
10583
10584 gl_cv_type_sigset_t=yes
10585 else
10586   gl_cv_type_sigset_t=no
10587 fi
10588
10589   if test $gl_cv_type_sigset_t != yes; then
10590     HAVE_SIGSET_T=0
10591   fi
10592
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10594 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10595 if ${ac_cv_type_uid_t+:} false; then :
10596   $as_echo_n "(cached) " >&6
10597 else
10598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10599 /* end confdefs.h.  */
10600 #include <sys/types.h>
10601
10602 _ACEOF
10603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10604   $EGREP "uid_t" >/dev/null 2>&1; then :
10605   ac_cv_type_uid_t=yes
10606 else
10607   ac_cv_type_uid_t=no
10608 fi
10609 rm -f conftest*
10610
10611 fi
10612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10613 $as_echo "$ac_cv_type_uid_t" >&6; }
10614 if test $ac_cv_type_uid_t = no; then
10615
10616 $as_echo "#define uid_t int" >>confdefs.h
10617
10618
10619 $as_echo "#define gid_t int" >>confdefs.h
10620
10621 fi
10622
10623
10624     REPLACE_NULL=0;
10625   HAVE_WCHAR_T=1;
10626
10627
10628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10629 $as_echo_n "checking for wchar_t... " >&6; }
10630 if ${gt_cv_c_wchar_t+:} false; then :
10631   $as_echo_n "(cached) " >&6
10632 else
10633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634 /* end confdefs.h.  */
10635 #include <stddef.h>
10636             wchar_t foo = (wchar_t)'\0';
10637 int
10638 main ()
10639 {
10640
10641   ;
10642   return 0;
10643 }
10644 _ACEOF
10645 if ac_fn_c_try_compile "$LINENO"; then :
10646   gt_cv_c_wchar_t=yes
10647 else
10648   gt_cv_c_wchar_t=no
10649 fi
10650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10651 fi
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10653 $as_echo "$gt_cv_c_wchar_t" >&6; }
10654   if test $gt_cv_c_wchar_t = yes; then
10655
10656 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
10657
10658   fi
10659
10660
10661
10662
10663
10664
10665
10666
10667   if test $ac_cv_type_long_long_int = yes; then
10668     HAVE_LONG_LONG_INT=1
10669   else
10670     HAVE_LONG_LONG_INT=0
10671   fi
10672
10673
10674   if test $ac_cv_type_unsigned_long_long_int = yes; then
10675     HAVE_UNSIGNED_LONG_LONG_INT=1
10676   else
10677     HAVE_UNSIGNED_LONG_LONG_INT=0
10678   fi
10679
10680
10681
10682   if test $ac_cv_header_wchar_h = yes; then
10683     HAVE_WCHAR_H=1
10684   else
10685     HAVE_WCHAR_H=0
10686   fi
10687
10688
10689       if test $ac_cv_header_inttypes_h = yes; then
10690     HAVE_INTTYPES_H=1
10691   else
10692     HAVE_INTTYPES_H=0
10693   fi
10694
10695
10696       if test $ac_cv_header_sys_types_h = yes; then
10697     HAVE_SYS_TYPES_H=1
10698   else
10699     HAVE_SYS_TYPES_H=0
10700   fi
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712      if test $gl_cv_have_include_next = yes; then
10713        gl_cv_next_stdint_h='<'stdint.h'>'
10714      else
10715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10716 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
10717 if ${gl_cv_next_stdint_h+:} false; then :
10718   $as_echo_n "(cached) " >&6
10719 else
10720
10721              if test $ac_cv_header_stdint_h = yes; then
10722
10723
10724                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10725 /* end confdefs.h.  */
10726 #include <stdint.h>
10727
10728 _ACEOF
10729                                                                                                                         case "$host_os" in
10730                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10731                  *)    gl_absname_cpp="$ac_cpp" ;;
10732                esac
10733
10734                case "$host_os" in
10735                  mingw*)
10736                                                                                                                                      gl_dirsep_regex='[/\\]'
10737                    ;;
10738                  *)
10739                    gl_dirsep_regex='\/'
10740                    ;;
10741                esac
10742                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10743
10744                gl_header_literal_regex=`echo 'stdint.h' \
10745                                         | sed -e "$gl_make_literal_regex_sed"`
10746                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10747                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10748                    s|^/[^/]|//&|
10749                    p
10750                    q
10751                  }'
10752                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10753                       sed -n "$gl_absolute_header_sed"`'"'
10754           else
10755                gl_cv_next_stdint_h='<'stdint.h'>'
10756              fi
10757
10758
10759 fi
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10761 $as_echo "$gl_cv_next_stdint_h" >&6; }
10762      fi
10763      NEXT_STDINT_H=$gl_cv_next_stdint_h
10764
10765      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10766        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10767        gl_next_as_first_directive='<'stdint.h'>'
10768      else
10769        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10770        gl_next_as_first_directive=$gl_cv_next_stdint_h
10771      fi
10772      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
10773
10774
10775
10776
10777   if test $ac_cv_header_stdint_h = yes; then
10778     HAVE_STDINT_H=1
10779   else
10780     HAVE_STDINT_H=0
10781   fi
10782
10783
10784     if test $ac_cv_header_stdint_h = yes; then
10785     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10786 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
10787 if ${gl_cv_header_working_stdint_h+:} false; then :
10788   $as_echo_n "(cached) " >&6
10789 else
10790   gl_cv_header_working_stdint_h=no
10791        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10792 /* end confdefs.h.  */
10793
10794
10795 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10796 #include <stdint.h>
10797 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
10798 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
10799 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10800 #endif
10801
10802
10803   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10804      included before <wchar.h>.  */
10805   #include <stddef.h>
10806   #include <signal.h>
10807   #if HAVE_WCHAR_H
10808   # include <stdio.h>
10809   # include <time.h>
10810   # include <wchar.h>
10811   #endif
10812
10813
10814 #ifdef INT8_MAX
10815 int8_t a1 = INT8_MAX;
10816 int8_t a1min = INT8_MIN;
10817 #endif
10818 #ifdef INT16_MAX
10819 int16_t a2 = INT16_MAX;
10820 int16_t a2min = INT16_MIN;
10821 #endif
10822 #ifdef INT32_MAX
10823 int32_t a3 = INT32_MAX;
10824 int32_t a3min = INT32_MIN;
10825 #endif
10826 #ifdef INT64_MAX
10827 int64_t a4 = INT64_MAX;
10828 int64_t a4min = INT64_MIN;
10829 #endif
10830 #ifdef UINT8_MAX
10831 uint8_t b1 = UINT8_MAX;
10832 #else
10833 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10834 #endif
10835 #ifdef UINT16_MAX
10836 uint16_t b2 = UINT16_MAX;
10837 #endif
10838 #ifdef UINT32_MAX
10839 uint32_t b3 = UINT32_MAX;
10840 #endif
10841 #ifdef UINT64_MAX
10842 uint64_t b4 = UINT64_MAX;
10843 #endif
10844 int_least8_t c1 = INT8_C (0x7f);
10845 int_least8_t c1max = INT_LEAST8_MAX;
10846 int_least8_t c1min = INT_LEAST8_MIN;
10847 int_least16_t c2 = INT16_C (0x7fff);
10848 int_least16_t c2max = INT_LEAST16_MAX;
10849 int_least16_t c2min = INT_LEAST16_MIN;
10850 int_least32_t c3 = INT32_C (0x7fffffff);
10851 int_least32_t c3max = INT_LEAST32_MAX;
10852 int_least32_t c3min = INT_LEAST32_MIN;
10853 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10854 int_least64_t c4max = INT_LEAST64_MAX;
10855 int_least64_t c4min = INT_LEAST64_MIN;
10856 uint_least8_t d1 = UINT8_C (0xff);
10857 uint_least8_t d1max = UINT_LEAST8_MAX;
10858 uint_least16_t d2 = UINT16_C (0xffff);
10859 uint_least16_t d2max = UINT_LEAST16_MAX;
10860 uint_least32_t d3 = UINT32_C (0xffffffff);
10861 uint_least32_t d3max = UINT_LEAST32_MAX;
10862 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10863 uint_least64_t d4max = UINT_LEAST64_MAX;
10864 int_fast8_t e1 = INT_FAST8_MAX;
10865 int_fast8_t e1min = INT_FAST8_MIN;
10866 int_fast16_t e2 = INT_FAST16_MAX;
10867 int_fast16_t e2min = INT_FAST16_MIN;
10868 int_fast32_t e3 = INT_FAST32_MAX;
10869 int_fast32_t e3min = INT_FAST32_MIN;
10870 int_fast64_t e4 = INT_FAST64_MAX;
10871 int_fast64_t e4min = INT_FAST64_MIN;
10872 uint_fast8_t f1 = UINT_FAST8_MAX;
10873 uint_fast16_t f2 = UINT_FAST16_MAX;
10874 uint_fast32_t f3 = UINT_FAST32_MAX;
10875 uint_fast64_t f4 = UINT_FAST64_MAX;
10876 #ifdef INTPTR_MAX
10877 intptr_t g = INTPTR_MAX;
10878 intptr_t gmin = INTPTR_MIN;
10879 #endif
10880 #ifdef UINTPTR_MAX
10881 uintptr_t h = UINTPTR_MAX;
10882 #endif
10883 intmax_t i = INTMAX_MAX;
10884 uintmax_t j = UINTMAX_MAX;
10885
10886 #include <limits.h> /* for CHAR_BIT */
10887 #define TYPE_MINIMUM(t) \
10888   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10889 #define TYPE_MAXIMUM(t) \
10890   ((t) ((t) 0 < (t) -1 \
10891         ? (t) -1 \
10892         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10893 struct s {
10894   int check_PTRDIFF:
10895       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10896       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10897       ? 1 : -1;
10898   /* Detect bug in FreeBSD 6.0 / ia64.  */
10899   int check_SIG_ATOMIC:
10900       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10901       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10902       ? 1 : -1;
10903   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10904   int check_WCHAR:
10905       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10906       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10907       ? 1 : -1;
10908   /* Detect bug in mingw.  */
10909   int check_WINT:
10910       WINT_MIN == TYPE_MINIMUM (wint_t)
10911       && WINT_MAX == TYPE_MAXIMUM (wint_t)
10912       ? 1 : -1;
10913
10914   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
10915   int check_UINT8_C:
10916         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10917   int check_UINT16_C:
10918         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
10919
10920   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
10921 #ifdef UINT8_MAX
10922   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10923 #endif
10924 #ifdef UINT16_MAX
10925   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10926 #endif
10927 #ifdef UINT32_MAX
10928   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10929 #endif
10930 #ifdef UINT64_MAX
10931   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10932 #endif
10933   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10934   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10935   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10936   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10937   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10938   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10939   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10940   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10941   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10942   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10943   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10944 };
10945
10946 int
10947 main ()
10948 {
10949
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955                                                     if test "$cross_compiling" = yes; then :
10956                  gl_cv_header_working_stdint_h=yes
10957
10958 else
10959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10960 /* end confdefs.h.  */
10961
10962
10963 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10964 #include <stdint.h>
10965
10966
10967   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10968      included before <wchar.h>.  */
10969   #include <stddef.h>
10970   #include <signal.h>
10971   #if HAVE_WCHAR_H
10972   # include <stdio.h>
10973   # include <time.h>
10974   # include <wchar.h>
10975   #endif
10976
10977
10978 #include <stdio.h>
10979 #include <string.h>
10980 #define MVAL(macro) MVAL1(macro)
10981 #define MVAL1(expression) #expression
10982 static const char *macro_values[] =
10983   {
10984 #ifdef INT8_MAX
10985     MVAL (INT8_MAX),
10986 #endif
10987 #ifdef INT16_MAX
10988     MVAL (INT16_MAX),
10989 #endif
10990 #ifdef INT32_MAX
10991     MVAL (INT32_MAX),
10992 #endif
10993 #ifdef INT64_MAX
10994     MVAL (INT64_MAX),
10995 #endif
10996 #ifdef UINT8_MAX
10997     MVAL (UINT8_MAX),
10998 #endif
10999 #ifdef UINT16_MAX
11000     MVAL (UINT16_MAX),
11001 #endif
11002 #ifdef UINT32_MAX
11003     MVAL (UINT32_MAX),
11004 #endif
11005 #ifdef UINT64_MAX
11006     MVAL (UINT64_MAX),
11007 #endif
11008     NULL
11009   };
11010
11011 int
11012 main ()
11013 {
11014
11015   const char **mv;
11016   for (mv = macro_values; *mv != NULL; mv++)
11017     {
11018       const char *value = *mv;
11019       /* Test whether it looks like a cast expression.  */
11020       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11021           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11022           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11023           || strncmp (value, "((int)"/*)*/, 6) == 0
11024           || strncmp (value, "((signed short)"/*)*/, 15) == 0
11025           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11026         return mv - macro_values + 1;
11027     }
11028   return 0;
11029
11030   ;
11031   return 0;
11032 }
11033 _ACEOF
11034 if ac_fn_c_try_run "$LINENO"; then :
11035   gl_cv_header_working_stdint_h=yes
11036 fi
11037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11038   conftest.$ac_objext conftest.beam conftest.$ac_ext
11039 fi
11040
11041
11042 fi
11043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11044
11045 fi
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11047 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
11048   fi
11049   if test "$gl_cv_header_working_stdint_h" = yes; then
11050     STDINT_H=
11051   else
11052             for ac_header in sys/inttypes.h sys/bitypes.h
11053 do :
11054   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11055 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11056 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11057   cat >>confdefs.h <<_ACEOF
11058 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11059 _ACEOF
11060
11061 fi
11062
11063 done
11064
11065     if test $ac_cv_header_sys_inttypes_h = yes; then
11066       HAVE_SYS_INTTYPES_H=1
11067     else
11068       HAVE_SYS_INTTYPES_H=0
11069     fi
11070
11071     if test $ac_cv_header_sys_bitypes_h = yes; then
11072       HAVE_SYS_BITYPES_H=1
11073     else
11074       HAVE_SYS_BITYPES_H=0
11075     fi
11076
11077
11078
11079
11080   if test $APPLE_UNIVERSAL_BUILD = 0; then
11081
11082
11083   for gltype in ptrdiff_t size_t ; do
11084     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11085 $as_echo_n "checking for bit size of $gltype... " >&6; }
11086 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11087   $as_echo_n "(cached) " >&6
11088 else
11089   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
11090   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11091      included before <wchar.h>.  */
11092   #include <stddef.h>
11093   #include <signal.h>
11094   #if HAVE_WCHAR_H
11095   # include <stdio.h>
11096   # include <time.h>
11097   # include <wchar.h>
11098   #endif
11099
11100 #include <limits.h>"; then :
11101
11102 else
11103   result=unknown
11104 fi
11105
11106        eval gl_cv_bitsizeof_${gltype}=\$result
11107
11108 fi
11109 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11110                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11111 $as_echo "$ac_res" >&6; }
11112     eval result=\$gl_cv_bitsizeof_${gltype}
11113     if test $result = unknown; then
11114                                                 result=0
11115     fi
11116     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11117     cat >>confdefs.h <<_ACEOF
11118 #define BITSIZEOF_${GLTYPE} $result
11119 _ACEOF
11120
11121     eval BITSIZEOF_${GLTYPE}=\$result
11122   done
11123
11124
11125   fi
11126
11127
11128   for gltype in sig_atomic_t wchar_t wint_t ; do
11129     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11130 $as_echo_n "checking for bit size of $gltype... " >&6; }
11131 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11132   $as_echo_n "(cached) " >&6
11133 else
11134   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
11135   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11136      included before <wchar.h>.  */
11137   #include <stddef.h>
11138   #include <signal.h>
11139   #if HAVE_WCHAR_H
11140   # include <stdio.h>
11141   # include <time.h>
11142   # include <wchar.h>
11143   #endif
11144
11145 #include <limits.h>"; then :
11146
11147 else
11148   result=unknown
11149 fi
11150
11151        eval gl_cv_bitsizeof_${gltype}=\$result
11152
11153 fi
11154 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11155                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11156 $as_echo "$ac_res" >&6; }
11157     eval result=\$gl_cv_bitsizeof_${gltype}
11158     if test $result = unknown; then
11159                                                 result=0
11160     fi
11161     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11162     cat >>confdefs.h <<_ACEOF
11163 #define BITSIZEOF_${GLTYPE} $result
11164 _ACEOF
11165
11166     eval BITSIZEOF_${GLTYPE}=\$result
11167   done
11168
11169
11170
11171
11172   for gltype in sig_atomic_t wchar_t wint_t ; do
11173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11174 $as_echo_n "checking whether $gltype is signed... " >&6; }
11175 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
11176   $as_echo_n "(cached) " >&6
11177 else
11178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179 /* end confdefs.h.  */
11180
11181   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11182      included before <wchar.h>.  */
11183   #include <stddef.h>
11184   #include <signal.h>
11185   #if HAVE_WCHAR_H
11186   # include <stdio.h>
11187   # include <time.h>
11188   # include <wchar.h>
11189   #endif
11190
11191             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
11192 int
11193 main ()
11194 {
11195
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 if ac_fn_c_try_compile "$LINENO"; then :
11201   result=yes
11202 else
11203   result=no
11204 fi
11205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11206        eval gl_cv_type_${gltype}_signed=\$result
11207
11208 fi
11209 eval ac_res=\$gl_cv_type_${gltype}_signed
11210                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11211 $as_echo "$ac_res" >&6; }
11212     eval result=\$gl_cv_type_${gltype}_signed
11213     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11214     if test "$result" = yes; then
11215       cat >>confdefs.h <<_ACEOF
11216 #define HAVE_SIGNED_${GLTYPE} 1
11217 _ACEOF
11218
11219       eval HAVE_SIGNED_${GLTYPE}=1
11220     else
11221       eval HAVE_SIGNED_${GLTYPE}=0
11222     fi
11223   done
11224
11225
11226   gl_cv_type_ptrdiff_t_signed=yes
11227   gl_cv_type_size_t_signed=no
11228   if test $APPLE_UNIVERSAL_BUILD = 0; then
11229
11230
11231   for gltype in ptrdiff_t size_t ; do
11232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11233 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11234 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11235   $as_echo_n "(cached) " >&6
11236 else
11237   eval gl_cv_type_${gltype}_suffix=no
11238        eval result=\$gl_cv_type_${gltype}_signed
11239        if test "$result" = yes; then
11240          glsufu=
11241        else
11242          glsufu=u
11243        fi
11244        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11245          case $glsuf in
11246            '')  gltype1='int';;
11247            l)   gltype1='long int';;
11248            ll)  gltype1='long long int';;
11249            i64) gltype1='__int64';;
11250            u)   gltype1='unsigned int';;
11251            ul)  gltype1='unsigned long int';;
11252            ull) gltype1='unsigned long long int';;
11253            ui64)gltype1='unsigned __int64';;
11254          esac
11255          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256 /* end confdefs.h.  */
11257
11258   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11259      included before <wchar.h>.  */
11260   #include <stddef.h>
11261   #include <signal.h>
11262   #if HAVE_WCHAR_H
11263   # include <stdio.h>
11264   # include <time.h>
11265   # include <wchar.h>
11266   #endif
11267
11268               extern $gltype foo;
11269               extern $gltype1 foo;
11270 int
11271 main ()
11272 {
11273
11274   ;
11275   return 0;
11276 }
11277 _ACEOF
11278 if ac_fn_c_try_compile "$LINENO"; then :
11279   eval gl_cv_type_${gltype}_suffix=\$glsuf
11280 fi
11281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11282          eval result=\$gl_cv_type_${gltype}_suffix
11283          test "$result" != no && break
11284        done
11285 fi
11286 eval ac_res=\$gl_cv_type_${gltype}_suffix
11287                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11288 $as_echo "$ac_res" >&6; }
11289     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11290     eval result=\$gl_cv_type_${gltype}_suffix
11291     test "$result" = no && result=
11292     eval ${GLTYPE}_SUFFIX=\$result
11293     cat >>confdefs.h <<_ACEOF
11294 #define ${GLTYPE}_SUFFIX $result
11295 _ACEOF
11296
11297   done
11298
11299
11300   fi
11301
11302
11303   for gltype in sig_atomic_t wchar_t wint_t ; do
11304     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11305 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11306 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11307   $as_echo_n "(cached) " >&6
11308 else
11309   eval gl_cv_type_${gltype}_suffix=no
11310        eval result=\$gl_cv_type_${gltype}_signed
11311        if test "$result" = yes; then
11312          glsufu=
11313        else
11314          glsufu=u
11315        fi
11316        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11317          case $glsuf in
11318            '')  gltype1='int';;
11319            l)   gltype1='long int';;
11320            ll)  gltype1='long long int';;
11321            i64) gltype1='__int64';;
11322            u)   gltype1='unsigned int';;
11323            ul)  gltype1='unsigned long int';;
11324            ull) gltype1='unsigned long long int';;
11325            ui64)gltype1='unsigned __int64';;
11326          esac
11327          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328 /* end confdefs.h.  */
11329
11330   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11331      included before <wchar.h>.  */
11332   #include <stddef.h>
11333   #include <signal.h>
11334   #if HAVE_WCHAR_H
11335   # include <stdio.h>
11336   # include <time.h>
11337   # include <wchar.h>
11338   #endif
11339
11340               extern $gltype foo;
11341               extern $gltype1 foo;
11342 int
11343 main ()
11344 {
11345
11346   ;
11347   return 0;
11348 }
11349 _ACEOF
11350 if ac_fn_c_try_compile "$LINENO"; then :
11351   eval gl_cv_type_${gltype}_suffix=\$glsuf
11352 fi
11353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11354          eval result=\$gl_cv_type_${gltype}_suffix
11355          test "$result" != no && break
11356        done
11357 fi
11358 eval ac_res=\$gl_cv_type_${gltype}_suffix
11359                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11360 $as_echo "$ac_res" >&6; }
11361     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11362     eval result=\$gl_cv_type_${gltype}_suffix
11363     test "$result" = no && result=
11364     eval ${GLTYPE}_SUFFIX=\$result
11365     cat >>confdefs.h <<_ACEOF
11366 #define ${GLTYPE}_SUFFIX $result
11367 _ACEOF
11368
11369   done
11370
11371
11372
11373           if test $BITSIZEOF_WINT_T -lt 32; then
11374     BITSIZEOF_WINT_T=32
11375   fi
11376
11377     STDINT_H=stdint.h
11378   fi
11379
11380    if test -n "$STDINT_H"; then
11381   GL_GENERATE_STDINT_H_TRUE=
11382   GL_GENERATE_STDINT_H_FALSE='#'
11383 else
11384   GL_GENERATE_STDINT_H_TRUE='#'
11385   GL_GENERATE_STDINT_H_FALSE=
11386 fi
11387
11388
11389
11390   REPLACE_STRERROR_0=0
11391   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
11392 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
11393 if ${gl_cv_func_strerror_0_works+:} false; then :
11394   $as_echo_n "(cached) " >&6
11395 else
11396   if test "$cross_compiling" = yes; then :
11397          gl_cv_func_strerror_0_works="guessing no"
11398 else
11399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400 /* end confdefs.h.  */
11401 #include <string.h>
11402            #include <errno.h>
11403
11404 int
11405 main ()
11406 {
11407 int result = 0;
11408            char *str;
11409            errno = 0;
11410            str = strerror (0);
11411            if (!*str) result |= 1;
11412            if (errno) result |= 2;
11413            if (strstr (str, "nknown") || strstr (str, "ndefined"))
11414              result |= 4;
11415            return result;
11416   ;
11417   return 0;
11418 }
11419 _ACEOF
11420 if ac_fn_c_try_run "$LINENO"; then :
11421   gl_cv_func_strerror_0_works=yes
11422 else
11423   gl_cv_func_strerror_0_works=no
11424 fi
11425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11426   conftest.$ac_objext conftest.beam conftest.$ac_ext
11427 fi
11428
11429
11430 fi
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
11432 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
11433   if test "$gl_cv_func_strerror_0_works" != yes; then
11434     REPLACE_STRERROR_0=1
11435
11436 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
11437
11438   fi
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451      if test $gl_cv_have_include_next = yes; then
11452        gl_cv_next_string_h='<'string.h'>'
11453      else
11454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
11455 $as_echo_n "checking absolute name of <string.h>... " >&6; }
11456 if ${gl_cv_next_string_h+:} false; then :
11457   $as_echo_n "(cached) " >&6
11458 else
11459
11460                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461 /* end confdefs.h.  */
11462 #include <string.h>
11463
11464 _ACEOF
11465                                                                                                                         case "$host_os" in
11466                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11467                  *)    gl_absname_cpp="$ac_cpp" ;;
11468                esac
11469
11470                case "$host_os" in
11471                  mingw*)
11472                                                                                                                                      gl_dirsep_regex='[/\\]'
11473                    ;;
11474                  *)
11475                    gl_dirsep_regex='\/'
11476                    ;;
11477                esac
11478                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11479
11480                gl_header_literal_regex=`echo 'string.h' \
11481                                         | sed -e "$gl_make_literal_regex_sed"`
11482                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11483                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11484                    s|^/[^/]|//&|
11485                    p
11486                    q
11487                  }'
11488                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11489                       sed -n "$gl_absolute_header_sed"`'"'
11490
11491
11492 fi
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
11494 $as_echo "$gl_cv_next_string_h" >&6; }
11495      fi
11496      NEXT_STRING_H=$gl_cv_next_string_h
11497
11498      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11499        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11500        gl_next_as_first_directive='<'string.h'>'
11501      else
11502        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11503        gl_next_as_first_directive=$gl_cv_next_string_h
11504      fi
11505      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
11506
11507
11508
11509
11510
11511
11512     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
11513     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11515 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11516 if eval \${$as_gl_Symbol+:} false; then :
11517   $as_echo_n "(cached) " >&6
11518 else
11519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11520 /* end confdefs.h.  */
11521 #include <string.h>
11522
11523 int
11524 main ()
11525 {
11526 #undef $gl_func
11527   (void) $gl_func;
11528   ;
11529   return 0;
11530 }
11531 _ACEOF
11532 if ac_fn_c_try_compile "$LINENO"; then :
11533   eval "$as_gl_Symbol=yes"
11534 else
11535   eval "$as_gl_Symbol=no"
11536 fi
11537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11538 fi
11539 eval ac_res=\$$as_gl_Symbol
11540                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11541 $as_echo "$ac_res" >&6; }
11542     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11543   cat >>confdefs.h <<_ACEOF
11544 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11545 _ACEOF
11546
11547                      eval ac_cv_have_decl_$gl_func=yes
11548 fi
11549       done
11550
11551
11552 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
11553 if test "x$ac_cv_have_decl_strndup" = xyes; then :
11554   ac_have_decl=1
11555 else
11556   ac_have_decl=0
11557 fi
11558
11559 cat >>confdefs.h <<_ACEOF
11560 #define HAVE_DECL_STRNDUP $ac_have_decl
11561 _ACEOF
11562
11563
11564
11565 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
11566 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
11567   ac_have_decl=1
11568 else
11569   ac_have_decl=0
11570 fi
11571
11572 cat >>confdefs.h <<_ACEOF
11573 #define HAVE_DECL_STRNLEN $ac_have_decl
11574 _ACEOF
11575
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11577 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11578 if ${ac_cv_header_stat_broken+:} false; then :
11579   $as_echo_n "(cached) " >&6
11580 else
11581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11582 /* end confdefs.h.  */
11583 #include <sys/types.h>
11584 #include <sys/stat.h>
11585
11586 #if defined S_ISBLK && defined S_IFDIR
11587 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11588 #endif
11589
11590 #if defined S_ISBLK && defined S_IFCHR
11591 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11592 #endif
11593
11594 #if defined S_ISLNK && defined S_IFREG
11595 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11596 #endif
11597
11598 #if defined S_ISSOCK && defined S_IFREG
11599 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11600 #endif
11601
11602 _ACEOF
11603 if ac_fn_c_try_compile "$LINENO"; then :
11604   ac_cv_header_stat_broken=no
11605 else
11606   ac_cv_header_stat_broken=yes
11607 fi
11608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11609 fi
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11611 $as_echo "$ac_cv_header_stat_broken" >&6; }
11612 if test $ac_cv_header_stat_broken = yes; then
11613
11614 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11615
11616 fi
11617
11618
11619
11620
11621
11622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
11623 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
11624 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
11625   $as_echo_n "(cached) " >&6
11626 else
11627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11628 /* end confdefs.h.  */
11629 #include <time.h>
11630
11631 int
11632 main ()
11633 {
11634 static struct timespec x; x.tv_sec = x.tv_nsec;
11635   ;
11636   return 0;
11637 }
11638 _ACEOF
11639 if ac_fn_c_try_compile "$LINENO"; then :
11640   gl_cv_sys_struct_timespec_in_time_h=yes
11641 else
11642   gl_cv_sys_struct_timespec_in_time_h=no
11643 fi
11644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11645 fi
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
11647 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
11648
11649   TIME_H_DEFINES_STRUCT_TIMESPEC=0
11650   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
11651   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
11652   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
11653     TIME_H_DEFINES_STRUCT_TIMESPEC=1
11654   else
11655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
11656 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
11657 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
11658   $as_echo_n "(cached) " >&6
11659 else
11660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11661 /* end confdefs.h.  */
11662 #include <sys/time.h>
11663
11664 int
11665 main ()
11666 {
11667 static struct timespec x; x.tv_sec = x.tv_nsec;
11668   ;
11669   return 0;
11670 }
11671 _ACEOF
11672 if ac_fn_c_try_compile "$LINENO"; then :
11673   gl_cv_sys_struct_timespec_in_sys_time_h=yes
11674 else
11675   gl_cv_sys_struct_timespec_in_sys_time_h=no
11676 fi
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11678 fi
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
11680 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
11681     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
11682       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
11683     else
11684       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
11685 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
11686 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
11687   $as_echo_n "(cached) " >&6
11688 else
11689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11690 /* end confdefs.h.  */
11691 #include <pthread.h>
11692
11693 int
11694 main ()
11695 {
11696 static struct timespec x; x.tv_sec = x.tv_nsec;
11697   ;
11698   return 0;
11699 }
11700 _ACEOF
11701 if ac_fn_c_try_compile "$LINENO"; then :
11702   gl_cv_sys_struct_timespec_in_pthread_h=yes
11703 else
11704   gl_cv_sys_struct_timespec_in_pthread_h=no
11705 fi
11706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11707 fi
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
11709 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
11710       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
11711         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
11712       fi
11713     fi
11714   fi
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730      if test $gl_cv_have_include_next = yes; then
11731        gl_cv_next_time_h='<'time.h'>'
11732      else
11733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
11734 $as_echo_n "checking absolute name of <time.h>... " >&6; }
11735 if ${gl_cv_next_time_h+:} false; then :
11736   $as_echo_n "(cached) " >&6
11737 else
11738
11739                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h.  */
11741 #include <time.h>
11742
11743 _ACEOF
11744                                                                                                                         case "$host_os" in
11745                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11746                  *)    gl_absname_cpp="$ac_cpp" ;;
11747                esac
11748
11749                case "$host_os" in
11750                  mingw*)
11751                                                                                                                                      gl_dirsep_regex='[/\\]'
11752                    ;;
11753                  *)
11754                    gl_dirsep_regex='\/'
11755                    ;;
11756                esac
11757                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11758
11759                gl_header_literal_regex=`echo 'time.h' \
11760                                         | sed -e "$gl_make_literal_regex_sed"`
11761                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11762                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11763                    s|^/[^/]|//&|
11764                    p
11765                    q
11766                  }'
11767                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11768                       sed -n "$gl_absolute_header_sed"`'"'
11769
11770
11771 fi
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
11773 $as_echo "$gl_cv_next_time_h" >&6; }
11774      fi
11775      NEXT_TIME_H=$gl_cv_next_time_h
11776
11777      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11778        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11779        gl_next_as_first_directive='<'time.h'>'
11780      else
11781        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11782        gl_next_as_first_directive=$gl_cv_next_time_h
11783      fi
11784      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
11785
11786
11787
11788
11789
11790
11791 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
11792 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
11793   ac_have_decl=1
11794 else
11795   ac_have_decl=0
11796 fi
11797
11798 cat >>confdefs.h <<_ACEOF
11799 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
11800 _ACEOF
11801
11802
11803
11804
11805
11806 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
11807 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
11808   ac_have_decl=1
11809 else
11810   ac_have_decl=0
11811 fi
11812
11813 cat >>confdefs.h <<_ACEOF
11814 #define HAVE_DECL_UNSETENV $ac_have_decl
11815 _ACEOF
11816
11817
11818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
11819 $as_echo_n "checking whether the utimes function works... " >&6; }
11820 if ${gl_cv_func_working_utimes+:} false; then :
11821   $as_echo_n "(cached) " >&6
11822 else
11823
11824   if test "$cross_compiling" = yes; then :
11825   gl_cv_func_working_utimes=no
11826 else
11827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11828 /* end confdefs.h.  */
11829
11830 #include <sys/types.h>
11831 #include <sys/stat.h>
11832 #include <fcntl.h>
11833 #include <sys/time.h>
11834 #include <time.h>
11835 #include <unistd.h>
11836 #include <stdlib.h>
11837 #include <stdio.h>
11838 #include <utime.h>
11839
11840 static int
11841 inorder (time_t a, time_t b, time_t c)
11842 {
11843   return a <= b && b <= c;
11844 }
11845
11846 int
11847 main ()
11848 {
11849   int result = 0;
11850   char const *file = "conftest.utimes";
11851   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
11852
11853   /* Test whether utimes() essentially works.  */
11854   {
11855     struct stat sbuf;
11856     FILE *f = fopen (file, "w");
11857     if (f == NULL)
11858       result |= 1;
11859     else if (fclose (f) != 0)
11860       result |= 1;
11861     else if (utimes (file, timeval) != 0)
11862       result |= 2;
11863     else if (lstat (file, &sbuf) != 0)
11864       result |= 1;
11865     else if (!(sbuf.st_atime == timeval[0].tv_sec
11866                && sbuf.st_mtime == timeval[1].tv_sec))
11867       result |= 4;
11868     if (unlink (file) != 0)
11869       result |= 1;
11870   }
11871
11872   /* Test whether utimes() with a NULL argument sets the file's timestamp
11873      to the current time.  Use 'fstat' as well as 'time' to
11874      determine the "current" time, to accommodate NFS file systems
11875      if there is a time skew between the host and the NFS server.  */
11876   {
11877     int fd = open (file, O_WRONLY|O_CREAT, 0644);
11878     if (fd < 0)
11879       result |= 1;
11880     else
11881       {
11882         time_t t0, t2;
11883         struct stat st0, st1, st2;
11884         if (time (&t0) == (time_t) -1)
11885           result |= 1;
11886         else if (fstat (fd, &st0) != 0)
11887           result |= 1;
11888         else if (utimes (file, timeval) != 0)
11889           result |= 2;
11890         else if (utimes (file, NULL) != 0)
11891           result |= 8;
11892         else if (fstat (fd, &st1) != 0)
11893           result |= 1;
11894         else if (write (fd, "\n", 1) != 1)
11895           result |= 1;
11896         else if (fstat (fd, &st2) != 0)
11897           result |= 1;
11898         else if (time (&t2) == (time_t) -1)
11899           result |= 1;
11900         else
11901           {
11902             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
11903             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
11904             if (! (st1.st_atime == st1.st_mtime))
11905               result |= 16;
11906             if (! (m_ok_POSIX || m_ok_NFS))
11907               result |= 32;
11908           }
11909         if (close (fd) != 0)
11910           result |= 1;
11911       }
11912     if (unlink (file) != 0)
11913       result |= 1;
11914   }
11915
11916   /* Test whether utimes() with a NULL argument works on read-only files.  */
11917   {
11918     int fd = open (file, O_WRONLY|O_CREAT, 0444);
11919     if (fd < 0)
11920       result |= 1;
11921     else if (close (fd) != 0)
11922       result |= 1;
11923     else if (utimes (file, NULL) != 0)
11924       result |= 64;
11925     if (unlink (file) != 0)
11926       result |= 1;
11927   }
11928
11929   return result;
11930 }
11931
11932 _ACEOF
11933 if ac_fn_c_try_run "$LINENO"; then :
11934   gl_cv_func_working_utimes=yes
11935 else
11936   gl_cv_func_working_utimes=no
11937 fi
11938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11939   conftest.$ac_objext conftest.beam conftest.$ac_ext
11940 fi
11941
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
11944 $as_echo "$gl_cv_func_working_utimes" >&6; }
11945
11946   if test $gl_cv_func_working_utimes = yes; then
11947
11948 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
11949
11950   fi
11951
11952
11953
11954
11955
11956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
11957 $as_echo_n "checking for struct utimbuf... " >&6; }
11958 if ${gl_cv_sys_struct_utimbuf+:} false; then :
11959   $as_echo_n "(cached) " >&6
11960 else
11961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11962 /* end confdefs.h.  */
11963 #if HAVE_SYS_TIME_H
11964              #include <sys/time.h>
11965             #endif
11966             #include <time.h>
11967             #ifdef HAVE_UTIME_H
11968              #include <utime.h>
11969             #endif
11970
11971 int
11972 main ()
11973 {
11974 static struct utimbuf x; x.actime = x.modtime;
11975   ;
11976   return 0;
11977 }
11978 _ACEOF
11979 if ac_fn_c_try_compile "$LINENO"; then :
11980   gl_cv_sys_struct_utimbuf=yes
11981 else
11982   gl_cv_sys_struct_utimbuf=no
11983 fi
11984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11985 fi
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
11987 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
11988
11989   if test $gl_cv_sys_struct_utimbuf = yes; then
11990
11991 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
11992
11993   fi
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12009 $as_echo_n "checking for wint_t... " >&6; }
12010 if ${gt_cv_c_wint_t+:} false; then :
12011   $as_echo_n "(cached) " >&6
12012 else
12013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12014 /* end confdefs.h.  */
12015
12016 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12017    <wchar.h>.
12018    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
12019    before <wchar.h>.  */
12020 #include <stddef.h>
12021 #include <stdio.h>
12022 #include <time.h>
12023 #include <wchar.h>
12024             wint_t foo = (wchar_t)'\0';
12025 int
12026 main ()
12027 {
12028
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 if ac_fn_c_try_compile "$LINENO"; then :
12034   gt_cv_c_wint_t=yes
12035 else
12036   gt_cv_c_wint_t=no
12037 fi
12038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039 fi
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12041 $as_echo "$gt_cv_c_wint_t" >&6; }
12042   if test $gt_cv_c_wint_t = yes; then
12043
12044 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12045
12046   fi
12047
12048
12049
12050
12051
12052   if test $ac_cv_header_features_h = yes; then
12053     HAVE_FEATURES_H=1
12054   else
12055     HAVE_FEATURES_H=0
12056   fi
12057
12058
12059
12060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
12061 $as_echo_n "checking for inttypes.h... " >&6; }
12062 if ${gl_cv_header_inttypes_h+:} false; then :
12063   $as_echo_n "(cached) " >&6
12064 else
12065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12066 /* end confdefs.h.  */
12067
12068 #include <sys/types.h>
12069 #include <inttypes.h>
12070
12071 int
12072 main ()
12073 {
12074 uintmax_t i = (uintmax_t) -1; return !i;
12075   ;
12076   return 0;
12077 }
12078 _ACEOF
12079 if ac_fn_c_try_compile "$LINENO"; then :
12080   gl_cv_header_inttypes_h=yes
12081 else
12082   gl_cv_header_inttypes_h=no
12083 fi
12084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12085 fi
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
12087 $as_echo "$gl_cv_header_inttypes_h" >&6; }
12088   if test $gl_cv_header_inttypes_h = yes; then
12089
12090 cat >>confdefs.h <<_ACEOF
12091 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
12092 _ACEOF
12093
12094   fi
12095
12096
12097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
12098 $as_echo_n "checking for stdint.h... " >&6; }
12099 if ${gl_cv_header_stdint_h+:} false; then :
12100   $as_echo_n "(cached) " >&6
12101 else
12102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12103 /* end confdefs.h.  */
12104 #include <sys/types.h>
12105             #include <stdint.h>
12106 int
12107 main ()
12108 {
12109 uintmax_t i = (uintmax_t) -1; return !i;
12110   ;
12111   return 0;
12112 }
12113 _ACEOF
12114 if ac_fn_c_try_compile "$LINENO"; then :
12115   gl_cv_header_stdint_h=yes
12116 else
12117   gl_cv_header_stdint_h=no
12118 fi
12119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12120 fi
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
12122 $as_echo "$gl_cv_header_stdint_h" >&6; }
12123   if test $gl_cv_header_stdint_h = yes; then
12124
12125 cat >>confdefs.h <<_ACEOF
12126 #define HAVE_STDINT_H_WITH_UINTMAX 1
12127 _ACEOF
12128
12129   fi
12130
12131
12132
12133
12134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
12135 $as_echo_n "checking for intmax_t... " >&6; }
12136 if ${gt_cv_c_intmax_t+:} false; then :
12137   $as_echo_n "(cached) " >&6
12138 else
12139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12140 /* end confdefs.h.  */
12141
12142 #include <stddef.h>
12143 #include <stdlib.h>
12144 #if HAVE_STDINT_H_WITH_UINTMAX
12145 #include <stdint.h>
12146 #endif
12147 #if HAVE_INTTYPES_H_WITH_UINTMAX
12148 #include <inttypes.h>
12149 #endif
12150
12151 int
12152 main ()
12153 {
12154 intmax_t x = -1; return !x;
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 if ac_fn_c_try_compile "$LINENO"; then :
12160   gt_cv_c_intmax_t=yes
12161 else
12162   gt_cv_c_intmax_t=no
12163 fi
12164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12165 fi
12166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
12167 $as_echo "$gt_cv_c_intmax_t" >&6; }
12168   if test $gt_cv_c_intmax_t = yes; then
12169
12170 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
12171
12172   else
12173
12174     test $ac_cv_type_long_long_int = yes \
12175       && ac_type='long long' \
12176       || ac_type='long'
12177
12178 cat >>confdefs.h <<_ACEOF
12179 #define intmax_t $ac_type
12180 _ACEOF
12181
12182   fi
12183
12184
12185   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
12186 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
12187 if ${gl_cv_cc_double_expbit0+:} false; then :
12188   $as_echo_n "(cached) " >&6
12189 else
12190
12191       if test "$cross_compiling" = yes; then :
12192
12193                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h.  */
12195
12196 #if defined arm || defined __arm || defined __arm__
12197   mixed_endianness
12198 #endif
12199
12200 _ACEOF
12201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12202   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
12203   gl_cv_cc_double_expbit0="unknown"
12204 else
12205
12206                                                          :
12207 if ${ac_cv_c_bigendian+:} false; then :
12208   $as_echo_n "(cached) " >&6
12209 else
12210   ac_cv_c_bigendian=unknown
12211     # See if we're dealing with a universal compiler.
12212     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12213 /* end confdefs.h.  */
12214 #ifndef __APPLE_CC__
12215                not a universal capable compiler
12216              #endif
12217              typedef int dummy;
12218
12219 _ACEOF
12220 if ac_fn_c_try_compile "$LINENO"; then :
12221
12222         # Check for potential -arch flags.  It is not universal unless
12223         # there are at least two -arch flags with different values.
12224         ac_arch=
12225         ac_prev=
12226         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12227          if test -n "$ac_prev"; then
12228            case $ac_word in
12229              i?86 | x86_64 | ppc | ppc64)
12230                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12231                  ac_arch=$ac_word
12232                else
12233                  ac_cv_c_bigendian=universal
12234                  break
12235                fi
12236                ;;
12237            esac
12238            ac_prev=
12239          elif test "x$ac_word" = "x-arch"; then
12240            ac_prev=arch
12241          fi
12242        done
12243 fi
12244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12245     if test $ac_cv_c_bigendian = unknown; then
12246       # See if sys/param.h defines the BYTE_ORDER macro.
12247       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12248 /* end confdefs.h.  */
12249 #include <sys/types.h>
12250              #include <sys/param.h>
12251
12252 int
12253 main ()
12254 {
12255 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12256                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12257                      && LITTLE_ENDIAN)
12258               bogus endian macros
12259              #endif
12260
12261   ;
12262   return 0;
12263 }
12264 _ACEOF
12265 if ac_fn_c_try_compile "$LINENO"; then :
12266   # It does; now see whether it defined to BIG_ENDIAN or not.
12267          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12268 /* end confdefs.h.  */
12269 #include <sys/types.h>
12270                 #include <sys/param.h>
12271
12272 int
12273 main ()
12274 {
12275 #if BYTE_ORDER != BIG_ENDIAN
12276                  not big endian
12277                 #endif
12278
12279   ;
12280   return 0;
12281 }
12282 _ACEOF
12283 if ac_fn_c_try_compile "$LINENO"; then :
12284   ac_cv_c_bigendian=yes
12285 else
12286   ac_cv_c_bigendian=no
12287 fi
12288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12289 fi
12290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12291     fi
12292     if test $ac_cv_c_bigendian = unknown; then
12293       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12294       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295 /* end confdefs.h.  */
12296 #include <limits.h>
12297
12298 int
12299 main ()
12300 {
12301 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12302               bogus endian macros
12303              #endif
12304
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 if ac_fn_c_try_compile "$LINENO"; then :
12310   # It does; now see whether it defined to _BIG_ENDIAN or not.
12311          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312 /* end confdefs.h.  */
12313 #include <limits.h>
12314
12315 int
12316 main ()
12317 {
12318 #ifndef _BIG_ENDIAN
12319                  not big endian
12320                 #endif
12321
12322   ;
12323   return 0;
12324 }
12325 _ACEOF
12326 if ac_fn_c_try_compile "$LINENO"; then :
12327   ac_cv_c_bigendian=yes
12328 else
12329   ac_cv_c_bigendian=no
12330 fi
12331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12332 fi
12333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12334     fi
12335     if test $ac_cv_c_bigendian = unknown; then
12336       # Compile a test program.
12337       if test "$cross_compiling" = yes; then :
12338   # Try to guess by grepping values from an object file.
12339          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340 /* end confdefs.h.  */
12341 short int ascii_mm[] =
12342                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12343                 short int ascii_ii[] =
12344                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12345                 int use_ascii (int i) {
12346                   return ascii_mm[i] + ascii_ii[i];
12347                 }
12348                 short int ebcdic_ii[] =
12349                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12350                 short int ebcdic_mm[] =
12351                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12352                 int use_ebcdic (int i) {
12353                   return ebcdic_mm[i] + ebcdic_ii[i];
12354                 }
12355                 extern int foo;
12356
12357 int
12358 main ()
12359 {
12360 return use_ascii (foo) == use_ebcdic (foo);
12361   ;
12362   return 0;
12363 }
12364 _ACEOF
12365 if ac_fn_c_try_compile "$LINENO"; then :
12366   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12367               ac_cv_c_bigendian=yes
12368             fi
12369             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12370               if test "$ac_cv_c_bigendian" = unknown; then
12371                 ac_cv_c_bigendian=no
12372               else
12373                 # finding both strings is unlikely to happen, but who knows?
12374                 ac_cv_c_bigendian=unknown
12375               fi
12376             fi
12377 fi
12378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12379 else
12380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12381 /* end confdefs.h.  */
12382 $ac_includes_default
12383 int
12384 main ()
12385 {
12386
12387              /* Are we little or big endian?  From Harbison&Steele.  */
12388              union
12389              {
12390                long int l;
12391                char c[sizeof (long int)];
12392              } u;
12393              u.l = 1;
12394              return u.c[sizeof (long int) - 1] == 1;
12395
12396   ;
12397   return 0;
12398 }
12399 _ACEOF
12400 if ac_fn_c_try_run "$LINENO"; then :
12401   ac_cv_c_bigendian=no
12402 else
12403   ac_cv_c_bigendian=yes
12404 fi
12405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12406   conftest.$ac_objext conftest.beam conftest.$ac_ext
12407 fi
12408
12409     fi
12410 fi
12411 :
12412  case $ac_cv_c_bigendian in #(
12413    yes)
12414      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
12415    no)
12416      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
12417    universal)
12418
12419 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12420
12421      ;; #(
12422    *)
12423      gl_cv_cc_double_expbit0="unknown" ;;
12424  esac
12425
12426
12427 fi
12428 rm -f conftest*
12429
12430
12431 else
12432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12433 /* end confdefs.h.  */
12434
12435 #include <float.h>
12436 #include <stddef.h>
12437 #include <stdio.h>
12438 #include <string.h>
12439 #define NWORDS \
12440   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12441 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12442 static unsigned int ored_words[NWORDS];
12443 static unsigned int anded_words[NWORDS];
12444 static void add_to_ored_words (double x)
12445 {
12446   memory_double m;
12447   size_t i;
12448   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
12449   memset (&m, 0, sizeof (memory_double));
12450   m.value = x;
12451   for (i = 0; i < NWORDS; i++)
12452     {
12453       ored_words[i] |= m.word[i];
12454       anded_words[i] &= m.word[i];
12455     }
12456 }
12457 int main ()
12458 {
12459   size_t j;
12460   FILE *fp = fopen ("conftest.out", "w");
12461   if (fp == NULL)
12462     return 1;
12463   for (j = 0; j < NWORDS; j++)
12464     anded_words[j] = ~ (unsigned int) 0;
12465   add_to_ored_words (0.25);
12466   add_to_ored_words (0.5);
12467   add_to_ored_words (1.0);
12468   add_to_ored_words (2.0);
12469   add_to_ored_words (4.0);
12470   /* Remove bits that are common (e.g. if representation of the first mantissa
12471      bit is explicit).  */
12472   for (j = 0; j < NWORDS; j++)
12473     ored_words[j] &= ~anded_words[j];
12474   /* Now find the nonzero word.  */
12475   for (j = 0; j < NWORDS; j++)
12476     if (ored_words[j] != 0)
12477       break;
12478   if (j < NWORDS)
12479     {
12480       size_t i;
12481       for (i = j + 1; i < NWORDS; i++)
12482         if (ored_words[i] != 0)
12483           {
12484             fprintf (fp, "unknown");
12485             return (fclose (fp) != 0);
12486           }
12487       for (i = 0; ; i++)
12488         if ((ored_words[j] >> i) & 1)
12489           {
12490             fprintf (fp, "word %d bit %d", (int) j, (int) i);
12491             return (fclose (fp) != 0);
12492           }
12493     }
12494   fprintf (fp, "unknown");
12495   return (fclose (fp) != 0);
12496 }
12497
12498 _ACEOF
12499 if ac_fn_c_try_run "$LINENO"; then :
12500   gl_cv_cc_double_expbit0=`cat conftest.out`
12501 else
12502   gl_cv_cc_double_expbit0="unknown"
12503 fi
12504 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12505   conftest.$ac_objext conftest.beam conftest.$ac_ext
12506 fi
12507
12508       rm -f conftest.out
12509
12510 fi
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12512 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
12513   case "$gl_cv_cc_double_expbit0" in
12514     word*bit*)
12515       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12516       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
12517
12518 cat >>confdefs.h <<_ACEOF
12519 #define DBL_EXPBIT0_WORD $word
12520 _ACEOF
12521
12522
12523 cat >>confdefs.h <<_ACEOF
12524 #define DBL_EXPBIT0_BIT $bit
12525 _ACEOF
12526
12527       ;;
12528   esac
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
12539 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
12540 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
12541   $as_echo_n "(cached) " >&6
12542 else
12543
12544       if test "$cross_compiling" = yes; then :
12545
12546          case "$host_os" in
12547                                  # Guess yes on glibc systems.
12548            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
12549                                  # Guess yes on FreeBSD >= 5.
12550            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
12551            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12552                                  # Guess yes on MacOS X >= 10.3.
12553            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
12554            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
12555                                  # Guess yes on OpenBSD >= 3.9.
12556            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
12557                                  gl_cv_func_snprintf_retval_c99="guessing no";;
12558            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
12559                                  # Guess yes on Solaris >= 2.10.
12560            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
12561            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
12562                                  # Guess yes on AIX >= 4.
12563            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
12564            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
12565                                  # Guess yes on NetBSD >= 3.
12566            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
12567                                  gl_cv_func_snprintf_retval_c99="guessing no";;
12568            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
12569                                  # Guess yes on BeOS.
12570            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
12571                                  # If we don't know, assume the worst.
12572            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
12573          esac
12574
12575 else
12576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12577 /* end confdefs.h.  */
12578
12579 #include <stdio.h>
12580 #include <string.h>
12581 #if HAVE_SNPRINTF
12582 # define my_snprintf snprintf
12583 #else
12584 # include <stdarg.h>
12585 static int my_snprintf (char *buf, int size, const char *format, ...)
12586 {
12587   va_list args;
12588   int ret;
12589   va_start (args, format);
12590   ret = vsnprintf (buf, size, format, args);
12591   va_end (args);
12592   return ret;
12593 }
12594 #endif
12595 static char buf[100];
12596 int main ()
12597 {
12598   strcpy (buf, "ABCDEF");
12599   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
12600     return 1;
12601   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
12602     return 2;
12603   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
12604     return 3;
12605   return 0;
12606 }
12607 _ACEOF
12608 if ac_fn_c_try_run "$LINENO"; then :
12609   gl_cv_func_snprintf_retval_c99=yes
12610 else
12611   gl_cv_func_snprintf_retval_c99=no
12612 fi
12613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12614   conftest.$ac_objext conftest.beam conftest.$ac_ext
12615 fi
12616
12617
12618 fi
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
12620 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
12621
12622
12623
12624
12625
12626
12627
12628   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
12629 do :
12630   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12631 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12632 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12633   cat >>confdefs.h <<_ACEOF
12634 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12635 _ACEOF
12636
12637 fi
12638 done
12639
12640       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
12641 "
12642 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
12643   ac_have_decl=1
12644 else
12645   ac_have_decl=0
12646 fi
12647
12648 cat >>confdefs.h <<_ACEOF
12649 #define HAVE_DECL__SNPRINTF $ac_have_decl
12650 _ACEOF
12651
12652
12653
12654   case "$gl_cv_func_snprintf_retval_c99" in
12655     *yes)
12656
12657 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
12658
12659       ;;
12660   esac
12661
12662
12663             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
12664 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
12665 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
12666   $as_echo_n "(cached) " >&6
12667 else
12668   gl_cv_header_wchar_h_correct_inline=yes
12669      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670 /* end confdefs.h.  */
12671
12672        #define wcstod renamed_wcstod
12673 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12674    <wchar.h>.
12675    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12676    included before <wchar.h>.  */
12677 #include <stddef.h>
12678 #include <stdio.h>
12679 #include <time.h>
12680 #include <wchar.h>
12681 extern int zero (void);
12682 int main () { return zero(); }
12683
12684 _ACEOF
12685      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12686   (eval $ac_compile) 2>&5
12687   ac_status=$?
12688   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12689   test $ac_status = 0; }; then
12690        mv conftest.$ac_objext conftest1.$ac_objext
12691        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12692 /* end confdefs.h.  */
12693
12694          #define wcstod renamed_wcstod
12695 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12696    <wchar.h>.
12697    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12698    included before <wchar.h>.  */
12699 #include <stddef.h>
12700 #include <stdio.h>
12701 #include <time.h>
12702 #include <wchar.h>
12703 int zero (void) { return 0; }
12704
12705 _ACEOF
12706        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12707   (eval $ac_compile) 2>&5
12708   ac_status=$?
12709   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12710   test $ac_status = 0; }; then
12711          mv conftest.$ac_objext conftest2.$ac_objext
12712          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
12713            :
12714          else
12715            gl_cv_header_wchar_h_correct_inline=no
12716          fi
12717        fi
12718      fi
12719      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
12720
12721 fi
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
12723 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
12724   if test $gl_cv_header_wchar_h_correct_inline = no; then
12725     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
12726 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
12727 C99 mode. You have four options:
12728   - Add the flag -fgnu89-inline to CC and reconfigure, or
12729   - Fix your include files, using parts of
12730     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
12731   - Use a gcc version older than 4.3, or
12732   - Don't use the flags -std=c99 or -std=gnu99.
12733 Configuration aborted." "$LINENO" 5
12734   fi
12735
12736
12737   GNULIB_ISWBLANK=0;
12738   GNULIB_WCTYPE=0;
12739   GNULIB_ISWCTYPE=0;
12740   GNULIB_WCTRANS=0;
12741   GNULIB_TOWCTRANS=0;
12742     HAVE_ISWBLANK=1;
12743   HAVE_WCTYPE_T=1;
12744   HAVE_WCTRANS_T=1;
12745   REPLACE_ISWBLANK=0;
12746
12747
12748
12749
12750
12751
12752    if false; then
12753   GL_COND_LIBTOOL_TRUE=
12754   GL_COND_LIBTOOL_FALSE='#'
12755 else
12756   GL_COND_LIBTOOL_TRUE='#'
12757   GL_COND_LIBTOOL_FALSE=
12758 fi
12759
12760   gl_cond_libtool=false
12761   gl_libdeps=
12762   gl_ltlibdeps=
12763   gl_m4_base='m4'
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773   gl_source_base='lib'
12774
12775
12776   if test $ac_cv_func_alloca_works = no; then
12777     :
12778   fi
12779
12780   # Define an additional variable used in the Makefile substitution.
12781   if test $ac_cv_working_alloca_h = yes; then
12782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
12783 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
12784 if ${gl_cv_rpl_alloca+:} false; then :
12785   $as_echo_n "(cached) " >&6
12786 else
12787
12788       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12789 /* end confdefs.h.  */
12790
12791 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
12792         Need own alloca
12793 #endif
12794
12795 _ACEOF
12796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12797   $EGREP "Need own alloca" >/dev/null 2>&1; then :
12798   gl_cv_rpl_alloca=yes
12799 else
12800   gl_cv_rpl_alloca=no
12801 fi
12802 rm -f conftest*
12803
12804
12805 fi
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
12807 $as_echo "$gl_cv_rpl_alloca" >&6; }
12808     if test $gl_cv_rpl_alloca = yes; then
12809
12810 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12811
12812       ALLOCA_H=alloca.h
12813     else
12814                   ALLOCA_H=
12815     fi
12816   else
12817     ALLOCA_H=alloca.h
12818   fi
12819
12820    if test -n "$ALLOCA_H"; then
12821   GL_GENERATE_ALLOCA_H_TRUE=
12822   GL_GENERATE_ALLOCA_H_FALSE='#'
12823 else
12824   GL_GENERATE_ALLOCA_H_TRUE='#'
12825   GL_GENERATE_ALLOCA_H_FALSE=
12826 fi
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838   if test $ac_cv_func_canonicalize_file_name = no; then
12839     HAVE_CANONICALIZE_FILE_NAME=0
12840     if test $ac_cv_func_realpath = no; then
12841       HAVE_REALPATH=0
12842     elif test "$gl_cv_func_realpath_works" != yes; then
12843       REPLACE_REALPATH=1
12844     fi
12845   elif test "$gl_cv_func_realpath_works" != yes; then
12846     REPLACE_CANONICALIZE_FILE_NAME=1
12847     REPLACE_REALPATH=1
12848   fi
12849
12850 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
12851
12852
12853
12854
12855
12856
12857
12858
12859   gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
12860
12861 fi
12862
12863
12864 cat >>confdefs.h <<_ACEOF
12865 #define GNULIB_CANONICALIZE_LGPL 1
12866 _ACEOF
12867
12868
12869
12870
12871
12872
12873
12874           GNULIB_CANONICALIZE_FILE_NAME=1
12875
12876
12877
12878
12879
12880 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
12881
12882
12883
12884
12885
12886
12887
12888
12889           GNULIB_REALPATH=1
12890
12891
12892
12893
12894
12895 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
12896
12897
12898
12899
12900
12901
12902
12903
12904           GNULIB_CHDIR=1
12905
12906
12907
12908
12909
12910 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
12911
12912
12913
12914
12915
12916
12917   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
12918   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
12919
12920   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
12921   # programs in the package would end up linked with that potentially-shared
12922   # library, inducing unnecessary run-time overhead.
12923   LIB_CLOCK_GETTIME=
12924
12925   gl_saved_libs=$LIBS
12926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12927 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12928 if ${ac_cv_search_clock_gettime+:} false; then :
12929   $as_echo_n "(cached) " >&6
12930 else
12931   ac_func_search_save_LIBS=$LIBS
12932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12933 /* end confdefs.h.  */
12934
12935 /* Override any GCC internal prototype to avoid an error.
12936    Use char because int might match the return type of a GCC
12937    builtin and then its argument prototype would still apply.  */
12938 #ifdef __cplusplus
12939 extern "C"
12940 #endif
12941 char clock_gettime ();
12942 int
12943 main ()
12944 {
12945 return clock_gettime ();
12946   ;
12947   return 0;
12948 }
12949 _ACEOF
12950 for ac_lib in '' rt posix4; do
12951   if test -z "$ac_lib"; then
12952     ac_res="none required"
12953   else
12954     ac_res=-l$ac_lib
12955     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12956   fi
12957   if ac_fn_c_try_link "$LINENO"; then :
12958   ac_cv_search_clock_gettime=$ac_res
12959 fi
12960 rm -f core conftest.err conftest.$ac_objext \
12961     conftest$ac_exeext
12962   if ${ac_cv_search_clock_gettime+:} false; then :
12963   break
12964 fi
12965 done
12966 if ${ac_cv_search_clock_gettime+:} false; then :
12967
12968 else
12969   ac_cv_search_clock_gettime=no
12970 fi
12971 rm conftest.$ac_ext
12972 LIBS=$ac_func_search_save_LIBS
12973 fi
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12975 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12976 ac_res=$ac_cv_search_clock_gettime
12977 if test "$ac_res" != no; then :
12978   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12979   test "$ac_cv_search_clock_gettime" = "none required" ||
12980                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
12981 fi
12982
12983     for ac_func in clock_gettime clock_settime
12984 do :
12985   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12986 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12987 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12988   cat >>confdefs.h <<_ACEOF
12989 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12990 _ACEOF
12991
12992 fi
12993 done
12994
12995   LIBS=$gl_saved_libs
12996
12997
12998
12999
13000   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13001     REPLACE_CLOSE=1
13002   fi
13003
13004
13005
13006
13007
13008   if test $ac_cv_header_sys_socket_h != yes; then
13009                     for ac_header in winsock2.h
13010 do :
13011   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13012 if test "x$ac_cv_header_winsock2_h" = xyes; then :
13013   cat >>confdefs.h <<_ACEOF
13014 #define HAVE_WINSOCK2_H 1
13015 _ACEOF
13016
13017 fi
13018
13019 done
13020
13021   fi
13022   if test "$ac_cv_header_winsock2_h" = yes; then
13023     HAVE_WINSOCK2_H=1
13024     UNISTD_H_HAVE_WINSOCK2_H=1
13025     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13026   else
13027     HAVE_WINSOCK2_H=0
13028   fi
13029
13030
13031     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13032                         REPLACE_CLOSE=1
13033     fi
13034
13035
13036
13037 if test $REPLACE_CLOSE = 1; then
13038
13039
13040
13041
13042
13043
13044
13045
13046   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13047
13048 fi
13049
13050
13051
13052
13053
13054           GNULIB_CLOSE=1
13055
13056
13057
13058
13059
13060 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13061
13062
13063
13064
13065
13066
13067   for ac_func in closedir
13068 do :
13069   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
13070 if test "x$ac_cv_func_closedir" = xyes; then :
13071   cat >>confdefs.h <<_ACEOF
13072 #define HAVE_CLOSEDIR 1
13073 _ACEOF
13074
13075 fi
13076 done
13077
13078   if test $ac_cv_func_closedir = no; then
13079     HAVE_CLOSEDIR=0
13080   fi
13081
13082
13083 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13084
13085
13086
13087
13088
13089
13090
13091
13092   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13093
13094 fi
13095
13096
13097
13098
13099
13100           GNULIB_CLOSEDIR=1
13101
13102
13103
13104
13105
13106 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13107
13108
13109
13110
13111           if test "x$datarootdir" = x; then
13112     datarootdir='${datadir}'
13113
13114   fi
13115     if test "x$docdir" = x; then
13116     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
13117
13118   fi
13119     if test "x$htmldir" = x; then
13120     htmldir='${docdir}'
13121
13122   fi
13123   if test "x$dvidir" = x; then
13124     dvidir='${docdir}'
13125
13126   fi
13127   if test "x$pdfdir" = x; then
13128     pdfdir='${docdir}'
13129
13130   fi
13131   if test "x$psdir" = x; then
13132     psdir='${docdir}'
13133
13134   fi
13135   if test "x$lispdir" = x; then
13136     lispdir='${datarootdir}/emacs/site-lisp'
13137
13138   fi
13139   if test "x$localedir" = x; then
13140     localedir='${datarootdir}/locale'
13141
13142   fi
13143
13144       pkglibexecdir='${libexecdir}/${PACKAGE}'
13145
13146
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13148 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
13149 if ${gl_cv_struct_dirent_d_ino+:} false; then :
13150   $as_echo_n "(cached) " >&6
13151 else
13152   if test "$cross_compiling" = yes; then :
13153   gl_cv_struct_dirent_d_ino=no
13154 else
13155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13156 /* end confdefs.h.  */
13157 #include <sys/types.h>
13158              #include <sys/stat.h>
13159              #include <dirent.h>
13160
13161 int
13162 main ()
13163 {
13164 DIR *dp = opendir (".");
13165              struct dirent *e;
13166              struct stat st;
13167              if (! dp)
13168                return 1;
13169              e = readdir (dp);
13170              if (! e)
13171                return 2;
13172              if (stat (e->d_name, &st) != 0)
13173                return 3;
13174              if (e->d_ino != st.st_ino)
13175                return 4;
13176              return 0;
13177
13178   ;
13179   return 0;
13180 }
13181 _ACEOF
13182 if ac_fn_c_try_run "$LINENO"; then :
13183   gl_cv_struct_dirent_d_ino=yes
13184 else
13185   gl_cv_struct_dirent_d_ino=no
13186 fi
13187 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13188   conftest.$ac_objext conftest.beam conftest.$ac_ext
13189 fi
13190
13191 fi
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
13193 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
13194    if test $gl_cv_struct_dirent_d_ino = yes; then
13195
13196 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
13197
13198    fi
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213      if test $gl_cv_have_include_next = yes; then
13214        gl_cv_next_dirent_h='<'dirent.h'>'
13215      else
13216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
13217 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
13218 if ${gl_cv_next_dirent_h+:} false; then :
13219   $as_echo_n "(cached) " >&6
13220 else
13221
13222              if test $ac_cv_header_dirent_h = yes; then
13223
13224
13225                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226 /* end confdefs.h.  */
13227 #include <dirent.h>
13228
13229 _ACEOF
13230                                                                                                                         case "$host_os" in
13231                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13232                  *)    gl_absname_cpp="$ac_cpp" ;;
13233                esac
13234
13235                case "$host_os" in
13236                  mingw*)
13237                                                                                                                                      gl_dirsep_regex='[/\\]'
13238                    ;;
13239                  *)
13240                    gl_dirsep_regex='\/'
13241                    ;;
13242                esac
13243                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13244
13245                gl_header_literal_regex=`echo 'dirent.h' \
13246                                         | sed -e "$gl_make_literal_regex_sed"`
13247                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13248                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13249                    s|^/[^/]|//&|
13250                    p
13251                    q
13252                  }'
13253                                                             gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13254                       sed -n "$gl_absolute_header_sed"`'"'
13255           else
13256                gl_cv_next_dirent_h='<'dirent.h'>'
13257              fi
13258
13259
13260 fi
13261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
13262 $as_echo "$gl_cv_next_dirent_h" >&6; }
13263      fi
13264      NEXT_DIRENT_H=$gl_cv_next_dirent_h
13265
13266      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13267        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13268        gl_next_as_first_directive='<'dirent.h'>'
13269      else
13270        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13271        gl_next_as_first_directive=$gl_cv_next_dirent_h
13272      fi
13273      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
13274
13275
13276
13277
13278   if test $ac_cv_header_dirent_h = yes; then
13279     HAVE_DIRENT_H=1
13280   else
13281     HAVE_DIRENT_H=0
13282   fi
13283
13284
13285
13286     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
13287     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13288     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13289 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13290 if eval \${$as_gl_Symbol+:} false; then :
13291   $as_echo_n "(cached) " >&6
13292 else
13293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13294 /* end confdefs.h.  */
13295 #include <dirent.h>
13296
13297 int
13298 main ()
13299 {
13300 #undef $gl_func
13301   (void) $gl_func;
13302   ;
13303   return 0;
13304 }
13305 _ACEOF
13306 if ac_fn_c_try_compile "$LINENO"; then :
13307   eval "$as_gl_Symbol=yes"
13308 else
13309   eval "$as_gl_Symbol=no"
13310 fi
13311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312 fi
13313 eval ac_res=\$$as_gl_Symbol
13314                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13315 $as_echo "$ac_res" >&6; }
13316     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13317   cat >>confdefs.h <<_ACEOF
13318 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13319 _ACEOF
13320
13321                      eval ac_cv_have_decl_$gl_func=yes
13322 fi
13323       done
13324
13325
13326
13327
13328
13329
13330
13331 cat >>confdefs.h <<_ACEOF
13332 #define GNULIB_DIRENT_SAFER 1
13333 _ACEOF
13334
13335
13336
13337
13338
13339
13340
13341   for ac_func in dirfd
13342 do :
13343   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13344 if test "x$ac_cv_func_dirfd" = xyes; then :
13345   cat >>confdefs.h <<_ACEOF
13346 #define HAVE_DIRFD 1
13347 _ACEOF
13348
13349 fi
13350 done
13351
13352   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13353       #include <dirent.h>
13354 "
13355 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
13356   ac_have_decl=1
13357 else
13358   ac_have_decl=0
13359 fi
13360
13361 cat >>confdefs.h <<_ACEOF
13362 #define HAVE_DECL_DIRFD $ac_have_decl
13363 _ACEOF
13364
13365   if test $ac_cv_have_decl_dirfd = no; then
13366     HAVE_DECL_DIRFD=0
13367   fi
13368
13369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13370 $as_echo_n "checking whether dirfd is a macro... " >&6; }
13371 if ${gl_cv_func_dirfd_macro+:} false; then :
13372   $as_echo_n "(cached) " >&6
13373 else
13374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13375 /* end confdefs.h.  */
13376
13377 #include <sys/types.h>
13378 #include <dirent.h>
13379 #ifdef dirfd
13380  dirent_header_defines_dirfd
13381 #endif
13382 _ACEOF
13383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13384   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13385   gl_cv_func_dirfd_macro=yes
13386 else
13387   gl_cv_func_dirfd_macro=no
13388 fi
13389 rm -f conftest*
13390
13391 fi
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13393 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
13394
13395   # Use the replacement only if we have no function or macro with that name.
13396   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
13397     if test $ac_cv_have_decl_dirfd = yes; then
13398       # If the system declares dirfd already, let's declare rpl_dirfd instead.
13399       REPLACE_DIRFD=1
13400     fi
13401   fi
13402
13403 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
13404
13405
13406
13407
13408
13409
13410
13411
13412   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
13413
13414
13415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13416 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13417 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
13418   $as_echo_n "(cached) " >&6
13419 else
13420
13421       dirfd_save_CFLAGS=$CFLAGS
13422       for ac_expr in d_fd dd_fd; do
13423
13424         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13425         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13426 /* end confdefs.h.  */
13427
13428            #include <sys/types.h>
13429            #include <dirent.h>
13430 int
13431 main ()
13432 {
13433 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13434   ;
13435   return 0;
13436 }
13437 _ACEOF
13438 if ac_fn_c_try_compile "$LINENO"; then :
13439   dir_fd_found=yes
13440
13441 fi
13442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13443         CFLAGS=$dirfd_save_CFLAGS
13444         test "$dir_fd_found" = yes && break
13445       done
13446       test "$dir_fd_found" = yes || ac_expr=no_such_member
13447
13448       gl_cv_sys_dir_fd_member_name=$ac_expr
13449
13450
13451 fi
13452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13453 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13454   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13455
13456 cat >>confdefs.h <<_ACEOF
13457 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13458 _ACEOF
13459
13460   fi
13461
13462
13463 fi
13464
13465
13466
13467
13468
13469           GNULIB_DIRFD=1
13470
13471
13472
13473
13474
13475 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
13476
13477
13478
13479
13480
13481
13482
13483
13484 cat >>confdefs.h <<_ACEOF
13485 #define GNULIB_DIRNAME 1
13486 _ACEOF
13487
13488
13489
13490
13491
13492
13493
13494
13495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13496 $as_echo_n "checking whether // is distinct from /... " >&6; }
13497 if ${gl_cv_double_slash_root+:} false; then :
13498   $as_echo_n "(cached) " >&6
13499 else
13500    if test x"$cross_compiling" = xyes ; then
13501         # When cross-compiling, there is no way to tell whether // is special
13502         # short of a list of hosts.  However, the only known hosts to date
13503         # that have a distinct // are Apollo DomainOS (too old to port to),
13504         # Cygwin, and z/OS.  If anyone knows of another system for which // has
13505         # special semantics and is distinct from /, please report it to
13506         # <bug-gnulib@gnu.org>.
13507         case $host in
13508           *-cygwin | i370-ibm-openedition)
13509             gl_cv_double_slash_root=yes ;;
13510           *)
13511             # Be optimistic and assume that / and // are the same when we
13512             # don't know.
13513             gl_cv_double_slash_root='unknown, assuming no' ;;
13514         esac
13515       else
13516         set x `ls -di / // 2>/dev/null`
13517         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13518           gl_cv_double_slash_root=no
13519         else
13520           gl_cv_double_slash_root=yes
13521         fi
13522       fi
13523 fi
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13525 $as_echo "$gl_cv_double_slash_root" >&6; }
13526   if test "$gl_cv_double_slash_root" = yes; then
13527
13528 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
13529
13530   fi
13531
13532
13533
13534
13535
13536
13537 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
13538
13539
13540   if test $HAVE_DUP2 = 1; then
13541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
13542 $as_echo_n "checking whether dup2 works... " >&6; }
13543 if ${gl_cv_func_dup2_works+:} false; then :
13544   $as_echo_n "(cached) " >&6
13545 else
13546   if test "$cross_compiling" = yes; then :
13547   case "$host_os" in
13548            mingw*) # on this platform, dup2 always returns 0 for success
13549              gl_cv_func_dup2_works=no;;
13550            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
13551              gl_cv_func_dup2_works=no;;
13552            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
13553                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
13554              gl_cv_func_dup2_works=no;;
13555            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
13556              gl_cv_func_dup2_works=no;;
13557            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
13558              gl_cv_func_dup2_works=no;;
13559            *) gl_cv_func_dup2_works=yes;;
13560          esac
13561 else
13562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13563 /* end confdefs.h.  */
13564
13565          #include <unistd.h>
13566 #include <fcntl.h>
13567 #include <errno.h>
13568 int
13569 main ()
13570 {
13571 int result = 0;
13572 #ifdef FD_CLOEXEC
13573             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
13574               result |= 1;
13575 #endif
13576             if (dup2 (1, 1) == 0)
13577               result |= 2;
13578 #ifdef FD_CLOEXEC
13579             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
13580               result |= 4;
13581 #endif
13582             close (0);
13583             if (dup2 (0, 0) != -1)
13584               result |= 8;
13585             /* Many gnulib modules require POSIX conformance of EBADF.  */
13586             if (dup2 (2, 1000000) == -1 && errno != EBADF)
13587               result |= 16;
13588             return result;
13589
13590   ;
13591   return 0;
13592 }
13593
13594 _ACEOF
13595 if ac_fn_c_try_run "$LINENO"; then :
13596   gl_cv_func_dup2_works=yes
13597 else
13598   gl_cv_func_dup2_works=no
13599 fi
13600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13601   conftest.$ac_objext conftest.beam conftest.$ac_ext
13602 fi
13603
13604
13605 fi
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
13607 $as_echo "$gl_cv_func_dup2_works" >&6; }
13608     if test "$gl_cv_func_dup2_works" = no; then
13609       REPLACE_DUP2=1
13610     fi
13611   fi
13612
13613
13614 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
13615
13616
13617
13618
13619
13620
13621
13622
13623   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
13624
13625
13626 fi
13627
13628
13629
13630
13631
13632           GNULIB_DUP2=1
13633
13634
13635
13636
13637
13638 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648           GNULIB_ENVIRON=1
13649
13650
13651
13652
13653
13654 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
13655
13656
13657
13658
13659
13660       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
13661 $as_echo_n "checking for error_at_line... " >&6; }
13662 if ${ac_cv_lib_error_at_line+:} false; then :
13663   $as_echo_n "(cached) " >&6
13664 else
13665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666 /* end confdefs.h.  */
13667 #include <error.h>
13668 int
13669 main ()
13670 {
13671 error_at_line (0, 0, "", 0, "an error occurred");
13672   ;
13673   return 0;
13674 }
13675 _ACEOF
13676 if ac_fn_c_try_link "$LINENO"; then :
13677   ac_cv_lib_error_at_line=yes
13678 else
13679   ac_cv_lib_error_at_line=no
13680 fi
13681 rm -f core conftest.err conftest.$ac_objext \
13682     conftest$ac_exeext conftest.$ac_ext
13683 fi
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
13685 $as_echo "$ac_cv_lib_error_at_line" >&6; }
13686
13687 if test $ac_cv_lib_error_at_line = no; then
13688
13689
13690
13691
13692
13693
13694
13695
13696   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
13697
13698
13699
13700
13701   :
13702
13703 fi
13704
13705
13706
13707
13708
13709
13710   if test $ac_cv_func_fcntl = no; then
13711
13712
13713
13714   if test $ac_cv_func_fcntl = no; then
13715     HAVE_FCNTL=0
13716   else
13717     REPLACE_FCNTL=1
13718   fi
13719
13720   else
13721             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
13722 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
13723 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
13724   $as_echo_n "(cached) " >&6
13725 else
13726   if test "$cross_compiling" = yes; then :
13727   # Guess that it works on glibc systems
13728           case $host_os in #((
13729             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
13730             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
13731           esac
13732 else
13733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13734 /* end confdefs.h.  */
13735
13736 #include <fcntl.h>
13737 #include <errno.h>
13738
13739 int
13740 main ()
13741 {
13742 int result = 0;
13743       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
13744       if (errno != EINVAL) result |= 2;
13745       return result;
13746
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 if ac_fn_c_try_run "$LINENO"; then :
13752   gl_cv_func_fcntl_f_dupfd_works=yes
13753 else
13754   gl_cv_func_fcntl_f_dupfd_works=no
13755 fi
13756 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13757   conftest.$ac_objext conftest.beam conftest.$ac_ext
13758 fi
13759
13760 fi
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
13762 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
13763     case $gl_cv_func_fcntl_f_dupfd_works in
13764       *yes) ;;
13765       *)
13766
13767
13768   if test $ac_cv_func_fcntl = no; then
13769     HAVE_FCNTL=0
13770   else
13771     REPLACE_FCNTL=1
13772   fi
13773
13774
13775 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
13776  ;;
13777     esac
13778
13779         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
13780 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
13781 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
13782   $as_echo_n "(cached) " >&6
13783 else
13784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h.  */
13786
13787 #include <fcntl.h>
13788 #ifndef F_DUPFD_CLOEXEC
13789 choke me
13790 #endif
13791
13792 int
13793 main ()
13794 {
13795
13796   ;
13797   return 0;
13798 }
13799 _ACEOF
13800 if ac_fn_c_try_compile "$LINENO"; then :
13801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802 /* end confdefs.h.  */
13803
13804 #ifdef __linux__
13805 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
13806    it to support the semantics on older kernels that failed with EINVAL.  */
13807 choke me
13808 #endif
13809
13810 int
13811 main ()
13812 {
13813
13814   ;
13815   return 0;
13816 }
13817 _ACEOF
13818 if ac_fn_c_try_compile "$LINENO"; then :
13819   gl_cv_func_fcntl_f_dupfd_cloexec=yes
13820 else
13821   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
13822 fi
13823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13824 else
13825   gl_cv_func_fcntl_f_dupfd_cloexec=no
13826 fi
13827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13828 fi
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
13830 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
13831     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
13832
13833
13834
13835   if test $ac_cv_func_fcntl = no; then
13836     HAVE_FCNTL=0
13837   else
13838     REPLACE_FCNTL=1
13839   fi
13840
13841           fi
13842   fi
13843
13844
13845 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
13846
13847
13848
13849
13850
13851
13852
13853
13854   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13855
13856 fi
13857
13858
13859
13860
13861
13862           GNULIB_FCNTL=1
13863
13864
13865
13866
13867
13868 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883      if test $gl_cv_have_include_next = yes; then
13884        gl_cv_next_fcntl_h='<'fcntl.h'>'
13885      else
13886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
13887 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
13888 if ${gl_cv_next_fcntl_h+:} false; then :
13889   $as_echo_n "(cached) " >&6
13890 else
13891
13892                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h.  */
13894 #include <fcntl.h>
13895
13896 _ACEOF
13897                                                                                                                         case "$host_os" in
13898                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13899                  *)    gl_absname_cpp="$ac_cpp" ;;
13900                esac
13901
13902                case "$host_os" in
13903                  mingw*)
13904                                                                                                                                      gl_dirsep_regex='[/\\]'
13905                    ;;
13906                  *)
13907                    gl_dirsep_regex='\/'
13908                    ;;
13909                esac
13910                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13911
13912                gl_header_literal_regex=`echo 'fcntl.h' \
13913                                         | sed -e "$gl_make_literal_regex_sed"`
13914                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13915                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13916                    s|^/[^/]|//&|
13917                    p
13918                    q
13919                  }'
13920                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13921                       sed -n "$gl_absolute_header_sed"`'"'
13922
13923
13924 fi
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
13926 $as_echo "$gl_cv_next_fcntl_h" >&6; }
13927      fi
13928      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
13929
13930      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13931        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13932        gl_next_as_first_directive='<'fcntl.h'>'
13933      else
13934        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13935        gl_next_as_first_directive=$gl_cv_next_fcntl_h
13936      fi
13937      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948     for gl_func in fcntl openat; do
13949     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13951 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13952 if eval \${$as_gl_Symbol+:} false; then :
13953   $as_echo_n "(cached) " >&6
13954 else
13955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13956 /* end confdefs.h.  */
13957 #include <fcntl.h>
13958
13959 int
13960 main ()
13961 {
13962 #undef $gl_func
13963   (void) $gl_func;
13964   ;
13965   return 0;
13966 }
13967 _ACEOF
13968 if ac_fn_c_try_compile "$LINENO"; then :
13969   eval "$as_gl_Symbol=yes"
13970 else
13971   eval "$as_gl_Symbol=no"
13972 fi
13973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13974 fi
13975 eval ac_res=\$$as_gl_Symbol
13976                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13977 $as_echo "$ac_res" >&6; }
13978     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13979   cat >>confdefs.h <<_ACEOF
13980 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13981 _ACEOF
13982
13983                      eval ac_cv_have_decl_$gl_func=yes
13984 fi
13985       done
13986
13987
13988
13989
13990
13991   FLOAT_H=
13992   REPLACE_FLOAT_LDBL=0
13993   case "$host_os" in
13994     aix* | beos* | openbsd* | mirbsd* | irix*)
13995       FLOAT_H=float.h
13996       ;;
13997     freebsd*)
13998       case "$host_cpu" in
13999         i[34567]86 )
14000           FLOAT_H=float.h
14001           ;;
14002         x86_64 )
14003           # On x86_64 systems, the C compiler may still be generating
14004           # 32-bit code.
14005           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14006 /* end confdefs.h.  */
14007 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
14008              yes
14009              #endif
14010 _ACEOF
14011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14012   $EGREP "yes" >/dev/null 2>&1; then :
14013
14014 else
14015   FLOAT_H=float.h
14016 fi
14017 rm -f conftest*
14018
14019           ;;
14020       esac
14021       ;;
14022     linux*)
14023       case "$host_cpu" in
14024         powerpc*)
14025           FLOAT_H=float.h
14026           ;;
14027       esac
14028       ;;
14029   esac
14030   case "$host_os" in
14031     aix* | freebsd* | linux*)
14032       if test -n "$FLOAT_H"; then
14033         REPLACE_FLOAT_LDBL=1
14034       fi
14035       ;;
14036   esac
14037
14038     REPLACE_ITOLD=0
14039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
14040 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
14041 if ${gl_cv_func_itold_works+:} false; then :
14042   $as_echo_n "(cached) " >&6
14043 else
14044
14045       if test "$cross_compiling" = yes; then :
14046   case "$host" in
14047            sparc*-*-linux*)
14048              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h.  */
14050 #if defined __LP64__ || defined __arch64__
14051                 yes
14052                 #endif
14053 _ACEOF
14054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14055   $EGREP "yes" >/dev/null 2>&1; then :
14056   gl_cv_func_itold_works="guessing no"
14057 else
14058   gl_cv_func_itold_works="guessing yes"
14059 fi
14060 rm -f conftest*
14061
14062              ;;
14063            *) gl_cv_func_itold_works="guessing yes" ;;
14064          esac
14065
14066 else
14067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14068 /* end confdefs.h.  */
14069
14070 int i = -1;
14071 volatile long double ld;
14072 int main ()
14073 {
14074   ld += i * 1.0L;
14075   if (ld > 0)
14076     return 1;
14077   return 0;
14078 }
14079 _ACEOF
14080 if ac_fn_c_try_run "$LINENO"; then :
14081   gl_cv_func_itold_works=yes
14082 else
14083   gl_cv_func_itold_works=no
14084 fi
14085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14086   conftest.$ac_objext conftest.beam conftest.$ac_ext
14087 fi
14088
14089
14090 fi
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
14092 $as_echo "$gl_cv_func_itold_works" >&6; }
14093   case "$gl_cv_func_itold_works" in
14094     *no)
14095       REPLACE_ITOLD=1
14096                   FLOAT_H=float.h
14097       ;;
14098   esac
14099
14100   if test -n "$FLOAT_H"; then
14101
14102
14103
14104
14105
14106
14107
14108
14109      if test $gl_cv_have_include_next = yes; then
14110        gl_cv_next_float_h='<'float.h'>'
14111      else
14112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
14113 $as_echo_n "checking absolute name of <float.h>... " >&6; }
14114 if ${gl_cv_next_float_h+:} false; then :
14115   $as_echo_n "(cached) " >&6
14116 else
14117
14118                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119 /* end confdefs.h.  */
14120 #include <float.h>
14121
14122 _ACEOF
14123                                                                                                                         case "$host_os" in
14124                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
14125                  *)    gl_absname_cpp="$ac_cpp" ;;
14126                esac
14127
14128                case "$host_os" in
14129                  mingw*)
14130                                                                                                                                      gl_dirsep_regex='[/\\]'
14131                    ;;
14132                  *)
14133                    gl_dirsep_regex='\/'
14134                    ;;
14135                esac
14136                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14137
14138                gl_header_literal_regex=`echo 'float.h' \
14139                                         | sed -e "$gl_make_literal_regex_sed"`
14140                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14141                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14142                    s|^/[^/]|//&|
14143                    p
14144                    q
14145                  }'
14146                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14147                       sed -n "$gl_absolute_header_sed"`'"'
14148
14149
14150 fi
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
14152 $as_echo "$gl_cv_next_float_h" >&6; }
14153      fi
14154      NEXT_FLOAT_H=$gl_cv_next_float_h
14155
14156      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14157        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14158        gl_next_as_first_directive='<'float.h'>'
14159      else
14160        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14161        gl_next_as_first_directive=$gl_cv_next_float_h
14162      fi
14163      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
14164
14165
14166
14167
14168   fi
14169
14170    if test -n "$FLOAT_H"; then
14171   GL_GENERATE_FLOAT_H_TRUE=
14172   GL_GENERATE_FLOAT_H_FALSE='#'
14173 else
14174   GL_GENERATE_FLOAT_H_TRUE='#'
14175   GL_GENERATE_FLOAT_H_FALSE=
14176 fi
14177
14178
14179
14180 if test $REPLACE_FLOAT_LDBL = 1; then
14181
14182
14183
14184
14185
14186
14187
14188
14189   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
14190
14191 fi
14192 if test $REPLACE_ITOLD = 1; then
14193
14194
14195
14196
14197
14198
14199
14200
14201   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
14202
14203 fi
14204
14205
14206
14207   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14208     REPLACE_FSTAT=1
14209   fi
14210
14211
14212 if test $REPLACE_FSTAT = 1; then
14213
14214
14215
14216
14217
14218
14219
14220
14221   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
14222
14223
14224
14225
14226 fi
14227
14228
14229
14230
14231
14232           GNULIB_FSTAT=1
14233
14234
14235
14236
14237
14238 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
14239
14240
14241
14242
14243
14244
14245   if test $ac_cv_func_getdtablesize != yes; then
14246     HAVE_GETDTABLESIZE=0
14247   fi
14248
14249 if test $HAVE_GETDTABLESIZE = 0; then
14250
14251
14252
14253
14254
14255
14256
14257
14258   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
14259
14260
14261
14262
14263 fi
14264
14265
14266
14267
14268
14269           GNULIB_GETDTABLESIZE=1
14270
14271
14272
14273
14274
14275 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
14276
14277
14278
14279
14280
14281
14282
14283
14284 if test $REPLACE_GETOPT = 1; then
14285
14286
14287
14288
14289
14290
14291
14292
14293   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
14304
14305
14306
14307
14308     GNULIB_GL_UNISTD_H_GETOPT=1
14309 fi
14310
14311
14312
14313 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
14314
14315
14316
14317
14318
14319
14320     REPLACE_GETOPT=0
14321
14322
14323   if test -n "$gl_replace_getopt"; then :
14324
14325       REPLACE_GETOPT=1
14326
14327 fi
14328
14329
14330   if test $REPLACE_GETOPT = 1; then
14331
14332   GETOPT_H=getopt.h
14333
14334 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
14335
14336
14337
14338   fi
14339
14340 if test $REPLACE_GETOPT = 1; then
14341
14342
14343
14344
14345
14346
14347
14348
14349   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
14360
14361
14362
14363
14364     GNULIB_GL_UNISTD_H_GETOPT=1
14365 fi
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380   gl_gettimeofday_timezone=void
14381   if test $ac_cv_func_gettimeofday != yes; then
14382     HAVE_GETTIMEOFDAY=0
14383   else
14384
14385
14386
14387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
14388 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
14389 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
14390   $as_echo_n "(cached) " >&6
14391 else
14392   if test "$cross_compiling" = yes; then :
14393        gl_cv_func_gettimeofday_clobber=yes
14394 else
14395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14396 /* end confdefs.h.  */
14397 #include <string.h>
14398           #include <sys/time.h>
14399           #include <time.h>
14400           #include <stdlib.h>
14401
14402 int
14403 main ()
14404 {
14405
14406           time_t t = 0;
14407           struct tm *lt;
14408           struct tm saved_lt;
14409           struct timeval tv;
14410           lt = localtime (&t);
14411           saved_lt = *lt;
14412           gettimeofday (&tv, NULL);
14413           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
14414
14415   ;
14416   return 0;
14417 }
14418 _ACEOF
14419 if ac_fn_c_try_run "$LINENO"; then :
14420   gl_cv_func_gettimeofday_clobber=no
14421 else
14422   gl_cv_func_gettimeofday_clobber=yes
14423 fi
14424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425   conftest.$ac_objext conftest.beam conftest.$ac_ext
14426 fi
14427
14428 fi
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
14430 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
14431
14432  if test $gl_cv_func_gettimeofday_clobber = yes; then
14433    REPLACE_GETTIMEOFDAY=1
14434
14435
14436 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
14437
14438
14439 $as_echo "#define localtime rpl_localtime" >>confdefs.h
14440
14441
14442
14443 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
14444
14445  fi
14446
14447     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
14448 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
14449 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
14450   $as_echo_n "(cached) " >&6
14451 else
14452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14453 /* end confdefs.h.  */
14454 #include <sys/time.h>
14455               struct timeval c;
14456               int gettimeofday (struct timeval *restrict, void *restrict);
14457
14458 int
14459 main ()
14460 {
14461 /* glibc uses struct timezone * rather than the POSIX void *
14462                  if _GNU_SOURCE is defined.  However, since the only portable
14463                  use of gettimeofday uses NULL as the second parameter, and
14464                  since the glibc definition is actually more typesafe, it is
14465                  not worth wrapping this to get a compliant signature.  */
14466               int (*f) (struct timeval *restrict, void *restrict)
14467                 = gettimeofday;
14468               int x = f (&c, 0);
14469               return !(x | c.tv_sec | c.tv_usec);
14470
14471   ;
14472   return 0;
14473 }
14474 _ACEOF
14475 if ac_fn_c_try_compile "$LINENO"; then :
14476   gl_cv_func_gettimeofday_posix_signature=yes
14477 else
14478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14479 /* end confdefs.h.  */
14480 #include <sys/time.h>
14481 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
14482
14483 int
14484 main ()
14485 {
14486
14487   ;
14488   return 0;
14489 }
14490 _ACEOF
14491 if ac_fn_c_try_compile "$LINENO"; then :
14492   gl_cv_func_gettimeofday_posix_signature=almost
14493 else
14494   gl_cv_func_gettimeofday_posix_signature=no
14495 fi
14496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14497 fi
14498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14499 fi
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
14501 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
14502     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
14503       gl_gettimeofday_timezone='struct timezone'
14504     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
14505       REPLACE_GETTIMEOFDAY=1
14506     fi
14507         if test $REPLACE_STRUCT_TIMEVAL = 1; then
14508       REPLACE_GETTIMEOFDAY=1
14509     fi
14510
14511   fi
14512
14513 cat >>confdefs.h <<_ACEOF
14514 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
14515 _ACEOF
14516
14517
14518 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
14519
14520
14521
14522
14523
14524
14525
14526
14527   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
14528
14529
14530   for ac_header in sys/timeb.h
14531 do :
14532   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
14533 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
14534   cat >>confdefs.h <<_ACEOF
14535 #define HAVE_SYS_TIMEB_H 1
14536 _ACEOF
14537
14538 fi
14539
14540 done
14541
14542   for ac_func in _ftime
14543 do :
14544   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
14545 if test "x$ac_cv_func__ftime" = xyes; then :
14546   cat >>confdefs.h <<_ACEOF
14547 #define HAVE__FTIME 1
14548 _ACEOF
14549
14550 fi
14551 done
14552
14553
14554 fi
14555
14556
14557
14558
14559
14560           GNULIB_GETTIMEOFDAY=1
14561
14562
14563
14564
14565
14566 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
14567
14568
14569
14570 # Autoconf 2.61a.99 and earlier don't support linking a file only
14571 # in VPATH builds.  But since GNUmakefile is for maintainer use
14572 # only, it does not matter if we skip the link with older autoconf.
14573 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
14574 # builds, so use a shell variable to bypass this.
14575 GNUmakefile=GNUmakefile
14576 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
14577
14578
14579
14580
14581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
14582 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
14583 if ${gl_cv_c_inline_effective+:} false; then :
14584   $as_echo_n "(cached) " >&6
14585 else
14586   if test $ac_cv_c_inline = no; then
14587        gl_cv_c_inline_effective=no
14588      else
14589                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h.  */
14591
14592 int
14593 main ()
14594 {
14595 #ifdef __NO_INLINE__
14596                #error "inline is not effective"
14597              #endif
14598   ;
14599   return 0;
14600 }
14601 _ACEOF
14602 if ac_fn_c_try_compile "$LINENO"; then :
14603   gl_cv_c_inline_effective=yes
14604 else
14605   gl_cv_c_inline_effective=no
14606 fi
14607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14608      fi
14609
14610 fi
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
14612 $as_echo "$gl_cv_c_inline_effective" >&6; }
14613   if test $gl_cv_c_inline_effective = yes; then
14614
14615 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
14616
14617   fi
14618
14619
14620
14621
14622
14623
14624
14625   if test $ac_cv_func_lchmod = no; then
14626     HAVE_LCHMOD=0
14627   fi
14628
14629
14630
14631
14632
14633
14634           GNULIB_LCHMOD=1
14635
14636
14637
14638
14639
14640 $as_echo "#define GNULIB_TEST_LCHMOD 1" >>confdefs.h
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
14656
14657
14658
14659
14660   if test $ac_cv_func_lstat = yes; then
14661
14662     if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
14663       REPLACE_LSTAT=1
14664     fi
14665   else
14666     HAVE_LSTAT=0
14667   fi
14668
14669 if test $REPLACE_LSTAT = 1; then
14670
14671
14672
14673
14674
14675
14676
14677
14678   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
14679
14680
14681
14682   :
14683
14684 fi
14685
14686
14687
14688
14689
14690           GNULIB_LSTAT=1
14691
14692
14693
14694
14695
14696 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
14697
14698
14699
14700
14701
14702
14703     for ac_header in stdlib.h
14704 do :
14705   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14706 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14707   cat >>confdefs.h <<_ACEOF
14708 #define HAVE_STDLIB_H 1
14709 _ACEOF
14710
14711 fi
14712
14713 done
14714
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14716 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14717 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14718   $as_echo_n "(cached) " >&6
14719 else
14720   if test "$cross_compiling" = yes; then :
14721   ac_cv_func_malloc_0_nonnull=no
14722 else
14723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h.  */
14725 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14726 # include <stdlib.h>
14727 #else
14728 char *malloc ();
14729 #endif
14730
14731 int
14732 main ()
14733 {
14734 return ! malloc (0);
14735   ;
14736   return 0;
14737 }
14738 _ACEOF
14739 if ac_fn_c_try_run "$LINENO"; then :
14740   ac_cv_func_malloc_0_nonnull=yes
14741 else
14742   ac_cv_func_malloc_0_nonnull=no
14743 fi
14744 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14745   conftest.$ac_objext conftest.beam conftest.$ac_ext
14746 fi
14747
14748 fi
14749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14750 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14751 if test $ac_cv_func_malloc_0_nonnull = yes; then :
14752
14753 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
14754
14755 else
14756   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
14757
14758      REPLACE_MALLOC=1
14759
14760 fi
14761
14762
14763 if test $REPLACE_MALLOC = 1; then
14764
14765
14766
14767
14768
14769
14770
14771
14772   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
14773
14774 fi
14775
14776
14777 cat >>confdefs.h <<_ACEOF
14778 #define GNULIB_MALLOC_GNU 1
14779 _ACEOF
14780
14781
14782
14783
14784
14785   if test $gl_cv_func_malloc_posix = yes; then
14786
14787 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
14788
14789   else
14790     REPLACE_MALLOC=1
14791   fi
14792
14793 if test $REPLACE_MALLOC = 1; then
14794
14795
14796
14797
14798
14799
14800
14801
14802   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
14803
14804 fi
14805
14806
14807
14808
14809
14810           GNULIB_MALLOC_POSIX=1
14811
14812
14813
14814
14815
14816 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
14835
14836
14837
14838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
14839 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
14840 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
14841   $as_echo_n "(cached) " >&6
14842 else
14843
14844                   case "$host_os" in
14845                      # Guess no on AIX and OSF/1.
14846         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
14847                      # Guess yes otherwise.
14848         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
14849       esac
14850       if test $LOCALE_JA != none; then
14851         if test "$cross_compiling" = yes; then :
14852   :
14853 else
14854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855 /* end confdefs.h.  */
14856
14857 #include <locale.h>
14858 #include <string.h>
14859 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14860    <wchar.h>.
14861    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14862    included before <wchar.h>.  */
14863 #include <stddef.h>
14864 #include <stdio.h>
14865 #include <time.h>
14866 #include <wchar.h>
14867 int main ()
14868 {
14869   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14870     {
14871       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
14872       mbstate_t state;
14873       wchar_t wc;
14874
14875       memset (&state, '\0', sizeof (mbstate_t));
14876       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14877         if (mbsinit (&state))
14878           return 1;
14879     }
14880   return 0;
14881 }
14882 _ACEOF
14883 if ac_fn_c_try_run "$LINENO"; then :
14884   gl_cv_func_mbrtowc_incomplete_state=yes
14885 else
14886   gl_cv_func_mbrtowc_incomplete_state=no
14887 fi
14888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14889   conftest.$ac_objext conftest.beam conftest.$ac_ext
14890 fi
14891
14892       fi
14893
14894 fi
14895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
14896 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
14897
14898
14899
14900
14901      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
14902 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
14903 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
14904   $as_echo_n "(cached) " >&6
14905 else
14906
14907                   case "$host_os" in
14908                     # Guess no on Solaris 8.
14909         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
14910                     # Guess yes otherwise.
14911         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
14912       esac
14913       if test $LOCALE_ZH_CN != none; then
14914         if test "$cross_compiling" = yes; then :
14915   :
14916 else
14917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14918 /* end confdefs.h.  */
14919
14920 #include <locale.h>
14921 #include <stdlib.h>
14922 #include <string.h>
14923 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14924    <wchar.h>.
14925    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14926    included before <wchar.h>.  */
14927 #include <stddef.h>
14928 #include <stdio.h>
14929 #include <time.h>
14930 #include <wchar.h>
14931 int main ()
14932 {
14933   /* This fails on Solaris 8:
14934      mbrtowc returns 2, and sets wc to 0x00F0.
14935      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
14936   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14937     {
14938       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
14939       mbstate_t state;
14940       wchar_t wc;
14941
14942       memset (&state, '\0', sizeof (mbstate_t));
14943       if (mbrtowc (&wc, input + 3, 6, &state) != 4
14944           && mbtowc (&wc, input + 3, 6) == 4)
14945         return 1;
14946     }
14947   return 0;
14948 }
14949 _ACEOF
14950 if ac_fn_c_try_run "$LINENO"; then :
14951   gl_cv_func_mbrtowc_sanitycheck=yes
14952 else
14953   gl_cv_func_mbrtowc_sanitycheck=no
14954 fi
14955 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14956   conftest.$ac_objext conftest.beam conftest.$ac_ext
14957 fi
14958
14959       fi
14960
14961 fi
14962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
14963 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
14964
14965     REPLACE_MBSTATE_T=0
14966     case "$gl_cv_func_mbrtowc_incomplete_state" in
14967       *yes) ;;
14968       *) REPLACE_MBSTATE_T=1 ;;
14969     esac
14970     case "$gl_cv_func_mbrtowc_sanitycheck" in
14971       *yes) ;;
14972       *) REPLACE_MBSTATE_T=1 ;;
14973     esac
14974   else
14975     REPLACE_MBSTATE_T=1
14976   fi
14977
14978
14979
14980   if test $ac_cv_func_mbrtowc = no; then
14981     HAVE_MBRTOWC=0
14982     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
14983 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14984    <wchar.h>.
14985    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14986    included before <wchar.h>.  */
14987 #include <stddef.h>
14988 #include <stdio.h>
14989 #include <time.h>
14990 #include <wchar.h>
14991
14992 "
14993 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
14994   ac_have_decl=1
14995 else
14996   ac_have_decl=0
14997 fi
14998
14999 cat >>confdefs.h <<_ACEOF
15000 #define HAVE_DECL_MBRTOWC $ac_have_decl
15001 _ACEOF
15002
15003     if test $ac_cv_have_decl_mbrtowc = yes; then
15004                         REPLACE_MBRTOWC=1
15005     fi
15006   else
15007     if test $REPLACE_MBSTATE_T = 1; then
15008       REPLACE_MBRTOWC=1
15009     else
15010
15011
15012
15013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
15014 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
15015 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
15016   $as_echo_n "(cached) " >&6
15017 else
15018
15019                   case "$host_os" in
15020                   # Guess no on Solaris.
15021         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
15022                   # Guess yes otherwise.
15023         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
15024       esac
15025       if test $LOCALE_FR_UTF8 != none; then
15026         if test "$cross_compiling" = yes; then :
15027   :
15028 else
15029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h.  */
15031
15032 #include <locale.h>
15033 #include <stdlib.h>
15034 #include <string.h>
15035 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15036    <wchar.h>.
15037    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15038    included before <wchar.h>.  */
15039 #include <stddef.h>
15040 #include <stdio.h>
15041 #include <time.h>
15042 #include <wchar.h>
15043 int main ()
15044 {
15045   int result = 0;
15046
15047   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15048     {
15049       char input[] = "\303\237er";
15050       mbstate_t state;
15051       wchar_t wc;
15052       size_t ret;
15053
15054       memset (&state, '\0', sizeof (mbstate_t));
15055       wc = (wchar_t) 0xBADFACE;
15056       ret = mbrtowc (&wc, input, 5, &state);
15057       if (ret != 2)
15058         result |= 1;
15059       if (!mbsinit (&state))
15060         result |= 2;
15061
15062       memset (&state, '\0', sizeof (mbstate_t));
15063       ret = mbrtowc (NULL, input, 5, &state);
15064       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
15065         result |= 4;
15066       if (!mbsinit (&state))
15067         result |= 8;
15068     }
15069   return result;
15070 }
15071 _ACEOF
15072 if ac_fn_c_try_run "$LINENO"; then :
15073   gl_cv_func_mbrtowc_null_arg1=yes
15074 else
15075   gl_cv_func_mbrtowc_null_arg1=no
15076 fi
15077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15078   conftest.$ac_objext conftest.beam conftest.$ac_ext
15079 fi
15080
15081       fi
15082
15083 fi
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
15085 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
15086
15087
15088
15089
15090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
15091 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
15092 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
15093   $as_echo_n "(cached) " >&6
15094 else
15095
15096                   case "$host_os" in
15097               # Guess no on OSF/1.
15098         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
15099               # Guess yes otherwise.
15100         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
15101       esac
15102       if test $LOCALE_FR_UTF8 != none; then
15103         if test "$cross_compiling" = yes; then :
15104   :
15105 else
15106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107 /* end confdefs.h.  */
15108
15109 #include <locale.h>
15110 #include <string.h>
15111 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15112    <wchar.h>.
15113    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15114    included before <wchar.h>.  */
15115 #include <stddef.h>
15116 #include <stdio.h>
15117 #include <time.h>
15118 #include <wchar.h>
15119 int main ()
15120 {
15121   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15122     {
15123       mbstate_t state;
15124       wchar_t wc;
15125       int ret;
15126
15127       memset (&state, '\0', sizeof (mbstate_t));
15128       wc = (wchar_t) 0xBADFACE;
15129       mbrtowc (&wc, NULL, 5, &state);
15130       /* Check that wc was not modified.  */
15131       if (wc != (wchar_t) 0xBADFACE)
15132         return 1;
15133     }
15134   return 0;
15135 }
15136 _ACEOF
15137 if ac_fn_c_try_run "$LINENO"; then :
15138   gl_cv_func_mbrtowc_null_arg2=yes
15139 else
15140   gl_cv_func_mbrtowc_null_arg2=no
15141 fi
15142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15143   conftest.$ac_objext conftest.beam conftest.$ac_ext
15144 fi
15145
15146       fi
15147
15148 fi
15149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
15150 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
15151
15152
15153
15154
15155
15156
15157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
15158 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
15159 if ${gl_cv_func_mbrtowc_retval+:} false; then :
15160   $as_echo_n "(cached) " >&6
15161 else
15162
15163                   case "$host_os" in
15164                                    # Guess no on HP-UX, Solaris, native Windows.
15165         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
15166                                    # Guess yes otherwise.
15167         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
15168       esac
15169       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
15170          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
15171         if test "$cross_compiling" = yes; then :
15172   :
15173 else
15174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15175 /* end confdefs.h.  */
15176
15177 #include <locale.h>
15178 #include <string.h>
15179 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15180    <wchar.h>.
15181    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15182    included before <wchar.h>.  */
15183 #include <stddef.h>
15184 #include <stdio.h>
15185 #include <time.h>
15186 #include <wchar.h>
15187 int main ()
15188 {
15189   int result = 0;
15190   int found_some_locale = 0;
15191   /* This fails on Solaris.  */
15192   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15193     {
15194       char input[] = "B\303\274\303\237er"; /* "Büßer" */
15195       mbstate_t state;
15196       wchar_t wc;
15197
15198       memset (&state, '\0', sizeof (mbstate_t));
15199       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15200         {
15201           input[1] = '\0';
15202           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
15203             result |= 1;
15204         }
15205       found_some_locale = 1;
15206     }
15207   /* This fails on HP-UX 11.11.  */
15208   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15209     {
15210       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15211       mbstate_t state;
15212       wchar_t wc;
15213
15214       memset (&state, '\0', sizeof (mbstate_t));
15215       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15216         {
15217           input[1] = '\0';
15218           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
15219             result |= 2;
15220         }
15221       found_some_locale = 1;
15222     }
15223   /* This fails on native Windows.  */
15224   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
15225     {
15226       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
15227       mbstate_t state;
15228       wchar_t wc;
15229
15230       memset (&state, '\0', sizeof (mbstate_t));
15231       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15232         {
15233           input[3] = '\0';
15234           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15235             result |= 4;
15236         }
15237       found_some_locale = 1;
15238     }
15239   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
15240     {
15241       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
15242       mbstate_t state;
15243       wchar_t wc;
15244
15245       memset (&state, '\0', sizeof (mbstate_t));
15246       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15247         {
15248           input[3] = '\0';
15249           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15250             result |= 8;
15251         }
15252       found_some_locale = 1;
15253     }
15254   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
15255     {
15256       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
15257       mbstate_t state;
15258       wchar_t wc;
15259
15260       memset (&state, '\0', sizeof (mbstate_t));
15261       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15262         {
15263           input[3] = '\0';
15264           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15265             result |= 16;
15266         }
15267       found_some_locale = 1;
15268     }
15269   return (found_some_locale ? result : 77);
15270 }
15271 _ACEOF
15272 if ac_fn_c_try_run "$LINENO"; then :
15273   gl_cv_func_mbrtowc_retval=yes
15274 else
15275   if test $? != 77; then
15276              gl_cv_func_mbrtowc_retval=no
15277            fi
15278
15279 fi
15280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15281   conftest.$ac_objext conftest.beam conftest.$ac_ext
15282 fi
15283
15284       fi
15285
15286 fi
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
15288 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
15289
15290
15291
15292
15293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
15294 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
15295 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
15296   $as_echo_n "(cached) " >&6
15297 else
15298
15299                   case "$host_os" in
15300                        # Guess no on Solaris 8 and 9.
15301         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
15302                        # Guess yes otherwise.
15303         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
15304       esac
15305       if test $LOCALE_ZH_CN != none; then
15306         if test "$cross_compiling" = yes; then :
15307   :
15308 else
15309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310 /* end confdefs.h.  */
15311
15312 #include <locale.h>
15313 #include <string.h>
15314 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15315    <wchar.h>.
15316    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15317    included before <wchar.h>.  */
15318 #include <stddef.h>
15319 #include <stdio.h>
15320 #include <time.h>
15321 #include <wchar.h>
15322 int main ()
15323 {
15324   /* This fails on Solaris 8 and 9.  */
15325   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15326     {
15327       mbstate_t state;
15328       wchar_t wc;
15329
15330       memset (&state, '\0', sizeof (mbstate_t));
15331       if (mbrtowc (&wc, "", 1, &state) != 0)
15332         return 1;
15333     }
15334   return 0;
15335 }
15336 _ACEOF
15337 if ac_fn_c_try_run "$LINENO"; then :
15338   gl_cv_func_mbrtowc_nul_retval=yes
15339 else
15340   gl_cv_func_mbrtowc_nul_retval=no
15341 fi
15342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15343   conftest.$ac_objext conftest.beam conftest.$ac_ext
15344 fi
15345
15346       fi
15347
15348 fi
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
15350 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
15351
15352       case "$gl_cv_func_mbrtowc_null_arg1" in
15353         *yes) ;;
15354         *)
15355 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
15356
15357            REPLACE_MBRTOWC=1
15358            ;;
15359       esac
15360       case "$gl_cv_func_mbrtowc_null_arg2" in
15361         *yes) ;;
15362         *)
15363 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
15364
15365            REPLACE_MBRTOWC=1
15366            ;;
15367       esac
15368       case "$gl_cv_func_mbrtowc_retval" in
15369         *yes) ;;
15370         *)
15371 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
15372
15373            REPLACE_MBRTOWC=1
15374            ;;
15375       esac
15376       case "$gl_cv_func_mbrtowc_nul_retval" in
15377         *yes) ;;
15378         *)
15379 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
15380
15381            REPLACE_MBRTOWC=1
15382            ;;
15383       esac
15384     fi
15385   fi
15386
15387 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
15388
15389
15390
15391
15392
15393
15394
15395
15396   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
15397
15398
15399   :
15400
15401 fi
15402
15403
15404
15405
15406
15407           GNULIB_MBRTOWC=1
15408
15409
15410
15411
15412
15413 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
15429
15430
15431
15432      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
15433 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
15434 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
15435   $as_echo_n "(cached) " >&6
15436 else
15437
15438                   case "$host_os" in
15439                      # Guess no on AIX and OSF/1.
15440         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
15441                      # Guess yes otherwise.
15442         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
15443       esac
15444       if test $LOCALE_JA != none; then
15445         if test "$cross_compiling" = yes; then :
15446   :
15447 else
15448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15449 /* end confdefs.h.  */
15450
15451 #include <locale.h>
15452 #include <string.h>
15453 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15454    <wchar.h>.
15455    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15456    included before <wchar.h>.  */
15457 #include <stddef.h>
15458 #include <stdio.h>
15459 #include <time.h>
15460 #include <wchar.h>
15461 int main ()
15462 {
15463   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15464     {
15465       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15466       mbstate_t state;
15467       wchar_t wc;
15468
15469       memset (&state, '\0', sizeof (mbstate_t));
15470       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15471         if (mbsinit (&state))
15472           return 1;
15473     }
15474   return 0;
15475 }
15476 _ACEOF
15477 if ac_fn_c_try_run "$LINENO"; then :
15478   gl_cv_func_mbrtowc_incomplete_state=yes
15479 else
15480   gl_cv_func_mbrtowc_incomplete_state=no
15481 fi
15482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15483   conftest.$ac_objext conftest.beam conftest.$ac_ext
15484 fi
15485
15486       fi
15487
15488 fi
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15490 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
15491
15492
15493
15494
15495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15496 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15497 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
15498   $as_echo_n "(cached) " >&6
15499 else
15500
15501                   case "$host_os" in
15502                     # Guess no on Solaris 8.
15503         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15504                     # Guess yes otherwise.
15505         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15506       esac
15507       if test $LOCALE_ZH_CN != none; then
15508         if test "$cross_compiling" = yes; then :
15509   :
15510 else
15511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15512 /* end confdefs.h.  */
15513
15514 #include <locale.h>
15515 #include <stdlib.h>
15516 #include <string.h>
15517 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15518    <wchar.h>.
15519    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15520    included before <wchar.h>.  */
15521 #include <stddef.h>
15522 #include <stdio.h>
15523 #include <time.h>
15524 #include <wchar.h>
15525 int main ()
15526 {
15527   /* This fails on Solaris 8:
15528      mbrtowc returns 2, and sets wc to 0x00F0.
15529      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
15530   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15531     {
15532       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
15533       mbstate_t state;
15534       wchar_t wc;
15535
15536       memset (&state, '\0', sizeof (mbstate_t));
15537       if (mbrtowc (&wc, input + 3, 6, &state) != 4
15538           && mbtowc (&wc, input + 3, 6) == 4)
15539         return 1;
15540     }
15541   return 0;
15542 }
15543 _ACEOF
15544 if ac_fn_c_try_run "$LINENO"; then :
15545   gl_cv_func_mbrtowc_sanitycheck=yes
15546 else
15547   gl_cv_func_mbrtowc_sanitycheck=no
15548 fi
15549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15550   conftest.$ac_objext conftest.beam conftest.$ac_ext
15551 fi
15552
15553       fi
15554
15555 fi
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
15557 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
15558
15559     REPLACE_MBSTATE_T=0
15560     case "$gl_cv_func_mbrtowc_incomplete_state" in
15561       *yes) ;;
15562       *) REPLACE_MBSTATE_T=1 ;;
15563     esac
15564     case "$gl_cv_func_mbrtowc_sanitycheck" in
15565       *yes) ;;
15566       *) REPLACE_MBSTATE_T=1 ;;
15567     esac
15568   else
15569     REPLACE_MBSTATE_T=1
15570   fi
15571
15572
15573
15574   if test $ac_cv_func_mbsinit = no; then
15575     HAVE_MBSINIT=0
15576     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
15577 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15578    <wchar.h>.
15579    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15580    included before <wchar.h>.  */
15581 #include <stddef.h>
15582 #include <stdio.h>
15583 #include <time.h>
15584 #include <wchar.h>
15585
15586 "
15587 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
15588   ac_have_decl=1
15589 else
15590   ac_have_decl=0
15591 fi
15592
15593 cat >>confdefs.h <<_ACEOF
15594 #define HAVE_DECL_MBSINIT $ac_have_decl
15595 _ACEOF
15596
15597     if test $ac_cv_have_decl_mbsinit = yes; then
15598                         REPLACE_MBSINIT=1
15599     fi
15600   else
15601     if test $REPLACE_MBSTATE_T = 1; then
15602       REPLACE_MBSINIT=1
15603     else
15604                         case "$host_os" in
15605         mingw*) REPLACE_MBSINIT=1 ;;
15606       esac
15607     fi
15608   fi
15609
15610 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
15611
15612
15613
15614
15615
15616
15617
15618
15619   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
15620
15621
15622   :
15623
15624 fi
15625
15626
15627
15628
15629
15630           GNULIB_MBSINIT=1
15631
15632
15633
15634
15635
15636 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
15637
15638
15639
15640
15641 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
15642
15643
15644
15645
15646
15647
15648
15649
15650   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
15651
15652
15653   for ac_header in bp-sym.h
15654 do :
15655   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
15656 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
15657   cat >>confdefs.h <<_ACEOF
15658 #define HAVE_BP_SYM_H 1
15659 _ACEOF
15660
15661 fi
15662
15663 done
15664
15665
15666 fi
15667
15668
15669
15670
15671
15672           GNULIB_MEMCHR=1
15673
15674
15675
15676
15677
15678 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
15679
15680
15681
15682
15683
15684
15685
15686
15687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
15688 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
15689 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
15690   $as_echo_n "(cached) " >&6
15691 else
15692   rm -rf conftest.dir
15693       if test "$cross_compiling" = yes; then :
15694   gl_cv_func_mkdir_trailing_slash_works="guessing no"
15695 else
15696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15697 /* end confdefs.h.  */
15698
15699 #       include <sys/types.h>
15700 #       include <sys/stat.h>
15701
15702 int
15703 main ()
15704 {
15705 return mkdir ("conftest.dir/", 0700);
15706   ;
15707   return 0;
15708 }
15709 _ACEOF
15710 if ac_fn_c_try_run "$LINENO"; then :
15711   gl_cv_func_mkdir_trailing_slash_works=yes
15712 else
15713   gl_cv_func_mkdir_trailing_slash_works=no
15714 fi
15715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15716   conftest.$ac_objext conftest.beam conftest.$ac_ext
15717 fi
15718
15719     rm -rf conftest.dir
15720
15721
15722 fi
15723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
15724 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
15725   if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
15726     REPLACE_MKDIR=1
15727   fi
15728
15729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
15730 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
15731 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
15732   $as_echo_n "(cached) " >&6
15733 else
15734   rm -rf conftest.dir
15735       if test "$cross_compiling" = yes; then :
15736   gl_cv_func_mkdir_trailing_dot_works="guessing no"
15737 else
15738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739 /* end confdefs.h.  */
15740
15741 #       include <sys/types.h>
15742 #       include <sys/stat.h>
15743
15744 int
15745 main ()
15746 {
15747 return !mkdir ("conftest.dir/./", 0700);
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 if ac_fn_c_try_run "$LINENO"; then :
15753   gl_cv_func_mkdir_trailing_dot_works=yes
15754 else
15755   gl_cv_func_mkdir_trailing_dot_works=no
15756 fi
15757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15758   conftest.$ac_objext conftest.beam conftest.$ac_ext
15759 fi
15760
15761     rm -rf conftest.dir
15762
15763
15764 fi
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
15766 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
15767   if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
15768     REPLACE_MKDIR=1
15769
15770 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
15771
15772   fi
15773
15774 if test $REPLACE_MKDIR = 1; then
15775
15776
15777
15778
15779
15780
15781
15782
15783   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
15784
15785 fi
15786
15787
15788
15789
15790
15791
15792   if test $APPLE_UNIVERSAL_BUILD = 1; then
15793     # A universal build on Apple MacOS X platforms.
15794     # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
15795     # But we need a configuration result that is valid in both modes.
15796     gl_cv_func_working_mktime=no
15797   fi
15798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
15799 $as_echo_n "checking for working mktime... " >&6; }
15800 if ${gl_cv_func_working_mktime+:} false; then :
15801   $as_echo_n "(cached) " >&6
15802 else
15803   if test "$cross_compiling" = yes; then :
15804   gl_cv_func_working_mktime=no
15805 else
15806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15807 /* end confdefs.h.  */
15808 /* Test program from Paul Eggert and Tony Leneis.  */
15809 #include <limits.h>
15810 #include <stdlib.h>
15811 #include <time.h>
15812
15813 #ifdef HAVE_UNISTD_H
15814 # include <unistd.h>
15815 #endif
15816
15817 #ifndef HAVE_ALARM
15818 # define alarm(X) /* empty */
15819 #endif
15820
15821 /* Work around redefinition to rpl_putenv by other config tests.  */
15822 #undef putenv
15823
15824 static time_t time_t_max;
15825 static time_t time_t_min;
15826
15827 /* Values we'll use to set the TZ environment variable.  */
15828 static char *tz_strings[] = {
15829   (char *) 0, "TZ=GMT0", "TZ=JST-9",
15830   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15831 };
15832 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
15833
15834 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
15835    Based on a problem report from Andreas Jaeger.  */
15836 static int
15837 spring_forward_gap ()
15838 {
15839   /* glibc (up to about 1998-10-07) failed this test. */
15840   struct tm tm;
15841
15842   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15843      instead of "TZ=America/Vancouver" in order to detect the bug even
15844      on systems that don't support the Olson extension, or don't have the
15845      full zoneinfo tables installed.  */
15846   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15847
15848   tm.tm_year = 98;
15849   tm.tm_mon = 3;
15850   tm.tm_mday = 5;
15851   tm.tm_hour = 2;
15852   tm.tm_min = 0;
15853   tm.tm_sec = 0;
15854   tm.tm_isdst = -1;
15855   return mktime (&tm) != (time_t) -1;
15856 }
15857
15858 static int
15859 mktime_test1 (time_t now)
15860 {
15861   struct tm *lt;
15862   return ! (lt = localtime (&now)) || mktime (lt) == now;
15863 }
15864
15865 static int
15866 mktime_test (time_t now)
15867 {
15868   return (mktime_test1 (now)
15869           && mktime_test1 ((time_t) (time_t_max - now))
15870           && mktime_test1 ((time_t) (time_t_min + now)));
15871 }
15872
15873 static int
15874 irix_6_4_bug ()
15875 {
15876   /* Based on code from Ariel Faigon.  */
15877   struct tm tm;
15878   tm.tm_year = 96;
15879   tm.tm_mon = 3;
15880   tm.tm_mday = 0;
15881   tm.tm_hour = 0;
15882   tm.tm_min = 0;
15883   tm.tm_sec = 0;
15884   tm.tm_isdst = -1;
15885   mktime (&tm);
15886   return tm.tm_mon == 2 && tm.tm_mday == 31;
15887 }
15888
15889 static int
15890 bigtime_test (int j)
15891 {
15892   struct tm tm;
15893   time_t now;
15894   tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15895   now = mktime (&tm);
15896   if (now != (time_t) -1)
15897     {
15898       struct tm *lt = localtime (&now);
15899       if (! (lt
15900              && lt->tm_year == tm.tm_year
15901              && lt->tm_mon == tm.tm_mon
15902              && lt->tm_mday == tm.tm_mday
15903              && lt->tm_hour == tm.tm_hour
15904              && lt->tm_min == tm.tm_min
15905              && lt->tm_sec == tm.tm_sec
15906              && lt->tm_yday == tm.tm_yday
15907              && lt->tm_wday == tm.tm_wday
15908              && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15909                   == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15910         return 0;
15911     }
15912   return 1;
15913 }
15914
15915 static int
15916 year_2050_test ()
15917 {
15918   /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
15919      ignoring leap seconds.  */
15920   unsigned long int answer = 2527315200UL;
15921
15922   struct tm tm;
15923   time_t t;
15924   tm.tm_year = 2050 - 1900;
15925   tm.tm_mon = 2 - 1;
15926   tm.tm_mday = 1;
15927   tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
15928   tm.tm_isdst = -1;
15929
15930   /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15931      instead of "TZ=America/Vancouver" in order to detect the bug even
15932      on systems that don't support the Olson extension, or don't have the
15933      full zoneinfo tables installed.  */
15934   putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15935
15936   t = mktime (&tm);
15937
15938   /* Check that the result is either a failure, or close enough
15939      to the correct answer that we can assume the discrepancy is
15940      due to leap seconds.  */
15941   return (t == (time_t) -1
15942           || (0 < t && answer - 120 <= t && t <= answer + 120));
15943 }
15944
15945 int
15946 main ()
15947 {
15948   int result = 0;
15949   time_t t, delta;
15950   int i, j;
15951   int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
15952   int time_t_signed = ! ((time_t) 0 < (time_t) -1);
15953
15954   /* This test makes some buggy mktime implementations loop.
15955      Give up after 60 seconds; a mktime slower than that
15956      isn't worth using anyway.  */
15957   alarm (60);
15958
15959   time_t_max = (! time_t_signed
15960                 ? (time_t) -1
15961                 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
15962                    * 2 + 1));
15963   time_t_min = (! time_t_signed
15964                 ? (time_t) 0
15965                 : time_t_signed_magnitude
15966                 ? ~ (time_t) 0
15967                 : ~ time_t_max);
15968
15969   delta = time_t_max / 997; /* a suitable prime number */
15970   for (i = 0; i < N_STRINGS; i++)
15971     {
15972       if (tz_strings[i])
15973         putenv (tz_strings[i]);
15974
15975       for (t = 0; t <= time_t_max - delta; t += delta)
15976         if (! mktime_test (t))
15977           result |= 1;
15978       if (! (mktime_test ((time_t) 1)
15979              && mktime_test ((time_t) (60 * 60))
15980              && mktime_test ((time_t) (60 * 60 * 24))))
15981         result |= 2;
15982
15983       for (j = 1; ; j <<= 1)
15984         if (! bigtime_test (j))
15985           result |= 4;
15986         else if (INT_MAX / 2 < j)
15987           break;
15988       if (! bigtime_test (INT_MAX))
15989         result |= 8;
15990     }
15991   if (! irix_6_4_bug ())
15992     result |= 16;
15993   if (! spring_forward_gap ())
15994     result |= 32;
15995   if (! year_2050_test ())
15996     result |= 64;
15997   return result;
15998 }
15999 _ACEOF
16000 if ac_fn_c_try_run "$LINENO"; then :
16001   gl_cv_func_working_mktime=yes
16002 else
16003   gl_cv_func_working_mktime=no
16004 fi
16005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16006   conftest.$ac_objext conftest.beam conftest.$ac_ext
16007 fi
16008
16009
16010 fi
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
16012 $as_echo "$gl_cv_func_working_mktime" >&6; }
16013
16014   if test $gl_cv_func_working_mktime = no; then
16015     REPLACE_MKTIME=1
16016   else
16017     REPLACE_MKTIME=0
16018   fi
16019
16020 if test $REPLACE_MKTIME = 1; then
16021
16022
16023
16024
16025
16026
16027
16028
16029   gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
16030
16031
16032
16033
16034 fi
16035
16036
16037
16038
16039
16040           GNULIB_MKTIME=1
16041
16042
16043
16044
16045
16046 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
16047
16048
16049
16050
16051
16052   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
16053     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
16054
16055 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
16056
16057   else
16058     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
16059   fi
16060
16061
16062 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16063
16064
16065
16066
16067
16068
16069
16070
16071   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
16072
16073 fi
16074
16075
16076
16077 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16078
16079
16080
16081
16082
16083
16084
16085
16086   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
16087
16088 fi
16089
16090
16091
16092
16093   for ac_func in opendir
16094 do :
16095   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
16096 if test "x$ac_cv_func_opendir" = xyes; then :
16097   cat >>confdefs.h <<_ACEOF
16098 #define HAVE_OPENDIR 1
16099 _ACEOF
16100
16101 fi
16102 done
16103
16104   if test $ac_cv_func_opendir = no; then
16105     HAVE_OPENDIR=0
16106   fi
16107
16108
16109 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
16110
16111
16112
16113
16114
16115
16116
16117
16118   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
16119
16120 fi
16121
16122
16123
16124
16125
16126           GNULIB_OPENDIR=1
16127
16128
16129
16130
16131
16132 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142   ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
16143 #include <$ac_cv_struct_tm>
16144
16145 "
16146 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
16147
16148 cat >>confdefs.h <<_ACEOF
16149 #define HAVE_STRUCT_TM_TM_ZONE 1
16150 _ACEOF
16151
16152
16153 fi
16154
16155 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16156
16157 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
16158
16159 else
16160   ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
16161 "
16162 if test "x$ac_cv_have_decl_tzname" = xyes; then :
16163   ac_have_decl=1
16164 else
16165   ac_have_decl=0
16166 fi
16167
16168 cat >>confdefs.h <<_ACEOF
16169 #define HAVE_DECL_TZNAME $ac_have_decl
16170 _ACEOF
16171
16172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
16173 $as_echo_n "checking for tzname... " >&6; }
16174 if ${ac_cv_var_tzname+:} false; then :
16175   $as_echo_n "(cached) " >&6
16176 else
16177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178 /* end confdefs.h.  */
16179 #include <time.h>
16180 #if !HAVE_DECL_TZNAME
16181 extern char *tzname[];
16182 #endif
16183
16184 int
16185 main ()
16186 {
16187 return tzname[0][0];
16188   ;
16189   return 0;
16190 }
16191 _ACEOF
16192 if ac_fn_c_try_link "$LINENO"; then :
16193   ac_cv_var_tzname=yes
16194 else
16195   ac_cv_var_tzname=no
16196 fi
16197 rm -f core conftest.err conftest.$ac_objext \
16198     conftest$ac_exeext conftest.$ac_ext
16199 fi
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
16201 $as_echo "$ac_cv_var_tzname" >&6; }
16202   if test $ac_cv_var_tzname = yes; then
16203
16204 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
16205
16206   fi
16207 fi
16208
16209
16210
16211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212 /* end confdefs.h.  */
16213
16214 #include <time.h> /* for time_t */
16215 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
16216 #define TYPE_MINIMUM(t) \
16217   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16218 #define TYPE_MAXIMUM(t) \
16219   ((t) ((t) 0 < (t) -1 \
16220         ? (t) -1 \
16221         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16222 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
16223 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
16224
16225 _ACEOF
16226 if ac_fn_c_try_compile "$LINENO"; then :
16227
16228 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
16229
16230
16231 fi
16232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16233
16234
16235
16236
16237 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16238 "
16239 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16240   ac_have_decl=1
16241 else
16242   ac_have_decl=0
16243 fi
16244
16245 cat >>confdefs.h <<_ACEOF
16246 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16247 _ACEOF
16248
16249 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16250 "
16251 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16252   ac_have_decl=1
16253 else
16254   ac_have_decl=0
16255 fi
16256
16257 cat >>confdefs.h <<_ACEOF
16258 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16259 _ACEOF
16260
16261
16262       :
16263
16264
16265   :
16266
16267
16268
16269
16270
16271   for ac_func in raise
16272 do :
16273   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
16274 if test "x$ac_cv_func_raise" = xyes; then :
16275   cat >>confdefs.h <<_ACEOF
16276 #define HAVE_RAISE 1
16277 _ACEOF
16278
16279 fi
16280 done
16281
16282   if test $ac_cv_func_raise = no; then
16283     HAVE_RAISE=0
16284   else
16285     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16286       REPLACE_RAISE=1
16287     fi
16288
16289   fi
16290
16291 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
16292
16293
16294
16295
16296
16297
16298
16299
16300   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
16301
16302
16303
16304
16305 fi
16306
16307
16308
16309
16310
16311           GNULIB_RAISE=1
16312
16313
16314
16315
16316
16317 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
16318
16319
16320
16321
16322
16323
16324   for ac_func in readdir
16325 do :
16326   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
16327 if test "x$ac_cv_func_readdir" = xyes; then :
16328   cat >>confdefs.h <<_ACEOF
16329 #define HAVE_READDIR 1
16330 _ACEOF
16331
16332 fi
16333 done
16334
16335   if test $ac_cv_func_readdir = no; then
16336     HAVE_READDIR=0
16337   fi
16338
16339 if test $HAVE_READDIR = 0; then
16340
16341
16342
16343
16344
16345
16346
16347
16348   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
16349
16350 fi
16351
16352
16353
16354
16355
16356           GNULIB_READDIR=1
16357
16358
16359
16360
16361
16362 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
16363
16364
16365
16366
16367
16368
16369   if test $ac_cv_func_readlink = no; then
16370     HAVE_READLINK=0
16371   else
16372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
16373 $as_echo_n "checking whether readlink signature is correct... " >&6; }
16374 if ${gl_cv_decl_readlink_works+:} false; then :
16375   $as_echo_n "(cached) " >&6
16376 else
16377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378 /* end confdefs.h.  */
16379 #include <unistd.h>
16380       /* Cause compilation failure if original declaration has wrong type.  */
16381       ssize_t readlink (const char *, char *, size_t);
16382 int
16383 main ()
16384 {
16385
16386   ;
16387   return 0;
16388 }
16389 _ACEOF
16390 if ac_fn_c_try_compile "$LINENO"; then :
16391   gl_cv_decl_readlink_works=yes
16392 else
16393   gl_cv_decl_readlink_works=no
16394 fi
16395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16396 fi
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
16398 $as_echo "$gl_cv_decl_readlink_works" >&6; }
16399             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
16400 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
16401 if ${gl_cv_func_readlink_works+:} false; then :
16402   $as_echo_n "(cached) " >&6
16403 else
16404   # We have readlink, so assume ln -s works.
16405        ln -s conftest.no-such conftest.link
16406        ln -s conftest.link conftest.lnk2
16407        if test "$cross_compiling" = yes; then :
16408   gl_cv_func_readlink_works="guessing no"
16409 else
16410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411 /* end confdefs.h.  */
16412 #include <unistd.h>
16413
16414 int
16415 main ()
16416 {
16417 char buf[20];
16418       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
16419   ;
16420   return 0;
16421 }
16422 _ACEOF
16423 if ac_fn_c_try_run "$LINENO"; then :
16424   gl_cv_func_readlink_works=yes
16425 else
16426   gl_cv_func_readlink_works=no
16427 fi
16428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16429   conftest.$ac_objext conftest.beam conftest.$ac_ext
16430 fi
16431
16432       rm -f conftest.link conftest.lnk2
16433 fi
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
16435 $as_echo "$gl_cv_func_readlink_works" >&6; }
16436     if test "$gl_cv_func_readlink_works" != yes; then
16437
16438 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
16439
16440       REPLACE_READLINK=1
16441     elif test "$gl_cv_decl_readlink_works" != yes; then
16442       REPLACE_READLINK=1
16443     fi
16444   fi
16445
16446 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
16447
16448
16449
16450
16451
16452
16453
16454
16455   gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
16456
16457
16458   :
16459
16460 fi
16461
16462
16463
16464
16465
16466           GNULIB_READLINK=1
16467
16468
16469
16470
16471
16472 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
16473
16474
16475
16476
16477
16478     for ac_header in stdlib.h
16479 do :
16480   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
16481 if test "x$ac_cv_header_stdlib_h" = xyes; then :
16482   cat >>confdefs.h <<_ACEOF
16483 #define HAVE_STDLIB_H 1
16484 _ACEOF
16485
16486 fi
16487
16488 done
16489
16490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
16491 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
16492 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
16493   $as_echo_n "(cached) " >&6
16494 else
16495   if test "$cross_compiling" = yes; then :
16496   ac_cv_func_realloc_0_nonnull=no
16497 else
16498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499 /* end confdefs.h.  */
16500 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16501 # include <stdlib.h>
16502 #else
16503 char *realloc ();
16504 #endif
16505
16506 int
16507 main ()
16508 {
16509 return ! realloc (0, 0);
16510   ;
16511   return 0;
16512 }
16513 _ACEOF
16514 if ac_fn_c_try_run "$LINENO"; then :
16515   ac_cv_func_realloc_0_nonnull=yes
16516 else
16517   ac_cv_func_realloc_0_nonnull=no
16518 fi
16519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16520   conftest.$ac_objext conftest.beam conftest.$ac_ext
16521 fi
16522
16523 fi
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
16525 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
16526 if test $ac_cv_func_realloc_0_nonnull = yes; then :
16527
16528 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
16529
16530 else
16531   $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
16532
16533      REPLACE_REALLOC=1
16534
16535 fi
16536
16537
16538 if test $REPLACE_REALLOC = 1; then
16539
16540
16541
16542
16543
16544
16545
16546
16547   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
16548
16549 fi
16550
16551
16552 cat >>confdefs.h <<_ACEOF
16553 #define GNULIB_REALLOC_GNU 1
16554 _ACEOF
16555
16556
16557
16558
16559
16560   if test $gl_cv_func_malloc_posix = yes; then
16561
16562 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
16563
16564   else
16565     REPLACE_REALLOC=1
16566   fi
16567
16568 if test $REPLACE_REALLOC = 1; then
16569
16570
16571
16572
16573
16574
16575
16576
16577   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
16578
16579 fi
16580
16581
16582
16583
16584
16585           GNULIB_REALLOC_POSIX=1
16586
16587
16588
16589
16590
16591 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
16592
16593
16594
16595
16596
16597
16598
16599
16600                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
16601 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
16602 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
16603   $as_echo_n "(cached) " >&6
16604 else
16605   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16606     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16607       as_fn_error $? "cannot create temporary files" "$LINENO" 5
16608     # Assume that if we have lstat, we can also check symlinks.
16609     if test $ac_cv_func_lstat = yes; then
16610       ln -s conftest.f conftest.lnk
16611     fi
16612     if test "$cross_compiling" = yes; then :
16613         gl_cv_func_rename_slash_dst_works="guessing no"
16614 else
16615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616 /* end confdefs.h.  */
16617
16618 #        include <stdio.h>
16619 #        include <stdlib.h>
16620
16621 int
16622 main ()
16623 {
16624 int result = 0;
16625            if (rename ("conftest.f1", "conftest.f2/") == 0)
16626              result |= 1;
16627            if (rename ("conftest.d1", "conftest.d2/") != 0)
16628              result |= 2;
16629 #if HAVE_LSTAT
16630            if (rename ("conftest.f", "conftest.lnk/") == 0)
16631              result |= 4;
16632 #endif
16633            return result;
16634
16635   ;
16636   return 0;
16637 }
16638 _ACEOF
16639 if ac_fn_c_try_run "$LINENO"; then :
16640   gl_cv_func_rename_slash_dst_works=yes
16641 else
16642   gl_cv_func_rename_slash_dst_works=no
16643 fi
16644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16645   conftest.$ac_objext conftest.beam conftest.$ac_ext
16646 fi
16647
16648     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16649
16650 fi
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
16652 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
16653   if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
16654     REPLACE_RENAME=1
16655
16656 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
16657
16658   fi
16659
16660             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
16661 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
16662 if ${gl_cv_func_rename_slash_src_works+:} false; then :
16663   $as_echo_n "(cached) " >&6
16664 else
16665   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16666     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16667       as_fn_error $? "cannot create temporary files" "$LINENO" 5
16668     # Assume that if we have lstat, we can also check symlinks.
16669     if test $ac_cv_func_lstat = yes; then
16670       ln -s conftest.f conftest.lnk
16671     fi
16672     if test "$cross_compiling" = yes; then :
16673         gl_cv_func_rename_slash_src_works="guessing no"
16674 else
16675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16676 /* end confdefs.h.  */
16677
16678 #        include <stdio.h>
16679 #        include <stdlib.h>
16680
16681 int
16682 main ()
16683 {
16684 int result = 0;
16685            if (rename ("conftest.f1/", "conftest.d3") == 0)
16686              result |= 1;
16687            if (rename ("conftest.d1/", "conftest.d2") != 0)
16688              result |= 2;
16689 #if HAVE_LSTAT
16690            if (rename ("conftest.lnk/", "conftest.f") == 0)
16691              result |= 4;
16692 #endif
16693            return result;
16694
16695   ;
16696   return 0;
16697 }
16698 _ACEOF
16699 if ac_fn_c_try_run "$LINENO"; then :
16700   gl_cv_func_rename_slash_src_works=yes
16701 else
16702   gl_cv_func_rename_slash_src_works=no
16703 fi
16704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16705   conftest.$ac_objext conftest.beam conftest.$ac_ext
16706 fi
16707
16708     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16709
16710 fi
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
16712 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
16713   if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
16714     REPLACE_RENAME=1
16715
16716 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
16717
16718   fi
16719
16720
16721   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
16722 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
16723 if ${gl_cv_func_rename_link_works+:} false; then :
16724   $as_echo_n "(cached) " >&6
16725 else
16726   if test $ac_cv_func_link = yes; then
16727        rm -rf conftest.f conftest.f1
16728        if touch conftest.f && ln conftest.f conftest.f1 &&
16729            set x `ls -i conftest.f conftest.f1` && test "" = ""; then
16730          if test "$cross_compiling" = yes; then :
16731              gl_cv_func_rename_link_works="guessing no"
16732 else
16733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16734 /* end confdefs.h.  */
16735
16736 #             include <stdio.h>
16737 #             include <stdlib.h>
16738 #             include <unistd.h>
16739
16740 int
16741 main ()
16742 {
16743 int result = 0;
16744                 if (rename ("conftest.f", "conftest.f1"))
16745                   result |= 1;
16746                 if (unlink ("conftest.f1"))
16747                   result |= 2;
16748                 if (rename ("conftest.f", "conftest.f"))
16749                   result |= 4;
16750                 if (rename ("conftest.f1", "conftest.f1") == 0)
16751                   result |= 8;
16752                 return result;
16753
16754   ;
16755   return 0;
16756 }
16757 _ACEOF
16758 if ac_fn_c_try_run "$LINENO"; then :
16759   gl_cv_func_rename_link_works=yes
16760 else
16761   gl_cv_func_rename_link_works=no
16762 fi
16763 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16764   conftest.$ac_objext conftest.beam conftest.$ac_ext
16765 fi
16766
16767        else
16768          gl_cv_func_rename_link_works="guessing no"
16769        fi
16770        rm -rf conftest.f conftest.f1
16771      else
16772        gl_cv_func_rename_link_works=yes
16773      fi
16774
16775 fi
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
16777 $as_echo "$gl_cv_func_rename_link_works" >&6; }
16778   if test "x$gl_cv_func_rename_link_works" != xyes; then
16779     REPLACE_RENAME=1
16780
16781 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
16782
16783   fi
16784
16785           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
16786 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
16787 if ${gl_cv_func_rename_dest_works+:} false; then :
16788   $as_echo_n "(cached) " >&6
16789 else
16790   rm -rf conftest.f conftest.d1 conftest.d2
16791     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
16792       as_fn_error $? "cannot create temporary files" "$LINENO" 5
16793     if test "$cross_compiling" = yes; then :
16794         gl_cv_func_rename_dest_works="guessing no"
16795 else
16796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797 /* end confdefs.h.  */
16798
16799 #        include <stdio.h>
16800 #        include <stdlib.h>
16801
16802 int
16803 main ()
16804 {
16805 int result = 0;
16806            if (rename ("conftest.d1", "conftest.d2") != 0)
16807              result |= 1;
16808            if (rename ("conftest.d2", "conftest.f") == 0)
16809              result |= 2;
16810            return result;
16811
16812   ;
16813   return 0;
16814 }
16815 _ACEOF
16816 if ac_fn_c_try_run "$LINENO"; then :
16817   gl_cv_func_rename_dest_works=yes
16818 else
16819   gl_cv_func_rename_dest_works=no
16820 fi
16821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16822   conftest.$ac_objext conftest.beam conftest.$ac_ext
16823 fi
16824
16825     rm -rf conftest.f conftest.d1 conftest.d2
16826
16827 fi
16828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
16829 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
16830   if test "x$gl_cv_func_rename_dest_works" != xyes; then
16831     REPLACE_RENAME=1
16832
16833 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
16834
16835   fi
16836
16837 if test $REPLACE_RENAME = 1; then
16838
16839
16840
16841
16842
16843
16844
16845
16846   gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
16847
16848 fi
16849
16850
16851
16852
16853
16854           GNULIB_RENAME=1
16855
16856
16857
16858
16859
16860 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
16861
16862
16863
16864
16865
16866
16867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
16868 $as_echo_n "checking whether rmdir works... " >&6; }
16869 if ${gl_cv_func_rmdir_works+:} false; then :
16870   $as_echo_n "(cached) " >&6
16871 else
16872   mkdir conftest.dir
16873      touch conftest.file
16874      if test "$cross_compiling" = yes; then :
16875   gl_cv_func_rmdir_works="guessing no"
16876 else
16877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16878 /* end confdefs.h.  */
16879 #include <stdio.h>
16880            #include <errno.h>
16881            #if HAVE_UNISTD_H
16882            # include <unistd.h>
16883            #else /* on Windows with MSVC */
16884            # include <direct.h>
16885            #endif
16886
16887 int
16888 main ()
16889 {
16890 int result = 0;
16891       if (!rmdir ("conftest.file/"))
16892         result |= 1;
16893       else if (errno != ENOTDIR)
16894         result |= 2;
16895       if (!rmdir ("conftest.dir/./"))
16896         result |= 4;
16897       return result;
16898
16899   ;
16900   return 0;
16901 }
16902 _ACEOF
16903 if ac_fn_c_try_run "$LINENO"; then :
16904   gl_cv_func_rmdir_works=yes
16905 else
16906   gl_cv_func_rmdir_works=no
16907 fi
16908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16909   conftest.$ac_objext conftest.beam conftest.$ac_ext
16910 fi
16911
16912      rm -rf conftest.dir conftest.file
16913 fi
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
16915 $as_echo "$gl_cv_func_rmdir_works" >&6; }
16916   if test x"$gl_cv_func_rmdir_works" != xyes; then
16917     REPLACE_RMDIR=1
16918   fi
16919
16920 if test $REPLACE_RMDIR = 1; then
16921
16922
16923
16924
16925
16926
16927
16928
16929   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
16930
16931 fi
16932
16933
16934
16935
16936
16937           GNULIB_RMDIR=1
16938
16939
16940
16941
16942
16943 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954   if test $ac_cv_func_setenv = no; then
16955     HAVE_SETENV=0
16956   else
16957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
16958 $as_echo_n "checking whether setenv validates arguments... " >&6; }
16959 if ${gl_cv_func_setenv_works+:} false; then :
16960   $as_echo_n "(cached) " >&6
16961 else
16962   if test "$cross_compiling" = yes; then :
16963   gl_cv_func_setenv_works="guessing no"
16964 else
16965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16966 /* end confdefs.h.  */
16967
16968        #include <stdlib.h>
16969        #include <errno.h>
16970        #include <string.h>
16971
16972 int
16973 main ()
16974 {
16975
16976        int result = 0;
16977        {
16978          if (setenv ("", "", 0) != -1)
16979            result |= 1;
16980          else if (errno != EINVAL)
16981            result |= 2;
16982        }
16983        {
16984          if (setenv ("a", "=", 1) != 0)
16985            result |= 4;
16986          else if (strcmp (getenv ("a"), "=") != 0)
16987            result |= 8;
16988        }
16989        return result;
16990
16991   ;
16992   return 0;
16993 }
16994 _ACEOF
16995 if ac_fn_c_try_run "$LINENO"; then :
16996   gl_cv_func_setenv_works=yes
16997 else
16998   gl_cv_func_setenv_works=no
16999 fi
17000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17001   conftest.$ac_objext conftest.beam conftest.$ac_ext
17002 fi
17003
17004 fi
17005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
17006 $as_echo "$gl_cv_func_setenv_works" >&6; }
17007     if test "$gl_cv_func_setenv_works" != yes; then
17008       REPLACE_SETENV=1
17009     fi
17010   fi
17011
17012 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
17013
17014
17015
17016
17017
17018
17019
17020
17021   gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
17022
17023 fi
17024
17025
17026
17027
17028
17029           GNULIB_SETENV=1
17030
17031
17032
17033
17034
17035 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050      if test $gl_cv_have_include_next = yes; then
17051        gl_cv_next_signal_h='<'signal.h'>'
17052      else
17053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
17054 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
17055 if ${gl_cv_next_signal_h+:} false; then :
17056   $as_echo_n "(cached) " >&6
17057 else
17058
17059                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17060 /* end confdefs.h.  */
17061 #include <signal.h>
17062
17063 _ACEOF
17064                                                                                                                         case "$host_os" in
17065                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17066                  *)    gl_absname_cpp="$ac_cpp" ;;
17067                esac
17068
17069                case "$host_os" in
17070                  mingw*)
17071                                                                                                                                      gl_dirsep_regex='[/\\]'
17072                    ;;
17073                  *)
17074                    gl_dirsep_regex='\/'
17075                    ;;
17076                esac
17077                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17078
17079                gl_header_literal_regex=`echo 'signal.h' \
17080                                         | sed -e "$gl_make_literal_regex_sed"`
17081                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17082                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17083                    s|^/[^/]|//&|
17084                    p
17085                    q
17086                  }'
17087                                                             gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17088                       sed -n "$gl_absolute_header_sed"`'"'
17089
17090
17091 fi
17092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
17093 $as_echo "$gl_cv_next_signal_h" >&6; }
17094      fi
17095      NEXT_SIGNAL_H=$gl_cv_next_signal_h
17096
17097      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17098        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17099        gl_next_as_first_directive='<'signal.h'>'
17100      else
17101        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17102        gl_next_as_first_directive=$gl_cv_next_signal_h
17103      fi
17104      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
17105
17106
17107
17108
17109
17110 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
17111 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
17112   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
17113 #include <signal.h>
17114
17115 "
17116 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
17117
17118 else
17119   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
17120 fi
17121
17122
17123
17124
17125
17126
17127
17128   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
17129 #include <signal.h>
17130
17131 "
17132 if test "x$ac_cv_type_sighandler_t" = xyes; then :
17133
17134 else
17135   HAVE_SIGHANDLER_T=0
17136 fi
17137
17138
17139
17140     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
17141     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17143 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17144 if eval \${$as_gl_Symbol+:} false; then :
17145   $as_echo_n "(cached) " >&6
17146 else
17147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17148 /* end confdefs.h.  */
17149 #include <signal.h>
17150
17151 int
17152 main ()
17153 {
17154 #undef $gl_func
17155   (void) $gl_func;
17156   ;
17157   return 0;
17158 }
17159 _ACEOF
17160 if ac_fn_c_try_compile "$LINENO"; then :
17161   eval "$as_gl_Symbol=yes"
17162 else
17163   eval "$as_gl_Symbol=no"
17164 fi
17165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17166 fi
17167 eval ac_res=\$$as_gl_Symbol
17168                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17169 $as_echo "$ac_res" >&6; }
17170     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17171   cat >>confdefs.h <<_ACEOF
17172 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17173 _ACEOF
17174
17175                      eval ac_cv_have_decl_$gl_func=yes
17176 fi
17177       done
17178
17179
17180
17181   for ac_header in stdint.h
17182 do :
17183   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
17184 if test "x$ac_cv_header_stdint_h" = xyes; then :
17185   cat >>confdefs.h <<_ACEOF
17186 #define HAVE_STDINT_H 1
17187 _ACEOF
17188
17189 fi
17190
17191 done
17192
17193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
17194 $as_echo_n "checking for SIZE_MAX... " >&6; }
17195 if ${gl_cv_size_max+:} false; then :
17196   $as_echo_n "(cached) " >&6
17197 else
17198
17199     gl_cv_size_max=
17200     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17201 /* end confdefs.h.  */
17202
17203 #include <limits.h>
17204 #if HAVE_STDINT_H
17205 #include <stdint.h>
17206 #endif
17207 #ifdef SIZE_MAX
17208 Found it
17209 #endif
17210
17211 _ACEOF
17212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17213   $EGREP "Found it" >/dev/null 2>&1; then :
17214   gl_cv_size_max=yes
17215 fi
17216 rm -f conftest*
17217
17218     if test -z "$gl_cv_size_max"; then
17219                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
17220 #include <limits.h>"; then :
17221
17222 else
17223   size_t_bits_minus_1=
17224 fi
17225
17226       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
17227
17228 else
17229   fits_in_uint=
17230 fi
17231
17232       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
17233         if test $fits_in_uint = 1; then
17234                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17235 /* end confdefs.h.  */
17236 #include <stddef.h>
17237                  extern size_t foo;
17238                  extern unsigned long foo;
17239
17240 int
17241 main ()
17242 {
17243
17244   ;
17245   return 0;
17246 }
17247 _ACEOF
17248 if ac_fn_c_try_compile "$LINENO"; then :
17249   fits_in_uint=0
17250 fi
17251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17252         fi
17253                                 if test $fits_in_uint = 1; then
17254           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
17255         else
17256           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
17257         fi
17258       else
17259                 gl_cv_size_max='((size_t)~(size_t)0)'
17260       fi
17261     fi
17262
17263 fi
17264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
17265 $as_echo "$gl_cv_size_max" >&6; }
17266   if test "$gl_cv_size_max" != yes; then
17267
17268 cat >>confdefs.h <<_ACEOF
17269 #define SIZE_MAX $gl_cv_size_max
17270 _ACEOF
17271
17272   fi
17273
17274
17275
17276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
17277 $as_echo_n "checking for ssize_t... " >&6; }
17278 if ${gt_cv_ssize_t+:} false; then :
17279   $as_echo_n "(cached) " >&6
17280 else
17281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17282 /* end confdefs.h.  */
17283 #include <sys/types.h>
17284 int
17285 main ()
17286 {
17287 int x = sizeof (ssize_t *) + sizeof (ssize_t);
17288             return !x;
17289   ;
17290   return 0;
17291 }
17292 _ACEOF
17293 if ac_fn_c_try_compile "$LINENO"; then :
17294   gt_cv_ssize_t=yes
17295 else
17296   gt_cv_ssize_t=no
17297 fi
17298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17299 fi
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
17301 $as_echo "$gt_cv_ssize_t" >&6; }
17302   if test $gt_cv_ssize_t = no; then
17303
17304 $as_echo "#define ssize_t int" >>confdefs.h
17305
17306   fi
17307
17308
17309
17310
17311     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
17312 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
17313 if ${gl_cv_func_stat_dir_slash+:} false; then :
17314   $as_echo_n "(cached) " >&6
17315 else
17316   if test "$cross_compiling" = yes; then :
17317   case $host_os in
17318             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
17319             *) gl_cv_func_stat_dir_slash="guessing yes";;
17320           esac
17321 else
17322   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323 /* end confdefs.h.  */
17324 #include <sys/stat.h>
17325
17326 int
17327 main ()
17328 {
17329 struct stat st; return stat (".", &st) != stat ("./", &st);
17330   ;
17331   return 0;
17332 }
17333 _ACEOF
17334 if ac_fn_c_try_run "$LINENO"; then :
17335   gl_cv_func_stat_dir_slash=yes
17336 else
17337   gl_cv_func_stat_dir_slash=no
17338 fi
17339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17340   conftest.$ac_objext conftest.beam conftest.$ac_ext
17341 fi
17342
17343 fi
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
17345 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
17346         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
17347 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
17348 if ${gl_cv_func_stat_file_slash+:} false; then :
17349   $as_echo_n "(cached) " >&6
17350 else
17351   touch conftest.tmp
17352        # Assume that if we have lstat, we can also check symlinks.
17353        if test $ac_cv_func_lstat = yes; then
17354          ln -s conftest.tmp conftest.lnk
17355        fi
17356        if test "$cross_compiling" = yes; then :
17357   gl_cv_func_stat_file_slash="guessing no"
17358 else
17359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17360 /* end confdefs.h.  */
17361 #include <sys/stat.h>
17362
17363 int
17364 main ()
17365 {
17366 int result = 0;
17367       struct stat st;
17368       if (!stat ("conftest.tmp/", &st))
17369         result |= 1;
17370 #if HAVE_LSTAT
17371       if (!stat ("conftest.lnk/", &st))
17372         result |= 2;
17373 #endif
17374       return result;
17375
17376   ;
17377   return 0;
17378 }
17379 _ACEOF
17380 if ac_fn_c_try_run "$LINENO"; then :
17381   gl_cv_func_stat_file_slash=yes
17382 else
17383   gl_cv_func_stat_file_slash=no
17384 fi
17385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17386   conftest.$ac_objext conftest.beam conftest.$ac_ext
17387 fi
17388
17389        rm -f conftest.tmp conftest.lnk
17390 fi
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
17392 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
17393   case $gl_cv_func_stat_dir_slash in
17394     *no) REPLACE_STAT=1
17395
17396 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
17397 ;;
17398   esac
17399   case $gl_cv_func_stat_file_slash in
17400     *no) REPLACE_STAT=1
17401
17402 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
17403 ;;
17404   esac
17405
17406 if test $REPLACE_STAT = 1; then
17407
17408
17409
17410
17411
17412
17413
17414
17415   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
17416
17417
17418
17419   :
17420
17421 fi
17422
17423
17424
17425
17426
17427           GNULIB_STAT=1
17428
17429
17430
17431
17432
17433 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
17434
17435
17436
17437
17438
17439
17440
17441
17442   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>
17443      #include <sys/stat.h>
17444 "
17445 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
17446
17447 cat >>confdefs.h <<_ACEOF
17448 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
17449 _ACEOF
17450
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
17452 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
17453 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
17454   $as_echo_n "(cached) " >&6
17455 else
17456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17457 /* end confdefs.h.  */
17458
17459             #include <sys/types.h>
17460             #include <sys/stat.h>
17461             #if HAVE_SYS_TIME_H
17462             # include <sys/time.h>
17463             #endif
17464             #include <time.h>
17465             struct timespec ts;
17466             struct stat st;
17467
17468 int
17469 main ()
17470 {
17471
17472             st.st_atim = ts;
17473
17474   ;
17475   return 0;
17476 }
17477 _ACEOF
17478 if ac_fn_c_try_compile "$LINENO"; then :
17479   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
17480 else
17481   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
17482 fi
17483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17484 fi
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
17486 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
17487      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
17488
17489 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
17490
17491      fi
17492 else
17493   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>
17494         #include <sys/stat.h>
17495 "
17496 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
17497
17498 cat >>confdefs.h <<_ACEOF
17499 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
17500 _ACEOF
17501
17502
17503 else
17504   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
17505            #include <sys/stat.h>
17506 "
17507 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
17508
17509 cat >>confdefs.h <<_ACEOF
17510 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
17511 _ACEOF
17512
17513
17514 else
17515   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>
17516               #include <sys/stat.h>
17517 "
17518 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
17519
17520 cat >>confdefs.h <<_ACEOF
17521 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
17522 _ACEOF
17523
17524
17525 fi
17526
17527 fi
17528
17529 fi
17530
17531 fi
17532
17533
17534
17535
17536
17537
17538   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>
17539      #include <sys/stat.h>
17540 "
17541 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
17542
17543 cat >>confdefs.h <<_ACEOF
17544 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
17545 _ACEOF
17546
17547
17548 else
17549   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
17550         #include <sys/stat.h>
17551 "
17552 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
17553
17554 cat >>confdefs.h <<_ACEOF
17555 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
17556 _ACEOF
17557
17558
17559 else
17560   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>
17561           #include <sys/stat.h>
17562 "
17563 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
17564
17565 cat >>confdefs.h <<_ACEOF
17566 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
17567 _ACEOF
17568
17569
17570 fi
17571
17572 fi
17573
17574 fi
17575
17576
17577
17578   STDARG_H=''
17579   NEXT_STDARG_H='<stdarg.h>'
17580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
17581 $as_echo_n "checking for va_copy... " >&6; }
17582   if ${gl_cv_func_va_copy+:} false; then :
17583   $as_echo_n "(cached) " >&6
17584 else
17585
17586     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17587 /* end confdefs.h.  */
17588 #include <stdarg.h>
17589 int
17590 main ()
17591 {
17592
17593 #ifndef va_copy
17594 void (*func) (va_list, va_list) = va_copy;
17595 #endif
17596
17597   ;
17598   return 0;
17599 }
17600 _ACEOF
17601 if ac_fn_c_try_compile "$LINENO"; then :
17602   gl_cv_func_va_copy=yes
17603 else
17604   gl_cv_func_va_copy=no
17605 fi
17606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17607 fi
17608
17609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
17610 $as_echo "$gl_cv_func_va_copy" >&6; }
17611   if test $gl_cv_func_va_copy = no; then
17612                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17613 /* end confdefs.h.  */
17614 #if defined _AIX && !defined __GNUC__
17615         AIX vaccine
17616        #endif
17617
17618 _ACEOF
17619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17620   $EGREP "vaccine" >/dev/null 2>&1; then :
17621   gl_aixcc=yes
17622 else
17623   gl_aixcc=no
17624 fi
17625 rm -f conftest*
17626
17627     if test $gl_aixcc = yes; then
17628             STDARG_H=stdarg.h
17629
17630
17631
17632
17633
17634
17635
17636
17637      if test $gl_cv_have_include_next = yes; then
17638        gl_cv_next_stdarg_h='<'stdarg.h'>'
17639      else
17640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
17641 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
17642 if ${gl_cv_next_stdarg_h+:} false; then :
17643   $as_echo_n "(cached) " >&6
17644 else
17645
17646                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17647 /* end confdefs.h.  */
17648 #include <stdarg.h>
17649
17650 _ACEOF
17651                                                                                                                         case "$host_os" in
17652                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17653                  *)    gl_absname_cpp="$ac_cpp" ;;
17654                esac
17655
17656                case "$host_os" in
17657                  mingw*)
17658                                                                                                                                      gl_dirsep_regex='[/\\]'
17659                    ;;
17660                  *)
17661                    gl_dirsep_regex='\/'
17662                    ;;
17663                esac
17664                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17665
17666                gl_header_literal_regex=`echo 'stdarg.h' \
17667                                         | sed -e "$gl_make_literal_regex_sed"`
17668                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17669                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17670                    s|^/[^/]|//&|
17671                    p
17672                    q
17673                  }'
17674                                                             gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17675                       sed -n "$gl_absolute_header_sed"`'"'
17676
17677
17678 fi
17679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
17680 $as_echo "$gl_cv_next_stdarg_h" >&6; }
17681      fi
17682      NEXT_STDARG_H=$gl_cv_next_stdarg_h
17683
17684      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17685        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17686        gl_next_as_first_directive='<'stdarg.h'>'
17687      else
17688        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17689        gl_next_as_first_directive=$gl_cv_next_stdarg_h
17690      fi
17691      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
17692
17693
17694
17695
17696             if test "$gl_cv_next_stdarg_h" = '""'; then
17697         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
17698         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
17699       fi
17700     else
17701
17702   saved_as_echo_n="$as_echo_n"
17703   as_echo_n=':'
17704   if ${gl_cv_func___va_copy+:} false; then :
17705   $as_echo_n "(cached) " >&6
17706 else
17707
17708         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17709 /* end confdefs.h.  */
17710 #include <stdarg.h>
17711 int
17712 main ()
17713 {
17714
17715 #ifndef __va_copy
17716 error, bail out
17717 #endif
17718
17719   ;
17720   return 0;
17721 }
17722 _ACEOF
17723 if ac_fn_c_try_compile "$LINENO"; then :
17724   gl_cv_func___va_copy=yes
17725 else
17726   gl_cv_func___va_copy=no
17727 fi
17728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17729 fi
17730
17731   as_echo_n="$saved_as_echo_n"
17732
17733       if test $gl_cv_func___va_copy = yes; then
17734
17735 $as_echo "#define va_copy __va_copy" >>confdefs.h
17736
17737       else
17738
17739
17740 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
17741
17742       fi
17743     fi
17744   fi
17745
17746    if test -n "$STDARG_H"; then
17747   GL_GENERATE_STDARG_H_TRUE=
17748   GL_GENERATE_STDARG_H_FALSE='#'
17749 else
17750   GL_GENERATE_STDARG_H_TRUE='#'
17751   GL_GENERATE_STDARG_H_FALSE=
17752 fi
17753
17754
17755
17756
17757
17758
17759   # Define two additional variables used in the Makefile substitution.
17760
17761   if test "$ac_cv_header_stdbool_h" = yes; then
17762     STDBOOL_H=''
17763   else
17764     STDBOOL_H='stdbool.h'
17765   fi
17766
17767    if test -n "$STDBOOL_H"; then
17768   GL_GENERATE_STDBOOL_H_TRUE=
17769   GL_GENERATE_STDBOOL_H_FALSE='#'
17770 else
17771   GL_GENERATE_STDBOOL_H_TRUE='#'
17772   GL_GENERATE_STDBOOL_H_FALSE=
17773 fi
17774
17775
17776   if test "$ac_cv_type__Bool" = yes; then
17777     HAVE__BOOL=1
17778   else
17779     HAVE__BOOL=0
17780   fi
17781
17782
17783
17784
17785
17786   STDDEF_H=
17787   if test $gt_cv_c_wchar_t = no; then
17788     HAVE_WCHAR_T=0
17789     STDDEF_H=stddef.h
17790   fi
17791   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
17792 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
17793 if ${gl_cv_decl_null_works+:} false; then :
17794   $as_echo_n "(cached) " >&6
17795 else
17796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h.  */
17798 #include <stddef.h>
17799       int test[2 * (sizeof NULL == sizeof (void *)) -1];
17800
17801 int
17802 main ()
17803 {
17804
17805   ;
17806   return 0;
17807 }
17808 _ACEOF
17809 if ac_fn_c_try_compile "$LINENO"; then :
17810   gl_cv_decl_null_works=yes
17811 else
17812   gl_cv_decl_null_works=no
17813 fi
17814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17815 fi
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
17817 $as_echo "$gl_cv_decl_null_works" >&6; }
17818   if test $gl_cv_decl_null_works = no; then
17819     REPLACE_NULL=1
17820     STDDEF_H=stddef.h
17821   fi
17822
17823    if test -n "$STDDEF_H"; then
17824   GL_GENERATE_STDDEF_H_TRUE=
17825   GL_GENERATE_STDDEF_H_FALSE='#'
17826 else
17827   GL_GENERATE_STDDEF_H_TRUE='#'
17828   GL_GENERATE_STDDEF_H_FALSE=
17829 fi
17830
17831   if test -n "$STDDEF_H"; then
17832
17833
17834
17835
17836
17837
17838
17839
17840      if test $gl_cv_have_include_next = yes; then
17841        gl_cv_next_stddef_h='<'stddef.h'>'
17842      else
17843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
17844 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
17845 if ${gl_cv_next_stddef_h+:} false; then :
17846   $as_echo_n "(cached) " >&6
17847 else
17848
17849                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17850 /* end confdefs.h.  */
17851 #include <stddef.h>
17852
17853 _ACEOF
17854                                                                                                                         case "$host_os" in
17855                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17856                  *)    gl_absname_cpp="$ac_cpp" ;;
17857                esac
17858
17859                case "$host_os" in
17860                  mingw*)
17861                                                                                                                                      gl_dirsep_regex='[/\\]'
17862                    ;;
17863                  *)
17864                    gl_dirsep_regex='\/'
17865                    ;;
17866                esac
17867                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17868
17869                gl_header_literal_regex=`echo 'stddef.h' \
17870                                         | sed -e "$gl_make_literal_regex_sed"`
17871                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17872                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17873                    s|^/[^/]|//&|
17874                    p
17875                    q
17876                  }'
17877                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17878                       sed -n "$gl_absolute_header_sed"`'"'
17879
17880
17881 fi
17882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17883 $as_echo "$gl_cv_next_stddef_h" >&6; }
17884      fi
17885      NEXT_STDDEF_H=$gl_cv_next_stddef_h
17886
17887      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17888        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17889        gl_next_as_first_directive='<'stddef.h'>'
17890      else
17891        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17892        gl_next_as_first_directive=$gl_cv_next_stddef_h
17893      fi
17894      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17895
17896
17897
17898
17899   fi
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913      if test $gl_cv_have_include_next = yes; then
17914        gl_cv_next_stdio_h='<'stdio.h'>'
17915      else
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
17917 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
17918 if ${gl_cv_next_stdio_h+:} false; then :
17919   $as_echo_n "(cached) " >&6
17920 else
17921
17922                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17923 /* end confdefs.h.  */
17924 #include <stdio.h>
17925
17926 _ACEOF
17927                                                                                                                         case "$host_os" in
17928                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17929                  *)    gl_absname_cpp="$ac_cpp" ;;
17930                esac
17931
17932                case "$host_os" in
17933                  mingw*)
17934                                                                                                                                      gl_dirsep_regex='[/\\]'
17935                    ;;
17936                  *)
17937                    gl_dirsep_regex='\/'
17938                    ;;
17939                esac
17940                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17941
17942                gl_header_literal_regex=`echo 'stdio.h' \
17943                                         | sed -e "$gl_make_literal_regex_sed"`
17944                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17945                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17946                    s|^/[^/]|//&|
17947                    p
17948                    q
17949                  }'
17950                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17951                       sed -n "$gl_absolute_header_sed"`'"'
17952
17953
17954 fi
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
17956 $as_echo "$gl_cv_next_stdio_h" >&6; }
17957      fi
17958      NEXT_STDIO_H=$gl_cv_next_stdio_h
17959
17960      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17961        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17962        gl_next_as_first_directive='<'stdio.h'>'
17963      else
17964        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17965        gl_next_as_first_directive=$gl_cv_next_stdio_h
17966      fi
17967      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
17968
17969
17970
17971
17972
17973       GNULIB_FSCANF=1
17974   GNULIB_SCANF=1
17975   GNULIB_FGETC=1
17976   GNULIB_GETC=1
17977   GNULIB_GETCHAR=1
17978   GNULIB_FGETS=1
17979   GNULIB_FREAD=1
17980
17981
17982       GNULIB_FPRINTF=1
17983   GNULIB_PRINTF=1
17984   GNULIB_VFPRINTF=1
17985   GNULIB_VPRINTF=1
17986   GNULIB_FPUTC=1
17987   GNULIB_PUTC=1
17988   GNULIB_PUTCHAR=1
17989   GNULIB_FPUTS=1
17990   GNULIB_PUTS=1
17991   GNULIB_FWRITE=1
17992
17993
17994
17995
17996     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
17997     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17999 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18000 if eval \${$as_gl_Symbol+:} false; then :
18001   $as_echo_n "(cached) " >&6
18002 else
18003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18004 /* end confdefs.h.  */
18005 #include <stdio.h>
18006
18007 int
18008 main ()
18009 {
18010 #undef $gl_func
18011   (void) $gl_func;
18012   ;
18013   return 0;
18014 }
18015 _ACEOF
18016 if ac_fn_c_try_compile "$LINENO"; then :
18017   eval "$as_gl_Symbol=yes"
18018 else
18019   eval "$as_gl_Symbol=no"
18020 fi
18021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18022 fi
18023 eval ac_res=\$$as_gl_Symbol
18024                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18025 $as_echo "$ac_res" >&6; }
18026     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18027   cat >>confdefs.h <<_ACEOF
18028 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18029 _ACEOF
18030
18031                      eval ac_cv_have_decl_$gl_func=yes
18032 fi
18033       done
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046      if test $gl_cv_have_include_next = yes; then
18047        gl_cv_next_stdlib_h='<'stdlib.h'>'
18048      else
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
18050 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
18051 if ${gl_cv_next_stdlib_h+:} false; then :
18052   $as_echo_n "(cached) " >&6
18053 else
18054
18055                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18056 /* end confdefs.h.  */
18057 #include <stdlib.h>
18058
18059 _ACEOF
18060                                                                                                                         case "$host_os" in
18061                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18062                  *)    gl_absname_cpp="$ac_cpp" ;;
18063                esac
18064
18065                case "$host_os" in
18066                  mingw*)
18067                                                                                                                                      gl_dirsep_regex='[/\\]'
18068                    ;;
18069                  *)
18070                    gl_dirsep_regex='\/'
18071                    ;;
18072                esac
18073                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18074
18075                gl_header_literal_regex=`echo 'stdlib.h' \
18076                                         | sed -e "$gl_make_literal_regex_sed"`
18077                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18078                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18079                    s|^/[^/]|//&|
18080                    p
18081                    q
18082                  }'
18083                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18084                       sed -n "$gl_absolute_header_sed"`'"'
18085
18086
18087 fi
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
18089 $as_echo "$gl_cv_next_stdlib_h" >&6; }
18090      fi
18091      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
18092
18093      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18094        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18095        gl_next_as_first_directive='<'stdlib.h'>'
18096      else
18097        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18098        gl_next_as_first_directive=$gl_cv_next_stdlib_h
18099      fi
18100      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
18101
18102
18103
18104
18105
18106
18107     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     setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
18108     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18110 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18111 if eval \${$as_gl_Symbol+:} false; then :
18112   $as_echo_n "(cached) " >&6
18113 else
18114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18115 /* end confdefs.h.  */
18116 #include <stdlib.h>
18117 #if HAVE_SYS_LOADAVG_H
18118 # include <sys/loadavg.h>
18119 #endif
18120 #if HAVE_RANDOM_H
18121 # include <random.h>
18122 #endif
18123
18124 int
18125 main ()
18126 {
18127 #undef $gl_func
18128   (void) $gl_func;
18129   ;
18130   return 0;
18131 }
18132 _ACEOF
18133 if ac_fn_c_try_compile "$LINENO"; then :
18134   eval "$as_gl_Symbol=yes"
18135 else
18136   eval "$as_gl_Symbol=no"
18137 fi
18138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18139 fi
18140 eval ac_res=\$$as_gl_Symbol
18141                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18142 $as_echo "$ac_res" >&6; }
18143     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18144   cat >>confdefs.h <<_ACEOF
18145 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18146 _ACEOF
18147
18148                      eval ac_cv_have_decl_$gl_func=yes
18149 fi
18150       done
18151
18152
18153
18154
18155
18156
18157
18158   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
18159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
18160 $as_echo_n "checking for working strerror function... " >&6; }
18161 if ${gl_cv_func_working_strerror+:} false; then :
18162   $as_echo_n "(cached) " >&6
18163 else
18164   if test "$cross_compiling" = yes; then :
18165            gl_cv_func_working_strerror="guessing no"
18166 else
18167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18168 /* end confdefs.h.  */
18169 #include <string.h>
18170
18171 int
18172 main ()
18173 {
18174 if (!*strerror (-2)) return 1;
18175   ;
18176   return 0;
18177 }
18178 _ACEOF
18179 if ac_fn_c_try_run "$LINENO"; then :
18180   gl_cv_func_working_strerror=yes
18181 else
18182   gl_cv_func_working_strerror=no
18183 fi
18184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18185   conftest.$ac_objext conftest.beam conftest.$ac_ext
18186 fi
18187
18188
18189 fi
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
18191 $as_echo "$gl_cv_func_working_strerror" >&6; }
18192     if test "$gl_cv_func_working_strerror" != yes; then
18193                   REPLACE_STRERROR=1
18194     fi
18195
18196   else
18197             REPLACE_STRERROR=1
18198   fi
18199
18200 if test $REPLACE_STRERROR = 1; then
18201
18202
18203
18204
18205
18206
18207
18208
18209   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
18210
18211 fi
18212
18213
18214 cat >>confdefs.h <<_ACEOF
18215 #define GNULIB_STRERROR 1
18216 _ACEOF
18217
18218
18219
18220
18221
18222
18223
18224           GNULIB_STRERROR=1
18225
18226
18227
18228
18229
18230 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
18231
18232
18233
18234
18235
18236 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
18237
18238
18239
18240
18241
18242
18243
18244
18245   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
18246
18247
18248
18249
18250
18251   if test $ac_cv_header_sys_socket_h != yes; then
18252                     for ac_header in winsock2.h
18253 do :
18254   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18255 if test "x$ac_cv_header_winsock2_h" = xyes; then :
18256   cat >>confdefs.h <<_ACEOF
18257 #define HAVE_WINSOCK2_H 1
18258 _ACEOF
18259
18260 fi
18261
18262 done
18263
18264   fi
18265   if test "$ac_cv_header_winsock2_h" = yes; then
18266     HAVE_WINSOCK2_H=1
18267     UNISTD_H_HAVE_WINSOCK2_H=1
18268     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18269   else
18270     HAVE_WINSOCK2_H=0
18271   fi
18272
18273
18274 fi
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284   if test $ac_cv_have_decl_strndup = no; then
18285     HAVE_DECL_STRNDUP=0
18286   fi
18287
18288   if test $ac_cv_func_strndup = yes; then
18289     HAVE_STRNDUP=1
18290     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
18291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
18292 $as_echo_n "checking for working strndup... " >&6; }
18293 if ${gl_cv_func_strndup_works+:} false; then :
18294   $as_echo_n "(cached) " >&6
18295 else
18296   if test "$cross_compiling" = yes; then :
18297
18298           case $host_os in
18299             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
18300             *)               gl_cv_func_strndup_works="guessing yes";;
18301           esac
18302
18303 else
18304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18305 /* end confdefs.h.  */
18306
18307          #include <string.h>
18308                            #include <stdlib.h>
18309 int
18310 main ()
18311 {
18312
18313 #ifndef HAVE_DECL_STRNDUP
18314   extern
18315   #ifdef __cplusplus
18316   "C"
18317   #endif
18318   char *strndup (const char *, size_t);
18319 #endif
18320   char *s;
18321   s = strndup ("some longer string", 15);
18322   free (s);
18323   s = strndup ("shorter string", 13);
18324   return s[13] != '\0';
18325   ;
18326   return 0;
18327 }
18328 _ACEOF
18329 if ac_fn_c_try_run "$LINENO"; then :
18330   gl_cv_func_strndup_works=yes
18331 else
18332   gl_cv_func_strndup_works=no
18333 fi
18334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18335   conftest.$ac_objext conftest.beam conftest.$ac_ext
18336 fi
18337
18338 fi
18339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
18340 $as_echo "$gl_cv_func_strndup_works" >&6; }
18341     case $gl_cv_func_strndup_works in
18342       *no) REPLACE_STRNDUP=1 ;;
18343     esac
18344   else
18345     HAVE_STRNDUP=0
18346   fi
18347
18348 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
18349
18350
18351
18352
18353
18354
18355
18356
18357   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
18358
18359 fi
18360
18361
18362
18363
18364
18365           GNULIB_STRNDUP=1
18366
18367
18368
18369
18370
18371 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381   if test $ac_cv_have_decl_strnlen = no; then
18382     HAVE_DECL_STRNLEN=0
18383   else
18384
18385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
18386 $as_echo_n "checking for working strnlen... " >&6; }
18387 if ${ac_cv_func_strnlen_working+:} false; then :
18388   $as_echo_n "(cached) " >&6
18389 else
18390   if test "$cross_compiling" = yes; then :
18391   # Guess no on AIX systems, yes otherwise.
18392                 case "$host_os" in
18393                   aix*) ac_cv_func_strnlen_working=no;;
18394                   *)    ac_cv_func_strnlen_working=yes;;
18395                 esac
18396 else
18397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18398 /* end confdefs.h.  */
18399 $ac_includes_default
18400 int
18401 main ()
18402 {
18403
18404 #define S "foobar"
18405 #define S_LEN (sizeof S - 1)
18406
18407   /* At least one implementation is buggy: that of AIX 4.3 would
18408      give strnlen (S, 1) == 3.  */
18409
18410   int i;
18411   for (i = 0; i < S_LEN + 1; ++i)
18412     {
18413       int expected = i <= S_LEN ? i : S_LEN;
18414       if (strnlen (S, i) != expected)
18415         return 1;
18416     }
18417   return 0;
18418
18419   ;
18420   return 0;
18421 }
18422 _ACEOF
18423 if ac_fn_c_try_run "$LINENO"; then :
18424   ac_cv_func_strnlen_working=yes
18425 else
18426   ac_cv_func_strnlen_working=no
18427 fi
18428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18429   conftest.$ac_objext conftest.beam conftest.$ac_ext
18430 fi
18431
18432 fi
18433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
18434 $as_echo "$ac_cv_func_strnlen_working" >&6; }
18435 test $ac_cv_func_strnlen_working = no && :
18436
18437
18438     if test $ac_cv_func_strnlen_working = no; then
18439       REPLACE_STRNLEN=1
18440     fi
18441   fi
18442
18443 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
18444
18445
18446
18447
18448
18449
18450
18451
18452   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
18453
18454   :
18455 fi
18456
18457
18458
18459
18460
18461           GNULIB_STRNLEN=1
18462
18463
18464
18465
18466
18467 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
18468
18469
18470
18471
18472
18473
18474         if test $ac_cv_func_symlink = no; then
18475     HAVE_SYMLINK=0
18476   else
18477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
18478 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
18479 if ${gl_cv_func_symlink_works+:} false; then :
18480   $as_echo_n "(cached) " >&6
18481 else
18482   if test "$cross_compiling" = yes; then :
18483   gl_cv_func_symlink_works="guessing no"
18484 else
18485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18486 /* end confdefs.h.  */
18487 #include <unistd.h>
18488
18489 int
18490 main ()
18491 {
18492 int result = 0;
18493              if (!symlink ("a", "conftest.link/"))
18494                result |= 1;
18495              if (symlink ("conftest.f", "conftest.lnk2"))
18496                result |= 2;
18497              else if (!symlink ("a", "conftest.lnk2/"))
18498                result |= 4;
18499              return result;
18500
18501   ;
18502   return 0;
18503 }
18504 _ACEOF
18505 if ac_fn_c_try_run "$LINENO"; then :
18506   gl_cv_func_symlink_works=yes
18507 else
18508   gl_cv_func_symlink_works=no
18509 fi
18510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18511   conftest.$ac_objext conftest.beam conftest.$ac_ext
18512 fi
18513
18514       rm -f conftest.f conftest.link conftest.lnk2
18515 fi
18516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
18517 $as_echo "$gl_cv_func_symlink_works" >&6; }
18518     if test "$gl_cv_func_symlink_works" != yes; then
18519       REPLACE_SYMLINK=1
18520     fi
18521   fi
18522
18523 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
18524
18525
18526
18527
18528
18529
18530
18531
18532   gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
18533
18534 fi
18535
18536
18537
18538
18539
18540           GNULIB_SYMLINK=1
18541
18542
18543
18544
18545
18546 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566      if test $gl_cv_have_include_next = yes; then
18567        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18568      else
18569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
18570 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
18571 if ${gl_cv_next_sys_stat_h+:} false; then :
18572   $as_echo_n "(cached) " >&6
18573 else
18574
18575              if test $ac_cv_header_sys_stat_h = yes; then
18576
18577
18578                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h.  */
18580 #include <sys/stat.h>
18581
18582 _ACEOF
18583                                                                                                                         case "$host_os" in
18584                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18585                  *)    gl_absname_cpp="$ac_cpp" ;;
18586                esac
18587
18588                case "$host_os" in
18589                  mingw*)
18590                                                                                                                                      gl_dirsep_regex='[/\\]'
18591                    ;;
18592                  *)
18593                    gl_dirsep_regex='\/'
18594                    ;;
18595                esac
18596                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18597
18598                gl_header_literal_regex=`echo 'sys/stat.h' \
18599                                         | sed -e "$gl_make_literal_regex_sed"`
18600                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18601                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18602                    s|^/[^/]|//&|
18603                    p
18604                    q
18605                  }'
18606                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18607                       sed -n "$gl_absolute_header_sed"`'"'
18608           else
18609                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18610              fi
18611
18612
18613 fi
18614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
18615 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
18616      fi
18617      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
18618
18619      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18620        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18621        gl_next_as_first_directive='<'sys/stat.h'>'
18622      else
18623        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18624        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
18625      fi
18626      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
18627
18628
18629
18630
18631
18632
18633
18634       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
18635      #include <sys/stat.h>
18636 "
18637 if test "x$ac_cv_type_nlink_t" = xyes; then :
18638
18639 else
18640
18641 $as_echo "#define nlink_t int" >>confdefs.h
18642
18643 fi
18644
18645
18646
18647     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
18648     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18649     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18650 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18651 if eval \${$as_gl_Symbol+:} false; then :
18652   $as_echo_n "(cached) " >&6
18653 else
18654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18655 /* end confdefs.h.  */
18656 #include <sys/stat.h>
18657
18658 int
18659 main ()
18660 {
18661 #undef $gl_func
18662   (void) $gl_func;
18663   ;
18664   return 0;
18665 }
18666 _ACEOF
18667 if ac_fn_c_try_compile "$LINENO"; then :
18668   eval "$as_gl_Symbol=yes"
18669 else
18670   eval "$as_gl_Symbol=no"
18671 fi
18672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18673 fi
18674 eval ac_res=\$$as_gl_Symbol
18675                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18676 $as_echo "$ac_res" >&6; }
18677     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18678   cat >>confdefs.h <<_ACEOF
18679 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18680 _ACEOF
18681
18682                      eval ac_cv_have_decl_$gl_func=yes
18683 fi
18684       done
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694   :
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707   if test $ac_cv_have_decl_localtime_r = no; then
18708     HAVE_DECL_LOCALTIME_R=0
18709   fi
18710
18711
18712   if test $ac_cv_func_localtime_r = yes; then
18713     HAVE_LOCALTIME_R=1
18714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
18715 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
18716 if ${gl_cv_time_r_posix+:} false; then :
18717   $as_echo_n "(cached) " >&6
18718 else
18719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18720 /* end confdefs.h.  */
18721 #include <time.h>
18722 int
18723 main ()
18724 {
18725 /* We don't need to append 'restrict's to the argument types,
18726                  even though the POSIX signature has the 'restrict's,
18727                  since C99 says they can't affect type compatibility.  */
18728               struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
18729               if (ptr) return 0;
18730               /* Check the return type is a pointer.
18731                  On HP-UX 10 it is 'int'.  */
18732               *localtime_r (0, 0);
18733   ;
18734   return 0;
18735 }
18736
18737 _ACEOF
18738 if ac_fn_c_try_compile "$LINENO"; then :
18739   gl_cv_time_r_posix=yes
18740 else
18741   gl_cv_time_r_posix=no
18742 fi
18743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18744
18745 fi
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
18747 $as_echo "$gl_cv_time_r_posix" >&6; }
18748     if test $gl_cv_time_r_posix = yes; then
18749       REPLACE_LOCALTIME_R=0
18750     else
18751       REPLACE_LOCALTIME_R=1
18752     fi
18753   else
18754     HAVE_LOCALTIME_R=0
18755   fi
18756
18757 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
18758
18759
18760
18761
18762
18763
18764
18765
18766   gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
18767
18768
18769   :
18770
18771 fi
18772
18773
18774
18775
18776
18777           GNULIB_TIME_R=1
18778
18779
18780
18781
18782
18783 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803      if test $gl_cv_have_include_next = yes; then
18804        gl_cv_next_unistd_h='<'unistd.h'>'
18805      else
18806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
18807 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
18808 if ${gl_cv_next_unistd_h+:} false; then :
18809   $as_echo_n "(cached) " >&6
18810 else
18811
18812              if test $ac_cv_header_unistd_h = yes; then
18813
18814
18815                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18816 /* end confdefs.h.  */
18817 #include <unistd.h>
18818
18819 _ACEOF
18820                                                                                                                         case "$host_os" in
18821                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18822                  *)    gl_absname_cpp="$ac_cpp" ;;
18823                esac
18824
18825                case "$host_os" in
18826                  mingw*)
18827                                                                                                                                      gl_dirsep_regex='[/\\]'
18828                    ;;
18829                  *)
18830                    gl_dirsep_regex='\/'
18831                    ;;
18832                esac
18833                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18834
18835                gl_header_literal_regex=`echo 'unistd.h' \
18836                                         | sed -e "$gl_make_literal_regex_sed"`
18837                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18838                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18839                    s|^/[^/]|//&|
18840                    p
18841                    q
18842                  }'
18843                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18844                       sed -n "$gl_absolute_header_sed"`'"'
18845           else
18846                gl_cv_next_unistd_h='<'unistd.h'>'
18847              fi
18848
18849
18850 fi
18851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
18852 $as_echo "$gl_cv_next_unistd_h" >&6; }
18853      fi
18854      NEXT_UNISTD_H=$gl_cv_next_unistd_h
18855
18856      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18857        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18858        gl_next_as_first_directive='<'unistd.h'>'
18859      else
18860        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18861        gl_next_as_first_directive=$gl_cv_next_unistd_h
18862      fi
18863      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
18864
18865
18866
18867
18868   if test $ac_cv_header_unistd_h = yes; then
18869     HAVE_UNISTD_H=1
18870   else
18871     HAVE_UNISTD_H=0
18872   fi
18873
18874
18875
18876
18877
18878     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
18879     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18881 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18882 if eval \${$as_gl_Symbol+:} false; then :
18883   $as_echo_n "(cached) " >&6
18884 else
18885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18886 /* end confdefs.h.  */
18887
18888 #if HAVE_UNISTD_H
18889 # include <unistd.h>
18890 #endif
18891 /* Some systems declare various items in the wrong headers.  */
18892 #if !(defined __GLIBC__ && !defined __UCLIBC__)
18893 # include <fcntl.h>
18894 # include <stdio.h>
18895 # include <stdlib.h>
18896 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18897 #  include <io.h>
18898 # endif
18899 #endif
18900
18901 int
18902 main ()
18903 {
18904 #undef $gl_func
18905   (void) $gl_func;
18906   ;
18907   return 0;
18908 }
18909 _ACEOF
18910 if ac_fn_c_try_compile "$LINENO"; then :
18911   eval "$as_gl_Symbol=yes"
18912 else
18913   eval "$as_gl_Symbol=no"
18914 fi
18915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18916 fi
18917 eval ac_res=\$$as_gl_Symbol
18918                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18919 $as_echo "$ac_res" >&6; }
18920     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18921   cat >>confdefs.h <<_ACEOF
18922 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18923 _ACEOF
18924
18925                      eval ac_cv_have_decl_$gl_func=yes
18926 fi
18927       done
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
18938 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
18939 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
18940   $as_echo_n "(cached) " >&6
18941 else
18942   touch conftest.file
18943      # Assume that if we have lstat, we can also check symlinks.
18944      if test $ac_cv_func_lstat = yes; then
18945        ln -s conftest.file conftest.lnk
18946      fi
18947      if test "$cross_compiling" = yes; then :
18948   gl_cv_func_unlink_honors_slashes="guessing no"
18949 else
18950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18951 /* end confdefs.h.  */
18952 #if HAVE_UNISTD_H
18953            # include <unistd.h>
18954            #else /* on Windows with MSVC */
18955            # include <io.h>
18956            #endif
18957            #include <errno.h>
18958
18959 int
18960 main ()
18961 {
18962 int result = 0;
18963            if (!unlink ("conftest.file/"))
18964              result |= 1;
18965            else if (errno != ENOTDIR)
18966              result |= 2;
18967 #if HAVE_LSTAT
18968            if (!unlink ("conftest.lnk/"))
18969              result |= 4;
18970            else if (errno != ENOTDIR)
18971              result |= 8;
18972 #endif
18973            return result;
18974
18975   ;
18976   return 0;
18977 }
18978 _ACEOF
18979 if ac_fn_c_try_run "$LINENO"; then :
18980   gl_cv_func_unlink_honors_slashes=yes
18981 else
18982   gl_cv_func_unlink_honors_slashes=no
18983 fi
18984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18985   conftest.$ac_objext conftest.beam conftest.$ac_ext
18986 fi
18987
18988      rm -f conftest.file conftest.lnk
18989 fi
18990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
18991 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
18992       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
18993 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
18994 if ${gl_cv_func_unlink_parent_fails+:} false; then :
18995   $as_echo_n "(cached) " >&6
18996 else
18997   case "$host_os" in
18998        darwin*)
18999                                                       if {
19000               # Use the mktemp program if available. If not available, hide the error
19001               # message.
19002               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
19003               test -n "$tmp" && test -d "$tmp"
19004             } ||
19005             {
19006               # Use a simple mkdir command. It is guaranteed to fail if the directory
19007               # already exists.  $RANDOM is bash specific and expands to empty in shells
19008               # other than bash, ksh and zsh.  Its use does not increase security;
19009               # rather, it minimizes the probability of failure in a very cluttered /tmp
19010               # directory.
19011               tmp=/tmp/gt$$-$RANDOM
19012               (umask 077 && mkdir "$tmp")
19013             }; then
19014            mkdir "$tmp/subdir"
19015            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
19016            export GL_SUBDIR_FOR_UNLINK
19017            if test "$cross_compiling" = yes; then :
19018   gl_cv_func_unlink_parent_fails="guessing no"
19019 else
19020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19021 /* end confdefs.h.  */
19022
19023                 #include <stdlib.h>
19024                 #if HAVE_UNISTD_H
19025                 # include <unistd.h>
19026                 #else /* on Windows with MSVC */
19027                 # include <direct.h>
19028                 # include <io.h>
19029                 #endif
19030                 int main ()
19031                 {
19032                   int result = 0;
19033                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
19034                     result |= 1;
19035                   else if (unlink ("..") == 0)
19036                     result |= 2;
19037                   return result;
19038                 }
19039
19040 _ACEOF
19041 if ac_fn_c_try_run "$LINENO"; then :
19042   gl_cv_func_unlink_parent_fails=yes
19043 else
19044   gl_cv_func_unlink_parent_fails=no
19045 fi
19046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19047   conftest.$ac_objext conftest.beam conftest.$ac_ext
19048 fi
19049
19050            unset GL_SUBDIR_FOR_UNLINK
19051            rm -rf "$tmp"
19052          else
19053            gl_cv_func_unlink_parent_fails="guessing no"
19054          fi
19055          ;;
19056        *)
19057          gl_cv_func_unlink_parent_fails="guessing yes"
19058          ;;
19059      esac
19060
19061 fi
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
19063 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
19064   case "$gl_cv_func_unlink_parent_fails" in
19065     *no)
19066
19067 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
19068
19069       ;;
19070   esac
19071   if test "$gl_cv_func_unlink_honors_slashes" != yes \
19072      || { case "$gl_cv_func_unlink_parent_fails" in
19073             *yes) false;;
19074             *no) true;;
19075           esac
19076         }; then
19077     REPLACE_UNLINK=1
19078   fi
19079
19080 if test $REPLACE_UNLINK = 1; then
19081
19082
19083
19084
19085
19086
19087
19088
19089   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
19090
19091 fi
19092
19093
19094
19095
19096
19097           GNULIB_UNLINK=1
19098
19099
19100
19101
19102
19103 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
19104
19105
19106
19107
19108
19109
19110   if test $ac_cv_have_decl_unsetenv = no; then
19111     HAVE_DECL_UNSETENV=0
19112   fi
19113   for ac_func in unsetenv
19114 do :
19115   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
19116 if test "x$ac_cv_func_unsetenv" = xyes; then :
19117   cat >>confdefs.h <<_ACEOF
19118 #define HAVE_UNSETENV 1
19119 _ACEOF
19120
19121 fi
19122 done
19123
19124   if test $ac_cv_func_unsetenv = no; then
19125     HAVE_UNSETENV=0
19126   else
19127     HAVE_UNSETENV=1
19128         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
19129 $as_echo_n "checking for unsetenv() return type... " >&6; }
19130 if ${gt_cv_func_unsetenv_ret+:} false; then :
19131   $as_echo_n "(cached) " >&6
19132 else
19133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134 /* end confdefs.h.  */
19135
19136 #undef _BSD
19137 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
19138 #include <stdlib.h>
19139 extern
19140 #ifdef __cplusplus
19141 "C"
19142 #endif
19143 int unsetenv (const char *name);
19144
19145 int
19146 main ()
19147 {
19148
19149   ;
19150   return 0;
19151 }
19152 _ACEOF
19153 if ac_fn_c_try_compile "$LINENO"; then :
19154   gt_cv_func_unsetenv_ret='int'
19155 else
19156   gt_cv_func_unsetenv_ret='void'
19157 fi
19158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19159 fi
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
19161 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
19162     if test $gt_cv_func_unsetenv_ret = 'void'; then
19163
19164 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
19165
19166       REPLACE_UNSETENV=1
19167     fi
19168
19169                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
19170 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
19171 if ${gl_cv_func_unsetenv_works+:} false; then :
19172   $as_echo_n "(cached) " >&6
19173 else
19174   if test "$cross_compiling" = yes; then :
19175   gl_cv_func_unsetenv_works="guessing no"
19176 else
19177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19178 /* end confdefs.h.  */
19179
19180        #include <stdlib.h>
19181        #include <errno.h>
19182        extern char **environ;
19183
19184 int
19185 main ()
19186 {
19187
19188        char entry1[] = "a=1";
19189        char entry2[] = "b=2";
19190        char *env[] = { entry1, entry2, NULL };
19191        if (putenv ((char *) "a=1")) return 1;
19192        if (putenv (entry2)) return 2;
19193        entry2[0] = 'a';
19194        unsetenv ("a");
19195        if (getenv ("a")) return 3;
19196        if (!unsetenv ("") || errno != EINVAL) return 4;
19197        entry2[0] = 'b';
19198        environ = env;
19199        if (!getenv ("a")) return 5;
19200        entry2[0] = 'a';
19201        unsetenv ("a");
19202        if (getenv ("a")) return 6;
19203
19204   ;
19205   return 0;
19206 }
19207 _ACEOF
19208 if ac_fn_c_try_run "$LINENO"; then :
19209   gl_cv_func_unsetenv_works=yes
19210 else
19211   gl_cv_func_unsetenv_works=no
19212 fi
19213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19214   conftest.$ac_objext conftest.beam conftest.$ac_ext
19215 fi
19216
19217 fi
19218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
19219 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
19220     if test "$gl_cv_func_unsetenv_works" != yes; then
19221       REPLACE_UNSETENV=1
19222     fi
19223   fi
19224
19225 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
19226
19227
19228
19229
19230
19231
19232
19233
19234   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
19235
19236
19237
19238
19239
19240 fi
19241
19242
19243
19244
19245
19246           GNULIB_UNSETENV=1
19247
19248
19249
19250
19251
19252 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
19263                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
19264 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
19265 if ${gl_cv_func_futimesat_works+:} false; then :
19266   $as_echo_n "(cached) " >&6
19267 else
19268   touch conftest.file
19269        if test "$cross_compiling" = yes; then :
19270   gl_cv_func_futimesat_works="guessing no"
19271 else
19272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19273 /* end confdefs.h.  */
19274
19275 #include <stddef.h>
19276 #include <sys/times.h>
19277 #include <fcntl.h>
19278
19279 int
19280 main ()
19281 {
19282     int fd = open ("conftest.file", O_RDWR);
19283           if (fd < 0) return 1;
19284           if (futimesat (fd, NULL, NULL)) return 2;
19285
19286   ;
19287   return 0;
19288 }
19289 _ACEOF
19290 if ac_fn_c_try_run "$LINENO"; then :
19291   gl_cv_func_futimesat_works=yes
19292 else
19293   gl_cv_func_futimesat_works=no
19294 fi
19295 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19296   conftest.$ac_objext conftest.beam conftest.$ac_ext
19297 fi
19298
19299       rm -f conftest.file
19300 fi
19301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
19302 $as_echo "$gl_cv_func_futimesat_works" >&6; }
19303     if test "$gl_cv_func_futimesat_works" != yes; then
19304
19305 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
19306
19307     fi
19308   fi
19309
19310
19311
19312   if test $ac_cv_func_vasnprintf = no; then
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
19354
19355   if test $ac_cv_func_vasnprintf = yes; then
19356
19357 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
19358
19359   fi
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
19372 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
19373
19374 else
19375
19376 $as_echo "#define ptrdiff_t long" >>confdefs.h
19377
19378
19379 fi
19380
19381
19382
19383
19384
19385
19386
19387   fi
19388
19389
19390   for ac_func in vasprintf
19391 do :
19392   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
19393 if test "x$ac_cv_func_vasprintf" = xyes; then :
19394   cat >>confdefs.h <<_ACEOF
19395 #define HAVE_VASPRINTF 1
19396 _ACEOF
19397
19398 fi
19399 done
19400
19401   if test $ac_cv_func_vasprintf = no; then
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411   gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421   gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
19422
19423
19424   if test $ac_cv_func_vasprintf = yes; then
19425     REPLACE_VASPRINTF=1
19426   else
19427     HAVE_VASPRINTF=0
19428   fi
19429
19430
19431
19432
19433
19434
19435
19436
19437   fi
19438
19439
19440
19441
19442
19443
19444           GNULIB_VASPRINTF=1
19445
19446
19447
19448
19449
19450 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469      if test $gl_cv_have_include_next = yes; then
19470        gl_cv_next_wchar_h='<'wchar.h'>'
19471      else
19472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
19473 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
19474 if ${gl_cv_next_wchar_h+:} false; then :
19475   $as_echo_n "(cached) " >&6
19476 else
19477
19478              if test $ac_cv_header_wchar_h = yes; then
19479
19480
19481                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19482 /* end confdefs.h.  */
19483 #include <wchar.h>
19484
19485 _ACEOF
19486                                                                                                                         case "$host_os" in
19487                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19488                  *)    gl_absname_cpp="$ac_cpp" ;;
19489                esac
19490
19491                case "$host_os" in
19492                  mingw*)
19493                                                                                                                                      gl_dirsep_regex='[/\\]'
19494                    ;;
19495                  *)
19496                    gl_dirsep_regex='\/'
19497                    ;;
19498                esac
19499                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19500
19501                gl_header_literal_regex=`echo 'wchar.h' \
19502                                         | sed -e "$gl_make_literal_regex_sed"`
19503                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19504                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19505                    s|^/[^/]|//&|
19506                    p
19507                    q
19508                  }'
19509                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19510                       sed -n "$gl_absolute_header_sed"`'"'
19511           else
19512                gl_cv_next_wchar_h='<'wchar.h'>'
19513              fi
19514
19515
19516 fi
19517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
19518 $as_echo "$gl_cv_next_wchar_h" >&6; }
19519      fi
19520      NEXT_WCHAR_H=$gl_cv_next_wchar_h
19521
19522      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19523        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19524        gl_next_as_first_directive='<'wchar.h'>'
19525      else
19526        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19527        gl_next_as_first_directive=$gl_cv_next_wchar_h
19528      fi
19529      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
19530
19531
19532
19533
19534   if test $ac_cv_header_wchar_h = yes; then
19535     HAVE_WCHAR_H=1
19536   else
19537     HAVE_WCHAR_H=0
19538   fi
19539
19540
19541
19542
19543
19544   if test $gt_cv_c_wint_t = yes; then
19545     HAVE_WINT_T=1
19546   else
19547     HAVE_WINT_T=0
19548   fi
19549
19550
19551
19552     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
19553     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19555 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19556 if eval \${$as_gl_Symbol+:} false; then :
19557   $as_echo_n "(cached) " >&6
19558 else
19559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19560 /* end confdefs.h.  */
19561
19562 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19563    <wchar.h>.
19564    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19565    included before <wchar.h>.  */
19566 #if !(defined __GLIBC__ && !defined __UCLIBC__)
19567 # include <stddef.h>
19568 # include <stdio.h>
19569 # include <time.h>
19570 #endif
19571 #include <wchar.h>
19572
19573 int
19574 main ()
19575 {
19576 #undef $gl_func
19577   (void) $gl_func;
19578   ;
19579   return 0;
19580 }
19581 _ACEOF
19582 if ac_fn_c_try_compile "$LINENO"; then :
19583   eval "$as_gl_Symbol=yes"
19584 else
19585   eval "$as_gl_Symbol=no"
19586 fi
19587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19588 fi
19589 eval ac_res=\$$as_gl_Symbol
19590                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19591 $as_echo "$ac_res" >&6; }
19592     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19593   cat >>confdefs.h <<_ACEOF
19594 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19595 _ACEOF
19596
19597                      eval ac_cv_have_decl_$gl_func=yes
19598 fi
19599       done
19600
19601
19602
19603
19604
19605
19606
19607   if test $ac_cv_func_iswcntrl = yes; then
19608     HAVE_ISWCNTRL=1
19609   else
19610     HAVE_ISWCNTRL=0
19611   fi
19612
19613
19614
19615
19616
19617   if test $gt_cv_c_wint_t = yes; then
19618     HAVE_WINT_T=1
19619   else
19620     HAVE_WINT_T=0
19621   fi
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633      if test $gl_cv_have_include_next = yes; then
19634        gl_cv_next_wctype_h='<'wctype.h'>'
19635      else
19636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
19637 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
19638 if ${gl_cv_next_wctype_h+:} false; then :
19639   $as_echo_n "(cached) " >&6
19640 else
19641
19642              if test $ac_cv_header_wctype_h = yes; then
19643
19644
19645                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19646 /* end confdefs.h.  */
19647 #include <wctype.h>
19648
19649 _ACEOF
19650                                                                                                                         case "$host_os" in
19651                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19652                  *)    gl_absname_cpp="$ac_cpp" ;;
19653                esac
19654
19655                case "$host_os" in
19656                  mingw*)
19657                                                                                                                                      gl_dirsep_regex='[/\\]'
19658                    ;;
19659                  *)
19660                    gl_dirsep_regex='\/'
19661                    ;;
19662                esac
19663                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19664
19665                gl_header_literal_regex=`echo 'wctype.h' \
19666                                         | sed -e "$gl_make_literal_regex_sed"`
19667                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19668                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19669                    s|^/[^/]|//&|
19670                    p
19671                    q
19672                  }'
19673                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19674                       sed -n "$gl_absolute_header_sed"`'"'
19675           else
19676                gl_cv_next_wctype_h='<'wctype.h'>'
19677              fi
19678
19679
19680 fi
19681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
19682 $as_echo "$gl_cv_next_wctype_h" >&6; }
19683      fi
19684      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
19685
19686      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19687        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19688        gl_next_as_first_directive='<'wctype.h'>'
19689      else
19690        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19691        gl_next_as_first_directive=$gl_cv_next_wctype_h
19692      fi
19693      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
19694
19695
19696
19697
19698   if test $ac_cv_header_wctype_h = yes; then
19699     if test $ac_cv_func_iswcntrl = yes; then
19700                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
19701 $as_echo_n "checking whether iswcntrl works... " >&6; }
19702 if ${gl_cv_func_iswcntrl_works+:} false; then :
19703   $as_echo_n "(cached) " >&6
19704 else
19705
19706           if test "$cross_compiling" = yes; then :
19707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19708 /* end confdefs.h.  */
19709 #include <stdlib.h>
19710                           #if __GNU_LIBRARY__ == 1
19711                           Linux libc5 i18n is broken.
19712                           #endif
19713 int
19714 main ()
19715 {
19716
19717   ;
19718   return 0;
19719 }
19720 _ACEOF
19721 if ac_fn_c_try_compile "$LINENO"; then :
19722   gl_cv_func_iswcntrl_works=yes
19723 else
19724   gl_cv_func_iswcntrl_works=no
19725 fi
19726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19727
19728 else
19729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19730 /* end confdefs.h.  */
19731
19732                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19733                   included before <wchar.h>.
19734                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19735                   must be included before <wchar.h>.  */
19736                #include <stddef.h>
19737                #include <stdio.h>
19738                #include <time.h>
19739                #include <wchar.h>
19740                #include <wctype.h>
19741                int main () { return iswprint ('x') == 0; }
19742
19743 _ACEOF
19744 if ac_fn_c_try_run "$LINENO"; then :
19745   gl_cv_func_iswcntrl_works=yes
19746 else
19747   gl_cv_func_iswcntrl_works=no
19748 fi
19749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19750   conftest.$ac_objext conftest.beam conftest.$ac_ext
19751 fi
19752
19753
19754 fi
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
19756 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
19757     fi
19758     HAVE_WCTYPE_H=1
19759   else
19760     HAVE_WCTYPE_H=0
19761   fi
19762
19763
19764   if test "$gl_cv_func_iswcntrl_works" = no; then
19765     REPLACE_ISWCNTRL=1
19766   else
19767     REPLACE_ISWCNTRL=0
19768   fi
19769
19770
19771   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
19772         :
19773   fi
19774
19775   if test $REPLACE_ISWCNTRL = 1; then
19776     REPLACE_TOWLOWER=1
19777   else
19778     for ac_func in towlower
19779 do :
19780   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
19781 if test "x$ac_cv_func_towlower" = xyes; then :
19782   cat >>confdefs.h <<_ACEOF
19783 #define HAVE_TOWLOWER 1
19784 _ACEOF
19785
19786 fi
19787 done
19788
19789     if test $ac_cv_func_towlower = yes; then
19790       REPLACE_TOWLOWER=0
19791     else
19792       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19793              included before <wchar.h>.
19794              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19795              must be included before <wchar.h>.  */
19796           #include <stddef.h>
19797           #include <stdio.h>
19798           #include <time.h>
19799           #include <wchar.h>
19800           #if HAVE_WCTYPE_H
19801           # include <wctype.h>
19802           #endif
19803
19804 "
19805 if test "x$ac_cv_have_decl_towlower" = xyes; then :
19806   ac_have_decl=1
19807 else
19808   ac_have_decl=0
19809 fi
19810
19811 cat >>confdefs.h <<_ACEOF
19812 #define HAVE_DECL_TOWLOWER $ac_have_decl
19813 _ACEOF
19814
19815       if test $ac_cv_have_decl_towlower = yes; then
19816                                 REPLACE_TOWLOWER=1
19817       else
19818         REPLACE_TOWLOWER=0
19819       fi
19820     fi
19821   fi
19822
19823
19824   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
19825         :
19826   fi
19827
19828           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
19829 $as_echo_n "checking for wctype_t... " >&6; }
19830 if ${gl_cv_type_wctype_t+:} false; then :
19831   $as_echo_n "(cached) " >&6
19832 else
19833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19834 /* end confdefs.h.  */
19835 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19836                included before <wchar.h>.
19837                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19838                must be included before <wchar.h>.  */
19839             #include <stddef.h>
19840             #include <stdio.h>
19841             #include <time.h>
19842             #include <wchar.h>
19843             #if HAVE_WCTYPE_H
19844             # include <wctype.h>
19845             #endif
19846             wctype_t a;
19847
19848 int
19849 main ()
19850 {
19851
19852   ;
19853   return 0;
19854 }
19855 _ACEOF
19856 if ac_fn_c_try_compile "$LINENO"; then :
19857   gl_cv_type_wctype_t=yes
19858 else
19859   gl_cv_type_wctype_t=no
19860 fi
19861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19862
19863 fi
19864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
19865 $as_echo "$gl_cv_type_wctype_t" >&6; }
19866   if test $gl_cv_type_wctype_t = no; then
19867     HAVE_WCTYPE_T=0
19868   fi
19869
19870       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
19871 $as_echo_n "checking for wctrans_t... " >&6; }
19872 if ${gl_cv_type_wctrans_t+:} false; then :
19873   $as_echo_n "(cached) " >&6
19874 else
19875   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19876 /* end confdefs.h.  */
19877 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19878                included before <wchar.h>.
19879                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19880                must be included before <wchar.h>.  */
19881             #include <stddef.h>
19882             #include <stdio.h>
19883             #include <time.h>
19884             #include <wchar.h>
19885             #include <wctype.h>
19886             wctrans_t a;
19887
19888 int
19889 main ()
19890 {
19891
19892   ;
19893   return 0;
19894 }
19895 _ACEOF
19896 if ac_fn_c_try_compile "$LINENO"; then :
19897   gl_cv_type_wctrans_t=yes
19898 else
19899   gl_cv_type_wctrans_t=no
19900 fi
19901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19902
19903 fi
19904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
19905 $as_echo "$gl_cv_type_wctrans_t" >&6; }
19906   if test $gl_cv_type_wctrans_t = no; then
19907     HAVE_WCTRANS_T=0
19908   fi
19909
19910
19911     for gl_func in wctype iswctype wctrans towctrans     ; do
19912     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19914 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19915 if eval \${$as_gl_Symbol+:} false; then :
19916   $as_echo_n "(cached) " >&6
19917 else
19918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19919 /* end confdefs.h.  */
19920
19921 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19922    <wchar.h>.
19923    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19924    included before <wchar.h>.  */
19925 #if !(defined __GLIBC__ && !defined __UCLIBC__)
19926 # include <stddef.h>
19927 # include <stdio.h>
19928 # include <time.h>
19929 # include <wchar.h>
19930 #endif
19931 #include <wctype.h>
19932
19933 int
19934 main ()
19935 {
19936 #undef $gl_func
19937   (void) $gl_func;
19938   ;
19939   return 0;
19940 }
19941 _ACEOF
19942 if ac_fn_c_try_compile "$LINENO"; then :
19943   eval "$as_gl_Symbol=yes"
19944 else
19945   eval "$as_gl_Symbol=no"
19946 fi
19947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19948 fi
19949 eval ac_res=\$$as_gl_Symbol
19950                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19951 $as_echo "$ac_res" >&6; }
19952     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19953   cat >>confdefs.h <<_ACEOF
19954 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19955 _ACEOF
19956
19957                      eval ac_cv_have_decl_$gl_func=yes
19958 fi
19959       done
19960
19961
19962
19963
19964
19965   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19966     REPLACE_WRITE=1
19967   fi
19968
19969
19970
19971 if test $REPLACE_WRITE = 1; then
19972
19973
19974
19975
19976
19977
19978
19979
19980   gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
19981
19982
19983
19984
19985 fi
19986
19987
19988
19989
19990
19991           GNULIB_WRITE=1
19992
19993
19994
19995
19996
19997 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
19998
19999
20000
20001
20002
20003
20004   :
20005
20006
20007   :
20008
20009
20010
20011
20012
20013
20014
20015
20016   for ac_header in stdint.h
20017 do :
20018   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
20019 if test "x$ac_cv_header_stdint_h" = xyes; then :
20020   cat >>confdefs.h <<_ACEOF
20021 #define HAVE_STDINT_H 1
20022 _ACEOF
20023
20024 fi
20025
20026 done
20027
20028
20029
20030
20031   :
20032
20033
20034
20035
20036
20037
20038   # End of code from modules
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048   gltests_libdeps=
20049   gltests_ltlibdeps=
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059   gl_source_base='tests'
20060   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
20061
20062   gl_module_indicator_condition=$gltests_WITNESS
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072   LIBPATCH_LIBDEPS="$gl_libdeps"
20073
20074   LIBPATCH_LTLIBDEPS="$gl_ltlibdeps"
20075
20076
20077 if test -n "$ac_tool_prefix"; then
20078   for ac_prog in ar lib "link -lib"
20079   do
20080     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20081 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20083 $as_echo_n "checking for $ac_word... " >&6; }
20084 if ${ac_cv_prog_AR+:} false; then :
20085   $as_echo_n "(cached) " >&6
20086 else
20087   if test -n "$AR"; then
20088   ac_cv_prog_AR="$AR" # Let the user override the test.
20089 else
20090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20091 for as_dir in $PATH
20092 do
20093   IFS=$as_save_IFS
20094   test -z "$as_dir" && as_dir=.
20095     for ac_exec_ext in '' $ac_executable_extensions; do
20096   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20097     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
20098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20099     break 2
20100   fi
20101 done
20102   done
20103 IFS=$as_save_IFS
20104
20105 fi
20106 fi
20107 AR=$ac_cv_prog_AR
20108 if test -n "$AR"; then
20109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20110 $as_echo "$AR" >&6; }
20111 else
20112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20113 $as_echo "no" >&6; }
20114 fi
20115
20116
20117     test -n "$AR" && break
20118   done
20119 fi
20120 if test -z "$AR"; then
20121   ac_ct_AR=$AR
20122   for ac_prog in ar lib "link -lib"
20123 do
20124   # Extract the first word of "$ac_prog", so it can be a program name with args.
20125 set dummy $ac_prog; ac_word=$2
20126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20127 $as_echo_n "checking for $ac_word... " >&6; }
20128 if ${ac_cv_prog_ac_ct_AR+:} false; then :
20129   $as_echo_n "(cached) " >&6
20130 else
20131   if test -n "$ac_ct_AR"; then
20132   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20133 else
20134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20135 for as_dir in $PATH
20136 do
20137   IFS=$as_save_IFS
20138   test -z "$as_dir" && as_dir=.
20139     for ac_exec_ext in '' $ac_executable_extensions; do
20140   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20141     ac_cv_prog_ac_ct_AR="$ac_prog"
20142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20143     break 2
20144   fi
20145 done
20146   done
20147 IFS=$as_save_IFS
20148
20149 fi
20150 fi
20151 ac_ct_AR=$ac_cv_prog_ac_ct_AR
20152 if test -n "$ac_ct_AR"; then
20153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20154 $as_echo "$ac_ct_AR" >&6; }
20155 else
20156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20157 $as_echo "no" >&6; }
20158 fi
20159
20160
20161   test -n "$ac_ct_AR" && break
20162 done
20163
20164   if test "x$ac_ct_AR" = x; then
20165     AR="false"
20166   else
20167     case $cross_compiling:$ac_tool_warned in
20168 yes:)
20169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20170 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20171 ac_tool_warned=yes ;;
20172 esac
20173     AR=$ac_ct_AR
20174   fi
20175 fi
20176
20177 : ${AR=ar}
20178
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
20180 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
20181 if ${am_cv_ar_interface+:} false; then :
20182   $as_echo_n "(cached) " >&6
20183 else
20184   am_cv_ar_interface=ar
20185    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20186 /* end confdefs.h.  */
20187 int some_variable = 0;
20188 _ACEOF
20189 if ac_fn_c_try_compile "$LINENO"; then :
20190   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
20191       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
20192   (eval $am_ar_try) 2>&5
20193   ac_status=$?
20194   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20195   test $ac_status = 0; }
20196       if test "$ac_status" -eq 0; then
20197         am_cv_ar_interface=ar
20198       else
20199         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
20200         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
20201   (eval $am_ar_try) 2>&5
20202   ac_status=$?
20203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20204   test $ac_status = 0; }
20205         if test "$ac_status" -eq 0; then
20206           am_cv_ar_interface=lib
20207         else
20208           am_cv_ar_interface=unknown
20209         fi
20210       fi
20211       rm -f conftest.lib libconftest.a
20212
20213 fi
20214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20215
20216 fi
20217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
20218 $as_echo "$am_cv_ar_interface" >&6; }
20219
20220 case $am_cv_ar_interface in
20221 ar)
20222   ;;
20223 lib)
20224   # Microsoft lib, so override with the ar-lib wrapper script.
20225   # FIXME: It is wrong to rewrite AR.
20226   # But if we don't then we get into trouble of one sort or another.
20227   # A longer-term fix would be to have automake use am__AR in this case,
20228   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
20229   # similar.
20230   AR="$am_aux_dir/ar-lib $AR"
20231   ;;
20232 unknown)
20233   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
20234   ;;
20235 esac
20236
20237
20238 # Check whether --enable-gcc-warnings was given.
20239 if test "${enable_gcc_warnings+set}" = set; then :
20240   enableval=$enable_gcc_warnings; case $enableval in
20241      yes|no) ;;
20242      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
20243    esac
20244    gl_gcc_warnings=$enableval
20245 else
20246   gl_gcc_warnings=no
20247
20248 fi
20249
20250
20251 if test "$gl_gcc_warnings" = yes; then
20252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
20253 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
20254 if ${gl_cv_warn_c__Werror+:} false; then :
20255   $as_echo_n "(cached) " >&6
20256 else
20257
20258   gl_save_compiler_FLAGS="$CFLAGS"
20259   CFLAGS="$CFLAGS -Werror"
20260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20261 /* end confdefs.h.  */
20262
20263 int
20264 main ()
20265 {
20266
20267   ;
20268   return 0;
20269 }
20270 _ACEOF
20271 if ac_fn_c_try_compile "$LINENO"; then :
20272   gl_cv_warn_c__Werror=yes
20273 else
20274   gl_cv_warn_c__Werror=no
20275 fi
20276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20277   CFLAGS="$gl_save_compiler_FLAGS"
20278
20279 fi
20280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
20281 $as_echo "$gl_cv_warn_c__Werror" >&6; }
20282 if test "x$gl_cv_warn_c__Werror" = xyes; then :
20283   as_fn_append WERROR_CFLAGS " -Werror"
20284 fi
20285
20286
20287
20288   nw=
20289   # This, $nw, is the list of warnings we disable.
20290   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
20291   nw="$nw -Waggregate-return"       # anachronistic
20292   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
20293   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
20294   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
20295   nw="$nw -Wtraditional"            # Warns on #elif which we use often
20296   nw="$nw -Wcast-qual"              # Too many warnings for now
20297   nw="$nw -Wconversion"             # Too many warnings for now
20298   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
20299   nw="$nw -Wsign-conversion"        # Too many warnings for now
20300   nw="$nw -Wtraditional-conversion" # Too many warnings for now
20301   nw="$nw -Wunreachable-code"       # Too many warnings for now
20302   nw="$nw -Wpadded"                 # Our structs are not padded
20303   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
20304   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
20305   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
20306   nw="$nw -Wvla"                    # warnings in gettext.h
20307   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
20308   nw="$nw -Wswitch-enum"            # Too many warnings for now
20309   nw="$nw -Wswitch-default"         # Too many warnings for now
20310   nw="$nw -Wstack-protector"        # not worth working around
20311   nw="$nw -Wmissing-format-attribute" # not worth working around in patch
20312   # things to fix soon:
20313   nw="$nw -Wshadow"
20314   nw="$nw -Wstrict-overflow"
20315   nw="$nw -Wunsafe-loop-optimizations"
20316 #  nw="$nw -Wfloat-equal"            # sort.c, seq.c
20317 #  nw="$nw -Wmissing-format-attribute" # copy.c
20318 #  nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
20319   # ?? -Wstrict-overflow
20320
20321
20322
20323   if test -n "$GCC"; then
20324
20325             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
20326 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
20327     if ${gl_cv_cc_nomfi_supported+:} false; then :
20328   $as_echo_n "(cached) " >&6
20329 else
20330
20331       gl_save_CFLAGS="$CFLAGS"
20332       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
20333       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20334 /* end confdefs.h.  */
20335
20336 int
20337 main ()
20338 {
20339
20340   ;
20341   return 0;
20342 }
20343 _ACEOF
20344 if ac_fn_c_try_compile "$LINENO"; then :
20345   gl_cv_cc_nomfi_supported=yes
20346 else
20347   gl_cv_cc_nomfi_supported=no
20348 fi
20349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20350       CFLAGS="$gl_save_CFLAGS"
20351 fi
20352
20353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
20354 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
20355
20356     if test "$gl_cv_cc_nomfi_supported" = yes; then
20357                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
20358 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
20359       if ${gl_cv_cc_nomfi_needed+:} false; then :
20360   $as_echo_n "(cached) " >&6
20361 else
20362
20363         gl_save_CFLAGS="$CFLAGS"
20364         CFLAGS="$CFLAGS -W -Werror"
20365         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20366 /* end confdefs.h.  */
20367 void f (void)
20368                {
20369                  typedef struct { int a; int b; } s_t;
20370                  s_t s1 = { 0, };
20371                }
20372
20373 int
20374 main ()
20375 {
20376
20377   ;
20378   return 0;
20379 }
20380 _ACEOF
20381 if ac_fn_c_try_compile "$LINENO"; then :
20382   gl_cv_cc_nomfi_needed=no
20383 else
20384   gl_cv_cc_nomfi_needed=yes
20385 fi
20386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20387         CFLAGS="$gl_save_CFLAGS"
20388
20389 fi
20390
20391       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
20392 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
20393     fi
20394   fi
20395
20396   gl_manywarn_set=
20397   for gl_manywarn_item in \
20398     -Wall \
20399     -W \
20400     -Wformat-y2k \
20401     -Wformat-nonliteral \
20402     -Wformat-security \
20403     -Winit-self \
20404     -Wmissing-include-dirs \
20405     -Wswitch-default \
20406     -Wswitch-enum \
20407     -Wunused \
20408     -Wunknown-pragmas \
20409     -Wstrict-aliasing \
20410     -Wstrict-overflow \
20411     -Wsystem-headers \
20412     -Wfloat-equal \
20413     -Wtraditional \
20414     -Wtraditional-conversion \
20415     -Wdeclaration-after-statement \
20416     -Wundef \
20417     -Wshadow \
20418     -Wunsafe-loop-optimizations \
20419     -Wpointer-arith \
20420     -Wbad-function-cast \
20421     -Wc++-compat \
20422     -Wcast-qual \
20423     -Wcast-align \
20424     -Wwrite-strings \
20425     -Wconversion \
20426     -Wsign-conversion \
20427     -Wlogical-op \
20428     -Waggregate-return \
20429     -Wstrict-prototypes \
20430     -Wold-style-definition \
20431     -Wmissing-prototypes \
20432     -Wmissing-declarations \
20433     -Wmissing-noreturn \
20434     -Wmissing-format-attribute \
20435     -Wpacked \
20436     -Wpadded \
20437     -Wredundant-decls \
20438     -Wnested-externs \
20439     -Wunreachable-code \
20440     -Winline \
20441     -Winvalid-pch \
20442     -Wlong-long \
20443     -Wvla \
20444     -Wvolatile-register-var \
20445     -Wdisabled-optimization \
20446     -Wstack-protector \
20447     -Woverlength-strings \
20448     -Wbuiltin-macro-redefined \
20449     -Wmudflap \
20450     -Wpacked-bitfield-compat \
20451     -Wsync-nand \
20452     ; do
20453     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
20454   done
20455   # The following are not documented in the manual but are included in
20456   # output from gcc --help=warnings.
20457   for gl_manywarn_item in \
20458     -Wattributes \
20459     -Wcoverage-mismatch \
20460     -Wmultichar \
20461     -Wunused-macros \
20462     ; do
20463     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
20464   done
20465   # More warnings from gcc 4.6.2 --help=warnings.
20466   for gl_manywarn_item in \
20467     -Wabi \
20468     -Wcpp \
20469     -Wdeprecated \
20470     -Wdeprecated-declarations \
20471     -Wdiv-by-zero \
20472     -Wdouble-promotion \
20473     -Wendif-labels \
20474     -Wextra \
20475     -Wformat-contains-nul \
20476     -Wformat-extra-args \
20477     -Wformat-zero-length \
20478     -Wformat=2 \
20479     -Wmultichar \
20480     -Wnormalized=nfc \
20481     -Woverflow \
20482     -Wpointer-to-int-cast \
20483     -Wpragmas \
20484     -Wsuggest-attribute=const \
20485     -Wsuggest-attribute=noreturn \
20486     -Wsuggest-attribute=pure \
20487     -Wtrampolines \
20488     ; do
20489     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
20490   done
20491
20492   # Disable the missing-field-initializers warning if needed
20493   if test "$gl_cv_cc_nomfi_needed" = yes; then
20494     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
20495   fi
20496
20497   ws=$gl_manywarn_set
20498
20499
20500   gl_warn_set=
20501   set x $ws; shift
20502   for gl_warn_item
20503   do
20504     case " $nw " in
20505       *" $gl_warn_item "*)
20506         ;;
20507       *)
20508         gl_warn_set="$gl_warn_set $gl_warn_item"
20509         ;;
20510     esac
20511   done
20512   ws=$gl_warn_set
20513
20514   for w in $ws; do
20515     as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
20516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
20517 $as_echo_n "checking whether C compiler handles $w... " >&6; }
20518 if eval \${$as_gl_Warn+:} false; then :
20519   $as_echo_n "(cached) " >&6
20520 else
20521
20522   gl_save_compiler_FLAGS="$CFLAGS"
20523   CFLAGS="$CFLAGS $w"
20524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20525 /* end confdefs.h.  */
20526
20527 int
20528 main ()
20529 {
20530
20531   ;
20532   return 0;
20533 }
20534 _ACEOF
20535 if ac_fn_c_try_compile "$LINENO"; then :
20536   eval "$as_gl_Warn=yes"
20537 else
20538   eval "$as_gl_Warn=no"
20539 fi
20540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20541   CFLAGS="$gl_save_compiler_FLAGS"
20542
20543 fi
20544 eval ac_res=\$$as_gl_Warn
20545                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20546 $as_echo "$ac_res" >&6; }
20547 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
20548   as_fn_append WARN_CFLAGS " $w"
20549 fi
20550
20551   done
20552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
20553 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
20554 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
20555   $as_echo_n "(cached) " >&6
20556 else
20557
20558   gl_save_compiler_FLAGS="$CFLAGS"
20559   CFLAGS="$CFLAGS -Wno-missing-field-initializers"
20560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20561 /* end confdefs.h.  */
20562
20563 int
20564 main ()
20565 {
20566
20567   ;
20568   return 0;
20569 }
20570 _ACEOF
20571 if ac_fn_c_try_compile "$LINENO"; then :
20572   gl_cv_warn_c__Wno_missing_field_initializers=yes
20573 else
20574   gl_cv_warn_c__Wno_missing_field_initializers=no
20575 fi
20576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20577   CFLAGS="$gl_save_compiler_FLAGS"
20578
20579 fi
20580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
20581 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
20582 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
20583   as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
20584 fi
20585  # We need this one
20586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
20587 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
20588 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
20589   $as_echo_n "(cached) " >&6
20590 else
20591
20592   gl_save_compiler_FLAGS="$CFLAGS"
20593   CFLAGS="$CFLAGS -Wno-sign-compare"
20594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20595 /* end confdefs.h.  */
20596
20597 int
20598 main ()
20599 {
20600
20601   ;
20602   return 0;
20603 }
20604 _ACEOF
20605 if ac_fn_c_try_compile "$LINENO"; then :
20606   gl_cv_warn_c__Wno_sign_compare=yes
20607 else
20608   gl_cv_warn_c__Wno_sign_compare=no
20609 fi
20610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20611   CFLAGS="$gl_save_compiler_FLAGS"
20612
20613 fi
20614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
20615 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
20616 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
20617   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
20618 fi
20619      # Too many warnings for now
20620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
20621 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
20622 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
20623   $as_echo_n "(cached) " >&6
20624 else
20625
20626   gl_save_compiler_FLAGS="$CFLAGS"
20627   CFLAGS="$CFLAGS -Wno-unused-parameter"
20628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20629 /* end confdefs.h.  */
20630
20631 int
20632 main ()
20633 {
20634
20635   ;
20636   return 0;
20637 }
20638 _ACEOF
20639 if ac_fn_c_try_compile "$LINENO"; then :
20640   gl_cv_warn_c__Wno_unused_parameter=yes
20641 else
20642   gl_cv_warn_c__Wno_unused_parameter=no
20643 fi
20644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20645   CFLAGS="$gl_save_compiler_FLAGS"
20646
20647 fi
20648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
20649 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
20650 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
20651   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
20652 fi
20653  # Too many warnings for now
20654
20655   # In spite of excluding -Wlogical-op above, it is enabled, as of
20656   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
20657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
20658 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
20659 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
20660   $as_echo_n "(cached) " >&6
20661 else
20662
20663   gl_save_compiler_FLAGS="$CFLAGS"
20664   CFLAGS="$CFLAGS -Wno-logical-op"
20665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20666 /* end confdefs.h.  */
20667
20668 int
20669 main ()
20670 {
20671
20672   ;
20673   return 0;
20674 }
20675 _ACEOF
20676 if ac_fn_c_try_compile "$LINENO"; then :
20677   gl_cv_warn_c__Wno_logical_op=yes
20678 else
20679   gl_cv_warn_c__Wno_logical_op=no
20680 fi
20681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20682   CFLAGS="$gl_save_compiler_FLAGS"
20683
20684 fi
20685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
20686 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
20687 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
20688   as_fn_append WARN_CFLAGS " -Wno-logical-op"
20689 fi
20690
20691
20692   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
20693 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
20694 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
20695   $as_echo_n "(cached) " >&6
20696 else
20697
20698   gl_save_compiler_FLAGS="$CFLAGS"
20699   CFLAGS="$CFLAGS -fdiagnostics-show-option"
20700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20701 /* end confdefs.h.  */
20702
20703 int
20704 main ()
20705 {
20706
20707   ;
20708   return 0;
20709 }
20710 _ACEOF
20711 if ac_fn_c_try_compile "$LINENO"; then :
20712   gl_cv_warn_c__fdiagnostics_show_option=yes
20713 else
20714   gl_cv_warn_c__fdiagnostics_show_option=no
20715 fi
20716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20717   CFLAGS="$gl_save_compiler_FLAGS"
20718
20719 fi
20720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
20721 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
20722 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
20723   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
20724 fi
20725
20726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
20727 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
20728 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
20729   $as_echo_n "(cached) " >&6
20730 else
20731
20732   gl_save_compiler_FLAGS="$CFLAGS"
20733   CFLAGS="$CFLAGS -funit-at-a-time"
20734   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20735 /* end confdefs.h.  */
20736
20737 int
20738 main ()
20739 {
20740
20741   ;
20742   return 0;
20743 }
20744 _ACEOF
20745 if ac_fn_c_try_compile "$LINENO"; then :
20746   gl_cv_warn_c__funit_at_a_time=yes
20747 else
20748   gl_cv_warn_c__funit_at_a_time=no
20749 fi
20750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20751   CFLAGS="$gl_save_compiler_FLAGS"
20752
20753 fi
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
20755 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
20756 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
20757   as_fn_append WARN_CFLAGS " -funit-at-a-time"
20758 fi
20759
20760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
20761 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
20762 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
20763   $as_echo_n "(cached) " >&6
20764 else
20765
20766   gl_save_compiler_FLAGS="$CFLAGS"
20767   CFLAGS="$CFLAGS -Wno-format-nonliteral"
20768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20769 /* end confdefs.h.  */
20770
20771 int
20772 main ()
20773 {
20774
20775   ;
20776   return 0;
20777 }
20778 _ACEOF
20779 if ac_fn_c_try_compile "$LINENO"; then :
20780   gl_cv_warn_c__Wno_format_nonliteral=yes
20781 else
20782   gl_cv_warn_c__Wno_format_nonliteral=no
20783 fi
20784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20785   CFLAGS="$gl_save_compiler_FLAGS"
20786
20787 fi
20788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
20789 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
20790 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
20791   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
20792 fi
20793
20794
20795
20796
20797
20798 $as_echo "#define lint 1" >>confdefs.h
20799
20800
20801 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
20802
20803
20804 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
20805
20806
20807   # We use a slightly smaller set of warning options for lib/.
20808   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
20809   nw=
20810   nw="$nw -Wuninitialized"
20811   nw="$nw -Wunused-macros"
20812   nw="$nw -Wmissing-prototypes"
20813   nw="$nw -Wold-style-definition"
20814
20815   gl_warn_set=
20816   set x $WARN_CFLAGS; shift
20817   for gl_warn_item
20818   do
20819     case " $nw " in
20820       *" $gl_warn_item "*)
20821         ;;
20822       *)
20823         gl_warn_set="$gl_warn_set $gl_warn_item"
20824         ;;
20825     esac
20826   done
20827   GNULIB_WARN_CFLAGS=$gl_warn_set
20828
20829
20830
20831   # For gnulib-tests, the set is slightly smaller still.
20832   nw=
20833   nw="$nw -Wstrict-prototypes"
20834
20835   gl_warn_set=
20836   set x $GNULIB_WARN_CFLAGS; shift
20837   for gl_warn_item
20838   do
20839     case " $nw " in
20840       *" $gl_warn_item "*)
20841         ;;
20842       *)
20843         gl_warn_set="$gl_warn_set $gl_warn_item"
20844         ;;
20845     esac
20846   done
20847   GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
20848
20849
20850 fi
20851
20852 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
20853 if test "x$ac_cv_type_mode_t" = xyes; then :
20854
20855 else
20856
20857 cat >>confdefs.h <<_ACEOF
20858 #define mode_t int
20859 _ACEOF
20860
20861 fi
20862
20863 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
20864 if test "x$ac_cv_type_off_t" = xyes; then :
20865
20866 else
20867
20868 cat >>confdefs.h <<_ACEOF
20869 #define off_t long int
20870 _ACEOF
20871
20872 fi
20873
20874
20875
20876   # Check whether --enable-xattr was given.
20877 if test "${enable_xattr+set}" = set; then :
20878   enableval=$enable_xattr; use_xattr=$enableval
20879 else
20880   use_xattr=yes
20881 fi
20882
20883
20884   LIB_XATTR=
20885
20886
20887   if test "$use_xattr" = "yes"; then
20888     for ac_header in attr/error_context.h attr/libattr.h
20889 do :
20890   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20891 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20892 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20893   cat >>confdefs.h <<_ACEOF
20894 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20895 _ACEOF
20896
20897 fi
20898
20899 done
20900
20901     use_xattr=no
20902     if test $ac_cv_header_attr_libattr_h = yes \
20903         && test $ac_cv_header_attr_error_context_h = yes; then
20904       xattr_saved_LIBS=$LIBS
20905       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing attr_copy_file" >&5
20906 $as_echo_n "checking for library containing attr_copy_file... " >&6; }
20907 if ${ac_cv_search_attr_copy_file+:} false; then :
20908   $as_echo_n "(cached) " >&6
20909 else
20910   ac_func_search_save_LIBS=$LIBS
20911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20912 /* end confdefs.h.  */
20913
20914 /* Override any GCC internal prototype to avoid an error.
20915    Use char because int might match the return type of a GCC
20916    builtin and then its argument prototype would still apply.  */
20917 #ifdef __cplusplus
20918 extern "C"
20919 #endif
20920 char attr_copy_file ();
20921 int
20922 main ()
20923 {
20924 return attr_copy_file ();
20925   ;
20926   return 0;
20927 }
20928 _ACEOF
20929 for ac_lib in '' attr; do
20930   if test -z "$ac_lib"; then
20931     ac_res="none required"
20932   else
20933     ac_res=-l$ac_lib
20934     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20935   fi
20936   if ac_fn_c_try_link "$LINENO"; then :
20937   ac_cv_search_attr_copy_file=$ac_res
20938 fi
20939 rm -f core conftest.err conftest.$ac_objext \
20940     conftest$ac_exeext
20941   if ${ac_cv_search_attr_copy_file+:} false; then :
20942   break
20943 fi
20944 done
20945 if ${ac_cv_search_attr_copy_file+:} false; then :
20946
20947 else
20948   ac_cv_search_attr_copy_file=no
20949 fi
20950 rm conftest.$ac_ext
20951 LIBS=$ac_func_search_save_LIBS
20952 fi
20953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_attr_copy_file" >&5
20954 $as_echo "$ac_cv_search_attr_copy_file" >&6; }
20955 ac_res=$ac_cv_search_attr_copy_file
20956 if test "$ac_res" != no; then :
20957   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20958   test "$ac_cv_search_attr_copy_file" = "none required" ||
20959                         LIB_XATTR=$ac_cv_search_attr_copy_file
20960 fi
20961
20962       for ac_func in attr_copy_file
20963 do :
20964   ac_fn_c_check_func "$LINENO" "attr_copy_file" "ac_cv_func_attr_copy_file"
20965 if test "x$ac_cv_func_attr_copy_file" = xyes; then :
20966   cat >>confdefs.h <<_ACEOF
20967 #define HAVE_ATTR_COPY_FILE 1
20968 _ACEOF
20969
20970 fi
20971 done
20972
20973       LIBS=$xattr_saved_LIBS
20974       if test $ac_cv_func_attr_copy_file = yes; then
20975         use_xattr=yes
20976       fi
20977     fi
20978     if test $use_xattr = no; then
20979       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libattr development library was not found or not usable." >&5
20980 $as_echo "$as_me: WARNING: libattr development library was not found or not usable." >&2;}
20981       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU patch will be built without xattr support." >&5
20982 $as_echo "$as_me: WARNING: GNU patch will be built without xattr support." >&2;}
20983     fi
20984   fi
20985
20986 cat >>confdefs.h <<_ACEOF
20987 #define USE_XATTR `test $use_xattr != yes; echo $?`
20988 _ACEOF
20989
20990
20991
20992 for ac_func in geteuid getuid raise sigaction sigprocmask sigsetmask
20993 do :
20994   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20995 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20996 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20997   cat >>confdefs.h <<_ACEOF
20998 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20999 _ACEOF
21000
21001 fi
21002 done
21003
21004 for ac_header in fcntl.h unistd.h
21005 do :
21006   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21007 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21008 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
21009   cat >>confdefs.h <<_ACEOF
21010 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21011 _ACEOF
21012
21013 fi
21014
21015 done
21016
21017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOS-style setmode" >&5
21018 $as_echo_n "checking for DOS-style setmode... " >&6; }
21019 if ${ac_cv_func_setmode_dos+:} false; then :
21020   $as_echo_n "(cached) " >&6
21021 else
21022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21023 /* end confdefs.h.  */
21024 #include <io.h>
21025          #if HAVE_FCNTL_H
21026          # include <fcntl.h>
21027          #endif
21028          #if HAVE_UNISTD_H
21029          # include <unistd.h>
21030          #endif
21031 int
21032 main ()
21033 {
21034 int ret = setmode && setmode (1, O_BINARY);
21035   ;
21036   return 0;
21037 }
21038 _ACEOF
21039 if ac_fn_c_try_link "$LINENO"; then :
21040   ac_cv_func_setmode_dos=yes
21041 else
21042   ac_cv_func_setmode_dos=no
21043 fi
21044 rm -f core conftest.err conftest.$ac_objext \
21045     conftest$ac_exeext conftest.$ac_ext
21046 fi
21047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setmode_dos" >&5
21048 $as_echo "$ac_cv_func_setmode_dos" >&6; }
21049    if test $ac_cv_func_setmode_dos = yes; then
21050
21051 $as_echo "#define HAVE_SETMODE_DOS 1" >>confdefs.h
21052
21053    fi
21054
21055 # Extract the first word of "ed", so it can be a program name with args.
21056 set dummy ed; ac_word=$2
21057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21058 $as_echo_n "checking for $ac_word... " >&6; }
21059 if ${ac_cv_path_ED+:} false; then :
21060   $as_echo_n "(cached) " >&6
21061 else
21062   case $ED in
21063   [\\/]* | ?:[\\/]*)
21064   ac_cv_path_ED="$ED" # Let the user override the test with a path.
21065   ;;
21066   *)
21067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21068 for as_dir in $PATH
21069 do
21070   IFS=$as_save_IFS
21071   test -z "$as_dir" && as_dir=.
21072     for ac_exec_ext in '' $ac_executable_extensions; do
21073   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21074     ac_cv_path_ED="$as_dir/$ac_word$ac_exec_ext"
21075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21076     break 2
21077   fi
21078 done
21079   done
21080 IFS=$as_save_IFS
21081
21082   test -z "$ac_cv_path_ED" && ac_cv_path_ED="ed"
21083   ;;
21084 esac
21085 fi
21086 ED=$ac_cv_path_ED
21087 if test -n "$ED"; then
21088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ED" >&5
21089 $as_echo "$ED" >&6; }
21090 else
21091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21092 $as_echo "no" >&6; }
21093 fi
21094
21095
21096
21097 cat >>confdefs.h <<_ACEOF
21098 #define EDITOR_PROGRAM "$ED"
21099 _ACEOF
21100
21101
21102 ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile tests/Makefile"
21103
21104 cat >confcache <<\_ACEOF
21105 # This file is a shell script that caches the results of configure
21106 # tests run on this system so they can be shared between configure
21107 # scripts and configure runs, see configure's option --config-cache.
21108 # It is not useful on other systems.  If it contains results you don't
21109 # want to keep, you may remove or edit it.
21110 #
21111 # config.status only pays attention to the cache file if you give it
21112 # the --recheck option to rerun configure.
21113 #
21114 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21115 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21116 # following values.
21117
21118 _ACEOF
21119
21120 # The following way of writing the cache mishandles newlines in values,
21121 # but we know of no workaround that is simple, portable, and efficient.
21122 # So, we kill variables containing newlines.
21123 # Ultrix sh set writes to stderr and can't be redirected directly,
21124 # and sets the high bit in the cache file unless we assign to the vars.
21125 (
21126   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21127     eval ac_val=\$$ac_var
21128     case $ac_val in #(
21129     *${as_nl}*)
21130       case $ac_var in #(
21131       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21132 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21133       esac
21134       case $ac_var in #(
21135       _ | IFS | as_nl) ;; #(
21136       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21137       *) { eval $ac_var=; unset $ac_var;} ;;
21138       esac ;;
21139     esac
21140   done
21141
21142   (set) 2>&1 |
21143     case $as_nl`(ac_space=' '; set) 2>&1` in #(
21144     *${as_nl}ac_space=\ *)
21145       # `set' does not quote correctly, so add quotes: double-quote
21146       # substitution turns \\\\ into \\, and sed turns \\ into \.
21147       sed -n \
21148         "s/'/'\\\\''/g;
21149           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21150       ;; #(
21151     *)
21152       # `set' quotes correctly as required by POSIX, so do not add quotes.
21153       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21154       ;;
21155     esac |
21156     sort
21157 ) |
21158   sed '
21159      /^ac_cv_env_/b end
21160      t clear
21161      :clear
21162      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21163      t end
21164      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21165      :end' >>confcache
21166 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21167   if test -w "$cache_file"; then
21168     if test "x$cache_file" != "x/dev/null"; then
21169       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21170 $as_echo "$as_me: updating cache $cache_file" >&6;}
21171       if test ! -f "$cache_file" || test -h "$cache_file"; then
21172         cat confcache >"$cache_file"
21173       else
21174         case $cache_file in #(
21175         */* | ?:*)
21176           mv -f confcache "$cache_file"$$ &&
21177           mv -f "$cache_file"$$ "$cache_file" ;; #(
21178         *)
21179           mv -f confcache "$cache_file" ;;
21180         esac
21181       fi
21182     fi
21183   else
21184     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21185 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21186   fi
21187 fi
21188 rm -f confcache
21189
21190 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21191 # Let make expand exec_prefix.
21192 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21193
21194 DEFS=-DHAVE_CONFIG_H
21195
21196 ac_libobjs=
21197 ac_ltlibobjs=
21198 U=
21199 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21200   # 1. Remove the extension, and $U if already installed.
21201   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21202   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21203   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
21204   #    will be set to the directory where LIBOBJS objects are built.
21205   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21206   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21207 done
21208 LIBOBJS=$ac_libobjs
21209
21210 LTLIBOBJS=$ac_ltlibobjs
21211
21212
21213 if test -z "${ENABLE_MERGE_TRUE}" && test -z "${ENABLE_MERGE_FALSE}"; then
21214   as_fn_error $? "conditional \"ENABLE_MERGE\" was never defined.
21215 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21216 fi
21217 if test -z "${ALPHA_VERSION_TRUE}" && test -z "${ALPHA_VERSION_FALSE}"; then
21218   as_fn_error $? "conditional \"ALPHA_VERSION\" was never defined.
21219 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21220 fi
21221  if test -n "$EXEEXT"; then
21222   am__EXEEXT_TRUE=
21223   am__EXEEXT_FALSE='#'
21224 else
21225   am__EXEEXT_TRUE='#'
21226   am__EXEEXT_FALSE=
21227 fi
21228
21229 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21230   as_fn_error $? "conditional \"AMDEP\" was never defined.
21231 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21232 fi
21233 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21234   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
21235 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21236 fi
21237 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21238   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
21239 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21240 fi
21241 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
21242   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
21243 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21244 fi
21245 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
21246   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
21247 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21248 fi
21249 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
21250   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
21251 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21252 fi
21253 CONFIG_INCLUDE=config.h
21254
21255 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
21256   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
21257 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21258 fi
21259 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
21260   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
21261 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21262 fi
21263 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
21264   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
21265 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21266 fi
21267 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
21268   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
21269 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21270 fi
21271 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
21272   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
21273 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21274 fi
21275
21276
21277     gl_libobjs=
21278     gl_ltlibobjs=
21279     if test -n "$gl_LIBOBJS"; then
21280       # Remove the extension.
21281       sed_drop_objext='s/\.o$//;s/\.obj$//'
21282       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
21283         gl_libobjs="$gl_libobjs $i.$ac_objext"
21284         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21285       done
21286     fi
21287     gl_LIBOBJS=$gl_libobjs
21288
21289     gl_LTLIBOBJS=$gl_ltlibobjs
21290
21291
21292
21293     gltests_libobjs=
21294     gltests_ltlibobjs=
21295     if test -n "$gltests_LIBOBJS"; then
21296       # Remove the extension.
21297       sed_drop_objext='s/\.o$//;s/\.obj$//'
21298       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
21299         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21300         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21301       done
21302     fi
21303     gltests_LIBOBJS=$gltests_libobjs
21304
21305     gltests_LTLIBOBJS=$gltests_ltlibobjs
21306
21307
21308
21309 : "${CONFIG_STATUS=./config.status}"
21310 ac_write_fail=0
21311 ac_clean_files_save=$ac_clean_files
21312 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21313 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21314 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21315 as_write_fail=0
21316 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21317 #! $SHELL
21318 # Generated by $as_me.
21319 # Run this file to recreate the current configuration.
21320 # Compiler output produced by configure, useful for debugging
21321 # configure, is in config.log if it exists.
21322
21323 debug=false
21324 ac_cs_recheck=false
21325 ac_cs_silent=false
21326
21327 SHELL=\${CONFIG_SHELL-$SHELL}
21328 export SHELL
21329 _ASEOF
21330 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21331 ## -------------------- ##
21332 ## M4sh Initialization. ##
21333 ## -------------------- ##
21334
21335 # Be more Bourne compatible
21336 DUALCASE=1; export DUALCASE # for MKS sh
21337 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21338   emulate sh
21339   NULLCMD=:
21340   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21341   # is contrary to our usage.  Disable this feature.
21342   alias -g '${1+"$@"}'='"$@"'
21343   setopt NO_GLOB_SUBST
21344 else
21345   case `(set -o) 2>/dev/null` in #(
21346   *posix*) :
21347     set -o posix ;; #(
21348   *) :
21349      ;;
21350 esac
21351 fi
21352
21353
21354 as_nl='
21355 '
21356 export as_nl
21357 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21358 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21359 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21360 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21361 # Prefer a ksh shell builtin over an external printf program on Solaris,
21362 # but without wasting forks for bash or zsh.
21363 if test -z "$BASH_VERSION$ZSH_VERSION" \
21364     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21365   as_echo='print -r --'
21366   as_echo_n='print -rn --'
21367 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21368   as_echo='printf %s\n'
21369   as_echo_n='printf %s'
21370 else
21371   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21372     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21373     as_echo_n='/usr/ucb/echo -n'
21374   else
21375     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21376     as_echo_n_body='eval
21377       arg=$1;
21378       case $arg in #(
21379       *"$as_nl"*)
21380         expr "X$arg" : "X\\(.*\\)$as_nl";
21381         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21382       esac;
21383       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21384     '
21385     export as_echo_n_body
21386     as_echo_n='sh -c $as_echo_n_body as_echo'
21387   fi
21388   export as_echo_body
21389   as_echo='sh -c $as_echo_body as_echo'
21390 fi
21391
21392 # The user is always right.
21393 if test "${PATH_SEPARATOR+set}" != set; then
21394   PATH_SEPARATOR=:
21395   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21396     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21397       PATH_SEPARATOR=';'
21398   }
21399 fi
21400
21401
21402 # IFS
21403 # We need space, tab and new line, in precisely that order.  Quoting is
21404 # there to prevent editors from complaining about space-tab.
21405 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21406 # splitting by setting IFS to empty value.)
21407 IFS=" ""        $as_nl"
21408
21409 # Find who we are.  Look in the path if we contain no directory separator.
21410 as_myself=
21411 case $0 in #((
21412   *[\\/]* ) as_myself=$0 ;;
21413   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21414 for as_dir in $PATH
21415 do
21416   IFS=$as_save_IFS
21417   test -z "$as_dir" && as_dir=.
21418     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21419   done
21420 IFS=$as_save_IFS
21421
21422      ;;
21423 esac
21424 # We did not find ourselves, most probably we were run as `sh COMMAND'
21425 # in which case we are not to be found in the path.
21426 if test "x$as_myself" = x; then
21427   as_myself=$0
21428 fi
21429 if test ! -f "$as_myself"; then
21430   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21431   exit 1
21432 fi
21433
21434 # Unset variables that we do not need and which cause bugs (e.g. in
21435 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
21436 # suppresses any "Segmentation fault" message there.  '((' could
21437 # trigger a bug in pdksh 5.2.14.
21438 for as_var in BASH_ENV ENV MAIL MAILPATH
21439 do eval test x\${$as_var+set} = xset \
21440   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21441 done
21442 PS1='$ '
21443 PS2='> '
21444 PS4='+ '
21445
21446 # NLS nuisances.
21447 LC_ALL=C
21448 export LC_ALL
21449 LANGUAGE=C
21450 export LANGUAGE
21451
21452 # CDPATH.
21453 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21454
21455
21456 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21457 # ----------------------------------------
21458 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21459 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21460 # script with STATUS, using 1 if that was 0.
21461 as_fn_error ()
21462 {
21463   as_status=$1; test $as_status -eq 0 && as_status=1
21464   if test "$4"; then
21465     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21466     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21467   fi
21468   $as_echo "$as_me: error: $2" >&2
21469   as_fn_exit $as_status
21470 } # as_fn_error
21471
21472
21473 # as_fn_set_status STATUS
21474 # -----------------------
21475 # Set $? to STATUS, without forking.
21476 as_fn_set_status ()
21477 {
21478   return $1
21479 } # as_fn_set_status
21480
21481 # as_fn_exit STATUS
21482 # -----------------
21483 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21484 as_fn_exit ()
21485 {
21486   set +e
21487   as_fn_set_status $1
21488   exit $1
21489 } # as_fn_exit
21490
21491 # as_fn_unset VAR
21492 # ---------------
21493 # Portably unset VAR.
21494 as_fn_unset ()
21495 {
21496   { eval $1=; unset $1;}
21497 }
21498 as_unset=as_fn_unset
21499 # as_fn_append VAR VALUE
21500 # ----------------------
21501 # Append the text in VALUE to the end of the definition contained in VAR. Take
21502 # advantage of any shell optimizations that allow amortized linear growth over
21503 # repeated appends, instead of the typical quadratic growth present in naive
21504 # implementations.
21505 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21506   eval 'as_fn_append ()
21507   {
21508     eval $1+=\$2
21509   }'
21510 else
21511   as_fn_append ()
21512   {
21513     eval $1=\$$1\$2
21514   }
21515 fi # as_fn_append
21516
21517 # as_fn_arith ARG...
21518 # ------------------
21519 # Perform arithmetic evaluation on the ARGs, and store the result in the
21520 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21521 # must be portable across $(()) and expr.
21522 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21523   eval 'as_fn_arith ()
21524   {
21525     as_val=$(( $* ))
21526   }'
21527 else
21528   as_fn_arith ()
21529   {
21530     as_val=`expr "$@" || test $? -eq 1`
21531   }
21532 fi # as_fn_arith
21533
21534
21535 if expr a : '\(a\)' >/dev/null 2>&1 &&
21536    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21537   as_expr=expr
21538 else
21539   as_expr=false
21540 fi
21541
21542 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21543   as_basename=basename
21544 else
21545   as_basename=false
21546 fi
21547
21548 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21549   as_dirname=dirname
21550 else
21551   as_dirname=false
21552 fi
21553
21554 as_me=`$as_basename -- "$0" ||
21555 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21556          X"$0" : 'X\(//\)$' \| \
21557          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21558 $as_echo X/"$0" |
21559     sed '/^.*\/\([^/][^/]*\)\/*$/{
21560             s//\1/
21561             q
21562           }
21563           /^X\/\(\/\/\)$/{
21564             s//\1/
21565             q
21566           }
21567           /^X\/\(\/\).*/{
21568             s//\1/
21569             q
21570           }
21571           s/.*/./; q'`
21572
21573 # Avoid depending upon Character Ranges.
21574 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21575 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21576 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21577 as_cr_digits='0123456789'
21578 as_cr_alnum=$as_cr_Letters$as_cr_digits
21579
21580 ECHO_C= ECHO_N= ECHO_T=
21581 case `echo -n x` in #(((((
21582 -n*)
21583   case `echo 'xy\c'` in
21584   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
21585   xy)  ECHO_C='\c';;
21586   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
21587        ECHO_T=' ';;
21588   esac;;
21589 *)
21590   ECHO_N='-n';;
21591 esac
21592
21593 rm -f conf$$ conf$$.exe conf$$.file
21594 if test -d conf$$.dir; then
21595   rm -f conf$$.dir/conf$$.file
21596 else
21597   rm -f conf$$.dir
21598   mkdir conf$$.dir 2>/dev/null
21599 fi
21600 if (echo >conf$$.file) 2>/dev/null; then
21601   if ln -s conf$$.file conf$$ 2>/dev/null; then
21602     as_ln_s='ln -s'
21603     # ... but there are two gotchas:
21604     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21605     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21606     # In both cases, we have to default to `cp -p'.
21607     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21608       as_ln_s='cp -p'
21609   elif ln conf$$.file conf$$ 2>/dev/null; then
21610     as_ln_s=ln
21611   else
21612     as_ln_s='cp -p'
21613   fi
21614 else
21615   as_ln_s='cp -p'
21616 fi
21617 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21618 rmdir conf$$.dir 2>/dev/null
21619
21620
21621 # as_fn_mkdir_p
21622 # -------------
21623 # Create "$as_dir" as a directory, including parents if necessary.
21624 as_fn_mkdir_p ()
21625 {
21626
21627   case $as_dir in #(
21628   -*) as_dir=./$as_dir;;
21629   esac
21630   test -d "$as_dir" || eval $as_mkdir_p || {
21631     as_dirs=
21632     while :; do
21633       case $as_dir in #(
21634       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21635       *) as_qdir=$as_dir;;
21636       esac
21637       as_dirs="'$as_qdir' $as_dirs"
21638       as_dir=`$as_dirname -- "$as_dir" ||
21639 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21640          X"$as_dir" : 'X\(//\)[^/]' \| \
21641          X"$as_dir" : 'X\(//\)$' \| \
21642          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21643 $as_echo X"$as_dir" |
21644     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21645             s//\1/
21646             q
21647           }
21648           /^X\(\/\/\)[^/].*/{
21649             s//\1/
21650             q
21651           }
21652           /^X\(\/\/\)$/{
21653             s//\1/
21654             q
21655           }
21656           /^X\(\/\).*/{
21657             s//\1/
21658             q
21659           }
21660           s/.*/./; q'`
21661       test -d "$as_dir" && break
21662     done
21663     test -z "$as_dirs" || eval "mkdir $as_dirs"
21664   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21665
21666
21667 } # as_fn_mkdir_p
21668 if mkdir -p . 2>/dev/null; then
21669   as_mkdir_p='mkdir -p "$as_dir"'
21670 else
21671   test -d ./-p && rmdir ./-p
21672   as_mkdir_p=false
21673 fi
21674
21675 if test -x / >/dev/null 2>&1; then
21676   as_test_x='test -x'
21677 else
21678   if ls -dL / >/dev/null 2>&1; then
21679     as_ls_L_option=L
21680   else
21681     as_ls_L_option=
21682   fi
21683   as_test_x='
21684     eval sh -c '\''
21685       if test -d "$1"; then
21686         test -d "$1/.";
21687       else
21688         case $1 in #(
21689         -*)set "./$1";;
21690         esac;
21691         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
21692         ???[sx]*):;;*)false;;esac;fi
21693     '\'' sh
21694   '
21695 fi
21696 as_executable_p=$as_test_x
21697
21698 # Sed expression to map a string onto a valid CPP name.
21699 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21700
21701 # Sed expression to map a string onto a valid variable name.
21702 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21703
21704
21705 exec 6>&1
21706 ## ----------------------------------- ##
21707 ## Main body of $CONFIG_STATUS script. ##
21708 ## ----------------------------------- ##
21709 _ASEOF
21710 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21711
21712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21713 # Save the log message, to keep $0 and so on meaningful, and to
21714 # report actual input values of CONFIG_FILES etc. instead of their
21715 # values after options handling.
21716 ac_log="
21717 This file was extended by GNU patch $as_me 2.6.1.169-7096, which was
21718 generated by GNU Autoconf 2.68.  Invocation command line was
21719
21720   CONFIG_FILES    = $CONFIG_FILES
21721   CONFIG_HEADERS  = $CONFIG_HEADERS
21722   CONFIG_LINKS    = $CONFIG_LINKS
21723   CONFIG_COMMANDS = $CONFIG_COMMANDS
21724   $ $0 $@
21725
21726 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21727 "
21728
21729 _ACEOF
21730
21731 case $ac_config_files in *"
21732 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21733 esac
21734
21735 case $ac_config_headers in *"
21736 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21737 esac
21738
21739
21740 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21741 # Files that config.status was made for.
21742 config_files="$ac_config_files"
21743 config_headers="$ac_config_headers"
21744 config_links="$ac_config_links"
21745 config_commands="$ac_config_commands"
21746
21747 _ACEOF
21748
21749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21750 ac_cs_usage="\
21751 \`$as_me' instantiates files and other configuration actions
21752 from templates according to the current configuration.  Unless the files
21753 and actions are specified as TAGs, all are instantiated by default.
21754
21755 Usage: $0 [OPTION]... [TAG]...
21756
21757   -h, --help       print this help, then exit
21758   -V, --version    print version number and configuration settings, then exit
21759       --config     print configuration, then exit
21760   -q, --quiet, --silent
21761                    do not print progress messages
21762   -d, --debug      don't remove temporary files
21763       --recheck    update $as_me by reconfiguring in the same conditions
21764       --file=FILE[:TEMPLATE]
21765                    instantiate the configuration file FILE
21766       --header=FILE[:TEMPLATE]
21767                    instantiate the configuration header FILE
21768
21769 Configuration files:
21770 $config_files
21771
21772 Configuration headers:
21773 $config_headers
21774
21775 Configuration links:
21776 $config_links
21777
21778 Configuration commands:
21779 $config_commands
21780
21781 Report bugs to <bug-patch@gnu.org>.
21782 GNU patch home page: <http://www.gnu.org/software/patch/>.
21783 General help using GNU software: <http://www.gnu.org/gethelp/>."
21784
21785 _ACEOF
21786 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21787 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21788 ac_cs_version="\\
21789 GNU patch config.status 2.6.1.169-7096
21790 configured by $0, generated by GNU Autoconf 2.68,
21791   with options \\"\$ac_cs_config\\"
21792
21793 Copyright (C) 2010 Free Software Foundation, Inc.
21794 This config.status script is free software; the Free Software Foundation
21795 gives unlimited permission to copy, distribute and modify it."
21796
21797 ac_pwd='$ac_pwd'
21798 srcdir='$srcdir'
21799 INSTALL='$INSTALL'
21800 MKDIR_P='$MKDIR_P'
21801 AWK='$AWK'
21802 test -n "\$AWK" || AWK=awk
21803 _ACEOF
21804
21805 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21806 # The default lists apply if the user does not specify any file.
21807 ac_need_defaults=:
21808 while test $# != 0
21809 do
21810   case $1 in
21811   --*=?*)
21812     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21813     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21814     ac_shift=:
21815     ;;
21816   --*=)
21817     ac_option=`expr "X$1" : 'X\([^=]*\)='`
21818     ac_optarg=
21819     ac_shift=:
21820     ;;
21821   *)
21822     ac_option=$1
21823     ac_optarg=$2
21824     ac_shift=shift
21825     ;;
21826   esac
21827
21828   case $ac_option in
21829   # Handling of the options.
21830   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21831     ac_cs_recheck=: ;;
21832   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21833     $as_echo "$ac_cs_version"; exit ;;
21834   --config | --confi | --conf | --con | --co | --c )
21835     $as_echo "$ac_cs_config"; exit ;;
21836   --debug | --debu | --deb | --de | --d | -d )
21837     debug=: ;;
21838   --file | --fil | --fi | --f )
21839     $ac_shift
21840     case $ac_optarg in
21841     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21842     '') as_fn_error $? "missing file argument" ;;
21843     esac
21844     as_fn_append CONFIG_FILES " '$ac_optarg'"
21845     ac_need_defaults=false;;
21846   --header | --heade | --head | --hea )
21847     $ac_shift
21848     case $ac_optarg in
21849     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21850     esac
21851     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21852     ac_need_defaults=false;;
21853   --he | --h)
21854     # Conflict between --help and --header
21855     as_fn_error $? "ambiguous option: \`$1'
21856 Try \`$0 --help' for more information.";;
21857   --help | --hel | -h )
21858     $as_echo "$ac_cs_usage"; exit ;;
21859   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21860   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21861     ac_cs_silent=: ;;
21862
21863   # This is an error.
21864   -*) as_fn_error $? "unrecognized option: \`$1'
21865 Try \`$0 --help' for more information." ;;
21866
21867   *) as_fn_append ac_config_targets " $1"
21868      ac_need_defaults=false ;;
21869
21870   esac
21871   shift
21872 done
21873
21874 ac_configure_extra_args=
21875
21876 if $ac_cs_silent; then
21877   exec 6>/dev/null
21878   ac_configure_extra_args="$ac_configure_extra_args --silent"
21879 fi
21880
21881 _ACEOF
21882 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21883 if \$ac_cs_recheck; then
21884   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21885   shift
21886   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21887   CONFIG_SHELL='$SHELL'
21888   export CONFIG_SHELL
21889   exec "\$@"
21890 fi
21891
21892 _ACEOF
21893 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21894 exec 5>>config.log
21895 {
21896   echo
21897   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21898 ## Running $as_me. ##
21899 _ASBOX
21900   $as_echo "$ac_log"
21901 } >&5
21902
21903 _ACEOF
21904 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21905 #
21906 # INIT-COMMANDS
21907 #
21908 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
21909 GNUmakefile=$GNUmakefile
21910
21911 _ACEOF
21912
21913 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21914
21915 # Handling of arguments.
21916 for ac_config_target in $ac_config_targets
21917 do
21918   case $ac_config_target in
21919     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;;
21920     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
21921     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
21922     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21923     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
21924     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
21925     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
21926
21927   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21928   esac
21929 done
21930
21931
21932 # If the user did not use the arguments to specify the items to instantiate,
21933 # then the envvar interface is used.  Set only those that are not.
21934 # We use the long form for the default assignment because of an extremely
21935 # bizarre bug on SunOS 4.1.3.
21936 if $ac_need_defaults; then
21937   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21938   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21939   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21940   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21941 fi
21942
21943 # Have a temporary directory for convenience.  Make it in the build tree
21944 # simply because there is no reason against having it here, and in addition,
21945 # creating and moving files from /tmp can sometimes cause problems.
21946 # Hook for its removal unless debugging.
21947 # Note that there is a small window in which the directory will not be cleaned:
21948 # after its creation but before its name has been assigned to `$tmp'.
21949 $debug ||
21950 {
21951   tmp= ac_tmp=
21952   trap 'exit_status=$?
21953   : "${ac_tmp:=$tmp}"
21954   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
21955 ' 0
21956   trap 'as_fn_exit 1' 1 2 13 15
21957 }
21958 # Create a (secure) tmp directory for tmp files.
21959
21960 {
21961   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21962   test -d "$tmp"
21963 }  ||
21964 {
21965   tmp=./conf$$-$RANDOM
21966   (umask 077 && mkdir "$tmp")
21967 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
21968 ac_tmp=$tmp
21969
21970 # Set up the scripts for CONFIG_FILES section.
21971 # No need to generate them if there are no CONFIG_FILES.
21972 # This happens for instance with `./config.status config.h'.
21973 if test -n "$CONFIG_FILES"; then
21974
21975
21976 ac_cr=`echo X | tr X '\015'`
21977 # On cygwin, bash can eat \r inside `` if the user requested igncr.
21978 # But we know of no other shell where ac_cr would be empty at this
21979 # point, so we can use a bashism as a fallback.
21980 if test "x$ac_cr" = x; then
21981   eval ac_cr=\$\'\\r\'
21982 fi
21983 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21984 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21985   ac_cs_awk_cr='\\r'
21986 else
21987   ac_cs_awk_cr=$ac_cr
21988 fi
21989
21990 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
21991 _ACEOF
21992
21993
21994 {
21995   echo "cat >conf$$subs.awk <<_ACEOF" &&
21996   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21997   echo "_ACEOF"
21998 } >conf$$subs.sh ||
21999   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22000 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22001 ac_delim='%!_!# '
22002 for ac_last_try in false false false false false :; do
22003   . ./conf$$subs.sh ||
22004     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22005
22006   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22007   if test $ac_delim_n = $ac_delim_num; then
22008     break
22009   elif $ac_last_try; then
22010     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22011   else
22012     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22013   fi
22014 done
22015 rm -f conf$$subs.sh
22016
22017 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22018 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22019 _ACEOF
22020 sed -n '
22021 h
22022 s/^/S["/; s/!.*/"]=/
22023 p
22024 g
22025 s/^[^!]*!//
22026 :repl
22027 t repl
22028 s/'"$ac_delim"'$//
22029 t delim
22030 :nl
22031 h
22032 s/\(.\{148\}\)..*/\1/
22033 t more1
22034 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22035 p
22036 n
22037 b repl
22038 :more1
22039 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22040 p
22041 g
22042 s/.\{148\}//
22043 t nl
22044 :delim
22045 h
22046 s/\(.\{148\}\)..*/\1/
22047 t more2
22048 s/["\\]/\\&/g; s/^/"/; s/$/"/
22049 p
22050 b
22051 :more2
22052 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22053 p
22054 g
22055 s/.\{148\}//
22056 t delim
22057 ' <conf$$subs.awk | sed '
22058 /^[^""]/{
22059   N
22060   s/\n//
22061 }
22062 ' >>$CONFIG_STATUS || ac_write_fail=1
22063 rm -f conf$$subs.awk
22064 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22065 _ACAWK
22066 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22067   for (key in S) S_is_set[key] = 1
22068   FS = "\a"
22069
22070 }
22071 {
22072   line = $ 0
22073   nfields = split(line, field, "@")
22074   substed = 0
22075   len = length(field[1])
22076   for (i = 2; i < nfields; i++) {
22077     key = field[i]
22078     keylen = length(key)
22079     if (S_is_set[key]) {
22080       value = S[key]
22081       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22082       len += length(value) + length(field[++i])
22083       substed = 1
22084     } else
22085       len += 1 + keylen
22086   }
22087
22088   print line
22089 }
22090
22091 _ACAWK
22092 _ACEOF
22093 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22094 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22095   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22096 else
22097   cat
22098 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22099   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22100 _ACEOF
22101
22102 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22103 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22104 # trailing colons and then remove the whole line if VPATH becomes empty
22105 # (actually we leave an empty line to preserve line numbers).
22106 if test "x$srcdir" = x.; then
22107   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
22108 h
22109 s///
22110 s/^/:/
22111 s/[      ]*$/:/
22112 s/:\$(srcdir):/:/g
22113 s/:\${srcdir}:/:/g
22114 s/:@srcdir@:/:/g
22115 s/^:*//
22116 s/:*$//
22117 x
22118 s/\(=[   ]*\).*/\1/
22119 G
22120 s/\n//
22121 s/^[^=]*=[       ]*$//
22122 }'
22123 fi
22124
22125 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22126 fi # test -n "$CONFIG_FILES"
22127
22128 # Set up the scripts for CONFIG_HEADERS section.
22129 # No need to generate them if there are no CONFIG_HEADERS.
22130 # This happens for instance with `./config.status Makefile'.
22131 if test -n "$CONFIG_HEADERS"; then
22132 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22133 BEGIN {
22134 _ACEOF
22135
22136 # Transform confdefs.h into an awk script `defines.awk', embedded as
22137 # here-document in config.status, that substitutes the proper values into
22138 # config.h.in to produce config.h.
22139
22140 # Create a delimiter string that does not exist in confdefs.h, to ease
22141 # handling of long lines.
22142 ac_delim='%!_!# '
22143 for ac_last_try in false false :; do
22144   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22145   if test -z "$ac_tt"; then
22146     break
22147   elif $ac_last_try; then
22148     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22149   else
22150     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22151   fi
22152 done
22153
22154 # For the awk script, D is an array of macro values keyed by name,
22155 # likewise P contains macro parameters if any.  Preserve backslash
22156 # newline sequences.
22157
22158 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22159 sed -n '
22160 s/.\{148\}/&'"$ac_delim"'/g
22161 t rset
22162 :rset
22163 s/^[     ]*#[    ]*define[       ][      ]*/ /
22164 t def
22165 d
22166 :def
22167 s/\\$//
22168 t bsnl
22169 s/["\\]/\\&/g
22170 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22171 D["\1"]=" \3"/p
22172 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
22173 d
22174 :bsnl
22175 s/["\\]/\\&/g
22176 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
22177 D["\1"]=" \3\\\\\\n"\\/p
22178 t cont
22179 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22180 t cont
22181 d
22182 :cont
22183 n
22184 s/.\{148\}/&'"$ac_delim"'/g
22185 t clear
22186 :clear
22187 s/\\$//
22188 t bsnlc
22189 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22190 d
22191 :bsnlc
22192 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22193 b cont
22194 ' <confdefs.h | sed '
22195 s/'"$ac_delim"'/"\\\
22196 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22197
22198 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22199   for (key in D) D_is_set[key] = 1
22200   FS = "\a"
22201 }
22202 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22203   line = \$ 0
22204   split(line, arg, " ")
22205   if (arg[1] == "#") {
22206     defundef = arg[2]
22207     mac1 = arg[3]
22208   } else {
22209     defundef = substr(arg[1], 2)
22210     mac1 = arg[2]
22211   }
22212   split(mac1, mac2, "(") #)
22213   macro = mac2[1]
22214   prefix = substr(line, 1, index(line, defundef) - 1)
22215   if (D_is_set[macro]) {
22216     # Preserve the white space surrounding the "#".
22217     print prefix "define", macro P[macro] D[macro]
22218     next
22219   } else {
22220     # Replace #undef with comments.  This is necessary, for example,
22221     # in the case of _POSIX_SOURCE, which is predefined and required
22222     # on some systems where configure will not decide to define it.
22223     if (defundef == "undef") {
22224       print "/*", prefix defundef, macro, "*/"
22225       next
22226     }
22227   }
22228 }
22229 { print }
22230 _ACAWK
22231 _ACEOF
22232 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22233   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22234 fi # test -n "$CONFIG_HEADERS"
22235
22236
22237 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
22238 shift
22239 for ac_tag
22240 do
22241   case $ac_tag in
22242   :[FHLC]) ac_mode=$ac_tag; continue;;
22243   esac
22244   case $ac_mode$ac_tag in
22245   :[FHL]*:*);;
22246   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22247   :[FH]-) ac_tag=-:-;;
22248   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22249   esac
22250   ac_save_IFS=$IFS
22251   IFS=:
22252   set x $ac_tag
22253   IFS=$ac_save_IFS
22254   shift
22255   ac_file=$1
22256   shift
22257
22258   case $ac_mode in
22259   :L) ac_source=$1;;
22260   :[FH])
22261     ac_file_inputs=
22262     for ac_f
22263     do
22264       case $ac_f in
22265       -) ac_f="$ac_tmp/stdin";;
22266       *) # Look for the file first in the build tree, then in the source tree
22267          # (if the path is not absolute).  The absolute path cannot be DOS-style,
22268          # because $ac_f cannot contain `:'.
22269          test -f "$ac_f" ||
22270            case $ac_f in
22271            [\\/$]*) false;;
22272            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22273            esac ||
22274            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22275       esac
22276       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22277       as_fn_append ac_file_inputs " '$ac_f'"
22278     done
22279
22280     # Let's still pretend it is `configure' which instantiates (i.e., don't
22281     # use $as_me), people would be surprised to read:
22282     #    /* config.h.  Generated by config.status.  */
22283     configure_input='Generated from '`
22284           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22285         `' by configure.'
22286     if test x"$ac_file" != x-; then
22287       configure_input="$ac_file.  $configure_input"
22288       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22289 $as_echo "$as_me: creating $ac_file" >&6;}
22290     fi
22291     # Neutralize special characters interpreted by sed in replacement strings.
22292     case $configure_input in #(
22293     *\&* | *\|* | *\\* )
22294        ac_sed_conf_input=`$as_echo "$configure_input" |
22295        sed 's/[\\\\&|]/\\\\&/g'`;; #(
22296     *) ac_sed_conf_input=$configure_input;;
22297     esac
22298
22299     case $ac_tag in
22300     *:-:* | *:-) cat >"$ac_tmp/stdin" \
22301       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22302     esac
22303     ;;
22304   esac
22305
22306   ac_dir=`$as_dirname -- "$ac_file" ||
22307 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22308          X"$ac_file" : 'X\(//\)[^/]' \| \
22309          X"$ac_file" : 'X\(//\)$' \| \
22310          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22311 $as_echo X"$ac_file" |
22312     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22313             s//\1/
22314             q
22315           }
22316           /^X\(\/\/\)[^/].*/{
22317             s//\1/
22318             q
22319           }
22320           /^X\(\/\/\)$/{
22321             s//\1/
22322             q
22323           }
22324           /^X\(\/\).*/{
22325             s//\1/
22326             q
22327           }
22328           s/.*/./; q'`
22329   as_dir="$ac_dir"; as_fn_mkdir_p
22330   ac_builddir=.
22331
22332 case "$ac_dir" in
22333 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22334 *)
22335   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22336   # A ".." for each directory in $ac_dir_suffix.
22337   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22338   case $ac_top_builddir_sub in
22339   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22340   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22341   esac ;;
22342 esac
22343 ac_abs_top_builddir=$ac_pwd
22344 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22345 # for backward compatibility:
22346 ac_top_builddir=$ac_top_build_prefix
22347
22348 case $srcdir in
22349   .)  # We are building in place.
22350     ac_srcdir=.
22351     ac_top_srcdir=$ac_top_builddir_sub
22352     ac_abs_top_srcdir=$ac_pwd ;;
22353   [\\/]* | ?:[\\/]* )  # Absolute name.
22354     ac_srcdir=$srcdir$ac_dir_suffix;
22355     ac_top_srcdir=$srcdir
22356     ac_abs_top_srcdir=$srcdir ;;
22357   *) # Relative name.
22358     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22359     ac_top_srcdir=$ac_top_build_prefix$srcdir
22360     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22361 esac
22362 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22363
22364
22365   case $ac_mode in
22366   :F)
22367   #
22368   # CONFIG_FILE
22369   #
22370
22371   case $INSTALL in
22372   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22373   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22374   esac
22375   ac_MKDIR_P=$MKDIR_P
22376   case $MKDIR_P in
22377   [\\/$]* | ?:[\\/]* ) ;;
22378   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
22379   esac
22380 _ACEOF
22381
22382 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22383 # If the template does not know about datarootdir, expand it.
22384 # FIXME: This hack should be removed a few years after 2.60.
22385 ac_datarootdir_hack=; ac_datarootdir_seen=
22386 ac_sed_dataroot='
22387 /datarootdir/ {
22388   p
22389   q
22390 }
22391 /@datadir@/p
22392 /@docdir@/p
22393 /@infodir@/p
22394 /@localedir@/p
22395 /@mandir@/p'
22396 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22397 *datarootdir*) ac_datarootdir_seen=yes;;
22398 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22399   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22400 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22401 _ACEOF
22402 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22403   ac_datarootdir_hack='
22404   s&@datadir@&$datadir&g
22405   s&@docdir@&$docdir&g
22406   s&@infodir@&$infodir&g
22407   s&@localedir@&$localedir&g
22408   s&@mandir@&$mandir&g
22409   s&\\\${datarootdir}&$datarootdir&g' ;;
22410 esac
22411 _ACEOF
22412
22413 # Neutralize VPATH when `$srcdir' = `.'.
22414 # Shell code in configure.ac might set extrasub.
22415 # FIXME: do we really want to maintain this feature?
22416 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22417 ac_sed_extra="$ac_vpsub
22418 $extrasub
22419 _ACEOF
22420 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22421 :t
22422 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22423 s|@configure_input@|$ac_sed_conf_input|;t t
22424 s&@top_builddir@&$ac_top_builddir_sub&;t t
22425 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22426 s&@srcdir@&$ac_srcdir&;t t
22427 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22428 s&@top_srcdir@&$ac_top_srcdir&;t t
22429 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22430 s&@builddir@&$ac_builddir&;t t
22431 s&@abs_builddir@&$ac_abs_builddir&;t t
22432 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22433 s&@INSTALL@&$ac_INSTALL&;t t
22434 s&@MKDIR_P@&$ac_MKDIR_P&;t t
22435 $ac_datarootdir_hack
22436 "
22437 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22438   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22439
22440 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22441   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22442   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
22443       "$ac_tmp/out"`; test -z "$ac_out"; } &&
22444   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22445 which seems to be undefined.  Please make sure it is defined" >&5
22446 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22447 which seems to be undefined.  Please make sure it is defined" >&2;}
22448
22449   rm -f "$ac_tmp/stdin"
22450   case $ac_file in
22451   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22452   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22453   esac \
22454   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22455  ;;
22456   :H)
22457   #
22458   # CONFIG_HEADER
22459   #
22460   if test x"$ac_file" != x-; then
22461     {
22462       $as_echo "/* $configure_input  */" \
22463       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22464     } >"$ac_tmp/config.h" \
22465       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22466     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22467       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22468 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22469     else
22470       rm -f "$ac_file"
22471       mv "$ac_tmp/config.h" "$ac_file" \
22472         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22473     fi
22474   else
22475     $as_echo "/* $configure_input  */" \
22476       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22477       || as_fn_error $? "could not create -" "$LINENO" 5
22478   fi
22479 # Compute "$ac_file"'s index in $config_headers.
22480 _am_arg="$ac_file"
22481 _am_stamp_count=1
22482 for _am_header in $config_headers :; do
22483   case $_am_header in
22484     $_am_arg | $_am_arg:* )
22485       break ;;
22486     * )
22487       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22488   esac
22489 done
22490 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
22491 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22492          X"$_am_arg" : 'X\(//\)[^/]' \| \
22493          X"$_am_arg" : 'X\(//\)$' \| \
22494          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
22495 $as_echo X"$_am_arg" |
22496     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22497             s//\1/
22498             q
22499           }
22500           /^X\(\/\/\)[^/].*/{
22501             s//\1/
22502             q
22503           }
22504           /^X\(\/\/\)$/{
22505             s//\1/
22506             q
22507           }
22508           /^X\(\/\).*/{
22509             s//\1/
22510             q
22511           }
22512           s/.*/./; q'`/stamp-h$_am_stamp_count
22513  ;;
22514   :L)
22515   #
22516   # CONFIG_LINK
22517   #
22518
22519   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
22520     :
22521   else
22522     # Prefer the file from the source tree if names are identical.
22523     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
22524       ac_source=$srcdir/$ac_source
22525     fi
22526
22527     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
22528 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
22529
22530     if test ! -r "$ac_source"; then
22531       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
22532     fi
22533     rm -f "$ac_file"
22534
22535     # Try a relative symlink, then a hard link, then a copy.
22536     case $ac_source in
22537     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
22538         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
22539     esac
22540     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
22541       ln "$ac_source" "$ac_file" 2>/dev/null ||
22542       cp -p "$ac_source" "$ac_file" ||
22543       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
22544   fi
22545  ;;
22546   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22547 $as_echo "$as_me: executing $ac_file commands" >&6;}
22548  ;;
22549   esac
22550
22551
22552   case $ac_file$ac_mode in
22553     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
22554   # Autoconf 2.62 quotes --file arguments for eval, but not when files
22555   # are listed without --file.  Let's play safe and only enable the eval
22556   # if we detect the quoting.
22557   case $CONFIG_FILES in
22558   *\'*) eval set x "$CONFIG_FILES" ;;
22559   *)   set x $CONFIG_FILES ;;
22560   esac
22561   shift
22562   for mf
22563   do
22564     # Strip MF so we end up with the name of the file.
22565     mf=`echo "$mf" | sed -e 's/:.*$//'`
22566     # Check whether this is an Automake generated Makefile or not.
22567     # We used to match only the files named `Makefile.in', but
22568     # some people rename them; so instead we look at the file content.
22569     # Grep'ing the first line is not enough: some people post-process
22570     # each Makefile.in and add a new line on top of each file to say so.
22571     # Grep'ing the whole file is not good either: AIX grep has a line
22572     # limit of 2048, but all sed's we know have understand at least 4000.
22573     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
22574       dirpart=`$as_dirname -- "$mf" ||
22575 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22576          X"$mf" : 'X\(//\)[^/]' \| \
22577          X"$mf" : 'X\(//\)$' \| \
22578          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
22579 $as_echo X"$mf" |
22580     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22581             s//\1/
22582             q
22583           }
22584           /^X\(\/\/\)[^/].*/{
22585             s//\1/
22586             q
22587           }
22588           /^X\(\/\/\)$/{
22589             s//\1/
22590             q
22591           }
22592           /^X\(\/\).*/{
22593             s//\1/
22594             q
22595           }
22596           s/.*/./; q'`
22597     else
22598       continue
22599     fi
22600     # Extract the definition of DEPDIR, am__include, and am__quote
22601     # from the Makefile without running `make'.
22602     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22603     test -z "$DEPDIR" && continue
22604     am__include=`sed -n 's/^am__include = //p' < "$mf"`
22605     test -z "am__include" && continue
22606     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22607     # When using ansi2knr, U may be empty or an underscore; expand it
22608     U=`sed -n 's/^U = //p' < "$mf"`
22609     # Find all dependency output files, they are included files with
22610     # $(DEPDIR) in their names.  We invoke sed twice because it is the
22611     # simplest approach to changing $(DEPDIR) to its actual value in the
22612     # expansion.
22613     for file in `sed -n "
22614       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22615          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22616       # Make sure the directory exists.
22617       test -f "$dirpart/$file" && continue
22618       fdir=`$as_dirname -- "$file" ||
22619 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22620          X"$file" : 'X\(//\)[^/]' \| \
22621          X"$file" : 'X\(//\)$' \| \
22622          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
22623 $as_echo X"$file" |
22624     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22625             s//\1/
22626             q
22627           }
22628           /^X\(\/\/\)[^/].*/{
22629             s//\1/
22630             q
22631           }
22632           /^X\(\/\/\)$/{
22633             s//\1/
22634             q
22635           }
22636           /^X\(\/\).*/{
22637             s//\1/
22638             q
22639           }
22640           s/.*/./; q'`
22641       as_dir=$dirpart/$fdir; as_fn_mkdir_p
22642       # echo "creating $dirpart/$file"
22643       echo '# dummy' > "$dirpart/$file"
22644     done
22645   done
22646 }
22647  ;;
22648
22649   esac
22650 done # for ac_tag
22651
22652
22653 as_fn_exit 0
22654 _ACEOF
22655 ac_clean_files=$ac_clean_files_save
22656
22657 test $ac_write_fail = 0 ||
22658   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
22659
22660
22661 # configure is writing to config.log, and then calls config.status.
22662 # config.status does its own redirection, appending to config.log.
22663 # Unfortunately, on DOS this fails, as config.log is still kept open
22664 # by configure, so config.status won't be able to write to it; its
22665 # output is simply discarded.  So we exec the FD to /dev/null,
22666 # effectively closing config.log, so it can be properly (re)opened and
22667 # appended to by config.status.  When coming back to configure, we
22668 # need to make the FD available again.
22669 if test "$no_create" != yes; then
22670   ac_cs_success=:
22671   ac_config_status_args=
22672   test "$silent" = yes &&
22673     ac_config_status_args="$ac_config_status_args --quiet"
22674   exec 5>/dev/null
22675   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22676   exec 5>>config.log
22677   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22678   # would make configure fail if this is the last instruction.
22679   $ac_cs_success || as_fn_exit 1
22680 fi
22681 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22682   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22683 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
22684 fi
22685