Merge commit 'upstream/1.4'
[debian/gzip] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.65.23-13e35 for gzip 1.4.
4 #
5 # Report bugs to <bug-gzip@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 case $0 in #((
95   *[\\/]* ) as_myself=$0 ;;
96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 for as_dir in $PATH
98 do
99   IFS=$as_save_IFS
100   test -z "$as_dir" && as_dir=.
101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102   done
103 IFS=$as_save_IFS
104
105      ;;
106 esac
107 # We did not find ourselves, most probably we were run as `sh COMMAND'
108 # in which case we are not to be found in the path.
109 if test "x$as_myself" = x; then
110   as_myself=$0
111 fi
112 if test ! -f "$as_myself"; then
113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114   exit 1
115 fi
116
117 # Unset variables that we do not need and which cause bugs (e.g. in
118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119 # suppresses any "Segmentation fault" message there.  '((' could
120 # trigger a bug in pdksh 5.2.14.
121 for as_var in BASH_ENV ENV MAIL MAILPATH
122 do eval test x\${$as_var+set} = xset \
123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124 done
125 PS1='$ '
126 PS2='> '
127 PS4='+ '
128
129 # NLS nuisances.
130 LC_ALL=C
131 export LC_ALL
132 LANGUAGE=C
133 export LANGUAGE
134
135 # CDPATH.
136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138 if test "x$CONFIG_SHELL" = x; then
139   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140   emulate sh
141   NULLCMD=:
142   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143   # is contrary to our usage.  Disable this feature.
144   alias -g '\${1+\"\$@\"}'='\"\$@\"'
145   setopt NO_GLOB_SUBST
146 else
147   case \`(set -o) 2>/dev/null\` in #(
148   *posix*) :
149     set -o posix ;; #(
150   *) :
151      ;;
152 esac
153 fi
154 "
155   as_required="as_fn_return () { (exit \$1); }
156 as_fn_success () { as_fn_return 0; }
157 as_fn_failure () { as_fn_return 1; }
158 as_fn_ret_success () { return 0; }
159 as_fn_ret_failure () { return 1; }
160
161 exitcode=0
162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168 else
169   exitcode=1; echo positional parameters were not saved.
170 fi
171 test x\$exitcode = x0 || exit 1"
172   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176 test \$(( 1 + 1 )) = 2 || exit 1"
177   if (eval "$as_required") 2>/dev/null; then :
178   as_have_required=yes
179 else
180   as_have_required=no
181 fi
182   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184 else
185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 as_found=false
187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188 do
189   IFS=$as_save_IFS
190   test -z "$as_dir" && as_dir=.
191   as_found=:
192   case $as_dir in #(
193          /*)
194            for as_base in sh bash ksh sh5; do
195              # Try only shells that exist, to save several forks.
196              as_shell=$as_dir/$as_base
197              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199   CONFIG_SHELL=$as_shell as_have_required=yes
200                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201   break 2
202 fi
203 fi
204            done;;
205        esac
206   as_found=false
207 done
208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210   CONFIG_SHELL=$SHELL as_have_required=yes
211 fi; }
212 IFS=$as_save_IFS
213
214
215       if test "x$CONFIG_SHELL" != x; then :
216   # We cannot yet assume a decent shell, so we have to provide a
217         # neutralization value for shells without unset; and this also
218         # works around shells that cannot unset nonexistent variables.
219         BASH_ENV=/dev/null
220         ENV=/dev/null
221         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222         export CONFIG_SHELL
223         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224 fi
225
226     if test x$as_have_required = xno; then :
227   $as_echo "$0: This script requires a shell more modern than all"
228   $as_echo "$0: the shells that I found on your system."
229   if test x${ZSH_VERSION+set} = xset ; then
230     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232   else
233     $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
234 $0: about your system, including any error possibly output
235 $0: before this message. Then install a modern shell, or
236 $0: manually run the script under such a shell if you do
237 $0: have one."
238   fi
239   exit 1
240 fi
241 fi
242 fi
243 SHELL=${CONFIG_SHELL-/bin/sh}
244 export SHELL
245 # Unset more variables known to interfere with behavior of common tools.
246 CLICOLOR_FORCE= GREP_OPTIONS=
247 unset CLICOLOR_FORCE GREP_OPTIONS
248
249 ## --------------------- ##
250 ## M4sh Shell Functions. ##
251 ## --------------------- ##
252 # as_fn_unset VAR
253 # ---------------
254 # Portably unset VAR.
255 as_fn_unset ()
256 {
257   { eval $1=; unset $1;}
258 }
259 as_unset=as_fn_unset
260
261 # as_fn_set_status STATUS
262 # -----------------------
263 # Set $? to STATUS, without forking.
264 as_fn_set_status ()
265 {
266   return $1
267 } # as_fn_set_status
268
269 # as_fn_exit STATUS
270 # -----------------
271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272 as_fn_exit ()
273 {
274   set +e
275   as_fn_set_status $1
276   exit $1
277 } # as_fn_exit
278
279 # as_fn_mkdir_p
280 # -------------
281 # Create "$as_dir" as a directory, including parents if necessary.
282 as_fn_mkdir_p ()
283 {
284
285   case $as_dir in #(
286   -*) as_dir=./$as_dir;;
287   esac
288   test -d "$as_dir" || eval $as_mkdir_p || {
289     as_dirs=
290     while :; do
291       case $as_dir in #(
292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293       *) as_qdir=$as_dir;;
294       esac
295       as_dirs="'$as_qdir' $as_dirs"
296       as_dir=`$as_dirname -- "$as_dir" ||
297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298          X"$as_dir" : 'X\(//\)[^/]' \| \
299          X"$as_dir" : 'X\(//\)$' \| \
300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301 $as_echo X"$as_dir" |
302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303             s//\1/
304             q
305           }
306           /^X\(\/\/\)[^/].*/{
307             s//\1/
308             q
309           }
310           /^X\(\/\/\)$/{
311             s//\1/
312             q
313           }
314           /^X\(\/\).*/{
315             s//\1/
316             q
317           }
318           s/.*/./; q'`
319       test -d "$as_dir" && break
320     done
321     test -z "$as_dirs" || eval "mkdir $as_dirs"
322   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
323
324
325 } # as_fn_mkdir_p
326 # as_fn_append VAR VALUE
327 # ----------------------
328 # Append the text in VALUE to the end of the definition contained in VAR. Take
329 # advantage of any shell optimizations that allow amortized linear growth over
330 # repeated appends, instead of the typical quadratic growth present in naive
331 # implementations.
332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333   eval 'as_fn_append ()
334   {
335     eval $1+=\$2
336   }'
337 else
338   as_fn_append ()
339   {
340     eval $1=\$$1\$2
341   }
342 fi # as_fn_append
343
344 # as_fn_arith ARG...
345 # ------------------
346 # Perform arithmetic evaluation on the ARGs, and store the result in the
347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
348 # must be portable across $(()) and expr.
349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350   eval 'as_fn_arith ()
351   {
352     as_val=$(( $* ))
353   }'
354 else
355   as_fn_arith ()
356   {
357     as_val=`expr "$@" || test $? -eq 1`
358   }
359 fi # as_fn_arith
360
361
362 # as_fn_error ERROR [LINENO LOG_FD]
363 # ---------------------------------
364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366 # script with status $?, using 1 if that was 0.
367 as_fn_error ()
368 {
369   as_status=$?; test $as_status -eq 0 && as_status=1
370   if test "$3"; then
371     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
373   fi
374   $as_echo "$as_me: error: $1" >&2
375   as_fn_exit $as_status
376 } # as_fn_error
377
378 if expr a : '\(a\)' >/dev/null 2>&1 &&
379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
380   as_expr=expr
381 else
382   as_expr=false
383 fi
384
385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386   as_basename=basename
387 else
388   as_basename=false
389 fi
390
391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392   as_dirname=dirname
393 else
394   as_dirname=false
395 fi
396
397 as_me=`$as_basename -- "$0" ||
398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399          X"$0" : 'X\(//\)$' \| \
400          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401 $as_echo X/"$0" |
402     sed '/^.*\/\([^/][^/]*\)\/*$/{
403             s//\1/
404             q
405           }
406           /^X\/\(\/\/\)$/{
407             s//\1/
408             q
409           }
410           /^X\/\(\/\).*/{
411             s//\1/
412             q
413           }
414           s/.*/./; q'`
415
416 # Avoid depending upon Character Ranges.
417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420 as_cr_digits='0123456789'
421 as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429   sed -n '
430     p
431     /[$]LINENO/=
432   ' <$as_myself |
433     sed '
434       s/[$]LINENO.*/&-/
435       t lineno
436       b
437       :lineno
438       N
439       :loop
440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441       t loop
442       s/-\n.*//
443     ' >$as_me.lineno &&
444   chmod +x "$as_me.lineno" ||
445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447   # Don't try to exec as it changes $[0], causing all sort of problems
448   # (the dirname of $[0] is not the place where we might find the
449   # original and so on.  Autoconf is especially sensitive to this).
450   . "./$as_me.lineno"
451   # Exit status is that of the last command.
452   exit
453 }
454
455 ECHO_C= ECHO_N= ECHO_T=
456 case `echo -n x` in #(((((
457 -n*)
458   case `echo 'xy\c'` in
459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
460   xy)  ECHO_C='\c';;
461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462        ECHO_T=' ';;
463   esac;;
464 *)
465   ECHO_N='-n';;
466 esac
467
468 rm -f conf$$ conf$$.exe conf$$.file
469 if test -d conf$$.dir; then
470   rm -f conf$$.dir/conf$$.file
471 else
472   rm -f conf$$.dir
473   mkdir conf$$.dir 2>/dev/null
474 fi
475 if (echo >conf$$.file) 2>/dev/null; then
476   if ln -s conf$$.file conf$$ 2>/dev/null; then
477     as_ln_s='ln -s'
478     # ... but there are two gotchas:
479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481     # In both cases, we have to default to `cp -p'.
482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483       as_ln_s='cp -p'
484   elif ln conf$$.file conf$$ 2>/dev/null; then
485     as_ln_s=ln
486   else
487     as_ln_s='cp -p'
488   fi
489 else
490   as_ln_s='cp -p'
491 fi
492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493 rmdir conf$$.dir 2>/dev/null
494
495 if mkdir -p . 2>/dev/null; then
496   as_mkdir_p='mkdir -p "$as_dir"'
497 else
498   test -d ./-p && rmdir ./-p
499   as_mkdir_p=false
500 fi
501
502 if test -x / >/dev/null 2>&1; then
503   as_test_x='test -x'
504 else
505   if ls -dL / >/dev/null 2>&1; then
506     as_ls_L_option=L
507   else
508     as_ls_L_option=
509   fi
510   as_test_x='
511     eval sh -c '\''
512       if test -d "$1"; then
513         test -d "$1/.";
514       else
515         case $1 in #(
516         -*)set "./$1";;
517         esac;
518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519         ???[sx]*):;;*)false;;esac;fi
520     '\'' sh
521   '
522 fi
523 as_executable_p=$as_test_x
524
525 # Sed expression to map a string onto a valid CPP name.
526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528 # Sed expression to map a string onto a valid variable name.
529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532 test -n "$DJDIR" || exec 7<&0 </dev/null
533 exec 6>&1
534
535 # Name of the host.
536 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
537 # so uname gets run too.
538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540 #
541 # Initializations.
542 #
543 ac_default_prefix=/usr/local
544 ac_clean_files=
545 ac_config_libobj_dir=.
546 LIBOBJS=
547 cross_compiling=no
548 subdirs=
549 MFLAGS=
550 MAKEFLAGS=
551
552 # Identity of this package.
553 PACKAGE_NAME='gzip'
554 PACKAGE_TARNAME='gzip'
555 PACKAGE_VERSION='1.4'
556 PACKAGE_STRING='gzip 1.4'
557 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
558 PACKAGE_URL=''
559
560 ac_unique_file="gzip.c"
561 # Factoring default headers for most tests.
562 ac_includes_default="\
563 #include <stdio.h>
564 #ifdef HAVE_SYS_TYPES_H
565 # include <sys/types.h>
566 #endif
567 #ifdef HAVE_SYS_STAT_H
568 # include <sys/stat.h>
569 #endif
570 #ifdef STDC_HEADERS
571 # include <stdlib.h>
572 # include <stddef.h>
573 #else
574 # ifdef HAVE_STDLIB_H
575 #  include <stdlib.h>
576 # endif
577 #endif
578 #ifdef HAVE_STRING_H
579 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
580 #  include <memory.h>
581 # endif
582 # include <string.h>
583 #endif
584 #ifdef HAVE_STRINGS_H
585 # include <strings.h>
586 #endif
587 #ifdef HAVE_INTTYPES_H
588 # include <inttypes.h>
589 #endif
590 #ifdef HAVE_STDINT_H
591 # include <stdint.h>
592 #endif
593 #ifdef HAVE_UNISTD_H
594 # include <unistd.h>
595 #endif"
596
597 ac_func_list=
598 ac_header_list=
599 gl_getopt_required=POSIX
600 gl_getopt_required=POSIX
601 ac_subst_vars='gltests_LTLIBOBJS
602 gltests_LIBOBJS
603 gl_LTLIBOBJS
604 gl_LIBOBJS
605 am__EXEEXT_FALSE
606 am__EXEEXT_TRUE
607 LTLIBOBJS
608 ASFLAGS_config
609 LIBOBJS
610 ASCPPFLAGS
611 ASCPPPOST
612 GNULIB_WARN_CFLAGS
613 WERROR_CFLAGS
614 LIBGZIP_LTLIBDEPS
615 LIBGZIP_LIBDEPS
616 REPLACE_ISWCNTRL
617 WCTYPE_H
618 HAVE_WCTYPE_H
619 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
620 NEXT_WCTYPE_H
621 HAVE_ISWCNTRL
622 HAVE_WINT_T
623 HAVE_WCHAR_H
624 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
625 NEXT_WCHAR_H
626 WARN_CFLAGS
627 HAVE_UNISTD_H
628 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
629 NEXT_UNISTD_H
630 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
631 TIME_H_DEFINES_STRUCT_TIMESPEC
632 NEXT_AS_FIRST_DIRECTIVE_TIME_H
633 NEXT_TIME_H
634 REPLACE_TIMEGM
635 REPLACE_STRPTIME
636 REPLACE_NANOSLEEP
637 REPLACE_MKTIME
638 REPLACE_LOCALTIME_R
639 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
640 NEXT_SYS_STAT_H
641 NEXT_AS_FIRST_DIRECTIVE_STRING_H
642 NEXT_STRING_H
643 HAVE_RANDOM_H
644 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
645 NEXT_STDLIB_H
646 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
647 NEXT_STDIO_H
648 STDINT_H
649 WINT_T_SUFFIX
650 WCHAR_T_SUFFIX
651 SIG_ATOMIC_T_SUFFIX
652 SIZE_T_SUFFIX
653 PTRDIFF_T_SUFFIX
654 HAVE_SIGNED_WINT_T
655 HAVE_SIGNED_WCHAR_T
656 HAVE_SIGNED_SIG_ATOMIC_T
657 BITSIZEOF_WINT_T
658 BITSIZEOF_WCHAR_T
659 BITSIZEOF_SIG_ATOMIC_T
660 BITSIZEOF_SIZE_T
661 BITSIZEOF_PTRDIFF_T
662 HAVE_SYS_BITYPES_H
663 HAVE_SYS_INTTYPES_H
664 HAVE_STDINT_H
665 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
666 NEXT_STDINT_H
667 HAVE_SYS_TYPES_H
668 HAVE_INTTYPES_H
669 HAVE_UNSIGNED_LONG_LONG_INT
670 HAVE_LONG_LONG_INT
671 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
672 NEXT_STDDEF_H
673 STDDEF_H
674 HAVE_WCHAR_T
675 REPLACE_NULL
676 HAVE__BOOL
677 STDBOOL_H
678 UNDEFINE_STRTOK_R
679 REPLACE_STRTOK_R
680 REPLACE_STRSIGNAL
681 REPLACE_STRNDUP
682 REPLACE_STRERROR
683 REPLACE_STRCASESTR
684 REPLACE_STRSTR
685 REPLACE_STRDUP
686 REPLACE_MEMMEM
687 REPLACE_MEMCHR
688 HAVE_STRVERSCMP
689 HAVE_DECL_STRSIGNAL
690 HAVE_DECL_STRERROR
691 HAVE_DECL_STRTOK_R
692 HAVE_STRCASESTR
693 HAVE_STRSEP
694 HAVE_STRPBRK
695 HAVE_DECL_STRNLEN
696 HAVE_DECL_STRNDUP
697 HAVE_DECL_STRDUP
698 HAVE_STRCHRNUL
699 HAVE_STPNCPY
700 HAVE_STPCPY
701 HAVE_RAWMEMCHR
702 HAVE_DECL_MEMRCHR
703 HAVE_MEMPCPY
704 HAVE_DECL_MEMMEM
705 HAVE_MBSLEN
706 GNULIB_STRVERSCMP
707 GNULIB_STRSIGNAL
708 GNULIB_STRERROR
709 GNULIB_MBSTOK_R
710 GNULIB_MBSSEP
711 GNULIB_MBSSPN
712 GNULIB_MBSPBRK
713 GNULIB_MBSCSPN
714 GNULIB_MBSCASESTR
715 GNULIB_MBSPCASECMP
716 GNULIB_MBSNCASECMP
717 GNULIB_MBSCASECMP
718 GNULIB_MBSSTR
719 GNULIB_MBSRCHR
720 GNULIB_MBSCHR
721 GNULIB_MBSNLEN
722 GNULIB_MBSLEN
723 GNULIB_STRTOK_R
724 GNULIB_STRCASESTR
725 GNULIB_STRSTR
726 GNULIB_STRSEP
727 GNULIB_STRPBRK
728 GNULIB_STRNLEN
729 GNULIB_STRNDUP
730 GNULIB_STRDUP
731 GNULIB_STRCHRNUL
732 GNULIB_STPNCPY
733 GNULIB_STPCPY
734 GNULIB_RAWMEMCHR
735 GNULIB_MEMRCHR
736 GNULIB_MEMPCPY
737 GNULIB_MEMMEM
738 GNULIB_MEMCHR
739 LOCALE_FR_UTF8
740 LOCALE_ZH_CN
741 LOCALE_JA
742 REPLACE_WCWIDTH
743 REPLACE_WCSNRTOMBS
744 REPLACE_WCSRTOMBS
745 REPLACE_WCRTOMB
746 REPLACE_MBSNRTOWCS
747 REPLACE_MBSRTOWCS
748 REPLACE_MBRLEN
749 REPLACE_MBRTOWC
750 REPLACE_MBSINIT
751 REPLACE_WCTOB
752 REPLACE_BTOWC
753 REPLACE_MBSTATE_T
754 HAVE_DECL_WCWIDTH
755 HAVE_DECL_WCTOB
756 HAVE_WCSNRTOMBS
757 HAVE_WCSRTOMBS
758 HAVE_WCRTOMB
759 HAVE_MBSNRTOWCS
760 HAVE_MBSRTOWCS
761 HAVE_MBRLEN
762 HAVE_MBRTOWC
763 HAVE_MBSINIT
764 HAVE_BTOWC
765 GNULIB_WCWIDTH
766 GNULIB_WCSNRTOMBS
767 GNULIB_WCSRTOMBS
768 GNULIB_WCRTOMB
769 GNULIB_MBSNRTOWCS
770 GNULIB_MBSRTOWCS
771 GNULIB_MBRLEN
772 GNULIB_MBRTOWC
773 GNULIB_MBSINIT
774 GNULIB_WCTOB
775 GNULIB_BTOWC
776 NEXT_AS_FIRST_DIRECTIVE_MATH_H
777 NEXT_MATH_H
778 LOCALCHARSET_TESTS_ENVIRONMENT
779 GLIBC21
780 GNU_MAKE_FALSE
781 GNU_MAKE_TRUE
782 SYS_TIME_H
783 REPLACE_GETTIMEOFDAY
784 HAVE_STRUCT_TIMEVAL
785 HAVE_SYS_TIME_H
786 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
787 NEXT_SYS_TIME_H
788 LTLIBINTL
789 LIBINTL
790 GETOPT_H
791 HAVE_GETOPT_H
792 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
793 NEXT_GETOPT_H
794 REPLACE_TRUNCL
795 REPLACE_SIGNBIT_USING_GCC
796 REPLACE_SIGNBIT
797 REPLACE_ROUNDL
798 REPLACE_ROUNDF
799 REPLACE_ROUND
800 REPLACE_NAN
801 REPLACE_LDEXPL
802 REPLACE_ISNAN
803 REPLACE_ISINF
804 REPLACE_ISFINITE
805 REPLACE_HUGE_VAL
806 REPLACE_FREXPL
807 REPLACE_FREXP
808 REPLACE_FLOORL
809 REPLACE_FLOORF
810 REPLACE_CEILL
811 REPLACE_CEILF
812 HAVE_DECL_TRUNCF
813 HAVE_DECL_TRUNC
814 HAVE_DECL_TANL
815 HAVE_DECL_SQRTL
816 HAVE_DECL_SINL
817 HAVE_DECL_LOGL
818 HAVE_DECL_LDEXPL
819 HAVE_DECL_FREXPL
820 HAVE_DECL_EXPL
821 HAVE_DECL_COSL
822 HAVE_DECL_ATANL
823 HAVE_DECL_ASINL
824 HAVE_DECL_ACOSL
825 HAVE_TANL
826 HAVE_SQRTL
827 HAVE_SINL
828 HAVE_LOGL
829 HAVE_ISNANL
830 HAVE_ISNAND
831 HAVE_ISNANF
832 HAVE_EXPL
833 HAVE_COSL
834 HAVE_ATANL
835 HAVE_ASINL
836 HAVE_ACOSL
837 GNULIB_TRUNCL
838 GNULIB_TRUNCF
839 GNULIB_TRUNC
840 GNULIB_TANL
841 GNULIB_SQRTL
842 GNULIB_SINL
843 GNULIB_SIGNBIT
844 GNULIB_ROUNDL
845 GNULIB_ROUNDF
846 GNULIB_ROUND
847 GNULIB_LOGL
848 GNULIB_LDEXPL
849 GNULIB_ISNANL
850 GNULIB_ISNAND
851 GNULIB_ISNANF
852 GNULIB_ISNAN
853 GNULIB_ISINF
854 GNULIB_ISFINITE
855 GNULIB_FREXPL
856 GNULIB_FREXP
857 GNULIB_FLOORL
858 GNULIB_FLOORF
859 GNULIB_EXPL
860 GNULIB_COSL
861 GNULIB_CEILL
862 GNULIB_CEILF
863 GNULIB_ATANL
864 GNULIB_ASINL
865 GNULIB_ACOSL
866 APPLE_UNIVERSAL_BUILD
867 FLOAT_H
868 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
869 NEXT_FLOAT_H
870 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
871 NEXT_FCNTL_H
872 REPLACE_VSPRINTF
873 REPLACE_VSNPRINTF
874 REPLACE_VPRINTF
875 REPLACE_VFPRINTF
876 REPLACE_VDPRINTF
877 REPLACE_VASPRINTF
878 REPLACE_STDIO_WRITE_FUNCS
879 REPLACE_SPRINTF
880 REPLACE_SNPRINTF
881 REPLACE_RENAMEAT
882 REPLACE_RENAME
883 REPLACE_REMOVE
884 REPLACE_PRINTF
885 REPLACE_POPEN
886 REPLACE_PERROR
887 REPLACE_OBSTACK_PRINTF
888 REPLACE_GETLINE
889 REPLACE_FTELLO
890 REPLACE_FTELL
891 REPLACE_FSEEKO
892 REPLACE_FSEEK
893 REPLACE_FREOPEN
894 REPLACE_FPURGE
895 REPLACE_FPRINTF
896 REPLACE_FOPEN
897 REPLACE_FFLUSH
898 REPLACE_FCLOSE
899 REPLACE_DPRINTF
900 HAVE_VDPRINTF
901 HAVE_VASPRINTF
902 HAVE_RENAMEAT
903 HAVE_DPRINTF
904 HAVE_DECL_VSNPRINTF
905 HAVE_DECL_SNPRINTF
906 HAVE_DECL_OBSTACK_PRINTF
907 HAVE_DECL_GETLINE
908 HAVE_DECL_GETDELIM
909 HAVE_DECL_FPURGE
910 GNULIB_VSPRINTF_POSIX
911 GNULIB_VSNPRINTF
912 GNULIB_VPRINTF_POSIX
913 GNULIB_VPRINTF
914 GNULIB_VFPRINTF_POSIX
915 GNULIB_VFPRINTF
916 GNULIB_VDPRINTF
917 GNULIB_VASPRINTF
918 GNULIB_STDIO_H_SIGPIPE
919 GNULIB_SPRINTF_POSIX
920 GNULIB_SNPRINTF
921 GNULIB_RENAMEAT
922 GNULIB_RENAME
923 GNULIB_REMOVE
924 GNULIB_PUTS
925 GNULIB_PUTCHAR
926 GNULIB_PUTC
927 GNULIB_PRINTF_POSIX
928 GNULIB_PRINTF
929 GNULIB_POPEN
930 GNULIB_PERROR
931 GNULIB_OBSTACK_PRINTF_POSIX
932 GNULIB_OBSTACK_PRINTF
933 GNULIB_GETLINE
934 GNULIB_GETDELIM
935 GNULIB_FWRITE
936 GNULIB_FTELLO
937 GNULIB_FTELL
938 GNULIB_FSEEKO
939 GNULIB_FSEEK
940 GNULIB_FREOPEN
941 GNULIB_FPUTS
942 GNULIB_FPUTC
943 GNULIB_FPURGE
944 GNULIB_FPRINTF_POSIX
945 GNULIB_FPRINTF
946 GNULIB_FOPEN
947 GNULIB_FFLUSH
948 GNULIB_FCLOSE
949 GNULIB_DPRINTF
950 REPLACE_OPENAT
951 REPLACE_OPEN
952 REPLACE_FCNTL
953 HAVE_OPENAT
954 HAVE_FCNTL
955 GNULIB_OPENAT
956 GNULIB_OPEN
957 GNULIB_FCNTL
958 REPLACE_UTIMENSAT
959 REPLACE_STAT
960 REPLACE_MKNOD
961 REPLACE_MKFIFO
962 REPLACE_MKDIR
963 REPLACE_LSTAT
964 REPLACE_FUTIMENS
965 REPLACE_FSTATAT
966 REPLACE_FSTAT
967 HAVE_UTIMENSAT
968 HAVE_MKNODAT
969 HAVE_MKNOD
970 HAVE_MKFIFOAT
971 HAVE_MKFIFO
972 HAVE_MKDIRAT
973 HAVE_LSTAT
974 HAVE_LCHMOD
975 HAVE_FUTIMENS
976 HAVE_FSTATAT
977 HAVE_FCHMODAT
978 GNULIB_UTIMENSAT
979 GNULIB_STAT
980 GNULIB_MKNODAT
981 GNULIB_MKNOD
982 GNULIB_MKFIFOAT
983 GNULIB_MKFIFO
984 GNULIB_MKDIRAT
985 GNULIB_LSTAT
986 GNULIB_LCHMOD
987 GNULIB_FUTIMENS
988 GNULIB_FSTATAT
989 GNULIB_FCHMODAT
990 EOVERFLOW_VALUE
991 EOVERFLOW_HIDDEN
992 ENOLINK_VALUE
993 ENOLINK_HIDDEN
994 EMULTIHOP_VALUE
995 EMULTIHOP_HIDDEN
996 ERRNO_H
997 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
998 NEXT_ERRNO_H
999 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1000 NEXT_DIRENT_H
1001 PRAGMA_SYSTEM_HEADER
1002 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1003 INCLUDE_NEXT
1004 REPLACE_OPENDIR
1005 REPLACE_FDOPENDIR
1006 REPLACE_CLOSEDIR
1007 HAVE_ALPHASORT
1008 HAVE_SCANDIR
1009 HAVE_FDOPENDIR
1010 HAVE_DECL_DIRFD
1011 GNULIB_ALPHASORT
1012 GNULIB_SCANDIR
1013 GNULIB_FDOPENDIR
1014 GNULIB_DIRFD
1015 LIB_CLOCK_GETTIME
1016 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1017 UNISTD_H_HAVE_WINSOCK2_H
1018 REPLACE_WRITE
1019 REPLACE_USLEEP
1020 REPLACE_UNLINKAT
1021 REPLACE_UNLINK
1022 REPLACE_SYMLINK
1023 REPLACE_SLEEP
1024 REPLACE_RMDIR
1025 REPLACE_READLINK
1026 REPLACE_PREAD
1027 REPLACE_LSEEK
1028 REPLACE_LINKAT
1029 REPLACE_LINK
1030 REPLACE_LCHOWN
1031 REPLACE_GETPAGESIZE
1032 REPLACE_GETGROUPS
1033 REPLACE_GETCWD
1034 REPLACE_FCHOWNAT
1035 REPLACE_FCHDIR
1036 REPLACE_DUP2
1037 REPLACE_DUP
1038 REPLACE_CLOSE
1039 REPLACE_CHOWN
1040 HAVE_USLEEP
1041 HAVE_UNLINKAT
1042 HAVE_SYS_PARAM_H
1043 HAVE_OS_H
1044 HAVE_DECL_GETLOGIN_R
1045 HAVE_DECL_ENVIRON
1046 HAVE_SYMLINKAT
1047 HAVE_SYMLINK
1048 HAVE_SLEEP
1049 HAVE_READLINKAT
1050 HAVE_READLINK
1051 HAVE_PREAD
1052 HAVE_PIPE2
1053 HAVE_LINKAT
1054 HAVE_LINK
1055 HAVE_LCHOWN
1056 HAVE_GETUSERSHELL
1057 HAVE_GETPAGESIZE
1058 HAVE_GETLOGIN
1059 HAVE_GETHOSTNAME
1060 HAVE_GETGROUPS
1061 HAVE_GETDTABLESIZE
1062 HAVE_GETDOMAINNAME
1063 HAVE_FTRUNCATE
1064 HAVE_FSYNC
1065 HAVE_FCHOWNAT
1066 HAVE_FACCESSAT
1067 HAVE_EUIDACCESS
1068 HAVE_DUP3
1069 HAVE_DUP2
1070 HAVE_CHOWN
1071 GNULIB_WRITE
1072 GNULIB_USLEEP
1073 GNULIB_UNLINKAT
1074 GNULIB_UNLINK
1075 GNULIB_UNISTD_H_SIGPIPE
1076 GNULIB_UNISTD_H_GETOPT
1077 GNULIB_SYMLINKAT
1078 GNULIB_SYMLINK
1079 GNULIB_SLEEP
1080 GNULIB_RMDIR
1081 GNULIB_READLINKAT
1082 GNULIB_READLINK
1083 GNULIB_PREAD
1084 GNULIB_PIPE2
1085 GNULIB_LSEEK
1086 GNULIB_LINKAT
1087 GNULIB_LINK
1088 GNULIB_LCHOWN
1089 GNULIB_GETUSERSHELL
1090 GNULIB_GETPAGESIZE
1091 GNULIB_GETLOGIN_R
1092 GNULIB_GETLOGIN
1093 GNULIB_GETHOSTNAME
1094 GNULIB_GETGROUPS
1095 GNULIB_GETDTABLESIZE
1096 GNULIB_GETDOMAINNAME
1097 GNULIB_GETCWD
1098 GNULIB_FTRUNCATE
1099 GNULIB_FSYNC
1100 GNULIB_FCHOWNAT
1101 GNULIB_FCHDIR
1102 GNULIB_FACCESSAT
1103 GNULIB_EUIDACCESS
1104 GNULIB_ENVIRON
1105 GNULIB_DUP3
1106 GNULIB_DUP2
1107 GNULIB_CLOSE
1108 GNULIB_CHOWN
1109 REPLACE_UNSETENV
1110 REPLACE_STRTOD
1111 REPLACE_SETENV
1112 REPLACE_REALPATH
1113 REPLACE_PUTENV
1114 REPLACE_MKSTEMP
1115 REPLACE_CANONICALIZE_FILE_NAME
1116 HAVE_UNSETENV
1117 HAVE_SYS_LOADAVG_H
1118 HAVE_STRUCT_RANDOM_DATA
1119 HAVE_STRTOULL
1120 HAVE_STRTOLL
1121 HAVE_STRTOD
1122 HAVE_SETENV
1123 HAVE_RPMATCH
1124 HAVE_REALPATH
1125 HAVE_REALLOC_POSIX
1126 HAVE_RANDOM_R
1127 HAVE_MKSTEMPS
1128 HAVE_MKOSTEMPS
1129 HAVE_MKOSTEMP
1130 HAVE_MKDTEMP
1131 HAVE_MALLOC_POSIX
1132 HAVE_GETSUBOPT
1133 HAVE_DECL_GETLOADAVG
1134 HAVE_CANONICALIZE_FILE_NAME
1135 HAVE_ATOLL
1136 GNULIB_UNSETENV
1137 GNULIB_STRTOULL
1138 GNULIB_STRTOLL
1139 GNULIB_STRTOD
1140 GNULIB_SETENV
1141 GNULIB_RPMATCH
1142 GNULIB_REALPATH
1143 GNULIB_REALLOC_POSIX
1144 GNULIB_RANDOM_R
1145 GNULIB_PUTENV
1146 GNULIB_MKSTEMPS
1147 GNULIB_MKSTEMP
1148 GNULIB_MKOSTEMPS
1149 GNULIB_MKOSTEMP
1150 GNULIB_MKDTEMP
1151 GNULIB_MALLOC_POSIX
1152 GNULIB_GETSUBOPT
1153 GNULIB_GETLOADAVG
1154 GNULIB_CANONICALIZE_FILE_NAME
1155 GNULIB_CALLOC_POSIX
1156 GNULIB_ATOLL
1157 HAVE_CALLOC_POSIX
1158 ALLOCA_H
1159 ALLOCA
1160 GL_COND_LIBTOOL_FALSE
1161 GL_COND_LIBTOOL_TRUE
1162 EGREP
1163 GREP
1164 host_os
1165 host_vendor
1166 host_cpu
1167 host
1168 build_os
1169 build_vendor
1170 build_cpu
1171 build
1172 RANLIB
1173 LN_S
1174 NM
1175 CPP
1176 am__fastdepCC_FALSE
1177 am__fastdepCC_TRUE
1178 CCDEPMODE
1179 AMDEPBACKSLASH
1180 AMDEP_FALSE
1181 AMDEP_TRUE
1182 am__quote
1183 am__include
1184 DEPDIR
1185 OBJEXT
1186 EXEEXT
1187 ac_ct_CC
1188 CPPFLAGS
1189 LDFLAGS
1190 CFLAGS
1191 CC
1192 AM_BACKSLASH
1193 AM_DEFAULT_VERBOSITY
1194 am__untar
1195 am__tar
1196 AMTAR
1197 am__leading_dot
1198 SET_MAKE
1199 AWK
1200 mkdir_p
1201 MKDIR_P
1202 INSTALL_STRIP_PROGRAM
1203 STRIP
1204 install_sh
1205 MAKEINFO
1206 AUTOHEADER
1207 AUTOMAKE
1208 AUTOCONF
1209 ACLOCAL
1210 VERSION
1211 PACKAGE
1212 CYGPATH_W
1213 am__isrc
1214 INSTALL_DATA
1215 INSTALL_SCRIPT
1216 INSTALL_PROGRAM
1217 target_alias
1218 host_alias
1219 build_alias
1220 LIBS
1221 ECHO_T
1222 ECHO_N
1223 ECHO_C
1224 DEFS
1225 mandir
1226 localedir
1227 libdir
1228 psdir
1229 pdfdir
1230 dvidir
1231 htmldir
1232 infodir
1233 docdir
1234 oldincludedir
1235 includedir
1236 localstatedir
1237 sharedstatedir
1238 sysconfdir
1239 datadir
1240 datarootdir
1241 libexecdir
1242 sbindir
1243 bindir
1244 program_transform_name
1245 prefix
1246 exec_prefix
1247 PACKAGE_URL
1248 PACKAGE_BUGREPORT
1249 PACKAGE_STRING
1250 PACKAGE_VERSION
1251 PACKAGE_TARNAME
1252 PACKAGE_NAME
1253 PATH_SEPARATOR
1254 SHELL'
1255 ac_subst_files=''
1256 ac_user_opts='
1257 enable_option_checking
1258 enable_silent_rules
1259 enable_dependency_tracking
1260 enable_largefile
1261 enable_gcc_warnings
1262 '
1263       ac_precious_vars='build_alias
1264 host_alias
1265 target_alias
1266 CC
1267 CFLAGS
1268 LDFLAGS
1269 LIBS
1270 CPPFLAGS
1271 CPP'
1272
1273
1274 # Initialize some variables set by options.
1275 ac_init_help=
1276 ac_init_version=false
1277 ac_unrecognized_opts=
1278 ac_unrecognized_sep=
1279 # The variables have the same names as the options, with
1280 # dashes changed to underlines.
1281 cache_file=/dev/null
1282 exec_prefix=NONE
1283 no_create=
1284 no_recursion=
1285 prefix=NONE
1286 program_prefix=NONE
1287 program_suffix=NONE
1288 program_transform_name=s,x,x,
1289 silent=
1290 site=
1291 srcdir=
1292 verbose=
1293 x_includes=NONE
1294 x_libraries=NONE
1295
1296 # Installation directory options.
1297 # These are left unexpanded so users can "make install exec_prefix=/foo"
1298 # and all the variables that are supposed to be based on exec_prefix
1299 # by default will actually change.
1300 # Use braces instead of parens because sh, perl, etc. also accept them.
1301 # (The list follows the same order as the GNU Coding Standards.)
1302 bindir='${exec_prefix}/bin'
1303 sbindir='${exec_prefix}/sbin'
1304 libexecdir='${exec_prefix}/libexec'
1305 datarootdir='${prefix}/share'
1306 datadir='${datarootdir}'
1307 sysconfdir='${prefix}/etc'
1308 sharedstatedir='${prefix}/com'
1309 localstatedir='${prefix}/var'
1310 includedir='${prefix}/include'
1311 oldincludedir='/usr/include'
1312 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1313 infodir='${datarootdir}/info'
1314 htmldir='${docdir}'
1315 dvidir='${docdir}'
1316 pdfdir='${docdir}'
1317 psdir='${docdir}'
1318 libdir='${exec_prefix}/lib'
1319 localedir='${datarootdir}/locale'
1320 mandir='${datarootdir}/man'
1321
1322 ac_prev=
1323 ac_dashdash=
1324 for ac_option
1325 do
1326   # If the previous option needs an argument, assign it.
1327   if test -n "$ac_prev"; then
1328     eval $ac_prev=\$ac_option
1329     ac_prev=
1330     continue
1331   fi
1332
1333   case $ac_option in
1334   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1335   *)    ac_optarg=yes ;;
1336   esac
1337
1338   # Accept the important Cygnus configure options, so we can diagnose typos.
1339
1340   case $ac_dashdash$ac_option in
1341   --)
1342     ac_dashdash=yes ;;
1343
1344   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1345     ac_prev=bindir ;;
1346   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1347     bindir=$ac_optarg ;;
1348
1349   -build | --build | --buil | --bui | --bu)
1350     ac_prev=build_alias ;;
1351   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1352     build_alias=$ac_optarg ;;
1353
1354   -cache-file | --cache-file | --cache-fil | --cache-fi \
1355   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1356     ac_prev=cache_file ;;
1357   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1358   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1359     cache_file=$ac_optarg ;;
1360
1361   --config-cache | -C)
1362     cache_file=config.cache ;;
1363
1364   -datadir | --datadir | --datadi | --datad)
1365     ac_prev=datadir ;;
1366   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1367     datadir=$ac_optarg ;;
1368
1369   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1370   | --dataroo | --dataro | --datar)
1371     ac_prev=datarootdir ;;
1372   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1373   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1374     datarootdir=$ac_optarg ;;
1375
1376   -disable-* | --disable-*)
1377     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1378     # Reject names that are not valid shell variable names.
1379     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1380       as_fn_error "invalid feature name: $ac_useropt"
1381     ac_useropt_orig=$ac_useropt
1382     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1383     case $ac_user_opts in
1384       *"
1385 "enable_$ac_useropt"
1386 "*) ;;
1387       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1388          ac_unrecognized_sep=', ';;
1389     esac
1390     eval enable_$ac_useropt=no ;;
1391
1392   -docdir | --docdir | --docdi | --doc | --do)
1393     ac_prev=docdir ;;
1394   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1395     docdir=$ac_optarg ;;
1396
1397   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1398     ac_prev=dvidir ;;
1399   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1400     dvidir=$ac_optarg ;;
1401
1402   -enable-* | --enable-*)
1403     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1404     # Reject names that are not valid shell variable names.
1405     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1406       as_fn_error "invalid feature name: $ac_useropt"
1407     ac_useropt_orig=$ac_useropt
1408     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1409     case $ac_user_opts in
1410       *"
1411 "enable_$ac_useropt"
1412 "*) ;;
1413       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1414          ac_unrecognized_sep=', ';;
1415     esac
1416     eval enable_$ac_useropt=\$ac_optarg ;;
1417
1418   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1419   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1420   | --exec | --exe | --ex)
1421     ac_prev=exec_prefix ;;
1422   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1423   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1424   | --exec=* | --exe=* | --ex=*)
1425     exec_prefix=$ac_optarg ;;
1426
1427   -gas | --gas | --ga | --g)
1428     # Obsolete; use --with-gas.
1429     with_gas=yes ;;
1430
1431   -help | --help | --hel | --he | -h)
1432     ac_init_help=long ;;
1433   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1434     ac_init_help=recursive ;;
1435   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1436     ac_init_help=short ;;
1437
1438   -host | --host | --hos | --ho)
1439     ac_prev=host_alias ;;
1440   -host=* | --host=* | --hos=* | --ho=*)
1441     host_alias=$ac_optarg ;;
1442
1443   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1444     ac_prev=htmldir ;;
1445   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1446   | --ht=*)
1447     htmldir=$ac_optarg ;;
1448
1449   -includedir | --includedir | --includedi | --included | --include \
1450   | --includ | --inclu | --incl | --inc)
1451     ac_prev=includedir ;;
1452   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1453   | --includ=* | --inclu=* | --incl=* | --inc=*)
1454     includedir=$ac_optarg ;;
1455
1456   -infodir | --infodir | --infodi | --infod | --info | --inf)
1457     ac_prev=infodir ;;
1458   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1459     infodir=$ac_optarg ;;
1460
1461   -libdir | --libdir | --libdi | --libd)
1462     ac_prev=libdir ;;
1463   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1464     libdir=$ac_optarg ;;
1465
1466   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1467   | --libexe | --libex | --libe)
1468     ac_prev=libexecdir ;;
1469   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1470   | --libexe=* | --libex=* | --libe=*)
1471     libexecdir=$ac_optarg ;;
1472
1473   -localedir | --localedir | --localedi | --localed | --locale)
1474     ac_prev=localedir ;;
1475   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1476     localedir=$ac_optarg ;;
1477
1478   -localstatedir | --localstatedir | --localstatedi | --localstated \
1479   | --localstate | --localstat | --localsta | --localst | --locals)
1480     ac_prev=localstatedir ;;
1481   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1482   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1483     localstatedir=$ac_optarg ;;
1484
1485   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1486     ac_prev=mandir ;;
1487   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1488     mandir=$ac_optarg ;;
1489
1490   -nfp | --nfp | --nf)
1491     # Obsolete; use --without-fp.
1492     with_fp=no ;;
1493
1494   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1495   | --no-cr | --no-c | -n)
1496     no_create=yes ;;
1497
1498   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1499   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1500     no_recursion=yes ;;
1501
1502   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1503   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1504   | --oldin | --oldi | --old | --ol | --o)
1505     ac_prev=oldincludedir ;;
1506   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1507   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1508   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1509     oldincludedir=$ac_optarg ;;
1510
1511   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1512     ac_prev=prefix ;;
1513   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1514     prefix=$ac_optarg ;;
1515
1516   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1517   | --program-pre | --program-pr | --program-p)
1518     ac_prev=program_prefix ;;
1519   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1520   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1521     program_prefix=$ac_optarg ;;
1522
1523   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1524   | --program-suf | --program-su | --program-s)
1525     ac_prev=program_suffix ;;
1526   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1527   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1528     program_suffix=$ac_optarg ;;
1529
1530   -program-transform-name | --program-transform-name \
1531   | --program-transform-nam | --program-transform-na \
1532   | --program-transform-n | --program-transform- \
1533   | --program-transform | --program-transfor \
1534   | --program-transfo | --program-transf \
1535   | --program-trans | --program-tran \
1536   | --progr-tra | --program-tr | --program-t)
1537     ac_prev=program_transform_name ;;
1538   -program-transform-name=* | --program-transform-name=* \
1539   | --program-transform-nam=* | --program-transform-na=* \
1540   | --program-transform-n=* | --program-transform-=* \
1541   | --program-transform=* | --program-transfor=* \
1542   | --program-transfo=* | --program-transf=* \
1543   | --program-trans=* | --program-tran=* \
1544   | --progr-tra=* | --program-tr=* | --program-t=*)
1545     program_transform_name=$ac_optarg ;;
1546
1547   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1548     ac_prev=pdfdir ;;
1549   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1550     pdfdir=$ac_optarg ;;
1551
1552   -psdir | --psdir | --psdi | --psd | --ps)
1553     ac_prev=psdir ;;
1554   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1555     psdir=$ac_optarg ;;
1556
1557   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1558   | -silent | --silent | --silen | --sile | --sil)
1559     silent=yes ;;
1560
1561   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1562     ac_prev=sbindir ;;
1563   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1564   | --sbi=* | --sb=*)
1565     sbindir=$ac_optarg ;;
1566
1567   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1568   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1569   | --sharedst | --shareds | --shared | --share | --shar \
1570   | --sha | --sh)
1571     ac_prev=sharedstatedir ;;
1572   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1573   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1574   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1575   | --sha=* | --sh=*)
1576     sharedstatedir=$ac_optarg ;;
1577
1578   -site | --site | --sit)
1579     ac_prev=site ;;
1580   -site=* | --site=* | --sit=*)
1581     site=$ac_optarg ;;
1582
1583   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1584     ac_prev=srcdir ;;
1585   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1586     srcdir=$ac_optarg ;;
1587
1588   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1589   | --syscon | --sysco | --sysc | --sys | --sy)
1590     ac_prev=sysconfdir ;;
1591   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1592   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1593     sysconfdir=$ac_optarg ;;
1594
1595   -target | --target | --targe | --targ | --tar | --ta | --t)
1596     ac_prev=target_alias ;;
1597   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1598     target_alias=$ac_optarg ;;
1599
1600   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1601     verbose=yes ;;
1602
1603   -version | --version | --versio | --versi | --vers | -V)
1604     ac_init_version=: ;;
1605
1606   -with-* | --with-*)
1607     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1608     # Reject names that are not valid shell variable names.
1609     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1610       as_fn_error "invalid package name: $ac_useropt"
1611     ac_useropt_orig=$ac_useropt
1612     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1613     case $ac_user_opts in
1614       *"
1615 "with_$ac_useropt"
1616 "*) ;;
1617       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1618          ac_unrecognized_sep=', ';;
1619     esac
1620     eval with_$ac_useropt=\$ac_optarg ;;
1621
1622   -without-* | --without-*)
1623     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1624     # Reject names that are not valid shell variable names.
1625     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1626       as_fn_error "invalid package name: $ac_useropt"
1627     ac_useropt_orig=$ac_useropt
1628     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1629     case $ac_user_opts in
1630       *"
1631 "with_$ac_useropt"
1632 "*) ;;
1633       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1634          ac_unrecognized_sep=', ';;
1635     esac
1636     eval with_$ac_useropt=no ;;
1637
1638   --x)
1639     # Obsolete; use --with-x.
1640     with_x=yes ;;
1641
1642   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1643   | --x-incl | --x-inc | --x-in | --x-i)
1644     ac_prev=x_includes ;;
1645   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1646   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1647     x_includes=$ac_optarg ;;
1648
1649   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1650   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1651     ac_prev=x_libraries ;;
1652   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1653   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1654     x_libraries=$ac_optarg ;;
1655
1656   -*) as_fn_error "unrecognized option: \`$ac_option'
1657 Try \`$0 --help' for more information."
1658     ;;
1659
1660   *=*)
1661     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1662     # Reject names that are not valid shell variable names.
1663     case $ac_envvar in #(
1664       '' | [0-9]* | *[!_$as_cr_alnum]* )
1665       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1666     esac
1667     eval $ac_envvar=\$ac_optarg
1668     export $ac_envvar ;;
1669
1670   *)
1671     # FIXME: should be removed in autoconf 3.0.
1672     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1673     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1674       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1675     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1676     ;;
1677
1678   esac
1679 done
1680
1681 if test -n "$ac_prev"; then
1682   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1683   as_fn_error "missing argument to $ac_option"
1684 fi
1685
1686 if test -n "$ac_unrecognized_opts"; then
1687   case $enable_option_checking in
1688     no) ;;
1689     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1690     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1691   esac
1692 fi
1693
1694 # Check all directory arguments for consistency.
1695 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1696                 datadir sysconfdir sharedstatedir localstatedir includedir \
1697                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1698                 libdir localedir mandir
1699 do
1700   eval ac_val=\$$ac_var
1701   # Remove trailing slashes.
1702   case $ac_val in
1703     */ )
1704       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1705       eval $ac_var=\$ac_val;;
1706   esac
1707   # Be sure to have absolute directory names.
1708   case $ac_val in
1709     [\\/$]* | ?:[\\/]* )  continue;;
1710     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1711   esac
1712   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1713 done
1714
1715 # There might be people who depend on the old broken behavior: `$host'
1716 # used to hold the argument of --host etc.
1717 # FIXME: To remove some day.
1718 build=$build_alias
1719 host=$host_alias
1720 target=$target_alias
1721
1722 # FIXME: To remove some day.
1723 if test "x$host_alias" != x; then
1724   if test "x$build_alias" = x; then
1725     cross_compiling=maybe
1726     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1727     If a cross compiler is detected then cross compile mode will be used." >&2
1728   elif test "x$build_alias" != "x$host_alias"; then
1729     cross_compiling=yes
1730   fi
1731 fi
1732
1733 ac_tool_prefix=
1734 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1735
1736 test "$silent" = yes && exec 6>/dev/null
1737
1738
1739 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1740 ac_ls_di=`ls -di .` &&
1741 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1742   as_fn_error "working directory cannot be determined"
1743 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1744   as_fn_error "pwd does not report name of working directory"
1745
1746
1747 # Find the source files, if location was not specified.
1748 if test -z "$srcdir"; then
1749   ac_srcdir_defaulted=yes
1750   # Try the directory containing this script, then the parent directory.
1751   ac_confdir=`$as_dirname -- "$as_myself" ||
1752 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1753          X"$as_myself" : 'X\(//\)[^/]' \| \
1754          X"$as_myself" : 'X\(//\)$' \| \
1755          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1756 $as_echo X"$as_myself" |
1757     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1758             s//\1/
1759             q
1760           }
1761           /^X\(\/\/\)[^/].*/{
1762             s//\1/
1763             q
1764           }
1765           /^X\(\/\/\)$/{
1766             s//\1/
1767             q
1768           }
1769           /^X\(\/\).*/{
1770             s//\1/
1771             q
1772           }
1773           s/.*/./; q'`
1774   srcdir=$ac_confdir
1775   if test ! -r "$srcdir/$ac_unique_file"; then
1776     srcdir=..
1777   fi
1778 else
1779   ac_srcdir_defaulted=no
1780 fi
1781 if test ! -r "$srcdir/$ac_unique_file"; then
1782   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1783   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1784 fi
1785 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1786 ac_abs_confdir=`(
1787         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1788         pwd)`
1789 # When building in place, set srcdir=.
1790 if test "$ac_abs_confdir" = "$ac_pwd"; then
1791   srcdir=.
1792 fi
1793 # Remove unnecessary trailing slashes from srcdir.
1794 # Double slashes in file names in object file debugging info
1795 # mess up M-x gdb in Emacs.
1796 case $srcdir in
1797 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1798 esac
1799 for ac_var in $ac_precious_vars; do
1800   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1801   eval ac_env_${ac_var}_value=\$${ac_var}
1802   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1803   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1804 done
1805
1806 #
1807 # Report the --help message.
1808 #
1809 if test "$ac_init_help" = "long"; then
1810   # Omit some internal or obsolete options to make the list less imposing.
1811   # This message is too long to be a string in the A/UX 3.1 sh.
1812   cat <<_ACEOF
1813 \`configure' configures gzip 1.4 to adapt to many kinds of systems.
1814
1815 Usage: $0 [OPTION]... [VAR=VALUE]...
1816
1817 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1818 VAR=VALUE.  See below for descriptions of some of the useful variables.
1819
1820 Defaults for the options are specified in brackets.
1821
1822 Configuration:
1823   -h, --help              display this help and exit
1824       --help=short        display options specific to this package
1825       --help=recursive    display the short help of all the included packages
1826   -V, --version           display version information and exit
1827   -q, --quiet, --silent   do not print \`checking...' messages
1828       --cache-file=FILE   cache test results in FILE [disabled]
1829   -C, --config-cache      alias for \`--cache-file=config.cache'
1830   -n, --no-create         do not create output files
1831       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1832
1833 Installation directories:
1834   --prefix=PREFIX         install architecture-independent files in PREFIX
1835                           [$ac_default_prefix]
1836   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1837                           [PREFIX]
1838
1839 By default, \`make install' will install all the files in
1840 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1841 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1842 for instance \`--prefix=\$HOME'.
1843
1844 For better control, use the options below.
1845
1846 Fine tuning of the installation directories:
1847   --bindir=DIR            user executables [EPREFIX/bin]
1848   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1849   --libexecdir=DIR        program executables [EPREFIX/libexec]
1850   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1851   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1852   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1853   --libdir=DIR            object code libraries [EPREFIX/lib]
1854   --includedir=DIR        C header files [PREFIX/include]
1855   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1856   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1857   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1858   --infodir=DIR           info documentation [DATAROOTDIR/info]
1859   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1860   --mandir=DIR            man documentation [DATAROOTDIR/man]
1861   --docdir=DIR            documentation root [DATAROOTDIR/doc/gzip]
1862   --htmldir=DIR           html documentation [DOCDIR]
1863   --dvidir=DIR            dvi documentation [DOCDIR]
1864   --pdfdir=DIR            pdf documentation [DOCDIR]
1865   --psdir=DIR             ps documentation [DOCDIR]
1866 _ACEOF
1867
1868   cat <<\_ACEOF
1869
1870 Program names:
1871   --program-prefix=PREFIX            prepend PREFIX to installed program names
1872   --program-suffix=SUFFIX            append SUFFIX to installed program names
1873   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1874
1875 System types:
1876   --build=BUILD     configure for building on BUILD [guessed]
1877   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1878 _ACEOF
1879 fi
1880
1881 if test -n "$ac_init_help"; then
1882   case $ac_init_help in
1883      short | recursive ) echo "Configuration of gzip 1.4:";;
1884    esac
1885   cat <<\_ACEOF
1886
1887 Optional Features:
1888   --disable-option-checking  ignore unrecognized --enable/--with options
1889   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1890   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1891   --enable-silent-rules          less verbose build output (undo: `make V=1')
1892   --disable-silent-rules         verbose build output (undo: `make V=0')
1893   --disable-dependency-tracking  speeds up one-time build
1894   --enable-dependency-tracking   do not reject slow dependency extractors
1895   --disable-largefile     omit support for large files
1896   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
1897
1898 Some influential environment variables:
1899   CC          C compiler command
1900   CFLAGS      C compiler flags
1901   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1902               nonstandard directory <lib dir>
1903   LIBS        libraries to pass to the linker, e.g. -l<library>
1904   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1905               you have headers in a nonstandard directory <include dir>
1906   CPP         C preprocessor
1907
1908 Use these variables to override the choices made by `configure' or to help
1909 it to find libraries and programs with nonstandard names/locations.
1910
1911 Report bugs to <bug-gzip@gnu.org>.
1912 _ACEOF
1913 ac_status=$?
1914 fi
1915
1916 if test "$ac_init_help" = "recursive"; then
1917   # If there are subdirs, report their specific --help.
1918   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1919     test -d "$ac_dir" ||
1920       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1921       continue
1922     ac_builddir=.
1923
1924 case "$ac_dir" in
1925 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1926 *)
1927   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1928   # A ".." for each directory in $ac_dir_suffix.
1929   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1930   case $ac_top_builddir_sub in
1931   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1932   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1933   esac ;;
1934 esac
1935 ac_abs_top_builddir=$ac_pwd
1936 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1937 # for backward compatibility:
1938 ac_top_builddir=$ac_top_build_prefix
1939
1940 case $srcdir in
1941   .)  # We are building in place.
1942     ac_srcdir=.
1943     ac_top_srcdir=$ac_top_builddir_sub
1944     ac_abs_top_srcdir=$ac_pwd ;;
1945   [\\/]* | ?:[\\/]* )  # Absolute name.
1946     ac_srcdir=$srcdir$ac_dir_suffix;
1947     ac_top_srcdir=$srcdir
1948     ac_abs_top_srcdir=$srcdir ;;
1949   *) # Relative name.
1950     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1951     ac_top_srcdir=$ac_top_build_prefix$srcdir
1952     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1953 esac
1954 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1955
1956     cd "$ac_dir" || { ac_status=$?; continue; }
1957     # Check for guested configure.
1958     if test -f "$ac_srcdir/configure.gnu"; then
1959       echo &&
1960       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1961     elif test -f "$ac_srcdir/configure"; then
1962       echo &&
1963       $SHELL "$ac_srcdir/configure" --help=recursive
1964     else
1965       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1966     fi || ac_status=$?
1967     cd "$ac_pwd" || { ac_status=$?; break; }
1968   done
1969 fi
1970
1971 test -n "$ac_init_help" && exit $ac_status
1972 if $ac_init_version; then
1973   cat <<\_ACEOF
1974 gzip configure 1.4
1975 generated by GNU Autoconf 2.65.23-13e35
1976
1977 Copyright (C) 2010 Free Software Foundation, Inc.
1978 This configure script is free software; the Free Software Foundation
1979 gives unlimited permission to copy, distribute and modify it.
1980 _ACEOF
1981   exit
1982 fi
1983
1984 ## ------------------------ ##
1985 ## Autoconf initialization. ##
1986 ## ------------------------ ##
1987
1988 # ac_fn_c_try_compile LINENO
1989 # --------------------------
1990 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1991 ac_fn_c_try_compile ()
1992 {
1993   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994   rm -f conftest.$ac_objext
1995   if { { ac_try="$ac_compile"
1996 case "(($ac_try" in
1997   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998   *) ac_try_echo=$ac_try;;
1999 esac
2000 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001 $as_echo "$ac_try_echo"; } >&5
2002   (eval "$ac_compile") 2>conftest.err
2003   ac_status=$?
2004   if test -s conftest.err; then
2005     grep -v '^ *+' conftest.err >conftest.er1
2006     cat conftest.er1 >&5
2007     mv -f conftest.er1 conftest.err
2008   fi
2009   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010   test $ac_status = 0; } && {
2011          test -z "$ac_c_werror_flag" ||
2012          test ! -s conftest.err
2013        } && test -s conftest.$ac_objext; then :
2014   ac_retval=0
2015 else
2016   $as_echo "$as_me: failed program was:" >&5
2017 sed 's/^/| /' conftest.$ac_ext >&5
2018
2019         ac_retval=1
2020 fi
2021   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022   as_fn_set_status $ac_retval
2023
2024 } # ac_fn_c_try_compile
2025
2026 # ac_fn_c_try_cpp LINENO
2027 # ----------------------
2028 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029 ac_fn_c_try_cpp ()
2030 {
2031   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032   if { { ac_try="$ac_cpp conftest.$ac_ext"
2033 case "(($ac_try" in
2034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035   *) ac_try_echo=$ac_try;;
2036 esac
2037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038 $as_echo "$ac_try_echo"; } >&5
2039   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040   ac_status=$?
2041   if test -s conftest.err; then
2042     grep -v '^ *+' conftest.err >conftest.er1
2043     cat conftest.er1 >&5
2044     mv -f conftest.er1 conftest.err
2045   fi
2046   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047   test $ac_status = 0; } >/dev/null && {
2048          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2049          test ! -s conftest.err
2050        }; then :
2051   ac_retval=0
2052 else
2053   $as_echo "$as_me: failed program was:" >&5
2054 sed 's/^/| /' conftest.$ac_ext >&5
2055
2056     ac_retval=1
2057 fi
2058   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059   as_fn_set_status $ac_retval
2060
2061 } # ac_fn_c_try_cpp
2062
2063 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2064 # -------------------------------------------------------
2065 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2066 # the include files in INCLUDES and setting the cache variable VAR
2067 # accordingly.
2068 ac_fn_c_check_header_mongrel ()
2069 {
2070   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073 $as_echo_n "checking for $2... " >&6; }
2074 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2075   $as_echo_n "(cached) " >&6
2076 fi
2077 eval ac_res=\$$3
2078                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2079 $as_echo "$ac_res" >&6; }
2080 else
2081   # Is the header compilable?
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2083 $as_echo_n "checking $2 usability... " >&6; }
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085 /* end confdefs.h.  */
2086 $4
2087 #include <$2>
2088 _ACEOF
2089 if ac_fn_c_try_compile "$LINENO"; then :
2090   ac_header_compiler=yes
2091 else
2092   ac_header_compiler=no
2093 fi
2094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2096 $as_echo "$ac_header_compiler" >&6; }
2097
2098 # Is the header present?
2099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2100 $as_echo_n "checking $2 presence... " >&6; }
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h.  */
2103 #include <$2>
2104 _ACEOF
2105 if ac_fn_c_try_cpp "$LINENO"; then :
2106   ac_header_preproc=yes
2107 else
2108   ac_header_preproc=no
2109 fi
2110 rm -f conftest.err conftest.$ac_ext
2111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2112 $as_echo "$ac_header_preproc" >&6; }
2113
2114 # So?  What about this header?
2115 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2116   yes:no: )
2117     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2118 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2119     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2120 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2121     ;;
2122   no:yes:* )
2123     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2124 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2125     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2126 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2127     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2128 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2129     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2130 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2131     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2132 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2133 ( cat <<\_ASBOX
2134 ## ------------------------------- ##
2135 ## Report this to bug-gzip@gnu.org ##
2136 ## ------------------------------- ##
2137 _ASBOX
2138      ) | sed "s/^/$as_me: WARNING:     /" >&2
2139     ;;
2140 esac
2141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2142 $as_echo_n "checking for $2... " >&6; }
2143 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2144   $as_echo_n "(cached) " >&6
2145 else
2146   eval "$3=\$ac_header_compiler"
2147 fi
2148 eval ac_res=\$$3
2149                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2150 $as_echo "$ac_res" >&6; }
2151 fi
2152   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2153
2154 } # ac_fn_c_check_header_mongrel
2155
2156 # ac_fn_c_try_run LINENO
2157 # ----------------------
2158 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2159 # that executables *can* be run.
2160 ac_fn_c_try_run ()
2161 {
2162   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2163   if { { ac_try="$ac_link"
2164 case "(($ac_try" in
2165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2166   *) ac_try_echo=$ac_try;;
2167 esac
2168 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2169 $as_echo "$ac_try_echo"; } >&5
2170   (eval "$ac_link") 2>&5
2171   ac_status=$?
2172   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2173   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2174   { { case "(($ac_try" in
2175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2176   *) ac_try_echo=$ac_try;;
2177 esac
2178 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2179 $as_echo "$ac_try_echo"; } >&5
2180   (eval "$ac_try") 2>&5
2181   ac_status=$?
2182   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2183   test $ac_status = 0; }; }; then :
2184   ac_retval=0
2185 else
2186   $as_echo "$as_me: program exited with status $ac_status" >&5
2187        $as_echo "$as_me: failed program was:" >&5
2188 sed 's/^/| /' conftest.$ac_ext >&5
2189
2190        ac_retval=$ac_status
2191 fi
2192   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2193   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2194   as_fn_set_status $ac_retval
2195
2196 } # ac_fn_c_try_run
2197
2198 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2199 # -------------------------------------------------------
2200 # Tests whether HEADER exists and can be compiled using the include files in
2201 # INCLUDES, setting the cache variable VAR accordingly.
2202 ac_fn_c_check_header_compile ()
2203 {
2204   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206 $as_echo_n "checking for $2... " >&6; }
2207 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2208   $as_echo_n "(cached) " >&6
2209 else
2210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211 /* end confdefs.h.  */
2212 $4
2213 #include <$2>
2214 _ACEOF
2215 if ac_fn_c_try_compile "$LINENO"; then :
2216   eval "$3=yes"
2217 else
2218   eval "$3=no"
2219 fi
2220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221 fi
2222 eval ac_res=\$$3
2223                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2224 $as_echo "$ac_res" >&6; }
2225   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2226
2227 } # ac_fn_c_check_header_compile
2228
2229 # ac_fn_c_try_link LINENO
2230 # -----------------------
2231 # Try to link conftest.$ac_ext, and return whether this succeeded.
2232 ac_fn_c_try_link ()
2233 {
2234   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235   rm -f conftest.$ac_objext conftest$ac_exeext
2236   if { { ac_try="$ac_link"
2237 case "(($ac_try" in
2238   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239   *) ac_try_echo=$ac_try;;
2240 esac
2241 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242 $as_echo "$ac_try_echo"; } >&5
2243   (eval "$ac_link") 2>conftest.err
2244   ac_status=$?
2245   if test -s conftest.err; then
2246     grep -v '^ *+' conftest.err >conftest.er1
2247     cat conftest.er1 >&5
2248     mv -f conftest.er1 conftest.err
2249   fi
2250   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2251   test $ac_status = 0; } && {
2252          test -z "$ac_c_werror_flag" ||
2253          test ! -s conftest.err
2254        } && test -s conftest$ac_exeext && {
2255          test "$cross_compiling" = yes ||
2256          $as_test_x conftest$ac_exeext
2257        }; then :
2258   ac_retval=0
2259 else
2260   $as_echo "$as_me: failed program was:" >&5
2261 sed 's/^/| /' conftest.$ac_ext >&5
2262
2263         ac_retval=1
2264 fi
2265   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2266   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2267   # interfere with the next link command; also delete a directory that is
2268   # left behind by Apple's compiler.  We do this before executing the actions.
2269   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2270   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2271   as_fn_set_status $ac_retval
2272
2273 } # ac_fn_c_try_link
2274
2275 # ac_fn_c_check_func LINENO FUNC VAR
2276 # ----------------------------------
2277 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2278 ac_fn_c_check_func ()
2279 {
2280   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2282 $as_echo_n "checking for $2... " >&6; }
2283 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2284   $as_echo_n "(cached) " >&6
2285 else
2286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287 /* end confdefs.h.  */
2288 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2289    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2290 #define $2 innocuous_$2
2291
2292 /* System header to define __stub macros and hopefully few prototypes,
2293     which can conflict with char $2 (); below.
2294     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2295     <limits.h> exists even on freestanding compilers.  */
2296
2297 #ifdef __STDC__
2298 # include <limits.h>
2299 #else
2300 # include <assert.h>
2301 #endif
2302
2303 #undef $2
2304
2305 /* Override any GCC internal prototype to avoid an error.
2306    Use char because int might match the return type of a GCC
2307    builtin and then its argument prototype would still apply.  */
2308 #ifdef __cplusplus
2309 extern "C"
2310 #endif
2311 char $2 ();
2312 /* The GNU C library defines this for functions which it implements
2313     to always fail with ENOSYS.  Some functions are actually named
2314     something starting with __ and the normal name is an alias.  */
2315 #if defined __stub_$2 || defined __stub___$2
2316 choke me
2317 #endif
2318
2319 int
2320 main ()
2321 {
2322 return $2 ();
2323   ;
2324   return 0;
2325 }
2326 _ACEOF
2327 if ac_fn_c_try_link "$LINENO"; then :
2328   eval "$3=yes"
2329 else
2330   eval "$3=no"
2331 fi
2332 rm -f core conftest.err conftest.$ac_objext \
2333     conftest$ac_exeext conftest.$ac_ext
2334 fi
2335 eval ac_res=\$$3
2336                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337 $as_echo "$ac_res" >&6; }
2338   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2339
2340 } # ac_fn_c_check_func
2341
2342 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2343 # -------------------------------------------
2344 # Tests whether TYPE exists after having included INCLUDES, setting cache
2345 # variable VAR accordingly.
2346 ac_fn_c_check_type ()
2347 {
2348   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2350 $as_echo_n "checking for $2... " >&6; }
2351 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2352   $as_echo_n "(cached) " >&6
2353 else
2354   eval "$3=no"
2355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356 /* end confdefs.h.  */
2357 $4
2358 int
2359 main ()
2360 {
2361 if (sizeof ($2))
2362          return 0;
2363   ;
2364   return 0;
2365 }
2366 _ACEOF
2367 if ac_fn_c_try_compile "$LINENO"; then :
2368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369 /* end confdefs.h.  */
2370 $4
2371 int
2372 main ()
2373 {
2374 if (sizeof (($2)))
2375             return 0;
2376   ;
2377   return 0;
2378 }
2379 _ACEOF
2380 if ac_fn_c_try_compile "$LINENO"; then :
2381
2382 else
2383   eval "$3=yes"
2384 fi
2385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386 fi
2387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388 fi
2389 eval ac_res=\$$3
2390                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2391 $as_echo "$ac_res" >&6; }
2392   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2393
2394 } # ac_fn_c_check_type
2395
2396 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2397 # ---------------------------------------------
2398 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2399 # accordingly.
2400 ac_fn_c_check_decl ()
2401 {
2402   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2404 $as_echo_n "checking whether $2 is declared... " >&6; }
2405 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2406   $as_echo_n "(cached) " >&6
2407 else
2408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409 /* end confdefs.h.  */
2410 $4
2411 int
2412 main ()
2413 {
2414 #ifndef $2
2415   (void) $2;
2416 #endif
2417
2418   ;
2419   return 0;
2420 }
2421 _ACEOF
2422 if ac_fn_c_try_compile "$LINENO"; then :
2423   eval "$3=yes"
2424 else
2425   eval "$3=no"
2426 fi
2427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428 fi
2429 eval ac_res=\$$3
2430                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431 $as_echo "$ac_res" >&6; }
2432   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2433
2434 } # ac_fn_c_check_decl
2435
2436 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2437 # --------------------------------------------
2438 # Tries to find the compile-time value of EXPR in a program that includes
2439 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2440 # computed
2441 ac_fn_c_compute_int ()
2442 {
2443   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2444   if test "$cross_compiling" = yes; then
2445     # Depending upon the size, compute the lo and hi bounds.
2446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447 /* end confdefs.h.  */
2448 $4
2449 int
2450 main ()
2451 {
2452 static int test_array [1 - 2 * !(($2) >= 0)];
2453 test_array [0] = 0
2454
2455   ;
2456   return 0;
2457 }
2458 _ACEOF
2459 if ac_fn_c_try_compile "$LINENO"; then :
2460   ac_lo=0 ac_mid=0
2461   while :; do
2462     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463 /* end confdefs.h.  */
2464 $4
2465 int
2466 main ()
2467 {
2468 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2469 test_array [0] = 0
2470
2471   ;
2472   return 0;
2473 }
2474 _ACEOF
2475 if ac_fn_c_try_compile "$LINENO"; then :
2476   ac_hi=$ac_mid; break
2477 else
2478   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2479                         if test $ac_lo -le $ac_mid; then
2480                           ac_lo= ac_hi=
2481                           break
2482                         fi
2483                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2484 fi
2485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2486   done
2487 else
2488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2489 /* end confdefs.h.  */
2490 $4
2491 int
2492 main ()
2493 {
2494 static int test_array [1 - 2 * !(($2) < 0)];
2495 test_array [0] = 0
2496
2497   ;
2498   return 0;
2499 }
2500 _ACEOF
2501 if ac_fn_c_try_compile "$LINENO"; then :
2502   ac_hi=-1 ac_mid=-1
2503   while :; do
2504     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2505 /* end confdefs.h.  */
2506 $4
2507 int
2508 main ()
2509 {
2510 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2511 test_array [0] = 0
2512
2513   ;
2514   return 0;
2515 }
2516 _ACEOF
2517 if ac_fn_c_try_compile "$LINENO"; then :
2518   ac_lo=$ac_mid; break
2519 else
2520   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2521                         if test $ac_mid -le $ac_hi; then
2522                           ac_lo= ac_hi=
2523                           break
2524                         fi
2525                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2526 fi
2527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2528   done
2529 else
2530   ac_lo= ac_hi=
2531 fi
2532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2533 fi
2534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2535 # Binary search between lo and hi bounds.
2536 while test "x$ac_lo" != "x$ac_hi"; do
2537   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2539 /* end confdefs.h.  */
2540 $4
2541 int
2542 main ()
2543 {
2544 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2545 test_array [0] = 0
2546
2547   ;
2548   return 0;
2549 }
2550 _ACEOF
2551 if ac_fn_c_try_compile "$LINENO"; then :
2552   ac_hi=$ac_mid
2553 else
2554   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2555 fi
2556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2557 done
2558 case $ac_lo in #((
2559 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2560 '') ac_retval=1 ;;
2561 esac
2562   else
2563     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564 /* end confdefs.h.  */
2565 $4
2566 static long int longval () { return $2; }
2567 static unsigned long int ulongval () { return $2; }
2568 #include <stdio.h>
2569 #include <stdlib.h>
2570 int
2571 main ()
2572 {
2573
2574   FILE *f = fopen ("conftest.val", "w");
2575   if (! f)
2576     return 1;
2577   if (($2) < 0)
2578     {
2579       long int i = longval ();
2580       if (i != ($2))
2581         return 1;
2582       fprintf (f, "%ld", i);
2583     }
2584   else
2585     {
2586       unsigned long int i = ulongval ();
2587       if (i != ($2))
2588         return 1;
2589       fprintf (f, "%lu", i);
2590     }
2591   /* Do not output a trailing newline, as this causes \r\n confusion
2592      on some platforms.  */
2593   return ferror (f) || fclose (f) != 0;
2594
2595   ;
2596   return 0;
2597 }
2598 _ACEOF
2599 if ac_fn_c_try_run "$LINENO"; then :
2600   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2601 else
2602   ac_retval=1
2603 fi
2604 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2605   conftest.$ac_objext conftest.beam conftest.$ac_ext
2606 rm -f conftest.val
2607
2608   fi
2609   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2610   as_fn_set_status $ac_retval
2611
2612 } # ac_fn_c_compute_int
2613
2614 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2615 # ----------------------------------------------------
2616 # Tries to find if the field MEMBER exists in type AGGR, after including
2617 # INCLUDES, setting cache variable VAR accordingly.
2618 ac_fn_c_check_member ()
2619 {
2620   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2622 $as_echo_n "checking for $2.$3... " >&6; }
2623 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2624   $as_echo_n "(cached) " >&6
2625 else
2626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627 /* end confdefs.h.  */
2628 $5
2629 int
2630 main ()
2631 {
2632 static $2 ac_aggr;
2633 if (ac_aggr.$3)
2634 return 0;
2635   ;
2636   return 0;
2637 }
2638 _ACEOF
2639 if ac_fn_c_try_compile "$LINENO"; then :
2640   eval "$4=yes"
2641 else
2642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643 /* end confdefs.h.  */
2644 $5
2645 int
2646 main ()
2647 {
2648 static $2 ac_aggr;
2649 if (sizeof ac_aggr.$3)
2650 return 0;
2651   ;
2652   return 0;
2653 }
2654 _ACEOF
2655 if ac_fn_c_try_compile "$LINENO"; then :
2656   eval "$4=yes"
2657 else
2658   eval "$4=no"
2659 fi
2660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2661 fi
2662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2663 fi
2664 eval ac_res=\$$4
2665                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2666 $as_echo "$ac_res" >&6; }
2667   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2668
2669 } # ac_fn_c_check_member
2670 cat >config.log <<_ACEOF
2671 This file contains any messages produced by compilers while
2672 running configure, to aid debugging if configure makes a mistake.
2673
2674 It was created by gzip $as_me 1.4, which was
2675 generated by GNU Autoconf 2.65.23-13e35.  Invocation command line was
2676
2677   $ $0 $@
2678
2679 _ACEOF
2680 exec 5>>config.log
2681 {
2682 cat <<_ASUNAME
2683 ## --------- ##
2684 ## Platform. ##
2685 ## --------- ##
2686
2687 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2688 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2689 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2690 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2691 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2692
2693 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2694 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2695
2696 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2697 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2698 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2699 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2700 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2701 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2702 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2703
2704 _ASUNAME
2705
2706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2707 for as_dir in $PATH
2708 do
2709   IFS=$as_save_IFS
2710   test -z "$as_dir" && as_dir=.
2711     $as_echo "PATH: $as_dir"
2712   done
2713 IFS=$as_save_IFS
2714
2715 } >&5
2716
2717 cat >&5 <<_ACEOF
2718
2719
2720 ## ----------- ##
2721 ## Core tests. ##
2722 ## ----------- ##
2723
2724 _ACEOF
2725
2726
2727 # Keep a trace of the command line.
2728 # Strip out --no-create and --no-recursion so they do not pile up.
2729 # Strip out --silent because we don't want to record it for future runs.
2730 # Also quote any args containing shell meta-characters.
2731 # Make two passes to allow for proper duplicate-argument suppression.
2732 ac_configure_args=
2733 ac_configure_args0=
2734 ac_configure_args1=
2735 ac_must_keep_next=false
2736 for ac_pass in 1 2
2737 do
2738   for ac_arg
2739   do
2740     case $ac_arg in
2741     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2742     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2743     | -silent | --silent | --silen | --sile | --sil)
2744       continue ;;
2745     *\'*)
2746       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2747     esac
2748     case $ac_pass in
2749     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2750     2)
2751       as_fn_append ac_configure_args1 " '$ac_arg'"
2752       if test $ac_must_keep_next = true; then
2753         ac_must_keep_next=false # Got value, back to normal.
2754       else
2755         case $ac_arg in
2756           *=* | --config-cache | -C | -disable-* | --disable-* \
2757           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2758           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2759           | -with-* | --with-* | -without-* | --without-* | --x)
2760             case "$ac_configure_args0 " in
2761               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2762             esac
2763             ;;
2764           -* ) ac_must_keep_next=true ;;
2765         esac
2766       fi
2767       as_fn_append ac_configure_args " '$ac_arg'"
2768       ;;
2769     esac
2770   done
2771 done
2772 { ac_configure_args0=; unset ac_configure_args0;}
2773 { ac_configure_args1=; unset ac_configure_args1;}
2774
2775 # When interrupted or exit'd, cleanup temporary files, and complete
2776 # config.log.  We remove comments because anyway the quotes in there
2777 # would cause problems or look ugly.
2778 # WARNING: Use '\'' to represent an apostrophe within the trap.
2779 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2780 trap 'exit_status=$?
2781   # Save into config.log some information that might help in debugging.
2782   {
2783     echo
2784
2785     cat <<\_ASBOX
2786 ## ---------------- ##
2787 ## Cache variables. ##
2788 ## ---------------- ##
2789 _ASBOX
2790     echo
2791     # The following way of writing the cache mishandles newlines in values,
2792 (
2793   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2794     eval ac_val=\$$ac_var
2795     case $ac_val in #(
2796     *${as_nl}*)
2797       case $ac_var in #(
2798       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2799 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2800       esac
2801       case $ac_var in #(
2802       _ | IFS | as_nl) ;; #(
2803       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2804       *) { eval $ac_var=; unset $ac_var;} ;;
2805       esac ;;
2806     esac
2807   done
2808   (set) 2>&1 |
2809     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2810     *${as_nl}ac_space=\ *)
2811       sed -n \
2812         "s/'\''/'\''\\\\'\'''\''/g;
2813           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2814       ;; #(
2815     *)
2816       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2817       ;;
2818     esac |
2819     sort
2820 )
2821     echo
2822
2823     cat <<\_ASBOX
2824 ## ----------------- ##
2825 ## Output variables. ##
2826 ## ----------------- ##
2827 _ASBOX
2828     echo
2829     for ac_var in $ac_subst_vars
2830     do
2831       eval ac_val=\$$ac_var
2832       case $ac_val in
2833       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2834       esac
2835       $as_echo "$ac_var='\''$ac_val'\''"
2836     done | sort
2837     echo
2838
2839     if test -n "$ac_subst_files"; then
2840       cat <<\_ASBOX
2841 ## ------------------- ##
2842 ## File substitutions. ##
2843 ## ------------------- ##
2844 _ASBOX
2845       echo
2846       for ac_var in $ac_subst_files
2847       do
2848         eval ac_val=\$$ac_var
2849         case $ac_val in
2850         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2851         esac
2852         $as_echo "$ac_var='\''$ac_val'\''"
2853       done | sort
2854       echo
2855     fi
2856
2857     if test -s confdefs.h; then
2858       cat <<\_ASBOX
2859 ## ----------- ##
2860 ## confdefs.h. ##
2861 ## ----------- ##
2862 _ASBOX
2863       echo
2864       cat confdefs.h
2865       echo
2866     fi
2867     test "$ac_signal" != 0 &&
2868       $as_echo "$as_me: caught signal $ac_signal"
2869     $as_echo "$as_me: exit $exit_status"
2870   } >&5
2871   rm -f core *.core core.conftest.* &&
2872     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2873     exit $exit_status
2874 ' 0
2875 for ac_signal in 1 2 13 15; do
2876   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2877 done
2878 ac_signal=0
2879
2880 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2881 rm -f -r conftest* confdefs.h
2882
2883 $as_echo "/* confdefs.h */" > confdefs.h
2884
2885 # Predefined preprocessor variables.
2886
2887 cat >>confdefs.h <<_ACEOF
2888 #define PACKAGE_NAME "$PACKAGE_NAME"
2889 _ACEOF
2890
2891 cat >>confdefs.h <<_ACEOF
2892 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2893 _ACEOF
2894
2895 cat >>confdefs.h <<_ACEOF
2896 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2897 _ACEOF
2898
2899 cat >>confdefs.h <<_ACEOF
2900 #define PACKAGE_STRING "$PACKAGE_STRING"
2901 _ACEOF
2902
2903 cat >>confdefs.h <<_ACEOF
2904 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2905 _ACEOF
2906
2907 cat >>confdefs.h <<_ACEOF
2908 #define PACKAGE_URL "$PACKAGE_URL"
2909 _ACEOF
2910
2911
2912 # Let the site file select an alternate cache file if it wants to.
2913 # Prefer an explicitly selected file to automatically selected ones.
2914 ac_site_file1=NONE
2915 ac_site_file2=NONE
2916 if test -n "$CONFIG_SITE"; then
2917   ac_site_file1=$CONFIG_SITE
2918 elif test "x$prefix" != xNONE; then
2919   ac_site_file1=$prefix/share/config.site
2920   ac_site_file2=$prefix/etc/config.site
2921 else
2922   ac_site_file1=$ac_default_prefix/share/config.site
2923   ac_site_file2=$ac_default_prefix/etc/config.site
2924 fi
2925 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2926 do
2927   test "x$ac_site_file" = xNONE && continue
2928   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2929     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2930 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2931     sed 's/^/| /' "$ac_site_file" >&5
2932     . "$ac_site_file"
2933   fi
2934 done
2935
2936 if test -r "$cache_file"; then
2937   # Some versions of bash will fail to source /dev/null (special files
2938   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2939   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2940     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2941 $as_echo "$as_me: loading cache $cache_file" >&6;}
2942     case $cache_file in
2943       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2944       *)                      . "./$cache_file";;
2945     esac
2946   fi
2947 else
2948   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2949 $as_echo "$as_me: creating cache $cache_file" >&6;}
2950   >$cache_file
2951 fi
2952
2953 as_fn_append ac_func_list " chown"
2954 as_fn_append ac_func_list " fchown"
2955 as_fn_append ac_header_list " dirent.h"
2956 as_fn_append ac_func_list " dup2"
2957 as_fn_append ac_header_list " errno.h"
2958 as_fn_append ac_func_list " fchdir"
2959 as_fn_append ac_func_list " fcntl"
2960 as_fn_append ac_header_list " fcntl.h"
2961 as_fn_append ac_func_list " fdopendir"
2962 as_fn_append ac_header_list " float.h"
2963 as_fn_append ac_header_list " stdio_ext.h"
2964 as_fn_append ac_func_list " __fpending"
2965 as_fn_append ac_func_list " vasnprintf"
2966 as_fn_append ac_func_list " fpurge"
2967 as_fn_append ac_func_list " __fpurge"
2968 as_fn_append ac_func_list " __freading"
2969 gl_getopt_required=GNU
2970 as_fn_append ac_header_list " getopt.h"
2971 as_fn_append ac_func_list " gettimeofday"
2972 as_fn_append ac_func_list " nanotime"
2973 as_fn_append ac_header_list " sys/time.h"
2974 as_fn_append ac_func_list " lchmod"
2975 as_fn_append ac_func_list " lstat"
2976 as_fn_append ac_header_list " math.h"
2977 as_fn_append ac_func_list " mbsinit"
2978 as_fn_append ac_func_list " mbrtowc"
2979 as_fn_append ac_header_list " sys/mman.h"
2980 as_fn_append ac_func_list " mprotect"
2981 as_fn_append ac_header_list " unistd.h"
2982 gl_printf_safe=yes
2983 as_fn_append ac_header_list " stddef.h"
2984 as_fn_append ac_header_list " stdint.h"
2985 as_fn_append ac_header_list " wchar.h"
2986 as_fn_append ac_header_list " stdio.h"
2987 as_fn_append ac_header_list " stdlib.h"
2988 as_fn_append ac_header_list " sys/socket.h"
2989 as_fn_append ac_header_list " string.h"
2990 as_fn_append ac_header_list " sys/stat.h"
2991 as_fn_append ac_header_list " time.h"
2992 as_fn_append ac_func_list " pipe"
2993 as_fn_append ac_header_list " utime.h"
2994 as_fn_append ac_func_list " futimes"
2995 as_fn_append ac_func_list " futimesat"
2996 as_fn_append ac_func_list " futimens"
2997 as_fn_append ac_func_list " utimensat"
2998 as_fn_append ac_func_list " lutimes"
2999 as_fn_append ac_func_list " iswcntrl"
3000 as_fn_append ac_header_list " wctype.h"
3001 as_fn_append ac_header_list " limits.h"
3002 as_fn_append ac_header_list " memory.h"
3003 as_fn_append ac_func_list " fchmod"
3004 as_fn_append ac_func_list " siginterrupt"
3005 # Check that the precious variables saved in the cache have kept the same
3006 # value.
3007 ac_cache_corrupted=false
3008 for ac_var in $ac_precious_vars; do
3009   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3010   eval ac_new_set=\$ac_env_${ac_var}_set
3011   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3012   eval ac_new_val=\$ac_env_${ac_var}_value
3013   case $ac_old_set,$ac_new_set in
3014     set,)
3015       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3016 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3017       ac_cache_corrupted=: ;;
3018     ,set)
3019       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3020 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3021       ac_cache_corrupted=: ;;
3022     ,);;
3023     *)
3024       if test "x$ac_old_val" != "x$ac_new_val"; then
3025         # differences in whitespace do not lead to failure.
3026         ac_old_val_w=`echo x $ac_old_val`
3027         ac_new_val_w=`echo x $ac_new_val`
3028         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3029           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3030 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3031           ac_cache_corrupted=:
3032         else
3033           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3034 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3035           eval $ac_var=\$ac_old_val
3036         fi
3037         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3038 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3039         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3040 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3041       fi;;
3042   esac
3043   # Pass precious variables to config.status.
3044   if test "$ac_new_set" = set; then
3045     case $ac_new_val in
3046     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3047     *) ac_arg=$ac_var=$ac_new_val ;;
3048     esac
3049     case " $ac_configure_args " in
3050       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3051       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3052     esac
3053   fi
3054 done
3055 if $ac_cache_corrupted; then
3056   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3057 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3058   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3059 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3060   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3061 fi
3062 ## -------------------- ##
3063 ## Main body of script. ##
3064 ## -------------------- ##
3065
3066 ac_ext=c
3067 ac_cpp='$CPP $CPPFLAGS'
3068 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3069 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3071
3072
3073
3074
3075 ac_aux_dir=
3076 for ac_dir in build-aux "$srcdir"/build-aux; do
3077   if test -f "$ac_dir/install-sh"; then
3078     ac_aux_dir=$ac_dir
3079     ac_install_sh="$ac_aux_dir/install-sh -c"
3080     break
3081   elif test -f "$ac_dir/install.sh"; then
3082     ac_aux_dir=$ac_dir
3083     ac_install_sh="$ac_aux_dir/install.sh -c"
3084     break
3085   elif test -f "$ac_dir/shtool"; then
3086     ac_aux_dir=$ac_dir
3087     ac_install_sh="$ac_aux_dir/shtool install -c"
3088     break
3089   fi
3090 done
3091 if test -z "$ac_aux_dir"; then
3092   as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3093 fi
3094
3095 # These three variables are undocumented and unsupported,
3096 # and are intended to be withdrawn in a future Autoconf release.
3097 # They can cause serious problems if a builder's source tree is in a directory
3098 # whose full name contains unusual characters.
3099 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3100 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3101 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3102
3103
3104 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3105
3106 am__api_version='1.11a'
3107
3108 # Find a good install program.  We prefer a C program (faster),
3109 # so one script is as good as another.  But avoid the broken or
3110 # incompatible versions:
3111 # SysV /etc/install, /usr/sbin/install
3112 # SunOS /usr/etc/install
3113 # IRIX /sbin/install
3114 # AIX /bin/install
3115 # AmigaOS /C/install, which installs bootblocks on floppy discs
3116 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3117 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3118 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3119 # OS/2's system install, which has a completely different semantic
3120 # ./install, which can be erroneously created by make from ./install.sh.
3121 # Reject install programs that cannot install multiple files.
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3123 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3124 if test -z "$INSTALL"; then
3125 if test "${ac_cv_path_install+set}" = set; then :
3126   $as_echo_n "(cached) " >&6
3127 else
3128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3129 for as_dir in $PATH
3130 do
3131   IFS=$as_save_IFS
3132   test -z "$as_dir" && as_dir=.
3133     # Account for people who put trailing slashes in PATH elements.
3134 case $as_dir/ in #((
3135   ./ | .// | /[cC]/* | \
3136   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3137   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3138   /usr/ucb/* ) ;;
3139   *)
3140     # OSF1 and SCO ODT 3.0 have their own names for install.
3141     # Don't use installbsd from OSF since it installs stuff as root
3142     # by default.
3143     for ac_prog in ginstall scoinst install; do
3144       for ac_exec_ext in '' $ac_executable_extensions; do
3145         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3146           if test $ac_prog = install &&
3147             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3148             # AIX install.  It has an incompatible calling convention.
3149             :
3150           elif test $ac_prog = install &&
3151             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3152             # program-specific install script used by HP pwplus--don't use.
3153             :
3154           else
3155             rm -rf conftest.one conftest.two conftest.dir
3156             echo one > conftest.one
3157             echo two > conftest.two
3158             mkdir conftest.dir
3159             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3160               test -s conftest.one && test -s conftest.two &&
3161               test -s conftest.dir/conftest.one &&
3162               test -s conftest.dir/conftest.two
3163             then
3164               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3165               break 3
3166             fi
3167           fi
3168         fi
3169       done
3170     done
3171     ;;
3172 esac
3173
3174   done
3175 IFS=$as_save_IFS
3176
3177 rm -rf conftest.one conftest.two conftest.dir
3178
3179 fi
3180   if test "${ac_cv_path_install+set}" = set; then
3181     INSTALL=$ac_cv_path_install
3182   else
3183     # As a last resort, use the slow shell script.  Don't cache a
3184     # value for INSTALL within a source directory, because that will
3185     # break other packages using the cache if that directory is
3186     # removed, or if the value is a relative name.
3187     INSTALL=$ac_install_sh
3188   fi
3189 fi
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3191 $as_echo "$INSTALL" >&6; }
3192
3193 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3194 # It thinks the first close brace ends the variable substitution.
3195 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3196
3197 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3198
3199 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3200
3201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3202 $as_echo_n "checking whether build environment is sane... " >&6; }
3203 # Reject unsafe characters in $srcdir or the absolute working directory
3204 # name.  Accept space and tab only in the latter.
3205 am_lf='
3206 '
3207 case `pwd` in
3208   *[\\\"\#\$\&\'\`$am_lf]*)
3209     as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3210 esac
3211 case $srcdir in
3212   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3213     as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3214 esac
3215
3216 # Do `set' in a subshell so we don't clobber the current shell's
3217 # arguments.  Must try -L first in case configure is actually a
3218 # symlink; some systems play weird games with the mod time of symlinks
3219 # (eg FreeBSD returns the mod time of the symlink's containing
3220 # directory).
3221 if (
3222    for am_try in 1 2; do
3223      echo timestamp > conftest.file
3224      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3225      if test "$*" = "X"; then
3226         # -L didn't work.
3227         set X `ls -t "$srcdir/configure" conftest.file`
3228      fi
3229      rm -f conftest.file
3230      if test "$*" != "X $srcdir/configure conftest.file" \
3231         && test "$*" != "X conftest.file $srcdir/configure"; then
3232
3233         # If neither matched, then we have a broken ls.  This can happen
3234         # if, for instance, CONFIG_SHELL is bash and it inherits a
3235         # broken ls alias from the environment.  This has actually
3236         # happened.  Such a system could not be considered "sane".
3237         as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3238   alias in your environment" "$LINENO" 5
3239      fi
3240      if test "$2" = conftest.file || test $am_try -eq 2; then
3241        break
3242      fi
3243      # Just in case.
3244      sleep 1
3245    done
3246    test "$2" = conftest.file
3247    )
3248 then
3249    # Ok.
3250    :
3251 else
3252    as_fn_error "newly created file is older than distributed files!
3253 Check your system clock" "$LINENO" 5
3254 fi
3255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3256 $as_echo "yes" >&6; }
3257 test "$program_prefix" != NONE &&
3258   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3259 # Use a double $ so make ignores it.
3260 test "$program_suffix" != NONE &&
3261   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3262 # Double any \ or $.
3263 # By default was `s,x,x', remove it if useless.
3264 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3265 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3266
3267 # expand $ac_aux_dir to an absolute path
3268 am_aux_dir=`cd $ac_aux_dir && pwd`
3269
3270 if test x"${MISSING+set}" != xset; then
3271   case $am_aux_dir in
3272   *\ * | *\     *)
3273     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3274   *)
3275     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3276   esac
3277 fi
3278 # Use eval to expand $SHELL
3279 if eval "$MISSING --run true"; then
3280   am_missing_run="$MISSING --run "
3281 else
3282   am_missing_run=
3283   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3284 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3285 fi
3286
3287 if test x"${install_sh}" != xset; then
3288   case $am_aux_dir in
3289   *\ * | *\     *)
3290     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3291   *)
3292     install_sh="\${SHELL} $am_aux_dir/install-sh"
3293   esac
3294 fi
3295
3296 # Installed binaries are usually stripped using `strip' when the user
3297 # run `make install-strip'.  However `strip' might not be the right
3298 # tool to use in cross-compilation environments, therefore Automake
3299 # will honor the `STRIP' environment variable to overrule this program.
3300 if test "$cross_compiling" != no; then
3301   if test -n "$ac_tool_prefix"; then
3302   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3303 set dummy ${ac_tool_prefix}strip; ac_word=$2
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3305 $as_echo_n "checking for $ac_word... " >&6; }
3306 if test "${ac_cv_prog_STRIP+set}" = set; then :
3307   $as_echo_n "(cached) " >&6
3308 else
3309   if test -n "$STRIP"; then
3310   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3311 else
3312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3313 for as_dir in $PATH
3314 do
3315   IFS=$as_save_IFS
3316   test -z "$as_dir" && as_dir=.
3317     for ac_exec_ext in '' $ac_executable_extensions; do
3318   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3319     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3321     break 2
3322   fi
3323 done
3324   done
3325 IFS=$as_save_IFS
3326
3327 fi
3328 fi
3329 STRIP=$ac_cv_prog_STRIP
3330 if test -n "$STRIP"; then
3331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3332 $as_echo "$STRIP" >&6; }
3333 else
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3335 $as_echo "no" >&6; }
3336 fi
3337
3338
3339 fi
3340 if test -z "$ac_cv_prog_STRIP"; then
3341   ac_ct_STRIP=$STRIP
3342   # Extract the first word of "strip", so it can be a program name with args.
3343 set dummy strip; ac_word=$2
3344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3345 $as_echo_n "checking for $ac_word... " >&6; }
3346 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3347   $as_echo_n "(cached) " >&6
3348 else
3349   if test -n "$ac_ct_STRIP"; then
3350   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3351 else
3352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3353 for as_dir in $PATH
3354 do
3355   IFS=$as_save_IFS
3356   test -z "$as_dir" && as_dir=.
3357     for ac_exec_ext in '' $ac_executable_extensions; do
3358   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3359     ac_cv_prog_ac_ct_STRIP="strip"
3360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3361     break 2
3362   fi
3363 done
3364   done
3365 IFS=$as_save_IFS
3366
3367 fi
3368 fi
3369 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3370 if test -n "$ac_ct_STRIP"; then
3371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3372 $as_echo "$ac_ct_STRIP" >&6; }
3373 else
3374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3375 $as_echo "no" >&6; }
3376 fi
3377
3378   if test "x$ac_ct_STRIP" = x; then
3379     STRIP=":"
3380   else
3381     case $cross_compiling:$ac_tool_warned in
3382 yes:)
3383 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3384 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3385 ac_tool_warned=yes ;;
3386 esac
3387     STRIP=$ac_ct_STRIP
3388   fi
3389 else
3390   STRIP="$ac_cv_prog_STRIP"
3391 fi
3392
3393 fi
3394 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3395
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3397 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3398 if test -z "$MKDIR_P"; then
3399   if test "${ac_cv_path_mkdir+set}" = set; then :
3400   $as_echo_n "(cached) " >&6
3401 else
3402   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3404 do
3405   IFS=$as_save_IFS
3406   test -z "$as_dir" && as_dir=.
3407     for ac_prog in mkdir gmkdir; do
3408          for ac_exec_ext in '' $ac_executable_extensions; do
3409            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3410            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3411              'mkdir (GNU coreutils) '* | \
3412              'mkdir (coreutils) '* | \
3413              'mkdir (fileutils) '4.1*)
3414                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3415                break 3;;
3416            esac
3417          done
3418        done
3419   done
3420 IFS=$as_save_IFS
3421
3422 fi
3423
3424   test -d ./--version && rmdir ./--version
3425   if test "${ac_cv_path_mkdir+set}" = set; then
3426     MKDIR_P="$ac_cv_path_mkdir -p"
3427   else
3428     # As a last resort, use the slow shell script.  Don't cache a
3429     # value for MKDIR_P within a source directory, because that will
3430     # break other packages using the cache if that directory is
3431     # removed, or if the value is a relative name.
3432     MKDIR_P="$ac_install_sh -d"
3433   fi
3434 fi
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3436 $as_echo "$MKDIR_P" >&6; }
3437
3438 mkdir_p="$MKDIR_P"
3439 case $mkdir_p in
3440   [\\/$]* | ?:[\\/]*) ;;
3441   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3442 esac
3443
3444 for ac_prog in gawk mawk nawk awk
3445 do
3446   # Extract the first word of "$ac_prog", so it can be a program name with args.
3447 set dummy $ac_prog; ac_word=$2
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3449 $as_echo_n "checking for $ac_word... " >&6; }
3450 if test "${ac_cv_prog_AWK+set}" = set; then :
3451   $as_echo_n "(cached) " >&6
3452 else
3453   if test -n "$AWK"; then
3454   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3455 else
3456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3457 for as_dir in $PATH
3458 do
3459   IFS=$as_save_IFS
3460   test -z "$as_dir" && as_dir=.
3461     for ac_exec_ext in '' $ac_executable_extensions; do
3462   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3463     ac_cv_prog_AWK="$ac_prog"
3464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3465     break 2
3466   fi
3467 done
3468   done
3469 IFS=$as_save_IFS
3470
3471 fi
3472 fi
3473 AWK=$ac_cv_prog_AWK
3474 if test -n "$AWK"; then
3475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3476 $as_echo "$AWK" >&6; }
3477 else
3478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3479 $as_echo "no" >&6; }
3480 fi
3481
3482
3483   test -n "$AWK" && break
3484 done
3485
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3487 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3488 set x ${MAKE-make}
3489 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3490 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3491   $as_echo_n "(cached) " >&6
3492 else
3493   cat >conftest.make <<\_ACEOF
3494 SHELL = /bin/sh
3495 all:
3496         @echo '@@@%%%=$(MAKE)=@@@%%%'
3497 _ACEOF
3498 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3499 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3500   *@@@%%%=?*=@@@%%%*)
3501     eval ac_cv_prog_make_${ac_make}_set=yes;;
3502   *)
3503     eval ac_cv_prog_make_${ac_make}_set=no;;
3504 esac
3505 rm -f conftest.make
3506 fi
3507 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3509 $as_echo "yes" >&6; }
3510   SET_MAKE=
3511 else
3512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3513 $as_echo "no" >&6; }
3514   SET_MAKE="MAKE=${MAKE-make}"
3515 fi
3516
3517 rm -rf .tst 2>/dev/null
3518 mkdir .tst 2>/dev/null
3519 if test -d .tst; then
3520   am__leading_dot=.
3521 else
3522   am__leading_dot=_
3523 fi
3524 rmdir .tst 2>/dev/null
3525
3526 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3527   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3528   # is not polluted with repeated "-I."
3529   am__isrc=' -I$(srcdir)'
3530   # test to see if srcdir already configured
3531   if test -f $srcdir/config.status; then
3532     as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3533   fi
3534 fi
3535
3536 # test whether we have cygpath
3537 if test -z "$CYGPATH_W"; then
3538   if (cygpath --version) >/dev/null 2>/dev/null; then
3539     CYGPATH_W='cygpath -w'
3540   else
3541     CYGPATH_W=echo
3542   fi
3543 fi
3544
3545
3546 # Define the identity of the package.
3547  PACKAGE='gzip'
3548  VERSION='1.4'
3549
3550
3551 cat >>confdefs.h <<_ACEOF
3552 #define PACKAGE "$PACKAGE"
3553 _ACEOF
3554
3555
3556 cat >>confdefs.h <<_ACEOF
3557 #define VERSION "$VERSION"
3558 _ACEOF
3559
3560 # Some tools Automake needs.
3561
3562 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3563
3564
3565 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3566
3567
3568 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3569
3570
3571 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3572
3573
3574 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3575
3576 # We need awk for the "check" target.  The system "awk" is bad on
3577 # some platforms.
3578 # Always define AMTAR for backward compatibility.
3579
3580 AMTAR=${AMTAR-"${am_missing_run}tar"}
3581
3582 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3583
3584
3585
3586
3587
3588 # Check whether --enable-silent-rules was given.
3589 if test "${enable_silent_rules+set}" = set; then :
3590   enableval=$enable_silent_rules;
3591 fi
3592
3593 case $enable_silent_rules in
3594 yes) AM_DEFAULT_VERBOSITY=0;;
3595 no)  AM_DEFAULT_VERBOSITY=1;;
3596 *)   AM_DEFAULT_VERBOSITY=0;;
3597 esac
3598 AM_BACKSLASH='\'
3599  # make --enable-silent-rules the default.
3600
3601 DEPDIR="${am__leading_dot}deps"
3602
3603 ac_config_commands="$ac_config_commands depfiles"
3604
3605
3606 am_make=${MAKE-make}
3607 cat > confinc << 'END'
3608 am__doit:
3609         @echo this is the am__doit target
3610 .PHONY: am__doit
3611 END
3612 # If we don't find an include directive, just comment out the code.
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3614 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3615 am__include="#"
3616 am__quote=
3617 _am_result=none
3618 # First try GNU make style include.
3619 echo "include confinc" > confmf
3620 # Ignore all kinds of additional output from `make'.
3621 case `$am_make -s -f confmf 2> /dev/null` in #(
3622 *the\ am__doit\ target*)
3623   am__include=include
3624   am__quote=
3625   _am_result=GNU
3626   ;;
3627 esac
3628 # Now try BSD make style include.
3629 if test "$am__include" = "#"; then
3630    echo '.include "confinc"' > confmf
3631    case `$am_make -s -f confmf 2> /dev/null` in #(
3632    *the\ am__doit\ target*)
3633      am__include=.include
3634      am__quote="\""
3635      _am_result=BSD
3636      ;;
3637    esac
3638 fi
3639
3640
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3642 $as_echo "$_am_result" >&6; }
3643 rm -f confinc confmf
3644
3645 # Check whether --enable-dependency-tracking was given.
3646 if test "${enable_dependency_tracking+set}" = set; then :
3647   enableval=$enable_dependency_tracking;
3648 fi
3649
3650 if test "x$enable_dependency_tracking" != xno; then
3651   am_depcomp="$ac_aux_dir/depcomp"
3652   AMDEPBACKSLASH='\'
3653 fi
3654  if test "x$enable_dependency_tracking" != xno; then
3655   AMDEP_TRUE=
3656   AMDEP_FALSE='#'
3657 else
3658   AMDEP_TRUE='#'
3659   AMDEP_FALSE=
3660 fi
3661
3662
3663 ac_ext=c
3664 ac_cpp='$CPP $CPPFLAGS'
3665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3668 if test -n "$ac_tool_prefix"; then
3669   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3670 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672 $as_echo_n "checking for $ac_word... " >&6; }
3673 if test "${ac_cv_prog_CC+set}" = set; then :
3674   $as_echo_n "(cached) " >&6
3675 else
3676   if test -n "$CC"; then
3677   ac_cv_prog_CC="$CC" # Let the user override the test.
3678 else
3679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680 for as_dir in $PATH
3681 do
3682   IFS=$as_save_IFS
3683   test -z "$as_dir" && as_dir=.
3684     for ac_exec_ext in '' $ac_executable_extensions; do
3685   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3686     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3688     break 2
3689   fi
3690 done
3691   done
3692 IFS=$as_save_IFS
3693
3694 fi
3695 fi
3696 CC=$ac_cv_prog_CC
3697 if test -n "$CC"; then
3698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3699 $as_echo "$CC" >&6; }
3700 else
3701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702 $as_echo "no" >&6; }
3703 fi
3704
3705
3706 fi
3707 if test -z "$ac_cv_prog_CC"; then
3708   ac_ct_CC=$CC
3709   # Extract the first word of "gcc", so it can be a program name with args.
3710 set dummy gcc; ac_word=$2
3711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712 $as_echo_n "checking for $ac_word... " >&6; }
3713 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3714   $as_echo_n "(cached) " >&6
3715 else
3716   if test -n "$ac_ct_CC"; then
3717   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3718 else
3719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720 for as_dir in $PATH
3721 do
3722   IFS=$as_save_IFS
3723   test -z "$as_dir" && as_dir=.
3724     for ac_exec_ext in '' $ac_executable_extensions; do
3725   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3726     ac_cv_prog_ac_ct_CC="gcc"
3727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3728     break 2
3729   fi
3730 done
3731   done
3732 IFS=$as_save_IFS
3733
3734 fi
3735 fi
3736 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3737 if test -n "$ac_ct_CC"; then
3738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3739 $as_echo "$ac_ct_CC" >&6; }
3740 else
3741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742 $as_echo "no" >&6; }
3743 fi
3744
3745   if test "x$ac_ct_CC" = x; then
3746     CC=""
3747   else
3748     case $cross_compiling:$ac_tool_warned in
3749 yes:)
3750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3752 ac_tool_warned=yes ;;
3753 esac
3754     CC=$ac_ct_CC
3755   fi
3756 else
3757   CC="$ac_cv_prog_CC"
3758 fi
3759
3760 if test -z "$CC"; then
3761           if test -n "$ac_tool_prefix"; then
3762     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3763 set dummy ${ac_tool_prefix}cc; ac_word=$2
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3765 $as_echo_n "checking for $ac_word... " >&6; }
3766 if test "${ac_cv_prog_CC+set}" = set; then :
3767   $as_echo_n "(cached) " >&6
3768 else
3769   if test -n "$CC"; then
3770   ac_cv_prog_CC="$CC" # Let the user override the test.
3771 else
3772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3773 for as_dir in $PATH
3774 do
3775   IFS=$as_save_IFS
3776   test -z "$as_dir" && as_dir=.
3777     for ac_exec_ext in '' $ac_executable_extensions; do
3778   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3779     ac_cv_prog_CC="${ac_tool_prefix}cc"
3780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3781     break 2
3782   fi
3783 done
3784   done
3785 IFS=$as_save_IFS
3786
3787 fi
3788 fi
3789 CC=$ac_cv_prog_CC
3790 if test -n "$CC"; then
3791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3792 $as_echo "$CC" >&6; }
3793 else
3794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795 $as_echo "no" >&6; }
3796 fi
3797
3798
3799   fi
3800 fi
3801 if test -z "$CC"; then
3802   # Extract the first word of "cc", so it can be a program name with args.
3803 set dummy cc; ac_word=$2
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3805 $as_echo_n "checking for $ac_word... " >&6; }
3806 if test "${ac_cv_prog_CC+set}" = set; then :
3807   $as_echo_n "(cached) " >&6
3808 else
3809   if test -n "$CC"; then
3810   ac_cv_prog_CC="$CC" # Let the user override the test.
3811 else
3812   ac_prog_rejected=no
3813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814 for as_dir in $PATH
3815 do
3816   IFS=$as_save_IFS
3817   test -z "$as_dir" && as_dir=.
3818     for ac_exec_ext in '' $ac_executable_extensions; do
3819   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3820     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3821        ac_prog_rejected=yes
3822        continue
3823      fi
3824     ac_cv_prog_CC="cc"
3825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3826     break 2
3827   fi
3828 done
3829   done
3830 IFS=$as_save_IFS
3831
3832 if test $ac_prog_rejected = yes; then
3833   # We found a bogon in the path, so make sure we never use it.
3834   set dummy $ac_cv_prog_CC
3835   shift
3836   if test $# != 0; then
3837     # We chose a different compiler from the bogus one.
3838     # However, it has the same basename, so the bogon will be chosen
3839     # first if we set CC to just the basename; use the full file name.
3840     shift
3841     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3842   fi
3843 fi
3844 fi
3845 fi
3846 CC=$ac_cv_prog_CC
3847 if test -n "$CC"; then
3848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849 $as_echo "$CC" >&6; }
3850 else
3851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852 $as_echo "no" >&6; }
3853 fi
3854
3855
3856 fi
3857 if test -z "$CC"; then
3858   if test -n "$ac_tool_prefix"; then
3859   for ac_prog in cl.exe
3860   do
3861     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3862 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3864 $as_echo_n "checking for $ac_word... " >&6; }
3865 if test "${ac_cv_prog_CC+set}" = set; then :
3866   $as_echo_n "(cached) " >&6
3867 else
3868   if test -n "$CC"; then
3869   ac_cv_prog_CC="$CC" # Let the user override the test.
3870 else
3871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872 for as_dir in $PATH
3873 do
3874   IFS=$as_save_IFS
3875   test -z "$as_dir" && as_dir=.
3876     for ac_exec_ext in '' $ac_executable_extensions; do
3877   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3878     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3880     break 2
3881   fi
3882 done
3883   done
3884 IFS=$as_save_IFS
3885
3886 fi
3887 fi
3888 CC=$ac_cv_prog_CC
3889 if test -n "$CC"; then
3890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3891 $as_echo "$CC" >&6; }
3892 else
3893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894 $as_echo "no" >&6; }
3895 fi
3896
3897
3898     test -n "$CC" && break
3899   done
3900 fi
3901 if test -z "$CC"; then
3902   ac_ct_CC=$CC
3903   for ac_prog in cl.exe
3904 do
3905   # Extract the first word of "$ac_prog", so it can be a program name with args.
3906 set dummy $ac_prog; ac_word=$2
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908 $as_echo_n "checking for $ac_word... " >&6; }
3909 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3910   $as_echo_n "(cached) " >&6
3911 else
3912   if test -n "$ac_ct_CC"; then
3913   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3914 else
3915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3916 for as_dir in $PATH
3917 do
3918   IFS=$as_save_IFS
3919   test -z "$as_dir" && as_dir=.
3920     for ac_exec_ext in '' $ac_executable_extensions; do
3921   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3922     ac_cv_prog_ac_ct_CC="$ac_prog"
3923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3924     break 2
3925   fi
3926 done
3927   done
3928 IFS=$as_save_IFS
3929
3930 fi
3931 fi
3932 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3933 if test -n "$ac_ct_CC"; then
3934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3935 $as_echo "$ac_ct_CC" >&6; }
3936 else
3937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938 $as_echo "no" >&6; }
3939 fi
3940
3941
3942   test -n "$ac_ct_CC" && break
3943 done
3944
3945   if test "x$ac_ct_CC" = x; then
3946     CC=""
3947   else
3948     case $cross_compiling:$ac_tool_warned in
3949 yes:)
3950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3951 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3952 ac_tool_warned=yes ;;
3953 esac
3954     CC=$ac_ct_CC
3955   fi
3956 fi
3957
3958 fi
3959
3960
3961 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3963 as_fn_error "no acceptable C compiler found in \$PATH
3964 See \`config.log' for more details." "$LINENO" 5; }
3965
3966 # Provide some information about the compiler.
3967 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3968 set X $ac_compile
3969 ac_compiler=$2
3970 for ac_option in --version -v -V -qversion; do
3971   { { ac_try="$ac_compiler $ac_option >&5"
3972 case "(($ac_try" in
3973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974   *) ac_try_echo=$ac_try;;
3975 esac
3976 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977 $as_echo "$ac_try_echo"; } >&5
3978   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3979   ac_status=$?
3980   if test -s conftest.err; then
3981     sed '10a\
3982 ... rest of stderr output deleted ...
3983          10q' conftest.err >conftest.er1
3984     cat conftest.er1 >&5
3985   fi
3986   rm -f conftest.er1 conftest.err
3987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988   test $ac_status = 0; }
3989 done
3990
3991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3992 /* end confdefs.h.  */
3993
3994 int
3995 main ()
3996 {
3997
3998   ;
3999   return 0;
4000 }
4001 _ACEOF
4002 ac_clean_files_save=$ac_clean_files
4003 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4004 # Try to create an executable without -o first, disregard a.out.
4005 # It will help us diagnose broken compilers, and finding out an intuition
4006 # of exeext.
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4008 $as_echo_n "checking whether the C compiler works... " >&6; }
4009 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4010
4011 # The possible output files:
4012 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4013
4014 ac_rmfiles=
4015 for ac_file in $ac_files
4016 do
4017   case $ac_file in
4018     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4019     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4020   esac
4021 done
4022 rm -f $ac_rmfiles
4023
4024 if { { ac_try="$ac_link_default"
4025 case "(($ac_try" in
4026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027   *) ac_try_echo=$ac_try;;
4028 esac
4029 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4030 $as_echo "$ac_try_echo"; } >&5
4031   (eval "$ac_link_default") 2>&5
4032   ac_status=$?
4033   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034   test $ac_status = 0; }; then :
4035   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4036 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4037 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4038 # so that the user can short-circuit this test for compilers unknown to
4039 # Autoconf.
4040 for ac_file in $ac_files ''
4041 do
4042   test -f "$ac_file" || continue
4043   case $ac_file in
4044     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4045         ;;
4046     [ab].out )
4047         # We found the default executable, but exeext='' is most
4048         # certainly right.
4049         break;;
4050     *.* )
4051         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4052         then :; else
4053            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054         fi
4055         # We set ac_cv_exeext here because the later test for it is not
4056         # safe: cross compilers may not add the suffix if given an `-o'
4057         # argument, so we may need to know it at that point already.
4058         # Even if this section looks crufty: it has the advantage of
4059         # actually working.
4060         break;;
4061     * )
4062         break;;
4063   esac
4064 done
4065 test "$ac_cv_exeext" = no && ac_cv_exeext=
4066
4067 else
4068   ac_file=''
4069 fi
4070 if test -z "$ac_file"; then :
4071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4072 $as_echo "no" >&6; }
4073 $as_echo "$as_me: failed program was:" >&5
4074 sed 's/^/| /' conftest.$ac_ext >&5
4075
4076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4077 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4078 { as_fn_set_status 77
4079 as_fn_error "C compiler cannot create executables
4080 See \`config.log' for more details." "$LINENO" 5; }; }
4081 else
4082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4083 $as_echo "yes" >&6; }
4084 fi
4085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4086 $as_echo_n "checking for C compiler default output file name... " >&6; }
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4088 $as_echo "$ac_file" >&6; }
4089 ac_exeext=$ac_cv_exeext
4090
4091 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4092 ac_clean_files=$ac_clean_files_save
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4094 $as_echo_n "checking for suffix of executables... " >&6; }
4095 if { { ac_try="$ac_link"
4096 case "(($ac_try" in
4097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4098   *) ac_try_echo=$ac_try;;
4099 esac
4100 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4101 $as_echo "$ac_try_echo"; } >&5
4102   (eval "$ac_link") 2>&5
4103   ac_status=$?
4104   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4105   test $ac_status = 0; }; then :
4106   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4107 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4108 # work properly (i.e., refer to `conftest.exe'), while it won't with
4109 # `rm'.
4110 for ac_file in conftest.exe conftest conftest.*; do
4111   test -f "$ac_file" || continue
4112   case $ac_file in
4113     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4114     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4115           break;;
4116     * ) break;;
4117   esac
4118 done
4119 else
4120   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4121 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4122 as_fn_error "cannot compute suffix of executables: cannot compile and link
4123 See \`config.log' for more details." "$LINENO" 5; }
4124 fi
4125 rm -f conftest conftest$ac_cv_exeext
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4127 $as_echo "$ac_cv_exeext" >&6; }
4128
4129 rm -f conftest.$ac_ext
4130 EXEEXT=$ac_cv_exeext
4131 ac_exeext=$EXEEXT
4132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4133 /* end confdefs.h.  */
4134 #include <stdio.h>
4135 int
4136 main ()
4137 {
4138 FILE *f = fopen ("conftest.out", "w");
4139  return ferror (f) || fclose (f) != 0;
4140
4141   ;
4142   return 0;
4143 }
4144 _ACEOF
4145 ac_clean_files="$ac_clean_files conftest.out"
4146 # Check that the compiler produces executables we can run.  If not, either
4147 # the compiler is broken, or we cross compile.
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4149 $as_echo_n "checking whether we are cross compiling... " >&6; }
4150 if test "$cross_compiling" != yes; then
4151   { { ac_try="$ac_link"
4152 case "(($ac_try" in
4153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154   *) ac_try_echo=$ac_try;;
4155 esac
4156 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157 $as_echo "$ac_try_echo"; } >&5
4158   (eval "$ac_link") 2>&5
4159   ac_status=$?
4160   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161   test $ac_status = 0; }
4162   if { ac_try='./conftest$ac_cv_exeext'
4163   { { case "(($ac_try" in
4164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4165   *) ac_try_echo=$ac_try;;
4166 esac
4167 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4168 $as_echo "$ac_try_echo"; } >&5
4169   (eval "$ac_try") 2>&5
4170   ac_status=$?
4171   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4172   test $ac_status = 0; }; }; then
4173     cross_compiling=no
4174   else
4175     if test "$cross_compiling" = maybe; then
4176         cross_compiling=yes
4177     else
4178         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4179 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4180 as_fn_error "cannot run C compiled programs.
4181 If you meant to cross compile, use \`--host'.
4182 See \`config.log' for more details." "$LINENO" 5; }
4183     fi
4184   fi
4185 fi
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4187 $as_echo "$cross_compiling" >&6; }
4188
4189 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4190 ac_clean_files=$ac_clean_files_save
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4192 $as_echo_n "checking for suffix of object files... " >&6; }
4193 if test "${ac_cv_objext+set}" = set; then :
4194   $as_echo_n "(cached) " >&6
4195 else
4196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4197 /* end confdefs.h.  */
4198
4199 int
4200 main ()
4201 {
4202
4203   ;
4204   return 0;
4205 }
4206 _ACEOF
4207 rm -f conftest.o conftest.obj
4208 if { { ac_try="$ac_compile"
4209 case "(($ac_try" in
4210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4211   *) ac_try_echo=$ac_try;;
4212 esac
4213 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4214 $as_echo "$ac_try_echo"; } >&5
4215   (eval "$ac_compile") 2>&5
4216   ac_status=$?
4217   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4218   test $ac_status = 0; }; then :
4219   for ac_file in conftest.o conftest.obj conftest.*; do
4220   test -f "$ac_file" || continue;
4221   case $ac_file in
4222     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4223     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4224        break;;
4225   esac
4226 done
4227 else
4228   $as_echo "$as_me: failed program was:" >&5
4229 sed 's/^/| /' conftest.$ac_ext >&5
4230
4231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4233 as_fn_error "cannot compute suffix of object files: cannot compile
4234 See \`config.log' for more details." "$LINENO" 5; }
4235 fi
4236 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4237 fi
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4239 $as_echo "$ac_cv_objext" >&6; }
4240 OBJEXT=$ac_cv_objext
4241 ac_objext=$OBJEXT
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4243 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4244 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4245   $as_echo_n "(cached) " >&6
4246 else
4247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4248 /* end confdefs.h.  */
4249
4250 int
4251 main ()
4252 {
4253 #ifndef __GNUC__
4254        choke me
4255 #endif
4256
4257   ;
4258   return 0;
4259 }
4260 _ACEOF
4261 if ac_fn_c_try_compile "$LINENO"; then :
4262   ac_compiler_gnu=yes
4263 else
4264   ac_compiler_gnu=no
4265 fi
4266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4268
4269 fi
4270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4271 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4272 if test $ac_compiler_gnu = yes; then
4273   GCC=yes
4274 else
4275   GCC=
4276 fi
4277 ac_test_CFLAGS=${CFLAGS+set}
4278 ac_save_CFLAGS=$CFLAGS
4279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4280 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4281 if test "${ac_cv_prog_cc_g+set}" = set; then :
4282   $as_echo_n "(cached) " >&6
4283 else
4284   ac_save_c_werror_flag=$ac_c_werror_flag
4285    ac_c_werror_flag=yes
4286    ac_cv_prog_cc_g=no
4287    CFLAGS="-g"
4288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4289 /* end confdefs.h.  */
4290
4291 int
4292 main ()
4293 {
4294
4295   ;
4296   return 0;
4297 }
4298 _ACEOF
4299 if ac_fn_c_try_compile "$LINENO"; then :
4300   ac_cv_prog_cc_g=yes
4301 else
4302   CFLAGS=""
4303       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4304 /* end confdefs.h.  */
4305
4306 int
4307 main ()
4308 {
4309
4310   ;
4311   return 0;
4312 }
4313 _ACEOF
4314 if ac_fn_c_try_compile "$LINENO"; then :
4315
4316 else
4317   ac_c_werror_flag=$ac_save_c_werror_flag
4318          CFLAGS="-g"
4319          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4320 /* end confdefs.h.  */
4321
4322 int
4323 main ()
4324 {
4325
4326   ;
4327   return 0;
4328 }
4329 _ACEOF
4330 if ac_fn_c_try_compile "$LINENO"; then :
4331   ac_cv_prog_cc_g=yes
4332 fi
4333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4334 fi
4335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4336 fi
4337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4338    ac_c_werror_flag=$ac_save_c_werror_flag
4339 fi
4340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4341 $as_echo "$ac_cv_prog_cc_g" >&6; }
4342 if test "$ac_test_CFLAGS" = set; then
4343   CFLAGS=$ac_save_CFLAGS
4344 elif test $ac_cv_prog_cc_g = yes; then
4345   if test "$GCC" = yes; then
4346     CFLAGS="-g -O2"
4347   else
4348     CFLAGS="-g"
4349   fi
4350 else
4351   if test "$GCC" = yes; then
4352     CFLAGS="-O2"
4353   else
4354     CFLAGS=
4355   fi
4356 fi
4357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4358 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4359 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4360   $as_echo_n "(cached) " >&6
4361 else
4362   ac_cv_prog_cc_c89=no
4363 ac_save_CC=$CC
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365 /* end confdefs.h.  */
4366 #include <stdarg.h>
4367 #include <stdio.h>
4368 #include <sys/types.h>
4369 #include <sys/stat.h>
4370 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4371 struct buf { int x; };
4372 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4373 static char *e (p, i)
4374      char **p;
4375      int i;
4376 {
4377   return p[i];
4378 }
4379 static char *f (char * (*g) (char **, int), char **p, ...)
4380 {
4381   char *s;
4382   va_list v;
4383   va_start (v,p);
4384   s = g (p, va_arg (v,int));
4385   va_end (v);
4386   return s;
4387 }
4388
4389 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4390    function prototypes and stuff, but not '\xHH' hex character constants.
4391    These don't provoke an error unfortunately, instead are silently treated
4392    as 'x'.  The following induces an error, until -std is added to get
4393    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4394    array size at least.  It's necessary to write '\x00'==0 to get something
4395    that's true only with -std.  */
4396 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4397
4398 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4399    inside strings and character constants.  */
4400 #define FOO(x) 'x'
4401 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4402
4403 int test (int i, double x);
4404 struct s1 {int (*f) (int a);};
4405 struct s2 {int (*f) (double a);};
4406 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4407 int argc;
4408 char **argv;
4409 int
4410 main ()
4411 {
4412 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4413   ;
4414   return 0;
4415 }
4416 _ACEOF
4417 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4418         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4419 do
4420   CC="$ac_save_CC $ac_arg"
4421   if ac_fn_c_try_compile "$LINENO"; then :
4422   ac_cv_prog_cc_c89=$ac_arg
4423 fi
4424 rm -f core conftest.err conftest.$ac_objext
4425   test "x$ac_cv_prog_cc_c89" != "xno" && break
4426 done
4427 rm -f conftest.$ac_ext
4428 CC=$ac_save_CC
4429
4430 fi
4431 # AC_CACHE_VAL
4432 case "x$ac_cv_prog_cc_c89" in
4433   x)
4434     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4435 $as_echo "none needed" >&6; } ;;
4436   xno)
4437     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4438 $as_echo "unsupported" >&6; } ;;
4439   *)
4440     CC="$CC $ac_cv_prog_cc_c89"
4441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4442 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4443 esac
4444 if test "x$ac_cv_prog_cc_c89" != xno; then :
4445
4446 fi
4447
4448 ac_ext=c
4449 ac_cpp='$CPP $CPPFLAGS'
4450 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4453
4454 depcc="$CC"   am_compiler_list=
4455
4456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4457 $as_echo_n "checking dependency style of $depcc... " >&6; }
4458 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4459   $as_echo_n "(cached) " >&6
4460 else
4461   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4462   # We make a subdir and do the tests there.  Otherwise we can end up
4463   # making bogus files that we don't know about and never remove.  For
4464   # instance it was reported that on HP-UX the gcc test will end up
4465   # making a dummy file named `D' -- because `-MD' means `put the output
4466   # in D'.
4467   mkdir conftest.dir
4468   # Copy depcomp to subdir because otherwise we won't find it if we're
4469   # using a relative directory.
4470   cp "$am_depcomp" conftest.dir
4471   cd conftest.dir
4472   # We will build objects and dependencies in a subdirectory because
4473   # it helps to detect inapplicable dependency modes.  For instance
4474   # both Tru64's cc and ICC support -MD to output dependencies as a
4475   # side effect of compilation, but ICC will put the dependencies in
4476   # the current directory while Tru64 will put them in the object
4477   # directory.
4478   mkdir sub
4479
4480   am_cv_CC_dependencies_compiler_type=none
4481   if test "$am_compiler_list" = ""; then
4482      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4483   fi
4484   am__universal=false
4485   case " $depcc " in #(
4486      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4487      esac
4488
4489   for depmode in $am_compiler_list; do
4490     # Setup a source with many dependencies, because some compilers
4491     # like to wrap large dependency lists on column 80 (with \), and
4492     # we should not choose a depcomp mode which is confused by this.
4493     #
4494     # We need to recreate these files for each test, as the compiler may
4495     # overwrite some of them when testing with obscure command lines.
4496     # This happens at least with the AIX C compiler.
4497     : > sub/conftest.c
4498     for i in 1 2 3 4 5 6; do
4499       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4500       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4501       # Solaris 8's {/usr,}/bin/sh.
4502       touch sub/conftst$i.h
4503     done
4504     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4505
4506     # We check with `-c' and `-o' for the sake of the "dashmstdout"
4507     # mode.  It turns out that the SunPro C++ compiler does not properly
4508     # handle `-M -o', and we need to detect this.  Also, some Intel
4509     # versions had trouble with output in subdirs
4510     am__obj=sub/conftest.${OBJEXT-o}
4511     am__minus_obj="-o $am__obj"
4512     case $depmode in
4513     gcc)
4514       # This depmode causes a compiler race in universal mode.
4515       test "$am__universal" = false || continue
4516       ;;
4517     nosideeffect)
4518       # after this tag, mechanisms are not by side-effect, so they'll
4519       # only be used when explicitly requested
4520       if test "x$enable_dependency_tracking" = xyes; then
4521         continue
4522       else
4523         break
4524       fi
4525       ;;
4526     msvisualcpp | msvcmsys)
4527       # This compiler won't grok `-c -o', but also, the minuso test has
4528       # not run yet.  These depmodes are late enough in the game, and
4529       # so weak that their functioning should not be impacted.
4530       am__obj=conftest.${OBJEXT-o}
4531       am__minus_obj=
4532       ;;
4533     none) break ;;
4534     esac
4535     if depmode=$depmode \
4536        source=sub/conftest.c object=$am__obj \
4537        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4538        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4539          >/dev/null 2>conftest.err &&
4540        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4541        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4542        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4543        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4544       # icc doesn't choke on unknown options, it will just issue warnings
4545       # or remarks (even with -Werror).  So we grep stderr for any message
4546       # that says an option was ignored or not supported.
4547       # When given -MP, icc 7.0 and 7.1 complain thusly:
4548       #   icc: Command line warning: ignoring option '-M'; no argument required
4549       # The diagnosis changed in icc 8.0:
4550       #   icc: Command line remark: option '-MP' not supported
4551       if (grep 'ignoring option' conftest.err ||
4552           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4553         am_cv_CC_dependencies_compiler_type=$depmode
4554         break
4555       fi
4556     fi
4557   done
4558
4559   cd ..
4560   rm -rf conftest.dir
4561 else
4562   am_cv_CC_dependencies_compiler_type=none
4563 fi
4564
4565 fi
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4567 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4568 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4569
4570  if
4571   test "x$enable_dependency_tracking" != xno \
4572   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4573   am__fastdepCC_TRUE=
4574   am__fastdepCC_FALSE='#'
4575 else
4576   am__fastdepCC_TRUE='#'
4577   am__fastdepCC_FALSE=
4578 fi
4579
4580
4581    case $ac_cv_prog_cc_stdc in #(
4582   no) :
4583     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4584   *) :
4585     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4586 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4587 if test "${ac_cv_prog_cc_c99+set}" = set; then :
4588   $as_echo_n "(cached) " >&6
4589 else
4590   ac_cv_prog_cc_c99=no
4591 ac_save_CC=$CC
4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593 /* end confdefs.h.  */
4594 #include <stdarg.h>
4595 #include <stdbool.h>
4596 #include <stdlib.h>
4597 #include <wchar.h>
4598 #include <stdio.h>
4599
4600 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4601 #define debug(...) fprintf (stderr, __VA_ARGS__)
4602 #define showlist(...) puts (#__VA_ARGS__)
4603 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4604 static void
4605 test_varargs_macros (void)
4606 {
4607   int x = 1234;
4608   int y = 5678;
4609   debug ("Flag");
4610   debug ("X = %d\n", x);
4611   showlist (The first, second, and third items.);
4612   report (x>y, "x is %d but y is %d", x, y);
4613 }
4614
4615 // Check long long types.
4616 #define BIG64 18446744073709551615ull
4617 #define BIG32 4294967295ul
4618 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4619 #if !BIG_OK
4620   your preprocessor is broken;
4621 #endif
4622 #if BIG_OK
4623 #else
4624   your preprocessor is broken;
4625 #endif
4626 static long long int bignum = -9223372036854775807LL;
4627 static unsigned long long int ubignum = BIG64;
4628
4629 struct incomplete_array
4630 {
4631   int datasize;
4632   double data[];
4633 };
4634
4635 struct named_init {
4636   int number;
4637   const wchar_t *name;
4638   double average;
4639 };
4640
4641 typedef const char *ccp;
4642
4643 static inline int
4644 test_restrict (ccp restrict text)
4645 {
4646   // See if C++-style comments work.
4647   // Iterate through items via the restricted pointer.
4648   // Also check for declarations in for loops.
4649   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4650     continue;
4651   return 0;
4652 }
4653
4654 // Check varargs and va_copy.
4655 static void
4656 test_varargs (const char *format, ...)
4657 {
4658   va_list args;
4659   va_start (args, format);
4660   va_list args_copy;
4661   va_copy (args_copy, args);
4662
4663   const char *str;
4664   int number;
4665   float fnumber;
4666
4667   while (*format)
4668     {
4669       switch (*format++)
4670         {
4671         case 's': // string
4672           str = va_arg (args_copy, const char *);
4673           break;
4674         case 'd': // int
4675           number = va_arg (args_copy, int);
4676           break;
4677         case 'f': // float
4678           fnumber = va_arg (args_copy, double);
4679           break;
4680         default:
4681           break;
4682         }
4683     }
4684   va_end (args_copy);
4685   va_end (args);
4686 }
4687
4688 int
4689 main ()
4690 {
4691
4692   // Check bool.
4693   _Bool success = false;
4694
4695   // Check restrict.
4696   if (test_restrict ("String literal") == 0)
4697     success = true;
4698   char *restrict newvar = "Another string";
4699
4700   // Check varargs.
4701   test_varargs ("s, d' f .", "string", 65, 34.234);
4702   test_varargs_macros ();
4703
4704   // Check flexible array members.
4705   struct incomplete_array *ia =
4706     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4707   ia->datasize = 10;
4708   for (int i = 0; i < ia->datasize; ++i)
4709     ia->data[i] = i * 1.234;
4710
4711   // Check named initializers.
4712   struct named_init ni = {
4713     .number = 34,
4714     .name = L"Test wide string",
4715     .average = 543.34343,
4716   };
4717
4718   ni.number = 58;
4719
4720   int dynamic_array[ni.number];
4721   dynamic_array[ni.number - 1] = 543;
4722
4723   // work around unused variable warnings
4724   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4725           || dynamic_array[ni.number - 1] != 543);
4726
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
4732 do
4733   CC="$ac_save_CC $ac_arg"
4734   if ac_fn_c_try_compile "$LINENO"; then :
4735   ac_cv_prog_cc_c99=$ac_arg
4736 fi
4737 rm -f core conftest.err conftest.$ac_objext
4738   test "x$ac_cv_prog_cc_c99" != "xno" && break
4739 done
4740 rm -f conftest.$ac_ext
4741 CC=$ac_save_CC
4742
4743 fi
4744 # AC_CACHE_VAL
4745 case "x$ac_cv_prog_cc_c99" in
4746   x)
4747     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4748 $as_echo "none needed" >&6; } ;;
4749   xno)
4750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4751 $as_echo "unsupported" >&6; } ;;
4752   *)
4753     CC="$CC $ac_cv_prog_cc_c99"
4754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4755 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4756 esac
4757 if test "x$ac_cv_prog_cc_c99" != xno; then :
4758   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4759 else
4760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4761 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4762 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4763   $as_echo_n "(cached) " >&6
4764 else
4765   ac_cv_prog_cc_c89=no
4766 ac_save_CC=$CC
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768 /* end confdefs.h.  */
4769 #include <stdarg.h>
4770 #include <stdio.h>
4771 #include <sys/types.h>
4772 #include <sys/stat.h>
4773 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4774 struct buf { int x; };
4775 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4776 static char *e (p, i)
4777      char **p;
4778      int i;
4779 {
4780   return p[i];
4781 }
4782 static char *f (char * (*g) (char **, int), char **p, ...)
4783 {
4784   char *s;
4785   va_list v;
4786   va_start (v,p);
4787   s = g (p, va_arg (v,int));
4788   va_end (v);
4789   return s;
4790 }
4791
4792 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4793    function prototypes and stuff, but not '\xHH' hex character constants.
4794    These don't provoke an error unfortunately, instead are silently treated
4795    as 'x'.  The following induces an error, until -std is added to get
4796    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4797    array size at least.  It's necessary to write '\x00'==0 to get something
4798    that's true only with -std.  */
4799 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4800
4801 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4802    inside strings and character constants.  */
4803 #define FOO(x) 'x'
4804 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4805
4806 int test (int i, double x);
4807 struct s1 {int (*f) (int a);};
4808 struct s2 {int (*f) (double a);};
4809 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4810 int argc;
4811 char **argv;
4812 int
4813 main ()
4814 {
4815 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4816   ;
4817   return 0;
4818 }
4819 _ACEOF
4820 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4821         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4822 do
4823   CC="$ac_save_CC $ac_arg"
4824   if ac_fn_c_try_compile "$LINENO"; then :
4825   ac_cv_prog_cc_c89=$ac_arg
4826 fi
4827 rm -f core conftest.err conftest.$ac_objext
4828   test "x$ac_cv_prog_cc_c89" != "xno" && break
4829 done
4830 rm -f conftest.$ac_ext
4831 CC=$ac_save_CC
4832
4833 fi
4834 # AC_CACHE_VAL
4835 case "x$ac_cv_prog_cc_c89" in
4836   x)
4837     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4838 $as_echo "none needed" >&6; } ;;
4839   xno)
4840     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4841 $as_echo "unsupported" >&6; } ;;
4842   *)
4843     CC="$CC $ac_cv_prog_cc_c89"
4844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4845 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4846 esac
4847 if test "x$ac_cv_prog_cc_c89" != xno; then :
4848   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4849 else
4850   ac_cv_prog_cc_stdc=no
4851 fi
4852
4853 fi
4854  ;;
4855 esac
4856   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
4857 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
4858   if test "${ac_cv_prog_cc_stdc+set}" = set; then :
4859   $as_echo_n "(cached) " >&6
4860 fi
4861
4862   case $ac_cv_prog_cc_stdc in #(
4863   no) :
4864     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4865 $as_echo "unsupported" >&6; } ;; #(
4866   '') :
4867     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4868 $as_echo "none needed" >&6; } ;; #(
4869   *) :
4870     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
4871 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
4872 esac
4873
4874 if test "x$CC" != xcc; then
4875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4876 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
4877 else
4878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4879 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4880 fi
4881 set dummy $CC; ac_cc=`$as_echo "$2" |
4882                       sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4883 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
4884   $as_echo_n "(cached) " >&6
4885 else
4886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4887 /* end confdefs.h.  */
4888
4889 int
4890 main ()
4891 {
4892
4893   ;
4894   return 0;
4895 }
4896 _ACEOF
4897 # Make sure it works both with $CC and with simple cc.
4898 # We do the test twice because some compilers refuse to overwrite an
4899 # existing .o file with -o, though they will create one.
4900 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4901 rm -f conftest2.*
4902 if { { case "(($ac_try" in
4903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904   *) ac_try_echo=$ac_try;;
4905 esac
4906 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4907 $as_echo "$ac_try_echo"; } >&5
4908   (eval "$ac_try") 2>&5
4909   ac_status=$?
4910   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4911   test $ac_status = 0; } &&
4912    test -f conftest2.$ac_objext && { { case "(($ac_try" in
4913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4914   *) ac_try_echo=$ac_try;;
4915 esac
4916 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4917 $as_echo "$ac_try_echo"; } >&5
4918   (eval "$ac_try") 2>&5
4919   ac_status=$?
4920   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4921   test $ac_status = 0; };
4922 then
4923   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4924   if test "x$CC" != xcc; then
4925     # Test first that cc exists at all.
4926     if { ac_try='cc -c conftest.$ac_ext >&5'
4927   { { case "(($ac_try" in
4928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4929   *) ac_try_echo=$ac_try;;
4930 esac
4931 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4932 $as_echo "$ac_try_echo"; } >&5
4933   (eval "$ac_try") 2>&5
4934   ac_status=$?
4935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4936   test $ac_status = 0; }; }; then
4937       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4938       rm -f conftest2.*
4939       if { { case "(($ac_try" in
4940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4941   *) ac_try_echo=$ac_try;;
4942 esac
4943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4944 $as_echo "$ac_try_echo"; } >&5
4945   (eval "$ac_try") 2>&5
4946   ac_status=$?
4947   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4948   test $ac_status = 0; } &&
4949          test -f conftest2.$ac_objext && { { case "(($ac_try" in
4950   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4951   *) ac_try_echo=$ac_try;;
4952 esac
4953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4954 $as_echo "$ac_try_echo"; } >&5
4955   (eval "$ac_try") 2>&5
4956   ac_status=$?
4957   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4958   test $ac_status = 0; };
4959       then
4960         # cc works too.
4961         :
4962       else
4963         # cc exists but doesn't like -o.
4964         eval ac_cv_prog_cc_${ac_cc}_c_o=no
4965       fi
4966     fi
4967   fi
4968 else
4969   eval ac_cv_prog_cc_${ac_cc}_c_o=no
4970 fi
4971 rm -f core conftest*
4972
4973 fi
4974 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4976 $as_echo "yes" >&6; }
4977 else
4978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4979 $as_echo "no" >&6; }
4980
4981 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4982
4983 fi
4984
4985 # FIXME: we rely on the cache variable name because
4986 # there is no other way.
4987 set dummy $CC
4988 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4989 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4990 if test "$am_t" != yes; then
4991    # Losing compiler, so override with the script.
4992    # FIXME: It is wrong to rewrite CC.
4993    # But if we don't then we get into trouble of one sort or another.
4994    # A longer-term fix would be to have automake use am__CC in this case,
4995    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4996    CC="$am_aux_dir/compile $CC"
4997 fi
4998
4999
5000 ac_ext=c
5001 ac_cpp='$CPP $CPPFLAGS'
5002 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5003 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5004 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5006 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5007 # On Suns, sometimes $CPP names a directory.
5008 if test -n "$CPP" && test -d "$CPP"; then
5009   CPP=
5010 fi
5011 if test -z "$CPP"; then
5012   if test "${ac_cv_prog_CPP+set}" = set; then :
5013   $as_echo_n "(cached) " >&6
5014 else
5015       # Double quotes because CPP needs to be expanded
5016     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5017     do
5018       ac_preproc_ok=false
5019 for ac_c_preproc_warn_flag in '' yes
5020 do
5021   # Use a header file that comes with gcc, so configuring glibc
5022   # with a fresh cross-compiler works.
5023   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5024   # <limits.h> exists even on freestanding compilers.
5025   # On the NeXT, cc -E runs the code through the compiler's parser,
5026   # not just through cpp. "Syntax error" is here to catch this case.
5027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5028 /* end confdefs.h.  */
5029 #ifdef __STDC__
5030 # include <limits.h>
5031 #else
5032 # include <assert.h>
5033 #endif
5034                      Syntax error
5035 _ACEOF
5036 if ac_fn_c_try_cpp "$LINENO"; then :
5037
5038 else
5039   # Broken: fails on valid input.
5040 continue
5041 fi
5042 rm -f conftest.err conftest.$ac_ext
5043
5044   # OK, works on sane cases.  Now check whether nonexistent headers
5045   # can be detected and how.
5046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5047 /* end confdefs.h.  */
5048 #include <ac_nonexistent.h>
5049 _ACEOF
5050 if ac_fn_c_try_cpp "$LINENO"; then :
5051   # Broken: success on invalid input.
5052 continue
5053 else
5054   # Passes both tests.
5055 ac_preproc_ok=:
5056 break
5057 fi
5058 rm -f conftest.err conftest.$ac_ext
5059
5060 done
5061 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5062 rm -f conftest.err conftest.$ac_ext
5063 if $ac_preproc_ok; then :
5064   break
5065 fi
5066
5067     done
5068     ac_cv_prog_CPP=$CPP
5069
5070 fi
5071   CPP=$ac_cv_prog_CPP
5072 else
5073   ac_cv_prog_CPP=$CPP
5074 fi
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5076 $as_echo "$CPP" >&6; }
5077 ac_preproc_ok=false
5078 for ac_c_preproc_warn_flag in '' yes
5079 do
5080   # Use a header file that comes with gcc, so configuring glibc
5081   # with a fresh cross-compiler works.
5082   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5083   # <limits.h> exists even on freestanding compilers.
5084   # On the NeXT, cc -E runs the code through the compiler's parser,
5085   # not just through cpp. "Syntax error" is here to catch this case.
5086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5087 /* end confdefs.h.  */
5088 #ifdef __STDC__
5089 # include <limits.h>
5090 #else
5091 # include <assert.h>
5092 #endif
5093                      Syntax error
5094 _ACEOF
5095 if ac_fn_c_try_cpp "$LINENO"; then :
5096
5097 else
5098   # Broken: fails on valid input.
5099 continue
5100 fi
5101 rm -f conftest.err conftest.$ac_ext
5102
5103   # OK, works on sane cases.  Now check whether nonexistent headers
5104   # can be detected and how.
5105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106 /* end confdefs.h.  */
5107 #include <ac_nonexistent.h>
5108 _ACEOF
5109 if ac_fn_c_try_cpp "$LINENO"; then :
5110   # Broken: success on invalid input.
5111 continue
5112 else
5113   # Passes both tests.
5114 ac_preproc_ok=:
5115 break
5116 fi
5117 rm -f conftest.err conftest.$ac_ext
5118
5119 done
5120 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5121 rm -f conftest.err conftest.$ac_ext
5122 if $ac_preproc_ok; then :
5123
5124 else
5125   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5127 as_fn_error "C preprocessor \"$CPP\" fails sanity check
5128 See \`config.log' for more details." "$LINENO" 5; }
5129 fi
5130
5131 ac_ext=c
5132 ac_cpp='$CPP $CPPFLAGS'
5133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5136
5137 if test -n "$ac_tool_prefix"; then
5138   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5139 set dummy ${ac_tool_prefix}nm; ac_word=$2
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141 $as_echo_n "checking for $ac_word... " >&6; }
5142 if test "${ac_cv_prog_NM+set}" = set; then :
5143   $as_echo_n "(cached) " >&6
5144 else
5145   if test -n "$NM"; then
5146   ac_cv_prog_NM="$NM" # Let the user override the test.
5147 else
5148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5149 for as_dir in $PATH
5150 do
5151   IFS=$as_save_IFS
5152   test -z "$as_dir" && as_dir=.
5153     for ac_exec_ext in '' $ac_executable_extensions; do
5154   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5155     ac_cv_prog_NM="${ac_tool_prefix}nm"
5156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5157     break 2
5158   fi
5159 done
5160   done
5161 IFS=$as_save_IFS
5162
5163 fi
5164 fi
5165 NM=$ac_cv_prog_NM
5166 if test -n "$NM"; then
5167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5168 $as_echo "$NM" >&6; }
5169 else
5170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5171 $as_echo "no" >&6; }
5172 fi
5173
5174
5175 fi
5176 if test -z "$ac_cv_prog_NM"; then
5177   ac_ct_NM=$NM
5178   # Extract the first word of "nm", so it can be a program name with args.
5179 set dummy nm; ac_word=$2
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5181 $as_echo_n "checking for $ac_word... " >&6; }
5182 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
5183   $as_echo_n "(cached) " >&6
5184 else
5185   if test -n "$ac_ct_NM"; then
5186   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5187 else
5188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189 for as_dir in $PATH
5190 do
5191   IFS=$as_save_IFS
5192   test -z "$as_dir" && as_dir=.
5193     for ac_exec_ext in '' $ac_executable_extensions; do
5194   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195     ac_cv_prog_ac_ct_NM="nm"
5196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197     break 2
5198   fi
5199 done
5200   done
5201 IFS=$as_save_IFS
5202
5203 fi
5204 fi
5205 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5206 if test -n "$ac_ct_NM"; then
5207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5208 $as_echo "$ac_ct_NM" >&6; }
5209 else
5210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5211 $as_echo "no" >&6; }
5212 fi
5213
5214   if test "x$ac_ct_NM" = x; then
5215     NM="nm"
5216   else
5217     case $cross_compiling:$ac_tool_warned in
5218 yes:)
5219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5220 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5221 ac_tool_warned=yes ;;
5222 esac
5223     NM=$ac_ct_NM
5224   fi
5225 else
5226   NM="$ac_cv_prog_NM"
5227 fi
5228
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5230 $as_echo_n "checking whether ln -s works... " >&6; }
5231 LN_S=$as_ln_s
5232 if test "$LN_S" = "ln -s"; then
5233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5234 $as_echo "yes" >&6; }
5235 else
5236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5237 $as_echo "no, using $LN_S" >&6; }
5238 fi
5239
5240 if test -n "$ac_tool_prefix"; then
5241   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5242 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5244 $as_echo_n "checking for $ac_word... " >&6; }
5245 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5246   $as_echo_n "(cached) " >&6
5247 else
5248   if test -n "$RANLIB"; then
5249   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5250 else
5251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252 for as_dir in $PATH
5253 do
5254   IFS=$as_save_IFS
5255   test -z "$as_dir" && as_dir=.
5256     for ac_exec_ext in '' $ac_executable_extensions; do
5257   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5258     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5260     break 2
5261   fi
5262 done
5263   done
5264 IFS=$as_save_IFS
5265
5266 fi
5267 fi
5268 RANLIB=$ac_cv_prog_RANLIB
5269 if test -n "$RANLIB"; then
5270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5271 $as_echo "$RANLIB" >&6; }
5272 else
5273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5274 $as_echo "no" >&6; }
5275 fi
5276
5277
5278 fi
5279 if test -z "$ac_cv_prog_RANLIB"; then
5280   ac_ct_RANLIB=$RANLIB
5281   # Extract the first word of "ranlib", so it can be a program name with args.
5282 set dummy ranlib; ac_word=$2
5283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5284 $as_echo_n "checking for $ac_word... " >&6; }
5285 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5286   $as_echo_n "(cached) " >&6
5287 else
5288   if test -n "$ac_ct_RANLIB"; then
5289   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5290 else
5291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5292 for as_dir in $PATH
5293 do
5294   IFS=$as_save_IFS
5295   test -z "$as_dir" && as_dir=.
5296     for ac_exec_ext in '' $ac_executable_extensions; do
5297   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5298     ac_cv_prog_ac_ct_RANLIB="ranlib"
5299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5300     break 2
5301   fi
5302 done
5303   done
5304 IFS=$as_save_IFS
5305
5306 fi
5307 fi
5308 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5309 if test -n "$ac_ct_RANLIB"; then
5310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5311 $as_echo "$ac_ct_RANLIB" >&6; }
5312 else
5313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314 $as_echo "no" >&6; }
5315 fi
5316
5317   if test "x$ac_ct_RANLIB" = x; then
5318     RANLIB=":"
5319   else
5320     case $cross_compiling:$ac_tool_warned in
5321 yes:)
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5323 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5324 ac_tool_warned=yes ;;
5325 esac
5326     RANLIB=$ac_ct_RANLIB
5327   fi
5328 else
5329   RANLIB="$ac_cv_prog_RANLIB"
5330 fi
5331
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
5333 $as_echo_n "checking for a POSIX-compliant shell... " >&6; }
5334    if test "${ac_cv_path_shell+set}" = set; then :
5335   $as_echo_n "(cached) " >&6
5336 else
5337   ac_command='
5338         # Test the noclobber option, using the portable POSIX.2 syntax.
5339         set -C
5340         rm -f conftest.c
5341         >conftest.c || exit
5342         >|conftest.c || exit
5343         !>conftest.c || exit
5344         # Test that $(...) works.
5345         test "$(expr 3 + 4)" -eq 7 || exit
5346       '
5347       ac_cv_path_shell=no
5348
5349       case $SHELL in
5350       (/*)
5351         rm -f conftest.c
5352         if ("$SHELL" -c "$ac_command") 2>/dev/null; then
5353           ac_cv_path_shell=$SHELL
5354         fi
5355       esac
5356
5357       case $ac_cv_path_shell in
5358       (no)
5359         # Prefer shells that are more likely to be installed in the
5360         # same place on all hosts of this platform.  Therefore, prefer
5361         # shells in /bin and /usr/bin to shells in the installer's
5362         # PATH.  Also, loop through PATH first and then through
5363         # shells, since less-"nice" shells in /bin and /usr/bin are
5364         # more likely to be installed than "nicer" shells elsewhere.
5365         as_save_IFS=$IFS; IFS=:
5366         for as_dir in /bin /usr/bin $PATH
5367         do
5368           IFS=$as_save_IFS
5369           case $as_dir in
5370           (/*)
5371             for ac_base in sh bash ksh sh5; do
5372               rm -f conftest.c
5373               if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
5374                 ac_cv_path_shell=$as_dir/$ac_base
5375                 break
5376               fi
5377             done
5378             case $ac_cv_path_shell in
5379             (/*) break
5380             esac
5381           esac
5382         done
5383         rm -f conftest.c
5384       esac
5385 fi
5386
5387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
5388 $as_echo "$ac_cv_path_shell" >&6; }
5389    SHELL=$ac_cv_path_shell
5390    if test "$SHELL" = no; then
5391      SHELL=/bin/sh
5392      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
5393 $as_echo "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
5394    fi
5395
5396
5397 # Make sure we can run config.sub.
5398 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5399   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5400
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5402 $as_echo_n "checking build system type... " >&6; }
5403 if test "${ac_cv_build+set}" = set; then :
5404   $as_echo_n "(cached) " >&6
5405 else
5406   ac_build_alias=$build_alias
5407 test "x$ac_build_alias" = x &&
5408   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5409 test "x$ac_build_alias" = x &&
5410   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5411 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5412   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5413
5414 fi
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5416 $as_echo "$ac_cv_build" >&6; }
5417 case $ac_cv_build in
5418 *-*-*) ;;
5419 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5420 esac
5421 build=$ac_cv_build
5422 ac_save_IFS=$IFS; IFS='-'
5423 set x $ac_cv_build
5424 shift
5425 build_cpu=$1
5426 build_vendor=$2
5427 shift; shift
5428 # Remember, the first character of IFS is used to create $*,
5429 # except with old shells:
5430 build_os=$*
5431 IFS=$ac_save_IFS
5432 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5433
5434
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5436 $as_echo_n "checking host system type... " >&6; }
5437 if test "${ac_cv_host+set}" = set; then :
5438   $as_echo_n "(cached) " >&6
5439 else
5440   if test "x$host_alias" = x; then
5441   ac_cv_host=$ac_cv_build
5442 else
5443   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5444     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5445 fi
5446
5447 fi
5448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5449 $as_echo "$ac_cv_host" >&6; }
5450 case $ac_cv_host in
5451 *-*-*) ;;
5452 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5453 esac
5454 host=$ac_cv_host
5455 ac_save_IFS=$IFS; IFS='-'
5456 set x $ac_cv_host
5457 shift
5458 host_cpu=$1
5459 host_vendor=$2
5460 shift; shift
5461 # Remember, the first character of IFS is used to create $*,
5462 # except with old shells:
5463 host_os=$*
5464 IFS=$ac_save_IFS
5465 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5466
5467
5468
5469
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5471 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5472 if test "${ac_cv_path_GREP+set}" = set; then :
5473   $as_echo_n "(cached) " >&6
5474 else
5475   if test -z "$GREP"; then
5476   ac_path_GREP_found=false
5477   # Loop through the user's path and test for each of PROGNAME-LIST
5478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5479 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5480 do
5481   IFS=$as_save_IFS
5482   test -z "$as_dir" && as_dir=.
5483     for ac_prog in grep ggrep; do
5484     for ac_exec_ext in '' $ac_executable_extensions; do
5485       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5486       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5487 # Check for GNU ac_path_GREP and select it if it is found.
5488   # Check for GNU $ac_path_GREP
5489 case `"$ac_path_GREP" --version 2>&1` in
5490 *GNU*)
5491   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5492 *)
5493   ac_count=0
5494   $as_echo_n 0123456789 >"conftest.in"
5495   while :
5496   do
5497     cat "conftest.in" "conftest.in" >"conftest.tmp"
5498     mv "conftest.tmp" "conftest.in"
5499     cp "conftest.in" "conftest.nl"
5500     $as_echo 'GREP' >> "conftest.nl"
5501     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5502     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5503     as_fn_arith $ac_count + 1 && ac_count=$as_val
5504     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5505       # Best one so far, save it but keep looking for a better one
5506       ac_cv_path_GREP="$ac_path_GREP"
5507       ac_path_GREP_max=$ac_count
5508     fi
5509     # 10*(2^10) chars as input seems more than enough
5510     test $ac_count -gt 10 && break
5511   done
5512   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5513 esac
5514
5515       $ac_path_GREP_found && break 3
5516     done
5517   done
5518   done
5519 IFS=$as_save_IFS
5520   if test -z "$ac_cv_path_GREP"; then
5521     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5522   fi
5523 else
5524   ac_cv_path_GREP=$GREP
5525 fi
5526
5527 fi
5528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5529 $as_echo "$ac_cv_path_GREP" >&6; }
5530  GREP="$ac_cv_path_GREP"
5531
5532
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5534 $as_echo_n "checking for egrep... " >&6; }
5535 if test "${ac_cv_path_EGREP+set}" = set; then :
5536   $as_echo_n "(cached) " >&6
5537 else
5538   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5539    then ac_cv_path_EGREP="$GREP -E"
5540    else
5541      if test -z "$EGREP"; then
5542   ac_path_EGREP_found=false
5543   # Loop through the user's path and test for each of PROGNAME-LIST
5544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5545 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5546 do
5547   IFS=$as_save_IFS
5548   test -z "$as_dir" && as_dir=.
5549     for ac_prog in egrep; do
5550     for ac_exec_ext in '' $ac_executable_extensions; do
5551       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5552       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5553 # Check for GNU ac_path_EGREP and select it if it is found.
5554   # Check for GNU $ac_path_EGREP
5555 case `"$ac_path_EGREP" --version 2>&1` in
5556 *GNU*)
5557   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5558 *)
5559   ac_count=0
5560   $as_echo_n 0123456789 >"conftest.in"
5561   while :
5562   do
5563     cat "conftest.in" "conftest.in" >"conftest.tmp"
5564     mv "conftest.tmp" "conftest.in"
5565     cp "conftest.in" "conftest.nl"
5566     $as_echo 'EGREP' >> "conftest.nl"
5567     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5568     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5569     as_fn_arith $ac_count + 1 && ac_count=$as_val
5570     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5571       # Best one so far, save it but keep looking for a better one
5572       ac_cv_path_EGREP="$ac_path_EGREP"
5573       ac_path_EGREP_max=$ac_count
5574     fi
5575     # 10*(2^10) chars as input seems more than enough
5576     test $ac_count -gt 10 && break
5577   done
5578   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5579 esac
5580
5581       $ac_path_EGREP_found && break 3
5582     done
5583   done
5584   done
5585 IFS=$as_save_IFS
5586   if test -z "$ac_cv_path_EGREP"; then
5587     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5588   fi
5589 else
5590   ac_cv_path_EGREP=$EGREP
5591 fi
5592
5593    fi
5594 fi
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5596 $as_echo "$ac_cv_path_EGREP" >&6; }
5597  EGREP="$ac_cv_path_EGREP"
5598
5599
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5601 $as_echo_n "checking for ANSI C header files... " >&6; }
5602 if test "${ac_cv_header_stdc+set}" = set; then :
5603   $as_echo_n "(cached) " >&6
5604 else
5605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5606 /* end confdefs.h.  */
5607 #include <stdlib.h>
5608 #include <stdarg.h>
5609 #include <string.h>
5610 #include <float.h>
5611
5612 int
5613 main ()
5614 {
5615
5616   ;
5617   return 0;
5618 }
5619 _ACEOF
5620 if ac_fn_c_try_compile "$LINENO"; then :
5621   ac_cv_header_stdc=yes
5622 else
5623   ac_cv_header_stdc=no
5624 fi
5625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5626
5627 if test $ac_cv_header_stdc = yes; then
5628   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630 /* end confdefs.h.  */
5631 #include <string.h>
5632
5633 _ACEOF
5634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5635   $EGREP "memchr" >/dev/null 2>&1; then :
5636
5637 else
5638   ac_cv_header_stdc=no
5639 fi
5640 rm -f conftest*
5641
5642 fi
5643
5644 if test $ac_cv_header_stdc = yes; then
5645   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5647 /* end confdefs.h.  */
5648 #include <stdlib.h>
5649
5650 _ACEOF
5651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5652   $EGREP "free" >/dev/null 2>&1; then :
5653
5654 else
5655   ac_cv_header_stdc=no
5656 fi
5657 rm -f conftest*
5658
5659 fi
5660
5661 if test $ac_cv_header_stdc = yes; then
5662   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5663   if test "$cross_compiling" = yes; then :
5664   :
5665 else
5666   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5667 /* end confdefs.h.  */
5668 #include <ctype.h>
5669 #include <stdlib.h>
5670 #if ((' ' & 0x0FF) == 0x020)
5671 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5672 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5673 #else
5674 # define ISLOWER(c) \
5675                    (('a' <= (c) && (c) <= 'i') \
5676                      || ('j' <= (c) && (c) <= 'r') \
5677                      || ('s' <= (c) && (c) <= 'z'))
5678 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5679 #endif
5680
5681 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5682 int
5683 main ()
5684 {
5685   int i;
5686   for (i = 0; i < 256; i++)
5687     if (XOR (islower (i), ISLOWER (i))
5688         || toupper (i) != TOUPPER (i))
5689       return 2;
5690   return 0;
5691 }
5692 _ACEOF
5693 if ac_fn_c_try_run "$LINENO"; then :
5694
5695 else
5696   ac_cv_header_stdc=no
5697 fi
5698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5699   conftest.$ac_objext conftest.beam conftest.$ac_ext
5700 fi
5701
5702 fi
5703 fi
5704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5705 $as_echo "$ac_cv_header_stdc" >&6; }
5706 if test $ac_cv_header_stdc = yes; then
5707
5708 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5709
5710 fi
5711
5712 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5713 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5714                   inttypes.h stdint.h unistd.h
5715 do :
5716   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5717 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5718 "
5719 eval as_val=\$$as_ac_Header
5720    if test "x$as_val" = x""yes; then :
5721   cat >>confdefs.h <<_ACEOF
5722 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5723 _ACEOF
5724
5725 fi
5726
5727 done
5728
5729
5730
5731
5732
5733   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5734 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5735   MINIX=yes
5736 else
5737   MINIX=
5738 fi
5739
5740
5741   if test "$MINIX" = yes; then
5742
5743 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5744
5745
5746 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5747
5748
5749 $as_echo "#define _MINIX 1" >>confdefs.h
5750
5751   fi
5752
5753         case "$host_os" in
5754     hpux*)
5755
5756 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5757
5758       ;;
5759   esac
5760
5761
5762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5763 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5764 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5765   $as_echo_n "(cached) " >&6
5766 else
5767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5768 /* end confdefs.h.  */
5769
5770 #         define __EXTENSIONS__ 1
5771           $ac_includes_default
5772 int
5773 main ()
5774 {
5775
5776   ;
5777   return 0;
5778 }
5779 _ACEOF
5780 if ac_fn_c_try_compile "$LINENO"; then :
5781   ac_cv_safe_to_define___extensions__=yes
5782 else
5783   ac_cv_safe_to_define___extensions__=no
5784 fi
5785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5786 fi
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5788 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5789   test $ac_cv_safe_to_define___extensions__ = yes &&
5790     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5791
5792   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5793
5794   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5795
5796   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5797
5798   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5799
5800
5801
5802
5803
5804
5805
5806
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5808 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5809 if test "${ac_cv_sys_largefile_source+set}" = set; then :
5810   $as_echo_n "(cached) " >&6
5811 else
5812   while :; do
5813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5814 /* end confdefs.h.  */
5815 #include <sys/types.h> /* for off_t */
5816      #include <stdio.h>
5817 int
5818 main ()
5819 {
5820 int (*fp) (FILE *, off_t, int) = fseeko;
5821      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5822   ;
5823   return 0;
5824 }
5825 _ACEOF
5826 if ac_fn_c_try_link "$LINENO"; then :
5827   ac_cv_sys_largefile_source=no; break
5828 fi
5829 rm -f core conftest.err conftest.$ac_objext \
5830     conftest$ac_exeext conftest.$ac_ext
5831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5832 /* end confdefs.h.  */
5833 #define _LARGEFILE_SOURCE 1
5834 #include <sys/types.h> /* for off_t */
5835      #include <stdio.h>
5836 int
5837 main ()
5838 {
5839 int (*fp) (FILE *, off_t, int) = fseeko;
5840      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5841   ;
5842   return 0;
5843 }
5844 _ACEOF
5845 if ac_fn_c_try_link "$LINENO"; then :
5846   ac_cv_sys_largefile_source=1; break
5847 fi
5848 rm -f core conftest.err conftest.$ac_objext \
5849     conftest$ac_exeext conftest.$ac_ext
5850   ac_cv_sys_largefile_source=unknown
5851   break
5852 done
5853 fi
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
5855 $as_echo "$ac_cv_sys_largefile_source" >&6; }
5856 case $ac_cv_sys_largefile_source in #(
5857   no | unknown) ;;
5858   *)
5859 cat >>confdefs.h <<_ACEOF
5860 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5861 _ACEOF
5862 ;;
5863 esac
5864 rm -rf conftest*
5865
5866 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5867 # in glibc 2.1.3, but that breaks too many other things.
5868 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5869 if test $ac_cv_sys_largefile_source != unknown; then
5870
5871 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
5872
5873 fi
5874
5875
5876
5877
5878   # IEEE behaviour is the default on all CPUs except Alpha and SH
5879   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5880   # and the GCC 4.1.2 manual).
5881   case "$host_cpu" in
5882     alpha*)
5883       # On Alpha systems, a compiler option provides the behaviour.
5884       # See the ieee(3) manual page, also available at
5885       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5886       if test -n "$GCC"; then
5887         # GCC has the option -mieee.
5888         CPPFLAGS="$CPPFLAGS -mieee"
5889       else
5890         # Compaq (ex-DEC) C has the option -ieee.
5891         CPPFLAGS="$CPPFLAGS -ieee"
5892       fi
5893       ;;
5894     sh*)
5895       if test -n "$GCC"; then
5896         # GCC has the option -mieee.
5897         CPPFLAGS="$CPPFLAGS -mieee"
5898       fi
5899       ;;
5900   esac
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910 # Check whether --enable-largefile was given.
5911 if test "${enable_largefile+set}" = set; then :
5912   enableval=$enable_largefile;
5913 fi
5914
5915 if test "$enable_largefile" != no; then
5916
5917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5918 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5919 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5920   $as_echo_n "(cached) " >&6
5921 else
5922   ac_cv_sys_largefile_CC=no
5923      if test "$GCC" != yes; then
5924        ac_save_CC=$CC
5925        while :; do
5926          # IRIX 6.2 and later do not support large files by default,
5927          # so use the C compiler's -n32 option if that helps.
5928          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929 /* end confdefs.h.  */
5930 #include <sys/types.h>
5931  /* Check that off_t can represent 2**63 - 1 correctly.
5932     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5933     since some C++ compilers masquerading as C compilers
5934     incorrectly reject 9223372036854775807.  */
5935 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5936   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5937                        && LARGE_OFF_T % 2147483647 == 1)
5938                       ? 1 : -1];
5939 int
5940 main ()
5941 {
5942
5943   ;
5944   return 0;
5945 }
5946 _ACEOF
5947          if ac_fn_c_try_compile "$LINENO"; then :
5948   break
5949 fi
5950 rm -f core conftest.err conftest.$ac_objext
5951          CC="$CC -n32"
5952          if ac_fn_c_try_compile "$LINENO"; then :
5953   ac_cv_sys_largefile_CC=' -n32'; break
5954 fi
5955 rm -f core conftest.err conftest.$ac_objext
5956          break
5957        done
5958        CC=$ac_save_CC
5959        rm -f conftest.$ac_ext
5960     fi
5961 fi
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5963 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5964   if test "$ac_cv_sys_largefile_CC" != no; then
5965     CC=$CC$ac_cv_sys_largefile_CC
5966   fi
5967
5968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5969 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5970 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5971   $as_echo_n "(cached) " >&6
5972 else
5973   while :; do
5974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5975 /* end confdefs.h.  */
5976 #include <sys/types.h>
5977  /* Check that off_t can represent 2**63 - 1 correctly.
5978     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5979     since some C++ compilers masquerading as C compilers
5980     incorrectly reject 9223372036854775807.  */
5981 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5982   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5983                        && LARGE_OFF_T % 2147483647 == 1)
5984                       ? 1 : -1];
5985 int
5986 main ()
5987 {
5988
5989   ;
5990   return 0;
5991 }
5992 _ACEOF
5993 if ac_fn_c_try_compile "$LINENO"; then :
5994   ac_cv_sys_file_offset_bits=no; break
5995 fi
5996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5998 /* end confdefs.h.  */
5999 #define _FILE_OFFSET_BITS 64
6000 #include <sys/types.h>
6001  /* Check that off_t can represent 2**63 - 1 correctly.
6002     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6003     since some C++ compilers masquerading as C compilers
6004     incorrectly reject 9223372036854775807.  */
6005 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6006   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6007                        && LARGE_OFF_T % 2147483647 == 1)
6008                       ? 1 : -1];
6009 int
6010 main ()
6011 {
6012
6013   ;
6014   return 0;
6015 }
6016 _ACEOF
6017 if ac_fn_c_try_compile "$LINENO"; then :
6018   ac_cv_sys_file_offset_bits=64; break
6019 fi
6020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6021   ac_cv_sys_file_offset_bits=unknown
6022   break
6023 done
6024 fi
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6026 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6027 case $ac_cv_sys_file_offset_bits in #(
6028   no | unknown) ;;
6029   *)
6030 cat >>confdefs.h <<_ACEOF
6031 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6032 _ACEOF
6033 ;;
6034 esac
6035 rm -rf conftest*
6036   if test $ac_cv_sys_file_offset_bits = unknown; then
6037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6038 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6039 if test "${ac_cv_sys_large_files+set}" = set; then :
6040   $as_echo_n "(cached) " >&6
6041 else
6042   while :; do
6043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h.  */
6045 #include <sys/types.h>
6046  /* Check that off_t can represent 2**63 - 1 correctly.
6047     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6048     since some C++ compilers masquerading as C compilers
6049     incorrectly reject 9223372036854775807.  */
6050 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6051   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6052                        && LARGE_OFF_T % 2147483647 == 1)
6053                       ? 1 : -1];
6054 int
6055 main ()
6056 {
6057
6058   ;
6059   return 0;
6060 }
6061 _ACEOF
6062 if ac_fn_c_try_compile "$LINENO"; then :
6063   ac_cv_sys_large_files=no; break
6064 fi
6065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067 /* end confdefs.h.  */
6068 #define _LARGE_FILES 1
6069 #include <sys/types.h>
6070  /* Check that off_t can represent 2**63 - 1 correctly.
6071     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6072     since some C++ compilers masquerading as C compilers
6073     incorrectly reject 9223372036854775807.  */
6074 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6075   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6076                        && LARGE_OFF_T % 2147483647 == 1)
6077                       ? 1 : -1];
6078 int
6079 main ()
6080 {
6081
6082   ;
6083   return 0;
6084 }
6085 _ACEOF
6086 if ac_fn_c_try_compile "$LINENO"; then :
6087   ac_cv_sys_large_files=1; break
6088 fi
6089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6090   ac_cv_sys_large_files=unknown
6091   break
6092 done
6093 fi
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6095 $as_echo "$ac_cv_sys_large_files" >&6; }
6096 case $ac_cv_sys_large_files in #(
6097   no | unknown) ;;
6098   *)
6099 cat >>confdefs.h <<_ACEOF
6100 #define _LARGE_FILES $ac_cv_sys_large_files
6101 _ACEOF
6102 ;;
6103 esac
6104 rm -rf conftest*
6105   fi
6106 fi
6107
6108
6109
6110
6111
6112
6113
6114 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6115 # for constant arguments.  Useless!
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6117 $as_echo_n "checking for working alloca.h... " >&6; }
6118 if test "${ac_cv_working_alloca_h+set}" = set; then :
6119   $as_echo_n "(cached) " >&6
6120 else
6121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6122 /* end confdefs.h.  */
6123 #include <alloca.h>
6124 int
6125 main ()
6126 {
6127 char *p = (char *) alloca (2 * sizeof (int));
6128                           if (p) return 0;
6129   ;
6130   return 0;
6131 }
6132 _ACEOF
6133 if ac_fn_c_try_link "$LINENO"; then :
6134   ac_cv_working_alloca_h=yes
6135 else
6136   ac_cv_working_alloca_h=no
6137 fi
6138 rm -f core conftest.err conftest.$ac_objext \
6139     conftest$ac_exeext conftest.$ac_ext
6140 fi
6141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6142 $as_echo "$ac_cv_working_alloca_h" >&6; }
6143 if test $ac_cv_working_alloca_h = yes; then
6144
6145 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6146
6147 fi
6148
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6150 $as_echo_n "checking for alloca... " >&6; }
6151 if test "${ac_cv_func_alloca_works+set}" = set; then :
6152   $as_echo_n "(cached) " >&6
6153 else
6154   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6155 /* end confdefs.h.  */
6156 #ifdef __GNUC__
6157 # define alloca __builtin_alloca
6158 #else
6159 # ifdef _MSC_VER
6160 #  include <malloc.h>
6161 #  define alloca _alloca
6162 # else
6163 #  ifdef HAVE_ALLOCA_H
6164 #   include <alloca.h>
6165 #  else
6166 #   ifdef _AIX
6167  #pragma alloca
6168 #   else
6169 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6170 char *alloca ();
6171 #    endif
6172 #   endif
6173 #  endif
6174 # endif
6175 #endif
6176
6177 int
6178 main ()
6179 {
6180 char *p = (char *) alloca (1);
6181                                     if (p) return 0;
6182   ;
6183   return 0;
6184 }
6185 _ACEOF
6186 if ac_fn_c_try_link "$LINENO"; then :
6187   ac_cv_func_alloca_works=yes
6188 else
6189   ac_cv_func_alloca_works=no
6190 fi
6191 rm -f core conftest.err conftest.$ac_objext \
6192     conftest$ac_exeext conftest.$ac_ext
6193 fi
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6195 $as_echo "$ac_cv_func_alloca_works" >&6; }
6196
6197 if test $ac_cv_func_alloca_works = yes; then
6198
6199 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6200
6201 else
6202   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6203 # that cause trouble.  Some versions do not even contain alloca or
6204 # contain a buggy version.  If you still want to use their alloca,
6205 # use ar to extract alloca.o from them instead of compiling alloca.c.
6206
6207
6208
6209
6210
6211 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6212
6213 $as_echo "#define C_ALLOCA 1" >>confdefs.h
6214
6215
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6217 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6218 if test "${ac_cv_os_cray+set}" = set; then :
6219   $as_echo_n "(cached) " >&6
6220 else
6221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6222 /* end confdefs.h.  */
6223 #if defined CRAY && ! defined CRAY2
6224 webecray
6225 #else
6226 wenotbecray
6227 #endif
6228
6229 _ACEOF
6230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6231   $EGREP "webecray" >/dev/null 2>&1; then :
6232   ac_cv_os_cray=yes
6233 else
6234   ac_cv_os_cray=no
6235 fi
6236 rm -f conftest*
6237
6238 fi
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6240 $as_echo "$ac_cv_os_cray" >&6; }
6241 if test $ac_cv_os_cray = yes; then
6242   for ac_func in _getb67 GETB67 getb67; do
6243     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6244 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6245 eval as_val=\$$as_ac_var
6246    if test "x$as_val" = x""yes; then :
6247
6248 cat >>confdefs.h <<_ACEOF
6249 #define CRAY_STACKSEG_END $ac_func
6250 _ACEOF
6251
6252     break
6253 fi
6254
6255   done
6256 fi
6257
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6259 $as_echo_n "checking stack direction for C alloca... " >&6; }
6260 if test "${ac_cv_c_stack_direction+set}" = set; then :
6261   $as_echo_n "(cached) " >&6
6262 else
6263   if test "$cross_compiling" = yes; then :
6264   ac_cv_c_stack_direction=0
6265 else
6266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6267 /* end confdefs.h.  */
6268 $ac_includes_default
6269 int
6270 find_stack_direction ()
6271 {
6272   static char *addr = 0;
6273   auto char dummy;
6274   if (addr == 0)
6275     {
6276       addr = &dummy;
6277       return find_stack_direction ();
6278     }
6279   else
6280     return (&dummy > addr) ? 1 : -1;
6281 }
6282
6283 int
6284 main ()
6285 {
6286   return find_stack_direction () < 0;
6287 }
6288 _ACEOF
6289 if ac_fn_c_try_run "$LINENO"; then :
6290   ac_cv_c_stack_direction=1
6291 else
6292   ac_cv_c_stack_direction=-1
6293 fi
6294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6295   conftest.$ac_objext conftest.beam conftest.$ac_ext
6296 fi
6297
6298 fi
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6300 $as_echo "$ac_cv_c_stack_direction" >&6; }
6301 cat >>confdefs.h <<_ACEOF
6302 #define STACK_DIRECTION $ac_cv_c_stack_direction
6303 _ACEOF
6304
6305
6306 fi
6307
6308 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6309 if test "x$ac_cv_type_size_t" = x""yes; then :
6310
6311 else
6312
6313 cat >>confdefs.h <<_ACEOF
6314 #define size_t unsigned int
6315 _ACEOF
6316
6317 fi
6318
6319
6320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
6321 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
6322 if test "${gl_cv_func_malloc_posix+set}" = set; then :
6323   $as_echo_n "(cached) " >&6
6324 else
6325
6326                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327 /* end confdefs.h.  */
6328
6329 int
6330 main ()
6331 {
6332 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6333          choke me
6334          #endif
6335
6336   ;
6337   return 0;
6338 }
6339 _ACEOF
6340 if ac_fn_c_try_compile "$LINENO"; then :
6341   gl_cv_func_malloc_posix=yes
6342 else
6343   gl_cv_func_malloc_posix=no
6344 fi
6345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6346
6347 fi
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
6349 $as_echo "$gl_cv_func_malloc_posix" >&6; }
6350
6351
6352   GNULIB_ATOLL=0;
6353   GNULIB_CALLOC_POSIX=0;
6354   GNULIB_CANONICALIZE_FILE_NAME=0;
6355   GNULIB_GETLOADAVG=0;
6356   GNULIB_GETSUBOPT=0;
6357   GNULIB_MALLOC_POSIX=0;
6358   GNULIB_MKDTEMP=0;
6359   GNULIB_MKOSTEMP=0;
6360   GNULIB_MKOSTEMPS=0;
6361   GNULIB_MKSTEMP=0;
6362   GNULIB_MKSTEMPS=0;
6363   GNULIB_PUTENV=0;
6364   GNULIB_RANDOM_R=0;
6365   GNULIB_REALLOC_POSIX=0;
6366   GNULIB_REALPATH=0;
6367   GNULIB_RPMATCH=0;
6368   GNULIB_SETENV=0;
6369   GNULIB_STRTOD=0;
6370   GNULIB_STRTOLL=0;
6371   GNULIB_STRTOULL=0;
6372   GNULIB_UNSETENV=0;
6373     HAVE_ATOLL=1;
6374   HAVE_CALLOC_POSIX=1;
6375   HAVE_CANONICALIZE_FILE_NAME=1;
6376   HAVE_DECL_GETLOADAVG=1;
6377   HAVE_GETSUBOPT=1;
6378   HAVE_MALLOC_POSIX=1;
6379   HAVE_MKDTEMP=1;
6380   HAVE_MKOSTEMP=1;
6381   HAVE_MKOSTEMPS=1;
6382   HAVE_MKSTEMPS=1;
6383   HAVE_RANDOM_R=1;
6384   HAVE_REALLOC_POSIX=1;
6385   HAVE_REALPATH=1;
6386   HAVE_RPMATCH=1;
6387   HAVE_SETENV=1;
6388   HAVE_STRTOD=1;
6389   HAVE_STRTOLL=1;
6390   HAVE_STRTOULL=1;
6391   HAVE_STRUCT_RANDOM_DATA=1;
6392   HAVE_SYS_LOADAVG_H=0;
6393   HAVE_UNSETENV=1;
6394   REPLACE_CANONICALIZE_FILE_NAME=0;
6395   REPLACE_MKSTEMP=0;
6396   REPLACE_PUTENV=0;
6397   REPLACE_REALPATH=0;
6398   REPLACE_SETENV=0;
6399   REPLACE_STRTOD=0;
6400   REPLACE_UNSETENV=0;
6401
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6403 $as_echo_n "checking for inline... " >&6; }
6404 if test "${ac_cv_c_inline+set}" = set; then :
6405   $as_echo_n "(cached) " >&6
6406 else
6407   ac_cv_c_inline=no
6408 for ac_kw in inline __inline__ __inline; do
6409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6410 /* end confdefs.h.  */
6411 #ifndef __cplusplus
6412 typedef int foo_t;
6413 static $ac_kw foo_t static_foo () {return 0; }
6414 $ac_kw foo_t foo () {return 0; }
6415 #endif
6416
6417 _ACEOF
6418 if ac_fn_c_try_compile "$LINENO"; then :
6419   ac_cv_c_inline=$ac_kw
6420 fi
6421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6422   test "$ac_cv_c_inline" != no && break
6423 done
6424
6425 fi
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6427 $as_echo "$ac_cv_c_inline" >&6; }
6428
6429 case $ac_cv_c_inline in
6430   inline | yes) ;;
6431   *)
6432     case $ac_cv_c_inline in
6433       no) ac_val=;;
6434       *) ac_val=$ac_cv_c_inline;;
6435     esac
6436     cat >>confdefs.h <<_ACEOF
6437 #ifndef __cplusplus
6438 #define inline $ac_val
6439 #endif
6440 _ACEOF
6441     ;;
6442 esac
6443
6444
6445   GNULIB_CHOWN=0;
6446   GNULIB_CLOSE=0;
6447   GNULIB_DUP2=0;
6448   GNULIB_DUP3=0;
6449   GNULIB_ENVIRON=0;
6450   GNULIB_EUIDACCESS=0;
6451   GNULIB_FACCESSAT=0;
6452   GNULIB_FCHDIR=0;
6453   GNULIB_FCHOWNAT=0;
6454   GNULIB_FSYNC=0;
6455   GNULIB_FTRUNCATE=0;
6456   GNULIB_GETCWD=0;
6457   GNULIB_GETDOMAINNAME=0;
6458   GNULIB_GETDTABLESIZE=0;
6459   GNULIB_GETGROUPS=0;
6460   GNULIB_GETHOSTNAME=0;
6461   GNULIB_GETLOGIN=0;
6462   GNULIB_GETLOGIN_R=0;
6463   GNULIB_GETPAGESIZE=0;
6464   GNULIB_GETUSERSHELL=0;
6465   GNULIB_LCHOWN=0;
6466   GNULIB_LINK=0;
6467   GNULIB_LINKAT=0;
6468   GNULIB_LSEEK=0;
6469   GNULIB_PIPE2=0;
6470   GNULIB_PREAD=0;
6471   GNULIB_READLINK=0;
6472   GNULIB_READLINKAT=0;
6473   GNULIB_RMDIR=0;
6474   GNULIB_SLEEP=0;
6475   GNULIB_SYMLINK=0;
6476   GNULIB_SYMLINKAT=0;
6477   GNULIB_UNISTD_H_GETOPT=0;
6478   GNULIB_UNISTD_H_SIGPIPE=0;
6479   GNULIB_UNLINK=0;
6480   GNULIB_UNLINKAT=0;
6481   GNULIB_USLEEP=0;
6482   GNULIB_WRITE=0;
6483     HAVE_CHOWN=1;
6484   HAVE_DUP2=1;
6485   HAVE_DUP3=1;
6486   HAVE_EUIDACCESS=1;
6487   HAVE_FACCESSAT=1;
6488   HAVE_FCHOWNAT=1;
6489   HAVE_FSYNC=1;
6490   HAVE_FTRUNCATE=1;
6491   HAVE_GETDOMAINNAME=1;
6492   HAVE_GETDTABLESIZE=1;
6493   HAVE_GETGROUPS=1;
6494   HAVE_GETHOSTNAME=1;
6495   HAVE_GETLOGIN=1;
6496   HAVE_GETPAGESIZE=1;
6497   HAVE_GETUSERSHELL=1;
6498   HAVE_LCHOWN=1;
6499   HAVE_LINK=1;
6500   HAVE_LINKAT=1;
6501   HAVE_PIPE2=1;
6502   HAVE_PREAD=1;
6503   HAVE_READLINK=1;
6504   HAVE_READLINKAT=1;
6505   HAVE_SLEEP=1;
6506   HAVE_SYMLINK=1;
6507   HAVE_SYMLINKAT=1;
6508   HAVE_DECL_ENVIRON=1;
6509   HAVE_DECL_GETLOGIN_R=1;
6510   HAVE_OS_H=0;
6511   HAVE_SYS_PARAM_H=0;
6512   HAVE_UNLINKAT=1;
6513   HAVE_USLEEP=1;
6514   REPLACE_CHOWN=0;
6515   REPLACE_CLOSE=0;
6516   REPLACE_DUP=0;
6517   REPLACE_DUP2=0;
6518   REPLACE_FCHDIR=0;
6519   REPLACE_FCHOWNAT=0;
6520   REPLACE_GETCWD=0;
6521   REPLACE_GETGROUPS=0;
6522   REPLACE_GETPAGESIZE=0;
6523   REPLACE_LCHOWN=0;
6524   REPLACE_LINK=0;
6525   REPLACE_LINKAT=0;
6526   REPLACE_LSEEK=0;
6527   REPLACE_PREAD=0;
6528   REPLACE_READLINK=0;
6529   REPLACE_RMDIR=0;
6530   REPLACE_SLEEP=0;
6531   REPLACE_SYMLINK=0;
6532   REPLACE_UNLINK=0;
6533   REPLACE_UNLINKAT=0;
6534   REPLACE_USLEEP=0;
6535   REPLACE_WRITE=0;
6536   UNISTD_H_HAVE_WINSOCK2_H=0;
6537   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6538
6539
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6541 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6542 if test "${ac_cv_type_uid_t+set}" = set; then :
6543   $as_echo_n "(cached) " >&6
6544 else
6545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6546 /* end confdefs.h.  */
6547 #include <sys/types.h>
6548
6549 _ACEOF
6550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6551   $EGREP "uid_t" >/dev/null 2>&1; then :
6552   ac_cv_type_uid_t=yes
6553 else
6554   ac_cv_type_uid_t=no
6555 fi
6556 rm -f conftest*
6557
6558 fi
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6560 $as_echo "$ac_cv_type_uid_t" >&6; }
6561 if test $ac_cv_type_uid_t = no; then
6562
6563 $as_echo "#define uid_t int" >>confdefs.h
6564
6565
6566 $as_echo "#define gid_t int" >>confdefs.h
6567
6568 fi
6569
6570 for ac_header in unistd.h
6571 do :
6572   ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
6573 if test "x$ac_cv_header_unistd_h" = x""yes; then :
6574   cat >>confdefs.h <<_ACEOF
6575 #define HAVE_UNISTD_H 1
6576 _ACEOF
6577
6578 fi
6579
6580 done
6581
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
6583 $as_echo_n "checking for working chown... " >&6; }
6584 if test "${ac_cv_func_chown_works+set}" = set; then :
6585   $as_echo_n "(cached) " >&6
6586 else
6587   if test "$cross_compiling" = yes; then :
6588   ac_cv_func_chown_works=no
6589 else
6590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6591 /* end confdefs.h.  */
6592 $ac_includes_default
6593 #include <fcntl.h>
6594
6595 int
6596 main ()
6597 {
6598   char *f = "conftest.chown";
6599   struct stat before, after;
6600
6601   if (creat (f, 0600) < 0)
6602     return 1;
6603   if (stat (f, &before) < 0)
6604     return 1;
6605   if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
6606     return 1;
6607   if (stat (f, &after) < 0)
6608     return 1;
6609   return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
6610
6611   ;
6612   return 0;
6613 }
6614 _ACEOF
6615 if ac_fn_c_try_run "$LINENO"; then :
6616   ac_cv_func_chown_works=yes
6617 else
6618   ac_cv_func_chown_works=no
6619 fi
6620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6621   conftest.$ac_objext conftest.beam conftest.$ac_ext
6622 fi
6623
6624 rm -f conftest.chown
6625
6626 fi
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
6628 $as_echo "$ac_cv_func_chown_works" >&6; }
6629 if test $ac_cv_func_chown_works = yes; then
6630
6631 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
6632
6633 fi
6634
6635
6636   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
6637 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
6638 if test "${gl_cv_func_chown_follows_symlink+set}" = set; then :
6639   $as_echo_n "(cached) " >&6
6640 else
6641
6642       if test "$cross_compiling" = yes; then :
6643   gl_cv_func_chown_follows_symlink=yes
6644
6645 else
6646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6647 /* end confdefs.h.  */
6648
6649 #include <unistd.h>
6650 #include <stdlib.h>
6651 #include <errno.h>
6652
6653         int
6654         main ()
6655         {
6656           char const *dangling_symlink = "conftest.dangle";
6657
6658           unlink (dangling_symlink);
6659           if (symlink ("conftest.no-such", dangling_symlink))
6660             abort ();
6661
6662           /* Exit successfully on a conforming system,
6663              i.e., where chown must fail with ENOENT.  */
6664           exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0
6665                     && errno == ENOENT));
6666         }
6667
6668 _ACEOF
6669 if ac_fn_c_try_run "$LINENO"; then :
6670   gl_cv_func_chown_follows_symlink=yes
6671 else
6672   gl_cv_func_chown_follows_symlink=no
6673 fi
6674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6675   conftest.$ac_objext conftest.beam conftest.$ac_ext
6676 fi
6677
6678
6679
6680 fi
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
6682 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
6683
6684   if test $gl_cv_func_chown_follows_symlink = no; then
6685
6686 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
6687
6688   fi
6689
6690
6691
6692
6693   for ac_func in $ac_func_list
6694 do :
6695   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6696 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6697 eval as_val=\$$as_ac_var
6698    if test "x$as_val" = x""yes; then :
6699   cat >>confdefs.h <<_ACEOF
6700 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6701 _ACEOF
6702
6703 fi
6704 done
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717     if test $ac_cv_func_chown = no; then
6718     HAVE_CHOWN=0
6719
6720
6721
6722
6723
6724
6725
6726
6727   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6728
6729   else
6730         if test $gl_cv_func_chown_follows_symlink = no; then
6731       REPLACE_CHOWN=1
6732
6733
6734
6735
6736
6737
6738
6739
6740   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6741
6742     fi
6743
6744         if test $ac_cv_func_chown_works = no; then
6745
6746 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
6747
6748       REPLACE_CHOWN=1
6749
6750
6751
6752
6753
6754
6755
6756
6757   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6758
6759     fi
6760
6761             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
6762 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
6763 if test "${gl_cv_func_chown_slash_works+set}" = set; then :
6764   $as_echo_n "(cached) " >&6
6765 else
6766   touch conftest.file && rm -f conftest.link
6767        if test "$cross_compiling" = yes; then :
6768   gl_cv_func_chown_slash_works="guessing no"
6769 else
6770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6771 /* end confdefs.h.  */
6772
6773 #include <unistd.h>
6774 #include <stdlib.h>
6775 #include <errno.h>
6776
6777 int
6778 main ()
6779 {
6780     if (symlink ("conftest.file", "conftest.link")) return 1;
6781           if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
6782
6783   ;
6784   return 0;
6785 }
6786 _ACEOF
6787 if ac_fn_c_try_run "$LINENO"; then :
6788   gl_cv_func_chown_slash_works=yes
6789 else
6790   gl_cv_func_chown_slash_works=no
6791 fi
6792 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6793   conftest.$ac_objext conftest.beam conftest.$ac_ext
6794 fi
6795
6796       rm -f conftest.link conftest.file
6797 fi
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
6799 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
6800     if test "$gl_cv_func_chown_slash_works" != yes; then
6801
6802 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
6803
6804       REPLACE_CHOWN=1
6805
6806
6807
6808
6809
6810
6811
6812
6813   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6814
6815     fi
6816
6817         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
6818 $as_echo_n "checking whether chown always updates ctime... " >&6; }
6819 if test "${gl_cv_func_chown_ctime_works+set}" = set; then :
6820   $as_echo_n "(cached) " >&6
6821 else
6822   if test "$cross_compiling" = yes; then :
6823   gl_cv_func_chown_ctime_works="guessing no"
6824 else
6825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826 /* end confdefs.h.  */
6827
6828 #include <unistd.h>
6829 #include <stdlib.h>
6830 #include <errno.h>
6831 #include <fcntl.h>
6832 #include <sys/stat.h>
6833
6834 int
6835 main ()
6836 {
6837     struct stat st1, st2;
6838           if (close (creat ("conftest.file", 0600))) return 1;
6839           if (stat ("conftest.file", &st1)) return 2;
6840           sleep (1);
6841           if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
6842           if (stat ("conftest.file", &st2)) return 4;
6843           if (st2.st_ctime <= st1.st_ctime) return 5;
6844
6845   ;
6846   return 0;
6847 }
6848 _ACEOF
6849 if ac_fn_c_try_run "$LINENO"; then :
6850   gl_cv_func_chown_ctime_works=yes
6851 else
6852   gl_cv_func_chown_ctime_works=no
6853 fi
6854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6855   conftest.$ac_objext conftest.beam conftest.$ac_ext
6856 fi
6857
6858       rm -f conftest.file
6859 fi
6860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
6861 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
6862     if test "$gl_cv_func_chown_ctime_works" != yes; then
6863
6864 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
6865
6866       REPLACE_CHOWN=1
6867
6868
6869
6870
6871
6872
6873
6874
6875   gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
6876
6877     fi
6878
6879     if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
6880
6881
6882
6883
6884
6885
6886
6887
6888   gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
6889
6890     fi
6891   fi
6892
6893
6894      GNULIB_DIRFD=0;
6895   GNULIB_FDOPENDIR=0;
6896   GNULIB_SCANDIR=0;
6897   GNULIB_ALPHASORT=0;
6898     HAVE_DECL_DIRFD=1;
6899   HAVE_FDOPENDIR=1;
6900   HAVE_SCANDIR=1;
6901   HAVE_ALPHASORT=1;
6902   REPLACE_CLOSEDIR=0;
6903   REPLACE_FDOPENDIR=0;
6904   REPLACE_OPENDIR=0;
6905
6906
6907
6908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6909 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6910 if test "${gl_cv_have_include_next+set}" = set; then :
6911   $as_echo_n "(cached) " >&6
6912 else
6913   rm -rf conftestd1a conftestd1b conftestd2
6914      mkdir conftestd1a conftestd1b conftestd2
6915                                                   cat <<EOF > conftestd1a/conftest.h
6916 #define DEFINED_IN_CONFTESTD1
6917 #include_next <conftest.h>
6918 #ifdef DEFINED_IN_CONFTESTD2
6919 int foo;
6920 #else
6921 #error "include_next doesn't work"
6922 #endif
6923 EOF
6924      cat <<EOF > conftestd1b/conftest.h
6925 #define DEFINED_IN_CONFTESTD1
6926 #include <stdio.h>
6927 #include_next <conftest.h>
6928 #ifdef DEFINED_IN_CONFTESTD2
6929 int foo;
6930 #else
6931 #error "include_next doesn't work"
6932 #endif
6933 EOF
6934      cat <<EOF > conftestd2/conftest.h
6935 #ifndef DEFINED_IN_CONFTESTD1
6936 #error "include_next test doesn't work"
6937 #endif
6938 #define DEFINED_IN_CONFTESTD2
6939 EOF
6940      gl_save_CPPFLAGS="$CPPFLAGS"
6941      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6942      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943 /* end confdefs.h.  */
6944 #include <conftest.h>
6945 _ACEOF
6946 if ac_fn_c_try_compile "$LINENO"; then :
6947   gl_cv_have_include_next=yes
6948 else
6949   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6950         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h.  */
6952 #include <conftest.h>
6953 _ACEOF
6954 if ac_fn_c_try_compile "$LINENO"; then :
6955   gl_cv_have_include_next=buggy
6956 else
6957   gl_cv_have_include_next=no
6958 fi
6959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960
6961 fi
6962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6963      CPPFLAGS="$gl_save_CPPFLAGS"
6964      rm -rf conftestd1a conftestd1b conftestd2
6965
6966 fi
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6968 $as_echo "$gl_cv_have_include_next" >&6; }
6969   PRAGMA_SYSTEM_HEADER=
6970   if test $gl_cv_have_include_next = yes; then
6971     INCLUDE_NEXT=include_next
6972     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6973     if test -n "$GCC"; then
6974       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6975     fi
6976   else
6977     if test $gl_cv_have_include_next = buggy; then
6978       INCLUDE_NEXT=include
6979       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6980     else
6981       INCLUDE_NEXT=include
6982       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6983     fi
6984   fi
6985
6986
6987
6988
6989
6990
6991
6992   for ac_header in $ac_header_list
6993 do :
6994   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6995 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6996 "
6997 eval as_val=\$$as_ac_Header
6998    if test "x$as_val" = x""yes; then :
6999   cat >>confdefs.h <<_ACEOF
7000 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7001 _ACEOF
7002
7003 fi
7004
7005 done
7006
7007
7008
7009
7010     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5
7011 $as_echo_n "checking whether system is Windows or MSDOS... " >&6; }
7012 if test "${ac_cv_win_or_dos+set}" = set; then :
7013   $as_echo_n "(cached) " >&6
7014 else
7015
7016         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7017 /* end confdefs.h.  */
7018
7019 int
7020 main ()
7021 {
7022
7023 #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
7024 neither MSDOS nor Windows
7025 #endif
7026   ;
7027   return 0;
7028 }
7029 _ACEOF
7030 if ac_fn_c_try_compile "$LINENO"; then :
7031   ac_cv_win_or_dos=yes
7032 else
7033   ac_cv_win_or_dos=no
7034 fi
7035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7036
7037 fi
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5
7039 $as_echo "$ac_cv_win_or_dos" >&6; }
7040
7041     if test x"$ac_cv_win_or_dos" = xyes; then
7042       ac_fs_accepts_drive_letter_prefix=1
7043       ac_fs_backslash_is_file_name_separator=1
7044       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5
7045 $as_echo_n "checking whether drive letter can start relative path... " >&6; }
7046 if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then :
7047   $as_echo_n "(cached) " >&6
7048 else
7049
7050           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051 /* end confdefs.h.  */
7052
7053 int
7054 main ()
7055 {
7056
7057 #if defined __CYGWIN__
7058 drive letters are always absolute
7059 #endif
7060   ;
7061   return 0;
7062 }
7063 _ACEOF
7064 if ac_fn_c_try_compile "$LINENO"; then :
7065   ac_cv_drive_letter_can_be_relative=yes
7066 else
7067   ac_cv_drive_letter_can_be_relative=no
7068 fi
7069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7070
7071 fi
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5
7073 $as_echo "$ac_cv_drive_letter_can_be_relative" >&6; }
7074       if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
7075         ac_fs_drive_letter_can_be_relative=1
7076       else
7077         ac_fs_drive_letter_can_be_relative=0
7078       fi
7079     else
7080       ac_fs_accepts_drive_letter_prefix=0
7081       ac_fs_backslash_is_file_name_separator=0
7082       ac_fs_drive_letter_can_be_relative=0
7083     fi
7084
7085
7086 cat >>confdefs.h <<_ACEOF
7087 #define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
7088 _ACEOF
7089
7090
7091
7092
7093
7094 cat >>confdefs.h <<_ACEOF
7095 #define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
7096 _ACEOF
7097
7098
7099
7100 cat >>confdefs.h <<_ACEOF
7101 #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative
7102 _ACEOF
7103
7104
7105
7106
7107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7108 $as_echo_n "checking whether // is distinct from /... " >&6; }
7109 if test "${gl_cv_double_slash_root+set}" = set; then :
7110   $as_echo_n "(cached) " >&6
7111 else
7112    if test x"$cross_compiling" = xyes ; then
7113         # When cross-compiling, there is no way to tell whether // is special
7114         # short of a list of hosts.  However, the only known hosts to date
7115         # that have a distinct // are Apollo DomainOS (too old to port to),
7116         # Cygwin, and z/OS.  If anyone knows of another system for which // has
7117         # special semantics and is distinct from /, please report it to
7118         # <bug-gnulib@gnu.org>.
7119         case $host in
7120           *-cygwin | i370-ibm-openedition)
7121             gl_cv_double_slash_root=yes ;;
7122           *)
7123             # Be optimistic and assume that / and // are the same when we
7124             # don't know.
7125             gl_cv_double_slash_root='unknown, assuming no' ;;
7126         esac
7127       else
7128         set x `ls -di / // 2>/dev/null`
7129         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7130           gl_cv_double_slash_root=no
7131         else
7132           gl_cv_double_slash_root=yes
7133         fi
7134       fi
7135 fi
7136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7137 $as_echo "$gl_cv_double_slash_root" >&6; }
7138   if test "$gl_cv_double_slash_root" = yes; then
7139
7140 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7141
7142   fi
7143
7144
7145
7146
7147
7148
7149
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7151 $as_echo_n "checking for complete errno.h... " >&6; }
7152 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
7153   $as_echo_n "(cached) " >&6
7154 else
7155
7156     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157 /* end confdefs.h.  */
7158
7159 #include <errno.h>
7160 #if !defined ENOMSG
7161 booboo
7162 #endif
7163 #if !defined EIDRM
7164 booboo
7165 #endif
7166 #if !defined ENOLINK
7167 booboo
7168 #endif
7169 #if !defined EPROTO
7170 booboo
7171 #endif
7172 #if !defined EMULTIHOP
7173 booboo
7174 #endif
7175 #if !defined EBADMSG
7176 booboo
7177 #endif
7178 #if !defined EOVERFLOW
7179 booboo
7180 #endif
7181 #if !defined ENOTSUP
7182 booboo
7183 #endif
7184 #if !defined ESTALE
7185 booboo
7186 #endif
7187 #if !defined ECANCELED
7188 booboo
7189 #endif
7190
7191 _ACEOF
7192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7193   $EGREP "booboo" >/dev/null 2>&1; then :
7194   gl_cv_header_errno_h_complete=no
7195 else
7196   gl_cv_header_errno_h_complete=yes
7197 fi
7198 rm -f conftest*
7199
7200
7201 fi
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7203 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
7204   if test $gl_cv_header_errno_h_complete = yes; then
7205     ERRNO_H=''
7206   else
7207
7208
7209
7210
7211
7212
7213      if test $gl_cv_have_include_next = yes; then
7214        gl_cv_next_errno_h='<'errno.h'>'
7215      else
7216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7217 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
7218 if test "${gl_cv_next_errno_h+set}" = set; then :
7219   $as_echo_n "(cached) " >&6
7220 else
7221
7222           if test $ac_cv_header_errno_h = yes; then
7223             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7224 /* end confdefs.h.  */
7225 #include <errno.h>
7226
7227 _ACEOF
7228                                                                                                 case "$host_os" in
7229               aix*) gl_absname_cpp="$ac_cpp -C" ;;
7230               *)    gl_absname_cpp="$ac_cpp" ;;
7231             esac
7232                                                 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7233                sed -n '\#/errno.h#{
7234                  s#.*"\(.*/errno.h\)".*#\1#
7235                  s#^/[^/]#//&#
7236                  p
7237                  q
7238                }'`'"'
7239           else
7240             gl_cv_next_errno_h='<'errno.h'>'
7241           fi
7242
7243 fi
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7245 $as_echo "$gl_cv_next_errno_h" >&6; }
7246      fi
7247      NEXT_ERRNO_H=$gl_cv_next_errno_h
7248
7249      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7250        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7251        gl_next_as_first_directive='<'errno.h'>'
7252      else
7253        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7254        gl_next_as_first_directive=$gl_cv_next_errno_h
7255      fi
7256      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7257
7258
7259
7260     ERRNO_H='errno.h'
7261   fi
7262
7263
7264   if test -n "$ERRNO_H"; then
7265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7266 $as_echo_n "checking for EMULTIHOP value... " >&6; }
7267 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7268   $as_echo_n "(cached) " >&6
7269 else
7270
7271       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272 /* end confdefs.h.  */
7273
7274 #include <errno.h>
7275 #ifdef EMULTIHOP
7276 yes
7277 #endif
7278
7279 _ACEOF
7280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7281   $EGREP "yes" >/dev/null 2>&1; then :
7282   gl_cv_header_errno_h_EMULTIHOP=yes
7283 else
7284   gl_cv_header_errno_h_EMULTIHOP=no
7285 fi
7286 rm -f conftest*
7287
7288       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7289         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7290 /* end confdefs.h.  */
7291
7292 #define _XOPEN_SOURCE_EXTENDED 1
7293 #include <errno.h>
7294 #ifdef EMULTIHOP
7295 yes
7296 #endif
7297
7298 _ACEOF
7299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7300   $EGREP "yes" >/dev/null 2>&1; then :
7301   gl_cv_header_errno_h_EMULTIHOP=hidden
7302 fi
7303 rm -f conftest*
7304
7305         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7306                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
7307 #define _XOPEN_SOURCE_EXTENDED 1
7308 #include <errno.h>
7309 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
7310 #include <stdio.h>
7311 #include <stdlib.h>
7312 "; then :
7313
7314 fi
7315
7316         fi
7317       fi
7318
7319 fi
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7321 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7322     case $gl_cv_header_errno_h_EMULTIHOP in
7323       yes | no)
7324         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7325         ;;
7326       *)
7327         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7328         ;;
7329     esac
7330
7331
7332   fi
7333
7334
7335   if test -n "$ERRNO_H"; then
7336     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7337 $as_echo_n "checking for ENOLINK value... " >&6; }
7338 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7339   $as_echo_n "(cached) " >&6
7340 else
7341
7342       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343 /* end confdefs.h.  */
7344
7345 #include <errno.h>
7346 #ifdef ENOLINK
7347 yes
7348 #endif
7349
7350 _ACEOF
7351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7352   $EGREP "yes" >/dev/null 2>&1; then :
7353   gl_cv_header_errno_h_ENOLINK=yes
7354 else
7355   gl_cv_header_errno_h_ENOLINK=no
7356 fi
7357 rm -f conftest*
7358
7359       if test $gl_cv_header_errno_h_ENOLINK = no; then
7360         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7361 /* end confdefs.h.  */
7362
7363 #define _XOPEN_SOURCE_EXTENDED 1
7364 #include <errno.h>
7365 #ifdef ENOLINK
7366 yes
7367 #endif
7368
7369 _ACEOF
7370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7371   $EGREP "yes" >/dev/null 2>&1; then :
7372   gl_cv_header_errno_h_ENOLINK=hidden
7373 fi
7374 rm -f conftest*
7375
7376         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7377                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
7378 #define _XOPEN_SOURCE_EXTENDED 1
7379 #include <errno.h>
7380 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
7381 #include <stdio.h>
7382 #include <stdlib.h>
7383 "; then :
7384
7385 fi
7386
7387         fi
7388       fi
7389
7390 fi
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7392 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7393     case $gl_cv_header_errno_h_ENOLINK in
7394       yes | no)
7395         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7396         ;;
7397       *)
7398         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7399         ;;
7400     esac
7401
7402
7403   fi
7404
7405
7406   if test -n "$ERRNO_H"; then
7407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7408 $as_echo_n "checking for EOVERFLOW value... " >&6; }
7409 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7410   $as_echo_n "(cached) " >&6
7411 else
7412
7413       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7414 /* end confdefs.h.  */
7415
7416 #include <errno.h>
7417 #ifdef EOVERFLOW
7418 yes
7419 #endif
7420
7421 _ACEOF
7422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7423   $EGREP "yes" >/dev/null 2>&1; then :
7424   gl_cv_header_errno_h_EOVERFLOW=yes
7425 else
7426   gl_cv_header_errno_h_EOVERFLOW=no
7427 fi
7428 rm -f conftest*
7429
7430       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7431         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7432 /* end confdefs.h.  */
7433
7434 #define _XOPEN_SOURCE_EXTENDED 1
7435 #include <errno.h>
7436 #ifdef EOVERFLOW
7437 yes
7438 #endif
7439
7440 _ACEOF
7441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7442   $EGREP "yes" >/dev/null 2>&1; then :
7443   gl_cv_header_errno_h_EOVERFLOW=hidden
7444 fi
7445 rm -f conftest*
7446
7447         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7448                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
7449 #define _XOPEN_SOURCE_EXTENDED 1
7450 #include <errno.h>
7451 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
7452 #include <stdio.h>
7453 #include <stdlib.h>
7454 "; then :
7455
7456 fi
7457
7458         fi
7459       fi
7460
7461 fi
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7463 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7464     case $gl_cv_header_errno_h_EOVERFLOW in
7465       yes | no)
7466         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7467         ;;
7468       *)
7469         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7470         ;;
7471     esac
7472
7473
7474   fi
7475
7476
7477 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7478 if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
7479   ac_have_decl=1
7480 else
7481   ac_have_decl=0
7482 fi
7483
7484 cat >>confdefs.h <<_ACEOF
7485 #define HAVE_DECL_STRERROR_R $ac_have_decl
7486 _ACEOF
7487
7488 for ac_func in strerror_r
7489 do :
7490   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7491 if test "x$ac_cv_func_strerror_r" = x""yes; then :
7492   cat >>confdefs.h <<_ACEOF
7493 #define HAVE_STRERROR_R 1
7494 _ACEOF
7495
7496 fi
7497 done
7498
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7500 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
7501 if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
7502   $as_echo_n "(cached) " >&6
7503 else
7504
7505     ac_cv_func_strerror_r_char_p=no
7506     if test $ac_cv_have_decl_strerror_r = yes; then
7507       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508 /* end confdefs.h.  */
7509 $ac_includes_default
7510 int
7511 main ()
7512 {
7513
7514           char buf[100];
7515           char x = *strerror_r (0, buf, sizeof buf);
7516           char *p = strerror_r (0, buf, sizeof buf);
7517           return !p || x;
7518
7519   ;
7520   return 0;
7521 }
7522 _ACEOF
7523 if ac_fn_c_try_compile "$LINENO"; then :
7524   ac_cv_func_strerror_r_char_p=yes
7525 fi
7526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7527     else
7528       # strerror_r is not declared.  Choose between
7529       # systems that have relatively inaccessible declarations for the
7530       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
7531       # former has a strerror_r that returns char*, while the latter
7532       # has a strerror_r that returns `int'.
7533       # This test should segfault on the DEC system.
7534       if test "$cross_compiling" = yes; then :
7535   :
7536 else
7537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7538 /* end confdefs.h.  */
7539 $ac_includes_default
7540         extern char *strerror_r ();
7541 int
7542 main ()
7543 {
7544 char buf[100];
7545           char x = *strerror_r (0, buf, sizeof buf);
7546           return ! isalpha (x);
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 if ac_fn_c_try_run "$LINENO"; then :
7552   ac_cv_func_strerror_r_char_p=yes
7553 fi
7554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7555   conftest.$ac_objext conftest.beam conftest.$ac_ext
7556 fi
7557
7558     fi
7559
7560 fi
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7562 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7563 if test $ac_cv_func_strerror_r_char_p = yes; then
7564
7565 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7566
7567 fi
7568
7569
7570   XGETTEXT_EXTRA_OPTIONS=
7571
7572
7573      GNULIB_FCHMODAT=0;
7574   GNULIB_FSTATAT=0;
7575   GNULIB_FUTIMENS=0;
7576   GNULIB_LCHMOD=0;
7577   GNULIB_LSTAT=0;
7578   GNULIB_MKDIRAT=0;
7579   GNULIB_MKFIFO=0;
7580   GNULIB_MKFIFOAT=0;
7581   GNULIB_MKNOD=0;
7582   GNULIB_MKNODAT=0;
7583   GNULIB_STAT=0;
7584   GNULIB_UTIMENSAT=0;
7585     HAVE_FCHMODAT=1;
7586   HAVE_FSTATAT=1;
7587   HAVE_FUTIMENS=1;
7588   HAVE_LCHMOD=1;
7589   HAVE_LSTAT=1;
7590   HAVE_MKDIRAT=1;
7591   HAVE_MKFIFO=1;
7592   HAVE_MKFIFOAT=1;
7593   HAVE_MKNOD=1;
7594   HAVE_MKNODAT=1;
7595   HAVE_UTIMENSAT=1;
7596   REPLACE_FSTAT=0;
7597   REPLACE_FSTATAT=0;
7598   REPLACE_FUTIMENS=0;
7599   REPLACE_LSTAT=0;
7600   REPLACE_MKDIR=0;
7601   REPLACE_MKFIFO=0;
7602   REPLACE_MKNOD=0;
7603   REPLACE_STAT=0;
7604   REPLACE_UTIMENSAT=0;
7605
7606
7607
7608
7609   GNULIB_FCNTL=0;
7610   GNULIB_OPEN=0;
7611   GNULIB_OPENAT=0;
7612     HAVE_FCNTL=1;
7613   HAVE_OPENAT=1;
7614   REPLACE_FCNTL=0;
7615   REPLACE_OPEN=0;
7616   REPLACE_OPENAT=0;
7617
7618 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7619 if test "x$ac_cv_type_mode_t" = x""yes; then :
7620
7621 else
7622
7623 cat >>confdefs.h <<_ACEOF
7624 #define mode_t int
7625 _ACEOF
7626
7627 fi
7628
7629
7630
7631   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
7632 $as_echo_n "checking for promoted mode_t type... " >&6; }
7633 if test "${gl_cv_promoted_mode_t+set}" = set; then :
7634   $as_echo_n "(cached) " >&6
7635 else
7636
7637                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7638 /* end confdefs.h.  */
7639 #include <sys/types.h>
7640 int
7641 main ()
7642 {
7643 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
7644   ;
7645   return 0;
7646 }
7647 _ACEOF
7648 if ac_fn_c_try_compile "$LINENO"; then :
7649   gl_cv_promoted_mode_t='int'
7650 else
7651   gl_cv_promoted_mode_t='mode_t'
7652 fi
7653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7654
7655 fi
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
7657 $as_echo "$gl_cv_promoted_mode_t" >&6; }
7658
7659 cat >>confdefs.h <<_ACEOF
7660 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
7661 _ACEOF
7662
7663
7664
7665   GNULIB_DPRINTF=0;
7666   GNULIB_FCLOSE=0;
7667   GNULIB_FFLUSH=0;
7668   GNULIB_FOPEN=0;
7669   GNULIB_FPRINTF=0;
7670   GNULIB_FPRINTF_POSIX=0;
7671   GNULIB_FPURGE=0;
7672   GNULIB_FPUTC=0;
7673   GNULIB_FPUTS=0;
7674   GNULIB_FREOPEN=0;
7675   GNULIB_FSEEK=0;
7676   GNULIB_FSEEKO=0;
7677   GNULIB_FTELL=0;
7678   GNULIB_FTELLO=0;
7679   GNULIB_FWRITE=0;
7680   GNULIB_GETDELIM=0;
7681   GNULIB_GETLINE=0;
7682   GNULIB_OBSTACK_PRINTF=0;
7683   GNULIB_OBSTACK_PRINTF_POSIX=0;
7684   GNULIB_PERROR=0;
7685   GNULIB_POPEN=0;
7686   GNULIB_PRINTF=0;
7687   GNULIB_PRINTF_POSIX=0;
7688   GNULIB_PUTC=0;
7689   GNULIB_PUTCHAR=0;
7690   GNULIB_PUTS=0;
7691   GNULIB_REMOVE=0;
7692   GNULIB_RENAME=0;
7693   GNULIB_RENAMEAT=0;
7694   GNULIB_SNPRINTF=0;
7695   GNULIB_SPRINTF_POSIX=0;
7696   GNULIB_STDIO_H_SIGPIPE=0;
7697   GNULIB_VASPRINTF=0;
7698   GNULIB_VDPRINTF=0;
7699   GNULIB_VFPRINTF=0;
7700   GNULIB_VFPRINTF_POSIX=0;
7701   GNULIB_VPRINTF=0;
7702   GNULIB_VPRINTF_POSIX=0;
7703   GNULIB_VSNPRINTF=0;
7704   GNULIB_VSPRINTF_POSIX=0;
7705     HAVE_DECL_FPURGE=1;
7706   HAVE_DECL_GETDELIM=1;
7707   HAVE_DECL_GETLINE=1;
7708   HAVE_DECL_OBSTACK_PRINTF=1;
7709   HAVE_DECL_SNPRINTF=1;
7710   HAVE_DECL_VSNPRINTF=1;
7711   HAVE_DPRINTF=1;
7712   HAVE_RENAMEAT=1;
7713   HAVE_VASPRINTF=1;
7714   HAVE_VDPRINTF=1;
7715   REPLACE_DPRINTF=0;
7716   REPLACE_FCLOSE=0;
7717   REPLACE_FFLUSH=0;
7718   REPLACE_FOPEN=0;
7719   REPLACE_FPRINTF=0;
7720   REPLACE_FPURGE=0;
7721   REPLACE_FREOPEN=0;
7722   REPLACE_FSEEK=0;
7723   REPLACE_FSEEKO=0;
7724   REPLACE_FTELL=0;
7725   REPLACE_FTELLO=0;
7726   REPLACE_GETLINE=0;
7727   REPLACE_OBSTACK_PRINTF=0;
7728   REPLACE_PERROR=0;
7729   REPLACE_POPEN=0;
7730   REPLACE_PRINTF=0;
7731   REPLACE_REMOVE=0;
7732   REPLACE_RENAME=0;
7733   REPLACE_RENAMEAT=0;
7734   REPLACE_SNPRINTF=0;
7735   REPLACE_SPRINTF=0;
7736   REPLACE_STDIO_WRITE_FUNCS=0;
7737   REPLACE_VASPRINTF=0;
7738   REPLACE_VDPRINTF=0;
7739   REPLACE_VFPRINTF=0;
7740   REPLACE_VPRINTF=0;
7741   REPLACE_VSNPRINTF=0;
7742   REPLACE_VSPRINTF=0;
7743
7744
7745
7746
7747
7748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7749 $as_echo_n "checking for working fcntl.h... " >&6; }
7750 if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
7751   $as_echo_n "(cached) " >&6
7752 else
7753   if test "$cross_compiling" = yes; then :
7754   gl_cv_header_working_fcntl_h=cross-compiling
7755 else
7756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7757 /* end confdefs.h.  */
7758 #include <sys/types.h>
7759            #include <sys/stat.h>
7760            #include <unistd.h>
7761            #include <fcntl.h>
7762            #ifndef O_NOATIME
7763             #define O_NOATIME 0
7764            #endif
7765            #ifndef O_NOFOLLOW
7766             #define O_NOFOLLOW 0
7767            #endif
7768            static int const constants[] =
7769             {
7770               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7771               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7772             };
7773
7774 int
7775 main ()
7776 {
7777
7778             int status = !constants;
7779             {
7780               static char const sym[] = "conftest.sym";
7781               if (symlink (".", sym) != 0
7782                   || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
7783                 status |= 32;
7784               unlink (sym);
7785             }
7786             {
7787               static char const file[] = "confdefs.h";
7788               int fd = open (file, O_RDONLY | O_NOATIME);
7789               char c;
7790               struct stat st0, st1;
7791               if (fd < 0
7792                   || fstat (fd, &st0) != 0
7793                   || sleep (1) != 0
7794                   || read (fd, &c, 1) != 1
7795                   || close (fd) != 0
7796                   || stat (file, &st1) != 0
7797                   || st0.st_atime != st1.st_atime)
7798                 status |= 64;
7799             }
7800             return status;
7801   ;
7802   return 0;
7803 }
7804 _ACEOF
7805 if ac_fn_c_try_run "$LINENO"; then :
7806   gl_cv_header_working_fcntl_h=yes
7807 else
7808   case $? in #(
7809         32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7810         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7811         96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7812          *) gl_cv_header_working_fcntl_h='no';;
7813         esac
7814 fi
7815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7816   conftest.$ac_objext conftest.beam conftest.$ac_ext
7817 fi
7818
7819 fi
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7821 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7822
7823   case $gl_cv_header_working_fcntl_h in #(
7824   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7825   *) ac_val=1;;
7826   esac
7827
7828 cat >>confdefs.h <<_ACEOF
7829 #define HAVE_WORKING_O_NOATIME $ac_val
7830 _ACEOF
7831
7832
7833   case $gl_cv_header_working_fcntl_h in #(
7834   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7835   *) ac_val=1;;
7836   esac
7837
7838 cat >>confdefs.h <<_ACEOF
7839 #define HAVE_WORKING_O_NOFOLLOW $ac_val
7840 _ACEOF
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
7855 $as_echo_n "checking for stdint.h... " >&6; }
7856 if test "${gl_cv_header_stdint_h+set}" = set; then :
7857   $as_echo_n "(cached) " >&6
7858 else
7859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7860 /* end confdefs.h.  */
7861 #include <sys/types.h>
7862 #include <stdint.h>
7863 int
7864 main ()
7865 {
7866 uintmax_t i = (uintmax_t) -1; return !i;
7867   ;
7868   return 0;
7869 }
7870 _ACEOF
7871 if ac_fn_c_try_compile "$LINENO"; then :
7872   gl_cv_header_stdint_h=yes
7873 else
7874   gl_cv_header_stdint_h=no
7875 fi
7876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7877 fi
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
7879 $as_echo "$gl_cv_header_stdint_h" >&6; }
7880   if test $gl_cv_header_stdint_h = yes; then
7881
7882 cat >>confdefs.h <<_ACEOF
7883 #define HAVE_STDINT_H_WITH_UINTMAX 1
7884 _ACEOF
7885
7886   fi
7887
7888
7889   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
7890 $as_echo_n "checking for inttypes.h... " >&6; }
7891 if test "${gl_cv_header_inttypes_h+set}" = set; then :
7892   $as_echo_n "(cached) " >&6
7893 else
7894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895 /* end confdefs.h.  */
7896 #include <sys/types.h>
7897 #include <inttypes.h>
7898 int
7899 main ()
7900 {
7901 uintmax_t i = (uintmax_t) -1; return !i;
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 if ac_fn_c_try_compile "$LINENO"; then :
7907   gl_cv_header_inttypes_h=yes
7908 else
7909   gl_cv_header_inttypes_h=no
7910 fi
7911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7912 fi
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
7914 $as_echo "$gl_cv_header_inttypes_h" >&6; }
7915   if test $gl_cv_header_inttypes_h = yes; then
7916
7917 cat >>confdefs.h <<_ACEOF
7918 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
7919 _ACEOF
7920
7921   fi
7922
7923
7924
7925
7926
7927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
7928 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
7929 if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
7930   $as_echo_n "(cached) " >&6
7931 else
7932
7933       if test "$cross_compiling" = yes; then :
7934
7935        case "$host_os" in
7936                                # Guess yes on glibc systems.
7937          *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
7938                                # Guess yes on FreeBSD >= 5.
7939          freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
7940          freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
7941                                # Guess yes on MacOS X >= 10.3.
7942          darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
7943          darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
7944                                # Guess yes on OpenBSD >= 3.9.
7945          openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
7946                                gl_cv_func_printf_sizes_c99="guessing no";;
7947          openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
7948                                # Guess yes on Solaris >= 2.10.
7949          solaris2.[0-9]*)      gl_cv_func_printf_sizes_c99="guessing no";;
7950          solaris*)             gl_cv_func_printf_sizes_c99="guessing yes";;
7951                                # Guess yes on NetBSD >= 3.
7952          netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
7953                                gl_cv_func_printf_sizes_c99="guessing no";;
7954          netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
7955                                # If we don't know, assume the worst.
7956          *)                    gl_cv_func_printf_sizes_c99="guessing no";;
7957        esac
7958
7959 else
7960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7961 /* end confdefs.h.  */
7962
7963 #include <stddef.h>
7964 #include <stdio.h>
7965 #include <string.h>
7966 #include <sys/types.h>
7967 #if HAVE_STDINT_H_WITH_UINTMAX
7968 # include <stdint.h>
7969 #endif
7970 #if HAVE_INTTYPES_H_WITH_UINTMAX
7971 # include <inttypes.h>
7972 #endif
7973 static char buf[100];
7974 int main ()
7975 {
7976 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
7977   buf[0] = '\0';
7978   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
7979       || strcmp (buf, "12345671 33") != 0)
7980     return 1;
7981 #endif
7982   buf[0] = '\0';
7983   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
7984       || strcmp (buf, "12345672 33") != 0)
7985     return 1;
7986   buf[0] = '\0';
7987   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
7988       || strcmp (buf, "12345673 33") != 0)
7989     return 1;
7990   buf[0] = '\0';
7991   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
7992       || strcmp (buf, "1.5 33") != 0)
7993     return 1;
7994   return 0;
7995 }
7996 _ACEOF
7997 if ac_fn_c_try_run "$LINENO"; then :
7998   gl_cv_func_printf_sizes_c99=yes
7999 else
8000   gl_cv_func_printf_sizes_c99=no
8001 fi
8002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8003   conftest.$ac_objext conftest.beam conftest.$ac_ext
8004 fi
8005
8006
8007 fi
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
8009 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
8010
8011
8012
8013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
8014 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
8015 if test "${gl_cv_func_printf_long_double+set}" = set; then :
8016   $as_echo_n "(cached) " >&6
8017 else
8018
8019       if test "$cross_compiling" = yes; then :
8020
8021        case "$host_os" in
8022          beos*)        gl_cv_func_printf_long_double="guessing no";;
8023          mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
8024          *)            gl_cv_func_printf_long_double="guessing yes";;
8025        esac
8026
8027 else
8028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8029 /* end confdefs.h.  */
8030
8031 #include <stdio.h>
8032 #include <string.h>
8033 static char buf[10000];
8034 int main ()
8035 {
8036   buf[0] = '\0';
8037   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
8038       || strcmp (buf, "1.750000 33") != 0)
8039     return 1;
8040   buf[0] = '\0';
8041   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
8042       || strcmp (buf, "1.750000e+00 33") != 0)
8043     return 1;
8044   buf[0] = '\0';
8045   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
8046       || strcmp (buf, "1.75 33") != 0)
8047     return 1;
8048   return 0;
8049 }
8050 _ACEOF
8051 if ac_fn_c_try_run "$LINENO"; then :
8052   gl_cv_func_printf_long_double=yes
8053 else
8054   gl_cv_func_printf_long_double=no
8055 fi
8056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8057   conftest.$ac_objext conftest.beam conftest.$ac_ext
8058 fi
8059
8060
8061 fi
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
8063 $as_echo "$gl_cv_func_printf_long_double" >&6; }
8064
8065
8066
8067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
8068 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
8069 if test "${gl_cv_func_printf_infinite+set}" = set; then :
8070   $as_echo_n "(cached) " >&6
8071 else
8072
8073       if test "$cross_compiling" = yes; then :
8074
8075        case "$host_os" in
8076                                # Guess yes on glibc systems.
8077          *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
8078                                # Guess yes on FreeBSD >= 6.
8079          freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
8080          freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
8081                                # Guess yes on MacOS X >= 10.3.
8082          darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
8083          darwin*)              gl_cv_func_printf_infinite="guessing yes";;
8084                                # Guess yes on HP-UX >= 11.
8085          hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
8086          hpux*)                gl_cv_func_printf_infinite="guessing yes";;
8087                                # Guess yes on NetBSD >= 3.
8088          netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8089                                gl_cv_func_printf_infinite="guessing no";;
8090          netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
8091                                # Guess yes on BeOS.
8092          beos*)                gl_cv_func_printf_infinite="guessing yes";;
8093                                # If we don't know, assume the worst.
8094          *)                    gl_cv_func_printf_infinite="guessing no";;
8095        esac
8096
8097 else
8098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8099 /* end confdefs.h.  */
8100
8101 #include <stdio.h>
8102 #include <string.h>
8103 static int
8104 strisnan (const char *string, size_t start_index, size_t end_index)
8105 {
8106   if (start_index < end_index)
8107     {
8108       if (string[start_index] == '-')
8109         start_index++;
8110       if (start_index + 3 <= end_index
8111           && memcmp (string + start_index, "nan", 3) == 0)
8112         {
8113           start_index += 3;
8114           if (start_index == end_index
8115               || (string[start_index] == '(' && string[end_index - 1] == ')'))
8116             return 1;
8117         }
8118     }
8119   return 0;
8120 }
8121 static int
8122 have_minus_zero ()
8123 {
8124   static double plus_zero = 0.0;
8125   double minus_zero = - plus_zero;
8126   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
8127 }
8128 static char buf[10000];
8129 static double zero = 0.0;
8130 int main ()
8131 {
8132   if (sprintf (buf, "%f", 1.0 / 0.0) < 0
8133       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8134     return 1;
8135   if (sprintf (buf, "%f", -1.0 / 0.0) < 0
8136       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8137     return 1;
8138   if (sprintf (buf, "%f", zero / zero) < 0
8139       || !strisnan (buf, 0, strlen (buf)))
8140     return 1;
8141   if (sprintf (buf, "%e", 1.0 / 0.0) < 0
8142       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8143     return 1;
8144   if (sprintf (buf, "%e", -1.0 / 0.0) < 0
8145       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8146     return 1;
8147   if (sprintf (buf, "%e", zero / zero) < 0
8148       || !strisnan (buf, 0, strlen (buf)))
8149     return 1;
8150   if (sprintf (buf, "%g", 1.0 / 0.0) < 0
8151       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8152     return 1;
8153   if (sprintf (buf, "%g", -1.0 / 0.0) < 0
8154       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8155     return 1;
8156   if (sprintf (buf, "%g", zero / zero) < 0
8157       || !strisnan (buf, 0, strlen (buf)))
8158     return 1;
8159   /* This test fails on HP-UX 10.20.  */
8160   if (have_minus_zero ())
8161     if (sprintf (buf, "%g", - zero) < 0
8162         || strcmp (buf, "-0") != 0)
8163     return 1;
8164   return 0;
8165 }
8166 _ACEOF
8167 if ac_fn_c_try_run "$LINENO"; then :
8168   gl_cv_func_printf_infinite=yes
8169 else
8170   gl_cv_func_printf_infinite=no
8171 fi
8172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8173   conftest.$ac_objext conftest.beam conftest.$ac_ext
8174 fi
8175
8176
8177 fi
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
8179 $as_echo "$gl_cv_func_printf_infinite" >&6; }
8180
8181
8182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8183 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8184 if test "${ac_cv_c_bigendian+set}" = set; then :
8185   $as_echo_n "(cached) " >&6
8186 else
8187   ac_cv_c_bigendian=unknown
8188     # See if we're dealing with a universal compiler.
8189     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8190 /* end confdefs.h.  */
8191 #ifndef __APPLE_CC__
8192                not a universal capable compiler
8193              #endif
8194              typedef int dummy;
8195
8196 _ACEOF
8197 if ac_fn_c_try_compile "$LINENO"; then :
8198
8199         # Check for potential -arch flags.  It is not universal unless
8200         # there are at least two -arch flags with different values.
8201         ac_arch=
8202         ac_prev=
8203         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8204          if test -n "$ac_prev"; then
8205            case $ac_word in
8206              i?86 | x86_64 | ppc | ppc64)
8207                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8208                  ac_arch=$ac_word
8209                else
8210                  ac_cv_c_bigendian=universal
8211                  break
8212                fi
8213                ;;
8214            esac
8215            ac_prev=
8216          elif test "x$ac_word" = "x-arch"; then
8217            ac_prev=arch
8218          fi
8219        done
8220 fi
8221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8222     if test $ac_cv_c_bigendian = unknown; then
8223       # See if sys/param.h defines the BYTE_ORDER macro.
8224       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8225 /* end confdefs.h.  */
8226 #include <sys/types.h>
8227              #include <sys/param.h>
8228
8229 int
8230 main ()
8231 {
8232 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8233                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8234                      && LITTLE_ENDIAN)
8235               bogus endian macros
8236              #endif
8237
8238   ;
8239   return 0;
8240 }
8241 _ACEOF
8242 if ac_fn_c_try_compile "$LINENO"; then :
8243   # It does; now see whether it defined to BIG_ENDIAN or not.
8244          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8245 /* end confdefs.h.  */
8246 #include <sys/types.h>
8247                 #include <sys/param.h>
8248
8249 int
8250 main ()
8251 {
8252 #if BYTE_ORDER != BIG_ENDIAN
8253                  not big endian
8254                 #endif
8255
8256   ;
8257   return 0;
8258 }
8259 _ACEOF
8260 if ac_fn_c_try_compile "$LINENO"; then :
8261   ac_cv_c_bigendian=yes
8262 else
8263   ac_cv_c_bigendian=no
8264 fi
8265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8266 fi
8267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8268     fi
8269     if test $ac_cv_c_bigendian = unknown; then
8270       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8271       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272 /* end confdefs.h.  */
8273 #include <limits.h>
8274
8275 int
8276 main ()
8277 {
8278 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8279               bogus endian macros
8280              #endif
8281
8282   ;
8283   return 0;
8284 }
8285 _ACEOF
8286 if ac_fn_c_try_compile "$LINENO"; then :
8287   # It does; now see whether it defined to _BIG_ENDIAN or not.
8288          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8289 /* end confdefs.h.  */
8290 #include <limits.h>
8291
8292 int
8293 main ()
8294 {
8295 #ifndef _BIG_ENDIAN
8296                  not big endian
8297                 #endif
8298
8299   ;
8300   return 0;
8301 }
8302 _ACEOF
8303 if ac_fn_c_try_compile "$LINENO"; then :
8304   ac_cv_c_bigendian=yes
8305 else
8306   ac_cv_c_bigendian=no
8307 fi
8308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8309 fi
8310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8311     fi
8312     if test $ac_cv_c_bigendian = unknown; then
8313       # Compile a test program.
8314       if test "$cross_compiling" = yes; then :
8315   # Try to guess by grepping values from an object file.
8316          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8317 /* end confdefs.h.  */
8318 short int ascii_mm[] =
8319                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8320                 short int ascii_ii[] =
8321                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8322                 int use_ascii (int i) {
8323                   return ascii_mm[i] + ascii_ii[i];
8324                 }
8325                 short int ebcdic_ii[] =
8326                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8327                 short int ebcdic_mm[] =
8328                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8329                 int use_ebcdic (int i) {
8330                   return ebcdic_mm[i] + ebcdic_ii[i];
8331                 }
8332                 extern int foo;
8333
8334 int
8335 main ()
8336 {
8337 return use_ascii (foo) == use_ebcdic (foo);
8338   ;
8339   return 0;
8340 }
8341 _ACEOF
8342 if ac_fn_c_try_compile "$LINENO"; then :
8343   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8344               ac_cv_c_bigendian=yes
8345             fi
8346             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8347               if test "$ac_cv_c_bigendian" = unknown; then
8348                 ac_cv_c_bigendian=no
8349               else
8350                 # finding both strings is unlikely to happen, but who knows?
8351                 ac_cv_c_bigendian=unknown
8352               fi
8353             fi
8354 fi
8355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8356 else
8357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358 /* end confdefs.h.  */
8359 $ac_includes_default
8360 int
8361 main ()
8362 {
8363
8364              /* Are we little or big endian?  From Harbison&Steele.  */
8365              union
8366              {
8367                long int l;
8368                char c[sizeof (long int)];
8369              } u;
8370              u.l = 1;
8371              return u.c[sizeof (long int) - 1] == 1;
8372
8373   ;
8374   return 0;
8375 }
8376 _ACEOF
8377 if ac_fn_c_try_run "$LINENO"; then :
8378   ac_cv_c_bigendian=no
8379 else
8380   ac_cv_c_bigendian=yes
8381 fi
8382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8383   conftest.$ac_objext conftest.beam conftest.$ac_ext
8384 fi
8385
8386     fi
8387 fi
8388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8389 $as_echo "$ac_cv_c_bigendian" >&6; }
8390  case $ac_cv_c_bigendian in #(
8391    yes)
8392      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8393 ;; #(
8394    no)
8395       ;; #(
8396    universal)
8397
8398 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8399
8400      ;; #(
8401    *)
8402      as_fn_error "unknown endianness
8403  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8404  esac
8405
8406
8407
8408
8409
8410
8411          if test -n "$gl_printf_safe"; then
8412
8413 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
8414
8415   fi
8416   case "$gl_cv_func_printf_long_double" in
8417     *yes)
8418       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
8419 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
8420 if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
8421   $as_echo_n "(cached) " >&6
8422 else
8423
8424           if test "$cross_compiling" = yes; then :
8425
8426            case "$host_cpu" in
8427                                    # Guess no on ia64, x86_64, i386.
8428              ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
8429              *)
8430                case "$host_os" in
8431                                        # Guess yes on glibc systems.
8432                  *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
8433                                        # Guess yes on FreeBSD >= 6.
8434                  freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
8435                  freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
8436                                        # Guess yes on MacOS X >= 10.3.
8437                  darwin[1-6].*)        gl_cv_func_printf_infinite_long_double="guessing no";;
8438                  darwin*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
8439                                        # Guess yes on HP-UX >= 11.
8440                  hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
8441                  hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
8442                                        # Guess yes on NetBSD >= 3.
8443                  netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8444                                        gl_cv_func_printf_infinite_long_double="guessing no";;
8445                  netbsd*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
8446                                        # If we don't know, assume the worst.
8447                  *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
8448                esac
8449                ;;
8450            esac
8451
8452 else
8453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8454 /* end confdefs.h.  */
8455
8456
8457 #include <stdlib.h>
8458 #if defined __MACH__ && defined __APPLE__
8459 /* Avoid a crash on MacOS X.  */
8460 #include <mach/mach.h>
8461 #include <mach/mach_error.h>
8462 #include <mach/thread_status.h>
8463 #include <mach/exception.h>
8464 #include <mach/task.h>
8465 #include <pthread.h>
8466 /* The exception port on which our thread listens.  */
8467 static mach_port_t our_exception_port;
8468 /* The main function of the thread listening for exceptions of type
8469    EXC_BAD_ACCESS.  */
8470 static void *
8471 mach_exception_thread (void *arg)
8472 {
8473   /* Buffer for a message to be received.  */
8474   struct {
8475     mach_msg_header_t head;
8476     mach_msg_body_t msgh_body;
8477     char data[1024];
8478   } msg;
8479   mach_msg_return_t retval;
8480   /* Wait for a message on the exception port.  */
8481   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8482                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8483   if (retval != MACH_MSG_SUCCESS)
8484     abort ();
8485   exit (1);
8486 }
8487 static void
8488 nocrash_init (void)
8489 {
8490   mach_port_t self = mach_task_self ();
8491   /* Allocate a port on which the thread shall listen for exceptions.  */
8492   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8493       == KERN_SUCCESS) {
8494     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
8495     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8496                                 MACH_MSG_TYPE_MAKE_SEND)
8497         == KERN_SUCCESS) {
8498       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
8499          for us.  */
8500       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8501       /* Create the thread listening on the exception port.  */
8502       pthread_attr_t attr;
8503       pthread_t thread;
8504       if (pthread_attr_init (&attr) == 0
8505           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8506           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8507         pthread_attr_destroy (&attr);
8508         /* Replace the exception port info for these exceptions with our own.
8509            Note that we replace the exception port for the entire task, not only
8510            for a particular thread.  This has the effect that when our exception
8511            port gets the message, the thread specific exception port has already
8512            been asked, and we don't need to bother about it.
8513            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
8514         task_set_exception_ports (self, mask, our_exception_port,
8515                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8516       }
8517     }
8518   }
8519 }
8520 #else
8521 /* Avoid a crash on POSIX systems.  */
8522 #include <signal.h>
8523 /* A POSIX signal handler.  */
8524 static void
8525 exception_handler (int sig)
8526 {
8527   exit (1);
8528 }
8529 static void
8530 nocrash_init (void)
8531 {
8532 #ifdef SIGSEGV
8533   signal (SIGSEGV, exception_handler);
8534 #endif
8535 #ifdef SIGBUS
8536   signal (SIGBUS, exception_handler);
8537 #endif
8538 }
8539 #endif
8540
8541 #include <float.h>
8542 #include <stdio.h>
8543 #include <string.h>
8544 static int
8545 strisnan (const char *string, size_t start_index, size_t end_index)
8546 {
8547   if (start_index < end_index)
8548     {
8549       if (string[start_index] == '-')
8550         start_index++;
8551       if (start_index + 3 <= end_index
8552           && memcmp (string + start_index, "nan", 3) == 0)
8553         {
8554           start_index += 3;
8555           if (start_index == end_index
8556               || (string[start_index] == '(' && string[end_index - 1] == ')'))
8557             return 1;
8558         }
8559     }
8560   return 0;
8561 }
8562 static char buf[10000];
8563 static long double zeroL = 0.0L;
8564 int main ()
8565 {
8566   nocrash_init();
8567   if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
8568       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8569     return 1;
8570   if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
8571       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8572     return 1;
8573   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
8574       || !strisnan (buf, 0, strlen (buf)))
8575     return 1;
8576   if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
8577       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8578     return 1;
8579   if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
8580       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8581     return 1;
8582   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
8583       || !strisnan (buf, 0, strlen (buf)))
8584     return 1;
8585   if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
8586       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8587     return 1;
8588   if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
8589       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8590     return 1;
8591   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
8592       || !strisnan (buf, 0, strlen (buf)))
8593     return 1;
8594 #if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
8595 /* Representation of an 80-bit 'long double' as an initializer for a sequence
8596    of 'unsigned int' words.  */
8597 # ifdef WORDS_BIGENDIAN
8598 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
8599      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
8600        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
8601        (unsigned int) (mantlo) << 16                                        \
8602      }
8603 # else
8604 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
8605      { mantlo, manthi, exponent }
8606 # endif
8607   { /* Quiet NaN.  */
8608     static union { unsigned int word[4]; long double value; } x =
8609       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
8610     if (sprintf (buf, "%Lf", x.value) < 0
8611         || !strisnan (buf, 0, strlen (buf)))
8612       return 1;
8613     if (sprintf (buf, "%Le", x.value) < 0
8614         || !strisnan (buf, 0, strlen (buf)))
8615       return 1;
8616     if (sprintf (buf, "%Lg", x.value) < 0
8617         || !strisnan (buf, 0, strlen (buf)))
8618       return 1;
8619   }
8620   {
8621     /* Signalling NaN.  */
8622     static union { unsigned int word[4]; long double value; } x =
8623       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
8624     if (sprintf (buf, "%Lf", x.value) < 0
8625         || !strisnan (buf, 0, strlen (buf)))
8626       return 1;
8627     if (sprintf (buf, "%Le", x.value) < 0
8628         || !strisnan (buf, 0, strlen (buf)))
8629       return 1;
8630     if (sprintf (buf, "%Lg", x.value) < 0
8631         || !strisnan (buf, 0, strlen (buf)))
8632       return 1;
8633   }
8634   { /* Pseudo-NaN.  */
8635     static union { unsigned int word[4]; long double value; } x =
8636       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
8637     if (sprintf (buf, "%Lf", x.value) < 0
8638         || !strisnan (buf, 0, strlen (buf)))
8639       return 1;
8640     if (sprintf (buf, "%Le", x.value) < 0
8641         || !strisnan (buf, 0, strlen (buf)))
8642       return 1;
8643     if (sprintf (buf, "%Lg", x.value) < 0
8644         || !strisnan (buf, 0, strlen (buf)))
8645       return 1;
8646   }
8647   { /* Pseudo-Infinity.  */
8648     static union { unsigned int word[4]; long double value; } x =
8649       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
8650     if (sprintf (buf, "%Lf", x.value) < 0
8651         || !strisnan (buf, 0, strlen (buf)))
8652       return 1;
8653     if (sprintf (buf, "%Le", x.value) < 0
8654         || !strisnan (buf, 0, strlen (buf)))
8655       return 1;
8656     if (sprintf (buf, "%Lg", x.value) < 0
8657         || !strisnan (buf, 0, strlen (buf)))
8658       return 1;
8659   }
8660   { /* Pseudo-Zero.  */
8661     static union { unsigned int word[4]; long double value; } x =
8662       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
8663     if (sprintf (buf, "%Lf", x.value) < 0
8664         || !strisnan (buf, 0, strlen (buf)))
8665       return 1;
8666     if (sprintf (buf, "%Le", x.value) < 0
8667         || !strisnan (buf, 0, strlen (buf)))
8668       return 1;
8669     if (sprintf (buf, "%Lg", x.value) < 0
8670         || !strisnan (buf, 0, strlen (buf)))
8671       return 1;
8672   }
8673   { /* Unnormalized number.  */
8674     static union { unsigned int word[4]; long double value; } x =
8675       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
8676     if (sprintf (buf, "%Lf", x.value) < 0
8677         || !strisnan (buf, 0, strlen (buf)))
8678       return 1;
8679     if (sprintf (buf, "%Le", x.value) < 0
8680         || !strisnan (buf, 0, strlen (buf)))
8681       return 1;
8682     if (sprintf (buf, "%Lg", x.value) < 0
8683         || !strisnan (buf, 0, strlen (buf)))
8684       return 1;
8685   }
8686   { /* Pseudo-Denormal.  */
8687     static union { unsigned int word[4]; long double value; } x =
8688       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
8689     if (sprintf (buf, "%Lf", x.value) < 0
8690         || !strisnan (buf, 0, strlen (buf)))
8691       return 1;
8692     if (sprintf (buf, "%Le", x.value) < 0
8693         || !strisnan (buf, 0, strlen (buf)))
8694       return 1;
8695     if (sprintf (buf, "%Lg", x.value) < 0
8696         || !strisnan (buf, 0, strlen (buf)))
8697       return 1;
8698   }
8699 #endif
8700   return 0;
8701 }
8702 _ACEOF
8703 if ac_fn_c_try_run "$LINENO"; then :
8704   gl_cv_func_printf_infinite_long_double=yes
8705 else
8706   gl_cv_func_printf_infinite_long_double=no
8707 fi
8708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8709   conftest.$ac_objext conftest.beam conftest.$ac_ext
8710 fi
8711
8712
8713 fi
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
8715 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
8716       ;;
8717     *)
8718       gl_cv_func_printf_infinite_long_double="irrelevant"
8719       ;;
8720   esac
8721
8722
8723
8724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
8725 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
8726 if test "${gl_cv_func_printf_directive_a+set}" = set; then :
8727   $as_echo_n "(cached) " >&6
8728 else
8729
8730       if test "$cross_compiling" = yes; then :
8731
8732        case "$host_os" in
8733                                # Guess yes on glibc >= 2.5 systems.
8734          *-gnu*)
8735            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8736 /* end confdefs.h.  */
8737
8738              #include <features.h>
8739              #ifdef __GNU_LIBRARY__
8740               #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
8741                BZ2908
8742               #endif
8743              #endif
8744
8745 _ACEOF
8746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8747   $EGREP "BZ2908" >/dev/null 2>&1; then :
8748   gl_cv_func_printf_directive_a="guessing yes"
8749 else
8750   gl_cv_func_printf_directive_a="guessing no"
8751 fi
8752 rm -f conftest*
8753
8754            ;;
8755                                # If we don't know, assume the worst.
8756          *)                    gl_cv_func_printf_directive_a="guessing no";;
8757        esac
8758
8759 else
8760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8761 /* end confdefs.h.  */
8762
8763 #include <stdio.h>
8764 #include <string.h>
8765 static char buf[100];
8766 int main ()
8767 {
8768   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
8769       || (strcmp (buf, "0x1.922p+1 33") != 0
8770           && strcmp (buf, "0x3.244p+0 33") != 0
8771           && strcmp (buf, "0x6.488p-1 33") != 0
8772           && strcmp (buf, "0xc.91p-2 33") != 0))
8773     return 1;
8774   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
8775       || (strcmp (buf, "-0X1.922P+1 33") != 0
8776           && strcmp (buf, "-0X3.244P+0 33") != 0
8777           && strcmp (buf, "-0X6.488P-1 33") != 0
8778           && strcmp (buf, "-0XC.91P-2 33") != 0))
8779     return 1;
8780   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
8781   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
8782       || (strcmp (buf, "0x1.83p+0 33") != 0
8783           && strcmp (buf, "0x3.05p-1 33") != 0
8784           && strcmp (buf, "0x6.0ap-2 33") != 0
8785           && strcmp (buf, "0xc.14p-3 33") != 0))
8786     return 1;
8787   /* This catches a FreeBSD 6.1 bug.  See
8788      <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
8789   if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
8790       || buf[0] == '0')
8791     return 1;
8792   /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
8793   if (sprintf (buf, "%.1a", 1.999) < 0
8794       || (strcmp (buf, "0x1.0p+1") != 0
8795           && strcmp (buf, "0x2.0p+0") != 0
8796           && strcmp (buf, "0x4.0p-1") != 0
8797           && strcmp (buf, "0x8.0p-2") != 0))
8798     return 1;
8799   /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
8800      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
8801   if (sprintf (buf, "%.1La", 1.999L) < 0
8802       || (strcmp (buf, "0x1.0p+1") != 0
8803           && strcmp (buf, "0x2.0p+0") != 0
8804           && strcmp (buf, "0x4.0p-1") != 0
8805           && strcmp (buf, "0x8.0p-2") != 0))
8806     return 1;
8807   return 0;
8808 }
8809 _ACEOF
8810 if ac_fn_c_try_run "$LINENO"; then :
8811   gl_cv_func_printf_directive_a=yes
8812 else
8813   gl_cv_func_printf_directive_a=no
8814 fi
8815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8816   conftest.$ac_objext conftest.beam conftest.$ac_ext
8817 fi
8818
8819
8820 fi
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
8822 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
8823
8824
8825
8826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
8827 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
8828 if test "${gl_cv_func_printf_directive_f+set}" = set; then :
8829   $as_echo_n "(cached) " >&6
8830 else
8831
8832       if test "$cross_compiling" = yes; then :
8833
8834        case "$host_os" in
8835                                # Guess yes on glibc systems.
8836          *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
8837                                # Guess yes on FreeBSD >= 6.
8838          freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
8839          freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
8840                                # Guess yes on MacOS X >= 10.3.
8841          darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
8842          darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
8843                                # Guess yes on Solaris >= 2.10.
8844          solaris2.[0-9]*)      gl_cv_func_printf_directive_f="guessing no";;
8845          solaris*)             gl_cv_func_printf_directive_f="guessing yes";;
8846                                # If we don't know, assume the worst.
8847          *)                    gl_cv_func_printf_directive_f="guessing no";;
8848        esac
8849
8850 else
8851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852 /* end confdefs.h.  */
8853
8854 #include <stdio.h>
8855 #include <string.h>
8856 static char buf[100];
8857 int main ()
8858 {
8859   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
8860       || strcmp (buf, "1234567.000000 33") != 0)
8861     return 1;
8862   if (sprintf (buf, "%F", 1.0 / 0.0) < 0
8863       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
8864     return 1;
8865   /* This catches a Cygwin 1.5.x bug.  */
8866   if (sprintf (buf, "%.F", 1234.0) < 0
8867       || strcmp (buf, "1234") != 0)
8868     return 1;
8869   return 0;
8870 }
8871 _ACEOF
8872 if ac_fn_c_try_run "$LINENO"; then :
8873   gl_cv_func_printf_directive_f=yes
8874 else
8875   gl_cv_func_printf_directive_f=no
8876 fi
8877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8878   conftest.$ac_objext conftest.beam conftest.$ac_ext
8879 fi
8880
8881
8882 fi
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
8884 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
8885
8886
8887
8888      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
8889 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
8890 if test "${gl_cv_func_printf_directive_n+set}" = set; then :
8891   $as_echo_n "(cached) " >&6
8892 else
8893
8894       if test "$cross_compiling" = yes; then :
8895
8896        case "$host_os" in
8897          *)     gl_cv_func_printf_directive_n="guessing yes";;
8898        esac
8899
8900 else
8901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8902 /* end confdefs.h.  */
8903
8904 #include <stdio.h>
8905 #include <string.h>
8906 static char fmtstring[10];
8907 static char buf[100];
8908 int main ()
8909 {
8910   int count = -1;
8911   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
8912      support %n in format strings in read-only memory but not in writable
8913      memory.  */
8914   strcpy (fmtstring, "%d %n");
8915   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
8916       || strcmp (buf, "123 ") != 0
8917       || count != 4)
8918     return 1;
8919   return 0;
8920 }
8921 _ACEOF
8922 if ac_fn_c_try_run "$LINENO"; then :
8923   gl_cv_func_printf_directive_n=yes
8924 else
8925   gl_cv_func_printf_directive_n=no
8926 fi
8927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8928   conftest.$ac_objext conftest.beam conftest.$ac_ext
8929 fi
8930
8931
8932 fi
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
8934 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
8935
8936
8937
8938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
8939 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
8940 if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
8941   $as_echo_n "(cached) " >&6
8942 else
8943
8944       if test "$cross_compiling" = yes; then :
8945
8946        case "$host_os" in
8947          openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
8948          irix*)           gl_cv_func_printf_directive_ls="guessing no";;
8949          solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
8950          cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
8951          beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
8952          *)               gl_cv_func_printf_directive_ls="guessing yes";;
8953        esac
8954
8955 else
8956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8957 /* end confdefs.h.  */
8958
8959 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8960    <wchar.h>.
8961    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8962    included before <wchar.h>.  */
8963 #include <stddef.h>
8964 #include <stdio.h>
8965 #include <time.h>
8966 #include <wchar.h>
8967 #include <string.h>
8968 int main ()
8969 {
8970   char buf[100];
8971   /* Test whether %ls works at all.
8972      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
8973      Cygwin 1.5.  */
8974   {
8975     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
8976     buf[0] = '\0';
8977     if (sprintf (buf, "%ls", wstring) < 0
8978         || strcmp (buf, "abc") != 0)
8979       return 1;
8980   }
8981   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
8982      assertion failure inside libc), but not on OpenBSD 4.0.  */
8983   {
8984     static const wchar_t wstring[] = { 'a', 0 };
8985     buf[0] = '\0';
8986     if (sprintf (buf, "%ls", wstring) < 0
8987         || strcmp (buf, "a") != 0)
8988       return 1;
8989   }
8990   /* Test whether precisions in %ls are supported as specified in ISO C 99
8991      section 7.19.6.1:
8992        "If a precision is specified, no more than that many bytes are written
8993         (including shift sequences, if any), and the array shall contain a
8994         null wide character if, to equal the multibyte character sequence
8995         length given by the precision, the function would need to access a
8996         wide character one past the end of the array."
8997      This test fails on Solaris 10.  */
8998   {
8999     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
9000     buf[0] = '\0';
9001     if (sprintf (buf, "%.2ls", wstring) < 0
9002         || strcmp (buf, "ab") != 0)
9003       return 1;
9004   }
9005   return 0;
9006 }
9007 _ACEOF
9008 if ac_fn_c_try_run "$LINENO"; then :
9009   gl_cv_func_printf_directive_ls=yes
9010 else
9011   gl_cv_func_printf_directive_ls=no
9012 fi
9013 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9014   conftest.$ac_objext conftest.beam conftest.$ac_ext
9015 fi
9016
9017
9018 fi
9019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
9020 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
9021
9022
9023
9024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
9025 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
9026 if test "${gl_cv_func_printf_positions+set}" = set; then :
9027   $as_echo_n "(cached) " >&6
9028 else
9029
9030       if test "$cross_compiling" = yes; then :
9031
9032        case "$host_os" in
9033          netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
9034                        gl_cv_func_printf_positions="guessing no";;
9035          beos*)        gl_cv_func_printf_positions="guessing no";;
9036          mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
9037          *)            gl_cv_func_printf_positions="guessing yes";;
9038        esac
9039
9040 else
9041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9042 /* end confdefs.h.  */
9043
9044 #include <stdio.h>
9045 #include <string.h>
9046 /* The string "%2$d %1$d", with dollar characters protected from the shell's
9047    dollar expansion (possibly an autoconf bug).  */
9048 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
9049 static char buf[100];
9050 int main ()
9051 {
9052   sprintf (buf, format, 33, 55);
9053   return (strcmp (buf, "55 33") != 0);
9054 }
9055 _ACEOF
9056 if ac_fn_c_try_run "$LINENO"; then :
9057   gl_cv_func_printf_positions=yes
9058 else
9059   gl_cv_func_printf_positions=no
9060 fi
9061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9062   conftest.$ac_objext conftest.beam conftest.$ac_ext
9063 fi
9064
9065
9066 fi
9067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
9068 $as_echo "$gl_cv_func_printf_positions" >&6; }
9069
9070
9071
9072      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
9073 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
9074 if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
9075   $as_echo_n "(cached) " >&6
9076 else
9077
9078       if test "$cross_compiling" = yes; then :
9079
9080        case "$host_os" in
9081          cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
9082          netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
9083          mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
9084          *)            gl_cv_func_printf_flag_grouping="guessing yes";;
9085        esac
9086
9087 else
9088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9089 /* end confdefs.h.  */
9090
9091 #include <stdio.h>
9092 #include <string.h>
9093 static char buf[100];
9094 int main ()
9095 {
9096   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
9097       || buf[strlen (buf) - 1] != '9')
9098     return 1;
9099   return 0;
9100 }
9101 _ACEOF
9102 if ac_fn_c_try_run "$LINENO"; then :
9103   gl_cv_func_printf_flag_grouping=yes
9104 else
9105   gl_cv_func_printf_flag_grouping=no
9106 fi
9107 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9108   conftest.$ac_objext conftest.beam conftest.$ac_ext
9109 fi
9110
9111
9112 fi
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
9114 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
9115
9116
9117
9118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
9119 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
9120 if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
9121   $as_echo_n "(cached) " >&6
9122 else
9123
9124       if test "$cross_compiling" = yes; then :
9125
9126          case "$host_os" in
9127                     # Guess yes on HP-UX 11.
9128            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
9129                     # Guess no on HP-UX 10 and older.
9130            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
9131                     # Guess yes otherwise.
9132            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
9133          esac
9134
9135 else
9136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137 /* end confdefs.h.  */
9138
9139 #include <stdio.h>
9140 #include <string.h>
9141 static char buf[100];
9142 int main ()
9143 {
9144   /* Check that a '-' flag is not annihilated by a negative width.  */
9145   if (sprintf (buf, "a%-*sc", -3, "b") < 0
9146       || strcmp (buf, "ab  c") != 0)
9147     return 1;
9148   return 0;
9149 }
9150 _ACEOF
9151 if ac_fn_c_try_run "$LINENO"; then :
9152   gl_cv_func_printf_flag_leftadjust=yes
9153 else
9154   gl_cv_func_printf_flag_leftadjust=no
9155 fi
9156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9157   conftest.$ac_objext conftest.beam conftest.$ac_ext
9158 fi
9159
9160
9161 fi
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
9163 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
9164
9165
9166
9167      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
9168 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
9169 if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
9170   $as_echo_n "(cached) " >&6
9171 else
9172
9173       if test "$cross_compiling" = yes; then :
9174
9175        case "$host_os" in
9176                  # Guess yes on glibc systems.
9177          *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
9178                  # Guess yes on BeOS.
9179          beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
9180                  # If we don't know, assume the worst.
9181          *)      gl_cv_func_printf_flag_zero="guessing no";;
9182        esac
9183
9184 else
9185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9186 /* end confdefs.h.  */
9187
9188 #include <stdio.h>
9189 #include <string.h>
9190 static char buf[100];
9191 int main ()
9192 {
9193   if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
9194       || (strcmp (buf, "       inf") != 0
9195           && strcmp (buf, "  infinity") != 0))
9196     return 1;
9197   return 0;
9198 }
9199 _ACEOF
9200 if ac_fn_c_try_run "$LINENO"; then :
9201   gl_cv_func_printf_flag_zero=yes
9202 else
9203   gl_cv_func_printf_flag_zero=no
9204 fi
9205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9206   conftest.$ac_objext conftest.beam conftest.$ac_ext
9207 fi
9208
9209
9210 fi
9211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
9212 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
9213
9214
9215
9216      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
9217 $as_echo_n "checking whether printf supports large precisions... " >&6; }
9218 if test "${gl_cv_func_printf_precision+set}" = set; then :
9219   $as_echo_n "(cached) " >&6
9220 else
9221
9222       if test "$cross_compiling" = yes; then :
9223
9224        case "$host_os" in
9225          # Guess no only on native Win32 and BeOS systems.
9226          mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
9227          beos*)        gl_cv_func_printf_precision="guessing no" ;;
9228          *)            gl_cv_func_printf_precision="guessing yes" ;;
9229        esac
9230
9231 else
9232   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233 /* end confdefs.h.  */
9234
9235 #include <stdio.h>
9236 #include <string.h>
9237 static char buf[5000];
9238 int main ()
9239 {
9240 #ifdef __BEOS__
9241   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
9242   return 1;
9243 #endif
9244   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
9245     return 1;
9246   return 0;
9247 }
9248 _ACEOF
9249 if ac_fn_c_try_run "$LINENO"; then :
9250   gl_cv_func_printf_precision=yes
9251 else
9252   gl_cv_func_printf_precision=no
9253 fi
9254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9255   conftest.$ac_objext conftest.beam conftest.$ac_ext
9256 fi
9257
9258
9259 fi
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
9261 $as_echo "$gl_cv_func_printf_precision" >&6; }
9262
9263
9264     gl_cv_c_multiarch=no
9265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9266 /* end confdefs.h.  */
9267 #ifndef __APPLE_CC__
9268          not a universal capable compiler
9269         #endif
9270         typedef int dummy;
9271
9272 _ACEOF
9273 if ac_fn_c_try_compile "$LINENO"; then :
9274
9275                arch=
9276      prev=
9277      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9278        if test -n "$prev"; then
9279          case $word in
9280            i?86 | x86_64 | ppc | ppc64)
9281              if test -z "$arch" || test "$arch" = "$word"; then
9282                arch="$word"
9283              else
9284                gl_cv_c_multiarch=yes
9285              fi
9286              ;;
9287          esac
9288          prev=
9289        else
9290          if test "x$word" = "x-arch"; then
9291            prev=arch
9292          fi
9293        fi
9294      done
9295
9296 fi
9297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9298   if test $gl_cv_c_multiarch = yes; then
9299
9300 $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9301
9302     APPLE_UNIVERSAL_BUILD=1
9303   else
9304     APPLE_UNIVERSAL_BUILD=0
9305   fi
9306
9307
9308
9309
9310
9311      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
9312 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
9313 if test "${gl_cv_func_printf_enomem+set}" = set; then :
9314   $as_echo_n "(cached) " >&6
9315 else
9316
9317       gl_cv_func_printf_enomem="guessing no"
9318       if test "$cross_compiling" = no; then
9319         if test $APPLE_UNIVERSAL_BUILD = 0; then
9320           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9321 /* end confdefs.h.  */
9322
9323
9324 #include <stdlib.h>
9325 #if defined __MACH__ && defined __APPLE__
9326 /* Avoid a crash on MacOS X.  */
9327 #include <mach/mach.h>
9328 #include <mach/mach_error.h>
9329 #include <mach/thread_status.h>
9330 #include <mach/exception.h>
9331 #include <mach/task.h>
9332 #include <pthread.h>
9333 /* The exception port on which our thread listens.  */
9334 static mach_port_t our_exception_port;
9335 /* The main function of the thread listening for exceptions of type
9336    EXC_BAD_ACCESS.  */
9337 static void *
9338 mach_exception_thread (void *arg)
9339 {
9340   /* Buffer for a message to be received.  */
9341   struct {
9342     mach_msg_header_t head;
9343     mach_msg_body_t msgh_body;
9344     char data1024;
9345   } msg;
9346   mach_msg_return_t retval;
9347   /* Wait for a message on the exception port.  */
9348   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9349                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9350   if (retval != MACH_MSG_SUCCESS)
9351     abort ();
9352   exit (1);
9353 }
9354 static void
9355 nocrash_init (void)
9356 {
9357   mach_port_t self = mach_task_self ();
9358   /* Allocate a port on which the thread shall listen for exceptions.  */
9359   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9360       == KERN_SUCCESS) {
9361     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9362     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9363                                 MACH_MSG_TYPE_MAKE_SEND)
9364         == KERN_SUCCESS) {
9365       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9366          for us.  */
9367       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9368       /* Create the thread listening on the exception port.  */
9369       pthread_attr_t attr;
9370       pthread_t thread;
9371       if (pthread_attr_init (&attr) == 0
9372           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9373           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9374         pthread_attr_destroy (&attr);
9375         /* Replace the exception port info for these exceptions with our own.
9376            Note that we replace the exception port for the entire task, not only
9377            for a particular thread.  This has the effect that when our exception
9378            port gets the message, the thread specific exception port has already
9379            been asked, and we don't need to bother about it.
9380            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9381         task_set_exception_ports (self, mask, our_exception_port,
9382                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9383       }
9384     }
9385   }
9386 }
9387 #else
9388 /* Avoid a crash on POSIX systems.  */
9389 #include <signal.h>
9390 /* A POSIX signal handler.  */
9391 static void
9392 exception_handler (int sig)
9393 {
9394   exit (1);
9395 }
9396 static void
9397 nocrash_init (void)
9398 {
9399 #ifdef SIGSEGV
9400   signal (SIGSEGV, exception_handler);
9401 #endif
9402 #ifdef SIGBUS
9403   signal (SIGBUS, exception_handler);
9404 #endif
9405 }
9406 #endif
9407
9408 #include <stdio.h>
9409 #include <sys/types.h>
9410 #include <sys/time.h>
9411 #include <sys/resource.h>
9412 #include <errno.h>
9413 int main()
9414 {
9415   struct rlimit limit;
9416   int ret;
9417   nocrash_init ();
9418   /* Some printf implementations allocate temporary space with malloc.  */
9419   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
9420 #ifdef RLIMIT_DATA
9421   if (getrlimit (RLIMIT_DATA, &limit) < 0)
9422     return 77;
9423   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
9424     limit.rlim_max = 5000000;
9425   limit.rlim_cur = limit.rlim_max;
9426   if (setrlimit (RLIMIT_DATA, &limit) < 0)
9427     return 77;
9428 #endif
9429   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
9430 #ifdef RLIMIT_AS
9431   if (getrlimit (RLIMIT_AS, &limit) < 0)
9432     return 77;
9433   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
9434     limit.rlim_max = 5000000;
9435   limit.rlim_cur = limit.rlim_max;
9436   if (setrlimit (RLIMIT_AS, &limit) < 0)
9437     return 77;
9438 #endif
9439   /* Some printf implementations allocate temporary space on the stack.  */
9440 #ifdef RLIMIT_STACK
9441   if (getrlimit (RLIMIT_STACK, &limit) < 0)
9442     return 77;
9443   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
9444     limit.rlim_max = 5000000;
9445   limit.rlim_cur = limit.rlim_max;
9446   if (setrlimit (RLIMIT_STACK, &limit) < 0)
9447     return 77;
9448 #endif
9449   ret = printf ("%.5000000f", 1.0);
9450   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
9451 }
9452
9453 _ACEOF
9454           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9455   (eval $ac_link) 2>&5
9456   ac_status=$?
9457   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9458   test $ac_status = 0; } && test -s conftest$ac_exeext; then
9459             (./conftest
9460              result=$?
9461              if test $result != 0 && test $result != 77; then result=1; fi
9462              exit $result
9463             ) >/dev/null 2>/dev/null
9464             case $? in
9465               0) gl_cv_func_printf_enomem="yes" ;;
9466               77) gl_cv_func_printf_enomem="guessing no" ;;
9467               *) gl_cv_func_printf_enomem="no" ;;
9468             esac
9469           else
9470             gl_cv_func_printf_enomem="guessing no"
9471           fi
9472           rm -fr conftest*
9473         else
9474                                         gl_cv_func_printf_enomem="guessing no"
9475         fi
9476       fi
9477       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
9478         case "$host_os" in
9479                     # Guess yes on glibc systems.
9480           *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
9481                     # Guess yes on Solaris.
9482           solaris*) gl_cv_func_printf_enomem="guessing yes";;
9483                     # Guess yes on AIX.
9484           aix*)     gl_cv_func_printf_enomem="guessing yes";;
9485                     # Guess yes on HP-UX/hppa.
9486           hpux*)    case "$host_cpu" in
9487                       hppa*) gl_cv_func_printf_enomem="guessing yes";;
9488                       *)     gl_cv_func_printf_enomem="guessing no";;
9489                     esac
9490                     ;;
9491                     # Guess yes on IRIX.
9492           irix*)    gl_cv_func_printf_enomem="guessing yes";;
9493                     # Guess yes on OSF/1.
9494           osf*)     gl_cv_func_printf_enomem="guessing yes";;
9495                     # Guess yes on BeOS.
9496           beos*)    gl_cv_func_printf_enomem="guessing yes";;
9497                     # Guess yes on Haiku.
9498           haiku*)   gl_cv_func_printf_enomem="guessing yes";;
9499                     # If we don't know, assume the worst.
9500           *)        gl_cv_func_printf_enomem="guessing no";;
9501         esac
9502       fi
9503
9504 fi
9505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
9506 $as_echo "$gl_cv_func_printf_enomem" >&6; }
9507
9508
9509
9510   case "$gl_cv_func_printf_long_double" in
9511     *yes)
9512       ;;
9513     *)
9514
9515 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
9516
9517       ;;
9518   esac
9519
9520
9521
9522
9523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9524 $as_echo_n "checking for long long int... " >&6; }
9525 if test "${ac_cv_type_long_long_int+set}" = set; then :
9526   $as_echo_n "(cached) " >&6
9527 else
9528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9529 /* end confdefs.h.  */
9530
9531   /* For now, do not test the preprocessor; as of 2007 there are too many
9532          implementations with broken preprocessors.  Perhaps this can
9533          be revisited in 2012.  In the meantime, code should not expect
9534          #if to work with literals wider than 32 bits.  */
9535       /* Test literals.  */
9536       long long int ll = 9223372036854775807ll;
9537       long long int nll = -9223372036854775807LL;
9538       unsigned long long int ull = 18446744073709551615ULL;
9539       /* Test constant expressions.   */
9540       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9541                      ? 1 : -1)];
9542       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9543                      ? 1 : -1)];
9544       int i = 63;
9545 int
9546 main ()
9547 {
9548 /* Test availability of runtime routines for shift and division.  */
9549       long long int llmax = 9223372036854775807ll;
9550       unsigned long long int ullmax = 18446744073709551615ull;
9551       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9552               | (llmax / ll) | (llmax % ll)
9553               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9554               | (ullmax / ull) | (ullmax % ull));
9555   ;
9556   return 0;
9557 }
9558
9559 _ACEOF
9560 if ac_fn_c_try_link "$LINENO"; then :
9561                           if test "$cross_compiling" = yes; then :
9562   ac_cv_type_long_long_int=yes
9563 else
9564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9565 /* end confdefs.h.  */
9566 #include <limits.h>
9567                #ifndef LLONG_MAX
9568                # define HALF \
9569                         (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9570                # define LLONG_MAX (HALF - 1 + HALF)
9571                #endif
9572 int
9573 main ()
9574 {
9575 long long int n = 1;
9576                int i;
9577                for (i = 0; ; i++)
9578                  {
9579                    long long int m = n << i;
9580                    if (m >> i != n)
9581                      return 1;
9582                    if (LLONG_MAX / 2 < m)
9583                      break;
9584                  }
9585                return 0;
9586   ;
9587   return 0;
9588 }
9589 _ACEOF
9590 if ac_fn_c_try_run "$LINENO"; then :
9591   ac_cv_type_long_long_int=yes
9592 else
9593   ac_cv_type_long_long_int=no
9594 fi
9595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9596   conftest.$ac_objext conftest.beam conftest.$ac_ext
9597 fi
9598
9599 else
9600   ac_cv_type_long_long_int=no
9601 fi
9602 rm -f core conftest.err conftest.$ac_objext \
9603     conftest$ac_exeext conftest.$ac_ext
9604 fi
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9606 $as_echo "$ac_cv_type_long_long_int" >&6; }
9607   if test $ac_cv_type_long_long_int = yes; then
9608
9609 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9610
9611   fi
9612
9613
9614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
9615 $as_echo_n "checking for wchar_t... " >&6; }
9616 if test "${gt_cv_c_wchar_t+set}" = set; then :
9617   $as_echo_n "(cached) " >&6
9618 else
9619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9620 /* end confdefs.h.  */
9621 #include <stddef.h>
9622        wchar_t foo = (wchar_t)'\0';
9623 int
9624 main ()
9625 {
9626
9627   ;
9628   return 0;
9629 }
9630 _ACEOF
9631 if ac_fn_c_try_compile "$LINENO"; then :
9632   gt_cv_c_wchar_t=yes
9633 else
9634   gt_cv_c_wchar_t=no
9635 fi
9636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9637 fi
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
9639 $as_echo "$gt_cv_c_wchar_t" >&6; }
9640   if test $gt_cv_c_wchar_t = yes; then
9641
9642 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
9643
9644   fi
9645
9646
9647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
9648 $as_echo_n "checking for wint_t... " >&6; }
9649 if test "${gt_cv_c_wint_t+set}" = set; then :
9650   $as_echo_n "(cached) " >&6
9651 else
9652   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9653 /* end confdefs.h.  */
9654
9655 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9656    <wchar.h>.
9657    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
9658    before <wchar.h>.  */
9659 #include <stddef.h>
9660 #include <stdio.h>
9661 #include <time.h>
9662 #include <wchar.h>
9663        wint_t foo = (wchar_t)'\0';
9664 int
9665 main ()
9666 {
9667
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 if ac_fn_c_try_compile "$LINENO"; then :
9673   gt_cv_c_wint_t=yes
9674 else
9675   gt_cv_c_wint_t=no
9676 fi
9677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9678 fi
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
9680 $as_echo "$gt_cv_c_wint_t" >&6; }
9681   if test $gt_cv_c_wint_t = yes; then
9682
9683 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
9684
9685   fi
9686
9687
9688
9689
9690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
9691 $as_echo_n "checking for intmax_t... " >&6; }
9692 if test "${gt_cv_c_intmax_t+set}" = set; then :
9693   $as_echo_n "(cached) " >&6
9694 else
9695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9696 /* end confdefs.h.  */
9697
9698 #include <stddef.h>
9699 #include <stdlib.h>
9700 #if HAVE_STDINT_H_WITH_UINTMAX
9701 #include <stdint.h>
9702 #endif
9703 #if HAVE_INTTYPES_H_WITH_UINTMAX
9704 #include <inttypes.h>
9705 #endif
9706
9707 int
9708 main ()
9709 {
9710 intmax_t x = -1; return !x;
9711   ;
9712   return 0;
9713 }
9714 _ACEOF
9715 if ac_fn_c_try_compile "$LINENO"; then :
9716   gt_cv_c_intmax_t=yes
9717 else
9718   gt_cv_c_intmax_t=no
9719 fi
9720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9721 fi
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
9723 $as_echo "$gt_cv_c_intmax_t" >&6; }
9724   if test $gt_cv_c_intmax_t = yes; then
9725
9726 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
9727
9728   else
9729
9730     test $ac_cv_type_long_long_int = yes \
9731       && ac_type='long long' \
9732       || ac_type='long'
9733
9734 cat >>confdefs.h <<_ACEOF
9735 #define intmax_t $ac_type
9736 _ACEOF
9737
9738   fi
9739
9740
9741
9742
9743
9744
9745   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
9746 do :
9747   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9748 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9749 eval as_val=\$$as_ac_var
9750    if test "x$as_val" = x""yes; then :
9751   cat >>confdefs.h <<_ACEOF
9752 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9753 _ACEOF
9754
9755 fi
9756 done
9757
9758       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
9759 "
9760 if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
9761   ac_have_decl=1
9762 else
9763   ac_have_decl=0
9764 fi
9765
9766 cat >>confdefs.h <<_ACEOF
9767 #define HAVE_DECL__SNPRINTF $ac_have_decl
9768 _ACEOF
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778   GNULIB_ACOSL=0;
9779   GNULIB_ASINL=0;
9780   GNULIB_ATANL=0;
9781   GNULIB_CEILF=0;
9782   GNULIB_CEILL=0;
9783   GNULIB_COSL=0;
9784   GNULIB_EXPL=0;
9785   GNULIB_FLOORF=0;
9786   GNULIB_FLOORL=0;
9787   GNULIB_FREXP=0;
9788   GNULIB_FREXPL=0;
9789   GNULIB_ISFINITE=0;
9790   GNULIB_ISINF=0;
9791   GNULIB_ISNAN=0;
9792   GNULIB_ISNANF=0;
9793   GNULIB_ISNAND=0;
9794   GNULIB_ISNANL=0;
9795   GNULIB_LDEXPL=0;
9796   GNULIB_LOGL=0;
9797   GNULIB_ROUND=0;
9798   GNULIB_ROUNDF=0;
9799   GNULIB_ROUNDL=0;
9800   GNULIB_SIGNBIT=0;
9801   GNULIB_SINL=0;
9802   GNULIB_SQRTL=0;
9803   GNULIB_TANL=0;
9804   GNULIB_TRUNC=0;
9805   GNULIB_TRUNCF=0;
9806   GNULIB_TRUNCL=0;
9807     HAVE_ACOSL=1;
9808   HAVE_ASINL=1;
9809   HAVE_ATANL=1;
9810   HAVE_COSL=1;
9811   HAVE_EXPL=1;
9812   HAVE_ISNANF=1;
9813   HAVE_ISNAND=1;
9814   HAVE_ISNANL=1;
9815   HAVE_LOGL=1;
9816   HAVE_SINL=1;
9817   HAVE_SQRTL=1;
9818   HAVE_TANL=1;
9819   HAVE_DECL_ACOSL=1;
9820   HAVE_DECL_ASINL=1;
9821   HAVE_DECL_ATANL=1;
9822   HAVE_DECL_COSL=1;
9823   HAVE_DECL_EXPL=1;
9824   HAVE_DECL_FREXPL=1;
9825   HAVE_DECL_LDEXPL=1;
9826   HAVE_DECL_LOGL=1;
9827   HAVE_DECL_SINL=1;
9828   HAVE_DECL_SQRTL=1;
9829   HAVE_DECL_TANL=1;
9830   HAVE_DECL_TRUNC=1;
9831   HAVE_DECL_TRUNCF=1;
9832   REPLACE_CEILF=0;
9833   REPLACE_CEILL=0;
9834   REPLACE_FLOORF=0;
9835   REPLACE_FLOORL=0;
9836   REPLACE_FREXP=0;
9837   REPLACE_FREXPL=0;
9838   REPLACE_HUGE_VAL=0;
9839   REPLACE_ISFINITE=0;
9840   REPLACE_ISINF=0;
9841   REPLACE_ISNAN=0;
9842   REPLACE_LDEXPL=0;
9843   REPLACE_NAN=0;
9844   REPLACE_ROUND=0;
9845   REPLACE_ROUNDF=0;
9846   REPLACE_ROUNDL=0;
9847   REPLACE_SIGNBIT=0;
9848   REPLACE_SIGNBIT_USING_GCC=0;
9849   REPLACE_TRUNCL=0;
9850
9851
9852     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
9853 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
9854 if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
9855   $as_echo_n "(cached) " >&6
9856 else
9857   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9858 /* end confdefs.h.  */
9859 #include <stdio.h>
9860 int
9861 main ()
9862 {
9863 #if defined __SL64 && defined __SCLE /* cygwin */
9864   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
9865      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
9866      it is easier to do a version check than building a runtime test.  */
9867 # include <cygwin/version.h>
9868 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
9869   choke me
9870 # endif
9871 #endif
9872   ;
9873   return 0;
9874 }
9875 _ACEOF
9876 if ac_fn_c_try_link "$LINENO"; then :
9877   gl_cv_var_stdin_large_offset=yes
9878 else
9879   gl_cv_var_stdin_large_offset=no
9880 fi
9881 rm -f core conftest.err conftest.$ac_objext \
9882     conftest$ac_exeext conftest.$ac_ext
9883 fi
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
9885 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
9886
9887
9888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9889 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
9890 if test "${gl_cv_func_getcwd_null+set}" = set; then :
9891   $as_echo_n "(cached) " >&6
9892 else
9893   if test "$cross_compiling" = yes; then :
9894
9895        case "$host_os" in
9896                                # Guess yes on glibc systems.
9897          *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
9898                                # Guess yes on Cygwin.
9899          cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
9900                                # Guess yes on mingw.
9901          mingw*)               gl_cv_func_getcwd_null="guessing yes";;
9902                                # If we don't know, assume the worst.
9903          *)                    gl_cv_func_getcwd_null="guessing no";;
9904        esac
9905
9906 else
9907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9908 /* end confdefs.h.  */
9909
9910 #        include <unistd.h>
9911 #        ifndef getcwd
9912          char *getcwd ();
9913 #        endif
9914
9915 int
9916 main ()
9917 {
9918
9919 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9920 /* mingw cwd does not start with '/', but getcwd does allocate.  */
9921 #else
9922            if (chdir ("/") != 0)
9923              return 1;
9924            else
9925              {
9926                char *f = getcwd (NULL, 0);
9927                return ! (f && f[0] == '/' && !f[1]);
9928              }
9929 #endif
9930
9931   ;
9932   return 0;
9933 }
9934 _ACEOF
9935 if ac_fn_c_try_run "$LINENO"; then :
9936   gl_cv_func_getcwd_null=yes
9937 else
9938   gl_cv_func_getcwd_null=no
9939 fi
9940 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9941   conftest.$ac_objext conftest.beam conftest.$ac_ext
9942 fi
9943
9944 fi
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9946 $as_echo "$gl_cv_func_getcwd_null" >&6; }
9947
9948 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
9949 if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
9950   ac_have_decl=1
9951 else
9952   ac_have_decl=0
9953 fi
9954
9955 cat >>confdefs.h <<_ACEOF
9956 #define HAVE_DECL_GETCWD $ac_have_decl
9957 _ACEOF
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971      if test $gl_cv_have_include_next = yes; then
9972        gl_cv_next_getopt_h='<'getopt.h'>'
9973      else
9974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
9975 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
9976 if test "${gl_cv_next_getopt_h+set}" = set; then :
9977   $as_echo_n "(cached) " >&6
9978 else
9979
9980           if test $ac_cv_header_getopt_h = yes; then
9981             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9982 /* end confdefs.h.  */
9983 #include <getopt.h>
9984
9985 _ACEOF
9986                                                                                                 case "$host_os" in
9987               aix*) gl_absname_cpp="$ac_cpp -C" ;;
9988               *)    gl_absname_cpp="$ac_cpp" ;;
9989             esac
9990                                                 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9991                sed -n '\#/getopt.h#{
9992                  s#.*"\(.*/getopt.h\)".*#\1#
9993                  s#^/[^/]#//&#
9994                  p
9995                  q
9996                }'`'"'
9997           else
9998             gl_cv_next_getopt_h='<'getopt.h'>'
9999           fi
10000
10001 fi
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10003 $as_echo "$gl_cv_next_getopt_h" >&6; }
10004      fi
10005      NEXT_GETOPT_H=$gl_cv_next_getopt_h
10006
10007      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10008        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10009        gl_next_as_first_directive='<'getopt.h'>'
10010      else
10011        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10012        gl_next_as_first_directive=$gl_cv_next_getopt_h
10013      fi
10014      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10015
10016
10017
10018
10019   if test $ac_cv_header_getopt_h = yes; then
10020     HAVE_GETOPT_H=1
10021   else
10022     HAVE_GETOPT_H=0
10023   fi
10024
10025
10026   gl_replace_getopt=
10027
10028     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10029     for ac_header in getopt.h
10030 do :
10031   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10032 if test "x$ac_cv_header_getopt_h" = x""yes; then :
10033   cat >>confdefs.h <<_ACEOF
10034 #define HAVE_GETOPT_H 1
10035 _ACEOF
10036
10037 else
10038   gl_replace_getopt=yes
10039 fi
10040
10041 done
10042
10043   fi
10044
10045     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10046     for ac_func in getopt_long_only
10047 do :
10048   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10049 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
10050   cat >>confdefs.h <<_ACEOF
10051 #define HAVE_GETOPT_LONG_ONLY 1
10052 _ACEOF
10053
10054 else
10055   gl_replace_getopt=yes
10056 fi
10057 done
10058
10059   fi
10060
10061           if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10062     ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
10063 "
10064 if test "x$ac_cv_have_decl_optreset" = x""yes; then :
10065   ac_have_decl=1
10066 else
10067   ac_have_decl=0
10068 fi
10069
10070 cat >>confdefs.h <<_ACEOF
10071 #define HAVE_DECL_OPTRESET $ac_have_decl
10072 _ACEOF
10073
10074   fi
10075
10076             if test -z "$gl_replace_getopt"; then
10077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10078 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
10079 if test "${gl_cv_func_getopt_posix+set}" = set; then :
10080   $as_echo_n "(cached) " >&6
10081 else
10082
10083                 if test "$cross_compiling" = yes; then :
10084   case "$host_os" in
10085              mingw*) gl_cv_func_getopt_posix="guessing no";;
10086              *)      gl_cv_func_getopt_posix="guessing yes";;
10087            esac
10088
10089 else
10090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091 /* end confdefs.h.  */
10092
10093 #include <unistd.h>
10094 #include <stdlib.h>
10095 #include <string.h>
10096
10097 #if !HAVE_DECL_OPTRESET
10098 # define OPTIND_MIN 0
10099 #else
10100 # define OPTIND_MIN 1
10101 #endif
10102
10103 int
10104 main ()
10105 {
10106   {
10107     int argc = 0;
10108     char *argv[10];
10109     int c;
10110
10111     argv[argc++] = "program";
10112     argv[argc++] = "-a";
10113     argv[argc++] = "foo";
10114     argv[argc++] = "bar";
10115     argv[argc] = NULL;
10116     optind = OPTIND_MIN;
10117     opterr = 0;
10118
10119     c = getopt (argc, argv, "ab");
10120     if (!(c == 'a'))
10121       return 1;
10122     c = getopt (argc, argv, "ab");
10123     if (!(c == -1))
10124       return 2;
10125     if (!(optind == 2))
10126       return 3;
10127   }
10128   /* Some internal state exists at this point.  */
10129   {
10130     int argc = 0;
10131     char *argv[10];
10132     int c;
10133
10134     argv[argc++] = "program";
10135     argv[argc++] = "donald";
10136     argv[argc++] = "-p";
10137     argv[argc++] = "billy";
10138     argv[argc++] = "duck";
10139     argv[argc++] = "-a";
10140     argv[argc++] = "bar";
10141     argv[argc] = NULL;
10142     optind = OPTIND_MIN;
10143     opterr = 0;
10144
10145     c = getopt (argc, argv, "+abp:q:");
10146     if (!(c == -1))
10147       return 4;
10148     if (!(strcmp (argv[0], "program") == 0))
10149       return 5;
10150     if (!(strcmp (argv[1], "donald") == 0))
10151       return 6;
10152     if (!(strcmp (argv[2], "-p") == 0))
10153       return 7;
10154     if (!(strcmp (argv[3], "billy") == 0))
10155       return 8;
10156     if (!(strcmp (argv[4], "duck") == 0))
10157       return 9;
10158     if (!(strcmp (argv[5], "-a") == 0))
10159       return 10;
10160     if (!(strcmp (argv[6], "bar") == 0))
10161       return 11;
10162     if (!(optind == 1))
10163       return 12;
10164   }
10165
10166   return 0;
10167 }
10168
10169 _ACEOF
10170 if ac_fn_c_try_run "$LINENO"; then :
10171   gl_cv_func_getopt_posix=yes
10172 else
10173   gl_cv_func_getopt_posix=no
10174 fi
10175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10176   conftest.$ac_objext conftest.beam conftest.$ac_ext
10177 fi
10178
10179
10180 fi
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
10182 $as_echo "$gl_cv_func_getopt_posix" >&6; }
10183     case "$gl_cv_func_getopt_posix" in
10184       *no) gl_replace_getopt=yes ;;
10185     esac
10186   fi
10187
10188   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10189     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
10190 $as_echo_n "checking for working GNU getopt function... " >&6; }
10191 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
10192   $as_echo_n "(cached) " >&6
10193 else
10194   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
10195        # optstring is necessary for programs like m4 that have POSIX-mandated
10196        # semantics for supporting options interspersed with files.
10197        # Also, since getopt_long is a GNU extension, we require optind=0.
10198        gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
10199        POSIXLY_CORRECT=1
10200        export POSIXLY_CORRECT
10201        if test "$cross_compiling" = yes; then :
10202            case $host_os:$ac_cv_have_decl_optreset in
10203            *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
10204            *:yes)               gl_cv_func_getopt_gnu=no;;
10205            *)                   gl_cv_func_getopt_gnu=yes;;
10206          esac
10207
10208 else
10209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10210 /* end confdefs.h.  */
10211 #include <getopt.h>
10212                            #include <stddef.h>
10213                            #include <string.h>
10214
10215 int
10216 main ()
10217 {
10218
10219              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
10220                 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
10221                 OSF/1 5.1, Solaris 10.  */
10222              {
10223                char *myargv[3];
10224                myargv[0] = "conftest";
10225                myargv[1] = "-+";
10226                myargv[2] = 0;
10227                opterr = 0;
10228                if (getopt (2, myargv, "+a") != '?')
10229                  return 1;
10230              }
10231              /* This code succeeds on glibc 2.8, mingw,
10232                 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
10233                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
10234              {
10235                char *argv[] = { "program", "-p", "foo", "bar", NULL };
10236
10237                optind = 1;
10238                if (getopt (4, argv, "p::") != 'p')
10239                  return 2;
10240                if (optarg != NULL)
10241                  return 3;
10242                if (getopt (4, argv, "p::") != -1)
10243                  return 4;
10244                if (optind != 2)
10245                  return 5;
10246              }
10247              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
10248              {
10249                char *argv[] = { "program", "foo", "-p", NULL };
10250                optind = 0;
10251                if (getopt (3, argv, "-p") != 1)
10252                  return 6;
10253                if (getopt (3, argv, "-p") != 'p')
10254                  return 7;
10255              }
10256              return 0;
10257
10258   ;
10259   return 0;
10260 }
10261 _ACEOF
10262 if ac_fn_c_try_run "$LINENO"; then :
10263   gl_cv_func_getopt_gnu=yes
10264 else
10265   gl_cv_func_getopt_gnu=no
10266 fi
10267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10268   conftest.$ac_objext conftest.beam conftest.$ac_ext
10269 fi
10270
10271        if test "$gl_had_POSIXLY_CORRECT" != yes; then
10272          { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
10273        fi
10274
10275 fi
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
10277 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
10278     if test "$gl_cv_func_getopt_gnu" = "no"; then
10279       gl_replace_getopt=yes
10280     fi
10281   fi
10282
10283 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
10284 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
10285   ac_have_decl=1
10286 else
10287   ac_have_decl=0
10288 fi
10289
10290 cat >>confdefs.h <<_ACEOF
10291 #define HAVE_DECL_GETENV $ac_have_decl
10292 _ACEOF
10293
10294
10295
10296
10297
10298
10299   if test -n "$gl_replace_getopt"; then :
10300
10301
10302
10303   GETOPT_H=getopt.h
10304
10305 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
10306
10307
10308
10309     GNULIB_UNISTD_H_GETOPT=1
10310
10311
10312
10313
10314
10315
10316
10317
10318   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
10329
10330
10331
10332
10333
10334
10335 fi
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10346 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10347 if test "${ac_cv_c_restrict+set}" = set; then :
10348   $as_echo_n "(cached) " >&6
10349 else
10350   ac_cv_c_restrict=no
10351    # The order here caters to the fact that C++ does not require restrict.
10352    for ac_kw in __restrict __restrict__ _Restrict restrict; do
10353      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354 /* end confdefs.h.  */
10355 typedef int * int_ptr;
10356         int foo (int_ptr $ac_kw ip) {
10357         return ip[0];
10358        }
10359 int
10360 main ()
10361 {
10362 int s[1];
10363         int * $ac_kw t = s;
10364         t[0] = 0;
10365         return foo(t)
10366   ;
10367   return 0;
10368 }
10369 _ACEOF
10370 if ac_fn_c_try_compile "$LINENO"; then :
10371   ac_cv_c_restrict=$ac_kw
10372 fi
10373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10374      test "$ac_cv_c_restrict" != no && break
10375    done
10376
10377 fi
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10379 $as_echo "$ac_cv_c_restrict" >&6; }
10380
10381  case $ac_cv_c_restrict in
10382    restrict) ;;
10383    no) $as_echo "#define restrict /**/" >>confdefs.h
10384  ;;
10385    *)  cat >>confdefs.h <<_ACEOF
10386 #define restrict $ac_cv_c_restrict
10387 _ACEOF
10388  ;;
10389  esac
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402      if test $gl_cv_have_include_next = yes; then
10403        gl_cv_next_sys_time_h='<'sys/time.h'>'
10404      else
10405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10406 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
10407 if test "${gl_cv_next_sys_time_h+set}" = set; then :
10408   $as_echo_n "(cached) " >&6
10409 else
10410
10411           if test $ac_cv_header_sys_time_h = yes; then
10412             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10413 /* end confdefs.h.  */
10414 #include <sys/time.h>
10415
10416 _ACEOF
10417                                                                                                 case "$host_os" in
10418               aix*) gl_absname_cpp="$ac_cpp -C" ;;
10419               *)    gl_absname_cpp="$ac_cpp" ;;
10420             esac
10421                                                 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10422                sed -n '\#/sys/time.h#{
10423                  s#.*"\(.*/sys/time.h\)".*#\1#
10424                  s#^/[^/]#//&#
10425                  p
10426                  q
10427                }'`'"'
10428           else
10429             gl_cv_next_sys_time_h='<'sys/time.h'>'
10430           fi
10431
10432 fi
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10434 $as_echo "$gl_cv_next_sys_time_h" >&6; }
10435      fi
10436      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10437
10438      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10439        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10440        gl_next_as_first_directive='<'sys/time.h'>'
10441      else
10442        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10443        gl_next_as_first_directive=$gl_cv_next_sys_time_h
10444      fi
10445      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10446
10447
10448
10449
10450   if test $ac_cv_header_sys_time_h = yes; then
10451     HAVE_SYS_TIME_H=1
10452   else
10453     HAVE_SYS_TIME_H=0
10454   fi
10455
10456
10457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10458 $as_echo_n "checking for struct timeval... " >&6; }
10459 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
10460   $as_echo_n "(cached) " >&6
10461 else
10462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10463 /* end confdefs.h.  */
10464 #if HAVE_SYS_TIME_H
10465              #include <sys/time.h>
10466             #endif
10467             #include <time.h>
10468
10469 int
10470 main ()
10471 {
10472 static struct timeval x; x.tv_sec = x.tv_usec;
10473   ;
10474   return 0;
10475 }
10476 _ACEOF
10477 if ac_fn_c_try_compile "$LINENO"; then :
10478   gl_cv_sys_struct_timeval=yes
10479 else
10480   gl_cv_sys_struct_timeval=no
10481 fi
10482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10483 fi
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
10485 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
10486   if test $gl_cv_sys_struct_timeval = yes; then
10487     HAVE_STRUCT_TIMEVAL=1
10488   else
10489     HAVE_STRUCT_TIMEVAL=0
10490   fi
10491
10492
10493     REPLACE_GETTIMEOFDAY=0
10494
10495   if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
10496     SYS_TIME_H=sys/time.h
10497   else
10498     SYS_TIME_H=
10499   fi
10500
10501
10502
10503
10504
10505
10506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
10507 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
10508 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
10509   $as_echo_n "(cached) " >&6
10510 else
10511
10512       if test "$cross_compiling" = yes; then :
10513   gl_cv_cc_float_expbit0="word 0 bit 23"
10514 else
10515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516 /* end confdefs.h.  */
10517
10518 #include <float.h>
10519 #include <stddef.h>
10520 #include <stdio.h>
10521 #include <string.h>
10522 #define NWORDS \
10523   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10524 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
10525 static unsigned int ored_words[NWORDS];
10526 static unsigned int anded_words[NWORDS];
10527 static void add_to_ored_words (float x)
10528 {
10529   memory_float m;
10530   size_t i;
10531   /* Clear it first, in case
10532      sizeof (float) < sizeof (memory_float).  */
10533   memset (&m, 0, sizeof (memory_float));
10534   m.value = x;
10535   for (i = 0; i < NWORDS; i++)
10536     {
10537       ored_words[i] |= m.word[i];
10538       anded_words[i] &= m.word[i];
10539     }
10540 }
10541 int main ()
10542 {
10543   size_t j;
10544   FILE *fp = fopen ("conftest.out", "w");
10545   if (fp == NULL)
10546     return 1;
10547   for (j = 0; j < NWORDS; j++)
10548     anded_words[j] = ~ (unsigned int) 0;
10549   add_to_ored_words (0.25f);
10550   add_to_ored_words (0.5f);
10551   add_to_ored_words (1.0f);
10552   add_to_ored_words (2.0f);
10553   add_to_ored_words (4.0f);
10554   /* Remove bits that are common (e.g. if representation of the first mantissa
10555      bit is explicit).  */
10556   for (j = 0; j < NWORDS; j++)
10557     ored_words[j] &= ~anded_words[j];
10558   /* Now find the nonzero word.  */
10559   for (j = 0; j < NWORDS; j++)
10560     if (ored_words[j] != 0)
10561       break;
10562   if (j < NWORDS)
10563     {
10564       size_t i;
10565       for (i = j + 1; i < NWORDS; i++)
10566         if (ored_words[i] != 0)
10567           {
10568             fprintf (fp, "unknown");
10569             return (fclose (fp) != 0);
10570           }
10571       for (i = 0; ; i++)
10572         if ((ored_words[j] >> i) & 1)
10573           {
10574             fprintf (fp, "word %d bit %d", (int) j, (int) i);
10575             return (fclose (fp) != 0);
10576           }
10577     }
10578   fprintf (fp, "unknown");
10579   return (fclose (fp) != 0);
10580 }
10581
10582 _ACEOF
10583 if ac_fn_c_try_run "$LINENO"; then :
10584   gl_cv_cc_float_expbit0=`cat conftest.out`
10585 else
10586   gl_cv_cc_float_expbit0="unknown"
10587 fi
10588 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10589   conftest.$ac_objext conftest.beam conftest.$ac_ext
10590 fi
10591
10592       rm -f conftest.out
10593
10594 fi
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
10596 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
10597   case "$gl_cv_cc_float_expbit0" in
10598     word*bit*)
10599       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10600       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
10601
10602 cat >>confdefs.h <<_ACEOF
10603 #define FLT_EXPBIT0_WORD $word
10604 _ACEOF
10605
10606
10607 cat >>confdefs.h <<_ACEOF
10608 #define FLT_EXPBIT0_BIT $bit
10609 _ACEOF
10610
10611       ;;
10612   esac
10613
10614
10615
10616
10617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10618 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10619 if test "${am_cv_langinfo_codeset+set}" = set; then :
10620   $as_echo_n "(cached) " >&6
10621 else
10622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10623 /* end confdefs.h.  */
10624 #include <langinfo.h>
10625 int
10626 main ()
10627 {
10628 char* cs = nl_langinfo(CODESET); return !cs;
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 if ac_fn_c_try_link "$LINENO"; then :
10634   am_cv_langinfo_codeset=yes
10635 else
10636   am_cv_langinfo_codeset=no
10637 fi
10638 rm -f core conftest.err conftest.$ac_objext \
10639     conftest$ac_exeext conftest.$ac_ext
10640
10641 fi
10642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10643 $as_echo "$am_cv_langinfo_codeset" >&6; }
10644   if test $am_cv_langinfo_codeset = yes; then
10645
10646 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10647
10648   fi
10649
10650 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
10651 if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10652   ac_have_decl=1
10653 else
10654   ac_have_decl=0
10655 fi
10656
10657 cat >>confdefs.h <<_ACEOF
10658 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10659 _ACEOF
10660
10661
10662     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
10663 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
10664 if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10665   $as_echo_n "(cached) " >&6
10666 else
10667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668 /* end confdefs.h.  */
10669
10670 #include <features.h>
10671 #ifdef __GNU_LIBRARY__
10672  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10673   Lucky GNU user
10674  #endif
10675 #endif
10676
10677 _ACEOF
10678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10679   $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
10680   ac_cv_gnu_library_2_1=yes
10681 else
10682   ac_cv_gnu_library_2_1=no
10683 fi
10684 rm -f conftest*
10685
10686
10687
10688 fi
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10690 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
10691
10692     GLIBC21="$ac_cv_gnu_library_2_1"
10693
10694
10695
10696
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10698 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10699 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
10700   $as_echo_n "(cached) " >&6
10701 else
10702   rm -f conftest.sym conftest.file
10703 echo >conftest.file
10704 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
10705   if test "$cross_compiling" = yes; then :
10706   ac_cv_func_lstat_dereferences_slashed_symlink=no
10707 else
10708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709 /* end confdefs.h.  */
10710 $ac_includes_default
10711 int
10712 main ()
10713 {
10714 struct stat sbuf;
10715      /* Linux will dereference the symlink and fail, as required by POSIX.
10716         That is better in the sense that it means we will not
10717         have to compile and use the lstat wrapper.  */
10718      return lstat ("conftest.sym/", &sbuf) == 0;
10719   ;
10720   return 0;
10721 }
10722 _ACEOF
10723 if ac_fn_c_try_run "$LINENO"; then :
10724   ac_cv_func_lstat_dereferences_slashed_symlink=yes
10725 else
10726   ac_cv_func_lstat_dereferences_slashed_symlink=no
10727 fi
10728 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10729   conftest.$ac_objext conftest.beam conftest.$ac_ext
10730 fi
10731
10732 else
10733   # If the `ln -s' command failed, then we probably don't even
10734   # have an lstat function.
10735   ac_cv_func_lstat_dereferences_slashed_symlink=no
10736 fi
10737 rm -f conftest.sym conftest.file
10738
10739 fi
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
10741 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10742
10743 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
10744
10745 cat >>confdefs.h <<_ACEOF
10746 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10747 _ACEOF
10748
10749
10750 if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
10751
10752
10753
10754
10755
10756
10757
10758
10759   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
10760
10761 fi
10762
10763
10764
10765
10766   GNULIB_BTOWC=0;
10767   GNULIB_WCTOB=0;
10768   GNULIB_MBSINIT=0;
10769   GNULIB_MBRTOWC=0;
10770   GNULIB_MBRLEN=0;
10771   GNULIB_MBSRTOWCS=0;
10772   GNULIB_MBSNRTOWCS=0;
10773   GNULIB_WCRTOMB=0;
10774   GNULIB_WCSRTOMBS=0;
10775   GNULIB_WCSNRTOMBS=0;
10776   GNULIB_WCWIDTH=0;
10777     HAVE_BTOWC=1;
10778   HAVE_MBSINIT=1;
10779   HAVE_MBRTOWC=1;
10780   HAVE_MBRLEN=1;
10781   HAVE_MBSRTOWCS=1;
10782   HAVE_MBSNRTOWCS=1;
10783   HAVE_WCRTOMB=1;
10784   HAVE_WCSRTOMBS=1;
10785   HAVE_WCSNRTOMBS=1;
10786   HAVE_DECL_WCTOB=1;
10787   HAVE_DECL_WCWIDTH=1;
10788   REPLACE_MBSTATE_T=0;
10789   REPLACE_BTOWC=0;
10790   REPLACE_WCTOB=0;
10791   REPLACE_MBSINIT=0;
10792   REPLACE_MBRTOWC=0;
10793   REPLACE_MBRLEN=0;
10794   REPLACE_MBSRTOWCS=0;
10795   REPLACE_MBSNRTOWCS=0;
10796   REPLACE_WCRTOMB=0;
10797   REPLACE_WCSRTOMBS=0;
10798   REPLACE_WCSNRTOMBS=0;
10799   REPLACE_WCWIDTH=0;
10800
10801
10802
10803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10804 $as_echo_n "checking for mbstate_t... " >&6; }
10805 if test "${ac_cv_type_mbstate_t+set}" = set; then :
10806   $as_echo_n "(cached) " >&6
10807 else
10808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10809 /* end confdefs.h.  */
10810 $ac_includes_default
10811 #           include <wchar.h>
10812 int
10813 main ()
10814 {
10815 mbstate_t x; return sizeof x;
10816   ;
10817   return 0;
10818 }
10819 _ACEOF
10820 if ac_fn_c_try_compile "$LINENO"; then :
10821   ac_cv_type_mbstate_t=yes
10822 else
10823   ac_cv_type_mbstate_t=no
10824 fi
10825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10826 fi
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10828 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10829    if test $ac_cv_type_mbstate_t = yes; then
10830
10831 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10832
10833    else
10834
10835 $as_echo "#define mbstate_t int" >>confdefs.h
10836
10837    fi
10838
10839
10840
10841
10842
10843
10844
10845
10846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
10847 $as_echo_n "checking for a traditional japanese locale... " >&6; }
10848 if test "${gt_cv_locale_ja+set}" = set; then :
10849   $as_echo_n "(cached) " >&6
10850 else
10851
10852     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h.  */
10854
10855 #include <locale.h>
10856 #include <time.h>
10857 #if HAVE_LANGINFO_CODESET
10858 # include <langinfo.h>
10859 #endif
10860 #include <stdlib.h>
10861 #include <string.h>
10862 struct tm t;
10863 char buf[16];
10864 int main ()
10865 {
10866   const char *p;
10867   /* Check whether the given locale name is recognized by the system.  */
10868   if (setlocale (LC_ALL, "") == NULL) return 1;
10869   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10870      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10871      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10872      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10873      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10874      some unit tests fail.  */
10875 #if HAVE_LANGINFO_CODESET
10876   {
10877     const char *cs = nl_langinfo (CODESET);
10878     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10879       return 1;
10880   }
10881 #endif
10882 #ifdef __CYGWIN__
10883   /* On Cygwin, avoid locale names without encoding suffix, because the
10884      locale_charset() function relies on the encoding suffix.  Note that
10885      LC_ALL is set on the command line.  */
10886   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10887 #endif
10888   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
10889      on Cygwin 1.5.x.  */
10890   if (MB_CUR_MAX == 1)
10891     return 1;
10892   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
10893      This excludes the UTF-8 encoding.  */
10894   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10895   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
10896   for (p = buf; *p != '\0'; p++)
10897     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
10898       return 1;
10899   return 0;
10900 }
10901
10902 _ACEOF
10903     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10904   (eval $ac_link) 2>&5
10905   ac_status=$?
10906   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10907   test $ac_status = 0; } && test -s conftest$ac_exeext; then
10908       # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10909       # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
10910       # configure script would override the LC_ALL setting. Likewise for
10911       # LC_CTYPE, which is also set at the beginning of the configure script.
10912       # Test for the AIX locale name.
10913       if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10914         gt_cv_locale_ja=ja_JP
10915       else
10916         # Test for the locale name with explicit encoding suffix.
10917         if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10918           gt_cv_locale_ja=ja_JP.EUC-JP
10919         else
10920           # Test for the HP-UX, OSF/1, NetBSD locale name.
10921           if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10922             gt_cv_locale_ja=ja_JP.eucJP
10923           else
10924             # Test for the IRIX, FreeBSD locale name.
10925             if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10926               gt_cv_locale_ja=ja_JP.EUC
10927             else
10928               # Test for the Solaris 7 locale name.
10929               if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10930                 gt_cv_locale_ja=ja
10931               else
10932                 # Special test for NetBSD 1.6.
10933                 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
10934                   gt_cv_locale_ja=ja_JP.eucJP
10935                 else
10936                   # None found.
10937                   gt_cv_locale_ja=none
10938                 fi
10939               fi
10940             fi
10941           fi
10942         fi
10943       fi
10944     fi
10945     rm -fr conftest*
10946
10947 fi
10948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
10949 $as_echo "$gt_cv_locale_ja" >&6; }
10950   LOCALE_JA=$gt_cv_locale_ja
10951
10952
10953
10954
10955
10956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
10957 $as_echo_n "checking for a transitional chinese locale... " >&6; }
10958 if test "${gt_cv_locale_zh_CN+set}" = set; then :
10959   $as_echo_n "(cached) " >&6
10960 else
10961
10962     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10963 /* end confdefs.h.  */
10964
10965 #include <locale.h>
10966 #include <stdlib.h>
10967 #include <time.h>
10968 #if HAVE_LANGINFO_CODESET
10969 # include <langinfo.h>
10970 #endif
10971 #include <stdlib.h>
10972 #include <string.h>
10973 struct tm t;
10974 char buf[16];
10975 int main ()
10976 {
10977   const char *p;
10978   /* Check whether the given locale name is recognized by the system.  */
10979   if (setlocale (LC_ALL, "") == NULL) return 1;
10980   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10981      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10982      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10983      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10984      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10985      some unit tests fail.  */
10986 #if HAVE_LANGINFO_CODESET
10987   {
10988     const char *cs = nl_langinfo (CODESET);
10989     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10990       return 1;
10991   }
10992 #endif
10993 #ifdef __CYGWIN__
10994   /* On Cygwin, avoid locale names without encoding suffix, because the
10995      locale_charset() function relies on the encoding suffix.  Note that
10996      LC_ALL is set on the command line.  */
10997   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10998 #endif
10999   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11000      This excludes the UTF-8 encoding.  */
11001   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11002   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11003   for (p = buf; *p != '\0'; p++)
11004     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11005       return 1;
11006   /* Check whether a typical GB18030 multibyte sequence is recognized as a
11007      single wide character.  This excludes the GB2312 and GBK encodings.  */
11008   if (mblen ("\203\062\332\066", 5) != 4)
11009     return 1;
11010   return 0;
11011 }
11012
11013 _ACEOF
11014     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11015   (eval $ac_link) 2>&5
11016   ac_status=$?
11017   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11018   test $ac_status = 0; } && test -s conftest$ac_exeext; then
11019       # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11020       # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
11021       # configure script would override the LC_ALL setting. Likewise for
11022       # LC_CTYPE, which is also set at the beginning of the configure script.
11023       # Test for the locale name without encoding suffix.
11024       if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11025         gt_cv_locale_zh_CN=zh_CN
11026       else
11027         # Test for the locale name with explicit encoding suffix.
11028         if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11029           gt_cv_locale_zh_CN=zh_CN.GB18030
11030         else
11031           # None found.
11032           gt_cv_locale_zh_CN=none
11033         fi
11034       fi
11035     else
11036       # If there was a link error, due to mblen(), the system is so old that
11037       # it certainly doesn't have a chinese locale.
11038       gt_cv_locale_zh_CN=none
11039     fi
11040     rm -fr conftest*
11041
11042 fi
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11044 $as_echo "$gt_cv_locale_zh_CN" >&6; }
11045   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11046
11047
11048
11049
11050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11051 $as_echo_n "checking for a french Unicode locale... " >&6; }
11052 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
11053   $as_echo_n "(cached) " >&6
11054 else
11055
11056     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11057 /* end confdefs.h.  */
11058
11059 #include <locale.h>
11060 #include <time.h>
11061 #if HAVE_LANGINFO_CODESET
11062 # include <langinfo.h>
11063 #endif
11064 #include <stdlib.h>
11065 #include <string.h>
11066 struct tm t;
11067 char buf[16];
11068 int main () {
11069   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
11070      imitates locale dependent behaviour by looking at the environment
11071      variables, and all locales use the UTF-8 encoding.  */
11072 #if !(defined __BEOS__ || defined __HAIKU__)
11073   /* Check whether the given locale name is recognized by the system.  */
11074   if (setlocale (LC_ALL, "") == NULL) return 1;
11075   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11076      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11077      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11078      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11079      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11080      some unit tests fail.  */
11081 # if HAVE_LANGINFO_CODESET
11082   {
11083     const char *cs = nl_langinfo (CODESET);
11084     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
11085       return 1;
11086   }
11087 # endif
11088 # ifdef __CYGWIN__
11089   /* On Cygwin, avoid locale names without encoding suffix, because the
11090      locale_charset() function relies on the encoding suffix.  Note that
11091      LC_ALL is set on the command line.  */
11092   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11093 # endif
11094   /* Check whether in the abbreviation of the second month, the second
11095      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
11096      two bytes long, with UTF-8 encoding.  */
11097   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11098   if (strftime (buf, sizeof (buf), "%b", &t) < 4
11099       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
11100     return 1;
11101 #endif
11102   /* Check whether the decimal separator is a comma.
11103      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
11104      are nl_langinfo(RADIXCHAR) are both ".".  */
11105   if (localeconv () ->decimal_point[0] != ',') return 1;
11106   return 0;
11107 }
11108
11109 _ACEOF
11110     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11111   (eval $ac_link) 2>&5
11112   ac_status=$?
11113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11114   test $ac_status = 0; } && test -s conftest$ac_exeext; then
11115       # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11116       # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
11117       # configure script would override the LC_ALL setting. Likewise for
11118       # LC_CTYPE, which is also set at the beginning of the configure script.
11119       # Test for the usual locale name.
11120       if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11121         gt_cv_locale_fr_utf8=fr_FR
11122       else
11123         # Test for the locale name with explicit encoding suffix.
11124         if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11125           gt_cv_locale_fr_utf8=fr_FR.UTF-8
11126         else
11127           # Test for the Solaris 7 locale name.
11128           if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11129             gt_cv_locale_fr_utf8=fr.UTF-8
11130           else
11131             # None found.
11132             gt_cv_locale_fr_utf8=none
11133           fi
11134         fi
11135       fi
11136     fi
11137     rm -fr conftest*
11138
11139 fi
11140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
11141 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
11142   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
11143
11144
11145
11146
11147
11148
11149
11150   GNULIB_MEMCHR=0;
11151   GNULIB_MEMMEM=0;
11152   GNULIB_MEMPCPY=0;
11153   GNULIB_MEMRCHR=0;
11154   GNULIB_RAWMEMCHR=0;
11155   GNULIB_STPCPY=0;
11156   GNULIB_STPNCPY=0;
11157   GNULIB_STRCHRNUL=0;
11158   GNULIB_STRDUP=0;
11159   GNULIB_STRNDUP=0;
11160   GNULIB_STRNLEN=0;
11161   GNULIB_STRPBRK=0;
11162   GNULIB_STRSEP=0;
11163   GNULIB_STRSTR=0;
11164   GNULIB_STRCASESTR=0;
11165   GNULIB_STRTOK_R=0;
11166   GNULIB_MBSLEN=0;
11167   GNULIB_MBSNLEN=0;
11168   GNULIB_MBSCHR=0;
11169   GNULIB_MBSRCHR=0;
11170   GNULIB_MBSSTR=0;
11171   GNULIB_MBSCASECMP=0;
11172   GNULIB_MBSNCASECMP=0;
11173   GNULIB_MBSPCASECMP=0;
11174   GNULIB_MBSCASESTR=0;
11175   GNULIB_MBSCSPN=0;
11176   GNULIB_MBSPBRK=0;
11177   GNULIB_MBSSPN=0;
11178   GNULIB_MBSSEP=0;
11179   GNULIB_MBSTOK_R=0;
11180   GNULIB_STRERROR=0;
11181   GNULIB_STRSIGNAL=0;
11182   GNULIB_STRVERSCMP=0;
11183   HAVE_MBSLEN=0;
11184     HAVE_DECL_MEMMEM=1;
11185   HAVE_MEMPCPY=1;
11186   HAVE_DECL_MEMRCHR=1;
11187   HAVE_RAWMEMCHR=1;
11188   HAVE_STPCPY=1;
11189   HAVE_STPNCPY=1;
11190   HAVE_STRCHRNUL=1;
11191   HAVE_DECL_STRDUP=1;
11192   HAVE_DECL_STRNDUP=1;
11193   HAVE_DECL_STRNLEN=1;
11194   HAVE_STRPBRK=1;
11195   HAVE_STRSEP=1;
11196   HAVE_STRCASESTR=1;
11197   HAVE_DECL_STRTOK_R=1;
11198   HAVE_DECL_STRERROR=1;
11199   HAVE_DECL_STRSIGNAL=1;
11200   HAVE_STRVERSCMP=1;
11201   REPLACE_MEMCHR=0;
11202   REPLACE_MEMMEM=0;
11203   REPLACE_STRDUP=0;
11204   REPLACE_STRSTR=0;
11205   REPLACE_STRCASESTR=0;
11206   REPLACE_STRERROR=0;
11207   REPLACE_STRNDUP=0;
11208   REPLACE_STRSIGNAL=0;
11209   REPLACE_STRTOK_R=0;
11210   UNDEFINE_STRTOK_R=0;
11211
11212
11213
11214
11215
11216
11217
11218
11219   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11220   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11221   # irrelevant for anonymous mappings.
11222   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11223 if test "x$ac_cv_func_mmap" = x""yes; then :
11224   gl_have_mmap=yes
11225 else
11226   gl_have_mmap=no
11227 fi
11228
11229
11230   # Try to allow MAP_ANONYMOUS.
11231   gl_have_mmap_anonymous=no
11232   if test $gl_have_mmap = yes; then
11233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11234 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11235     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236 /* end confdefs.h.  */
11237
11238 #include <sys/mman.h>
11239 #ifdef MAP_ANONYMOUS
11240     I cant identify this map.
11241 #endif
11242
11243 _ACEOF
11244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11245   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
11246   gl_have_mmap_anonymous=yes
11247 fi
11248 rm -f conftest*
11249
11250     if test $gl_have_mmap_anonymous != yes; then
11251       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252 /* end confdefs.h.  */
11253
11254 #include <sys/mman.h>
11255 #ifdef MAP_ANON
11256     I cant identify this map.
11257 #endif
11258
11259 _ACEOF
11260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11261   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
11262
11263 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11264
11265          gl_have_mmap_anonymous=yes
11266 fi
11267 rm -f conftest*
11268
11269     fi
11270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11271 $as_echo "$gl_have_mmap_anonymous" >&6; }
11272     if test $gl_have_mmap_anonymous = yes; then
11273
11274 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11275
11276     fi
11277   fi
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291   for ac_func in memchr
11292 do :
11293   ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
11294 if test "x$ac_cv_func_memchr" = x""yes; then :
11295   cat >>confdefs.h <<_ACEOF
11296 #define HAVE_MEMCHR 1
11297 _ACEOF
11298
11299 else
11300
11301     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
11302
11303 fi
11304 done
11305
11306
11307   if test $ac_cv_func_memchr = no; then
11308
11309   for ac_header in bp-sym.h
11310 do :
11311   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
11312 if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
11313   cat >>confdefs.h <<_ACEOF
11314 #define HAVE_BP_SYM_H 1
11315 _ACEOF
11316
11317 fi
11318
11319 done
11320
11321
11322     REPLACE_MEMCHR=1
11323   fi
11324
11325   if test $ac_cv_func_memchr = yes; then
11326     # Detect platform-specific bugs in some versions of glibc:
11327     # memchr should not dereference anything with length 0
11328     #   http://bugzilla.redhat.com/499689
11329     # memchr should not dereference overestimated length after a match
11330     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11331     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11332     # Assume that memchr works on platforms that lack mprotect.
11333     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11334 $as_echo_n "checking whether memchr works... " >&6; }
11335 if test "${gl_cv_func_memchr_works+set}" = set; then :
11336   $as_echo_n "(cached) " >&6
11337 else
11338   if test "$cross_compiling" = yes; then :
11339          gl_cv_func_memchr_works="guessing no"
11340 else
11341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342 /* end confdefs.h.  */
11343
11344 #include <string.h>
11345 #if HAVE_SYS_MMAN_H
11346 # include <fcntl.h>
11347 # include <unistd.h>
11348 # include <sys/types.h>
11349 # include <sys/mman.h>
11350 # ifndef MAP_FILE
11351 #  define MAP_FILE 0
11352 # endif
11353 #endif
11354
11355 int
11356 main ()
11357 {
11358
11359   char *fence = NULL;
11360 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11361 # if HAVE_MAP_ANONYMOUS
11362   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11363   const int fd = -1;
11364 # else /* !HAVE_MAP_ANONYMOUS */
11365   const int flags = MAP_FILE | MAP_PRIVATE;
11366   int fd = open ("/dev/zero", O_RDONLY, 0666);
11367   if (fd >= 0)
11368 # endif
11369     {
11370       int pagesize = getpagesize ();
11371       char *two_pages =
11372         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11373                        flags, fd, 0);
11374       if (two_pages != (char *)(-1)
11375           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11376         fence = two_pages + pagesize;
11377     }
11378 #endif
11379   if (fence)
11380     {
11381       if (memchr (fence, 0, 0))
11382         return 1;
11383       strcpy (fence - 9, "12345678");
11384       if (memchr (fence - 9, 0, 79) != fence - 1)
11385         return 2;
11386     }
11387   return 0;
11388
11389   ;
11390   return 0;
11391 }
11392 _ACEOF
11393 if ac_fn_c_try_run "$LINENO"; then :
11394   gl_cv_func_memchr_works=yes
11395 else
11396   gl_cv_func_memchr_works=no
11397 fi
11398 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11399   conftest.$ac_objext conftest.beam conftest.$ac_ext
11400 fi
11401
11402 fi
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11404 $as_echo "$gl_cv_func_memchr_works" >&6; }
11405     if test "$gl_cv_func_memchr_works" != yes; then
11406
11407   for ac_header in bp-sym.h
11408 do :
11409   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
11410 if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
11411   cat >>confdefs.h <<_ACEOF
11412 #define HAVE_BP_SYM_H 1
11413 _ACEOF
11414
11415 fi
11416
11417 done
11418
11419
11420       REPLACE_MEMCHR=1
11421
11422
11423
11424
11425
11426
11427
11428
11429   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
11430
11431     fi
11432   fi
11433
11434 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
11435 if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
11436   ac_have_decl=1
11437 else
11438   ac_have_decl=0
11439 fi
11440
11441 cat >>confdefs.h <<_ACEOF
11442 #define HAVE_DECL_MEMRCHR $ac_have_decl
11443 _ACEOF
11444
11445
11446
11447
11448
11449
11450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
11451 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
11452 if test "${gl_cv_func_unlink_works+set}" = set; then :
11453   $as_echo_n "(cached) " >&6
11454 else
11455   touch conftest.file
11456      # Assume that if we have lstat, we can also check symlinks.
11457      if test $ac_cv_func_lstat = yes; then
11458        ln -s conftest.file conftest.lnk
11459      fi
11460      if test "$cross_compiling" = yes; then :
11461   gl_cv_func_unlink_works="guessing no"
11462 else
11463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11464 /* end confdefs.h.  */
11465 #include <unistd.h>
11466            #include <errno.h>
11467
11468 int
11469 main ()
11470 {
11471 if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1;
11472 #if HAVE_LSTAT
11473       if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2;
11474 #endif
11475
11476   ;
11477   return 0;
11478 }
11479 _ACEOF
11480 if ac_fn_c_try_run "$LINENO"; then :
11481   gl_cv_func_unlink_works=yes
11482 else
11483   gl_cv_func_unlink_works=no
11484 fi
11485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11486   conftest.$ac_objext conftest.beam conftest.$ac_ext
11487 fi
11488
11489      rm -f conftest.file conftest.lnk
11490 fi
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_works" >&5
11492 $as_echo "$gl_cv_func_unlink_works" >&6; }
11493   if test x"$gl_cv_func_unlink_works" != xyes; then
11494     REPLACE_UNLINK=1
11495
11496
11497
11498
11499
11500
11501
11502
11503   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
11504
11505   fi
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522   gl_cv_func_vfprintf_posix=no
11523   case "$gl_cv_func_printf_sizes_c99" in
11524     *yes)
11525       case "$gl_cv_func_printf_long_double" in
11526         *yes)
11527           case "$gl_cv_func_printf_infinite" in
11528             *yes)
11529               case "$gl_cv_func_printf_infinite_long_double" in
11530                 *yes)
11531                   case "$gl_cv_func_printf_directive_a" in
11532                     *yes)
11533                       case "$gl_cv_func_printf_directive_f" in
11534                         *yes)
11535                           case "$gl_cv_func_printf_directive_n" in
11536                             *yes)
11537                               case "$gl_cv_func_printf_directive_ls" in
11538                                 *yes)
11539                                   case "$gl_cv_func_printf_positions" in
11540                                     *yes)
11541                                       case "$gl_cv_func_printf_flag_grouping" in
11542                                         *yes)
11543                                           case "$gl_cv_func_printf_flag_leftadjust" in
11544                                             *yes)
11545                                               case "$gl_cv_func_printf_flag_zero" in
11546                                                 *yes)
11547                                                   case "$gl_cv_func_printf_precision" in
11548                                                     *yes)
11549                                                       case "$gl_cv_func_printf_enomem" in
11550                                                         *yes)
11551                                                           # vfprintf exists and is
11552                                                           # already POSIX compliant.
11553                                                           gl_cv_func_vfprintf_posix=yes
11554                                                           ;;
11555                                                       esac
11556                                                       ;;
11557                                                   esac
11558                                                   ;;
11559                                               esac
11560                                               ;;
11561                                           esac
11562                                           ;;
11563                                       esac
11564                                       ;;
11565                                   esac
11566                                   ;;
11567                               esac
11568                               ;;
11569                           esac
11570                           ;;
11571                       esac
11572                       ;;
11573                   esac
11574                   ;;
11575               esac
11576               ;;
11577           esac
11578           ;;
11579       esac
11580       ;;
11581   esac
11582   if test $gl_cv_func_vfprintf_posix = no; then
11583
11584
11585
11586   case "$gl_cv_func_printf_infinite" in
11587     *yes)
11588       ;;
11589     *)
11590
11591 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
11592
11593       ;;
11594   esac
11595
11596
11597
11598
11599   case "$gl_cv_func_printf_long_double" in
11600     *yes)
11601       case "$gl_cv_func_printf_infinite_long_double" in
11602         *yes)
11603           ;;
11604         *)
11605
11606 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
11607
11608           ;;
11609       esac
11610       ;;
11611   esac
11612
11613
11614
11615   case "$gl_cv_func_printf_directive_a" in
11616     *yes)
11617       ;;
11618     *)
11619
11620 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
11621
11622       for ac_func in nl_langinfo
11623 do :
11624   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
11625 if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
11626   cat >>confdefs.h <<_ACEOF
11627 #define HAVE_NL_LANGINFO 1
11628 _ACEOF
11629
11630 fi
11631 done
11632
11633       ;;
11634   esac
11635
11636
11637
11638   case "$gl_cv_func_printf_directive_f" in
11639     *yes)
11640       ;;
11641     *)
11642
11643 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
11644
11645       ;;
11646   esac
11647
11648
11649
11650   case "$gl_cv_func_printf_directive_ls" in
11651     *yes)
11652       ;;
11653     *)
11654
11655 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
11656
11657       ;;
11658   esac
11659
11660
11661
11662   case "$gl_cv_func_printf_flag_grouping" in
11663     *yes)
11664       ;;
11665     *)
11666
11667 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
11668
11669       ;;
11670   esac
11671
11672
11673
11674   case "$gl_cv_func_printf_flag_leftadjust" in
11675     *yes)
11676       ;;
11677     *)
11678
11679 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
11680
11681       ;;
11682   esac
11683
11684
11685
11686   case "$gl_cv_func_printf_flag_zero" in
11687     *yes)
11688       ;;
11689     *)
11690
11691 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
11692
11693       ;;
11694   esac
11695
11696
11697
11698   case "$gl_cv_func_printf_precision" in
11699     *yes)
11700       ;;
11701     *)
11702
11703 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
11704
11705
11706 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
11707
11708
11709 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
11710
11711       ;;
11712   esac
11713
11714
11715
11716   case "$gl_cv_func_printf_enomem" in
11717     *yes)
11718       ;;
11719     *)
11720
11721 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
11722
11723
11724 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
11725
11726
11727 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
11728
11729       ;;
11730   esac
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
11773
11774   if test $ac_cv_func_vasnprintf = yes; then
11775
11776 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
11777
11778   fi
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
11790 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
11791
11792 else
11793
11794 $as_echo "#define ptrdiff_t long" >>confdefs.h
11795
11796
11797 fi
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
11816
11817   REPLACE_VFPRINTF=1
11818
11819 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
11820
11821   :
11822
11823   fi
11824
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
11826 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
11827 if test "${ac_cv_header_stdbool_h+set}" = set; then :
11828   $as_echo_n "(cached) " >&6
11829 else
11830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11831 /* end confdefs.h.  */
11832
11833           #include <stdbool.h>
11834           #ifndef bool
11835            "error: bool is not defined"
11836           #endif
11837           #ifndef false
11838            "error: false is not defined"
11839           #endif
11840           #if false
11841            "error: false is not 0"
11842           #endif
11843           #ifndef true
11844            "error: true is not defined"
11845           #endif
11846           #if true != 1
11847            "error: true is not 1"
11848           #endif
11849           #ifndef __bool_true_false_are_defined
11850            "error: __bool_true_false_are_defined is not defined"
11851           #endif
11852
11853           struct s { _Bool s: 1; _Bool t; } s;
11854
11855           char a[true == 1 ? 1 : -1];
11856           char b[false == 0 ? 1 : -1];
11857           char c[__bool_true_false_are_defined == 1 ? 1 : -1];
11858           char d[(bool) 0.5 == true ? 1 : -1];
11859           bool e = &s;
11860           char f[(_Bool) 0.0 == false ? 1 : -1];
11861           char g[true];
11862           char h[sizeof (_Bool)];
11863           char i[sizeof s.t];
11864           enum { j = false, k = true, l = false * true, m = true * 256 };
11865           _Bool n[m];
11866           char o[sizeof n == m * sizeof n[0] ? 1 : -1];
11867           char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
11868           #if defined __xlc__ || defined __GNUC__
11869            /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
11870               reported by James Lemley on 2005-10-05; see
11871               http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
11872               This test is not quite right, since xlc is allowed to
11873               reject this program, as the initializer for xlcbug is
11874               not one of the forms that C requires support for.
11875               However, doing the test right would require a run-time
11876               test, and that would make cross-compilation harder.
11877               Let us hope that IBM fixes the xlc bug, and also adds
11878               support for this kind of constant expression.  In the
11879               meantime, this test will reject xlc, which is OK, since
11880               our stdbool.h substitute should suffice.  We also test
11881               this with GCC, where it should work, to detect more
11882               quickly whether someone messes up the test in the
11883               future.  */
11884            char digs[] = "0123456789";
11885            int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
11886           #endif
11887           /* Catch a bug in an HP-UX C compiler.  See
11888              http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
11889              http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
11890            */
11891           _Bool q = true;
11892           _Bool *pq = &q;
11893
11894 int
11895 main ()
11896 {
11897
11898           *pq |= q;
11899           *pq |= ! q;
11900           /* Refer to every declared value, to avoid compiler optimizations.  */
11901           return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
11902                   + !m + !n + !o + !p + !q + !pq);
11903
11904   ;
11905   return 0;
11906 }
11907 _ACEOF
11908 if ac_fn_c_try_compile "$LINENO"; then :
11909   ac_cv_header_stdbool_h=yes
11910 else
11911   ac_cv_header_stdbool_h=no
11912 fi
11913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914 fi
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
11916 $as_echo "$ac_cv_header_stdbool_h" >&6; }
11917    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
11918 if test "x$ac_cv_type__Bool" = x""yes; then :
11919
11920 cat >>confdefs.h <<_ACEOF
11921 #define HAVE__BOOL 1
11922 _ACEOF
11923
11924
11925 fi
11926
11927    if test $ac_cv_header_stdbool_h = yes; then
11928
11929 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
11930
11931    fi
11932
11933     REPLACE_NULL=0;
11934   HAVE_WCHAR_T=1;
11935   STDDEF_H='';
11936
11937
11938
11939
11940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11941 $as_echo_n "checking for unsigned long long int... " >&6; }
11942 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
11943   $as_echo_n "(cached) " >&6
11944 else
11945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946 /* end confdefs.h.  */
11947
11948   /* For now, do not test the preprocessor; as of 2007 there are too many
11949          implementations with broken preprocessors.  Perhaps this can
11950          be revisited in 2012.  In the meantime, code should not expect
11951          #if to work with literals wider than 32 bits.  */
11952       /* Test literals.  */
11953       long long int ll = 9223372036854775807ll;
11954       long long int nll = -9223372036854775807LL;
11955       unsigned long long int ull = 18446744073709551615ULL;
11956       /* Test constant expressions.   */
11957       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11958                      ? 1 : -1)];
11959       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11960                      ? 1 : -1)];
11961       int i = 63;
11962 int
11963 main ()
11964 {
11965 /* Test availability of runtime routines for shift and division.  */
11966       long long int llmax = 9223372036854775807ll;
11967       unsigned long long int ullmax = 18446744073709551615ull;
11968       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11969               | (llmax / ll) | (llmax % ll)
11970               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11971               | (ullmax / ull) | (ullmax % ull));
11972   ;
11973   return 0;
11974 }
11975
11976 _ACEOF
11977 if ac_fn_c_try_link "$LINENO"; then :
11978   ac_cv_type_unsigned_long_long_int=yes
11979 else
11980   ac_cv_type_unsigned_long_long_int=no
11981 fi
11982 rm -f core conftest.err conftest.$ac_objext \
11983     conftest$ac_exeext conftest.$ac_ext
11984 fi
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11986 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11987   if test $ac_cv_type_unsigned_long_long_int = yes; then
11988
11989 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11990
11991   fi
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
12002 if test "x$ac_cv_have_decl_strdup" = x""yes; then :
12003   ac_have_decl=1
12004 else
12005   ac_have_decl=0
12006 fi
12007
12008 cat >>confdefs.h <<_ACEOF
12009 #define HAVE_DECL_STRDUP $ac_have_decl
12010 _ACEOF
12011
12012
12013
12014
12015
12016
12017   if test -z "$ERRNO_H"; then
12018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
12019 $as_echo_n "checking for working strerror function... " >&6; }
12020 if test "${gl_cv_func_working_strerror+set}" = set; then :
12021   $as_echo_n "(cached) " >&6
12022 else
12023   if test "$cross_compiling" = yes; then :
12024            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025 /* end confdefs.h.  */
12026 #include <string.h>
12027
12028 int
12029 main ()
12030 {
12031 return !*strerror (-2);
12032   ;
12033   return 0;
12034 }
12035 _ACEOF
12036 if ac_fn_c_try_compile "$LINENO"; then :
12037   gl_cv_func_working_strerror=yes
12038 else
12039   gl_cv_func_working_strerror=no
12040 fi
12041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12042
12043 else
12044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12045 /* end confdefs.h.  */
12046 #include <string.h>
12047
12048 int
12049 main ()
12050 {
12051 return !*strerror (-2);
12052   ;
12053   return 0;
12054 }
12055 _ACEOF
12056 if ac_fn_c_try_run "$LINENO"; then :
12057   gl_cv_func_working_strerror=yes
12058 else
12059   gl_cv_func_working_strerror=no
12060 fi
12061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12062   conftest.$ac_objext conftest.beam conftest.$ac_ext
12063 fi
12064
12065
12066 fi
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
12068 $as_echo "$gl_cv_func_working_strerror" >&6; }
12069     if test $gl_cv_func_working_strerror = no; then
12070                   REPLACE_STRERROR=1
12071     fi
12072   else
12073             REPLACE_STRERROR=1
12074   fi
12075   if test $REPLACE_STRERROR = 1; then
12076
12077   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
12078 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
12079   ac_have_decl=1
12080 else
12081   ac_have_decl=0
12082 fi
12083
12084 cat >>confdefs.h <<_ACEOF
12085 #define HAVE_DECL_STRERROR $ac_have_decl
12086 _ACEOF
12087
12088
12089   if test $ac_cv_header_sys_socket_h != yes; then
12090                     for ac_header in winsock2.h
12091 do :
12092   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12093 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
12094   cat >>confdefs.h <<_ACEOF
12095 #define HAVE_WINSOCK2_H 1
12096 _ACEOF
12097
12098 fi
12099
12100 done
12101
12102   fi
12103
12104   fi
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117      if test $gl_cv_have_include_next = yes; then
12118        gl_cv_next_string_h='<'string.h'>'
12119      else
12120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
12121 $as_echo_n "checking absolute name of <string.h>... " >&6; }
12122 if test "${gl_cv_next_string_h+set}" = set; then :
12123   $as_echo_n "(cached) " >&6
12124 else
12125
12126           if test $ac_cv_header_string_h = yes; then
12127             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h.  */
12129 #include <string.h>
12130
12131 _ACEOF
12132                                                                                                 case "$host_os" in
12133               aix*) gl_absname_cpp="$ac_cpp -C" ;;
12134               *)    gl_absname_cpp="$ac_cpp" ;;
12135             esac
12136                                                 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12137                sed -n '\#/string.h#{
12138                  s#.*"\(.*/string.h\)".*#\1#
12139                  s#^/[^/]#//&#
12140                  p
12141                  q
12142                }'`'"'
12143           else
12144             gl_cv_next_string_h='<'string.h'>'
12145           fi
12146
12147 fi
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
12149 $as_echo "$gl_cv_next_string_h" >&6; }
12150      fi
12151      NEXT_STRING_H=$gl_cv_next_string_h
12152
12153      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12154        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12155        gl_next_as_first_directive='<'string.h'>'
12156      else
12157        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12158        gl_next_as_first_directive=$gl_cv_next_string_h
12159      fi
12160      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
12161
12162
12163
12164
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12166 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
12167 if test "${ac_cv_header_stat_broken+set}" = set; then :
12168   $as_echo_n "(cached) " >&6
12169 else
12170   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12171 /* end confdefs.h.  */
12172 #include <sys/types.h>
12173 #include <sys/stat.h>
12174
12175 #if defined S_ISBLK && defined S_IFDIR
12176 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12177 #endif
12178
12179 #if defined S_ISBLK && defined S_IFCHR
12180 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12181 #endif
12182
12183 #if defined S_ISLNK && defined S_IFREG
12184 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12185 #endif
12186
12187 #if defined S_ISSOCK && defined S_IFREG
12188 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12189 #endif
12190
12191 _ACEOF
12192 if ac_fn_c_try_compile "$LINENO"; then :
12193   ac_cv_header_stat_broken=no
12194 else
12195   ac_cv_header_stat_broken=yes
12196 fi
12197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12198 fi
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12200 $as_echo "$ac_cv_header_stat_broken" >&6; }
12201 if test $ac_cv_header_stat_broken = yes; then
12202
12203 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12204
12205 fi
12206
12207
12208
12209
12210         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12211   REPLACE_MKTIME=GNULIB_PORTCHECK;
12212   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12213   REPLACE_STRPTIME=GNULIB_PORTCHECK;
12214   REPLACE_TIMEGM=GNULIB_PORTCHECK;
12215
12216
12217
12218
12219
12220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12221 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12222 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12223   $as_echo_n "(cached) " >&6
12224 else
12225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12226 /* end confdefs.h.  */
12227 #include <time.h>
12228
12229 int
12230 main ()
12231 {
12232 static struct timespec x; x.tv_sec = x.tv_nsec;
12233   ;
12234   return 0;
12235 }
12236 _ACEOF
12237 if ac_fn_c_try_compile "$LINENO"; then :
12238   gl_cv_sys_struct_timespec_in_time_h=yes
12239 else
12240   gl_cv_sys_struct_timespec_in_time_h=no
12241 fi
12242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12243 fi
12244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12245 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12246
12247   TIME_H_DEFINES_STRUCT_TIMESPEC=0
12248   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12249   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12250     TIME_H_DEFINES_STRUCT_TIMESPEC=1
12251   else
12252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12253 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12254 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12255   $as_echo_n "(cached) " >&6
12256 else
12257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12258 /* end confdefs.h.  */
12259 #include <sys/time.h>
12260
12261 int
12262 main ()
12263 {
12264 static struct timespec x; x.tv_sec = x.tv_nsec;
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 if ac_fn_c_try_compile "$LINENO"; then :
12270   gl_cv_sys_struct_timespec_in_sys_time_h=yes
12271 else
12272   gl_cv_sys_struct_timespec_in_sys_time_h=no
12273 fi
12274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12275 fi
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12277 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12278     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12279       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12280     fi
12281   fi
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294      if test $gl_cv_have_include_next = yes; then
12295        gl_cv_next_time_h='<'time.h'>'
12296      else
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12298 $as_echo_n "checking absolute name of <time.h>... " >&6; }
12299 if test "${gl_cv_next_time_h+set}" = set; then :
12300   $as_echo_n "(cached) " >&6
12301 else
12302
12303           if test $ac_cv_header_time_h = yes; then
12304             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12305 /* end confdefs.h.  */
12306 #include <time.h>
12307
12308 _ACEOF
12309                                                                                                 case "$host_os" in
12310               aix*) gl_absname_cpp="$ac_cpp -C" ;;
12311               *)    gl_absname_cpp="$ac_cpp" ;;
12312             esac
12313                                                 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12314                sed -n '\#/time.h#{
12315                  s#.*"\(.*/time.h\)".*#\1#
12316                  s#^/[^/]#//&#
12317                  p
12318                  q
12319                }'`'"'
12320           else
12321             gl_cv_next_time_h='<'time.h'>'
12322           fi
12323
12324 fi
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
12326 $as_echo "$gl_cv_next_time_h" >&6; }
12327      fi
12328      NEXT_TIME_H=$gl_cv_next_time_h
12329
12330      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12331        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12332        gl_next_as_first_directive='<'time.h'>'
12333      else
12334        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12335        gl_next_as_first_directive=$gl_cv_next_time_h
12336      fi
12337      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
12338
12339
12340
12341
12342
12343
12344
12345
12346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
12347 $as_echo_n "checking whether the utimes function works... " >&6; }
12348 if test "${gl_cv_func_working_utimes+set}" = set; then :
12349   $as_echo_n "(cached) " >&6
12350 else
12351
12352   if test "$cross_compiling" = yes; then :
12353   gl_cv_func_working_utimes=no
12354 else
12355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12356 /* end confdefs.h.  */
12357
12358 #include <sys/types.h>
12359 #include <sys/stat.h>
12360 #include <fcntl.h>
12361 #include <sys/time.h>
12362 #include <time.h>
12363 #include <unistd.h>
12364 #include <stdlib.h>
12365 #include <stdio.h>
12366 #include <utime.h>
12367
12368 int
12369 main ()
12370 {
12371   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
12372   struct stat sbuf;
12373   char const *file = "conftest.utimes";
12374   FILE *f;
12375   time_t now;
12376   int fd;
12377
12378   int ok = ((f = fopen (file, "w"))
12379             && fclose (f) == 0
12380             && utimes (file, timeval) == 0
12381             && lstat (file, &sbuf) == 0
12382             && sbuf.st_atime == timeval[0].tv_sec
12383             && sbuf.st_mtime == timeval[1].tv_sec);
12384   unlink (file);
12385   if (!ok)
12386     exit (1);
12387
12388   ok =
12389     ((f = fopen (file, "w"))
12390      && fclose (f) == 0
12391      && time (&now) != (time_t)-1
12392      && utimes (file, NULL) == 0
12393      && lstat (file, &sbuf) == 0
12394      && now - sbuf.st_atime <= 2
12395      && now - sbuf.st_mtime <= 2);
12396   unlink (file);
12397   if (!ok)
12398     exit (1);
12399
12400   ok = (0 <= (fd = open (file, O_WRONLY|O_CREAT, 0444))
12401               && close (fd) == 0
12402               && utimes (file, NULL) == 0);
12403   unlink (file);
12404
12405   exit (!ok);
12406 }
12407
12408 _ACEOF
12409 if ac_fn_c_try_run "$LINENO"; then :
12410   gl_cv_func_working_utimes=yes
12411 else
12412   gl_cv_func_working_utimes=no
12413 fi
12414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12415   conftest.$ac_objext conftest.beam conftest.$ac_ext
12416 fi
12417
12418 fi
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
12420 $as_echo "$gl_cv_func_working_utimes" >&6; }
12421
12422   if test $gl_cv_func_working_utimes = yes; then
12423
12424 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
12425
12426   fi
12427
12428
12429
12430
12431
12432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
12433 $as_echo_n "checking for struct utimbuf... " >&6; }
12434 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
12435   $as_echo_n "(cached) " >&6
12436 else
12437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438 /* end confdefs.h.  */
12439 #if HAVE_SYS_TIME_H
12440              #include <sys/time.h>
12441             #endif
12442             #include <time.h>
12443             #ifdef HAVE_UTIME_H
12444              #include <utime.h>
12445             #endif
12446
12447 int
12448 main ()
12449 {
12450 static struct utimbuf x; x.actime = x.modtime;
12451   ;
12452   return 0;
12453 }
12454 _ACEOF
12455 if ac_fn_c_try_compile "$LINENO"; then :
12456   gl_cv_sys_struct_utimbuf=yes
12457 else
12458   gl_cv_sys_struct_utimbuf=no
12459 fi
12460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12461 fi
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
12463 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
12464
12465   if test $gl_cv_sys_struct_utimbuf = yes; then
12466
12467 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
12468
12469   fi
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
12483 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
12484 if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
12485   $as_echo_n "(cached) " >&6
12486 else
12487   gl_cv_header_wchar_h_correct_inline=yes
12488      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12489 /* end confdefs.h.  */
12490
12491        #define wcstod renamed_wcstod
12492 #include <wchar.h>
12493 extern int zero (void);
12494 int main () { return zero(); }
12495
12496 _ACEOF
12497      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12498   (eval $ac_compile) 2>&5
12499   ac_status=$?
12500   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12501   test $ac_status = 0; }; then
12502        mv conftest.$ac_objext conftest1.$ac_objext
12503        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12504 /* end confdefs.h.  */
12505
12506          #define wcstod renamed_wcstod
12507 #include <wchar.h>
12508 int zero (void) { return 0; }
12509
12510 _ACEOF
12511        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12512   (eval $ac_compile) 2>&5
12513   ac_status=$?
12514   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12515   test $ac_status = 0; }; then
12516          mv conftest.$ac_objext conftest2.$ac_objext
12517          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
12518            :
12519          else
12520            gl_cv_header_wchar_h_correct_inline=no
12521          fi
12522        fi
12523      fi
12524      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
12525
12526 fi
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
12528 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
12529   if test $gl_cv_header_wchar_h_correct_inline = no; then
12530     as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
12531 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
12532 C99 mode. You have four options:
12533   - Add the flag -fgnu89-inline to CC and reconfigure, or
12534   - Fix your include files, using parts of
12535     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
12536   - Use a gcc version older than 4.3, or
12537   - Don't use the flags -std=c99 or -std=gnu99.
12538 Configuration aborted." "$LINENO" 5
12539   fi
12540
12541
12542
12543
12544
12545
12546    if false; then
12547   GL_COND_LIBTOOL_TRUE=
12548   GL_COND_LIBTOOL_FALSE='#'
12549 else
12550   GL_COND_LIBTOOL_TRUE='#'
12551   GL_COND_LIBTOOL_FALSE=
12552 fi
12553
12554   gl_cond_libtool=false
12555   gl_libdeps=
12556   gl_ltlibdeps=
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566   gl_source_base='lib'
12567
12568
12569
12570
12571
12572   if test $ac_cv_func_alloca_works = no; then
12573     :
12574   fi
12575
12576   # Define an additional variable used in the Makefile substitution.
12577   if test $ac_cv_working_alloca_h = yes; then
12578     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
12579 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
12580 if test "${gl_cv_rpl_alloca+set}" = set; then :
12581   $as_echo_n "(cached) " >&6
12582 else
12583
12584       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12585 /* end confdefs.h.  */
12586
12587 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
12588         Need own alloca
12589 #endif
12590
12591 _ACEOF
12592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12593   $EGREP "Need own alloca" >/dev/null 2>&1; then :
12594   gl_cv_rpl_alloca=yes
12595 else
12596   gl_cv_rpl_alloca=no
12597 fi
12598 rm -f conftest*
12599
12600
12601 fi
12602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
12603 $as_echo "$gl_cv_rpl_alloca" >&6; }
12604     if test $gl_cv_rpl_alloca = yes; then
12605
12606 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12607
12608       ALLOCA_H=alloca.h
12609     else
12610                   ALLOCA_H=
12611     fi
12612   else
12613     ALLOCA_H=alloca.h
12614   fi
12615
12616
12617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
12618 $as_echo_n "checking for GNU libc compatible calloc... " >&6; }
12619 if test "${ac_cv_func_calloc_0_nonnull+set}" = set; then :
12620   $as_echo_n "(cached) " >&6
12621 else
12622   if test "$cross_compiling" = yes; then :
12623   ac_cv_func_calloc_0_nonnull=no
12624 else
12625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12626 /* end confdefs.h.  */
12627 $ac_includes_default
12628 int
12629 main ()
12630 {
12631 exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));
12632   ;
12633   return 0;
12634 }
12635 _ACEOF
12636 if ac_fn_c_try_run "$LINENO"; then :
12637   ac_cv_func_calloc_0_nonnull=yes
12638 else
12639   ac_cv_func_calloc_0_nonnull=no
12640 fi
12641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12642   conftest.$ac_objext conftest.beam conftest.$ac_ext
12643 fi
12644
12645 fi
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
12647 $as_echo "$ac_cv_func_calloc_0_nonnull" >&6; }
12648 if test $ac_cv_func_calloc_0_nonnull = yes; then :
12649
12650 $as_echo "#define HAVE_CALLOC 1" >>confdefs.h
12651
12652 else
12653   $as_echo "#define HAVE_CALLOC 0" >>confdefs.h
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
12664
12665
12666 $as_echo "#define calloc rpl_calloc" >>confdefs.h
12667
12668 fi
12669
12670
12671
12672
12673   if test $gl_cv_func_malloc_posix = yes; then
12674     HAVE_CALLOC_POSIX=1
12675
12676 $as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
12677
12678   else
12679
12680
12681
12682
12683
12684
12685
12686
12687   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
12688
12689     HAVE_CALLOC_POSIX=0
12690   fi
12691
12692
12693
12694
12695   GNULIB_CALLOC_POSIX=1
12696
12697
12698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
12699 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
12700 if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
12701   $as_echo_n "(cached) " >&6
12702 else
12703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12704 /* end confdefs.h.  */
12705 #include <unistd.h>
12706 #include <limits.h>
12707 #if defined PATH_MAX || defined MAXPATHLEN
12708 have_arbitrary_file_name_length_limit
12709 #endif
12710 _ACEOF
12711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12712   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
12713   gl_cv_have_arbitrary_file_name_length_limit=yes
12714 else
12715   gl_cv_have_arbitrary_file_name_length_limit=no
12716 fi
12717 rm -f conftest*
12718
12719 fi
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
12721 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
12722
12723   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
12724
12725
12726
12727
12728
12729
12730
12731
12732   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
12733
12734
12735
12736   :
12737
12738   fi
12739
12740
12741
12742
12743   GNULIB_CHOWN=1
12744
12745
12746
12747
12748   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
12749   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
12750
12751   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
12752   # programs in the package would end up linked with that potentially-shared
12753   # library, inducing unnecessary run-time overhead.
12754   LIB_CLOCK_GETTIME=
12755
12756   gl_saved_libs=$LIBS
12757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12758 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12759 if test "${ac_cv_search_clock_gettime+set}" = set; then :
12760   $as_echo_n "(cached) " >&6
12761 else
12762   ac_func_search_save_LIBS=$LIBS
12763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12764 /* end confdefs.h.  */
12765
12766 /* Override any GCC internal prototype to avoid an error.
12767    Use char because int might match the return type of a GCC
12768    builtin and then its argument prototype would still apply.  */
12769 #ifdef __cplusplus
12770 extern "C"
12771 #endif
12772 char clock_gettime ();
12773 int
12774 main ()
12775 {
12776 return clock_gettime ();
12777   ;
12778   return 0;
12779 }
12780 _ACEOF
12781 for ac_lib in '' rt posix4; do
12782   if test -z "$ac_lib"; then
12783     ac_res="none required"
12784   else
12785     ac_res=-l$ac_lib
12786     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12787   fi
12788   if ac_fn_c_try_link "$LINENO"; then :
12789   ac_cv_search_clock_gettime=$ac_res
12790 fi
12791 rm -f core conftest.err conftest.$ac_objext \
12792     conftest$ac_exeext
12793   if test "${ac_cv_search_clock_gettime+set}" = set; then :
12794   break
12795 fi
12796 done
12797 if test "${ac_cv_search_clock_gettime+set}" = set; then :
12798
12799 else
12800   ac_cv_search_clock_gettime=no
12801 fi
12802 rm conftest.$ac_ext
12803 LIBS=$ac_func_search_save_LIBS
12804 fi
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12806 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12807 ac_res=$ac_cv_search_clock_gettime
12808 if test "$ac_res" != no; then :
12809   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12810   test "$ac_cv_search_clock_gettime" = "none required" ||
12811                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
12812 fi
12813
12814     for ac_func in clock_gettime clock_settime
12815 do :
12816   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12817 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12818 eval as_val=\$$as_ac_var
12819    if test "x$as_val" = x""yes; then :
12820   cat >>confdefs.h <<_ACEOF
12821 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12822 _ACEOF
12823
12824 fi
12825 done
12826
12827   LIBS=$gl_saved_libs
12828
12829
12830
12831
12832
12833
12834   GNULIB_CLOSE=1
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845   gl_LIBOBJS="$gl_LIBOBJS close-stream.$ac_objext"
12846
12847
12848     :
12849
12850
12851
12852 $as_echo "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864   gl_LIBOBJS="$gl_LIBOBJS closein.$ac_objext"
12865
12866
12867     :
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878   gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext"
12879
12880
12881     :
12882
12883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
12884 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
12885 if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
12886   $as_echo_n "(cached) " >&6
12887 else
12888   if test "$cross_compiling" = yes; then :
12889   gl_cv_struct_dirent_d_ino=no
12890 else
12891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12892 /* end confdefs.h.  */
12893 #include <sys/types.h>
12894              #include <sys/stat.h>
12895              #include <dirent.h>
12896
12897 int
12898 main ()
12899 {
12900 DIR *dp = opendir (".");
12901              struct dirent *e;
12902              struct stat st;
12903              if (! dp)
12904                return 1;
12905              e = readdir (dp);
12906              return ! (e
12907                        && stat (e->d_name, &st) == 0
12908                        && e->d_ino == st.st_ino);
12909   ;
12910   return 0;
12911 }
12912 _ACEOF
12913 if ac_fn_c_try_run "$LINENO"; then :
12914   gl_cv_struct_dirent_d_ino=yes
12915 else
12916   gl_cv_struct_dirent_d_ino=no
12917 fi
12918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12919   conftest.$ac_objext conftest.beam conftest.$ac_ext
12920 fi
12921
12922 fi
12923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
12924 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
12925    if test $gl_cv_struct_dirent_d_ino = yes; then
12926
12927 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
12928
12929    fi
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941      if test $gl_cv_have_include_next = yes; then
12942        gl_cv_next_dirent_h='<'dirent.h'>'
12943      else
12944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
12945 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
12946 if test "${gl_cv_next_dirent_h+set}" = set; then :
12947   $as_echo_n "(cached) " >&6
12948 else
12949
12950           if test $ac_cv_header_dirent_h = yes; then
12951             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12952 /* end confdefs.h.  */
12953 #include <dirent.h>
12954
12955 _ACEOF
12956                                                                                                 case "$host_os" in
12957               aix*) gl_absname_cpp="$ac_cpp -C" ;;
12958               *)    gl_absname_cpp="$ac_cpp" ;;
12959             esac
12960                                                 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12961                sed -n '\#/dirent.h#{
12962                  s#.*"\(.*/dirent.h\)".*#\1#
12963                  s#^/[^/]#//&#
12964                  p
12965                  q
12966                }'`'"'
12967           else
12968             gl_cv_next_dirent_h='<'dirent.h'>'
12969           fi
12970
12971 fi
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
12973 $as_echo "$gl_cv_next_dirent_h" >&6; }
12974      fi
12975      NEXT_DIRENT_H=$gl_cv_next_dirent_h
12976
12977      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12978        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12979        gl_next_as_first_directive='<'dirent.h'>'
12980      else
12981        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12982        gl_next_as_first_directive=$gl_cv_next_dirent_h
12983      fi
12984      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
12985
12986
12987
12988
12989
12990
12991
12992     :
12993
12994
12995
12996
12997
12998
12999
13000   for ac_func in dirfd
13001 do :
13002   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13003 if test "x$ac_cv_func_dirfd" = x""yes; then :
13004   cat >>confdefs.h <<_ACEOF
13005 #define HAVE_DIRFD 1
13006 _ACEOF
13007
13008 fi
13009 done
13010
13011   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13012      #include <dirent.h>
13013 "
13014 if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
13015   ac_have_decl=1
13016 else
13017   ac_have_decl=0
13018 fi
13019
13020 cat >>confdefs.h <<_ACEOF
13021 #define HAVE_DECL_DIRFD $ac_have_decl
13022 _ACEOF
13023
13024   if test $ac_cv_have_decl_dirfd = no; then
13025     HAVE_DECL_DIRFD=0
13026   fi
13027
13028   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13029 $as_echo_n "checking whether dirfd is a macro... " >&6; }
13030 if test "${gl_cv_func_dirfd_macro+set}" = set; then :
13031   $as_echo_n "(cached) " >&6
13032 else
13033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13034 /* end confdefs.h.  */
13035
13036 #include <sys/types.h>
13037 #include <dirent.h>
13038 #ifdef dirfd
13039  dirent_header_defines_dirfd
13040 #endif
13041 _ACEOF
13042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13043   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13044   gl_cv_func_dirfd_macro=yes
13045 else
13046   gl_cv_func_dirfd_macro=no
13047 fi
13048 rm -f conftest*
13049
13050 fi
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13052 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
13053
13054   # Use the replacement only if we have no function, macro,
13055   # or declaration with that name.
13056   if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \
13057       = no,no,no; then
13058
13059
13060
13061
13062
13063
13064
13065
13066   for ac_func in dirfd
13067 do :
13068   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13069 if test "x$ac_cv_func_dirfd" = x""yes; then :
13070   cat >>confdefs.h <<_ACEOF
13071 #define HAVE_DIRFD 1
13072 _ACEOF
13073
13074 else
13075
13076     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
13077
13078 fi
13079 done
13080
13081
13082     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13083 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13084 if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
13085   $as_echo_n "(cached) " >&6
13086 else
13087
13088         dirfd_save_CFLAGS=$CFLAGS
13089         for ac_expr in d_fd dd_fd; do
13090
13091           CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13092           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13093 /* end confdefs.h.  */
13094
13095              #include <sys/types.h>
13096              #include <dirent.h>
13097 int
13098 main ()
13099 {
13100 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 if ac_fn_c_try_compile "$LINENO"; then :
13106   dir_fd_found=yes
13107
13108 fi
13109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13110           CFLAGS=$dirfd_save_CFLAGS
13111           test "$dir_fd_found" = yes && break
13112         done
13113         test "$dir_fd_found" = yes || ac_expr=no_such_member
13114
13115         gl_cv_sys_dir_fd_member_name=$ac_expr
13116
13117
13118 fi
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13120 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13121     if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13122
13123 cat >>confdefs.h <<_ACEOF
13124 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13125 _ACEOF
13126
13127     fi
13128
13129   fi
13130
13131
13132
13133   GNULIB_DIRFD=1
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144   gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext"
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154   gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext"
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164   gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext"
13165
13166
13167
13168
13169
13170
13171
13172
13173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13174 $as_echo_n "checking whether // is distinct from /... " >&6; }
13175 if test "${gl_cv_double_slash_root+set}" = set; then :
13176   $as_echo_n "(cached) " >&6
13177 else
13178    if test x"$cross_compiling" = xyes ; then
13179         # When cross-compiling, there is no way to tell whether // is special
13180         # short of a list of hosts.  However, the only known hosts to date
13181         # that have a distinct // are Apollo DomainOS (too old to port to),
13182         # Cygwin, and z/OS.  If anyone knows of another system for which // has
13183         # special semantics and is distinct from /, please report it to
13184         # <bug-gnulib@gnu.org>.
13185         case $host in
13186           *-cygwin | i370-ibm-openedition)
13187             gl_cv_double_slash_root=yes ;;
13188           *)
13189             # Be optimistic and assume that / and // are the same when we
13190             # don't know.
13191             gl_cv_double_slash_root='unknown, assuming no' ;;
13192         esac
13193       else
13194         set x `ls -di / // 2>/dev/null`
13195         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13196           gl_cv_double_slash_root=no
13197         else
13198           gl_cv_double_slash_root=yes
13199         fi
13200       fi
13201 fi
13202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13203 $as_echo "$gl_cv_double_slash_root" >&6; }
13204   if test "$gl_cv_double_slash_root" = yes; then
13205
13206 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
13207
13208   fi
13209
13210
13211
13212
13213
13214   if test $ac_cv_func_dup2 = no; then
13215     HAVE_DUP2=0
13216
13217
13218
13219
13220
13221
13222
13223
13224   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
13225
13226   else
13227     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
13228 $as_echo_n "checking whether dup2 works... " >&6; }
13229 if test "${gl_cv_func_dup2_works+set}" = set; then :
13230   $as_echo_n "(cached) " >&6
13231 else
13232   if test "$cross_compiling" = yes; then :
13233   case "$host_os" in
13234            mingw*) # on this platform, dup2 always returns 0 for success
13235              gl_cv_func_dup2_works=no;;
13236            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
13237              gl_cv_func_dup2_works=no;;
13238            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
13239                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
13240              gl_cv_func_dup2_works=no;;
13241            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
13242              gl_cv_func_dup2_works=no;;
13243            *) gl_cv_func_dup2_works=yes;;
13244          esac
13245 else
13246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h.  */
13248
13249          #include <unistd.h>
13250 #include <errno.h>
13251 int
13252 main ()
13253 {
13254 if (dup2 (1, 1) == 0)
13255               return 1;
13256             close (0);
13257             if (dup2 (0, 0) != -1)
13258               return 2;
13259             /* Many gnulib modules require POSIX conformance of EBADF.  */
13260             if (dup2 (1, 1000000) == -1 && errno != EBADF)
13261               return 3;
13262             return 0;
13263
13264   ;
13265   return 0;
13266 }
13267
13268 _ACEOF
13269 if ac_fn_c_try_run "$LINENO"; then :
13270   gl_cv_func_dup2_works=yes
13271 else
13272   gl_cv_func_dup2_works=no
13273 fi
13274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13275   conftest.$ac_objext conftest.beam conftest.$ac_ext
13276 fi
13277
13278
13279 fi
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
13281 $as_echo "$gl_cv_func_dup2_works" >&6; }
13282     if test "$gl_cv_func_dup2_works" = no; then
13283
13284
13285   if test $ac_cv_func_dup2 = yes; then
13286     REPLACE_DUP2=1
13287   fi
13288
13289
13290
13291
13292
13293
13294
13295
13296   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
13297
13298
13299     fi
13300   fi
13301
13302
13303
13304   GNULIB_DUP2=1
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
13321 $as_echo_n "checking for error_at_line... " >&6; }
13322 if test "${ac_cv_lib_error_at_line+set}" = set; then :
13323   $as_echo_n "(cached) " >&6
13324 else
13325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13326 /* end confdefs.h.  */
13327 #include <error.h>
13328 int
13329 main ()
13330 {
13331 error_at_line (0, 0, "", 0, "an error occurred");
13332   ;
13333   return 0;
13334 }
13335 _ACEOF
13336 if ac_fn_c_try_link "$LINENO"; then :
13337   ac_cv_lib_error_at_line=yes
13338 else
13339   ac_cv_lib_error_at_line=no
13340 fi
13341 rm -f core conftest.err conftest.$ac_objext \
13342     conftest$ac_exeext conftest.$ac_ext
13343 fi
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
13345 $as_echo "$ac_cv_lib_error_at_line" >&6; }
13346 if test $ac_cv_lib_error_at_line = no; then
13347
13348
13349
13350
13351
13352
13353
13354
13355   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
13356
13357 fi
13358
13359
13360
13361
13362   :
13363
13364
13365
13366
13367   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
13368
13369
13370
13371   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382   gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext"
13383
13384
13385     :
13386
13387
13388
13389
13390
13391
13392   if test $ac_cv_func_fchdir = no; then
13393     REPLACE_FCHDIR=1
13394
13395
13396
13397
13398
13399
13400
13401
13402   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
13403
13404     :
13405
13406 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
13407
13408                 REPLACE_OPENDIR=1
13409     REPLACE_CLOSEDIR=1
13410     REPLACE_DUP=1
13411
13412
13413   REPLACE_OPEN=1
13414
13415
13416
13417
13418
13419
13420
13421
13422   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
13423
13424
13425
13426
13427   :
13428
13429
13430
13431
13432   REPLACE_CLOSE=1
13433
13434
13435
13436
13437
13438
13439
13440
13441   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13442
13443
13444
13445   REPLACE_FCLOSE=1
13446
13447
13448
13449
13450
13451
13452
13453
13454   gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
13455
13456
13457
13458
13459
13460   if test $ac_cv_func_dup2 = yes; then
13461     REPLACE_DUP2=1
13462   fi
13463
13464
13465
13466
13467
13468
13469
13470
13471   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
13472
13473
13474
13475
13476
13477   if test $ac_cv_func_fcntl = no; then
13478     HAVE_FCNTL=0
13479   else
13480     REPLACE_FCNTL=1
13481   fi
13482
13483
13484
13485
13486
13487
13488
13489
13490   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13491
13492
13493
13494     :
13495
13496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
13497 $as_echo_n "checking whether open can visit directories... " >&6; }
13498 if test "${gl_cv_func_open_directory_works+set}" = set; then :
13499   $as_echo_n "(cached) " >&6
13500 else
13501   if test "$cross_compiling" = yes; then :
13502   gl_cv_func_open_directory_works="guessing no"
13503 else
13504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h.  */
13506 #include <fcntl.h>
13507
13508 int
13509 main ()
13510 {
13511 return open(".", O_RDONLY) < 0;
13512   ;
13513   return 0;
13514 }
13515 _ACEOF
13516 if ac_fn_c_try_run "$LINENO"; then :
13517   gl_cv_func_open_directory_works=yes
13518 else
13519   gl_cv_func_open_directory_works=no
13520 fi
13521 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13522   conftest.$ac_objext conftest.beam conftest.$ac_ext
13523 fi
13524
13525 fi
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
13527 $as_echo "$gl_cv_func_open_directory_works" >&6; }
13528     if test "$gl_cv_func_open_directory_works" != yes; then
13529
13530 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
13531
13532       REPLACE_FSTAT=1
13533     fi
13534   fi
13535
13536
13537
13538   GNULIB_FCHDIR=1
13539
13540
13541
13542
13543
13544   GNULIB_FCLOSE=1
13545
13546
13547
13548
13549
13550
13551   if test $ac_cv_func_fcntl = no; then
13552
13553
13554
13555   if test $ac_cv_func_fcntl = no; then
13556     HAVE_FCNTL=0
13557   else
13558     REPLACE_FCNTL=1
13559   fi
13560
13561
13562
13563
13564
13565
13566
13567
13568   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13569
13570
13571   else
13572         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
13573 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
13574 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
13575   $as_echo_n "(cached) " >&6
13576 else
13577   if test "$cross_compiling" = yes; then :
13578   # Guess that it works on glibc systems
13579           case $host_os in #((
13580             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
13581             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
13582           esac
13583 else
13584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13585 /* end confdefs.h.  */
13586
13587 #include <fcntl.h>
13588
13589 int
13590 main ()
13591 {
13592 return fcntl (0, F_DUPFD, -1) != -1;
13593
13594   ;
13595   return 0;
13596 }
13597 _ACEOF
13598 if ac_fn_c_try_run "$LINENO"; then :
13599   gl_cv_func_fcntl_f_dupfd_works=yes
13600 else
13601   gl_cv_func_fcntl_f_dupfd_works=no
13602 fi
13603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13604   conftest.$ac_objext conftest.beam conftest.$ac_ext
13605 fi
13606
13607 fi
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
13609 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
13610     case $gl_cv_func_fcntl_f_dupfd_works in
13611       *yes) ;;
13612       *)
13613
13614
13615   if test $ac_cv_func_fcntl = no; then
13616     HAVE_FCNTL=0
13617   else
13618     REPLACE_FCNTL=1
13619   fi
13620
13621
13622
13623
13624
13625
13626
13627
13628   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13629
13630
13631
13632 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
13633  ;;
13634     esac
13635
13636         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
13637 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
13638 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
13639   $as_echo_n "(cached) " >&6
13640 else
13641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h.  */
13643
13644 #include <fcntl.h>
13645 #ifndef F_DUPFD_CLOEXEC
13646 choke me
13647 #endif
13648
13649 int
13650 main ()
13651 {
13652
13653   ;
13654   return 0;
13655 }
13656 _ACEOF
13657 if ac_fn_c_try_compile "$LINENO"; then :
13658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659 /* end confdefs.h.  */
13660
13661 #ifdef __linux__
13662 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
13663    it to support the semantics on older kernels that failed with EINVAL.  */
13664 choke me
13665 #endif
13666
13667 int
13668 main ()
13669 {
13670
13671   ;
13672   return 0;
13673 }
13674 _ACEOF
13675 if ac_fn_c_try_compile "$LINENO"; then :
13676   gl_cv_func_fcntl_f_dupfd_cloexec=yes
13677 else
13678   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
13679 fi
13680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13681 else
13682   gl_cv_func_fcntl_f_dupfd_cloexec=no
13683 fi
13684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13685 fi
13686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
13687 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
13688     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
13689
13690
13691
13692   if test $ac_cv_func_fcntl = no; then
13693     HAVE_FCNTL=0
13694   else
13695     REPLACE_FCNTL=1
13696   fi
13697
13698
13699
13700
13701
13702
13703
13704
13705   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13706
13707
13708           fi
13709   fi
13710
13711
13712
13713   GNULIB_FCNTL=1
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724      if test $gl_cv_have_include_next = yes; then
13725        gl_cv_next_fcntl_h='<'fcntl.h'>'
13726      else
13727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
13728 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
13729 if test "${gl_cv_next_fcntl_h+set}" = set; then :
13730   $as_echo_n "(cached) " >&6
13731 else
13732
13733           if test $ac_cv_header_fcntl_h = yes; then
13734             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13735 /* end confdefs.h.  */
13736 #include <fcntl.h>
13737
13738 _ACEOF
13739                                                                                                 case "$host_os" in
13740               aix*) gl_absname_cpp="$ac_cpp -C" ;;
13741               *)    gl_absname_cpp="$ac_cpp" ;;
13742             esac
13743                                                 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13744                sed -n '\#/fcntl.h#{
13745                  s#.*"\(.*/fcntl.h\)".*#\1#
13746                  s#^/[^/]#//&#
13747                  p
13748                  q
13749                }'`'"'
13750           else
13751             gl_cv_next_fcntl_h='<'fcntl.h'>'
13752           fi
13753
13754 fi
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
13756 $as_echo "$gl_cv_next_fcntl_h" >&6; }
13757      fi
13758      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
13759
13760      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13761        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13762        gl_next_as_first_directive='<'fcntl.h'>'
13763      else
13764        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13765        gl_next_as_first_directive=$gl_cv_next_fcntl_h
13766      fi
13767      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781   gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext"
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791   gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext"
13792
13793   # Prerequisites of lib/open-safer.c.
13794
13795
13796
13797
13798 $as_echo "#define GNULIB_FCNTL_SAFER 1" >>confdefs.h
13799
13800
13801
13802
13803
13804   if test $ac_cv_func_fdopendir = no; then
13805
13806
13807
13808
13809
13810
13811
13812
13813   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
13824
13825
13826     :
13827
13828     HAVE_FDOPENDIR=0
13829   else
13830     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
13831 $as_echo_n "checking whether fdopendir works... " >&6; }
13832 if test "${gl_cv_func_fdopendir_works+set}" = set; then :
13833   $as_echo_n "(cached) " >&6
13834 else
13835   if test "$cross_compiling" = yes; then :
13836   gl_cv_func_fdopendir_works="guessing no"
13837 else
13838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13839 /* end confdefs.h.  */
13840
13841 #include <dirent.h>
13842 #include <fcntl.h>
13843
13844 int
13845 main ()
13846 {
13847 int fd = open ("conftest.c", O_RDONLY);
13848      if (fd < 0) return 2;
13849      return !!fdopendir (fd);
13850   ;
13851   return 0;
13852 }
13853 _ACEOF
13854 if ac_fn_c_try_run "$LINENO"; then :
13855   gl_cv_func_fdopendir_works=yes
13856 else
13857   gl_cv_func_fdopendir_works=no
13858 fi
13859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13860   conftest.$ac_objext conftest.beam conftest.$ac_ext
13861 fi
13862
13863 fi
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
13865 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
13866     if test "$gl_cv_func_fdopendir_works" != yes; then
13867       REPLACE_FDOPENDIR=1
13868
13869     :
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
13880
13881     fi
13882   fi
13883
13884
13885
13886   GNULIB_FDOPENDIR=1
13887
13888
13889   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
13890 $as_echo_n "checking whether fflush works on input streams... " >&6; }
13891 if test "${gl_cv_func_fflush_stdin+set}" = set; then :
13892   $as_echo_n "(cached) " >&6
13893 else
13894   echo hello world > conftest.txt
13895      if test "$cross_compiling" = yes; then :
13896         gl_cv_func_fflush_stdin=no
13897 else
13898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13899 /* end confdefs.h.  */
13900
13901 #include <stdio.h>
13902 #include <unistd.h>
13903
13904 int
13905 main ()
13906 {
13907 FILE *f = fopen ("conftest.txt", "r");
13908          char buffer[10];
13909          int fd;
13910          int c;
13911          if (f == NULL)
13912            return 1;
13913          fd = fileno (f);
13914          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
13915            return 2;
13916          /* For deterministic results, ensure f read a bigger buffer.  */
13917          if (lseek (fd, 0, SEEK_CUR) == 5)
13918            return 3;
13919          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
13920             on BSD systems and on mingw.  */
13921          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
13922            return 4;
13923          if (lseek (fd, 0, SEEK_CUR) != 5)
13924            return 5;
13925          /* Verify behaviour of fflush after ungetc. See
13926             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
13927          /* Verify behaviour of fflush after a backup ungetc.  This fails on
13928             mingw.  */
13929          c = fgetc (f);
13930          ungetc (c, f);
13931          fflush (f);
13932          if (fgetc (f) != c)
13933            return 6;
13934          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
13935             on glibc 2.8 and on BSD systems.  */
13936          c = fgetc (f);
13937          ungetc ('@', f);
13938          fflush (f);
13939          if (fgetc (f) != c)
13940            return 7;
13941          return 0;
13942
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 if ac_fn_c_try_run "$LINENO"; then :
13948   gl_cv_func_fflush_stdin=yes
13949 else
13950   gl_cv_func_fflush_stdin=no
13951 fi
13952 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13953   conftest.$ac_objext conftest.beam conftest.$ac_ext
13954 fi
13955
13956      rm conftest.txt
13957
13958 fi
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
13960 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
13961   if test $gl_cv_func_fflush_stdin = no; then
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971   gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
13982
13983
13984   REPLACE_FFLUSH=1
13985   REPLACE_FSEEKO=1
13986
13987
13988   :
13989
13990
13991   fi
13992
13993
13994
13995   GNULIB_FFLUSH=1
13996
13997
13998
13999
14000   FLOAT_H=
14001   case "$host_os" in
14002     beos* | openbsd*)
14003       FLOAT_H=float.h
14004
14005
14006
14007
14008
14009
14010      if test $gl_cv_have_include_next = yes; then
14011        gl_cv_next_float_h='<'float.h'>'
14012      else
14013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
14014 $as_echo_n "checking absolute name of <float.h>... " >&6; }
14015 if test "${gl_cv_next_float_h+set}" = set; then :
14016   $as_echo_n "(cached) " >&6
14017 else
14018
14019           if test $ac_cv_header_float_h = yes; then
14020             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14021 /* end confdefs.h.  */
14022 #include <float.h>
14023
14024 _ACEOF
14025                                                                                                 case "$host_os" in
14026               aix*) gl_absname_cpp="$ac_cpp -C" ;;
14027               *)    gl_absname_cpp="$ac_cpp" ;;
14028             esac
14029                                                 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14030                sed -n '\#/float.h#{
14031                  s#.*"\(.*/float.h\)".*#\1#
14032                  s#^/[^/]#//&#
14033                  p
14034                  q
14035                }'`'"'
14036           else
14037             gl_cv_next_float_h='<'float.h'>'
14038           fi
14039
14040 fi
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
14042 $as_echo "$gl_cv_next_float_h" >&6; }
14043      fi
14044      NEXT_FLOAT_H=$gl_cv_next_float_h
14045
14046      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14047        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14048        gl_next_as_first_directive='<'float.h'>'
14049      else
14050        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14051        gl_next_as_first_directive=$gl_cv_next_float_h
14052      fi
14053      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
14054
14055
14056
14057       ;;
14058   esac
14059
14060
14061
14062
14063
14064   fp_headers='
14065 #     include <stdio.h>
14066 #     if HAVE_STDIO_EXT_H
14067 #      include <stdio_ext.h>
14068 #     endif
14069 '
14070   ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
14071 "
14072 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
14073   ac_have_decl=1
14074 else
14075   ac_have_decl=0
14076 fi
14077
14078 cat >>confdefs.h <<_ACEOF
14079 #define HAVE_DECL___FPENDING $ac_have_decl
14080 _ACEOF
14081
14082   if test $ac_cv_func___fpending = no; then
14083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
14084 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
14085 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
14086   $as_echo_n "(cached) " >&6
14087 else
14088
14089         for ac_expr in                                                    \
14090                                                                           \
14091             '# glibc2'                                                    \
14092             'fp->_IO_write_ptr - fp->_IO_write_base'                      \
14093                                                                           \
14094             '# traditional Unix'                                          \
14095             'fp->_ptr - fp->_base'                                        \
14096                                                                           \
14097             '# BSD'                                                       \
14098             'fp->_p - fp->_bf._base'                                      \
14099                                                                           \
14100             '# SCO, Unixware'                                             \
14101             '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
14102                                                                           \
14103             '# QNX'                                                       \
14104             '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
14105                                                                           \
14106             '# old glibc?'                                                \
14107             'fp->__bufp - fp->__buffer'                                   \
14108                                                                           \
14109             '# old glibc iostream?'                                       \
14110             'fp->_pptr - fp->_pbase'                                      \
14111                                                                           \
14112             '# emx+gcc'                                                   \
14113             'fp->_ptr - fp->_buffer'                                      \
14114                                                                           \
14115             '# VMS'                                                       \
14116             '(*fp)->_ptr - (*fp)->_base'                                  \
14117                                                                           \
14118             '# e.g., DGUX R4.11; the info is not available'               \
14119             1                                                             \
14120             ; do
14121
14122           # Skip each embedded comment.
14123           case "$ac_expr" in '#'*) continue;; esac
14124
14125           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14126 /* end confdefs.h.  */
14127 #include <stdio.h>
14128 int
14129 main ()
14130 {
14131 FILE *fp = stdin; (void) ($ac_expr);
14132   ;
14133   return 0;
14134 }
14135 _ACEOF
14136 if ac_fn_c_try_compile "$LINENO"; then :
14137   fp_done=yes
14138
14139 fi
14140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14141           test "$fp_done" = yes && break
14142         done
14143
14144         ac_cv_sys_pending_output_n_bytes=$ac_expr
14145
14146
14147 fi
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
14149 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
14150
14151 cat >>confdefs.h <<_ACEOF
14152 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
14153 _ACEOF
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
14164
14165   fi
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182   gl_cv_func_fprintf_posix=no
14183   case "$gl_cv_func_printf_sizes_c99" in
14184     *yes)
14185       case "$gl_cv_func_printf_long_double" in
14186         *yes)
14187           case "$gl_cv_func_printf_infinite" in
14188             *yes)
14189               case "$gl_cv_func_printf_infinite_long_double" in
14190                 *yes)
14191                   case "$gl_cv_func_printf_directive_a" in
14192                     *yes)
14193                       case "$gl_cv_func_printf_directive_f" in
14194                         *yes)
14195                           case "$gl_cv_func_printf_directive_n" in
14196                             *yes)
14197                               case "$gl_cv_func_printf_directive_ls" in
14198                                 *yes)
14199                                   case "$gl_cv_func_printf_positions" in
14200                                     *yes)
14201                                       case "$gl_cv_func_printf_flag_grouping" in
14202                                         *yes)
14203                                           case "$gl_cv_func_printf_flag_leftadjust" in
14204                                             *yes)
14205                                               case "$gl_cv_func_printf_flag_zero" in
14206                                                 *yes)
14207                                                   case "$gl_cv_func_printf_precision" in
14208                                                     *yes)
14209                                                       case "$gl_cv_func_printf_enomem" in
14210                                                         *yes)
14211                                                           # fprintf exists and is
14212                                                           # already POSIX compliant.
14213                                                           gl_cv_func_fprintf_posix=yes
14214                                                           ;;
14215                                                       esac
14216                                                       ;;
14217                                                   esac
14218                                                   ;;
14219                                               esac
14220                                               ;;
14221                                           esac
14222                                           ;;
14223                                       esac
14224                                       ;;
14225                                   esac
14226                                   ;;
14227                               esac
14228                               ;;
14229                           esac
14230                           ;;
14231                       esac
14232                       ;;
14233                   esac
14234                   ;;
14235               esac
14236               ;;
14237           esac
14238           ;;
14239       esac
14240       ;;
14241   esac
14242   if test $gl_cv_func_fprintf_posix = no; then
14243
14244
14245
14246   case "$gl_cv_func_printf_infinite" in
14247     *yes)
14248       ;;
14249     *)
14250
14251 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
14252
14253       ;;
14254   esac
14255
14256
14257
14258
14259   case "$gl_cv_func_printf_long_double" in
14260     *yes)
14261       case "$gl_cv_func_printf_infinite_long_double" in
14262         *yes)
14263           ;;
14264         *)
14265
14266 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
14267
14268           ;;
14269       esac
14270       ;;
14271   esac
14272
14273
14274
14275   case "$gl_cv_func_printf_directive_a" in
14276     *yes)
14277       ;;
14278     *)
14279
14280 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
14281
14282       for ac_func in nl_langinfo
14283 do :
14284   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
14285 if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
14286   cat >>confdefs.h <<_ACEOF
14287 #define HAVE_NL_LANGINFO 1
14288 _ACEOF
14289
14290 fi
14291 done
14292
14293       ;;
14294   esac
14295
14296
14297
14298   case "$gl_cv_func_printf_directive_f" in
14299     *yes)
14300       ;;
14301     *)
14302
14303 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
14304
14305       ;;
14306   esac
14307
14308
14309
14310   case "$gl_cv_func_printf_directive_ls" in
14311     *yes)
14312       ;;
14313     *)
14314
14315 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
14316
14317       ;;
14318   esac
14319
14320
14321
14322   case "$gl_cv_func_printf_flag_grouping" in
14323     *yes)
14324       ;;
14325     *)
14326
14327 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
14328
14329       ;;
14330   esac
14331
14332
14333
14334   case "$gl_cv_func_printf_flag_leftadjust" in
14335     *yes)
14336       ;;
14337     *)
14338
14339 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
14340
14341       ;;
14342   esac
14343
14344
14345
14346   case "$gl_cv_func_printf_flag_zero" in
14347     *yes)
14348       ;;
14349     *)
14350
14351 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
14352
14353       ;;
14354   esac
14355
14356
14357
14358   case "$gl_cv_func_printf_precision" in
14359     *yes)
14360       ;;
14361     *)
14362
14363 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
14364
14365
14366 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
14367
14368
14369 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
14370
14371       ;;
14372   esac
14373
14374
14375
14376   case "$gl_cv_func_printf_enomem" in
14377     *yes)
14378       ;;
14379     *)
14380
14381 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
14382
14383
14384 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
14385
14386
14387 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
14388
14389       ;;
14390   esac
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
14433
14434   if test $ac_cv_func_vasnprintf = yes; then
14435
14436 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
14437
14438   fi
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
14450 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
14451
14452 else
14453
14454 $as_echo "#define ptrdiff_t long" >>confdefs.h
14455
14456
14457 fi
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475   gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
14476
14477   REPLACE_FPRINTF=1
14478
14479 $as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
14480
14481   :
14482
14483   fi
14484
14485
14486
14487   GNULIB_FPRINTF_POSIX=1
14488
14489
14490
14491
14492
14493   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
14494 "
14495 if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
14496   ac_have_decl=1
14497 else
14498   ac_have_decl=0
14499 fi
14500
14501 cat >>confdefs.h <<_ACEOF
14502 #define HAVE_DECL_FPURGE $ac_have_decl
14503 _ACEOF
14504
14505   if test "x$ac_cv_func_fpurge" = xyes; then
14506     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
14507     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
14508 $as_echo_n "checking whether fpurge works... " >&6; }
14509 if test "${gl_cv_func_fpurge_works+set}" = set; then :
14510   $as_echo_n "(cached) " >&6
14511 else
14512   if test "$cross_compiling" = yes; then :
14513   gl_cv_func_fpurge_works='guessing no'
14514 else
14515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516 /* end confdefs.h.  */
14517 #include <stdio.h>
14518
14519 int
14520 main ()
14521 {
14522 FILE *f = fopen ("conftest.txt", "w+");
14523         if (!f) return 1;
14524         if (fputc ('a', f) != 'a') return 2;
14525         rewind (f);
14526         if (fgetc (f) != 'a') return 3;
14527         if (fgetc (f) != EOF) return 4;
14528         if (fpurge (f) != 0) return 5;
14529         if (putc ('b', f) != 'b') return 6;
14530         if (fclose (f) != 0) return 7;
14531         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
14532         if (fgetc (f) != 'a') return 9;
14533         if (fgetc (f) != 'b') return 10;
14534         if (fgetc (f) != EOF) return 11;
14535         if (fclose (f) != 0) return 12;
14536         if (remove ("conftest.txt") != 0) return 13;
14537         return 0;
14538   ;
14539   return 0;
14540 }
14541 _ACEOF
14542 if ac_fn_c_try_run "$LINENO"; then :
14543   gl_cv_func_fpurge_works=yes
14544 else
14545   gl_cv_func_fpurge_works=no
14546 fi
14547 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14548   conftest.$ac_objext conftest.beam conftest.$ac_ext
14549 fi
14550
14551 fi
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
14553 $as_echo "$gl_cv_func_fpurge_works" >&6; }
14554     if test "x$gl_cv_func_fpurge_works" != xyes; then
14555       REPLACE_FPURGE=1
14556
14557
14558
14559
14560
14561
14562
14563
14564   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
14565
14566     fi
14567   else
14568
14569
14570
14571
14572
14573
14574
14575
14576   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
14577
14578   fi
14579   if test "x$ac_cv_have_decl_fpurge" = xno; then
14580     HAVE_DECL_FPURGE=0
14581   fi
14582
14583
14584
14585   GNULIB_FPURGE=1
14586
14587
14588
14589
14590
14591
14592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
14593 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
14594 if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
14595   $as_echo_n "(cached) " >&6
14596 else
14597
14598       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599 /* end confdefs.h.  */
14600 #include <math.h>
14601                    double x;
14602 int
14603 main ()
14604 {
14605 int e; return frexp (x, &e) > 0;
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 if ac_fn_c_try_link "$LINENO"; then :
14611   gl_cv_func_frexp_no_libm=yes
14612 else
14613   gl_cv_func_frexp_no_libm=no
14614 fi
14615 rm -f core conftest.err conftest.$ac_objext \
14616     conftest$ac_exeext conftest.$ac_ext
14617
14618 fi
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
14620 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
14621   if test $gl_cv_func_frexp_no_libm = yes; then
14622
14623
14624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
14625 $as_echo_n "checking whether frexp works... " >&6; }
14626 if test "${gl_cv_func_frexp_works+set}" = set; then :
14627   $as_echo_n "(cached) " >&6
14628 else
14629
14630       if test "$cross_compiling" = yes; then :
14631   case "$host_os" in
14632          netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
14633          *)                        gl_cv_func_frexp_works="guessing yes";;
14634        esac
14635
14636 else
14637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638 /* end confdefs.h.  */
14639
14640 #include <float.h>
14641 #include <math.h>
14642 #include <string.h>
14643 int main()
14644 {
14645   int i;
14646   volatile double x;
14647 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
14648    So we use -zero instead.  */
14649   double zero = 0.0;
14650   /* Test on denormalized numbers.  */
14651   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
14652     ;
14653   if (x > 0.0)
14654     {
14655       int exp;
14656       double y = frexp (x, &exp);
14657       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
14658          On NetBSD: y = 0.75. Correct: y = 0.5.  */
14659       if (y != 0.5)
14660         return 1;
14661     }
14662   /* Test on infinite numbers.  */
14663   x = 1.0 / 0.0;
14664   {
14665     int exp;
14666     double y = frexp (x, &exp);
14667     if (y != x)
14668       return 1;
14669   }
14670   /* Test on negative zero.  */
14671   x = -zero;
14672   {
14673     int exp;
14674     double y = frexp (x, &exp);
14675     if (memcmp (&y, &x, sizeof x))
14676       return 1;
14677   }
14678   return 0;
14679 }
14680 _ACEOF
14681 if ac_fn_c_try_run "$LINENO"; then :
14682   gl_cv_func_frexp_works=yes
14683 else
14684   gl_cv_func_frexp_works=no
14685 fi
14686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14687   conftest.$ac_objext conftest.beam conftest.$ac_ext
14688 fi
14689
14690
14691 fi
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
14693 $as_echo "$gl_cv_func_frexp_works" >&6; }
14694
14695     case "$gl_cv_func_frexp_works" in
14696       *yes) gl_func_frexp_no_libm=yes ;;
14697       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
14698     esac
14699   else
14700     gl_func_frexp_no_libm=no
14701         REPLACE_FREXP=1
14702   fi
14703   if test $gl_func_frexp_no_libm = yes; then
14704
14705 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
14706
14707   else
14708
14709
14710
14711
14712
14713
14714
14715
14716   gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
14717
14718   fi
14719
14720
14721
14722   GNULIB_FREXP=1
14723
14724
14725
14726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
14727 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
14728 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
14729   $as_echo_n "(cached) " >&6
14730 else
14731
14732       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14733 /* end confdefs.h.  */
14734 #include <math.h>
14735                    long double x;
14736 int
14737 main ()
14738 {
14739 int e; return frexpl (x, &e) > 0;
14740   ;
14741   return 0;
14742 }
14743 _ACEOF
14744 if ac_fn_c_try_link "$LINENO"; then :
14745   gl_cv_func_frexpl_no_libm=yes
14746 else
14747   gl_cv_func_frexpl_no_libm=no
14748 fi
14749 rm -f core conftest.err conftest.$ac_objext \
14750     conftest$ac_exeext conftest.$ac_ext
14751
14752 fi
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
14754 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
14755   if test $gl_cv_func_frexpl_no_libm = yes; then
14756
14757
14758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
14759 $as_echo_n "checking whether frexpl works... " >&6; }
14760 if test "${gl_cv_func_frexpl_works+set}" = set; then :
14761   $as_echo_n "(cached) " >&6
14762 else
14763
14764       if test "$cross_compiling" = yes; then :
14765   case "$host_os" in
14766          aix* | beos* | darwin* | irix* | mingw* | pw*)
14767             gl_cv_func_frexpl_works="guessing no";;
14768          *) gl_cv_func_frexpl_works="guessing yes";;
14769        esac
14770
14771 else
14772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773 /* end confdefs.h.  */
14774
14775 #include <float.h>
14776 #include <math.h>
14777 /* Override the values of <float.h>, like done in float.in.h.  */
14778 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
14779 # undef LDBL_MIN_EXP
14780 # define LDBL_MIN_EXP    (-16381)
14781 #endif
14782 extern long double frexpl (long double, int *);
14783 int main()
14784 {
14785   volatile long double x;
14786   /* Test on finite numbers that fails on AIX 5.1.  */
14787   x = 16.0L;
14788   {
14789     int exp = -9999;
14790     frexpl (x, &exp);
14791     if (exp != 5)
14792       return 1;
14793   }
14794   /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
14795      function returns an invalid (incorrectly normalized) value: it returns
14796                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
14797      but the correct result is
14798           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
14799   x = 1.01L;
14800   {
14801     int exp = -9999;
14802     long double y = frexpl (x, &exp);
14803     if (!(exp == 1 && y == 0.505L))
14804       return 1;
14805   }
14806   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
14807      LDBL_MAX_EXP = 16384.
14808      In the loop end test, we test x against Infinity, rather than comparing
14809      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
14810   {
14811     int i;
14812     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
14813       {
14814         int exp = -9999;
14815         frexpl (x, &exp);
14816         if (exp != i)
14817           return 1;
14818       }
14819   }
14820   /* Test on denormalized numbers.  */
14821   {
14822     int i;
14823     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
14824       ;
14825     if (x > 0.0L)
14826       {
14827         int exp;
14828         long double y = frexpl (x, &exp);
14829         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
14830            exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
14831         if (exp != LDBL_MIN_EXP - 1)
14832           return 1;
14833       }
14834   }
14835   /* Test on infinite numbers.  */
14836   x = 1.0L / 0.0L;
14837   {
14838     int exp;
14839     long double y = frexpl (x, &exp);
14840     if (y != x)
14841       return 1;
14842   }
14843   return 0;
14844 }
14845 _ACEOF
14846 if ac_fn_c_try_run "$LINENO"; then :
14847   gl_cv_func_frexpl_works=yes
14848 else
14849   gl_cv_func_frexpl_works=no
14850 fi
14851 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14852   conftest.$ac_objext conftest.beam conftest.$ac_ext
14853 fi
14854
14855
14856 fi
14857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
14858 $as_echo "$gl_cv_func_frexpl_works" >&6; }
14859
14860     case "$gl_cv_func_frexpl_works" in
14861       *yes) gl_func_frexpl_no_libm=yes ;;
14862       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
14863     esac
14864   else
14865     gl_func_frexpl_no_libm=no
14866         REPLACE_FREXPL=1
14867   fi
14868   if test $gl_func_frexpl_no_libm = yes; then
14869
14870 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
14871
14872             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
14873 "
14874 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
14875
14876 else
14877   HAVE_DECL_FREXPL=0
14878 fi
14879
14880   else
14881     HAVE_DECL_FREXPL=0
14882
14883
14884
14885
14886
14887
14888
14889
14890   gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
14891
14892   fi
14893
14894
14895
14896   GNULIB_FREXPL=1
14897
14898
14899
14900
14901
14902
14903
14904
14905   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
14906 $as_echo_n "checking for fseeko... " >&6; }
14907 if test "${gl_cv_func_fseeko+set}" = set; then :
14908   $as_echo_n "(cached) " >&6
14909 else
14910
14911       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912 /* end confdefs.h.  */
14913 #include <stdio.h>
14914
14915 int
14916 main ()
14917 {
14918 fseeko (stdin, 0, 0);
14919   ;
14920   return 0;
14921 }
14922 _ACEOF
14923 if ac_fn_c_try_link "$LINENO"; then :
14924   gl_cv_func_fseeko=yes
14925 else
14926   gl_cv_func_fseeko=no
14927 fi
14928 rm -f core conftest.err conftest.$ac_objext \
14929     conftest$ac_exeext conftest.$ac_ext
14930
14931 fi
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
14933 $as_echo "$gl_cv_func_fseeko" >&6; }
14934   if test $gl_cv_func_fseeko = no \
14935       || test $gl_cv_var_stdin_large_offset = no; then
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
14946
14947
14948   REPLACE_FSEEKO=1
14949
14950
14951   fi
14952
14953
14954
14955   GNULIB_FSEEKO=1
14956
14957
14958
14959
14960
14961
14962
14963
14964   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
14965 $as_echo_n "checking for ftello... " >&6; }
14966 if test "${gl_cv_func_ftello+set}" = set; then :
14967   $as_echo_n "(cached) " >&6
14968 else
14969
14970       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971 /* end confdefs.h.  */
14972 #include <stdio.h>
14973 int
14974 main ()
14975 {
14976 ftello (stdin);
14977   ;
14978   return 0;
14979 }
14980 _ACEOF
14981 if ac_fn_c_try_link "$LINENO"; then :
14982   gl_cv_func_ftello=yes
14983 else
14984   gl_cv_func_ftello=no
14985 fi
14986 rm -f core conftest.err conftest.$ac_objext \
14987     conftest$ac_exeext conftest.$ac_ext
14988
14989 fi
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
14991 $as_echo "$gl_cv_func_ftello" >&6; }
14992   if test $gl_cv_func_ftello = no \
14993       || test $gl_cv_var_stdin_large_offset = no; then
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003   gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
15004
15005
15006   REPLACE_FTELLO=1
15007
15008   fi
15009
15010
15011
15012   GNULIB_FTELLO=1
15013
15014
15015
15016
15017
15018   gl_abort_bug=no
15019   case $gl_cv_func_getcwd_null,$host_os in
15020   *,mingw*)
15021     gl_cv_func_getcwd_path_max=yes;;
15022   yes,*)
15023
15024
15025
15026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
15027 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
15028 if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
15029   $as_echo_n "(cached) " >&6
15030 else
15031   # Arrange for deletion of the temporary directory this test creates.
15032      ac_clean_files="$ac_clean_files confdir3"
15033      if test "$cross_compiling" = yes; then :
15034   gl_cv_func_getcwd_path_max=no
15035 else
15036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037 /* end confdefs.h.  */
15038
15039 #include <errno.h>
15040 #include <stdlib.h>
15041 #include <unistd.h>
15042 #include <string.h>
15043 #include <limits.h>
15044 #include <sys/stat.h>
15045 #include <sys/types.h>
15046 #include <fcntl.h>
15047
15048 #ifndef AT_FDCWD
15049 # define AT_FDCWD 0
15050 #endif
15051 #ifdef ENAMETOOLONG
15052 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
15053 #else
15054 # define is_ENAMETOOLONG(x) 0
15055 #endif
15056
15057 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
15058 #undef mkdir
15059
15060 #ifndef S_IRWXU
15061 # define S_IRWXU 0700
15062 #endif
15063
15064 /* The length of this name must be 8.  */
15065 #define DIR_NAME "confdir3"
15066 #define DIR_NAME_LEN 8
15067 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
15068
15069 /* The length of "../".  */
15070 #define DOTDOTSLASH_LEN 3
15071
15072 /* Leftover bytes in the buffer, to work around library or OS bugs.  */
15073 #define BUF_SLOP 20
15074
15075 int
15076 main ()
15077 {
15078 #ifndef PATH_MAX
15079   /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
15080      at least not on a local file system.  And if we were to start worrying
15081      about remote file systems, we'd have to enable the wrapper function
15082      all of the time, just to be safe.  That's not worth the cost.  */
15083   exit (0);
15084 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
15085         - DIR_NAME_SIZE - BUF_SLOP) \
15086        <= PATH_MAX)
15087   /* FIXME: Assuming there's a system for which this is true,
15088      this should be done in a compile test.  */
15089   exit (0);
15090 #else
15091   char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
15092            + DIR_NAME_SIZE + BUF_SLOP];
15093   char *cwd = getcwd (buf, PATH_MAX);
15094   size_t initial_cwd_len;
15095   size_t cwd_len;
15096   int fail = 0;
15097   size_t n_chdirs = 0;
15098
15099   if (cwd == NULL)
15100     exit (1);
15101
15102   cwd_len = initial_cwd_len = strlen (cwd);
15103
15104   while (1)
15105     {
15106       size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
15107       char *c = NULL;
15108
15109       cwd_len += DIR_NAME_SIZE;
15110       /* If mkdir or chdir fails, it could be that this system cannot create
15111          any file with an absolute name longer than PATH_MAX, such as cygwin.
15112          If so, leave fail as 0, because the current working directory can't
15113          be too long for getcwd if it can't even be created.  For other
15114          errors, be pessimistic and consider that as a failure, too.  */
15115       if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
15116         {
15117           if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
15118             fail = 2;
15119           break;
15120         }
15121
15122       if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
15123         {
15124           c = getcwd (buf, PATH_MAX);
15125           if (!c && errno == ENOENT)
15126             {
15127               fail = 1;
15128               break;
15129             }
15130           if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
15131             {
15132               fail = 2;
15133               break;
15134             }
15135         }
15136
15137       if (dotdot_max <= cwd_len - initial_cwd_len)
15138         {
15139           if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
15140             break;
15141           c = getcwd (buf, cwd_len + 1);
15142           if (!c)
15143             {
15144               if (! (errno == ERANGE || errno == ENOENT
15145                      || is_ENAMETOOLONG (errno)))
15146                 {
15147                   fail = 2;
15148                   break;
15149                 }
15150               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
15151                 {
15152                   fail = 1;
15153                   break;
15154                 }
15155             }
15156         }
15157
15158       if (c && strlen (c) != cwd_len)
15159         {
15160           fail = 2;
15161           break;
15162         }
15163       ++n_chdirs;
15164     }
15165
15166   /* Leaving behind such a deep directory is not polite.
15167      So clean up here, right away, even though the driving
15168      shell script would also clean up.  */
15169   {
15170     size_t i;
15171
15172     /* Try rmdir first, in case the chdir failed.  */
15173     rmdir (DIR_NAME);
15174     for (i = 0; i <= n_chdirs; i++)
15175       {
15176         if (chdir ("..") < 0)
15177           break;
15178         if (rmdir (DIR_NAME) != 0)
15179           break;
15180       }
15181   }
15182
15183   exit (fail);
15184 #endif
15185 }
15186
15187 _ACEOF
15188 if ac_fn_c_try_run "$LINENO"; then :
15189   gl_cv_func_getcwd_path_max=yes
15190 else
15191   case $? in
15192      1) gl_cv_func_getcwd_path_max='no, but it is partly working';;
15193      *) gl_cv_func_getcwd_path_max=no;;
15194      esac
15195 fi
15196 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15197   conftest.$ac_objext conftest.beam conftest.$ac_ext
15198 fi
15199
15200
15201 fi
15202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
15203 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
15204   case $gl_cv_func_getcwd_path_max in
15205   no,*)
15206
15207 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
15208 ;;
15209   esac
15210
15211
15212
15213   for ac_func in getpagesize
15214 do :
15215   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
15216 if test "x$ac_cv_func_getpagesize" = x""yes; then :
15217   cat >>confdefs.h <<_ACEOF
15218 #define HAVE_GETPAGESIZE 1
15219 _ACEOF
15220
15221 fi
15222 done
15223
15224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
15225 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
15226 if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
15227   $as_echo_n "(cached) " >&6
15228 else
15229   # Remove any remnants of a previous test.
15230      rm -rf confdir-14B---
15231      # Arrange for deletion of the temporary directory this test creates.
15232      ac_clean_files="$ac_clean_files confdir-14B---"
15233      if test "$cross_compiling" = yes; then :
15234   gl_cv_func_getcwd_abort_bug=yes
15235 else
15236   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15237 /* end confdefs.h.  */
15238
15239 #include <stdlib.h>
15240 #include <unistd.h>
15241 #include <limits.h>
15242 #include <string.h>
15243 #include <sys/stat.h>
15244
15245 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
15246 #undef mkdir
15247
15248 #ifndef S_IRWXU
15249 # define S_IRWXU 0700
15250 #endif
15251
15252 /* FIXME: skip the run-test altogether on systems without getpagesize.  */
15253 #if ! HAVE_GETPAGESIZE
15254 # define getpagesize() 0
15255 #endif
15256
15257 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
15258    the 16kB pagesize on ia64 linux.  Those conditions make the code below
15259    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
15260 #define TARGET_LEN (5 * 1024)
15261
15262 int
15263 main ()
15264 {
15265   char const *dir_name = "confdir-14B---";
15266   char *cwd;
15267   size_t initial_cwd_len;
15268   int fail = 0;
15269   size_t desired_depth;
15270   size_t d;
15271
15272   /* The bug is triggered when PATH_MAX < getpagesize (), so skip
15273      this relative expensive and invasive test if that's not true.  */
15274   if (getpagesize () <= PATH_MAX)
15275     return 0;
15276
15277   cwd = getcwd (NULL, 0);
15278   if (cwd == NULL)
15279     return 0;
15280
15281   initial_cwd_len = strlen (cwd);
15282   free (cwd);
15283   desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
15284                    / (1 + strlen (dir_name)));
15285   for (d = 0; d < desired_depth; d++)
15286     {
15287       if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
15288         {
15289           fail = 3; /* Unable to construct deep hierarchy.  */
15290           break;
15291         }
15292     }
15293
15294   /* If libc has the bug in question, this invocation of getcwd
15295      results in a failed assertion.  */
15296   cwd = getcwd (NULL, 0);
15297   if (cwd == NULL)
15298     fail = 4; /* getcwd failed.  This is ok, and expected.  */
15299   free (cwd);
15300
15301   /* Call rmdir first, in case the above chdir failed.  */
15302   rmdir (dir_name);
15303   while (0 < d--)
15304     {
15305       if (chdir ("..") < 0)
15306         break;
15307       rmdir (dir_name);
15308     }
15309
15310   return 0;
15311 }
15312
15313 _ACEOF
15314 if ac_fn_c_try_run "$LINENO"; then :
15315   gl_cv_func_getcwd_abort_bug=no
15316 else
15317   gl_cv_func_getcwd_abort_bug=yes
15318 fi
15319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15320   conftest.$ac_objext conftest.beam conftest.$ac_ext
15321 fi
15322
15323
15324 fi
15325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
15326 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
15327   if test $gl_cv_func_getcwd_abort_bug = yes; then :
15328   gl_abort_bug=yes
15329 fi
15330 ;;
15331   esac
15332
15333   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
15334   *yes,yes,no) ;;
15335   *)
15336     REPLACE_GETCWD=1
15337
15338
15339
15340
15341
15342
15343
15344
15345   gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
15346
15347
15348
15349
15350   :
15351 ;;
15352   esac
15353
15354
15355
15356   GNULIB_GETCWD=1
15357
15358
15359
15360
15361
15362
15363
15364
15365 $as_echo "#define GNULIB_GETOPT_GNU 1" >>confdefs.h
15366
15367
15368
15369
15370
15371
15372
15373   if test -n "$gl_replace_getopt"; then :
15374
15375
15376
15377   GETOPT_H=getopt.h
15378
15379 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15380
15381
15382
15383     GNULIB_UNISTD_H_GETOPT=1
15384
15385
15386
15387
15388
15389
15390
15391
15392   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
15403
15404
15405
15406
15407
15408
15409 fi
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423   gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext"
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
15436 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
15437 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
15438   $as_echo_n "(cached) " >&6
15439 else
15440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441 /* end confdefs.h.  */
15442 #include <sys/time.h>
15443             struct timeval c;
15444
15445 int
15446 main ()
15447 {
15448
15449             int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
15450             int x = f (&c, 0);
15451             return !(x | c.tv_sec | c.tv_usec);
15452
15453   ;
15454   return 0;
15455 }
15456 _ACEOF
15457 if ac_fn_c_try_compile "$LINENO"; then :
15458   gl_cv_func_gettimeofday_posix_signature=yes
15459 else
15460   gl_cv_func_gettimeofday_posix_signature=no
15461 fi
15462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15463 fi
15464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
15465 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
15466
15467
15468
15469
15470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
15471 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
15472 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
15473   $as_echo_n "(cached) " >&6
15474 else
15475   if test "$cross_compiling" = yes; then :
15476        gl_cv_func_gettimeofday_clobber=yes
15477 else
15478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15479 /* end confdefs.h.  */
15480 #include <string.h>
15481           #include <sys/time.h>
15482           #include <time.h>
15483           #include <stdlib.h>
15484
15485 int
15486 main ()
15487 {
15488
15489           time_t t = 0;
15490           struct tm *lt;
15491           struct tm saved_lt;
15492           struct timeval tv;
15493           lt = localtime (&t);
15494           saved_lt = *lt;
15495           gettimeofday (&tv, NULL);
15496           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
15497
15498   ;
15499   return 0;
15500 }
15501 _ACEOF
15502 if ac_fn_c_try_run "$LINENO"; then :
15503   gl_cv_func_gettimeofday_clobber=no
15504 else
15505   gl_cv_func_gettimeofday_clobber=yes
15506 fi
15507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508   conftest.$ac_objext conftest.beam conftest.$ac_ext
15509 fi
15510
15511 fi
15512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
15513 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
15514
15515  if test $gl_cv_func_gettimeofday_clobber = yes; then
15516    REPLACE_GETTIMEOFDAY=1
15517    SYS_TIME_H=sys/time.h
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
15528
15529
15530   for ac_header in sys/timeb.h
15531 do :
15532   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
15533 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
15534   cat >>confdefs.h <<_ACEOF
15535 #define HAVE_SYS_TIMEB_H 1
15536 _ACEOF
15537
15538 fi
15539
15540 done
15541
15542   for ac_func in _ftime
15543 do :
15544   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
15545 if test "x$ac_cv_func__ftime" = x""yes; then :
15546   cat >>confdefs.h <<_ACEOF
15547 #define HAVE__FTIME 1
15548 _ACEOF
15549
15550 fi
15551 done
15552
15553
15554
15555 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
15556
15557
15558 $as_echo "#define localtime rpl_localtime" >>confdefs.h
15559
15560
15561
15562 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
15563
15564  fi
15565
15566
15567   if test $gl_cv_func_gettimeofday_posix_signature != yes; then
15568     REPLACE_GETTIMEOFDAY=1
15569     SYS_TIME_H=sys/time.h
15570     if test $gl_cv_func_gettimeofday_clobber != yes; then
15571
15572
15573
15574
15575
15576
15577
15578
15579   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
15580
15581
15582   for ac_header in sys/timeb.h
15583 do :
15584   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
15585 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
15586   cat >>confdefs.h <<_ACEOF
15587 #define HAVE_SYS_TIMEB_H 1
15588 _ACEOF
15589
15590 fi
15591
15592 done
15593
15594   for ac_func in _ftime
15595 do :
15596   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
15597 if test "x$ac_cv_func__ftime" = x""yes; then :
15598   cat >>confdefs.h <<_ACEOF
15599 #define HAVE__FTIME 1
15600 _ACEOF
15601
15602 fi
15603 done
15604
15605
15606     fi
15607   fi
15608
15609
15610    if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
15611   GNU_MAKE_TRUE=
15612   GNU_MAKE_FALSE='#'
15613 else
15614   GNU_MAKE_TRUE='#'
15615   GNU_MAKE_FALSE=
15616 fi
15617
15618
15619   # Autoconf 2.61a.99 and earlier don't support linking a file only
15620   # in VPATH builds.  But since GNUmakefile is for maintainer use
15621   # only, it does not matter if we skip the link with older autoconf.
15622   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
15623   # builds, so use a shell variable to bypass this.
15624   GNUmakefile=GNUmakefile
15625   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
15626
15627
15628
15629
15630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
15631 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
15632 if test "${gl_cv_c_inline_effective+set}" = set; then :
15633   $as_echo_n "(cached) " >&6
15634 else
15635   if test $ac_cv_c_inline = no; then
15636        gl_cv_c_inline_effective=no
15637      else
15638                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15639 /* end confdefs.h.  */
15640
15641 int
15642 main ()
15643 {
15644 #ifdef __NO_INLINE__
15645                #error "inline is not effective"
15646              #endif
15647   ;
15648   return 0;
15649 }
15650 _ACEOF
15651 if ac_fn_c_try_compile "$LINENO"; then :
15652   gl_cv_c_inline_effective=yes
15653 else
15654   gl_cv_c_inline_effective=no
15655 fi
15656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15657      fi
15658
15659 fi
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
15661 $as_echo "$gl_cv_c_inline_effective" >&6; }
15662   if test $gl_cv_c_inline_effective = yes; then
15663
15664 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
15665
15666   fi
15667
15668
15669
15670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
15671 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
15672 if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
15673   $as_echo_n "(cached) " >&6
15674 else
15675
15676       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15677 /* end confdefs.h.  */
15678 #include <math.h>
15679                    #if __GNUC__ >= 4
15680                    # undef isnand
15681                    # define isnand(x) __builtin_isnan ((double)(x))
15682                    #else
15683                    # undef isnand
15684                    # define isnand(x) isnan ((double)(x))
15685                    #endif
15686                    double x;
15687 int
15688 main ()
15689 {
15690 return isnand (x);
15691   ;
15692   return 0;
15693 }
15694 _ACEOF
15695 if ac_fn_c_try_link "$LINENO"; then :
15696   gl_cv_func_isnand_no_libm=yes
15697 else
15698   gl_cv_func_isnand_no_libm=no
15699 fi
15700 rm -f core conftest.err conftest.$ac_objext \
15701     conftest$ac_exeext conftest.$ac_ext
15702
15703 fi
15704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
15705 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
15706
15707   if test $gl_cv_func_isnand_no_libm = yes; then
15708
15709 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
15710
15711   else
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
15722
15723
15724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
15725 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
15726 if test "${gl_cv_cc_double_expbit0+set}" = set; then :
15727   $as_echo_n "(cached) " >&6
15728 else
15729
15730       if test "$cross_compiling" = yes; then :
15731
15732                                                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15733 /* end confdefs.h.  */
15734
15735 #if defined arm || defined __arm || defined __arm__
15736   mixed_endianness
15737 #endif
15738
15739 _ACEOF
15740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15741   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
15742   gl_cv_cc_double_expbit0="unknown"
15743 else
15744
15745                                                          :
15746 if test "${ac_cv_c_bigendian+set}" = set; then :
15747   $as_echo_n "(cached) " >&6
15748 else
15749   ac_cv_c_bigendian=unknown
15750     # See if we're dealing with a universal compiler.
15751     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15752 /* end confdefs.h.  */
15753 #ifndef __APPLE_CC__
15754                not a universal capable compiler
15755              #endif
15756              typedef int dummy;
15757
15758 _ACEOF
15759 if ac_fn_c_try_compile "$LINENO"; then :
15760
15761         # Check for potential -arch flags.  It is not universal unless
15762         # there are at least two -arch flags with different values.
15763         ac_arch=
15764         ac_prev=
15765         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15766          if test -n "$ac_prev"; then
15767            case $ac_word in
15768              i?86 | x86_64 | ppc | ppc64)
15769                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15770                  ac_arch=$ac_word
15771                else
15772                  ac_cv_c_bigendian=universal
15773                  break
15774                fi
15775                ;;
15776            esac
15777            ac_prev=
15778          elif test "x$ac_word" = "x-arch"; then
15779            ac_prev=arch
15780          fi
15781        done
15782 fi
15783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15784     if test $ac_cv_c_bigendian = unknown; then
15785       # See if sys/param.h defines the BYTE_ORDER macro.
15786       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15787 /* end confdefs.h.  */
15788 #include <sys/types.h>
15789              #include <sys/param.h>
15790
15791 int
15792 main ()
15793 {
15794 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15795                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15796                      && LITTLE_ENDIAN)
15797               bogus endian macros
15798              #endif
15799
15800   ;
15801   return 0;
15802 }
15803 _ACEOF
15804 if ac_fn_c_try_compile "$LINENO"; then :
15805   # It does; now see whether it defined to BIG_ENDIAN or not.
15806          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15807 /* end confdefs.h.  */
15808 #include <sys/types.h>
15809                 #include <sys/param.h>
15810
15811 int
15812 main ()
15813 {
15814 #if BYTE_ORDER != BIG_ENDIAN
15815                  not big endian
15816                 #endif
15817
15818   ;
15819   return 0;
15820 }
15821 _ACEOF
15822 if ac_fn_c_try_compile "$LINENO"; then :
15823   ac_cv_c_bigendian=yes
15824 else
15825   ac_cv_c_bigendian=no
15826 fi
15827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15828 fi
15829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15830     fi
15831     if test $ac_cv_c_bigendian = unknown; then
15832       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15833       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15834 /* end confdefs.h.  */
15835 #include <limits.h>
15836
15837 int
15838 main ()
15839 {
15840 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15841               bogus endian macros
15842              #endif
15843
15844   ;
15845   return 0;
15846 }
15847 _ACEOF
15848 if ac_fn_c_try_compile "$LINENO"; then :
15849   # It does; now see whether it defined to _BIG_ENDIAN or not.
15850          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851 /* end confdefs.h.  */
15852 #include <limits.h>
15853
15854 int
15855 main ()
15856 {
15857 #ifndef _BIG_ENDIAN
15858                  not big endian
15859                 #endif
15860
15861   ;
15862   return 0;
15863 }
15864 _ACEOF
15865 if ac_fn_c_try_compile "$LINENO"; then :
15866   ac_cv_c_bigendian=yes
15867 else
15868   ac_cv_c_bigendian=no
15869 fi
15870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15871 fi
15872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15873     fi
15874     if test $ac_cv_c_bigendian = unknown; then
15875       # Compile a test program.
15876       if test "$cross_compiling" = yes; then :
15877   # Try to guess by grepping values from an object file.
15878          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15879 /* end confdefs.h.  */
15880 short int ascii_mm[] =
15881                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15882                 short int ascii_ii[] =
15883                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15884                 int use_ascii (int i) {
15885                   return ascii_mm[i] + ascii_ii[i];
15886                 }
15887                 short int ebcdic_ii[] =
15888                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15889                 short int ebcdic_mm[] =
15890                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15891                 int use_ebcdic (int i) {
15892                   return ebcdic_mm[i] + ebcdic_ii[i];
15893                 }
15894                 extern int foo;
15895
15896 int
15897 main ()
15898 {
15899 return use_ascii (foo) == use_ebcdic (foo);
15900   ;
15901   return 0;
15902 }
15903 _ACEOF
15904 if ac_fn_c_try_compile "$LINENO"; then :
15905   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15906               ac_cv_c_bigendian=yes
15907             fi
15908             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15909               if test "$ac_cv_c_bigendian" = unknown; then
15910                 ac_cv_c_bigendian=no
15911               else
15912                 # finding both strings is unlikely to happen, but who knows?
15913                 ac_cv_c_bigendian=unknown
15914               fi
15915             fi
15916 fi
15917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15918 else
15919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920 /* end confdefs.h.  */
15921 $ac_includes_default
15922 int
15923 main ()
15924 {
15925
15926              /* Are we little or big endian?  From Harbison&Steele.  */
15927              union
15928              {
15929                long int l;
15930                char c[sizeof (long int)];
15931              } u;
15932              u.l = 1;
15933              return u.c[sizeof (long int) - 1] == 1;
15934
15935   ;
15936   return 0;
15937 }
15938 _ACEOF
15939 if ac_fn_c_try_run "$LINENO"; then :
15940   ac_cv_c_bigendian=no
15941 else
15942   ac_cv_c_bigendian=yes
15943 fi
15944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15945   conftest.$ac_objext conftest.beam conftest.$ac_ext
15946 fi
15947
15948     fi
15949 fi
15950 :
15951  case $ac_cv_c_bigendian in #(
15952    yes)
15953      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
15954    no)
15955      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
15956    universal)
15957
15958 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
15959
15960      ;; #(
15961    *)
15962      gl_cv_cc_double_expbit0="unknown" ;;
15963  esac
15964
15965
15966 fi
15967 rm -f conftest*
15968
15969
15970 else
15971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972 /* end confdefs.h.  */
15973
15974 #include <float.h>
15975 #include <stddef.h>
15976 #include <stdio.h>
15977 #include <string.h>
15978 #define NWORDS \
15979   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
15980 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
15981 static unsigned int ored_words[NWORDS];
15982 static unsigned int anded_words[NWORDS];
15983 static void add_to_ored_words (double x)
15984 {
15985   memory_double m;
15986   size_t i;
15987   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
15988   memset (&m, 0, sizeof (memory_double));
15989   m.value = x;
15990   for (i = 0; i < NWORDS; i++)
15991     {
15992       ored_words[i] |= m.word[i];
15993       anded_words[i] &= m.word[i];
15994     }
15995 }
15996 int main ()
15997 {
15998   size_t j;
15999   FILE *fp = fopen ("conftest.out", "w");
16000   if (fp == NULL)
16001     return 1;
16002   for (j = 0; j < NWORDS; j++)
16003     anded_words[j] = ~ (unsigned int) 0;
16004   add_to_ored_words (0.25);
16005   add_to_ored_words (0.5);
16006   add_to_ored_words (1.0);
16007   add_to_ored_words (2.0);
16008   add_to_ored_words (4.0);
16009   /* Remove bits that are common (e.g. if representation of the first mantissa
16010      bit is explicit).  */
16011   for (j = 0; j < NWORDS; j++)
16012     ored_words[j] &= ~anded_words[j];
16013   /* Now find the nonzero word.  */
16014   for (j = 0; j < NWORDS; j++)
16015     if (ored_words[j] != 0)
16016       break;
16017   if (j < NWORDS)
16018     {
16019       size_t i;
16020       for (i = j + 1; i < NWORDS; i++)
16021         if (ored_words[i] != 0)
16022           {
16023             fprintf (fp, "unknown");
16024             return (fclose (fp) != 0);
16025           }
16026       for (i = 0; ; i++)
16027         if ((ored_words[j] >> i) & 1)
16028           {
16029             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16030             return (fclose (fp) != 0);
16031           }
16032     }
16033   fprintf (fp, "unknown");
16034   return (fclose (fp) != 0);
16035 }
16036
16037 _ACEOF
16038 if ac_fn_c_try_run "$LINENO"; then :
16039   gl_cv_cc_double_expbit0=`cat conftest.out`
16040 else
16041   gl_cv_cc_double_expbit0="unknown"
16042 fi
16043 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16044   conftest.$ac_objext conftest.beam conftest.$ac_ext
16045 fi
16046
16047       rm -f conftest.out
16048
16049 fi
16050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16051 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16052   case "$gl_cv_cc_double_expbit0" in
16053     word*bit*)
16054       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16055       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16056
16057 cat >>confdefs.h <<_ACEOF
16058 #define DBL_EXPBIT0_WORD $word
16059 _ACEOF
16060
16061
16062 cat >>confdefs.h <<_ACEOF
16063 #define DBL_EXPBIT0_BIT $bit
16064 _ACEOF
16065
16066       ;;
16067   esac
16068
16069
16070   fi
16071
16072
16073
16074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
16075 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
16076 if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
16077   $as_echo_n "(cached) " >&6
16078 else
16079
16080       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081 /* end confdefs.h.  */
16082 #include <math.h>
16083                    #if __GNUC__ >= 4
16084                    # undef isnanf
16085                    # define isnanf(x) __builtin_isnanf ((float)(x))
16086                    #elif defined isnan
16087                    # undef isnanf
16088                    # define isnanf(x) isnan ((float)(x))
16089                    #endif
16090                    float x;
16091 int
16092 main ()
16093 {
16094 return isnanf (x);
16095   ;
16096   return 0;
16097 }
16098 _ACEOF
16099 if ac_fn_c_try_link "$LINENO"; then :
16100   gl_cv_func_isnanf_no_libm=yes
16101 else
16102   gl_cv_func_isnanf_no_libm=no
16103 fi
16104 rm -f core conftest.err conftest.$ac_objext \
16105     conftest$ac_exeext conftest.$ac_ext
16106
16107 fi
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
16109 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
16110
16111   if test $gl_cv_func_isnanf_no_libm = yes; then
16112
16113
16114
16115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
16116 $as_echo_n "checking whether isnan(float) works... " >&6; }
16117 if test "${gl_cv_func_isnanf_works+set}" = set; then :
16118   $as_echo_n "(cached) " >&6
16119 else
16120
16121       if test "$cross_compiling" = yes; then :
16122   case "$host_os" in
16123            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
16124            *)                gl_cv_func_isnanf_works="guessing yes";;
16125          esac
16126
16127 else
16128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129 /* end confdefs.h.  */
16130
16131 #include <math.h>
16132 #if __GNUC__ >= 4
16133 # undef isnanf
16134 # define isnanf(x) __builtin_isnanf ((float)(x))
16135 #elif defined isnan
16136 # undef isnanf
16137 # define isnanf(x) isnan ((float)(x))
16138 #endif
16139 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
16140 #ifdef __DECC
16141 static float
16142 NaN ()
16143 {
16144   static float zero = 0.0f;
16145   return zero / zero;
16146 }
16147 #else
16148 # define NaN() (0.0f / 0.0f)
16149 #endif
16150 #define NWORDS \
16151   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16152 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
16153 int main()
16154 {
16155   memory_float m;
16156
16157   if (isnanf (1.0f / 0.0f))
16158     return 1;
16159
16160   if (!isnanf (NaN ()))
16161     return 1;
16162
16163 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
16164   /* The isnanf function should be immune against changes in the sign bit and
16165      in the mantissa bits.  The xor operation twiddles a bit that can only be
16166      a sign bit or a mantissa bit.  */
16167   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
16168     {
16169       m.value = NaN ();
16170       /* Set the bits below the exponent to 01111...111.  */
16171       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
16172       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
16173       if (!isnanf (m.value))
16174         return 1;
16175     }
16176 #endif
16177
16178   return 0;
16179 }
16180 _ACEOF
16181 if ac_fn_c_try_run "$LINENO"; then :
16182   gl_cv_func_isnanf_works=yes
16183 else
16184   gl_cv_func_isnanf_works=no
16185 fi
16186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16187   conftest.$ac_objext conftest.beam conftest.$ac_ext
16188 fi
16189
16190
16191 fi
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
16193 $as_echo "$gl_cv_func_isnanf_works" >&6; }
16194
16195   fi
16196   if test $gl_cv_func_isnanf_no_libm = yes \
16197      && { case "$gl_cv_func_isnanf_works" in
16198             *yes) true;;
16199             *) false;;
16200           esac
16201         }; then
16202
16203 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
16204
16205   else
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
16216
16217
16218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
16219 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
16220 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
16221   $as_echo_n "(cached) " >&6
16222 else
16223
16224       if test "$cross_compiling" = yes; then :
16225   gl_cv_cc_float_expbit0="word 0 bit 23"
16226 else
16227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228 /* end confdefs.h.  */
16229
16230 #include <float.h>
16231 #include <stddef.h>
16232 #include <stdio.h>
16233 #include <string.h>
16234 #define NWORDS \
16235   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16236 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
16237 static unsigned int ored_words[NWORDS];
16238 static unsigned int anded_words[NWORDS];
16239 static void add_to_ored_words (float x)
16240 {
16241   memory_float m;
16242   size_t i;
16243   /* Clear it first, in case
16244      sizeof (float) < sizeof (memory_float).  */
16245   memset (&m, 0, sizeof (memory_float));
16246   m.value = x;
16247   for (i = 0; i < NWORDS; i++)
16248     {
16249       ored_words[i] |= m.word[i];
16250       anded_words[i] &= m.word[i];
16251     }
16252 }
16253 int main ()
16254 {
16255   size_t j;
16256   FILE *fp = fopen ("conftest.out", "w");
16257   if (fp == NULL)
16258     return 1;
16259   for (j = 0; j < NWORDS; j++)
16260     anded_words[j] = ~ (unsigned int) 0;
16261   add_to_ored_words (0.25f);
16262   add_to_ored_words (0.5f);
16263   add_to_ored_words (1.0f);
16264   add_to_ored_words (2.0f);
16265   add_to_ored_words (4.0f);
16266   /* Remove bits that are common (e.g. if representation of the first mantissa
16267      bit is explicit).  */
16268   for (j = 0; j < NWORDS; j++)
16269     ored_words[j] &= ~anded_words[j];
16270   /* Now find the nonzero word.  */
16271   for (j = 0; j < NWORDS; j++)
16272     if (ored_words[j] != 0)
16273       break;
16274   if (j < NWORDS)
16275     {
16276       size_t i;
16277       for (i = j + 1; i < NWORDS; i++)
16278         if (ored_words[i] != 0)
16279           {
16280             fprintf (fp, "unknown");
16281             return (fclose (fp) != 0);
16282           }
16283       for (i = 0; ; i++)
16284         if ((ored_words[j] >> i) & 1)
16285           {
16286             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16287             return (fclose (fp) != 0);
16288           }
16289     }
16290   fprintf (fp, "unknown");
16291   return (fclose (fp) != 0);
16292 }
16293
16294 _ACEOF
16295 if ac_fn_c_try_run "$LINENO"; then :
16296   gl_cv_cc_float_expbit0=`cat conftest.out`
16297 else
16298   gl_cv_cc_float_expbit0="unknown"
16299 fi
16300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16301   conftest.$ac_objext conftest.beam conftest.$ac_ext
16302 fi
16303
16304       rm -f conftest.out
16305
16306 fi
16307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
16308 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
16309   case "$gl_cv_cc_float_expbit0" in
16310     word*bit*)
16311       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16312       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
16313
16314 cat >>confdefs.h <<_ACEOF
16315 #define FLT_EXPBIT0_WORD $word
16316 _ACEOF
16317
16318
16319 cat >>confdefs.h <<_ACEOF
16320 #define FLT_EXPBIT0_BIT $bit
16321 _ACEOF
16322
16323       ;;
16324   esac
16325
16326
16327   fi
16328
16329
16330
16331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
16332 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
16333 if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
16334   $as_echo_n "(cached) " >&6
16335 else
16336
16337       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338 /* end confdefs.h.  */
16339 #include <math.h>
16340                    #if __GNUC__ >= 4
16341                    # undef isnanl
16342                    # define isnanl(x) __builtin_isnanl ((long double)(x))
16343                    #elif defined isnan
16344                    # undef isnanl
16345                    # define isnanl(x) isnan ((long double)(x))
16346                    #endif
16347                    long double x;
16348 int
16349 main ()
16350 {
16351 return isnanl (x);
16352   ;
16353   return 0;
16354 }
16355 _ACEOF
16356 if ac_fn_c_try_link "$LINENO"; then :
16357   gl_cv_func_isnanl_no_libm=yes
16358 else
16359   gl_cv_func_isnanl_no_libm=no
16360 fi
16361 rm -f core conftest.err conftest.$ac_objext \
16362     conftest$ac_exeext conftest.$ac_ext
16363
16364 fi
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
16366 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
16367
16368   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
16369   if test $gl_func_isnanl_no_libm = yes; then
16370
16371
16372
16373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
16374 $as_echo_n "checking whether isnanl works... " >&6; }
16375 if test "${gl_cv_func_isnanl_works+set}" = set; then :
16376   $as_echo_n "(cached) " >&6
16377 else
16378
16379       if test "$cross_compiling" = yes; then :
16380   case "$host_cpu" in
16381                                # Guess no on ia64, x86_64, i386.
16382          ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
16383          *)
16384            case "$host_os" in
16385              netbsd*) gl_cv_func_isnanl_works="guessing no";;
16386              *)       gl_cv_func_isnanl_works="guessing yes";;
16387            esac
16388            ;;
16389        esac
16390
16391 else
16392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393 /* end confdefs.h.  */
16394
16395 #include <float.h>
16396 #include <limits.h>
16397 #include <math.h>
16398 #if __GNUC__ >= 4
16399 # undef isnanl
16400 # define isnanl(x) __builtin_isnanl ((long double)(x))
16401 #elif defined isnan
16402 # undef isnanl
16403 # define isnanl(x) isnan ((long double)(x))
16404 #endif
16405 #define NWORDS \
16406   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16407 typedef union { unsigned int word[NWORDS]; long double value; }
16408         memory_long_double;
16409 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
16410    runtime type conversion.  */
16411 #ifdef __sgi
16412 static long double NaNl ()
16413 {
16414   double zero = 0.0;
16415   return zero / zero;
16416 }
16417 #else
16418 # define NaNl() (0.0L / 0.0L)
16419 #endif
16420 int main ()
16421 {
16422   memory_long_double m;
16423   unsigned int i;
16424
16425   if (!isnanl (NaNl ()))
16426     return 1;
16427
16428   /* The isnanl function should be immune against changes in the sign bit and
16429      in the mantissa bits.  The xor operation twiddles a bit that can only be
16430      a sign bit or a mantissa bit (since the exponent never extends to
16431      bit 31).  */
16432   m.value = NaNl ();
16433   m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
16434   for (i = 0; i < NWORDS; i++)
16435     m.word[i] |= 1;
16436   if (!isnanl (m.value))
16437     return 1;
16438
16439 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
16440 /* Representation of an 80-bit 'long double' as an initializer for a sequence
16441    of 'unsigned int' words.  */
16442 # ifdef WORDS_BIGENDIAN
16443 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
16444      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
16445        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
16446        (unsigned int) (mantlo) << 16                                        \
16447      }
16448 # else
16449 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
16450      { mantlo, manthi, exponent }
16451 # endif
16452   { /* Quiet NaN.  */
16453     static memory_long_double x =
16454       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
16455     if (!isnanl (x.value))
16456       return 1;
16457   }
16458   {
16459     /* Signalling NaN.  */
16460     static memory_long_double x =
16461       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
16462     if (!isnanl (x.value))
16463       return 1;
16464   }
16465   /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
16466      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
16467        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
16468        Application Architecture.
16469        Table 5-2 "Floating-Point Register Encodings"
16470        Figure 5-6 "Memory to Floating-Point Register Data Translation"
16471    */
16472   { /* Pseudo-NaN.  */
16473     static memory_long_double x =
16474       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
16475     if (!isnanl (x.value))
16476       return 1;
16477   }
16478   { /* Pseudo-Infinity.  */
16479     static memory_long_double x =
16480       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
16481     if (!isnanl (x.value))
16482       return 1;
16483   }
16484   { /* Pseudo-Zero.  */
16485     static memory_long_double x =
16486       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
16487     if (!isnanl (x.value))
16488       return 1;
16489   }
16490   { /* Unnormalized number.  */
16491     static memory_long_double x =
16492       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
16493     if (!isnanl (x.value))
16494       return 1;
16495   }
16496   { /* Pseudo-Denormal.  */
16497     static memory_long_double x =
16498       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
16499     if (!isnanl (x.value))
16500       return 1;
16501   }
16502 #endif
16503
16504   return 0;
16505 }
16506 _ACEOF
16507 if ac_fn_c_try_run "$LINENO"; then :
16508   gl_cv_func_isnanl_works=yes
16509 else
16510   gl_cv_func_isnanl_works=no
16511 fi
16512 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16513   conftest.$ac_objext conftest.beam conftest.$ac_ext
16514 fi
16515
16516
16517 fi
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
16519 $as_echo "$gl_cv_func_isnanl_works" >&6; }
16520
16521     case "$gl_cv_func_isnanl_works" in
16522       *yes) ;;
16523       *)    gl_func_isnanl_no_libm=no ;;
16524     esac
16525   fi
16526   if test $gl_func_isnanl_no_libm = yes; then
16527
16528 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
16529
16530   else
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
16541
16542
16543
16544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
16545 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
16546 if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
16547   $as_echo_n "(cached) " >&6
16548 else
16549
16550       if test "$cross_compiling" = yes; then :
16551
16552                               gl_cv_cc_long_double_expbit0="unknown"
16553
16554 else
16555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556 /* end confdefs.h.  */
16557
16558 #include <float.h>
16559 #include <stddef.h>
16560 #include <stdio.h>
16561 #include <string.h>
16562 #define NWORDS \
16563   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16564 typedef union { long double value; unsigned int word[NWORDS]; }
16565         memory_long_double;
16566 static unsigned int ored_words[NWORDS];
16567 static unsigned int anded_words[NWORDS];
16568 static void add_to_ored_words (long double x)
16569 {
16570   memory_long_double m;
16571   size_t i;
16572   /* Clear it first, in case
16573      sizeof (long double) < sizeof (memory_long_double).  */
16574   memset (&m, 0, sizeof (memory_long_double));
16575   m.value = x;
16576   for (i = 0; i < NWORDS; i++)
16577     {
16578       ored_words[i] |= m.word[i];
16579       anded_words[i] &= m.word[i];
16580     }
16581 }
16582 int main ()
16583 {
16584   size_t j;
16585   FILE *fp = fopen ("conftest.out", "w");
16586   if (fp == NULL)
16587     return 1;
16588   for (j = 0; j < NWORDS; j++)
16589     anded_words[j] = ~ (unsigned int) 0;
16590   add_to_ored_words (0.25L);
16591   add_to_ored_words (0.5L);
16592   add_to_ored_words (1.0L);
16593   add_to_ored_words (2.0L);
16594   add_to_ored_words (4.0L);
16595   /* Remove bits that are common (e.g. if representation of the first mantissa
16596      bit is explicit).  */
16597   for (j = 0; j < NWORDS; j++)
16598     ored_words[j] &= ~anded_words[j];
16599   /* Now find the nonzero word.  */
16600   for (j = 0; j < NWORDS; j++)
16601     if (ored_words[j] != 0)
16602       break;
16603   if (j < NWORDS)
16604     {
16605       size_t i;
16606       for (i = j + 1; i < NWORDS; i++)
16607         if (ored_words[i] != 0)
16608           {
16609             fprintf (fp, "unknown");
16610             return (fclose (fp) != 0);
16611           }
16612       for (i = 0; ; i++)
16613         if ((ored_words[j] >> i) & 1)
16614           {
16615             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16616             return (fclose (fp) != 0);
16617           }
16618     }
16619   fprintf (fp, "unknown");
16620   return (fclose (fp) != 0);
16621 }
16622
16623 _ACEOF
16624 if ac_fn_c_try_run "$LINENO"; then :
16625   gl_cv_cc_long_double_expbit0=`cat conftest.out`
16626 else
16627   gl_cv_cc_long_double_expbit0="unknown"
16628 fi
16629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16630   conftest.$ac_objext conftest.beam conftest.$ac_ext
16631 fi
16632
16633       rm -f conftest.out
16634
16635 fi
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
16637 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
16638   case "$gl_cv_cc_long_double_expbit0" in
16639     word*bit*)
16640       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16641       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
16642
16643 cat >>confdefs.h <<_ACEOF
16644 #define LDBL_EXPBIT0_WORD $word
16645 _ACEOF
16646
16647
16648 cat >>confdefs.h <<_ACEOF
16649 #define LDBL_EXPBIT0_BIT $bit
16650 _ACEOF
16651
16652       ;;
16653   esac
16654
16655
16656   fi
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670   for ac_func in lchown
16671 do :
16672   ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
16673 if test "x$ac_cv_func_lchown" = x""yes; then :
16674   cat >>confdefs.h <<_ACEOF
16675 #define HAVE_LCHOWN 1
16676 _ACEOF
16677
16678 else
16679
16680     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
16681
16682 fi
16683 done
16684
16685
16686   if test $ac_cv_func_lchown = no; then
16687     HAVE_LCHOWN=0
16688   elif test "$gl_cv_func_chown_slash_works" != yes \
16689       || test "$gl_cv_func_chown_ctime_works" != yes; then
16690
16691
16692
16693
16694
16695
16696
16697
16698   gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
16699
16700     REPLACE_LCHOWN=1
16701   fi
16702
16703
16704
16705   GNULIB_LCHOWN=1
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
16716
16717
16718
16719
16720   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
16721 $as_echo_n "checking whether lseek detects pipes... " >&6; }
16722 if test "${gl_cv_func_lseek_pipe+set}" = set; then :
16723   $as_echo_n "(cached) " >&6
16724 else
16725   if test $cross_compiling = no; then
16726        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16727 /* end confdefs.h.  */
16728
16729 #include <sys/types.h> /* for off_t */
16730 #include <stdio.h> /* for SEEK_CUR */
16731 #include <unistd.h>
16732 int main ()
16733 {
16734   /* Exit with success only if stdin is seekable.  */
16735   return lseek (0, (off_t)0, SEEK_CUR) < 0;
16736 }
16737 _ACEOF
16738 if ac_fn_c_try_link "$LINENO"; then :
16739   if test -s conftest$ac_exeext \
16740              && ./conftest$ac_exeext < conftest.$ac_ext \
16741              && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then
16742             gl_cv_func_lseek_pipe=yes
16743           else
16744             gl_cv_func_lseek_pipe=no
16745           fi
16746 else
16747   gl_cv_func_lseek_pipe=no
16748 fi
16749 rm -f core conftest.err conftest.$ac_objext \
16750     conftest$ac_exeext conftest.$ac_ext
16751      else
16752        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16753 /* end confdefs.h.  */
16754
16755 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
16756 /* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
16757   Choke me.
16758 #endif
16759 _ACEOF
16760 if ac_fn_c_try_compile "$LINENO"; then :
16761   gl_cv_func_lseek_pipe=yes
16762 else
16763   gl_cv_func_lseek_pipe=no
16764 fi
16765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16766      fi
16767 fi
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
16769 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
16770   if test $gl_cv_func_lseek_pipe = no; then
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
16781
16782
16783   REPLACE_LSEEK=1
16784
16785 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
16786
16787
16788   fi
16789
16790
16791
16792   GNULIB_LSEEK=1
16793
16794
16795
16796
16797   if test $ac_cv_func_lstat = yes; then
16798
16799     if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
16800             REPLACE_LSTAT=1
16801     fi
16802     # Prerequisites of lib/lstat.c.
16803
16804   else
16805     HAVE_LSTAT=0
16806   fi
16807
16808
16809
16810   GNULIB_LSTAT=1
16811
16812   for ac_header in stdlib.h
16813 do :
16814   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
16815 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
16816   cat >>confdefs.h <<_ACEOF
16817 #define HAVE_STDLIB_H 1
16818 _ACEOF
16819
16820 fi
16821
16822 done
16823
16824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16825 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16826 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
16827   $as_echo_n "(cached) " >&6
16828 else
16829   if test "$cross_compiling" = yes; then :
16830   ac_cv_func_malloc_0_nonnull=no
16831 else
16832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16833 /* end confdefs.h.  */
16834 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16835 # include <stdlib.h>
16836 #else
16837 char *malloc ();
16838 #endif
16839
16840 int
16841 main ()
16842 {
16843 return ! malloc (0);
16844   ;
16845   return 0;
16846 }
16847 _ACEOF
16848 if ac_fn_c_try_run "$LINENO"; then :
16849   ac_cv_func_malloc_0_nonnull=yes
16850 else
16851   ac_cv_func_malloc_0_nonnull=no
16852 fi
16853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16854   conftest.$ac_objext conftest.beam conftest.$ac_ext
16855 fi
16856
16857 fi
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
16859 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
16860 if test $ac_cv_func_malloc_0_nonnull = yes; then :
16861
16862 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
16863
16864 else
16865   $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
16876
16877
16878 $as_echo "#define malloc rpl_malloc" >>confdefs.h
16879
16880 fi
16881
16882
16883
16884 $as_echo "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
16885
16886
16887
16888   if test $gl_cv_func_malloc_posix = yes; then
16889     HAVE_MALLOC_POSIX=1
16890
16891 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
16892
16893   else
16894
16895
16896
16897
16898
16899
16900
16901
16902   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
16903
16904     HAVE_MALLOC_POSIX=0
16905   fi
16906
16907
16908
16909
16910   GNULIB_MALLOC_POSIX=1
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920      if test $gl_cv_have_include_next = yes; then
16921        gl_cv_next_math_h='<'math.h'>'
16922      else
16923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
16924 $as_echo_n "checking absolute name of <math.h>... " >&6; }
16925 if test "${gl_cv_next_math_h+set}" = set; then :
16926   $as_echo_n "(cached) " >&6
16927 else
16928
16929           if test $ac_cv_header_math_h = yes; then
16930             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16931 /* end confdefs.h.  */
16932 #include <math.h>
16933
16934 _ACEOF
16935                                                                                                 case "$host_os" in
16936               aix*) gl_absname_cpp="$ac_cpp -C" ;;
16937               *)    gl_absname_cpp="$ac_cpp" ;;
16938             esac
16939                                                 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16940                sed -n '\#/math.h#{
16941                  s#.*"\(.*/math.h\)".*#\1#
16942                  s#^/[^/]#//&#
16943                  p
16944                  q
16945                }'`'"'
16946           else
16947             gl_cv_next_math_h='<'math.h'>'
16948           fi
16949
16950 fi
16951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
16952 $as_echo "$gl_cv_next_math_h" >&6; }
16953      fi
16954      NEXT_MATH_H=$gl_cv_next_math_h
16955
16956      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16957        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16958        gl_next_as_first_directive='<'math.h'>'
16959      else
16960        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16961        gl_next_as_first_directive=$gl_cv_next_math_h
16962      fi
16963      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
16964
16965
16966
16967
16968
16969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
16970 $as_echo_n "checking whether NAN macro works... " >&6; }
16971 if test "${gl_cv_header_math_nan_works+set}" = set; then :
16972   $as_echo_n "(cached) " >&6
16973 else
16974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16975 /* end confdefs.h.  */
16976 #include <math.h>
16977 int
16978 main ()
16979 {
16980 /* Solaris 10 has a broken definition of NAN.  Other platforms
16981         fail to provide NAN, or provide it only in C99 mode; this
16982         test only needs to fail when NAN is provided but wrong.  */
16983          float f = 1.0f;
16984 #ifdef NAN
16985          f = NAN;
16986 #endif
16987          return f == 0;
16988   ;
16989   return 0;
16990 }
16991 _ACEOF
16992 if ac_fn_c_try_compile "$LINENO"; then :
16993   gl_cv_header_math_nan_works=yes
16994 else
16995   gl_cv_header_math_nan_works=no
16996 fi
16997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16998 fi
16999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
17000 $as_echo "$gl_cv_header_math_nan_works" >&6; }
17001   if test $gl_cv_header_math_nan_works = no; then
17002     REPLACE_NAN=1
17003   fi
17004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
17005 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
17006 if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
17007   $as_echo_n "(cached) " >&6
17008 else
17009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17010 /* end confdefs.h.  */
17011 #include <math.h>
17012 int
17013 main ()
17014 {
17015 /* Solaris 10 has a broken definition of HUGE_VAL.  */
17016          double d = HUGE_VAL;
17017          return d == 0;
17018   ;
17019   return 0;
17020 }
17021 _ACEOF
17022 if ac_fn_c_try_compile "$LINENO"; then :
17023   gl_cv_header_math_huge_val_works=yes
17024 else
17025   gl_cv_header_math_huge_val_works=no
17026 fi
17027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17028 fi
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
17030 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
17031   if test $gl_cv_header_math_huge_val_works = no; then
17032     REPLACE_HUGE_VAL=1
17033   fi
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
17046
17047
17048
17049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
17050 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
17051 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
17052   $as_echo_n "(cached) " >&6
17053 else
17054
17055                   case "$host_os" in
17056               # Guess no on AIX and OSF/1.
17057         osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
17058               # Guess yes otherwise.
17059         *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
17060       esac
17061       if test $LOCALE_JA != none; then
17062         if test "$cross_compiling" = yes; then :
17063   :
17064 else
17065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17066 /* end confdefs.h.  */
17067
17068 #include <locale.h>
17069 #include <string.h>
17070 #include <wchar.h>
17071 int main ()
17072 {
17073   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
17074     {
17075       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
17076       mbstate_t state;
17077       wchar_t wc;
17078
17079       memset (&state, '\0', sizeof (mbstate_t));
17080       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17081         if (mbsinit (&state))
17082           return 1;
17083     }
17084   return 0;
17085 }
17086 _ACEOF
17087 if ac_fn_c_try_run "$LINENO"; then :
17088   gl_cv_func_mbrtowc_incomplete_state=yes
17089 else
17090   gl_cv_func_mbrtowc_incomplete_state=no
17091 fi
17092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17093   conftest.$ac_objext conftest.beam conftest.$ac_ext
17094 fi
17095
17096       fi
17097
17098 fi
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
17100 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
17101
17102
17103
17104
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
17106 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
17107 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
17108   $as_echo_n "(cached) " >&6
17109 else
17110
17111                   case "$host_os" in
17112                     # Guess no on Solaris 8.
17113         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
17114                     # Guess yes otherwise.
17115         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
17116       esac
17117       if test $LOCALE_ZH_CN != none; then
17118         if test "$cross_compiling" = yes; then :
17119   :
17120 else
17121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17122 /* end confdefs.h.  */
17123
17124 #include <locale.h>
17125 #include <stdlib.h>
17126 #include <string.h>
17127 #include <wchar.h>
17128 int main ()
17129 {
17130   /* This fails on Solaris 8:
17131      mbrtowc returns 2, and sets wc to 0x00F0.
17132      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
17133   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
17134     {
17135       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
17136       mbstate_t state;
17137       wchar_t wc;
17138
17139       memset (&state, '\0', sizeof (mbstate_t));
17140       if (mbrtowc (&wc, input + 3, 6, &state) != 4
17141           && mbtowc (&wc, input + 3, 6) == 4)
17142         return 1;
17143     }
17144   return 0;
17145 }
17146 _ACEOF
17147 if ac_fn_c_try_run "$LINENO"; then :
17148   gl_cv_func_mbrtowc_sanitycheck=yes
17149 else
17150   gl_cv_func_mbrtowc_sanitycheck=no
17151 fi
17152 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17153   conftest.$ac_objext conftest.beam conftest.$ac_ext
17154 fi
17155
17156       fi
17157
17158 fi
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
17160 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
17161
17162     REPLACE_MBSTATE_T=0
17163     case "$gl_cv_func_mbrtowc_incomplete_state" in
17164       *yes) ;;
17165       *) REPLACE_MBSTATE_T=1 ;;
17166     esac
17167     case "$gl_cv_func_mbrtowc_sanitycheck" in
17168       *yes) ;;
17169       *) REPLACE_MBSTATE_T=1 ;;
17170     esac
17171   else
17172     REPLACE_MBSTATE_T=1
17173   fi
17174   if test $REPLACE_MBSTATE_T = 1; then
17175
17176     :
17177
17178   fi
17179
17180   if test $REPLACE_MBSTATE_T = 1; then
17181     REPLACE_MBRTOWC=1
17182   fi
17183
17184   if test $ac_cv_func_mbrtowc = no; then
17185     HAVE_MBRTOWC=0
17186   fi
17187   if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
17188
17189
17190
17191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
17192 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
17193 if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
17194   $as_echo_n "(cached) " >&6
17195 else
17196
17197                   case "$host_os" in
17198               # Guess no on OSF/1.
17199         osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
17200               # Guess yes otherwise.
17201         *)    gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
17202       esac
17203       if test $LOCALE_FR_UTF8 != none; then
17204         if test "$cross_compiling" = yes; then :
17205   :
17206 else
17207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208 /* end confdefs.h.  */
17209
17210 #include <locale.h>
17211 #include <string.h>
17212 #include <wchar.h>
17213 int main ()
17214 {
17215   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
17216     {
17217       mbstate_t state;
17218       wchar_t wc;
17219       int ret;
17220
17221       memset (&state, '\0', sizeof (mbstate_t));
17222       wc = (wchar_t) 0xBADFACE;
17223       mbrtowc (&wc, NULL, 5, &state);
17224       /* Check that wc was not modified.  */
17225       if (wc != (wchar_t) 0xBADFACE)
17226         return 1;
17227     }
17228   return 0;
17229 }
17230 _ACEOF
17231 if ac_fn_c_try_run "$LINENO"; then :
17232   gl_cv_func_mbrtowc_null_arg=yes
17233 else
17234   gl_cv_func_mbrtowc_null_arg=no
17235 fi
17236 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17237   conftest.$ac_objext conftest.beam conftest.$ac_ext
17238 fi
17239
17240       fi
17241
17242 fi
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
17244 $as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
17245
17246
17247
17248
17249
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
17251 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
17252 if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
17253   $as_echo_n "(cached) " >&6
17254 else
17255
17256                   case "$host_os" in
17257                           # Guess no on HP-UX and Solaris.
17258         hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
17259                           # Guess yes otherwise.
17260         *)                gl_cv_func_mbrtowc_retval="guessing yes" ;;
17261       esac
17262       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
17263         if test "$cross_compiling" = yes; then :
17264   :
17265 else
17266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17267 /* end confdefs.h.  */
17268
17269 #include <locale.h>
17270 #include <string.h>
17271 #include <wchar.h>
17272 int main ()
17273 {
17274   /* This fails on Solaris.  */
17275   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
17276     {
17277       char input[] = "B\303\274\303\237er"; /* "Büßer" */
17278       mbstate_t state;
17279       wchar_t wc;
17280
17281       memset (&state, '\0', sizeof (mbstate_t));
17282       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17283         {
17284           input[1] = '\0';
17285           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
17286             return 1;
17287         }
17288     }
17289   /* This fails on HP-UX 11.11.  */
17290   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
17291     {
17292       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
17293       mbstate_t state;
17294       wchar_t wc;
17295
17296       memset (&state, '\0', sizeof (mbstate_t));
17297       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17298         {
17299           input[1] = '\0';
17300           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
17301             return 1;
17302         }
17303     }
17304   return 0;
17305 }
17306 _ACEOF
17307 if ac_fn_c_try_run "$LINENO"; then :
17308   gl_cv_func_mbrtowc_retval=yes
17309 else
17310   gl_cv_func_mbrtowc_retval=no
17311 fi
17312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17313   conftest.$ac_objext conftest.beam conftest.$ac_ext
17314 fi
17315
17316       fi
17317
17318 fi
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
17320 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
17321
17322
17323
17324
17325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
17326 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
17327 if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
17328   $as_echo_n "(cached) " >&6
17329 else
17330
17331                   case "$host_os" in
17332                        # Guess no on Solaris 8 and 9.
17333         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
17334                        # Guess yes otherwise.
17335         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
17336       esac
17337       if test $LOCALE_ZH_CN != none; then
17338         if test "$cross_compiling" = yes; then :
17339   :
17340 else
17341   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17342 /* end confdefs.h.  */
17343
17344 #include <locale.h>
17345 #include <string.h>
17346 #include <wchar.h>
17347 int main ()
17348 {
17349   /* This fails on Solaris 8 and 9.  */
17350   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
17351     {
17352       mbstate_t state;
17353       wchar_t wc;
17354
17355       memset (&state, '\0', sizeof (mbstate_t));
17356       if (mbrtowc (&wc, "", 1, &state) != 0)
17357         return 1;
17358     }
17359   return 0;
17360 }
17361 _ACEOF
17362 if ac_fn_c_try_run "$LINENO"; then :
17363   gl_cv_func_mbrtowc_nul_retval=yes
17364 else
17365   gl_cv_func_mbrtowc_nul_retval=no
17366 fi
17367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17368   conftest.$ac_objext conftest.beam conftest.$ac_ext
17369 fi
17370
17371       fi
17372
17373 fi
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
17375 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
17376
17377     case "$gl_cv_func_mbrtowc_null_arg" in
17378       *yes) ;;
17379       *)
17380 $as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
17381
17382          REPLACE_MBRTOWC=1
17383          ;;
17384     esac
17385     case "$gl_cv_func_mbrtowc_retval" in
17386       *yes) ;;
17387       *)
17388 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
17389
17390          REPLACE_MBRTOWC=1
17391          ;;
17392     esac
17393     case "$gl_cv_func_mbrtowc_nul_retval" in
17394       *yes) ;;
17395       *)
17396 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
17397
17398          REPLACE_MBRTOWC=1
17399          ;;
17400     esac
17401   fi
17402   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
17403
17404     :
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
17415
17416
17417   :
17418
17419   fi
17420
17421
17422
17423   GNULIB_MBRTOWC=1
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
17436
17437
17438
17439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
17440 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
17441 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
17442   $as_echo_n "(cached) " >&6
17443 else
17444
17445                   case "$host_os" in
17446               # Guess no on AIX and OSF/1.
17447         osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
17448               # Guess yes otherwise.
17449         *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
17450       esac
17451       if test $LOCALE_JA != none; then
17452         if test "$cross_compiling" = yes; then :
17453   :
17454 else
17455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17456 /* end confdefs.h.  */
17457
17458 #include <locale.h>
17459 #include <string.h>
17460 #include <wchar.h>
17461 int main ()
17462 {
17463   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
17464     {
17465       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
17466       mbstate_t state;
17467       wchar_t wc;
17468
17469       memset (&state, '\0', sizeof (mbstate_t));
17470       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
17471         if (mbsinit (&state))
17472           return 1;
17473     }
17474   return 0;
17475 }
17476 _ACEOF
17477 if ac_fn_c_try_run "$LINENO"; then :
17478   gl_cv_func_mbrtowc_incomplete_state=yes
17479 else
17480   gl_cv_func_mbrtowc_incomplete_state=no
17481 fi
17482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17483   conftest.$ac_objext conftest.beam conftest.$ac_ext
17484 fi
17485
17486       fi
17487
17488 fi
17489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
17490 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
17491
17492
17493
17494
17495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
17496 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
17497 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
17498   $as_echo_n "(cached) " >&6
17499 else
17500
17501                   case "$host_os" in
17502                     # Guess no on Solaris 8.
17503         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
17504                     # Guess yes otherwise.
17505         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
17506       esac
17507       if test $LOCALE_ZH_CN != none; then
17508         if test "$cross_compiling" = yes; then :
17509   :
17510 else
17511   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512 /* end confdefs.h.  */
17513
17514 #include <locale.h>
17515 #include <stdlib.h>
17516 #include <string.h>
17517 #include <wchar.h>
17518 int main ()
17519 {
17520   /* This fails on Solaris 8:
17521      mbrtowc returns 2, and sets wc to 0x00F0.
17522      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
17523   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
17524     {
17525       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
17526       mbstate_t state;
17527       wchar_t wc;
17528
17529       memset (&state, '\0', sizeof (mbstate_t));
17530       if (mbrtowc (&wc, input + 3, 6, &state) != 4
17531           && mbtowc (&wc, input + 3, 6) == 4)
17532         return 1;
17533     }
17534   return 0;
17535 }
17536 _ACEOF
17537 if ac_fn_c_try_run "$LINENO"; then :
17538   gl_cv_func_mbrtowc_sanitycheck=yes
17539 else
17540   gl_cv_func_mbrtowc_sanitycheck=no
17541 fi
17542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17543   conftest.$ac_objext conftest.beam conftest.$ac_ext
17544 fi
17545
17546       fi
17547
17548 fi
17549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
17550 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
17551
17552     REPLACE_MBSTATE_T=0
17553     case "$gl_cv_func_mbrtowc_incomplete_state" in
17554       *yes) ;;
17555       *) REPLACE_MBSTATE_T=1 ;;
17556     esac
17557     case "$gl_cv_func_mbrtowc_sanitycheck" in
17558       *yes) ;;
17559       *) REPLACE_MBSTATE_T=1 ;;
17560     esac
17561   else
17562     REPLACE_MBSTATE_T=1
17563   fi
17564   if test $REPLACE_MBSTATE_T = 1; then
17565
17566     :
17567
17568   fi
17569
17570   if test $REPLACE_MBSTATE_T = 1; then
17571     REPLACE_MBSINIT=1
17572   fi
17573
17574   if test $ac_cv_func_mbsinit = no; then
17575     HAVE_MBSINIT=0
17576   fi
17577   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
17578
17579     :
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
17590
17591
17592   :
17593
17594   fi
17595
17596
17597
17598   GNULIB_MBSINIT=1
17599
17600
17601
17602
17603   GNULIB_MEMCHR=1
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619   for ac_func in mempcpy
17620 do :
17621   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
17622 if test "x$ac_cv_func_mempcpy" = x""yes; then :
17623   cat >>confdefs.h <<_ACEOF
17624 #define HAVE_MEMPCPY 1
17625 _ACEOF
17626
17627 else
17628
17629     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
17630
17631 fi
17632 done
17633
17634
17635   if test $ac_cv_func_mempcpy = no; then
17636     HAVE_MEMPCPY=0
17637
17638   :
17639
17640   fi
17641
17642
17643
17644   GNULIB_MEMPCPY=1
17645
17646
17647
17648
17649
17650
17651   if test $ac_cv_have_decl_memrchr = no; then
17652     HAVE_DECL_MEMRCHR=0
17653   fi
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663   for ac_func in memrchr
17664 do :
17665   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
17666 if test "x$ac_cv_func_memrchr" = x""yes; then :
17667   cat >>confdefs.h <<_ACEOF
17668 #define HAVE_MEMRCHR 1
17669 _ACEOF
17670
17671 else
17672
17673     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
17674
17675 fi
17676 done
17677
17678
17679   if test $ac_cv_func_memrchr = no; then
17680     :
17681   fi
17682
17683
17684
17685   GNULIB_MEMRCHR=1
17686
17687
17688
17689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
17690 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
17691 if test "${gl_cv_func_mkdir_trailing_slash_works+set}" = set; then :
17692   $as_echo_n "(cached) " >&6
17693 else
17694   rm -rf conftest.dir
17695       if test "$cross_compiling" = yes; then :
17696   gl_cv_func_mkdir_trailing_slash_works="guessing no"
17697 else
17698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17699 /* end confdefs.h.  */
17700
17701 #       include <sys/types.h>
17702 #       include <sys/stat.h>
17703
17704 int
17705 main ()
17706 {
17707 return mkdir ("conftest.dir/", 0700);
17708   ;
17709   return 0;
17710 }
17711 _ACEOF
17712 if ac_fn_c_try_run "$LINENO"; then :
17713   gl_cv_func_mkdir_trailing_slash_works=yes
17714 else
17715   gl_cv_func_mkdir_trailing_slash_works=no
17716 fi
17717 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17718   conftest.$ac_objext conftest.beam conftest.$ac_ext
17719 fi
17720
17721     rm -rf conftest.dir
17722
17723
17724 fi
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
17726 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
17727   if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
17728     REPLACE_MKDIR=1
17729
17730
17731
17732
17733
17734
17735
17736
17737   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
17738
17739   fi
17740
17741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
17742 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
17743 if test "${gl_cv_func_mkdir_trailing_dot_works+set}" = set; then :
17744   $as_echo_n "(cached) " >&6
17745 else
17746   rm -rf conftest.dir
17747       if test "$cross_compiling" = yes; then :
17748   gl_cv_func_mkdir_trailing_dot_works="guessing no"
17749 else
17750   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17751 /* end confdefs.h.  */
17752
17753 #       include <sys/types.h>
17754 #       include <sys/stat.h>
17755
17756 int
17757 main ()
17758 {
17759 return !mkdir ("conftest.dir/./", 0700);
17760   ;
17761   return 0;
17762 }
17763 _ACEOF
17764 if ac_fn_c_try_run "$LINENO"; then :
17765   gl_cv_func_mkdir_trailing_dot_works=yes
17766 else
17767   gl_cv_func_mkdir_trailing_dot_works=no
17768 fi
17769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17770   conftest.$ac_objext conftest.beam conftest.$ac_ext
17771 fi
17772
17773     rm -rf conftest.dir
17774
17775
17776 fi
17777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
17778 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
17779   if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
17780     REPLACE_MKDIR=1
17781
17782
17783
17784
17785
17786
17787
17788
17789   gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
17790
17791
17792 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
17793
17794   fi
17795
17796
17797
17798
17799   case "$host_os" in
17800     mingw* | pw*)
17801
17802
17803   REPLACE_OPEN=1
17804
17805
17806
17807
17808
17809
17810
17811
17812   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
17813
17814
17815
17816
17817   :
17818
17819
17820       ;;
17821     *)
17822
17823       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
17824 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
17825 if test "${gl_cv_func_open_slash+set}" = set; then :
17826   $as_echo_n "(cached) " >&6
17827 else
17828   # Assume that if we have lstat, we can also check symlinks.
17829           if test $ac_cv_func_lstat = yes; then
17830             touch conftest.tmp
17831             ln -s conftest.tmp conftest.lnk
17832           fi
17833           if test "$cross_compiling" = yes; then :
17834
17835              case "$host_os" in
17836                freebsd*)        gl_cv_func_open_slash="guessing no" ;;
17837                solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
17838                hpux*)           gl_cv_func_open_slash="guessing no" ;;
17839                *)               gl_cv_func_open_slash="guessing yes" ;;
17840              esac
17841
17842 else
17843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17844 /* end confdefs.h.  */
17845
17846 #include <fcntl.h>
17847 #if HAVE_UNISTD_H
17848 # include <unistd.h>
17849 #endif
17850 int main ()
17851 {
17852 #if HAVE_LSTAT
17853   if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
17854 #endif
17855   return open ("conftest.sl/", O_CREAT, 0600) >= 0;
17856 }
17857 _ACEOF
17858 if ac_fn_c_try_run "$LINENO"; then :
17859   gl_cv_func_open_slash=yes
17860 else
17861   gl_cv_func_open_slash=no
17862 fi
17863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17864   conftest.$ac_objext conftest.beam conftest.$ac_ext
17865 fi
17866
17867           rm -f conftest.sl conftest.tmp conftest.lnk
17868
17869 fi
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
17871 $as_echo "$gl_cv_func_open_slash" >&6; }
17872       case "$gl_cv_func_open_slash" in
17873         *no)
17874
17875 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
17876
17877
17878
17879   REPLACE_OPEN=1
17880
17881
17882
17883
17884
17885
17886
17887
17888   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
17889
17890
17891
17892
17893   :
17894
17895
17896           ;;
17897       esac
17898       ;;
17899   esac
17900
17901
17902
17903 $as_echo "#define GNULIB_OPEN 1" >>confdefs.h
17904
17905
17906
17907
17908   GNULIB_OPEN=1
17909
17910
17911
17912   GNULIB_OPENAT=1
17913
17914
17915   GNULIB_FCHMODAT=1
17916   GNULIB_FSTATAT=1
17917   GNULIB_MKDIRAT=1
17918
17919
17920   GNULIB_FCHOWNAT=1
17921   GNULIB_UNLINKAT=1
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971   for ac_func in fchmodat fstatat mkdirat openat unlinkat
17972 do :
17973   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17974 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17975 eval as_val=\$$as_ac_var
17976    if test "x$as_val" = x""yes; then :
17977   cat >>confdefs.h <<_ACEOF
17978 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17979 _ACEOF
17980
17981 else
17982
17983     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
17984
17985 fi
17986 done
17987
17988
17989
17990
17991   case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
17992   yes+yes)
17993     # GNU/Hurd has unlinkat, but it has the same bug as unlink.
17994     if test $REPLACE_UNLINK = 1; then
17995
17996
17997
17998
17999
18000
18001
18002
18003   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
18004
18005       REPLACE_UNLINKAT=1
18006     fi ;;
18007   yes+*)
18008     # Solaris 9 has *at functions, but uniformly mishandles trailing
18009     # slash in all of them.
18010
18011
18012
18013
18014
18015
18016
18017
18018   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
18019
18020     REPLACE_OPENAT=1
18021
18022
18023
18024
18025
18026
18027
18028
18029   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
18030
18031     REPLACE_FSTATAT=1
18032
18033
18034
18035
18036
18037
18038
18039
18040   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
18041
18042     REPLACE_UNLINKAT=1
18043     ;;
18044   *)
18045     HAVE_OPENAT=0
18046     HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
18047     HAVE_FSTATAT=0 # No known system with fstatat but not openat
18048
18049
18050
18051   :
18052 ;;
18053   esac
18054   if test $ac_cv_func_fchmodat != yes; then
18055     HAVE_FCHMODAT=0
18056   fi
18057   if test $ac_cv_func_mkdirat != yes; then
18058     HAVE_MKDIRAT=0
18059   fi
18060
18061
18062   ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18063 if test "x$ac_cv_func_fchownat" = x""yes; then :
18064
18065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18066 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18067 if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
18068   $as_echo_n "(cached) " >&6
18069 else
18070
18071      gl_dangle=conftest.dangle
18072      # Remove any remnants of a previous test.
18073      rm -f $gl_dangle
18074      # Arrange for deletion of the temporary file this test creates.
18075      ac_clean_files="$ac_clean_files $gl_dangle"
18076      ln -s conftest.no-such $gl_dangle
18077      if test "$cross_compiling" = yes; then :
18078   gl_cv_func_fchownat_nofollow_works=no
18079 else
18080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081 /* end confdefs.h.  */
18082
18083 #include <fcntl.h>
18084 #include <unistd.h>
18085 #include <stdlib.h>
18086 #include <errno.h>
18087 #include <sys/types.h>
18088 int
18089 main ()
18090 {
18091   return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18092                     AT_SYMLINK_NOFOLLOW) != 0
18093           && errno == ENOENT);
18094 }
18095
18096 _ACEOF
18097 if ac_fn_c_try_run "$LINENO"; then :
18098   gl_cv_func_fchownat_nofollow_works=yes
18099 else
18100   gl_cv_func_fchownat_nofollow_works=no
18101 fi
18102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18103   conftest.$ac_objext conftest.beam conftest.$ac_ext
18104 fi
18105
18106
18107 fi
18108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18109 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18110   if test $gl_cv_func_fchownat_nofollow_works = no; then :
18111   REPLACE_FCHOWNAT=1
18112
18113 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18114
18115 fi
18116
18117 else
18118   HAVE_FCHOWNAT=0
18119 fi
18120
18121   if test $REPLACE_CHOWN = 1; then
18122     REPLACE_FCHOWNAT=1
18123   fi
18124   if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18125
18126
18127
18128
18129
18130
18131
18132
18133   gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18134
18135   fi
18136
18137
18138
18139
18140
18141   if test -n "$ERRNO_H"; then
18142             REPLACE_PERROR=1
18143
18144
18145
18146
18147
18148
18149
18150
18151   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
18152
18153   fi
18154
18155
18156
18157   GNULIB_PERROR=1
18158
18159
18160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp can be used without linking with libm" >&5
18161 $as_echo_n "checking whether frexp can be used without linking with libm... " >&6; }
18162 if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
18163   $as_echo_n "(cached) " >&6
18164 else
18165
18166       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18167 /* end confdefs.h.  */
18168 #include <math.h>
18169                    double x;
18170                    int y;
18171 int
18172 main ()
18173 {
18174 return frexp (x, &y) < 1;
18175   ;
18176   return 0;
18177 }
18178 _ACEOF
18179 if ac_fn_c_try_link "$LINENO"; then :
18180   gl_cv_func_frexp_no_libm=yes
18181 else
18182   gl_cv_func_frexp_no_libm=no
18183 fi
18184 rm -f core conftest.err conftest.$ac_objext \
18185     conftest$ac_exeext conftest.$ac_ext
18186
18187 fi
18188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
18189 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
18190   if test $gl_cv_func_frexp_no_libm = yes; then
18191
18192
18193      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18194 $as_echo_n "checking whether frexp works... " >&6; }
18195 if test "${gl_cv_func_frexp_works+set}" = set; then :
18196   $as_echo_n "(cached) " >&6
18197 else
18198
18199       if test "$cross_compiling" = yes; then :
18200   case "$host_os" in
18201          netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18202          *)                        gl_cv_func_frexp_works="guessing yes";;
18203        esac
18204
18205 else
18206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18207 /* end confdefs.h.  */
18208
18209 #include <float.h>
18210 #include <math.h>
18211 #include <string.h>
18212 int main()
18213 {
18214   int i;
18215   volatile double x;
18216 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18217    So we use -zero instead.  */
18218   double zero = 0.0;
18219   /* Test on denormalized numbers.  */
18220   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18221     ;
18222   if (x > 0.0)
18223     {
18224       int exp;
18225       double y = frexp (x, &exp);
18226       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18227          On NetBSD: y = 0.75. Correct: y = 0.5.  */
18228       if (y != 0.5)
18229         return 1;
18230     }
18231   /* Test on infinite numbers.  */
18232   x = 1.0 / 0.0;
18233   {
18234     int exp;
18235     double y = frexp (x, &exp);
18236     if (y != x)
18237       return 1;
18238   }
18239   /* Test on negative zero.  */
18240   x = -zero;
18241   {
18242     int exp;
18243     double y = frexp (x, &exp);
18244     if (memcmp (&y, &x, sizeof x))
18245       return 1;
18246   }
18247   return 0;
18248 }
18249 _ACEOF
18250 if ac_fn_c_try_run "$LINENO"; then :
18251   gl_cv_func_frexp_works=yes
18252 else
18253   gl_cv_func_frexp_works=no
18254 fi
18255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18256   conftest.$ac_objext conftest.beam conftest.$ac_ext
18257 fi
18258
18259
18260 fi
18261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18262 $as_echo "$gl_cv_func_frexp_works" >&6; }
18263
18264     case "$gl_cv_func_frexp_works" in
18265       *yes)
18266
18267 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
18268
18269         ;;
18270     esac
18271   fi
18272
18273   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
18274 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
18275 if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
18276   $as_echo_n "(cached) " >&6
18277 else
18278
18279       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18280 /* end confdefs.h.  */
18281 #include <math.h>
18282                    double x;
18283                    int y;
18284 int
18285 main ()
18286 {
18287 return ldexp (x, y) < 1;
18288   ;
18289   return 0;
18290 }
18291 _ACEOF
18292 if ac_fn_c_try_link "$LINENO"; then :
18293   gl_cv_func_ldexp_no_libm=yes
18294 else
18295   gl_cv_func_ldexp_no_libm=no
18296 fi
18297 rm -f core conftest.err conftest.$ac_objext \
18298     conftest$ac_exeext conftest.$ac_ext
18299
18300 fi
18301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
18302 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
18303   if test $gl_cv_func_ldexp_no_libm = yes; then
18304
18305 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
18306
18307   fi
18308
18309
18310
18311     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl can be used without linking with libm" >&5
18312 $as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; }
18313 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
18314   $as_echo_n "(cached) " >&6
18315 else
18316
18317       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318 /* end confdefs.h.  */
18319 #include <math.h>
18320                    long double x;
18321                    int y;
18322 int
18323 main ()
18324 {
18325 return frexpl (x, &y) < 1;
18326   ;
18327   return 0;
18328 }
18329 _ACEOF
18330 if ac_fn_c_try_link "$LINENO"; then :
18331   gl_cv_func_frexpl_no_libm=yes
18332 else
18333   gl_cv_func_frexpl_no_libm=no
18334 fi
18335 rm -f core conftest.err conftest.$ac_objext \
18336     conftest$ac_exeext conftest.$ac_ext
18337
18338 fi
18339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18340 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18341   if test $gl_cv_func_frexpl_no_libm = yes; then
18342
18343
18344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
18345 $as_echo_n "checking whether frexpl works... " >&6; }
18346 if test "${gl_cv_func_frexpl_works+set}" = set; then :
18347   $as_echo_n "(cached) " >&6
18348 else
18349
18350       if test "$cross_compiling" = yes; then :
18351   case "$host_os" in
18352          aix* | beos* | darwin* | irix* | mingw* | pw*)
18353             gl_cv_func_frexpl_works="guessing no";;
18354          *) gl_cv_func_frexpl_works="guessing yes";;
18355        esac
18356
18357 else
18358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18359 /* end confdefs.h.  */
18360
18361 #include <float.h>
18362 #include <math.h>
18363 /* Override the values of <float.h>, like done in float.in.h.  */
18364 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
18365 # undef LDBL_MIN_EXP
18366 # define LDBL_MIN_EXP    (-16381)
18367 #endif
18368 extern long double frexpl (long double, int *);
18369 int main()
18370 {
18371   volatile long double x;
18372   /* Test on finite numbers that fails on AIX 5.1.  */
18373   x = 16.0L;
18374   {
18375     int exp = -9999;
18376     frexpl (x, &exp);
18377     if (exp != 5)
18378       return 1;
18379   }
18380   /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
18381      function returns an invalid (incorrectly normalized) value: it returns
18382                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
18383      but the correct result is
18384           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
18385   x = 1.01L;
18386   {
18387     int exp = -9999;
18388     long double y = frexpl (x, &exp);
18389     if (!(exp == 1 && y == 0.505L))
18390       return 1;
18391   }
18392   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
18393      LDBL_MAX_EXP = 16384.
18394      In the loop end test, we test x against Infinity, rather than comparing
18395      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
18396   {
18397     int i;
18398     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
18399       {
18400         int exp = -9999;
18401         frexpl (x, &exp);
18402         if (exp != i)
18403           return 1;
18404       }
18405   }
18406   /* Test on denormalized numbers.  */
18407   {
18408     int i;
18409     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
18410       ;
18411     if (x > 0.0L)
18412       {
18413         int exp;
18414         long double y = frexpl (x, &exp);
18415         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
18416            exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
18417         if (exp != LDBL_MIN_EXP - 1)
18418           return 1;
18419       }
18420   }
18421   /* Test on infinite numbers.  */
18422   x = 1.0L / 0.0L;
18423   {
18424     int exp;
18425     long double y = frexpl (x, &exp);
18426     if (y != x)
18427       return 1;
18428   }
18429   return 0;
18430 }
18431 _ACEOF
18432 if ac_fn_c_try_run "$LINENO"; then :
18433   gl_cv_func_frexpl_works=yes
18434 else
18435   gl_cv_func_frexpl_works=no
18436 fi
18437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18438   conftest.$ac_objext conftest.beam conftest.$ac_ext
18439 fi
18440
18441
18442 fi
18443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
18444 $as_echo "$gl_cv_func_frexpl_works" >&6; }
18445
18446     case "$gl_cv_func_frexpl_works" in
18447       *yes) gl_func_frexpl_no_libm=yes ;;
18448       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
18449     esac
18450   else
18451     gl_func_frexpl_no_libm=no
18452         REPLACE_FREXPL=1
18453   fi
18454   if test $gl_func_frexpl_no_libm = yes; then
18455
18456 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
18457
18458             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18459 "
18460 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
18461
18462 else
18463   HAVE_DECL_FREXPL=0
18464 fi
18465
18466   fi
18467
18468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl can be used without linking with libm" >&5
18469 $as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; }
18470 if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
18471   $as_echo_n "(cached) " >&6
18472 else
18473
18474       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18475 /* end confdefs.h.  */
18476 #include <math.h>
18477                    long double x;
18478                    int y;
18479 int
18480 main ()
18481 {
18482 return ldexpl (x, y) < 1;
18483   ;
18484   return 0;
18485 }
18486 _ACEOF
18487 if ac_fn_c_try_link "$LINENO"; then :
18488   gl_cv_func_ldexpl_no_libm=yes
18489 else
18490   gl_cv_func_ldexpl_no_libm=no
18491 fi
18492 rm -f core conftest.err conftest.$ac_objext \
18493     conftest$ac_exeext conftest.$ac_ext
18494
18495 fi
18496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
18497 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
18498   if test $gl_cv_func_ldexpl_no_libm = yes; then
18499
18500
18501      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
18502 $as_echo_n "checking whether ldexpl works... " >&6; }
18503 if test "${gl_cv_func_ldexpl_works+set}" = set; then :
18504   $as_echo_n "(cached) " >&6
18505 else
18506
18507       if test "$cross_compiling" = yes; then :
18508   case "$host_os" in
18509          aix*) gl_cv_func_ldexpl_works="guessing no";;
18510          *)    gl_cv_func_ldexpl_works="guessing yes";;
18511        esac
18512
18513 else
18514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18515 /* end confdefs.h.  */
18516
18517 #include <math.h>
18518 extern long double ldexpl (long double, int);
18519 int main()
18520 {
18521   volatile long double x1 = 1.0;
18522   volatile long double y1 = ldexpl (x1, -1);
18523   volatile long double x2 = 1.73205L;
18524   volatile long double y2 = ldexpl (x2, 0);
18525   return (y1 != 0.5L) || (y2 != x2);
18526 }
18527 _ACEOF
18528 if ac_fn_c_try_run "$LINENO"; then :
18529   gl_cv_func_ldexpl_works=yes
18530 else
18531   gl_cv_func_ldexpl_works=no
18532 fi
18533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18534   conftest.$ac_objext conftest.beam conftest.$ac_ext
18535 fi
18536
18537
18538 fi
18539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
18540 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
18541
18542     case "$gl_cv_func_ldexpl_works" in
18543       *yes)
18544
18545 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
18546
18547                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
18548 "
18549 if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
18550
18551 else
18552   HAVE_DECL_LDEXPL=0
18553 fi
18554
18555         ;;
18556     esac
18557   fi
18558
18559
18560
18561   if test $gl_cv_func_vfprintf_posix = no; then
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572   gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
18573
18574   REPLACE_PRINTF=1
18575
18576 $as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
18577
18578   :
18579
18580   fi
18581
18582
18583
18584   GNULIB_PRINTF_POSIX=1
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596   gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext"
18597
18598
18599   for ac_header in stdlib.h
18600 do :
18601   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
18602 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
18603   cat >>confdefs.h <<_ACEOF
18604 #define HAVE_STDLIB_H 1
18605 _ACEOF
18606
18607 fi
18608
18609 done
18610
18611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
18612 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
18613 if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
18614   $as_echo_n "(cached) " >&6
18615 else
18616   if test "$cross_compiling" = yes; then :
18617   ac_cv_func_realloc_0_nonnull=no
18618 else
18619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18620 /* end confdefs.h.  */
18621 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
18622 # include <stdlib.h>
18623 #else
18624 char *realloc ();
18625 #endif
18626
18627 int
18628 main ()
18629 {
18630 return ! realloc (0, 0);
18631   ;
18632   return 0;
18633 }
18634 _ACEOF
18635 if ac_fn_c_try_run "$LINENO"; then :
18636   ac_cv_func_realloc_0_nonnull=yes
18637 else
18638   ac_cv_func_realloc_0_nonnull=no
18639 fi
18640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18641   conftest.$ac_objext conftest.beam conftest.$ac_ext
18642 fi
18643
18644 fi
18645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
18646 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
18647 if test $ac_cv_func_realloc_0_nonnull = yes; then :
18648
18649 $as_echo "#define HAVE_REALLOC 1" >>confdefs.h
18650
18651 else
18652   $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
18663
18664
18665 $as_echo "#define realloc rpl_realloc" >>confdefs.h
18666
18667 fi
18668
18669
18670
18671 $as_echo "#define GNULIB_REALLOC_GNU 1" >>confdefs.h
18672
18673
18674
18675   if test $gl_cv_func_malloc_posix = yes; then
18676     HAVE_REALLOC_POSIX=1
18677
18678 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
18679
18680   else
18681
18682
18683
18684
18685
18686
18687
18688
18689   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
18690
18691     HAVE_REALLOC_POSIX=0
18692   fi
18693
18694
18695
18696
18697   GNULIB_REALLOC_POSIX=1
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710   for ac_func in rmdir
18711 do :
18712   ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
18713 if test "x$ac_cv_func_rmdir" = x""yes; then :
18714   cat >>confdefs.h <<_ACEOF
18715 #define HAVE_RMDIR 1
18716 _ACEOF
18717
18718 else
18719
18720     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
18721
18722 fi
18723 done
18724
18725
18726   if test $ac_cv_func_rmdir = no; then
18727     REPLACE_RMDIR=1
18728     # If someone lacks rmdir, make configure fail, and request
18729     # a bug report to inform us about it.
18730     if test x"$SKIP_RMDIR_CHECK" != xyes; then
18731       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18732 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18733 as_fn_error "Your system lacks the rmdir function.
18734               Please report this, along with the output of \"uname -a\", to the
18735               bug-coreutils@gnu.org mailing list.  To continue past this point,
18736               rerun configure with SKIP_RMDIR_CHECK=yes.
18737               E.g., ./configure SKIP_RMDIR_CHECK=yes
18738 See \`config.log' for more details." "$LINENO" 5; }
18739     fi
18740   else
18741         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
18742 $as_echo_n "checking whether rmdir works... " >&6; }
18743 if test "${gl_cv_func_rmdir_works+set}" = set; then :
18744   $as_echo_n "(cached) " >&6
18745 else
18746   mkdir conftest.dir
18747        touch conftest.file
18748        if test "$cross_compiling" = yes; then :
18749   gl_cv_func_rmdir_works="guessing no"
18750 else
18751   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752 /* end confdefs.h.  */
18753 #include <stdio.h>
18754              #include <errno.h>
18755              #include <unistd.h>
18756
18757 int
18758 main ()
18759 {
18760 return !rmdir ("conftest.file/") || errno != ENOTDIR
18761        || !rmdir ("conftest.dir/./");
18762   ;
18763   return 0;
18764 }
18765 _ACEOF
18766 if ac_fn_c_try_run "$LINENO"; then :
18767   gl_cv_func_rmdir_works=yes
18768 else
18769   gl_cv_func_rmdir_works=no
18770 fi
18771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18772   conftest.$ac_objext conftest.beam conftest.$ac_ext
18773 fi
18774
18775        rm -rf conftest.dir conftest.file
18776 fi
18777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
18778 $as_echo "$gl_cv_func_rmdir_works" >&6; }
18779     if test x"$gl_cv_func_rmdir_works" != xyes; then
18780       REPLACE_RMDIR=1
18781
18782
18783
18784
18785
18786
18787
18788
18789   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
18790
18791     fi
18792   fi
18793
18794
18795
18796   GNULIB_RMDIR=1
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807   gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext"
18808
18809
18810
18811
18812
18813   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
18814 $as_echo_n "checking for signbit macro... " >&6; }
18815 if test "${gl_cv_func_signbit+set}" = set; then :
18816   $as_echo_n "(cached) " >&6
18817 else
18818
18819       if test "$cross_compiling" = yes; then :
18820   gl_cv_func_signbit="guessing no"
18821 else
18822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18823 /* end confdefs.h.  */
18824
18825 #include <math.h>
18826 /* If signbit is defined as a function, don't use it, since calling it for
18827    'float' or 'long double' arguments would involve conversions.
18828    If signbit is not declared at all but exists as a library function, don't
18829    use it, since the prototype may not match.
18830    If signbit is not declared at all but exists as a compiler built-in, don't
18831    use it, since it's preferable to use __builtin_signbit* (no warnings,
18832    no conversions).  */
18833 #ifndef signbit
18834 # error "signbit should be a macro"
18835 #endif
18836 #include <string.h>
18837
18838 /* Global variables.
18839    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
18840    but cannot constant-fold            __builtin_signbitl (variable).  */
18841 float vf;
18842 double vd;
18843 long double vl;
18844 int main ()
18845 {
18846 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18847    So we use -p0f and -p0d instead.  */
18848 float p0f = 0.0f;
18849 float m0f = -p0f;
18850 double p0d = 0.0;
18851 double m0d = -p0d;
18852 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
18853    So we use another constant expression instead.
18854    But that expression does not work on other platforms, such as when
18855    cross-compiling to PowerPC on MacOS X 10.5.  */
18856 long double p0l = 0.0L;
18857 #if defined __hpux || defined __sgi
18858 long double m0l = -LDBL_MIN * LDBL_MIN;
18859 #else
18860 long double m0l = -p0l;
18861 #endif
18862   if (signbit (vf))
18863     vf++;
18864   {
18865     float plus_inf = 1.0f / p0f;
18866     float minus_inf = -1.0f / p0f;
18867     if (!(!signbit (255.0f)
18868           && signbit (-255.0f)
18869           && !signbit (p0f)
18870           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
18871           && !signbit (plus_inf)
18872           && signbit (minus_inf)))
18873       return 1;
18874   }
18875   if (signbit (vd))
18876     vd++;
18877   {
18878     double plus_inf = 1.0 / p0d;
18879     double minus_inf = -1.0 / p0d;
18880     if (!(!signbit (255.0)
18881           && signbit (-255.0)
18882           && !signbit (p0d)
18883           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
18884           && !signbit (plus_inf)
18885           && signbit (minus_inf)))
18886       return 1;
18887   }
18888   if (signbit (vl))
18889     vl++;
18890   {
18891     long double plus_inf = 1.0L / p0l;
18892     long double minus_inf = -1.0L / p0l;
18893     if (!(!signbit (255.0L)
18894           && signbit (-255.0L)
18895           && !signbit (p0l)
18896           && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
18897           && !signbit (plus_inf)
18898           && signbit (minus_inf)))
18899       return 1;
18900   }
18901   return 0;
18902 }
18903
18904
18905 _ACEOF
18906 if ac_fn_c_try_run "$LINENO"; then :
18907   gl_cv_func_signbit=yes
18908 else
18909   gl_cv_func_signbit=no
18910 fi
18911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18912   conftest.$ac_objext conftest.beam conftest.$ac_ext
18913 fi
18914
18915
18916 fi
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
18918 $as_echo "$gl_cv_func_signbit" >&6; }
18919           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
18920 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
18921 if test "${gl_cv_func_signbit_gcc+set}" = set; then :
18922   $as_echo_n "(cached) " >&6
18923 else
18924
18925       if test "$cross_compiling" = yes; then :
18926   gl_cv_func_signbit_gcc="guessing no"
18927 else
18928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18929 /* end confdefs.h.  */
18930
18931 #if __GNUC__ >= 4
18932 # define signbit(x) \
18933    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
18934     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
18935     __builtin_signbitf (x))
18936 #else
18937 # error "signbit should be three compiler built-ins"
18938 #endif
18939 #include <string.h>
18940
18941 /* Global variables.
18942    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
18943    but cannot constant-fold            __builtin_signbitl (variable).  */
18944 float vf;
18945 double vd;
18946 long double vl;
18947 int main ()
18948 {
18949 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18950    So we use -p0f and -p0d instead.  */
18951 float p0f = 0.0f;
18952 float m0f = -p0f;
18953 double p0d = 0.0;
18954 double m0d = -p0d;
18955 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
18956    So we use another constant expression instead.
18957    But that expression does not work on other platforms, such as when
18958    cross-compiling to PowerPC on MacOS X 10.5.  */
18959 long double p0l = 0.0L;
18960 #if defined __hpux || defined __sgi
18961 long double m0l = -LDBL_MIN * LDBL_MIN;
18962 #else
18963 long double m0l = -p0l;
18964 #endif
18965   if (signbit (vf))
18966     vf++;
18967   {
18968     float plus_inf = 1.0f / p0f;
18969     float minus_inf = -1.0f / p0f;
18970     if (!(!signbit (255.0f)
18971           && signbit (-255.0f)
18972           && !signbit (p0f)
18973           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
18974           && !signbit (plus_inf)
18975           && signbit (minus_inf)))
18976       return 1;
18977   }
18978   if (signbit (vd))
18979     vd++;
18980   {
18981     double plus_inf = 1.0 / p0d;
18982     double minus_inf = -1.0 / p0d;
18983     if (!(!signbit (255.0)
18984           && signbit (-255.0)
18985           && !signbit (p0d)
18986           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
18987           && !signbit (plus_inf)
18988           && signbit (minus_inf)))
18989       return 1;
18990   }
18991   if (signbit (vl))
18992     vl++;
18993   {
18994     long double plus_inf = 1.0L / p0l;
18995     long double minus_inf = -1.0L / p0l;
18996     if (!(!signbit (255.0L)
18997           && signbit (-255.0L)
18998           && !signbit (p0l)
18999           && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
19000           && !signbit (plus_inf)
19001           && signbit (minus_inf)))
19002       return 1;
19003   }
19004   return 0;
19005 }
19006
19007
19008 _ACEOF
19009 if ac_fn_c_try_run "$LINENO"; then :
19010   gl_cv_func_signbit_gcc=yes
19011 else
19012   gl_cv_func_signbit_gcc=no
19013 fi
19014 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19015   conftest.$ac_objext conftest.beam conftest.$ac_ext
19016 fi
19017
19018
19019 fi
19020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
19021 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
19022       if test "$gl_cv_func_signbit_gcc" = yes; then
19023     REPLACE_SIGNBIT_USING_GCC=1
19024   else
19025     if test "$gl_cv_func_signbit" != yes; then
19026       REPLACE_SIGNBIT=1
19027
19028
19029
19030
19031
19032
19033
19034
19035   gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045   gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055   gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
19056
19057
19058
19059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
19060 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
19061 if test "${gl_cv_cc_float_signbit+set}" = set; then :
19062   $as_echo_n "(cached) " >&6
19063 else
19064
19065       if test "$cross_compiling" = yes; then :
19066
19067                               gl_cv_cc_float_signbit="unknown"
19068
19069 else
19070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19071 /* end confdefs.h.  */
19072
19073 #include <stddef.h>
19074 #include <stdio.h>
19075 #define NWORDS \
19076   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19077 typedef union { float value; unsigned int word[NWORDS]; }
19078         memory_float;
19079 static memory_float plus = { 1.0f };
19080 static memory_float minus = { -1.0f };
19081 int main ()
19082 {
19083   size_t j, k, i;
19084   unsigned int m;
19085   FILE *fp = fopen ("conftest.out", "w");
19086   if (fp == NULL)
19087     return 1;
19088   /* Find the different bit.  */
19089   k = 0; m = 0;
19090   for (j = 0; j < NWORDS; j++)
19091     {
19092       unsigned int x = plus.word[j] ^ minus.word[j];
19093       if ((x & (x - 1)) || (x && m))
19094         {
19095           /* More than one bit difference.  */
19096           fprintf (fp, "unknown");
19097           return 1;
19098         }
19099       if (x)
19100         {
19101           k = j;
19102           m = x;
19103         }
19104     }
19105   if (m == 0)
19106     {
19107       /* No difference.  */
19108       fprintf (fp, "unknown");
19109       return 1;
19110     }
19111   /* Now m = plus.word[k] ^ ~minus.word[k].  */
19112   if (plus.word[k] & ~minus.word[k])
19113     {
19114       /* Oh? The sign bit is set in the positive and cleared in the negative
19115          numbers?  */
19116       fprintf (fp, "unknown");
19117       return 1;
19118     }
19119   for (i = 0; ; i++)
19120     if ((m >> i) & 1)
19121       break;
19122   fprintf (fp, "word %d bit %d", (int) k, (int) i);
19123   return (fclose (fp) != 0);
19124 }
19125
19126 _ACEOF
19127 if ac_fn_c_try_run "$LINENO"; then :
19128   gl_cv_cc_float_signbit=`cat conftest.out`
19129 else
19130   gl_cv_cc_float_signbit="unknown"
19131 fi
19132 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19133   conftest.$ac_objext conftest.beam conftest.$ac_ext
19134 fi
19135
19136       rm -f conftest.out
19137
19138 fi
19139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
19140 $as_echo "$gl_cv_cc_float_signbit" >&6; }
19141   case "$gl_cv_cc_float_signbit" in
19142     word*bit*)
19143       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
19144       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
19145
19146 cat >>confdefs.h <<_ACEOF
19147 #define FLT_SIGNBIT_WORD $word
19148 _ACEOF
19149
19150
19151 cat >>confdefs.h <<_ACEOF
19152 #define FLT_SIGNBIT_BIT $bit
19153 _ACEOF
19154
19155       ;;
19156   esac
19157
19158
19159
19160
19161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
19162 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
19163 if test "${gl_cv_cc_double_signbit+set}" = set; then :
19164   $as_echo_n "(cached) " >&6
19165 else
19166
19167       if test "$cross_compiling" = yes; then :
19168
19169                               gl_cv_cc_double_signbit="unknown"
19170
19171 else
19172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19173 /* end confdefs.h.  */
19174
19175 #include <stddef.h>
19176 #include <stdio.h>
19177 #define NWORDS \
19178   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19179 typedef union { double value; unsigned int word[NWORDS]; }
19180         memory_float;
19181 static memory_float plus = { 1.0 };
19182 static memory_float minus = { -1.0 };
19183 int main ()
19184 {
19185   size_t j, k, i;
19186   unsigned int m;
19187   FILE *fp = fopen ("conftest.out", "w");
19188   if (fp == NULL)
19189     return 1;
19190   /* Find the different bit.  */
19191   k = 0; m = 0;
19192   for (j = 0; j < NWORDS; j++)
19193     {
19194       unsigned int x = plus.word[j] ^ minus.word[j];
19195       if ((x & (x - 1)) || (x && m))
19196         {
19197           /* More than one bit difference.  */
19198           fprintf (fp, "unknown");
19199           return 1;
19200         }
19201       if (x)
19202         {
19203           k = j;
19204           m = x;
19205         }
19206     }
19207   if (m == 0)
19208     {
19209       /* No difference.  */
19210       fprintf (fp, "unknown");
19211       return 1;
19212     }
19213   /* Now m = plus.word[k] ^ ~minus.word[k].  */
19214   if (plus.word[k] & ~minus.word[k])
19215     {
19216       /* Oh? The sign bit is set in the positive and cleared in the negative
19217          numbers?  */
19218       fprintf (fp, "unknown");
19219       return 1;
19220     }
19221   for (i = 0; ; i++)
19222     if ((m >> i) & 1)
19223       break;
19224   fprintf (fp, "word %d bit %d", (int) k, (int) i);
19225   return (fclose (fp) != 0);
19226 }
19227
19228 _ACEOF
19229 if ac_fn_c_try_run "$LINENO"; then :
19230   gl_cv_cc_double_signbit=`cat conftest.out`
19231 else
19232   gl_cv_cc_double_signbit="unknown"
19233 fi
19234 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19235   conftest.$ac_objext conftest.beam conftest.$ac_ext
19236 fi
19237
19238       rm -f conftest.out
19239
19240 fi
19241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
19242 $as_echo "$gl_cv_cc_double_signbit" >&6; }
19243   case "$gl_cv_cc_double_signbit" in
19244     word*bit*)
19245       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
19246       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
19247
19248 cat >>confdefs.h <<_ACEOF
19249 #define DBL_SIGNBIT_WORD $word
19250 _ACEOF
19251
19252
19253 cat >>confdefs.h <<_ACEOF
19254 #define DBL_SIGNBIT_BIT $bit
19255 _ACEOF
19256
19257       ;;
19258   esac
19259
19260
19261
19262
19263   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
19264 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
19265 if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
19266   $as_echo_n "(cached) " >&6
19267 else
19268
19269       if test "$cross_compiling" = yes; then :
19270
19271                               gl_cv_cc_long_double_signbit="unknown"
19272
19273 else
19274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19275 /* end confdefs.h.  */
19276
19277 #include <stddef.h>
19278 #include <stdio.h>
19279 #define NWORDS \
19280   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19281 typedef union { long double value; unsigned int word[NWORDS]; }
19282         memory_float;
19283 static memory_float plus = { 1.0L };
19284 static memory_float minus = { -1.0L };
19285 int main ()
19286 {
19287   size_t j, k, i;
19288   unsigned int m;
19289   FILE *fp = fopen ("conftest.out", "w");
19290   if (fp == NULL)
19291     return 1;
19292   /* Find the different bit.  */
19293   k = 0; m = 0;
19294   for (j = 0; j < NWORDS; j++)
19295     {
19296       unsigned int x = plus.word[j] ^ minus.word[j];
19297       if ((x & (x - 1)) || (x && m))
19298         {
19299           /* More than one bit difference.  */
19300           fprintf (fp, "unknown");
19301           return 1;
19302         }
19303       if (x)
19304         {
19305           k = j;
19306           m = x;
19307         }
19308     }
19309   if (m == 0)
19310     {
19311       /* No difference.  */
19312       fprintf (fp, "unknown");
19313       return 1;
19314     }
19315   /* Now m = plus.word[k] ^ ~minus.word[k].  */
19316   if (plus.word[k] & ~minus.word[k])
19317     {
19318       /* Oh? The sign bit is set in the positive and cleared in the negative
19319          numbers?  */
19320       fprintf (fp, "unknown");
19321       return 1;
19322     }
19323   for (i = 0; ; i++)
19324     if ((m >> i) & 1)
19325       break;
19326   fprintf (fp, "word %d bit %d", (int) k, (int) i);
19327   return (fclose (fp) != 0);
19328 }
19329
19330 _ACEOF
19331 if ac_fn_c_try_run "$LINENO"; then :
19332   gl_cv_cc_long_double_signbit=`cat conftest.out`
19333 else
19334   gl_cv_cc_long_double_signbit="unknown"
19335 fi
19336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19337   conftest.$ac_objext conftest.beam conftest.$ac_ext
19338 fi
19339
19340       rm -f conftest.out
19341
19342 fi
19343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
19344 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
19345   case "$gl_cv_cc_long_double_signbit" in
19346     word*bit*)
19347       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
19348       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
19349
19350 cat >>confdefs.h <<_ACEOF
19351 #define LDBL_SIGNBIT_WORD $word
19352 _ACEOF
19353
19354
19355 cat >>confdefs.h <<_ACEOF
19356 #define LDBL_SIGNBIT_BIT $bit
19357 _ACEOF
19358
19359       ;;
19360   esac
19361
19362
19363       if test "$gl_cv_cc_float_signbit" = unknown; then
19364                 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
19365 "
19366 if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
19367   ac_have_decl=1
19368 else
19369   ac_have_decl=0
19370 fi
19371
19372 cat >>confdefs.h <<_ACEOF
19373 #define HAVE_DECL_COPYSIGNF $ac_have_decl
19374 _ACEOF
19375
19376         if test "$ac_cv_have_decl_copysignf" = yes; then
19377                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
19378 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
19379 if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
19380   $as_echo_n "(cached) " >&6
19381 else
19382
19383               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19384 /* end confdefs.h.  */
19385 #include <math.h>
19386                            float x, y;
19387 int
19388 main ()
19389 {
19390 return copysignf (x, y) < 0;
19391   ;
19392   return 0;
19393 }
19394 _ACEOF
19395 if ac_fn_c_try_link "$LINENO"; then :
19396   gl_cv_func_copysignf_no_libm=yes
19397 else
19398   gl_cv_func_copysignf_no_libm=no
19399 fi
19400 rm -f core conftest.err conftest.$ac_objext \
19401     conftest$ac_exeext conftest.$ac_ext
19402
19403 fi
19404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
19405 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
19406           if test $gl_cv_func_copysignf_no_libm = yes; then
19407
19408 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
19409
19410           fi
19411         fi
19412       fi
19413       if test "$gl_cv_cc_double_signbit" = unknown; then
19414                 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
19415 "
19416 if test "x$ac_cv_have_decl_copysign" = x""yes; then :
19417   ac_have_decl=1
19418 else
19419   ac_have_decl=0
19420 fi
19421
19422 cat >>confdefs.h <<_ACEOF
19423 #define HAVE_DECL_COPYSIGN $ac_have_decl
19424 _ACEOF
19425
19426         if test "$ac_cv_have_decl_copysign" = yes; then
19427                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
19428 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
19429 if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
19430   $as_echo_n "(cached) " >&6
19431 else
19432
19433               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19434 /* end confdefs.h.  */
19435 #include <math.h>
19436                            double x, y;
19437 int
19438 main ()
19439 {
19440 return copysign (x, y) < 0;
19441   ;
19442   return 0;
19443 }
19444 _ACEOF
19445 if ac_fn_c_try_link "$LINENO"; then :
19446   gl_cv_func_copysign_no_libm=yes
19447 else
19448   gl_cv_func_copysign_no_libm=no
19449 fi
19450 rm -f core conftest.err conftest.$ac_objext \
19451     conftest$ac_exeext conftest.$ac_ext
19452
19453 fi
19454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
19455 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
19456           if test $gl_cv_func_copysign_no_libm = yes; then
19457
19458 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
19459
19460           fi
19461         fi
19462       fi
19463       if test "$gl_cv_cc_long_double_signbit" = unknown; then
19464                 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
19465 "
19466 if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
19467   ac_have_decl=1
19468 else
19469   ac_have_decl=0
19470 fi
19471
19472 cat >>confdefs.h <<_ACEOF
19473 #define HAVE_DECL_COPYSIGNL $ac_have_decl
19474 _ACEOF
19475
19476         if test "$ac_cv_have_decl_copysignl" = yes; then
19477                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
19478 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
19479 if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
19480   $as_echo_n "(cached) " >&6
19481 else
19482
19483               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19484 /* end confdefs.h.  */
19485 #include <math.h>
19486                            long double x, y;
19487 int
19488 main ()
19489 {
19490 return copysignl (x, y) < 0;
19491   ;
19492   return 0;
19493 }
19494 _ACEOF
19495 if ac_fn_c_try_link "$LINENO"; then :
19496   gl_cv_func_copysignl_no_libm=yes
19497 else
19498   gl_cv_func_copysignl_no_libm=no
19499 fi
19500 rm -f core conftest.err conftest.$ac_objext \
19501     conftest$ac_exeext conftest.$ac_ext
19502
19503 fi
19504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
19505 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
19506           if test $gl_cv_func_copysignl_no_libm = yes; then
19507
19508 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
19509
19510           fi
19511         fi
19512       fi
19513     fi
19514   fi
19515
19516
19517
19518   GNULIB_SIGNBIT=1
19519
19520
19521   for ac_header in stdint.h
19522 do :
19523   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
19524 if test "x$ac_cv_header_stdint_h" = x""yes; then :
19525   cat >>confdefs.h <<_ACEOF
19526 #define HAVE_STDINT_H 1
19527 _ACEOF
19528
19529 fi
19530
19531 done
19532
19533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
19534 $as_echo_n "checking for SIZE_MAX... " >&6; }
19535 if test "${gl_cv_size_max+set}" = set; then :
19536   $as_echo_n "(cached) " >&6
19537 else
19538
19539     gl_cv_size_max=
19540     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19541 /* end confdefs.h.  */
19542
19543 #include <limits.h>
19544 #if HAVE_STDINT_H
19545 #include <stdint.h>
19546 #endif
19547 #ifdef SIZE_MAX
19548 Found it
19549 #endif
19550
19551 _ACEOF
19552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19553   $EGREP "Found it" >/dev/null 2>&1; then :
19554   gl_cv_size_max=yes
19555 fi
19556 rm -f conftest*
19557
19558     if test -z "$gl_cv_size_max"; then
19559                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
19560 #include <limits.h>"; then :
19561
19562 else
19563   size_t_bits_minus_1=
19564 fi
19565
19566       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
19567
19568 else
19569   fits_in_uint=
19570 fi
19571
19572       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
19573         if test $fits_in_uint = 1; then
19574                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19575 /* end confdefs.h.  */
19576 #include <stddef.h>
19577             extern size_t foo;
19578             extern unsigned long foo;
19579
19580 int
19581 main ()
19582 {
19583
19584   ;
19585   return 0;
19586 }
19587 _ACEOF
19588 if ac_fn_c_try_compile "$LINENO"; then :
19589   fits_in_uint=0
19590 fi
19591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19592         fi
19593                                 if test $fits_in_uint = 1; then
19594           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
19595         else
19596           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
19597         fi
19598       else
19599                 gl_cv_size_max='((size_t)~(size_t)0)'
19600       fi
19601     fi
19602
19603 fi
19604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
19605 $as_echo "$gl_cv_size_max" >&6; }
19606   if test "$gl_cv_size_max" != yes; then
19607
19608 cat >>confdefs.h <<_ACEOF
19609 #define SIZE_MAX $gl_cv_size_max
19610 _ACEOF
19611
19612   fi
19613
19614
19615
19616
19617
19618
19619     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
19620 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
19621 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
19622   $as_echo_n "(cached) " >&6
19623 else
19624   if test "$cross_compiling" = yes; then :
19625   case $host_os in
19626             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
19627             *) gl_cv_func_stat_dir_slash="guessing yes";;
19628           esac
19629 else
19630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19631 /* end confdefs.h.  */
19632 #include <sys/stat.h>
19633
19634 int
19635 main ()
19636 {
19637 struct stat st; return stat (".", &st) != stat ("./", &st);
19638   ;
19639   return 0;
19640 }
19641 _ACEOF
19642 if ac_fn_c_try_run "$LINENO"; then :
19643   gl_cv_func_stat_dir_slash=yes
19644 else
19645   gl_cv_func_stat_dir_slash=no
19646 fi
19647 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19648   conftest.$ac_objext conftest.beam conftest.$ac_ext
19649 fi
19650
19651 fi
19652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
19653 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
19654       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
19655 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
19656 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
19657   $as_echo_n "(cached) " >&6
19658 else
19659   touch conftest.tmp
19660        # Assume that if we have lstat, we can also check symlinks.
19661        if test $ac_cv_func_lstat = yes; then
19662          ln -s conftest.tmp conftest.lnk
19663        fi
19664        if test "$cross_compiling" = yes; then :
19665   gl_cv_func_stat_file_slash="guessing no"
19666 else
19667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19668 /* end confdefs.h.  */
19669 #include <sys/stat.h>
19670
19671 int
19672 main ()
19673 {
19674 struct stat st;
19675       if (!stat ("conftest.tmp/", &st)) return 1;
19676 #if HAVE_LSTAT
19677       if (!stat ("conftest.lnk/", &st)) return 2;
19678 #endif
19679
19680   ;
19681   return 0;
19682 }
19683 _ACEOF
19684 if ac_fn_c_try_run "$LINENO"; then :
19685   gl_cv_func_stat_file_slash=yes
19686 else
19687   gl_cv_func_stat_file_slash=no
19688 fi
19689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19690   conftest.$ac_objext conftest.beam conftest.$ac_ext
19691 fi
19692
19693        rm -f conftest.tmp conftest.lnk
19694 fi
19695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
19696 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
19697   case $gl_cv_func_stat_dir_slash in
19698     *no) REPLACE_STAT=1
19699
19700 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
19701 ;;
19702   esac
19703   case $gl_cv_func_stat_file_slash in
19704     *no) REPLACE_STAT=1
19705
19706 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
19707 ;;
19708   esac
19709   if test $REPLACE_STAT = 1; then
19710
19711
19712
19713
19714
19715
19716
19717
19718   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
19719
19720
19721   fi
19722
19723
19724
19725   GNULIB_STAT=1
19726
19727
19728
19729
19730
19731
19732   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>
19733      #include <sys/stat.h>
19734 "
19735 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
19736
19737 cat >>confdefs.h <<_ACEOF
19738 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
19739 _ACEOF
19740
19741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
19742 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
19743 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
19744   $as_echo_n "(cached) " >&6
19745 else
19746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19747 /* end confdefs.h.  */
19748
19749             #include <sys/types.h>
19750             #include <sys/stat.h>
19751             #if HAVE_SYS_TIME_H
19752             # include <sys/time.h>
19753             #endif
19754             #include <time.h>
19755             struct timespec ts;
19756             struct stat st;
19757
19758 int
19759 main ()
19760 {
19761
19762             st.st_atim = ts;
19763
19764   ;
19765   return 0;
19766 }
19767 _ACEOF
19768 if ac_fn_c_try_compile "$LINENO"; then :
19769   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
19770 else
19771   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
19772 fi
19773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19774 fi
19775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
19776 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
19777      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
19778
19779 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
19780
19781      fi
19782 else
19783   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>
19784         #include <sys/stat.h>
19785 "
19786 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
19787
19788 cat >>confdefs.h <<_ACEOF
19789 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
19790 _ACEOF
19791
19792
19793 else
19794   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
19795            #include <sys/stat.h>
19796 "
19797 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
19798
19799 cat >>confdefs.h <<_ACEOF
19800 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
19801 _ACEOF
19802
19803
19804 else
19805   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>
19806               #include <sys/stat.h>
19807 "
19808 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
19809
19810 cat >>confdefs.h <<_ACEOF
19811 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
19812 _ACEOF
19813
19814
19815 fi
19816
19817 fi
19818
19819 fi
19820
19821 fi
19822
19823
19824
19825
19826
19827
19828   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>
19829      #include <sys/stat.h>
19830 "
19831 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
19832
19833 cat >>confdefs.h <<_ACEOF
19834 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
19835 _ACEOF
19836
19837
19838 else
19839   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
19840         #include <sys/stat.h>
19841 "
19842 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
19843
19844 cat >>confdefs.h <<_ACEOF
19845 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
19846 _ACEOF
19847
19848
19849 else
19850   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>
19851           #include <sys/stat.h>
19852 "
19853 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
19854
19855 cat >>confdefs.h <<_ACEOF
19856 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
19857 _ACEOF
19858
19859
19860 fi
19861
19862 fi
19863
19864 fi
19865
19866
19867
19868
19869
19870   # Define two additional variables used in the Makefile substitution.
19871
19872   if test "$ac_cv_header_stdbool_h" = yes; then
19873     STDBOOL_H=''
19874   else
19875     STDBOOL_H='stdbool.h'
19876   fi
19877
19878
19879   if test "$ac_cv_type__Bool" = yes; then
19880     HAVE__BOOL=1
19881   else
19882     HAVE__BOOL=0
19883   fi
19884
19885
19886
19887
19888
19889   if test $gt_cv_c_wchar_t = no; then
19890     HAVE_WCHAR_T=0
19891     STDDEF_H=stddef.h
19892   fi
19893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
19894 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
19895 if test "${gl_cv_decl_null_works+set}" = set; then :
19896   $as_echo_n "(cached) " >&6
19897 else
19898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19899 /* end confdefs.h.  */
19900 #include <stddef.h>
19901       int test[2 * (sizeof NULL == sizeof (void *)) -1];
19902
19903 int
19904 main ()
19905 {
19906
19907   ;
19908   return 0;
19909 }
19910 _ACEOF
19911 if ac_fn_c_try_compile "$LINENO"; then :
19912   gl_cv_decl_null_works=yes
19913 else
19914   gl_cv_decl_null_works=no
19915 fi
19916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19917 fi
19918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
19919 $as_echo "$gl_cv_decl_null_works" >&6; }
19920   if test $gl_cv_decl_null_works = no; then
19921     REPLACE_NULL=1
19922     STDDEF_H=stddef.h
19923   fi
19924   if test -n "$STDDEF_H"; then
19925
19926
19927
19928
19929
19930
19931      if test $gl_cv_have_include_next = yes; then
19932        gl_cv_next_stddef_h='<'stddef.h'>'
19933      else
19934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
19935 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
19936 if test "${gl_cv_next_stddef_h+set}" = set; then :
19937   $as_echo_n "(cached) " >&6
19938 else
19939
19940           if test $ac_cv_header_stddef_h = yes; then
19941             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19942 /* end confdefs.h.  */
19943 #include <stddef.h>
19944
19945 _ACEOF
19946                                                                                                 case "$host_os" in
19947               aix*) gl_absname_cpp="$ac_cpp -C" ;;
19948               *)    gl_absname_cpp="$ac_cpp" ;;
19949             esac
19950                                                 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19951                sed -n '\#/stddef.h#{
19952                  s#.*"\(.*/stddef.h\)".*#\1#
19953                  s#^/[^/]#//&#
19954                  p
19955                  q
19956                }'`'"'
19957           else
19958             gl_cv_next_stddef_h='<'stddef.h'>'
19959           fi
19960
19961 fi
19962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
19963 $as_echo "$gl_cv_next_stddef_h" >&6; }
19964      fi
19965      NEXT_STDDEF_H=$gl_cv_next_stddef_h
19966
19967      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19968        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19969        gl_next_as_first_directive='<'stddef.h'>'
19970      else
19971        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19972        gl_next_as_first_directive=$gl_cv_next_stddef_h
19973      fi
19974      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
19975
19976
19977
19978   fi
19979
19980
19981
19982
19983   if test $ac_cv_type_long_long_int = yes; then
19984     HAVE_LONG_LONG_INT=1
19985   else
19986     HAVE_LONG_LONG_INT=0
19987   fi
19988
19989
19990   if test $ac_cv_type_unsigned_long_long_int = yes; then
19991     HAVE_UNSIGNED_LONG_LONG_INT=1
19992   else
19993     HAVE_UNSIGNED_LONG_LONG_INT=0
19994   fi
19995
19996
19997       if test $ac_cv_header_inttypes_h = yes; then
19998     HAVE_INTTYPES_H=1
19999   else
20000     HAVE_INTTYPES_H=0
20001   fi
20002
20003
20004       if test $ac_cv_header_sys_types_h = yes; then
20005     HAVE_SYS_TYPES_H=1
20006   else
20007     HAVE_SYS_TYPES_H=0
20008   fi
20009
20010
20011
20012
20013
20014
20015
20016
20017      if test $gl_cv_have_include_next = yes; then
20018        gl_cv_next_stdint_h='<'stdint.h'>'
20019      else
20020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20021 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
20022 if test "${gl_cv_next_stdint_h+set}" = set; then :
20023   $as_echo_n "(cached) " >&6
20024 else
20025
20026           if test $ac_cv_header_stdint_h = yes; then
20027             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20028 /* end confdefs.h.  */
20029 #include <stdint.h>
20030
20031 _ACEOF
20032                                                                                                 case "$host_os" in
20033               aix*) gl_absname_cpp="$ac_cpp -C" ;;
20034               *)    gl_absname_cpp="$ac_cpp" ;;
20035             esac
20036                                                 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20037                sed -n '\#/stdint.h#{
20038                  s#.*"\(.*/stdint.h\)".*#\1#
20039                  s#^/[^/]#//&#
20040                  p
20041                  q
20042                }'`'"'
20043           else
20044             gl_cv_next_stdint_h='<'stdint.h'>'
20045           fi
20046
20047 fi
20048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20049 $as_echo "$gl_cv_next_stdint_h" >&6; }
20050      fi
20051      NEXT_STDINT_H=$gl_cv_next_stdint_h
20052
20053      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20054        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20055        gl_next_as_first_directive='<'stdint.h'>'
20056      else
20057        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20058        gl_next_as_first_directive=$gl_cv_next_stdint_h
20059      fi
20060      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
20061
20062
20063
20064   if test $ac_cv_header_stdint_h = yes; then
20065     HAVE_STDINT_H=1
20066   else
20067     HAVE_STDINT_H=0
20068   fi
20069
20070
20071     if test $ac_cv_header_stdint_h = yes; then
20072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20073 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20074 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
20075   $as_echo_n "(cached) " >&6
20076 else
20077   gl_cv_header_working_stdint_h=no
20078        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079 /* end confdefs.h.  */
20080
20081
20082 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
20083 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
20084 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20085 #include <stdint.h>
20086 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
20087 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
20088 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20089 #endif
20090
20091
20092   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20093      included before <wchar.h>.  */
20094   #include <stddef.h>
20095   #include <signal.h>
20096   #if HAVE_WCHAR_H
20097   # include <stdio.h>
20098   # include <time.h>
20099   # include <wchar.h>
20100   #endif
20101
20102
20103 #ifdef INT8_MAX
20104 int8_t a1 = INT8_MAX;
20105 int8_t a1min = INT8_MIN;
20106 #endif
20107 #ifdef INT16_MAX
20108 int16_t a2 = INT16_MAX;
20109 int16_t a2min = INT16_MIN;
20110 #endif
20111 #ifdef INT32_MAX
20112 int32_t a3 = INT32_MAX;
20113 int32_t a3min = INT32_MIN;
20114 #endif
20115 #ifdef INT64_MAX
20116 int64_t a4 = INT64_MAX;
20117 int64_t a4min = INT64_MIN;
20118 #endif
20119 #ifdef UINT8_MAX
20120 uint8_t b1 = UINT8_MAX;
20121 #else
20122 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20123 #endif
20124 #ifdef UINT16_MAX
20125 uint16_t b2 = UINT16_MAX;
20126 #endif
20127 #ifdef UINT32_MAX
20128 uint32_t b3 = UINT32_MAX;
20129 #endif
20130 #ifdef UINT64_MAX
20131 uint64_t b4 = UINT64_MAX;
20132 #endif
20133 int_least8_t c1 = INT8_C (0x7f);
20134 int_least8_t c1max = INT_LEAST8_MAX;
20135 int_least8_t c1min = INT_LEAST8_MIN;
20136 int_least16_t c2 = INT16_C (0x7fff);
20137 int_least16_t c2max = INT_LEAST16_MAX;
20138 int_least16_t c2min = INT_LEAST16_MIN;
20139 int_least32_t c3 = INT32_C (0x7fffffff);
20140 int_least32_t c3max = INT_LEAST32_MAX;
20141 int_least32_t c3min = INT_LEAST32_MIN;
20142 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20143 int_least64_t c4max = INT_LEAST64_MAX;
20144 int_least64_t c4min = INT_LEAST64_MIN;
20145 uint_least8_t d1 = UINT8_C (0xff);
20146 uint_least8_t d1max = UINT_LEAST8_MAX;
20147 uint_least16_t d2 = UINT16_C (0xffff);
20148 uint_least16_t d2max = UINT_LEAST16_MAX;
20149 uint_least32_t d3 = UINT32_C (0xffffffff);
20150 uint_least32_t d3max = UINT_LEAST32_MAX;
20151 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20152 uint_least64_t d4max = UINT_LEAST64_MAX;
20153 int_fast8_t e1 = INT_FAST8_MAX;
20154 int_fast8_t e1min = INT_FAST8_MIN;
20155 int_fast16_t e2 = INT_FAST16_MAX;
20156 int_fast16_t e2min = INT_FAST16_MIN;
20157 int_fast32_t e3 = INT_FAST32_MAX;
20158 int_fast32_t e3min = INT_FAST32_MIN;
20159 int_fast64_t e4 = INT_FAST64_MAX;
20160 int_fast64_t e4min = INT_FAST64_MIN;
20161 uint_fast8_t f1 = UINT_FAST8_MAX;
20162 uint_fast16_t f2 = UINT_FAST16_MAX;
20163 uint_fast32_t f3 = UINT_FAST32_MAX;
20164 uint_fast64_t f4 = UINT_FAST64_MAX;
20165 #ifdef INTPTR_MAX
20166 intptr_t g = INTPTR_MAX;
20167 intptr_t gmin = INTPTR_MIN;
20168 #endif
20169 #ifdef UINTPTR_MAX
20170 uintptr_t h = UINTPTR_MAX;
20171 #endif
20172 intmax_t i = INTMAX_MAX;
20173 uintmax_t j = UINTMAX_MAX;
20174
20175 #include <limits.h> /* for CHAR_BIT */
20176 #define TYPE_MINIMUM(t) \
20177   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
20178 #define TYPE_MAXIMUM(t) \
20179   ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
20180 struct s {
20181   int check_PTRDIFF:
20182       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20183       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20184       ? 1 : -1;
20185   /* Detect bug in FreeBSD 6.0 / ia64.  */
20186   int check_SIG_ATOMIC:
20187       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20188       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20189       ? 1 : -1;
20190   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20191   int check_WCHAR:
20192       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20193       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20194       ? 1 : -1;
20195   /* Detect bug in mingw.  */
20196   int check_WINT:
20197       WINT_MIN == TYPE_MINIMUM (wint_t)
20198       && WINT_MAX == TYPE_MAXIMUM (wint_t)
20199       ? 1 : -1;
20200
20201   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
20202   int check_UINT8_C:
20203         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20204   int check_UINT16_C:
20205         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20206
20207   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
20208 #ifdef UINT8_MAX
20209   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
20210 #endif
20211 #ifdef UINT16_MAX
20212   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20213 #endif
20214 #ifdef UINT32_MAX
20215   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20216 #endif
20217 #ifdef UINT64_MAX
20218   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20219 #endif
20220   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20221   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20222   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20223   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20224   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20225   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20226   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20227   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20228   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20229   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20230   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20231 };
20232
20233 int
20234 main ()
20235 {
20236
20237   ;
20238   return 0;
20239 }
20240 _ACEOF
20241 if ac_fn_c_try_compile "$LINENO"; then :
20242                                                     if test "$cross_compiling" = yes; then :
20243                  gl_cv_header_working_stdint_h=yes
20244
20245 else
20246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20247 /* end confdefs.h.  */
20248
20249
20250 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
20251 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
20252 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20253 #include <stdint.h>
20254
20255
20256   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20257      included before <wchar.h>.  */
20258   #include <stddef.h>
20259   #include <signal.h>
20260   #if HAVE_WCHAR_H
20261   # include <stdio.h>
20262   # include <time.h>
20263   # include <wchar.h>
20264   #endif
20265
20266
20267 #include <stdio.h>
20268 #include <string.h>
20269 #define MVAL(macro) MVAL1(macro)
20270 #define MVAL1(expression) #expression
20271 static const char *macro_values[] =
20272   {
20273 #ifdef INT8_MAX
20274     MVAL (INT8_MAX),
20275 #endif
20276 #ifdef INT16_MAX
20277     MVAL (INT16_MAX),
20278 #endif
20279 #ifdef INT32_MAX
20280     MVAL (INT32_MAX),
20281 #endif
20282 #ifdef INT64_MAX
20283     MVAL (INT64_MAX),
20284 #endif
20285 #ifdef UINT8_MAX
20286     MVAL (UINT8_MAX),
20287 #endif
20288 #ifdef UINT16_MAX
20289     MVAL (UINT16_MAX),
20290 #endif
20291 #ifdef UINT32_MAX
20292     MVAL (UINT32_MAX),
20293 #endif
20294 #ifdef UINT64_MAX
20295     MVAL (UINT64_MAX),
20296 #endif
20297     NULL
20298   };
20299
20300 int
20301 main ()
20302 {
20303
20304   const char **mv;
20305   for (mv = macro_values; *mv != NULL; mv++)
20306     {
20307       const char *value = *mv;
20308       /* Test whether it looks like a cast expression.  */
20309       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20310           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20311           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20312           || strncmp (value, "((int)"/*)*/, 6) == 0
20313           || strncmp (value, "((signed short)"/*)*/, 15) == 0
20314           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20315         return 1;
20316     }
20317   return 0;
20318
20319   ;
20320   return 0;
20321 }
20322 _ACEOF
20323 if ac_fn_c_try_run "$LINENO"; then :
20324   gl_cv_header_working_stdint_h=yes
20325 fi
20326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20327   conftest.$ac_objext conftest.beam conftest.$ac_ext
20328 fi
20329
20330
20331 fi
20332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20333
20334 fi
20335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20336 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
20337   fi
20338   if test "$gl_cv_header_working_stdint_h" = yes; then
20339     STDINT_H=
20340   else
20341             for ac_header in sys/inttypes.h sys/bitypes.h
20342 do :
20343   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20344 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20345 eval as_val=\$$as_ac_Header
20346    if test "x$as_val" = x""yes; then :
20347   cat >>confdefs.h <<_ACEOF
20348 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20349 _ACEOF
20350
20351 fi
20352
20353 done
20354
20355     if test $ac_cv_header_sys_inttypes_h = yes; then
20356       HAVE_SYS_INTTYPES_H=1
20357     else
20358       HAVE_SYS_INTTYPES_H=0
20359     fi
20360
20361     if test $ac_cv_header_sys_bitypes_h = yes; then
20362       HAVE_SYS_BITYPES_H=1
20363     else
20364       HAVE_SYS_BITYPES_H=0
20365     fi
20366
20367
20368
20369
20370
20371
20372   if test $APPLE_UNIVERSAL_BUILD = 0; then
20373
20374
20375   for gltype in ptrdiff_t size_t ; do
20376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20377 $as_echo_n "checking for bit size of $gltype... " >&6; }
20378 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20379   $as_echo_n "(cached) " >&6
20380 else
20381   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
20382   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20383      included before <wchar.h>.  */
20384   #include <stddef.h>
20385   #include <signal.h>
20386   #if HAVE_WCHAR_H
20387   # include <stdio.h>
20388   # include <time.h>
20389   # include <wchar.h>
20390   #endif
20391
20392 #include <limits.h>"; then :
20393
20394 else
20395   result=unknown
20396 fi
20397
20398        eval gl_cv_bitsizeof_${gltype}=\$result
20399
20400 fi
20401 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20402                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20403 $as_echo "$ac_res" >&6; }
20404     eval result=\$gl_cv_bitsizeof_${gltype}
20405     if test $result = unknown; then
20406                                                 result=0
20407     fi
20408     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20409     cat >>confdefs.h <<_ACEOF
20410 #define BITSIZEOF_${GLTYPE} $result
20411 _ACEOF
20412
20413     eval BITSIZEOF_${GLTYPE}=\$result
20414   done
20415
20416
20417   fi
20418
20419
20420   for gltype in sig_atomic_t wchar_t wint_t ; do
20421     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20422 $as_echo_n "checking for bit size of $gltype... " >&6; }
20423 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20424   $as_echo_n "(cached) " >&6
20425 else
20426   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
20427   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20428      included before <wchar.h>.  */
20429   #include <stddef.h>
20430   #include <signal.h>
20431   #if HAVE_WCHAR_H
20432   # include <stdio.h>
20433   # include <time.h>
20434   # include <wchar.h>
20435   #endif
20436
20437 #include <limits.h>"; then :
20438
20439 else
20440   result=unknown
20441 fi
20442
20443        eval gl_cv_bitsizeof_${gltype}=\$result
20444
20445 fi
20446 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20447                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20448 $as_echo "$ac_res" >&6; }
20449     eval result=\$gl_cv_bitsizeof_${gltype}
20450     if test $result = unknown; then
20451                                                 result=0
20452     fi
20453     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20454     cat >>confdefs.h <<_ACEOF
20455 #define BITSIZEOF_${GLTYPE} $result
20456 _ACEOF
20457
20458     eval BITSIZEOF_${GLTYPE}=\$result
20459   done
20460
20461
20462
20463
20464   for gltype in sig_atomic_t wchar_t wint_t ; do
20465     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20466 $as_echo_n "checking whether $gltype is signed... " >&6; }
20467 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
20468   $as_echo_n "(cached) " >&6
20469 else
20470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471 /* end confdefs.h.  */
20472
20473   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20474      included before <wchar.h>.  */
20475   #include <stddef.h>
20476   #include <signal.h>
20477   #if HAVE_WCHAR_H
20478   # include <stdio.h>
20479   # include <time.h>
20480   # include <wchar.h>
20481   #endif
20482
20483             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20484 int
20485 main ()
20486 {
20487
20488   ;
20489   return 0;
20490 }
20491 _ACEOF
20492 if ac_fn_c_try_compile "$LINENO"; then :
20493   result=yes
20494 else
20495   result=no
20496 fi
20497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20498        eval gl_cv_type_${gltype}_signed=\$result
20499
20500 fi
20501 eval ac_res=\$gl_cv_type_${gltype}_signed
20502                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20503 $as_echo "$ac_res" >&6; }
20504     eval result=\$gl_cv_type_${gltype}_signed
20505     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20506     if test "$result" = yes; then
20507       cat >>confdefs.h <<_ACEOF
20508 #define HAVE_SIGNED_${GLTYPE} 1
20509 _ACEOF
20510
20511       eval HAVE_SIGNED_${GLTYPE}=1
20512     else
20513       eval HAVE_SIGNED_${GLTYPE}=0
20514     fi
20515   done
20516
20517
20518   gl_cv_type_ptrdiff_t_signed=yes
20519   gl_cv_type_size_t_signed=no
20520   if test $APPLE_UNIVERSAL_BUILD = 0; then
20521
20522
20523   for gltype in ptrdiff_t size_t ; do
20524     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20525 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20526 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20527   $as_echo_n "(cached) " >&6
20528 else
20529   eval gl_cv_type_${gltype}_suffix=no
20530        eval result=\$gl_cv_type_${gltype}_signed
20531        if test "$result" = yes; then
20532          glsufu=
20533        else
20534          glsufu=u
20535        fi
20536        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20537          case $glsuf in
20538            '')  gltype1='int';;
20539            l)   gltype1='long int';;
20540            ll)  gltype1='long long int';;
20541            i64) gltype1='__int64';;
20542            u)   gltype1='unsigned int';;
20543            ul)  gltype1='unsigned long int';;
20544            ull) gltype1='unsigned long long int';;
20545            ui64)gltype1='unsigned __int64';;
20546          esac
20547          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20548 /* end confdefs.h.  */
20549
20550   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20551      included before <wchar.h>.  */
20552   #include <stddef.h>
20553   #include <signal.h>
20554   #if HAVE_WCHAR_H
20555   # include <stdio.h>
20556   # include <time.h>
20557   # include <wchar.h>
20558   #endif
20559
20560               extern $gltype foo;
20561               extern $gltype1 foo;
20562 int
20563 main ()
20564 {
20565
20566   ;
20567   return 0;
20568 }
20569 _ACEOF
20570 if ac_fn_c_try_compile "$LINENO"; then :
20571   eval gl_cv_type_${gltype}_suffix=\$glsuf
20572 fi
20573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20574          eval result=\$gl_cv_type_${gltype}_suffix
20575          test "$result" != no && break
20576        done
20577 fi
20578 eval ac_res=\$gl_cv_type_${gltype}_suffix
20579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20580 $as_echo "$ac_res" >&6; }
20581     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20582     eval result=\$gl_cv_type_${gltype}_suffix
20583     test "$result" = no && result=
20584     eval ${GLTYPE}_SUFFIX=\$result
20585     cat >>confdefs.h <<_ACEOF
20586 #define ${GLTYPE}_SUFFIX $result
20587 _ACEOF
20588
20589   done
20590
20591
20592   fi
20593
20594
20595   for gltype in sig_atomic_t wchar_t wint_t ; do
20596     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20597 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20598 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
20599   $as_echo_n "(cached) " >&6
20600 else
20601   eval gl_cv_type_${gltype}_suffix=no
20602        eval result=\$gl_cv_type_${gltype}_signed
20603        if test "$result" = yes; then
20604          glsufu=
20605        else
20606          glsufu=u
20607        fi
20608        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20609          case $glsuf in
20610            '')  gltype1='int';;
20611            l)   gltype1='long int';;
20612            ll)  gltype1='long long int';;
20613            i64) gltype1='__int64';;
20614            u)   gltype1='unsigned int';;
20615            ul)  gltype1='unsigned long int';;
20616            ull) gltype1='unsigned long long int';;
20617            ui64)gltype1='unsigned __int64';;
20618          esac
20619          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20620 /* end confdefs.h.  */
20621
20622   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20623      included before <wchar.h>.  */
20624   #include <stddef.h>
20625   #include <signal.h>
20626   #if HAVE_WCHAR_H
20627   # include <stdio.h>
20628   # include <time.h>
20629   # include <wchar.h>
20630   #endif
20631
20632               extern $gltype foo;
20633               extern $gltype1 foo;
20634 int
20635 main ()
20636 {
20637
20638   ;
20639   return 0;
20640 }
20641 _ACEOF
20642 if ac_fn_c_try_compile "$LINENO"; then :
20643   eval gl_cv_type_${gltype}_suffix=\$glsuf
20644 fi
20645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20646          eval result=\$gl_cv_type_${gltype}_suffix
20647          test "$result" != no && break
20648        done
20649 fi
20650 eval ac_res=\$gl_cv_type_${gltype}_suffix
20651                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20652 $as_echo "$ac_res" >&6; }
20653     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20654     eval result=\$gl_cv_type_${gltype}_suffix
20655     test "$result" = no && result=
20656     eval ${GLTYPE}_SUFFIX=\$result
20657     cat >>confdefs.h <<_ACEOF
20658 #define ${GLTYPE}_SUFFIX $result
20659 _ACEOF
20660
20661   done
20662
20663
20664
20665     STDINT_H=stdint.h
20666   fi
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678      if test $gl_cv_have_include_next = yes; then
20679        gl_cv_next_stdio_h='<'stdio.h'>'
20680      else
20681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
20682 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
20683 if test "${gl_cv_next_stdio_h+set}" = set; then :
20684   $as_echo_n "(cached) " >&6
20685 else
20686
20687           if test $ac_cv_header_stdio_h = yes; then
20688             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20689 /* end confdefs.h.  */
20690 #include <stdio.h>
20691
20692 _ACEOF
20693                                                                                                 case "$host_os" in
20694               aix*) gl_absname_cpp="$ac_cpp -C" ;;
20695               *)    gl_absname_cpp="$ac_cpp" ;;
20696             esac
20697                                                 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20698                sed -n '\#/stdio.h#{
20699                  s#.*"\(.*/stdio.h\)".*#\1#
20700                  s#^/[^/]#//&#
20701                  p
20702                  q
20703                }'`'"'
20704           else
20705             gl_cv_next_stdio_h='<'stdio.h'>'
20706           fi
20707
20708 fi
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20710 $as_echo "$gl_cv_next_stdio_h" >&6; }
20711      fi
20712      NEXT_STDIO_H=$gl_cv_next_stdio_h
20713
20714      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20715        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20716        gl_next_as_first_directive='<'stdio.h'>'
20717      else
20718        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20719        gl_next_as_first_directive=$gl_cv_next_stdio_h
20720      fi
20721      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
20722
20723
20724
20725       GNULIB_FPRINTF=1
20726   GNULIB_PRINTF=1
20727   GNULIB_VFPRINTF=1
20728   GNULIB_VPRINTF=1
20729   GNULIB_FPUTC=1
20730   GNULIB_PUTC=1
20731   GNULIB_PUTCHAR=1
20732   GNULIB_FPUTS=1
20733   GNULIB_PUTS=1
20734   GNULIB_FWRITE=1
20735
20736
20737
20738     for gl_func in fseeko ftello; do
20739     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20741 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20742 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
20743   $as_echo_n "(cached) " >&6
20744 else
20745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20746 /* end confdefs.h.  */
20747 #include <stdio.h>
20748
20749 int
20750 main ()
20751 {
20752 #undef $gl_func
20753   (void) $gl_func;
20754   ;
20755   return 0;
20756 }
20757 _ACEOF
20758 if ac_fn_c_try_compile "$LINENO"; then :
20759   eval "$as_gl_Symbol=yes"
20760 else
20761   eval "$as_gl_Symbol=no"
20762 fi
20763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20764 fi
20765 eval ac_res=\$$as_gl_Symbol
20766                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20767 $as_echo "$ac_res" >&6; }
20768      eval as_val=\$$as_gl_Symbol
20769    if test "x$as_val" = x""yes; then :
20770   cat >>confdefs.h <<_ACEOF
20771 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20772 _ACEOF
20773
20774                      eval ac_cv_have_decl_$gl_func=yes
20775 fi
20776       done
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787      if test $gl_cv_have_include_next = yes; then
20788        gl_cv_next_stdlib_h='<'stdlib.h'>'
20789      else
20790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
20791 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
20792 if test "${gl_cv_next_stdlib_h+set}" = set; then :
20793   $as_echo_n "(cached) " >&6
20794 else
20795
20796           if test $ac_cv_header_stdlib_h = yes; then
20797             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20798 /* end confdefs.h.  */
20799 #include <stdlib.h>
20800
20801 _ACEOF
20802                                                                                                 case "$host_os" in
20803               aix*) gl_absname_cpp="$ac_cpp -C" ;;
20804               *)    gl_absname_cpp="$ac_cpp" ;;
20805             esac
20806                                                 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20807                sed -n '\#/stdlib.h#{
20808                  s#.*"\(.*/stdlib.h\)".*#\1#
20809                  s#^/[^/]#//&#
20810                  p
20811                  q
20812                }'`'"'
20813           else
20814             gl_cv_next_stdlib_h='<'stdlib.h'>'
20815           fi
20816
20817 fi
20818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
20819 $as_echo "$gl_cv_next_stdlib_h" >&6; }
20820      fi
20821      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
20822
20823      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20824        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20825        gl_next_as_first_directive='<'stdlib.h'>'
20826      else
20827        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20828        gl_next_as_first_directive=$gl_cv_next_stdlib_h
20829      fi
20830      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
20831
20832
20833
20834   for ac_header in random.h
20835 do :
20836   ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
20837 "
20838 if test "x$ac_cv_header_random_h" = x""yes; then :
20839   cat >>confdefs.h <<_ACEOF
20840 #define HAVE_RANDOM_H 1
20841 _ACEOF
20842
20843 fi
20844
20845 done
20846
20847   if test $ac_cv_header_random_h = yes; then
20848     HAVE_RANDOM_H=1
20849   else
20850     HAVE_RANDOM_H=0
20851   fi
20852
20853   ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
20854       #if HAVE_RANDOM_H
20855       # include <random.h>
20856       #endif
20857
20858 "
20859 if test "x$ac_cv_type_struct_random_data" = x""yes; then :
20860
20861 cat >>confdefs.h <<_ACEOF
20862 #define HAVE_STRUCT_RANDOM_DATA 1
20863 _ACEOF
20864
20865
20866 else
20867   HAVE_STRUCT_RANDOM_DATA=0
20868 fi
20869
20870
20871
20872
20873
20874   if test $gl_cv_func_malloc_posix != yes; then
20875     REPLACE_STRDUP=1
20876
20877
20878
20879
20880
20881
20882
20883
20884   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
20885
20886   else
20887
20888
20889
20890
20891
20892
20893
20894
20895   for ac_func in strdup
20896 do :
20897   ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
20898 if test "x$ac_cv_func_strdup" = x""yes; then :
20899   cat >>confdefs.h <<_ACEOF
20900 #define HAVE_STRDUP 1
20901 _ACEOF
20902
20903 else
20904
20905     gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
20906
20907 fi
20908 done
20909
20910
20911   fi
20912
20913   if test $ac_cv_have_decl_strdup = no; then
20914     HAVE_DECL_STRDUP=0
20915   fi
20916   :
20917
20918
20919
20920   GNULIB_STRDUP=1
20921
20922
20923
20924   if test $REPLACE_STRERROR = 1; then
20925
20926
20927
20928
20929
20930
20931
20932
20933   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
20934
20935
20936 cat >>confdefs.h <<_ACEOF
20937 #define REPLACE_STRERROR $REPLACE_STRERROR
20938 _ACEOF
20939
20940   fi
20941
20942
20943
20944   GNULIB_STRERROR=1
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962      if test $gl_cv_have_include_next = yes; then
20963        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
20964      else
20965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
20966 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
20967 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
20968   $as_echo_n "(cached) " >&6
20969 else
20970
20971           if test $ac_cv_header_sys_stat_h = yes; then
20972             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20973 /* end confdefs.h.  */
20974 #include <sys/stat.h>
20975
20976 _ACEOF
20977                                                                                                 case "$host_os" in
20978               aix*) gl_absname_cpp="$ac_cpp -C" ;;
20979               *)    gl_absname_cpp="$ac_cpp" ;;
20980             esac
20981                                                 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20982                sed -n '\#/sys/stat.h#{
20983                  s#.*"\(.*/sys/stat.h\)".*#\1#
20984                  s#^/[^/]#//&#
20985                  p
20986                  q
20987                }'`'"'
20988           else
20989             gl_cv_next_sys_stat_h='<'sys/stat.h'>'
20990           fi
20991
20992 fi
20993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
20994 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
20995      fi
20996      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
20997
20998      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20999        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21000        gl_next_as_first_directive='<'sys/stat.h'>'
21001      else
21002        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21003        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
21004      fi
21005      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
21006
21007
21008
21009
21010       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
21011      #include <sys/stat.h>
21012 "
21013 if test "x$ac_cv_type_nlink_t" = x""yes; then :
21014
21015 else
21016
21017 $as_echo "#define nlink_t int" >>confdefs.h
21018
21019 fi
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044      if test $gl_cv_have_include_next = yes; then
21045        gl_cv_next_unistd_h='<'unistd.h'>'
21046      else
21047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
21048 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
21049 if test "${gl_cv_next_unistd_h+set}" = set; then :
21050   $as_echo_n "(cached) " >&6
21051 else
21052
21053           if test $ac_cv_header_unistd_h = yes; then
21054             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21055 /* end confdefs.h.  */
21056 #include <unistd.h>
21057
21058 _ACEOF
21059                                                                                                 case "$host_os" in
21060               aix*) gl_absname_cpp="$ac_cpp -C" ;;
21061               *)    gl_absname_cpp="$ac_cpp" ;;
21062             esac
21063                                                 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21064                sed -n '\#/unistd.h#{
21065                  s#.*"\(.*/unistd.h\)".*#\1#
21066                  s#^/[^/]#//&#
21067                  p
21068                  q
21069                }'`'"'
21070           else
21071             gl_cv_next_unistd_h='<'unistd.h'>'
21072           fi
21073
21074 fi
21075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
21076 $as_echo "$gl_cv_next_unistd_h" >&6; }
21077      fi
21078      NEXT_UNISTD_H=$gl_cv_next_unistd_h
21079
21080      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21081        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21082        gl_next_as_first_directive='<'unistd.h'>'
21083      else
21084        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21085        gl_next_as_first_directive=$gl_cv_next_unistd_h
21086      fi
21087      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
21088
21089
21090
21091
21092
21093   if test $ac_cv_header_unistd_h = yes; then
21094     HAVE_UNISTD_H=1
21095   else
21096     HAVE_UNISTD_H=0
21097   fi
21098
21099
21100
21101     for gl_func in environ; do
21102     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21103     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21104 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21105 if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
21106   $as_echo_n "(cached) " >&6
21107 else
21108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21109 /* end confdefs.h.  */
21110 #include <unistd.h>
21111 /* Some systems declare environ in the wrong header.  */
21112 #ifndef __GLIBC__
21113 # include <stdlib.h>
21114 #endif
21115
21116 int
21117 main ()
21118 {
21119 #undef $gl_func
21120   (void) $gl_func;
21121   ;
21122   return 0;
21123 }
21124 _ACEOF
21125 if ac_fn_c_try_compile "$LINENO"; then :
21126   eval "$as_gl_Symbol=yes"
21127 else
21128   eval "$as_gl_Symbol=no"
21129 fi
21130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21131 fi
21132 eval ac_res=\$$as_gl_Symbol
21133                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21134 $as_echo "$ac_res" >&6; }
21135      eval as_val=\$$as_gl_Symbol
21136    if test "x$as_val" = x""yes; then :
21137   cat >>confdefs.h <<_ACEOF
21138 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21139 _ACEOF
21140
21141                      eval ac_cv_have_decl_$gl_func=yes
21142 fi
21143       done
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156   gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext"
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166   gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext"
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176   gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext"
21177
21178
21179
21180
21181
21182     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
21183 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
21184 if test "${gl_cv_func_unlink_works+set}" = set; then :
21185   $as_echo_n "(cached) " >&6
21186 else
21187   touch conftest.file
21188      # Assume that if we have lstat, we can also check symlinks.
21189      if test $ac_cv_func_lstat = yes; then
21190        ln -s conftest.file conftest.lnk
21191      fi
21192      if test "$cross_compiling" = yes; then :
21193   gl_cv_func_unlink_works="guessing no"
21194 else
21195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21196 /* end confdefs.h.  */
21197 #include <unistd.h>
21198            #include <errno.h>
21199
21200 int
21201 main ()
21202 {
21203 if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1;
21204 #if HAVE_LSTAT
21205       if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2;
21206 #endif
21207
21208   ;
21209   return 0;
21210 }
21211 _ACEOF
21212 if ac_fn_c_try_run "$LINENO"; then :
21213   gl_cv_func_unlink_works=yes
21214 else
21215   gl_cv_func_unlink_works=no
21216 fi
21217 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21218   conftest.$ac_objext conftest.beam conftest.$ac_ext
21219 fi
21220
21221      rm -f conftest.file conftest.lnk
21222 fi
21223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_works" >&5
21224 $as_echo "$gl_cv_func_unlink_works" >&6; }
21225   if test x"$gl_cv_func_unlink_works" != xyes; then
21226     REPLACE_UNLINK=1
21227
21228
21229
21230
21231
21232
21233
21234
21235   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
21236
21237   fi
21238
21239
21240
21241   GNULIB_UNLINK=1
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252   gl_LIBOBJS="$gl_LIBOBJS utimens.$ac_objext"
21253
21254
21255
21256
21257
21258
21259
21260   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
21261                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
21262 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
21263 if test "${gl_cv_func_futimesat_works+set}" = set; then :
21264   $as_echo_n "(cached) " >&6
21265 else
21266   touch conftest.file
21267        if test "$cross_compiling" = yes; then :
21268   gl_cv_func_futimesat_works="guessing no"
21269 else
21270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21271 /* end confdefs.h.  */
21272
21273 #include <stddef.h>
21274 #include <sys/times.h>
21275
21276 int
21277 main ()
21278 {
21279     int fd = open ("conftest.file", O_RDWR);
21280           if (fd < 0) return 1;
21281           if (futimesat (fd, NULL, NULL)) return 2;
21282
21283   ;
21284   return 0;
21285 }
21286 _ACEOF
21287 if ac_fn_c_try_run "$LINENO"; then :
21288   gl_cv_func_futimesat_works=yes
21289 else
21290   gl_cv_func_futimesat_works=no
21291 fi
21292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21293   conftest.$ac_objext conftest.beam conftest.$ac_ext
21294 fi
21295
21296       rm -f conftest.file
21297 fi
21298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
21299 $as_echo "$gl_cv_func_futimesat_works" >&6; }
21300     if test "$gl_cv_func_futimesat_works" != yes; then
21301
21302 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
21303
21304     fi
21305   fi
21306
21307
21308
21309   if test $ac_cv_func_vasnprintf = no; then
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
21351
21352   if test $ac_cv_func_vasnprintf = yes; then
21353
21354 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
21355
21356   fi
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
21368 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
21369
21370 else
21371
21372 $as_echo "#define ptrdiff_t long" >>confdefs.h
21373
21374
21375 fi
21376
21377
21378
21379
21380
21381
21382
21383   fi
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400   gl_cv_func_vfprintf_posix=no
21401   case "$gl_cv_func_printf_sizes_c99" in
21402     *yes)
21403       case "$gl_cv_func_printf_long_double" in
21404         *yes)
21405           case "$gl_cv_func_printf_infinite" in
21406             *yes)
21407               case "$gl_cv_func_printf_infinite_long_double" in
21408                 *yes)
21409                   case "$gl_cv_func_printf_directive_a" in
21410                     *yes)
21411                       case "$gl_cv_func_printf_directive_f" in
21412                         *yes)
21413                           case "$gl_cv_func_printf_directive_n" in
21414                             *yes)
21415                               case "$gl_cv_func_printf_directive_ls" in
21416                                 *yes)
21417                                   case "$gl_cv_func_printf_positions" in
21418                                     *yes)
21419                                       case "$gl_cv_func_printf_flag_grouping" in
21420                                         *yes)
21421                                           case "$gl_cv_func_printf_flag_leftadjust" in
21422                                             *yes)
21423                                               case "$gl_cv_func_printf_flag_zero" in
21424                                                 *yes)
21425                                                   case "$gl_cv_func_printf_precision" in
21426                                                     *yes)
21427                                                       case "$gl_cv_func_printf_enomem" in
21428                                                         *yes)
21429                                                           # vfprintf exists and is
21430                                                           # already POSIX compliant.
21431                                                           gl_cv_func_vfprintf_posix=yes
21432                                                           ;;
21433                                                       esac
21434                                                       ;;
21435                                                   esac
21436                                                   ;;
21437                                               esac
21438                                               ;;
21439                                           esac
21440                                           ;;
21441                                       esac
21442                                       ;;
21443                                   esac
21444                                   ;;
21445                               esac
21446                               ;;
21447                           esac
21448                           ;;
21449                       esac
21450                       ;;
21451                   esac
21452                   ;;
21453               esac
21454               ;;
21455           esac
21456           ;;
21457       esac
21458       ;;
21459   esac
21460   if test $gl_cv_func_vfprintf_posix = no; then
21461
21462
21463
21464   case "$gl_cv_func_printf_infinite" in
21465     *yes)
21466       ;;
21467     *)
21468
21469 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
21470
21471       ;;
21472   esac
21473
21474
21475
21476
21477   case "$gl_cv_func_printf_long_double" in
21478     *yes)
21479       case "$gl_cv_func_printf_infinite_long_double" in
21480         *yes)
21481           ;;
21482         *)
21483
21484 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
21485
21486           ;;
21487       esac
21488       ;;
21489   esac
21490
21491
21492
21493   case "$gl_cv_func_printf_directive_a" in
21494     *yes)
21495       ;;
21496     *)
21497
21498 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
21499
21500       for ac_func in nl_langinfo
21501 do :
21502   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
21503 if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
21504   cat >>confdefs.h <<_ACEOF
21505 #define HAVE_NL_LANGINFO 1
21506 _ACEOF
21507
21508 fi
21509 done
21510
21511       ;;
21512   esac
21513
21514
21515
21516   case "$gl_cv_func_printf_directive_f" in
21517     *yes)
21518       ;;
21519     *)
21520
21521 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
21522
21523       ;;
21524   esac
21525
21526
21527
21528   case "$gl_cv_func_printf_directive_ls" in
21529     *yes)
21530       ;;
21531     *)
21532
21533 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
21534
21535       ;;
21536   esac
21537
21538
21539
21540   case "$gl_cv_func_printf_flag_grouping" in
21541     *yes)
21542       ;;
21543     *)
21544
21545 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
21546
21547       ;;
21548   esac
21549
21550
21551
21552   case "$gl_cv_func_printf_flag_leftadjust" in
21553     *yes)
21554       ;;
21555     *)
21556
21557 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
21558
21559       ;;
21560   esac
21561
21562
21563
21564   case "$gl_cv_func_printf_flag_zero" in
21565     *yes)
21566       ;;
21567     *)
21568
21569 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
21570
21571       ;;
21572   esac
21573
21574
21575
21576   case "$gl_cv_func_printf_precision" in
21577     *yes)
21578       ;;
21579     *)
21580
21581 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
21582
21583
21584 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21585
21586
21587 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21588
21589       ;;
21590   esac
21591
21592
21593
21594   case "$gl_cv_func_printf_enomem" in
21595     *yes)
21596       ;;
21597     *)
21598
21599 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
21600
21601
21602 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21603
21604
21605 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21606
21607       ;;
21608   esac
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
21651
21652   if test $ac_cv_func_vasnprintf = yes; then
21653
21654 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
21655
21656   fi
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
21668 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
21669
21670 else
21671
21672 $as_echo "#define ptrdiff_t long" >>confdefs.h
21673
21674
21675 fi
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
21694
21695   REPLACE_VFPRINTF=1
21696
21697 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
21698
21699   :
21700
21701   fi
21702
21703
21704
21705   GNULIB_VFPRINTF_POSIX=1
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718      if test $gl_cv_have_include_next = yes; then
21719        gl_cv_next_wchar_h='<'wchar.h'>'
21720      else
21721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
21722 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
21723 if test "${gl_cv_next_wchar_h+set}" = set; then :
21724   $as_echo_n "(cached) " >&6
21725 else
21726
21727           if test $ac_cv_header_wchar_h = yes; then
21728             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21729 /* end confdefs.h.  */
21730 #include <wchar.h>
21731
21732 _ACEOF
21733                                                                                                 case "$host_os" in
21734               aix*) gl_absname_cpp="$ac_cpp -C" ;;
21735               *)    gl_absname_cpp="$ac_cpp" ;;
21736             esac
21737                                                 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21738                sed -n '\#/wchar.h#{
21739                  s#.*"\(.*/wchar.h\)".*#\1#
21740                  s#^/[^/]#//&#
21741                  p
21742                  q
21743                }'`'"'
21744           else
21745             gl_cv_next_wchar_h='<'wchar.h'>'
21746           fi
21747
21748 fi
21749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
21750 $as_echo "$gl_cv_next_wchar_h" >&6; }
21751      fi
21752      NEXT_WCHAR_H=$gl_cv_next_wchar_h
21753
21754      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21755        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21756        gl_next_as_first_directive='<'wchar.h'>'
21757      else
21758        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21759        gl_next_as_first_directive=$gl_cv_next_wchar_h
21760      fi
21761      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
21762
21763
21764
21765   if test $ac_cv_header_wchar_h = yes; then
21766     HAVE_WCHAR_H=1
21767   else
21768     HAVE_WCHAR_H=0
21769   fi
21770
21771
21772
21773   if test $gt_cv_c_wint_t = yes; then
21774     HAVE_WINT_T=1
21775   else
21776     HAVE_WINT_T=0
21777   fi
21778
21779
21780
21781
21782
21783
21784   if test $ac_cv_func_iswcntrl = yes; then
21785     HAVE_ISWCNTRL=1
21786   else
21787     HAVE_ISWCNTRL=0
21788   fi
21789
21790
21791
21792
21793
21794   if test $gt_cv_c_wint_t = yes; then
21795     HAVE_WINT_T=1
21796   else
21797     HAVE_WINT_T=0
21798   fi
21799
21800
21801   WCTYPE_H=wctype.h
21802   if test $ac_cv_header_wctype_h = yes; then
21803     if test $ac_cv_func_iswcntrl = yes; then
21804                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
21805 $as_echo_n "checking whether iswcntrl works... " >&6; }
21806 if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
21807   $as_echo_n "(cached) " >&6
21808 else
21809
21810           if test "$cross_compiling" = yes; then :
21811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21812 /* end confdefs.h.  */
21813 #include <stdlib.h>
21814                           #if __GNU_LIBRARY__ == 1
21815                           Linux libc5 i18n is broken.
21816                           #endif
21817 int
21818 main ()
21819 {
21820
21821   ;
21822   return 0;
21823 }
21824 _ACEOF
21825 if ac_fn_c_try_compile "$LINENO"; then :
21826   gl_cv_func_iswcntrl_works=yes
21827 else
21828   gl_cv_func_iswcntrl_works=no
21829 fi
21830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21831
21832 else
21833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21834 /* end confdefs.h.  */
21835
21836                             #include <stddef.h>
21837                             #include <stdio.h>
21838                             #include <time.h>
21839                             #include <wchar.h>
21840                             #include <wctype.h>
21841                             int main () { return iswprint ('x') == 0; }
21842 _ACEOF
21843 if ac_fn_c_try_run "$LINENO"; then :
21844   gl_cv_func_iswcntrl_works=yes
21845 else
21846   gl_cv_func_iswcntrl_works=no
21847 fi
21848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21849   conftest.$ac_objext conftest.beam conftest.$ac_ext
21850 fi
21851
21852
21853 fi
21854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
21855 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
21856       if test $gl_cv_func_iswcntrl_works = yes; then
21857         case "$host_os" in
21858           mingw*)
21859                         ;;
21860           *)
21861                         WCTYPE_H=
21862             ;;
21863         esac
21864       fi
21865     fi
21866
21867
21868
21869
21870
21871
21872      if test $gl_cv_have_include_next = yes; then
21873        gl_cv_next_wctype_h='<'wctype.h'>'
21874      else
21875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
21876 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
21877 if test "${gl_cv_next_wctype_h+set}" = set; then :
21878   $as_echo_n "(cached) " >&6
21879 else
21880
21881           if test $ac_cv_header_wctype_h = yes; then
21882             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21883 /* end confdefs.h.  */
21884 #include <wctype.h>
21885
21886 _ACEOF
21887                                                                                                 case "$host_os" in
21888               aix*) gl_absname_cpp="$ac_cpp -C" ;;
21889               *)    gl_absname_cpp="$ac_cpp" ;;
21890             esac
21891                                                 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21892                sed -n '\#/wctype.h#{
21893                  s#.*"\(.*/wctype.h\)".*#\1#
21894                  s#^/[^/]#//&#
21895                  p
21896                  q
21897                }'`'"'
21898           else
21899             gl_cv_next_wctype_h='<'wctype.h'>'
21900           fi
21901
21902 fi
21903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
21904 $as_echo "$gl_cv_next_wctype_h" >&6; }
21905      fi
21906      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
21907
21908      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21909        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21910        gl_next_as_first_directive='<'wctype.h'>'
21911      else
21912        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21913        gl_next_as_first_directive=$gl_cv_next_wctype_h
21914      fi
21915      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
21916
21917
21918
21919     HAVE_WCTYPE_H=1
21920   else
21921     HAVE_WCTYPE_H=0
21922   fi
21923
21924
21925
21926   if test "$gl_cv_func_iswcntrl_works" = no; then
21927     REPLACE_ISWCNTRL=1
21928   else
21929     REPLACE_ISWCNTRL=0
21930   fi
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942   gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext"
21943
21944
21945
21946
21947   :
21948
21949
21950   :
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962   gl_LIBOBJS="$gl_LIBOBJS xgetcwd.$ac_objext"
21963
21964
21965
21966
21967
21968
21969
21970   for ac_header in stdint.h
21971 do :
21972   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
21973 if test "x$ac_cv_header_stdint_h" = x""yes; then :
21974   cat >>confdefs.h <<_ACEOF
21975 #define HAVE_STDINT_H 1
21976 _ACEOF
21977
21978 fi
21979
21980 done
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992   gl_LIBOBJS="$gl_LIBOBJS yesno.$ac_objext"
21993
21994
21995     :
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006   gltests_libdeps=
22007   gltests_ltlibdeps=
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017   gl_source_base='tests'
22018
22019
22020
22021
22022
22023
22024
22025   LIBGZIP_LIBDEPS="$gl_libdeps"
22026
22027   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
22028
22029
22030
22031 # Check whether --enable-gcc-warnings was given.
22032 if test "${enable_gcc_warnings+set}" = set; then :
22033   enableval=$enable_gcc_warnings; case $enableval in
22034      yes|no) ;;
22035      *)      as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
22036    esac
22037    gl_gcc_warnings=$enableval
22038 else
22039   gl_gcc_warnings=no
22040
22041 fi
22042
22043
22044 if test "$gl_gcc_warnings" = yes; then
22045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
22046 $as_echo_n "checking whether compiler handles -Werror... " >&6; }
22047 if test "${gl_cv_warn__Werror+set}" = set; then :
22048   $as_echo_n "(cached) " >&6
22049 else
22050
22051   save_CPPFLAGS="$CPPFLAGS"
22052   CPPFLAGS="${CPPFLAGS} -Werror"
22053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22054 /* end confdefs.h.  */
22055
22056 int
22057 main ()
22058 {
22059
22060   ;
22061   return 0;
22062 }
22063 _ACEOF
22064 if ac_fn_c_try_cpp "$LINENO"; then :
22065   gl_cv_warn__Werror=yes
22066 else
22067   gl_cv_warn__Werror=no
22068 fi
22069 rm -f conftest.err conftest.$ac_ext
22070   CPPFLAGS="$save_CPPFLAGS"
22071
22072 fi
22073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
22074 $as_echo "$gl_cv_warn__Werror" >&6; }
22075 if test "x$gl_cv_warn__Werror" = x""yes; then :
22076   as_fn_append WERROR_CFLAGS " -Werror"
22077 fi
22078
22079
22080
22081   nw=
22082   # This, $nw, is the list of warnings we disable.
22083   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
22084   nw="$nw -Waggregate-return"       # anachronistic
22085   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
22086   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
22087   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
22088   nw="$nw -Wtraditional"            # Warns on #elif which we use often
22089   nw="$nw -Wcast-qual"              # Too many warnings for now
22090   nw="$nw -Wconversion"             # Too many warnings for now
22091   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
22092   nw="$nw -Wsign-conversion"        # Too many warnings for now
22093   nw="$nw -Wtraditional-conversion" # Too many warnings for now
22094   nw="$nw -Wunreachable-code"       # Too many warnings for now
22095   nw="$nw -Wpadded"                 # Our structs are not padded
22096   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
22097   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
22098   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
22099   nw="$nw -Wvla"                    # warnings in gettext.h
22100   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
22101   nw="$nw -Wswitch-enum"            # Too many warnings for now
22102   nw="$nw -Wswitch-default"         # Too many warnings for now
22103   nw="$nw -Wstack-protector"        # not worth working around
22104   # things I might fix soon:
22105   nw="$nw -Wfloat-equal"            # sort.c, seq.c
22106   nw="$nw -Wmissing-format-attribute" # copy.c
22107   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
22108   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
22109   nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
22110   # initial problems in gzip
22111   nw="$nw -Wold-style-definition"
22112   nw="$nw -Wshadow"
22113   nw="$nw -Wunused-macros"
22114   # ?? -Wstrict-overflow
22115
22116
22117  gl_manywarn_set=
22118  for gl_manywarn_item in \
22119    -Wall \
22120    -W \
22121    -Wformat-y2k \
22122    -Wformat-nonliteral \
22123    -Wformat-security \
22124    -Winit-self \
22125    -Wmissing-include-dirs \
22126    -Wswitch-default \
22127    -Wswitch-enum \
22128    -Wunused \
22129    -Wunknown-pragmas \
22130    -Wstrict-aliasing \
22131    -Wstrict-overflow \
22132    -Wsystem-headers \
22133    -Wfloat-equal \
22134    -Wtraditional \
22135    -Wtraditional-conversion \
22136    -Wdeclaration-after-statement \
22137    -Wundef \
22138    -Wshadow \
22139    -Wunsafe-loop-optimizations \
22140    -Wpointer-arith \
22141    -Wbad-function-cast \
22142    -Wc++-compat \
22143    -Wcast-qual \
22144    -Wcast-align \
22145    -Wwrite-strings \
22146    -Wconversion \
22147    -Wsign-conversion \
22148    -Wlogical-op \
22149    -Waggregate-return \
22150    -Wstrict-prototypes \
22151    -Wold-style-definition \
22152    -Wmissing-prototypes \
22153    -Wmissing-declarations \
22154    -Wmissing-noreturn \
22155    -Wmissing-format-attribute \
22156    -Wpacked \
22157    -Wpadded \
22158    -Wredundant-decls \
22159    -Wnested-externs \
22160    -Wunreachable-code \
22161    -Winline \
22162    -Winvalid-pch \
22163    -Wlong-long \
22164    -Wvla \
22165    -Wvolatile-register-var \
22166    -Wdisabled-optimization \
22167    -Wstack-protector \
22168    -Woverlength-strings \
22169    -Wbuiltin-macro-redefined \
22170    -Wmudflap \
22171    -Wpacked-bitfield-compat \
22172    -Wsync-nand \
22173   ; do
22174     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
22175   done
22176  # The following are not documented in the manual but are included in
22177  # output from gcc --help=warnings.
22178  for gl_manywarn_item in \
22179    -Wattributes \
22180    -Wcoverage-mismatch \
22181    -Wmultichar \
22182    -Wunused-macros \
22183   ; do
22184     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
22185   done
22186   ws=$gl_manywarn_set
22187
22188
22189   gl_warn_set=
22190   set x $ws; shift
22191   for gl_warn_item
22192   do
22193     case " $nw " in
22194       *" $gl_warn_item "*)
22195         ;;
22196       *)
22197         gl_warn_set="$gl_warn_set $gl_warn_item"
22198         ;;
22199     esac
22200   done
22201   ws=$gl_warn_set
22202
22203   for w in $ws; do
22204     as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
22205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
22206 $as_echo_n "checking whether compiler handles $w... " >&6; }
22207 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
22208   $as_echo_n "(cached) " >&6
22209 else
22210
22211   save_CPPFLAGS="$CPPFLAGS"
22212   CPPFLAGS="${CPPFLAGS} $w"
22213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22214 /* end confdefs.h.  */
22215
22216 int
22217 main ()
22218 {
22219
22220   ;
22221   return 0;
22222 }
22223 _ACEOF
22224 if ac_fn_c_try_cpp "$LINENO"; then :
22225   eval "$as_gl_Warn=yes"
22226 else
22227   eval "$as_gl_Warn=no"
22228 fi
22229 rm -f conftest.err conftest.$ac_ext
22230   CPPFLAGS="$save_CPPFLAGS"
22231
22232 fi
22233 eval ac_res=\$$as_gl_Warn
22234                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22235 $as_echo "$ac_res" >&6; }
22236 eval as_val=\$$as_gl_Warn
22237    if test "x$as_val" = x""yes; then :
22238   as_fn_append WARN_CFLAGS " $w"
22239 fi
22240
22241   done
22242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-missing-field-initializers" >&5
22243 $as_echo_n "checking whether compiler handles -Wno-missing-field-initializers... " >&6; }
22244 if test "${gl_cv_warn__Wno_missing_field_initializers+set}" = set; then :
22245   $as_echo_n "(cached) " >&6
22246 else
22247
22248   save_CPPFLAGS="$CPPFLAGS"
22249   CPPFLAGS="${CPPFLAGS} -Wno-missing-field-initializers"
22250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22251 /* end confdefs.h.  */
22252
22253 int
22254 main ()
22255 {
22256
22257   ;
22258   return 0;
22259 }
22260 _ACEOF
22261 if ac_fn_c_try_cpp "$LINENO"; then :
22262   gl_cv_warn__Wno_missing_field_initializers=yes
22263 else
22264   gl_cv_warn__Wno_missing_field_initializers=no
22265 fi
22266 rm -f conftest.err conftest.$ac_ext
22267   CPPFLAGS="$save_CPPFLAGS"
22268
22269 fi
22270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_missing_field_initializers" >&5
22271 $as_echo "$gl_cv_warn__Wno_missing_field_initializers" >&6; }
22272 if test "x$gl_cv_warn__Wno_missing_field_initializers" = x""yes; then :
22273   as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
22274 fi
22275  # We need this one
22276   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-sign-compare" >&5
22277 $as_echo_n "checking whether compiler handles -Wno-sign-compare... " >&6; }
22278 if test "${gl_cv_warn__Wno_sign_compare+set}" = set; then :
22279   $as_echo_n "(cached) " >&6
22280 else
22281
22282   save_CPPFLAGS="$CPPFLAGS"
22283   CPPFLAGS="${CPPFLAGS} -Wno-sign-compare"
22284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22285 /* end confdefs.h.  */
22286
22287 int
22288 main ()
22289 {
22290
22291   ;
22292   return 0;
22293 }
22294 _ACEOF
22295 if ac_fn_c_try_cpp "$LINENO"; then :
22296   gl_cv_warn__Wno_sign_compare=yes
22297 else
22298   gl_cv_warn__Wno_sign_compare=no
22299 fi
22300 rm -f conftest.err conftest.$ac_ext
22301   CPPFLAGS="$save_CPPFLAGS"
22302
22303 fi
22304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_sign_compare" >&5
22305 $as_echo "$gl_cv_warn__Wno_sign_compare" >&6; }
22306 if test "x$gl_cv_warn__Wno_sign_compare" = x""yes; then :
22307   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
22308 fi
22309      # Too many warnings for now
22310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-pointer-sign" >&5
22311 $as_echo_n "checking whether compiler handles -Wno-pointer-sign... " >&6; }
22312 if test "${gl_cv_warn__Wno_pointer_sign+set}" = set; then :
22313   $as_echo_n "(cached) " >&6
22314 else
22315
22316   save_CPPFLAGS="$CPPFLAGS"
22317   CPPFLAGS="${CPPFLAGS} -Wno-pointer-sign"
22318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22319 /* end confdefs.h.  */
22320
22321 int
22322 main ()
22323 {
22324
22325   ;
22326   return 0;
22327 }
22328 _ACEOF
22329 if ac_fn_c_try_cpp "$LINENO"; then :
22330   gl_cv_warn__Wno_pointer_sign=yes
22331 else
22332   gl_cv_warn__Wno_pointer_sign=no
22333 fi
22334 rm -f conftest.err conftest.$ac_ext
22335   CPPFLAGS="$save_CPPFLAGS"
22336
22337 fi
22338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_pointer_sign" >&5
22339 $as_echo "$gl_cv_warn__Wno_pointer_sign" >&6; }
22340 if test "x$gl_cv_warn__Wno_pointer_sign" = x""yes; then :
22341   as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
22342 fi
22343      # Too many warnings for now
22344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-unused-parameter" >&5
22345 $as_echo_n "checking whether compiler handles -Wno-unused-parameter... " >&6; }
22346 if test "${gl_cv_warn__Wno_unused_parameter+set}" = set; then :
22347   $as_echo_n "(cached) " >&6
22348 else
22349
22350   save_CPPFLAGS="$CPPFLAGS"
22351   CPPFLAGS="${CPPFLAGS} -Wno-unused-parameter"
22352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22353 /* end confdefs.h.  */
22354
22355 int
22356 main ()
22357 {
22358
22359   ;
22360   return 0;
22361 }
22362 _ACEOF
22363 if ac_fn_c_try_cpp "$LINENO"; then :
22364   gl_cv_warn__Wno_unused_parameter=yes
22365 else
22366   gl_cv_warn__Wno_unused_parameter=no
22367 fi
22368 rm -f conftest.err conftest.$ac_ext
22369   CPPFLAGS="$save_CPPFLAGS"
22370
22371 fi
22372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_unused_parameter" >&5
22373 $as_echo "$gl_cv_warn__Wno_unused_parameter" >&6; }
22374 if test "x$gl_cv_warn__Wno_unused_parameter" = x""yes; then :
22375   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
22376 fi
22377  # Too many warnings for now
22378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-overflow" >&5
22379 $as_echo_n "checking whether compiler handles -Wno-overflow... " >&6; }
22380 if test "${gl_cv_warn__Wno_overflow+set}" = set; then :
22381   $as_echo_n "(cached) " >&6
22382 else
22383
22384   save_CPPFLAGS="$CPPFLAGS"
22385   CPPFLAGS="${CPPFLAGS} -Wno-overflow"
22386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22387 /* end confdefs.h.  */
22388
22389 int
22390 main ()
22391 {
22392
22393   ;
22394   return 0;
22395 }
22396 _ACEOF
22397 if ac_fn_c_try_cpp "$LINENO"; then :
22398   gl_cv_warn__Wno_overflow=yes
22399 else
22400   gl_cv_warn__Wno_overflow=no
22401 fi
22402 rm -f conftest.err conftest.$ac_ext
22403   CPPFLAGS="$save_CPPFLAGS"
22404
22405 fi
22406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_overflow" >&5
22407 $as_echo "$gl_cv_warn__Wno_overflow" >&6; }
22408 if test "x$gl_cv_warn__Wno_overflow" = x""yes; then :
22409   as_fn_append WARN_CFLAGS " -Wno-overflow"
22410 fi
22411          # util.c
22412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-type-limits" >&5
22413 $as_echo_n "checking whether compiler handles -Wno-type-limits... " >&6; }
22414 if test "${gl_cv_warn__Wno_type_limits+set}" = set; then :
22415   $as_echo_n "(cached) " >&6
22416 else
22417
22418   save_CPPFLAGS="$CPPFLAGS"
22419   CPPFLAGS="${CPPFLAGS} -Wno-type-limits"
22420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22421 /* end confdefs.h.  */
22422
22423 int
22424 main ()
22425 {
22426
22427   ;
22428   return 0;
22429 }
22430 _ACEOF
22431 if ac_fn_c_try_cpp "$LINENO"; then :
22432   gl_cv_warn__Wno_type_limits=yes
22433 else
22434   gl_cv_warn__Wno_type_limits=no
22435 fi
22436 rm -f conftest.err conftest.$ac_ext
22437   CPPFLAGS="$save_CPPFLAGS"
22438
22439 fi
22440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_type_limits" >&5
22441 $as_echo "$gl_cv_warn__Wno_type_limits" >&6; }
22442 if test "x$gl_cv_warn__Wno_type_limits" = x""yes; then :
22443   as_fn_append WARN_CFLAGS " -Wno-type-limits"
22444 fi
22445       # util.c
22446
22447   # In spite of excluding -Wlogical-op above, it is enabled, as of
22448   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
22449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-logical-op" >&5
22450 $as_echo_n "checking whether compiler handles -Wno-logical-op... " >&6; }
22451 if test "${gl_cv_warn__Wno_logical_op+set}" = set; then :
22452   $as_echo_n "(cached) " >&6
22453 else
22454
22455   save_CPPFLAGS="$CPPFLAGS"
22456   CPPFLAGS="${CPPFLAGS} -Wno-logical-op"
22457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22458 /* end confdefs.h.  */
22459
22460 int
22461 main ()
22462 {
22463
22464   ;
22465   return 0;
22466 }
22467 _ACEOF
22468 if ac_fn_c_try_cpp "$LINENO"; then :
22469   gl_cv_warn__Wno_logical_op=yes
22470 else
22471   gl_cv_warn__Wno_logical_op=no
22472 fi
22473 rm -f conftest.err conftest.$ac_ext
22474   CPPFLAGS="$save_CPPFLAGS"
22475
22476 fi
22477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_logical_op" >&5
22478 $as_echo "$gl_cv_warn__Wno_logical_op" >&6; }
22479 if test "x$gl_cv_warn__Wno_logical_op" = x""yes; then :
22480   as_fn_append WARN_CFLAGS " -Wno-logical-op"
22481 fi
22482
22483
22484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
22485 $as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
22486 if test "${gl_cv_warn__fdiagnostics_show_option+set}" = set; then :
22487   $as_echo_n "(cached) " >&6
22488 else
22489
22490   save_CPPFLAGS="$CPPFLAGS"
22491   CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
22492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22493 /* end confdefs.h.  */
22494
22495 int
22496 main ()
22497 {
22498
22499   ;
22500   return 0;
22501 }
22502 _ACEOF
22503 if ac_fn_c_try_cpp "$LINENO"; then :
22504   gl_cv_warn__fdiagnostics_show_option=yes
22505 else
22506   gl_cv_warn__fdiagnostics_show_option=no
22507 fi
22508 rm -f conftest.err conftest.$ac_ext
22509   CPPFLAGS="$save_CPPFLAGS"
22510
22511 fi
22512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
22513 $as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
22514 if test "x$gl_cv_warn__fdiagnostics_show_option" = x""yes; then :
22515   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
22516 fi
22517
22518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
22519 $as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
22520 if test "${gl_cv_warn__funit_at_a_time+set}" = set; then :
22521   $as_echo_n "(cached) " >&6
22522 else
22523
22524   save_CPPFLAGS="$CPPFLAGS"
22525   CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
22526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22527 /* end confdefs.h.  */
22528
22529 int
22530 main ()
22531 {
22532
22533   ;
22534   return 0;
22535 }
22536 _ACEOF
22537 if ac_fn_c_try_cpp "$LINENO"; then :
22538   gl_cv_warn__funit_at_a_time=yes
22539 else
22540   gl_cv_warn__funit_at_a_time=no
22541 fi
22542 rm -f conftest.err conftest.$ac_ext
22543   CPPFLAGS="$save_CPPFLAGS"
22544
22545 fi
22546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
22547 $as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
22548 if test "x$gl_cv_warn__funit_at_a_time" = x""yes; then :
22549   as_fn_append WARN_CFLAGS " -funit-at-a-time"
22550 fi
22551
22552
22553
22554
22555
22556 $as_echo "#define lint 1" >>confdefs.h
22557
22558
22559 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
22560
22561
22562 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
22563
22564
22565   # We use a slightly smaller set of warning options for lib/.
22566   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
22567   nw=
22568   nw="$nw -Wuninitialized"
22569   nw="$nw -Wmissing-prototypes"
22570   nw="$nw -Wold-style-definition"
22571
22572   gl_warn_set=
22573   set x $WARN_CFLAGS; shift
22574   for gl_warn_item
22575   do
22576     case " $nw " in
22577       *" $gl_warn_item "*)
22578         ;;
22579       *)
22580         gl_warn_set="$gl_warn_set $gl_warn_item"
22581         ;;
22582     esac
22583   done
22584   GNULIB_WARN_CFLAGS=$gl_warn_set
22585
22586
22587 fi
22588
22589 # cc -E produces incorrect asm files on SVR4, so postprocess it.
22590 ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
22591
22592
22593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
22594 $as_echo_n "checking for underline in external names... " >&6; }
22595 if test "${gzip_cv_underline+set}" = set; then :
22596   $as_echo_n "(cached) " >&6
22597 else
22598   gzip_cv_underline=yes
22599    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22600 /* end confdefs.h.  */
22601 int foo() {return 0;}
22602 int
22603 main ()
22604 {
22605
22606   ;
22607   return 0;
22608 }
22609 _ACEOF
22610 if ac_fn_c_try_compile "$LINENO"; then :
22611   $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
22612         gzip_cv_underline=no
22613 fi
22614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22615 fi
22616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
22617 $as_echo "$gzip_cv_underline" >&6; }
22618 ASCPPFLAGS=
22619 if test $gzip_cv_underline = no; then
22620   ASCPPFLAGS='-DNO_UNDERLINE'
22621 fi
22622
22623
22624
22625 # Try to assemble match.S.
22626 # "gcc -E match.s" ignores -E, so we must use _match.S.
22627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
22628 $as_echo_n "checking for an assembler syntax supported by this package... " >&6; }
22629 if test "${gzip_cv_assembler+set}" = set; then :
22630   $as_echo_n "(cached) " >&6
22631 else
22632   gzip_cv_assembler=no
22633    case " $DEFS " in
22634    *' NO_ASM '*) ;;
22635    *)
22636      if cp $srcdir/lib/match.c _match.S &&
22637         eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" 2>/dev/null &&
22638         eval "$ASCPPPOST < _match.i > match_.s" 2>/dev/null; then
22639        if test ! -s match_.s || grep error < match_.s > /dev/null; then
22640          :
22641        elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null 2>&1" &&
22642             test -f match_.$OBJEXT; then
22643          rm -f match_.$OBJEXT
22644          gzip_cv_assembler=yes
22645          if echo 'void foo (void) {}' > conftest.c &&
22646             eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null 2>&1" &&
22647             grep '\.note\.GNU-stack' conftest.s >/dev/null 2>&1 &&
22648             eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null 2>&1" &&
22649             test -f match_.$OBJEXT; then
22650            gzip_cv_assembler='yes, with -Wa,--noexecstack'
22651          fi
22652        fi
22653      fi
22654      rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
22655    esac
22656 fi
22657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
22658 $as_echo "$gzip_cv_assembler" >&6; }
22659 if test "$gzip_cv_assembler" != no; then
22660
22661 $as_echo "#define ASMV /**/" >>confdefs.h
22662
22663   case " $LIBOBJS " in
22664   *" match.$ac_objext "* ) ;;
22665   *) LIBOBJS="$LIBOBJS match.$ac_objext"
22666  ;;
22667 esac
22668
22669 fi
22670 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
22671   ASFLAGS_config='-Wa,--noexecstack'
22672 else
22673   ASFLAGS_config=
22674 fi
22675
22676
22677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
22678 $as_echo_n "checking for library containing strerror... " >&6; }
22679 if test "${ac_cv_search_strerror+set}" = set; then :
22680   $as_echo_n "(cached) " >&6
22681 else
22682   ac_func_search_save_LIBS=$LIBS
22683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22684 /* end confdefs.h.  */
22685
22686 /* Override any GCC internal prototype to avoid an error.
22687    Use char because int might match the return type of a GCC
22688    builtin and then its argument prototype would still apply.  */
22689 #ifdef __cplusplus
22690 extern "C"
22691 #endif
22692 char strerror ();
22693 int
22694 main ()
22695 {
22696 return strerror ();
22697   ;
22698   return 0;
22699 }
22700 _ACEOF
22701 for ac_lib in '' cposix; do
22702   if test -z "$ac_lib"; then
22703     ac_res="none required"
22704   else
22705     ac_res=-l$ac_lib
22706     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22707   fi
22708   if ac_fn_c_try_link "$LINENO"; then :
22709   ac_cv_search_strerror=$ac_res
22710 fi
22711 rm -f core conftest.err conftest.$ac_objext \
22712     conftest$ac_exeext
22713   if test "${ac_cv_search_strerror+set}" = set; then :
22714   break
22715 fi
22716 done
22717 if test "${ac_cv_search_strerror+set}" = set; then :
22718
22719 else
22720   ac_cv_search_strerror=no
22721 fi
22722 rm conftest.$ac_ext
22723 LIBS=$ac_func_search_save_LIBS
22724 fi
22725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
22726 $as_echo "$ac_cv_search_strerror" >&6; }
22727 ac_res=$ac_cv_search_strerror
22728 if test "$ac_res" != no; then :
22729   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22730
22731 fi
22732
22733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22734 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22735 if test "${ac_cv_c_const+set}" = set; then :
22736   $as_echo_n "(cached) " >&6
22737 else
22738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22739 /* end confdefs.h.  */
22740
22741 int
22742 main ()
22743 {
22744 /* FIXME: Include the comments suggested by Paul. */
22745 #ifndef __cplusplus
22746   /* Ultrix mips cc rejects this.  */
22747   typedef int charset[2];
22748   const charset cs;
22749   /* SunOS 4.1.1 cc rejects this.  */
22750   char const *const *pcpcc;
22751   char **ppc;
22752   /* NEC SVR4.0.2 mips cc rejects this.  */
22753   struct point {int x, y;};
22754   static struct point const zero = {0,0};
22755   /* AIX XL C 1.02.0.0 rejects this.
22756      It does not let you subtract one const X* pointer from another in
22757      an arm of an if-expression whose if-part is not a constant
22758      expression */
22759   const char *g = "string";
22760   pcpcc = &g + (g ? g-g : 0);
22761   /* HPUX 7.0 cc rejects these. */
22762   ++pcpcc;
22763   ppc = (char**) pcpcc;
22764   pcpcc = (char const *const *) ppc;
22765   { /* SCO 3.2v4 cc rejects this.  */
22766     char *t;
22767     char const *s = 0 ? (char *) 0 : (char const *) 0;
22768
22769     *t++ = 0;
22770     if (s) return 0;
22771   }
22772   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22773     int x[] = {25, 17};
22774     const int *foo = &x[0];
22775     ++foo;
22776   }
22777   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22778     typedef const int *iptr;
22779     iptr p = 0;
22780     ++p;
22781   }
22782   { /* AIX XL C 1.02.0.0 rejects this saying
22783        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22784     struct s { int j; const int *ap[3]; };
22785     struct s *b; b->j = 5;
22786   }
22787   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22788     const int foo = 10;
22789     if (!foo) return 0;
22790   }
22791   return !cs[0] && !zero.x;
22792 #endif
22793
22794   ;
22795   return 0;
22796 }
22797 _ACEOF
22798 if ac_fn_c_try_compile "$LINENO"; then :
22799   ac_cv_c_const=yes
22800 else
22801   ac_cv_c_const=no
22802 fi
22803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22804 fi
22805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22806 $as_echo "$ac_cv_c_const" >&6; }
22807 if test $ac_cv_c_const = no; then
22808
22809 $as_echo "#define const /**/" >>confdefs.h
22810
22811 fi
22812
22813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
22814 $as_echo_n "checking for ANSI C header files... " >&6; }
22815 if test "${ac_cv_header_stdc+set}" = set; then :
22816   $as_echo_n "(cached) " >&6
22817 else
22818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22819 /* end confdefs.h.  */
22820 #include <stdlib.h>
22821 #include <stdarg.h>
22822 #include <string.h>
22823 #include <float.h>
22824
22825 int
22826 main ()
22827 {
22828
22829   ;
22830   return 0;
22831 }
22832 _ACEOF
22833 if ac_fn_c_try_compile "$LINENO"; then :
22834   ac_cv_header_stdc=yes
22835 else
22836   ac_cv_header_stdc=no
22837 fi
22838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22839
22840 if test $ac_cv_header_stdc = yes; then
22841   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22843 /* end confdefs.h.  */
22844 #include <string.h>
22845
22846 _ACEOF
22847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22848   $EGREP "memchr" >/dev/null 2>&1; then :
22849
22850 else
22851   ac_cv_header_stdc=no
22852 fi
22853 rm -f conftest*
22854
22855 fi
22856
22857 if test $ac_cv_header_stdc = yes; then
22858   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22860 /* end confdefs.h.  */
22861 #include <stdlib.h>
22862
22863 _ACEOF
22864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22865   $EGREP "free" >/dev/null 2>&1; then :
22866
22867 else
22868   ac_cv_header_stdc=no
22869 fi
22870 rm -f conftest*
22871
22872 fi
22873
22874 if test $ac_cv_header_stdc = yes; then
22875   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22876   if test "$cross_compiling" = yes; then :
22877   :
22878 else
22879   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22880 /* end confdefs.h.  */
22881 #include <ctype.h>
22882 #include <stdlib.h>
22883 #if ((' ' & 0x0FF) == 0x020)
22884 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22885 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22886 #else
22887 # define ISLOWER(c) \
22888                    (('a' <= (c) && (c) <= 'i') \
22889                      || ('j' <= (c) && (c) <= 'r') \
22890                      || ('s' <= (c) && (c) <= 'z'))
22891 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22892 #endif
22893
22894 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22895 int
22896 main ()
22897 {
22898   int i;
22899   for (i = 0; i < 256; i++)
22900     if (XOR (islower (i), ISLOWER (i))
22901         || toupper (i) != TOUPPER (i))
22902       return 2;
22903   return 0;
22904 }
22905 _ACEOF
22906 if ac_fn_c_try_run "$LINENO"; then :
22907
22908 else
22909   ac_cv_header_stdc=no
22910 fi
22911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22912   conftest.$ac_objext conftest.beam conftest.$ac_ext
22913 fi
22914
22915 fi
22916 fi
22917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
22918 $as_echo "$ac_cv_header_stdc" >&6; }
22919 if test $ac_cv_header_stdc = yes; then
22920
22921 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
22922
22923 fi
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935 ac_header_dirent=no
22936 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
22937   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
22938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
22939 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
22940 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
22941   $as_echo_n "(cached) " >&6
22942 else
22943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22944 /* end confdefs.h.  */
22945 #include <sys/types.h>
22946 #include <$ac_hdr>
22947
22948 int
22949 main ()
22950 {
22951 if ((DIR *) 0)
22952 return 0;
22953   ;
22954   return 0;
22955 }
22956 _ACEOF
22957 if ac_fn_c_try_compile "$LINENO"; then :
22958   eval "$as_ac_Header=yes"
22959 else
22960   eval "$as_ac_Header=no"
22961 fi
22962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22963 fi
22964 eval ac_res=\$$as_ac_Header
22965                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22966 $as_echo "$ac_res" >&6; }
22967 eval as_val=\$$as_ac_Header
22968    if test "x$as_val" = x""yes; then :
22969   cat >>confdefs.h <<_ACEOF
22970 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
22971 _ACEOF
22972
22973 ac_header_dirent=$ac_hdr; break
22974 fi
22975
22976 done
22977 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
22978 if test $ac_header_dirent = dirent.h; then
22979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
22980 $as_echo_n "checking for library containing opendir... " >&6; }
22981 if test "${ac_cv_search_opendir+set}" = set; then :
22982   $as_echo_n "(cached) " >&6
22983 else
22984   ac_func_search_save_LIBS=$LIBS
22985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22986 /* end confdefs.h.  */
22987
22988 /* Override any GCC internal prototype to avoid an error.
22989    Use char because int might match the return type of a GCC
22990    builtin and then its argument prototype would still apply.  */
22991 #ifdef __cplusplus
22992 extern "C"
22993 #endif
22994 char opendir ();
22995 int
22996 main ()
22997 {
22998 return opendir ();
22999   ;
23000   return 0;
23001 }
23002 _ACEOF
23003 for ac_lib in '' dir; do
23004   if test -z "$ac_lib"; then
23005     ac_res="none required"
23006   else
23007     ac_res=-l$ac_lib
23008     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23009   fi
23010   if ac_fn_c_try_link "$LINENO"; then :
23011   ac_cv_search_opendir=$ac_res
23012 fi
23013 rm -f core conftest.err conftest.$ac_objext \
23014     conftest$ac_exeext
23015   if test "${ac_cv_search_opendir+set}" = set; then :
23016   break
23017 fi
23018 done
23019 if test "${ac_cv_search_opendir+set}" = set; then :
23020
23021 else
23022   ac_cv_search_opendir=no
23023 fi
23024 rm conftest.$ac_ext
23025 LIBS=$ac_func_search_save_LIBS
23026 fi
23027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23028 $as_echo "$ac_cv_search_opendir" >&6; }
23029 ac_res=$ac_cv_search_opendir
23030 if test "$ac_res" != no; then :
23031   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23032
23033 fi
23034
23035 else
23036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23037 $as_echo_n "checking for library containing opendir... " >&6; }
23038 if test "${ac_cv_search_opendir+set}" = set; then :
23039   $as_echo_n "(cached) " >&6
23040 else
23041   ac_func_search_save_LIBS=$LIBS
23042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23043 /* end confdefs.h.  */
23044
23045 /* Override any GCC internal prototype to avoid an error.
23046    Use char because int might match the return type of a GCC
23047    builtin and then its argument prototype would still apply.  */
23048 #ifdef __cplusplus
23049 extern "C"
23050 #endif
23051 char opendir ();
23052 int
23053 main ()
23054 {
23055 return opendir ();
23056   ;
23057   return 0;
23058 }
23059 _ACEOF
23060 for ac_lib in '' x; do
23061   if test -z "$ac_lib"; then
23062     ac_res="none required"
23063   else
23064     ac_res=-l$ac_lib
23065     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23066   fi
23067   if ac_fn_c_try_link "$LINENO"; then :
23068   ac_cv_search_opendir=$ac_res
23069 fi
23070 rm -f core conftest.err conftest.$ac_objext \
23071     conftest$ac_exeext
23072   if test "${ac_cv_search_opendir+set}" = set; then :
23073   break
23074 fi
23075 done
23076 if test "${ac_cv_search_opendir+set}" = set; then :
23077
23078 else
23079   ac_cv_search_opendir=no
23080 fi
23081 rm conftest.$ac_ext
23082 LIBS=$ac_func_search_save_LIBS
23083 fi
23084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23085 $as_echo "$ac_cv_search_opendir" >&6; }
23086 ac_res=$ac_cv_search_opendir
23087 if test "$ac_res" != no; then :
23088   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23089
23090 fi
23091
23092 fi
23093
23094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
23095 $as_echo_n "checking return type of signal handlers... " >&6; }
23096 if test "${ac_cv_type_signal+set}" = set; then :
23097   $as_echo_n "(cached) " >&6
23098 else
23099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100 /* end confdefs.h.  */
23101 #include <sys/types.h>
23102 #include <signal.h>
23103
23104 int
23105 main ()
23106 {
23107 return *(signal (0, 0)) (0) == 1;
23108   ;
23109   return 0;
23110 }
23111 _ACEOF
23112 if ac_fn_c_try_compile "$LINENO"; then :
23113   ac_cv_type_signal=int
23114 else
23115   ac_cv_type_signal=void
23116 fi
23117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23118 fi
23119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
23120 $as_echo "$ac_cv_type_signal" >&6; }
23121
23122 cat >>confdefs.h <<_ACEOF
23123 #define RETSIGTYPE $ac_cv_type_signal
23124 _ACEOF
23125
23126
23127 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23128 if test "x$ac_cv_type_size_t" = x""yes; then :
23129
23130 else
23131
23132 cat >>confdefs.h <<_ACEOF
23133 #define size_t unsigned int
23134 _ACEOF
23135
23136 fi
23137
23138 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
23139 if test "x$ac_cv_type_off_t" = x""yes; then :
23140
23141 else
23142
23143 cat >>confdefs.h <<_ACEOF
23144 #define off_t long int
23145 _ACEOF
23146
23147 fi
23148
23149
23150 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile"
23151
23152 cat >confcache <<\_ACEOF
23153 # This file is a shell script that caches the results of configure
23154 # tests run on this system so they can be shared between configure
23155 # scripts and configure runs, see configure's option --config-cache.
23156 # It is not useful on other systems.  If it contains results you don't
23157 # want to keep, you may remove or edit it.
23158 #
23159 # config.status only pays attention to the cache file if you give it
23160 # the --recheck option to rerun configure.
23161 #
23162 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23163 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23164 # following values.
23165
23166 _ACEOF
23167
23168 # The following way of writing the cache mishandles newlines in values,
23169 # but we know of no workaround that is simple, portable, and efficient.
23170 # So, we kill variables containing newlines.
23171 # Ultrix sh set writes to stderr and can't be redirected directly,
23172 # and sets the high bit in the cache file unless we assign to the vars.
23173 (
23174   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23175     eval ac_val=\$$ac_var
23176     case $ac_val in #(
23177     *${as_nl}*)
23178       case $ac_var in #(
23179       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
23180 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
23181       esac
23182       case $ac_var in #(
23183       _ | IFS | as_nl) ;; #(
23184       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
23185       *) { eval $ac_var=; unset $ac_var;} ;;
23186       esac ;;
23187     esac
23188   done
23189
23190   (set) 2>&1 |
23191     case $as_nl`(ac_space=' '; set) 2>&1` in #(
23192     *${as_nl}ac_space=\ *)
23193       # `set' does not quote correctly, so add quotes: double-quote
23194       # substitution turns \\\\ into \\, and sed turns \\ into \.
23195       sed -n \
23196         "s/'/'\\\\''/g;
23197           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23198       ;; #(
23199     *)
23200       # `set' quotes correctly as required by POSIX, so do not add quotes.
23201       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
23202       ;;
23203     esac |
23204     sort
23205 ) |
23206   sed '
23207      /^ac_cv_env_/b end
23208      t clear
23209      :clear
23210      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23211      t end
23212      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23213      :end' >>confcache
23214 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23215   if test -w "$cache_file"; then
23216     test "x$cache_file" != "x/dev/null" &&
23217       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
23218 $as_echo "$as_me: updating cache $cache_file" >&6;}
23219     cat confcache >$cache_file
23220   else
23221     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
23222 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
23223   fi
23224 fi
23225 rm -f confcache
23226
23227 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23228 # Let make expand exec_prefix.
23229 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23230
23231 DEFS=-DHAVE_CONFIG_H
23232
23233 ac_libobjs=
23234 ac_ltlibobjs=
23235 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23236   # 1. Remove the extension, and $U if already installed.
23237   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23238   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
23239   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
23240   #    will be set to the directory where LIBOBJS objects are built.
23241   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23242   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
23243 done
23244 LIBOBJS=$ac_libobjs
23245
23246 LTLIBOBJS=$ac_ltlibobjs
23247
23248
23249  if test -n "$EXEEXT"; then
23250   am__EXEEXT_TRUE=
23251   am__EXEEXT_FALSE='#'
23252 else
23253   am__EXEEXT_TRUE='#'
23254   am__EXEEXT_FALSE=
23255 fi
23256
23257 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
23258   as_fn_error "conditional \"AMDEP\" was never defined.
23259 Usually this means the macro was only invoked conditionally." "$LINENO" 5
23260 fi
23261 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
23262   as_fn_error "conditional \"am__fastdepCC\" was never defined.
23263 Usually this means the macro was only invoked conditionally." "$LINENO" 5
23264 fi
23265 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
23266   as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
23267 Usually this means the macro was only invoked conditionally." "$LINENO" 5
23268 fi
23269
23270 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
23271   as_fn_error "conditional \"GNU_MAKE\" was never defined.
23272 Usually this means the macro was only invoked conditionally." "$LINENO" 5
23273 fi
23274
23275
23276     gl_libobjs=
23277     gl_ltlibobjs=
23278     if test -n "$gl_LIBOBJS"; then
23279       # Remove the extension.
23280       sed_drop_objext='s/\.o$//;s/\.obj$//'
23281       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
23282         gl_libobjs="$gl_libobjs $i.$ac_objext"
23283         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
23284       done
23285     fi
23286     gl_LIBOBJS=$gl_libobjs
23287
23288     gl_LTLIBOBJS=$gl_ltlibobjs
23289
23290
23291
23292     gltests_libobjs=
23293     gltests_ltlibobjs=
23294     if test -n "$gltests_LIBOBJS"; then
23295       # Remove the extension.
23296       sed_drop_objext='s/\.o$//;s/\.obj$//'
23297       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
23298         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
23299         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
23300       done
23301     fi
23302     gltests_LIBOBJS=$gltests_libobjs
23303
23304     gltests_LTLIBOBJS=$gltests_ltlibobjs
23305
23306
23307
23308 : ${CONFIG_STATUS=./config.status}
23309 ac_write_fail=0
23310 ac_clean_files_save=$ac_clean_files
23311 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23312 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
23313 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
23314 as_write_fail=0
23315 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
23316 #! $SHELL
23317 # Generated by $as_me.
23318 # Run this file to recreate the current configuration.
23319 # Compiler output produced by configure, useful for debugging
23320 # configure, is in config.log if it exists.
23321
23322 debug=false
23323 ac_cs_recheck=false
23324 ac_cs_silent=false
23325
23326 SHELL=\${CONFIG_SHELL-$SHELL}
23327 export SHELL
23328 _ASEOF
23329 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
23330 ## -------------------- ##
23331 ## M4sh Initialization. ##
23332 ## -------------------- ##
23333
23334 # Be more Bourne compatible
23335 DUALCASE=1; export DUALCASE # for MKS sh
23336 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
23337   emulate sh
23338   NULLCMD=:
23339   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23340   # is contrary to our usage.  Disable this feature.
23341   alias -g '${1+"$@"}'='"$@"'
23342   setopt NO_GLOB_SUBST
23343 else
23344   case `(set -o) 2>/dev/null` in #(
23345   *posix*) :
23346     set -o posix ;; #(
23347   *) :
23348      ;;
23349 esac
23350 fi
23351
23352
23353 as_nl='
23354 '
23355 export as_nl
23356 # Printing a long string crashes Solaris 7 /usr/bin/printf.
23357 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
23358 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
23359 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
23360 # Prefer a ksh shell builtin over an external printf program on Solaris,
23361 # but without wasting forks for bash or zsh.
23362 if test -z "$BASH_VERSION$ZSH_VERSION" \
23363     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
23364   as_echo='print -r --'
23365   as_echo_n='print -rn --'
23366 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
23367   as_echo='printf %s\n'
23368   as_echo_n='printf %s'
23369 else
23370   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
23371     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
23372     as_echo_n='/usr/ucb/echo -n'
23373   else
23374     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
23375     as_echo_n_body='eval
23376       arg=$1;
23377       case $arg in #(
23378       *"$as_nl"*)
23379         expr "X$arg" : "X\\(.*\\)$as_nl";
23380         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
23381       esac;
23382       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
23383     '
23384     export as_echo_n_body
23385     as_echo_n='sh -c $as_echo_n_body as_echo'
23386   fi
23387   export as_echo_body
23388   as_echo='sh -c $as_echo_body as_echo'
23389 fi
23390
23391 # The user is always right.
23392 if test "${PATH_SEPARATOR+set}" != set; then
23393   PATH_SEPARATOR=:
23394   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
23395     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
23396       PATH_SEPARATOR=';'
23397   }
23398 fi
23399
23400
23401 # IFS
23402 # We need space, tab and new line, in precisely that order.  Quoting is
23403 # there to prevent editors from complaining about space-tab.
23404 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
23405 # splitting by setting IFS to empty value.)
23406 IFS=" ""        $as_nl"
23407
23408 # Find who we are.  Look in the path if we contain no directory separator.
23409 case $0 in #((
23410   *[\\/]* ) as_myself=$0 ;;
23411   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23412 for as_dir in $PATH
23413 do
23414   IFS=$as_save_IFS
23415   test -z "$as_dir" && as_dir=.
23416     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23417   done
23418 IFS=$as_save_IFS
23419
23420      ;;
23421 esac
23422 # We did not find ourselves, most probably we were run as `sh COMMAND'
23423 # in which case we are not to be found in the path.
23424 if test "x$as_myself" = x; then
23425   as_myself=$0
23426 fi
23427 if test ! -f "$as_myself"; then
23428   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23429   exit 1
23430 fi
23431
23432 # Unset variables that we do not need and which cause bugs (e.g. in
23433 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
23434 # suppresses any "Segmentation fault" message there.  '((' could
23435 # trigger a bug in pdksh 5.2.14.
23436 for as_var in BASH_ENV ENV MAIL MAILPATH
23437 do eval test x\${$as_var+set} = xset \
23438   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
23439 done
23440 PS1='$ '
23441 PS2='> '
23442 PS4='+ '
23443
23444 # NLS nuisances.
23445 LC_ALL=C
23446 export LC_ALL
23447 LANGUAGE=C
23448 export LANGUAGE
23449
23450 # CDPATH.
23451 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
23452
23453
23454 # as_fn_error ERROR [LINENO LOG_FD]
23455 # ---------------------------------
23456 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
23457 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
23458 # script with status $?, using 1 if that was 0.
23459 as_fn_error ()
23460 {
23461   as_status=$?; test $as_status -eq 0 && as_status=1
23462   if test "$3"; then
23463     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
23464     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
23465   fi
23466   $as_echo "$as_me: error: $1" >&2
23467   as_fn_exit $as_status
23468 } # as_fn_error
23469
23470
23471 # as_fn_set_status STATUS
23472 # -----------------------
23473 # Set $? to STATUS, without forking.
23474 as_fn_set_status ()
23475 {
23476   return $1
23477 } # as_fn_set_status
23478
23479 # as_fn_exit STATUS
23480 # -----------------
23481 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
23482 as_fn_exit ()
23483 {
23484   set +e
23485   as_fn_set_status $1
23486   exit $1
23487 } # as_fn_exit
23488
23489 # as_fn_unset VAR
23490 # ---------------
23491 # Portably unset VAR.
23492 as_fn_unset ()
23493 {
23494   { eval $1=; unset $1;}
23495 }
23496 as_unset=as_fn_unset
23497 # as_fn_append VAR VALUE
23498 # ----------------------
23499 # Append the text in VALUE to the end of the definition contained in VAR. Take
23500 # advantage of any shell optimizations that allow amortized linear growth over
23501 # repeated appends, instead of the typical quadratic growth present in naive
23502 # implementations.
23503 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
23504   eval 'as_fn_append ()
23505   {
23506     eval $1+=\$2
23507   }'
23508 else
23509   as_fn_append ()
23510   {
23511     eval $1=\$$1\$2
23512   }
23513 fi # as_fn_append
23514
23515 # as_fn_arith ARG...
23516 # ------------------
23517 # Perform arithmetic evaluation on the ARGs, and store the result in the
23518 # global $as_val. Take advantage of shells that can avoid forks. The arguments
23519 # must be portable across $(()) and expr.
23520 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
23521   eval 'as_fn_arith ()
23522   {
23523     as_val=$(( $* ))
23524   }'
23525 else
23526   as_fn_arith ()
23527   {
23528     as_val=`expr "$@" || test $? -eq 1`
23529   }
23530 fi # as_fn_arith
23531
23532
23533 if expr a : '\(a\)' >/dev/null 2>&1 &&
23534    test "X`expr 00001 : '.*\(...\)'`" = X001; then
23535   as_expr=expr
23536 else
23537   as_expr=false
23538 fi
23539
23540 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23541   as_basename=basename
23542 else
23543   as_basename=false
23544 fi
23545
23546 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23547   as_dirname=dirname
23548 else
23549   as_dirname=false
23550 fi
23551
23552 as_me=`$as_basename -- "$0" ||
23553 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23554          X"$0" : 'X\(//\)$' \| \
23555          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23556 $as_echo X/"$0" |
23557     sed '/^.*\/\([^/][^/]*\)\/*$/{
23558             s//\1/
23559             q
23560           }
23561           /^X\/\(\/\/\)$/{
23562             s//\1/
23563             q
23564           }
23565           /^X\/\(\/\).*/{
23566             s//\1/
23567             q
23568           }
23569           s/.*/./; q'`
23570
23571 # Avoid depending upon Character Ranges.
23572 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23573 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23574 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23575 as_cr_digits='0123456789'
23576 as_cr_alnum=$as_cr_Letters$as_cr_digits
23577
23578 ECHO_C= ECHO_N= ECHO_T=
23579 case `echo -n x` in #(((((
23580 -n*)
23581   case `echo 'xy\c'` in
23582   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
23583   xy)  ECHO_C='\c';;
23584   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
23585        ECHO_T=' ';;
23586   esac;;
23587 *)
23588   ECHO_N='-n';;
23589 esac
23590
23591 rm -f conf$$ conf$$.exe conf$$.file
23592 if test -d conf$$.dir; then
23593   rm -f conf$$.dir/conf$$.file
23594 else
23595   rm -f conf$$.dir
23596   mkdir conf$$.dir 2>/dev/null
23597 fi
23598 if (echo >conf$$.file) 2>/dev/null; then
23599   if ln -s conf$$.file conf$$ 2>/dev/null; then
23600     as_ln_s='ln -s'
23601     # ... but there are two gotchas:
23602     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23603     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23604     # In both cases, we have to default to `cp -p'.
23605     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
23606       as_ln_s='cp -p'
23607   elif ln conf$$.file conf$$ 2>/dev/null; then
23608     as_ln_s=ln
23609   else
23610     as_ln_s='cp -p'
23611   fi
23612 else
23613   as_ln_s='cp -p'
23614 fi
23615 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23616 rmdir conf$$.dir 2>/dev/null
23617
23618
23619 # as_fn_mkdir_p
23620 # -------------
23621 # Create "$as_dir" as a directory, including parents if necessary.
23622 as_fn_mkdir_p ()
23623 {
23624
23625   case $as_dir in #(
23626   -*) as_dir=./$as_dir;;
23627   esac
23628   test -d "$as_dir" || eval $as_mkdir_p || {
23629     as_dirs=
23630     while :; do
23631       case $as_dir in #(
23632       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
23633       *) as_qdir=$as_dir;;
23634       esac
23635       as_dirs="'$as_qdir' $as_dirs"
23636       as_dir=`$as_dirname -- "$as_dir" ||
23637 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23638          X"$as_dir" : 'X\(//\)[^/]' \| \
23639          X"$as_dir" : 'X\(//\)$' \| \
23640          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
23641 $as_echo X"$as_dir" |
23642     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23643             s//\1/
23644             q
23645           }
23646           /^X\(\/\/\)[^/].*/{
23647             s//\1/
23648             q
23649           }
23650           /^X\(\/\/\)$/{
23651             s//\1/
23652             q
23653           }
23654           /^X\(\/\).*/{
23655             s//\1/
23656             q
23657           }
23658           s/.*/./; q'`
23659       test -d "$as_dir" && break
23660     done
23661     test -z "$as_dirs" || eval "mkdir $as_dirs"
23662   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
23663
23664
23665 } # as_fn_mkdir_p
23666 if mkdir -p . 2>/dev/null; then
23667   as_mkdir_p='mkdir -p "$as_dir"'
23668 else
23669   test -d ./-p && rmdir ./-p
23670   as_mkdir_p=false
23671 fi
23672
23673 if test -x / >/dev/null 2>&1; then
23674   as_test_x='test -x'
23675 else
23676   if ls -dL / >/dev/null 2>&1; then
23677     as_ls_L_option=L
23678   else
23679     as_ls_L_option=
23680   fi
23681   as_test_x='
23682     eval sh -c '\''
23683       if test -d "$1"; then
23684         test -d "$1/.";
23685       else
23686         case $1 in #(
23687         -*)set "./$1";;
23688         esac;
23689         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
23690         ???[sx]*):;;*)false;;esac;fi
23691     '\'' sh
23692   '
23693 fi
23694 as_executable_p=$as_test_x
23695
23696 # Sed expression to map a string onto a valid CPP name.
23697 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23698
23699 # Sed expression to map a string onto a valid variable name.
23700 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23701
23702
23703 exec 6>&1
23704 ## ----------------------------------- ##
23705 ## Main body of $CONFIG_STATUS script. ##
23706 ## ----------------------------------- ##
23707 _ASEOF
23708 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
23709
23710 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23711 # Save the log message, to keep $0 and so on meaningful, and to
23712 # report actual input values of CONFIG_FILES etc. instead of their
23713 # values after options handling.
23714 ac_log="
23715 This file was extended by gzip $as_me 1.4, which was
23716 generated by GNU Autoconf 2.65.23-13e35.  Invocation command line was
23717
23718   CONFIG_FILES    = $CONFIG_FILES
23719   CONFIG_HEADERS  = $CONFIG_HEADERS
23720   CONFIG_LINKS    = $CONFIG_LINKS
23721   CONFIG_COMMANDS = $CONFIG_COMMANDS
23722   $ $0 $@
23723
23724 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23725 "
23726
23727 _ACEOF
23728
23729 case $ac_config_files in *"
23730 "*) set x $ac_config_files; shift; ac_config_files=$*;;
23731 esac
23732
23733 case $ac_config_headers in *"
23734 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
23735 esac
23736
23737
23738 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23739 # Files that config.status was made for.
23740 config_files="$ac_config_files"
23741 config_headers="$ac_config_headers"
23742 config_links="$ac_config_links"
23743 config_commands="$ac_config_commands"
23744
23745 _ACEOF
23746
23747 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23748 ac_cs_usage="\
23749 \`$as_me' instantiates files and other configuration actions
23750 from templates according to the current configuration.  Unless the files
23751 and actions are specified as TAGs, all are instantiated by default.
23752
23753 Usage: $0 [OPTION]... [TAG]...
23754
23755   -h, --help       print this help, then exit
23756   -V, --version    print version number and configuration settings, then exit
23757       --config     print configuration, then exit
23758   -q, --quiet, --silent
23759                    do not print progress messages
23760   -d, --debug      don't remove temporary files
23761       --recheck    update $as_me by reconfiguring in the same conditions
23762       --file=FILE[:TEMPLATE]
23763                    instantiate the configuration file FILE
23764       --header=FILE[:TEMPLATE]
23765                    instantiate the configuration header FILE
23766
23767 Configuration files:
23768 $config_files
23769
23770 Configuration headers:
23771 $config_headers
23772
23773 Configuration links:
23774 $config_links
23775
23776 Configuration commands:
23777 $config_commands
23778
23779 Report bugs to <bug-gzip@gnu.org>."
23780
23781 _ACEOF
23782 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23783 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
23784 ac_cs_version="\\
23785 gzip config.status 1.4
23786 configured by $0, generated by GNU Autoconf 2.65.23-13e35,
23787   with options \\"\$ac_cs_config\\"
23788
23789 Copyright (C) 2010 Free Software Foundation, Inc.
23790 This config.status script is free software; the Free Software Foundation
23791 gives unlimited permission to copy, distribute and modify it."
23792
23793 ac_pwd='$ac_pwd'
23794 srcdir='$srcdir'
23795 INSTALL='$INSTALL'
23796 MKDIR_P='$MKDIR_P'
23797 AWK='$AWK'
23798 test -n "\$AWK" || AWK=awk
23799 _ACEOF
23800
23801 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23802 # The default lists apply if the user does not specify any file.
23803 ac_need_defaults=:
23804 while test $# != 0
23805 do
23806   case $1 in
23807   --*=*)
23808     ac_option=`expr "X$1" : 'X\([^=]*\)='`
23809     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
23810     ac_shift=:
23811     ;;
23812   *)
23813     ac_option=$1
23814     ac_optarg=$2
23815     ac_shift=shift
23816     ;;
23817   esac
23818
23819   case $ac_option in
23820   # Handling of the options.
23821   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23822     ac_cs_recheck=: ;;
23823   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23824     $as_echo "$ac_cs_version"; exit ;;
23825   --config | --confi | --conf | --con | --co | --c )
23826     $as_echo "$ac_cs_config"; exit ;;
23827   --debug | --debu | --deb | --de | --d | -d )
23828     debug=: ;;
23829   --file | --fil | --fi | --f )
23830     $ac_shift
23831     case $ac_optarg in
23832     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
23833     esac
23834     as_fn_append CONFIG_FILES " '$ac_optarg'"
23835     ac_need_defaults=false;;
23836   --header | --heade | --head | --hea )
23837     $ac_shift
23838     case $ac_optarg in
23839     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
23840     esac
23841     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
23842     ac_need_defaults=false;;
23843   --he | --h)
23844     # Conflict between --help and --header
23845     as_fn_error "ambiguous option: \`$1'
23846 Try \`$0 --help' for more information.";;
23847   --help | --hel | -h )
23848     $as_echo "$ac_cs_usage"; exit ;;
23849   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23850   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23851     ac_cs_silent=: ;;
23852
23853   # This is an error.
23854   -*) as_fn_error "unrecognized option: \`$1'
23855 Try \`$0 --help' for more information." ;;
23856
23857   *) as_fn_append ac_config_targets " $1"
23858      ac_need_defaults=false ;;
23859
23860   esac
23861   shift
23862 done
23863
23864 ac_configure_extra_args=
23865
23866 if $ac_cs_silent; then
23867   exec 6>/dev/null
23868   ac_configure_extra_args="$ac_configure_extra_args --silent"
23869 fi
23870
23871 _ACEOF
23872 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23873 if \$ac_cs_recheck; then
23874   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23875   shift
23876   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
23877   CONFIG_SHELL='$SHELL'
23878   export CONFIG_SHELL
23879   exec "\$@"
23880 fi
23881
23882 _ACEOF
23883 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23884 exec 5>>config.log
23885 {
23886   echo
23887   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23888 ## Running $as_me. ##
23889 _ASBOX
23890   $as_echo "$ac_log"
23891 } >&5
23892
23893 _ACEOF
23894 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23895 #
23896 # INIT-COMMANDS
23897 #
23898 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
23899 GNUmakefile=$GNUmakefile
23900
23901 _ACEOF
23902
23903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23904
23905 # Handling of arguments.
23906 for ac_config_target in $ac_config_targets
23907 do
23908   case $ac_config_target in
23909     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
23910     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
23911     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
23912     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23913     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
23914     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
23915
23916   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
23917   esac
23918 done
23919
23920
23921 # If the user did not use the arguments to specify the items to instantiate,
23922 # then the envvar interface is used.  Set only those that are not.
23923 # We use the long form for the default assignment because of an extremely
23924 # bizarre bug on SunOS 4.1.3.
23925 if $ac_need_defaults; then
23926   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23927   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23928   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23929   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23930 fi
23931
23932 # Have a temporary directory for convenience.  Make it in the build tree
23933 # simply because there is no reason against having it here, and in addition,
23934 # creating and moving files from /tmp can sometimes cause problems.
23935 # Hook for its removal unless debugging.
23936 # Note that there is a small window in which the directory will not be cleaned:
23937 # after its creation but before its name has been assigned to `$tmp'.
23938 $debug ||
23939 {
23940   tmp=
23941   trap 'exit_status=$?
23942   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23943 ' 0
23944   trap 'as_fn_exit 1' 1 2 13 15
23945 }
23946 # Create a (secure) tmp directory for tmp files.
23947
23948 {
23949   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
23950   test -n "$tmp" && test -d "$tmp"
23951 }  ||
23952 {
23953   tmp=./conf$$-$RANDOM
23954   (umask 077 && mkdir "$tmp")
23955 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
23956
23957 # Set up the scripts for CONFIG_FILES section.
23958 # No need to generate them if there are no CONFIG_FILES.
23959 # This happens for instance with `./config.status config.h'.
23960 if test -n "$CONFIG_FILES"; then
23961
23962
23963 ac_cr=`echo X | tr X '\015'`
23964 # On cygwin, bash can eat \r inside `` if the user requested igncr.
23965 # But we know of no other shell where ac_cr would be empty at this
23966 # point, so we can use a bashism as a fallback.
23967 if test "x$ac_cr" = x; then
23968   eval ac_cr=\$\'\\r\'
23969 fi
23970 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
23971 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
23972   ac_cs_awk_cr='\r'
23973 else
23974   ac_cs_awk_cr=$ac_cr
23975 fi
23976
23977 echo 'BEGIN {' >"$tmp/subs1.awk" &&
23978 _ACEOF
23979
23980
23981 {
23982   echo "cat >conf$$subs.awk <<_ACEOF" &&
23983   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
23984   echo "_ACEOF"
23985 } >conf$$subs.sh ||
23986   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23987 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
23988 ac_delim='%!_!# '
23989 for ac_last_try in false false false false false :; do
23990   . ./conf$$subs.sh ||
23991     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23992
23993   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
23994   if test $ac_delim_n = $ac_delim_num; then
23995     break
23996   elif $ac_last_try; then
23997     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
23998   else
23999     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24000   fi
24001 done
24002 rm -f conf$$subs.sh
24003
24004 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24005 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
24006 _ACEOF
24007 sed -n '
24008 h
24009 s/^/S["/; s/!.*/"]=/
24010 p
24011 g
24012 s/^[^!]*!//
24013 :repl
24014 t repl
24015 s/'"$ac_delim"'$//
24016 t delim
24017 :nl
24018 h
24019 s/\(.\{148\}\)..*/\1/
24020 t more1
24021 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
24022 p
24023 n
24024 b repl
24025 :more1
24026 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24027 p
24028 g
24029 s/.\{148\}//
24030 t nl
24031 :delim
24032 h
24033 s/\(.\{148\}\)..*/\1/
24034 t more2
24035 s/["\\]/\\&/g; s/^/"/; s/$/"/
24036 p
24037 b
24038 :more2
24039 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24040 p
24041 g
24042 s/.\{148\}//
24043 t delim
24044 ' <conf$$subs.awk | sed '
24045 /^[^""]/{
24046   N
24047   s/\n//
24048 }
24049 ' >>$CONFIG_STATUS || ac_write_fail=1
24050 rm -f conf$$subs.awk
24051 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24052 _ACAWK
24053 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
24054   for (key in S) S_is_set[key] = 1
24055   FS = "\a"
24056
24057 }
24058 {
24059   line = $ 0
24060   nfields = split(line, field, "@")
24061   substed = 0
24062   len = length(field[1])
24063   for (i = 2; i < nfields; i++) {
24064     key = field[i]
24065     keylen = length(key)
24066     if (S_is_set[key]) {
24067       value = S[key]
24068       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
24069       len += length(value) + length(field[++i])
24070       substed = 1
24071     } else
24072       len += 1 + keylen
24073   }
24074
24075   print line
24076 }
24077
24078 _ACAWK
24079 _ACEOF
24080 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24081 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
24082   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
24083 else
24084   cat
24085 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
24086   || as_fn_error "could not setup config files machinery" "$LINENO" 5
24087 _ACEOF
24088
24089 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24090 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24091 # trailing colons and then remove the whole line if VPATH becomes empty
24092 # (actually we leave an empty line to preserve line numbers).
24093 if test "x$srcdir" = x.; then
24094   ac_vpsub='/^[  ]*VPATH[        ]*=/{
24095 s/:*\$(srcdir):*/:/
24096 s/:*\${srcdir}:*/:/
24097 s/:*@srcdir@:*/:/
24098 s/^\([^=]*=[     ]*\):*/\1/
24099 s/:*$//
24100 s/^[^=]*=[       ]*$//
24101 }'
24102 fi
24103
24104 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24105 fi # test -n "$CONFIG_FILES"
24106
24107 # Set up the scripts for CONFIG_HEADERS section.
24108 # No need to generate them if there are no CONFIG_HEADERS.
24109 # This happens for instance with `./config.status Makefile'.
24110 if test -n "$CONFIG_HEADERS"; then
24111 cat >"$tmp/defines.awk" <<\_ACAWK ||
24112 BEGIN {
24113 _ACEOF
24114
24115 # Transform confdefs.h into an awk script `defines.awk', embedded as
24116 # here-document in config.status, that substitutes the proper values into
24117 # config.h.in to produce config.h.
24118
24119 # Create a delimiter string that does not exist in confdefs.h, to ease
24120 # handling of long lines.
24121 ac_delim='%!_!# '
24122 for ac_last_try in false false :; do
24123   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
24124   if test -z "$ac_t"; then
24125     break
24126   elif $ac_last_try; then
24127     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
24128   else
24129     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24130   fi
24131 done
24132
24133 # For the awk script, D is an array of macro values keyed by name,
24134 # likewise P contains macro parameters if any.  Preserve backslash
24135 # newline sequences.
24136
24137 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24138 sed -n '
24139 s/.\{148\}/&'"$ac_delim"'/g
24140 t rset
24141 :rset
24142 s/^[     ]*#[    ]*define[       ][      ]*/ /
24143 t def
24144 d
24145 :def
24146 s/\\$//
24147 t bsnl
24148 s/["\\]/\\&/g
24149 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
24150 D["\1"]=" \3"/p
24151 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
24152 d
24153 :bsnl
24154 s/["\\]/\\&/g
24155 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
24156 D["\1"]=" \3\\\\\\n"\\/p
24157 t cont
24158 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
24159 t cont
24160 d
24161 :cont
24162 n
24163 s/.\{148\}/&'"$ac_delim"'/g
24164 t clear
24165 :clear
24166 s/\\$//
24167 t bsnlc
24168 s/["\\]/\\&/g; s/^/"/; s/$/"/p
24169 d
24170 :bsnlc
24171 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
24172 b cont
24173 ' <confdefs.h | sed '
24174 s/'"$ac_delim"'/"\\\
24175 "/g' >>$CONFIG_STATUS || ac_write_fail=1
24176
24177 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24178   for (key in D) D_is_set[key] = 1
24179   FS = "\a"
24180 }
24181 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
24182   line = \$ 0
24183   split(line, arg, " ")
24184   if (arg[1] == "#") {
24185     defundef = arg[2]
24186     mac1 = arg[3]
24187   } else {
24188     defundef = substr(arg[1], 2)
24189     mac1 = arg[2]
24190   }
24191   split(mac1, mac2, "(") #)
24192   macro = mac2[1]
24193   prefix = substr(line, 1, index(line, defundef) - 1)
24194   if (D_is_set[macro]) {
24195     # Preserve the white space surrounding the "#".
24196     print prefix "define", macro P[macro] D[macro]
24197     next
24198   } else {
24199     # Replace #undef with comments.  This is necessary, for example,
24200     # in the case of _POSIX_SOURCE, which is predefined and required
24201     # on some systems where configure will not decide to define it.
24202     if (defundef == "undef") {
24203       print "/*", prefix defundef, macro, "*/"
24204       next
24205     }
24206   }
24207 }
24208 { print }
24209 _ACAWK
24210 _ACEOF
24211 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24212   as_fn_error "could not setup config headers machinery" "$LINENO" 5
24213 fi # test -n "$CONFIG_HEADERS"
24214
24215
24216 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
24217 shift
24218 for ac_tag
24219 do
24220   case $ac_tag in
24221   :[FHLC]) ac_mode=$ac_tag; continue;;
24222   esac
24223   case $ac_mode$ac_tag in
24224   :[FHL]*:*);;
24225   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
24226   :[FH]-) ac_tag=-:-;;
24227   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24228   esac
24229   ac_save_IFS=$IFS
24230   IFS=:
24231   set x $ac_tag
24232   IFS=$ac_save_IFS
24233   shift
24234   ac_file=$1
24235   shift
24236
24237   case $ac_mode in
24238   :L) ac_source=$1;;
24239   :[FH])
24240     ac_file_inputs=
24241     for ac_f
24242     do
24243       case $ac_f in
24244       -) ac_f="$tmp/stdin";;
24245       *) # Look for the file first in the build tree, then in the source tree
24246          # (if the path is not absolute).  The absolute path cannot be DOS-style,
24247          # because $ac_f cannot contain `:'.
24248          test -f "$ac_f" ||
24249            case $ac_f in
24250            [\\/$]*) false;;
24251            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24252            esac ||
24253            { as_fn_set_status 1
24254 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5; };;
24255       esac
24256       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
24257       as_fn_append ac_file_inputs " '$ac_f'"
24258     done
24259
24260     # Let's still pretend it is `configure' which instantiates (i.e., don't
24261     # use $as_me), people would be surprised to read:
24262     #    /* config.h.  Generated by config.status.  */
24263     configure_input='Generated from '`
24264           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
24265         `' by configure.'
24266     if test x"$ac_file" != x-; then
24267       configure_input="$ac_file.  $configure_input"
24268       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
24269 $as_echo "$as_me: creating $ac_file" >&6;}
24270     fi
24271     # Neutralize special characters interpreted by sed in replacement strings.
24272     case $configure_input in #(
24273     *\&* | *\|* | *\\* )
24274        ac_sed_conf_input=`$as_echo "$configure_input" |
24275        sed 's/[\\\\&|]/\\\\&/g'`;; #(
24276     *) ac_sed_conf_input=$configure_input;;
24277     esac
24278
24279     case $ac_tag in
24280     *:-:* | *:-) cat >"$tmp/stdin" \
24281       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
24282     esac
24283     ;;
24284   esac
24285
24286   ac_dir=`$as_dirname -- "$ac_file" ||
24287 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24288          X"$ac_file" : 'X\(//\)[^/]' \| \
24289          X"$ac_file" : 'X\(//\)$' \| \
24290          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
24291 $as_echo X"$ac_file" |
24292     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24293             s//\1/
24294             q
24295           }
24296           /^X\(\/\/\)[^/].*/{
24297             s//\1/
24298             q
24299           }
24300           /^X\(\/\/\)$/{
24301             s//\1/
24302             q
24303           }
24304           /^X\(\/\).*/{
24305             s//\1/
24306             q
24307           }
24308           s/.*/./; q'`
24309   as_dir="$ac_dir"; as_fn_mkdir_p
24310   ac_builddir=.
24311
24312 case "$ac_dir" in
24313 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24314 *)
24315   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
24316   # A ".." for each directory in $ac_dir_suffix.
24317   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
24318   case $ac_top_builddir_sub in
24319   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24320   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24321   esac ;;
24322 esac
24323 ac_abs_top_builddir=$ac_pwd
24324 ac_abs_builddir=$ac_pwd$ac_dir_suffix
24325 # for backward compatibility:
24326 ac_top_builddir=$ac_top_build_prefix
24327
24328 case $srcdir in
24329   .)  # We are building in place.
24330     ac_srcdir=.
24331     ac_top_srcdir=$ac_top_builddir_sub
24332     ac_abs_top_srcdir=$ac_pwd ;;
24333   [\\/]* | ?:[\\/]* )  # Absolute name.
24334     ac_srcdir=$srcdir$ac_dir_suffix;
24335     ac_top_srcdir=$srcdir
24336     ac_abs_top_srcdir=$srcdir ;;
24337   *) # Relative name.
24338     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24339     ac_top_srcdir=$ac_top_build_prefix$srcdir
24340     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
24341 esac
24342 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
24343
24344
24345   case $ac_mode in
24346   :F)
24347   #
24348   # CONFIG_FILE
24349   #
24350
24351   case $INSTALL in
24352   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24353   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
24354   esac
24355   ac_MKDIR_P=$MKDIR_P
24356   case $MKDIR_P in
24357   [\\/$]* | ?:[\\/]* ) ;;
24358   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
24359   esac
24360 _ACEOF
24361
24362 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24363 # If the template does not know about datarootdir, expand it.
24364 # FIXME: This hack should be removed a few years after 2.60.
24365 ac_datarootdir_hack=; ac_datarootdir_seen=
24366 ac_sed_dataroot='
24367 /datarootdir/ {
24368   p
24369   q
24370 }
24371 /@datadir@/p
24372 /@docdir@/p
24373 /@infodir@/p
24374 /@localedir@/p
24375 /@mandir@/p'
24376 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
24377 *datarootdir*) ac_datarootdir_seen=yes;;
24378 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24379   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24380 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24381 _ACEOF
24382 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24383   ac_datarootdir_hack='
24384   s&@datadir@&$datadir&g
24385   s&@docdir@&$docdir&g
24386   s&@infodir@&$infodir&g
24387   s&@localedir@&$localedir&g
24388   s&@mandir@&$mandir&g
24389   s&\\\${datarootdir}&$datarootdir&g' ;;
24390 esac
24391 _ACEOF
24392
24393 # Neutralize VPATH when `$srcdir' = `.'.
24394 # Shell code in configure.ac might set extrasub.
24395 # FIXME: do we really want to maintain this feature?
24396 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24397 ac_sed_extra="$ac_vpsub
24398 $extrasub
24399 _ACEOF
24400 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24401 :t
24402 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24403 s|@configure_input@|$ac_sed_conf_input|;t t
24404 s&@top_builddir@&$ac_top_builddir_sub&;t t
24405 s&@top_build_prefix@&$ac_top_build_prefix&;t t
24406 s&@srcdir@&$ac_srcdir&;t t
24407 s&@abs_srcdir@&$ac_abs_srcdir&;t t
24408 s&@top_srcdir@&$ac_top_srcdir&;t t
24409 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24410 s&@builddir@&$ac_builddir&;t t
24411 s&@abs_builddir@&$ac_abs_builddir&;t t
24412 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24413 s&@INSTALL@&$ac_INSTALL&;t t
24414 s&@MKDIR_P@&$ac_MKDIR_P&;t t
24415 $ac_datarootdir_hack
24416 "
24417 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
24418   || as_fn_error "could not create $ac_file" "$LINENO" 5
24419
24420 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24421   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24422   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24423   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24424 which seems to be undefined.  Please make sure it is defined." >&5
24425 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24426 which seems to be undefined.  Please make sure it is defined." >&2;}
24427
24428   rm -f "$tmp/stdin"
24429   case $ac_file in
24430   -) cat "$tmp/out" && rm -f "$tmp/out";;
24431   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
24432   esac \
24433   || as_fn_error "could not create $ac_file" "$LINENO" 5
24434  ;;
24435   :H)
24436   #
24437   # CONFIG_HEADER
24438   #
24439   if test x"$ac_file" != x-; then
24440     {
24441       $as_echo "/* $configure_input  */" \
24442       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
24443     } >"$tmp/config.h" \
24444       || as_fn_error "could not create $ac_file" "$LINENO" 5
24445     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
24446       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
24447 $as_echo "$as_me: $ac_file is unchanged" >&6;}
24448     else
24449       rm -f "$ac_file"
24450       mv "$tmp/config.h" "$ac_file" \
24451         || as_fn_error "could not create $ac_file" "$LINENO" 5
24452     fi
24453   else
24454     $as_echo "/* $configure_input  */" \
24455       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
24456       || as_fn_error "could not create -" "$LINENO" 5
24457   fi
24458 # Compute "$ac_file"'s index in $config_headers.
24459 _am_arg="$ac_file"
24460 _am_stamp_count=1
24461 for _am_header in $config_headers :; do
24462   case $_am_header in
24463     $_am_arg | $_am_arg:* )
24464       break ;;
24465     * )
24466       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
24467   esac
24468 done
24469 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
24470 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24471          X"$_am_arg" : 'X\(//\)[^/]' \| \
24472          X"$_am_arg" : 'X\(//\)$' \| \
24473          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
24474 $as_echo X"$_am_arg" |
24475     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24476             s//\1/
24477             q
24478           }
24479           /^X\(\/\/\)[^/].*/{
24480             s//\1/
24481             q
24482           }
24483           /^X\(\/\/\)$/{
24484             s//\1/
24485             q
24486           }
24487           /^X\(\/\).*/{
24488             s//\1/
24489             q
24490           }
24491           s/.*/./; q'`/stamp-h$_am_stamp_count
24492  ;;
24493   :L)
24494   #
24495   # CONFIG_LINK
24496   #
24497
24498   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
24499     :
24500   else
24501     # Prefer the file from the source tree if names are identical.
24502     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
24503       ac_source=$srcdir/$ac_source
24504     fi
24505
24506     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
24507 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
24508
24509     if test ! -r "$ac_source"; then
24510       as_fn_error "$ac_source: file not found" "$LINENO" 5
24511     fi
24512     rm -f "$ac_file"
24513
24514     # Try a relative symlink, then a hard link, then a copy.
24515     case $ac_source in
24516     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
24517         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
24518     esac
24519     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
24520       ln "$ac_source" "$ac_file" 2>/dev/null ||
24521       cp -p "$ac_source" "$ac_file" ||
24522       as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
24523   fi
24524  ;;
24525   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
24526 $as_echo "$as_me: executing $ac_file commands" >&6;}
24527  ;;
24528   esac
24529
24530
24531   case $ac_file$ac_mode in
24532     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
24533   # Autoconf 2.62 quotes --file arguments for eval, but not when files
24534   # are listed without --file.  Let's play safe and only enable the eval
24535   # if we detect the quoting.
24536   case $CONFIG_FILES in
24537   *\'*) eval set x "$CONFIG_FILES" ;;
24538   *)   set x $CONFIG_FILES ;;
24539   esac
24540   shift
24541   for mf
24542   do
24543     # Strip MF so we end up with the name of the file.
24544     mf=`echo "$mf" | sed -e 's/:.*$//'`
24545     # Check whether this is an Automake generated Makefile or not.
24546     # We used to match only the files named `Makefile.in', but
24547     # some people rename them; so instead we look at the file content.
24548     # Grep'ing the first line is not enough: some people post-process
24549     # each Makefile.in and add a new line on top of each file to say so.
24550     # Grep'ing the whole file is not good either: AIX grep has a line
24551     # limit of 2048, but all sed's we know have understand at least 4000.
24552     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
24553       dirpart=`$as_dirname -- "$mf" ||
24554 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24555          X"$mf" : 'X\(//\)[^/]' \| \
24556          X"$mf" : 'X\(//\)$' \| \
24557          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
24558 $as_echo X"$mf" |
24559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24560             s//\1/
24561             q
24562           }
24563           /^X\(\/\/\)[^/].*/{
24564             s//\1/
24565             q
24566           }
24567           /^X\(\/\/\)$/{
24568             s//\1/
24569             q
24570           }
24571           /^X\(\/\).*/{
24572             s//\1/
24573             q
24574           }
24575           s/.*/./; q'`
24576     else
24577       continue
24578     fi
24579     # Extract the definition of DEPDIR, am__include, and am__quote
24580     # from the Makefile without running `make'.
24581     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
24582     test -z "$DEPDIR" && continue
24583     am__include=`sed -n 's/^am__include = //p' < "$mf"`
24584     test -z "am__include" && continue
24585     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
24586     # When using ansi2knr, U may be empty or an underscore; expand it
24587     U=`sed -n 's/^U = //p' < "$mf"`
24588     # Find all dependency output files, they are included files with
24589     # $(DEPDIR) in their names.  We invoke sed twice because it is the
24590     # simplest approach to changing $(DEPDIR) to its actual value in the
24591     # expansion.
24592     for file in `sed -n "
24593       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
24594          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
24595       # Make sure the directory exists.
24596       test -f "$dirpart/$file" && continue
24597       fdir=`$as_dirname -- "$file" ||
24598 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24599          X"$file" : 'X\(//\)[^/]' \| \
24600          X"$file" : 'X\(//\)$' \| \
24601          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
24602 $as_echo X"$file" |
24603     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24604             s//\1/
24605             q
24606           }
24607           /^X\(\/\/\)[^/].*/{
24608             s//\1/
24609             q
24610           }
24611           /^X\(\/\/\)$/{
24612             s//\1/
24613             q
24614           }
24615           /^X\(\/\).*/{
24616             s//\1/
24617             q
24618           }
24619           s/.*/./; q'`
24620       as_dir=$dirpart/$fdir; as_fn_mkdir_p
24621       # echo "creating $dirpart/$file"
24622       echo '# dummy' > "$dirpart/$file"
24623     done
24624   done
24625 }
24626  ;;
24627
24628   esac
24629 done # for ac_tag
24630
24631
24632 as_fn_exit 0
24633 _ACEOF
24634 ac_clean_files=$ac_clean_files_save
24635
24636 test $ac_write_fail = 0 ||
24637   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
24638
24639
24640 # configure is writing to config.log, and then calls config.status.
24641 # config.status does its own redirection, appending to config.log.
24642 # Unfortunately, on DOS this fails, as config.log is still kept open
24643 # by configure, so config.status won't be able to write to it; its
24644 # output is simply discarded.  So we exec the FD to /dev/null,
24645 # effectively closing config.log, so it can be properly (re)opened and
24646 # appended to by config.status.  When coming back to configure, we
24647 # need to make the FD available again.
24648 if test "$no_create" != yes; then
24649   ac_cs_success=:
24650   ac_config_status_args=
24651   test "$silent" = yes &&
24652     ac_config_status_args="$ac_config_status_args --quiet"
24653   exec 5>/dev/null
24654   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24655   exec 5>>config.log
24656   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24657   # would make configure fail if this is the last instruction.
24658   $ac_cs_success || as_fn_exit 1
24659 fi
24660 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
24661   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
24662 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
24663 fi
24664