Merge tag 'upstream/1.5'
[debian/gzip] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.4-560f for gzip 1.5.
4 #
5 # Report bugs to <bug-gzip@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202   if (eval "$as_required") 2>/dev/null; then :
203   as_have_required=yes
204 else
205   as_have_required=no
206 fi
207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
214   IFS=$as_save_IFS
215   test -z "$as_dir" && as_dir=.
216   as_found=:
217   case $as_dir in #(
218          /*)
219            for as_base in sh bash ksh sh5; do
220              # Try only shells that exist, to save several forks.
221              as_shell=$as_dir/$as_base
222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   CONFIG_SHELL=$as_shell as_have_required=yes
225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   break 2
227 fi
228 fi
229            done;;
230        esac
231   as_found=false
232 done
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235   CONFIG_SHELL=$SHELL as_have_required=yes
236 fi; }
237 IFS=$as_save_IFS
238
239
240       if test "x$CONFIG_SHELL" != x; then :
241   export CONFIG_SHELL
242              # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250   *v*x* | *x*v* ) as_opts=-vx ;;
251   *v* ) as_opts=-v ;;
252   *x* ) as_opts=-x ;;
253   * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262     if test x$as_have_required = xno; then :
263   $as_echo "$0: This script requires a shell more modern than all"
264   $as_echo "$0: the shells that I found on your system."
265   if test x${ZSH_VERSION+set} = xset ; then
266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268   else
269     $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
273 $0: have one."
274   fi
275   exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293   { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
300 as_fn_set_status ()
301 {
302   return $1
303 } # as_fn_set_status
304
305 # as_fn_exit STATUS
306 # -----------------
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308 as_fn_exit ()
309 {
310   set +e
311   as_fn_set_status $1
312   exit $1
313 } # as_fn_exit
314
315 # as_fn_mkdir_p
316 # -------------
317 # Create "$as_dir" as a directory, including parents if necessary.
318 as_fn_mkdir_p ()
319 {
320
321   case $as_dir in #(
322   -*) as_dir=./$as_dir;;
323   esac
324   test -d "$as_dir" || eval $as_mkdir_p || {
325     as_dirs=
326     while :; do
327       case $as_dir in #(
328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329       *) as_qdir=$as_dir;;
330       esac
331       as_dirs="'$as_qdir' $as_dirs"
332       as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334          X"$as_dir" : 'X\(//\)[^/]' \| \
335          X"$as_dir" : 'X\(//\)$' \| \
336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339             s//\1/
340             q
341           }
342           /^X\(\/\/\)[^/].*/{
343             s//\1/
344             q
345           }
346           /^X\(\/\/\)$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\).*/{
351             s//\1/
352             q
353           }
354           s/.*/./; q'`
355       test -d "$as_dir" && break
356     done
357     test -z "$as_dirs" || eval "mkdir $as_dirs"
358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361 } # as_fn_mkdir_p
362
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
367 {
368   test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
375 # implementations.
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377   eval 'as_fn_append ()
378   {
379     eval $1+=\$2
380   }'
381 else
382   as_fn_append ()
383   {
384     eval $1=\$$1\$2
385   }
386 fi # as_fn_append
387
388 # as_fn_arith ARG...
389 # ------------------
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394   eval 'as_fn_arith ()
395   {
396     as_val=$(( $* ))
397   }'
398 else
399   as_fn_arith ()
400   {
401     as_val=`expr "$@" || test $? -eq 1`
402   }
403 fi # as_fn_arith
404
405
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
411 as_fn_error ()
412 {
413   as_status=$1; test $as_status -eq 0 && as_status=1
414   if test "$4"; then
415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417   fi
418   $as_echo "$as_me: error: $2" >&2
419   as_fn_exit $as_status
420 } # as_fn_error
421
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
424   as_expr=expr
425 else
426   as_expr=false
427 fi
428
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430   as_basename=basename
431 else
432   as_basename=false
433 fi
434
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436   as_dirname=dirname
437 else
438   as_dirname=false
439 fi
440
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443          X"$0" : 'X\(//\)$' \| \
444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445 $as_echo X/"$0" |
446     sed '/^.*\/\([^/][^/]*\)\/*$/{
447             s//\1/
448             q
449           }
450           /^X\/\(\/\/\)$/{
451             s//\1/
452             q
453           }
454           /^X\/\(\/\).*/{
455             s//\1/
456             q
457           }
458           s/.*/./; q'`
459
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473   sed -n '
474     p
475     /[$]LINENO/=
476   ' <$as_myself |
477     sed '
478       s/[$]LINENO.*/&-/
479       t lineno
480       b
481       :lineno
482       N
483       :loop
484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485       t loop
486       s/-\n.*//
487     ' >$as_me.lineno &&
488   chmod +x "$as_me.lineno" ||
489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492   # already done that, so ensure we don't try to do so again and fall
493   # in an infinite loop.  This has already happened in practice.
494   _as_can_reexec=no; export _as_can_reexec
495   # Don't try to exec as it changes $[0], causing all sort of problems
496   # (the dirname of $[0] is not the place where we might find the
497   # original and so on.  Autoconf is especially sensitive to this).
498   . "./$as_me.lineno"
499   # Exit status is that of the last command.
500   exit
501 }
502
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
505 -n*)
506   case `echo 'xy\c'` in
507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
508   xy)  ECHO_C='\c';;
509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510        ECHO_T=' ';;
511   esac;;
512 *)
513   ECHO_N='-n';;
514 esac
515
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518   rm -f conf$$.dir/conf$$.file
519 else
520   rm -f conf$$.dir
521   mkdir conf$$.dir 2>/dev/null
522 fi
523 if (echo >conf$$.file) 2>/dev/null; then
524   if ln -s conf$$.file conf$$ 2>/dev/null; then
525     as_ln_s='ln -s'
526     # ... but there are two gotchas:
527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529     # In both cases, we have to default to `cp -pR'.
530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531       as_ln_s='cp -pR'
532   elif ln conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s=ln
534   else
535     as_ln_s='cp -pR'
536   fi
537 else
538   as_ln_s='cp -pR'
539 fi
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
542
543 if mkdir -p . 2>/dev/null; then
544   as_mkdir_p='mkdir -p "$as_dir"'
545 else
546   test -d ./-p && rmdir ./-p
547   as_mkdir_p=false
548 fi
549
550 as_test_x='test -x'
551 as_executable_p=as_fn_executable_p
552
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560 test -n "$DJDIR" || exec 7<&0 </dev/null
561 exec 6>&1
562
563 # Name of the host.
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568 #
569 # Initializations.
570 #
571 ac_default_prefix=/usr/local
572 ac_clean_files=
573 ac_config_libobj_dir=.
574 LIBOBJS=
575 cross_compiling=no
576 subdirs=
577 MFLAGS=
578 MAKEFLAGS=
579
580 # Identity of this package.
581 PACKAGE_NAME='gzip'
582 PACKAGE_TARNAME='gzip'
583 PACKAGE_VERSION='1.5'
584 PACKAGE_STRING='gzip 1.5'
585 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
586 PACKAGE_URL=''
587
588 ac_unique_file="gzip.c"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
591 #include <stdio.h>
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
594 #endif
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
597 #endif
598 #ifdef STDC_HEADERS
599 # include <stdlib.h>
600 # include <stddef.h>
601 #else
602 # ifdef HAVE_STDLIB_H
603 #  include <stdlib.h>
604 # endif
605 #endif
606 #ifdef HAVE_STRING_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608 #  include <memory.h>
609 # endif
610 # include <string.h>
611 #endif
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
614 #endif
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
617 #endif
618 #ifdef HAVE_STDINT_H
619 # include <stdint.h>
620 #endif
621 #ifdef HAVE_UNISTD_H
622 # include <unistd.h>
623 #endif"
624
625 gl_use_threads_default=
626 ac_header_list=
627 ac_func_list=
628 gl_getopt_required=POSIX
629 gl_getopt_required=POSIX
630 ac_subst_vars='gltests_LTLIBOBJS
631 gltests_LIBOBJS
632 gl_LTLIBOBJS
633 gl_LIBOBJS
634 CONFIG_INCLUDE
635 am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 ASFLAGS_config
639 LIBOBJS
640 ASCPPFLAGS
641 ASCPPPOST
642 GNULIB_WARN_CFLAGS
643 WARN_CFLAGS
644 WERROR_CFLAGS
645 LIBGZIP_LTLIBDEPS
646 LIBGZIP_LIBDEPS
647 gltests_WITNESS
648 REPLACE_TOWLOWER
649 REPLACE_ISWCNTRL
650 HAVE_WCTYPE_H
651 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
652 NEXT_WCTYPE_H
653 HAVE_ISWCNTRL
654 REPLACE_ISWBLANK
655 HAVE_WCTRANS_T
656 HAVE_WCTYPE_T
657 HAVE_ISWBLANK
658 GNULIB_TOWCTRANS
659 GNULIB_WCTRANS
660 GNULIB_ISWCTYPE
661 GNULIB_WCTYPE
662 GNULIB_ISWBLANK
663 HAVE_WINT_T
664 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
665 NEXT_WCHAR_H
666 HAVE_UNISTD_H
667 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
668 NEXT_UNISTD_H
669 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
670 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
671 TIME_H_DEFINES_STRUCT_TIMESPEC
672 NEXT_AS_FIRST_DIRECTIVE_TIME_H
673 NEXT_TIME_H
674 REPLACE_TIMEGM
675 REPLACE_NANOSLEEP
676 REPLACE_MKTIME
677 REPLACE_LOCALTIME_R
678 HAVE_TIMEGM
679 HAVE_STRPTIME
680 HAVE_NANOSLEEP
681 HAVE_DECL_LOCALTIME_R
682 GNULIB_TIME_R
683 GNULIB_TIMEGM
684 GNULIB_STRPTIME
685 GNULIB_NANOSLEEP
686 GNULIB_MKTIME
687 NEXT_AS_FIRST_DIRECTIVE_STRING_H
688 NEXT_STRING_H
689 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
690 NEXT_STDLIB_H
691 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
692 NEXT_STDIO_H
693 GL_GENERATE_STDINT_H_FALSE
694 GL_GENERATE_STDINT_H_TRUE
695 STDINT_H
696 WINT_T_SUFFIX
697 WCHAR_T_SUFFIX
698 SIG_ATOMIC_T_SUFFIX
699 SIZE_T_SUFFIX
700 PTRDIFF_T_SUFFIX
701 HAVE_SIGNED_WINT_T
702 HAVE_SIGNED_WCHAR_T
703 HAVE_SIGNED_SIG_ATOMIC_T
704 BITSIZEOF_WINT_T
705 BITSIZEOF_WCHAR_T
706 BITSIZEOF_SIG_ATOMIC_T
707 BITSIZEOF_SIZE_T
708 BITSIZEOF_PTRDIFF_T
709 HAVE_SYS_BITYPES_H
710 HAVE_SYS_INTTYPES_H
711 HAVE_STDINT_H
712 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
713 NEXT_STDINT_H
714 HAVE_SYS_TYPES_H
715 HAVE_INTTYPES_H
716 HAVE_WCHAR_H
717 HAVE_UNSIGNED_LONG_LONG_INT
718 HAVE_LONG_LONG_INT
719 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
720 NEXT_STDDEF_H
721 GL_GENERATE_STDDEF_H_FALSE
722 GL_GENERATE_STDDEF_H_TRUE
723 STDDEF_H
724 HAVE_WCHAR_T
725 REPLACE_NULL
726 HAVE__BOOL
727 GL_GENERATE_STDBOOL_H_FALSE
728 GL_GENERATE_STDBOOL_H_TRUE
729 STDBOOL_H
730 ASM_SYMBOL_PREFIX
731 UNDEFINE_STRTOK_R
732 REPLACE_STRTOK_R
733 REPLACE_STRSIGNAL
734 REPLACE_STRNLEN
735 REPLACE_STRNDUP
736 REPLACE_STRNCAT
737 REPLACE_STRERROR_R
738 REPLACE_STRERROR
739 REPLACE_STRCHRNUL
740 REPLACE_STRCASESTR
741 REPLACE_STRSTR
742 REPLACE_STRDUP
743 REPLACE_STPNCPY
744 REPLACE_MEMMEM
745 REPLACE_MEMCHR
746 HAVE_STRVERSCMP
747 HAVE_DECL_STRSIGNAL
748 HAVE_DECL_STRERROR_R
749 HAVE_DECL_STRTOK_R
750 HAVE_STRCASESTR
751 HAVE_STRSEP
752 HAVE_STRPBRK
753 HAVE_DECL_STRNLEN
754 HAVE_DECL_STRNDUP
755 HAVE_DECL_STRDUP
756 HAVE_STRCHRNUL
757 HAVE_STPNCPY
758 HAVE_STPCPY
759 HAVE_RAWMEMCHR
760 HAVE_DECL_MEMRCHR
761 HAVE_MEMPCPY
762 HAVE_DECL_MEMMEM
763 HAVE_MEMCHR
764 HAVE_FFSLL
765 HAVE_FFSL
766 HAVE_MBSLEN
767 GNULIB_STRVERSCMP
768 GNULIB_STRSIGNAL
769 GNULIB_STRERROR_R
770 GNULIB_STRERROR
771 GNULIB_MBSTOK_R
772 GNULIB_MBSSEP
773 GNULIB_MBSSPN
774 GNULIB_MBSPBRK
775 GNULIB_MBSCSPN
776 GNULIB_MBSCASESTR
777 GNULIB_MBSPCASECMP
778 GNULIB_MBSNCASECMP
779 GNULIB_MBSCASECMP
780 GNULIB_MBSSTR
781 GNULIB_MBSRCHR
782 GNULIB_MBSCHR
783 GNULIB_MBSNLEN
784 GNULIB_MBSLEN
785 GNULIB_STRTOK_R
786 GNULIB_STRCASESTR
787 GNULIB_STRSTR
788 GNULIB_STRSEP
789 GNULIB_STRPBRK
790 GNULIB_STRNLEN
791 GNULIB_STRNDUP
792 GNULIB_STRNCAT
793 GNULIB_STRDUP
794 GNULIB_STRCHRNUL
795 GNULIB_STPNCPY
796 GNULIB_STPCPY
797 GNULIB_RAWMEMCHR
798 GNULIB_MEMRCHR
799 GNULIB_MEMPCPY
800 GNULIB_MEMMEM
801 GNULIB_MEMCHR
802 GNULIB_FFSLL
803 GNULIB_FFSL
804 LOCALE_FR_UTF8
805 LOCALE_ZH_CN
806 LOCALE_JA
807 REPLACE_WCSWIDTH
808 REPLACE_WCWIDTH
809 REPLACE_WCSNRTOMBS
810 REPLACE_WCSRTOMBS
811 REPLACE_WCRTOMB
812 REPLACE_MBSNRTOWCS
813 REPLACE_MBSRTOWCS
814 REPLACE_MBRLEN
815 REPLACE_MBRTOWC
816 REPLACE_MBSINIT
817 REPLACE_WCTOB
818 REPLACE_BTOWC
819 REPLACE_MBSTATE_T
820 HAVE_DECL_WCWIDTH
821 HAVE_DECL_WCTOB
822 HAVE_WCSWIDTH
823 HAVE_WCSTOK
824 HAVE_WCSSTR
825 HAVE_WCSPBRK
826 HAVE_WCSSPN
827 HAVE_WCSCSPN
828 HAVE_WCSRCHR
829 HAVE_WCSCHR
830 HAVE_WCSDUP
831 HAVE_WCSXFRM
832 HAVE_WCSCOLL
833 HAVE_WCSNCASECMP
834 HAVE_WCSCASECMP
835 HAVE_WCSNCMP
836 HAVE_WCSCMP
837 HAVE_WCSNCAT
838 HAVE_WCSCAT
839 HAVE_WCPNCPY
840 HAVE_WCSNCPY
841 HAVE_WCPCPY
842 HAVE_WCSCPY
843 HAVE_WCSNLEN
844 HAVE_WCSLEN
845 HAVE_WMEMSET
846 HAVE_WMEMMOVE
847 HAVE_WMEMCPY
848 HAVE_WMEMCMP
849 HAVE_WMEMCHR
850 HAVE_WCSNRTOMBS
851 HAVE_WCSRTOMBS
852 HAVE_WCRTOMB
853 HAVE_MBSNRTOWCS
854 HAVE_MBSRTOWCS
855 HAVE_MBRLEN
856 HAVE_MBRTOWC
857 HAVE_MBSINIT
858 HAVE_BTOWC
859 GNULIB_WCSWIDTH
860 GNULIB_WCSTOK
861 GNULIB_WCSSTR
862 GNULIB_WCSPBRK
863 GNULIB_WCSSPN
864 GNULIB_WCSCSPN
865 GNULIB_WCSRCHR
866 GNULIB_WCSCHR
867 GNULIB_WCSDUP
868 GNULIB_WCSXFRM
869 GNULIB_WCSCOLL
870 GNULIB_WCSNCASECMP
871 GNULIB_WCSCASECMP
872 GNULIB_WCSNCMP
873 GNULIB_WCSCMP
874 GNULIB_WCSNCAT
875 GNULIB_WCSCAT
876 GNULIB_WCPNCPY
877 GNULIB_WCSNCPY
878 GNULIB_WCPCPY
879 GNULIB_WCSCPY
880 GNULIB_WCSNLEN
881 GNULIB_WCSLEN
882 GNULIB_WMEMSET
883 GNULIB_WMEMMOVE
884 GNULIB_WMEMCPY
885 GNULIB_WMEMCMP
886 GNULIB_WMEMCHR
887 GNULIB_WCWIDTH
888 GNULIB_WCSNRTOMBS
889 GNULIB_WCSRTOMBS
890 GNULIB_WCRTOMB
891 GNULIB_MBSNRTOWCS
892 GNULIB_MBSRTOWCS
893 GNULIB_MBRLEN
894 GNULIB_MBRTOWC
895 GNULIB_MBSINIT
896 GNULIB_WCTOB
897 GNULIB_BTOWC
898 NEXT_AS_FIRST_DIRECTIVE_MATH_H
899 NEXT_MATH_H
900 LTLIBMULTITHREAD
901 LIBMULTITHREAD
902 LTLIBTHREAD
903 LIBTHREAD
904 LIBPTH_PREFIX
905 LTLIBPTH
906 LIBPTH
907 LOCALCHARSET_TESTS_ENVIRONMENT
908 GLIBC21
909 IGNORE_UNUSED_LIBRARIES_CFLAGS
910 GNU_MAKE_FALSE
911 GNU_MAKE_TRUE
912 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
913 NEXT_SYS_TIME_H
914 REPLACE_STRUCT_TIMEVAL
915 REPLACE_GETTIMEOFDAY
916 HAVE_SYS_TIME_H
917 HAVE_STRUCT_TIMEVAL
918 HAVE_GETTIMEOFDAY
919 GNULIB_GETTIMEOFDAY
920 LTLIBINTL
921 LIBINTL
922 GNULIB_GL_UNISTD_H_GETOPT
923 GETOPT_H
924 HAVE_GETOPT_H
925 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
926 NEXT_GETOPT_H
927 WINDOWS_64_BIT_ST_SIZE
928 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
929 NEXT_SYS_STAT_H
930 REPLACE_UTIMENSAT
931 REPLACE_STAT
932 REPLACE_MKNOD
933 REPLACE_MKFIFO
934 REPLACE_MKDIR
935 REPLACE_LSTAT
936 REPLACE_FUTIMENS
937 REPLACE_FSTATAT
938 REPLACE_FSTAT
939 HAVE_UTIMENSAT
940 HAVE_MKNODAT
941 HAVE_MKNOD
942 HAVE_MKFIFOAT
943 HAVE_MKFIFO
944 HAVE_MKDIRAT
945 HAVE_LSTAT
946 HAVE_LCHMOD
947 HAVE_FUTIMENS
948 HAVE_FSTATAT
949 HAVE_FCHMODAT
950 GNULIB_UTIMENSAT
951 GNULIB_STAT
952 GNULIB_MKNODAT
953 GNULIB_MKNOD
954 GNULIB_MKFIFOAT
955 GNULIB_MKFIFO
956 GNULIB_MKDIRAT
957 GNULIB_LSTAT
958 GNULIB_LCHMOD
959 GNULIB_FUTIMENS
960 GNULIB_FSTATAT
961 GNULIB_FSTAT
962 GNULIB_FCHMODAT
963 WINDOWS_64_BIT_OFF_T
964 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
965 NEXT_SYS_TYPES_H
966 REPLACE_TRUNCL
967 REPLACE_TRUNCF
968 REPLACE_TRUNC
969 REPLACE_SQRTL
970 REPLACE_SIGNBIT_USING_GCC
971 REPLACE_SIGNBIT
972 REPLACE_ROUNDL
973 REPLACE_ROUNDF
974 REPLACE_ROUND
975 REPLACE_REMAINDERL
976 REPLACE_REMAINDERF
977 REPLACE_REMAINDER
978 REPLACE_NAN
979 REPLACE_MODFL
980 REPLACE_MODFF
981 REPLACE_MODF
982 REPLACE_LOGBL
983 REPLACE_LOGBF
984 REPLACE_LOGB
985 REPLACE_LOG2L
986 REPLACE_LOG2F
987 REPLACE_LOG2
988 REPLACE_LOG1PL
989 REPLACE_LOG1PF
990 REPLACE_LOG1P
991 REPLACE_LOG10L
992 REPLACE_LOG10F
993 REPLACE_LOG10
994 REPLACE_LOGL
995 REPLACE_LOGF
996 REPLACE_LOG
997 REPLACE_LDEXPL
998 REPLACE_ISNAN
999 REPLACE_ISINF
1000 REPLACE_ISFINITE
1001 REPLACE_ILOGBF
1002 REPLACE_ILOGB
1003 REPLACE_HYPOTL
1004 REPLACE_HYPOTF
1005 REPLACE_HYPOT
1006 REPLACE_HUGE_VAL
1007 REPLACE_FREXPL
1008 REPLACE_FREXP
1009 REPLACE_FREXPF
1010 REPLACE_FMODL
1011 REPLACE_FMODF
1012 REPLACE_FMOD
1013 REPLACE_FMAL
1014 REPLACE_FMAF
1015 REPLACE_FMA
1016 REPLACE_FLOORL
1017 REPLACE_FLOORF
1018 REPLACE_FLOOR
1019 REPLACE_FABSL
1020 REPLACE_EXP2L
1021 REPLACE_EXP2
1022 REPLACE_EXPM1F
1023 REPLACE_EXPM1
1024 REPLACE_CEILL
1025 REPLACE_CEILF
1026 REPLACE_CEIL
1027 REPLACE_CBRTL
1028 REPLACE_CBRTF
1029 HAVE_DECL_TRUNCL
1030 HAVE_DECL_TRUNCF
1031 HAVE_DECL_TRUNC
1032 HAVE_DECL_TANL
1033 HAVE_DECL_SQRTL
1034 HAVE_DECL_SINL
1035 HAVE_DECL_ROUNDL
1036 HAVE_DECL_ROUNDF
1037 HAVE_DECL_ROUND
1038 HAVE_DECL_RINTF
1039 HAVE_DECL_REMAINDERL
1040 HAVE_DECL_REMAINDER
1041 HAVE_DECL_LOGB
1042 HAVE_DECL_LOG2L
1043 HAVE_DECL_LOG2F
1044 HAVE_DECL_LOG2
1045 HAVE_DECL_LOG10L
1046 HAVE_DECL_LOGL
1047 HAVE_DECL_LDEXPL
1048 HAVE_DECL_FREXPL
1049 HAVE_DECL_FLOORL
1050 HAVE_DECL_FLOORF
1051 HAVE_DECL_EXPM1L
1052 HAVE_DECL_EXP2L
1053 HAVE_DECL_EXP2F
1054 HAVE_DECL_EXP2
1055 HAVE_DECL_EXPL
1056 HAVE_DECL_COSL
1057 HAVE_DECL_COPYSIGNF
1058 HAVE_DECL_CEILL
1059 HAVE_DECL_CEILF
1060 HAVE_DECL_CBRTL
1061 HAVE_DECL_CBRTF
1062 HAVE_DECL_ATANL
1063 HAVE_DECL_ASINL
1064 HAVE_DECL_ACOSL
1065 HAVE_TANHF
1066 HAVE_TANL
1067 HAVE_TANF
1068 HAVE_SQRTL
1069 HAVE_SQRTF
1070 HAVE_SINHF
1071 HAVE_SINL
1072 HAVE_SINF
1073 HAVE_RINTL
1074 HAVE_RINT
1075 HAVE_REMAINDERF
1076 HAVE_REMAINDER
1077 HAVE_POWF
1078 HAVE_MODFL
1079 HAVE_MODFF
1080 HAVE_LOGBL
1081 HAVE_LOGBF
1082 HAVE_LOG1PL
1083 HAVE_LOG1PF
1084 HAVE_LOG1P
1085 HAVE_LOG10L
1086 HAVE_LOG10F
1087 HAVE_LOGL
1088 HAVE_LOGF
1089 HAVE_LDEXPF
1090 HAVE_ISNANL
1091 HAVE_ISNAND
1092 HAVE_ISNANF
1093 HAVE_ILOGBL
1094 HAVE_ILOGBF
1095 HAVE_ILOGB
1096 HAVE_HYPOTL
1097 HAVE_HYPOTF
1098 HAVE_FREXPF
1099 HAVE_FMODL
1100 HAVE_FMODF
1101 HAVE_FMAL
1102 HAVE_FMAF
1103 HAVE_FMA
1104 HAVE_FABSL
1105 HAVE_FABSF
1106 HAVE_EXPM1F
1107 HAVE_EXPM1
1108 HAVE_EXPL
1109 HAVE_EXPF
1110 HAVE_COSHF
1111 HAVE_COSL
1112 HAVE_COSF
1113 HAVE_COPYSIGNL
1114 HAVE_COPYSIGN
1115 HAVE_CBRTL
1116 HAVE_CBRTF
1117 HAVE_CBRT
1118 HAVE_ATAN2F
1119 HAVE_ATANL
1120 HAVE_ATANF
1121 HAVE_ASINL
1122 HAVE_ASINF
1123 HAVE_ACOSL
1124 HAVE_ACOSF
1125 GNULIB_TRUNCL
1126 GNULIB_TRUNCF
1127 GNULIB_TRUNC
1128 GNULIB_TANHF
1129 GNULIB_TANL
1130 GNULIB_TANF
1131 GNULIB_SQRTL
1132 GNULIB_SQRTF
1133 GNULIB_SINHF
1134 GNULIB_SINL
1135 GNULIB_SINF
1136 GNULIB_SIGNBIT
1137 GNULIB_ROUNDL
1138 GNULIB_ROUNDF
1139 GNULIB_ROUND
1140 GNULIB_RINTL
1141 GNULIB_RINTF
1142 GNULIB_RINT
1143 GNULIB_REMAINDERL
1144 GNULIB_REMAINDERF
1145 GNULIB_REMAINDER
1146 GNULIB_POWF
1147 GNULIB_MODFL
1148 GNULIB_MODFF
1149 GNULIB_MODF
1150 GNULIB_LOGBL
1151 GNULIB_LOGBF
1152 GNULIB_LOGB
1153 GNULIB_LOG2L
1154 GNULIB_LOG2F
1155 GNULIB_LOG2
1156 GNULIB_LOG1PL
1157 GNULIB_LOG1PF
1158 GNULIB_LOG1P
1159 GNULIB_LOG10L
1160 GNULIB_LOG10F
1161 GNULIB_LOG10
1162 GNULIB_LOGL
1163 GNULIB_LOGF
1164 GNULIB_LOG
1165 GNULIB_LDEXPL
1166 GNULIB_LDEXPF
1167 GNULIB_ISNANL
1168 GNULIB_ISNAND
1169 GNULIB_ISNANF
1170 GNULIB_ISNAN
1171 GNULIB_ISINF
1172 GNULIB_ISFINITE
1173 GNULIB_ILOGBL
1174 GNULIB_ILOGBF
1175 GNULIB_ILOGB
1176 GNULIB_HYPOTL
1177 GNULIB_HYPOTF
1178 GNULIB_HYPOT
1179 GNULIB_FREXPL
1180 GNULIB_FREXP
1181 GNULIB_FREXPF
1182 GNULIB_FMODL
1183 GNULIB_FMODF
1184 GNULIB_FMOD
1185 GNULIB_FMAL
1186 GNULIB_FMAF
1187 GNULIB_FMA
1188 GNULIB_FLOORL
1189 GNULIB_FLOORF
1190 GNULIB_FLOOR
1191 GNULIB_FABSL
1192 GNULIB_FABSF
1193 GNULIB_EXPM1L
1194 GNULIB_EXPM1F
1195 GNULIB_EXPM1
1196 GNULIB_EXP2L
1197 GNULIB_EXP2F
1198 GNULIB_EXP2
1199 GNULIB_EXPL
1200 GNULIB_EXPF
1201 GNULIB_COSHF
1202 GNULIB_COSL
1203 GNULIB_COSF
1204 GNULIB_COPYSIGNL
1205 GNULIB_COPYSIGNF
1206 GNULIB_COPYSIGN
1207 GNULIB_CEILL
1208 GNULIB_CEILF
1209 GNULIB_CEIL
1210 GNULIB_CBRTL
1211 GNULIB_CBRTF
1212 GNULIB_CBRT
1213 GNULIB_ATAN2F
1214 GNULIB_ATANL
1215 GNULIB_ATANF
1216 GNULIB_ASINL
1217 GNULIB_ASINF
1218 GNULIB_ACOSL
1219 GNULIB_ACOSF
1220 HAVE_FEATURES_H
1221 APPLE_UNIVERSAL_BUILD
1222 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1223 REPLACE_ITOLD
1224 GL_GENERATE_FLOAT_H_FALSE
1225 GL_GENERATE_FLOAT_H_TRUE
1226 FLOAT_H
1227 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1228 NEXT_FLOAT_H
1229 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1230 NEXT_FCNTL_H
1231 REPLACE_OPENAT
1232 REPLACE_OPEN
1233 REPLACE_FCNTL
1234 HAVE_OPENAT
1235 HAVE_FCNTL
1236 GNULIB_OPENAT
1237 GNULIB_OPEN
1238 GNULIB_NONBLOCKING
1239 GNULIB_FCNTL
1240 REPLACE_VSPRINTF
1241 REPLACE_VSNPRINTF
1242 REPLACE_VPRINTF
1243 REPLACE_VFPRINTF
1244 REPLACE_VDPRINTF
1245 REPLACE_VASPRINTF
1246 REPLACE_TMPFILE
1247 REPLACE_STDIO_WRITE_FUNCS
1248 REPLACE_STDIO_READ_FUNCS
1249 REPLACE_SPRINTF
1250 REPLACE_SNPRINTF
1251 REPLACE_RENAMEAT
1252 REPLACE_RENAME
1253 REPLACE_REMOVE
1254 REPLACE_PRINTF
1255 REPLACE_POPEN
1256 REPLACE_PERROR
1257 REPLACE_OBSTACK_PRINTF
1258 REPLACE_GETLINE
1259 REPLACE_GETDELIM
1260 REPLACE_FTELLO
1261 REPLACE_FTELL
1262 REPLACE_FSEEKO
1263 REPLACE_FSEEK
1264 REPLACE_FREOPEN
1265 REPLACE_FPURGE
1266 REPLACE_FPRINTF
1267 REPLACE_FOPEN
1268 REPLACE_FFLUSH
1269 REPLACE_FDOPEN
1270 REPLACE_FCLOSE
1271 REPLACE_DPRINTF
1272 HAVE_VDPRINTF
1273 HAVE_VASPRINTF
1274 HAVE_RENAMEAT
1275 HAVE_POPEN
1276 HAVE_PCLOSE
1277 HAVE_FTELLO
1278 HAVE_FSEEKO
1279 HAVE_DPRINTF
1280 HAVE_DECL_VSNPRINTF
1281 HAVE_DECL_SNPRINTF
1282 HAVE_DECL_OBSTACK_PRINTF
1283 HAVE_DECL_GETLINE
1284 HAVE_DECL_GETDELIM
1285 HAVE_DECL_FTELLO
1286 HAVE_DECL_FSEEKO
1287 HAVE_DECL_FPURGE
1288 GNULIB_VSPRINTF_POSIX
1289 GNULIB_VSNPRINTF
1290 GNULIB_VPRINTF_POSIX
1291 GNULIB_VPRINTF
1292 GNULIB_VFPRINTF_POSIX
1293 GNULIB_VFPRINTF
1294 GNULIB_VDPRINTF
1295 GNULIB_VSCANF
1296 GNULIB_VFSCANF
1297 GNULIB_VASPRINTF
1298 GNULIB_TMPFILE
1299 GNULIB_STDIO_H_SIGPIPE
1300 GNULIB_STDIO_H_NONBLOCKING
1301 GNULIB_SPRINTF_POSIX
1302 GNULIB_SNPRINTF
1303 GNULIB_SCANF
1304 GNULIB_RENAMEAT
1305 GNULIB_RENAME
1306 GNULIB_REMOVE
1307 GNULIB_PUTS
1308 GNULIB_PUTCHAR
1309 GNULIB_PUTC
1310 GNULIB_PRINTF_POSIX
1311 GNULIB_PRINTF
1312 GNULIB_POPEN
1313 GNULIB_PERROR
1314 GNULIB_PCLOSE
1315 GNULIB_OBSTACK_PRINTF_POSIX
1316 GNULIB_OBSTACK_PRINTF
1317 GNULIB_GETLINE
1318 GNULIB_GETDELIM
1319 GNULIB_GETCHAR
1320 GNULIB_GETC
1321 GNULIB_FWRITE
1322 GNULIB_FTELLO
1323 GNULIB_FTELL
1324 GNULIB_FSEEKO
1325 GNULIB_FSEEK
1326 GNULIB_FSCANF
1327 GNULIB_FREOPEN
1328 GNULIB_FREAD
1329 GNULIB_FPUTS
1330 GNULIB_FPUTC
1331 GNULIB_FPURGE
1332 GNULIB_FPRINTF_POSIX
1333 GNULIB_FPRINTF
1334 GNULIB_FOPEN
1335 GNULIB_FGETS
1336 GNULIB_FGETC
1337 GNULIB_FFLUSH
1338 GNULIB_FDOPEN
1339 GNULIB_FCLOSE
1340 GNULIB_DPRINTF
1341 EOVERFLOW_VALUE
1342 EOVERFLOW_HIDDEN
1343 ENOLINK_VALUE
1344 ENOLINK_HIDDEN
1345 EMULTIHOP_VALUE
1346 EMULTIHOP_HIDDEN
1347 GL_GENERATE_ERRNO_H_FALSE
1348 GL_GENERATE_ERRNO_H_TRUE
1349 ERRNO_H
1350 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1351 NEXT_ERRNO_H
1352 HAVE_DIRENT_H
1353 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1354 NEXT_DIRENT_H
1355 PRAGMA_COLUMNS
1356 PRAGMA_SYSTEM_HEADER
1357 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1358 INCLUDE_NEXT
1359 pkglibexecdir
1360 lispdir
1361 REPLACE_FDOPENDIR
1362 REPLACE_DIRFD
1363 REPLACE_CLOSEDIR
1364 REPLACE_OPENDIR
1365 HAVE_ALPHASORT
1366 HAVE_SCANDIR
1367 HAVE_FDOPENDIR
1368 HAVE_DECL_FDOPENDIR
1369 HAVE_DECL_DIRFD
1370 HAVE_CLOSEDIR
1371 HAVE_REWINDDIR
1372 HAVE_READDIR
1373 HAVE_OPENDIR
1374 GNULIB_ALPHASORT
1375 GNULIB_SCANDIR
1376 GNULIB_FDOPENDIR
1377 GNULIB_DIRFD
1378 GNULIB_CLOSEDIR
1379 GNULIB_REWINDDIR
1380 GNULIB_READDIR
1381 GNULIB_OPENDIR
1382 HAVE_WINSOCK2_H
1383 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1384 LIB_CLOCK_GETTIME
1385 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1386 UNISTD_H_HAVE_WINSOCK2_H
1387 REPLACE_WRITE
1388 REPLACE_USLEEP
1389 REPLACE_UNLINKAT
1390 REPLACE_UNLINK
1391 REPLACE_TTYNAME_R
1392 REPLACE_SYMLINK
1393 REPLACE_SLEEP
1394 REPLACE_RMDIR
1395 REPLACE_READLINK
1396 REPLACE_READ
1397 REPLACE_PWRITE
1398 REPLACE_PREAD
1399 REPLACE_LSEEK
1400 REPLACE_LINKAT
1401 REPLACE_LINK
1402 REPLACE_LCHOWN
1403 REPLACE_ISATTY
1404 REPLACE_GETPAGESIZE
1405 REPLACE_GETGROUPS
1406 REPLACE_GETLOGIN_R
1407 REPLACE_GETDOMAINNAME
1408 REPLACE_GETCWD
1409 REPLACE_FTRUNCATE
1410 REPLACE_FCHOWNAT
1411 REPLACE_DUP2
1412 REPLACE_DUP
1413 REPLACE_CLOSE
1414 REPLACE_CHOWN
1415 HAVE_SYS_PARAM_H
1416 HAVE_OS_H
1417 HAVE_DECL_TTYNAME_R
1418 HAVE_DECL_SETHOSTNAME
1419 HAVE_DECL_GETUSERSHELL
1420 HAVE_DECL_GETPAGESIZE
1421 HAVE_DECL_GETLOGIN_R
1422 HAVE_DECL_GETDOMAINNAME
1423 HAVE_DECL_FDATASYNC
1424 HAVE_DECL_FCHDIR
1425 HAVE_DECL_ENVIRON
1426 HAVE_USLEEP
1427 HAVE_UNLINKAT
1428 HAVE_SYMLINKAT
1429 HAVE_SYMLINK
1430 HAVE_SLEEP
1431 HAVE_SETHOSTNAME
1432 HAVE_READLINKAT
1433 HAVE_READLINK
1434 HAVE_PWRITE
1435 HAVE_PREAD
1436 HAVE_PIPE2
1437 HAVE_PIPE
1438 HAVE_LINKAT
1439 HAVE_LINK
1440 HAVE_LCHOWN
1441 HAVE_GROUP_MEMBER
1442 HAVE_GETPAGESIZE
1443 HAVE_GETLOGIN
1444 HAVE_GETHOSTNAME
1445 HAVE_GETGROUPS
1446 HAVE_GETDTABLESIZE
1447 HAVE_FTRUNCATE
1448 HAVE_FSYNC
1449 HAVE_FDATASYNC
1450 HAVE_FCHOWNAT
1451 HAVE_FCHDIR
1452 HAVE_FACCESSAT
1453 HAVE_EUIDACCESS
1454 HAVE_DUP3
1455 HAVE_DUP2
1456 HAVE_CHOWN
1457 GNULIB_WRITE
1458 GNULIB_USLEEP
1459 GNULIB_UNLINKAT
1460 GNULIB_UNLINK
1461 GNULIB_UNISTD_H_SIGPIPE
1462 GNULIB_UNISTD_H_NONBLOCKING
1463 GNULIB_TTYNAME_R
1464 GNULIB_SYMLINKAT
1465 GNULIB_SYMLINK
1466 GNULIB_SLEEP
1467 GNULIB_SETHOSTNAME
1468 GNULIB_RMDIR
1469 GNULIB_READLINKAT
1470 GNULIB_READLINK
1471 GNULIB_READ
1472 GNULIB_PWRITE
1473 GNULIB_PREAD
1474 GNULIB_PIPE2
1475 GNULIB_PIPE
1476 GNULIB_LSEEK
1477 GNULIB_LINKAT
1478 GNULIB_LINK
1479 GNULIB_LCHOWN
1480 GNULIB_ISATTY
1481 GNULIB_GROUP_MEMBER
1482 GNULIB_GETUSERSHELL
1483 GNULIB_GETPAGESIZE
1484 GNULIB_GETLOGIN_R
1485 GNULIB_GETLOGIN
1486 GNULIB_GETHOSTNAME
1487 GNULIB_GETGROUPS
1488 GNULIB_GETDTABLESIZE
1489 GNULIB_GETDOMAINNAME
1490 GNULIB_GETCWD
1491 GNULIB_FTRUNCATE
1492 GNULIB_FSYNC
1493 GNULIB_FDATASYNC
1494 GNULIB_FCHOWNAT
1495 GNULIB_FCHDIR
1496 GNULIB_FACCESSAT
1497 GNULIB_EUIDACCESS
1498 GNULIB_ENVIRON
1499 GNULIB_DUP3
1500 GNULIB_DUP2
1501 GNULIB_DUP
1502 GNULIB_CLOSE
1503 GNULIB_CHOWN
1504 GNULIB_CHDIR
1505 REPLACE_WCTOMB
1506 REPLACE_UNSETENV
1507 REPLACE_STRTOD
1508 REPLACE_SETENV
1509 REPLACE_REALPATH
1510 REPLACE_REALLOC
1511 REPLACE_RANDOM_R
1512 REPLACE_PUTENV
1513 REPLACE_PTSNAME_R
1514 REPLACE_MKSTEMP
1515 REPLACE_MBTOWC
1516 REPLACE_MALLOC
1517 REPLACE_CANONICALIZE_FILE_NAME
1518 REPLACE_CALLOC
1519 HAVE_DECL_UNSETENV
1520 HAVE_UNLOCKPT
1521 HAVE_SYS_LOADAVG_H
1522 HAVE_STRUCT_RANDOM_DATA
1523 HAVE_STRTOULL
1524 HAVE_STRTOLL
1525 HAVE_STRTOD
1526 HAVE_DECL_SETENV
1527 HAVE_SETENV
1528 HAVE_RPMATCH
1529 HAVE_REALPATH
1530 HAVE_RANDOM_R
1531 HAVE_RANDOM_H
1532 HAVE_RANDOM
1533 HAVE_PTSNAME_R
1534 HAVE_PTSNAME
1535 HAVE_POSIX_OPENPT
1536 HAVE_MKSTEMPS
1537 HAVE_MKSTEMP
1538 HAVE_MKOSTEMPS
1539 HAVE_MKOSTEMP
1540 HAVE_MKDTEMP
1541 HAVE_GRANTPT
1542 HAVE_GETSUBOPT
1543 HAVE_DECL_GETLOADAVG
1544 HAVE_CANONICALIZE_FILE_NAME
1545 HAVE_ATOLL
1546 HAVE__EXIT
1547 GNULIB_WCTOMB
1548 GNULIB_UNSETENV
1549 GNULIB_UNLOCKPT
1550 GNULIB_SYSTEM_POSIX
1551 GNULIB_STRTOULL
1552 GNULIB_STRTOLL
1553 GNULIB_STRTOD
1554 GNULIB_SETENV
1555 GNULIB_RPMATCH
1556 GNULIB_REALPATH
1557 GNULIB_REALLOC_POSIX
1558 GNULIB_RANDOM_R
1559 GNULIB_RANDOM
1560 GNULIB_PUTENV
1561 GNULIB_PTSNAME_R
1562 GNULIB_PTSNAME
1563 GNULIB_POSIX_OPENPT
1564 GNULIB_MKSTEMPS
1565 GNULIB_MKSTEMP
1566 GNULIB_MKOSTEMPS
1567 GNULIB_MKOSTEMP
1568 GNULIB_MKDTEMP
1569 GNULIB_MBTOWC
1570 GNULIB_MALLOC_POSIX
1571 GNULIB_GRANTPT
1572 GNULIB_GETSUBOPT
1573 GNULIB_GETLOADAVG
1574 GNULIB_CANONICALIZE_FILE_NAME
1575 GNULIB_CALLOC_POSIX
1576 GNULIB_ATOLL
1577 GNULIB__EXIT
1578 GL_GENERATE_ALLOCA_H_FALSE
1579 GL_GENERATE_ALLOCA_H_TRUE
1580 ALLOCA_H
1581 ALLOCA
1582 GL_COND_LIBTOOL_FALSE
1583 GL_COND_LIBTOOL_TRUE
1584 host_os
1585 host_vendor
1586 host_cpu
1587 host
1588 build_os
1589 build_vendor
1590 build_cpu
1591 build
1592 ARFLAGS
1593 AR
1594 EGREP
1595 GREP
1596 RANLIB
1597 LN_S
1598 NM
1599 CPP
1600 am__fastdepCC_FALSE
1601 am__fastdepCC_TRUE
1602 CCDEPMODE
1603 am__nodep
1604 AMDEPBACKSLASH
1605 AMDEP_FALSE
1606 AMDEP_TRUE
1607 am__quote
1608 am__include
1609 DEPDIR
1610 OBJEXT
1611 EXEEXT
1612 ac_ct_CC
1613 CPPFLAGS
1614 LDFLAGS
1615 CFLAGS
1616 CC
1617 AM_BACKSLASH
1618 AM_DEFAULT_VERBOSITY
1619 AM_DEFAULT_V
1620 AM_V
1621 am__untar
1622 am__tar
1623 AMTAR
1624 am__leading_dot
1625 SET_MAKE
1626 AWK
1627 MKDIR_P
1628 INSTALL_STRIP_PROGRAM
1629 STRIP
1630 install_sh
1631 MAKEINFO
1632 AUTOHEADER
1633 AUTOMAKE
1634 AUTOCONF
1635 ACLOCAL
1636 VERSION
1637 PACKAGE
1638 CYGPATH_W
1639 am__isrc
1640 INSTALL_DATA
1641 INSTALL_SCRIPT
1642 INSTALL_PROGRAM
1643 target_alias
1644 host_alias
1645 build_alias
1646 LIBS
1647 ECHO_T
1648 ECHO_N
1649 ECHO_C
1650 DEFS
1651 mandir
1652 localedir
1653 libdir
1654 psdir
1655 pdfdir
1656 dvidir
1657 htmldir
1658 infodir
1659 docdir
1660 oldincludedir
1661 includedir
1662 localstatedir
1663 sharedstatedir
1664 sysconfdir
1665 datadir
1666 datarootdir
1667 libexecdir
1668 sbindir
1669 bindir
1670 program_transform_name
1671 prefix
1672 exec_prefix
1673 PACKAGE_URL
1674 PACKAGE_BUGREPORT
1675 PACKAGE_STRING
1676 PACKAGE_VERSION
1677 PACKAGE_TARNAME
1678 PACKAGE_NAME
1679 PATH_SEPARATOR
1680 SHELL'
1681 ac_subst_files=''
1682 ac_user_opts='
1683 enable_option_checking
1684 enable_silent_rules
1685 enable_dependency_tracking
1686 enable_largefile
1687 enable_threads
1688 with_gnu_ld
1689 enable_rpath
1690 with_libpth_prefix
1691 enable_gcc_warnings
1692 '
1693       ac_precious_vars='build_alias
1694 host_alias
1695 target_alias
1696 CC
1697 CFLAGS
1698 LDFLAGS
1699 LIBS
1700 CPPFLAGS
1701 CPP'
1702
1703
1704 # Initialize some variables set by options.
1705 ac_init_help=
1706 ac_init_version=false
1707 ac_unrecognized_opts=
1708 ac_unrecognized_sep=
1709 # The variables have the same names as the options, with
1710 # dashes changed to underlines.
1711 cache_file=/dev/null
1712 exec_prefix=NONE
1713 no_create=
1714 no_recursion=
1715 prefix=NONE
1716 program_prefix=NONE
1717 program_suffix=NONE
1718 program_transform_name=s,x,x,
1719 silent=
1720 site=
1721 srcdir=
1722 verbose=
1723 x_includes=NONE
1724 x_libraries=NONE
1725
1726 # Installation directory options.
1727 # These are left unexpanded so users can "make install exec_prefix=/foo"
1728 # and all the variables that are supposed to be based on exec_prefix
1729 # by default will actually change.
1730 # Use braces instead of parens because sh, perl, etc. also accept them.
1731 # (The list follows the same order as the GNU Coding Standards.)
1732 bindir='${exec_prefix}/bin'
1733 sbindir='${exec_prefix}/sbin'
1734 libexecdir='${exec_prefix}/libexec'
1735 datarootdir='${prefix}/share'
1736 datadir='${datarootdir}'
1737 sysconfdir='${prefix}/etc'
1738 sharedstatedir='${prefix}/com'
1739 localstatedir='${prefix}/var'
1740 includedir='${prefix}/include'
1741 oldincludedir='/usr/include'
1742 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1743 infodir='${datarootdir}/info'
1744 htmldir='${docdir}'
1745 dvidir='${docdir}'
1746 pdfdir='${docdir}'
1747 psdir='${docdir}'
1748 libdir='${exec_prefix}/lib'
1749 localedir='${datarootdir}/locale'
1750 mandir='${datarootdir}/man'
1751
1752 ac_prev=
1753 ac_dashdash=
1754 for ac_option
1755 do
1756   # If the previous option needs an argument, assign it.
1757   if test -n "$ac_prev"; then
1758     eval $ac_prev=\$ac_option
1759     ac_prev=
1760     continue
1761   fi
1762
1763   case $ac_option in
1764   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1765   *=)   ac_optarg= ;;
1766   *)    ac_optarg=yes ;;
1767   esac
1768
1769   # Accept the important Cygnus configure options, so we can diagnose typos.
1770
1771   case $ac_dashdash$ac_option in
1772   --)
1773     ac_dashdash=yes ;;
1774
1775   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1776     ac_prev=bindir ;;
1777   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1778     bindir=$ac_optarg ;;
1779
1780   -build | --build | --buil | --bui | --bu)
1781     ac_prev=build_alias ;;
1782   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1783     build_alias=$ac_optarg ;;
1784
1785   -cache-file | --cache-file | --cache-fil | --cache-fi \
1786   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1787     ac_prev=cache_file ;;
1788   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1789   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1790     cache_file=$ac_optarg ;;
1791
1792   --config-cache | -C)
1793     cache_file=config.cache ;;
1794
1795   -datadir | --datadir | --datadi | --datad)
1796     ac_prev=datadir ;;
1797   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1798     datadir=$ac_optarg ;;
1799
1800   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1801   | --dataroo | --dataro | --datar)
1802     ac_prev=datarootdir ;;
1803   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1804   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1805     datarootdir=$ac_optarg ;;
1806
1807   -disable-* | --disable-*)
1808     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1809     # Reject names that are not valid shell variable names.
1810     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1811       as_fn_error $? "invalid feature name: $ac_useropt"
1812     ac_useropt_orig=$ac_useropt
1813     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1814     case $ac_user_opts in
1815       *"
1816 "enable_$ac_useropt"
1817 "*) ;;
1818       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1819          ac_unrecognized_sep=', ';;
1820     esac
1821     eval enable_$ac_useropt=no ;;
1822
1823   -docdir | --docdir | --docdi | --doc | --do)
1824     ac_prev=docdir ;;
1825   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1826     docdir=$ac_optarg ;;
1827
1828   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1829     ac_prev=dvidir ;;
1830   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1831     dvidir=$ac_optarg ;;
1832
1833   -enable-* | --enable-*)
1834     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1835     # Reject names that are not valid shell variable names.
1836     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1837       as_fn_error $? "invalid feature name: $ac_useropt"
1838     ac_useropt_orig=$ac_useropt
1839     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1840     case $ac_user_opts in
1841       *"
1842 "enable_$ac_useropt"
1843 "*) ;;
1844       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1845          ac_unrecognized_sep=', ';;
1846     esac
1847     eval enable_$ac_useropt=\$ac_optarg ;;
1848
1849   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1850   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1851   | --exec | --exe | --ex)
1852     ac_prev=exec_prefix ;;
1853   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1854   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1855   | --exec=* | --exe=* | --ex=*)
1856     exec_prefix=$ac_optarg ;;
1857
1858   -gas | --gas | --ga | --g)
1859     # Obsolete; use --with-gas.
1860     with_gas=yes ;;
1861
1862   -help | --help | --hel | --he | -h)
1863     ac_init_help=long ;;
1864   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1865     ac_init_help=recursive ;;
1866   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1867     ac_init_help=short ;;
1868
1869   -host | --host | --hos | --ho)
1870     ac_prev=host_alias ;;
1871   -host=* | --host=* | --hos=* | --ho=*)
1872     host_alias=$ac_optarg ;;
1873
1874   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1875     ac_prev=htmldir ;;
1876   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1877   | --ht=*)
1878     htmldir=$ac_optarg ;;
1879
1880   -includedir | --includedir | --includedi | --included | --include \
1881   | --includ | --inclu | --incl | --inc)
1882     ac_prev=includedir ;;
1883   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1884   | --includ=* | --inclu=* | --incl=* | --inc=*)
1885     includedir=$ac_optarg ;;
1886
1887   -infodir | --infodir | --infodi | --infod | --info | --inf)
1888     ac_prev=infodir ;;
1889   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1890     infodir=$ac_optarg ;;
1891
1892   -libdir | --libdir | --libdi | --libd)
1893     ac_prev=libdir ;;
1894   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1895     libdir=$ac_optarg ;;
1896
1897   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1898   | --libexe | --libex | --libe)
1899     ac_prev=libexecdir ;;
1900   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1901   | --libexe=* | --libex=* | --libe=*)
1902     libexecdir=$ac_optarg ;;
1903
1904   -localedir | --localedir | --localedi | --localed | --locale)
1905     ac_prev=localedir ;;
1906   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1907     localedir=$ac_optarg ;;
1908
1909   -localstatedir | --localstatedir | --localstatedi | --localstated \
1910   | --localstate | --localstat | --localsta | --localst | --locals)
1911     ac_prev=localstatedir ;;
1912   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1913   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1914     localstatedir=$ac_optarg ;;
1915
1916   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1917     ac_prev=mandir ;;
1918   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1919     mandir=$ac_optarg ;;
1920
1921   -nfp | --nfp | --nf)
1922     # Obsolete; use --without-fp.
1923     with_fp=no ;;
1924
1925   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1926   | --no-cr | --no-c | -n)
1927     no_create=yes ;;
1928
1929   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1930   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1931     no_recursion=yes ;;
1932
1933   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1934   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1935   | --oldin | --oldi | --old | --ol | --o)
1936     ac_prev=oldincludedir ;;
1937   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1938   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1939   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1940     oldincludedir=$ac_optarg ;;
1941
1942   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1943     ac_prev=prefix ;;
1944   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1945     prefix=$ac_optarg ;;
1946
1947   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1948   | --program-pre | --program-pr | --program-p)
1949     ac_prev=program_prefix ;;
1950   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1951   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1952     program_prefix=$ac_optarg ;;
1953
1954   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1955   | --program-suf | --program-su | --program-s)
1956     ac_prev=program_suffix ;;
1957   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1958   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1959     program_suffix=$ac_optarg ;;
1960
1961   -program-transform-name | --program-transform-name \
1962   | --program-transform-nam | --program-transform-na \
1963   | --program-transform-n | --program-transform- \
1964   | --program-transform | --program-transfor \
1965   | --program-transfo | --program-transf \
1966   | --program-trans | --program-tran \
1967   | --progr-tra | --program-tr | --program-t)
1968     ac_prev=program_transform_name ;;
1969   -program-transform-name=* | --program-transform-name=* \
1970   | --program-transform-nam=* | --program-transform-na=* \
1971   | --program-transform-n=* | --program-transform-=* \
1972   | --program-transform=* | --program-transfor=* \
1973   | --program-transfo=* | --program-transf=* \
1974   | --program-trans=* | --program-tran=* \
1975   | --progr-tra=* | --program-tr=* | --program-t=*)
1976     program_transform_name=$ac_optarg ;;
1977
1978   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1979     ac_prev=pdfdir ;;
1980   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1981     pdfdir=$ac_optarg ;;
1982
1983   -psdir | --psdir | --psdi | --psd | --ps)
1984     ac_prev=psdir ;;
1985   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1986     psdir=$ac_optarg ;;
1987
1988   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1989   | -silent | --silent | --silen | --sile | --sil)
1990     silent=yes ;;
1991
1992   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1993     ac_prev=sbindir ;;
1994   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1995   | --sbi=* | --sb=*)
1996     sbindir=$ac_optarg ;;
1997
1998   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1999   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2000   | --sharedst | --shareds | --shared | --share | --shar \
2001   | --sha | --sh)
2002     ac_prev=sharedstatedir ;;
2003   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2004   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2005   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2006   | --sha=* | --sh=*)
2007     sharedstatedir=$ac_optarg ;;
2008
2009   -site | --site | --sit)
2010     ac_prev=site ;;
2011   -site=* | --site=* | --sit=*)
2012     site=$ac_optarg ;;
2013
2014   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2015     ac_prev=srcdir ;;
2016   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2017     srcdir=$ac_optarg ;;
2018
2019   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2020   | --syscon | --sysco | --sysc | --sys | --sy)
2021     ac_prev=sysconfdir ;;
2022   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2023   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2024     sysconfdir=$ac_optarg ;;
2025
2026   -target | --target | --targe | --targ | --tar | --ta | --t)
2027     ac_prev=target_alias ;;
2028   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2029     target_alias=$ac_optarg ;;
2030
2031   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2032     verbose=yes ;;
2033
2034   -version | --version | --versio | --versi | --vers | -V)
2035     ac_init_version=: ;;
2036
2037   -with-* | --with-*)
2038     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2039     # Reject names that are not valid shell variable names.
2040     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2041       as_fn_error $? "invalid package name: $ac_useropt"
2042     ac_useropt_orig=$ac_useropt
2043     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2044     case $ac_user_opts in
2045       *"
2046 "with_$ac_useropt"
2047 "*) ;;
2048       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2049          ac_unrecognized_sep=', ';;
2050     esac
2051     eval with_$ac_useropt=\$ac_optarg ;;
2052
2053   -without-* | --without-*)
2054     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2055     # Reject names that are not valid shell variable names.
2056     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2057       as_fn_error $? "invalid package name: $ac_useropt"
2058     ac_useropt_orig=$ac_useropt
2059     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2060     case $ac_user_opts in
2061       *"
2062 "with_$ac_useropt"
2063 "*) ;;
2064       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2065          ac_unrecognized_sep=', ';;
2066     esac
2067     eval with_$ac_useropt=no ;;
2068
2069   --x)
2070     # Obsolete; use --with-x.
2071     with_x=yes ;;
2072
2073   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2074   | --x-incl | --x-inc | --x-in | --x-i)
2075     ac_prev=x_includes ;;
2076   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2077   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2078     x_includes=$ac_optarg ;;
2079
2080   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2081   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2082     ac_prev=x_libraries ;;
2083   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2084   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2085     x_libraries=$ac_optarg ;;
2086
2087   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2088 Try \`$0 --help' for more information"
2089     ;;
2090
2091   *=*)
2092     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2093     # Reject names that are not valid shell variable names.
2094     case $ac_envvar in #(
2095       '' | [0-9]* | *[!_$as_cr_alnum]* )
2096       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2097     esac
2098     eval $ac_envvar=\$ac_optarg
2099     export $ac_envvar ;;
2100
2101   *)
2102     # FIXME: should be removed in autoconf 3.0.
2103     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2104     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2105       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2106     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2107     ;;
2108
2109   esac
2110 done
2111
2112 if test -n "$ac_prev"; then
2113   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2114   as_fn_error $? "missing argument to $ac_option"
2115 fi
2116
2117 if test -n "$ac_unrecognized_opts"; then
2118   case $enable_option_checking in
2119     no) ;;
2120     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2121     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2122   esac
2123 fi
2124
2125 # Check all directory arguments for consistency.
2126 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2127                 datadir sysconfdir sharedstatedir localstatedir includedir \
2128                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2129                 libdir localedir mandir
2130 do
2131   eval ac_val=\$$ac_var
2132   # Remove trailing slashes.
2133   case $ac_val in
2134     */ )
2135       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2136       eval $ac_var=\$ac_val;;
2137   esac
2138   # Be sure to have absolute directory names.
2139   case $ac_val in
2140     [\\/$]* | ?:[\\/]* )  continue;;
2141     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2142   esac
2143   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2144 done
2145
2146 # There might be people who depend on the old broken behavior: `$host'
2147 # used to hold the argument of --host etc.
2148 # FIXME: To remove some day.
2149 build=$build_alias
2150 host=$host_alias
2151 target=$target_alias
2152
2153 # FIXME: To remove some day.
2154 if test "x$host_alias" != x; then
2155   if test "x$build_alias" = x; then
2156     cross_compiling=maybe
2157   elif test "x$build_alias" != "x$host_alias"; then
2158     cross_compiling=yes
2159   fi
2160 fi
2161
2162 ac_tool_prefix=
2163 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2164
2165 test "$silent" = yes && exec 6>/dev/null
2166
2167
2168 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2169 ac_ls_di=`ls -di .` &&
2170 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2171   as_fn_error $? "working directory cannot be determined"
2172 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2173   as_fn_error $? "pwd does not report name of working directory"
2174
2175
2176 # Find the source files, if location was not specified.
2177 if test -z "$srcdir"; then
2178   ac_srcdir_defaulted=yes
2179   # Try the directory containing this script, then the parent directory.
2180   ac_confdir=`$as_dirname -- "$as_myself" ||
2181 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2182          X"$as_myself" : 'X\(//\)[^/]' \| \
2183          X"$as_myself" : 'X\(//\)$' \| \
2184          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2185 $as_echo X"$as_myself" |
2186     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2187             s//\1/
2188             q
2189           }
2190           /^X\(\/\/\)[^/].*/{
2191             s//\1/
2192             q
2193           }
2194           /^X\(\/\/\)$/{
2195             s//\1/
2196             q
2197           }
2198           /^X\(\/\).*/{
2199             s//\1/
2200             q
2201           }
2202           s/.*/./; q'`
2203   srcdir=$ac_confdir
2204   if test ! -r "$srcdir/$ac_unique_file"; then
2205     srcdir=..
2206   fi
2207 else
2208   ac_srcdir_defaulted=no
2209 fi
2210 if test ! -r "$srcdir/$ac_unique_file"; then
2211   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2212   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2213 fi
2214 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2215 ac_abs_confdir=`(
2216         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2217         pwd)`
2218 # When building in place, set srcdir=.
2219 if test "$ac_abs_confdir" = "$ac_pwd"; then
2220   srcdir=.
2221 fi
2222 # Remove unnecessary trailing slashes from srcdir.
2223 # Double slashes in file names in object file debugging info
2224 # mess up M-x gdb in Emacs.
2225 case $srcdir in
2226 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2227 esac
2228 for ac_var in $ac_precious_vars; do
2229   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2230   eval ac_env_${ac_var}_value=\$${ac_var}
2231   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2232   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2233 done
2234
2235 #
2236 # Report the --help message.
2237 #
2238 if test "$ac_init_help" = "long"; then
2239   # Omit some internal or obsolete options to make the list less imposing.
2240   # This message is too long to be a string in the A/UX 3.1 sh.
2241   cat <<_ACEOF
2242 \`configure' configures gzip 1.5 to adapt to many kinds of systems.
2243
2244 Usage: $0 [OPTION]... [VAR=VALUE]...
2245
2246 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2247 VAR=VALUE.  See below for descriptions of some of the useful variables.
2248
2249 Defaults for the options are specified in brackets.
2250
2251 Configuration:
2252   -h, --help              display this help and exit
2253       --help=short        display options specific to this package
2254       --help=recursive    display the short help of all the included packages
2255   -V, --version           display version information and exit
2256   -q, --quiet, --silent   do not print \`checking ...' messages
2257       --cache-file=FILE   cache test results in FILE [disabled]
2258   -C, --config-cache      alias for \`--cache-file=config.cache'
2259   -n, --no-create         do not create output files
2260       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2261
2262 Installation directories:
2263   --prefix=PREFIX         install architecture-independent files in PREFIX
2264                           [$ac_default_prefix]
2265   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2266                           [PREFIX]
2267
2268 By default, \`make install' will install all the files in
2269 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2270 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2271 for instance \`--prefix=\$HOME'.
2272
2273 For better control, use the options below.
2274
2275 Fine tuning of the installation directories:
2276   --bindir=DIR            user executables [EPREFIX/bin]
2277   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2278   --libexecdir=DIR        program executables [EPREFIX/libexec]
2279   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2280   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2281   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2282   --libdir=DIR            object code libraries [EPREFIX/lib]
2283   --includedir=DIR        C header files [PREFIX/include]
2284   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2285   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2286   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2287   --infodir=DIR           info documentation [DATAROOTDIR/info]
2288   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2289   --mandir=DIR            man documentation [DATAROOTDIR/man]
2290   --docdir=DIR            documentation root [DATAROOTDIR/doc/gzip]
2291   --htmldir=DIR           html documentation [DOCDIR]
2292   --dvidir=DIR            dvi documentation [DOCDIR]
2293   --pdfdir=DIR            pdf documentation [DOCDIR]
2294   --psdir=DIR             ps documentation [DOCDIR]
2295 _ACEOF
2296
2297   cat <<\_ACEOF
2298
2299 Program names:
2300   --program-prefix=PREFIX            prepend PREFIX to installed program names
2301   --program-suffix=SUFFIX            append SUFFIX to installed program names
2302   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2303
2304 System types:
2305   --build=BUILD     configure for building on BUILD [guessed]
2306   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2307 _ACEOF
2308 fi
2309
2310 if test -n "$ac_init_help"; then
2311   case $ac_init_help in
2312      short | recursive ) echo "Configuration of gzip 1.5:";;
2313    esac
2314   cat <<\_ACEOF
2315
2316 Optional Features:
2317   --disable-option-checking  ignore unrecognized --enable/--with options
2318   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2319   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2320   --enable-silent-rules   less verbose build output (undo: "make V=1")
2321   --disable-silent-rules  verbose build output (undo: "make V=0")
2322   --enable-dependency-tracking
2323                           do not reject slow dependency extractors
2324   --disable-dependency-tracking
2325                           speeds up one-time build
2326   --disable-largefile     omit support for large files
2327   --enable-threads={posix|solaris|pth|windows}
2328                           specify multithreading API
2329   --disable-threads       build without multithread safety
2330   --disable-rpath         do not hardcode runtime library paths
2331   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2332
2333 Optional Packages:
2334   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2335   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2336   --with-gnu-ld           assume the C compiler uses GNU ld default=no
2337   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2338   --without-libpth-prefix     don't search for libpth in includedir and libdir
2339
2340 Some influential environment variables:
2341   CC          C compiler command
2342   CFLAGS      C compiler flags
2343   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2344               nonstandard directory <lib dir>
2345   LIBS        libraries to pass to the linker, e.g. -l<library>
2346   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2347               you have headers in a nonstandard directory <include dir>
2348   CPP         C preprocessor
2349
2350 Use these variables to override the choices made by `configure' or to help
2351 it to find libraries and programs with nonstandard names/locations.
2352
2353 Report bugs to <bug-gzip@gnu.org>.
2354 _ACEOF
2355 ac_status=$?
2356 fi
2357
2358 if test "$ac_init_help" = "recursive"; then
2359   # If there are subdirs, report their specific --help.
2360   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2361     test -d "$ac_dir" ||
2362       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2363       continue
2364     ac_builddir=.
2365
2366 case "$ac_dir" in
2367 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2368 *)
2369   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2370   # A ".." for each directory in $ac_dir_suffix.
2371   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2372   case $ac_top_builddir_sub in
2373   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2374   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2375   esac ;;
2376 esac
2377 ac_abs_top_builddir=$ac_pwd
2378 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2379 # for backward compatibility:
2380 ac_top_builddir=$ac_top_build_prefix
2381
2382 case $srcdir in
2383   .)  # We are building in place.
2384     ac_srcdir=.
2385     ac_top_srcdir=$ac_top_builddir_sub
2386     ac_abs_top_srcdir=$ac_pwd ;;
2387   [\\/]* | ?:[\\/]* )  # Absolute name.
2388     ac_srcdir=$srcdir$ac_dir_suffix;
2389     ac_top_srcdir=$srcdir
2390     ac_abs_top_srcdir=$srcdir ;;
2391   *) # Relative name.
2392     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2393     ac_top_srcdir=$ac_top_build_prefix$srcdir
2394     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2395 esac
2396 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2397
2398     cd "$ac_dir" || { ac_status=$?; continue; }
2399     # Check for guested configure.
2400     if test -f "$ac_srcdir/configure.gnu"; then
2401       echo &&
2402       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2403     elif test -f "$ac_srcdir/configure"; then
2404       echo &&
2405       $SHELL "$ac_srcdir/configure" --help=recursive
2406     else
2407       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2408     fi || ac_status=$?
2409     cd "$ac_pwd" || { ac_status=$?; break; }
2410   done
2411 fi
2412
2413 test -n "$ac_init_help" && exit $ac_status
2414 if $ac_init_version; then
2415   cat <<\_ACEOF
2416 gzip configure 1.5
2417 generated by GNU Autoconf 2.69.4-560f
2418
2419 Copyright (C) 2012 Free Software Foundation, Inc.
2420 This configure script is free software; the Free Software Foundation
2421 gives unlimited permission to copy, distribute and modify it.
2422 _ACEOF
2423   exit
2424 fi
2425
2426 ## ------------------------ ##
2427 ## Autoconf initialization. ##
2428 ## ------------------------ ##
2429
2430 # ac_fn_c_try_compile LINENO
2431 # --------------------------
2432 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2433 ac_fn_c_try_compile ()
2434 {
2435   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2436   rm -f conftest.$ac_objext
2437   if { { ac_try="$ac_compile"
2438 case "(($ac_try" in
2439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2440   *) ac_try_echo=$ac_try;;
2441 esac
2442 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2443 $as_echo "$ac_try_echo"; } >&5
2444   (eval "$ac_compile") 2>conftest.err
2445   ac_status=$?
2446   if test -s conftest.err; then
2447     grep -v '^ *+' conftest.err >conftest.er1
2448     cat conftest.er1 >&5
2449     mv -f conftest.er1 conftest.err
2450   fi
2451   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2452   test $ac_status = 0; } && {
2453          test -z "$ac_c_werror_flag" ||
2454          test ! -s conftest.err
2455        } && test -s conftest.$ac_objext; then :
2456   ac_retval=0
2457 else
2458   $as_echo "$as_me: failed program was:" >&5
2459 sed 's/^/| /' conftest.$ac_ext >&5
2460
2461         ac_retval=1
2462 fi
2463   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464   as_fn_set_status $ac_retval
2465
2466 } # ac_fn_c_try_compile
2467
2468 # ac_fn_c_try_cpp LINENO
2469 # ----------------------
2470 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2471 ac_fn_c_try_cpp ()
2472 {
2473   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2474   if { { ac_try="$ac_cpp conftest.$ac_ext"
2475 case "(($ac_try" in
2476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2477   *) ac_try_echo=$ac_try;;
2478 esac
2479 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2480 $as_echo "$ac_try_echo"; } >&5
2481   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2482   ac_status=$?
2483   if test -s conftest.err; then
2484     grep -v '^ *+' conftest.err >conftest.er1
2485     cat conftest.er1 >&5
2486     mv -f conftest.er1 conftest.err
2487   fi
2488   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2489   test $ac_status = 0; } > conftest.i && {
2490          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2491          test ! -s conftest.err
2492        }; then :
2493   ac_retval=0
2494 else
2495   $as_echo "$as_me: failed program was:" >&5
2496 sed 's/^/| /' conftest.$ac_ext >&5
2497
2498     ac_retval=1
2499 fi
2500   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2501   as_fn_set_status $ac_retval
2502
2503 } # ac_fn_c_try_cpp
2504
2505 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2506 # -------------------------------------------------------
2507 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2508 # the include files in INCLUDES and setting the cache variable VAR
2509 # accordingly.
2510 ac_fn_c_check_header_mongrel ()
2511 {
2512   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513   if eval \${$3+:} false; then :
2514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2515 $as_echo_n "checking for $2... " >&6; }
2516 if eval \${$3+:} false; then :
2517   $as_echo_n "(cached) " >&6
2518 fi
2519 eval ac_res=\$$3
2520                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2521 $as_echo "$ac_res" >&6; }
2522 else
2523   # Is the header compilable?
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2525 $as_echo_n "checking $2 usability... " >&6; }
2526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2527 /* end confdefs.h.  */
2528 $4
2529 #include <$2>
2530 _ACEOF
2531 if ac_fn_c_try_compile "$LINENO"; then :
2532   ac_header_compiler=yes
2533 else
2534   ac_header_compiler=no
2535 fi
2536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2538 $as_echo "$ac_header_compiler" >&6; }
2539
2540 # Is the header present?
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2542 $as_echo_n "checking $2 presence... " >&6; }
2543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2544 /* end confdefs.h.  */
2545 #include <$2>
2546 _ACEOF
2547 if ac_fn_c_try_cpp "$LINENO"; then :
2548   ac_header_preproc=yes
2549 else
2550   ac_header_preproc=no
2551 fi
2552 rm -f conftest.err conftest.i conftest.$ac_ext
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2554 $as_echo "$ac_header_preproc" >&6; }
2555
2556 # So?  What about this header?
2557 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2558   yes:no: )
2559     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2560 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2561     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2562 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2563     ;;
2564   no:yes:* )
2565     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2566 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2567     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2568 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2569     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2570 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2571     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2572 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2573     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2574 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2575 ( $as_echo "## ------------------------------- ##
2576 ## Report this to bug-gzip@gnu.org ##
2577 ## ------------------------------- ##"
2578      ) | sed "s/^/$as_me: WARNING:     /" >&2
2579     ;;
2580 esac
2581   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2582 $as_echo_n "checking for $2... " >&6; }
2583 if eval \${$3+:} false; then :
2584   $as_echo_n "(cached) " >&6
2585 else
2586   eval "$3=\$ac_header_compiler"
2587 fi
2588 eval ac_res=\$$3
2589                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590 $as_echo "$ac_res" >&6; }
2591 fi
2592   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2593
2594 } # ac_fn_c_check_header_mongrel
2595
2596 # ac_fn_c_try_run LINENO
2597 # ----------------------
2598 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2599 # that executables *can* be run.
2600 ac_fn_c_try_run ()
2601 {
2602   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603   if { { ac_try="$ac_link"
2604 case "(($ac_try" in
2605   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2606   *) ac_try_echo=$ac_try;;
2607 esac
2608 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2609 $as_echo "$ac_try_echo"; } >&5
2610   (eval "$ac_link") 2>&5
2611   ac_status=$?
2612   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2613   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2614   { { case "(($ac_try" in
2615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2616   *) ac_try_echo=$ac_try;;
2617 esac
2618 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2619 $as_echo "$ac_try_echo"; } >&5
2620   (eval "$ac_try") 2>&5
2621   ac_status=$?
2622   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2623   test $ac_status = 0; }; }; then :
2624   ac_retval=0
2625 else
2626   $as_echo "$as_me: program exited with status $ac_status" >&5
2627        $as_echo "$as_me: failed program was:" >&5
2628 sed 's/^/| /' conftest.$ac_ext >&5
2629
2630        ac_retval=$ac_status
2631 fi
2632   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2633   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2634   as_fn_set_status $ac_retval
2635
2636 } # ac_fn_c_try_run
2637
2638 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2639 # -------------------------------------------------------
2640 # Tests whether HEADER exists and can be compiled using the include files in
2641 # INCLUDES, setting the cache variable VAR accordingly.
2642 ac_fn_c_check_header_compile ()
2643 {
2644   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2646 $as_echo_n "checking for $2... " >&6; }
2647 if eval \${$3+:} false; then :
2648   $as_echo_n "(cached) " >&6
2649 else
2650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651 /* end confdefs.h.  */
2652 $4
2653 #include <$2>
2654 _ACEOF
2655 if ac_fn_c_try_compile "$LINENO"; then :
2656   eval "$3=yes"
2657 else
2658   eval "$3=no"
2659 fi
2660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2661 fi
2662 eval ac_res=\$$3
2663                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2664 $as_echo "$ac_res" >&6; }
2665   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2666
2667 } # ac_fn_c_check_header_compile
2668
2669 # ac_fn_c_try_link LINENO
2670 # -----------------------
2671 # Try to link conftest.$ac_ext, and return whether this succeeded.
2672 ac_fn_c_try_link ()
2673 {
2674   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2675   rm -f conftest.$ac_objext conftest$ac_exeext
2676   if { { ac_try="$ac_link"
2677 case "(($ac_try" in
2678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679   *) ac_try_echo=$ac_try;;
2680 esac
2681 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2682 $as_echo "$ac_try_echo"; } >&5
2683   (eval "$ac_link") 2>conftest.err
2684   ac_status=$?
2685   if test -s conftest.err; then
2686     grep -v '^ *+' conftest.err >conftest.er1
2687     cat conftest.er1 >&5
2688     mv -f conftest.er1 conftest.err
2689   fi
2690   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691   test $ac_status = 0; } && {
2692          test -z "$ac_c_werror_flag" ||
2693          test ! -s conftest.err
2694        } && test -s conftest$ac_exeext && {
2695          test "$cross_compiling" = yes ||
2696          test -x conftest$ac_exeext
2697        }; then :
2698   ac_retval=0
2699 else
2700   $as_echo "$as_me: failed program was:" >&5
2701 sed 's/^/| /' conftest.$ac_ext >&5
2702
2703         ac_retval=1
2704 fi
2705   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2706   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2707   # interfere with the next link command; also delete a directory that is
2708   # left behind by Apple's compiler.  We do this before executing the actions.
2709   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711   as_fn_set_status $ac_retval
2712
2713 } # ac_fn_c_try_link
2714
2715 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2716 # -------------------------------------------
2717 # Tests whether TYPE exists after having included INCLUDES, setting cache
2718 # variable VAR accordingly.
2719 ac_fn_c_check_type ()
2720 {
2721   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2723 $as_echo_n "checking for $2... " >&6; }
2724 if eval \${$3+:} false; then :
2725   $as_echo_n "(cached) " >&6
2726 else
2727   eval "$3=no"
2728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729 /* end confdefs.h.  */
2730 $4
2731 int
2732 main ()
2733 {
2734 if (sizeof ($2))
2735          return 0;
2736   ;
2737   return 0;
2738 }
2739 _ACEOF
2740 if ac_fn_c_try_compile "$LINENO"; then :
2741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2742 /* end confdefs.h.  */
2743 $4
2744 int
2745 main ()
2746 {
2747 if (sizeof (($2)))
2748             return 0;
2749   ;
2750   return 0;
2751 }
2752 _ACEOF
2753 if ac_fn_c_try_compile "$LINENO"; then :
2754
2755 else
2756   eval "$3=yes"
2757 fi
2758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2759 fi
2760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761 fi
2762 eval ac_res=\$$3
2763                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764 $as_echo "$ac_res" >&6; }
2765   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767 } # ac_fn_c_check_type
2768
2769 # ac_fn_c_check_func LINENO FUNC VAR
2770 # ----------------------------------
2771 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2772 ac_fn_c_check_func ()
2773 {
2774   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2776 $as_echo_n "checking for $2... " >&6; }
2777 if eval \${$3+:} false; then :
2778   $as_echo_n "(cached) " >&6
2779 else
2780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781 /* end confdefs.h.  */
2782 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2783    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2784 #define $2 innocuous_$2
2785
2786 /* System header to define __stub macros and hopefully few prototypes,
2787     which can conflict with char $2 (); below.
2788     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2789     <limits.h> exists even on freestanding compilers.  */
2790
2791 #ifdef __STDC__
2792 # include <limits.h>
2793 #else
2794 # include <assert.h>
2795 #endif
2796
2797 #undef $2
2798
2799 /* Override any GCC internal prototype to avoid an error.
2800    Use char because int might match the return type of a GCC
2801    builtin and then its argument prototype would still apply.  */
2802 #ifdef __cplusplus
2803 extern "C"
2804 #endif
2805 char $2 ();
2806 /* The GNU C library defines this for functions which it implements
2807     to always fail with ENOSYS.  Some functions are actually named
2808     something starting with __ and the normal name is an alias.  */
2809 #if defined __stub_$2 || defined __stub___$2
2810 choke me
2811 #endif
2812
2813 int
2814 main ()
2815 {
2816 return $2 ();
2817   ;
2818   return 0;
2819 }
2820 _ACEOF
2821 if ac_fn_c_try_link "$LINENO"; then :
2822   eval "$3=yes"
2823 else
2824   eval "$3=no"
2825 fi
2826 rm -f core conftest.err conftest.$ac_objext \
2827     conftest$ac_exeext conftest.$ac_ext
2828 fi
2829 eval ac_res=\$$3
2830                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2831 $as_echo "$ac_res" >&6; }
2832   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2833
2834 } # ac_fn_c_check_func
2835
2836 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2837 # ---------------------------------------------
2838 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2839 # accordingly.
2840 ac_fn_c_check_decl ()
2841 {
2842   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2843   as_decl_name=`echo $2|sed 's/ *(.*//'`
2844   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2845   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2846 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2847 if eval \${$3+:} false; then :
2848   $as_echo_n "(cached) " >&6
2849 else
2850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2851 /* end confdefs.h.  */
2852 $4
2853 int
2854 main ()
2855 {
2856 #ifndef $as_decl_name
2857 #ifdef __cplusplus
2858   (void) $as_decl_use;
2859 #else
2860   (void) $as_decl_name;
2861 #endif
2862 #endif
2863
2864   ;
2865   return 0;
2866 }
2867 _ACEOF
2868 if ac_fn_c_try_compile "$LINENO"; then :
2869   eval "$3=yes"
2870 else
2871   eval "$3=no"
2872 fi
2873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2874 fi
2875 eval ac_res=\$$3
2876                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2877 $as_echo "$ac_res" >&6; }
2878   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2879
2880 } # ac_fn_c_check_decl
2881
2882 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2883 # --------------------------------------------
2884 # Tries to find the compile-time value of EXPR in a program that includes
2885 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2886 # computed
2887 ac_fn_c_compute_int ()
2888 {
2889   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2890   if test "$cross_compiling" = yes; then
2891     # Depending upon the size, compute the lo and hi bounds.
2892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2893 /* end confdefs.h.  */
2894 $4
2895 int
2896 main ()
2897 {
2898 static int test_array [1 - 2 * !(($2) >= 0)];
2899 test_array [0] = 0;
2900 return test_array [0];
2901
2902   ;
2903   return 0;
2904 }
2905 _ACEOF
2906 if ac_fn_c_try_compile "$LINENO"; then :
2907   ac_lo=0 ac_mid=0
2908   while :; do
2909     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2910 /* end confdefs.h.  */
2911 $4
2912 int
2913 main ()
2914 {
2915 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2916 test_array [0] = 0;
2917 return test_array [0];
2918
2919   ;
2920   return 0;
2921 }
2922 _ACEOF
2923 if ac_fn_c_try_compile "$LINENO"; then :
2924   ac_hi=$ac_mid; break
2925 else
2926   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2927                         if test $ac_lo -le $ac_mid; then
2928                           ac_lo= ac_hi=
2929                           break
2930                         fi
2931                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2932 fi
2933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2934   done
2935 else
2936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2937 /* end confdefs.h.  */
2938 $4
2939 int
2940 main ()
2941 {
2942 static int test_array [1 - 2 * !(($2) < 0)];
2943 test_array [0] = 0;
2944 return test_array [0];
2945
2946   ;
2947   return 0;
2948 }
2949 _ACEOF
2950 if ac_fn_c_try_compile "$LINENO"; then :
2951   ac_hi=-1 ac_mid=-1
2952   while :; do
2953     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2954 /* end confdefs.h.  */
2955 $4
2956 int
2957 main ()
2958 {
2959 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2960 test_array [0] = 0;
2961 return test_array [0];
2962
2963   ;
2964   return 0;
2965 }
2966 _ACEOF
2967 if ac_fn_c_try_compile "$LINENO"; then :
2968   ac_lo=$ac_mid; break
2969 else
2970   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2971                         if test $ac_mid -le $ac_hi; then
2972                           ac_lo= ac_hi=
2973                           break
2974                         fi
2975                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2976 fi
2977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2978   done
2979 else
2980   ac_lo= ac_hi=
2981 fi
2982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2983 fi
2984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2985 # Binary search between lo and hi bounds.
2986 while test "x$ac_lo" != "x$ac_hi"; do
2987   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2989 /* end confdefs.h.  */
2990 $4
2991 int
2992 main ()
2993 {
2994 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2995 test_array [0] = 0;
2996 return test_array [0];
2997
2998   ;
2999   return 0;
3000 }
3001 _ACEOF
3002 if ac_fn_c_try_compile "$LINENO"; then :
3003   ac_hi=$ac_mid
3004 else
3005   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3006 fi
3007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3008 done
3009 case $ac_lo in #((
3010 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3011 '') ac_retval=1 ;;
3012 esac
3013   else
3014     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015 /* end confdefs.h.  */
3016 $4
3017 static long int longval () { return $2; }
3018 static unsigned long int ulongval () { return $2; }
3019 #include <stdio.h>
3020 #include <stdlib.h>
3021 int
3022 main ()
3023 {
3024
3025   FILE *f = fopen ("conftest.val", "w");
3026   if (! f)
3027     return 1;
3028   if (($2) < 0)
3029     {
3030       long int i = longval ();
3031       if (i != ($2))
3032         return 1;
3033       fprintf (f, "%ld", i);
3034     }
3035   else
3036     {
3037       unsigned long int i = ulongval ();
3038       if (i != ($2))
3039         return 1;
3040       fprintf (f, "%lu", i);
3041     }
3042   /* Do not output a trailing newline, as this causes \r\n confusion
3043      on some platforms.  */
3044   return ferror (f) || fclose (f) != 0;
3045
3046   ;
3047   return 0;
3048 }
3049 _ACEOF
3050 if ac_fn_c_try_run "$LINENO"; then :
3051   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3052 else
3053   ac_retval=1
3054 fi
3055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3056   conftest.$ac_objext conftest.beam conftest.$ac_ext
3057 rm -f conftest.val
3058
3059   fi
3060   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3061   as_fn_set_status $ac_retval
3062
3063 } # ac_fn_c_compute_int
3064
3065 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3066 # ----------------------------------------------------
3067 # Tries to find if the field MEMBER exists in type AGGR, after including
3068 # INCLUDES, setting cache variable VAR accordingly.
3069 ac_fn_c_check_member ()
3070 {
3071   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3073 $as_echo_n "checking for $2.$3... " >&6; }
3074 if eval \${$4+:} false; then :
3075   $as_echo_n "(cached) " >&6
3076 else
3077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078 /* end confdefs.h.  */
3079 $5
3080 int
3081 main ()
3082 {
3083 static $2 ac_aggr;
3084 if (ac_aggr.$3)
3085 return 0;
3086   ;
3087   return 0;
3088 }
3089 _ACEOF
3090 if ac_fn_c_try_compile "$LINENO"; then :
3091   eval "$4=yes"
3092 else
3093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3094 /* end confdefs.h.  */
3095 $5
3096 int
3097 main ()
3098 {
3099 static $2 ac_aggr;
3100 if (sizeof ac_aggr.$3)
3101 return 0;
3102   ;
3103   return 0;
3104 }
3105 _ACEOF
3106 if ac_fn_c_try_compile "$LINENO"; then :
3107   eval "$4=yes"
3108 else
3109   eval "$4=no"
3110 fi
3111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3112 fi
3113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3114 fi
3115 eval ac_res=\$$4
3116                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3117 $as_echo "$ac_res" >&6; }
3118   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3119
3120 } # ac_fn_c_check_member
3121 cat >config.log <<_ACEOF
3122 This file contains any messages produced by compilers while
3123 running configure, to aid debugging if configure makes a mistake.
3124
3125 It was created by gzip $as_me 1.5, which was
3126 generated by GNU Autoconf 2.69.4-560f.  Invocation command line was
3127
3128   $ $0 $@
3129
3130 _ACEOF
3131 exec 5>>config.log
3132 {
3133 cat <<_ASUNAME
3134 ## --------- ##
3135 ## Platform. ##
3136 ## --------- ##
3137
3138 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3139 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3140 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3141 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3142 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3143
3144 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3145 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3146
3147 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3148 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3149 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3150 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3151 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3152 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3153 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3154
3155 _ASUNAME
3156
3157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158 for as_dir in $PATH
3159 do
3160   IFS=$as_save_IFS
3161   test -z "$as_dir" && as_dir=.
3162     $as_echo "PATH: $as_dir"
3163   done
3164 IFS=$as_save_IFS
3165
3166 } >&5
3167
3168 cat >&5 <<_ACEOF
3169
3170
3171 ## ----------- ##
3172 ## Core tests. ##
3173 ## ----------- ##
3174
3175 _ACEOF
3176
3177
3178 # Keep a trace of the command line.
3179 # Strip out --no-create and --no-recursion so they do not pile up.
3180 # Strip out --silent because we don't want to record it for future runs.
3181 # Also quote any args containing shell meta-characters.
3182 # Make two passes to allow for proper duplicate-argument suppression.
3183 ac_configure_args=
3184 ac_configure_args0=
3185 ac_configure_args1=
3186 ac_must_keep_next=false
3187 for ac_pass in 1 2
3188 do
3189   for ac_arg
3190   do
3191     case $ac_arg in
3192     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3193     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3194     | -silent | --silent | --silen | --sile | --sil)
3195       continue ;;
3196     *\'*)
3197       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3198     esac
3199     case $ac_pass in
3200     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3201     2)
3202       as_fn_append ac_configure_args1 " '$ac_arg'"
3203       if test $ac_must_keep_next = true; then
3204         ac_must_keep_next=false # Got value, back to normal.
3205       else
3206         case $ac_arg in
3207           *=* | --config-cache | -C | -disable-* | --disable-* \
3208           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3209           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3210           | -with-* | --with-* | -without-* | --without-* | --x)
3211             case "$ac_configure_args0 " in
3212               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3213             esac
3214             ;;
3215           -* ) ac_must_keep_next=true ;;
3216         esac
3217       fi
3218       as_fn_append ac_configure_args " '$ac_arg'"
3219       ;;
3220     esac
3221   done
3222 done
3223 { ac_configure_args0=; unset ac_configure_args0;}
3224 { ac_configure_args1=; unset ac_configure_args1;}
3225
3226 # When interrupted or exit'd, cleanup temporary files, and complete
3227 # config.log.  We remove comments because anyway the quotes in there
3228 # would cause problems or look ugly.
3229 # WARNING: Use '\'' to represent an apostrophe within the trap.
3230 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3231 trap 'exit_status=$?
3232   # Save into config.log some information that might help in debugging.
3233   {
3234     echo
3235
3236     $as_echo "## ---------------- ##
3237 ## Cache variables. ##
3238 ## ---------------- ##"
3239     echo
3240     # The following way of writing the cache mishandles newlines in values,
3241 (
3242   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3243     eval ac_val=\$$ac_var
3244     case $ac_val in #(
3245     *${as_nl}*)
3246       case $ac_var in #(
3247       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3248 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3249       esac
3250       case $ac_var in #(
3251       _ | IFS | as_nl) ;; #(
3252       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3253       *) { eval $ac_var=; unset $ac_var;} ;;
3254       esac ;;
3255     esac
3256   done
3257   (set) 2>&1 |
3258     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3259     *${as_nl}ac_space=\ *)
3260       sed -n \
3261         "s/'\''/'\''\\\\'\'''\''/g;
3262           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3263       ;; #(
3264     *)
3265       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3266       ;;
3267     esac |
3268     sort
3269 )
3270     echo
3271
3272     $as_echo "## ----------------- ##
3273 ## Output variables. ##
3274 ## ----------------- ##"
3275     echo
3276     for ac_var in $ac_subst_vars
3277     do
3278       eval ac_val=\$$ac_var
3279       case $ac_val in
3280       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3281       esac
3282       $as_echo "$ac_var='\''$ac_val'\''"
3283     done | sort
3284     echo
3285
3286     if test -n "$ac_subst_files"; then
3287       $as_echo "## ------------------- ##
3288 ## File substitutions. ##
3289 ## ------------------- ##"
3290       echo
3291       for ac_var in $ac_subst_files
3292       do
3293         eval ac_val=\$$ac_var
3294         case $ac_val in
3295         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3296         esac
3297         $as_echo "$ac_var='\''$ac_val'\''"
3298       done | sort
3299       echo
3300     fi
3301
3302     if test -s confdefs.h; then
3303       $as_echo "## ----------- ##
3304 ## confdefs.h. ##
3305 ## ----------- ##"
3306       echo
3307       cat confdefs.h
3308       echo
3309     fi
3310     test "$ac_signal" != 0 &&
3311       $as_echo "$as_me: caught signal $ac_signal"
3312     $as_echo "$as_me: exit $exit_status"
3313   } >&5
3314   rm -f core *.core core.conftest.* &&
3315     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3316     exit $exit_status
3317 ' 0
3318 for ac_signal in 1 2 13 15; do
3319   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3320 done
3321 ac_signal=0
3322
3323 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3324 rm -f -r conftest* confdefs.h
3325
3326 $as_echo "/* confdefs.h */" > confdefs.h
3327
3328 # Predefined preprocessor variables.
3329
3330 cat >>confdefs.h <<_ACEOF
3331 #define PACKAGE_NAME "$PACKAGE_NAME"
3332 _ACEOF
3333
3334 cat >>confdefs.h <<_ACEOF
3335 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3336 _ACEOF
3337
3338 cat >>confdefs.h <<_ACEOF
3339 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3340 _ACEOF
3341
3342 cat >>confdefs.h <<_ACEOF
3343 #define PACKAGE_STRING "$PACKAGE_STRING"
3344 _ACEOF
3345
3346 cat >>confdefs.h <<_ACEOF
3347 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3348 _ACEOF
3349
3350 cat >>confdefs.h <<_ACEOF
3351 #define PACKAGE_URL "$PACKAGE_URL"
3352 _ACEOF
3353
3354
3355 # Let the site file select an alternate cache file if it wants to.
3356 # Prefer an explicitly selected file to automatically selected ones.
3357 ac_site_file1=NONE
3358 ac_site_file2=NONE
3359 if test -n "$CONFIG_SITE"; then
3360   # We do not want a PATH search for config.site.
3361   case $CONFIG_SITE in #((
3362     -*)  ac_site_file1=./$CONFIG_SITE;;
3363     */*) ac_site_file1=$CONFIG_SITE;;
3364     *)   ac_site_file1=./$CONFIG_SITE;;
3365   esac
3366 elif test "x$prefix" != xNONE; then
3367   ac_site_file1=$prefix/share/config.site
3368   ac_site_file2=$prefix/etc/config.site
3369 else
3370   ac_site_file1=$ac_default_prefix/share/config.site
3371   ac_site_file2=$ac_default_prefix/etc/config.site
3372 fi
3373 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3374 do
3375   test "x$ac_site_file" = xNONE && continue
3376   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3377     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3378 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3379     sed 's/^/| /' "$ac_site_file" >&5
3380     . "$ac_site_file" \
3381       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3382 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3383 as_fn_error $? "failed to load site script $ac_site_file
3384 See \`config.log' for more details" "$LINENO" 5; }
3385   fi
3386 done
3387
3388 if test -r "$cache_file"; then
3389   # Some versions of bash will fail to source /dev/null (special files
3390   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3391   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3392     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3393 $as_echo "$as_me: loading cache $cache_file" >&6;}
3394     case $cache_file in
3395       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3396       *)                      . "./$cache_file";;
3397     esac
3398   fi
3399 else
3400   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3401 $as_echo "$as_me: creating cache $cache_file" >&6;}
3402   >$cache_file
3403 fi
3404
3405 as_fn_append ac_header_list " unistd.h"
3406 as_fn_append ac_header_list " sys/param.h"
3407 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3408 as_fn_append ac_header_list " sys/socket.h"
3409 as_fn_append ac_func_list " fchdir"
3410 as_fn_append ac_header_list " dirent.h"
3411 as_fn_append ac_func_list " fdopendir"
3412 as_fn_append ac_func_list " fcntl"
3413 as_fn_append ac_func_list " symlink"
3414 as_fn_append ac_func_list " mempcpy"
3415 as_fn_append ac_header_list " stdio_ext.h"
3416 as_fn_append ac_func_list " __fpending"
3417 as_fn_append ac_func_list " vasnprintf"
3418 as_fn_append ac_header_list " features.h"
3419 as_fn_append ac_func_list " snprintf"
3420 as_fn_append ac_func_list " fpurge"
3421 as_fn_append ac_func_list " __fpurge"
3422 as_fn_append ac_func_list " __freading"
3423 as_fn_append ac_func_list " alarm"
3424 as_fn_append ac_header_list " sys/stat.h"
3425 as_fn_append ac_func_list " getdtablesize"
3426 gl_getopt_required=GNU
3427 as_fn_append ac_header_list " getopt.h"
3428 as_fn_append ac_func_list " gettimeofday"
3429 as_fn_append ac_func_list " nanotime"
3430 as_fn_append ac_header_list " sys/time.h"
3431 as_fn_append ac_func_list " lstat"
3432 as_fn_append ac_header_list " math.h"
3433 as_fn_append ac_func_list " mbsinit"
3434 as_fn_append ac_func_list " mbrtowc"
3435 as_fn_append ac_header_list " sys/mman.h"
3436 as_fn_append ac_func_list " mprotect"
3437 as_fn_append ac_func_list " openat"
3438 as_fn_append ac_func_list " strerror_r"
3439 as_fn_append ac_func_list " __xpg_strerror_r"
3440 gl_printf_safe=yes
3441 as_fn_append ac_header_list " wchar.h"
3442 as_fn_append ac_header_list " stdint.h"
3443 as_fn_append ac_func_list " strdup"
3444 as_fn_append ac_func_list " catgets"
3445 as_fn_append ac_func_list " pipe"
3446 as_fn_append ac_header_list " utime.h"
3447 as_fn_append ac_func_list " futimes"
3448 as_fn_append ac_func_list " futimesat"
3449 as_fn_append ac_func_list " futimens"
3450 as_fn_append ac_func_list " utimensat"
3451 as_fn_append ac_func_list " lutimes"
3452 as_fn_append ac_func_list " iswcntrl"
3453 as_fn_append ac_header_list " wctype.h"
3454 as_fn_append ac_header_list " fcntl.h"
3455 as_fn_append ac_header_list " limits.h"
3456 as_fn_append ac_header_list " memory.h"
3457 as_fn_append ac_header_list " time.h"
3458 as_fn_append ac_func_list " chown"
3459 as_fn_append ac_func_list " fchmod"
3460 as_fn_append ac_func_list " fchown"
3461 as_fn_append ac_func_list " siginterrupt"
3462 # Check that the precious variables saved in the cache have kept the same
3463 # value.
3464 ac_cache_corrupted=false
3465 for ac_var in $ac_precious_vars; do
3466   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3467   eval ac_new_set=\$ac_env_${ac_var}_set
3468   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3469   eval ac_new_val=\$ac_env_${ac_var}_value
3470   case $ac_old_set,$ac_new_set in
3471     set,)
3472       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3473 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3474       ac_cache_corrupted=: ;;
3475     ,set)
3476       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3477 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3478       ac_cache_corrupted=: ;;
3479     ,);;
3480     *)
3481       if test "x$ac_old_val" != "x$ac_new_val"; then
3482         # differences in whitespace do not lead to failure.
3483         ac_old_val_w=`echo x $ac_old_val`
3484         ac_new_val_w=`echo x $ac_new_val`
3485         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3486           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3487 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3488           ac_cache_corrupted=:
3489         else
3490           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3491 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3492           eval $ac_var=\$ac_old_val
3493         fi
3494         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3495 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3496         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3497 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3498       fi;;
3499   esac
3500   # Pass precious variables to config.status.
3501   if test "$ac_new_set" = set; then
3502     case $ac_new_val in
3503     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3504     *) ac_arg=$ac_var=$ac_new_val ;;
3505     esac
3506     case " $ac_configure_args " in
3507       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3508       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3509     esac
3510   fi
3511 done
3512 if $ac_cache_corrupted; then
3513   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3514 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3515   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3516 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3517   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3518 fi
3519 ## -------------------- ##
3520 ## Main body of script. ##
3521 ## -------------------- ##
3522
3523 ac_ext=c
3524 ac_cpp='$CPP $CPPFLAGS'
3525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3528
3529
3530
3531
3532 ac_aux_dir=
3533 for ac_dir in build-aux "$srcdir"/build-aux; do
3534   if test -f "$ac_dir/install-sh"; then
3535     ac_aux_dir=$ac_dir
3536     ac_install_sh="$ac_aux_dir/install-sh -c"
3537     break
3538   elif test -f "$ac_dir/install.sh"; then
3539     ac_aux_dir=$ac_dir
3540     ac_install_sh="$ac_aux_dir/install.sh -c"
3541     break
3542   elif test -f "$ac_dir/shtool"; then
3543     ac_aux_dir=$ac_dir
3544     ac_install_sh="$ac_aux_dir/shtool install -c"
3545     break
3546   fi
3547 done
3548 if test -z "$ac_aux_dir"; then
3549   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3550 fi
3551
3552 # These three variables are undocumented and unsupported,
3553 # and are intended to be withdrawn in a future Autoconf release.
3554 # They can cause serious problems if a builder's source tree is in a directory
3555 # whose full name contains unusual characters.
3556 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3557 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3558 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3559
3560
3561 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3562
3563 am__api_version='1.12a'
3564
3565 # Find a good install program.  We prefer a C program (faster),
3566 # so one script is as good as another.  But avoid the broken or
3567 # incompatible versions:
3568 # SysV /etc/install, /usr/sbin/install
3569 # SunOS /usr/etc/install
3570 # IRIX /sbin/install
3571 # AIX /bin/install
3572 # AmigaOS /C/install, which installs bootblocks on floppy discs
3573 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3574 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3575 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3576 # OS/2's system install, which has a completely different semantic
3577 # ./install, which can be erroneously created by make from ./install.sh.
3578 # Reject install programs that cannot install multiple files.
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3580 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3581 if test -z "$INSTALL"; then
3582 if ${ac_cv_path_install+:} false; then :
3583   $as_echo_n "(cached) " >&6
3584 else
3585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586 for as_dir in $PATH
3587 do
3588   IFS=$as_save_IFS
3589   test -z "$as_dir" && as_dir=.
3590     # Account for people who put trailing slashes in PATH elements.
3591 case $as_dir/ in #((
3592   ./ | .// | /[cC]/* | \
3593   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3594   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3595   /usr/ucb/* ) ;;
3596   *)
3597     # OSF1 and SCO ODT 3.0 have their own names for install.
3598     # Don't use installbsd from OSF since it installs stuff as root
3599     # by default.
3600     for ac_prog in ginstall scoinst install; do
3601       for ac_exec_ext in '' $ac_executable_extensions; do
3602         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3603           if test $ac_prog = install &&
3604             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3605             # AIX install.  It has an incompatible calling convention.
3606             :
3607           elif test $ac_prog = install &&
3608             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3609             # program-specific install script used by HP pwplus--don't use.
3610             :
3611           else
3612             rm -rf conftest.one conftest.two conftest.dir
3613             echo one > conftest.one
3614             echo two > conftest.two
3615             mkdir conftest.dir
3616             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3617               test -s conftest.one && test -s conftest.two &&
3618               test -s conftest.dir/conftest.one &&
3619               test -s conftest.dir/conftest.two
3620             then
3621               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3622               break 3
3623             fi
3624           fi
3625         fi
3626       done
3627     done
3628     ;;
3629 esac
3630
3631   done
3632 IFS=$as_save_IFS
3633
3634 rm -rf conftest.one conftest.two conftest.dir
3635
3636 fi
3637   if test "${ac_cv_path_install+set}" = set; then
3638     INSTALL=$ac_cv_path_install
3639   else
3640     # As a last resort, use the slow shell script.  Don't cache a
3641     # value for INSTALL within a source directory, because that will
3642     # break other packages using the cache if that directory is
3643     # removed, or if the value is a relative name.
3644     INSTALL=$ac_install_sh
3645   fi
3646 fi
3647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3648 $as_echo "$INSTALL" >&6; }
3649
3650 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3651 # It thinks the first close brace ends the variable substitution.
3652 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3653
3654 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3655
3656 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3657
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3659 $as_echo_n "checking whether build environment is sane... " >&6; }
3660 # Reject unsafe characters in $srcdir or the absolute working directory
3661 # name.  Accept space and tab only in the latter.
3662 am_lf='
3663 '
3664 case `pwd` in
3665   *[\\\"\#\$\&\'\`$am_lf]*)
3666     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3667 esac
3668 case $srcdir in
3669   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3670     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3671 esac
3672
3673 # Do 'set' in a subshell so we don't clobber the current shell's
3674 # arguments.  Must try -L first in case configure is actually a
3675 # symlink; some systems play weird games with the mod time of symlinks
3676 # (eg FreeBSD returns the mod time of the symlink's containing
3677 # directory).
3678 if (
3679    am_has_slept=no
3680    for am_try in 1 2; do
3681      echo "timestamp, slept: $am_has_slept" > conftest.file
3682      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3683      if test "$*" = "X"; then
3684         # -L didn't work.
3685         set X `ls -t "$srcdir/configure" conftest.file`
3686      fi
3687      if test "$*" != "X $srcdir/configure conftest.file" \
3688         && test "$*" != "X conftest.file $srcdir/configure"; then
3689
3690         # If neither matched, then we have a broken ls.  This can happen
3691         # if, for instance, CONFIG_SHELL is bash and it inherits a
3692         # broken ls alias from the environment.  This has actually
3693         # happened.  Such a system could not be considered "sane".
3694         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3695   alias in your environment" "$LINENO" 5
3696      fi
3697      if test "$2" = conftest.file || test $am_try -eq 2; then
3698        break
3699      fi
3700      # Just in case.
3701      sleep 1
3702      am_has_slept=yes
3703    done
3704    test "$2" = conftest.file
3705    )
3706 then
3707    # Ok.
3708    :
3709 else
3710    as_fn_error $? "newly created file is older than distributed files!
3711 Check your system clock" "$LINENO" 5
3712 fi
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3714 $as_echo "yes" >&6; }
3715 # If we didn't sleep, we still need to ensure time stamps of config.status and
3716 # generated files are strictly newer.
3717 am_sleep_pid=
3718 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3719   ( sleep 1 ) &
3720   am_sleep_pid=$!
3721 fi
3722
3723 rm -f conftest.file
3724
3725 test "$program_prefix" != NONE &&
3726   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3727 # Use a double $ so make ignores it.
3728 test "$program_suffix" != NONE &&
3729   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3730 # Double any \ or $.
3731 # By default was `s,x,x', remove it if useless.
3732 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3733 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3734
3735 # expand $ac_aux_dir to an absolute path
3736 am_aux_dir=`cd $ac_aux_dir && pwd`
3737
3738 if test x"${MISSING+set}" != xset; then
3739   case $am_aux_dir in
3740   *\ * | *\     *)
3741     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3742   *)
3743     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3744   esac
3745 fi
3746 # Use eval to expand $SHELL
3747 if eval "$MISSING --run true"; then
3748   am_missing_run="$MISSING --run "
3749 else
3750   am_missing_run=
3751   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3752 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3753 fi
3754
3755 if test x"${install_sh}" != xset; then
3756   case $am_aux_dir in
3757   *\ * | *\     *)
3758     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3759   *)
3760     install_sh="\${SHELL} $am_aux_dir/install-sh"
3761   esac
3762 fi
3763
3764 # Installed binaries are usually stripped using 'strip' when the user
3765 # run "make install-strip".  However 'strip' might not be the right
3766 # tool to use in cross-compilation environments, therefore Automake
3767 # will honor the 'STRIP' environment variable to overrule this program.
3768 if test "$cross_compiling" != no; then
3769   if test -n "$ac_tool_prefix"; then
3770   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3771 set dummy ${ac_tool_prefix}strip; ac_word=$2
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773 $as_echo_n "checking for $ac_word... " >&6; }
3774 if ${ac_cv_prog_STRIP+:} false; then :
3775   $as_echo_n "(cached) " >&6
3776 else
3777   if test -n "$STRIP"; then
3778   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3779 else
3780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781 for as_dir in $PATH
3782 do
3783   IFS=$as_save_IFS
3784   test -z "$as_dir" && as_dir=.
3785     for ac_exec_ext in '' $ac_executable_extensions; do
3786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3787     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789     break 2
3790   fi
3791 done
3792   done
3793 IFS=$as_save_IFS
3794
3795 fi
3796 fi
3797 STRIP=$ac_cv_prog_STRIP
3798 if test -n "$STRIP"; then
3799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3800 $as_echo "$STRIP" >&6; }
3801 else
3802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803 $as_echo "no" >&6; }
3804 fi
3805
3806
3807 fi
3808 if test -z "$ac_cv_prog_STRIP"; then
3809   ac_ct_STRIP=$STRIP
3810   # Extract the first word of "strip", so it can be a program name with args.
3811 set dummy strip; ac_word=$2
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813 $as_echo_n "checking for $ac_word... " >&6; }
3814 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3815   $as_echo_n "(cached) " >&6
3816 else
3817   if test -n "$ac_ct_STRIP"; then
3818   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3819 else
3820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821 for as_dir in $PATH
3822 do
3823   IFS=$as_save_IFS
3824   test -z "$as_dir" && as_dir=.
3825     for ac_exec_ext in '' $ac_executable_extensions; do
3826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3827     ac_cv_prog_ac_ct_STRIP="strip"
3828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3829     break 2
3830   fi
3831 done
3832   done
3833 IFS=$as_save_IFS
3834
3835 fi
3836 fi
3837 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3838 if test -n "$ac_ct_STRIP"; then
3839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3840 $as_echo "$ac_ct_STRIP" >&6; }
3841 else
3842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3843 $as_echo "no" >&6; }
3844 fi
3845
3846   if test "x$ac_ct_STRIP" = x; then
3847     STRIP=":"
3848   else
3849     case $cross_compiling:$ac_tool_warned in
3850 yes:)
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3853 ac_tool_warned=yes ;;
3854 esac
3855     STRIP=$ac_ct_STRIP
3856   fi
3857 else
3858   STRIP="$ac_cv_prog_STRIP"
3859 fi
3860
3861 fi
3862 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3863
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3865 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3866 if test -z "$MKDIR_P"; then
3867   if ${ac_cv_path_mkdir+:} false; then :
3868   $as_echo_n "(cached) " >&6
3869 else
3870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3872 do
3873   IFS=$as_save_IFS
3874   test -z "$as_dir" && as_dir=.
3875     for ac_prog in mkdir gmkdir; do
3876          for ac_exec_ext in '' $ac_executable_extensions; do
3877            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3878            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3879              'mkdir (GNU coreutils) '* | \
3880              'mkdir (coreutils) '* | \
3881              'mkdir (fileutils) '4.1*)
3882                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3883                break 3;;
3884            esac
3885          done
3886        done
3887   done
3888 IFS=$as_save_IFS
3889
3890 fi
3891
3892   test -d ./--version && rmdir ./--version
3893   if test "${ac_cv_path_mkdir+set}" = set; then
3894     MKDIR_P="$ac_cv_path_mkdir -p"
3895   else
3896     # As a last resort, use the slow shell script.  Don't cache a
3897     # value for MKDIR_P within a source directory, because that will
3898     # break other packages using the cache if that directory is
3899     # removed, or if the value is a relative name.
3900     MKDIR_P="$ac_install_sh -d"
3901   fi
3902 fi
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3904 $as_echo "$MKDIR_P" >&6; }
3905
3906
3907 for ac_prog in gawk mawk nawk awk
3908 do
3909   # Extract the first word of "$ac_prog", so it can be a program name with args.
3910 set dummy $ac_prog; ac_word=$2
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3912 $as_echo_n "checking for $ac_word... " >&6; }
3913 if ${ac_cv_prog_AWK+:} false; then :
3914   $as_echo_n "(cached) " >&6
3915 else
3916   if test -n "$AWK"; then
3917   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3918 else
3919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920 for as_dir in $PATH
3921 do
3922   IFS=$as_save_IFS
3923   test -z "$as_dir" && as_dir=.
3924     for ac_exec_ext in '' $ac_executable_extensions; do
3925   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3926     ac_cv_prog_AWK="$ac_prog"
3927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3928     break 2
3929   fi
3930 done
3931   done
3932 IFS=$as_save_IFS
3933
3934 fi
3935 fi
3936 AWK=$ac_cv_prog_AWK
3937 if test -n "$AWK"; then
3938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3939 $as_echo "$AWK" >&6; }
3940 else
3941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942 $as_echo "no" >&6; }
3943 fi
3944
3945
3946   test -n "$AWK" && break
3947 done
3948
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3950 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3951 set x ${MAKE-make}
3952 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3953 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3954   $as_echo_n "(cached) " >&6
3955 else
3956   cat >conftest.make <<\_ACEOF
3957 SHELL = /bin/sh
3958 all:
3959         @echo '@@@%%%=$(MAKE)=@@@%%%'
3960 _ACEOF
3961 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3962 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3963   *@@@%%%=?*=@@@%%%*)
3964     eval ac_cv_prog_make_${ac_make}_set=yes;;
3965   *)
3966     eval ac_cv_prog_make_${ac_make}_set=no;;
3967 esac
3968 rm -f conftest.make
3969 fi
3970 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3972 $as_echo "yes" >&6; }
3973   SET_MAKE=
3974 else
3975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3976 $as_echo "no" >&6; }
3977   SET_MAKE="MAKE=${MAKE-make}"
3978 fi
3979
3980 rm -rf .tst 2>/dev/null
3981 mkdir .tst 2>/dev/null
3982 if test -d .tst; then
3983   am__leading_dot=.
3984 else
3985   am__leading_dot=_
3986 fi
3987 rmdir .tst 2>/dev/null
3988
3989 # Check whether --enable-silent-rules was given.
3990 if test "${enable_silent_rules+set}" = set; then :
3991   enableval=$enable_silent_rules;
3992 fi
3993
3994 case $enable_silent_rules in # (((
3995   yes) AM_DEFAULT_VERBOSITY=0;;
3996    no) AM_DEFAULT_VERBOSITY=1;;
3997     *) AM_DEFAULT_VERBOSITY=1;;
3998 esac
3999 am_make=${MAKE-make}
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4001 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4002 if ${am_cv_make_support_nested_variables+:} false; then :
4003   $as_echo_n "(cached) " >&6
4004 else
4005   if $as_echo 'TRUE=$(BAR$(V))
4006 BAR0=false
4007 BAR1=true
4008 V=1
4009 am__doit:
4010         @$(TRUE)
4011 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4012   am_cv_make_support_nested_variables=yes
4013 else
4014   am_cv_make_support_nested_variables=no
4015 fi
4016 fi
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4018 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4019 if test $am_cv_make_support_nested_variables = yes; then
4020     AM_V='$(V)'
4021   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4022 else
4023   AM_V=$AM_DEFAULT_VERBOSITY
4024   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4025 fi
4026 AM_BACKSLASH='\'
4027
4028 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4029   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4030   # is not polluted with repeated "-I."
4031   am__isrc=' -I$(srcdir)'
4032   # test to see if srcdir already configured
4033   if test -f $srcdir/config.status; then
4034     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4035   fi
4036 fi
4037
4038 # test whether we have cygpath
4039 if test -z "$CYGPATH_W"; then
4040   if (cygpath --version) >/dev/null 2>/dev/null; then
4041     CYGPATH_W='cygpath -w'
4042   else
4043     CYGPATH_W=echo
4044   fi
4045 fi
4046
4047
4048 # Define the identity of the package.
4049
4050  PACKAGE='gzip'
4051  VERSION='1.5'
4052
4053
4054 cat >>confdefs.h <<_ACEOF
4055 #define PACKAGE "$PACKAGE"
4056 _ACEOF
4057
4058
4059 cat >>confdefs.h <<_ACEOF
4060 #define VERSION "$VERSION"
4061 _ACEOF
4062
4063 # Some tools Automake needs.
4064
4065 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4066
4067
4068 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4069
4070
4071 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4072
4073
4074 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4075
4076
4077 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4078
4079 # We need awk for the "check" target.  The system "awk" is bad on
4080 # some platforms.
4081 # Always define AMTAR for backward compatibility.  Yes, it's still used
4082 # in the wild :-(  We should find a proper way to deprecate it ...
4083 AMTAR='$${TAR-tar}'
4084
4085 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4086
4087
4088
4089
4090
4091 # Check whether --enable-silent-rules was given.
4092 if test "${enable_silent_rules+set}" = set; then :
4093   enableval=$enable_silent_rules;
4094 fi
4095
4096 case $enable_silent_rules in # (((
4097   yes) AM_DEFAULT_VERBOSITY=0;;
4098    no) AM_DEFAULT_VERBOSITY=1;;
4099     *) AM_DEFAULT_VERBOSITY=0;;
4100 esac
4101 am_make=${MAKE-make}
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4103 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4104 if ${am_cv_make_support_nested_variables+:} false; then :
4105   $as_echo_n "(cached) " >&6
4106 else
4107   if $as_echo 'TRUE=$(BAR$(V))
4108 BAR0=false
4109 BAR1=true
4110 V=1
4111 am__doit:
4112         @$(TRUE)
4113 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4114   am_cv_make_support_nested_variables=yes
4115 else
4116   am_cv_make_support_nested_variables=no
4117 fi
4118 fi
4119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4120 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4121 if test $am_cv_make_support_nested_variables = yes; then
4122     AM_V='$(V)'
4123   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4124 else
4125   AM_V=$AM_DEFAULT_VERBOSITY
4126   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4127 fi
4128 AM_BACKSLASH='\'
4129  # make --enable-silent-rules the default.
4130
4131 DEPDIR="${am__leading_dot}deps"
4132
4133 ac_config_commands="$ac_config_commands depfiles"
4134
4135
4136 am_make=${MAKE-make}
4137 cat > confinc << 'END'
4138 am__doit:
4139         @echo this is the am__doit target
4140 .PHONY: am__doit
4141 END
4142 # If we don't find an include directive, just comment out the code.
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4144 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4145 am__include="#"
4146 am__quote=
4147 _am_result=none
4148 # First try GNU make style include.
4149 echo "include confinc" > confmf
4150 # Ignore all kinds of additional output from 'make'.
4151 case `$am_make -s -f confmf 2> /dev/null` in #(
4152 *the\ am__doit\ target*)
4153   am__include=include
4154   am__quote=
4155   _am_result=GNU
4156   ;;
4157 esac
4158 # Now try BSD make style include.
4159 if test "$am__include" = "#"; then
4160    echo '.include "confinc"' > confmf
4161    case `$am_make -s -f confmf 2> /dev/null` in #(
4162    *the\ am__doit\ target*)
4163      am__include=.include
4164      am__quote="\""
4165      _am_result=BSD
4166      ;;
4167    esac
4168 fi
4169
4170
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4172 $as_echo "$_am_result" >&6; }
4173 rm -f confinc confmf
4174
4175 # Check whether --enable-dependency-tracking was given.
4176 if test "${enable_dependency_tracking+set}" = set; then :
4177   enableval=$enable_dependency_tracking;
4178 fi
4179
4180 if test "x$enable_dependency_tracking" != xno; then
4181   am_depcomp="$ac_aux_dir/depcomp"
4182   AMDEPBACKSLASH='\'
4183   am__nodep='_no'
4184 fi
4185  if test "x$enable_dependency_tracking" != xno; then
4186   AMDEP_TRUE=
4187   AMDEP_FALSE='#'
4188 else
4189   AMDEP_TRUE='#'
4190   AMDEP_FALSE=
4191 fi
4192
4193
4194 ac_ext=c
4195 ac_cpp='$CPP $CPPFLAGS'
4196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4199 if test -n "$ac_tool_prefix"; then
4200   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4201 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4203 $as_echo_n "checking for $ac_word... " >&6; }
4204 if ${ac_cv_prog_CC+:} false; then :
4205   $as_echo_n "(cached) " >&6
4206 else
4207   if test -n "$CC"; then
4208   ac_cv_prog_CC="$CC" # Let the user override the test.
4209 else
4210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4211 for as_dir in $PATH
4212 do
4213   IFS=$as_save_IFS
4214   test -z "$as_dir" && as_dir=.
4215     for ac_exec_ext in '' $ac_executable_extensions; do
4216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4217     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4219     break 2
4220   fi
4221 done
4222   done
4223 IFS=$as_save_IFS
4224
4225 fi
4226 fi
4227 CC=$ac_cv_prog_CC
4228 if test -n "$CC"; then
4229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4230 $as_echo "$CC" >&6; }
4231 else
4232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4233 $as_echo "no" >&6; }
4234 fi
4235
4236
4237 fi
4238 if test -z "$ac_cv_prog_CC"; then
4239   ac_ct_CC=$CC
4240   # Extract the first word of "gcc", so it can be a program name with args.
4241 set dummy gcc; ac_word=$2
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243 $as_echo_n "checking for $ac_word... " >&6; }
4244 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4245   $as_echo_n "(cached) " >&6
4246 else
4247   if test -n "$ac_ct_CC"; then
4248   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4249 else
4250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251 for as_dir in $PATH
4252 do
4253   IFS=$as_save_IFS
4254   test -z "$as_dir" && as_dir=.
4255     for ac_exec_ext in '' $ac_executable_extensions; do
4256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4257     ac_cv_prog_ac_ct_CC="gcc"
4258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4259     break 2
4260   fi
4261 done
4262   done
4263 IFS=$as_save_IFS
4264
4265 fi
4266 fi
4267 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4268 if test -n "$ac_ct_CC"; then
4269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4270 $as_echo "$ac_ct_CC" >&6; }
4271 else
4272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273 $as_echo "no" >&6; }
4274 fi
4275
4276   if test "x$ac_ct_CC" = x; then
4277     CC=""
4278   else
4279     case $cross_compiling:$ac_tool_warned in
4280 yes:)
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4282 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4283 ac_tool_warned=yes ;;
4284 esac
4285     CC=$ac_ct_CC
4286   fi
4287 else
4288   CC="$ac_cv_prog_CC"
4289 fi
4290
4291 if test -z "$CC"; then
4292           if test -n "$ac_tool_prefix"; then
4293     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4294 set dummy ${ac_tool_prefix}cc; ac_word=$2
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4296 $as_echo_n "checking for $ac_word... " >&6; }
4297 if ${ac_cv_prog_CC+:} false; then :
4298   $as_echo_n "(cached) " >&6
4299 else
4300   if test -n "$CC"; then
4301   ac_cv_prog_CC="$CC" # Let the user override the test.
4302 else
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304 for as_dir in $PATH
4305 do
4306   IFS=$as_save_IFS
4307   test -z "$as_dir" && as_dir=.
4308     for ac_exec_ext in '' $ac_executable_extensions; do
4309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4310     ac_cv_prog_CC="${ac_tool_prefix}cc"
4311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312     break 2
4313   fi
4314 done
4315   done
4316 IFS=$as_save_IFS
4317
4318 fi
4319 fi
4320 CC=$ac_cv_prog_CC
4321 if test -n "$CC"; then
4322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4323 $as_echo "$CC" >&6; }
4324 else
4325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4326 $as_echo "no" >&6; }
4327 fi
4328
4329
4330   fi
4331 fi
4332 if test -z "$CC"; then
4333   # Extract the first word of "cc", so it can be a program name with args.
4334 set dummy cc; ac_word=$2
4335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4336 $as_echo_n "checking for $ac_word... " >&6; }
4337 if ${ac_cv_prog_CC+:} false; then :
4338   $as_echo_n "(cached) " >&6
4339 else
4340   if test -n "$CC"; then
4341   ac_cv_prog_CC="$CC" # Let the user override the test.
4342 else
4343   ac_prog_rejected=no
4344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4345 for as_dir in $PATH
4346 do
4347   IFS=$as_save_IFS
4348   test -z "$as_dir" && as_dir=.
4349     for ac_exec_ext in '' $ac_executable_extensions; do
4350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4351     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4352        ac_prog_rejected=yes
4353        continue
4354      fi
4355     ac_cv_prog_CC="cc"
4356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4357     break 2
4358   fi
4359 done
4360   done
4361 IFS=$as_save_IFS
4362
4363 if test $ac_prog_rejected = yes; then
4364   # We found a bogon in the path, so make sure we never use it.
4365   set dummy $ac_cv_prog_CC
4366   shift
4367   if test $# != 0; then
4368     # We chose a different compiler from the bogus one.
4369     # However, it has the same basename, so the bogon will be chosen
4370     # first if we set CC to just the basename; use the full file name.
4371     shift
4372     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4373   fi
4374 fi
4375 fi
4376 fi
4377 CC=$ac_cv_prog_CC
4378 if test -n "$CC"; then
4379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4380 $as_echo "$CC" >&6; }
4381 else
4382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4383 $as_echo "no" >&6; }
4384 fi
4385
4386
4387 fi
4388 if test -z "$CC"; then
4389   if test -n "$ac_tool_prefix"; then
4390   for ac_prog in cl.exe
4391   do
4392     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4393 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4395 $as_echo_n "checking for $ac_word... " >&6; }
4396 if ${ac_cv_prog_CC+:} false; then :
4397   $as_echo_n "(cached) " >&6
4398 else
4399   if test -n "$CC"; then
4400   ac_cv_prog_CC="$CC" # Let the user override the test.
4401 else
4402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403 for as_dir in $PATH
4404 do
4405   IFS=$as_save_IFS
4406   test -z "$as_dir" && as_dir=.
4407     for ac_exec_ext in '' $ac_executable_extensions; do
4408   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4410     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411     break 2
4412   fi
4413 done
4414   done
4415 IFS=$as_save_IFS
4416
4417 fi
4418 fi
4419 CC=$ac_cv_prog_CC
4420 if test -n "$CC"; then
4421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4422 $as_echo "$CC" >&6; }
4423 else
4424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425 $as_echo "no" >&6; }
4426 fi
4427
4428
4429     test -n "$CC" && break
4430   done
4431 fi
4432 if test -z "$CC"; then
4433   ac_ct_CC=$CC
4434   for ac_prog in cl.exe
4435 do
4436   # Extract the first word of "$ac_prog", so it can be a program name with args.
4437 set dummy $ac_prog; ac_word=$2
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439 $as_echo_n "checking for $ac_word... " >&6; }
4440 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4441   $as_echo_n "(cached) " >&6
4442 else
4443   if test -n "$ac_ct_CC"; then
4444   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4445 else
4446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4447 for as_dir in $PATH
4448 do
4449   IFS=$as_save_IFS
4450   test -z "$as_dir" && as_dir=.
4451     for ac_exec_ext in '' $ac_executable_extensions; do
4452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4453     ac_cv_prog_ac_ct_CC="$ac_prog"
4454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4455     break 2
4456   fi
4457 done
4458   done
4459 IFS=$as_save_IFS
4460
4461 fi
4462 fi
4463 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4464 if test -n "$ac_ct_CC"; then
4465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4466 $as_echo "$ac_ct_CC" >&6; }
4467 else
4468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469 $as_echo "no" >&6; }
4470 fi
4471
4472
4473   test -n "$ac_ct_CC" && break
4474 done
4475
4476   if test "x$ac_ct_CC" = x; then
4477     CC=""
4478   else
4479     case $cross_compiling:$ac_tool_warned in
4480 yes:)
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4482 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4483 ac_tool_warned=yes ;;
4484 esac
4485     CC=$ac_ct_CC
4486   fi
4487 fi
4488
4489 fi
4490
4491
4492 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4493 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4494 as_fn_error $? "no acceptable C compiler found in \$PATH
4495 See \`config.log' for more details" "$LINENO" 5; }
4496
4497 # Provide some information about the compiler.
4498 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4499 set X $ac_compile
4500 ac_compiler=$2
4501 for ac_option in --version -v -V -qversion; do
4502   { { ac_try="$ac_compiler $ac_option >&5"
4503 case "(($ac_try" in
4504   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4505   *) ac_try_echo=$ac_try;;
4506 esac
4507 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4508 $as_echo "$ac_try_echo"; } >&5
4509   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4510   ac_status=$?
4511   if test -s conftest.err; then
4512     sed '10a\
4513 ... rest of stderr output deleted ...
4514          10q' conftest.err >conftest.er1
4515     cat conftest.er1 >&5
4516   fi
4517   rm -f conftest.er1 conftest.err
4518   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4519   test $ac_status = 0; }
4520 done
4521
4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523 /* end confdefs.h.  */
4524
4525 int
4526 main ()
4527 {
4528
4529   ;
4530   return 0;
4531 }
4532 _ACEOF
4533 ac_clean_files_save=$ac_clean_files
4534 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4535 # Try to create an executable without -o first, disregard a.out.
4536 # It will help us diagnose broken compilers, and finding out an intuition
4537 # of exeext.
4538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4539 $as_echo_n "checking whether the C compiler works... " >&6; }
4540 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4541
4542 # The possible output files:
4543 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4544
4545 ac_rmfiles=
4546 for ac_file in $ac_files
4547 do
4548   case $ac_file in
4549     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4550     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4551   esac
4552 done
4553 rm -f $ac_rmfiles
4554
4555 if { { ac_try="$ac_link_default"
4556 case "(($ac_try" in
4557   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4558   *) ac_try_echo=$ac_try;;
4559 esac
4560 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4561 $as_echo "$ac_try_echo"; } >&5
4562   (eval "$ac_link_default") 2>&5
4563   ac_status=$?
4564   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4565   test $ac_status = 0; }; then :
4566   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4567 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4568 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4569 # so that the user can short-circuit this test for compilers unknown to
4570 # Autoconf.
4571 for ac_file in $ac_files ''
4572 do
4573   test -f "$ac_file" || continue
4574   case $ac_file in
4575     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4576         ;;
4577     [ab].out )
4578         # We found the default executable, but exeext='' is most
4579         # certainly right.
4580         break;;
4581     *.* )
4582         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4583         then :; else
4584            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4585         fi
4586         # We set ac_cv_exeext here because the later test for it is not
4587         # safe: cross compilers may not add the suffix if given an `-o'
4588         # argument, so we may need to know it at that point already.
4589         # Even if this section looks crufty: it has the advantage of
4590         # actually working.
4591         break;;
4592     * )
4593         break;;
4594   esac
4595 done
4596 test "$ac_cv_exeext" = no && ac_cv_exeext=
4597
4598 else
4599   ac_file=''
4600 fi
4601 if test -z "$ac_file"; then :
4602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603 $as_echo "no" >&6; }
4604 $as_echo "$as_me: failed program was:" >&5
4605 sed 's/^/| /' conftest.$ac_ext >&5
4606
4607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4608 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4609 as_fn_error 77 "C compiler cannot create executables
4610 See \`config.log' for more details" "$LINENO" 5; }
4611 else
4612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4613 $as_echo "yes" >&6; }
4614 fi
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4616 $as_echo_n "checking for C compiler default output file name... " >&6; }
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4618 $as_echo "$ac_file" >&6; }
4619 ac_exeext=$ac_cv_exeext
4620
4621 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4622 ac_clean_files=$ac_clean_files_save
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4624 $as_echo_n "checking for suffix of executables... " >&6; }
4625 if { { ac_try="$ac_link"
4626 case "(($ac_try" in
4627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4628   *) ac_try_echo=$ac_try;;
4629 esac
4630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4631 $as_echo "$ac_try_echo"; } >&5
4632   (eval "$ac_link") 2>&5
4633   ac_status=$?
4634   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4635   test $ac_status = 0; }; then :
4636   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4637 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4638 # work properly (i.e., refer to `conftest.exe'), while it won't with
4639 # `rm'.
4640 for ac_file in conftest.exe conftest conftest.*; do
4641   test -f "$ac_file" || continue
4642   case $ac_file in
4643     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4644     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4645           break;;
4646     * ) break;;
4647   esac
4648 done
4649 else
4650   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4651 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4652 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4653 See \`config.log' for more details" "$LINENO" 5; }
4654 fi
4655 rm -f conftest conftest$ac_cv_exeext
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4657 $as_echo "$ac_cv_exeext" >&6; }
4658
4659 rm -f conftest.$ac_ext
4660 EXEEXT=$ac_cv_exeext
4661 ac_exeext=$EXEEXT
4662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4663 /* end confdefs.h.  */
4664 #include <stdio.h>
4665 int
4666 main ()
4667 {
4668 FILE *f = fopen ("conftest.out", "w");
4669  return ferror (f) || fclose (f) != 0;
4670
4671   ;
4672   return 0;
4673 }
4674 _ACEOF
4675 ac_clean_files="$ac_clean_files conftest.out"
4676 # Check that the compiler produces executables we can run.  If not, either
4677 # the compiler is broken, or we cross compile.
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4679 $as_echo_n "checking whether we are cross compiling... " >&6; }
4680 if test "$cross_compiling" != yes; then
4681   { { ac_try="$ac_link"
4682 case "(($ac_try" in
4683   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4684   *) ac_try_echo=$ac_try;;
4685 esac
4686 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4687 $as_echo "$ac_try_echo"; } >&5
4688   (eval "$ac_link") 2>&5
4689   ac_status=$?
4690   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4691   test $ac_status = 0; }
4692   if { ac_try='./conftest$ac_cv_exeext'
4693   { { case "(($ac_try" in
4694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4695   *) ac_try_echo=$ac_try;;
4696 esac
4697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4698 $as_echo "$ac_try_echo"; } >&5
4699   (eval "$ac_try") 2>&5
4700   ac_status=$?
4701   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4702   test $ac_status = 0; }; }; then
4703     cross_compiling=no
4704   else
4705     if test "$cross_compiling" = maybe; then
4706         cross_compiling=yes
4707     else
4708         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4709 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4710 as_fn_error $? "cannot run C compiled programs.
4711 If you meant to cross compile, use \`--host'.
4712 See \`config.log' for more details" "$LINENO" 5; }
4713     fi
4714   fi
4715 fi
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4717 $as_echo "$cross_compiling" >&6; }
4718
4719 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4720 ac_clean_files=$ac_clean_files_save
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4722 $as_echo_n "checking for suffix of object files... " >&6; }
4723 if ${ac_cv_objext+:} false; then :
4724   $as_echo_n "(cached) " >&6
4725 else
4726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4727 /* end confdefs.h.  */
4728
4729 int
4730 main ()
4731 {
4732
4733   ;
4734   return 0;
4735 }
4736 _ACEOF
4737 rm -f conftest.o conftest.obj
4738 if { { ac_try="$ac_compile"
4739 case "(($ac_try" in
4740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4741   *) ac_try_echo=$ac_try;;
4742 esac
4743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4744 $as_echo "$ac_try_echo"; } >&5
4745   (eval "$ac_compile") 2>&5
4746   ac_status=$?
4747   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4748   test $ac_status = 0; }; then :
4749   for ac_file in conftest.o conftest.obj conftest.*; do
4750   test -f "$ac_file" || continue;
4751   case $ac_file in
4752     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4753     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4754        break;;
4755   esac
4756 done
4757 else
4758   $as_echo "$as_me: failed program was:" >&5
4759 sed 's/^/| /' conftest.$ac_ext >&5
4760
4761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4763 as_fn_error $? "cannot compute suffix of object files: cannot compile
4764 See \`config.log' for more details" "$LINENO" 5; }
4765 fi
4766 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4767 fi
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4769 $as_echo "$ac_cv_objext" >&6; }
4770 OBJEXT=$ac_cv_objext
4771 ac_objext=$OBJEXT
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4773 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4774 if ${ac_cv_c_compiler_gnu+:} false; then :
4775   $as_echo_n "(cached) " >&6
4776 else
4777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4778 /* end confdefs.h.  */
4779
4780 int
4781 main ()
4782 {
4783 #ifndef __GNUC__
4784        choke me
4785 #endif
4786
4787   ;
4788   return 0;
4789 }
4790 _ACEOF
4791 if ac_fn_c_try_compile "$LINENO"; then :
4792   ac_compiler_gnu=yes
4793 else
4794   ac_compiler_gnu=no
4795 fi
4796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4797 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4798
4799 fi
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4801 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4802 if test $ac_compiler_gnu = yes; then
4803   GCC=yes
4804 else
4805   GCC=
4806 fi
4807 ac_test_CFLAGS=${CFLAGS+set}
4808 ac_save_CFLAGS=$CFLAGS
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4810 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4811 if ${ac_cv_prog_cc_g+:} false; then :
4812   $as_echo_n "(cached) " >&6
4813 else
4814   ac_save_c_werror_flag=$ac_c_werror_flag
4815    ac_c_werror_flag=yes
4816    ac_cv_prog_cc_g=no
4817    CFLAGS="-g"
4818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4819 /* end confdefs.h.  */
4820
4821 int
4822 main ()
4823 {
4824
4825   ;
4826   return 0;
4827 }
4828 _ACEOF
4829 if ac_fn_c_try_compile "$LINENO"; then :
4830   ac_cv_prog_cc_g=yes
4831 else
4832   CFLAGS=""
4833       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4834 /* end confdefs.h.  */
4835
4836 int
4837 main ()
4838 {
4839
4840   ;
4841   return 0;
4842 }
4843 _ACEOF
4844 if ac_fn_c_try_compile "$LINENO"; then :
4845
4846 else
4847   ac_c_werror_flag=$ac_save_c_werror_flag
4848          CFLAGS="-g"
4849          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h.  */
4851
4852 int
4853 main ()
4854 {
4855
4856   ;
4857   return 0;
4858 }
4859 _ACEOF
4860 if ac_fn_c_try_compile "$LINENO"; then :
4861   ac_cv_prog_cc_g=yes
4862 fi
4863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4864 fi
4865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4866 fi
4867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4868    ac_c_werror_flag=$ac_save_c_werror_flag
4869 fi
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4871 $as_echo "$ac_cv_prog_cc_g" >&6; }
4872 if test "$ac_test_CFLAGS" = set; then
4873   CFLAGS=$ac_save_CFLAGS
4874 elif test $ac_cv_prog_cc_g = yes; then
4875   if test "$GCC" = yes; then
4876     CFLAGS="-g -O2"
4877   else
4878     CFLAGS="-g"
4879   fi
4880 else
4881   if test "$GCC" = yes; then
4882     CFLAGS="-O2"
4883   else
4884     CFLAGS=
4885   fi
4886 fi
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4888 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4889 if ${ac_cv_prog_cc_c89+:} false; then :
4890   $as_echo_n "(cached) " >&6
4891 else
4892   ac_cv_prog_cc_c89=no
4893 ac_save_CC=$CC
4894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4895 /* end confdefs.h.  */
4896 #include <stdarg.h>
4897 #include <stdio.h>
4898 struct stat;
4899 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4900 struct buf { int x; };
4901 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4902 static char *e (p, i)
4903      char **p;
4904      int i;
4905 {
4906   return p[i];
4907 }
4908 static char *f (char * (*g) (char **, int), char **p, ...)
4909 {
4910   char *s;
4911   va_list v;
4912   va_start (v,p);
4913   s = g (p, va_arg (v,int));
4914   va_end (v);
4915   return s;
4916 }
4917
4918 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4919    function prototypes and stuff, but not '\xHH' hex character constants.
4920    These don't provoke an error unfortunately, instead are silently treated
4921    as 'x'.  The following induces an error, until -std is added to get
4922    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4923    array size at least.  It's necessary to write '\x00'==0 to get something
4924    that's true only with -std.  */
4925 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4926
4927 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4928    inside strings and character constants.  */
4929 #define FOO(x) 'x'
4930 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4931
4932 int test (int i, double x);
4933 struct s1 {int (*f) (int a);};
4934 struct s2 {int (*f) (double a);};
4935 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4936 int argc;
4937 char **argv;
4938 int
4939 main ()
4940 {
4941 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4942   ;
4943   return 0;
4944 }
4945 _ACEOF
4946 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4947         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4948 do
4949   CC="$ac_save_CC $ac_arg"
4950   if ac_fn_c_try_compile "$LINENO"; then :
4951   ac_cv_prog_cc_c89=$ac_arg
4952 fi
4953 rm -f core conftest.err conftest.$ac_objext
4954   test "x$ac_cv_prog_cc_c89" != "xno" && break
4955 done
4956 rm -f conftest.$ac_ext
4957 CC=$ac_save_CC
4958
4959 fi
4960 # AC_CACHE_VAL
4961 case "x$ac_cv_prog_cc_c89" in
4962   x)
4963     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4964 $as_echo "none needed" >&6; } ;;
4965   xno)
4966     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4967 $as_echo "unsupported" >&6; } ;;
4968   *)
4969     CC="$CC $ac_cv_prog_cc_c89"
4970     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4971 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4972 esac
4973 if test "x$ac_cv_prog_cc_c89" != xno; then :
4974
4975 fi
4976
4977 ac_ext=c
4978 ac_cpp='$CPP $CPPFLAGS'
4979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4982
4983 depcc="$CC"   am_compiler_list=
4984
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4986 $as_echo_n "checking dependency style of $depcc... " >&6; }
4987 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4988   $as_echo_n "(cached) " >&6
4989 else
4990   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4991   # We make a subdir and do the tests there.  Otherwise we can end up
4992   # making bogus files that we don't know about and never remove.  For
4993   # instance it was reported that on HP-UX the gcc test will end up
4994   # making a dummy file named 'D' -- because '-MD' means "put the output
4995   # in D".
4996   rm -rf conftest.dir
4997   mkdir conftest.dir
4998   # Copy depcomp to subdir because otherwise we won't find it if we're
4999   # using a relative directory.
5000   cp "$am_depcomp" conftest.dir
5001   cd conftest.dir
5002   # We will build objects and dependencies in a subdirectory because
5003   # it helps to detect inapplicable dependency modes.  For instance
5004   # both Tru64's cc and ICC support -MD to output dependencies as a
5005   # side effect of compilation, but ICC will put the dependencies in
5006   # the current directory while Tru64 will put them in the object
5007   # directory.
5008   mkdir sub
5009
5010   am_cv_CC_dependencies_compiler_type=none
5011   if test "$am_compiler_list" = ""; then
5012      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5013   fi
5014   am__universal=false
5015   case " $depcc " in #(
5016      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5017      esac
5018
5019   for depmode in $am_compiler_list; do
5020     # Setup a source with many dependencies, because some compilers
5021     # like to wrap large dependency lists on column 80 (with \), and
5022     # we should not choose a depcomp mode which is confused by this.
5023     #
5024     # We need to recreate these files for each test, as the compiler may
5025     # overwrite some of them when testing with obscure command lines.
5026     # This happens at least with the AIX C compiler.
5027     : > sub/conftest.c
5028     for i in 1 2 3 4 5 6; do
5029       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5030       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5031       # Solaris 10 /bin/sh.
5032       echo '/* dummy */' > sub/conftst$i.h
5033     done
5034     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5035
5036     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5037     # mode.  It turns out that the SunPro C++ compiler does not properly
5038     # handle '-M -o', and we need to detect this.  Also, some Intel
5039     # versions had trouble with output in subdirs.
5040     am__obj=sub/conftest.${OBJEXT-o}
5041     am__minus_obj="-o $am__obj"
5042     case $depmode in
5043     gcc)
5044       # This depmode causes a compiler race in universal mode.
5045       test "$am__universal" = false || continue
5046       ;;
5047     nosideeffect)
5048       # After this tag, mechanisms are not by side-effect, so they'll
5049       # only be used when explicitly requested.
5050       if test "x$enable_dependency_tracking" = xyes; then
5051         continue
5052       else
5053         break
5054       fi
5055       ;;
5056     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5057       # This compiler won't grok '-c -o', but also, the minuso test has
5058       # not run yet.  These depmodes are late enough in the game, and
5059       # so weak that their functioning should not be impacted.
5060       am__obj=conftest.${OBJEXT-o}
5061       am__minus_obj=
5062       ;;
5063     none) break ;;
5064     esac
5065     if depmode=$depmode \
5066        source=sub/conftest.c object=$am__obj \
5067        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5068        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5069          >/dev/null 2>conftest.err &&
5070        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5071        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5072        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5073        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5074       # icc doesn't choke on unknown options, it will just issue warnings
5075       # or remarks (even with -Werror).  So we grep stderr for any message
5076       # that says an option was ignored or not supported.
5077       # When given -MP, icc 7.0 and 7.1 complain thusly:
5078       #   icc: Command line warning: ignoring option '-M'; no argument required
5079       # The diagnosis changed in icc 8.0:
5080       #   icc: Command line remark: option '-MP' not supported
5081       if (grep 'ignoring option' conftest.err ||
5082           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5083         am_cv_CC_dependencies_compiler_type=$depmode
5084         break
5085       fi
5086     fi
5087   done
5088
5089   cd ..
5090   rm -rf conftest.dir
5091 else
5092   am_cv_CC_dependencies_compiler_type=none
5093 fi
5094
5095 fi
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5097 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5098 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5099
5100  if
5101   test "x$enable_dependency_tracking" != xno \
5102   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5103   am__fastdepCC_TRUE=
5104   am__fastdepCC_FALSE='#'
5105 else
5106   am__fastdepCC_TRUE='#'
5107   am__fastdepCC_FALSE=
5108 fi
5109
5110
5111    case $ac_cv_prog_cc_stdc in #(
5112   no) :
5113     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5114   *) :
5115     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5116 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5117 if ${ac_cv_prog_cc_c99+:} false; then :
5118   $as_echo_n "(cached) " >&6
5119 else
5120   ac_cv_prog_cc_c99=no
5121 ac_save_CC=$CC
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123 /* end confdefs.h.  */
5124 #include <stdarg.h>
5125 #include <stdbool.h>
5126 #include <stdlib.h>
5127 #include <wchar.h>
5128 #include <stdio.h>
5129
5130 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5131 #define debug(...) fprintf (stderr, __VA_ARGS__)
5132 #define showlist(...) puts (#__VA_ARGS__)
5133 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5134 static void
5135 test_varargs_macros (void)
5136 {
5137   int x = 1234;
5138   int y = 5678;
5139   debug ("Flag");
5140   debug ("X = %d\n", x);
5141   showlist (The first, second, and third items.);
5142   report (x>y, "x is %d but y is %d", x, y);
5143 }
5144
5145 // Check long long types.
5146 #define BIG64 18446744073709551615ull
5147 #define BIG32 4294967295ul
5148 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5149 #if !BIG_OK
5150   your preprocessor is broken;
5151 #endif
5152 #if BIG_OK
5153 #else
5154   your preprocessor is broken;
5155 #endif
5156 static long long int bignum = -9223372036854775807LL;
5157 static unsigned long long int ubignum = BIG64;
5158
5159 struct incomplete_array
5160 {
5161   int datasize;
5162   double data[];
5163 };
5164
5165 struct named_init {
5166   int number;
5167   const wchar_t *name;
5168   double average;
5169 };
5170
5171 typedef const char *ccp;
5172
5173 static inline int
5174 test_restrict (ccp restrict text)
5175 {
5176   // See if C++-style comments work.
5177   // Iterate through items via the restricted pointer.
5178   // Also check for declarations in for loops.
5179   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5180     continue;
5181   return 0;
5182 }
5183
5184 // Check varargs and va_copy.
5185 static void
5186 test_varargs (const char *format, ...)
5187 {
5188   va_list args;
5189   va_start (args, format);
5190   va_list args_copy;
5191   va_copy (args_copy, args);
5192
5193   const char *str;
5194   int number;
5195   float fnumber;
5196
5197   while (*format)
5198     {
5199       switch (*format++)
5200         {
5201         case 's': // string
5202           str = va_arg (args_copy, const char *);
5203           break;
5204         case 'd': // int
5205           number = va_arg (args_copy, int);
5206           break;
5207         case 'f': // float
5208           fnumber = va_arg (args_copy, double);
5209           break;
5210         default:
5211           break;
5212         }
5213     }
5214   va_end (args_copy);
5215   va_end (args);
5216 }
5217
5218 int
5219 main ()
5220 {
5221
5222   // Check bool.
5223   _Bool success = false;
5224
5225   // Check restrict.
5226   if (test_restrict ("String literal") == 0)
5227     success = true;
5228   char *restrict newvar = "Another string";
5229
5230   // Check varargs.
5231   test_varargs ("s, d' f .", "string", 65, 34.234);
5232   test_varargs_macros ();
5233
5234   // Check flexible array members.
5235   struct incomplete_array *ia =
5236     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5237   ia->datasize = 10;
5238   for (int i = 0; i < ia->datasize; ++i)
5239     ia->data[i] = i * 1.234;
5240
5241   // Check named initializers.
5242   struct named_init ni = {
5243     .number = 34,
5244     .name = L"Test wide string",
5245     .average = 543.34343,
5246   };
5247
5248   ni.number = 58;
5249
5250   int dynamic_array[ni.number];
5251   dynamic_array[ni.number - 1] = 543;
5252
5253   // work around unused variable warnings
5254   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5255           || dynamic_array[ni.number - 1] != 543);
5256
5257   ;
5258   return 0;
5259 }
5260 _ACEOF
5261 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5262 do
5263   CC="$ac_save_CC $ac_arg"
5264   if ac_fn_c_try_compile "$LINENO"; then :
5265   ac_cv_prog_cc_c99=$ac_arg
5266 fi
5267 rm -f core conftest.err conftest.$ac_objext
5268   test "x$ac_cv_prog_cc_c99" != "xno" && break
5269 done
5270 rm -f conftest.$ac_ext
5271 CC=$ac_save_CC
5272
5273 fi
5274 # AC_CACHE_VAL
5275 case "x$ac_cv_prog_cc_c99" in
5276   x)
5277     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5278 $as_echo "none needed" >&6; } ;;
5279   xno)
5280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5281 $as_echo "unsupported" >&6; } ;;
5282   *)
5283     CC="$CC $ac_cv_prog_cc_c99"
5284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5285 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5286 esac
5287 if test "x$ac_cv_prog_cc_c99" != xno; then :
5288   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5289 else
5290   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5291 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5292 if ${ac_cv_prog_cc_c89+:} false; then :
5293   $as_echo_n "(cached) " >&6
5294 else
5295   ac_cv_prog_cc_c89=no
5296 ac_save_CC=$CC
5297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5298 /* end confdefs.h.  */
5299 #include <stdarg.h>
5300 #include <stdio.h>
5301 struct stat;
5302 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5303 struct buf { int x; };
5304 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5305 static char *e (p, i)
5306      char **p;
5307      int i;
5308 {
5309   return p[i];
5310 }
5311 static char *f (char * (*g) (char **, int), char **p, ...)
5312 {
5313   char *s;
5314   va_list v;
5315   va_start (v,p);
5316   s = g (p, va_arg (v,int));
5317   va_end (v);
5318   return s;
5319 }
5320
5321 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5322    function prototypes and stuff, but not '\xHH' hex character constants.
5323    These don't provoke an error unfortunately, instead are silently treated
5324    as 'x'.  The following induces an error, until -std is added to get
5325    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5326    array size at least.  It's necessary to write '\x00'==0 to get something
5327    that's true only with -std.  */
5328 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5329
5330 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5331    inside strings and character constants.  */
5332 #define FOO(x) 'x'
5333 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5334
5335 int test (int i, double x);
5336 struct s1 {int (*f) (int a);};
5337 struct s2 {int (*f) (double a);};
5338 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5339 int argc;
5340 char **argv;
5341 int
5342 main ()
5343 {
5344 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5345   ;
5346   return 0;
5347 }
5348 _ACEOF
5349 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5350         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5351 do
5352   CC="$ac_save_CC $ac_arg"
5353   if ac_fn_c_try_compile "$LINENO"; then :
5354   ac_cv_prog_cc_c89=$ac_arg
5355 fi
5356 rm -f core conftest.err conftest.$ac_objext
5357   test "x$ac_cv_prog_cc_c89" != "xno" && break
5358 done
5359 rm -f conftest.$ac_ext
5360 CC=$ac_save_CC
5361
5362 fi
5363 # AC_CACHE_VAL
5364 case "x$ac_cv_prog_cc_c89" in
5365   x)
5366     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5367 $as_echo "none needed" >&6; } ;;
5368   xno)
5369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5370 $as_echo "unsupported" >&6; } ;;
5371   *)
5372     CC="$CC $ac_cv_prog_cc_c89"
5373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5374 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5375 esac
5376 if test "x$ac_cv_prog_cc_c89" != xno; then :
5377   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5378 else
5379   ac_cv_prog_cc_stdc=no
5380 fi
5381
5382 fi
5383  ;;
5384 esac
5385   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5386 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5387   if ${ac_cv_prog_cc_stdc+:} false; then :
5388   $as_echo_n "(cached) " >&6
5389 fi
5390
5391   case $ac_cv_prog_cc_stdc in #(
5392   no) :
5393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5394 $as_echo "unsupported" >&6; } ;; #(
5395   '') :
5396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5397 $as_echo "none needed" >&6; } ;; #(
5398   *) :
5399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5400 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5401 esac
5402
5403 if test "x$CC" != xcc; then
5404   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5405 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5406 else
5407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5408 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5409 fi
5410 set dummy $CC; ac_cc=`$as_echo "$2" |
5411                       sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5412 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
5413   $as_echo_n "(cached) " >&6
5414 else
5415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5416 /* end confdefs.h.  */
5417
5418 int
5419 main ()
5420 {
5421
5422   ;
5423   return 0;
5424 }
5425 _ACEOF
5426 # Make sure it works both with $CC and with simple cc.
5427 # We do the test twice because some compilers refuse to overwrite an
5428 # existing .o file with -o, though they will create one.
5429 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5430 rm -f conftest2.*
5431 if { { case "(($ac_try" in
5432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5433   *) ac_try_echo=$ac_try;;
5434 esac
5435 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5436 $as_echo "$ac_try_echo"; } >&5
5437   (eval "$ac_try") 2>&5
5438   ac_status=$?
5439   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5440   test $ac_status = 0; } &&
5441    test -f conftest2.$ac_objext && { { case "(($ac_try" in
5442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5443   *) ac_try_echo=$ac_try;;
5444 esac
5445 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5446 $as_echo "$ac_try_echo"; } >&5
5447   (eval "$ac_try") 2>&5
5448   ac_status=$?
5449   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5450   test $ac_status = 0; };
5451 then
5452   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5453   if test "x$CC" != xcc; then
5454     # Test first that cc exists at all.
5455     if { ac_try='cc -c conftest.$ac_ext >&5'
5456   { { case "(($ac_try" in
5457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5458   *) ac_try_echo=$ac_try;;
5459 esac
5460 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5461 $as_echo "$ac_try_echo"; } >&5
5462   (eval "$ac_try") 2>&5
5463   ac_status=$?
5464   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5465   test $ac_status = 0; }; }; then
5466       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5467       rm -f conftest2.*
5468       if { { case "(($ac_try" in
5469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5470   *) ac_try_echo=$ac_try;;
5471 esac
5472 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5473 $as_echo "$ac_try_echo"; } >&5
5474   (eval "$ac_try") 2>&5
5475   ac_status=$?
5476   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5477   test $ac_status = 0; } &&
5478          test -f conftest2.$ac_objext && { { case "(($ac_try" in
5479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480   *) ac_try_echo=$ac_try;;
5481 esac
5482 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5483 $as_echo "$ac_try_echo"; } >&5
5484   (eval "$ac_try") 2>&5
5485   ac_status=$?
5486   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5487   test $ac_status = 0; };
5488       then
5489         # cc works too.
5490         :
5491       else
5492         # cc exists but doesn't like -o.
5493         eval ac_cv_prog_cc_${ac_cc}_c_o=no
5494       fi
5495     fi
5496   fi
5497 else
5498   eval ac_cv_prog_cc_${ac_cc}_c_o=no
5499 fi
5500 rm -f core conftest*
5501
5502 fi
5503 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5505 $as_echo "yes" >&6; }
5506 else
5507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508 $as_echo "no" >&6; }
5509
5510 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5511
5512 fi
5513
5514 # FIXME: we rely on the cache variable name because
5515 # there is no other way.
5516 set dummy $CC
5517 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5518 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5519 if test "$am_t" != yes; then
5520    # Losing compiler, so override with the script.
5521    # FIXME: It is wrong to rewrite CC.
5522    # But if we don't then we get into trouble of one sort or another.
5523    # A longer-term fix would be to have automake use am__CC in this case,
5524    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5525    CC="$am_aux_dir/compile $CC"
5526 fi
5527
5528
5529 ac_ext=c
5530 ac_cpp='$CPP $CPPFLAGS'
5531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5535 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5536 # On Suns, sometimes $CPP names a directory.
5537 if test -n "$CPP" && test -d "$CPP"; then
5538   CPP=
5539 fi
5540 if test -z "$CPP"; then
5541   if ${ac_cv_prog_CPP+:} false; then :
5542   $as_echo_n "(cached) " >&6
5543 else
5544       # Double quotes because CPP needs to be expanded
5545     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5546     do
5547       ac_preproc_ok=false
5548 for ac_c_preproc_warn_flag in '' yes
5549 do
5550   # Use a header file that comes with gcc, so configuring glibc
5551   # with a fresh cross-compiler works.
5552   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5553   # <limits.h> exists even on freestanding compilers.
5554   # On the NeXT, cc -E runs the code through the compiler's parser,
5555   # not just through cpp. "Syntax error" is here to catch this case.
5556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557 /* end confdefs.h.  */
5558 #ifdef __STDC__
5559 # include <limits.h>
5560 #else
5561 # include <assert.h>
5562 #endif
5563                      Syntax error
5564 _ACEOF
5565 if ac_fn_c_try_cpp "$LINENO"; then :
5566
5567 else
5568   # Broken: fails on valid input.
5569 continue
5570 fi
5571 rm -f conftest.err conftest.i conftest.$ac_ext
5572
5573   # OK, works on sane cases.  Now check whether nonexistent headers
5574   # can be detected and how.
5575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576 /* end confdefs.h.  */
5577 #include <ac_nonexistent.h>
5578 _ACEOF
5579 if ac_fn_c_try_cpp "$LINENO"; then :
5580   # Broken: success on invalid input.
5581 continue
5582 else
5583   # Passes both tests.
5584 ac_preproc_ok=:
5585 break
5586 fi
5587 rm -f conftest.err conftest.i conftest.$ac_ext
5588
5589 done
5590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5591 rm -f conftest.i conftest.err conftest.$ac_ext
5592 if $ac_preproc_ok; then :
5593   break
5594 fi
5595
5596     done
5597     ac_cv_prog_CPP=$CPP
5598
5599 fi
5600   CPP=$ac_cv_prog_CPP
5601 else
5602   ac_cv_prog_CPP=$CPP
5603 fi
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5605 $as_echo "$CPP" >&6; }
5606 ac_preproc_ok=false
5607 for ac_c_preproc_warn_flag in '' yes
5608 do
5609   # Use a header file that comes with gcc, so configuring glibc
5610   # with a fresh cross-compiler works.
5611   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5612   # <limits.h> exists even on freestanding compilers.
5613   # On the NeXT, cc -E runs the code through the compiler's parser,
5614   # not just through cpp. "Syntax error" is here to catch this case.
5615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5616 /* end confdefs.h.  */
5617 #ifdef __STDC__
5618 # include <limits.h>
5619 #else
5620 # include <assert.h>
5621 #endif
5622                      Syntax error
5623 _ACEOF
5624 if ac_fn_c_try_cpp "$LINENO"; then :
5625
5626 else
5627   # Broken: fails on valid input.
5628 continue
5629 fi
5630 rm -f conftest.err conftest.i conftest.$ac_ext
5631
5632   # OK, works on sane cases.  Now check whether nonexistent headers
5633   # can be detected and how.
5634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5635 /* end confdefs.h.  */
5636 #include <ac_nonexistent.h>
5637 _ACEOF
5638 if ac_fn_c_try_cpp "$LINENO"; then :
5639   # Broken: success on invalid input.
5640 continue
5641 else
5642   # Passes both tests.
5643 ac_preproc_ok=:
5644 break
5645 fi
5646 rm -f conftest.err conftest.i conftest.$ac_ext
5647
5648 done
5649 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5650 rm -f conftest.i conftest.err conftest.$ac_ext
5651 if $ac_preproc_ok; then :
5652
5653 else
5654   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5656 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5657 See \`config.log' for more details" "$LINENO" 5; }
5658 fi
5659
5660 ac_ext=c
5661 ac_cpp='$CPP $CPPFLAGS'
5662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5665
5666 if test -n "$ac_tool_prefix"; then
5667   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5668 set dummy ${ac_tool_prefix}nm; ac_word=$2
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5670 $as_echo_n "checking for $ac_word... " >&6; }
5671 if ${ac_cv_prog_NM+:} false; then :
5672   $as_echo_n "(cached) " >&6
5673 else
5674   if test -n "$NM"; then
5675   ac_cv_prog_NM="$NM" # Let the user override the test.
5676 else
5677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678 for as_dir in $PATH
5679 do
5680   IFS=$as_save_IFS
5681   test -z "$as_dir" && as_dir=.
5682     for ac_exec_ext in '' $ac_executable_extensions; do
5683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684     ac_cv_prog_NM="${ac_tool_prefix}nm"
5685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686     break 2
5687   fi
5688 done
5689   done
5690 IFS=$as_save_IFS
5691
5692 fi
5693 fi
5694 NM=$ac_cv_prog_NM
5695 if test -n "$NM"; then
5696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5697 $as_echo "$NM" >&6; }
5698 else
5699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700 $as_echo "no" >&6; }
5701 fi
5702
5703
5704 fi
5705 if test -z "$ac_cv_prog_NM"; then
5706   ac_ct_NM=$NM
5707   # Extract the first word of "nm", so it can be a program name with args.
5708 set dummy nm; ac_word=$2
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710 $as_echo_n "checking for $ac_word... " >&6; }
5711 if ${ac_cv_prog_ac_ct_NM+:} false; then :
5712   $as_echo_n "(cached) " >&6
5713 else
5714   if test -n "$ac_ct_NM"; then
5715   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5716 else
5717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5718 for as_dir in $PATH
5719 do
5720   IFS=$as_save_IFS
5721   test -z "$as_dir" && as_dir=.
5722     for ac_exec_ext in '' $ac_executable_extensions; do
5723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5724     ac_cv_prog_ac_ct_NM="nm"
5725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5726     break 2
5727   fi
5728 done
5729   done
5730 IFS=$as_save_IFS
5731
5732 fi
5733 fi
5734 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5735 if test -n "$ac_ct_NM"; then
5736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5737 $as_echo "$ac_ct_NM" >&6; }
5738 else
5739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740 $as_echo "no" >&6; }
5741 fi
5742
5743   if test "x$ac_ct_NM" = x; then
5744     NM="nm"
5745   else
5746     case $cross_compiling:$ac_tool_warned in
5747 yes:)
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5749 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5750 ac_tool_warned=yes ;;
5751 esac
5752     NM=$ac_ct_NM
5753   fi
5754 else
5755   NM="$ac_cv_prog_NM"
5756 fi
5757
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5759 $as_echo_n "checking whether ln -s works... " >&6; }
5760 LN_S=$as_ln_s
5761 if test "$LN_S" = "ln -s"; then
5762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5763 $as_echo "yes" >&6; }
5764 else
5765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5766 $as_echo "no, using $LN_S" >&6; }
5767 fi
5768
5769 if test -n "$ac_tool_prefix"; then
5770   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5771 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5773 $as_echo_n "checking for $ac_word... " >&6; }
5774 if ${ac_cv_prog_RANLIB+:} false; then :
5775   $as_echo_n "(cached) " >&6
5776 else
5777   if test -n "$RANLIB"; then
5778   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5779 else
5780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5781 for as_dir in $PATH
5782 do
5783   IFS=$as_save_IFS
5784   test -z "$as_dir" && as_dir=.
5785     for ac_exec_ext in '' $ac_executable_extensions; do
5786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5787     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5789     break 2
5790   fi
5791 done
5792   done
5793 IFS=$as_save_IFS
5794
5795 fi
5796 fi
5797 RANLIB=$ac_cv_prog_RANLIB
5798 if test -n "$RANLIB"; then
5799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5800 $as_echo "$RANLIB" >&6; }
5801 else
5802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803 $as_echo "no" >&6; }
5804 fi
5805
5806
5807 fi
5808 if test -z "$ac_cv_prog_RANLIB"; then
5809   ac_ct_RANLIB=$RANLIB
5810   # Extract the first word of "ranlib", so it can be a program name with args.
5811 set dummy ranlib; ac_word=$2
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5813 $as_echo_n "checking for $ac_word... " >&6; }
5814 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5815   $as_echo_n "(cached) " >&6
5816 else
5817   if test -n "$ac_ct_RANLIB"; then
5818   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5819 else
5820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5821 for as_dir in $PATH
5822 do
5823   IFS=$as_save_IFS
5824   test -z "$as_dir" && as_dir=.
5825     for ac_exec_ext in '' $ac_executable_extensions; do
5826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5827     ac_cv_prog_ac_ct_RANLIB="ranlib"
5828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5829     break 2
5830   fi
5831 done
5832   done
5833 IFS=$as_save_IFS
5834
5835 fi
5836 fi
5837 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5838 if test -n "$ac_ct_RANLIB"; then
5839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5840 $as_echo "$ac_ct_RANLIB" >&6; }
5841 else
5842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5843 $as_echo "no" >&6; }
5844 fi
5845
5846   if test "x$ac_ct_RANLIB" = x; then
5847     RANLIB=":"
5848   else
5849     case $cross_compiling:$ac_tool_warned in
5850 yes:)
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5853 ac_tool_warned=yes ;;
5854 esac
5855     RANLIB=$ac_ct_RANLIB
5856   fi
5857 else
5858   RANLIB="$ac_cv_prog_RANLIB"
5859 fi
5860
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
5862 $as_echo_n "checking for a POSIX-compliant shell... " >&6; }
5863    if ${ac_cv_path_shell+:} false; then :
5864   $as_echo_n "(cached) " >&6
5865 else
5866   ac_command='
5867         # Test the noclobber option, using the portable POSIX.2 syntax.
5868         set -C
5869         rm -f conftest.c
5870         >conftest.c || exit
5871         >|conftest.c || exit
5872         !>conftest.c || exit
5873         # Test that $(...) works.
5874         test "$(expr 3 + 4)" -eq 7 || exit
5875       '
5876       ac_cv_path_shell=no
5877
5878       case $SHELL in
5879       (/*)
5880         rm -f conftest.c
5881         if ("$SHELL" -c "$ac_command") 2>/dev/null; then
5882           ac_cv_path_shell=$SHELL
5883         fi
5884       esac
5885
5886       case $ac_cv_path_shell in
5887       (no)
5888         # Prefer shells that are more likely to be installed in the
5889         # same place on all hosts of this platform.  Therefore, prefer
5890         # shells in /bin and /usr/bin to shells in the installer's
5891         # PATH.  Also, loop through PATH first and then through
5892         # shells, since less-"nice" shells in /bin and /usr/bin are
5893         # more likely to be installed than "nicer" shells elsewhere.
5894         as_save_IFS=$IFS; IFS=:
5895         for as_dir in /bin /usr/bin $PATH
5896         do
5897           IFS=$as_save_IFS
5898           case $as_dir in
5899           (/*)
5900             for ac_base in sh bash ksh sh5; do
5901               rm -f conftest.c
5902               if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
5903                 ac_cv_path_shell=$as_dir/$ac_base
5904                 break
5905               fi
5906             done
5907             case $ac_cv_path_shell in
5908             (/*) break
5909             esac
5910           esac
5911         done
5912         rm -f conftest.c
5913       esac
5914 fi
5915
5916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
5917 $as_echo "$ac_cv_path_shell" >&6; }
5918    SHELL=$ac_cv_path_shell
5919    if test "$SHELL" = no; then
5920      SHELL=/bin/sh
5921      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
5922 $as_echo "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
5923    fi
5924
5925
5926
5927
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5929 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5930 if ${ac_cv_path_GREP+:} false; then :
5931   $as_echo_n "(cached) " >&6
5932 else
5933   if test -z "$GREP"; then
5934   ac_path_GREP_found=false
5935   # Loop through the user's path and test for each of PROGNAME-LIST
5936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5938 do
5939   IFS=$as_save_IFS
5940   test -z "$as_dir" && as_dir=.
5941     for ac_prog in grep ggrep; do
5942     for ac_exec_ext in '' $ac_executable_extensions; do
5943       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5944       as_fn_executable_p "$ac_path_GREP" || continue
5945 # Check for GNU ac_path_GREP and select it if it is found.
5946   # Check for GNU $ac_path_GREP
5947 case `"$ac_path_GREP" --version 2>&1` in
5948 *GNU*)
5949   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5950 *)
5951   ac_count=0
5952   $as_echo_n 0123456789 >"conftest.in"
5953   while :
5954   do
5955     cat "conftest.in" "conftest.in" >"conftest.tmp"
5956     mv "conftest.tmp" "conftest.in"
5957     cp "conftest.in" "conftest.nl"
5958     $as_echo 'GREP' >> "conftest.nl"
5959     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5960     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5961     as_fn_arith $ac_count + 1 && ac_count=$as_val
5962     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5963       # Best one so far, save it but keep looking for a better one
5964       ac_cv_path_GREP="$ac_path_GREP"
5965       ac_path_GREP_max=$ac_count
5966     fi
5967     # 10*(2^10) chars as input seems more than enough
5968     test $ac_count -gt 10 && break
5969   done
5970   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5971 esac
5972
5973       $ac_path_GREP_found && break 3
5974     done
5975   done
5976   done
5977 IFS=$as_save_IFS
5978   if test -z "$ac_cv_path_GREP"; then
5979     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5980   fi
5981 else
5982   ac_cv_path_GREP=$GREP
5983 fi
5984
5985 fi
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5987 $as_echo "$ac_cv_path_GREP" >&6; }
5988  GREP="$ac_cv_path_GREP"
5989
5990
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5992 $as_echo_n "checking for egrep... " >&6; }
5993 if ${ac_cv_path_EGREP+:} false; then :
5994   $as_echo_n "(cached) " >&6
5995 else
5996   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5997    then ac_cv_path_EGREP="$GREP -E"
5998    else
5999      if test -z "$EGREP"; then
6000   ac_path_EGREP_found=false
6001   # Loop through the user's path and test for each of PROGNAME-LIST
6002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6004 do
6005   IFS=$as_save_IFS
6006   test -z "$as_dir" && as_dir=.
6007     for ac_prog in egrep; do
6008     for ac_exec_ext in '' $ac_executable_extensions; do
6009       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6010       as_fn_executable_p "$ac_path_EGREP" || continue
6011 # Check for GNU ac_path_EGREP and select it if it is found.
6012   # Check for GNU $ac_path_EGREP
6013 case `"$ac_path_EGREP" --version 2>&1` in
6014 *GNU*)
6015   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6016 *)
6017   ac_count=0
6018   $as_echo_n 0123456789 >"conftest.in"
6019   while :
6020   do
6021     cat "conftest.in" "conftest.in" >"conftest.tmp"
6022     mv "conftest.tmp" "conftest.in"
6023     cp "conftest.in" "conftest.nl"
6024     $as_echo 'EGREP' >> "conftest.nl"
6025     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6026     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6027     as_fn_arith $ac_count + 1 && ac_count=$as_val
6028     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6029       # Best one so far, save it but keep looking for a better one
6030       ac_cv_path_EGREP="$ac_path_EGREP"
6031       ac_path_EGREP_max=$ac_count
6032     fi
6033     # 10*(2^10) chars as input seems more than enough
6034     test $ac_count -gt 10 && break
6035   done
6036   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6037 esac
6038
6039       $ac_path_EGREP_found && break 3
6040     done
6041   done
6042   done
6043 IFS=$as_save_IFS
6044   if test -z "$ac_cv_path_EGREP"; then
6045     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6046   fi
6047 else
6048   ac_cv_path_EGREP=$EGREP
6049 fi
6050
6051    fi
6052 fi
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6054 $as_echo "$ac_cv_path_EGREP" >&6; }
6055  EGREP="$ac_cv_path_EGREP"
6056
6057
6058
6059
6060   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6061 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6062 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6063   $as_echo_n "(cached) " >&6
6064 else
6065
6066       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067 /* end confdefs.h.  */
6068
6069 #ifdef __ACK__
6070 Amsterdam
6071 #endif
6072
6073 _ACEOF
6074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6075   $EGREP "Amsterdam" >/dev/null 2>&1; then :
6076   gl_cv_c_amsterdam_compiler=yes
6077 else
6078   gl_cv_c_amsterdam_compiler=no
6079 fi
6080 rm -f conftest*
6081
6082
6083 fi
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6085 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6086   if test -z "$AR"; then
6087     if test $gl_cv_c_amsterdam_compiler = yes; then
6088       AR='cc -c.a'
6089       if test -z "$ARFLAGS"; then
6090         ARFLAGS='-o'
6091       fi
6092     else
6093                   if test -n "$ac_tool_prefix"; then
6094   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6095 set dummy ${ac_tool_prefix}ar; ac_word=$2
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097 $as_echo_n "checking for $ac_word... " >&6; }
6098 if ${ac_cv_prog_AR+:} false; then :
6099   $as_echo_n "(cached) " >&6
6100 else
6101   if test -n "$AR"; then
6102   ac_cv_prog_AR="$AR" # Let the user override the test.
6103 else
6104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105 for as_dir in $PATH
6106 do
6107   IFS=$as_save_IFS
6108   test -z "$as_dir" && as_dir=.
6109     for ac_exec_ext in '' $ac_executable_extensions; do
6110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6111     ac_cv_prog_AR="${ac_tool_prefix}ar"
6112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113     break 2
6114   fi
6115 done
6116   done
6117 IFS=$as_save_IFS
6118
6119 fi
6120 fi
6121 AR=$ac_cv_prog_AR
6122 if test -n "$AR"; then
6123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6124 $as_echo "$AR" >&6; }
6125 else
6126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127 $as_echo "no" >&6; }
6128 fi
6129
6130
6131 fi
6132 if test -z "$ac_cv_prog_AR"; then
6133   ac_ct_AR=$AR
6134   # Extract the first word of "ar", so it can be a program name with args.
6135 set dummy ar; ac_word=$2
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6137 $as_echo_n "checking for $ac_word... " >&6; }
6138 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6139   $as_echo_n "(cached) " >&6
6140 else
6141   if test -n "$ac_ct_AR"; then
6142   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6143 else
6144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6145 for as_dir in $PATH
6146 do
6147   IFS=$as_save_IFS
6148   test -z "$as_dir" && as_dir=.
6149     for ac_exec_ext in '' $ac_executable_extensions; do
6150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6151     ac_cv_prog_ac_ct_AR="ar"
6152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6153     break 2
6154   fi
6155 done
6156   done
6157 IFS=$as_save_IFS
6158
6159 fi
6160 fi
6161 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6162 if test -n "$ac_ct_AR"; then
6163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6164 $as_echo "$ac_ct_AR" >&6; }
6165 else
6166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167 $as_echo "no" >&6; }
6168 fi
6169
6170   if test "x$ac_ct_AR" = x; then
6171     AR="ar"
6172   else
6173     case $cross_compiling:$ac_tool_warned in
6174 yes:)
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6176 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6177 ac_tool_warned=yes ;;
6178 esac
6179     AR=$ac_ct_AR
6180   fi
6181 else
6182   AR="$ac_cv_prog_AR"
6183 fi
6184
6185       if test -z "$ARFLAGS"; then
6186         ARFLAGS='cru'
6187       fi
6188     fi
6189   else
6190     if test -z "$ARFLAGS"; then
6191       ARFLAGS='cru'
6192     fi
6193   fi
6194
6195
6196   if test -z "$RANLIB"; then
6197     if test $gl_cv_c_amsterdam_compiler = yes; then
6198       RANLIB=':'
6199     else
6200             if test -n "$ac_tool_prefix"; then
6201   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6202 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204 $as_echo_n "checking for $ac_word... " >&6; }
6205 if ${ac_cv_prog_RANLIB+:} false; then :
6206   $as_echo_n "(cached) " >&6
6207 else
6208   if test -n "$RANLIB"; then
6209   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6210 else
6211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212 for as_dir in $PATH
6213 do
6214   IFS=$as_save_IFS
6215   test -z "$as_dir" && as_dir=.
6216     for ac_exec_ext in '' $ac_executable_extensions; do
6217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6218     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6220     break 2
6221   fi
6222 done
6223   done
6224 IFS=$as_save_IFS
6225
6226 fi
6227 fi
6228 RANLIB=$ac_cv_prog_RANLIB
6229 if test -n "$RANLIB"; then
6230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6231 $as_echo "$RANLIB" >&6; }
6232 else
6233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6234 $as_echo "no" >&6; }
6235 fi
6236
6237
6238 fi
6239 if test -z "$ac_cv_prog_RANLIB"; then
6240   ac_ct_RANLIB=$RANLIB
6241   # Extract the first word of "ranlib", so it can be a program name with args.
6242 set dummy ranlib; ac_word=$2
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244 $as_echo_n "checking for $ac_word... " >&6; }
6245 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6246   $as_echo_n "(cached) " >&6
6247 else
6248   if test -n "$ac_ct_RANLIB"; then
6249   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6250 else
6251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252 for as_dir in $PATH
6253 do
6254   IFS=$as_save_IFS
6255   test -z "$as_dir" && as_dir=.
6256     for ac_exec_ext in '' $ac_executable_extensions; do
6257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258     ac_cv_prog_ac_ct_RANLIB="ranlib"
6259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260     break 2
6261   fi
6262 done
6263   done
6264 IFS=$as_save_IFS
6265
6266 fi
6267 fi
6268 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6269 if test -n "$ac_ct_RANLIB"; then
6270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6271 $as_echo "$ac_ct_RANLIB" >&6; }
6272 else
6273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274 $as_echo "no" >&6; }
6275 fi
6276
6277   if test "x$ac_ct_RANLIB" = x; then
6278     RANLIB=":"
6279   else
6280     case $cross_compiling:$ac_tool_warned in
6281 yes:)
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6283 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6284 ac_tool_warned=yes ;;
6285 esac
6286     RANLIB=$ac_ct_RANLIB
6287   fi
6288 else
6289   RANLIB="$ac_cv_prog_RANLIB"
6290 fi
6291
6292     fi
6293   fi
6294
6295
6296 # Make sure we can run config.sub.
6297 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6298   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6299
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6301 $as_echo_n "checking build system type... " >&6; }
6302 if ${ac_cv_build+:} false; then :
6303   $as_echo_n "(cached) " >&6
6304 else
6305   ac_build_alias=$build_alias
6306 test "x$ac_build_alias" = x &&
6307   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6308 test "x$ac_build_alias" = x &&
6309   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6310 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6311   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6312
6313 fi
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6315 $as_echo "$ac_cv_build" >&6; }
6316 case $ac_cv_build in
6317 *-*-*) ;;
6318 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6319 esac
6320 build=$ac_cv_build
6321 ac_save_IFS=$IFS; IFS='-'
6322 set x $ac_cv_build
6323 shift
6324 build_cpu=$1
6325 build_vendor=$2
6326 shift; shift
6327 # Remember, the first character of IFS is used to create $*,
6328 # except with old shells:
6329 build_os=$*
6330 IFS=$ac_save_IFS
6331 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6332
6333
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6335 $as_echo_n "checking host system type... " >&6; }
6336 if ${ac_cv_host+:} false; then :
6337   $as_echo_n "(cached) " >&6
6338 else
6339   if test "x$host_alias" = x; then
6340   ac_cv_host=$ac_cv_build
6341 else
6342   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6343     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6344 fi
6345
6346 fi
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6348 $as_echo "$ac_cv_host" >&6; }
6349 case $ac_cv_host in
6350 *-*-*) ;;
6351 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6352 esac
6353 host=$ac_cv_host
6354 ac_save_IFS=$IFS; IFS='-'
6355 set x $ac_cv_host
6356 shift
6357 host_cpu=$1
6358 host_vendor=$2
6359 shift; shift
6360 # Remember, the first character of IFS is used to create $*,
6361 # except with old shells:
6362 host_os=$*
6363 IFS=$ac_save_IFS
6364 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6365
6366
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6368 $as_echo_n "checking for ANSI C header files... " >&6; }
6369 if ${ac_cv_header_stdc+:} false; then :
6370   $as_echo_n "(cached) " >&6
6371 else
6372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6373 /* end confdefs.h.  */
6374 #include <stdlib.h>
6375 #include <stdarg.h>
6376 #include <string.h>
6377 #include <float.h>
6378
6379 int
6380 main ()
6381 {
6382
6383   ;
6384   return 0;
6385 }
6386 _ACEOF
6387 if ac_fn_c_try_compile "$LINENO"; then :
6388   ac_cv_header_stdc=yes
6389 else
6390   ac_cv_header_stdc=no
6391 fi
6392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6393
6394 if test $ac_cv_header_stdc = yes; then
6395   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397 /* end confdefs.h.  */
6398 #include <string.h>
6399
6400 _ACEOF
6401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6402   $EGREP "memchr" >/dev/null 2>&1; then :
6403
6404 else
6405   ac_cv_header_stdc=no
6406 fi
6407 rm -f conftest*
6408
6409 fi
6410
6411 if test $ac_cv_header_stdc = yes; then
6412   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6414 /* end confdefs.h.  */
6415 #include <stdlib.h>
6416
6417 _ACEOF
6418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6419   $EGREP "free" >/dev/null 2>&1; then :
6420
6421 else
6422   ac_cv_header_stdc=no
6423 fi
6424 rm -f conftest*
6425
6426 fi
6427
6428 if test $ac_cv_header_stdc = yes; then
6429   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6430   if test "$cross_compiling" = yes; then :
6431   :
6432 else
6433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6434 /* end confdefs.h.  */
6435 #include <ctype.h>
6436 #include <stdlib.h>
6437 #if ((' ' & 0x0FF) == 0x020)
6438 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6439 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6440 #else
6441 # define ISLOWER(c) \
6442                    (('a' <= (c) && (c) <= 'i') \
6443                      || ('j' <= (c) && (c) <= 'r') \
6444                      || ('s' <= (c) && (c) <= 'z'))
6445 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6446 #endif
6447
6448 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6449 int
6450 main ()
6451 {
6452   int i;
6453   for (i = 0; i < 256; i++)
6454     if (XOR (islower (i), ISLOWER (i))
6455         || toupper (i) != TOUPPER (i))
6456       return 2;
6457   return 0;
6458 }
6459 _ACEOF
6460 if ac_fn_c_try_run "$LINENO"; then :
6461
6462 else
6463   ac_cv_header_stdc=no
6464 fi
6465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6466   conftest.$ac_objext conftest.beam conftest.$ac_ext
6467 fi
6468
6469 fi
6470 fi
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6472 $as_echo "$ac_cv_header_stdc" >&6; }
6473 if test $ac_cv_header_stdc = yes; then
6474
6475 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6476
6477 fi
6478
6479 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6480 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6481                   inttypes.h stdint.h unistd.h
6482 do :
6483   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6484 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6485 "
6486 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6487   cat >>confdefs.h <<_ACEOF
6488 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6489 _ACEOF
6490
6491 fi
6492
6493 done
6494
6495
6496
6497
6498
6499   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6500 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6501   MINIX=yes
6502 else
6503   MINIX=
6504 fi
6505
6506
6507   if test "$MINIX" = yes; then
6508
6509 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6510
6511
6512 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6513
6514
6515 $as_echo "#define _MINIX 1" >>confdefs.h
6516
6517   fi
6518
6519         case "$host_os" in
6520     hpux*)
6521
6522 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6523
6524       ;;
6525   esac
6526
6527
6528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6529 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6530 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6531   $as_echo_n "(cached) " >&6
6532 else
6533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h.  */
6535
6536 #         define __EXTENSIONS__ 1
6537           $ac_includes_default
6538 int
6539 main ()
6540 {
6541
6542   ;
6543   return 0;
6544 }
6545 _ACEOF
6546 if ac_fn_c_try_compile "$LINENO"; then :
6547   ac_cv_safe_to_define___extensions__=yes
6548 else
6549   ac_cv_safe_to_define___extensions__=no
6550 fi
6551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6552 fi
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6554 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6555   test $ac_cv_safe_to_define___extensions__ = yes &&
6556     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6557
6558   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6559
6560   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6561
6562   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6563
6564   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6565
6566   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6567
6568
6569
6570
6571
6572
6573
6574
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6576 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6577 if ${ac_cv_sys_largefile_source+:} false; then :
6578   $as_echo_n "(cached) " >&6
6579 else
6580   while :; do
6581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582 /* end confdefs.h.  */
6583 #include <sys/types.h> /* for off_t */
6584      #include <stdio.h>
6585 int
6586 main ()
6587 {
6588 int (*fp) (FILE *, off_t, int) = fseeko;
6589      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6590   ;
6591   return 0;
6592 }
6593 _ACEOF
6594 if ac_fn_c_try_link "$LINENO"; then :
6595   ac_cv_sys_largefile_source=no; break
6596 fi
6597 rm -f core conftest.err conftest.$ac_objext \
6598     conftest$ac_exeext conftest.$ac_ext
6599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6600 /* end confdefs.h.  */
6601 #define _LARGEFILE_SOURCE 1
6602 #include <sys/types.h> /* for off_t */
6603      #include <stdio.h>
6604 int
6605 main ()
6606 {
6607 int (*fp) (FILE *, off_t, int) = fseeko;
6608      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6609   ;
6610   return 0;
6611 }
6612 _ACEOF
6613 if ac_fn_c_try_link "$LINENO"; then :
6614   ac_cv_sys_largefile_source=1; break
6615 fi
6616 rm -f core conftest.err conftest.$ac_objext \
6617     conftest$ac_exeext conftest.$ac_ext
6618   ac_cv_sys_largefile_source=unknown
6619   break
6620 done
6621 fi
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6623 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6624 case $ac_cv_sys_largefile_source in #(
6625   no | unknown) ;;
6626   *)
6627 cat >>confdefs.h <<_ACEOF
6628 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6629 _ACEOF
6630 ;;
6631 esac
6632 rm -rf conftest*
6633
6634 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6635 # in glibc 2.1.3, but that breaks too many other things.
6636 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6637 if test $ac_cv_sys_largefile_source != unknown; then
6638
6639 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6640
6641 fi
6642
6643
6644
6645
6646   # IEEE behaviour is the default on all CPUs except Alpha and SH
6647   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6648   # and the GCC 4.1.2 manual).
6649   case "$host_cpu" in
6650     alpha*)
6651       # On Alpha systems, a compiler option provides the behaviour.
6652       # See the ieee(3) manual page, also available at
6653       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6654       if test -n "$GCC"; then
6655         # GCC has the option -mieee.
6656         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6657         CPPFLAGS="$CPPFLAGS -mieee"
6658       else
6659         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6660         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6661         CPPFLAGS="$CPPFLAGS -ieee"
6662       fi
6663       ;;
6664     sh*)
6665       if test -n "$GCC"; then
6666         # GCC has the option -mieee.
6667         CPPFLAGS="$CPPFLAGS -mieee"
6668       fi
6669       ;;
6670   esac
6671
6672 # Check whether --enable-largefile was given.
6673 if test "${enable_largefile+set}" = set; then :
6674   enableval=$enable_largefile;
6675 fi
6676
6677 if test "$enable_largefile" != no; then
6678
6679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6680 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6681 if ${ac_cv_sys_largefile_CC+:} false; then :
6682   $as_echo_n "(cached) " >&6
6683 else
6684   ac_cv_sys_largefile_CC=no
6685      if test "$GCC" != yes; then
6686        ac_save_CC=$CC
6687        while :; do
6688          # IRIX 6.2 and later do not support large files by default,
6689          # so use the C compiler's -n32 option if that helps.
6690          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6691 /* end confdefs.h.  */
6692 #include <sys/types.h>
6693  /* Check that off_t can represent 2**63 - 1 correctly.
6694     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6695     since some C++ compilers masquerading as C compilers
6696     incorrectly reject 9223372036854775807.  */
6697 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6698   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6699                        && LARGE_OFF_T % 2147483647 == 1)
6700                       ? 1 : -1];
6701 int
6702 main ()
6703 {
6704
6705   ;
6706   return 0;
6707 }
6708 _ACEOF
6709          if ac_fn_c_try_compile "$LINENO"; then :
6710   break
6711 fi
6712 rm -f core conftest.err conftest.$ac_objext
6713          CC="$CC -n32"
6714          if ac_fn_c_try_compile "$LINENO"; then :
6715   ac_cv_sys_largefile_CC=' -n32'; break
6716 fi
6717 rm -f core conftest.err conftest.$ac_objext
6718          break
6719        done
6720        CC=$ac_save_CC
6721        rm -f conftest.$ac_ext
6722     fi
6723 fi
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6725 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6726   if test "$ac_cv_sys_largefile_CC" != no; then
6727     CC=$CC$ac_cv_sys_largefile_CC
6728   fi
6729
6730   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6731 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6732 if ${ac_cv_sys_file_offset_bits+:} false; then :
6733   $as_echo_n "(cached) " >&6
6734 else
6735   while :; do
6736   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6737 /* end confdefs.h.  */
6738 #include <sys/types.h>
6739  /* Check that off_t can represent 2**63 - 1 correctly.
6740     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6741     since some C++ compilers masquerading as C compilers
6742     incorrectly reject 9223372036854775807.  */
6743 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6744   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6745                        && LARGE_OFF_T % 2147483647 == 1)
6746                       ? 1 : -1];
6747 int
6748 main ()
6749 {
6750
6751   ;
6752   return 0;
6753 }
6754 _ACEOF
6755 if ac_fn_c_try_compile "$LINENO"; then :
6756   ac_cv_sys_file_offset_bits=no; break
6757 fi
6758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760 /* end confdefs.h.  */
6761 #define _FILE_OFFSET_BITS 64
6762 #include <sys/types.h>
6763  /* Check that off_t can represent 2**63 - 1 correctly.
6764     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6765     since some C++ compilers masquerading as C compilers
6766     incorrectly reject 9223372036854775807.  */
6767 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6768   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6769                        && LARGE_OFF_T % 2147483647 == 1)
6770                       ? 1 : -1];
6771 int
6772 main ()
6773 {
6774
6775   ;
6776   return 0;
6777 }
6778 _ACEOF
6779 if ac_fn_c_try_compile "$LINENO"; then :
6780   ac_cv_sys_file_offset_bits=64; break
6781 fi
6782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6783   ac_cv_sys_file_offset_bits=unknown
6784   break
6785 done
6786 fi
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6788 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6789 case $ac_cv_sys_file_offset_bits in #(
6790   no | unknown) ;;
6791   *)
6792 cat >>confdefs.h <<_ACEOF
6793 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6794 _ACEOF
6795 ;;
6796 esac
6797 rm -rf conftest*
6798   if test $ac_cv_sys_file_offset_bits = unknown; then
6799     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6800 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6801 if ${ac_cv_sys_large_files+:} false; then :
6802   $as_echo_n "(cached) " >&6
6803 else
6804   while :; do
6805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6806 /* end confdefs.h.  */
6807 #include <sys/types.h>
6808  /* Check that off_t can represent 2**63 - 1 correctly.
6809     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6810     since some C++ compilers masquerading as C compilers
6811     incorrectly reject 9223372036854775807.  */
6812 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6813   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6814                        && LARGE_OFF_T % 2147483647 == 1)
6815                       ? 1 : -1];
6816 int
6817 main ()
6818 {
6819
6820   ;
6821   return 0;
6822 }
6823 _ACEOF
6824 if ac_fn_c_try_compile "$LINENO"; then :
6825   ac_cv_sys_large_files=no; break
6826 fi
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h.  */
6830 #define _LARGE_FILES 1
6831 #include <sys/types.h>
6832  /* Check that off_t can represent 2**63 - 1 correctly.
6833     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6834     since some C++ compilers masquerading as C compilers
6835     incorrectly reject 9223372036854775807.  */
6836 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6837   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6838                        && LARGE_OFF_T % 2147483647 == 1)
6839                       ? 1 : -1];
6840 int
6841 main ()
6842 {
6843
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 if ac_fn_c_try_compile "$LINENO"; then :
6849   ac_cv_sys_large_files=1; break
6850 fi
6851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6852   ac_cv_sys_large_files=unknown
6853   break
6854 done
6855 fi
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6857 $as_echo "$ac_cv_sys_large_files" >&6; }
6858 case $ac_cv_sys_large_files in #(
6859   no | unknown) ;;
6860   *)
6861 cat >>confdefs.h <<_ACEOF
6862 #define _LARGE_FILES $ac_cv_sys_large_files
6863 _ACEOF
6864 ;;
6865 esac
6866 rm -rf conftest*
6867   fi
6868
6869
6870 fi
6871
6872
6873
6874
6875
6876
6877   # Check whether --enable-threads was given.
6878 if test "${enable_threads+set}" = set; then :
6879   enableval=$enable_threads; gl_use_threads=$enableval
6880 else
6881   if test -n "$gl_use_threads_default"; then
6882        gl_use_threads="$gl_use_threads_default"
6883      else
6884        case "$host_os" in
6885                                                                osf*) gl_use_threads=no ;;
6886          cygwin*)
6887                case `uname -r` in
6888                  1.[0-5].*) gl_use_threads=no ;;
6889                  *)         gl_use_threads=yes ;;
6890                esac
6891                ;;
6892          *)    gl_use_threads=yes ;;
6893        esac
6894      fi
6895
6896 fi
6897
6898   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6899     # For using <pthread.h>:
6900     case "$host_os" in
6901       osf*)
6902         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6903         # groks <pthread.h>. cc also understands the flag -pthread, but
6904         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6905         # 2. putting a flag into CPPFLAGS that has an effect on the linker
6906         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6907         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6908         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6909         ;;
6910     esac
6911     # Some systems optimize for single-threaded programs by default, and
6912     # need special flags to disable these optimizations. For example, the
6913     # definition of 'errno' in <errno.h>.
6914     case "$host_os" in
6915       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6916       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6917     esac
6918   fi
6919
6920
6921
6922
6923   # Code from module alloca-opt:
6924   # Code from module announce-gen:
6925   # Code from module at-internal:
6926   # Code from module c-ctype:
6927   # Code from module c-strcase:
6928   # Code from module c-strcaseeq:
6929   # Code from module calloc:
6930   # Code from module calloc-gnu:
6931   # Code from module calloc-posix:
6932   # Code from module chdir:
6933   # Code from module chdir-long:
6934   # Code from module clock-time:
6935   # Code from module cloexec:
6936   # Code from module close:
6937   # Code from module close-stream:
6938   # Code from module closedir:
6939   # Code from module closein:
6940   # Code from module closeout:
6941   # Code from module configmake:
6942   # Code from module dirent:
6943   # Code from module dirent-safer:
6944   # Code from module dirfd:
6945   # Code from module dirname-lgpl:
6946   # Code from module do-release-commit-and-tag:
6947   # Code from module dosname:
6948   # Code from module double-slash-root:
6949   # Code from module dup:
6950   # Code from module dup2:
6951   # Code from module errno:
6952   # Code from module error:
6953   # Code from module exitfail:
6954   # Code from module extensions:
6955
6956   # Code from module fchdir:
6957   # Code from module fclose:
6958   # Code from module fcntl:
6959   # Code from module fcntl-h:
6960   # Code from module fcntl-safer:
6961   # Code from module fd-hook:
6962   # Code from module fdl:
6963   # Code from module fdopendir:
6964   # Code from module fflush:
6965
6966   # Code from module filename:
6967   # Code from module filenamecat-lgpl:
6968   # Code from module float:
6969   # Code from module fpending:
6970   # Code from module fpieee:
6971
6972   # Code from module fprintf-posix:
6973   # Code from module fpucw:
6974   # Code from module fpurge:
6975   # Code from module freadahead:
6976   # Code from module freading:
6977   # Code from module frexp-nolibm:
6978   # Code from module frexpl-nolibm:
6979   # Code from module fseek:
6980   # Code from module fseeko:
6981
6982   # Code from module fseterr:
6983   # Code from module fstat:
6984   # Code from module ftell:
6985   # Code from module ftello:
6986
6987   # Code from module gendocs:
6988   # Code from module getcwd-lgpl:
6989   # Code from module getdtablesize:
6990   # Code from module getopt-gnu:
6991   # Code from module getopt-posix:
6992   # Code from module gettext-h:
6993   # Code from module gettime:
6994   # Code from module gettimeofday:
6995   # Code from module git-version-gen:
6996   # Code from module gitlog-to-changelog:
6997   # Code from module gnu-make:
6998   # Code from module gnu-web-doc-update:
6999   # Code from module gnumakefile:
7000   # Code from module gnupload:
7001   # Code from module havelib:
7002   # Code from module ignore-value:
7003   # Code from module include_next:
7004   # Code from module inline:
7005   # Code from module intprops:
7006   # Code from module isnand-nolibm:
7007   # Code from module isnanf-nolibm:
7008   # Code from module isnanl-nolibm:
7009   # Code from module largefile:
7010
7011   # Code from module lib-ignore:
7012   # Code from module localcharset:
7013   # Code from module lock:
7014   # Code from module lseek:
7015   # Code from module lstat:
7016   # Code from module maintainer-makefile:
7017   # Code from module malloc-gnu:
7018   # Code from module malloc-posix:
7019   # Code from module manywarnings:
7020   # Code from module math:
7021   # Code from module mbrtowc:
7022   # Code from module mbsinit:
7023   # Code from module memchr:
7024   # Code from module mempcpy:
7025   # Code from module memrchr:
7026   # Code from module msvc-inval:
7027   # Code from module msvc-nothrow:
7028   # Code from module multiarch:
7029   # Code from module nocrash:
7030   # Code from module open:
7031   # Code from module openat:
7032   # Code from module openat-die:
7033   # Code from module openat-h:
7034   # Code from module opendir:
7035   # Code from module pathmax:
7036   # Code from module perror:
7037   # Code from module printf-frexp:
7038   # Code from module printf-frexpl:
7039   # Code from module printf-posix:
7040   # Code from module printf-safe:
7041   # Code from module quotearg:
7042   # Code from module quotearg-simple:
7043   # Code from module readdir:
7044   # Code from module readme-release:
7045   # Code from module realloc-gnu:
7046   # Code from module realloc-posix:
7047   # Code from module save-cwd:
7048   # Code from module savedir:
7049   # Code from module signbit:
7050   # Code from module size_max:
7051   # Code from module snippet/_Noreturn:
7052   # Code from module snippet/arg-nonnull:
7053   # Code from module snippet/c++defs:
7054   # Code from module snippet/unused-parameter:
7055   # Code from module snippet/warn-on-use:
7056   # Code from module ssize_t:
7057   # Code from module stat:
7058   # Code from module stat-time:
7059   # Code from module stdbool:
7060   # Code from module stddef:
7061   # Code from module stdint:
7062   # Code from module stdio:
7063   # Code from module stdlib:
7064   # Code from module strdup-posix:
7065   # Code from module streq:
7066   # Code from module strerror:
7067   # Code from module strerror-override:
7068   # Code from module strerror_r-posix:
7069   # Code from module string:
7070   # Code from module sys_stat:
7071   # Code from module sys_time:
7072   # Code from module sys_types:
7073   # Code from module threadlib:
7074
7075
7076
7077   # Code from module time:
7078   # Code from module timespec:
7079   # Code from module unistd:
7080   # Code from module unistd-safer:
7081   # Code from module update-copyright:
7082   # Code from module useless-if-before-free:
7083   # Code from module utimens:
7084   # Code from module vasnprintf:
7085   # Code from module vc-list-files:
7086   # Code from module verify:
7087   # Code from module vfprintf-posix:
7088   # Code from module warnings:
7089   # Code from module wchar:
7090   # Code from module wctype-h:
7091   # Code from module xalloc:
7092   # Code from module xalloc-die:
7093   # Code from module xalloc-oversized:
7094   # Code from module xsize:
7095   # Code from module yesno:
7096
7097
7098
7099
7100
7101
7102
7103           LIBC_FATAL_STDERR_=1
7104   export LIBC_FATAL_STDERR_
7105
7106 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7107 if test "x$ac_cv_type_size_t" = xyes; then :
7108
7109 else
7110
7111 cat >>confdefs.h <<_ACEOF
7112 #define size_t unsigned int
7113 _ACEOF
7114
7115 fi
7116
7117 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7118 # for constant arguments.  Useless!
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7120 $as_echo_n "checking for working alloca.h... " >&6; }
7121 if ${ac_cv_working_alloca_h+:} false; then :
7122   $as_echo_n "(cached) " >&6
7123 else
7124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7125 /* end confdefs.h.  */
7126 #include <alloca.h>
7127 int
7128 main ()
7129 {
7130 char *p = (char *) alloca (2 * sizeof (int));
7131                           if (p) return 0;
7132   ;
7133   return 0;
7134 }
7135 _ACEOF
7136 if ac_fn_c_try_link "$LINENO"; then :
7137   ac_cv_working_alloca_h=yes
7138 else
7139   ac_cv_working_alloca_h=no
7140 fi
7141 rm -f core conftest.err conftest.$ac_objext \
7142     conftest$ac_exeext conftest.$ac_ext
7143 fi
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7145 $as_echo "$ac_cv_working_alloca_h" >&6; }
7146 if test $ac_cv_working_alloca_h = yes; then
7147
7148 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7149
7150 fi
7151
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7153 $as_echo_n "checking for alloca... " >&6; }
7154 if ${ac_cv_func_alloca_works+:} false; then :
7155   $as_echo_n "(cached) " >&6
7156 else
7157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7158 /* end confdefs.h.  */
7159 #ifdef __GNUC__
7160 # define alloca __builtin_alloca
7161 #else
7162 # ifdef _MSC_VER
7163 #  include <malloc.h>
7164 #  define alloca _alloca
7165 # else
7166 #  ifdef HAVE_ALLOCA_H
7167 #   include <alloca.h>
7168 #  else
7169 #   ifdef _AIX
7170  #pragma alloca
7171 #   else
7172 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7173 void *alloca (size_t);
7174 #    endif
7175 #   endif
7176 #  endif
7177 # endif
7178 #endif
7179
7180 int
7181 main ()
7182 {
7183 char *p = (char *) alloca (1);
7184                                     if (p) return 0;
7185   ;
7186   return 0;
7187 }
7188 _ACEOF
7189 if ac_fn_c_try_link "$LINENO"; then :
7190   ac_cv_func_alloca_works=yes
7191 else
7192   ac_cv_func_alloca_works=no
7193 fi
7194 rm -f core conftest.err conftest.$ac_objext \
7195     conftest$ac_exeext conftest.$ac_ext
7196 fi
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7198 $as_echo "$ac_cv_func_alloca_works" >&6; }
7199
7200 if test $ac_cv_func_alloca_works = yes; then
7201
7202 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7203
7204 else
7205   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7206 # that cause trouble.  Some versions do not even contain alloca or
7207 # contain a buggy version.  If you still want to use their alloca,
7208 # use ar to extract alloca.o from them instead of compiling alloca.c.
7209
7210
7211
7212
7213
7214 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7215
7216 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7217
7218
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7220 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7221 if ${ac_cv_os_cray+:} false; then :
7222   $as_echo_n "(cached) " >&6
7223 else
7224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225 /* end confdefs.h.  */
7226 #if defined CRAY && ! defined CRAY2
7227 webecray
7228 #else
7229 wenotbecray
7230 #endif
7231
7232 _ACEOF
7233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7234   $EGREP "webecray" >/dev/null 2>&1; then :
7235   ac_cv_os_cray=yes
7236 else
7237   ac_cv_os_cray=no
7238 fi
7239 rm -f conftest*
7240
7241 fi
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7243 $as_echo "$ac_cv_os_cray" >&6; }
7244 if test $ac_cv_os_cray = yes; then
7245   for ac_func in _getb67 GETB67 getb67; do
7246     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7247 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7248 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7249
7250 cat >>confdefs.h <<_ACEOF
7251 #define CRAY_STACKSEG_END $ac_func
7252 _ACEOF
7253
7254     break
7255 fi
7256
7257   done
7258 fi
7259
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7261 $as_echo_n "checking stack direction for C alloca... " >&6; }
7262 if ${ac_cv_c_stack_direction+:} false; then :
7263   $as_echo_n "(cached) " >&6
7264 else
7265   if test "$cross_compiling" = yes; then :
7266   ac_cv_c_stack_direction=0
7267 else
7268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7269 /* end confdefs.h.  */
7270 $ac_includes_default
7271 int
7272 find_stack_direction (int *addr, int depth)
7273 {
7274   int dir, dummy = 0;
7275   if (! addr)
7276     addr = &dummy;
7277   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7278   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7279   return dir + dummy;
7280 }
7281
7282 int
7283 main (int argc, char **argv)
7284 {
7285   return find_stack_direction (0, argc + !argv + 20) < 0;
7286 }
7287 _ACEOF
7288 if ac_fn_c_try_run "$LINENO"; then :
7289   ac_cv_c_stack_direction=1
7290 else
7291   ac_cv_c_stack_direction=-1
7292 fi
7293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7294   conftest.$ac_objext conftest.beam conftest.$ac_ext
7295 fi
7296
7297 fi
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7299 $as_echo "$ac_cv_c_stack_direction" >&6; }
7300 cat >>confdefs.h <<_ACEOF
7301 #define STACK_DIRECTION $ac_cv_c_stack_direction
7302 _ACEOF
7303
7304
7305 fi
7306
7307
7308   GNULIB__EXIT=0;
7309   GNULIB_ATOLL=0;
7310   GNULIB_CALLOC_POSIX=0;
7311   GNULIB_CANONICALIZE_FILE_NAME=0;
7312   GNULIB_GETLOADAVG=0;
7313   GNULIB_GETSUBOPT=0;
7314   GNULIB_GRANTPT=0;
7315   GNULIB_MALLOC_POSIX=0;
7316   GNULIB_MBTOWC=0;
7317   GNULIB_MKDTEMP=0;
7318   GNULIB_MKOSTEMP=0;
7319   GNULIB_MKOSTEMPS=0;
7320   GNULIB_MKSTEMP=0;
7321   GNULIB_MKSTEMPS=0;
7322   GNULIB_POSIX_OPENPT=0;
7323   GNULIB_PTSNAME=0;
7324   GNULIB_PTSNAME_R=0;
7325   GNULIB_PUTENV=0;
7326   GNULIB_RANDOM=0;
7327   GNULIB_RANDOM_R=0;
7328   GNULIB_REALLOC_POSIX=0;
7329   GNULIB_REALPATH=0;
7330   GNULIB_RPMATCH=0;
7331   GNULIB_SETENV=0;
7332   GNULIB_STRTOD=0;
7333   GNULIB_STRTOLL=0;
7334   GNULIB_STRTOULL=0;
7335   GNULIB_SYSTEM_POSIX=0;
7336   GNULIB_UNLOCKPT=0;
7337   GNULIB_UNSETENV=0;
7338   GNULIB_WCTOMB=0;
7339     HAVE__EXIT=1;
7340   HAVE_ATOLL=1;
7341   HAVE_CANONICALIZE_FILE_NAME=1;
7342   HAVE_DECL_GETLOADAVG=1;
7343   HAVE_GETSUBOPT=1;
7344   HAVE_GRANTPT=1;
7345   HAVE_MKDTEMP=1;
7346   HAVE_MKOSTEMP=1;
7347   HAVE_MKOSTEMPS=1;
7348   HAVE_MKSTEMP=1;
7349   HAVE_MKSTEMPS=1;
7350   HAVE_POSIX_OPENPT=1;
7351   HAVE_PTSNAME=1;
7352   HAVE_PTSNAME_R=1;
7353   HAVE_RANDOM=1;
7354   HAVE_RANDOM_H=1;
7355   HAVE_RANDOM_R=1;
7356   HAVE_REALPATH=1;
7357   HAVE_RPMATCH=1;
7358   HAVE_SETENV=1;
7359   HAVE_DECL_SETENV=1;
7360   HAVE_STRTOD=1;
7361   HAVE_STRTOLL=1;
7362   HAVE_STRTOULL=1;
7363   HAVE_STRUCT_RANDOM_DATA=1;
7364   HAVE_SYS_LOADAVG_H=0;
7365   HAVE_UNLOCKPT=1;
7366   HAVE_DECL_UNSETENV=1;
7367   REPLACE_CALLOC=0;
7368   REPLACE_CANONICALIZE_FILE_NAME=0;
7369   REPLACE_MALLOC=0;
7370   REPLACE_MBTOWC=0;
7371   REPLACE_MKSTEMP=0;
7372   REPLACE_PTSNAME_R=0;
7373   REPLACE_PUTENV=0;
7374   REPLACE_RANDOM_R=0;
7375   REPLACE_REALLOC=0;
7376   REPLACE_REALPATH=0;
7377   REPLACE_SETENV=0;
7378   REPLACE_STRTOD=0;
7379   REPLACE_UNSETENV=0;
7380   REPLACE_WCTOMB=0;
7381
7382
7383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7384 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7385 if ${gl_cv_func_malloc_posix+:} false; then :
7386   $as_echo_n "(cached) " >&6
7387 else
7388
7389                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7390 /* end confdefs.h.  */
7391
7392 int
7393 main ()
7394 {
7395 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7396              choke me
7397              #endif
7398
7399   ;
7400   return 0;
7401 }
7402 _ACEOF
7403 if ac_fn_c_try_compile "$LINENO"; then :
7404   gl_cv_func_malloc_posix=yes
7405 else
7406   gl_cv_func_malloc_posix=no
7407 fi
7408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7409
7410 fi
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7412 $as_echo "$gl_cv_func_malloc_posix" >&6; }
7413
7414
7415   GNULIB_CHDIR=0;
7416   GNULIB_CHOWN=0;
7417   GNULIB_CLOSE=0;
7418   GNULIB_DUP=0;
7419   GNULIB_DUP2=0;
7420   GNULIB_DUP3=0;
7421   GNULIB_ENVIRON=0;
7422   GNULIB_EUIDACCESS=0;
7423   GNULIB_FACCESSAT=0;
7424   GNULIB_FCHDIR=0;
7425   GNULIB_FCHOWNAT=0;
7426   GNULIB_FDATASYNC=0;
7427   GNULIB_FSYNC=0;
7428   GNULIB_FTRUNCATE=0;
7429   GNULIB_GETCWD=0;
7430   GNULIB_GETDOMAINNAME=0;
7431   GNULIB_GETDTABLESIZE=0;
7432   GNULIB_GETGROUPS=0;
7433   GNULIB_GETHOSTNAME=0;
7434   GNULIB_GETLOGIN=0;
7435   GNULIB_GETLOGIN_R=0;
7436   GNULIB_GETPAGESIZE=0;
7437   GNULIB_GETUSERSHELL=0;
7438   GNULIB_GROUP_MEMBER=0;
7439   GNULIB_ISATTY=0;
7440   GNULIB_LCHOWN=0;
7441   GNULIB_LINK=0;
7442   GNULIB_LINKAT=0;
7443   GNULIB_LSEEK=0;
7444   GNULIB_PIPE=0;
7445   GNULIB_PIPE2=0;
7446   GNULIB_PREAD=0;
7447   GNULIB_PWRITE=0;
7448   GNULIB_READ=0;
7449   GNULIB_READLINK=0;
7450   GNULIB_READLINKAT=0;
7451   GNULIB_RMDIR=0;
7452   GNULIB_SETHOSTNAME=0;
7453   GNULIB_SLEEP=0;
7454   GNULIB_SYMLINK=0;
7455   GNULIB_SYMLINKAT=0;
7456   GNULIB_TTYNAME_R=0;
7457   GNULIB_UNISTD_H_NONBLOCKING=0;
7458   GNULIB_UNISTD_H_SIGPIPE=0;
7459   GNULIB_UNLINK=0;
7460   GNULIB_UNLINKAT=0;
7461   GNULIB_USLEEP=0;
7462   GNULIB_WRITE=0;
7463     HAVE_CHOWN=1;
7464   HAVE_DUP2=1;
7465   HAVE_DUP3=1;
7466   HAVE_EUIDACCESS=1;
7467   HAVE_FACCESSAT=1;
7468   HAVE_FCHDIR=1;
7469   HAVE_FCHOWNAT=1;
7470   HAVE_FDATASYNC=1;
7471   HAVE_FSYNC=1;
7472   HAVE_FTRUNCATE=1;
7473   HAVE_GETDTABLESIZE=1;
7474   HAVE_GETGROUPS=1;
7475   HAVE_GETHOSTNAME=1;
7476   HAVE_GETLOGIN=1;
7477   HAVE_GETPAGESIZE=1;
7478   HAVE_GROUP_MEMBER=1;
7479   HAVE_LCHOWN=1;
7480   HAVE_LINK=1;
7481   HAVE_LINKAT=1;
7482   HAVE_PIPE=1;
7483   HAVE_PIPE2=1;
7484   HAVE_PREAD=1;
7485   HAVE_PWRITE=1;
7486   HAVE_READLINK=1;
7487   HAVE_READLINKAT=1;
7488   HAVE_SETHOSTNAME=1;
7489   HAVE_SLEEP=1;
7490   HAVE_SYMLINK=1;
7491   HAVE_SYMLINKAT=1;
7492   HAVE_UNLINKAT=1;
7493   HAVE_USLEEP=1;
7494   HAVE_DECL_ENVIRON=1;
7495   HAVE_DECL_FCHDIR=1;
7496   HAVE_DECL_FDATASYNC=1;
7497   HAVE_DECL_GETDOMAINNAME=1;
7498   HAVE_DECL_GETLOGIN_R=1;
7499   HAVE_DECL_GETPAGESIZE=1;
7500   HAVE_DECL_GETUSERSHELL=1;
7501   HAVE_DECL_SETHOSTNAME=1;
7502   HAVE_DECL_TTYNAME_R=1;
7503   HAVE_OS_H=0;
7504   HAVE_SYS_PARAM_H=0;
7505   REPLACE_CHOWN=0;
7506   REPLACE_CLOSE=0;
7507   REPLACE_DUP=0;
7508   REPLACE_DUP2=0;
7509   REPLACE_FCHOWNAT=0;
7510   REPLACE_FTRUNCATE=0;
7511   REPLACE_GETCWD=0;
7512   REPLACE_GETDOMAINNAME=0;
7513   REPLACE_GETLOGIN_R=0;
7514   REPLACE_GETGROUPS=0;
7515   REPLACE_GETPAGESIZE=0;
7516   REPLACE_ISATTY=0;
7517   REPLACE_LCHOWN=0;
7518   REPLACE_LINK=0;
7519   REPLACE_LINKAT=0;
7520   REPLACE_LSEEK=0;
7521   REPLACE_PREAD=0;
7522   REPLACE_PWRITE=0;
7523   REPLACE_READ=0;
7524   REPLACE_READLINK=0;
7525   REPLACE_RMDIR=0;
7526   REPLACE_SLEEP=0;
7527   REPLACE_SYMLINK=0;
7528   REPLACE_TTYNAME_R=0;
7529   REPLACE_UNLINK=0;
7530   REPLACE_UNLINKAT=0;
7531   REPLACE_USLEEP=0;
7532   REPLACE_WRITE=0;
7533   UNISTD_H_HAVE_WINSOCK2_H=0;
7534   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7535
7536
7537
7538
7539
7540   for ac_header in $ac_header_list
7541 do :
7542   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7543 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7544 "
7545 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7546   cat >>confdefs.h <<_ACEOF
7547 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7548 _ACEOF
7549
7550 fi
7551
7552 done
7553
7554
7555
7556
7557
7558
7559
7560
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7562 $as_echo_n "checking for inline... " >&6; }
7563 if ${ac_cv_c_inline+:} false; then :
7564   $as_echo_n "(cached) " >&6
7565 else
7566   ac_cv_c_inline=no
7567 for ac_kw in inline __inline__ __inline; do
7568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569 /* end confdefs.h.  */
7570 #ifndef __cplusplus
7571 typedef int foo_t;
7572 static $ac_kw foo_t static_foo () {return 0; }
7573 $ac_kw foo_t foo () {return 0; }
7574 #endif
7575
7576 _ACEOF
7577 if ac_fn_c_try_compile "$LINENO"; then :
7578   ac_cv_c_inline=$ac_kw
7579 fi
7580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7581   test "$ac_cv_c_inline" != no && break
7582 done
7583
7584 fi
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7586 $as_echo "$ac_cv_c_inline" >&6; }
7587
7588 case $ac_cv_c_inline in
7589   inline | yes) ;;
7590   *)
7591     case $ac_cv_c_inline in
7592       no) ac_val=;;
7593       *) ac_val=$ac_cv_c_inline;;
7594     esac
7595     cat >>confdefs.h <<_ACEOF
7596 #ifndef __cplusplus
7597 #define inline $ac_val
7598 #endif
7599 _ACEOF
7600     ;;
7601 esac
7602
7603
7604
7605
7606   for ac_func in $ac_func_list
7607 do :
7608   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7609 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7610 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7611   cat >>confdefs.h <<_ACEOF
7612 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7613 _ACEOF
7614
7615 fi
7616 done
7617
7618
7619
7620
7621
7622   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7623     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7624
7625 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7626
7627   else
7628     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7629   fi
7630
7631
7632
7633
7634
7635
7636
7637      GNULIB_OPENDIR=0;
7638   GNULIB_READDIR=0;
7639   GNULIB_REWINDDIR=0;
7640   GNULIB_CLOSEDIR=0;
7641   GNULIB_DIRFD=0;
7642   GNULIB_FDOPENDIR=0;
7643   GNULIB_SCANDIR=0;
7644   GNULIB_ALPHASORT=0;
7645     HAVE_OPENDIR=1;
7646   HAVE_READDIR=1;
7647   HAVE_REWINDDIR=1;
7648   HAVE_CLOSEDIR=1;
7649   HAVE_DECL_DIRFD=1;
7650   HAVE_DECL_FDOPENDIR=1;
7651   HAVE_FDOPENDIR=1;
7652   HAVE_SCANDIR=1;
7653   HAVE_ALPHASORT=1;
7654   REPLACE_OPENDIR=0;
7655   REPLACE_CLOSEDIR=0;
7656   REPLACE_DIRFD=0;
7657   REPLACE_FDOPENDIR=0;
7658
7659
7660
7661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7662 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7663 if ${gl_cv_have_include_next+:} false; then :
7664   $as_echo_n "(cached) " >&6
7665 else
7666   rm -rf conftestd1a conftestd1b conftestd2
7667      mkdir conftestd1a conftestd1b conftestd2
7668                                                   cat <<EOF > conftestd1a/conftest.h
7669 #define DEFINED_IN_CONFTESTD1
7670 #include_next <conftest.h>
7671 #ifdef DEFINED_IN_CONFTESTD2
7672 int foo;
7673 #else
7674 #error "include_next doesn't work"
7675 #endif
7676 EOF
7677      cat <<EOF > conftestd1b/conftest.h
7678 #define DEFINED_IN_CONFTESTD1
7679 #include <stdio.h>
7680 #include_next <conftest.h>
7681 #ifdef DEFINED_IN_CONFTESTD2
7682 int foo;
7683 #else
7684 #error "include_next doesn't work"
7685 #endif
7686 EOF
7687      cat <<EOF > conftestd2/conftest.h
7688 #ifndef DEFINED_IN_CONFTESTD1
7689 #error "include_next test doesn't work"
7690 #endif
7691 #define DEFINED_IN_CONFTESTD2
7692 EOF
7693      gl_save_CPPFLAGS="$CPPFLAGS"
7694      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7695      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696 /* end confdefs.h.  */
7697 #include <conftest.h>
7698 _ACEOF
7699 if ac_fn_c_try_compile "$LINENO"; then :
7700   gl_cv_have_include_next=yes
7701 else
7702   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7703         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704 /* end confdefs.h.  */
7705 #include <conftest.h>
7706 _ACEOF
7707 if ac_fn_c_try_compile "$LINENO"; then :
7708   gl_cv_have_include_next=buggy
7709 else
7710   gl_cv_have_include_next=no
7711 fi
7712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7713
7714 fi
7715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7716      CPPFLAGS="$gl_save_CPPFLAGS"
7717      rm -rf conftestd1a conftestd1b conftestd2
7718
7719 fi
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7721 $as_echo "$gl_cv_have_include_next" >&6; }
7722   PRAGMA_SYSTEM_HEADER=
7723   if test $gl_cv_have_include_next = yes; then
7724     INCLUDE_NEXT=include_next
7725     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7726     if test -n "$GCC"; then
7727       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7728     fi
7729   else
7730     if test $gl_cv_have_include_next = buggy; then
7731       INCLUDE_NEXT=include
7732       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7733     else
7734       INCLUDE_NEXT=include
7735       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7736     fi
7737   fi
7738
7739
7740
7741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7742 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7743 if ${gl_cv_pragma_columns+:} false; then :
7744   $as_echo_n "(cached) " >&6
7745 else
7746        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7747 /* end confdefs.h.  */
7748
7749 #ifdef __TANDEM
7750 choke me
7751 #endif
7752
7753 _ACEOF
7754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7755   $EGREP "choke me" >/dev/null 2>&1; then :
7756   gl_cv_pragma_columns=yes
7757 else
7758   gl_cv_pragma_columns=no
7759 fi
7760 rm -f conftest*
7761
7762
7763 fi
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7765 $as_echo "$gl_cv_pragma_columns" >&6; }
7766   if test $gl_cv_pragma_columns = yes; then
7767     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7768   else
7769     PRAGMA_COLUMNS=
7770   fi
7771
7772
7773
7774
7775
7776
7777
7778
7779   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7780 $as_echo_n "checking whether // is distinct from /... " >&6; }
7781 if ${gl_cv_double_slash_root+:} false; then :
7782   $as_echo_n "(cached) " >&6
7783 else
7784    if test x"$cross_compiling" = xyes ; then
7785         # When cross-compiling, there is no way to tell whether // is special
7786         # short of a list of hosts.  However, the only known hosts to date
7787         # that have a distinct // are Apollo DomainOS (too old to port to),
7788         # Cygwin, and z/OS.  If anyone knows of another system for which // has
7789         # special semantics and is distinct from /, please report it to
7790         # <bug-gnulib@gnu.org>.
7791         case $host in
7792           *-cygwin | i370-ibm-openedition)
7793             gl_cv_double_slash_root=yes ;;
7794           *)
7795             # Be optimistic and assume that / and // are the same when we
7796             # don't know.
7797             gl_cv_double_slash_root='unknown, assuming no' ;;
7798         esac
7799       else
7800         set x `ls -di / // 2>/dev/null`
7801         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7802           gl_cv_double_slash_root=no
7803         else
7804           gl_cv_double_slash_root=yes
7805         fi
7806       fi
7807 fi
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7809 $as_echo "$gl_cv_double_slash_root" >&6; }
7810   if test "$gl_cv_double_slash_root" = yes; then
7811
7812 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7813
7814   fi
7815
7816
7817
7818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7819 $as_echo_n "checking for complete errno.h... " >&6; }
7820 if ${gl_cv_header_errno_h_complete+:} false; then :
7821   $as_echo_n "(cached) " >&6
7822 else
7823
7824     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825 /* end confdefs.h.  */
7826
7827 #include <errno.h>
7828 #if !defined ETXTBSY
7829 booboo
7830 #endif
7831 #if !defined ENOMSG
7832 booboo
7833 #endif
7834 #if !defined EIDRM
7835 booboo
7836 #endif
7837 #if !defined ENOLINK
7838 booboo
7839 #endif
7840 #if !defined EPROTO
7841 booboo
7842 #endif
7843 #if !defined EMULTIHOP
7844 booboo
7845 #endif
7846 #if !defined EBADMSG
7847 booboo
7848 #endif
7849 #if !defined EOVERFLOW
7850 booboo
7851 #endif
7852 #if !defined ENOTSUP
7853 booboo
7854 #endif
7855 #if !defined ENETRESET
7856 booboo
7857 #endif
7858 #if !defined ECONNABORTED
7859 booboo
7860 #endif
7861 #if !defined ESTALE
7862 booboo
7863 #endif
7864 #if !defined EDQUOT
7865 booboo
7866 #endif
7867 #if !defined ECANCELED
7868 booboo
7869 #endif
7870 #if !defined EOWNERDEAD
7871 booboo
7872 #endif
7873 #if !defined ENOTRECOVERABLE
7874 booboo
7875 #endif
7876
7877 _ACEOF
7878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7879   $EGREP "booboo" >/dev/null 2>&1; then :
7880   gl_cv_header_errno_h_complete=no
7881 else
7882   gl_cv_header_errno_h_complete=yes
7883 fi
7884 rm -f conftest*
7885
7886
7887 fi
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7889 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
7890   if test $gl_cv_header_errno_h_complete = yes; then
7891     ERRNO_H=''
7892   else
7893
7894
7895
7896
7897
7898
7899
7900
7901      if test $gl_cv_have_include_next = yes; then
7902        gl_cv_next_errno_h='<'errno.h'>'
7903      else
7904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7905 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
7906 if ${gl_cv_next_errno_h+:} false; then :
7907   $as_echo_n "(cached) " >&6
7908 else
7909
7910                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911 /* end confdefs.h.  */
7912 #include <errno.h>
7913
7914 _ACEOF
7915                                                                                                                         case "$host_os" in
7916                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
7917                  *)    gl_absname_cpp="$ac_cpp" ;;
7918                esac
7919
7920                case "$host_os" in
7921                  mingw*)
7922                                                                                                                                      gl_dirsep_regex='[/\\]'
7923                    ;;
7924                  *)
7925                    gl_dirsep_regex='\/'
7926                    ;;
7927                esac
7928                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7929
7930                gl_header_literal_regex=`echo 'errno.h' \
7931                                         | sed -e "$gl_make_literal_regex_sed"`
7932                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7933                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7934                    s|^/[^/]|//&|
7935                    p
7936                    q
7937                  }'
7938                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7939                       sed -n "$gl_absolute_header_sed"`'"'
7940
7941
7942 fi
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7944 $as_echo "$gl_cv_next_errno_h" >&6; }
7945      fi
7946      NEXT_ERRNO_H=$gl_cv_next_errno_h
7947
7948      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7949        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7950        gl_next_as_first_directive='<'errno.h'>'
7951      else
7952        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7953        gl_next_as_first_directive=$gl_cv_next_errno_h
7954      fi
7955      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7956
7957
7958
7959
7960     ERRNO_H='errno.h'
7961   fi
7962
7963    if test -n "$ERRNO_H"; then
7964   GL_GENERATE_ERRNO_H_TRUE=
7965   GL_GENERATE_ERRNO_H_FALSE='#'
7966 else
7967   GL_GENERATE_ERRNO_H_TRUE='#'
7968   GL_GENERATE_ERRNO_H_FALSE=
7969 fi
7970
7971
7972   if test -n "$ERRNO_H"; then
7973     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7974 $as_echo_n "checking for EMULTIHOP value... " >&6; }
7975 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7976   $as_echo_n "(cached) " >&6
7977 else
7978
7979       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7980 /* end confdefs.h.  */
7981
7982 #include <errno.h>
7983 #ifdef EMULTIHOP
7984 yes
7985 #endif
7986
7987 _ACEOF
7988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7989   $EGREP "yes" >/dev/null 2>&1; then :
7990   gl_cv_header_errno_h_EMULTIHOP=yes
7991 else
7992   gl_cv_header_errno_h_EMULTIHOP=no
7993 fi
7994 rm -f conftest*
7995
7996       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7997         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7998 /* end confdefs.h.  */
7999
8000 #define _XOPEN_SOURCE_EXTENDED 1
8001 #include <errno.h>
8002 #ifdef EMULTIHOP
8003 yes
8004 #endif
8005
8006 _ACEOF
8007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8008   $EGREP "yes" >/dev/null 2>&1; then :
8009   gl_cv_header_errno_h_EMULTIHOP=hidden
8010 fi
8011 rm -f conftest*
8012
8013         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8014                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
8015 #define _XOPEN_SOURCE_EXTENDED 1
8016 #include <errno.h>
8017 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8018 #include <stdio.h>
8019 #include <stdlib.h>
8020 "; then :
8021
8022 fi
8023
8024         fi
8025       fi
8026
8027 fi
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8029 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8030     case $gl_cv_header_errno_h_EMULTIHOP in
8031       yes | no)
8032         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8033         ;;
8034       *)
8035         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8036         ;;
8037     esac
8038
8039
8040   fi
8041
8042
8043   if test -n "$ERRNO_H"; then
8044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8045 $as_echo_n "checking for ENOLINK value... " >&6; }
8046 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8047   $as_echo_n "(cached) " >&6
8048 else
8049
8050       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8051 /* end confdefs.h.  */
8052
8053 #include <errno.h>
8054 #ifdef ENOLINK
8055 yes
8056 #endif
8057
8058 _ACEOF
8059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8060   $EGREP "yes" >/dev/null 2>&1; then :
8061   gl_cv_header_errno_h_ENOLINK=yes
8062 else
8063   gl_cv_header_errno_h_ENOLINK=no
8064 fi
8065 rm -f conftest*
8066
8067       if test $gl_cv_header_errno_h_ENOLINK = no; then
8068         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8069 /* end confdefs.h.  */
8070
8071 #define _XOPEN_SOURCE_EXTENDED 1
8072 #include <errno.h>
8073 #ifdef ENOLINK
8074 yes
8075 #endif
8076
8077 _ACEOF
8078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8079   $EGREP "yes" >/dev/null 2>&1; then :
8080   gl_cv_header_errno_h_ENOLINK=hidden
8081 fi
8082 rm -f conftest*
8083
8084         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8085                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
8086 #define _XOPEN_SOURCE_EXTENDED 1
8087 #include <errno.h>
8088 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8089 #include <stdio.h>
8090 #include <stdlib.h>
8091 "; then :
8092
8093 fi
8094
8095         fi
8096       fi
8097
8098 fi
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8100 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8101     case $gl_cv_header_errno_h_ENOLINK in
8102       yes | no)
8103         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8104         ;;
8105       *)
8106         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8107         ;;
8108     esac
8109
8110
8111   fi
8112
8113
8114   if test -n "$ERRNO_H"; then
8115     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8116 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8117 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8118   $as_echo_n "(cached) " >&6
8119 else
8120
8121       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8122 /* end confdefs.h.  */
8123
8124 #include <errno.h>
8125 #ifdef EOVERFLOW
8126 yes
8127 #endif
8128
8129 _ACEOF
8130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8131   $EGREP "yes" >/dev/null 2>&1; then :
8132   gl_cv_header_errno_h_EOVERFLOW=yes
8133 else
8134   gl_cv_header_errno_h_EOVERFLOW=no
8135 fi
8136 rm -f conftest*
8137
8138       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8139         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8140 /* end confdefs.h.  */
8141
8142 #define _XOPEN_SOURCE_EXTENDED 1
8143 #include <errno.h>
8144 #ifdef EOVERFLOW
8145 yes
8146 #endif
8147
8148 _ACEOF
8149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8150   $EGREP "yes" >/dev/null 2>&1; then :
8151   gl_cv_header_errno_h_EOVERFLOW=hidden
8152 fi
8153 rm -f conftest*
8154
8155         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8156                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
8157 #define _XOPEN_SOURCE_EXTENDED 1
8158 #include <errno.h>
8159 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8160 #include <stdio.h>
8161 #include <stdlib.h>
8162 "; then :
8163
8164 fi
8165
8166         fi
8167       fi
8168
8169 fi
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8171 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8172     case $gl_cv_header_errno_h_EOVERFLOW in
8173       yes | no)
8174         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8175         ;;
8176       *)
8177         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8178         ;;
8179     esac
8180
8181
8182   fi
8183
8184
8185 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8186 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8187   ac_have_decl=1
8188 else
8189   ac_have_decl=0
8190 fi
8191
8192 cat >>confdefs.h <<_ACEOF
8193 #define HAVE_DECL_STRERROR_R $ac_have_decl
8194 _ACEOF
8195
8196 for ac_func in strerror_r
8197 do :
8198   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8199 if test "x$ac_cv_func_strerror_r" = xyes; then :
8200   cat >>confdefs.h <<_ACEOF
8201 #define HAVE_STRERROR_R 1
8202 _ACEOF
8203
8204 fi
8205 done
8206
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8208 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
8209 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8210   $as_echo_n "(cached) " >&6
8211 else
8212
8213     ac_cv_func_strerror_r_char_p=no
8214     if test $ac_cv_have_decl_strerror_r = yes; then
8215       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h.  */
8217 $ac_includes_default
8218 int
8219 main ()
8220 {
8221
8222           char buf[100];
8223           char x = *strerror_r (0, buf, sizeof buf);
8224           char *p = strerror_r (0, buf, sizeof buf);
8225           return !p || x;
8226
8227   ;
8228   return 0;
8229 }
8230 _ACEOF
8231 if ac_fn_c_try_compile "$LINENO"; then :
8232   ac_cv_func_strerror_r_char_p=yes
8233 fi
8234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8235     else
8236       # strerror_r is not declared.  Choose between
8237       # systems that have relatively inaccessible declarations for the
8238       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8239       # former has a strerror_r that returns char*, while the latter
8240       # has a strerror_r that returns `int'.
8241       # This test should segfault on the DEC system.
8242       if test "$cross_compiling" = yes; then :
8243   :
8244 else
8245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8246 /* end confdefs.h.  */
8247 $ac_includes_default
8248         extern char *strerror_r ();
8249 int
8250 main ()
8251 {
8252 char buf[100];
8253           char x = *strerror_r (0, buf, sizeof buf);
8254           return ! isalpha (x);
8255   ;
8256   return 0;
8257 }
8258 _ACEOF
8259 if ac_fn_c_try_run "$LINENO"; then :
8260   ac_cv_func_strerror_r_char_p=yes
8261 fi
8262 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8263   conftest.$ac_objext conftest.beam conftest.$ac_ext
8264 fi
8265
8266     fi
8267
8268 fi
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8270 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8271 if test $ac_cv_func_strerror_r_char_p = yes; then
8272
8273 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8274
8275 fi
8276
8277
8278   XGETTEXT_EXTRA_OPTIONS=
8279
8280 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8281 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8282   ac_have_decl=1
8283 else
8284   ac_have_decl=0
8285 fi
8286
8287 cat >>confdefs.h <<_ACEOF
8288 #define HAVE_DECL_FCHDIR $ac_have_decl
8289 _ACEOF
8290
8291
8292   GNULIB_DPRINTF=0;
8293   GNULIB_FCLOSE=0;
8294   GNULIB_FDOPEN=0;
8295   GNULIB_FFLUSH=0;
8296   GNULIB_FGETC=0;
8297   GNULIB_FGETS=0;
8298   GNULIB_FOPEN=0;
8299   GNULIB_FPRINTF=0;
8300   GNULIB_FPRINTF_POSIX=0;
8301   GNULIB_FPURGE=0;
8302   GNULIB_FPUTC=0;
8303   GNULIB_FPUTS=0;
8304   GNULIB_FREAD=0;
8305   GNULIB_FREOPEN=0;
8306   GNULIB_FSCANF=0;
8307   GNULIB_FSEEK=0;
8308   GNULIB_FSEEKO=0;
8309   GNULIB_FTELL=0;
8310   GNULIB_FTELLO=0;
8311   GNULIB_FWRITE=0;
8312   GNULIB_GETC=0;
8313   GNULIB_GETCHAR=0;
8314   GNULIB_GETDELIM=0;
8315   GNULIB_GETLINE=0;
8316   GNULIB_OBSTACK_PRINTF=0;
8317   GNULIB_OBSTACK_PRINTF_POSIX=0;
8318   GNULIB_PCLOSE=0;
8319   GNULIB_PERROR=0;
8320   GNULIB_POPEN=0;
8321   GNULIB_PRINTF=0;
8322   GNULIB_PRINTF_POSIX=0;
8323   GNULIB_PUTC=0;
8324   GNULIB_PUTCHAR=0;
8325   GNULIB_PUTS=0;
8326   GNULIB_REMOVE=0;
8327   GNULIB_RENAME=0;
8328   GNULIB_RENAMEAT=0;
8329   GNULIB_SCANF=0;
8330   GNULIB_SNPRINTF=0;
8331   GNULIB_SPRINTF_POSIX=0;
8332   GNULIB_STDIO_H_NONBLOCKING=0;
8333   GNULIB_STDIO_H_SIGPIPE=0;
8334   GNULIB_TMPFILE=0;
8335   GNULIB_VASPRINTF=0;
8336   GNULIB_VFSCANF=0;
8337   GNULIB_VSCANF=0;
8338   GNULIB_VDPRINTF=0;
8339   GNULIB_VFPRINTF=0;
8340   GNULIB_VFPRINTF_POSIX=0;
8341   GNULIB_VPRINTF=0;
8342   GNULIB_VPRINTF_POSIX=0;
8343   GNULIB_VSNPRINTF=0;
8344   GNULIB_VSPRINTF_POSIX=0;
8345     HAVE_DECL_FPURGE=1;
8346   HAVE_DECL_FSEEKO=1;
8347   HAVE_DECL_FTELLO=1;
8348   HAVE_DECL_GETDELIM=1;
8349   HAVE_DECL_GETLINE=1;
8350   HAVE_DECL_OBSTACK_PRINTF=1;
8351   HAVE_DECL_SNPRINTF=1;
8352   HAVE_DECL_VSNPRINTF=1;
8353   HAVE_DPRINTF=1;
8354   HAVE_FSEEKO=1;
8355   HAVE_FTELLO=1;
8356   HAVE_PCLOSE=1;
8357   HAVE_POPEN=1;
8358   HAVE_RENAMEAT=1;
8359   HAVE_VASPRINTF=1;
8360   HAVE_VDPRINTF=1;
8361   REPLACE_DPRINTF=0;
8362   REPLACE_FCLOSE=0;
8363   REPLACE_FDOPEN=0;
8364   REPLACE_FFLUSH=0;
8365   REPLACE_FOPEN=0;
8366   REPLACE_FPRINTF=0;
8367   REPLACE_FPURGE=0;
8368   REPLACE_FREOPEN=0;
8369   REPLACE_FSEEK=0;
8370   REPLACE_FSEEKO=0;
8371   REPLACE_FTELL=0;
8372   REPLACE_FTELLO=0;
8373   REPLACE_GETDELIM=0;
8374   REPLACE_GETLINE=0;
8375   REPLACE_OBSTACK_PRINTF=0;
8376   REPLACE_PERROR=0;
8377   REPLACE_POPEN=0;
8378   REPLACE_PRINTF=0;
8379   REPLACE_REMOVE=0;
8380   REPLACE_RENAME=0;
8381   REPLACE_RENAMEAT=0;
8382   REPLACE_SNPRINTF=0;
8383   REPLACE_SPRINTF=0;
8384   REPLACE_STDIO_READ_FUNCS=0;
8385   REPLACE_STDIO_WRITE_FUNCS=0;
8386   REPLACE_TMPFILE=0;
8387   REPLACE_VASPRINTF=0;
8388   REPLACE_VDPRINTF=0;
8389   REPLACE_VFPRINTF=0;
8390   REPLACE_VPRINTF=0;
8391   REPLACE_VSNPRINTF=0;
8392   REPLACE_VSPRINTF=0;
8393
8394
8395   GNULIB_FCNTL=0;
8396   GNULIB_NONBLOCKING=0;
8397   GNULIB_OPEN=0;
8398   GNULIB_OPENAT=0;
8399     HAVE_FCNTL=1;
8400   HAVE_OPENAT=1;
8401   REPLACE_FCNTL=0;
8402   REPLACE_OPEN=0;
8403   REPLACE_OPENAT=0;
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8415 $as_echo_n "checking for working fcntl.h... " >&6; }
8416 if ${gl_cv_header_working_fcntl_h+:} false; then :
8417   $as_echo_n "(cached) " >&6
8418 else
8419   if test "$cross_compiling" = yes; then :
8420   gl_cv_header_working_fcntl_h=cross-compiling
8421 else
8422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423 /* end confdefs.h.  */
8424 #include <sys/types.h>
8425            #include <sys/stat.h>
8426            #if HAVE_UNISTD_H
8427            # include <unistd.h>
8428            #else /* on Windows with MSVC */
8429            # include <io.h>
8430            # include <stdlib.h>
8431            # defined sleep(n) _sleep ((n) * 1000)
8432            #endif
8433            #include <fcntl.h>
8434            #ifndef O_NOATIME
8435             #define O_NOATIME 0
8436            #endif
8437            #ifndef O_NOFOLLOW
8438             #define O_NOFOLLOW 0
8439            #endif
8440            static int const constants[] =
8441             {
8442               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8443               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8444             };
8445
8446 int
8447 main ()
8448 {
8449
8450             int result = !constants;
8451             #if HAVE_SYMLINK
8452             {
8453               static char const sym[] = "conftest.sym";
8454               if (symlink (".", sym) != 0)
8455                 result |= 2;
8456               else
8457                 {
8458                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8459                   if (fd >= 0)
8460                     {
8461                       close (fd);
8462                       result |= 4;
8463                     }
8464                 }
8465               unlink (sym);
8466             }
8467             #endif
8468             {
8469               static char const file[] = "confdefs.h";
8470               int fd = open (file, O_RDONLY | O_NOATIME);
8471               if (fd < 0)
8472                 result |= 8;
8473               else
8474                 {
8475                   struct stat st0;
8476                   if (fstat (fd, &st0) != 0)
8477                     result |= 16;
8478                   else
8479                     {
8480                       char c;
8481                       sleep (1);
8482                       if (read (fd, &c, 1) != 1)
8483                         result |= 24;
8484                       else
8485                         {
8486                           if (close (fd) != 0)
8487                             result |= 32;
8488                           else
8489                             {
8490                               struct stat st1;
8491                               if (stat (file, &st1) != 0)
8492                                 result |= 40;
8493                               else
8494                                 if (st0.st_atime != st1.st_atime)
8495                                   result |= 64;
8496                             }
8497                         }
8498                     }
8499                 }
8500             }
8501             return result;
8502   ;
8503   return 0;
8504 }
8505 _ACEOF
8506 if ac_fn_c_try_run "$LINENO"; then :
8507   gl_cv_header_working_fcntl_h=yes
8508 else
8509   case $? in #(
8510         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8511         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8512         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8513          *) gl_cv_header_working_fcntl_h='no';;
8514         esac
8515 fi
8516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8517   conftest.$ac_objext conftest.beam conftest.$ac_ext
8518 fi
8519
8520 fi
8521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8522 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8523
8524   case $gl_cv_header_working_fcntl_h in #(
8525   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8526   *) ac_val=1;;
8527   esac
8528
8529 cat >>confdefs.h <<_ACEOF
8530 #define HAVE_WORKING_O_NOATIME $ac_val
8531 _ACEOF
8532
8533
8534   case $gl_cv_header_working_fcntl_h in #(
8535   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8536   *) ac_val=1;;
8537   esac
8538
8539 cat >>confdefs.h <<_ACEOF
8540 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8541 _ACEOF
8542
8543
8544 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8545 if test "x$ac_cv_type_pid_t" = xyes; then :
8546
8547 else
8548
8549 cat >>confdefs.h <<_ACEOF
8550 #define pid_t int
8551 _ACEOF
8552
8553 fi
8554
8555 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8556 if test "x$ac_cv_type_mode_t" = xyes; then :
8557
8558 else
8559
8560 cat >>confdefs.h <<_ACEOF
8561 #define mode_t int
8562 _ACEOF
8563
8564 fi
8565
8566
8567
8568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8569 $as_echo_n "checking for promoted mode_t type... " >&6; }
8570 if ${gl_cv_promoted_mode_t+:} false; then :
8571   $as_echo_n "(cached) " >&6
8572 else
8573
8574                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8575 /* end confdefs.h.  */
8576 #include <sys/types.h>
8577 int
8578 main ()
8579 {
8580 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
8581   ;
8582   return 0;
8583 }
8584 _ACEOF
8585 if ac_fn_c_try_compile "$LINENO"; then :
8586   gl_cv_promoted_mode_t='int'
8587 else
8588   gl_cv_promoted_mode_t='mode_t'
8589 fi
8590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8591
8592 fi
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
8594 $as_echo "$gl_cv_promoted_mode_t" >&6; }
8595
8596 cat >>confdefs.h <<_ACEOF
8597 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
8598 _ACEOF
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
8609 $as_echo_n "checking for stdint.h... " >&6; }
8610 if ${gl_cv_header_stdint_h+:} false; then :
8611   $as_echo_n "(cached) " >&6
8612 else
8613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8614 /* end confdefs.h.  */
8615 #include <sys/types.h>
8616             #include <stdint.h>
8617 int
8618 main ()
8619 {
8620 uintmax_t i = (uintmax_t) -1; return !i;
8621   ;
8622   return 0;
8623 }
8624 _ACEOF
8625 if ac_fn_c_try_compile "$LINENO"; then :
8626   gl_cv_header_stdint_h=yes
8627 else
8628   gl_cv_header_stdint_h=no
8629 fi
8630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8631 fi
8632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
8633 $as_echo "$gl_cv_header_stdint_h" >&6; }
8634   if test $gl_cv_header_stdint_h = yes; then
8635
8636 cat >>confdefs.h <<_ACEOF
8637 #define HAVE_STDINT_H_WITH_UINTMAX 1
8638 _ACEOF
8639
8640   fi
8641
8642
8643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8644 $as_echo_n "checking for inttypes.h... " >&6; }
8645 if ${gl_cv_header_inttypes_h+:} false; then :
8646   $as_echo_n "(cached) " >&6
8647 else
8648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8649 /* end confdefs.h.  */
8650
8651 #include <sys/types.h>
8652 #include <inttypes.h>
8653
8654 int
8655 main ()
8656 {
8657 uintmax_t i = (uintmax_t) -1; return !i;
8658   ;
8659   return 0;
8660 }
8661 _ACEOF
8662 if ac_fn_c_try_compile "$LINENO"; then :
8663   gl_cv_header_inttypes_h=yes
8664 else
8665   gl_cv_header_inttypes_h=no
8666 fi
8667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8668 fi
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
8670 $as_echo "$gl_cv_header_inttypes_h" >&6; }
8671   if test $gl_cv_header_inttypes_h = yes; then
8672
8673 cat >>confdefs.h <<_ACEOF
8674 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
8675 _ACEOF
8676
8677   fi
8678
8679
8680
8681
8682
8683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
8684 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
8685 if ${gl_cv_func_printf_sizes_c99+:} false; then :
8686   $as_echo_n "(cached) " >&6
8687 else
8688
8689       if test "$cross_compiling" = yes; then :
8690
8691          case "$host_os" in
8692                                  # Guess yes on glibc systems.
8693            *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
8694                                  # Guess yes on FreeBSD >= 5.
8695            freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
8696            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8697                                  # Guess yes on MacOS X >= 10.3.
8698            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
8699            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
8700                                  # Guess yes on OpenBSD >= 3.9.
8701            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
8702                                  gl_cv_func_printf_sizes_c99="guessing no";;
8703            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
8704                                  # Guess yes on Solaris >= 2.10.
8705            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
8706            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
8707                                  # Guess yes on NetBSD >= 3.
8708            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8709                                  gl_cv_func_printf_sizes_c99="guessing no";;
8710            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
8711                                  # If we don't know, assume the worst.
8712            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
8713          esac
8714
8715 else
8716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8717 /* end confdefs.h.  */
8718
8719 #include <stddef.h>
8720 #include <stdio.h>
8721 #include <string.h>
8722 #include <sys/types.h>
8723 #if HAVE_STDINT_H_WITH_UINTMAX
8724 # include <stdint.h>
8725 #endif
8726 #if HAVE_INTTYPES_H_WITH_UINTMAX
8727 # include <inttypes.h>
8728 #endif
8729 static char buf[100];
8730 int main ()
8731 {
8732   int result = 0;
8733 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
8734   buf[0] = '\0';
8735   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
8736       || strcmp (buf, "12345671 33") != 0)
8737     result |= 1;
8738 #endif
8739   buf[0] = '\0';
8740   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
8741       || strcmp (buf, "12345672 33") != 0)
8742     result |= 2;
8743   buf[0] = '\0';
8744   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
8745       || strcmp (buf, "12345673 33") != 0)
8746     result |= 4;
8747   buf[0] = '\0';
8748   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
8749       || strcmp (buf, "1.5 33") != 0)
8750     result |= 8;
8751   return result;
8752 }
8753 _ACEOF
8754 if ac_fn_c_try_run "$LINENO"; then :
8755   gl_cv_func_printf_sizes_c99=yes
8756 else
8757   gl_cv_func_printf_sizes_c99=no
8758 fi
8759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8760   conftest.$ac_objext conftest.beam conftest.$ac_ext
8761 fi
8762
8763
8764 fi
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
8766 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
8767
8768
8769
8770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
8771 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
8772 if ${gl_cv_func_printf_long_double+:} false; then :
8773   $as_echo_n "(cached) " >&6
8774 else
8775
8776       if test "$cross_compiling" = yes; then :
8777
8778          case "$host_os" in
8779            beos*)        gl_cv_func_printf_long_double="guessing no";;
8780            mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
8781            *)            gl_cv_func_printf_long_double="guessing yes";;
8782          esac
8783
8784 else
8785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8786 /* end confdefs.h.  */
8787
8788 #include <stdio.h>
8789 #include <string.h>
8790 static char buf[10000];
8791 int main ()
8792 {
8793   int result = 0;
8794   buf[0] = '\0';
8795   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
8796       || strcmp (buf, "1.750000 33") != 0)
8797     result |= 1;
8798   buf[0] = '\0';
8799   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
8800       || strcmp (buf, "1.750000e+00 33") != 0)
8801     result |= 2;
8802   buf[0] = '\0';
8803   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
8804       || strcmp (buf, "1.75 33") != 0)
8805     result |= 4;
8806   return result;
8807 }
8808 _ACEOF
8809 if ac_fn_c_try_run "$LINENO"; then :
8810   gl_cv_func_printf_long_double=yes
8811 else
8812   gl_cv_func_printf_long_double=no
8813 fi
8814 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8815   conftest.$ac_objext conftest.beam conftest.$ac_ext
8816 fi
8817
8818
8819 fi
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
8821 $as_echo "$gl_cv_func_printf_long_double" >&6; }
8822
8823
8824
8825      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
8826 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
8827 if ${gl_cv_func_printf_infinite+:} false; then :
8828   $as_echo_n "(cached) " >&6
8829 else
8830
8831       if test "$cross_compiling" = yes; then :
8832
8833          case "$host_os" in
8834                                  # Guess yes on glibc systems.
8835            *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
8836                                  # Guess yes on FreeBSD >= 6.
8837            freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
8838            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
8839                                  # Guess yes on MacOS X >= 10.3.
8840            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
8841            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
8842                                  # Guess yes on HP-UX >= 11.
8843            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
8844            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
8845                                  # Guess yes on NetBSD >= 3.
8846            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8847                                  gl_cv_func_printf_infinite="guessing no";;
8848            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
8849                                  # Guess yes on BeOS.
8850            beos*)                gl_cv_func_printf_infinite="guessing yes";;
8851                                  # If we don't know, assume the worst.
8852            *)                    gl_cv_func_printf_infinite="guessing no";;
8853          esac
8854
8855 else
8856   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8857 /* end confdefs.h.  */
8858
8859 #include <stdio.h>
8860 #include <string.h>
8861 static int
8862 strisnan (const char *string, size_t start_index, size_t end_index)
8863 {
8864   if (start_index < end_index)
8865     {
8866       if (string[start_index] == '-')
8867         start_index++;
8868       if (start_index + 3 <= end_index
8869           && memcmp (string + start_index, "nan", 3) == 0)
8870         {
8871           start_index += 3;
8872           if (start_index == end_index
8873               || (string[start_index] == '(' && string[end_index - 1] == ')'))
8874             return 1;
8875         }
8876     }
8877   return 0;
8878 }
8879 static int
8880 have_minus_zero ()
8881 {
8882   static double plus_zero = 0.0;
8883   double minus_zero = - plus_zero;
8884   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
8885 }
8886 static char buf[10000];
8887 static double zero = 0.0;
8888 int main ()
8889 {
8890   int result = 0;
8891   if (sprintf (buf, "%f", 1.0 / zero) < 0
8892       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8893     result |= 1;
8894   if (sprintf (buf, "%f", -1.0 / zero) < 0
8895       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8896     result |= 1;
8897   if (sprintf (buf, "%f", zero / zero) < 0
8898       || !strisnan (buf, 0, strlen (buf)))
8899     result |= 2;
8900   if (sprintf (buf, "%e", 1.0 / zero) < 0
8901       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8902     result |= 4;
8903   if (sprintf (buf, "%e", -1.0 / zero) < 0
8904       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8905     result |= 4;
8906   if (sprintf (buf, "%e", zero / zero) < 0
8907       || !strisnan (buf, 0, strlen (buf)))
8908     result |= 8;
8909   if (sprintf (buf, "%g", 1.0 / zero) < 0
8910       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
8911     result |= 16;
8912   if (sprintf (buf, "%g", -1.0 / zero) < 0
8913       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
8914     result |= 16;
8915   if (sprintf (buf, "%g", zero / zero) < 0
8916       || !strisnan (buf, 0, strlen (buf)))
8917     result |= 32;
8918   /* This test fails on HP-UX 10.20.  */
8919   if (have_minus_zero ())
8920     if (sprintf (buf, "%g", - zero) < 0
8921         || strcmp (buf, "-0") != 0)
8922     result |= 64;
8923   return result;
8924 }
8925 _ACEOF
8926 if ac_fn_c_try_run "$LINENO"; then :
8927   gl_cv_func_printf_infinite=yes
8928 else
8929   gl_cv_func_printf_infinite=no
8930 fi
8931 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8932   conftest.$ac_objext conftest.beam conftest.$ac_ext
8933 fi
8934
8935
8936 fi
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
8938 $as_echo "$gl_cv_func_printf_infinite" >&6; }
8939
8940
8941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8942 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
8943 if ${ac_cv_c_bigendian+:} false; then :
8944   $as_echo_n "(cached) " >&6
8945 else
8946   ac_cv_c_bigendian=unknown
8947     # See if we're dealing with a universal compiler.
8948     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8949 /* end confdefs.h.  */
8950 #ifndef __APPLE_CC__
8951                not a universal capable compiler
8952              #endif
8953              typedef int dummy;
8954
8955 _ACEOF
8956 if ac_fn_c_try_compile "$LINENO"; then :
8957
8958         # Check for potential -arch flags.  It is not universal unless
8959         # there are at least two -arch flags with different values.
8960         ac_arch=
8961         ac_prev=
8962         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8963          if test -n "$ac_prev"; then
8964            case $ac_word in
8965              i?86 | x86_64 | ppc | ppc64)
8966                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8967                  ac_arch=$ac_word
8968                else
8969                  ac_cv_c_bigendian=universal
8970                  break
8971                fi
8972                ;;
8973            esac
8974            ac_prev=
8975          elif test "x$ac_word" = "x-arch"; then
8976            ac_prev=arch
8977          fi
8978        done
8979 fi
8980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8981     if test $ac_cv_c_bigendian = unknown; then
8982       # See if sys/param.h defines the BYTE_ORDER macro.
8983       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8984 /* end confdefs.h.  */
8985 #include <sys/types.h>
8986              #include <sys/param.h>
8987
8988 int
8989 main ()
8990 {
8991 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8992                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8993                      && LITTLE_ENDIAN)
8994               bogus endian macros
8995              #endif
8996
8997   ;
8998   return 0;
8999 }
9000 _ACEOF
9001 if ac_fn_c_try_compile "$LINENO"; then :
9002   # It does; now see whether it defined to BIG_ENDIAN or not.
9003          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9004 /* end confdefs.h.  */
9005 #include <sys/types.h>
9006                 #include <sys/param.h>
9007
9008 int
9009 main ()
9010 {
9011 #if BYTE_ORDER != BIG_ENDIAN
9012                  not big endian
9013                 #endif
9014
9015   ;
9016   return 0;
9017 }
9018 _ACEOF
9019 if ac_fn_c_try_compile "$LINENO"; then :
9020   ac_cv_c_bigendian=yes
9021 else
9022   ac_cv_c_bigendian=no
9023 fi
9024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9025 fi
9026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9027     fi
9028     if test $ac_cv_c_bigendian = unknown; then
9029       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9030       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9031 /* end confdefs.h.  */
9032 #include <limits.h>
9033
9034 int
9035 main ()
9036 {
9037 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9038               bogus endian macros
9039              #endif
9040
9041   ;
9042   return 0;
9043 }
9044 _ACEOF
9045 if ac_fn_c_try_compile "$LINENO"; then :
9046   # It does; now see whether it defined to _BIG_ENDIAN or not.
9047          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048 /* end confdefs.h.  */
9049 #include <limits.h>
9050
9051 int
9052 main ()
9053 {
9054 #ifndef _BIG_ENDIAN
9055                  not big endian
9056                 #endif
9057
9058   ;
9059   return 0;
9060 }
9061 _ACEOF
9062 if ac_fn_c_try_compile "$LINENO"; then :
9063   ac_cv_c_bigendian=yes
9064 else
9065   ac_cv_c_bigendian=no
9066 fi
9067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9068 fi
9069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9070     fi
9071     if test $ac_cv_c_bigendian = unknown; then
9072       # Compile a test program.
9073       if test "$cross_compiling" = yes; then :
9074   # Try to guess by grepping values from an object file.
9075          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9076 /* end confdefs.h.  */
9077 short int ascii_mm[] =
9078                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9079                 short int ascii_ii[] =
9080                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9081                 int use_ascii (int i) {
9082                   return ascii_mm[i] + ascii_ii[i];
9083                 }
9084                 short int ebcdic_ii[] =
9085                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9086                 short int ebcdic_mm[] =
9087                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9088                 int use_ebcdic (int i) {
9089                   return ebcdic_mm[i] + ebcdic_ii[i];
9090                 }
9091                 extern int foo;
9092
9093 int
9094 main ()
9095 {
9096 return use_ascii (foo) == use_ebcdic (foo);
9097   ;
9098   return 0;
9099 }
9100 _ACEOF
9101 if ac_fn_c_try_compile "$LINENO"; then :
9102   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9103               ac_cv_c_bigendian=yes
9104             fi
9105             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9106               if test "$ac_cv_c_bigendian" = unknown; then
9107                 ac_cv_c_bigendian=no
9108               else
9109                 # finding both strings is unlikely to happen, but who knows?
9110                 ac_cv_c_bigendian=unknown
9111               fi
9112             fi
9113 fi
9114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9115 else
9116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117 /* end confdefs.h.  */
9118 $ac_includes_default
9119 int
9120 main ()
9121 {
9122
9123              /* Are we little or big endian?  From Harbison&Steele.  */
9124              union
9125              {
9126                long int l;
9127                char c[sizeof (long int)];
9128              } u;
9129              u.l = 1;
9130              return u.c[sizeof (long int) - 1] == 1;
9131
9132   ;
9133   return 0;
9134 }
9135 _ACEOF
9136 if ac_fn_c_try_run "$LINENO"; then :
9137   ac_cv_c_bigendian=no
9138 else
9139   ac_cv_c_bigendian=yes
9140 fi
9141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9142   conftest.$ac_objext conftest.beam conftest.$ac_ext
9143 fi
9144
9145     fi
9146 fi
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9148 $as_echo "$ac_cv_c_bigendian" >&6; }
9149  case $ac_cv_c_bigendian in #(
9150    yes)
9151      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9152 ;; #(
9153    no)
9154       ;; #(
9155    universal)
9156
9157 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9158
9159      ;; #(
9160    *)
9161      as_fn_error $? "unknown endianness
9162  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9163  esac
9164
9165
9166
9167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9168 $as_echo_n "checking whether long double and double are the same... " >&6; }
9169 if ${gl_cv_long_double_equals_double+:} false; then :
9170   $as_echo_n "(cached) " >&6
9171 else
9172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9173 /* end confdefs.h.  */
9174 #include <float.h>
9175 int
9176 main ()
9177 {
9178 typedef int check[sizeof (long double) == sizeof (double)
9179                               && LDBL_MANT_DIG == DBL_MANT_DIG
9180                               && LDBL_MAX_EXP == DBL_MAX_EXP
9181                               && LDBL_MIN_EXP == DBL_MIN_EXP
9182                               ? 1 : -1];
9183
9184   ;
9185   return 0;
9186 }
9187 _ACEOF
9188 if ac_fn_c_try_compile "$LINENO"; then :
9189   gl_cv_long_double_equals_double=yes
9190 else
9191   gl_cv_long_double_equals_double=no
9192 fi
9193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9194
9195 fi
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9197 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9198   if test $gl_cv_long_double_equals_double = yes; then
9199
9200 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9201
9202     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9203   else
9204     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9205   fi
9206
9207
9208
9209
9210
9211
9212
9213          if test -n "$gl_printf_safe"; then
9214
9215 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9216
9217   fi
9218   case "$gl_cv_func_printf_long_double" in
9219     *yes)
9220       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9221 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
9222 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
9223   $as_echo_n "(cached) " >&6
9224 else
9225
9226           if test "$cross_compiling" = yes; then :
9227
9228              case "$host_cpu" in
9229                                      # Guess no on ia64, x86_64, i386.
9230                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9231                *)
9232                  case "$host_os" in
9233                                          # Guess yes on glibc systems.
9234                    *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
9235                                          # Guess yes on FreeBSD >= 6.
9236                    freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
9237                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9238                                          # Guess yes on HP-UX >= 11.
9239                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9240                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
9241                                          # If we don't know, assume the worst.
9242                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
9243                  esac
9244                  ;;
9245              esac
9246
9247 else
9248   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9249 /* end confdefs.h.  */
9250
9251
9252 #include <stdlib.h>
9253 #if defined __MACH__ && defined __APPLE__
9254 /* Avoid a crash on MacOS X.  */
9255 #include <mach/mach.h>
9256 #include <mach/mach_error.h>
9257 #include <mach/thread_status.h>
9258 #include <mach/exception.h>
9259 #include <mach/task.h>
9260 #include <pthread.h>
9261 /* The exception port on which our thread listens.  */
9262 static mach_port_t our_exception_port;
9263 /* The main function of the thread listening for exceptions of type
9264    EXC_BAD_ACCESS.  */
9265 static void *
9266 mach_exception_thread (void *arg)
9267 {
9268   /* Buffer for a message to be received.  */
9269   struct {
9270     mach_msg_header_t head;
9271     mach_msg_body_t msgh_body;
9272     char data[1024];
9273   } msg;
9274   mach_msg_return_t retval;
9275   /* Wait for a message on the exception port.  */
9276   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9277                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9278   if (retval != MACH_MSG_SUCCESS)
9279     abort ();
9280   exit (1);
9281 }
9282 static void
9283 nocrash_init (void)
9284 {
9285   mach_port_t self = mach_task_self ();
9286   /* Allocate a port on which the thread shall listen for exceptions.  */
9287   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9288       == KERN_SUCCESS) {
9289     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9290     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9291                                 MACH_MSG_TYPE_MAKE_SEND)
9292         == KERN_SUCCESS) {
9293       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9294          for us.  */
9295       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9296       /* Create the thread listening on the exception port.  */
9297       pthread_attr_t attr;
9298       pthread_t thread;
9299       if (pthread_attr_init (&attr) == 0
9300           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9301           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9302         pthread_attr_destroy (&attr);
9303         /* Replace the exception port info for these exceptions with our own.
9304            Note that we replace the exception port for the entire task, not only
9305            for a particular thread.  This has the effect that when our exception
9306            port gets the message, the thread specific exception port has already
9307            been asked, and we don't need to bother about it.
9308            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9309         task_set_exception_ports (self, mask, our_exception_port,
9310                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9311       }
9312     }
9313   }
9314 }
9315 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9316 /* Avoid a crash on native Windows.  */
9317 #define WIN32_LEAN_AND_MEAN
9318 #include <windows.h>
9319 #include <winerror.h>
9320 static LONG WINAPI
9321 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9322 {
9323   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9324     {
9325     case EXCEPTION_ACCESS_VIOLATION:
9326     case EXCEPTION_IN_PAGE_ERROR:
9327     case EXCEPTION_STACK_OVERFLOW:
9328     case EXCEPTION_GUARD_PAGE:
9329     case EXCEPTION_PRIV_INSTRUCTION:
9330     case EXCEPTION_ILLEGAL_INSTRUCTION:
9331     case EXCEPTION_DATATYPE_MISALIGNMENT:
9332     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9333     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9334       exit (1);
9335     }
9336   return EXCEPTION_CONTINUE_SEARCH;
9337 }
9338 static void
9339 nocrash_init (void)
9340 {
9341   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9342 }
9343 #else
9344 /* Avoid a crash on POSIX systems.  */
9345 #include <signal.h>
9346 /* A POSIX signal handler.  */
9347 static void
9348 exception_handler (int sig)
9349 {
9350   exit (1);
9351 }
9352 static void
9353 nocrash_init (void)
9354 {
9355 #ifdef SIGSEGV
9356   signal (SIGSEGV, exception_handler);
9357 #endif
9358 #ifdef SIGBUS
9359   signal (SIGBUS, exception_handler);
9360 #endif
9361 }
9362 #endif
9363
9364 #include <float.h>
9365 #include <stdio.h>
9366 #include <string.h>
9367 static int
9368 strisnan (const char *string, size_t start_index, size_t end_index)
9369 {
9370   if (start_index < end_index)
9371     {
9372       if (string[start_index] == '-')
9373         start_index++;
9374       if (start_index + 3 <= end_index
9375           && memcmp (string + start_index, "nan", 3) == 0)
9376         {
9377           start_index += 3;
9378           if (start_index == end_index
9379               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9380             return 1;
9381         }
9382     }
9383   return 0;
9384 }
9385 static char buf[10000];
9386 static long double zeroL = 0.0L;
9387 int main ()
9388 {
9389   int result = 0;
9390   nocrash_init();
9391   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9392       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9393     result |= 1;
9394   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9395       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9396     result |= 1;
9397   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9398       || !strisnan (buf, 0, strlen (buf)))
9399     result |= 1;
9400   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9401       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9402     result |= 1;
9403   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9404       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9405     result |= 1;
9406   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9407       || !strisnan (buf, 0, strlen (buf)))
9408     result |= 1;
9409   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9410       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9411     result |= 1;
9412   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9413       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9414     result |= 1;
9415   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9416       || !strisnan (buf, 0, strlen (buf)))
9417     result |= 1;
9418 #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_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
9419 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9420    of 'unsigned int' words.  */
9421 # ifdef WORDS_BIGENDIAN
9422 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9423      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9424        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
9425        (unsigned int) (mantlo) << 16                                        \
9426      }
9427 # else
9428 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9429      { mantlo, manthi, exponent }
9430 # endif
9431   { /* Quiet NaN.  */
9432     static union { unsigned int word[4]; long double value; } x =
9433       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9434     if (sprintf (buf, "%Lf", x.value) < 0
9435         || !strisnan (buf, 0, strlen (buf)))
9436       result |= 2;
9437     if (sprintf (buf, "%Le", x.value) < 0
9438         || !strisnan (buf, 0, strlen (buf)))
9439       result |= 2;
9440     if (sprintf (buf, "%Lg", x.value) < 0
9441         || !strisnan (buf, 0, strlen (buf)))
9442       result |= 2;
9443   }
9444   {
9445     /* Signalling NaN.  */
9446     static union { unsigned int word[4]; long double value; } x =
9447       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9448     if (sprintf (buf, "%Lf", x.value) < 0
9449         || !strisnan (buf, 0, strlen (buf)))
9450       result |= 2;
9451     if (sprintf (buf, "%Le", x.value) < 0
9452         || !strisnan (buf, 0, strlen (buf)))
9453       result |= 2;
9454     if (sprintf (buf, "%Lg", x.value) < 0
9455         || !strisnan (buf, 0, strlen (buf)))
9456       result |= 2;
9457   }
9458   { /* Pseudo-NaN.  */
9459     static union { unsigned int word[4]; long double value; } x =
9460       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9461     if (sprintf (buf, "%Lf", x.value) < 0
9462         || !strisnan (buf, 0, strlen (buf)))
9463       result |= 4;
9464     if (sprintf (buf, "%Le", x.value) < 0
9465         || !strisnan (buf, 0, strlen (buf)))
9466       result |= 4;
9467     if (sprintf (buf, "%Lg", x.value) < 0
9468         || !strisnan (buf, 0, strlen (buf)))
9469       result |= 4;
9470   }
9471   { /* Pseudo-Infinity.  */
9472     static union { unsigned int word[4]; long double value; } x =
9473       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9474     if (sprintf (buf, "%Lf", x.value) < 0
9475         || !strisnan (buf, 0, strlen (buf)))
9476       result |= 8;
9477     if (sprintf (buf, "%Le", x.value) < 0
9478         || !strisnan (buf, 0, strlen (buf)))
9479       result |= 8;
9480     if (sprintf (buf, "%Lg", x.value) < 0
9481         || !strisnan (buf, 0, strlen (buf)))
9482       result |= 8;
9483   }
9484   { /* Pseudo-Zero.  */
9485     static union { unsigned int word[4]; long double value; } x =
9486       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
9487     if (sprintf (buf, "%Lf", x.value) < 0
9488         || !strisnan (buf, 0, strlen (buf)))
9489       result |= 16;
9490     if (sprintf (buf, "%Le", x.value) < 0
9491         || !strisnan (buf, 0, strlen (buf)))
9492       result |= 16;
9493     if (sprintf (buf, "%Lg", x.value) < 0
9494         || !strisnan (buf, 0, strlen (buf)))
9495       result |= 16;
9496   }
9497   { /* Unnormalized number.  */
9498     static union { unsigned int word[4]; long double value; } x =
9499       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
9500     if (sprintf (buf, "%Lf", x.value) < 0
9501         || !strisnan (buf, 0, strlen (buf)))
9502       result |= 32;
9503     if (sprintf (buf, "%Le", x.value) < 0
9504         || !strisnan (buf, 0, strlen (buf)))
9505       result |= 32;
9506     if (sprintf (buf, "%Lg", x.value) < 0
9507         || !strisnan (buf, 0, strlen (buf)))
9508       result |= 32;
9509   }
9510   { /* Pseudo-Denormal.  */
9511     static union { unsigned int word[4]; long double value; } x =
9512       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
9513     if (sprintf (buf, "%Lf", x.value) < 0
9514         || !strisnan (buf, 0, strlen (buf)))
9515       result |= 64;
9516     if (sprintf (buf, "%Le", x.value) < 0
9517         || !strisnan (buf, 0, strlen (buf)))
9518       result |= 64;
9519     if (sprintf (buf, "%Lg", x.value) < 0
9520         || !strisnan (buf, 0, strlen (buf)))
9521       result |= 64;
9522   }
9523 #endif
9524   return result;
9525 }
9526 _ACEOF
9527 if ac_fn_c_try_run "$LINENO"; then :
9528   gl_cv_func_printf_infinite_long_double=yes
9529 else
9530   gl_cv_func_printf_infinite_long_double=no
9531 fi
9532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9533   conftest.$ac_objext conftest.beam conftest.$ac_ext
9534 fi
9535
9536
9537 fi
9538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
9539 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
9540       ;;
9541     *)
9542       gl_cv_func_printf_infinite_long_double="irrelevant"
9543       ;;
9544   esac
9545
9546
9547
9548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
9549 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
9550 if ${gl_cv_func_printf_directive_a+:} false; then :
9551   $as_echo_n "(cached) " >&6
9552 else
9553
9554       if test "$cross_compiling" = yes; then :
9555
9556          case "$host_os" in
9557                                  # Guess yes on glibc >= 2.5 systems.
9558            *-gnu*)
9559              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9560 /* end confdefs.h.  */
9561
9562                #include <features.h>
9563                #ifdef __GNU_LIBRARY__
9564                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
9565                  BZ2908
9566                 #endif
9567                #endif
9568
9569 _ACEOF
9570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9571   $EGREP "BZ2908" >/dev/null 2>&1; then :
9572   gl_cv_func_printf_directive_a="guessing yes"
9573 else
9574   gl_cv_func_printf_directive_a="guessing no"
9575 fi
9576 rm -f conftest*
9577
9578              ;;
9579                                  # If we don't know, assume the worst.
9580            *)                    gl_cv_func_printf_directive_a="guessing no";;
9581          esac
9582
9583 else
9584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9585 /* end confdefs.h.  */
9586
9587 #include <stdio.h>
9588 #include <string.h>
9589 static char buf[100];
9590 static double zero = 0.0;
9591 int main ()
9592 {
9593   int result = 0;
9594   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
9595       || (strcmp (buf, "0x1.922p+1 33") != 0
9596           && strcmp (buf, "0x3.244p+0 33") != 0
9597           && strcmp (buf, "0x6.488p-1 33") != 0
9598           && strcmp (buf, "0xc.91p-2 33") != 0))
9599     result |= 1;
9600   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
9601       || (strcmp (buf, "-0X1.922P+1 33") != 0
9602           && strcmp (buf, "-0X3.244P+0 33") != 0
9603           && strcmp (buf, "-0X6.488P-1 33") != 0
9604           && strcmp (buf, "-0XC.91P-2 33") != 0))
9605     result |= 2;
9606   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
9607   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
9608       || (strcmp (buf, "0x1.83p+0 33") != 0
9609           && strcmp (buf, "0x3.05p-1 33") != 0
9610           && strcmp (buf, "0x6.0ap-2 33") != 0
9611           && strcmp (buf, "0xc.14p-3 33") != 0))
9612     result |= 4;
9613   /* This catches a FreeBSD 6.1 bug.  See
9614      <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
9615   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
9616       || buf[0] == '0')
9617     result |= 8;
9618   /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
9619   if (sprintf (buf, "%.1a", 1.999) < 0
9620       || (strcmp (buf, "0x1.0p+1") != 0
9621           && strcmp (buf, "0x2.0p+0") != 0
9622           && strcmp (buf, "0x4.0p-1") != 0
9623           && strcmp (buf, "0x8.0p-2") != 0))
9624     result |= 16;
9625   /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
9626      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
9627   if (sprintf (buf, "%.1La", 1.999L) < 0
9628       || (strcmp (buf, "0x1.0p+1") != 0
9629           && strcmp (buf, "0x2.0p+0") != 0
9630           && strcmp (buf, "0x4.0p-1") != 0
9631           && strcmp (buf, "0x8.0p-2") != 0))
9632     result |= 32;
9633   return result;
9634 }
9635 _ACEOF
9636 if ac_fn_c_try_run "$LINENO"; then :
9637   gl_cv_func_printf_directive_a=yes
9638 else
9639   gl_cv_func_printf_directive_a=no
9640 fi
9641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9642   conftest.$ac_objext conftest.beam conftest.$ac_ext
9643 fi
9644
9645
9646 fi
9647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
9648 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
9649
9650
9651
9652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
9653 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
9654 if ${gl_cv_func_printf_directive_f+:} false; then :
9655   $as_echo_n "(cached) " >&6
9656 else
9657
9658       if test "$cross_compiling" = yes; then :
9659
9660          case "$host_os" in
9661                                  # Guess yes on glibc systems.
9662            *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
9663                                  # Guess yes on FreeBSD >= 6.
9664            freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
9665            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
9666                                  # Guess yes on MacOS X >= 10.3.
9667            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
9668            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
9669                                  # Guess yes on Solaris >= 2.10.
9670            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9671            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
9672                                  # If we don't know, assume the worst.
9673            *)                    gl_cv_func_printf_directive_f="guessing no";;
9674          esac
9675
9676 else
9677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h.  */
9679
9680 #include <stdio.h>
9681 #include <string.h>
9682 static char buf[100];
9683 static double zero = 0.0;
9684 int main ()
9685 {
9686   int result = 0;
9687   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
9688       || strcmp (buf, "1234567.000000 33") != 0)
9689     result |= 1;
9690   if (sprintf (buf, "%F", 1.0 / zero) < 0
9691       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
9692     result |= 2;
9693   /* This catches a Cygwin 1.5.x bug.  */
9694   if (sprintf (buf, "%.F", 1234.0) < 0
9695       || strcmp (buf, "1234") != 0)
9696     result |= 4;
9697   return result;
9698 }
9699 _ACEOF
9700 if ac_fn_c_try_run "$LINENO"; then :
9701   gl_cv_func_printf_directive_f=yes
9702 else
9703   gl_cv_func_printf_directive_f=no
9704 fi
9705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9706   conftest.$ac_objext conftest.beam conftest.$ac_ext
9707 fi
9708
9709
9710 fi
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
9712 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
9713
9714
9715
9716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
9717 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
9718 if ${gl_cv_func_printf_directive_n+:} false; then :
9719   $as_echo_n "(cached) " >&6
9720 else
9721
9722       if test "$cross_compiling" = yes; then :
9723
9724          case "$host_os" in
9725            mingw*) gl_cv_func_printf_directive_n="guessing no";;
9726            *)      gl_cv_func_printf_directive_n="guessing yes";;
9727          esac
9728
9729 else
9730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9731 /* end confdefs.h.  */
9732
9733 #include <stdio.h>
9734 #include <stdlib.h>
9735 #include <string.h>
9736 #ifdef _MSC_VER
9737 /* See page about "Parameter Validation" on msdn.microsoft.com.  */
9738 static void cdecl
9739 invalid_parameter_handler (const wchar_t *expression,
9740                            const wchar_t *function,
9741                            const wchar_t *file, unsigned int line,
9742                            uintptr_t dummy)
9743 {
9744   exit (1);
9745 }
9746 #endif
9747 static char fmtstring[10];
9748 static char buf[100];
9749 int main ()
9750 {
9751   int count = -1;
9752 #ifdef _MSC_VER
9753   _set_invalid_parameter_handler (invalid_parameter_handler);
9754 #endif
9755   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
9756      support %n in format strings in read-only memory but not in writable
9757      memory.  */
9758   strcpy (fmtstring, "%d %n");
9759   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
9760       || strcmp (buf, "123 ") != 0
9761       || count != 4)
9762     return 1;
9763   return 0;
9764 }
9765 _ACEOF
9766 if ac_fn_c_try_run "$LINENO"; then :
9767   gl_cv_func_printf_directive_n=yes
9768 else
9769   gl_cv_func_printf_directive_n=no
9770 fi
9771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9772   conftest.$ac_objext conftest.beam conftest.$ac_ext
9773 fi
9774
9775
9776 fi
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
9778 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
9779
9780
9781
9782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
9783 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
9784 if ${gl_cv_func_printf_directive_ls+:} false; then :
9785   $as_echo_n "(cached) " >&6
9786 else
9787
9788       if test "$cross_compiling" = yes; then :
9789
9790          case "$host_os" in
9791            openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
9792            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
9793            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
9794            cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
9795            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
9796            *)               gl_cv_func_printf_directive_ls="guessing yes";;
9797          esac
9798
9799 else
9800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9801 /* end confdefs.h.  */
9802
9803 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9804    <wchar.h>.
9805    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9806    included before <wchar.h>.  */
9807 #include <stddef.h>
9808 #include <stdio.h>
9809 #include <time.h>
9810 #include <wchar.h>
9811 #include <string.h>
9812 int main ()
9813 {
9814   int result = 0;
9815   char buf[100];
9816   /* Test whether %ls works at all.
9817      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
9818      Cygwin 1.5.  */
9819   {
9820     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
9821     buf[0] = '\0';
9822     if (sprintf (buf, "%ls", wstring) < 0
9823         || strcmp (buf, "abc") != 0)
9824       result |= 1;
9825   }
9826   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
9827      assertion failure inside libc), but not on OpenBSD 4.0.  */
9828   {
9829     static const wchar_t wstring[] = { 'a', 0 };
9830     buf[0] = '\0';
9831     if (sprintf (buf, "%ls", wstring) < 0
9832         || strcmp (buf, "a") != 0)
9833       result |= 2;
9834   }
9835   /* Test whether precisions in %ls are supported as specified in ISO C 99
9836      section 7.19.6.1:
9837        "If a precision is specified, no more than that many bytes are written
9838         (including shift sequences, if any), and the array shall contain a
9839         null wide character if, to equal the multibyte character sequence
9840         length given by the precision, the function would need to access a
9841         wide character one past the end of the array."
9842      This test fails on Solaris 10.  */
9843   {
9844     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
9845     buf[0] = '\0';
9846     if (sprintf (buf, "%.2ls", wstring) < 0
9847         || strcmp (buf, "ab") != 0)
9848       result |= 8;
9849   }
9850   return result;
9851 }
9852 _ACEOF
9853 if ac_fn_c_try_run "$LINENO"; then :
9854   gl_cv_func_printf_directive_ls=yes
9855 else
9856   gl_cv_func_printf_directive_ls=no
9857 fi
9858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9859   conftest.$ac_objext conftest.beam conftest.$ac_ext
9860 fi
9861
9862
9863 fi
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
9865 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
9866
9867
9868
9869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
9870 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
9871 if ${gl_cv_func_printf_positions+:} false; then :
9872   $as_echo_n "(cached) " >&6
9873 else
9874
9875       if test "$cross_compiling" = yes; then :
9876
9877          case "$host_os" in
9878            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
9879                          gl_cv_func_printf_positions="guessing no";;
9880            beos*)        gl_cv_func_printf_positions="guessing no";;
9881            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
9882            *)            gl_cv_func_printf_positions="guessing yes";;
9883          esac
9884
9885 else
9886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9887 /* end confdefs.h.  */
9888
9889 #include <stdio.h>
9890 #include <string.h>
9891 /* The string "%2$d %1$d", with dollar characters protected from the shell's
9892    dollar expansion (possibly an autoconf bug).  */
9893 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
9894 static char buf[100];
9895 int main ()
9896 {
9897   sprintf (buf, format, 33, 55);
9898   return (strcmp (buf, "55 33") != 0);
9899 }
9900 _ACEOF
9901 if ac_fn_c_try_run "$LINENO"; then :
9902   gl_cv_func_printf_positions=yes
9903 else
9904   gl_cv_func_printf_positions=no
9905 fi
9906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9907   conftest.$ac_objext conftest.beam conftest.$ac_ext
9908 fi
9909
9910
9911 fi
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
9913 $as_echo "$gl_cv_func_printf_positions" >&6; }
9914
9915
9916
9917      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
9918 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
9919 if ${gl_cv_func_printf_flag_grouping+:} false; then :
9920   $as_echo_n "(cached) " >&6
9921 else
9922
9923       if test "$cross_compiling" = yes; then :
9924
9925          case "$host_os" in
9926            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
9927            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
9928            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
9929            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
9930          esac
9931
9932 else
9933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9934 /* end confdefs.h.  */
9935
9936 #include <stdio.h>
9937 #include <string.h>
9938 static char buf[100];
9939 int main ()
9940 {
9941   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
9942       || buf[strlen (buf) - 1] != '9')
9943     return 1;
9944   return 0;
9945 }
9946 _ACEOF
9947 if ac_fn_c_try_run "$LINENO"; then :
9948   gl_cv_func_printf_flag_grouping=yes
9949 else
9950   gl_cv_func_printf_flag_grouping=no
9951 fi
9952 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9953   conftest.$ac_objext conftest.beam conftest.$ac_ext
9954 fi
9955
9956
9957 fi
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
9959 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
9960
9961
9962
9963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
9964 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
9965 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
9966   $as_echo_n "(cached) " >&6
9967 else
9968
9969       if test "$cross_compiling" = yes; then :
9970
9971          case "$host_os" in
9972                     # Guess yes on HP-UX 11.
9973            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
9974                     # Guess no on HP-UX 10 and older.
9975            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
9976                     # Guess yes otherwise.
9977            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
9978          esac
9979
9980 else
9981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9982 /* end confdefs.h.  */
9983
9984 #include <stdio.h>
9985 #include <string.h>
9986 static char buf[100];
9987 int main ()
9988 {
9989   /* Check that a '-' flag is not annihilated by a negative width.  */
9990   if (sprintf (buf, "a%-*sc", -3, "b") < 0
9991       || strcmp (buf, "ab  c") != 0)
9992     return 1;
9993   return 0;
9994 }
9995 _ACEOF
9996 if ac_fn_c_try_run "$LINENO"; then :
9997   gl_cv_func_printf_flag_leftadjust=yes
9998 else
9999   gl_cv_func_printf_flag_leftadjust=no
10000 fi
10001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10002   conftest.$ac_objext conftest.beam conftest.$ac_ext
10003 fi
10004
10005
10006 fi
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10008 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
10009
10010
10011
10012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10013 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
10014 if ${gl_cv_func_printf_flag_zero+:} false; then :
10015   $as_echo_n "(cached) " >&6
10016 else
10017
10018       if test "$cross_compiling" = yes; then :
10019
10020          case "$host_os" in
10021                    # Guess yes on glibc systems.
10022            *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10023                    # Guess yes on BeOS.
10024            beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
10025                    # If we don't know, assume the worst.
10026            *)      gl_cv_func_printf_flag_zero="guessing no";;
10027          esac
10028
10029 else
10030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10031 /* end confdefs.h.  */
10032
10033 #include <stdio.h>
10034 #include <string.h>
10035 static char buf[100];
10036 static double zero = 0.0;
10037 int main ()
10038 {
10039   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10040       || (strcmp (buf, "       inf") != 0
10041           && strcmp (buf, "  infinity") != 0))
10042     return 1;
10043   return 0;
10044 }
10045 _ACEOF
10046 if ac_fn_c_try_run "$LINENO"; then :
10047   gl_cv_func_printf_flag_zero=yes
10048 else
10049   gl_cv_func_printf_flag_zero=no
10050 fi
10051 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10052   conftest.$ac_objext conftest.beam conftest.$ac_ext
10053 fi
10054
10055
10056 fi
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10058 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
10059
10060
10061
10062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10063 $as_echo_n "checking whether printf supports large precisions... " >&6; }
10064 if ${gl_cv_func_printf_precision+:} false; then :
10065   $as_echo_n "(cached) " >&6
10066 else
10067
10068       if test "$cross_compiling" = yes; then :
10069
10070          case "$host_os" in
10071            # Guess no only on Solaris, native Windows, and BeOS systems.
10072            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
10073            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10074            beos*)        gl_cv_func_printf_precision="guessing no" ;;
10075            *)            gl_cv_func_printf_precision="guessing yes" ;;
10076          esac
10077
10078 else
10079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080 /* end confdefs.h.  */
10081
10082 #include <stdio.h>
10083 #include <string.h>
10084 static char buf[5000];
10085 int main ()
10086 {
10087   int result = 0;
10088 #ifdef __BEOS__
10089   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
10090   return 1;
10091 #endif
10092   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10093     result |= 1;
10094   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10095     result |= 2;
10096   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10097       || buf[0] != '1')
10098     result |= 4;
10099   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10100       || buf[0] != '1')
10101     result |= 4;
10102   return result;
10103 }
10104 _ACEOF
10105 if ac_fn_c_try_run "$LINENO"; then :
10106   gl_cv_func_printf_precision=yes
10107 else
10108   gl_cv_func_printf_precision=no
10109 fi
10110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10111   conftest.$ac_objext conftest.beam conftest.$ac_ext
10112 fi
10113
10114
10115 fi
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10117 $as_echo "$gl_cv_func_printf_precision" >&6; }
10118
10119
10120     gl_cv_c_multiarch=no
10121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10122 /* end confdefs.h.  */
10123 #ifndef __APPLE_CC__
10124          not a universal capable compiler
10125         #endif
10126         typedef int dummy;
10127
10128 _ACEOF
10129 if ac_fn_c_try_compile "$LINENO"; then :
10130
10131                arch=
10132      prev=
10133      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10134        if test -n "$prev"; then
10135          case $word in
10136            i?86 | x86_64 | ppc | ppc64)
10137              if test -z "$arch" || test "$arch" = "$word"; then
10138                arch="$word"
10139              else
10140                gl_cv_c_multiarch=yes
10141              fi
10142              ;;
10143          esac
10144          prev=
10145        else
10146          if test "x$word" = "x-arch"; then
10147            prev=arch
10148          fi
10149        fi
10150      done
10151
10152 fi
10153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10154   if test $gl_cv_c_multiarch = yes; then
10155     APPLE_UNIVERSAL_BUILD=1
10156   else
10157     APPLE_UNIVERSAL_BUILD=0
10158   fi
10159
10160
10161
10162
10163
10164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10165 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
10166 if ${gl_cv_func_printf_enomem+:} false; then :
10167   $as_echo_n "(cached) " >&6
10168 else
10169
10170       gl_cv_func_printf_enomem="guessing no"
10171       if test "$cross_compiling" = no; then
10172         if test $APPLE_UNIVERSAL_BUILD = 0; then
10173           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10174 /* end confdefs.h.  */
10175
10176
10177 #include <stdlib.h>
10178 #if defined __MACH__ && defined __APPLE__
10179 /* Avoid a crash on MacOS X.  */
10180 #include <mach/mach.h>
10181 #include <mach/mach_error.h>
10182 #include <mach/thread_status.h>
10183 #include <mach/exception.h>
10184 #include <mach/task.h>
10185 #include <pthread.h>
10186 /* The exception port on which our thread listens.  */
10187 static mach_port_t our_exception_port;
10188 /* The main function of the thread listening for exceptions of type
10189    EXC_BAD_ACCESS.  */
10190 static void *
10191 mach_exception_thread (void *arg)
10192 {
10193   /* Buffer for a message to be received.  */
10194   struct {
10195     mach_msg_header_t head;
10196     mach_msg_body_t msgh_body;
10197     char data1024;
10198   } msg;
10199   mach_msg_return_t retval;
10200   /* Wait for a message on the exception port.  */
10201   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10202                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10203   if (retval != MACH_MSG_SUCCESS)
10204     abort ();
10205   exit (1);
10206 }
10207 static void
10208 nocrash_init (void)
10209 {
10210   mach_port_t self = mach_task_self ();
10211   /* Allocate a port on which the thread shall listen for exceptions.  */
10212   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10213       == KERN_SUCCESS) {
10214     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10215     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10216                                 MACH_MSG_TYPE_MAKE_SEND)
10217         == KERN_SUCCESS) {
10218       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10219          for us.  */
10220       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10221       /* Create the thread listening on the exception port.  */
10222       pthread_attr_t attr;
10223       pthread_t thread;
10224       if (pthread_attr_init (&attr) == 0
10225           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10226           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10227         pthread_attr_destroy (&attr);
10228         /* Replace the exception port info for these exceptions with our own.
10229            Note that we replace the exception port for the entire task, not only
10230            for a particular thread.  This has the effect that when our exception
10231            port gets the message, the thread specific exception port has already
10232            been asked, and we don't need to bother about it.
10233            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10234         task_set_exception_ports (self, mask, our_exception_port,
10235                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10236       }
10237     }
10238   }
10239 }
10240 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10241 /* Avoid a crash on native Windows.  */
10242 #define WIN32_LEAN_AND_MEAN
10243 #include <windows.h>
10244 #include <winerror.h>
10245 static LONG WINAPI
10246 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10247 {
10248   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10249     {
10250     case EXCEPTION_ACCESS_VIOLATION:
10251     case EXCEPTION_IN_PAGE_ERROR:
10252     case EXCEPTION_STACK_OVERFLOW:
10253     case EXCEPTION_GUARD_PAGE:
10254     case EXCEPTION_PRIV_INSTRUCTION:
10255     case EXCEPTION_ILLEGAL_INSTRUCTION:
10256     case EXCEPTION_DATATYPE_MISALIGNMENT:
10257     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10258     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10259       exit (1);
10260     }
10261   return EXCEPTION_CONTINUE_SEARCH;
10262 }
10263 static void
10264 nocrash_init (void)
10265 {
10266   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10267 }
10268 #else
10269 /* Avoid a crash on POSIX systems.  */
10270 #include <signal.h>
10271 /* A POSIX signal handler.  */
10272 static void
10273 exception_handler (int sig)
10274 {
10275   exit (1);
10276 }
10277 static void
10278 nocrash_init (void)
10279 {
10280 #ifdef SIGSEGV
10281   signal (SIGSEGV, exception_handler);
10282 #endif
10283 #ifdef SIGBUS
10284   signal (SIGBUS, exception_handler);
10285 #endif
10286 }
10287 #endif
10288
10289 #include <stdio.h>
10290 #include <sys/types.h>
10291 #include <sys/time.h>
10292 #include <sys/resource.h>
10293 #include <errno.h>
10294 int main()
10295 {
10296   struct rlimit limit;
10297   int ret;
10298   nocrash_init ();
10299   /* Some printf implementations allocate temporary space with malloc.  */
10300   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
10301 #ifdef RLIMIT_DATA
10302   if (getrlimit (RLIMIT_DATA, &limit) < 0)
10303     return 77;
10304   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10305     limit.rlim_max = 5000000;
10306   limit.rlim_cur = limit.rlim_max;
10307   if (setrlimit (RLIMIT_DATA, &limit) < 0)
10308     return 77;
10309 #endif
10310   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
10311 #ifdef RLIMIT_AS
10312   if (getrlimit (RLIMIT_AS, &limit) < 0)
10313     return 77;
10314   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10315     limit.rlim_max = 5000000;
10316   limit.rlim_cur = limit.rlim_max;
10317   if (setrlimit (RLIMIT_AS, &limit) < 0)
10318     return 77;
10319 #endif
10320   /* Some printf implementations allocate temporary space on the stack.  */
10321 #ifdef RLIMIT_STACK
10322   if (getrlimit (RLIMIT_STACK, &limit) < 0)
10323     return 77;
10324   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10325     limit.rlim_max = 5000000;
10326   limit.rlim_cur = limit.rlim_max;
10327   if (setrlimit (RLIMIT_STACK, &limit) < 0)
10328     return 77;
10329 #endif
10330   ret = printf ("%.5000000f", 1.0);
10331   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10332 }
10333
10334 _ACEOF
10335           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10336   (eval $ac_link) 2>&5
10337   ac_status=$?
10338   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10339   test $ac_status = 0; } && test -s conftest$ac_exeext; then
10340             (./conftest
10341              result=$?
10342              if test $result != 0 && test $result != 77; then result=1; fi
10343              exit $result
10344             ) >/dev/null 2>/dev/null
10345             case $? in
10346               0) gl_cv_func_printf_enomem="yes" ;;
10347               77) gl_cv_func_printf_enomem="guessing no" ;;
10348               *) gl_cv_func_printf_enomem="no" ;;
10349             esac
10350           else
10351             gl_cv_func_printf_enomem="guessing no"
10352           fi
10353           rm -fr conftest*
10354         else
10355                                         gl_cv_func_printf_enomem="guessing no"
10356         fi
10357       fi
10358       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10359         case "$host_os" in
10360                     # Guess yes on glibc systems.
10361           *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
10362                     # Guess yes on Solaris.
10363           solaris*) gl_cv_func_printf_enomem="guessing yes";;
10364                     # Guess yes on AIX.
10365           aix*)     gl_cv_func_printf_enomem="guessing yes";;
10366                     # Guess yes on HP-UX/hppa.
10367           hpux*)    case "$host_cpu" in
10368                       hppa*) gl_cv_func_printf_enomem="guessing yes";;
10369                       *)     gl_cv_func_printf_enomem="guessing no";;
10370                     esac
10371                     ;;
10372                     # Guess yes on IRIX.
10373           irix*)    gl_cv_func_printf_enomem="guessing yes";;
10374                     # Guess yes on OSF/1.
10375           osf*)     gl_cv_func_printf_enomem="guessing yes";;
10376                     # Guess yes on BeOS.
10377           beos*)    gl_cv_func_printf_enomem="guessing yes";;
10378                     # Guess yes on Haiku.
10379           haiku*)   gl_cv_func_printf_enomem="guessing yes";;
10380                     # If we don't know, assume the worst.
10381           *)        gl_cv_func_printf_enomem="guessing no";;
10382         esac
10383       fi
10384
10385 fi
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10387 $as_echo "$gl_cv_func_printf_enomem" >&6; }
10388
10389
10390
10391   case "$gl_cv_func_printf_long_double" in
10392     *yes)
10393       ;;
10394     *)
10395
10396 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10397
10398       ;;
10399   esac
10400
10401
10402
10403
10404   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10405 $as_echo_n "checking for unsigned long long int... " >&6; }
10406 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10407   $as_echo_n "(cached) " >&6
10408 else
10409   ac_cv_type_unsigned_long_long_int=yes
10410      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10411        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10412 /* end confdefs.h.  */
10413
10414   /* For now, do not test the preprocessor; as of 2007 there are too many
10415          implementations with broken preprocessors.  Perhaps this can
10416          be revisited in 2012.  In the meantime, code should not expect
10417          #if to work with literals wider than 32 bits.  */
10418       /* Test literals.  */
10419       long long int ll = 9223372036854775807ll;
10420       long long int nll = -9223372036854775807LL;
10421       unsigned long long int ull = 18446744073709551615ULL;
10422       /* Test constant expressions.   */
10423       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10424                      ? 1 : -1)];
10425       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10426                      ? 1 : -1)];
10427       int i = 63;
10428 int
10429 main ()
10430 {
10431 /* Test availability of runtime routines for shift and division.  */
10432       long long int llmax = 9223372036854775807ll;
10433       unsigned long long int ullmax = 18446744073709551615ull;
10434       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10435               | (llmax / ll) | (llmax % ll)
10436               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10437               | (ullmax / ull) | (ullmax % ull));
10438   ;
10439   return 0;
10440 }
10441
10442 _ACEOF
10443 if ac_fn_c_try_link "$LINENO"; then :
10444
10445 else
10446   ac_cv_type_unsigned_long_long_int=no
10447 fi
10448 rm -f core conftest.err conftest.$ac_objext \
10449     conftest$ac_exeext conftest.$ac_ext
10450      fi
10451 fi
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10453 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10454   if test $ac_cv_type_unsigned_long_long_int = yes; then
10455
10456 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10457
10458   fi
10459
10460
10461
10462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10463 $as_echo_n "checking for long long int... " >&6; }
10464 if ${ac_cv_type_long_long_int+:} false; then :
10465   $as_echo_n "(cached) " >&6
10466 else
10467   ac_cv_type_long_long_int=yes
10468       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10469         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10470         if test $ac_cv_type_long_long_int = yes; then
10471                                         if test "$cross_compiling" = yes; then :
10472   :
10473 else
10474   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475 /* end confdefs.h.  */
10476 #include <limits.h>
10477                  #ifndef LLONG_MAX
10478                  # define HALF \
10479                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10480                  # define LLONG_MAX (HALF - 1 + HALF)
10481                  #endif
10482 int
10483 main ()
10484 {
10485 long long int n = 1;
10486                  int i;
10487                  for (i = 0; ; i++)
10488                    {
10489                      long long int m = n << i;
10490                      if (m >> i != n)
10491                        return 1;
10492                      if (LLONG_MAX / 2 < m)
10493                        break;
10494                    }
10495                  return 0;
10496   ;
10497   return 0;
10498 }
10499 _ACEOF
10500 if ac_fn_c_try_run "$LINENO"; then :
10501
10502 else
10503   ac_cv_type_long_long_int=no
10504 fi
10505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10506   conftest.$ac_objext conftest.beam conftest.$ac_ext
10507 fi
10508
10509         fi
10510       fi
10511 fi
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10513 $as_echo "$ac_cv_type_long_long_int" >&6; }
10514   if test $ac_cv_type_long_long_int = yes; then
10515
10516 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10517
10518   fi
10519
10520
10521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10522 $as_echo_n "checking for wchar_t... " >&6; }
10523 if ${gt_cv_c_wchar_t+:} false; then :
10524   $as_echo_n "(cached) " >&6
10525 else
10526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10527 /* end confdefs.h.  */
10528 #include <stddef.h>
10529             wchar_t foo = (wchar_t)'\0';
10530 int
10531 main ()
10532 {
10533
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 if ac_fn_c_try_compile "$LINENO"; then :
10539   gt_cv_c_wchar_t=yes
10540 else
10541   gt_cv_c_wchar_t=no
10542 fi
10543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10544 fi
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10546 $as_echo "$gt_cv_c_wchar_t" >&6; }
10547   if test $gt_cv_c_wchar_t = yes; then
10548
10549 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
10550
10551   fi
10552
10553
10554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
10555 $as_echo_n "checking for wint_t... " >&6; }
10556 if ${gt_cv_c_wint_t+:} false; then :
10557   $as_echo_n "(cached) " >&6
10558 else
10559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h.  */
10561
10562 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10563    <wchar.h>.
10564    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
10565    before <wchar.h>.  */
10566 #include <stddef.h>
10567 #include <stdio.h>
10568 #include <time.h>
10569 #include <wchar.h>
10570             wint_t foo = (wchar_t)'\0';
10571 int
10572 main ()
10573 {
10574
10575   ;
10576   return 0;
10577 }
10578 _ACEOF
10579 if ac_fn_c_try_compile "$LINENO"; then :
10580   gt_cv_c_wint_t=yes
10581 else
10582   gt_cv_c_wint_t=no
10583 fi
10584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10585 fi
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
10587 $as_echo "$gt_cv_c_wint_t" >&6; }
10588   if test $gt_cv_c_wint_t = yes; then
10589
10590 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
10591
10592   fi
10593
10594
10595
10596
10597
10598   if test $ac_cv_header_features_h = yes; then
10599     HAVE_FEATURES_H=1
10600   else
10601     HAVE_FEATURES_H=0
10602   fi
10603
10604
10605
10606
10607
10608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
10609 $as_echo_n "checking for intmax_t... " >&6; }
10610 if ${gt_cv_c_intmax_t+:} false; then :
10611   $as_echo_n "(cached) " >&6
10612 else
10613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h.  */
10615
10616 #include <stddef.h>
10617 #include <stdlib.h>
10618 #if HAVE_STDINT_H_WITH_UINTMAX
10619 #include <stdint.h>
10620 #endif
10621 #if HAVE_INTTYPES_H_WITH_UINTMAX
10622 #include <inttypes.h>
10623 #endif
10624
10625 int
10626 main ()
10627 {
10628 intmax_t x = -1; return !x;
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 if ac_fn_c_try_compile "$LINENO"; then :
10634   gt_cv_c_intmax_t=yes
10635 else
10636   gt_cv_c_intmax_t=no
10637 fi
10638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10639 fi
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
10641 $as_echo "$gt_cv_c_intmax_t" >&6; }
10642   if test $gt_cv_c_intmax_t = yes; then
10643
10644 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
10645
10646   else
10647
10648     test $ac_cv_type_long_long_int = yes \
10649       && ac_type='long long' \
10650       || ac_type='long'
10651
10652 cat >>confdefs.h <<_ACEOF
10653 #define intmax_t $ac_type
10654 _ACEOF
10655
10656   fi
10657
10658
10659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10660 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
10661 if ${gl_cv_cc_double_expbit0+:} false; then :
10662   $as_echo_n "(cached) " >&6
10663 else
10664
10665       if test "$cross_compiling" = yes; then :
10666
10667                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668 /* end confdefs.h.  */
10669
10670 #if defined arm || defined __arm || defined __arm__
10671   mixed_endianness
10672 #endif
10673
10674 _ACEOF
10675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10676   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10677   gl_cv_cc_double_expbit0="unknown"
10678 else
10679
10680                                                          :
10681 if ${ac_cv_c_bigendian+:} false; then :
10682   $as_echo_n "(cached) " >&6
10683 else
10684   ac_cv_c_bigendian=unknown
10685     # See if we're dealing with a universal compiler.
10686     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687 /* end confdefs.h.  */
10688 #ifndef __APPLE_CC__
10689                not a universal capable compiler
10690              #endif
10691              typedef int dummy;
10692
10693 _ACEOF
10694 if ac_fn_c_try_compile "$LINENO"; then :
10695
10696         # Check for potential -arch flags.  It is not universal unless
10697         # there are at least two -arch flags with different values.
10698         ac_arch=
10699         ac_prev=
10700         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10701          if test -n "$ac_prev"; then
10702            case $ac_word in
10703              i?86 | x86_64 | ppc | ppc64)
10704                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10705                  ac_arch=$ac_word
10706                else
10707                  ac_cv_c_bigendian=universal
10708                  break
10709                fi
10710                ;;
10711            esac
10712            ac_prev=
10713          elif test "x$ac_word" = "x-arch"; then
10714            ac_prev=arch
10715          fi
10716        done
10717 fi
10718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10719     if test $ac_cv_c_bigendian = unknown; then
10720       # See if sys/param.h defines the BYTE_ORDER macro.
10721       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10722 /* end confdefs.h.  */
10723 #include <sys/types.h>
10724              #include <sys/param.h>
10725
10726 int
10727 main ()
10728 {
10729 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10730                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10731                      && LITTLE_ENDIAN)
10732               bogus endian macros
10733              #endif
10734
10735   ;
10736   return 0;
10737 }
10738 _ACEOF
10739 if ac_fn_c_try_compile "$LINENO"; then :
10740   # It does; now see whether it defined to BIG_ENDIAN or not.
10741          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10742 /* end confdefs.h.  */
10743 #include <sys/types.h>
10744                 #include <sys/param.h>
10745
10746 int
10747 main ()
10748 {
10749 #if BYTE_ORDER != BIG_ENDIAN
10750                  not big endian
10751                 #endif
10752
10753   ;
10754   return 0;
10755 }
10756 _ACEOF
10757 if ac_fn_c_try_compile "$LINENO"; then :
10758   ac_cv_c_bigendian=yes
10759 else
10760   ac_cv_c_bigendian=no
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10763 fi
10764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10765     fi
10766     if test $ac_cv_c_bigendian = unknown; then
10767       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10768       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10769 /* end confdefs.h.  */
10770 #include <limits.h>
10771
10772 int
10773 main ()
10774 {
10775 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10776               bogus endian macros
10777              #endif
10778
10779   ;
10780   return 0;
10781 }
10782 _ACEOF
10783 if ac_fn_c_try_compile "$LINENO"; then :
10784   # It does; now see whether it defined to _BIG_ENDIAN or not.
10785          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10786 /* end confdefs.h.  */
10787 #include <limits.h>
10788
10789 int
10790 main ()
10791 {
10792 #ifndef _BIG_ENDIAN
10793                  not big endian
10794                 #endif
10795
10796   ;
10797   return 0;
10798 }
10799 _ACEOF
10800 if ac_fn_c_try_compile "$LINENO"; then :
10801   ac_cv_c_bigendian=yes
10802 else
10803   ac_cv_c_bigendian=no
10804 fi
10805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10806 fi
10807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10808     fi
10809     if test $ac_cv_c_bigendian = unknown; then
10810       # Compile a test program.
10811       if test "$cross_compiling" = yes; then :
10812   # Try to guess by grepping values from an object file.
10813          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10814 /* end confdefs.h.  */
10815 short int ascii_mm[] =
10816                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10817                 short int ascii_ii[] =
10818                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10819                 int use_ascii (int i) {
10820                   return ascii_mm[i] + ascii_ii[i];
10821                 }
10822                 short int ebcdic_ii[] =
10823                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10824                 short int ebcdic_mm[] =
10825                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10826                 int use_ebcdic (int i) {
10827                   return ebcdic_mm[i] + ebcdic_ii[i];
10828                 }
10829                 extern int foo;
10830
10831 int
10832 main ()
10833 {
10834 return use_ascii (foo) == use_ebcdic (foo);
10835   ;
10836   return 0;
10837 }
10838 _ACEOF
10839 if ac_fn_c_try_compile "$LINENO"; then :
10840   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10841               ac_cv_c_bigendian=yes
10842             fi
10843             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10844               if test "$ac_cv_c_bigendian" = unknown; then
10845                 ac_cv_c_bigendian=no
10846               else
10847                 # finding both strings is unlikely to happen, but who knows?
10848                 ac_cv_c_bigendian=unknown
10849               fi
10850             fi
10851 fi
10852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853 else
10854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10855 /* end confdefs.h.  */
10856 $ac_includes_default
10857 int
10858 main ()
10859 {
10860
10861              /* Are we little or big endian?  From Harbison&Steele.  */
10862              union
10863              {
10864                long int l;
10865                char c[sizeof (long int)];
10866              } u;
10867              u.l = 1;
10868              return u.c[sizeof (long int) - 1] == 1;
10869
10870   ;
10871   return 0;
10872 }
10873 _ACEOF
10874 if ac_fn_c_try_run "$LINENO"; then :
10875   ac_cv_c_bigendian=no
10876 else
10877   ac_cv_c_bigendian=yes
10878 fi
10879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10880   conftest.$ac_objext conftest.beam conftest.$ac_ext
10881 fi
10882
10883     fi
10884 fi
10885 :
10886  case $ac_cv_c_bigendian in #(
10887    yes)
10888      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
10889    no)
10890      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
10891    universal)
10892
10893 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10894
10895      ;; #(
10896    *)
10897      gl_cv_cc_double_expbit0="unknown" ;;
10898  esac
10899
10900
10901 fi
10902 rm -f conftest*
10903
10904
10905 else
10906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10907 /* end confdefs.h.  */
10908
10909 #include <float.h>
10910 #include <stddef.h>
10911 #include <stdio.h>
10912 #include <string.h>
10913 #define NWORDS \
10914   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10915 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
10916 static unsigned int ored_words[NWORDS];
10917 static unsigned int anded_words[NWORDS];
10918 static void add_to_ored_words (double x)
10919 {
10920   memory_double m;
10921   size_t i;
10922   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
10923   memset (&m, 0, sizeof (memory_double));
10924   m.value = x;
10925   for (i = 0; i < NWORDS; i++)
10926     {
10927       ored_words[i] |= m.word[i];
10928       anded_words[i] &= m.word[i];
10929     }
10930 }
10931 int main ()
10932 {
10933   size_t j;
10934   FILE *fp = fopen ("conftest.out", "w");
10935   if (fp == NULL)
10936     return 1;
10937   for (j = 0; j < NWORDS; j++)
10938     anded_words[j] = ~ (unsigned int) 0;
10939   add_to_ored_words (0.25);
10940   add_to_ored_words (0.5);
10941   add_to_ored_words (1.0);
10942   add_to_ored_words (2.0);
10943   add_to_ored_words (4.0);
10944   /* Remove bits that are common (e.g. if representation of the first mantissa
10945      bit is explicit).  */
10946   for (j = 0; j < NWORDS; j++)
10947     ored_words[j] &= ~anded_words[j];
10948   /* Now find the nonzero word.  */
10949   for (j = 0; j < NWORDS; j++)
10950     if (ored_words[j] != 0)
10951       break;
10952   if (j < NWORDS)
10953     {
10954       size_t i;
10955       for (i = j + 1; i < NWORDS; i++)
10956         if (ored_words[i] != 0)
10957           {
10958             fprintf (fp, "unknown");
10959             return (fclose (fp) != 0);
10960           }
10961       for (i = 0; ; i++)
10962         if ((ored_words[j] >> i) & 1)
10963           {
10964             fprintf (fp, "word %d bit %d", (int) j, (int) i);
10965             return (fclose (fp) != 0);
10966           }
10967     }
10968   fprintf (fp, "unknown");
10969   return (fclose (fp) != 0);
10970 }
10971
10972 _ACEOF
10973 if ac_fn_c_try_run "$LINENO"; then :
10974   gl_cv_cc_double_expbit0=`cat conftest.out`
10975 else
10976   gl_cv_cc_double_expbit0="unknown"
10977 fi
10978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10979   conftest.$ac_objext conftest.beam conftest.$ac_ext
10980 fi
10981
10982       rm -f conftest.out
10983
10984 fi
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
10986 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
10987   case "$gl_cv_cc_double_expbit0" in
10988     word*bit*)
10989       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10990       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
10991
10992 cat >>confdefs.h <<_ACEOF
10993 #define DBL_EXPBIT0_WORD $word
10994 _ACEOF
10995
10996
10997 cat >>confdefs.h <<_ACEOF
10998 #define DBL_EXPBIT0_BIT $bit
10999 _ACEOF
11000
11001       ;;
11002   esac
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11013 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
11014 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
11015   $as_echo_n "(cached) " >&6
11016 else
11017
11018       if test "$cross_compiling" = yes; then :
11019
11020          case "$host_os" in
11021                                  # Guess yes on glibc systems.
11022            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
11023                                  # Guess yes on FreeBSD >= 5.
11024            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
11025            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11026                                  # Guess yes on MacOS X >= 10.3.
11027            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
11028            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11029                                  # Guess yes on OpenBSD >= 3.9.
11030            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11031                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11032            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
11033                                  # Guess yes on Solaris >= 2.10.
11034            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11035            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
11036                                  # Guess yes on AIX >= 4.
11037            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
11038            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
11039                                  # Guess yes on NetBSD >= 3.
11040            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11041                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11042            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11043                                  # Guess yes on BeOS.
11044            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
11045                                  # If we don't know, assume the worst.
11046            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
11047          esac
11048
11049 else
11050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11051 /* end confdefs.h.  */
11052
11053 #include <stdio.h>
11054 #include <string.h>
11055 #if HAVE_SNPRINTF
11056 # define my_snprintf snprintf
11057 #else
11058 # include <stdarg.h>
11059 static int my_snprintf (char *buf, int size, const char *format, ...)
11060 {
11061   va_list args;
11062   int ret;
11063   va_start (args, format);
11064   ret = vsnprintf (buf, size, format, args);
11065   va_end (args);
11066   return ret;
11067 }
11068 #endif
11069 static char buf[100];
11070 int main ()
11071 {
11072   strcpy (buf, "ABCDEF");
11073   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11074     return 1;
11075   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11076     return 2;
11077   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11078     return 3;
11079   return 0;
11080 }
11081 _ACEOF
11082 if ac_fn_c_try_run "$LINENO"; then :
11083   gl_cv_func_snprintf_retval_c99=yes
11084 else
11085   gl_cv_func_snprintf_retval_c99=no
11086 fi
11087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11088   conftest.$ac_objext conftest.beam conftest.$ac_ext
11089 fi
11090
11091
11092 fi
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11094 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
11095
11096
11097
11098
11099
11100
11101
11102   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
11103 do :
11104   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11105 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11106 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11107   cat >>confdefs.h <<_ACEOF
11108 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11109 _ACEOF
11110
11111 fi
11112 done
11113
11114       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11115 "
11116 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
11117   ac_have_decl=1
11118 else
11119   ac_have_decl=0
11120 fi
11121
11122 cat >>confdefs.h <<_ACEOF
11123 #define HAVE_DECL__SNPRINTF $ac_have_decl
11124 _ACEOF
11125
11126
11127
11128   case "$gl_cv_func_snprintf_retval_c99" in
11129     *yes)
11130
11131 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11132
11133       ;;
11134   esac
11135
11136
11137
11138
11139
11140
11141
11142
11143   GNULIB_ACOSF=0;
11144   GNULIB_ACOSL=0;
11145   GNULIB_ASINF=0;
11146   GNULIB_ASINL=0;
11147   GNULIB_ATANF=0;
11148   GNULIB_ATANL=0;
11149   GNULIB_ATAN2F=0;
11150   GNULIB_CBRT=0;
11151   GNULIB_CBRTF=0;
11152   GNULIB_CBRTL=0;
11153   GNULIB_CEIL=0;
11154   GNULIB_CEILF=0;
11155   GNULIB_CEILL=0;
11156   GNULIB_COPYSIGN=0;
11157   GNULIB_COPYSIGNF=0;
11158   GNULIB_COPYSIGNL=0;
11159   GNULIB_COSF=0;
11160   GNULIB_COSL=0;
11161   GNULIB_COSHF=0;
11162   GNULIB_EXPF=0;
11163   GNULIB_EXPL=0;
11164   GNULIB_EXP2=0;
11165   GNULIB_EXP2F=0;
11166   GNULIB_EXP2L=0;
11167   GNULIB_EXPM1=0;
11168   GNULIB_EXPM1F=0;
11169   GNULIB_EXPM1L=0;
11170   GNULIB_FABSF=0;
11171   GNULIB_FABSL=0;
11172   GNULIB_FLOOR=0;
11173   GNULIB_FLOORF=0;
11174   GNULIB_FLOORL=0;
11175   GNULIB_FMA=0;
11176   GNULIB_FMAF=0;
11177   GNULIB_FMAL=0;
11178   GNULIB_FMOD=0;
11179   GNULIB_FMODF=0;
11180   GNULIB_FMODL=0;
11181   GNULIB_FREXPF=0;
11182   GNULIB_FREXP=0;
11183   GNULIB_FREXPL=0;
11184   GNULIB_HYPOT=0;
11185   GNULIB_HYPOTF=0;
11186   GNULIB_HYPOTL=0;
11187   GNULIB_ILOGB=0;
11188   GNULIB_ILOGBF=0;
11189   GNULIB_ILOGBL=0;
11190   GNULIB_ISFINITE=0;
11191   GNULIB_ISINF=0;
11192   GNULIB_ISNAN=0;
11193   GNULIB_ISNANF=0;
11194   GNULIB_ISNAND=0;
11195   GNULIB_ISNANL=0;
11196   GNULIB_LDEXPF=0;
11197   GNULIB_LDEXPL=0;
11198   GNULIB_LOG=0;
11199   GNULIB_LOGF=0;
11200   GNULIB_LOGL=0;
11201   GNULIB_LOG10=0;
11202   GNULIB_LOG10F=0;
11203   GNULIB_LOG10L=0;
11204   GNULIB_LOG1P=0;
11205   GNULIB_LOG1PF=0;
11206   GNULIB_LOG1PL=0;
11207   GNULIB_LOG2=0;
11208   GNULIB_LOG2F=0;
11209   GNULIB_LOG2L=0;
11210   GNULIB_LOGB=0;
11211   GNULIB_LOGBF=0;
11212   GNULIB_LOGBL=0;
11213   GNULIB_MODF=0;
11214   GNULIB_MODFF=0;
11215   GNULIB_MODFL=0;
11216   GNULIB_POWF=0;
11217   GNULIB_REMAINDER=0;
11218   GNULIB_REMAINDERF=0;
11219   GNULIB_REMAINDERL=0;
11220   GNULIB_RINT=0;
11221   GNULIB_RINTF=0;
11222   GNULIB_RINTL=0;
11223   GNULIB_ROUND=0;
11224   GNULIB_ROUNDF=0;
11225   GNULIB_ROUNDL=0;
11226   GNULIB_SIGNBIT=0;
11227   GNULIB_SINF=0;
11228   GNULIB_SINL=0;
11229   GNULIB_SINHF=0;
11230   GNULIB_SQRTF=0;
11231   GNULIB_SQRTL=0;
11232   GNULIB_TANF=0;
11233   GNULIB_TANL=0;
11234   GNULIB_TANHF=0;
11235   GNULIB_TRUNC=0;
11236   GNULIB_TRUNCF=0;
11237   GNULIB_TRUNCL=0;
11238     HAVE_ACOSF=1;
11239   HAVE_ACOSL=1;
11240   HAVE_ASINF=1;
11241   HAVE_ASINL=1;
11242   HAVE_ATANF=1;
11243   HAVE_ATANL=1;
11244   HAVE_ATAN2F=1;
11245   HAVE_CBRT=1;
11246   HAVE_CBRTF=1;
11247   HAVE_CBRTL=1;
11248   HAVE_COPYSIGN=1;
11249   HAVE_COPYSIGNL=1;
11250   HAVE_COSF=1;
11251   HAVE_COSL=1;
11252   HAVE_COSHF=1;
11253   HAVE_EXPF=1;
11254   HAVE_EXPL=1;
11255   HAVE_EXPM1=1;
11256   HAVE_EXPM1F=1;
11257   HAVE_FABSF=1;
11258   HAVE_FABSL=1;
11259   HAVE_FMA=1;
11260   HAVE_FMAF=1;
11261   HAVE_FMAL=1;
11262   HAVE_FMODF=1;
11263   HAVE_FMODL=1;
11264   HAVE_FREXPF=1;
11265   HAVE_HYPOTF=1;
11266   HAVE_HYPOTL=1;
11267   HAVE_ILOGB=1;
11268   HAVE_ILOGBF=1;
11269   HAVE_ILOGBL=1;
11270   HAVE_ISNANF=1;
11271   HAVE_ISNAND=1;
11272   HAVE_ISNANL=1;
11273   HAVE_LDEXPF=1;
11274   HAVE_LOGF=1;
11275   HAVE_LOGL=1;
11276   HAVE_LOG10F=1;
11277   HAVE_LOG10L=1;
11278   HAVE_LOG1P=1;
11279   HAVE_LOG1PF=1;
11280   HAVE_LOG1PL=1;
11281   HAVE_LOGBF=1;
11282   HAVE_LOGBL=1;
11283   HAVE_MODFF=1;
11284   HAVE_MODFL=1;
11285   HAVE_POWF=1;
11286   HAVE_REMAINDER=1;
11287   HAVE_REMAINDERF=1;
11288   HAVE_RINT=1;
11289   HAVE_RINTL=1;
11290   HAVE_SINF=1;
11291   HAVE_SINL=1;
11292   HAVE_SINHF=1;
11293   HAVE_SQRTF=1;
11294   HAVE_SQRTL=1;
11295   HAVE_TANF=1;
11296   HAVE_TANL=1;
11297   HAVE_TANHF=1;
11298   HAVE_DECL_ACOSL=1;
11299   HAVE_DECL_ASINL=1;
11300   HAVE_DECL_ATANL=1;
11301   HAVE_DECL_CBRTF=1;
11302   HAVE_DECL_CBRTL=1;
11303   HAVE_DECL_CEILF=1;
11304   HAVE_DECL_CEILL=1;
11305   HAVE_DECL_COPYSIGNF=1;
11306   HAVE_DECL_COSL=1;
11307   HAVE_DECL_EXPL=1;
11308   HAVE_DECL_EXP2=1;
11309   HAVE_DECL_EXP2F=1;
11310   HAVE_DECL_EXP2L=1;
11311   HAVE_DECL_EXPM1L=1;
11312   HAVE_DECL_FLOORF=1;
11313   HAVE_DECL_FLOORL=1;
11314   HAVE_DECL_FREXPL=1;
11315   HAVE_DECL_LDEXPL=1;
11316   HAVE_DECL_LOGL=1;
11317   HAVE_DECL_LOG10L=1;
11318   HAVE_DECL_LOG2=1;
11319   HAVE_DECL_LOG2F=1;
11320   HAVE_DECL_LOG2L=1;
11321   HAVE_DECL_LOGB=1;
11322   HAVE_DECL_REMAINDER=1;
11323   HAVE_DECL_REMAINDERL=1;
11324   HAVE_DECL_RINTF=1;
11325   HAVE_DECL_ROUND=1;
11326   HAVE_DECL_ROUNDF=1;
11327   HAVE_DECL_ROUNDL=1;
11328   HAVE_DECL_SINL=1;
11329   HAVE_DECL_SQRTL=1;
11330   HAVE_DECL_TANL=1;
11331   HAVE_DECL_TRUNC=1;
11332   HAVE_DECL_TRUNCF=1;
11333   HAVE_DECL_TRUNCL=1;
11334   REPLACE_CBRTF=0;
11335   REPLACE_CBRTL=0;
11336   REPLACE_CEIL=0;
11337   REPLACE_CEILF=0;
11338   REPLACE_CEILL=0;
11339   REPLACE_EXPM1=0;
11340   REPLACE_EXPM1F=0;
11341   REPLACE_EXP2=0;
11342   REPLACE_EXP2L=0;
11343   REPLACE_FABSL=0;
11344   REPLACE_FLOOR=0;
11345   REPLACE_FLOORF=0;
11346   REPLACE_FLOORL=0;
11347   REPLACE_FMA=0;
11348   REPLACE_FMAF=0;
11349   REPLACE_FMAL=0;
11350   REPLACE_FMOD=0;
11351   REPLACE_FMODF=0;
11352   REPLACE_FMODL=0;
11353   REPLACE_FREXPF=0;
11354   REPLACE_FREXP=0;
11355   REPLACE_FREXPL=0;
11356   REPLACE_HUGE_VAL=0;
11357   REPLACE_HYPOT=0;
11358   REPLACE_HYPOTF=0;
11359   REPLACE_HYPOTL=0;
11360   REPLACE_ILOGB=0;
11361   REPLACE_ILOGBF=0;
11362   REPLACE_ISFINITE=0;
11363   REPLACE_ISINF=0;
11364   REPLACE_ISNAN=0;
11365   REPLACE_LDEXPL=0;
11366   REPLACE_LOG=0;
11367   REPLACE_LOGF=0;
11368   REPLACE_LOGL=0;
11369   REPLACE_LOG10=0;
11370   REPLACE_LOG10F=0;
11371   REPLACE_LOG10L=0;
11372   REPLACE_LOG1P=0;
11373   REPLACE_LOG1PF=0;
11374   REPLACE_LOG1PL=0;
11375   REPLACE_LOG2=0;
11376   REPLACE_LOG2F=0;
11377   REPLACE_LOG2L=0;
11378   REPLACE_LOGB=0;
11379   REPLACE_LOGBF=0;
11380   REPLACE_LOGBL=0;
11381   REPLACE_MODF=0;
11382   REPLACE_MODFF=0;
11383   REPLACE_MODFL=0;
11384   REPLACE_NAN=0;
11385   REPLACE_REMAINDER=0;
11386   REPLACE_REMAINDERF=0;
11387   REPLACE_REMAINDERL=0;
11388   REPLACE_ROUND=0;
11389   REPLACE_ROUNDF=0;
11390   REPLACE_ROUNDL=0;
11391   REPLACE_SIGNBIT=0;
11392   REPLACE_SIGNBIT_USING_GCC=0;
11393   REPLACE_SQRTL=0;
11394   REPLACE_TRUNC=0;
11395   REPLACE_TRUNCF=0;
11396   REPLACE_TRUNCL=0;
11397
11398
11399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11400 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
11401 if ${gl_cv_func_frexp_no_libm+:} false; then :
11402   $as_echo_n "(cached) " >&6
11403 else
11404
11405       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406 /* end confdefs.h.  */
11407 #include <math.h>
11408              double x;
11409 int
11410 main ()
11411 {
11412 int e; return frexp (x, &e) > 0;
11413   ;
11414   return 0;
11415 }
11416 _ACEOF
11417 if ac_fn_c_try_link "$LINENO"; then :
11418   gl_cv_func_frexp_no_libm=yes
11419 else
11420   gl_cv_func_frexp_no_libm=no
11421 fi
11422 rm -f core conftest.err conftest.$ac_objext \
11423     conftest$ac_exeext conftest.$ac_ext
11424
11425 fi
11426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11427 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
11428
11429
11430
11431
11432     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11433 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11434 if ${gl_cv_var_stdin_large_offset+:} false; then :
11435   $as_echo_n "(cached) " >&6
11436 else
11437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11438 /* end confdefs.h.  */
11439 #include <stdio.h>
11440 int
11441 main ()
11442 {
11443 #if defined __SL64 && defined __SCLE /* cygwin */
11444   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11445      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
11446      it is easier to do a version check than building a runtime test.  */
11447 # include <cygwin/version.h>
11448 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11449   choke me
11450 # endif
11451 #endif
11452   ;
11453   return 0;
11454 }
11455 _ACEOF
11456 if ac_fn_c_try_link "$LINENO"; then :
11457   gl_cv_var_stdin_large_offset=yes
11458 else
11459   gl_cv_var_stdin_large_offset=no
11460 fi
11461 rm -f core conftest.err conftest.$ac_objext \
11462     conftest$ac_exeext conftest.$ac_ext
11463 fi
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11465 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11466
11467
11468
11469
11470
11471   case "$host_os" in
11472     mingw*)
11473                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11474 $as_echo_n "checking for 64-bit off_t... " >&6; }
11475 if ${gl_cv_type_off_t_64+:} false; then :
11476   $as_echo_n "(cached) " >&6
11477 else
11478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479 /* end confdefs.h.  */
11480 #include <sys/types.h>
11481                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11482
11483 int
11484 main ()
11485 {
11486
11487   ;
11488   return 0;
11489 }
11490 _ACEOF
11491 if ac_fn_c_try_compile "$LINENO"; then :
11492   gl_cv_type_off_t_64=yes
11493 else
11494   gl_cv_type_off_t_64=no
11495 fi
11496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11497
11498 fi
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11500 $as_echo "$gl_cv_type_off_t_64" >&6; }
11501       if test $gl_cv_type_off_t_64 = no; then
11502         WINDOWS_64_BIT_OFF_T=1
11503       else
11504         WINDOWS_64_BIT_OFF_T=0
11505       fi
11506                   WINDOWS_64_BIT_ST_SIZE=1
11507       ;;
11508     *)
11509                                                       WINDOWS_64_BIT_OFF_T=0
11510       WINDOWS_64_BIT_ST_SIZE=0
11511       ;;
11512   esac
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530      if test $gl_cv_have_include_next = yes; then
11531        gl_cv_next_sys_types_h='<'sys/types.h'>'
11532      else
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11534 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
11535 if ${gl_cv_next_sys_types_h+:} false; then :
11536   $as_echo_n "(cached) " >&6
11537 else
11538
11539                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540 /* end confdefs.h.  */
11541 #include <sys/types.h>
11542
11543 _ACEOF
11544                                                                                                                         case "$host_os" in
11545                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11546                  *)    gl_absname_cpp="$ac_cpp" ;;
11547                esac
11548
11549                case "$host_os" in
11550                  mingw*)
11551                                                                                                                                      gl_dirsep_regex='[/\\]'
11552                    ;;
11553                  *)
11554                    gl_dirsep_regex='\/'
11555                    ;;
11556                esac
11557                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11558
11559                gl_header_literal_regex=`echo 'sys/types.h' \
11560                                         | sed -e "$gl_make_literal_regex_sed"`
11561                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11562                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11563                    s|^/[^/]|//&|
11564                    p
11565                    q
11566                  }'
11567                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11568                       sed -n "$gl_absolute_header_sed"`'"'
11569
11570
11571 fi
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11573 $as_echo "$gl_cv_next_sys_types_h" >&6; }
11574      fi
11575      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11576
11577      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11578        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11579        gl_next_as_first_directive='<'sys/types.h'>'
11580      else
11581        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11582        gl_next_as_first_directive=$gl_cv_next_sys_types_h
11583      fi
11584      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11597 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11598   ac_have_decl=1
11599 else
11600   ac_have_decl=0
11601 fi
11602
11603 cat >>confdefs.h <<_ACEOF
11604 #define HAVE_DECL_FSEEKO $ac_have_decl
11605 _ACEOF
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11616 $as_echo_n "checking for fseeko... " >&6; }
11617 if ${gl_cv_func_fseeko+:} false; then :
11618   $as_echo_n "(cached) " >&6
11619 else
11620
11621       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622 /* end confdefs.h.  */
11623 #include <stdio.h>
11624
11625 int
11626 main ()
11627 {
11628 fseeko (stdin, 0, 0);
11629   ;
11630   return 0;
11631 }
11632 _ACEOF
11633 if ac_fn_c_try_link "$LINENO"; then :
11634   gl_cv_func_fseeko=yes
11635 else
11636   gl_cv_func_fseeko=no
11637 fi
11638 rm -f core conftest.err conftest.$ac_objext \
11639     conftest$ac_exeext conftest.$ac_ext
11640
11641 fi
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11643 $as_echo "$gl_cv_func_fseeko" >&6; }
11644
11645
11646   if test $ac_cv_have_decl_fseeko = no; then
11647     HAVE_DECL_FSEEKO=0
11648   fi
11649
11650   if test $gl_cv_func_fseeko = no; then
11651     HAVE_FSEEKO=0
11652   else
11653     if test $WINDOWS_64_BIT_OFF_T = 1; then
11654       REPLACE_FSEEKO=1
11655     fi
11656     if test $gl_cv_var_stdin_large_offset = no; then
11657       REPLACE_FSEEKO=1
11658     fi
11659
11660
11661
11662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11663 $as_echo_n "checking whether fflush works on input streams... " >&6; }
11664 if ${gl_cv_func_fflush_stdin+:} false; then :
11665   $as_echo_n "(cached) " >&6
11666 else
11667   echo hello world > conftest.txt
11668      if test "$cross_compiling" = yes; then :
11669         gl_cv_func_fflush_stdin=no
11670 else
11671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11672 /* end confdefs.h.  */
11673
11674 #include <stdio.h>
11675 #if HAVE_UNISTD_H
11676 # include <unistd.h>
11677 #else /* on Windows with MSVC */
11678 # include <io.h>
11679 #endif
11680
11681 int
11682 main ()
11683 {
11684 FILE *f = fopen ("conftest.txt", "r");
11685          char buffer[10];
11686          int fd;
11687          int c;
11688          if (f == NULL)
11689            return 1;
11690          fd = fileno (f);
11691          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
11692            return 2;
11693          /* For deterministic results, ensure f read a bigger buffer.  */
11694          if (lseek (fd, 0, SEEK_CUR) == 5)
11695            return 3;
11696          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
11697             on BSD systems and on mingw.  */
11698          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
11699            return 4;
11700          if (lseek (fd, 0, SEEK_CUR) != 5)
11701            return 5;
11702          /* Verify behaviour of fflush after ungetc. See
11703             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
11704          /* Verify behaviour of fflush after a backup ungetc.  This fails on
11705             mingw.  */
11706          c = fgetc (f);
11707          ungetc (c, f);
11708          fflush (f);
11709          if (fgetc (f) != c)
11710            return 6;
11711          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
11712             on glibc 2.8 and on BSD systems.  */
11713          c = fgetc (f);
11714          ungetc ('@', f);
11715          fflush (f);
11716          if (fgetc (f) != c)
11717            return 7;
11718          return 0;
11719
11720   ;
11721   return 0;
11722 }
11723 _ACEOF
11724 if ac_fn_c_try_run "$LINENO"; then :
11725   gl_cv_func_fflush_stdin=yes
11726 else
11727   gl_cv_func_fflush_stdin=no
11728 fi
11729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11730   conftest.$ac_objext conftest.beam conftest.$ac_ext
11731 fi
11732
11733      rm conftest.txt
11734
11735 fi
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
11737 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
11738
11739       if test $gl_cv_func_fflush_stdin = no; then
11740         REPLACE_FSEEKO=1
11741       fi
11742
11743   fi
11744
11745
11746      GNULIB_FCHMODAT=0;
11747   GNULIB_FSTAT=0;
11748   GNULIB_FSTATAT=0;
11749   GNULIB_FUTIMENS=0;
11750   GNULIB_LCHMOD=0;
11751   GNULIB_LSTAT=0;
11752   GNULIB_MKDIRAT=0;
11753   GNULIB_MKFIFO=0;
11754   GNULIB_MKFIFOAT=0;
11755   GNULIB_MKNOD=0;
11756   GNULIB_MKNODAT=0;
11757   GNULIB_STAT=0;
11758   GNULIB_UTIMENSAT=0;
11759     HAVE_FCHMODAT=1;
11760   HAVE_FSTATAT=1;
11761   HAVE_FUTIMENS=1;
11762   HAVE_LCHMOD=1;
11763   HAVE_LSTAT=1;
11764   HAVE_MKDIRAT=1;
11765   HAVE_MKFIFO=1;
11766   HAVE_MKFIFOAT=1;
11767   HAVE_MKNOD=1;
11768   HAVE_MKNODAT=1;
11769   HAVE_UTIMENSAT=1;
11770   REPLACE_FSTAT=0;
11771   REPLACE_FSTATAT=0;
11772   REPLACE_FUTIMENS=0;
11773   REPLACE_LSTAT=0;
11774   REPLACE_MKDIR=0;
11775   REPLACE_MKFIFO=0;
11776   REPLACE_MKNOD=0;
11777   REPLACE_STAT=0;
11778   REPLACE_UTIMENSAT=0;
11779
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11781 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11782 if ${ac_cv_header_stat_broken+:} false; then :
11783   $as_echo_n "(cached) " >&6
11784 else
11785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11786 /* end confdefs.h.  */
11787 #include <sys/types.h>
11788 #include <sys/stat.h>
11789
11790 #if defined S_ISBLK && defined S_IFDIR
11791 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11792 #endif
11793
11794 #if defined S_ISBLK && defined S_IFCHR
11795 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11796 #endif
11797
11798 #if defined S_ISLNK && defined S_IFREG
11799 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11800 #endif
11801
11802 #if defined S_ISSOCK && defined S_IFREG
11803 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11804 #endif
11805
11806 _ACEOF
11807 if ac_fn_c_try_compile "$LINENO"; then :
11808   ac_cv_header_stat_broken=no
11809 else
11810   ac_cv_header_stat_broken=yes
11811 fi
11812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11813 fi
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11815 $as_echo "$ac_cv_header_stat_broken" >&6; }
11816 if test $ac_cv_header_stat_broken = yes; then
11817
11818 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11819
11820 fi
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840      if test $gl_cv_have_include_next = yes; then
11841        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11842      else
11843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11844 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11845 if ${gl_cv_next_sys_stat_h+:} false; then :
11846   $as_echo_n "(cached) " >&6
11847 else
11848
11849              if test $ac_cv_header_sys_stat_h = yes; then
11850
11851
11852                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h.  */
11854 #include <sys/stat.h>
11855
11856 _ACEOF
11857                                                                                                                         case "$host_os" in
11858                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11859                  *)    gl_absname_cpp="$ac_cpp" ;;
11860                esac
11861
11862                case "$host_os" in
11863                  mingw*)
11864                                                                                                                                      gl_dirsep_regex='[/\\]'
11865                    ;;
11866                  *)
11867                    gl_dirsep_regex='\/'
11868                    ;;
11869                esac
11870                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11871
11872                gl_header_literal_regex=`echo 'sys/stat.h' \
11873                                         | sed -e "$gl_make_literal_regex_sed"`
11874                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11875                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11876                    s|^/[^/]|//&|
11877                    p
11878                    q
11879                  }'
11880                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11881                       sed -n "$gl_absolute_header_sed"`'"'
11882           else
11883                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11884              fi
11885
11886
11887 fi
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11889 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
11890      fi
11891      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11892
11893      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11894        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11895        gl_next_as_first_directive='<'sys/stat.h'>'
11896      else
11897        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11898        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11899      fi
11900      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
11913
11914 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11915
11916   fi
11917
11918       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11919      #include <sys/stat.h>
11920 "
11921 if test "x$ac_cv_type_nlink_t" = xyes; then :
11922
11923 else
11924
11925 $as_echo "#define nlink_t int" >>confdefs.h
11926
11927 fi
11928
11929
11930
11931     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
11932     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11934 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11935 if eval \${$as_gl_Symbol+:} false; then :
11936   $as_echo_n "(cached) " >&6
11937 else
11938   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11939 /* end confdefs.h.  */
11940 #include <sys/stat.h>
11941
11942 int
11943 main ()
11944 {
11945 #undef $gl_func
11946   (void) $gl_func;
11947   ;
11948   return 0;
11949 }
11950 _ACEOF
11951 if ac_fn_c_try_compile "$LINENO"; then :
11952   eval "$as_gl_Symbol=yes"
11953 else
11954   eval "$as_gl_Symbol=no"
11955 fi
11956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11957 fi
11958 eval ac_res=\$$as_gl_Symbol
11959                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11960 $as_echo "$ac_res" >&6; }
11961     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11962   cat >>confdefs.h <<_ACEOF
11963 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11964 _ACEOF
11965
11966                      eval ac_cv_have_decl_$gl_func=yes
11967 fi
11968       done
11969
11970
11971 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
11972 if test "x$ac_cv_have_decl_ftello" = xyes; then :
11973   ac_have_decl=1
11974 else
11975   ac_have_decl=0
11976 fi
11977
11978 cat >>confdefs.h <<_ACEOF
11979 #define HAVE_DECL_FTELLO $ac_have_decl
11980 _ACEOF
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991   if test $ac_cv_have_decl_ftello = no; then
11992     HAVE_DECL_FTELLO=0
11993   fi
11994
11995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
11996 $as_echo_n "checking for ftello... " >&6; }
11997 if ${gl_cv_func_ftello+:} false; then :
11998   $as_echo_n "(cached) " >&6
11999 else
12000
12001       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002 /* end confdefs.h.  */
12003 #include <stdio.h>
12004 int
12005 main ()
12006 {
12007 ftello (stdin);
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012 if ac_fn_c_try_link "$LINENO"; then :
12013   gl_cv_func_ftello=yes
12014 else
12015   gl_cv_func_ftello=no
12016 fi
12017 rm -f core conftest.err conftest.$ac_objext \
12018     conftest$ac_exeext conftest.$ac_ext
12019
12020 fi
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12022 $as_echo "$gl_cv_func_ftello" >&6; }
12023   if test $gl_cv_func_ftello = no; then
12024     HAVE_FTELLO=0
12025   else
12026     if test $WINDOWS_64_BIT_OFF_T = 1; then
12027       REPLACE_FTELLO=1
12028     fi
12029     if test $gl_cv_var_stdin_large_offset = no; then
12030       REPLACE_FTELLO=1
12031     fi
12032     if test $REPLACE_FTELLO = 0; then
12033
12034       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12035 $as_echo_n "checking whether ftello works... " >&6; }
12036 if ${gl_cv_func_ftello_works+:} false; then :
12037   $as_echo_n "(cached) " >&6
12038 else
12039
12040                               case "$host_os" in
12041                       # Guess no on Solaris.
12042             solaris*) gl_cv_func_ftello_works="guessing no" ;;
12043                       # Guess yes otherwise.
12044             *)        gl_cv_func_ftello_works="guessing yes" ;;
12045           esac
12046           if test "$cross_compiling" = yes; then :
12047   :
12048 else
12049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12050 /* end confdefs.h.  */
12051
12052 #include <stdio.h>
12053 #include <stdlib.h>
12054 #include <string.h>
12055 #define TESTFILE "conftest.tmp"
12056 int
12057 main (void)
12058 {
12059   FILE *fp;
12060
12061   /* Create a file with some contents.  */
12062   fp = fopen (TESTFILE, "w");
12063   if (fp == NULL)
12064     return 70;
12065   if (fwrite ("foogarsh", 1, 8, fp) < 8)
12066     return 71;
12067   if (fclose (fp))
12068     return 72;
12069
12070   /* The file's contents is now "foogarsh".  */
12071
12072   /* Try writing after reading to EOF.  */
12073   fp = fopen (TESTFILE, "r+");
12074   if (fp == NULL)
12075     return 73;
12076   if (fseek (fp, -1, SEEK_END))
12077     return 74;
12078   if (!(getc (fp) == 'h'))
12079     return 1;
12080   if (!(getc (fp) == EOF))
12081     return 2;
12082   if (!(ftell (fp) == 8))
12083     return 3;
12084   if (!(ftell (fp) == 8))
12085     return 4;
12086   if (!(putc ('!', fp) == '!'))
12087     return 5;
12088   if (!(ftell (fp) == 9))
12089     return 6;
12090   if (!(fclose (fp) == 0))
12091     return 7;
12092   fp = fopen (TESTFILE, "r");
12093   if (fp == NULL)
12094     return 75;
12095   {
12096     char buf[10];
12097     if (!(fread (buf, 1, 10, fp) == 9))
12098       return 10;
12099     if (!(memcmp (buf, "foogarsh!", 9) == 0))
12100       return 11;
12101   }
12102   if (!(fclose (fp) == 0))
12103     return 12;
12104
12105   /* The file's contents is now "foogarsh!".  */
12106
12107   return 0;
12108 }
12109 _ACEOF
12110 if ac_fn_c_try_run "$LINENO"; then :
12111   gl_cv_func_ftello_works=yes
12112 else
12113   gl_cv_func_ftello_works=no
12114 fi
12115 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12116   conftest.$ac_objext conftest.beam conftest.$ac_ext
12117 fi
12118
12119
12120 fi
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12122 $as_echo "$gl_cv_func_ftello_works" >&6; }
12123       case "$gl_cv_func_ftello_works" in
12124         *yes) ;;
12125         *)
12126           REPLACE_FTELLO=1
12127
12128 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12129
12130           ;;
12131       esac
12132     fi
12133   fi
12134
12135
12136
12137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12138 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12139 if ${gl_cv_func_getcwd_null+:} false; then :
12140   $as_echo_n "(cached) " >&6
12141 else
12142   if test "$cross_compiling" = yes; then :
12143   case "$host_os" in
12144                      # Guess yes on glibc systems.
12145             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
12146                      # Guess yes on Cygwin.
12147             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12148                      # If we don't know, assume the worst.
12149             *)       gl_cv_func_getcwd_null="guessing no";;
12150           esac
12151
12152 else
12153   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154 /* end confdefs.h.  */
12155
12156 #        if HAVE_UNISTD_H
12157 #         include <unistd.h>
12158 #        else /* on Windows with MSVC */
12159 #         include <direct.h>
12160 #        endif
12161 #        ifndef getcwd
12162          char *getcwd ();
12163 #        endif
12164
12165 int
12166 main ()
12167 {
12168
12169 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12170 /* mingw cwd does not start with '/', but getcwd does allocate.
12171    However, mingw fails to honor non-zero size.  */
12172 #else
12173            if (chdir ("/") != 0)
12174              return 1;
12175            else
12176              {
12177                char *f = getcwd (NULL, 0);
12178                if (! f)
12179                  return 2;
12180                if (f[0] != '/')
12181                  return 3;
12182                if (f[1] != '\0')
12183                  return 4;
12184                return 0;
12185              }
12186 #endif
12187
12188   ;
12189   return 0;
12190 }
12191 _ACEOF
12192 if ac_fn_c_try_run "$LINENO"; then :
12193   gl_cv_func_getcwd_null=yes
12194 else
12195   gl_cv_func_getcwd_null=no
12196 fi
12197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12198   conftest.$ac_objext conftest.beam conftest.$ac_ext
12199 fi
12200
12201 fi
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12203 $as_echo "$gl_cv_func_getcwd_null" >&6; }
12204
12205
12206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12207 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
12208 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
12209   $as_echo_n "(cached) " >&6
12210 else
12211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12212 /* end confdefs.h.  */
12213 #include <unistd.h>
12214 int
12215 main ()
12216 {
12217 extern
12218            #ifdef __cplusplus
12219            "C"
12220            #endif
12221            char *getcwd (char *, size_t);
12222
12223   ;
12224   return 0;
12225 }
12226
12227 _ACEOF
12228 if ac_fn_c_try_compile "$LINENO"; then :
12229   gl_cv_func_getcwd_posix_signature=yes
12230 else
12231   gl_cv_func_getcwd_posix_signature=no
12232 fi
12233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12234
12235 fi
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12237 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256      if test $gl_cv_have_include_next = yes; then
12257        gl_cv_next_getopt_h='<'getopt.h'>'
12258      else
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12260 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
12261 if ${gl_cv_next_getopt_h+:} false; then :
12262   $as_echo_n "(cached) " >&6
12263 else
12264
12265              if test $ac_cv_header_getopt_h = yes; then
12266
12267
12268                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12269 /* end confdefs.h.  */
12270 #include <getopt.h>
12271
12272 _ACEOF
12273                                                                                                                         case "$host_os" in
12274                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12275                  *)    gl_absname_cpp="$ac_cpp" ;;
12276                esac
12277
12278                case "$host_os" in
12279                  mingw*)
12280                                                                                                                                      gl_dirsep_regex='[/\\]'
12281                    ;;
12282                  *)
12283                    gl_dirsep_regex='\/'
12284                    ;;
12285                esac
12286                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12287
12288                gl_header_literal_regex=`echo 'getopt.h' \
12289                                         | sed -e "$gl_make_literal_regex_sed"`
12290                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12291                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12292                    s|^/[^/]|//&|
12293                    p
12294                    q
12295                  }'
12296                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12297                       sed -n "$gl_absolute_header_sed"`'"'
12298           else
12299                gl_cv_next_getopt_h='<'getopt.h'>'
12300              fi
12301
12302
12303 fi
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12305 $as_echo "$gl_cv_next_getopt_h" >&6; }
12306      fi
12307      NEXT_GETOPT_H=$gl_cv_next_getopt_h
12308
12309      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12310        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12311        gl_next_as_first_directive='<'getopt.h'>'
12312      else
12313        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12314        gl_next_as_first_directive=$gl_cv_next_getopt_h
12315      fi
12316      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12317
12318
12319
12320
12321   if test $ac_cv_header_getopt_h = yes; then
12322     HAVE_GETOPT_H=1
12323   else
12324     HAVE_GETOPT_H=0
12325   fi
12326
12327
12328   gl_replace_getopt=
12329
12330     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12331     for ac_header in getopt.h
12332 do :
12333   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12334 if test "x$ac_cv_header_getopt_h" = xyes; then :
12335   cat >>confdefs.h <<_ACEOF
12336 #define HAVE_GETOPT_H 1
12337 _ACEOF
12338
12339 else
12340   gl_replace_getopt=yes
12341 fi
12342
12343 done
12344
12345   fi
12346
12347     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12348     for ac_func in getopt_long_only
12349 do :
12350   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12351 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12352   cat >>confdefs.h <<_ACEOF
12353 #define HAVE_GETOPT_LONG_ONLY 1
12354 _ACEOF
12355
12356 else
12357   gl_replace_getopt=yes
12358 fi
12359 done
12360
12361   fi
12362
12363                     if test -z "$gl_replace_getopt"; then
12364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12365 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
12366 if ${gl_cv_func_getopt_posix+:} false; then :
12367   $as_echo_n "(cached) " >&6
12368 else
12369
12370                                                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h.  */
12372 #include <unistd.h>
12373 int
12374 main ()
12375 {
12376 int *p = &optreset; return optreset;
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 if ac_fn_c_try_link "$LINENO"; then :
12382   gl_optind_min=1
12383 else
12384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385 /* end confdefs.h.  */
12386 #include <getopt.h>
12387 int
12388 main ()
12389 {
12390 return !getopt_clip;
12391   ;
12392   return 0;
12393 }
12394 _ACEOF
12395 if ac_fn_c_try_compile "$LINENO"; then :
12396   gl_optind_min=1
12397 else
12398   gl_optind_min=0
12399 fi
12400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12401 fi
12402 rm -f core conftest.err conftest.$ac_objext \
12403     conftest$ac_exeext conftest.$ac_ext
12404
12405                 gl_save_CPPFLAGS=$CPPFLAGS
12406         CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
12407         if test "$cross_compiling" = yes; then :
12408   case "$host_os" in
12409              mingw*)         gl_cv_func_getopt_posix="guessing no";;
12410              darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
12411              *)              gl_cv_func_getopt_posix="guessing yes";;
12412            esac
12413
12414 else
12415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416 /* end confdefs.h.  */
12417
12418 #include <unistd.h>
12419 #include <stdlib.h>
12420 #include <string.h>
12421
12422 int
12423 main ()
12424 {
12425   {
12426     static char program[] = "program";
12427     static char a[] = "-a";
12428     static char foo[] = "foo";
12429     static char bar[] = "bar";
12430     char *argv[] = { program, a, foo, bar, NULL };
12431     int c;
12432
12433     optind = OPTIND_MIN;
12434     opterr = 0;
12435
12436     c = getopt (4, argv, "ab");
12437     if (!(c == 'a'))
12438       return 1;
12439     c = getopt (4, argv, "ab");
12440     if (!(c == -1))
12441       return 2;
12442     if (!(optind == 2))
12443       return 3;
12444   }
12445   /* Some internal state exists at this point.  */
12446   {
12447     static char program[] = "program";
12448     static char donald[] = "donald";
12449     static char p[] = "-p";
12450     static char billy[] = "billy";
12451     static char duck[] = "duck";
12452     static char a[] = "-a";
12453     static char bar[] = "bar";
12454     char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12455     int c;
12456
12457     optind = OPTIND_MIN;
12458     opterr = 0;
12459
12460     c = getopt (7, argv, "+abp:q:");
12461     if (!(c == -1))
12462       return 4;
12463     if (!(strcmp (argv[0], "program") == 0))
12464       return 5;
12465     if (!(strcmp (argv[1], "donald") == 0))
12466       return 6;
12467     if (!(strcmp (argv[2], "-p") == 0))
12468       return 7;
12469     if (!(strcmp (argv[3], "billy") == 0))
12470       return 8;
12471     if (!(strcmp (argv[4], "duck") == 0))
12472       return 9;
12473     if (!(strcmp (argv[5], "-a") == 0))
12474       return 10;
12475     if (!(strcmp (argv[6], "bar") == 0))
12476       return 11;
12477     if (!(optind == 1))
12478       return 12;
12479   }
12480   /* Detect MacOS 10.5, AIX 7.1 bug.  */
12481   {
12482     static char program[] = "program";
12483     static char ab[] = "-ab";
12484     char *argv[3] = { program, ab, NULL };
12485     optind = OPTIND_MIN;
12486     opterr = 0;
12487     if (getopt (2, argv, "ab:") != 'a')
12488       return 13;
12489     if (getopt (2, argv, "ab:") != '?')
12490       return 14;
12491     if (optopt != 'b')
12492       return 15;
12493     if (optind != 2)
12494       return 16;
12495   }
12496
12497   return 0;
12498 }
12499
12500 _ACEOF
12501 if ac_fn_c_try_run "$LINENO"; then :
12502   gl_cv_func_getopt_posix=yes
12503 else
12504   gl_cv_func_getopt_posix=no
12505 fi
12506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12507   conftest.$ac_objext conftest.beam conftest.$ac_ext
12508 fi
12509
12510         CPPFLAGS=$gl_save_CPPFLAGS
12511
12512 fi
12513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12514 $as_echo "$gl_cv_func_getopt_posix" >&6; }
12515     case "$gl_cv_func_getopt_posix" in
12516       *no) gl_replace_getopt=yes ;;
12517     esac
12518   fi
12519
12520   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12522 $as_echo_n "checking for working GNU getopt function... " >&6; }
12523 if ${gl_cv_func_getopt_gnu+:} false; then :
12524   $as_echo_n "(cached) " >&6
12525 else
12526   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12527        # optstring is necessary for programs like m4 that have POSIX-mandated
12528        # semantics for supporting options interspersed with files.
12529        # Also, since getopt_long is a GNU extension, we require optind=0.
12530        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12531        # so take care to revert to the correct (non-)export state.
12532        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12533        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12534          xx) gl_had_POSIXLY_CORRECT=exported ;;
12535          x)  gl_had_POSIXLY_CORRECT=yes      ;;
12536          *)  gl_had_POSIXLY_CORRECT=         ;;
12537        esac
12538        POSIXLY_CORRECT=1
12539        export POSIXLY_CORRECT
12540        if test "$cross_compiling" = yes; then :
12541            case $host_os:$ac_cv_have_decl_optreset in
12542            *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
12543            *:yes)               gl_cv_func_getopt_gnu=no;;
12544            *)                   gl_cv_func_getopt_gnu=yes;;
12545          esac
12546
12547 else
12548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12549 /* end confdefs.h.  */
12550 #include <getopt.h>
12551                            #include <stddef.h>
12552                            #include <string.h>
12553
12554 #include <stdlib.h>
12555 #if defined __MACH__ && defined __APPLE__
12556 /* Avoid a crash on MacOS X.  */
12557 #include <mach/mach.h>
12558 #include <mach/mach_error.h>
12559 #include <mach/thread_status.h>
12560 #include <mach/exception.h>
12561 #include <mach/task.h>
12562 #include <pthread.h>
12563 /* The exception port on which our thread listens.  */
12564 static mach_port_t our_exception_port;
12565 /* The main function of the thread listening for exceptions of type
12566    EXC_BAD_ACCESS.  */
12567 static void *
12568 mach_exception_thread (void *arg)
12569 {
12570   /* Buffer for a message to be received.  */
12571   struct {
12572     mach_msg_header_t head;
12573     mach_msg_body_t msgh_body;
12574     char data[1024];
12575   } msg;
12576   mach_msg_return_t retval;
12577   /* Wait for a message on the exception port.  */
12578   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12579                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12580   if (retval != MACH_MSG_SUCCESS)
12581     abort ();
12582   exit (1);
12583 }
12584 static void
12585 nocrash_init (void)
12586 {
12587   mach_port_t self = mach_task_self ();
12588   /* Allocate a port on which the thread shall listen for exceptions.  */
12589   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12590       == KERN_SUCCESS) {
12591     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
12592     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12593                                 MACH_MSG_TYPE_MAKE_SEND)
12594         == KERN_SUCCESS) {
12595       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
12596          for us.  */
12597       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12598       /* Create the thread listening on the exception port.  */
12599       pthread_attr_t attr;
12600       pthread_t thread;
12601       if (pthread_attr_init (&attr) == 0
12602           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12603           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12604         pthread_attr_destroy (&attr);
12605         /* Replace the exception port info for these exceptions with our own.
12606            Note that we replace the exception port for the entire task, not only
12607            for a particular thread.  This has the effect that when our exception
12608            port gets the message, the thread specific exception port has already
12609            been asked, and we don't need to bother about it.
12610            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
12611         task_set_exception_ports (self, mask, our_exception_port,
12612                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12613       }
12614     }
12615   }
12616 }
12617 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12618 /* Avoid a crash on native Windows.  */
12619 #define WIN32_LEAN_AND_MEAN
12620 #include <windows.h>
12621 #include <winerror.h>
12622 static LONG WINAPI
12623 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12624 {
12625   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12626     {
12627     case EXCEPTION_ACCESS_VIOLATION:
12628     case EXCEPTION_IN_PAGE_ERROR:
12629     case EXCEPTION_STACK_OVERFLOW:
12630     case EXCEPTION_GUARD_PAGE:
12631     case EXCEPTION_PRIV_INSTRUCTION:
12632     case EXCEPTION_ILLEGAL_INSTRUCTION:
12633     case EXCEPTION_DATATYPE_MISALIGNMENT:
12634     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12635     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12636       exit (1);
12637     }
12638   return EXCEPTION_CONTINUE_SEARCH;
12639 }
12640 static void
12641 nocrash_init (void)
12642 {
12643   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12644 }
12645 #else
12646 /* Avoid a crash on POSIX systems.  */
12647 #include <signal.h>
12648 /* A POSIX signal handler.  */
12649 static void
12650 exception_handler (int sig)
12651 {
12652   exit (1);
12653 }
12654 static void
12655 nocrash_init (void)
12656 {
12657 #ifdef SIGSEGV
12658   signal (SIGSEGV, exception_handler);
12659 #endif
12660 #ifdef SIGBUS
12661   signal (SIGBUS, exception_handler);
12662 #endif
12663 }
12664 #endif
12665
12666
12667 int
12668 main ()
12669 {
12670
12671              int result = 0;
12672
12673              nocrash_init();
12674
12675              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12676                 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12677                 OSF/1 5.1, Solaris 10.  */
12678              {
12679                static char conftest[] = "conftest";
12680                static char plus[] = "-+";
12681                char *argv[3] = { conftest, plus, NULL };
12682                opterr = 0;
12683                if (getopt (2, argv, "+a") != '?')
12684                  result |= 1;
12685              }
12686              /* This code succeeds on glibc 2.8, mingw,
12687                 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12688                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
12689              {
12690                static char program[] = "program";
12691                static char p[] = "-p";
12692                static char foo[] = "foo";
12693                static char bar[] = "bar";
12694                char *argv[] = { program, p, foo, bar, NULL };
12695
12696                optind = 1;
12697                if (getopt (4, argv, "p::") != 'p')
12698                  result |= 2;
12699                else if (optarg != NULL)
12700                  result |= 4;
12701                else if (getopt (4, argv, "p::") != -1)
12702                  result |= 6;
12703                else if (optind != 2)
12704                  result |= 8;
12705              }
12706              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
12707              {
12708                static char program[] = "program";
12709                static char foo[] = "foo";
12710                static char p[] = "-p";
12711                char *argv[] = { program, foo, p, NULL };
12712                optind = 0;
12713                if (getopt (3, argv, "-p") != 1)
12714                  result |= 16;
12715                else if (getopt (3, argv, "-p") != 'p')
12716                  result |= 32;
12717              }
12718              /* This code fails on glibc 2.11.  */
12719              {
12720                static char program[] = "program";
12721                static char b[] = "-b";
12722                static char a[] = "-a";
12723                char *argv[] = { program, b, a, NULL };
12724                optind = opterr = 0;
12725                if (getopt (3, argv, "+:a:b") != 'b')
12726                  result |= 64;
12727                else if (getopt (3, argv, "+:a:b") != ':')
12728                  result |= 64;
12729              }
12730              /* This code dumps core on glibc 2.14.  */
12731              {
12732                static char program[] = "program";
12733                static char w[] = "-W";
12734                static char dummy[] = "dummy";
12735                char *argv[] = { program, w, dummy, NULL };
12736                optind = opterr = 1;
12737                if (getopt (3, argv, "W;") != 'W')
12738                  result |= 128;
12739              }
12740              return result;
12741
12742   ;
12743   return 0;
12744 }
12745 _ACEOF
12746 if ac_fn_c_try_run "$LINENO"; then :
12747   gl_cv_func_getopt_gnu=yes
12748 else
12749   gl_cv_func_getopt_gnu=no
12750 fi
12751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12752   conftest.$ac_objext conftest.beam conftest.$ac_ext
12753 fi
12754
12755        case $gl_had_POSIXLY_CORRECT in
12756          exported) ;;
12757          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12758          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12759        esac
12760
12761 fi
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12763 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
12764     if test "$gl_cv_func_getopt_gnu" = "no"; then
12765       gl_replace_getopt=yes
12766     fi
12767   fi
12768
12769
12770
12771
12772
12773     REPLACE_GETOPT=0
12774
12775
12776   if test -n "$gl_replace_getopt"; then :
12777
12778       REPLACE_GETOPT=1
12779
12780 fi
12781
12782
12783   if test $REPLACE_GETOPT = 1; then
12784
12785   GETOPT_H=getopt.h
12786
12787 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12788
12789
12790
12791   fi
12792
12793 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12794 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12795   ac_have_decl=1
12796 else
12797   ac_have_decl=0
12798 fi
12799
12800 cat >>confdefs.h <<_ACEOF
12801 #define HAVE_DECL_GETENV $ac_have_decl
12802 _ACEOF
12803
12804
12805
12806
12807
12808
12809
12810
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12812 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12813 if ${ac_cv_c_restrict+:} false; then :
12814   $as_echo_n "(cached) " >&6
12815 else
12816   ac_cv_c_restrict=no
12817    # The order here caters to the fact that C++ does not require restrict.
12818    for ac_kw in __restrict __restrict__ _Restrict restrict; do
12819      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820 /* end confdefs.h.  */
12821 typedef int * int_ptr;
12822         int foo (int_ptr $ac_kw ip) {
12823         return ip[0];
12824        }
12825 int
12826 main ()
12827 {
12828 int s[1];
12829         int * $ac_kw t = s;
12830         t[0] = 0;
12831         return foo(t)
12832   ;
12833   return 0;
12834 }
12835 _ACEOF
12836 if ac_fn_c_try_compile "$LINENO"; then :
12837   ac_cv_c_restrict=$ac_kw
12838 fi
12839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12840      test "$ac_cv_c_restrict" != no && break
12841    done
12842
12843 fi
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12845 $as_echo "$ac_cv_c_restrict" >&6; }
12846
12847  case $ac_cv_c_restrict in
12848    restrict) ;;
12849    no) $as_echo "#define restrict /**/" >>confdefs.h
12850  ;;
12851    *)  cat >>confdefs.h <<_ACEOF
12852 #define restrict $ac_cv_c_restrict
12853 _ACEOF
12854  ;;
12855  esac
12856
12857
12858   GNULIB_GETTIMEOFDAY=0;
12859     HAVE_GETTIMEOFDAY=1;
12860   HAVE_STRUCT_TIMEVAL=1;
12861   HAVE_SYS_TIME_H=1;
12862   REPLACE_GETTIMEOFDAY=0;
12863   REPLACE_STRUCT_TIMEVAL=0;
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880      if test $gl_cv_have_include_next = yes; then
12881        gl_cv_next_sys_time_h='<'sys/time.h'>'
12882      else
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12884 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12885 if ${gl_cv_next_sys_time_h+:} false; then :
12886   $as_echo_n "(cached) " >&6
12887 else
12888
12889              if test $ac_cv_header_sys_time_h = yes; then
12890
12891
12892                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893 /* end confdefs.h.  */
12894 #include <sys/time.h>
12895
12896 _ACEOF
12897                                                                                                                         case "$host_os" in
12898                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12899                  *)    gl_absname_cpp="$ac_cpp" ;;
12900                esac
12901
12902                case "$host_os" in
12903                  mingw*)
12904                                                                                                                                      gl_dirsep_regex='[/\\]'
12905                    ;;
12906                  *)
12907                    gl_dirsep_regex='\/'
12908                    ;;
12909                esac
12910                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12911
12912                gl_header_literal_regex=`echo 'sys/time.h' \
12913                                         | sed -e "$gl_make_literal_regex_sed"`
12914                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12915                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12916                    s|^/[^/]|//&|
12917                    p
12918                    q
12919                  }'
12920                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12921                       sed -n "$gl_absolute_header_sed"`'"'
12922           else
12923                gl_cv_next_sys_time_h='<'sys/time.h'>'
12924              fi
12925
12926
12927 fi
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12929 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12930      fi
12931      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12932
12933      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12934        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12935        gl_next_as_first_directive='<'sys/time.h'>'
12936      else
12937        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12938        gl_next_as_first_directive=$gl_cv_next_sys_time_h
12939      fi
12940      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12941
12942
12943
12944
12945
12946   if test $ac_cv_header_sys_time_h != yes; then
12947     HAVE_SYS_TIME_H=0
12948   fi
12949
12950
12951
12952
12953
12954   if test $ac_cv_header_sys_socket_h != yes; then
12955                     for ac_header in winsock2.h
12956 do :
12957   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12958 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12959   cat >>confdefs.h <<_ACEOF
12960 #define HAVE_WINSOCK2_H 1
12961 _ACEOF
12962
12963 fi
12964
12965 done
12966
12967   fi
12968   if test "$ac_cv_header_winsock2_h" = yes; then
12969     HAVE_WINSOCK2_H=1
12970     UNISTD_H_HAVE_WINSOCK2_H=1
12971     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12972   else
12973     HAVE_WINSOCK2_H=0
12974   fi
12975
12976
12977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12978 $as_echo_n "checking for struct timeval... " >&6; }
12979 if ${gl_cv_sys_struct_timeval+:} false; then :
12980   $as_echo_n "(cached) " >&6
12981 else
12982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h.  */
12984 #if HAVE_SYS_TIME_H
12985              #include <sys/time.h>
12986             #endif
12987             #include <time.h>
12988             #if HAVE_WINSOCK2_H
12989             # include <winsock2.h>
12990             #endif
12991
12992 int
12993 main ()
12994 {
12995 static struct timeval x; x.tv_sec = x.tv_usec;
12996   ;
12997   return 0;
12998 }
12999 _ACEOF
13000 if ac_fn_c_try_compile "$LINENO"; then :
13001   gl_cv_sys_struct_timeval=yes
13002 else
13003   gl_cv_sys_struct_timeval=no
13004 fi
13005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13006
13007 fi
13008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13009 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
13010   if test $gl_cv_sys_struct_timeval != yes; then
13011     HAVE_STRUCT_TIMEVAL=0
13012   else
13013                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct struct timeval.tv_sec member" >&5
13014 $as_echo_n "checking for correct struct timeval.tv_sec member... " >&6; }
13015 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13016   $as_echo_n "(cached) " >&6
13017 else
13018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13019 /* end confdefs.h.  */
13020 #if HAVE_SYS_TIME_H
13021                #include <sys/time.h>
13022               #endif
13023               #include <time.h>
13024               #if HAVE_WINSOCK2_H
13025               # include <winsock2.h>
13026               #endif
13027
13028 int
13029 main ()
13030 {
13031 static struct timeval x;
13032               typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1];
13033
13034   ;
13035   return 0;
13036 }
13037 _ACEOF
13038 if ac_fn_c_try_compile "$LINENO"; then :
13039   gl_cv_sys_struct_timeval_tv_sec=yes
13040 else
13041   gl_cv_sys_struct_timeval_tv_sec=no
13042 fi
13043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044
13045 fi
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13047 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13048     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13049       REPLACE_STRUCT_TIMEVAL=1
13050     fi
13051   fi
13052
13053
13054     for gl_func in gettimeofday; do
13055     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13056     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13057 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13058 if eval \${$as_gl_Symbol+:} false; then :
13059   $as_echo_n "(cached) " >&6
13060 else
13061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13062 /* end confdefs.h.  */
13063
13064 #if HAVE_SYS_TIME_H
13065 # include <sys/time.h>
13066 #endif
13067 #include <time.h>
13068
13069 int
13070 main ()
13071 {
13072 #undef $gl_func
13073   (void) $gl_func;
13074   ;
13075   return 0;
13076 }
13077 _ACEOF
13078 if ac_fn_c_try_compile "$LINENO"; then :
13079   eval "$as_gl_Symbol=yes"
13080 else
13081   eval "$as_gl_Symbol=no"
13082 fi
13083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13084 fi
13085 eval ac_res=\$$as_gl_Symbol
13086                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13087 $as_echo "$ac_res" >&6; }
13088     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13089   cat >>confdefs.h <<_ACEOF
13090 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13091 _ACEOF
13092
13093                      eval ac_cv_have_decl_$gl_func=yes
13094 fi
13095       done
13096
13097
13098
13099
13100
13101
13102   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13103 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
13104 if ${gl_cv_cc_float_expbit0+:} false; then :
13105   $as_echo_n "(cached) " >&6
13106 else
13107
13108       if test "$cross_compiling" = yes; then :
13109   gl_cv_cc_float_expbit0="word 0 bit 23"
13110 else
13111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h.  */
13113
13114 #include <float.h>
13115 #include <stddef.h>
13116 #include <stdio.h>
13117 #include <string.h>
13118 #define NWORDS \
13119   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13120 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13121 static unsigned int ored_words[NWORDS];
13122 static unsigned int anded_words[NWORDS];
13123 static void add_to_ored_words (float x)
13124 {
13125   memory_float m;
13126   size_t i;
13127   /* Clear it first, in case
13128      sizeof (float) < sizeof (memory_float).  */
13129   memset (&m, 0, sizeof (memory_float));
13130   m.value = x;
13131   for (i = 0; i < NWORDS; i++)
13132     {
13133       ored_words[i] |= m.word[i];
13134       anded_words[i] &= m.word[i];
13135     }
13136 }
13137 int main ()
13138 {
13139   size_t j;
13140   FILE *fp = fopen ("conftest.out", "w");
13141   if (fp == NULL)
13142     return 1;
13143   for (j = 0; j < NWORDS; j++)
13144     anded_words[j] = ~ (unsigned int) 0;
13145   add_to_ored_words (0.25f);
13146   add_to_ored_words (0.5f);
13147   add_to_ored_words (1.0f);
13148   add_to_ored_words (2.0f);
13149   add_to_ored_words (4.0f);
13150   /* Remove bits that are common (e.g. if representation of the first mantissa
13151      bit is explicit).  */
13152   for (j = 0; j < NWORDS; j++)
13153     ored_words[j] &= ~anded_words[j];
13154   /* Now find the nonzero word.  */
13155   for (j = 0; j < NWORDS; j++)
13156     if (ored_words[j] != 0)
13157       break;
13158   if (j < NWORDS)
13159     {
13160       size_t i;
13161       for (i = j + 1; i < NWORDS; i++)
13162         if (ored_words[i] != 0)
13163           {
13164             fprintf (fp, "unknown");
13165             return (fclose (fp) != 0);
13166           }
13167       for (i = 0; ; i++)
13168         if ((ored_words[j] >> i) & 1)
13169           {
13170             fprintf (fp, "word %d bit %d", (int) j, (int) i);
13171             return (fclose (fp) != 0);
13172           }
13173     }
13174   fprintf (fp, "unknown");
13175   return (fclose (fp) != 0);
13176 }
13177
13178 _ACEOF
13179 if ac_fn_c_try_run "$LINENO"; then :
13180   gl_cv_cc_float_expbit0=`cat conftest.out`
13181 else
13182   gl_cv_cc_float_expbit0="unknown"
13183 fi
13184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13185   conftest.$ac_objext conftest.beam conftest.$ac_ext
13186 fi
13187
13188       rm -f conftest.out
13189
13190 fi
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13192 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
13193   case "$gl_cv_cc_float_expbit0" in
13194     word*bit*)
13195       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13196       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13197
13198 cat >>confdefs.h <<_ACEOF
13199 #define FLT_EXPBIT0_WORD $word
13200 _ACEOF
13201
13202
13203 cat >>confdefs.h <<_ACEOF
13204 #define FLT_EXPBIT0_BIT $bit
13205 _ACEOF
13206
13207       ;;
13208   esac
13209
13210
13211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13212 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13213 if ${am_cv_langinfo_codeset+:} false; then :
13214   $as_echo_n "(cached) " >&6
13215 else
13216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h.  */
13218 #include <langinfo.h>
13219 int
13220 main ()
13221 {
13222 char* cs = nl_langinfo(CODESET); return !cs;
13223   ;
13224   return 0;
13225 }
13226 _ACEOF
13227 if ac_fn_c_try_link "$LINENO"; then :
13228   am_cv_langinfo_codeset=yes
13229 else
13230   am_cv_langinfo_codeset=no
13231 fi
13232 rm -f core conftest.err conftest.$ac_objext \
13233     conftest$ac_exeext conftest.$ac_ext
13234
13235 fi
13236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13237 $as_echo "$am_cv_langinfo_codeset" >&6; }
13238   if test $am_cv_langinfo_codeset = yes; then
13239
13240 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13241
13242   fi
13243
13244 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13245 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13246   ac_have_decl=1
13247 else
13248   ac_have_decl=0
13249 fi
13250
13251 cat >>confdefs.h <<_ACEOF
13252 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13253 _ACEOF
13254
13255
13256     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13257 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13258 if ${ac_cv_gnu_library_2_1+:} false; then :
13259   $as_echo_n "(cached) " >&6
13260 else
13261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262 /* end confdefs.h.  */
13263
13264 #include <features.h>
13265 #ifdef __GNU_LIBRARY__
13266  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13267   Lucky GNU user
13268  #endif
13269 #endif
13270 #ifdef __UCLIBC__
13271  Lucky user
13272 #endif
13273
13274 _ACEOF
13275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13276   $EGREP "Lucky" >/dev/null 2>&1; then :
13277   ac_cv_gnu_library_2_1=yes
13278 else
13279   ac_cv_gnu_library_2_1=no
13280 fi
13281 rm -f conftest*
13282
13283
13284
13285 fi
13286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13287 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13288
13289     GLIBC21="$ac_cv_gnu_library_2_1"
13290
13291
13292
13293       if test "X$prefix" = "XNONE"; then
13294     acl_final_prefix="$ac_default_prefix"
13295   else
13296     acl_final_prefix="$prefix"
13297   fi
13298   if test "X$exec_prefix" = "XNONE"; then
13299     acl_final_exec_prefix='${prefix}'
13300   else
13301     acl_final_exec_prefix="$exec_prefix"
13302   fi
13303   acl_save_prefix="$prefix"
13304   prefix="$acl_final_prefix"
13305   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13306   prefix="$acl_save_prefix"
13307
13308
13309 # Check whether --with-gnu-ld was given.
13310 if test "${with_gnu_ld+set}" = set; then :
13311   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13312 else
13313   with_gnu_ld=no
13314 fi
13315
13316 # Prepare PATH_SEPARATOR.
13317 # The user is always right.
13318 if test "${PATH_SEPARATOR+set}" != set; then
13319   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13320   # contains only /bin. Note that ksh looks also at the FPATH variable,
13321   # so we have to set that as well for the test.
13322   PATH_SEPARATOR=:
13323   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13324     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13325            || PATH_SEPARATOR=';'
13326        }
13327 fi
13328 ac_prog=ld
13329 if test "$GCC" = yes; then
13330   # Check if gcc -print-prog-name=ld gives a path.
13331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
13332 $as_echo_n "checking for ld used by GCC... " >&6; }
13333   case $host in
13334   *-*-mingw*)
13335     # gcc leaves a trailing carriage return which upsets mingw
13336     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13337   *)
13338     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13339   esac
13340   case $ac_prog in
13341     # Accept absolute paths.
13342     [\\/]* | [A-Za-z]:[\\/]*)
13343       re_direlt='/[^/][^/]*/\.\./'
13344       # Canonicalize the path of ld
13345       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
13346       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
13347         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13348       done
13349       test -z "$LD" && LD="$ac_prog"
13350       ;;
13351   "")
13352     # If it fails, then pretend we aren't using GCC.
13353     ac_prog=ld
13354     ;;
13355   *)
13356     # If it is relative, then search for the first ld in PATH.
13357     with_gnu_ld=unknown
13358     ;;
13359   esac
13360 elif test "$with_gnu_ld" = yes; then
13361   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13362 $as_echo_n "checking for GNU ld... " >&6; }
13363 else
13364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13365 $as_echo_n "checking for non-GNU ld... " >&6; }
13366 fi
13367 if ${acl_cv_path_LD+:} false; then :
13368   $as_echo_n "(cached) " >&6
13369 else
13370   if test -z "$LD"; then
13371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
13372   for ac_dir in $PATH; do
13373     test -z "$ac_dir" && ac_dir=.
13374     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13375       acl_cv_path_LD="$ac_dir/$ac_prog"
13376       # Check to see if the program is GNU ld.  I'd rather use --version,
13377       # but apparently some GNU ld's only accept -v.
13378       # Break only if it was the GNU/non-GNU ld that we prefer.
13379       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
13380       *GNU* | *'with BFD'*)
13381         test "$with_gnu_ld" != no && break ;;
13382       *)
13383         test "$with_gnu_ld" != yes && break ;;
13384       esac
13385     fi
13386   done
13387   IFS="$ac_save_ifs"
13388 else
13389   acl_cv_path_LD="$LD" # Let the user override the test with a path.
13390 fi
13391 fi
13392
13393 LD="$acl_cv_path_LD"
13394 if test -n "$LD"; then
13395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13396 $as_echo "$LD" >&6; }
13397 else
13398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13399 $as_echo "no" >&6; }
13400 fi
13401 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13403 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
13404 if ${acl_cv_prog_gnu_ld+:} false; then :
13405   $as_echo_n "(cached) " >&6
13406 else
13407   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13408 case `$LD -v 2>&1 </dev/null` in
13409 *GNU* | *'with BFD'*)
13410   acl_cv_prog_gnu_ld=yes ;;
13411 *)
13412   acl_cv_prog_gnu_ld=no ;;
13413 esac
13414 fi
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13416 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
13417 with_gnu_ld=$acl_cv_prog_gnu_ld
13418
13419
13420
13421
13422                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13423 $as_echo_n "checking for shared library run path origin... " >&6; }
13424 if ${acl_cv_rpath+:} false; then :
13425   $as_echo_n "(cached) " >&6
13426 else
13427
13428     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13429     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13430     . ./conftest.sh
13431     rm -f ./conftest.sh
13432     acl_cv_rpath=done
13433
13434 fi
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13436 $as_echo "$acl_cv_rpath" >&6; }
13437   wl="$acl_cv_wl"
13438   acl_libext="$acl_cv_libext"
13439   acl_shlibext="$acl_cv_shlibext"
13440   acl_libname_spec="$acl_cv_libname_spec"
13441   acl_library_names_spec="$acl_cv_library_names_spec"
13442   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13443   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13444   acl_hardcode_direct="$acl_cv_hardcode_direct"
13445   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13446     # Check whether --enable-rpath was given.
13447 if test "${enable_rpath+set}" = set; then :
13448   enableval=$enable_rpath; :
13449 else
13450   enable_rpath=yes
13451 fi
13452
13453
13454
13455
13456   acl_libdirstem=lib
13457   acl_libdirstem2=
13458   case "$host_os" in
13459     solaris*)
13460                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
13461 $as_echo_n "checking for 64-bit host... " >&6; }
13462 if ${gl_cv_solaris_64bit+:} false; then :
13463   $as_echo_n "(cached) " >&6
13464 else
13465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13466 /* end confdefs.h.  */
13467
13468 #ifdef _LP64
13469 sixtyfour bits
13470 #endif
13471
13472 _ACEOF
13473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13474   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
13475   gl_cv_solaris_64bit=yes
13476 else
13477   gl_cv_solaris_64bit=no
13478 fi
13479 rm -f conftest*
13480
13481
13482 fi
13483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
13484 $as_echo "$gl_cv_solaris_64bit" >&6; }
13485       if test $gl_cv_solaris_64bit = yes; then
13486         acl_libdirstem=lib/64
13487         case "$host_cpu" in
13488           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
13489           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
13490         esac
13491       fi
13492       ;;
13493     *)
13494       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
13495       if test -n "$searchpath"; then
13496         acl_save_IFS="${IFS=    }"; IFS=":"
13497         for searchdir in $searchpath; do
13498           if test -d "$searchdir"; then
13499             case "$searchdir" in
13500               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13501               */../ | */.. )
13502                 # Better ignore directories of this form. They are misleading.
13503                 ;;
13504               *) searchdir=`cd "$searchdir" && pwd`
13505                  case "$searchdir" in
13506                    */lib64 ) acl_libdirstem=lib64 ;;
13507                  esac ;;
13508             esac
13509           fi
13510         done
13511         IFS="$acl_save_IFS"
13512       fi
13513       ;;
13514   esac
13515   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
13516
13517
13518
13519   gl_threads_api=none
13520   LIBTHREAD=
13521   LTLIBTHREAD=
13522   LIBMULTITHREAD=
13523   LTLIBMULTITHREAD=
13524   if test "$gl_use_threads" != no; then
13525         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13526 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13527 if ${gl_cv_have_weak+:} false; then :
13528   $as_echo_n "(cached) " >&6
13529 else
13530   gl_cv_have_weak=no
13531               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532 /* end confdefs.h.  */
13533 extern void xyzzy ();
13534 #pragma weak xyzzy
13535 int
13536 main ()
13537 {
13538 xyzzy();
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 if ac_fn_c_try_link "$LINENO"; then :
13544   gl_cv_have_weak=maybe
13545 fi
13546 rm -f core conftest.err conftest.$ac_objext \
13547     conftest$ac_exeext conftest.$ac_ext
13548        if test $gl_cv_have_weak = maybe; then
13549                            if test "$cross_compiling" = yes; then :
13550                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13551 /* end confdefs.h.  */
13552 #ifdef __ELF__
13553                Extensible Linking Format
13554                #endif
13555
13556 _ACEOF
13557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13558   $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13559   gl_cv_have_weak="guessing yes"
13560 else
13561   gl_cv_have_weak="guessing no"
13562 fi
13563 rm -f conftest*
13564
13565
13566 else
13567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568 /* end confdefs.h.  */
13569
13570 #include <stdio.h>
13571 #pragma weak fputs
13572 int main ()
13573 {
13574   return (fputs == NULL);
13575 }
13576 _ACEOF
13577 if ac_fn_c_try_run "$LINENO"; then :
13578   gl_cv_have_weak=yes
13579 else
13580   gl_cv_have_weak=no
13581 fi
13582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13583   conftest.$ac_objext conftest.beam conftest.$ac_ext
13584 fi
13585
13586        fi
13587
13588 fi
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13590 $as_echo "$gl_cv_have_weak" >&6; }
13591     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
13592       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13593       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
13594       ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13595 if test "x$ac_cv_header_pthread_h" = xyes; then :
13596   gl_have_pthread_h=yes
13597 else
13598   gl_have_pthread_h=no
13599 fi
13600
13601
13602       if test "$gl_have_pthread_h" = yes; then
13603         # Other possible tests:
13604         #   -lpthreads (FSU threads, PCthreads)
13605         #   -lgthreads
13606         gl_have_pthread=
13607         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13608         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13609         # the second one only in libpthread, and lock.c needs it.
13610         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13611 /* end confdefs.h.  */
13612 #include <pthread.h>
13613 int
13614 main ()
13615 {
13616 pthread_mutex_lock((pthread_mutex_t*)0);
13617                pthread_mutexattr_init((pthread_mutexattr_t*)0);
13618   ;
13619   return 0;
13620 }
13621 _ACEOF
13622 if ac_fn_c_try_link "$LINENO"; then :
13623   gl_have_pthread=yes
13624 fi
13625 rm -f core conftest.err conftest.$ac_objext \
13626     conftest$ac_exeext conftest.$ac_ext
13627         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13628         # since it is defined as a macro on OSF/1.)
13629         if test -n "$gl_have_pthread"; then
13630           # The program links fine without libpthread. But it may actually
13631           # need to link with libpthread in order to create multiple threads.
13632           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13633 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13634 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13635   $as_echo_n "(cached) " >&6
13636 else
13637   ac_check_lib_save_LIBS=$LIBS
13638 LIBS="-lpthread  $LIBS"
13639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13640 /* end confdefs.h.  */
13641
13642 /* Override any GCC internal prototype to avoid an error.
13643    Use char because int might match the return type of a GCC
13644    builtin and then its argument prototype would still apply.  */
13645 #ifdef __cplusplus
13646 extern "C"
13647 #endif
13648 char pthread_kill ();
13649 int
13650 main ()
13651 {
13652 return pthread_kill ();
13653   ;
13654   return 0;
13655 }
13656 _ACEOF
13657 if ac_fn_c_try_link "$LINENO"; then :
13658   ac_cv_lib_pthread_pthread_kill=yes
13659 else
13660   ac_cv_lib_pthread_pthread_kill=no
13661 fi
13662 rm -f core conftest.err conftest.$ac_objext \
13663     conftest$ac_exeext conftest.$ac_ext
13664 LIBS=$ac_check_lib_save_LIBS
13665 fi
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13667 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13668 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13669   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13670              # On Solaris and HP-UX, most pthread functions exist also in libc.
13671              # Therefore pthread_in_use() needs to actually try to create a
13672              # thread: pthread_create from libc will fail, whereas
13673              # pthread_create will actually create a thread.
13674              case "$host_os" in
13675                solaris* | hpux*)
13676
13677 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13678
13679              esac
13680
13681 fi
13682
13683         else
13684           # Some library is needed. Try libpthread and libc_r.
13685           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13686 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13687 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13688   $as_echo_n "(cached) " >&6
13689 else
13690   ac_check_lib_save_LIBS=$LIBS
13691 LIBS="-lpthread  $LIBS"
13692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693 /* end confdefs.h.  */
13694
13695 /* Override any GCC internal prototype to avoid an error.
13696    Use char because int might match the return type of a GCC
13697    builtin and then its argument prototype would still apply.  */
13698 #ifdef __cplusplus
13699 extern "C"
13700 #endif
13701 char pthread_kill ();
13702 int
13703 main ()
13704 {
13705 return pthread_kill ();
13706   ;
13707   return 0;
13708 }
13709 _ACEOF
13710 if ac_fn_c_try_link "$LINENO"; then :
13711   ac_cv_lib_pthread_pthread_kill=yes
13712 else
13713   ac_cv_lib_pthread_pthread_kill=no
13714 fi
13715 rm -f core conftest.err conftest.$ac_objext \
13716     conftest$ac_exeext conftest.$ac_ext
13717 LIBS=$ac_check_lib_save_LIBS
13718 fi
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13720 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13721 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13722   gl_have_pthread=yes
13723              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
13724              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13725 fi
13726
13727           if test -z "$gl_have_pthread"; then
13728             # For FreeBSD 4.
13729             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13730 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13731 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13732   $as_echo_n "(cached) " >&6
13733 else
13734   ac_check_lib_save_LIBS=$LIBS
13735 LIBS="-lc_r  $LIBS"
13736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13737 /* end confdefs.h.  */
13738
13739 /* Override any GCC internal prototype to avoid an error.
13740    Use char because int might match the return type of a GCC
13741    builtin and then its argument prototype would still apply.  */
13742 #ifdef __cplusplus
13743 extern "C"
13744 #endif
13745 char pthread_kill ();
13746 int
13747 main ()
13748 {
13749 return pthread_kill ();
13750   ;
13751   return 0;
13752 }
13753 _ACEOF
13754 if ac_fn_c_try_link "$LINENO"; then :
13755   ac_cv_lib_c_r_pthread_kill=yes
13756 else
13757   ac_cv_lib_c_r_pthread_kill=no
13758 fi
13759 rm -f core conftest.err conftest.$ac_objext \
13760     conftest$ac_exeext conftest.$ac_ext
13761 LIBS=$ac_check_lib_save_LIBS
13762 fi
13763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13764 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13765 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13766   gl_have_pthread=yes
13767                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13768                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13769 fi
13770
13771           fi
13772         fi
13773         if test -n "$gl_have_pthread"; then
13774           gl_threads_api=posix
13775
13776 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13777
13778           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13779             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13780
13781 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13782
13783               LIBTHREAD=
13784               LTLIBTHREAD=
13785             fi
13786           fi
13787         fi
13788       fi
13789     fi
13790     if test -z "$gl_have_pthread"; then
13791       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13792         gl_have_solaristhread=
13793         gl_save_LIBS="$LIBS"
13794         LIBS="$LIBS -lthread"
13795         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13796 /* end confdefs.h.  */
13797
13798 #include <thread.h>
13799 #include <synch.h>
13800
13801 int
13802 main ()
13803 {
13804 thr_self();
13805   ;
13806   return 0;
13807 }
13808 _ACEOF
13809 if ac_fn_c_try_link "$LINENO"; then :
13810   gl_have_solaristhread=yes
13811 fi
13812 rm -f core conftest.err conftest.$ac_objext \
13813     conftest$ac_exeext conftest.$ac_ext
13814         LIBS="$gl_save_LIBS"
13815         if test -n "$gl_have_solaristhread"; then
13816           gl_threads_api=solaris
13817           LIBTHREAD=-lthread
13818           LTLIBTHREAD=-lthread
13819           LIBMULTITHREAD="$LIBTHREAD"
13820           LTLIBMULTITHREAD="$LTLIBTHREAD"
13821
13822 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13823
13824           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13825
13826 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13827
13828             LIBTHREAD=
13829             LTLIBTHREAD=
13830           fi
13831         fi
13832       fi
13833     fi
13834     if test "$gl_use_threads" = pth; then
13835       gl_save_CPPFLAGS="$CPPFLAGS"
13836
13837
13838
13839
13840
13841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13842 $as_echo_n "checking how to link with libpth... " >&6; }
13843 if ${ac_cv_libpth_libs+:} false; then :
13844   $as_echo_n "(cached) " >&6
13845 else
13846
13847
13848
13849
13850
13851
13852
13853
13854     use_additional=yes
13855
13856   acl_save_prefix="$prefix"
13857   prefix="$acl_final_prefix"
13858   acl_save_exec_prefix="$exec_prefix"
13859   exec_prefix="$acl_final_exec_prefix"
13860
13861     eval additional_includedir=\"$includedir\"
13862     eval additional_libdir=\"$libdir\"
13863
13864   exec_prefix="$acl_save_exec_prefix"
13865   prefix="$acl_save_prefix"
13866
13867
13868 # Check whether --with-libpth-prefix was given.
13869 if test "${with_libpth_prefix+set}" = set; then :
13870   withval=$with_libpth_prefix;
13871     if test "X$withval" = "Xno"; then
13872       use_additional=no
13873     else
13874       if test "X$withval" = "X"; then
13875
13876   acl_save_prefix="$prefix"
13877   prefix="$acl_final_prefix"
13878   acl_save_exec_prefix="$exec_prefix"
13879   exec_prefix="$acl_final_exec_prefix"
13880
13881           eval additional_includedir=\"$includedir\"
13882           eval additional_libdir=\"$libdir\"
13883
13884   exec_prefix="$acl_save_exec_prefix"
13885   prefix="$acl_save_prefix"
13886
13887       else
13888         additional_includedir="$withval/include"
13889         additional_libdir="$withval/$acl_libdirstem"
13890         if test "$acl_libdirstem2" != "$acl_libdirstem" \
13891            && ! test -d "$withval/$acl_libdirstem"; then
13892           additional_libdir="$withval/$acl_libdirstem2"
13893         fi
13894       fi
13895     fi
13896
13897 fi
13898
13899       LIBPTH=
13900   LTLIBPTH=
13901   INCPTH=
13902   LIBPTH_PREFIX=
13903       HAVE_LIBPTH=
13904   rpathdirs=
13905   ltrpathdirs=
13906   names_already_handled=
13907   names_next_round='pth '
13908   while test -n "$names_next_round"; do
13909     names_this_round="$names_next_round"
13910     names_next_round=
13911     for name in $names_this_round; do
13912       already_handled=
13913       for n in $names_already_handled; do
13914         if test "$n" = "$name"; then
13915           already_handled=yes
13916           break
13917         fi
13918       done
13919       if test -z "$already_handled"; then
13920         names_already_handled="$names_already_handled $name"
13921                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13922         eval value=\"\$HAVE_LIB$uppername\"
13923         if test -n "$value"; then
13924           if test "$value" = yes; then
13925             eval value=\"\$LIB$uppername\"
13926             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13927             eval value=\"\$LTLIB$uppername\"
13928             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13929           else
13930                                     :
13931           fi
13932         else
13933                               found_dir=
13934           found_la=
13935           found_so=
13936           found_a=
13937           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
13938           if test -n "$acl_shlibext"; then
13939             shrext=".$acl_shlibext"             # typically: shrext=.so
13940           else
13941             shrext=
13942           fi
13943           if test $use_additional = yes; then
13944             dir="$additional_libdir"
13945                                     if test -n "$acl_shlibext"; then
13946               if test -f "$dir/$libname$shrext"; then
13947                 found_dir="$dir"
13948                 found_so="$dir/$libname$shrext"
13949               else
13950                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13951                   ver=`(cd "$dir" && \
13952                         for f in "$libname$shrext".*; do echo "$f"; done \
13953                         | sed -e "s,^$libname$shrext\\\\.,," \
13954                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13955                         | sed 1q ) 2>/dev/null`
13956                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13957                     found_dir="$dir"
13958                     found_so="$dir/$libname$shrext.$ver"
13959                   fi
13960                 else
13961                   eval library_names=\"$acl_library_names_spec\"
13962                   for f in $library_names; do
13963                     if test -f "$dir/$f"; then
13964                       found_dir="$dir"
13965                       found_so="$dir/$f"
13966                       break
13967                     fi
13968                   done
13969                 fi
13970               fi
13971             fi
13972                         if test "X$found_dir" = "X"; then
13973               if test -f "$dir/$libname.$acl_libext"; then
13974                 found_dir="$dir"
13975                 found_a="$dir/$libname.$acl_libext"
13976               fi
13977             fi
13978             if test "X$found_dir" != "X"; then
13979               if test -f "$dir/$libname.la"; then
13980                 found_la="$dir/$libname.la"
13981               fi
13982             fi
13983           fi
13984           if test "X$found_dir" = "X"; then
13985             for x in $LDFLAGS $LTLIBPTH; do
13986
13987   acl_save_prefix="$prefix"
13988   prefix="$acl_final_prefix"
13989   acl_save_exec_prefix="$exec_prefix"
13990   exec_prefix="$acl_final_exec_prefix"
13991   eval x=\"$x\"
13992   exec_prefix="$acl_save_exec_prefix"
13993   prefix="$acl_save_prefix"
13994
13995               case "$x" in
13996                 -L*)
13997                   dir=`echo "X$x" | sed -e 's/^X-L//'`
13998                                     if test -n "$acl_shlibext"; then
13999                     if test -f "$dir/$libname$shrext"; then
14000                       found_dir="$dir"
14001                       found_so="$dir/$libname$shrext"
14002                     else
14003                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14004                         ver=`(cd "$dir" && \
14005                               for f in "$libname$shrext".*; do echo "$f"; done \
14006                               | sed -e "s,^$libname$shrext\\\\.,," \
14007                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14008                               | sed 1q ) 2>/dev/null`
14009                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14010                           found_dir="$dir"
14011                           found_so="$dir/$libname$shrext.$ver"
14012                         fi
14013                       else
14014                         eval library_names=\"$acl_library_names_spec\"
14015                         for f in $library_names; do
14016                           if test -f "$dir/$f"; then
14017                             found_dir="$dir"
14018                             found_so="$dir/$f"
14019                             break
14020                           fi
14021                         done
14022                       fi
14023                     fi
14024                   fi
14025                                     if test "X$found_dir" = "X"; then
14026                     if test -f "$dir/$libname.$acl_libext"; then
14027                       found_dir="$dir"
14028                       found_a="$dir/$libname.$acl_libext"
14029                     fi
14030                   fi
14031                   if test "X$found_dir" != "X"; then
14032                     if test -f "$dir/$libname.la"; then
14033                       found_la="$dir/$libname.la"
14034                     fi
14035                   fi
14036                   ;;
14037               esac
14038               if test "X$found_dir" != "X"; then
14039                 break
14040               fi
14041             done
14042           fi
14043           if test "X$found_dir" != "X"; then
14044                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14045             if test "X$found_so" != "X"; then
14046                                                         if test "$enable_rpath" = no \
14047                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14048                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14049                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14050               else
14051                                                                                 haveit=
14052                 for x in $ltrpathdirs; do
14053                   if test "X$x" = "X$found_dir"; then
14054                     haveit=yes
14055                     break
14056                   fi
14057                 done
14058                 if test -z "$haveit"; then
14059                   ltrpathdirs="$ltrpathdirs $found_dir"
14060                 fi
14061                                 if test "$acl_hardcode_direct" = yes; then
14062                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14063                 else
14064                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14065                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14066                                                             haveit=
14067                     for x in $rpathdirs; do
14068                       if test "X$x" = "X$found_dir"; then
14069                         haveit=yes
14070                         break
14071                       fi
14072                     done
14073                     if test -z "$haveit"; then
14074                       rpathdirs="$rpathdirs $found_dir"
14075                     fi
14076                   else
14077                                                                                 haveit=
14078                     for x in $LDFLAGS $LIBPTH; do
14079
14080   acl_save_prefix="$prefix"
14081   prefix="$acl_final_prefix"
14082   acl_save_exec_prefix="$exec_prefix"
14083   exec_prefix="$acl_final_exec_prefix"
14084   eval x=\"$x\"
14085   exec_prefix="$acl_save_exec_prefix"
14086   prefix="$acl_save_prefix"
14087
14088                       if test "X$x" = "X-L$found_dir"; then
14089                         haveit=yes
14090                         break
14091                       fi
14092                     done
14093                     if test -z "$haveit"; then
14094                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14095                     fi
14096                     if test "$acl_hardcode_minus_L" != no; then
14097                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14098                     else
14099                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14100                     fi
14101                   fi
14102                 fi
14103               fi
14104             else
14105               if test "X$found_a" != "X"; then
14106                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14107               else
14108                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14109               fi
14110             fi
14111                         additional_includedir=
14112             case "$found_dir" in
14113               */$acl_libdirstem | */$acl_libdirstem/)
14114                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14115                 if test "$name" = 'pth'; then
14116                   LIBPTH_PREFIX="$basedir"
14117                 fi
14118                 additional_includedir="$basedir/include"
14119                 ;;
14120               */$acl_libdirstem2 | */$acl_libdirstem2/)
14121                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14122                 if test "$name" = 'pth'; then
14123                   LIBPTH_PREFIX="$basedir"
14124                 fi
14125                 additional_includedir="$basedir/include"
14126                 ;;
14127             esac
14128             if test "X$additional_includedir" != "X"; then
14129                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14130                 haveit=
14131                 if test "X$additional_includedir" = "X/usr/local/include"; then
14132                   if test -n "$GCC"; then
14133                     case $host_os in
14134                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14135                     esac
14136                   fi
14137                 fi
14138                 if test -z "$haveit"; then
14139                   for x in $CPPFLAGS $INCPTH; do
14140
14141   acl_save_prefix="$prefix"
14142   prefix="$acl_final_prefix"
14143   acl_save_exec_prefix="$exec_prefix"
14144   exec_prefix="$acl_final_exec_prefix"
14145   eval x=\"$x\"
14146   exec_prefix="$acl_save_exec_prefix"
14147   prefix="$acl_save_prefix"
14148
14149                     if test "X$x" = "X-I$additional_includedir"; then
14150                       haveit=yes
14151                       break
14152                     fi
14153                   done
14154                   if test -z "$haveit"; then
14155                     if test -d "$additional_includedir"; then
14156                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14157                     fi
14158                   fi
14159                 fi
14160               fi
14161             fi
14162                         if test -n "$found_la"; then
14163                                                         save_libdir="$libdir"
14164               case "$found_la" in
14165                 */* | *\\*) . "$found_la" ;;
14166                 *) . "./$found_la" ;;
14167               esac
14168               libdir="$save_libdir"
14169                             for dep in $dependency_libs; do
14170                 case "$dep" in
14171                   -L*)
14172                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14173                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14174                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14175                       haveit=
14176                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14177                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14178                         if test -n "$GCC"; then
14179                           case $host_os in
14180                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14181                           esac
14182                         fi
14183                       fi
14184                       if test -z "$haveit"; then
14185                         haveit=
14186                         for x in $LDFLAGS $LIBPTH; do
14187
14188   acl_save_prefix="$prefix"
14189   prefix="$acl_final_prefix"
14190   acl_save_exec_prefix="$exec_prefix"
14191   exec_prefix="$acl_final_exec_prefix"
14192   eval x=\"$x\"
14193   exec_prefix="$acl_save_exec_prefix"
14194   prefix="$acl_save_prefix"
14195
14196                           if test "X$x" = "X-L$additional_libdir"; then
14197                             haveit=yes
14198                             break
14199                           fi
14200                         done
14201                         if test -z "$haveit"; then
14202                           if test -d "$additional_libdir"; then
14203                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14204                           fi
14205                         fi
14206                         haveit=
14207                         for x in $LDFLAGS $LTLIBPTH; do
14208
14209   acl_save_prefix="$prefix"
14210   prefix="$acl_final_prefix"
14211   acl_save_exec_prefix="$exec_prefix"
14212   exec_prefix="$acl_final_exec_prefix"
14213   eval x=\"$x\"
14214   exec_prefix="$acl_save_exec_prefix"
14215   prefix="$acl_save_prefix"
14216
14217                           if test "X$x" = "X-L$additional_libdir"; then
14218                             haveit=yes
14219                             break
14220                           fi
14221                         done
14222                         if test -z "$haveit"; then
14223                           if test -d "$additional_libdir"; then
14224                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14225                           fi
14226                         fi
14227                       fi
14228                     fi
14229                     ;;
14230                   -R*)
14231                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14232                     if test "$enable_rpath" != no; then
14233                                                                   haveit=
14234                       for x in $rpathdirs; do
14235                         if test "X$x" = "X$dir"; then
14236                           haveit=yes
14237                           break
14238                         fi
14239                       done
14240                       if test -z "$haveit"; then
14241                         rpathdirs="$rpathdirs $dir"
14242                       fi
14243                                                                   haveit=
14244                       for x in $ltrpathdirs; do
14245                         if test "X$x" = "X$dir"; then
14246                           haveit=yes
14247                           break
14248                         fi
14249                       done
14250                       if test -z "$haveit"; then
14251                         ltrpathdirs="$ltrpathdirs $dir"
14252                       fi
14253                     fi
14254                     ;;
14255                   -l*)
14256                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14257                     ;;
14258                   *.la)
14259                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14260                     ;;
14261                   *)
14262                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14263                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14264                     ;;
14265                 esac
14266               done
14267             fi
14268           else
14269                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14270             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14271           fi
14272         fi
14273       fi
14274     done
14275   done
14276   if test "X$rpathdirs" != "X"; then
14277     if test -n "$acl_hardcode_libdir_separator"; then
14278                         alldirs=
14279       for found_dir in $rpathdirs; do
14280         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14281       done
14282             acl_save_libdir="$libdir"
14283       libdir="$alldirs"
14284       eval flag=\"$acl_hardcode_libdir_flag_spec\"
14285       libdir="$acl_save_libdir"
14286       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14287     else
14288             for found_dir in $rpathdirs; do
14289         acl_save_libdir="$libdir"
14290         libdir="$found_dir"
14291         eval flag=\"$acl_hardcode_libdir_flag_spec\"
14292         libdir="$acl_save_libdir"
14293         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14294       done
14295     fi
14296   fi
14297   if test "X$ltrpathdirs" != "X"; then
14298             for found_dir in $ltrpathdirs; do
14299       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14300     done
14301   fi
14302
14303
14304
14305
14306
14307
14308     ac_cv_libpth_libs="$LIBPTH"
14309     ac_cv_libpth_ltlibs="$LTLIBPTH"
14310     ac_cv_libpth_cppflags="$INCPTH"
14311     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14312
14313 fi
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14315 $as_echo "$ac_cv_libpth_libs" >&6; }
14316   LIBPTH="$ac_cv_libpth_libs"
14317   LTLIBPTH="$ac_cv_libpth_ltlibs"
14318   INCPTH="$ac_cv_libpth_cppflags"
14319   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14320
14321   for element in $INCPTH; do
14322     haveit=
14323     for x in $CPPFLAGS; do
14324
14325   acl_save_prefix="$prefix"
14326   prefix="$acl_final_prefix"
14327   acl_save_exec_prefix="$exec_prefix"
14328   exec_prefix="$acl_final_exec_prefix"
14329   eval x=\"$x\"
14330   exec_prefix="$acl_save_exec_prefix"
14331   prefix="$acl_save_prefix"
14332
14333       if test "X$x" = "X$element"; then
14334         haveit=yes
14335         break
14336       fi
14337     done
14338     if test -z "$haveit"; then
14339       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14340     fi
14341   done
14342
14343
14344
14345
14346       HAVE_LIBPTH=yes
14347
14348
14349
14350       gl_have_pth=
14351       gl_save_LIBS="$LIBS"
14352       LIBS="$LIBS $LIBPTH"
14353       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14354 /* end confdefs.h.  */
14355 #include <pth.h>
14356 int
14357 main ()
14358 {
14359 pth_self();
14360   ;
14361   return 0;
14362 }
14363 _ACEOF
14364 if ac_fn_c_try_link "$LINENO"; then :
14365   gl_have_pth=yes
14366 fi
14367 rm -f core conftest.err conftest.$ac_objext \
14368     conftest$ac_exeext conftest.$ac_ext
14369       LIBS="$gl_save_LIBS"
14370       if test -n "$gl_have_pth"; then
14371         gl_threads_api=pth
14372         LIBTHREAD="$LIBPTH"
14373         LTLIBTHREAD="$LTLIBPTH"
14374         LIBMULTITHREAD="$LIBTHREAD"
14375         LTLIBMULTITHREAD="$LTLIBTHREAD"
14376
14377 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
14378
14379         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14380           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14381
14382 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14383
14384             LIBTHREAD=
14385             LTLIBTHREAD=
14386           fi
14387         fi
14388       else
14389         CPPFLAGS="$gl_save_CPPFLAGS"
14390       fi
14391     fi
14392     if test -z "$gl_have_pthread"; then
14393       case "$gl_use_threads" in
14394         yes | windows | win32) # The 'win32' is for backward compatibility.
14395           if { case "$host_os" in
14396                  mingw*) true;;
14397                  *) false;;
14398                esac
14399              }; then
14400             gl_threads_api=windows
14401
14402 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14403
14404           fi
14405           ;;
14406       esac
14407     fi
14408   fi
14409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14410 $as_echo_n "checking for multithread API to use... " >&6; }
14411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14412 $as_echo "$gl_threads_api" >&6; }
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14426 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
14427 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14428   $as_echo_n "(cached) " >&6
14429 else
14430   rm -f conftest.sym conftest.file
14431      echo >conftest.file
14432      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
14433        if test "$cross_compiling" = yes; then :
14434   case "$host_os" in
14435                     # Guess yes on glibc systems.
14436             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14437                     # If we don't know, assume the worst.
14438             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14439           esac
14440
14441 else
14442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443 /* end confdefs.h.  */
14444 $ac_includes_default
14445 int
14446 main ()
14447 {
14448 struct stat sbuf;
14449               /* Linux will dereference the symlink and fail, as required by
14450                  POSIX.  That is better in the sense that it means we will not
14451                  have to compile and use the lstat wrapper.  */
14452               return lstat ("conftest.sym/", &sbuf) == 0;
14453
14454   ;
14455   return 0;
14456 }
14457 _ACEOF
14458 if ac_fn_c_try_run "$LINENO"; then :
14459   gl_cv_func_lstat_dereferences_slashed_symlink=yes
14460 else
14461   gl_cv_func_lstat_dereferences_slashed_symlink=no
14462 fi
14463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14464   conftest.$ac_objext conftest.beam conftest.$ac_ext
14465 fi
14466
14467      else
14468        # If the 'ln -s' command failed, then we probably don't even
14469        # have an lstat function.
14470        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
14471      fi
14472      rm -f conftest.sym conftest.file
14473
14474 fi
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14476 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14477   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14478     *yes)
14479
14480 cat >>confdefs.h <<_ACEOF
14481 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
14482 _ACEOF
14483
14484       ;;
14485   esac
14486
14487
14488
14489
14490   GNULIB_BTOWC=0;
14491   GNULIB_WCTOB=0;
14492   GNULIB_MBSINIT=0;
14493   GNULIB_MBRTOWC=0;
14494   GNULIB_MBRLEN=0;
14495   GNULIB_MBSRTOWCS=0;
14496   GNULIB_MBSNRTOWCS=0;
14497   GNULIB_WCRTOMB=0;
14498   GNULIB_WCSRTOMBS=0;
14499   GNULIB_WCSNRTOMBS=0;
14500   GNULIB_WCWIDTH=0;
14501   GNULIB_WMEMCHR=0;
14502   GNULIB_WMEMCMP=0;
14503   GNULIB_WMEMCPY=0;
14504   GNULIB_WMEMMOVE=0;
14505   GNULIB_WMEMSET=0;
14506   GNULIB_WCSLEN=0;
14507   GNULIB_WCSNLEN=0;
14508   GNULIB_WCSCPY=0;
14509   GNULIB_WCPCPY=0;
14510   GNULIB_WCSNCPY=0;
14511   GNULIB_WCPNCPY=0;
14512   GNULIB_WCSCAT=0;
14513   GNULIB_WCSNCAT=0;
14514   GNULIB_WCSCMP=0;
14515   GNULIB_WCSNCMP=0;
14516   GNULIB_WCSCASECMP=0;
14517   GNULIB_WCSNCASECMP=0;
14518   GNULIB_WCSCOLL=0;
14519   GNULIB_WCSXFRM=0;
14520   GNULIB_WCSDUP=0;
14521   GNULIB_WCSCHR=0;
14522   GNULIB_WCSRCHR=0;
14523   GNULIB_WCSCSPN=0;
14524   GNULIB_WCSSPN=0;
14525   GNULIB_WCSPBRK=0;
14526   GNULIB_WCSSTR=0;
14527   GNULIB_WCSTOK=0;
14528   GNULIB_WCSWIDTH=0;
14529     HAVE_BTOWC=1;
14530   HAVE_MBSINIT=1;
14531   HAVE_MBRTOWC=1;
14532   HAVE_MBRLEN=1;
14533   HAVE_MBSRTOWCS=1;
14534   HAVE_MBSNRTOWCS=1;
14535   HAVE_WCRTOMB=1;
14536   HAVE_WCSRTOMBS=1;
14537   HAVE_WCSNRTOMBS=1;
14538   HAVE_WMEMCHR=1;
14539   HAVE_WMEMCMP=1;
14540   HAVE_WMEMCPY=1;
14541   HAVE_WMEMMOVE=1;
14542   HAVE_WMEMSET=1;
14543   HAVE_WCSLEN=1;
14544   HAVE_WCSNLEN=1;
14545   HAVE_WCSCPY=1;
14546   HAVE_WCPCPY=1;
14547   HAVE_WCSNCPY=1;
14548   HAVE_WCPNCPY=1;
14549   HAVE_WCSCAT=1;
14550   HAVE_WCSNCAT=1;
14551   HAVE_WCSCMP=1;
14552   HAVE_WCSNCMP=1;
14553   HAVE_WCSCASECMP=1;
14554   HAVE_WCSNCASECMP=1;
14555   HAVE_WCSCOLL=1;
14556   HAVE_WCSXFRM=1;
14557   HAVE_WCSDUP=1;
14558   HAVE_WCSCHR=1;
14559   HAVE_WCSRCHR=1;
14560   HAVE_WCSCSPN=1;
14561   HAVE_WCSSPN=1;
14562   HAVE_WCSPBRK=1;
14563   HAVE_WCSSTR=1;
14564   HAVE_WCSTOK=1;
14565   HAVE_WCSWIDTH=1;
14566   HAVE_DECL_WCTOB=1;
14567   HAVE_DECL_WCWIDTH=1;
14568   REPLACE_MBSTATE_T=0;
14569   REPLACE_BTOWC=0;
14570   REPLACE_WCTOB=0;
14571   REPLACE_MBSINIT=0;
14572   REPLACE_MBRTOWC=0;
14573   REPLACE_MBRLEN=0;
14574   REPLACE_MBSRTOWCS=0;
14575   REPLACE_MBSNRTOWCS=0;
14576   REPLACE_WCRTOMB=0;
14577   REPLACE_WCSRTOMBS=0;
14578   REPLACE_WCSNRTOMBS=0;
14579   REPLACE_WCWIDTH=0;
14580   REPLACE_WCSWIDTH=0;
14581
14582
14583
14584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14585 $as_echo_n "checking for mbstate_t... " >&6; }
14586 if ${ac_cv_type_mbstate_t+:} false; then :
14587   $as_echo_n "(cached) " >&6
14588 else
14589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h.  */
14591 $ac_includes_default
14592 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14593    <wchar.h>.
14594    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14595    included before <wchar.h>.  */
14596 #include <stddef.h>
14597 #include <stdio.h>
14598 #include <time.h>
14599 #include <wchar.h>
14600 int
14601 main ()
14602 {
14603 mbstate_t x; return sizeof x;
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 if ac_fn_c_try_compile "$LINENO"; then :
14609   ac_cv_type_mbstate_t=yes
14610 else
14611   ac_cv_type_mbstate_t=no
14612 fi
14613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14614 fi
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14616 $as_echo "$ac_cv_type_mbstate_t" >&6; }
14617    if test $ac_cv_type_mbstate_t = yes; then
14618
14619 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
14620
14621    else
14622
14623 $as_echo "#define mbstate_t int" >>confdefs.h
14624
14625    fi
14626
14627
14628
14629
14630
14631
14632
14633
14634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14635 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14636 if ${gt_cv_locale_ja+:} false; then :
14637   $as_echo_n "(cached) " >&6
14638 else
14639
14640     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14641 /* end confdefs.h.  */
14642
14643 #include <locale.h>
14644 #include <time.h>
14645 #if HAVE_LANGINFO_CODESET
14646 # include <langinfo.h>
14647 #endif
14648 #include <stdlib.h>
14649 #include <string.h>
14650 struct tm t;
14651 char buf[16];
14652 int main ()
14653 {
14654   const char *p;
14655   /* Check whether the given locale name is recognized by the system.  */
14656 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14657   /* On native Windows, setlocale(category, "") looks at the system settings,
14658      not at the environment variables.  Also, when an encoding suffix such
14659      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14660      category of the locale to "C".  */
14661   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14662       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14663     return 1;
14664 #else
14665   if (setlocale (LC_ALL, "") == NULL) return 1;
14666 #endif
14667   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14668      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14669      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14670      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14671      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14672      some unit tests fail.
14673      On MirBSD 10, when an unsupported locale is specified, setlocale()
14674      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14675 #if HAVE_LANGINFO_CODESET
14676   {
14677     const char *cs = nl_langinfo (CODESET);
14678     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14679         || strcmp (cs, "UTF-8") == 0)
14680       return 1;
14681   }
14682 #endif
14683 #ifdef __CYGWIN__
14684   /* On Cygwin, avoid locale names without encoding suffix, because the
14685      locale_charset() function relies on the encoding suffix.  Note that
14686      LC_ALL is set on the command line.  */
14687   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14688 #endif
14689   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14690      on Cygwin 1.5.x.  */
14691   if (MB_CUR_MAX == 1)
14692     return 1;
14693   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14694      This excludes the UTF-8 encoding (except on MirBSD).  */
14695   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14696   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14697   for (p = buf; *p != '\0'; p++)
14698     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14699       return 1;
14700   return 0;
14701 }
14702
14703 _ACEOF
14704     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14705   (eval $ac_link) 2>&5
14706   ac_status=$?
14707   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14708   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14709       case "$host_os" in
14710         # Handle native Windows specially, because there setlocale() interprets
14711         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14712         # "fr" or "fra" as "French" or "French_France.1252",
14713         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14714         # "ja" as "Japanese" or "Japanese_Japan.932",
14715         # and similar.
14716         mingw*)
14717           # Note that on native Windows, the Japanese locale is
14718           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14719           # cannot use it here.
14720           gt_cv_locale_ja=none
14721           ;;
14722         *)
14723           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14724           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14725           # configure script would override the LC_ALL setting. Likewise for
14726           # LC_CTYPE, which is also set at the beginning of the configure script.
14727           # Test for the AIX locale name.
14728           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14729             gt_cv_locale_ja=ja_JP
14730           else
14731             # Test for the locale name with explicit encoding suffix.
14732             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14733               gt_cv_locale_ja=ja_JP.EUC-JP
14734             else
14735               # Test for the HP-UX, OSF/1, NetBSD locale name.
14736               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14737                 gt_cv_locale_ja=ja_JP.eucJP
14738               else
14739                 # Test for the IRIX, FreeBSD locale name.
14740                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14741                   gt_cv_locale_ja=ja_JP.EUC
14742                 else
14743                   # Test for the Solaris 7 locale name.
14744                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14745                     gt_cv_locale_ja=ja
14746                   else
14747                     # Special test for NetBSD 1.6.
14748                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14749                       gt_cv_locale_ja=ja_JP.eucJP
14750                     else
14751                       # None found.
14752                       gt_cv_locale_ja=none
14753                     fi
14754                   fi
14755                 fi
14756               fi
14757             fi
14758           fi
14759           ;;
14760       esac
14761     fi
14762     rm -fr conftest*
14763
14764 fi
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14766 $as_echo "$gt_cv_locale_ja" >&6; }
14767   LOCALE_JA=$gt_cv_locale_ja
14768
14769
14770
14771
14772
14773   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14774 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14775 if ${gt_cv_locale_zh_CN+:} false; then :
14776   $as_echo_n "(cached) " >&6
14777 else
14778
14779     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780 /* end confdefs.h.  */
14781
14782 #include <locale.h>
14783 #include <stdlib.h>
14784 #include <time.h>
14785 #if HAVE_LANGINFO_CODESET
14786 # include <langinfo.h>
14787 #endif
14788 #include <stdlib.h>
14789 #include <string.h>
14790 struct tm t;
14791 char buf[16];
14792 int main ()
14793 {
14794   const char *p;
14795   /* Check whether the given locale name is recognized by the system.  */
14796 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14797   /* On native Windows, setlocale(category, "") looks at the system settings,
14798      not at the environment variables.  Also, when an encoding suffix such
14799      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14800      category of the locale to "C".  */
14801   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14802       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14803     return 1;
14804 #else
14805   if (setlocale (LC_ALL, "") == NULL) return 1;
14806 #endif
14807   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14808      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14809      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14810      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14811      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14812      some unit tests fail.
14813      On MirBSD 10, when an unsupported locale is specified, setlocale()
14814      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14815 #if HAVE_LANGINFO_CODESET
14816   {
14817     const char *cs = nl_langinfo (CODESET);
14818     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14819         || strcmp (cs, "UTF-8") == 0)
14820       return 1;
14821   }
14822 #endif
14823 #ifdef __CYGWIN__
14824   /* On Cygwin, avoid locale names without encoding suffix, because the
14825      locale_charset() function relies on the encoding suffix.  Note that
14826      LC_ALL is set on the command line.  */
14827   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14828 #endif
14829   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14830      This excludes the UTF-8 encoding (except on MirBSD).  */
14831   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14832   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14833   for (p = buf; *p != '\0'; p++)
14834     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14835       return 1;
14836   /* Check whether a typical GB18030 multibyte sequence is recognized as a
14837      single wide character.  This excludes the GB2312 and GBK encodings.  */
14838   if (mblen ("\203\062\332\066", 5) != 4)
14839     return 1;
14840   return 0;
14841 }
14842
14843 _ACEOF
14844     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14845   (eval $ac_link) 2>&5
14846   ac_status=$?
14847   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14848   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14849       case "$host_os" in
14850         # Handle native Windows specially, because there setlocale() interprets
14851         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14852         # "fr" or "fra" as "French" or "French_France.1252",
14853         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14854         # "ja" as "Japanese" or "Japanese_Japan.932",
14855         # and similar.
14856         mingw*)
14857           # Test for the hypothetical native Windows locale name.
14858           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14859             gt_cv_locale_zh_CN=Chinese_China.54936
14860           else
14861             # None found.
14862             gt_cv_locale_zh_CN=none
14863           fi
14864           ;;
14865         solaris2.8)
14866           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14867           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14868           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14869           gt_cv_locale_zh_CN=none
14870           ;;
14871         *)
14872           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14873           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14874           # configure script would override the LC_ALL setting. Likewise for
14875           # LC_CTYPE, which is also set at the beginning of the configure script.
14876           # Test for the locale name without encoding suffix.
14877           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14878             gt_cv_locale_zh_CN=zh_CN
14879           else
14880             # Test for the locale name with explicit encoding suffix.
14881             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14882               gt_cv_locale_zh_CN=zh_CN.GB18030
14883             else
14884               # None found.
14885               gt_cv_locale_zh_CN=none
14886             fi
14887           fi
14888           ;;
14889       esac
14890     else
14891       # If there was a link error, due to mblen(), the system is so old that
14892       # it certainly doesn't have a chinese locale.
14893       gt_cv_locale_zh_CN=none
14894     fi
14895     rm -fr conftest*
14896
14897 fi
14898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14899 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14900   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14901
14902
14903
14904
14905   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14906 $as_echo_n "checking for a french Unicode locale... " >&6; }
14907 if ${gt_cv_locale_fr_utf8+:} false; then :
14908   $as_echo_n "(cached) " >&6
14909 else
14910
14911     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912 /* end confdefs.h.  */
14913
14914 #include <locale.h>
14915 #include <time.h>
14916 #if HAVE_LANGINFO_CODESET
14917 # include <langinfo.h>
14918 #endif
14919 #include <stdlib.h>
14920 #include <string.h>
14921 struct tm t;
14922 char buf[16];
14923 int main () {
14924   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14925      imitates locale dependent behaviour by looking at the environment
14926      variables, and all locales use the UTF-8 encoding.  */
14927 #if !(defined __BEOS__ || defined __HAIKU__)
14928   /* Check whether the given locale name is recognized by the system.  */
14929 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14930   /* On native Windows, setlocale(category, "") looks at the system settings,
14931      not at the environment variables.  Also, when an encoding suffix such
14932      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14933      category of the locale to "C".  */
14934   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14935       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14936     return 1;
14937 # else
14938   if (setlocale (LC_ALL, "") == NULL) return 1;
14939 # endif
14940   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14941      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14942      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14943      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14944      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14945      some unit tests fail.  */
14946 # if HAVE_LANGINFO_CODESET
14947   {
14948     const char *cs = nl_langinfo (CODESET);
14949     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14950       return 1;
14951   }
14952 # endif
14953 # ifdef __CYGWIN__
14954   /* On Cygwin, avoid locale names without encoding suffix, because the
14955      locale_charset() function relies on the encoding suffix.  Note that
14956      LC_ALL is set on the command line.  */
14957   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14958 # endif
14959   /* Check whether in the abbreviation of the second month, the second
14960      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14961      two bytes long, with UTF-8 encoding.  */
14962   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14963   if (strftime (buf, sizeof (buf), "%b", &t) < 4
14964       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14965     return 1;
14966 #endif
14967 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
14968   /* Check whether the decimal separator is a comma.
14969      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14970      are nl_langinfo(RADIXCHAR) are both ".".  */
14971   if (localeconv () ->decimal_point[0] != ',') return 1;
14972 #endif
14973   return 0;
14974 }
14975
14976 _ACEOF
14977     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14978   (eval $ac_link) 2>&5
14979   ac_status=$?
14980   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14981   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14982       case "$host_os" in
14983         # Handle native Windows specially, because there setlocale() interprets
14984         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14985         # "fr" or "fra" as "French" or "French_France.1252",
14986         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14987         # "ja" as "Japanese" or "Japanese_Japan.932",
14988         # and similar.
14989         mingw*)
14990           # Test for the hypothetical native Windows locale name.
14991           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14992             gt_cv_locale_fr_utf8=French_France.65001
14993           else
14994             # None found.
14995             gt_cv_locale_fr_utf8=none
14996           fi
14997           ;;
14998         *)
14999           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15000           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
15001           # configure script would override the LC_ALL setting. Likewise for
15002           # LC_CTYPE, which is also set at the beginning of the configure script.
15003           # Test for the usual locale name.
15004           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15005             gt_cv_locale_fr_utf8=fr_FR
15006           else
15007             # Test for the locale name with explicit encoding suffix.
15008             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15009               gt_cv_locale_fr_utf8=fr_FR.UTF-8
15010             else
15011               # Test for the Solaris 7 locale name.
15012               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15013                 gt_cv_locale_fr_utf8=fr.UTF-8
15014               else
15015                 # None found.
15016                 gt_cv_locale_fr_utf8=none
15017               fi
15018             fi
15019           fi
15020           ;;
15021       esac
15022     fi
15023     rm -fr conftest*
15024
15025 fi
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15027 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15028   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15029
15030
15031
15032
15033
15034
15035
15036   GNULIB_FFSL=0;
15037   GNULIB_FFSLL=0;
15038   GNULIB_MEMCHR=0;
15039   GNULIB_MEMMEM=0;
15040   GNULIB_MEMPCPY=0;
15041   GNULIB_MEMRCHR=0;
15042   GNULIB_RAWMEMCHR=0;
15043   GNULIB_STPCPY=0;
15044   GNULIB_STPNCPY=0;
15045   GNULIB_STRCHRNUL=0;
15046   GNULIB_STRDUP=0;
15047   GNULIB_STRNCAT=0;
15048   GNULIB_STRNDUP=0;
15049   GNULIB_STRNLEN=0;
15050   GNULIB_STRPBRK=0;
15051   GNULIB_STRSEP=0;
15052   GNULIB_STRSTR=0;
15053   GNULIB_STRCASESTR=0;
15054   GNULIB_STRTOK_R=0;
15055   GNULIB_MBSLEN=0;
15056   GNULIB_MBSNLEN=0;
15057   GNULIB_MBSCHR=0;
15058   GNULIB_MBSRCHR=0;
15059   GNULIB_MBSSTR=0;
15060   GNULIB_MBSCASECMP=0;
15061   GNULIB_MBSNCASECMP=0;
15062   GNULIB_MBSPCASECMP=0;
15063   GNULIB_MBSCASESTR=0;
15064   GNULIB_MBSCSPN=0;
15065   GNULIB_MBSPBRK=0;
15066   GNULIB_MBSSPN=0;
15067   GNULIB_MBSSEP=0;
15068   GNULIB_MBSTOK_R=0;
15069   GNULIB_STRERROR=0;
15070   GNULIB_STRERROR_R=0;
15071   GNULIB_STRSIGNAL=0;
15072   GNULIB_STRVERSCMP=0;
15073   HAVE_MBSLEN=0;
15074     HAVE_FFSL=1;
15075   HAVE_FFSLL=1;
15076   HAVE_MEMCHR=1;
15077   HAVE_DECL_MEMMEM=1;
15078   HAVE_MEMPCPY=1;
15079   HAVE_DECL_MEMRCHR=1;
15080   HAVE_RAWMEMCHR=1;
15081   HAVE_STPCPY=1;
15082   HAVE_STPNCPY=1;
15083   HAVE_STRCHRNUL=1;
15084   HAVE_DECL_STRDUP=1;
15085   HAVE_DECL_STRNDUP=1;
15086   HAVE_DECL_STRNLEN=1;
15087   HAVE_STRPBRK=1;
15088   HAVE_STRSEP=1;
15089   HAVE_STRCASESTR=1;
15090   HAVE_DECL_STRTOK_R=1;
15091   HAVE_DECL_STRERROR_R=1;
15092   HAVE_DECL_STRSIGNAL=1;
15093   HAVE_STRVERSCMP=1;
15094   REPLACE_MEMCHR=0;
15095   REPLACE_MEMMEM=0;
15096   REPLACE_STPNCPY=0;
15097   REPLACE_STRDUP=0;
15098   REPLACE_STRSTR=0;
15099   REPLACE_STRCASESTR=0;
15100   REPLACE_STRCHRNUL=0;
15101   REPLACE_STRERROR=0;
15102   REPLACE_STRERROR_R=0;
15103   REPLACE_STRNCAT=0;
15104   REPLACE_STRNDUP=0;
15105   REPLACE_STRNLEN=0;
15106   REPLACE_STRSIGNAL=0;
15107   REPLACE_STRTOK_R=0;
15108   UNDEFINE_STRTOK_R=0;
15109
15110
15111
15112
15113
15114   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15115   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15116   # irrelevant for anonymous mappings.
15117   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15118 if test "x$ac_cv_func_mmap" = xyes; then :
15119   gl_have_mmap=yes
15120 else
15121   gl_have_mmap=no
15122 fi
15123
15124
15125   # Try to allow MAP_ANONYMOUS.
15126   gl_have_mmap_anonymous=no
15127   if test $gl_have_mmap = yes; then
15128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15129 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15130     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15131 /* end confdefs.h.  */
15132
15133 #include <sys/mman.h>
15134 #ifdef MAP_ANONYMOUS
15135     I cannot identify this map
15136 #endif
15137
15138 _ACEOF
15139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15140   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15141   gl_have_mmap_anonymous=yes
15142 fi
15143 rm -f conftest*
15144
15145     if test $gl_have_mmap_anonymous != yes; then
15146       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15147 /* end confdefs.h.  */
15148
15149 #include <sys/mman.h>
15150 #ifdef MAP_ANON
15151     I cannot identify this map
15152 #endif
15153
15154 _ACEOF
15155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15156   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15157
15158 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15159
15160          gl_have_mmap_anonymous=yes
15161 fi
15162 rm -f conftest*
15163
15164     fi
15165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15166 $as_echo "$gl_have_mmap_anonymous" >&6; }
15167     if test $gl_have_mmap_anonymous = yes; then
15168
15169 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15170
15171     fi
15172   fi
15173
15174
15175
15176
15177
15178
15179   if test $HAVE_MEMCHR = 1; then
15180     # Detect platform-specific bugs in some versions of glibc:
15181     # memchr should not dereference anything with length 0
15182     #   http://bugzilla.redhat.com/499689
15183     # memchr should not dereference overestimated length after a match
15184     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15185     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15186     # Assume that memchr works on platforms that lack mprotect.
15187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15188 $as_echo_n "checking whether memchr works... " >&6; }
15189 if ${gl_cv_func_memchr_works+:} false; then :
15190   $as_echo_n "(cached) " >&6
15191 else
15192   if test "$cross_compiling" = yes; then :
15193          gl_cv_func_memchr_works="guessing no"
15194 else
15195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15196 /* end confdefs.h.  */
15197
15198 #include <string.h>
15199 #if HAVE_SYS_MMAN_H
15200 # include <fcntl.h>
15201 # include <unistd.h>
15202 # include <sys/types.h>
15203 # include <sys/mman.h>
15204 # ifndef MAP_FILE
15205 #  define MAP_FILE 0
15206 # endif
15207 #endif
15208
15209 int
15210 main ()
15211 {
15212
15213   int result = 0;
15214   char *fence = NULL;
15215 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15216 # if HAVE_MAP_ANONYMOUS
15217   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15218   const int fd = -1;
15219 # else /* !HAVE_MAP_ANONYMOUS */
15220   const int flags = MAP_FILE | MAP_PRIVATE;
15221   int fd = open ("/dev/zero", O_RDONLY, 0666);
15222   if (fd >= 0)
15223 # endif
15224     {
15225       int pagesize = getpagesize ();
15226       char *two_pages =
15227         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15228                        flags, fd, 0);
15229       if (two_pages != (char *)(-1)
15230           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15231         fence = two_pages + pagesize;
15232     }
15233 #endif
15234   if (fence)
15235     {
15236       if (memchr (fence, 0, 0))
15237         result |= 1;
15238       strcpy (fence - 9, "12345678");
15239       if (memchr (fence - 9, 0, 79) != fence - 1)
15240         result |= 2;
15241       if (memchr (fence - 1, 0, 3) != fence - 1)
15242         result |= 4;
15243     }
15244   return result;
15245
15246   ;
15247   return 0;
15248 }
15249 _ACEOF
15250 if ac_fn_c_try_run "$LINENO"; then :
15251   gl_cv_func_memchr_works=yes
15252 else
15253   gl_cv_func_memchr_works=no
15254 fi
15255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15256   conftest.$ac_objext conftest.beam conftest.$ac_ext
15257 fi
15258
15259 fi
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15261 $as_echo "$gl_cv_func_memchr_works" >&6; }
15262     if test "$gl_cv_func_memchr_works" != yes; then
15263       REPLACE_MEMCHR=1
15264     fi
15265   fi
15266
15267 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15268 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15269   ac_have_decl=1
15270 else
15271   ac_have_decl=0
15272 fi
15273
15274 cat >>confdefs.h <<_ACEOF
15275 #define HAVE_DECL_MEMRCHR $ac_have_decl
15276 _ACEOF
15277
15278
15279
15280
15281      REPLACE_STRERROR_0=0
15282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15283 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15284 if ${gl_cv_func_strerror_0_works+:} false; then :
15285   $as_echo_n "(cached) " >&6
15286 else
15287   if test "$cross_compiling" = yes; then :
15288   case "$host_os" in
15289                  # Guess yes on glibc systems.
15290          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15291                  # If we don't know, assume the worst.
15292          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15293        esac
15294
15295 else
15296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15297 /* end confdefs.h.  */
15298 #include <string.h>
15299            #include <errno.h>
15300
15301 int
15302 main ()
15303 {
15304 int result = 0;
15305            char *str;
15306            errno = 0;
15307            str = strerror (0);
15308            if (!*str) result |= 1;
15309            if (errno) result |= 2;
15310            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15311              result |= 4;
15312            return result;
15313   ;
15314   return 0;
15315 }
15316 _ACEOF
15317 if ac_fn_c_try_run "$LINENO"; then :
15318   gl_cv_func_strerror_0_works=yes
15319 else
15320   gl_cv_func_strerror_0_works=no
15321 fi
15322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15323   conftest.$ac_objext conftest.beam conftest.$ac_ext
15324 fi
15325
15326
15327 fi
15328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15329 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15330   case "$gl_cv_func_strerror_0_works" in
15331     *yes) ;;
15332     *)
15333       REPLACE_STRERROR_0=1
15334
15335 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15336
15337       ;;
15338   esac
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349   if test $ac_cv_func_strerror_r = yes; then
15350     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15351                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15352 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15353 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15354   $as_echo_n "(cached) " >&6
15355 else
15356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15357 /* end confdefs.h.  */
15358 #include <string.h>
15359                 int strerror_r (int, char *, size_t);
15360
15361 int
15362 main ()
15363 {
15364
15365   ;
15366   return 0;
15367 }
15368 _ACEOF
15369 if ac_fn_c_try_compile "$LINENO"; then :
15370   gl_cv_func_strerror_r_posix_signature=yes
15371 else
15372   gl_cv_func_strerror_r_posix_signature=no
15373 fi
15374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15375
15376 fi
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15378 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15379       if test $gl_cv_func_strerror_r_posix_signature = yes; then
15380                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15381 $as_echo_n "checking whether strerror_r works... " >&6; }
15382 if ${gl_cv_func_strerror_r_works+:} false; then :
15383   $as_echo_n "(cached) " >&6
15384 else
15385   if test "$cross_compiling" = yes; then :
15386
15387               case "$host_os" in
15388                        # Guess no on AIX.
15389                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
15390                        # Guess no on HP-UX.
15391                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15392                        # Guess no on BSD variants.
15393                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
15394                        # Guess yes otherwise.
15395                 *)     gl_cv_func_strerror_r_works="guessing yes";;
15396               esac
15397
15398 else
15399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400 /* end confdefs.h.  */
15401 #include <errno.h>
15402                   #include <string.h>
15403
15404 int
15405 main ()
15406 {
15407 int result = 0;
15408                   char buf[79];
15409                   if (strerror_r (EACCES, buf, 0) < 0)
15410                     result |= 1;
15411                   errno = 0;
15412                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
15413                     result |= 2;
15414                   strcpy (buf, "Unknown");
15415                   if (strerror_r (0, buf, sizeof buf) != 0)
15416                     result |= 4;
15417                   if (errno)
15418                     result |= 8;
15419                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15420                     result |= 0x10;
15421                   errno = 0;
15422                   *buf = 0;
15423                   if (strerror_r (-3, buf, sizeof buf) < 0)
15424                     result |= 0x20;
15425                   if (errno)
15426                     result |= 0x40;
15427                   if (!*buf)
15428                     result |= 0x80;
15429                   return result;
15430
15431   ;
15432   return 0;
15433 }
15434 _ACEOF
15435 if ac_fn_c_try_run "$LINENO"; then :
15436   gl_cv_func_strerror_r_works=yes
15437 else
15438   gl_cv_func_strerror_r_works=no
15439 fi
15440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15441   conftest.$ac_objext conftest.beam conftest.$ac_ext
15442 fi
15443
15444
15445 fi
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15447 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15448       else
15449
15450                         if test $ac_cv_func___xpg_strerror_r = yes; then
15451           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15452 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15453 if ${gl_cv_func_strerror_r_works+:} false; then :
15454   $as_echo_n "(cached) " >&6
15455 else
15456   if test "$cross_compiling" = yes; then :
15457                                   gl_cv_func_strerror_r_works="guessing no"
15458
15459 else
15460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15461 /* end confdefs.h.  */
15462 #include <errno.h>
15463                     #include <string.h>
15464                     extern
15465                     #ifdef __cplusplus
15466                     "C"
15467                     #endif
15468                     int __xpg_strerror_r(int, char *, size_t);
15469
15470 int
15471 main ()
15472 {
15473 int result = 0;
15474                     char buf[256] = "^";
15475                     char copy[256];
15476                     char *str = strerror (-1);
15477                     strcpy (copy, str);
15478                     if (__xpg_strerror_r (-2, buf, 1) == 0)
15479                       result |= 1;
15480                     if (*buf)
15481                       result |= 2;
15482                     __xpg_strerror_r (-2, buf, 256);
15483                     if (strcmp (str, copy))
15484                       result |= 4;
15485                     return result;
15486
15487   ;
15488   return 0;
15489 }
15490 _ACEOF
15491 if ac_fn_c_try_run "$LINENO"; then :
15492   gl_cv_func_strerror_r_works=yes
15493 else
15494   gl_cv_func_strerror_r_works=no
15495 fi
15496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15497   conftest.$ac_objext conftest.beam conftest.$ac_ext
15498 fi
15499
15500
15501 fi
15502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15503 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
15504         fi
15505       fi
15506     fi
15507   fi
15508
15509 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
15510 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
15511   ac_have_decl=1
15512 else
15513   ac_have_decl=0
15514 fi
15515
15516 cat >>confdefs.h <<_ACEOF
15517 #define HAVE_DECL_STRERROR_R $ac_have_decl
15518 _ACEOF
15519
15520
15521
15522
15523
15524
15525
15526
15527   if test $ac_cv_have_decl_strerror_r = no; then
15528     HAVE_DECL_STRERROR_R=0
15529   fi
15530
15531   if test $ac_cv_func_strerror_r = yes; then
15532     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15533       if test $gl_cv_func_strerror_r_posix_signature = yes; then
15534         case "$gl_cv_func_strerror_r_works" in
15535                     *no) REPLACE_STRERROR_R=1 ;;
15536         esac
15537       else
15538                 REPLACE_STRERROR_R=1
15539       fi
15540     else
15541                   REPLACE_STRERROR_R=1
15542     fi
15543   fi
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560   gl_cv_func_vfprintf_posix=no
15561   case "$gl_cv_func_printf_sizes_c99" in
15562     *yes)
15563       case "$gl_cv_func_printf_long_double" in
15564         *yes)
15565           case "$gl_cv_func_printf_infinite" in
15566             *yes)
15567               case "$gl_cv_func_printf_infinite_long_double" in
15568                 *yes)
15569                   case "$gl_cv_func_printf_directive_a" in
15570                     *yes)
15571                       case "$gl_cv_func_printf_directive_f" in
15572                         *yes)
15573                           case "$gl_cv_func_printf_directive_n" in
15574                             *yes)
15575                               case "$gl_cv_func_printf_directive_ls" in
15576                                 *yes)
15577                                   case "$gl_cv_func_printf_positions" in
15578                                     *yes)
15579                                       case "$gl_cv_func_printf_flag_grouping" in
15580                                         *yes)
15581                                           case "$gl_cv_func_printf_flag_leftadjust" in
15582                                             *yes)
15583                                               case "$gl_cv_func_printf_flag_zero" in
15584                                                 *yes)
15585                                                   case "$gl_cv_func_printf_precision" in
15586                                                     *yes)
15587                                                       case "$gl_cv_func_printf_enomem" in
15588                                                         *yes)
15589                                                           # vfprintf exists and is
15590                                                           # already POSIX compliant.
15591                                                           gl_cv_func_vfprintf_posix=yes
15592                                                           ;;
15593                                                       esac
15594                                                       ;;
15595                                                   esac
15596                                                   ;;
15597                                               esac
15598                                               ;;
15599                                           esac
15600                                           ;;
15601                                       esac
15602                                       ;;
15603                                   esac
15604                                   ;;
15605                               esac
15606                               ;;
15607                           esac
15608                           ;;
15609                       esac
15610                       ;;
15611                   esac
15612                   ;;
15613               esac
15614               ;;
15615           esac
15616           ;;
15617       esac
15618       ;;
15619   esac
15620   if test $gl_cv_func_vfprintf_posix = no; then
15621
15622
15623
15624   case "$gl_cv_func_printf_infinite" in
15625     *yes)
15626       ;;
15627     *)
15628
15629 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
15630
15631       ;;
15632   esac
15633
15634
15635
15636
15637   case "$gl_cv_func_printf_long_double" in
15638     *yes)
15639       case "$gl_cv_func_printf_infinite_long_double" in
15640         *yes)
15641           ;;
15642         *)
15643
15644 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
15645
15646           ;;
15647       esac
15648       ;;
15649   esac
15650
15651
15652
15653   case "$gl_cv_func_printf_directive_a" in
15654     *yes)
15655       ;;
15656     *)
15657
15658 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
15659
15660       for ac_func in nl_langinfo
15661 do :
15662   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
15663 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
15664   cat >>confdefs.h <<_ACEOF
15665 #define HAVE_NL_LANGINFO 1
15666 _ACEOF
15667
15668 fi
15669 done
15670
15671       ;;
15672   esac
15673
15674
15675
15676   case "$gl_cv_func_printf_directive_f" in
15677     *yes)
15678       ;;
15679     *)
15680
15681 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
15682
15683       ;;
15684   esac
15685
15686
15687
15688   case "$gl_cv_func_printf_directive_ls" in
15689     *yes)
15690       ;;
15691     *)
15692
15693 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
15694
15695       ;;
15696   esac
15697
15698
15699
15700   case "$gl_cv_func_printf_flag_grouping" in
15701     *yes)
15702       ;;
15703     *)
15704
15705 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
15706
15707       ;;
15708   esac
15709
15710
15711
15712   case "$gl_cv_func_printf_flag_leftadjust" in
15713     *yes)
15714       ;;
15715     *)
15716
15717 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
15718
15719       ;;
15720   esac
15721
15722
15723
15724   case "$gl_cv_func_printf_flag_zero" in
15725     *yes)
15726       ;;
15727     *)
15728
15729 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
15730
15731       ;;
15732   esac
15733
15734
15735
15736   case "$gl_cv_func_printf_precision" in
15737     *yes)
15738       ;;
15739     *)
15740
15741 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
15742
15743
15744 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15745
15746
15747 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15748
15749       ;;
15750   esac
15751
15752
15753
15754   case "$gl_cv_func_printf_enomem" in
15755     *yes)
15756       ;;
15757     *)
15758
15759 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
15760
15761
15762 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15763
15764
15765 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15766
15767       ;;
15768   esac
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
15811
15812   if test $ac_cv_func_vasnprintf = yes; then
15813
15814 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
15815
15816   fi
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15829 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
15830
15831 else
15832
15833 $as_echo "#define ptrdiff_t long" >>confdefs.h
15834
15835
15836 fi
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
15855
15856   REPLACE_VFPRINTF=1
15857
15858 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
15859
15860   :
15861
15862   fi
15863
15864
15865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h.  */
15867
15868 #ifdef _MSC_VER
15869 MicrosoftCompiler
15870 #endif
15871
15872 _ACEOF
15873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15874   $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
15875   gl_asmext='asm'
15876      gl_c_asm_opt='-c -Fa'
15877
15878 else
15879   gl_asmext='s'
15880      gl_c_asm_opt='-S'
15881
15882 fi
15883 rm -f conftest*
15884
15885
15886
15887
15888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
15889 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
15890 if ${gl_cv_prog_as_underscore+:} false; then :
15891   $as_echo_n "(cached) " >&6
15892 else
15893   cat > conftest.c <<EOF
15894 #ifdef __cplusplus
15895 extern "C" int foo (void);
15896 #endif
15897 int foo(void) { return 0; }
15898 EOF
15899      # Look for the assembly language name in the .s file.
15900      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
15901   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
15902   (eval $ac_try) 2>&5
15903   ac_status=$?
15904   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15905   test $ac_status = 0; }; } >/dev/null 2>&1
15906      if grep _foo conftest.$gl_asmext >/dev/null ; then
15907        gl_cv_prog_as_underscore=yes
15908      else
15909        gl_cv_prog_as_underscore=no
15910      fi
15911      rm -f conftest*
15912
15913 fi
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
15915 $as_echo "$gl_cv_prog_as_underscore" >&6; }
15916   if test $gl_cv_prog_as_underscore = yes; then
15917     USER_LABEL_PREFIX=_
15918   else
15919     USER_LABEL_PREFIX=
15920   fi
15921
15922 cat >>confdefs.h <<_ACEOF
15923 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
15924 _ACEOF
15925
15926   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
15927
15928
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15930 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
15931 if ${ac_cv_header_stdbool_h+:} false; then :
15932   $as_echo_n "(cached) " >&6
15933 else
15934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935 /* end confdefs.h.  */
15936
15937              #include <stdbool.h>
15938              #ifndef bool
15939               "error: bool is not defined"
15940              #endif
15941              #ifndef false
15942               "error: false is not defined"
15943              #endif
15944              #if false
15945               "error: false is not 0"
15946              #endif
15947              #ifndef true
15948               "error: true is not defined"
15949              #endif
15950              #if true != 1
15951               "error: true is not 1"
15952              #endif
15953              #ifndef __bool_true_false_are_defined
15954               "error: __bool_true_false_are_defined is not defined"
15955              #endif
15956
15957              struct s { _Bool s: 1; _Bool t; } s;
15958
15959              char a[true == 1 ? 1 : -1];
15960              char b[false == 0 ? 1 : -1];
15961              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15962              char d[(bool) 0.5 == true ? 1 : -1];
15963              /* See body of main program for 'e'.  */
15964              char f[(_Bool) 0.0 == false ? 1 : -1];
15965              char g[true];
15966              char h[sizeof (_Bool)];
15967              char i[sizeof s.t];
15968              enum { j = false, k = true, l = false * true, m = true * 256 };
15969              /* The following fails for
15970                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15971              _Bool n[m];
15972              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15973              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15974              /* Catch a bug in an HP-UX C compiler.  See
15975                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15976                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
15977               */
15978              _Bool q = true;
15979              _Bool *pq = &q;
15980
15981 int
15982 main ()
15983 {
15984
15985              bool e = &s;
15986              *pq |= q;
15987              *pq |= ! q;
15988              /* Refer to every declared value, to avoid compiler optimizations.  */
15989              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15990                      + !m + !n + !o + !p + !q + !pq);
15991
15992   ;
15993   return 0;
15994 }
15995 _ACEOF
15996 if ac_fn_c_try_compile "$LINENO"; then :
15997   ac_cv_header_stdbool_h=yes
15998 else
15999   ac_cv_header_stdbool_h=no
16000 fi
16001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16002 fi
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16004 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16005    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16006 if test "x$ac_cv_type__Bool" = xyes; then :
16007
16008 cat >>confdefs.h <<_ACEOF
16009 #define HAVE__BOOL 1
16010 _ACEOF
16011
16012
16013 fi
16014
16015
16016
16017     REPLACE_NULL=0;
16018   HAVE_WCHAR_T=1;
16019
16020
16021
16022
16023
16024
16025
16026
16027   if test $ac_cv_type_long_long_int = yes; then
16028     HAVE_LONG_LONG_INT=1
16029   else
16030     HAVE_LONG_LONG_INT=0
16031   fi
16032
16033
16034   if test $ac_cv_type_unsigned_long_long_int = yes; then
16035     HAVE_UNSIGNED_LONG_LONG_INT=1
16036   else
16037     HAVE_UNSIGNED_LONG_LONG_INT=0
16038   fi
16039
16040
16041
16042   if test $ac_cv_header_wchar_h = yes; then
16043     HAVE_WCHAR_H=1
16044   else
16045     HAVE_WCHAR_H=0
16046   fi
16047
16048
16049       if test $ac_cv_header_inttypes_h = yes; then
16050     HAVE_INTTYPES_H=1
16051   else
16052     HAVE_INTTYPES_H=0
16053   fi
16054
16055
16056       if test $ac_cv_header_sys_types_h = yes; then
16057     HAVE_SYS_TYPES_H=1
16058   else
16059     HAVE_SYS_TYPES_H=0
16060   fi
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072      if test $gl_cv_have_include_next = yes; then
16073        gl_cv_next_stdint_h='<'stdint.h'>'
16074      else
16075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16076 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
16077 if ${gl_cv_next_stdint_h+:} false; then :
16078   $as_echo_n "(cached) " >&6
16079 else
16080
16081              if test $ac_cv_header_stdint_h = yes; then
16082
16083
16084                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16085 /* end confdefs.h.  */
16086 #include <stdint.h>
16087
16088 _ACEOF
16089                                                                                                                         case "$host_os" in
16090                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
16091                  *)    gl_absname_cpp="$ac_cpp" ;;
16092                esac
16093
16094                case "$host_os" in
16095                  mingw*)
16096                                                                                                                                      gl_dirsep_regex='[/\\]'
16097                    ;;
16098                  *)
16099                    gl_dirsep_regex='\/'
16100                    ;;
16101                esac
16102                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16103
16104                gl_header_literal_regex=`echo 'stdint.h' \
16105                                         | sed -e "$gl_make_literal_regex_sed"`
16106                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16107                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16108                    s|^/[^/]|//&|
16109                    p
16110                    q
16111                  }'
16112                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16113                       sed -n "$gl_absolute_header_sed"`'"'
16114           else
16115                gl_cv_next_stdint_h='<'stdint.h'>'
16116              fi
16117
16118
16119 fi
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16121 $as_echo "$gl_cv_next_stdint_h" >&6; }
16122      fi
16123      NEXT_STDINT_H=$gl_cv_next_stdint_h
16124
16125      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16126        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16127        gl_next_as_first_directive='<'stdint.h'>'
16128      else
16129        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16130        gl_next_as_first_directive=$gl_cv_next_stdint_h
16131      fi
16132      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16133
16134
16135
16136
16137   if test $ac_cv_header_stdint_h = yes; then
16138     HAVE_STDINT_H=1
16139   else
16140     HAVE_STDINT_H=0
16141   fi
16142
16143
16144     if test $ac_cv_header_stdint_h = yes; then
16145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16146 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
16147 if ${gl_cv_header_working_stdint_h+:} false; then :
16148   $as_echo_n "(cached) " >&6
16149 else
16150   gl_cv_header_working_stdint_h=no
16151        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152 /* end confdefs.h.  */
16153
16154
16155 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16156 #include <stdint.h>
16157 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
16158 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16159 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16160 #endif
16161
16162
16163   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16164      included before <wchar.h>.  */
16165   #include <stddef.h>
16166   #include <signal.h>
16167   #if HAVE_WCHAR_H
16168   # include <stdio.h>
16169   # include <time.h>
16170   # include <wchar.h>
16171   #endif
16172
16173
16174 #ifdef INT8_MAX
16175 int8_t a1 = INT8_MAX;
16176 int8_t a1min = INT8_MIN;
16177 #endif
16178 #ifdef INT16_MAX
16179 int16_t a2 = INT16_MAX;
16180 int16_t a2min = INT16_MIN;
16181 #endif
16182 #ifdef INT32_MAX
16183 int32_t a3 = INT32_MAX;
16184 int32_t a3min = INT32_MIN;
16185 #endif
16186 #ifdef INT64_MAX
16187 int64_t a4 = INT64_MAX;
16188 int64_t a4min = INT64_MIN;
16189 #endif
16190 #ifdef UINT8_MAX
16191 uint8_t b1 = UINT8_MAX;
16192 #else
16193 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16194 #endif
16195 #ifdef UINT16_MAX
16196 uint16_t b2 = UINT16_MAX;
16197 #endif
16198 #ifdef UINT32_MAX
16199 uint32_t b3 = UINT32_MAX;
16200 #endif
16201 #ifdef UINT64_MAX
16202 uint64_t b4 = UINT64_MAX;
16203 #endif
16204 int_least8_t c1 = INT8_C (0x7f);
16205 int_least8_t c1max = INT_LEAST8_MAX;
16206 int_least8_t c1min = INT_LEAST8_MIN;
16207 int_least16_t c2 = INT16_C (0x7fff);
16208 int_least16_t c2max = INT_LEAST16_MAX;
16209 int_least16_t c2min = INT_LEAST16_MIN;
16210 int_least32_t c3 = INT32_C (0x7fffffff);
16211 int_least32_t c3max = INT_LEAST32_MAX;
16212 int_least32_t c3min = INT_LEAST32_MIN;
16213 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16214 int_least64_t c4max = INT_LEAST64_MAX;
16215 int_least64_t c4min = INT_LEAST64_MIN;
16216 uint_least8_t d1 = UINT8_C (0xff);
16217 uint_least8_t d1max = UINT_LEAST8_MAX;
16218 uint_least16_t d2 = UINT16_C (0xffff);
16219 uint_least16_t d2max = UINT_LEAST16_MAX;
16220 uint_least32_t d3 = UINT32_C (0xffffffff);
16221 uint_least32_t d3max = UINT_LEAST32_MAX;
16222 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16223 uint_least64_t d4max = UINT_LEAST64_MAX;
16224 int_fast8_t e1 = INT_FAST8_MAX;
16225 int_fast8_t e1min = INT_FAST8_MIN;
16226 int_fast16_t e2 = INT_FAST16_MAX;
16227 int_fast16_t e2min = INT_FAST16_MIN;
16228 int_fast32_t e3 = INT_FAST32_MAX;
16229 int_fast32_t e3min = INT_FAST32_MIN;
16230 int_fast64_t e4 = INT_FAST64_MAX;
16231 int_fast64_t e4min = INT_FAST64_MIN;
16232 uint_fast8_t f1 = UINT_FAST8_MAX;
16233 uint_fast16_t f2 = UINT_FAST16_MAX;
16234 uint_fast32_t f3 = UINT_FAST32_MAX;
16235 uint_fast64_t f4 = UINT_FAST64_MAX;
16236 #ifdef INTPTR_MAX
16237 intptr_t g = INTPTR_MAX;
16238 intptr_t gmin = INTPTR_MIN;
16239 #endif
16240 #ifdef UINTPTR_MAX
16241 uintptr_t h = UINTPTR_MAX;
16242 #endif
16243 intmax_t i = INTMAX_MAX;
16244 uintmax_t j = UINTMAX_MAX;
16245
16246 #include <limits.h> /* for CHAR_BIT */
16247 #define TYPE_MINIMUM(t) \
16248   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16249 #define TYPE_MAXIMUM(t) \
16250   ((t) ((t) 0 < (t) -1 \
16251         ? (t) -1 \
16252         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16253 struct s {
16254   int check_PTRDIFF:
16255       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16256       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16257       ? 1 : -1;
16258   /* Detect bug in FreeBSD 6.0 / ia64.  */
16259   int check_SIG_ATOMIC:
16260       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16261       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16262       ? 1 : -1;
16263   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16264   int check_WCHAR:
16265       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16266       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16267       ? 1 : -1;
16268   /* Detect bug in mingw.  */
16269   int check_WINT:
16270       WINT_MIN == TYPE_MINIMUM (wint_t)
16271       && WINT_MAX == TYPE_MAXIMUM (wint_t)
16272       ? 1 : -1;
16273
16274   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
16275   int check_UINT8_C:
16276         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16277   int check_UINT16_C:
16278         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16279
16280   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
16281 #ifdef UINT8_MAX
16282   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16283 #endif
16284 #ifdef UINT16_MAX
16285   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16286 #endif
16287 #ifdef UINT32_MAX
16288   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16289 #endif
16290 #ifdef UINT64_MAX
16291   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16292 #endif
16293   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16294   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16295   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16296   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16297   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16298   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16299   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16300   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16301   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16302   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16303   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16304 };
16305
16306 int
16307 main ()
16308 {
16309
16310   ;
16311   return 0;
16312 }
16313 _ACEOF
16314 if ac_fn_c_try_compile "$LINENO"; then :
16315                                                     if test "$cross_compiling" = yes; then :
16316                  gl_cv_header_working_stdint_h=yes
16317
16318 else
16319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320 /* end confdefs.h.  */
16321
16322
16323 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16324 #include <stdint.h>
16325
16326
16327   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16328      included before <wchar.h>.  */
16329   #include <stddef.h>
16330   #include <signal.h>
16331   #if HAVE_WCHAR_H
16332   # include <stdio.h>
16333   # include <time.h>
16334   # include <wchar.h>
16335   #endif
16336
16337
16338 #include <stdio.h>
16339 #include <string.h>
16340 #define MVAL(macro) MVAL1(macro)
16341 #define MVAL1(expression) #expression
16342 static const char *macro_values[] =
16343   {
16344 #ifdef INT8_MAX
16345     MVAL (INT8_MAX),
16346 #endif
16347 #ifdef INT16_MAX
16348     MVAL (INT16_MAX),
16349 #endif
16350 #ifdef INT32_MAX
16351     MVAL (INT32_MAX),
16352 #endif
16353 #ifdef INT64_MAX
16354     MVAL (INT64_MAX),
16355 #endif
16356 #ifdef UINT8_MAX
16357     MVAL (UINT8_MAX),
16358 #endif
16359 #ifdef UINT16_MAX
16360     MVAL (UINT16_MAX),
16361 #endif
16362 #ifdef UINT32_MAX
16363     MVAL (UINT32_MAX),
16364 #endif
16365 #ifdef UINT64_MAX
16366     MVAL (UINT64_MAX),
16367 #endif
16368     NULL
16369   };
16370
16371 int
16372 main ()
16373 {
16374
16375   const char **mv;
16376   for (mv = macro_values; *mv != NULL; mv++)
16377     {
16378       const char *value = *mv;
16379       /* Test whether it looks like a cast expression.  */
16380       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
16381           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
16382           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
16383           || strncmp (value, "((int)"/*)*/, 6) == 0
16384           || strncmp (value, "((signed short)"/*)*/, 15) == 0
16385           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
16386         return mv - macro_values + 1;
16387     }
16388   return 0;
16389
16390   ;
16391   return 0;
16392 }
16393 _ACEOF
16394 if ac_fn_c_try_run "$LINENO"; then :
16395   gl_cv_header_working_stdint_h=yes
16396 fi
16397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16398   conftest.$ac_objext conftest.beam conftest.$ac_ext
16399 fi
16400
16401
16402 fi
16403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16404
16405 fi
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
16407 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
16408   fi
16409   if test "$gl_cv_header_working_stdint_h" = yes; then
16410     STDINT_H=
16411   else
16412             for ac_header in sys/inttypes.h sys/bitypes.h
16413 do :
16414   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16415 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16416 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16417   cat >>confdefs.h <<_ACEOF
16418 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16419 _ACEOF
16420
16421 fi
16422
16423 done
16424
16425     if test $ac_cv_header_sys_inttypes_h = yes; then
16426       HAVE_SYS_INTTYPES_H=1
16427     else
16428       HAVE_SYS_INTTYPES_H=0
16429     fi
16430
16431     if test $ac_cv_header_sys_bitypes_h = yes; then
16432       HAVE_SYS_BITYPES_H=1
16433     else
16434       HAVE_SYS_BITYPES_H=0
16435     fi
16436
16437
16438
16439
16440   if test $APPLE_UNIVERSAL_BUILD = 0; then
16441
16442
16443   for gltype in ptrdiff_t size_t ; do
16444     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16445 $as_echo_n "checking for bit size of $gltype... " >&6; }
16446 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16447   $as_echo_n "(cached) " >&6
16448 else
16449   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
16450   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16451      included before <wchar.h>.  */
16452   #include <stddef.h>
16453   #include <signal.h>
16454   #if HAVE_WCHAR_H
16455   # include <stdio.h>
16456   # include <time.h>
16457   # include <wchar.h>
16458   #endif
16459
16460 #include <limits.h>"; then :
16461
16462 else
16463   result=unknown
16464 fi
16465
16466        eval gl_cv_bitsizeof_${gltype}=\$result
16467
16468 fi
16469 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16470                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16471 $as_echo "$ac_res" >&6; }
16472     eval result=\$gl_cv_bitsizeof_${gltype}
16473     if test $result = unknown; then
16474                                                 result=0
16475     fi
16476     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16477     cat >>confdefs.h <<_ACEOF
16478 #define BITSIZEOF_${GLTYPE} $result
16479 _ACEOF
16480
16481     eval BITSIZEOF_${GLTYPE}=\$result
16482   done
16483
16484
16485   fi
16486
16487
16488   for gltype in sig_atomic_t wchar_t wint_t ; do
16489     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16490 $as_echo_n "checking for bit size of $gltype... " >&6; }
16491 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16492   $as_echo_n "(cached) " >&6
16493 else
16494   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
16495   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16496      included before <wchar.h>.  */
16497   #include <stddef.h>
16498   #include <signal.h>
16499   #if HAVE_WCHAR_H
16500   # include <stdio.h>
16501   # include <time.h>
16502   # include <wchar.h>
16503   #endif
16504
16505 #include <limits.h>"; then :
16506
16507 else
16508   result=unknown
16509 fi
16510
16511        eval gl_cv_bitsizeof_${gltype}=\$result
16512
16513 fi
16514 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16515                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16516 $as_echo "$ac_res" >&6; }
16517     eval result=\$gl_cv_bitsizeof_${gltype}
16518     if test $result = unknown; then
16519                                                 result=0
16520     fi
16521     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16522     cat >>confdefs.h <<_ACEOF
16523 #define BITSIZEOF_${GLTYPE} $result
16524 _ACEOF
16525
16526     eval BITSIZEOF_${GLTYPE}=\$result
16527   done
16528
16529
16530
16531
16532   for gltype in sig_atomic_t wchar_t wint_t ; do
16533     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16534 $as_echo_n "checking whether $gltype is signed... " >&6; }
16535 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
16536   $as_echo_n "(cached) " >&6
16537 else
16538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16539 /* end confdefs.h.  */
16540
16541   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16542      included before <wchar.h>.  */
16543   #include <stddef.h>
16544   #include <signal.h>
16545   #if HAVE_WCHAR_H
16546   # include <stdio.h>
16547   # include <time.h>
16548   # include <wchar.h>
16549   #endif
16550
16551             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16552 int
16553 main ()
16554 {
16555
16556   ;
16557   return 0;
16558 }
16559 _ACEOF
16560 if ac_fn_c_try_compile "$LINENO"; then :
16561   result=yes
16562 else
16563   result=no
16564 fi
16565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16566        eval gl_cv_type_${gltype}_signed=\$result
16567
16568 fi
16569 eval ac_res=\$gl_cv_type_${gltype}_signed
16570                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16571 $as_echo "$ac_res" >&6; }
16572     eval result=\$gl_cv_type_${gltype}_signed
16573     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16574     if test "$result" = yes; then
16575       cat >>confdefs.h <<_ACEOF
16576 #define HAVE_SIGNED_${GLTYPE} 1
16577 _ACEOF
16578
16579       eval HAVE_SIGNED_${GLTYPE}=1
16580     else
16581       eval HAVE_SIGNED_${GLTYPE}=0
16582     fi
16583   done
16584
16585
16586   gl_cv_type_ptrdiff_t_signed=yes
16587   gl_cv_type_size_t_signed=no
16588   if test $APPLE_UNIVERSAL_BUILD = 0; then
16589
16590
16591   for gltype in ptrdiff_t size_t ; do
16592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16593 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
16594 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16595   $as_echo_n "(cached) " >&6
16596 else
16597   eval gl_cv_type_${gltype}_suffix=no
16598        eval result=\$gl_cv_type_${gltype}_signed
16599        if test "$result" = yes; then
16600          glsufu=
16601        else
16602          glsufu=u
16603        fi
16604        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16605          case $glsuf in
16606            '')  gltype1='int';;
16607            l)   gltype1='long int';;
16608            ll)  gltype1='long long int';;
16609            i64) gltype1='__int64';;
16610            u)   gltype1='unsigned int';;
16611            ul)  gltype1='unsigned long int';;
16612            ull) gltype1='unsigned long long int';;
16613            ui64)gltype1='unsigned __int64';;
16614          esac
16615          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616 /* end confdefs.h.  */
16617
16618   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16619      included before <wchar.h>.  */
16620   #include <stddef.h>
16621   #include <signal.h>
16622   #if HAVE_WCHAR_H
16623   # include <stdio.h>
16624   # include <time.h>
16625   # include <wchar.h>
16626   #endif
16627
16628               extern $gltype foo;
16629               extern $gltype1 foo;
16630 int
16631 main ()
16632 {
16633
16634   ;
16635   return 0;
16636 }
16637 _ACEOF
16638 if ac_fn_c_try_compile "$LINENO"; then :
16639   eval gl_cv_type_${gltype}_suffix=\$glsuf
16640 fi
16641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16642          eval result=\$gl_cv_type_${gltype}_suffix
16643          test "$result" != no && break
16644        done
16645 fi
16646 eval ac_res=\$gl_cv_type_${gltype}_suffix
16647                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16648 $as_echo "$ac_res" >&6; }
16649     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16650     eval result=\$gl_cv_type_${gltype}_suffix
16651     test "$result" = no && result=
16652     eval ${GLTYPE}_SUFFIX=\$result
16653     cat >>confdefs.h <<_ACEOF
16654 #define ${GLTYPE}_SUFFIX $result
16655 _ACEOF
16656
16657   done
16658
16659
16660   fi
16661
16662
16663   for gltype in sig_atomic_t wchar_t wint_t ; do
16664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16665 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
16666 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16667   $as_echo_n "(cached) " >&6
16668 else
16669   eval gl_cv_type_${gltype}_suffix=no
16670        eval result=\$gl_cv_type_${gltype}_signed
16671        if test "$result" = yes; then
16672          glsufu=
16673        else
16674          glsufu=u
16675        fi
16676        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16677          case $glsuf in
16678            '')  gltype1='int';;
16679            l)   gltype1='long int';;
16680            ll)  gltype1='long long int';;
16681            i64) gltype1='__int64';;
16682            u)   gltype1='unsigned int';;
16683            ul)  gltype1='unsigned long int';;
16684            ull) gltype1='unsigned long long int';;
16685            ui64)gltype1='unsigned __int64';;
16686          esac
16687          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16688 /* end confdefs.h.  */
16689
16690   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16691      included before <wchar.h>.  */
16692   #include <stddef.h>
16693   #include <signal.h>
16694   #if HAVE_WCHAR_H
16695   # include <stdio.h>
16696   # include <time.h>
16697   # include <wchar.h>
16698   #endif
16699
16700               extern $gltype foo;
16701               extern $gltype1 foo;
16702 int
16703 main ()
16704 {
16705
16706   ;
16707   return 0;
16708 }
16709 _ACEOF
16710 if ac_fn_c_try_compile "$LINENO"; then :
16711   eval gl_cv_type_${gltype}_suffix=\$glsuf
16712 fi
16713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16714          eval result=\$gl_cv_type_${gltype}_suffix
16715          test "$result" != no && break
16716        done
16717 fi
16718 eval ac_res=\$gl_cv_type_${gltype}_suffix
16719                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16720 $as_echo "$ac_res" >&6; }
16721     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16722     eval result=\$gl_cv_type_${gltype}_suffix
16723     test "$result" = no && result=
16724     eval ${GLTYPE}_SUFFIX=\$result
16725     cat >>confdefs.h <<_ACEOF
16726 #define ${GLTYPE}_SUFFIX $result
16727 _ACEOF
16728
16729   done
16730
16731
16732
16733           if test $BITSIZEOF_WINT_T -lt 32; then
16734     BITSIZEOF_WINT_T=32
16735   fi
16736
16737     STDINT_H=stdint.h
16738   fi
16739
16740    if test -n "$STDINT_H"; then
16741   GL_GENERATE_STDINT_H_TRUE=
16742   GL_GENERATE_STDINT_H_FALSE='#'
16743 else
16744   GL_GENERATE_STDINT_H_TRUE='#'
16745   GL_GENERATE_STDINT_H_FALSE=
16746 fi
16747
16748
16749
16750
16751 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16752 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16753   ac_have_decl=1
16754 else
16755   ac_have_decl=0
16756 fi
16757
16758 cat >>confdefs.h <<_ACEOF
16759 #define HAVE_DECL_STRDUP $ac_have_decl
16760 _ACEOF
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775      if test $gl_cv_have_include_next = yes; then
16776        gl_cv_next_string_h='<'string.h'>'
16777      else
16778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16779 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16780 if ${gl_cv_next_string_h+:} false; then :
16781   $as_echo_n "(cached) " >&6
16782 else
16783
16784                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16785 /* end confdefs.h.  */
16786 #include <string.h>
16787
16788 _ACEOF
16789                                                                                                                         case "$host_os" in
16790                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
16791                  *)    gl_absname_cpp="$ac_cpp" ;;
16792                esac
16793
16794                case "$host_os" in
16795                  mingw*)
16796                                                                                                                                      gl_dirsep_regex='[/\\]'
16797                    ;;
16798                  *)
16799                    gl_dirsep_regex='\/'
16800                    ;;
16801                esac
16802                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16803
16804                gl_header_literal_regex=`echo 'string.h' \
16805                                         | sed -e "$gl_make_literal_regex_sed"`
16806                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16807                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16808                    s|^/[^/]|//&|
16809                    p
16810                    q
16811                  }'
16812                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16813                       sed -n "$gl_absolute_header_sed"`'"'
16814
16815
16816 fi
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16818 $as_echo "$gl_cv_next_string_h" >&6; }
16819      fi
16820      NEXT_STRING_H=$gl_cv_next_string_h
16821
16822      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16823        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16824        gl_next_as_first_directive='<'string.h'>'
16825      else
16826        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16827        gl_next_as_first_directive=$gl_cv_next_string_h
16828      fi
16829      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
16830
16831
16832
16833
16834
16835
16836     for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r      strerror_r strsignal strverscmp; do
16837     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16838     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16839 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16840 if eval \${$as_gl_Symbol+:} false; then :
16841   $as_echo_n "(cached) " >&6
16842 else
16843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16844 /* end confdefs.h.  */
16845 #include <string.h>
16846
16847 int
16848 main ()
16849 {
16850 #undef $gl_func
16851   (void) $gl_func;
16852   ;
16853   return 0;
16854 }
16855 _ACEOF
16856 if ac_fn_c_try_compile "$LINENO"; then :
16857   eval "$as_gl_Symbol=yes"
16858 else
16859   eval "$as_gl_Symbol=no"
16860 fi
16861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16862 fi
16863 eval ac_res=\$$as_gl_Symbol
16864                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16865 $as_echo "$ac_res" >&6; }
16866     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16867   cat >>confdefs.h <<_ACEOF
16868 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16869 _ACEOF
16870
16871                      eval ac_cv_have_decl_$gl_func=yes
16872 fi
16873       done
16874
16875
16876
16877   GNULIB_MKTIME=0;
16878   GNULIB_NANOSLEEP=0;
16879   GNULIB_STRPTIME=0;
16880   GNULIB_TIMEGM=0;
16881   GNULIB_TIME_R=0;
16882     HAVE_DECL_LOCALTIME_R=1;
16883   HAVE_NANOSLEEP=1;
16884   HAVE_STRPTIME=1;
16885   HAVE_TIMEGM=1;
16886         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
16887   REPLACE_MKTIME=GNULIB_PORTCHECK;
16888   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
16889   REPLACE_TIMEGM=GNULIB_PORTCHECK;
16890
16891
16892
16893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
16894 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
16895 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
16896   $as_echo_n "(cached) " >&6
16897 else
16898   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16899 /* end confdefs.h.  */
16900 #include <time.h>
16901
16902 int
16903 main ()
16904 {
16905 static struct timespec x; x.tv_sec = x.tv_nsec;
16906   ;
16907   return 0;
16908 }
16909 _ACEOF
16910 if ac_fn_c_try_compile "$LINENO"; then :
16911   gl_cv_sys_struct_timespec_in_time_h=yes
16912 else
16913   gl_cv_sys_struct_timespec_in_time_h=no
16914 fi
16915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16916 fi
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
16918 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
16919
16920   TIME_H_DEFINES_STRUCT_TIMESPEC=0
16921   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
16922   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
16923   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
16924     TIME_H_DEFINES_STRUCT_TIMESPEC=1
16925   else
16926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
16927 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
16928 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
16929   $as_echo_n "(cached) " >&6
16930 else
16931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16932 /* end confdefs.h.  */
16933 #include <sys/time.h>
16934
16935 int
16936 main ()
16937 {
16938 static struct timespec x; x.tv_sec = x.tv_nsec;
16939   ;
16940   return 0;
16941 }
16942 _ACEOF
16943 if ac_fn_c_try_compile "$LINENO"; then :
16944   gl_cv_sys_struct_timespec_in_sys_time_h=yes
16945 else
16946   gl_cv_sys_struct_timespec_in_sys_time_h=no
16947 fi
16948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16949 fi
16950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
16951 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
16952     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
16953       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
16954     else
16955       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
16956 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
16957 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
16958   $as_echo_n "(cached) " >&6
16959 else
16960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16961 /* end confdefs.h.  */
16962 #include <pthread.h>
16963
16964 int
16965 main ()
16966 {
16967 static struct timespec x; x.tv_sec = x.tv_nsec;
16968   ;
16969   return 0;
16970 }
16971 _ACEOF
16972 if ac_fn_c_try_compile "$LINENO"; then :
16973   gl_cv_sys_struct_timespec_in_pthread_h=yes
16974 else
16975   gl_cv_sys_struct_timespec_in_pthread_h=no
16976 fi
16977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16978 fi
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
16980 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
16981       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
16982         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
16983       fi
16984     fi
16985   fi
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001      if test $gl_cv_have_include_next = yes; then
17002        gl_cv_next_time_h='<'time.h'>'
17003      else
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17005 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17006 if ${gl_cv_next_time_h+:} false; then :
17007   $as_echo_n "(cached) " >&6
17008 else
17009
17010                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17011 /* end confdefs.h.  */
17012 #include <time.h>
17013
17014 _ACEOF
17015                                                                                                                         case "$host_os" in
17016                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17017                  *)    gl_absname_cpp="$ac_cpp" ;;
17018                esac
17019
17020                case "$host_os" in
17021                  mingw*)
17022                                                                                                                                      gl_dirsep_regex='[/\\]'
17023                    ;;
17024                  *)
17025                    gl_dirsep_regex='\/'
17026                    ;;
17027                esac
17028                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17029
17030                gl_header_literal_regex=`echo 'time.h' \
17031                                         | sed -e "$gl_make_literal_regex_sed"`
17032                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17033                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17034                    s|^/[^/]|//&|
17035                    p
17036                    q
17037                  }'
17038                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17039                       sed -n "$gl_absolute_header_sed"`'"'
17040
17041
17042 fi
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17044 $as_echo "$gl_cv_next_time_h" >&6; }
17045      fi
17046      NEXT_TIME_H=$gl_cv_next_time_h
17047
17048      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17049        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17050        gl_next_as_first_directive='<'time.h'>'
17051      else
17052        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17053        gl_next_as_first_directive=$gl_cv_next_time_h
17054      fi
17055      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17066 $as_echo_n "checking whether the utimes function works... " >&6; }
17067 if ${gl_cv_func_working_utimes+:} false; then :
17068   $as_echo_n "(cached) " >&6
17069 else
17070
17071   if test "$cross_compiling" = yes; then :
17072   gl_cv_func_working_utimes=no
17073 else
17074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075 /* end confdefs.h.  */
17076
17077 #include <sys/types.h>
17078 #include <sys/stat.h>
17079 #include <fcntl.h>
17080 #include <sys/time.h>
17081 #include <time.h>
17082 #include <unistd.h>
17083 #include <stdlib.h>
17084 #include <stdio.h>
17085 #include <utime.h>
17086
17087 static int
17088 inorder (time_t a, time_t b, time_t c)
17089 {
17090   return a <= b && b <= c;
17091 }
17092
17093 int
17094 main ()
17095 {
17096   int result = 0;
17097   char const *file = "conftest.utimes";
17098   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
17099
17100   /* Test whether utimes() essentially works.  */
17101   {
17102     struct stat sbuf;
17103     FILE *f = fopen (file, "w");
17104     if (f == NULL)
17105       result |= 1;
17106     else if (fclose (f) != 0)
17107       result |= 1;
17108     else if (utimes (file, timeval) != 0)
17109       result |= 2;
17110     else if (lstat (file, &sbuf) != 0)
17111       result |= 1;
17112     else if (!(sbuf.st_atime == timeval[0].tv_sec
17113                && sbuf.st_mtime == timeval[1].tv_sec))
17114       result |= 4;
17115     if (unlink (file) != 0)
17116       result |= 1;
17117   }
17118
17119   /* Test whether utimes() with a NULL argument sets the file's timestamp
17120      to the current time.  Use 'fstat' as well as 'time' to
17121      determine the "current" time, to accommodate NFS file systems
17122      if there is a time skew between the host and the NFS server.  */
17123   {
17124     int fd = open (file, O_WRONLY|O_CREAT, 0644);
17125     if (fd < 0)
17126       result |= 1;
17127     else
17128       {
17129         time_t t0, t2;
17130         struct stat st0, st1, st2;
17131         if (time (&t0) == (time_t) -1)
17132           result |= 1;
17133         else if (fstat (fd, &st0) != 0)
17134           result |= 1;
17135         else if (utimes (file, timeval) != 0)
17136           result |= 2;
17137         else if (utimes (file, NULL) != 0)
17138           result |= 8;
17139         else if (fstat (fd, &st1) != 0)
17140           result |= 1;
17141         else if (write (fd, "\n", 1) != 1)
17142           result |= 1;
17143         else if (fstat (fd, &st2) != 0)
17144           result |= 1;
17145         else if (time (&t2) == (time_t) -1)
17146           result |= 1;
17147         else
17148           {
17149             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
17150             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
17151             if (! (st1.st_atime == st1.st_mtime))
17152               result |= 16;
17153             if (! (m_ok_POSIX || m_ok_NFS))
17154               result |= 32;
17155           }
17156         if (close (fd) != 0)
17157           result |= 1;
17158       }
17159     if (unlink (file) != 0)
17160       result |= 1;
17161   }
17162
17163   /* Test whether utimes() with a NULL argument works on read-only files.  */
17164   {
17165     int fd = open (file, O_WRONLY|O_CREAT, 0444);
17166     if (fd < 0)
17167       result |= 1;
17168     else if (close (fd) != 0)
17169       result |= 1;
17170     else if (utimes (file, NULL) != 0)
17171       result |= 64;
17172     if (unlink (file) != 0)
17173       result |= 1;
17174   }
17175
17176   return result;
17177 }
17178
17179 _ACEOF
17180 if ac_fn_c_try_run "$LINENO"; then :
17181   gl_cv_func_working_utimes=yes
17182 else
17183   gl_cv_func_working_utimes=no
17184 fi
17185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17186   conftest.$ac_objext conftest.beam conftest.$ac_ext
17187 fi
17188
17189 fi
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
17191 $as_echo "$gl_cv_func_working_utimes" >&6; }
17192
17193   if test $gl_cv_func_working_utimes = yes; then
17194
17195 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
17196
17197   fi
17198
17199
17200
17201
17202
17203   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
17204 $as_echo_n "checking for struct utimbuf... " >&6; }
17205 if ${gl_cv_sys_struct_utimbuf+:} false; then :
17206   $as_echo_n "(cached) " >&6
17207 else
17208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17209 /* end confdefs.h.  */
17210 #if HAVE_SYS_TIME_H
17211              #include <sys/time.h>
17212             #endif
17213             #include <time.h>
17214             #ifdef HAVE_UTIME_H
17215              #include <utime.h>
17216             #endif
17217
17218 int
17219 main ()
17220 {
17221 static struct utimbuf x; x.actime = x.modtime;
17222   ;
17223   return 0;
17224 }
17225 _ACEOF
17226 if ac_fn_c_try_compile "$LINENO"; then :
17227   gl_cv_sys_struct_utimbuf=yes
17228 else
17229   gl_cv_sys_struct_utimbuf=no
17230 fi
17231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17232 fi
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
17234 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
17235
17236   if test $gl_cv_sys_struct_utimbuf = yes; then
17237
17238 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
17239
17240   fi
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
17254 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
17255 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
17256   $as_echo_n "(cached) " >&6
17257 else
17258   gl_cv_header_wchar_h_correct_inline=yes
17259      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17260 /* end confdefs.h.  */
17261
17262        #define wcstod renamed_wcstod
17263 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17264    <wchar.h>.
17265    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17266    included before <wchar.h>.  */
17267 #include <stddef.h>
17268 #include <stdio.h>
17269 #include <time.h>
17270 #include <wchar.h>
17271 extern int zero (void);
17272 int main () { return zero(); }
17273
17274 _ACEOF
17275      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17276   (eval $ac_compile) 2>&5
17277   ac_status=$?
17278   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17279   test $ac_status = 0; }; then
17280        mv conftest.$ac_objext conftest1.$ac_objext
17281        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17282 /* end confdefs.h.  */
17283
17284          #define wcstod renamed_wcstod
17285 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17286    <wchar.h>.
17287    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17288    included before <wchar.h>.  */
17289 #include <stddef.h>
17290 #include <stdio.h>
17291 #include <time.h>
17292 #include <wchar.h>
17293 int zero (void) { return 0; }
17294
17295 _ACEOF
17296        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17297   (eval $ac_compile) 2>&5
17298   ac_status=$?
17299   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17300   test $ac_status = 0; }; then
17301          mv conftest.$ac_objext conftest2.$ac_objext
17302          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
17303            :
17304          else
17305            gl_cv_header_wchar_h_correct_inline=no
17306          fi
17307        fi
17308      fi
17309      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
17310
17311 fi
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
17313 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
17314   if test $gl_cv_header_wchar_h_correct_inline = no; then
17315     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
17316 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
17317 C99 mode. You have four options:
17318   - Add the flag -fgnu89-inline to CC and reconfigure, or
17319   - Fix your include files, using parts of
17320     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
17321   - Use a gcc version older than 4.3, or
17322   - Don't use the flags -std=c99 or -std=gnu99.
17323 Configuration aborted." "$LINENO" 5
17324   fi
17325
17326
17327   GNULIB_ISWBLANK=0;
17328   GNULIB_WCTYPE=0;
17329   GNULIB_ISWCTYPE=0;
17330   GNULIB_WCTRANS=0;
17331   GNULIB_TOWCTRANS=0;
17332     HAVE_ISWBLANK=1;
17333   HAVE_WCTYPE_T=1;
17334   HAVE_WCTRANS_T=1;
17335   REPLACE_ISWBLANK=0;
17336
17337
17338
17339
17340
17341
17342    if false; then
17343   GL_COND_LIBTOOL_TRUE=
17344   GL_COND_LIBTOOL_FALSE='#'
17345 else
17346   GL_COND_LIBTOOL_TRUE='#'
17347   GL_COND_LIBTOOL_FALSE=
17348 fi
17349
17350   gl_cond_libtool=false
17351   gl_libdeps=
17352   gl_ltlibdeps=
17353   gl_m4_base='m4'
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363   gl_source_base='lib'
17364
17365
17366   if test $ac_cv_func_alloca_works = no; then
17367     :
17368   fi
17369
17370   # Define an additional variable used in the Makefile substitution.
17371   if test $ac_cv_working_alloca_h = yes; then
17372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17373 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17374 if ${gl_cv_rpl_alloca+:} false; then :
17375   $as_echo_n "(cached) " >&6
17376 else
17377
17378       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379 /* end confdefs.h.  */
17380
17381 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17382         Need own alloca
17383 #endif
17384
17385 _ACEOF
17386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17387   $EGREP "Need own alloca" >/dev/null 2>&1; then :
17388   gl_cv_rpl_alloca=yes
17389 else
17390   gl_cv_rpl_alloca=no
17391 fi
17392 rm -f conftest*
17393
17394
17395 fi
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17397 $as_echo "$gl_cv_rpl_alloca" >&6; }
17398     if test $gl_cv_rpl_alloca = yes; then
17399
17400 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17401
17402       ALLOCA_H=alloca.h
17403     else
17404                   ALLOCA_H=
17405     fi
17406   else
17407     ALLOCA_H=alloca.h
17408   fi
17409
17410    if test -n "$ALLOCA_H"; then
17411   GL_GENERATE_ALLOCA_H_TRUE=
17412   GL_GENERATE_ALLOCA_H_FALSE='#'
17413 else
17414   GL_GENERATE_ALLOCA_H_TRUE='#'
17415   GL_GENERATE_ALLOCA_H_FALSE=
17416 fi
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17428
17429
17430
17431
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
17433 $as_echo_n "checking for GNU libc compatible calloc... " >&6; }
17434 if ${ac_cv_func_calloc_0_nonnull+:} false; then :
17435   $as_echo_n "(cached) " >&6
17436 else
17437   if test "$cross_compiling" = yes; then :
17438   case "$host_os" in
17439                   # Guess yes on glibc systems.
17440           *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
17441                   # If we don't know, assume the worst.
17442           *)      ac_cv_func_calloc_0_nonnull="guessing no" ;;
17443         esac
17444
17445 else
17446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17447 /* end confdefs.h.  */
17448 $ac_includes_default
17449 int
17450 main ()
17451 {
17452 int result = 0;
17453             if (!calloc (0, 0))
17454               result |= 1;
17455             if (calloc ((size_t) -1 / 8 + 1, 8))
17456               result |= 2;
17457             return result;
17458
17459   ;
17460   return 0;
17461 }
17462 _ACEOF
17463 if ac_fn_c_try_run "$LINENO"; then :
17464   ac_cv_func_calloc_0_nonnull=yes
17465 else
17466   ac_cv_func_calloc_0_nonnull=no
17467 fi
17468 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17469   conftest.$ac_objext conftest.beam conftest.$ac_ext
17470 fi
17471
17472 fi
17473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
17474 $as_echo "$ac_cv_func_calloc_0_nonnull" >&6; }
17475   case "$ac_cv_func_calloc_0_nonnull" in
17476     *yes)
17477
17478 $as_echo "#define HAVE_CALLOC_GNU 1" >>confdefs.h
17479
17480       ;;
17481     *)
17482       $as_echo "#define HAVE_CALLOC_GNU 0" >>confdefs.h
17483
17484      REPLACE_CALLOC=1
17485
17486       ;;
17487   esac
17488
17489
17490 if test $REPLACE_CALLOC = 1; then
17491
17492
17493
17494
17495
17496
17497
17498
17499   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17500
17501 fi
17502
17503
17504 cat >>confdefs.h <<_ACEOF
17505 #define GNULIB_CALLOC_GNU 1
17506 _ACEOF
17507
17508
17509
17510
17511
17512   if test $gl_cv_func_malloc_posix = yes; then
17513
17514 $as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
17515
17516   else
17517     REPLACE_CALLOC=1
17518   fi
17519
17520 if test $REPLACE_CALLOC = 1; then
17521
17522
17523
17524
17525
17526
17527
17528
17529   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17530
17531 fi
17532
17533
17534
17535
17536
17537           GNULIB_CALLOC_POSIX=1
17538
17539
17540
17541
17542
17543 $as_echo "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
17544
17545
17546
17547
17548
17549
17550
17551
17552           GNULIB_CHDIR=1
17553
17554
17555
17556
17557
17558 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17559
17560
17561
17562
17563
17564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17565 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17566 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17567   $as_echo_n "(cached) " >&6
17568 else
17569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17570 /* end confdefs.h.  */
17571
17572 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17573 #if HAVE_UNISTD_H
17574 # include <unistd.h>
17575 #endif
17576 #include <limits.h>
17577 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17578 # include <sys/param.h>
17579 #endif
17580 #if !defined PATH_MAX && defined MAXPATHLEN
17581 # define PATH_MAX MAXPATHLEN
17582 #endif
17583 #ifdef __hpux
17584 # undef PATH_MAX
17585 # define PATH_MAX 1024
17586 #endif
17587 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17588 # undef PATH_MAX
17589 # define PATH_MAX 260
17590 #endif
17591
17592 #ifdef PATH_MAX
17593 have_arbitrary_file_name_length_limit
17594 #endif
17595 _ACEOF
17596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17597   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17598   gl_cv_have_arbitrary_file_name_length_limit=yes
17599 else
17600   gl_cv_have_arbitrary_file_name_length_limit=no
17601 fi
17602 rm -f conftest*
17603
17604 fi
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17606 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17607
17608 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17609
17610
17611
17612
17613
17614
17615
17616
17617   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17618
17619
17620
17621   :
17622
17623 fi
17624
17625
17626
17627   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17628   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17629
17630   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17631   # programs in the package would end up linked with that potentially-shared
17632   # library, inducing unnecessary run-time overhead.
17633   LIB_CLOCK_GETTIME=
17634
17635   gl_saved_libs=$LIBS
17636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17637 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17638 if ${ac_cv_search_clock_gettime+:} false; then :
17639   $as_echo_n "(cached) " >&6
17640 else
17641   ac_func_search_save_LIBS=$LIBS
17642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17643 /* end confdefs.h.  */
17644
17645 /* Override any GCC internal prototype to avoid an error.
17646    Use char because int might match the return type of a GCC
17647    builtin and then its argument prototype would still apply.  */
17648 #ifdef __cplusplus
17649 extern "C"
17650 #endif
17651 char clock_gettime ();
17652 int
17653 main ()
17654 {
17655 return clock_gettime ();
17656   ;
17657   return 0;
17658 }
17659 _ACEOF
17660 for ac_lib in '' rt posix4; do
17661   if test -z "$ac_lib"; then
17662     ac_res="none required"
17663   else
17664     ac_res=-l$ac_lib
17665     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17666   fi
17667   if ac_fn_c_try_link "$LINENO"; then :
17668   ac_cv_search_clock_gettime=$ac_res
17669 fi
17670 rm -f core conftest.err conftest.$ac_objext \
17671     conftest$ac_exeext
17672   if ${ac_cv_search_clock_gettime+:} false; then :
17673   break
17674 fi
17675 done
17676 if ${ac_cv_search_clock_gettime+:} false; then :
17677
17678 else
17679   ac_cv_search_clock_gettime=no
17680 fi
17681 rm conftest.$ac_ext
17682 LIBS=$ac_func_search_save_LIBS
17683 fi
17684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17685 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17686 ac_res=$ac_cv_search_clock_gettime
17687 if test "$ac_res" != no; then :
17688   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17689   test "$ac_cv_search_clock_gettime" = "none required" ||
17690                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17691 fi
17692
17693     for ac_func in clock_gettime clock_settime
17694 do :
17695   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17696 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17697 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17698   cat >>confdefs.h <<_ACEOF
17699 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17700 _ACEOF
17701
17702 fi
17703 done
17704
17705   LIBS=$gl_saved_libs
17706
17707
17708
17709 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17710
17711
17712
17713
17714
17715   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17716     REPLACE_CLOSE=1
17717   fi
17718
17719
17720
17721
17722
17723   if test $ac_cv_header_sys_socket_h != yes; then
17724                     for ac_header in winsock2.h
17725 do :
17726   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17727 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17728   cat >>confdefs.h <<_ACEOF
17729 #define HAVE_WINSOCK2_H 1
17730 _ACEOF
17731
17732 fi
17733
17734 done
17735
17736   fi
17737   if test "$ac_cv_header_winsock2_h" = yes; then
17738     HAVE_WINSOCK2_H=1
17739     UNISTD_H_HAVE_WINSOCK2_H=1
17740     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17741   else
17742     HAVE_WINSOCK2_H=0
17743   fi
17744
17745
17746     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17747                         REPLACE_CLOSE=1
17748     fi
17749
17750
17751     if test $REPLACE_CLOSE = 0; then
17752
17753
17754
17755   if test $ac_cv_func_fchdir = no; then
17756     HAVE_FCHDIR=0
17757   fi
17758
17759       if test $HAVE_FCHDIR = 0; then
17760         REPLACE_CLOSE=1
17761       fi
17762     fi
17763
17764
17765 if test $REPLACE_CLOSE = 1; then
17766
17767
17768
17769
17770
17771
17772
17773
17774   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17775
17776 fi
17777
17778
17779
17780
17781
17782           GNULIB_CLOSE=1
17783
17784
17785
17786
17787
17788 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17789
17790
17791
17792
17793   :
17794
17795
17796
17797 cat >>confdefs.h <<_ACEOF
17798 #define GNULIB_CLOSE_STREAM 1
17799 _ACEOF
17800
17801
17802
17803
17804
17805   for ac_func in closedir
17806 do :
17807   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17808 if test "x$ac_cv_func_closedir" = xyes; then :
17809   cat >>confdefs.h <<_ACEOF
17810 #define HAVE_CLOSEDIR 1
17811 _ACEOF
17812
17813 fi
17814 done
17815
17816   if test $ac_cv_func_closedir = no; then
17817     HAVE_CLOSEDIR=0
17818   fi
17819
17820
17821
17822
17823   if test $ac_cv_func_fchdir = no; then
17824     HAVE_FCHDIR=0
17825   fi
17826
17827     if test $HAVE_FCHDIR = 0; then
17828       if test $HAVE_CLOSEDIR = 1; then
17829         REPLACE_CLOSEDIR=1
17830       fi
17831     fi
17832
17833
17834 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17835
17836
17837
17838
17839
17840
17841
17842
17843   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17844
17845 fi
17846
17847
17848
17849
17850
17851           GNULIB_CLOSEDIR=1
17852
17853
17854
17855
17856
17857 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17858
17859
17860
17861
17862   :
17863
17864
17865   :
17866
17867
17868           if test "x$datarootdir" = x; then
17869     datarootdir='${datadir}'
17870
17871   fi
17872     if test "x$docdir" = x; then
17873     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17874
17875   fi
17876     if test "x$htmldir" = x; then
17877     htmldir='${docdir}'
17878
17879   fi
17880   if test "x$dvidir" = x; then
17881     dvidir='${docdir}'
17882
17883   fi
17884   if test "x$pdfdir" = x; then
17885     pdfdir='${docdir}'
17886
17887   fi
17888   if test "x$psdir" = x; then
17889     psdir='${docdir}'
17890
17891   fi
17892   if test "x$lispdir" = x; then
17893     lispdir='${datarootdir}/emacs/site-lisp'
17894
17895   fi
17896   if test "x$localedir" = x; then
17897     localedir='${datarootdir}/locale'
17898
17899   fi
17900
17901       pkglibexecdir='${libexecdir}/${PACKAGE}'
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916      if test $gl_cv_have_include_next = yes; then
17917        gl_cv_next_dirent_h='<'dirent.h'>'
17918      else
17919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17920 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17921 if ${gl_cv_next_dirent_h+:} false; then :
17922   $as_echo_n "(cached) " >&6
17923 else
17924
17925              if test $ac_cv_header_dirent_h = yes; then
17926
17927
17928                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17929 /* end confdefs.h.  */
17930 #include <dirent.h>
17931
17932 _ACEOF
17933                                                                                                                         case "$host_os" in
17934                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17935                  *)    gl_absname_cpp="$ac_cpp" ;;
17936                esac
17937
17938                case "$host_os" in
17939                  mingw*)
17940                                                                                                                                      gl_dirsep_regex='[/\\]'
17941                    ;;
17942                  *)
17943                    gl_dirsep_regex='\/'
17944                    ;;
17945                esac
17946                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17947
17948                gl_header_literal_regex=`echo 'dirent.h' \
17949                                         | sed -e "$gl_make_literal_regex_sed"`
17950                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17951                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17952                    s|^/[^/]|//&|
17953                    p
17954                    q
17955                  }'
17956                                                             gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17957                       sed -n "$gl_absolute_header_sed"`'"'
17958           else
17959                gl_cv_next_dirent_h='<'dirent.h'>'
17960              fi
17961
17962
17963 fi
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17965 $as_echo "$gl_cv_next_dirent_h" >&6; }
17966      fi
17967      NEXT_DIRENT_H=$gl_cv_next_dirent_h
17968
17969      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17970        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17971        gl_next_as_first_directive='<'dirent.h'>'
17972      else
17973        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17974        gl_next_as_first_directive=$gl_cv_next_dirent_h
17975      fi
17976      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17977
17978
17979
17980
17981   if test $ac_cv_header_dirent_h = yes; then
17982     HAVE_DIRENT_H=1
17983   else
17984     HAVE_DIRENT_H=0
17985   fi
17986
17987
17988
17989     for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17990     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17991     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17992 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17993 if eval \${$as_gl_Symbol+:} false; then :
17994   $as_echo_n "(cached) " >&6
17995 else
17996   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17997 /* end confdefs.h.  */
17998 #include <dirent.h>
17999
18000 int
18001 main ()
18002 {
18003 #undef $gl_func
18004   (void) $gl_func;
18005   ;
18006   return 0;
18007 }
18008 _ACEOF
18009 if ac_fn_c_try_compile "$LINENO"; then :
18010   eval "$as_gl_Symbol=yes"
18011 else
18012   eval "$as_gl_Symbol=no"
18013 fi
18014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18015 fi
18016 eval ac_res=\$$as_gl_Symbol
18017                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18018 $as_echo "$ac_res" >&6; }
18019     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18020   cat >>confdefs.h <<_ACEOF
18021 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18022 _ACEOF
18023
18024                      eval ac_cv_have_decl_$gl_func=yes
18025 fi
18026       done
18027
18028
18029
18030
18031
18032
18033
18034 cat >>confdefs.h <<_ACEOF
18035 #define GNULIB_DIRENT_SAFER 1
18036 _ACEOF
18037
18038
18039
18040
18041
18042
18043
18044   for ac_func in dirfd
18045 do :
18046   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18047 if test "x$ac_cv_func_dirfd" = xyes; then :
18048   cat >>confdefs.h <<_ACEOF
18049 #define HAVE_DIRFD 1
18050 _ACEOF
18051
18052 fi
18053 done
18054
18055   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18056       #include <dirent.h>
18057 "
18058 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18059   ac_have_decl=1
18060 else
18061   ac_have_decl=0
18062 fi
18063
18064 cat >>confdefs.h <<_ACEOF
18065 #define HAVE_DECL_DIRFD $ac_have_decl
18066 _ACEOF
18067
18068   if test $ac_cv_have_decl_dirfd = no; then
18069     HAVE_DECL_DIRFD=0
18070   fi
18071
18072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18073 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18074 if ${gl_cv_func_dirfd_macro+:} false; then :
18075   $as_echo_n "(cached) " >&6
18076 else
18077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18078 /* end confdefs.h.  */
18079
18080 #include <sys/types.h>
18081 #include <dirent.h>
18082 #ifdef dirfd
18083  dirent_header_defines_dirfd
18084 #endif
18085 _ACEOF
18086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18087   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18088   gl_cv_func_dirfd_macro=yes
18089 else
18090   gl_cv_func_dirfd_macro=no
18091 fi
18092 rm -f conftest*
18093
18094 fi
18095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18096 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18097
18098   # Use the replacement only if we have no function or macro with that name.
18099   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18100     if test $ac_cv_have_decl_dirfd = yes; then
18101       # If the system declares dirfd already, let's declare rpl_dirfd instead.
18102       REPLACE_DIRFD=1
18103     fi
18104   fi
18105
18106 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18107
18108
18109
18110
18111
18112
18113
18114
18115   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18116
18117
18118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18119 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18120 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18121   $as_echo_n "(cached) " >&6
18122 else
18123
18124       dirfd_save_CFLAGS=$CFLAGS
18125       for ac_expr in d_fd dd_fd; do
18126
18127         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18128         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18129 /* end confdefs.h.  */
18130
18131            #include <sys/types.h>
18132            #include <dirent.h>
18133 int
18134 main ()
18135 {
18136 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18137   ;
18138   return 0;
18139 }
18140 _ACEOF
18141 if ac_fn_c_try_compile "$LINENO"; then :
18142   dir_fd_found=yes
18143
18144 fi
18145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18146         CFLAGS=$dirfd_save_CFLAGS
18147         test "$dir_fd_found" = yes && break
18148       done
18149       test "$dir_fd_found" = yes || ac_expr=no_such_member
18150
18151       gl_cv_sys_dir_fd_member_name=$ac_expr
18152
18153
18154 fi
18155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18156 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18157   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18158
18159 cat >>confdefs.h <<_ACEOF
18160 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18161 _ACEOF
18162
18163   fi
18164
18165
18166 fi
18167
18168
18169
18170
18171
18172           GNULIB_DIRFD=1
18173
18174
18175
18176
18177
18178 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18189 $as_echo_n "checking whether // is distinct from /... " >&6; }
18190 if ${gl_cv_double_slash_root+:} false; then :
18191   $as_echo_n "(cached) " >&6
18192 else
18193    if test x"$cross_compiling" = xyes ; then
18194         # When cross-compiling, there is no way to tell whether // is special
18195         # short of a list of hosts.  However, the only known hosts to date
18196         # that have a distinct // are Apollo DomainOS (too old to port to),
18197         # Cygwin, and z/OS.  If anyone knows of another system for which // has
18198         # special semantics and is distinct from /, please report it to
18199         # <bug-gnulib@gnu.org>.
18200         case $host in
18201           *-cygwin | i370-ibm-openedition)
18202             gl_cv_double_slash_root=yes ;;
18203           *)
18204             # Be optimistic and assume that / and // are the same when we
18205             # don't know.
18206             gl_cv_double_slash_root='unknown, assuming no' ;;
18207         esac
18208       else
18209         set x `ls -di / // 2>/dev/null`
18210         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18211           gl_cv_double_slash_root=no
18212         else
18213           gl_cv_double_slash_root=yes
18214         fi
18215       fi
18216 fi
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18218 $as_echo "$gl_cv_double_slash_root" >&6; }
18219   if test "$gl_cv_double_slash_root" = yes; then
18220
18221 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18222
18223   fi
18224
18225
18226
18227
18228   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18229     REPLACE_DUP=1
18230   fi
18231
18232
18233
18234
18235   if test $ac_cv_func_fchdir = no; then
18236     HAVE_FCHDIR=0
18237   fi
18238
18239     if test $HAVE_FCHDIR = 0; then
18240       REPLACE_DUP=1
18241     fi
18242
18243
18244 if test $REPLACE_DUP = 1; then
18245
18246
18247
18248
18249
18250
18251
18252
18253   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18254
18255
18256
18257
18258 fi
18259
18260
18261
18262
18263
18264           GNULIB_DUP=1
18265
18266
18267
18268
18269
18270 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
18271
18272
18273
18274
18275
18276
18277
18278
18279 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
18280
18281
18282   if test $HAVE_DUP2 = 1; then
18283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18284 $as_echo_n "checking whether dup2 works... " >&6; }
18285 if ${gl_cv_func_dup2_works+:} false; then :
18286   $as_echo_n "(cached) " >&6
18287 else
18288   if test "$cross_compiling" = yes; then :
18289   case "$host_os" in
18290            mingw*) # on this platform, dup2 always returns 0 for success
18291              gl_cv_func_dup2_works="guessing no" ;;
18292            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18293              gl_cv_func_dup2_works="guessing no" ;;
18294            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
18295                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
18296              gl_cv_func_dup2_works="guessing no" ;;
18297            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
18298              gl_cv_func_dup2_works="guessing no" ;;
18299            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18300              gl_cv_func_dup2_works="guessing no" ;;
18301            *) gl_cv_func_dup2_works="guessing yes" ;;
18302          esac
18303 else
18304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18305 /* end confdefs.h.  */
18306
18307          #include <unistd.h>
18308 #include <fcntl.h>
18309 #include <errno.h>
18310 int
18311 main ()
18312 {
18313 int result = 0;
18314 #ifdef FD_CLOEXEC
18315             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18316               result |= 1;
18317 #endif
18318             if (dup2 (1, 1) == 0)
18319               result |= 2;
18320 #ifdef FD_CLOEXEC
18321             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18322               result |= 4;
18323 #endif
18324             close (0);
18325             if (dup2 (0, 0) != -1)
18326               result |= 8;
18327             /* Many gnulib modules require POSIX conformance of EBADF.  */
18328             if (dup2 (2, 1000000) == -1 && errno != EBADF)
18329               result |= 16;
18330             return result;
18331
18332   ;
18333   return 0;
18334 }
18335
18336 _ACEOF
18337 if ac_fn_c_try_run "$LINENO"; then :
18338   gl_cv_func_dup2_works=yes
18339 else
18340   gl_cv_func_dup2_works=no
18341 fi
18342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18343   conftest.$ac_objext conftest.beam conftest.$ac_ext
18344 fi
18345
18346
18347 fi
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18349 $as_echo "$gl_cv_func_dup2_works" >&6; }
18350     case "$gl_cv_func_dup2_works" in
18351       *yes) ;;
18352       *)
18353         REPLACE_DUP2=1
18354         ;;
18355     esac
18356   fi
18357
18358
18359
18360
18361   if test $ac_cv_func_fchdir = no; then
18362     HAVE_FCHDIR=0
18363   fi
18364
18365     if test $HAVE_FCHDIR = 0; then
18366       if test $HAVE_DUP2 = 1; then
18367         REPLACE_DUP2=1
18368       fi
18369     fi
18370
18371
18372 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18373
18374
18375
18376
18377
18378
18379
18380
18381   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18382
18383
18384 fi
18385
18386
18387
18388
18389
18390           GNULIB_DUP2=1
18391
18392
18393
18394
18395
18396 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18397
18398
18399
18400
18401
18402       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18403 $as_echo_n "checking for error_at_line... " >&6; }
18404 if ${ac_cv_lib_error_at_line+:} false; then :
18405   $as_echo_n "(cached) " >&6
18406 else
18407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18408 /* end confdefs.h.  */
18409 #include <error.h>
18410 int
18411 main ()
18412 {
18413 error_at_line (0, 0, "", 0, "an error occurred");
18414   ;
18415   return 0;
18416 }
18417 _ACEOF
18418 if ac_fn_c_try_link "$LINENO"; then :
18419   ac_cv_lib_error_at_line=yes
18420 else
18421   ac_cv_lib_error_at_line=no
18422 fi
18423 rm -f core conftest.err conftest.$ac_objext \
18424     conftest$ac_exeext conftest.$ac_ext
18425 fi
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18427 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18428
18429 if test $ac_cv_lib_error_at_line = no; then
18430
18431
18432
18433
18434
18435
18436
18437
18438   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18439
18440
18441
18442
18443   :
18444
18445 fi
18446
18447
18448   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18449
18450
18451
18452   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18453
18454
18455
18456
18457
18458
18459   if test $ac_cv_have_decl_fchdir = no; then
18460     HAVE_DECL_FCHDIR=0
18461   fi
18462
18463
18464   if test $HAVE_FCHDIR = 0; then
18465
18466
18467
18468
18469
18470
18471
18472
18473   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18474
18475     :
18476
18477 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18478
18479                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18480 $as_echo_n "checking whether open can visit directories... " >&6; }
18481 if ${gl_cv_func_open_directory_works+:} false; then :
18482   $as_echo_n "(cached) " >&6
18483 else
18484   if test "$cross_compiling" = yes; then :
18485   case "$host_os" in
18486                    # Guess yes on glibc systems.
18487            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18488                    # If we don't know, assume the worst.
18489            *)      gl_cv_func_open_directory_works="guessing no" ;;
18490          esac
18491
18492 else
18493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18494 /* end confdefs.h.  */
18495 #include <fcntl.h>
18496
18497 int
18498 main ()
18499 {
18500 return open(".", O_RDONLY) < 0;
18501   ;
18502   return 0;
18503 }
18504 _ACEOF
18505 if ac_fn_c_try_run "$LINENO"; then :
18506   gl_cv_func_open_directory_works=yes
18507 else
18508   gl_cv_func_open_directory_works=no
18509 fi
18510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18511   conftest.$ac_objext conftest.beam conftest.$ac_ext
18512 fi
18513
18514 fi
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18516 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18517     case "$gl_cv_func_open_directory_works" in
18518       *yes) ;;
18519       *)
18520
18521 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18522
18523         ;;
18524     esac
18525   fi
18526
18527
18528
18529
18530
18531
18532           GNULIB_FCHDIR=1
18533
18534
18535
18536
18537
18538 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18539
18540
18541
18542
18543
18544
18545
18546
18547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
18548 $as_echo_n "checking whether fflush works on input streams... " >&6; }
18549 if ${gl_cv_func_fflush_stdin+:} false; then :
18550   $as_echo_n "(cached) " >&6
18551 else
18552   echo hello world > conftest.txt
18553      if test "$cross_compiling" = yes; then :
18554         gl_cv_func_fflush_stdin=no
18555 else
18556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18557 /* end confdefs.h.  */
18558
18559 #include <stdio.h>
18560 #if HAVE_UNISTD_H
18561 # include <unistd.h>
18562 #else /* on Windows with MSVC */
18563 # include <io.h>
18564 #endif
18565
18566 int
18567 main ()
18568 {
18569 FILE *f = fopen ("conftest.txt", "r");
18570          char buffer[10];
18571          int fd;
18572          int c;
18573          if (f == NULL)
18574            return 1;
18575          fd = fileno (f);
18576          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
18577            return 2;
18578          /* For deterministic results, ensure f read a bigger buffer.  */
18579          if (lseek (fd, 0, SEEK_CUR) == 5)
18580            return 3;
18581          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
18582             on BSD systems and on mingw.  */
18583          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
18584            return 4;
18585          if (lseek (fd, 0, SEEK_CUR) != 5)
18586            return 5;
18587          /* Verify behaviour of fflush after ungetc. See
18588             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
18589          /* Verify behaviour of fflush after a backup ungetc.  This fails on
18590             mingw.  */
18591          c = fgetc (f);
18592          ungetc (c, f);
18593          fflush (f);
18594          if (fgetc (f) != c)
18595            return 6;
18596          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
18597             on glibc 2.8 and on BSD systems.  */
18598          c = fgetc (f);
18599          ungetc ('@', f);
18600          fflush (f);
18601          if (fgetc (f) != c)
18602            return 7;
18603          return 0;
18604
18605   ;
18606   return 0;
18607 }
18608 _ACEOF
18609 if ac_fn_c_try_run "$LINENO"; then :
18610   gl_cv_func_fflush_stdin=yes
18611 else
18612   gl_cv_func_fflush_stdin=no
18613 fi
18614 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18615   conftest.$ac_objext conftest.beam conftest.$ac_ext
18616 fi
18617
18618      rm conftest.txt
18619
18620 fi
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
18622 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
18623
18624   if test $gl_cv_func_fflush_stdin = no; then
18625     REPLACE_FCLOSE=1
18626   fi
18627
18628
18629   if test $REPLACE_CLOSE = 1; then
18630     REPLACE_FCLOSE=1
18631   fi
18632
18633 if test $REPLACE_FCLOSE = 1; then
18634
18635
18636
18637
18638
18639
18640
18641
18642   gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
18643
18644 fi
18645
18646
18647
18648
18649
18650           GNULIB_FCLOSE=1
18651
18652
18653
18654
18655
18656 $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
18657
18658
18659
18660
18661
18662
18663
18664
18665   if test $ac_cv_func_fcntl = no; then
18666
18667
18668
18669   if test $ac_cv_func_fcntl = no; then
18670     HAVE_FCNTL=0
18671   else
18672     REPLACE_FCNTL=1
18673   fi
18674
18675   else
18676             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18677 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18678 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18679   $as_echo_n "(cached) " >&6
18680 else
18681   if test "$cross_compiling" = yes; then :
18682   # Guess that it works on glibc systems
18683           case $host_os in #((
18684             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18685             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18686           esac
18687 else
18688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18689 /* end confdefs.h.  */
18690
18691 #include <fcntl.h>
18692 #include <errno.h>
18693
18694 int
18695 main ()
18696 {
18697 int result = 0;
18698       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18699       if (errno != EINVAL) result |= 2;
18700       return result;
18701
18702   ;
18703   return 0;
18704 }
18705 _ACEOF
18706 if ac_fn_c_try_run "$LINENO"; then :
18707   gl_cv_func_fcntl_f_dupfd_works=yes
18708 else
18709   gl_cv_func_fcntl_f_dupfd_works=no
18710 fi
18711 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18712   conftest.$ac_objext conftest.beam conftest.$ac_ext
18713 fi
18714
18715 fi
18716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18717 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18718     case $gl_cv_func_fcntl_f_dupfd_works in
18719       *yes) ;;
18720       *)
18721
18722
18723   if test $ac_cv_func_fcntl = no; then
18724     HAVE_FCNTL=0
18725   else
18726     REPLACE_FCNTL=1
18727   fi
18728
18729
18730 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18731  ;;
18732     esac
18733
18734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18735 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18736 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18737   $as_echo_n "(cached) " >&6
18738 else
18739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h.  */
18741
18742 #include <fcntl.h>
18743 #ifndef F_DUPFD_CLOEXEC
18744 choke me
18745 #endif
18746
18747 int
18748 main ()
18749 {
18750
18751   ;
18752   return 0;
18753 }
18754 _ACEOF
18755 if ac_fn_c_try_compile "$LINENO"; then :
18756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18757 /* end confdefs.h.  */
18758
18759 #ifdef __linux__
18760 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18761    it to support the semantics on older kernels that failed with EINVAL.  */
18762 choke me
18763 #endif
18764
18765 int
18766 main ()
18767 {
18768
18769   ;
18770   return 0;
18771 }
18772 _ACEOF
18773 if ac_fn_c_try_compile "$LINENO"; then :
18774   gl_cv_func_fcntl_f_dupfd_cloexec=yes
18775 else
18776   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18777 fi
18778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18779 else
18780   gl_cv_func_fcntl_f_dupfd_cloexec=no
18781 fi
18782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18783 fi
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18785 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18786     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18787
18788
18789
18790   if test $ac_cv_func_fcntl = no; then
18791     HAVE_FCNTL=0
18792   else
18793     REPLACE_FCNTL=1
18794   fi
18795
18796           fi
18797   fi
18798
18799
18800
18801
18802   if test $ac_cv_func_fchdir = no; then
18803     HAVE_FCHDIR=0
18804   fi
18805
18806     if test $HAVE_FCHDIR = 0; then
18807
18808
18809
18810   if test $ac_cv_func_fcntl = no; then
18811     HAVE_FCNTL=0
18812   else
18813     REPLACE_FCNTL=1
18814   fi
18815
18816     fi
18817
18818
18819 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18820
18821
18822
18823
18824
18825
18826
18827
18828   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18829
18830 fi
18831
18832
18833
18834
18835
18836           GNULIB_FCNTL=1
18837
18838
18839
18840
18841
18842 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857      if test $gl_cv_have_include_next = yes; then
18858        gl_cv_next_fcntl_h='<'fcntl.h'>'
18859      else
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18861 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18862 if ${gl_cv_next_fcntl_h+:} false; then :
18863   $as_echo_n "(cached) " >&6
18864 else
18865
18866                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18867 /* end confdefs.h.  */
18868 #include <fcntl.h>
18869
18870 _ACEOF
18871                                                                                                                         case "$host_os" in
18872                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18873                  *)    gl_absname_cpp="$ac_cpp" ;;
18874                esac
18875
18876                case "$host_os" in
18877                  mingw*)
18878                                                                                                                                      gl_dirsep_regex='[/\\]'
18879                    ;;
18880                  *)
18881                    gl_dirsep_regex='\/'
18882                    ;;
18883                esac
18884                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18885
18886                gl_header_literal_regex=`echo 'fcntl.h' \
18887                                         | sed -e "$gl_make_literal_regex_sed"`
18888                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18889                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18890                    s|^/[^/]|//&|
18891                    p
18892                    q
18893                  }'
18894                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18895                       sed -n "$gl_absolute_header_sed"`'"'
18896
18897
18898 fi
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18900 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18901      fi
18902      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18903
18904      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18905        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18906        gl_next_as_first_directive='<'fcntl.h'>'
18907      else
18908        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18909        gl_next_as_first_directive=$gl_cv_next_fcntl_h
18910      fi
18911      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922     for gl_func in fcntl openat; do
18923     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18924     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18925 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18926 if eval \${$as_gl_Symbol+:} false; then :
18927   $as_echo_n "(cached) " >&6
18928 else
18929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18930 /* end confdefs.h.  */
18931 #include <fcntl.h>
18932
18933 int
18934 main ()
18935 {
18936 #undef $gl_func
18937   (void) $gl_func;
18938   ;
18939   return 0;
18940 }
18941 _ACEOF
18942 if ac_fn_c_try_compile "$LINENO"; then :
18943   eval "$as_gl_Symbol=yes"
18944 else
18945   eval "$as_gl_Symbol=no"
18946 fi
18947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18948 fi
18949 eval ac_res=\$$as_gl_Symbol
18950                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18951 $as_echo "$ac_res" >&6; }
18952     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18953   cat >>confdefs.h <<_ACEOF
18954 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18955 _ACEOF
18956
18957                      eval ac_cv_have_decl_$gl_func=yes
18958 fi
18959       done
18960
18961
18962
18963
18964
18965
18966
18967 cat >>confdefs.h <<_ACEOF
18968 #define GNULIB_FCNTL_SAFER 1
18969 _ACEOF
18970
18971
18972
18973
18974
18975
18976
18977     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18978 #include <dirent.h>
18979
18980 "
18981 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18982   ac_have_decl=1
18983 else
18984   ac_have_decl=0
18985 fi
18986
18987 cat >>confdefs.h <<_ACEOF
18988 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18989 _ACEOF
18990 if test $ac_have_decl = 1; then :
18991
18992 else
18993   HAVE_DECL_FDOPENDIR=0
18994 fi
18995
18996
18997   if test $ac_cv_func_fdopendir = no; then
18998     HAVE_FDOPENDIR=0
18999   else
19000     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19001 $as_echo_n "checking whether fdopendir works... " >&6; }
19002 if ${gl_cv_func_fdopendir_works+:} false; then :
19003   $as_echo_n "(cached) " >&6
19004 else
19005   if test "$cross_compiling" = yes; then :
19006   case "$host_os" in
19007                     # Guess yes on glibc systems.
19008             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19009                     # If we don't know, assume the worst.
19010             *)      gl_cv_func_fdopendir_works="guessing no" ;;
19011           esac
19012
19013 else
19014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19015 /* end confdefs.h.  */
19016
19017 #include <dirent.h>
19018 #include <fcntl.h>
19019 #include <unistd.h>
19020 #if !HAVE_DECL_FDOPENDIR
19021 extern
19022 # ifdef __cplusplus
19023 "C"
19024 # endif
19025 DIR *fdopendir (int);
19026 #endif
19027
19028 int
19029 main ()
19030 {
19031 int result = 0;
19032      int fd = open ("conftest.c", O_RDONLY);
19033      if (fd < 0) result |= 1;
19034      if (fdopendir (fd)) result |= 2;
19035      if (close (fd)) result |= 4;
19036      return result;
19037   ;
19038   return 0;
19039 }
19040 _ACEOF
19041 if ac_fn_c_try_run "$LINENO"; then :
19042   gl_cv_func_fdopendir_works=yes
19043 else
19044   gl_cv_func_fdopendir_works=no
19045 fi
19046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19047   conftest.$ac_objext conftest.beam conftest.$ac_ext
19048 fi
19049
19050 fi
19051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19052 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19053     case "$gl_cv_func_fdopendir_works" in
19054       *yes) ;;
19055       *)
19056         REPLACE_FDOPENDIR=1
19057         ;;
19058     esac
19059   fi
19060
19061 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19062
19063
19064
19065
19066
19067
19068
19069
19070   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19071
19072 fi
19073
19074
19075
19076
19077
19078           GNULIB_FDOPENDIR=1
19079
19080
19081
19082
19083
19084 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19085
19086
19087
19088
19089
19090 cat >>confdefs.h <<_ACEOF
19091 #define GNULIB_FDOPENDIR 1
19092 _ACEOF
19093
19094
19095
19096
19097
19098
19099   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19100 $as_echo_n "checking whether fflush works on input streams... " >&6; }
19101 if ${gl_cv_func_fflush_stdin+:} false; then :
19102   $as_echo_n "(cached) " >&6
19103 else
19104   echo hello world > conftest.txt
19105      if test "$cross_compiling" = yes; then :
19106         gl_cv_func_fflush_stdin=no
19107 else
19108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19109 /* end confdefs.h.  */
19110
19111 #include <stdio.h>
19112 #if HAVE_UNISTD_H
19113 # include <unistd.h>
19114 #else /* on Windows with MSVC */
19115 # include <io.h>
19116 #endif
19117
19118 int
19119 main ()
19120 {
19121 FILE *f = fopen ("conftest.txt", "r");
19122          char buffer[10];
19123          int fd;
19124          int c;
19125          if (f == NULL)
19126            return 1;
19127          fd = fileno (f);
19128          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19129            return 2;
19130          /* For deterministic results, ensure f read a bigger buffer.  */
19131          if (lseek (fd, 0, SEEK_CUR) == 5)
19132            return 3;
19133          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
19134             on BSD systems and on mingw.  */
19135          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19136            return 4;
19137          if (lseek (fd, 0, SEEK_CUR) != 5)
19138            return 5;
19139          /* Verify behaviour of fflush after ungetc. See
19140             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
19141          /* Verify behaviour of fflush after a backup ungetc.  This fails on
19142             mingw.  */
19143          c = fgetc (f);
19144          ungetc (c, f);
19145          fflush (f);
19146          if (fgetc (f) != c)
19147            return 6;
19148          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
19149             on glibc 2.8 and on BSD systems.  */
19150          c = fgetc (f);
19151          ungetc ('@', f);
19152          fflush (f);
19153          if (fgetc (f) != c)
19154            return 7;
19155          return 0;
19156
19157   ;
19158   return 0;
19159 }
19160 _ACEOF
19161 if ac_fn_c_try_run "$LINENO"; then :
19162   gl_cv_func_fflush_stdin=yes
19163 else
19164   gl_cv_func_fflush_stdin=no
19165 fi
19166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19167   conftest.$ac_objext conftest.beam conftest.$ac_ext
19168 fi
19169
19170      rm conftest.txt
19171
19172 fi
19173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19174 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
19175
19176   if test $gl_cv_func_fflush_stdin = no; then
19177     REPLACE_FFLUSH=1
19178   fi
19179
19180 if test $REPLACE_FFLUSH = 1; then
19181
19182
19183
19184
19185
19186
19187
19188
19189   gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
19190
19191
19192
19193   :
19194
19195 fi
19196
19197
19198 cat >>confdefs.h <<_ACEOF
19199 #define GNULIB_FFLUSH 1
19200 _ACEOF
19201
19202
19203
19204
19205
19206
19207
19208           GNULIB_FFLUSH=1
19209
19210
19211
19212
19213
19214 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224   FLOAT_H=
19225   REPLACE_FLOAT_LDBL=0
19226   case "$host_os" in
19227     aix* | beos* | openbsd* | mirbsd* | irix*)
19228       FLOAT_H=float.h
19229       ;;
19230     freebsd*)
19231       case "$host_cpu" in
19232         i[34567]86 )
19233           FLOAT_H=float.h
19234           ;;
19235         x86_64 )
19236           # On x86_64 systems, the C compiler may still be generating
19237           # 32-bit code.
19238           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19239 /* end confdefs.h.  */
19240 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19241              yes
19242              #endif
19243 _ACEOF
19244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19245   $EGREP "yes" >/dev/null 2>&1; then :
19246
19247 else
19248   FLOAT_H=float.h
19249 fi
19250 rm -f conftest*
19251
19252           ;;
19253       esac
19254       ;;
19255     linux*)
19256       case "$host_cpu" in
19257         powerpc*)
19258           FLOAT_H=float.h
19259           ;;
19260       esac
19261       ;;
19262   esac
19263   case "$host_os" in
19264     aix* | freebsd* | linux*)
19265       if test -n "$FLOAT_H"; then
19266         REPLACE_FLOAT_LDBL=1
19267       fi
19268       ;;
19269   esac
19270
19271     REPLACE_ITOLD=0
19272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19273 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19274 if ${gl_cv_func_itold_works+:} false; then :
19275   $as_echo_n "(cached) " >&6
19276 else
19277
19278       if test "$cross_compiling" = yes; then :
19279   case "$host" in
19280            sparc*-*-linux*)
19281              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19282 /* end confdefs.h.  */
19283 #if defined __LP64__ || defined __arch64__
19284                 yes
19285                 #endif
19286 _ACEOF
19287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19288   $EGREP "yes" >/dev/null 2>&1; then :
19289   gl_cv_func_itold_works="guessing no"
19290 else
19291   gl_cv_func_itold_works="guessing yes"
19292 fi
19293 rm -f conftest*
19294
19295              ;;
19296            *) gl_cv_func_itold_works="guessing yes" ;;
19297          esac
19298
19299 else
19300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19301 /* end confdefs.h.  */
19302
19303 int i = -1;
19304 volatile long double ld;
19305 int main ()
19306 {
19307   ld += i * 1.0L;
19308   if (ld > 0)
19309     return 1;
19310   return 0;
19311 }
19312 _ACEOF
19313 if ac_fn_c_try_run "$LINENO"; then :
19314   gl_cv_func_itold_works=yes
19315 else
19316   gl_cv_func_itold_works=no
19317 fi
19318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19319   conftest.$ac_objext conftest.beam conftest.$ac_ext
19320 fi
19321
19322
19323 fi
19324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19325 $as_echo "$gl_cv_func_itold_works" >&6; }
19326   case "$gl_cv_func_itold_works" in
19327     *no)
19328       REPLACE_ITOLD=1
19329                   FLOAT_H=float.h
19330       ;;
19331   esac
19332
19333   if test -n "$FLOAT_H"; then
19334
19335
19336
19337
19338
19339
19340
19341
19342      if test $gl_cv_have_include_next = yes; then
19343        gl_cv_next_float_h='<'float.h'>'
19344      else
19345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19346 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19347 if ${gl_cv_next_float_h+:} false; then :
19348   $as_echo_n "(cached) " >&6
19349 else
19350
19351                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19352 /* end confdefs.h.  */
19353 #include <float.h>
19354
19355 _ACEOF
19356                                                                                                                         case "$host_os" in
19357                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19358                  *)    gl_absname_cpp="$ac_cpp" ;;
19359                esac
19360
19361                case "$host_os" in
19362                  mingw*)
19363                                                                                                                                      gl_dirsep_regex='[/\\]'
19364                    ;;
19365                  *)
19366                    gl_dirsep_regex='\/'
19367                    ;;
19368                esac
19369                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19370
19371                gl_header_literal_regex=`echo 'float.h' \
19372                                         | sed -e "$gl_make_literal_regex_sed"`
19373                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19374                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19375                    s|^/[^/]|//&|
19376                    p
19377                    q
19378                  }'
19379                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19380                       sed -n "$gl_absolute_header_sed"`'"'
19381
19382
19383 fi
19384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19385 $as_echo "$gl_cv_next_float_h" >&6; }
19386      fi
19387      NEXT_FLOAT_H=$gl_cv_next_float_h
19388
19389      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19390        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19391        gl_next_as_first_directive='<'float.h'>'
19392      else
19393        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19394        gl_next_as_first_directive=$gl_cv_next_float_h
19395      fi
19396      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19397
19398
19399
19400
19401   fi
19402
19403    if test -n "$FLOAT_H"; then
19404   GL_GENERATE_FLOAT_H_TRUE=
19405   GL_GENERATE_FLOAT_H_FALSE='#'
19406 else
19407   GL_GENERATE_FLOAT_H_TRUE='#'
19408   GL_GENERATE_FLOAT_H_FALSE=
19409 fi
19410
19411
19412
19413 if test $REPLACE_FLOAT_LDBL = 1; then
19414
19415
19416
19417
19418
19419
19420
19421
19422   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19423
19424 fi
19425 if test $REPLACE_ITOLD = 1; then
19426
19427
19428
19429
19430
19431
19432
19433
19434   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19435
19436 fi
19437
19438
19439
19440   fp_headers='
19441 #     include <stdio.h>
19442 #     if HAVE_STDIO_EXT_H
19443 #      include <stdio_ext.h>
19444 #     endif
19445 '
19446   ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19447 "
19448 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19449   ac_have_decl=1
19450 else
19451   ac_have_decl=0
19452 fi
19453
19454 cat >>confdefs.h <<_ACEOF
19455 #define HAVE_DECL___FPENDING $ac_have_decl
19456 _ACEOF
19457
19458
19459 if test $ac_cv_func___fpending = no; then
19460
19461
19462
19463
19464
19465
19466
19467
19468   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19469
19470
19471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19472 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19473 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19474   $as_echo_n "(cached) " >&6
19475 else
19476
19477       for ac_expr in                                                    \
19478                                                                         \
19479           '# glibc2'                                                    \
19480           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
19481                                                                         \
19482           '# traditional Unix'                                          \
19483           'fp->_ptr - fp->_base'                                        \
19484                                                                         \
19485           '# BSD'                                                       \
19486           'fp->_p - fp->_bf._base'                                      \
19487                                                                         \
19488           '# SCO, Unixware'                                             \
19489           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
19490                                                                         \
19491           '# QNX'                                                       \
19492           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19493                                                                         \
19494           '# old glibc?'                                                \
19495           'fp->__bufp - fp->__buffer'                                   \
19496                                                                         \
19497           '# old glibc iostream?'                                       \
19498           'fp->_pptr - fp->_pbase'                                      \
19499                                                                         \
19500           '# emx+gcc'                                                   \
19501           'fp->_ptr - fp->_buffer'                                      \
19502                                                                         \
19503           '# Minix'                                                     \
19504           'fp->_ptr - fp->_buf'                                         \
19505                                                                         \
19506           '# Plan9'                                                     \
19507           'fp->wp - fp->buf'                                            \
19508                                                                         \
19509           '# VMS'                                                       \
19510           '(*fp)->_ptr - (*fp)->_base'                                  \
19511                                                                         \
19512           '# e.g., DGUX R4.11; the info is not available'               \
19513           1                                                             \
19514           ; do
19515
19516         # Skip each embedded comment.
19517         case "$ac_expr" in '#'*) continue;; esac
19518
19519         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19520 /* end confdefs.h.  */
19521 #include <stdio.h>
19522 int
19523 main ()
19524 {
19525 FILE *fp = stdin; (void) ($ac_expr);
19526   ;
19527   return 0;
19528 }
19529 _ACEOF
19530 if ac_fn_c_try_compile "$LINENO"; then :
19531   fp_done=yes
19532
19533 fi
19534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19535         test "$fp_done" = yes && break
19536       done
19537
19538       ac_cv_sys_pending_output_n_bytes=$ac_expr
19539
19540
19541 fi
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19543 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19544
19545 cat >>confdefs.h <<_ACEOF
19546 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19547 _ACEOF
19548
19549
19550 fi
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566   gl_cv_func_fprintf_posix=no
19567   case "$gl_cv_func_printf_sizes_c99" in
19568     *yes)
19569       case "$gl_cv_func_printf_long_double" in
19570         *yes)
19571           case "$gl_cv_func_printf_infinite" in
19572             *yes)
19573               case "$gl_cv_func_printf_infinite_long_double" in
19574                 *yes)
19575                   case "$gl_cv_func_printf_directive_a" in
19576                     *yes)
19577                       case "$gl_cv_func_printf_directive_f" in
19578                         *yes)
19579                           case "$gl_cv_func_printf_directive_n" in
19580                             *yes)
19581                               case "$gl_cv_func_printf_directive_ls" in
19582                                 *yes)
19583                                   case "$gl_cv_func_printf_positions" in
19584                                     *yes)
19585                                       case "$gl_cv_func_printf_flag_grouping" in
19586                                         *yes)
19587                                           case "$gl_cv_func_printf_flag_leftadjust" in
19588                                             *yes)
19589                                               case "$gl_cv_func_printf_flag_zero" in
19590                                                 *yes)
19591                                                   case "$gl_cv_func_printf_precision" in
19592                                                     *yes)
19593                                                       case "$gl_cv_func_printf_enomem" in
19594                                                         *yes)
19595                                                           # fprintf exists and is
19596                                                           # already POSIX compliant.
19597                                                           gl_cv_func_fprintf_posix=yes
19598                                                           ;;
19599                                                       esac
19600                                                       ;;
19601                                                   esac
19602                                                   ;;
19603                                               esac
19604                                               ;;
19605                                           esac
19606                                           ;;
19607                                       esac
19608                                       ;;
19609                                   esac
19610                                   ;;
19611                               esac
19612                               ;;
19613                           esac
19614                           ;;
19615                       esac
19616                       ;;
19617                   esac
19618                   ;;
19619               esac
19620               ;;
19621           esac
19622           ;;
19623       esac
19624       ;;
19625   esac
19626   if test $gl_cv_func_fprintf_posix = no; then
19627
19628
19629
19630   case "$gl_cv_func_printf_infinite" in
19631     *yes)
19632       ;;
19633     *)
19634
19635 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
19636
19637       ;;
19638   esac
19639
19640
19641
19642
19643   case "$gl_cv_func_printf_long_double" in
19644     *yes)
19645       case "$gl_cv_func_printf_infinite_long_double" in
19646         *yes)
19647           ;;
19648         *)
19649
19650 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
19651
19652           ;;
19653       esac
19654       ;;
19655   esac
19656
19657
19658
19659   case "$gl_cv_func_printf_directive_a" in
19660     *yes)
19661       ;;
19662     *)
19663
19664 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
19665
19666       for ac_func in nl_langinfo
19667 do :
19668   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
19669 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
19670   cat >>confdefs.h <<_ACEOF
19671 #define HAVE_NL_LANGINFO 1
19672 _ACEOF
19673
19674 fi
19675 done
19676
19677       ;;
19678   esac
19679
19680
19681
19682   case "$gl_cv_func_printf_directive_f" in
19683     *yes)
19684       ;;
19685     *)
19686
19687 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
19688
19689       ;;
19690   esac
19691
19692
19693
19694   case "$gl_cv_func_printf_directive_ls" in
19695     *yes)
19696       ;;
19697     *)
19698
19699 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
19700
19701       ;;
19702   esac
19703
19704
19705
19706   case "$gl_cv_func_printf_flag_grouping" in
19707     *yes)
19708       ;;
19709     *)
19710
19711 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
19712
19713       ;;
19714   esac
19715
19716
19717
19718   case "$gl_cv_func_printf_flag_leftadjust" in
19719     *yes)
19720       ;;
19721     *)
19722
19723 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
19724
19725       ;;
19726   esac
19727
19728
19729
19730   case "$gl_cv_func_printf_flag_zero" in
19731     *yes)
19732       ;;
19733     *)
19734
19735 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
19736
19737       ;;
19738   esac
19739
19740
19741
19742   case "$gl_cv_func_printf_precision" in
19743     *yes)
19744       ;;
19745     *)
19746
19747 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
19748
19749
19750 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19751
19752
19753 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19754
19755       ;;
19756   esac
19757
19758
19759
19760   case "$gl_cv_func_printf_enomem" in
19761     *yes)
19762       ;;
19763     *)
19764
19765 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
19766
19767
19768 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19769
19770
19771 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19772
19773       ;;
19774   esac
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
19817
19818   if test $ac_cv_func_vasnprintf = yes; then
19819
19820 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
19821
19822   fi
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
19835 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
19836
19837 else
19838
19839 $as_echo "#define ptrdiff_t long" >>confdefs.h
19840
19841
19842 fi
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860   gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
19861
19862   REPLACE_FPRINTF=1
19863
19864 $as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
19865
19866   :
19867
19868   fi
19869
19870
19871
19872
19873
19874
19875           GNULIB_FPRINTF_POSIX=1
19876
19877
19878
19879
19880
19881 $as_echo "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
19882
19883
19884
19885
19886
19887
19888
19889   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
19890 "
19891 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
19892   ac_have_decl=1
19893 else
19894   ac_have_decl=0
19895 fi
19896
19897 cat >>confdefs.h <<_ACEOF
19898 #define HAVE_DECL_FPURGE $ac_have_decl
19899 _ACEOF
19900
19901   if test "x$ac_cv_func_fpurge" = xyes; then
19902     HAVE_FPURGE=1
19903     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
19904     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
19905 $as_echo_n "checking whether fpurge works... " >&6; }
19906 if ${gl_cv_func_fpurge_works+:} false; then :
19907   $as_echo_n "(cached) " >&6
19908 else
19909   if test "$cross_compiling" = yes; then :
19910   gl_cv_func_fpurge_works='guessing no'
19911 else
19912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19913 /* end confdefs.h.  */
19914 #include <stdio.h>
19915
19916 int
19917 main ()
19918 {
19919 FILE *f = fopen ("conftest.txt", "w+");
19920         if (!f) return 1;
19921         if (fputc ('a', f) != 'a') return 2;
19922         rewind (f);
19923         if (fgetc (f) != 'a') return 3;
19924         if (fgetc (f) != EOF) return 4;
19925         if (fpurge (f) != 0) return 5;
19926         if (putc ('b', f) != 'b') return 6;
19927         if (fclose (f) != 0) return 7;
19928         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
19929         if (fgetc (f) != 'a') return 9;
19930         if (fgetc (f) != 'b') return 10;
19931         if (fgetc (f) != EOF) return 11;
19932         if (fclose (f) != 0) return 12;
19933         if (remove ("conftest.txt") != 0) return 13;
19934         return 0;
19935   ;
19936   return 0;
19937 }
19938 _ACEOF
19939 if ac_fn_c_try_run "$LINENO"; then :
19940   gl_cv_func_fpurge_works=yes
19941 else
19942   gl_cv_func_fpurge_works=no
19943 fi
19944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19945   conftest.$ac_objext conftest.beam conftest.$ac_ext
19946 fi
19947
19948 fi
19949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
19950 $as_echo "$gl_cv_func_fpurge_works" >&6; }
19951     if test "x$gl_cv_func_fpurge_works" != xyes; then
19952       REPLACE_FPURGE=1
19953     fi
19954   else
19955     HAVE_FPURGE=0
19956   fi
19957   if test "x$ac_cv_have_decl_fpurge" = xno; then
19958     HAVE_DECL_FPURGE=0
19959   fi
19960
19961 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
19962
19963
19964
19965
19966
19967
19968
19969
19970   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
19971
19972 fi
19973
19974
19975
19976
19977
19978           GNULIB_FPURGE=1
19979
19980
19981
19982
19983
19984 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994   if test $gl_cv_func_frexp_no_libm = yes; then
19995
19996
19997
19998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
19999 $as_echo_n "checking whether frexp works... " >&6; }
20000 if ${gl_cv_func_frexp_works+:} false; then :
20001   $as_echo_n "(cached) " >&6
20002 else
20003
20004       if test "$cross_compiling" = yes; then :
20005   case "$host_os" in
20006            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
20007            *)                        gl_cv_func_frexp_works="guessing yes";;
20008          esac
20009
20010 else
20011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20012 /* end confdefs.h.  */
20013
20014 #include <float.h>
20015 #include <math.h>
20016 #include <string.h>
20017 #if HAVE_ALARM
20018 # include <unistd.h>
20019 #endif
20020 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
20021    ICC 10.0 has a bug when optimizing the expression -zero.
20022    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
20023    to PowerPC on MacOS X 10.5.  */
20024 #if defined __hpux || defined __sgi || defined __ICC
20025 static double
20026 compute_minus_zero (void)
20027 {
20028   return -DBL_MIN * DBL_MIN;
20029 }
20030 # define minus_zero compute_minus_zero ()
20031 #else
20032 double minus_zero = -0.0;
20033 #endif
20034 int main()
20035 {
20036   int result = 0;
20037   int i;
20038   volatile double x;
20039   double zero = 0.0;
20040 #if HAVE_ALARM
20041   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
20042      number.  Let the test fail in this case.  */
20043   alarm (5);
20044 #endif
20045   /* Test on denormalized numbers.  */
20046   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
20047     ;
20048   if (x > 0.0)
20049     {
20050       int exp;
20051       double y = frexp (x, &exp);
20052       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
20053          On NetBSD: y = 0.75. Correct: y = 0.5.  */
20054       if (y != 0.5)
20055         result |= 1;
20056     }
20057   /* Test on infinite numbers.  */
20058   x = 1.0 / zero;
20059   {
20060     int exp;
20061     double y = frexp (x, &exp);
20062     if (y != x)
20063       result |= 2;
20064   }
20065   /* Test on negative zero.  */
20066   x = minus_zero;
20067   {
20068     int exp;
20069     double y = frexp (x, &exp);
20070     if (memcmp (&y, &x, sizeof x))
20071       result |= 4;
20072   }
20073   return result;
20074 }
20075 _ACEOF
20076 if ac_fn_c_try_run "$LINENO"; then :
20077   gl_cv_func_frexp_works=yes
20078 else
20079   gl_cv_func_frexp_works=no
20080 fi
20081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20082   conftest.$ac_objext conftest.beam conftest.$ac_ext
20083 fi
20084
20085
20086 fi
20087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
20088 $as_echo "$gl_cv_func_frexp_works" >&6; }
20089
20090     case "$gl_cv_func_frexp_works" in
20091       *yes) gl_func_frexp_no_libm=yes ;;
20092       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
20093     esac
20094   else
20095     gl_func_frexp_no_libm=no
20096         REPLACE_FREXP=1
20097   fi
20098   if test $gl_func_frexp_no_libm = yes; then
20099
20100 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
20101
20102   fi
20103
20104 if test $gl_func_frexp_no_libm != yes; then
20105
20106
20107
20108
20109
20110
20111
20112
20113   gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20114
20115 fi
20116
20117
20118
20119
20120
20121           GNULIB_FREXP=1
20122
20123
20124
20125
20126
20127 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20128
20129
20130
20131
20132
20133
20134       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
20135 "
20136 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
20137
20138 else
20139   HAVE_DECL_FREXPL=0
20140 fi
20141
20142   if test $HAVE_DECL_FREXPL = 1; then
20143
20144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
20145 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
20146 if ${gl_cv_func_frexpl_no_libm+:} false; then :
20147   $as_echo_n "(cached) " >&6
20148 else
20149
20150       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20151 /* end confdefs.h.  */
20152 #include <math.h>
20153              long double x;
20154 int
20155 main ()
20156 {
20157 int e; return frexpl (x, &e) > 0;
20158   ;
20159   return 0;
20160 }
20161 _ACEOF
20162 if ac_fn_c_try_link "$LINENO"; then :
20163   gl_cv_func_frexpl_no_libm=yes
20164 else
20165   gl_cv_func_frexpl_no_libm=no
20166 fi
20167 rm -f core conftest.err conftest.$ac_objext \
20168     conftest$ac_exeext conftest.$ac_ext
20169
20170 fi
20171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
20172 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
20173
20174     if test $gl_cv_func_frexpl_no_libm = yes; then
20175
20176
20177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
20178 $as_echo_n "checking whether frexpl works... " >&6; }
20179 if ${gl_cv_func_frexpl_works+:} false; then :
20180   $as_echo_n "(cached) " >&6
20181 else
20182
20183       if test "$cross_compiling" = yes; then :
20184
20185          case "$host_os" in
20186            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
20187               gl_cv_func_frexpl_works="guessing no";;
20188            *) gl_cv_func_frexpl_works="guessing yes";;
20189          esac
20190
20191 else
20192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20193 /* end confdefs.h.  */
20194
20195 #include <float.h>
20196 #include <math.h>
20197 /* Override the values of <float.h>, like done in float.in.h.  */
20198 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
20199 # undef LDBL_MIN_EXP
20200 # define LDBL_MIN_EXP    (-16381)
20201 #endif
20202 #if defined __i386__ && defined __FreeBSD__
20203 # undef LDBL_MIN_EXP
20204 # define LDBL_MIN_EXP    (-16381)
20205 #endif
20206 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
20207 # undef LDBL_MIN_EXP
20208 # define LDBL_MIN_EXP DBL_MIN_EXP
20209 #endif
20210 #if defined __sgi && (LDBL_MANT_DIG >= 106)
20211 # if defined __GNUC__
20212 #  undef LDBL_MIN_EXP
20213 #  define LDBL_MIN_EXP DBL_MIN_EXP
20214 # endif
20215 #endif
20216 extern
20217 #ifdef __cplusplus
20218 "C"
20219 #endif
20220 long double frexpl (long double, int *);
20221 int main()
20222 {
20223   int result = 0;
20224   volatile long double x;
20225   /* Test on finite numbers that fails on AIX 5.1.  */
20226   x = 16.0L;
20227   {
20228     int exp = -9999;
20229     frexpl (x, &exp);
20230     if (exp != 5)
20231       result |= 1;
20232   }
20233   /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
20234      function returns an invalid (incorrectly normalized) value: it returns
20235                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
20236      but the correct result is
20237           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
20238   x = 1.01L;
20239   {
20240     int exp = -9999;
20241     long double y = frexpl (x, &exp);
20242     if (!(exp == 1 && y == 0.505L))
20243       result |= 2;
20244   }
20245   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
20246      LDBL_MAX_EXP = 16384.
20247      In the loop end test, we test x against Infinity, rather than comparing
20248      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
20249   {
20250     int i;
20251     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
20252       {
20253         int exp = -9999;
20254         frexpl (x, &exp);
20255         if (exp != i)
20256           {
20257             result |= 4;
20258             break;
20259           }
20260       }
20261   }
20262   /* Test on denormalized numbers.  */
20263   {
20264     int i;
20265     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
20266       ;
20267     if (x > 0.0L)
20268       {
20269         int exp;
20270         long double y = frexpl (x, &exp);
20271         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
20272            exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
20273         if (exp != LDBL_MIN_EXP - 1)
20274           result |= 8;
20275       }
20276   }
20277   /* Test on infinite numbers.  */
20278   x = 1.0L / 0.0L;
20279   {
20280     int exp;
20281     long double y = frexpl (x, &exp);
20282     if (y != x)
20283       result |= 16;
20284   }
20285   return result;
20286 }
20287 _ACEOF
20288 if ac_fn_c_try_run "$LINENO"; then :
20289   gl_cv_func_frexpl_works=yes
20290 else
20291   gl_cv_func_frexpl_works=no
20292 fi
20293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20294   conftest.$ac_objext conftest.beam conftest.$ac_ext
20295 fi
20296
20297
20298 fi
20299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
20300 $as_echo "$gl_cv_func_frexpl_works" >&6; }
20301
20302       case "$gl_cv_func_frexpl_works" in
20303         *yes) gl_func_frexpl_no_libm=yes ;;
20304         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
20305       esac
20306     else
20307       gl_func_frexpl_no_libm=no
20308             REPLACE_FREXPL=1
20309     fi
20310     if test $gl_func_frexpl_no_libm = yes; then
20311
20312 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
20313
20314     fi
20315   fi
20316
20317 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
20318
20319
20320
20321
20322
20323
20324
20325
20326   gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20327
20328 fi
20329
20330
20331
20332
20333
20334           GNULIB_FREXPL=1
20335
20336
20337
20338
20339
20340 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20341
20342
20343
20344
20345
20346
20347     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20348     REPLACE_FSEEK=1
20349   fi
20350
20351 if test $REPLACE_FSEEK = 1; then
20352
20353
20354
20355
20356
20357
20358
20359
20360   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20361
20362 fi
20363
20364
20365
20366
20367
20368           GNULIB_FSEEK=1
20369
20370
20371
20372
20373
20374 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20387 $as_echo_n "checking for fseeko... " >&6; }
20388 if ${gl_cv_func_fseeko+:} false; then :
20389   $as_echo_n "(cached) " >&6
20390 else
20391
20392       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20393 /* end confdefs.h.  */
20394 #include <stdio.h>
20395
20396 int
20397 main ()
20398 {
20399 fseeko (stdin, 0, 0);
20400   ;
20401   return 0;
20402 }
20403 _ACEOF
20404 if ac_fn_c_try_link "$LINENO"; then :
20405   gl_cv_func_fseeko=yes
20406 else
20407   gl_cv_func_fseeko=no
20408 fi
20409 rm -f core conftest.err conftest.$ac_objext \
20410     conftest$ac_exeext conftest.$ac_ext
20411
20412 fi
20413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20414 $as_echo "$gl_cv_func_fseeko" >&6; }
20415
20416
20417   if test $ac_cv_have_decl_fseeko = no; then
20418     HAVE_DECL_FSEEKO=0
20419   fi
20420
20421   if test $gl_cv_func_fseeko = no; then
20422     HAVE_FSEEKO=0
20423   else
20424     if test $WINDOWS_64_BIT_OFF_T = 1; then
20425       REPLACE_FSEEKO=1
20426     fi
20427     if test $gl_cv_var_stdin_large_offset = no; then
20428       REPLACE_FSEEKO=1
20429     fi
20430
20431
20432
20433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20434 $as_echo_n "checking whether fflush works on input streams... " >&6; }
20435 if ${gl_cv_func_fflush_stdin+:} false; then :
20436   $as_echo_n "(cached) " >&6
20437 else
20438   echo hello world > conftest.txt
20439      if test "$cross_compiling" = yes; then :
20440         gl_cv_func_fflush_stdin=no
20441 else
20442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20443 /* end confdefs.h.  */
20444
20445 #include <stdio.h>
20446 #if HAVE_UNISTD_H
20447 # include <unistd.h>
20448 #else /* on Windows with MSVC */
20449 # include <io.h>
20450 #endif
20451
20452 int
20453 main ()
20454 {
20455 FILE *f = fopen ("conftest.txt", "r");
20456          char buffer[10];
20457          int fd;
20458          int c;
20459          if (f == NULL)
20460            return 1;
20461          fd = fileno (f);
20462          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20463            return 2;
20464          /* For deterministic results, ensure f read a bigger buffer.  */
20465          if (lseek (fd, 0, SEEK_CUR) == 5)
20466            return 3;
20467          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
20468             on BSD systems and on mingw.  */
20469          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20470            return 4;
20471          if (lseek (fd, 0, SEEK_CUR) != 5)
20472            return 5;
20473          /* Verify behaviour of fflush after ungetc. See
20474             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
20475          /* Verify behaviour of fflush after a backup ungetc.  This fails on
20476             mingw.  */
20477          c = fgetc (f);
20478          ungetc (c, f);
20479          fflush (f);
20480          if (fgetc (f) != c)
20481            return 6;
20482          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
20483             on glibc 2.8 and on BSD systems.  */
20484          c = fgetc (f);
20485          ungetc ('@', f);
20486          fflush (f);
20487          if (fgetc (f) != c)
20488            return 7;
20489          return 0;
20490
20491   ;
20492   return 0;
20493 }
20494 _ACEOF
20495 if ac_fn_c_try_run "$LINENO"; then :
20496   gl_cv_func_fflush_stdin=yes
20497 else
20498   gl_cv_func_fflush_stdin=no
20499 fi
20500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20501   conftest.$ac_objext conftest.beam conftest.$ac_ext
20502 fi
20503
20504      rm conftest.txt
20505
20506 fi
20507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20508 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
20509
20510       if test $gl_cv_func_fflush_stdin = no; then
20511         REPLACE_FSEEKO=1
20512       fi
20513
20514   fi
20515
20516 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20517
20518
20519
20520
20521
20522
20523
20524
20525   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20526
20527
20528       for ac_func in _fseeki64
20529 do :
20530   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20531 if test "x$ac_cv_func__fseeki64" = xyes; then :
20532   cat >>confdefs.h <<_ACEOF
20533 #define HAVE__FSEEKI64 1
20534 _ACEOF
20535
20536 fi
20537 done
20538
20539
20540 fi
20541
20542
20543
20544
20545
20546           GNULIB_FSEEKO=1
20547
20548
20549
20550
20551
20552 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20553
20554
20555
20556
20557
20558
20559
20560   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20561     REPLACE_FSTAT=1
20562   fi
20563
20564
20565   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
20566     REPLACE_FSTAT=1
20567   fi
20568
20569
20570
20571
20572
20573   if test $ac_cv_func_fchdir = no; then
20574     HAVE_FCHDIR=0
20575   fi
20576
20577     if test $HAVE_FCHDIR = 0; then
20578       case "$gl_cv_func_open_directory_works" in
20579         *yes) ;;
20580         *)
20581           REPLACE_FSTAT=1
20582           ;;
20583       esac
20584     fi
20585
20586
20587 if test $REPLACE_FSTAT = 1; then
20588
20589
20590
20591
20592
20593
20594
20595
20596   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20597
20598
20599
20600
20601 fi
20602
20603
20604
20605
20606
20607           GNULIB_FSTAT=1
20608
20609
20610
20611
20612
20613 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20614
20615
20616
20617
20618
20619
20620     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20621     REPLACE_FTELL=1
20622   fi
20623
20624 if test $REPLACE_FTELL = 1; then
20625
20626
20627
20628
20629
20630
20631
20632
20633   gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
20634
20635 fi
20636
20637
20638
20639
20640
20641           GNULIB_FTELL=1
20642
20643
20644
20645
20646
20647 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660   if test $ac_cv_have_decl_ftello = no; then
20661     HAVE_DECL_FTELLO=0
20662   fi
20663
20664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
20665 $as_echo_n "checking for ftello... " >&6; }
20666 if ${gl_cv_func_ftello+:} false; then :
20667   $as_echo_n "(cached) " >&6
20668 else
20669
20670       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20671 /* end confdefs.h.  */
20672 #include <stdio.h>
20673 int
20674 main ()
20675 {
20676 ftello (stdin);
20677   ;
20678   return 0;
20679 }
20680 _ACEOF
20681 if ac_fn_c_try_link "$LINENO"; then :
20682   gl_cv_func_ftello=yes
20683 else
20684   gl_cv_func_ftello=no
20685 fi
20686 rm -f core conftest.err conftest.$ac_objext \
20687     conftest$ac_exeext conftest.$ac_ext
20688
20689 fi
20690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
20691 $as_echo "$gl_cv_func_ftello" >&6; }
20692   if test $gl_cv_func_ftello = no; then
20693     HAVE_FTELLO=0
20694   else
20695     if test $WINDOWS_64_BIT_OFF_T = 1; then
20696       REPLACE_FTELLO=1
20697     fi
20698     if test $gl_cv_var_stdin_large_offset = no; then
20699       REPLACE_FTELLO=1
20700     fi
20701     if test $REPLACE_FTELLO = 0; then
20702
20703       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
20704 $as_echo_n "checking whether ftello works... " >&6; }
20705 if ${gl_cv_func_ftello_works+:} false; then :
20706   $as_echo_n "(cached) " >&6
20707 else
20708
20709                               case "$host_os" in
20710                       # Guess no on Solaris.
20711             solaris*) gl_cv_func_ftello_works="guessing no" ;;
20712                       # Guess yes otherwise.
20713             *)        gl_cv_func_ftello_works="guessing yes" ;;
20714           esac
20715           if test "$cross_compiling" = yes; then :
20716   :
20717 else
20718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20719 /* end confdefs.h.  */
20720
20721 #include <stdio.h>
20722 #include <stdlib.h>
20723 #include <string.h>
20724 #define TESTFILE "conftest.tmp"
20725 int
20726 main (void)
20727 {
20728   FILE *fp;
20729
20730   /* Create a file with some contents.  */
20731   fp = fopen (TESTFILE, "w");
20732   if (fp == NULL)
20733     return 70;
20734   if (fwrite ("foogarsh", 1, 8, fp) < 8)
20735     return 71;
20736   if (fclose (fp))
20737     return 72;
20738
20739   /* The file's contents is now "foogarsh".  */
20740
20741   /* Try writing after reading to EOF.  */
20742   fp = fopen (TESTFILE, "r+");
20743   if (fp == NULL)
20744     return 73;
20745   if (fseek (fp, -1, SEEK_END))
20746     return 74;
20747   if (!(getc (fp) == 'h'))
20748     return 1;
20749   if (!(getc (fp) == EOF))
20750     return 2;
20751   if (!(ftell (fp) == 8))
20752     return 3;
20753   if (!(ftell (fp) == 8))
20754     return 4;
20755   if (!(putc ('!', fp) == '!'))
20756     return 5;
20757   if (!(ftell (fp) == 9))
20758     return 6;
20759   if (!(fclose (fp) == 0))
20760     return 7;
20761   fp = fopen (TESTFILE, "r");
20762   if (fp == NULL)
20763     return 75;
20764   {
20765     char buf[10];
20766     if (!(fread (buf, 1, 10, fp) == 9))
20767       return 10;
20768     if (!(memcmp (buf, "foogarsh!", 9) == 0))
20769       return 11;
20770   }
20771   if (!(fclose (fp) == 0))
20772     return 12;
20773
20774   /* The file's contents is now "foogarsh!".  */
20775
20776   return 0;
20777 }
20778 _ACEOF
20779 if ac_fn_c_try_run "$LINENO"; then :
20780   gl_cv_func_ftello_works=yes
20781 else
20782   gl_cv_func_ftello_works=no
20783 fi
20784 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20785   conftest.$ac_objext conftest.beam conftest.$ac_ext
20786 fi
20787
20788
20789 fi
20790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
20791 $as_echo "$gl_cv_func_ftello_works" >&6; }
20792       case "$gl_cv_func_ftello_works" in
20793         *yes) ;;
20794         *)
20795           REPLACE_FTELLO=1
20796
20797 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
20798
20799           ;;
20800       esac
20801     fi
20802   fi
20803
20804 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20805
20806
20807
20808
20809
20810
20811
20812
20813   gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
20814
20815
20816       for ac_func in _ftelli64
20817 do :
20818   ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
20819 if test "x$ac_cv_func__ftelli64" = xyes; then :
20820   cat >>confdefs.h <<_ACEOF
20821 #define HAVE__FTELLI64 1
20822 _ACEOF
20823
20824 fi
20825 done
20826
20827
20828 fi
20829
20830
20831
20832
20833
20834           GNULIB_FTELLO=1
20835
20836
20837
20838
20839
20840 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
20841
20842
20843
20844
20845
20846
20847
20848
20849   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20850   *yes,yes) ;;
20851   *)
20852         REPLACE_GETCWD=1
20853     ;;
20854   esac
20855
20856 if test $REPLACE_GETCWD = 1; then
20857
20858
20859
20860
20861
20862
20863
20864
20865   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20866
20867 fi
20868
20869
20870
20871
20872
20873           GNULIB_GETCWD=1
20874
20875
20876
20877
20878
20879 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20880
20881
20882
20883
20884
20885
20886   if test $ac_cv_func_getdtablesize != yes; then
20887     HAVE_GETDTABLESIZE=0
20888   fi
20889
20890 if test $HAVE_GETDTABLESIZE = 0; then
20891
20892
20893
20894
20895
20896
20897
20898
20899   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20900
20901
20902
20903
20904 fi
20905
20906
20907
20908
20909
20910           GNULIB_GETDTABLESIZE=1
20911
20912
20913
20914
20915
20916 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20917
20918
20919
20920
20921
20922
20923
20924
20925 if test $REPLACE_GETOPT = 1; then
20926
20927
20928
20929
20930
20931
20932
20933
20934   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20945
20946
20947
20948
20949     GNULIB_GL_UNISTD_H_GETOPT=1
20950 fi
20951
20952
20953
20954 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
20955
20956
20957
20958
20959
20960
20961     REPLACE_GETOPT=0
20962
20963
20964   if test -n "$gl_replace_getopt"; then :
20965
20966       REPLACE_GETOPT=1
20967
20968 fi
20969
20970
20971   if test $REPLACE_GETOPT = 1; then
20972
20973   GETOPT_H=getopt.h
20974
20975 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20976
20977
20978
20979   fi
20980
20981 if test $REPLACE_GETOPT = 1; then
20982
20983
20984
20985
20986
20987
20988
20989
20990   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21001
21002
21003
21004
21005     GNULIB_GL_UNISTD_H_GETOPT=1
21006 fi
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021   gl_gettimeofday_timezone=void
21022   if test $ac_cv_func_gettimeofday != yes; then
21023     HAVE_GETTIMEOFDAY=0
21024   else
21025
21026
21027
21028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21029 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21030 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21031   $as_echo_n "(cached) " >&6
21032 else
21033   if test "$cross_compiling" = yes; then :
21034   # When cross-compiling:
21035       case "$host_os" in
21036                 # Guess all is fine on glibc systems.
21037         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21038                 # If we don't know, assume the worst.
21039         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21040       esac
21041
21042 else
21043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21044 /* end confdefs.h.  */
21045 #include <string.h>
21046           #include <sys/time.h>
21047           #include <time.h>
21048           #include <stdlib.h>
21049
21050 int
21051 main ()
21052 {
21053
21054           time_t t = 0;
21055           struct tm *lt;
21056           struct tm saved_lt;
21057           struct timeval tv;
21058           lt = localtime (&t);
21059           saved_lt = *lt;
21060           gettimeofday (&tv, NULL);
21061           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21062
21063   ;
21064   return 0;
21065 }
21066 _ACEOF
21067 if ac_fn_c_try_run "$LINENO"; then :
21068   gl_cv_func_gettimeofday_clobber=no
21069 else
21070   gl_cv_func_gettimeofday_clobber=yes
21071 fi
21072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21073   conftest.$ac_objext conftest.beam conftest.$ac_ext
21074 fi
21075
21076 fi
21077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21078 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
21079
21080  case "$gl_cv_func_gettimeofday_clobber" in
21081    *yes)
21082      REPLACE_GETTIMEOFDAY=1
21083
21084
21085 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
21086
21087
21088 $as_echo "#define localtime rpl_localtime" >>confdefs.h
21089
21090
21091
21092 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21093
21094      ;;
21095  esac
21096
21097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21098 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21099 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21100   $as_echo_n "(cached) " >&6
21101 else
21102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21103 /* end confdefs.h.  */
21104 #include <sys/time.h>
21105               struct timeval c;
21106               int gettimeofday (struct timeval *restrict, void *restrict);
21107
21108 int
21109 main ()
21110 {
21111 /* glibc uses struct timezone * rather than the POSIX void *
21112                  if _GNU_SOURCE is defined.  However, since the only portable
21113                  use of gettimeofday uses NULL as the second parameter, and
21114                  since the glibc definition is actually more typesafe, it is
21115                  not worth wrapping this to get a compliant signature.  */
21116               int (*f) (struct timeval *restrict, void *restrict)
21117                 = gettimeofday;
21118               int x = f (&c, 0);
21119               return !(x | c.tv_sec | c.tv_usec);
21120
21121   ;
21122   return 0;
21123 }
21124 _ACEOF
21125 if ac_fn_c_try_compile "$LINENO"; then :
21126   gl_cv_func_gettimeofday_posix_signature=yes
21127 else
21128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21129 /* end confdefs.h.  */
21130 #include <sys/time.h>
21131 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21132
21133 int
21134 main ()
21135 {
21136
21137   ;
21138   return 0;
21139 }
21140 _ACEOF
21141 if ac_fn_c_try_compile "$LINENO"; then :
21142   gl_cv_func_gettimeofday_posix_signature=almost
21143 else
21144   gl_cv_func_gettimeofday_posix_signature=no
21145 fi
21146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21147 fi
21148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21149 fi
21150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21151 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21152     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21153       gl_gettimeofday_timezone='struct timezone'
21154     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21155       REPLACE_GETTIMEOFDAY=1
21156     fi
21157         if test $REPLACE_STRUCT_TIMEVAL = 1; then
21158       REPLACE_GETTIMEOFDAY=1
21159     fi
21160
21161   fi
21162
21163 cat >>confdefs.h <<_ACEOF
21164 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21165 _ACEOF
21166
21167
21168 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21169
21170
21171
21172
21173
21174
21175
21176
21177   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21178
21179
21180   for ac_header in sys/timeb.h
21181 do :
21182   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21183 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
21184   cat >>confdefs.h <<_ACEOF
21185 #define HAVE_SYS_TIMEB_H 1
21186 _ACEOF
21187
21188 fi
21189
21190 done
21191
21192   for ac_func in _ftime
21193 do :
21194   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21195 if test "x$ac_cv_func__ftime" = xyes; then :
21196   cat >>confdefs.h <<_ACEOF
21197 #define HAVE__FTIME 1
21198 _ACEOF
21199
21200 fi
21201 done
21202
21203
21204 fi
21205
21206
21207
21208
21209
21210           GNULIB_GETTIMEOFDAY=1
21211
21212
21213
21214
21215
21216 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21217
21218
21219
21220
21221    if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
21222   GNU_MAKE_TRUE=
21223   GNU_MAKE_FALSE='#'
21224 else
21225   GNU_MAKE_TRUE='#'
21226   GNU_MAKE_FALSE=
21227 fi
21228
21229
21230 # Autoconf 2.61a.99 and earlier don't support linking a file only
21231 # in VPATH builds.  But since GNUmakefile is for maintainer use
21232 # only, it does not matter if we skip the link with older autoconf.
21233 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21234 # builds, so use a shell variable to bypass this.
21235 GNUmakefile=GNUmakefile
21236 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21237
21238
21239
21240
21241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
21242 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
21243 if ${gl_cv_c_inline_effective+:} false; then :
21244   $as_echo_n "(cached) " >&6
21245 else
21246   if test $ac_cv_c_inline = no; then
21247        gl_cv_c_inline_effective=no
21248      else
21249                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21250 /* end confdefs.h.  */
21251
21252 int
21253 main ()
21254 {
21255 #ifdef __NO_INLINE__
21256                #error "inline is not effective"
21257              #endif
21258   ;
21259   return 0;
21260 }
21261 _ACEOF
21262 if ac_fn_c_try_compile "$LINENO"; then :
21263   gl_cv_c_inline_effective=yes
21264 else
21265   gl_cv_c_inline_effective=no
21266 fi
21267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21268      fi
21269
21270 fi
21271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
21272 $as_echo "$gl_cv_c_inline_effective" >&6; }
21273   if test $gl_cv_c_inline_effective = yes; then
21274
21275 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
21276
21277   fi
21278
21279
21280
21281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21282 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21283 if ${gl_cv_func_isnand_no_libm+:} false; then :
21284   $as_echo_n "(cached) " >&6
21285 else
21286
21287       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21288 /* end confdefs.h.  */
21289 #include <math.h>
21290              #if __GNUC__ >= 4
21291              # undef isnand
21292              # define isnand(x) __builtin_isnan ((double)(x))
21293              #else
21294              # undef isnand
21295              # define isnand(x) isnan ((double)(x))
21296              #endif
21297              double x;
21298 int
21299 main ()
21300 {
21301 return isnand (x);
21302   ;
21303   return 0;
21304 }
21305 _ACEOF
21306 if ac_fn_c_try_link "$LINENO"; then :
21307   gl_cv_func_isnand_no_libm=yes
21308 else
21309   gl_cv_func_isnand_no_libm=no
21310 fi
21311 rm -f core conftest.err conftest.$ac_objext \
21312     conftest$ac_exeext conftest.$ac_ext
21313
21314 fi
21315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21316 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21317
21318   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21319   if test $gl_cv_func_isnand_no_libm = yes; then
21320
21321 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21322
21323   fi
21324
21325 if test $gl_func_isnand_no_libm != yes; then
21326
21327
21328
21329
21330
21331
21332
21333
21334   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21335
21336
21337
21338
21339 fi
21340
21341
21342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
21343 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
21344 if ${gl_cv_func_isnanf_no_libm+:} false; then :
21345   $as_echo_n "(cached) " >&6
21346 else
21347
21348       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21349 /* end confdefs.h.  */
21350 #include <math.h>
21351              #if __GNUC__ >= 4
21352              # undef isnanf
21353              # define isnanf(x) __builtin_isnanf ((float)(x))
21354              #elif defined isnan
21355              # undef isnanf
21356              # define isnanf(x) isnan ((float)(x))
21357              #endif
21358              float x;
21359 int
21360 main ()
21361 {
21362 return isnanf (x);
21363   ;
21364   return 0;
21365 }
21366 _ACEOF
21367 if ac_fn_c_try_link "$LINENO"; then :
21368   gl_cv_func_isnanf_no_libm=yes
21369 else
21370   gl_cv_func_isnanf_no_libm=no
21371 fi
21372 rm -f core conftest.err conftest.$ac_objext \
21373     conftest$ac_exeext conftest.$ac_ext
21374
21375 fi
21376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
21377 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
21378
21379   if test $gl_cv_func_isnanf_no_libm = yes; then
21380
21381
21382
21383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
21384 $as_echo_n "checking whether isnan(float) works... " >&6; }
21385 if ${gl_cv_func_isnanf_works+:} false; then :
21386   $as_echo_n "(cached) " >&6
21387 else
21388
21389       if test "$cross_compiling" = yes; then :
21390   case "$host_os" in
21391            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
21392            *)                gl_cv_func_isnanf_works="guessing yes";;
21393          esac
21394
21395 else
21396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21397 /* end confdefs.h.  */
21398
21399 #include <math.h>
21400 #if __GNUC__ >= 4
21401 # undef isnanf
21402 # define isnanf(x) __builtin_isnanf ((float)(x))
21403 #elif defined isnan
21404 # undef isnanf
21405 # define isnanf(x) isnan ((float)(x))
21406 #endif
21407 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
21408 #ifdef __DECC
21409 static float
21410 NaN ()
21411 {
21412   static float zero = 0.0f;
21413   return zero / zero;
21414 }
21415 #else
21416 # define NaN() (0.0f / 0.0f)
21417 #endif
21418 #define NWORDS \
21419   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21420 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
21421 int main()
21422 {
21423   int result = 0;
21424
21425   if (isnanf (1.0f / 0.0f))
21426     result |= 1;
21427
21428   if (!isnanf (NaN ()))
21429     result |= 2;
21430
21431 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
21432   /* The isnanf function should be immune against changes in the sign bit and
21433      in the mantissa bits.  The xor operation twiddles a bit that can only be
21434      a sign bit or a mantissa bit.  */
21435   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
21436     {
21437       memory_float m;
21438
21439       m.value = NaN ();
21440       /* Set the bits below the exponent to 01111...111.  */
21441       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
21442       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
21443       if (!isnanf (m.value))
21444         result |= 4;
21445     }
21446 #endif
21447
21448   return result;
21449 }
21450 _ACEOF
21451 if ac_fn_c_try_run "$LINENO"; then :
21452   gl_cv_func_isnanf_works=yes
21453 else
21454   gl_cv_func_isnanf_works=no
21455 fi
21456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21457   conftest.$ac_objext conftest.beam conftest.$ac_ext
21458 fi
21459
21460
21461 fi
21462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
21463 $as_echo "$gl_cv_func_isnanf_works" >&6; }
21464
21465   fi
21466   if test $gl_cv_func_isnanf_no_libm = yes \
21467      && { case "$gl_cv_func_isnanf_works" in
21468             *yes) true;;
21469             *) false;;
21470           esac
21471         }; then
21472     gl_func_isnanf_no_libm=yes
21473
21474 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
21475
21476   else
21477     gl_func_isnanf_no_libm=no
21478   fi
21479
21480 if test $gl_func_isnanf_no_libm != yes; then
21481
21482
21483
21484
21485
21486
21487
21488
21489   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
21490
21491
21492
21493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
21494 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
21495 if ${gl_cv_cc_float_expbit0+:} false; then :
21496   $as_echo_n "(cached) " >&6
21497 else
21498
21499       if test "$cross_compiling" = yes; then :
21500   gl_cv_cc_float_expbit0="word 0 bit 23"
21501 else
21502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21503 /* end confdefs.h.  */
21504
21505 #include <float.h>
21506 #include <stddef.h>
21507 #include <stdio.h>
21508 #include <string.h>
21509 #define NWORDS \
21510   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21511 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
21512 static unsigned int ored_words[NWORDS];
21513 static unsigned int anded_words[NWORDS];
21514 static void add_to_ored_words (float x)
21515 {
21516   memory_float m;
21517   size_t i;
21518   /* Clear it first, in case
21519      sizeof (float) < sizeof (memory_float).  */
21520   memset (&m, 0, sizeof (memory_float));
21521   m.value = x;
21522   for (i = 0; i < NWORDS; i++)
21523     {
21524       ored_words[i] |= m.word[i];
21525       anded_words[i] &= m.word[i];
21526     }
21527 }
21528 int main ()
21529 {
21530   size_t j;
21531   FILE *fp = fopen ("conftest.out", "w");
21532   if (fp == NULL)
21533     return 1;
21534   for (j = 0; j < NWORDS; j++)
21535     anded_words[j] = ~ (unsigned int) 0;
21536   add_to_ored_words (0.25f);
21537   add_to_ored_words (0.5f);
21538   add_to_ored_words (1.0f);
21539   add_to_ored_words (2.0f);
21540   add_to_ored_words (4.0f);
21541   /* Remove bits that are common (e.g. if representation of the first mantissa
21542      bit is explicit).  */
21543   for (j = 0; j < NWORDS; j++)
21544     ored_words[j] &= ~anded_words[j];
21545   /* Now find the nonzero word.  */
21546   for (j = 0; j < NWORDS; j++)
21547     if (ored_words[j] != 0)
21548       break;
21549   if (j < NWORDS)
21550     {
21551       size_t i;
21552       for (i = j + 1; i < NWORDS; i++)
21553         if (ored_words[i] != 0)
21554           {
21555             fprintf (fp, "unknown");
21556             return (fclose (fp) != 0);
21557           }
21558       for (i = 0; ; i++)
21559         if ((ored_words[j] >> i) & 1)
21560           {
21561             fprintf (fp, "word %d bit %d", (int) j, (int) i);
21562             return (fclose (fp) != 0);
21563           }
21564     }
21565   fprintf (fp, "unknown");
21566   return (fclose (fp) != 0);
21567 }
21568
21569 _ACEOF
21570 if ac_fn_c_try_run "$LINENO"; then :
21571   gl_cv_cc_float_expbit0=`cat conftest.out`
21572 else
21573   gl_cv_cc_float_expbit0="unknown"
21574 fi
21575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21576   conftest.$ac_objext conftest.beam conftest.$ac_ext
21577 fi
21578
21579       rm -f conftest.out
21580
21581 fi
21582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
21583 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
21584   case "$gl_cv_cc_float_expbit0" in
21585     word*bit*)
21586       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21587       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
21588
21589 cat >>confdefs.h <<_ACEOF
21590 #define FLT_EXPBIT0_WORD $word
21591 _ACEOF
21592
21593
21594 cat >>confdefs.h <<_ACEOF
21595 #define FLT_EXPBIT0_BIT $bit
21596 _ACEOF
21597
21598       ;;
21599   esac
21600
21601
21602 fi
21603
21604
21605   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21606 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21607 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21608   $as_echo_n "(cached) " >&6
21609 else
21610
21611       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21612 /* end confdefs.h.  */
21613 #include <math.h>
21614              #if __GNUC__ >= 4
21615              # undef isnanl
21616              # define isnanl(x) __builtin_isnanl ((long double)(x))
21617              #elif defined isnan
21618              # undef isnanl
21619              # define isnanl(x) isnan ((long double)(x))
21620              #endif
21621              long double x;
21622 int
21623 main ()
21624 {
21625 return isnanl (x);
21626   ;
21627   return 0;
21628 }
21629 _ACEOF
21630 if ac_fn_c_try_link "$LINENO"; then :
21631   gl_cv_func_isnanl_no_libm=yes
21632 else
21633   gl_cv_func_isnanl_no_libm=no
21634 fi
21635 rm -f core conftest.err conftest.$ac_objext \
21636     conftest$ac_exeext conftest.$ac_ext
21637
21638 fi
21639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21640 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21641
21642   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21643   if test $gl_func_isnanl_no_libm = yes; then
21644
21645
21646
21647
21648      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21649 $as_echo_n "checking whether isnanl works... " >&6; }
21650 if ${gl_cv_func_isnanl_works+:} false; then :
21651   $as_echo_n "(cached) " >&6
21652 else
21653
21654       if test "$cross_compiling" = yes; then :
21655   case "$host_cpu" in
21656                                  # Guess no on ia64, x86_64, i386.
21657            ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
21658            *)
21659              case "$host_os" in
21660                netbsd*) gl_cv_func_isnanl_works="guessing no";;
21661                *)       gl_cv_func_isnanl_works="guessing yes";;
21662              esac
21663              ;;
21664          esac
21665
21666 else
21667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21668 /* end confdefs.h.  */
21669
21670 #include <float.h>
21671 #include <limits.h>
21672 #include <math.h>
21673 #if __GNUC__ >= 4
21674 # undef isnanl
21675 # define isnanl(x) __builtin_isnanl ((long double)(x))
21676 #elif defined isnan
21677 # undef isnanl
21678 # define isnanl(x) isnan ((long double)(x))
21679 #endif
21680 #define NWORDS \
21681   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21682 typedef union { unsigned int word[NWORDS]; long double value; }
21683         memory_long_double;
21684 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21685    runtime type conversion.  */
21686 #ifdef __sgi
21687 static long double NaNl ()
21688 {
21689   double zero = 0.0;
21690   return zero / zero;
21691 }
21692 #else
21693 # define NaNl() (0.0L / 0.0L)
21694 #endif
21695 int main ()
21696 {
21697   int result = 0;
21698
21699   if (!isnanl (NaNl ()))
21700     result |= 1;
21701
21702   {
21703     memory_long_double m;
21704     unsigned int i;
21705
21706     /* The isnanl function should be immune against changes in the sign bit and
21707        in the mantissa bits.  The xor operation twiddles a bit that can only be
21708        a sign bit or a mantissa bit (since the exponent never extends to
21709        bit 31).  */
21710     m.value = NaNl ();
21711     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21712     for (i = 0; i < NWORDS; i++)
21713       m.word[i] |= 1;
21714     if (!isnanl (m.value))
21715       result |= 1;
21716   }
21717
21718 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
21719 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21720    of 'unsigned int' words.  */
21721 # ifdef WORDS_BIGENDIAN
21722 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
21723      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21724        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
21725        (unsigned int) (mantlo) << 16                                        \
21726      }
21727 # else
21728 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
21729      { mantlo, manthi, exponent }
21730 # endif
21731   { /* Quiet NaN.  */
21732     static memory_long_double x =
21733       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21734     if (!isnanl (x.value))
21735       result |= 2;
21736   }
21737   {
21738     /* Signalling NaN.  */
21739     static memory_long_double x =
21740       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21741     if (!isnanl (x.value))
21742       result |= 2;
21743   }
21744   /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
21745      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
21746        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
21747        Application Architecture.
21748        Table 5-2 "Floating-Point Register Encodings"
21749        Figure 5-6 "Memory to Floating-Point Register Data Translation"
21750    */
21751   { /* Pseudo-NaN.  */
21752     static memory_long_double x =
21753       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21754     if (!isnanl (x.value))
21755       result |= 4;
21756   }
21757   { /* Pseudo-Infinity.  */
21758     static memory_long_double x =
21759       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21760     if (!isnanl (x.value))
21761       result |= 8;
21762   }
21763   { /* Pseudo-Zero.  */
21764     static memory_long_double x =
21765       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21766     if (!isnanl (x.value))
21767       result |= 16;
21768   }
21769   { /* Unnormalized number.  */
21770     static memory_long_double x =
21771       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21772     if (!isnanl (x.value))
21773       result |= 32;
21774   }
21775   { /* Pseudo-Denormal.  */
21776     static memory_long_double x =
21777       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21778     if (!isnanl (x.value))
21779       result |= 64;
21780   }
21781 #endif
21782
21783   return result;
21784 }
21785 _ACEOF
21786 if ac_fn_c_try_run "$LINENO"; then :
21787   gl_cv_func_isnanl_works=yes
21788 else
21789   gl_cv_func_isnanl_works=no
21790 fi
21791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21792   conftest.$ac_objext conftest.beam conftest.$ac_ext
21793 fi
21794
21795
21796 fi
21797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21798 $as_echo "$gl_cv_func_isnanl_works" >&6; }
21799
21800     case "$gl_cv_func_isnanl_works" in
21801       *yes) ;;
21802       *)    gl_func_isnanl_no_libm=no ;;
21803     esac
21804   fi
21805   if test $gl_func_isnanl_no_libm = yes; then
21806
21807 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21808
21809   fi
21810
21811 if test $gl_func_isnanl_no_libm != yes; then
21812
21813
21814
21815
21816
21817
21818
21819
21820   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21821
21822
21823
21824
21825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21826 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
21827 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21828   $as_echo_n "(cached) " >&6
21829 else
21830
21831       if test "$cross_compiling" = yes; then :
21832
21833                               gl_cv_cc_long_double_expbit0="unknown"
21834
21835 else
21836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21837 /* end confdefs.h.  */
21838
21839 #include <float.h>
21840 #include <stddef.h>
21841 #include <stdio.h>
21842 #include <string.h>
21843 #define NWORDS \
21844   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21845 typedef union { long double value; unsigned int word[NWORDS]; }
21846         memory_long_double;
21847 static unsigned int ored_words[NWORDS];
21848 static unsigned int anded_words[NWORDS];
21849 static void add_to_ored_words (long double x)
21850 {
21851   memory_long_double m;
21852   size_t i;
21853   /* Clear it first, in case
21854      sizeof (long double) < sizeof (memory_long_double).  */
21855   memset (&m, 0, sizeof (memory_long_double));
21856   m.value = x;
21857   for (i = 0; i < NWORDS; i++)
21858     {
21859       ored_words[i] |= m.word[i];
21860       anded_words[i] &= m.word[i];
21861     }
21862 }
21863 int main ()
21864 {
21865   size_t j;
21866   FILE *fp = fopen ("conftest.out", "w");
21867   if (fp == NULL)
21868     return 1;
21869   for (j = 0; j < NWORDS; j++)
21870     anded_words[j] = ~ (unsigned int) 0;
21871   add_to_ored_words (0.25L);
21872   add_to_ored_words (0.5L);
21873   add_to_ored_words (1.0L);
21874   add_to_ored_words (2.0L);
21875   add_to_ored_words (4.0L);
21876   /* Remove bits that are common (e.g. if representation of the first mantissa
21877      bit is explicit).  */
21878   for (j = 0; j < NWORDS; j++)
21879     ored_words[j] &= ~anded_words[j];
21880   /* Now find the nonzero word.  */
21881   for (j = 0; j < NWORDS; j++)
21882     if (ored_words[j] != 0)
21883       break;
21884   if (j < NWORDS)
21885     {
21886       size_t i;
21887       for (i = j + 1; i < NWORDS; i++)
21888         if (ored_words[i] != 0)
21889           {
21890             fprintf (fp, "unknown");
21891             return (fclose (fp) != 0);
21892           }
21893       for (i = 0; ; i++)
21894         if ((ored_words[j] >> i) & 1)
21895           {
21896             fprintf (fp, "word %d bit %d", (int) j, (int) i);
21897             return (fclose (fp) != 0);
21898           }
21899     }
21900   fprintf (fp, "unknown");
21901   return (fclose (fp) != 0);
21902 }
21903
21904 _ACEOF
21905 if ac_fn_c_try_run "$LINENO"; then :
21906   gl_cv_cc_long_double_expbit0=`cat conftest.out`
21907 else
21908   gl_cv_cc_long_double_expbit0="unknown"
21909 fi
21910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21911   conftest.$ac_objext conftest.beam conftest.$ac_ext
21912 fi
21913
21914       rm -f conftest.out
21915
21916 fi
21917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21918 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21919   case "$gl_cv_cc_long_double_expbit0" in
21920     word*bit*)
21921       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21922       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21923
21924 cat >>confdefs.h <<_ACEOF
21925 #define LDBL_EXPBIT0_WORD $word
21926 _ACEOF
21927
21928
21929 cat >>confdefs.h <<_ACEOF
21930 #define LDBL_EXPBIT0_BIT $bit
21931 _ACEOF
21932
21933       ;;
21934   esac
21935
21936
21937
21938 fi
21939
21940
21941   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
21942 $as_echo_n "checking for C compiler flag to ignore unused libraries... " >&6; }
21943 if ${gl_cv_prog_c_ignore_unused_libraries+:} false; then :
21944   $as_echo_n "(cached) " >&6
21945 else
21946   gl_cv_prog_c_ignore_unused_libraries=none
21947      gl_saved_ldflags=$LDFLAGS
21948      gl_saved_libs=$LIBS
21949      # Link with -lm to detect binutils 2.16 bug with --as-needed; see
21950      # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
21951      LIBS="$LIBS -lm"
21952      # Use long option sequences like '-z ignore' to test for the feature,
21953      # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
21954      # GCC + binutils likes '-Wl,--as-needed'.
21955      # GCC + Solaris ld likes '-Wl,-z,ignore'.
21956      # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
21957      # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
21958      # native cc issues annoying warnings and then ignores it,
21959      # which would cause us to incorrectly conclude that it worked.
21960      for gl_flags in  '-Wl,--as-needed' \
21961   '-Wl,-z,ignore' \
21962   '-z ignore'
21963
21964      do
21965        LDFLAGS="$gl_flags $LDFLAGS"
21966        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21967 /* end confdefs.h.  */
21968
21969 int
21970 main ()
21971 {
21972
21973   ;
21974   return 0;
21975 }
21976 _ACEOF
21977 if ac_fn_c_try_link "$LINENO"; then :
21978   gl_cv_prog_c_ignore_unused_libraries=$gl_flags
21979 fi
21980 rm -f core conftest.err conftest.$ac_objext \
21981     conftest$ac_exeext conftest.$ac_ext
21982        LDFLAGS=$gl_saved_ldflags
21983        test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
21984          break
21985      done
21986      LIBS=$gl_saved_libs
21987
21988 fi
21989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
21990 $as_echo "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
21991   IGNORE_UNUSED_LIBRARIES_CFLAGS=
21992   if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
21993     IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
21994   fi
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22006
22007
22008
22009   if test "$gl_threads_api" = posix; then
22010     # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
22011     # pthread_rwlock_* functions.
22012     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22013 "
22014 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
22015
22016 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22017
22018 fi
22019
22020     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22021     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22022 /* end confdefs.h.  */
22023
22024       #include <pthread.h>
22025 int
22026 main ()
22027 {
22028
22029 #if __FreeBSD__ == 4
22030 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22031 #else
22032 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22033 return !x;
22034 #endif
22035
22036   ;
22037   return 0;
22038 }
22039 _ACEOF
22040 if ac_fn_c_try_compile "$LINENO"; then :
22041
22042 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22043
22044 fi
22045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22046   fi
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22058 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22059 if ${gl_cv_func_lseek_pipe+:} false; then :
22060   $as_echo_n "(cached) " >&6
22061 else
22062   case "$host_os" in
22063        mingw*)
22064                                                                gl_cv_func_lseek_pipe=no
22065          ;;
22066        *)
22067          if test $cross_compiling = no; then
22068            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22069 /* end confdefs.h.  */
22070
22071 #include <sys/types.h> /* for off_t */
22072 #include <stdio.h> /* for SEEK_CUR */
22073 #if HAVE_UNISTD_H
22074 # include <unistd.h>
22075 #else /* on Windows with MSVC */
22076 # include <io.h>
22077 #endif
22078
22079 int
22080 main ()
22081 {
22082
22083   /* Exit with success only if stdin is seekable.  */
22084   return lseek (0, (off_t)0, SEEK_CUR) < 0;
22085
22086   ;
22087   return 0;
22088 }
22089 _ACEOF
22090 if ac_fn_c_try_link "$LINENO"; then :
22091   if test -s conftest$ac_exeext \
22092                  && ./conftest$ac_exeext < conftest.$ac_ext \
22093                  && test 1 = "`echo hi \
22094                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22095                 gl_cv_func_lseek_pipe=yes
22096               else
22097                 gl_cv_func_lseek_pipe=no
22098               fi
22099
22100 else
22101   gl_cv_func_lseek_pipe=no
22102 fi
22103 rm -f core conftest.err conftest.$ac_objext \
22104     conftest$ac_exeext conftest.$ac_ext
22105          else
22106            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22107 /* end confdefs.h.  */
22108
22109 #if defined __BEOS__
22110 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
22111   Choke me.
22112 #endif
22113 _ACEOF
22114 if ac_fn_c_try_compile "$LINENO"; then :
22115   gl_cv_func_lseek_pipe=yes
22116 else
22117   gl_cv_func_lseek_pipe=no
22118 fi
22119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22120          fi
22121          ;;
22122      esac
22123
22124 fi
22125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22126 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
22127   if test $gl_cv_func_lseek_pipe = no; then
22128     REPLACE_LSEEK=1
22129
22130 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22131
22132   fi
22133
22134
22135   if test $WINDOWS_64_BIT_OFF_T = 1; then
22136     REPLACE_LSEEK=1
22137   fi
22138
22139 if test $REPLACE_LSEEK = 1; then
22140
22141
22142
22143
22144
22145
22146
22147
22148   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22149
22150 fi
22151
22152
22153
22154
22155
22156           GNULIB_LSEEK=1
22157
22158
22159
22160
22161
22162 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22163
22164
22165
22166
22167
22168
22169   if test $ac_cv_func_lstat = yes; then
22170
22171     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22172       *no)
22173         REPLACE_LSTAT=1
22174         ;;
22175     esac
22176   else
22177     HAVE_LSTAT=0
22178   fi
22179
22180 if test $REPLACE_LSTAT = 1; then
22181
22182
22183
22184
22185
22186
22187
22188
22189   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22190
22191
22192
22193   :
22194
22195 fi
22196
22197
22198
22199
22200
22201           GNULIB_LSTAT=1
22202
22203
22204
22205
22206
22207 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22208
22209
22210
22211
22212
22213
22214
22215       for ac_header in stdlib.h
22216 do :
22217   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22218 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22219   cat >>confdefs.h <<_ACEOF
22220 #define HAVE_STDLIB_H 1
22221 _ACEOF
22222
22223 fi
22224
22225 done
22226
22227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22228 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
22229 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22230   $as_echo_n "(cached) " >&6
22231 else
22232   if test "$cross_compiling" = yes; then :
22233   case "$host_os" in
22234           # Guess yes on platforms where we know the result.
22235           *-gnu* | freebsd* | netbsd* | openbsd* \
22236           | hpux* | solaris* | cygwin* | mingw*)
22237             ac_cv_func_malloc_0_nonnull=yes ;;
22238           # If we don't know, assume the worst.
22239           *) ac_cv_func_malloc_0_nonnull=no ;;
22240         esac
22241
22242 else
22243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22244 /* end confdefs.h.  */
22245 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22246             # include <stdlib.h>
22247             #else
22248             char *malloc ();
22249             #endif
22250
22251 int
22252 main ()
22253 {
22254 return ! malloc (0);
22255   ;
22256   return 0;
22257 }
22258
22259 _ACEOF
22260 if ac_fn_c_try_run "$LINENO"; then :
22261   ac_cv_func_malloc_0_nonnull=yes
22262 else
22263   ac_cv_func_malloc_0_nonnull=no
22264 fi
22265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22266   conftest.$ac_objext conftest.beam conftest.$ac_ext
22267 fi
22268
22269
22270 fi
22271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22272 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
22273   if test $ac_cv_func_malloc_0_nonnull = yes; then :
22274
22275 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22276
22277 else
22278   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22279
22280      REPLACE_MALLOC=1
22281
22282 fi
22283
22284
22285 if test $REPLACE_MALLOC = 1; then
22286
22287
22288
22289
22290
22291
22292
22293
22294   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22295
22296 fi
22297
22298
22299 cat >>confdefs.h <<_ACEOF
22300 #define GNULIB_MALLOC_GNU 1
22301 _ACEOF
22302
22303
22304
22305
22306
22307   if test $gl_cv_func_malloc_posix = yes; then
22308
22309 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22310
22311   else
22312     REPLACE_MALLOC=1
22313   fi
22314
22315 if test $REPLACE_MALLOC = 1; then
22316
22317
22318
22319
22320
22321
22322
22323
22324   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22325
22326 fi
22327
22328
22329
22330
22331
22332           GNULIB_MALLOC_POSIX=1
22333
22334
22335
22336
22337
22338 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353      if test $gl_cv_have_include_next = yes; then
22354        gl_cv_next_math_h='<'math.h'>'
22355      else
22356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22357 $as_echo_n "checking absolute name of <math.h>... " >&6; }
22358 if ${gl_cv_next_math_h+:} false; then :
22359   $as_echo_n "(cached) " >&6
22360 else
22361
22362              if test $ac_cv_header_math_h = yes; then
22363
22364
22365                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22366 /* end confdefs.h.  */
22367 #include <math.h>
22368
22369 _ACEOF
22370                                                                                                                         case "$host_os" in
22371                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
22372                  *)    gl_absname_cpp="$ac_cpp" ;;
22373                esac
22374
22375                case "$host_os" in
22376                  mingw*)
22377                                                                                                                                      gl_dirsep_regex='[/\\]'
22378                    ;;
22379                  *)
22380                    gl_dirsep_regex='\/'
22381                    ;;
22382                esac
22383                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22384
22385                gl_header_literal_regex=`echo 'math.h' \
22386                                         | sed -e "$gl_make_literal_regex_sed"`
22387                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22388                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22389                    s|^/[^/]|//&|
22390                    p
22391                    q
22392                  }'
22393                                                             gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22394                       sed -n "$gl_absolute_header_sed"`'"'
22395           else
22396                gl_cv_next_math_h='<'math.h'>'
22397              fi
22398
22399
22400 fi
22401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22402 $as_echo "$gl_cv_next_math_h" >&6; }
22403      fi
22404      NEXT_MATH_H=$gl_cv_next_math_h
22405
22406      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22407        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22408        gl_next_as_first_directive='<'math.h'>'
22409      else
22410        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22411        gl_next_as_first_directive=$gl_cv_next_math_h
22412      fi
22413      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
22414
22415
22416
22417
22418
22419
22420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
22421 $as_echo_n "checking whether NAN macro works... " >&6; }
22422 if ${gl_cv_header_math_nan_works+:} false; then :
22423   $as_echo_n "(cached) " >&6
22424 else
22425   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22426 /* end confdefs.h.  */
22427 #include <math.h>
22428 int
22429 main ()
22430 {
22431 /* Solaris 10 has a broken definition of NAN.  Other platforms
22432         fail to provide NAN, or provide it only in C99 mode; this
22433         test only needs to fail when NAN is provided but wrong.  */
22434          float f = 1.0f;
22435 #ifdef NAN
22436          f = NAN;
22437 #endif
22438          return f == 0;
22439   ;
22440   return 0;
22441 }
22442 _ACEOF
22443 if ac_fn_c_try_compile "$LINENO"; then :
22444   gl_cv_header_math_nan_works=yes
22445 else
22446   gl_cv_header_math_nan_works=no
22447 fi
22448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22449 fi
22450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
22451 $as_echo "$gl_cv_header_math_nan_works" >&6; }
22452   if test $gl_cv_header_math_nan_works = no; then
22453     REPLACE_NAN=1
22454   fi
22455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
22456 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
22457 if ${gl_cv_header_math_huge_val_works+:} false; then :
22458   $as_echo_n "(cached) " >&6
22459 else
22460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22461 /* end confdefs.h.  */
22462 #include <math.h>
22463 int
22464 main ()
22465 {
22466 /* Solaris 10 has a broken definition of HUGE_VAL.  */
22467          double d = HUGE_VAL;
22468          return d == 0;
22469   ;
22470   return 0;
22471 }
22472 _ACEOF
22473 if ac_fn_c_try_compile "$LINENO"; then :
22474   gl_cv_header_math_huge_val_works=yes
22475 else
22476   gl_cv_header_math_huge_val_works=no
22477 fi
22478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22479 fi
22480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
22481 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
22482   if test $gl_cv_header_math_huge_val_works = no; then
22483     REPLACE_HUGE_VAL=1
22484   fi
22485
22486
22487     for gl_func in acosf acosl asinf asinl atanf atanl      cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf      expf expl exp2 exp2f exp2l expm1 expm1f expm1l      fabsf fabsl floorf floorl fma fmaf fmal      fmod fmodf fmodl frexpf frexpl hypotf hypotl      ilogb ilogbf ilogbl      ldexpf ldexpl      log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l      logb logbf logbl      modf modff modfl powf      remainder remainderf remainderl      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl      tanf tanl tanhf trunc truncf truncl; do
22488     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22489     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22490 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22491 if eval \${$as_gl_Symbol+:} false; then :
22492   $as_echo_n "(cached) " >&6
22493 else
22494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22495 /* end confdefs.h.  */
22496 #include <math.h>
22497 int
22498 main ()
22499 {
22500 #undef $gl_func
22501   (void) $gl_func;
22502   ;
22503   return 0;
22504 }
22505 _ACEOF
22506 if ac_fn_c_try_compile "$LINENO"; then :
22507   eval "$as_gl_Symbol=yes"
22508 else
22509   eval "$as_gl_Symbol=no"
22510 fi
22511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22512 fi
22513 eval ac_res=\$$as_gl_Symbol
22514                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22515 $as_echo "$ac_res" >&6; }
22516     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22517   cat >>confdefs.h <<_ACEOF
22518 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22519 _ACEOF
22520
22521                      eval ac_cv_have_decl_$gl_func=yes
22522 fi
22523       done
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22537
22538
22539
22540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22541 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22542 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22543   $as_echo_n "(cached) " >&6
22544 else
22545
22546                   case "$host_os" in
22547                      # Guess no on AIX and OSF/1.
22548         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22549                      # Guess yes otherwise.
22550         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22551       esac
22552       if test $LOCALE_JA != none; then
22553         if test "$cross_compiling" = yes; then :
22554   :
22555 else
22556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22557 /* end confdefs.h.  */
22558
22559 #include <locale.h>
22560 #include <string.h>
22561 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22562    <wchar.h>.
22563    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22564    included before <wchar.h>.  */
22565 #include <stddef.h>
22566 #include <stdio.h>
22567 #include <time.h>
22568 #include <wchar.h>
22569 int main ()
22570 {
22571   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22572     {
22573       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22574       mbstate_t state;
22575       wchar_t wc;
22576
22577       memset (&state, '\0', sizeof (mbstate_t));
22578       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22579         if (mbsinit (&state))
22580           return 1;
22581     }
22582   return 0;
22583 }
22584 _ACEOF
22585 if ac_fn_c_try_run "$LINENO"; then :
22586   gl_cv_func_mbrtowc_incomplete_state=yes
22587 else
22588   gl_cv_func_mbrtowc_incomplete_state=no
22589 fi
22590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22591   conftest.$ac_objext conftest.beam conftest.$ac_ext
22592 fi
22593
22594       fi
22595
22596 fi
22597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22598 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22599
22600
22601
22602
22603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22604 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22605 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22606   $as_echo_n "(cached) " >&6
22607 else
22608
22609                   case "$host_os" in
22610                     # Guess no on Solaris 8.
22611         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22612                     # Guess yes otherwise.
22613         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22614       esac
22615       if test $LOCALE_ZH_CN != none; then
22616         if test "$cross_compiling" = yes; then :
22617   :
22618 else
22619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22620 /* end confdefs.h.  */
22621
22622 #include <locale.h>
22623 #include <stdlib.h>
22624 #include <string.h>
22625 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22626    <wchar.h>.
22627    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22628    included before <wchar.h>.  */
22629 #include <stddef.h>
22630 #include <stdio.h>
22631 #include <time.h>
22632 #include <wchar.h>
22633 int main ()
22634 {
22635   /* This fails on Solaris 8:
22636      mbrtowc returns 2, and sets wc to 0x00F0.
22637      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
22638   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22639     {
22640       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22641       mbstate_t state;
22642       wchar_t wc;
22643
22644       memset (&state, '\0', sizeof (mbstate_t));
22645       if (mbrtowc (&wc, input + 3, 6, &state) != 4
22646           && mbtowc (&wc, input + 3, 6) == 4)
22647         return 1;
22648     }
22649   return 0;
22650 }
22651 _ACEOF
22652 if ac_fn_c_try_run "$LINENO"; then :
22653   gl_cv_func_mbrtowc_sanitycheck=yes
22654 else
22655   gl_cv_func_mbrtowc_sanitycheck=no
22656 fi
22657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22658   conftest.$ac_objext conftest.beam conftest.$ac_ext
22659 fi
22660
22661       fi
22662
22663 fi
22664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22665 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22666
22667     REPLACE_MBSTATE_T=0
22668     case "$gl_cv_func_mbrtowc_incomplete_state" in
22669       *yes) ;;
22670       *) REPLACE_MBSTATE_T=1 ;;
22671     esac
22672     case "$gl_cv_func_mbrtowc_sanitycheck" in
22673       *yes) ;;
22674       *) REPLACE_MBSTATE_T=1 ;;
22675     esac
22676   else
22677     REPLACE_MBSTATE_T=1
22678   fi
22679
22680
22681
22682   if test $ac_cv_func_mbrtowc = no; then
22683     HAVE_MBRTOWC=0
22684     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
22685 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22686    <wchar.h>.
22687    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22688    included before <wchar.h>.  */
22689 #include <stddef.h>
22690 #include <stdio.h>
22691 #include <time.h>
22692 #include <wchar.h>
22693
22694 "
22695 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
22696   ac_have_decl=1
22697 else
22698   ac_have_decl=0
22699 fi
22700
22701 cat >>confdefs.h <<_ACEOF
22702 #define HAVE_DECL_MBRTOWC $ac_have_decl
22703 _ACEOF
22704
22705     if test $ac_cv_have_decl_mbrtowc = yes; then
22706                         REPLACE_MBRTOWC=1
22707     fi
22708   else
22709     if test $REPLACE_MBSTATE_T = 1; then
22710       REPLACE_MBRTOWC=1
22711     else
22712
22713
22714
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22716 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22717 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22718   $as_echo_n "(cached) " >&6
22719 else
22720
22721                   case "$host_os" in
22722                   # Guess no on Solaris.
22723         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22724                   # Guess yes otherwise.
22725         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22726       esac
22727       if test $LOCALE_FR_UTF8 != none; then
22728         if test "$cross_compiling" = yes; then :
22729   :
22730 else
22731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732 /* end confdefs.h.  */
22733
22734 #include <locale.h>
22735 #include <stdlib.h>
22736 #include <string.h>
22737 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22738    <wchar.h>.
22739    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22740    included before <wchar.h>.  */
22741 #include <stddef.h>
22742 #include <stdio.h>
22743 #include <time.h>
22744 #include <wchar.h>
22745 int main ()
22746 {
22747   int result = 0;
22748
22749   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22750     {
22751       char input[] = "\303\237er";
22752       mbstate_t state;
22753       wchar_t wc;
22754       size_t ret;
22755
22756       memset (&state, '\0', sizeof (mbstate_t));
22757       wc = (wchar_t) 0xBADFACE;
22758       ret = mbrtowc (&wc, input, 5, &state);
22759       if (ret != 2)
22760         result |= 1;
22761       if (!mbsinit (&state))
22762         result |= 2;
22763
22764       memset (&state, '\0', sizeof (mbstate_t));
22765       ret = mbrtowc (NULL, input, 5, &state);
22766       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
22767         result |= 4;
22768       if (!mbsinit (&state))
22769         result |= 8;
22770     }
22771   return result;
22772 }
22773 _ACEOF
22774 if ac_fn_c_try_run "$LINENO"; then :
22775   gl_cv_func_mbrtowc_null_arg1=yes
22776 else
22777   gl_cv_func_mbrtowc_null_arg1=no
22778 fi
22779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22780   conftest.$ac_objext conftest.beam conftest.$ac_ext
22781 fi
22782
22783       fi
22784
22785 fi
22786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22787 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22788
22789
22790
22791
22792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22793 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22794 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22795   $as_echo_n "(cached) " >&6
22796 else
22797
22798                   case "$host_os" in
22799               # Guess no on OSF/1.
22800         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22801               # Guess yes otherwise.
22802         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22803       esac
22804       if test $LOCALE_FR_UTF8 != none; then
22805         if test "$cross_compiling" = yes; then :
22806   :
22807 else
22808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22809 /* end confdefs.h.  */
22810
22811 #include <locale.h>
22812 #include <string.h>
22813 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22814    <wchar.h>.
22815    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22816    included before <wchar.h>.  */
22817 #include <stddef.h>
22818 #include <stdio.h>
22819 #include <time.h>
22820 #include <wchar.h>
22821 int main ()
22822 {
22823   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22824     {
22825       mbstate_t state;
22826       wchar_t wc;
22827       int ret;
22828
22829       memset (&state, '\0', sizeof (mbstate_t));
22830       wc = (wchar_t) 0xBADFACE;
22831       mbrtowc (&wc, NULL, 5, &state);
22832       /* Check that wc was not modified.  */
22833       if (wc != (wchar_t) 0xBADFACE)
22834         return 1;
22835     }
22836   return 0;
22837 }
22838 _ACEOF
22839 if ac_fn_c_try_run "$LINENO"; then :
22840   gl_cv_func_mbrtowc_null_arg2=yes
22841 else
22842   gl_cv_func_mbrtowc_null_arg2=no
22843 fi
22844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22845   conftest.$ac_objext conftest.beam conftest.$ac_ext
22846 fi
22847
22848       fi
22849
22850 fi
22851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22852 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22853
22854
22855
22856
22857
22858
22859   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22860 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22861 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22862   $as_echo_n "(cached) " >&6
22863 else
22864
22865                   case "$host_os" in
22866                                    # Guess no on HP-UX, Solaris, native Windows.
22867         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22868                                    # Guess yes otherwise.
22869         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
22870       esac
22871       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22872          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22873         if test "$cross_compiling" = yes; then :
22874   :
22875 else
22876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22877 /* end confdefs.h.  */
22878
22879 #include <locale.h>
22880 #include <string.h>
22881 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22882    <wchar.h>.
22883    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22884    included before <wchar.h>.  */
22885 #include <stddef.h>
22886 #include <stdio.h>
22887 #include <time.h>
22888 #include <wchar.h>
22889 int main ()
22890 {
22891   int result = 0;
22892   int found_some_locale = 0;
22893   /* This fails on Solaris.  */
22894   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22895     {
22896       char input[] = "B\303\274\303\237er"; /* "Büßer" */
22897       mbstate_t state;
22898       wchar_t wc;
22899
22900       memset (&state, '\0', sizeof (mbstate_t));
22901       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22902         {
22903           input[1] = '\0';
22904           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22905             result |= 1;
22906         }
22907       found_some_locale = 1;
22908     }
22909   /* This fails on HP-UX 11.11.  */
22910   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22911     {
22912       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22913       mbstate_t state;
22914       wchar_t wc;
22915
22916       memset (&state, '\0', sizeof (mbstate_t));
22917       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22918         {
22919           input[1] = '\0';
22920           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22921             result |= 2;
22922         }
22923       found_some_locale = 1;
22924     }
22925   /* This fails on native Windows.  */
22926   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22927     {
22928       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22929       mbstate_t state;
22930       wchar_t wc;
22931
22932       memset (&state, '\0', sizeof (mbstate_t));
22933       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22934         {
22935           input[3] = '\0';
22936           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22937             result |= 4;
22938         }
22939       found_some_locale = 1;
22940     }
22941   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22942     {
22943       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22944       mbstate_t state;
22945       wchar_t wc;
22946
22947       memset (&state, '\0', sizeof (mbstate_t));
22948       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22949         {
22950           input[3] = '\0';
22951           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22952             result |= 8;
22953         }
22954       found_some_locale = 1;
22955     }
22956   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22957     {
22958       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22959       mbstate_t state;
22960       wchar_t wc;
22961
22962       memset (&state, '\0', sizeof (mbstate_t));
22963       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22964         {
22965           input[3] = '\0';
22966           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22967             result |= 16;
22968         }
22969       found_some_locale = 1;
22970     }
22971   return (found_some_locale ? result : 77);
22972 }
22973 _ACEOF
22974 if ac_fn_c_try_run "$LINENO"; then :
22975   gl_cv_func_mbrtowc_retval=yes
22976 else
22977   if test $? != 77; then
22978              gl_cv_func_mbrtowc_retval=no
22979            fi
22980
22981 fi
22982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22983   conftest.$ac_objext conftest.beam conftest.$ac_ext
22984 fi
22985
22986       fi
22987
22988 fi
22989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22990 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
22991
22992
22993
22994
22995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22996 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22997 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22998   $as_echo_n "(cached) " >&6
22999 else
23000
23001                   case "$host_os" in
23002                        # Guess no on Solaris 8 and 9.
23003         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23004                        # Guess yes otherwise.
23005         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23006       esac
23007       if test $LOCALE_ZH_CN != none; then
23008         if test "$cross_compiling" = yes; then :
23009   :
23010 else
23011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012 /* end confdefs.h.  */
23013
23014 #include <locale.h>
23015 #include <string.h>
23016 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23017    <wchar.h>.
23018    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23019    included before <wchar.h>.  */
23020 #include <stddef.h>
23021 #include <stdio.h>
23022 #include <time.h>
23023 #include <wchar.h>
23024 int main ()
23025 {
23026   /* This fails on Solaris 8 and 9.  */
23027   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23028     {
23029       mbstate_t state;
23030       wchar_t wc;
23031
23032       memset (&state, '\0', sizeof (mbstate_t));
23033       if (mbrtowc (&wc, "", 1, &state) != 0)
23034         return 1;
23035     }
23036   return 0;
23037 }
23038 _ACEOF
23039 if ac_fn_c_try_run "$LINENO"; then :
23040   gl_cv_func_mbrtowc_nul_retval=yes
23041 else
23042   gl_cv_func_mbrtowc_nul_retval=no
23043 fi
23044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23045   conftest.$ac_objext conftest.beam conftest.$ac_ext
23046 fi
23047
23048       fi
23049
23050 fi
23051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23052 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23053
23054       case "$gl_cv_func_mbrtowc_null_arg1" in
23055         *yes) ;;
23056         *)
23057 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23058
23059            REPLACE_MBRTOWC=1
23060            ;;
23061       esac
23062       case "$gl_cv_func_mbrtowc_null_arg2" in
23063         *yes) ;;
23064         *)
23065 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23066
23067            REPLACE_MBRTOWC=1
23068            ;;
23069       esac
23070       case "$gl_cv_func_mbrtowc_retval" in
23071         *yes) ;;
23072         *)
23073 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23074
23075            REPLACE_MBRTOWC=1
23076            ;;
23077       esac
23078       case "$gl_cv_func_mbrtowc_nul_retval" in
23079         *yes) ;;
23080         *)
23081 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23082
23083            REPLACE_MBRTOWC=1
23084            ;;
23085       esac
23086     fi
23087   fi
23088
23089 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23090
23091
23092
23093
23094
23095
23096
23097
23098   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23099
23100
23101   :
23102
23103 fi
23104
23105
23106
23107
23108
23109           GNULIB_MBRTOWC=1
23110
23111
23112
23113
23114
23115 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23131
23132
23133
23134      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23135 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23136 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23137   $as_echo_n "(cached) " >&6
23138 else
23139
23140                   case "$host_os" in
23141                      # Guess no on AIX and OSF/1.
23142         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23143                      # Guess yes otherwise.
23144         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23145       esac
23146       if test $LOCALE_JA != none; then
23147         if test "$cross_compiling" = yes; then :
23148   :
23149 else
23150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23151 /* end confdefs.h.  */
23152
23153 #include <locale.h>
23154 #include <string.h>
23155 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23156    <wchar.h>.
23157    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23158    included before <wchar.h>.  */
23159 #include <stddef.h>
23160 #include <stdio.h>
23161 #include <time.h>
23162 #include <wchar.h>
23163 int main ()
23164 {
23165   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23166     {
23167       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23168       mbstate_t state;
23169       wchar_t wc;
23170
23171       memset (&state, '\0', sizeof (mbstate_t));
23172       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23173         if (mbsinit (&state))
23174           return 1;
23175     }
23176   return 0;
23177 }
23178 _ACEOF
23179 if ac_fn_c_try_run "$LINENO"; then :
23180   gl_cv_func_mbrtowc_incomplete_state=yes
23181 else
23182   gl_cv_func_mbrtowc_incomplete_state=no
23183 fi
23184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23185   conftest.$ac_objext conftest.beam conftest.$ac_ext
23186 fi
23187
23188       fi
23189
23190 fi
23191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23192 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23193
23194
23195
23196
23197      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23198 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23199 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23200   $as_echo_n "(cached) " >&6
23201 else
23202
23203                   case "$host_os" in
23204                     # Guess no on Solaris 8.
23205         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23206                     # Guess yes otherwise.
23207         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23208       esac
23209       if test $LOCALE_ZH_CN != none; then
23210         if test "$cross_compiling" = yes; then :
23211   :
23212 else
23213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23214 /* end confdefs.h.  */
23215
23216 #include <locale.h>
23217 #include <stdlib.h>
23218 #include <string.h>
23219 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23220    <wchar.h>.
23221    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23222    included before <wchar.h>.  */
23223 #include <stddef.h>
23224 #include <stdio.h>
23225 #include <time.h>
23226 #include <wchar.h>
23227 int main ()
23228 {
23229   /* This fails on Solaris 8:
23230      mbrtowc returns 2, and sets wc to 0x00F0.
23231      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
23232   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23233     {
23234       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23235       mbstate_t state;
23236       wchar_t wc;
23237
23238       memset (&state, '\0', sizeof (mbstate_t));
23239       if (mbrtowc (&wc, input + 3, 6, &state) != 4
23240           && mbtowc (&wc, input + 3, 6) == 4)
23241         return 1;
23242     }
23243   return 0;
23244 }
23245 _ACEOF
23246 if ac_fn_c_try_run "$LINENO"; then :
23247   gl_cv_func_mbrtowc_sanitycheck=yes
23248 else
23249   gl_cv_func_mbrtowc_sanitycheck=no
23250 fi
23251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23252   conftest.$ac_objext conftest.beam conftest.$ac_ext
23253 fi
23254
23255       fi
23256
23257 fi
23258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23259 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23260
23261     REPLACE_MBSTATE_T=0
23262     case "$gl_cv_func_mbrtowc_incomplete_state" in
23263       *yes) ;;
23264       *) REPLACE_MBSTATE_T=1 ;;
23265     esac
23266     case "$gl_cv_func_mbrtowc_sanitycheck" in
23267       *yes) ;;
23268       *) REPLACE_MBSTATE_T=1 ;;
23269     esac
23270   else
23271     REPLACE_MBSTATE_T=1
23272   fi
23273
23274
23275
23276   if test $ac_cv_func_mbsinit = no; then
23277     HAVE_MBSINIT=0
23278     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
23279 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23280    <wchar.h>.
23281    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23282    included before <wchar.h>.  */
23283 #include <stddef.h>
23284 #include <stdio.h>
23285 #include <time.h>
23286 #include <wchar.h>
23287
23288 "
23289 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
23290   ac_have_decl=1
23291 else
23292   ac_have_decl=0
23293 fi
23294
23295 cat >>confdefs.h <<_ACEOF
23296 #define HAVE_DECL_MBSINIT $ac_have_decl
23297 _ACEOF
23298
23299     if test $ac_cv_have_decl_mbsinit = yes; then
23300                         REPLACE_MBSINIT=1
23301     fi
23302   else
23303     if test $REPLACE_MBSTATE_T = 1; then
23304       REPLACE_MBSINIT=1
23305     else
23306                         case "$host_os" in
23307         mingw*) REPLACE_MBSINIT=1 ;;
23308       esac
23309     fi
23310   fi
23311
23312 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
23313
23314
23315
23316
23317
23318
23319
23320
23321   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
23322
23323
23324   :
23325
23326 fi
23327
23328
23329
23330
23331
23332           GNULIB_MBSINIT=1
23333
23334
23335
23336
23337
23338 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
23339
23340
23341
23342
23343 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23344
23345
23346
23347
23348
23349
23350
23351
23352   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23353
23354
23355   for ac_header in bp-sym.h
23356 do :
23357   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23358 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23359   cat >>confdefs.h <<_ACEOF
23360 #define HAVE_BP_SYM_H 1
23361 _ACEOF
23362
23363 fi
23364
23365 done
23366
23367
23368 fi
23369
23370
23371
23372
23373
23374           GNULIB_MEMCHR=1
23375
23376
23377
23378
23379
23380 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390   for ac_func in mempcpy
23391 do :
23392   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23393 if test "x$ac_cv_func_mempcpy" = xyes; then :
23394   cat >>confdefs.h <<_ACEOF
23395 #define HAVE_MEMPCPY 1
23396 _ACEOF
23397
23398 fi
23399 done
23400
23401   if test $ac_cv_func_mempcpy = no; then
23402     HAVE_MEMPCPY=0
23403   fi
23404
23405 if test $HAVE_MEMPCPY = 0; then
23406
23407
23408
23409
23410
23411
23412
23413
23414   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23415
23416
23417   :
23418
23419 fi
23420
23421
23422
23423
23424
23425           GNULIB_MEMPCPY=1
23426
23427
23428
23429
23430
23431 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23432
23433
23434
23435
23436
23437
23438
23439
23440   if test $ac_cv_have_decl_memrchr = no; then
23441     HAVE_DECL_MEMRCHR=0
23442   fi
23443
23444   for ac_func in memrchr
23445 do :
23446   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23447 if test "x$ac_cv_func_memrchr" = xyes; then :
23448   cat >>confdefs.h <<_ACEOF
23449 #define HAVE_MEMRCHR 1
23450 _ACEOF
23451
23452 fi
23453 done
23454
23455
23456 if test $ac_cv_func_memrchr = no; then
23457
23458
23459
23460
23461
23462
23463
23464
23465   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23466
23467   :
23468 fi
23469
23470
23471
23472
23473
23474           GNULIB_MEMRCHR=1
23475
23476
23477
23478
23479
23480 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23481
23482
23483
23484
23485
23486   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
23487     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
23488
23489 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
23490
23491   else
23492     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
23493   fi
23494
23495
23496 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23497
23498
23499
23500
23501
23502
23503
23504
23505   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23506
23507 fi
23508
23509
23510
23511 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23512
23513
23514
23515
23516
23517
23518
23519
23520   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23521
23522 fi
23523
23524
23525
23526   case "$host_os" in
23527     mingw* | pw*)
23528       REPLACE_OPEN=1
23529       ;;
23530     *)
23531
23532       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23533 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
23534 if ${gl_cv_func_open_slash+:} false; then :
23535   $as_echo_n "(cached) " >&6
23536 else
23537   # Assume that if we have lstat, we can also check symlinks.
23538           if test $ac_cv_func_lstat = yes; then
23539             touch conftest.tmp
23540             ln -s conftest.tmp conftest.lnk
23541           fi
23542           if test "$cross_compiling" = yes; then :
23543
23544              case "$host_os" in
23545                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23546                  gl_cv_func_open_slash="guessing no" ;;
23547                *)
23548                  gl_cv_func_open_slash="guessing yes" ;;
23549              esac
23550
23551 else
23552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23553 /* end confdefs.h.  */
23554
23555 #include <fcntl.h>
23556 #if HAVE_UNISTD_H
23557 # include <unistd.h>
23558 #endif
23559 int main ()
23560 {
23561   int result = 0;
23562 #if HAVE_LSTAT
23563   if (open ("conftest.lnk/", O_RDONLY) != -1)
23564     result |= 1;
23565 #endif
23566   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23567     result |= 2;
23568   return result;
23569 }
23570 _ACEOF
23571 if ac_fn_c_try_run "$LINENO"; then :
23572   gl_cv_func_open_slash=yes
23573 else
23574   gl_cv_func_open_slash=no
23575 fi
23576 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23577   conftest.$ac_objext conftest.beam conftest.$ac_ext
23578 fi
23579
23580           rm -f conftest.sl conftest.tmp conftest.lnk
23581
23582 fi
23583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23584 $as_echo "$gl_cv_func_open_slash" >&6; }
23585       case "$gl_cv_func_open_slash" in
23586         *no)
23587
23588 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23589
23590           REPLACE_OPEN=1
23591           ;;
23592       esac
23593       ;;
23594   esac
23595
23596     if test $REPLACE_OPEN = 0; then
23597
23598
23599
23600   if test $ac_cv_func_fchdir = no; then
23601     HAVE_FCHDIR=0
23602   fi
23603
23604       if test $HAVE_FCHDIR = 0; then
23605         REPLACE_OPEN=1
23606       fi
23607     fi
23608
23609
23610
23611 if test $REPLACE_OPEN = 1; then
23612
23613
23614
23615
23616
23617
23618
23619
23620   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
23621
23622
23623
23624
23625   :
23626
23627 fi
23628
23629
23630
23631
23632
23633           GNULIB_OPEN=1
23634
23635
23636
23637
23638
23639 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
23640
23641
23642
23643
23644
23645
23646
23647
23648   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
23649   yes+*yes)
23650     ;;
23651   yes+*)
23652     # Solaris 9 has *at functions, but uniformly mishandles trailing
23653     # slash in all of them.
23654     REPLACE_OPENAT=1
23655     ;;
23656   *)
23657     HAVE_OPENAT=0
23658     ;;
23659   esac
23660
23661 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
23662
23663
23664
23665
23666
23667
23668
23669
23670   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23671
23672
23673
23674
23675   :
23676
23677 fi
23678
23679
23680 cat >>confdefs.h <<_ACEOF
23681 #define GNULIB_OPENAT 1
23682 _ACEOF
23683
23684
23685
23686
23687
23688
23689           GNULIB_OPENAT=1
23690
23691
23692
23693
23694
23695 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
23696
23697
23698
23699
23700
23701
23702   for ac_func in opendir
23703 do :
23704   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
23705 if test "x$ac_cv_func_opendir" = xyes; then :
23706   cat >>confdefs.h <<_ACEOF
23707 #define HAVE_OPENDIR 1
23708 _ACEOF
23709
23710 fi
23711 done
23712
23713   if test $ac_cv_func_opendir = no; then
23714     HAVE_OPENDIR=0
23715   fi
23716
23717
23718
23719
23720   if test $ac_cv_func_fchdir = no; then
23721     HAVE_FCHDIR=0
23722   fi
23723
23724     if test $HAVE_FCHDIR = 0; then
23725       if test $HAVE_OPENDIR = 1; then
23726         REPLACE_OPENDIR=1
23727       fi
23728     fi
23729
23730
23731 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
23732
23733
23734
23735
23736
23737
23738
23739
23740   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
23741
23742 fi
23743
23744
23745
23746
23747
23748           GNULIB_OPENDIR=1
23749
23750
23751
23752
23753
23754 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766           if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
23767             REPLACE_PERROR=1
23768   fi
23769   case ${gl_cv_func_strerror_r_works-unset} in
23770     unset|*yes)
23771       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
23772 $as_echo_n "checking whether perror matches strerror... " >&6; }
23773 if ${gl_cv_func_perror_works+:} false; then :
23774   $as_echo_n "(cached) " >&6
23775 else
23776   if test "$cross_compiling" = yes; then :
23777               gl_cv_func_perror_works="guessing no"
23778
23779 else
23780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23781 /* end confdefs.h.  */
23782 #include <errno.h>
23783                 #include <stdio.h>
23784                 #include <stdlib.h>
23785                 #include <string.h>
23786
23787 int
23788 main ()
23789 {
23790 char *str = strerror (-1);
23791                 if (!getenv("CONFTEST_OUTPUT")) return 0;
23792                 if (!str) str = "";
23793                 puts (str);
23794                 errno = -1;
23795                 perror ("");
23796                 return 0;
23797
23798   ;
23799   return 0;
23800 }
23801 _ACEOF
23802 if ac_fn_c_try_run "$LINENO"; then :
23803   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
23804                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
23805               gl_cv_func_perror_works=yes
23806             else
23807               gl_cv_func_perror_works=no
23808             fi
23809             rm -rf conftest.txt1 conftest.txt2
23810 else
23811   gl_cv_func_perror_works=no
23812 fi
23813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23814   conftest.$ac_objext conftest.beam conftest.$ac_ext
23815 fi
23816
23817
23818 fi
23819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
23820 $as_echo "$gl_cv_func_perror_works" >&6; }
23821       if test "$gl_cv_func_perror_works" != yes; then
23822         REPLACE_PERROR=1
23823       fi
23824       ;;
23825     *)
23826                   REPLACE_PERROR=1
23827       ;;
23828   esac
23829
23830 if test $REPLACE_PERROR = 1; then
23831
23832
23833
23834
23835
23836
23837
23838
23839   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
23840
23841 fi
23842
23843
23844
23845
23846
23847           GNULIB_PERROR=1
23848
23849
23850
23851
23852
23853 $as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
23854
23855
23856
23857
23858
23859   if test $gl_cv_func_frexp_no_libm = yes; then
23860
23861
23862
23863   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23864 $as_echo_n "checking whether frexp works... " >&6; }
23865 if ${gl_cv_func_frexp_works+:} false; then :
23866   $as_echo_n "(cached) " >&6
23867 else
23868
23869       if test "$cross_compiling" = yes; then :
23870   case "$host_os" in
23871            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
23872            *)                        gl_cv_func_frexp_works="guessing yes";;
23873          esac
23874
23875 else
23876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23877 /* end confdefs.h.  */
23878
23879 #include <float.h>
23880 #include <math.h>
23881 #include <string.h>
23882 #if HAVE_ALARM
23883 # include <unistd.h>
23884 #endif
23885 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23886    ICC 10.0 has a bug when optimizing the expression -zero.
23887    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23888    to PowerPC on MacOS X 10.5.  */
23889 #if defined __hpux || defined __sgi || defined __ICC
23890 static double
23891 compute_minus_zero (void)
23892 {
23893   return -DBL_MIN * DBL_MIN;
23894 }
23895 # define minus_zero compute_minus_zero ()
23896 #else
23897 double minus_zero = -0.0;
23898 #endif
23899 int main()
23900 {
23901   int result = 0;
23902   int i;
23903   volatile double x;
23904   double zero = 0.0;
23905 #if HAVE_ALARM
23906   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23907      number.  Let the test fail in this case.  */
23908   alarm (5);
23909 #endif
23910   /* Test on denormalized numbers.  */
23911   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
23912     ;
23913   if (x > 0.0)
23914     {
23915       int exp;
23916       double y = frexp (x, &exp);
23917       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
23918          On NetBSD: y = 0.75. Correct: y = 0.5.  */
23919       if (y != 0.5)
23920         result |= 1;
23921     }
23922   /* Test on infinite numbers.  */
23923   x = 1.0 / zero;
23924   {
23925     int exp;
23926     double y = frexp (x, &exp);
23927     if (y != x)
23928       result |= 2;
23929   }
23930   /* Test on negative zero.  */
23931   x = minus_zero;
23932   {
23933     int exp;
23934     double y = frexp (x, &exp);
23935     if (memcmp (&y, &x, sizeof x))
23936       result |= 4;
23937   }
23938   return result;
23939 }
23940 _ACEOF
23941 if ac_fn_c_try_run "$LINENO"; then :
23942   gl_cv_func_frexp_works=yes
23943 else
23944   gl_cv_func_frexp_works=no
23945 fi
23946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23947   conftest.$ac_objext conftest.beam conftest.$ac_ext
23948 fi
23949
23950
23951 fi
23952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23953 $as_echo "$gl_cv_func_frexp_works" >&6; }
23954
23955     case "$gl_cv_func_frexp_works" in
23956       *yes)
23957
23958 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23959
23960         ;;
23961     esac
23962   fi
23963
23964   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23965 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
23966 if ${gl_cv_func_ldexp_no_libm+:} false; then :
23967   $as_echo_n "(cached) " >&6
23968 else
23969
23970       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23971 /* end confdefs.h.  */
23972 #include <math.h>
23973              double x;
23974              int y;
23975 int
23976 main ()
23977 {
23978 return ldexp (x, y) < 1;
23979   ;
23980   return 0;
23981 }
23982 _ACEOF
23983 if ac_fn_c_try_link "$LINENO"; then :
23984   gl_cv_func_ldexp_no_libm=yes
23985 else
23986   gl_cv_func_ldexp_no_libm=no
23987 fi
23988 rm -f core conftest.err conftest.$ac_objext \
23989     conftest$ac_exeext conftest.$ac_ext
23990
23991 fi
23992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23993 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
23994   if test $gl_cv_func_ldexp_no_libm = yes; then
23995
23996 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
23997
23998   fi
23999
24000
24001
24002
24003
24004
24005   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
24006 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
24007 if ${gl_cv_func_frexpl_no_libm+:} false; then :
24008   $as_echo_n "(cached) " >&6
24009 else
24010
24011       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24012 /* end confdefs.h.  */
24013 #include <math.h>
24014              long double x;
24015 int
24016 main ()
24017 {
24018 int e; return frexpl (x, &e) > 0;
24019   ;
24020   return 0;
24021 }
24022 _ACEOF
24023 if ac_fn_c_try_link "$LINENO"; then :
24024   gl_cv_func_frexpl_no_libm=yes
24025 else
24026   gl_cv_func_frexpl_no_libm=no
24027 fi
24028 rm -f core conftest.err conftest.$ac_objext \
24029     conftest$ac_exeext conftest.$ac_ext
24030
24031 fi
24032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
24033 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
24034
24035   if test $gl_cv_func_frexpl_no_libm = yes; then
24036
24037
24038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
24039 $as_echo_n "checking whether frexpl works... " >&6; }
24040 if ${gl_cv_func_frexpl_works+:} false; then :
24041   $as_echo_n "(cached) " >&6
24042 else
24043
24044       if test "$cross_compiling" = yes; then :
24045
24046          case "$host_os" in
24047            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
24048               gl_cv_func_frexpl_works="guessing no";;
24049            *) gl_cv_func_frexpl_works="guessing yes";;
24050          esac
24051
24052 else
24053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24054 /* end confdefs.h.  */
24055
24056 #include <float.h>
24057 #include <math.h>
24058 /* Override the values of <float.h>, like done in float.in.h.  */
24059 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
24060 # undef LDBL_MIN_EXP
24061 # define LDBL_MIN_EXP    (-16381)
24062 #endif
24063 #if defined __i386__ && defined __FreeBSD__
24064 # undef LDBL_MIN_EXP
24065 # define LDBL_MIN_EXP    (-16381)
24066 #endif
24067 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
24068 # undef LDBL_MIN_EXP
24069 # define LDBL_MIN_EXP DBL_MIN_EXP
24070 #endif
24071 #if defined __sgi && (LDBL_MANT_DIG >= 106)
24072 # if defined __GNUC__
24073 #  undef LDBL_MIN_EXP
24074 #  define LDBL_MIN_EXP DBL_MIN_EXP
24075 # endif
24076 #endif
24077 extern
24078 #ifdef __cplusplus
24079 "C"
24080 #endif
24081 long double frexpl (long double, int *);
24082 int main()
24083 {
24084   int result = 0;
24085   volatile long double x;
24086   /* Test on finite numbers that fails on AIX 5.1.  */
24087   x = 16.0L;
24088   {
24089     int exp = -9999;
24090     frexpl (x, &exp);
24091     if (exp != 5)
24092       result |= 1;
24093   }
24094   /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
24095      function returns an invalid (incorrectly normalized) value: it returns
24096                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
24097      but the correct result is
24098           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
24099   x = 1.01L;
24100   {
24101     int exp = -9999;
24102     long double y = frexpl (x, &exp);
24103     if (!(exp == 1 && y == 0.505L))
24104       result |= 2;
24105   }
24106   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
24107      LDBL_MAX_EXP = 16384.
24108      In the loop end test, we test x against Infinity, rather than comparing
24109      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
24110   {
24111     int i;
24112     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
24113       {
24114         int exp = -9999;
24115         frexpl (x, &exp);
24116         if (exp != i)
24117           {
24118             result |= 4;
24119             break;
24120           }
24121       }
24122   }
24123   /* Test on denormalized numbers.  */
24124   {
24125     int i;
24126     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
24127       ;
24128     if (x > 0.0L)
24129       {
24130         int exp;
24131         long double y = frexpl (x, &exp);
24132         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
24133            exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
24134         if (exp != LDBL_MIN_EXP - 1)
24135           result |= 8;
24136       }
24137   }
24138   /* Test on infinite numbers.  */
24139   x = 1.0L / 0.0L;
24140   {
24141     int exp;
24142     long double y = frexpl (x, &exp);
24143     if (y != x)
24144       result |= 16;
24145   }
24146   return result;
24147 }
24148 _ACEOF
24149 if ac_fn_c_try_run "$LINENO"; then :
24150   gl_cv_func_frexpl_works=yes
24151 else
24152   gl_cv_func_frexpl_works=no
24153 fi
24154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24155   conftest.$ac_objext conftest.beam conftest.$ac_ext
24156 fi
24157
24158
24159 fi
24160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
24161 $as_echo "$gl_cv_func_frexpl_works" >&6; }
24162
24163     case "$gl_cv_func_frexpl_works" in
24164       *yes) gl_func_frexpl_no_libm=yes ;;
24165       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
24166     esac
24167   else
24168     gl_func_frexpl_no_libm=no
24169         REPLACE_FREXPL=1
24170   fi
24171   if test $gl_func_frexpl_no_libm = yes; then
24172
24173 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
24174
24175             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
24176 "
24177 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
24178
24179 else
24180   HAVE_DECL_FREXPL=0
24181 fi
24182
24183   fi
24184
24185
24186   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
24187 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
24188 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
24189   $as_echo_n "(cached) " >&6
24190 else
24191
24192       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24193 /* end confdefs.h.  */
24194 #include <math.h>
24195              long double x;
24196 int
24197 main ()
24198 {
24199 return ldexpl (x, -1) > 0;
24200   ;
24201   return 0;
24202 }
24203 _ACEOF
24204 if ac_fn_c_try_link "$LINENO"; then :
24205   gl_cv_func_ldexpl_no_libm=yes
24206 else
24207   gl_cv_func_ldexpl_no_libm=no
24208 fi
24209 rm -f core conftest.err conftest.$ac_objext \
24210     conftest$ac_exeext conftest.$ac_ext
24211
24212 fi
24213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
24214 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
24215
24216   if test $gl_cv_func_ldexpl_no_libm = yes; then
24217
24218
24219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
24220 $as_echo_n "checking whether ldexpl works... " >&6; }
24221 if ${gl_cv_func_ldexpl_works+:} false; then :
24222   $as_echo_n "(cached) " >&6
24223 else
24224
24225       if test "$cross_compiling" = yes; then :
24226
24227          case "$host_os" in
24228            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
24229            *)               gl_cv_func_ldexpl_works="guessing yes";;
24230          esac
24231
24232 else
24233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24234 /* end confdefs.h.  */
24235
24236 #include <math.h>
24237 extern
24238 #ifdef __cplusplus
24239 "C"
24240 #endif
24241 long double ldexpl (long double, int);
24242 int main()
24243 {
24244   int result = 0;
24245   {
24246     volatile long double x = 1.0;
24247     volatile long double y = ldexpl (x, -1);
24248     if (y != 0.5L)
24249       result |= 1;
24250   }
24251   {
24252     volatile long double x = 1.73205L;
24253     volatile long double y = ldexpl (x, 0);
24254     if (y != x)
24255       result |= 2;
24256   }
24257   return result;
24258 }
24259 _ACEOF
24260 if ac_fn_c_try_run "$LINENO"; then :
24261   gl_cv_func_ldexpl_works=yes
24262 else
24263   gl_cv_func_ldexpl_works=no
24264 fi
24265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24266   conftest.$ac_objext conftest.beam conftest.$ac_ext
24267 fi
24268
24269
24270 fi
24271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
24272 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
24273
24274     case "$gl_cv_func_ldexpl_works" in
24275       *yes)
24276
24277 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
24278
24279                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
24280 "
24281 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
24282
24283 else
24284   HAVE_DECL_LDEXPL=0
24285 fi
24286
24287         ;;
24288     esac
24289   fi
24290
24291
24292
24293   if test $gl_cv_func_vfprintf_posix = no; then
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305   gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
24306
24307   REPLACE_PRINTF=1
24308
24309 $as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
24310
24311   :
24312
24313   fi
24314
24315
24316
24317
24318
24319
24320           GNULIB_PRINTF_POSIX=1
24321
24322
24323
24324
24325
24326 $as_echo "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
24327
24328
24329
24330
24331
24332   :
24333
24334
24335
24336
24337   for ac_func in readdir
24338 do :
24339   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24340 if test "x$ac_cv_func_readdir" = xyes; then :
24341   cat >>confdefs.h <<_ACEOF
24342 #define HAVE_READDIR 1
24343 _ACEOF
24344
24345 fi
24346 done
24347
24348   if test $ac_cv_func_readdir = no; then
24349     HAVE_READDIR=0
24350   fi
24351
24352 if test $HAVE_READDIR = 0; then
24353
24354
24355
24356
24357
24358
24359
24360
24361   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24362
24363 fi
24364
24365
24366
24367
24368
24369           GNULIB_READDIR=1
24370
24371
24372
24373
24374
24375 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24376
24377
24378
24379
24380
24381
24382       for ac_header in stdlib.h
24383 do :
24384   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24385 if test "x$ac_cv_header_stdlib_h" = xyes; then :
24386   cat >>confdefs.h <<_ACEOF
24387 #define HAVE_STDLIB_H 1
24388 _ACEOF
24389
24390 fi
24391
24392 done
24393
24394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
24395 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
24396 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
24397   $as_echo_n "(cached) " >&6
24398 else
24399   if test "$cross_compiling" = yes; then :
24400   case "$host_os" in
24401           # Guess yes on platforms where we know the result.
24402           *-gnu* | freebsd* | netbsd* | openbsd* \
24403           | hpux* | solaris* | cygwin* | mingw*)
24404             ac_cv_func_realloc_0_nonnull=yes ;;
24405           # If we don't know, assume the worst.
24406           *) ac_cv_func_realloc_0_nonnull=no ;;
24407         esac
24408
24409 else
24410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24411 /* end confdefs.h.  */
24412 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24413             # include <stdlib.h>
24414             #else
24415             char *realloc ();
24416             #endif
24417
24418 int
24419 main ()
24420 {
24421 return ! realloc (0, 0);
24422   ;
24423   return 0;
24424 }
24425
24426 _ACEOF
24427 if ac_fn_c_try_run "$LINENO"; then :
24428   ac_cv_func_realloc_0_nonnull=yes
24429 else
24430   ac_cv_func_realloc_0_nonnull=no
24431 fi
24432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24433   conftest.$ac_objext conftest.beam conftest.$ac_ext
24434 fi
24435
24436
24437 fi
24438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
24439 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
24440   if test $ac_cv_func_realloc_0_nonnull = yes; then :
24441
24442 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
24443
24444 else
24445   $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
24446
24447      REPLACE_REALLOC=1
24448
24449 fi
24450
24451
24452 if test $REPLACE_REALLOC = 1; then
24453
24454
24455
24456
24457
24458
24459
24460
24461   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24462
24463 fi
24464
24465
24466 cat >>confdefs.h <<_ACEOF
24467 #define GNULIB_REALLOC_GNU 1
24468 _ACEOF
24469
24470
24471
24472
24473
24474   if test $gl_cv_func_malloc_posix = yes; then
24475
24476 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24477
24478   else
24479     REPLACE_REALLOC=1
24480   fi
24481
24482 if test $REPLACE_REALLOC = 1; then
24483
24484
24485
24486
24487
24488
24489
24490
24491   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24492
24493 fi
24494
24495
24496
24497
24498
24499           GNULIB_REALLOC_POSIX=1
24500
24501
24502
24503
24504
24505 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24506
24507
24508
24509
24510
24511
24512
24513   :
24514
24515
24516
24517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24518 $as_echo_n "checking for signbit macro... " >&6; }
24519 if ${gl_cv_func_signbit+:} false; then :
24520   $as_echo_n "(cached) " >&6
24521 else
24522
24523       if test "$cross_compiling" = yes; then :
24524   case "$host_os" in
24525                    # Guess yes on glibc systems.
24526            *-gnu*) gl_cv_func_signbit="guessing yes" ;;
24527                    # If we don't know, assume the worst.
24528            *)      gl_cv_func_signbit="guessing no" ;;
24529          esac
24530
24531 else
24532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24533 /* end confdefs.h.  */
24534
24535 #include <math.h>
24536 /* If signbit is defined as a function, don't use it, since calling it for
24537    'float' or 'long double' arguments would involve conversions.
24538    If signbit is not declared at all but exists as a library function, don't
24539    use it, since the prototype may not match.
24540    If signbit is not declared at all but exists as a compiler built-in, don't
24541    use it, since it's preferable to use __builtin_signbit* (no warnings,
24542    no conversions).  */
24543 #ifndef signbit
24544 # error "signbit should be a macro"
24545 #endif
24546 #include <string.h>
24547
24548 /* Global variables.
24549    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24550    but cannot constant-fold            __builtin_signbitl (variable).  */
24551 float vf;
24552 double vd;
24553 long double vl;
24554 int main ()
24555 {
24556 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24557    So we use -p0f and -p0d instead.  */
24558 float p0f = 0.0f;
24559 float m0f = -p0f;
24560 double p0d = 0.0;
24561 double m0d = -p0d;
24562 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24563    So we use another constant expression instead.
24564    But that expression does not work on other platforms, such as when
24565    cross-compiling to PowerPC on MacOS X 10.5.  */
24566 long double p0l = 0.0L;
24567 #if defined __hpux || defined __sgi
24568 long double m0l = -LDBL_MIN * LDBL_MIN;
24569 #else
24570 long double m0l = -p0l;
24571 #endif
24572   int result = 0;
24573   if (signbit (vf)) /* link check */
24574     vf++;
24575   {
24576     float plus_inf = 1.0f / p0f;
24577     float minus_inf = -1.0f / p0f;
24578     if (!(!signbit (255.0f)
24579           && signbit (-255.0f)
24580           && !signbit (p0f)
24581           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24582           && !signbit (plus_inf)
24583           && signbit (minus_inf)))
24584       result |= 1;
24585   }
24586   if (signbit (vd)) /* link check */
24587     vd++;
24588   {
24589     double plus_inf = 1.0 / p0d;
24590     double minus_inf = -1.0 / p0d;
24591     if (!(!signbit (255.0)
24592           && signbit (-255.0)
24593           && !signbit (p0d)
24594           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24595           && !signbit (plus_inf)
24596           && signbit (minus_inf)))
24597       result |= 2;
24598   }
24599   if (signbit (vl)) /* link check */
24600     vl++;
24601   {
24602     long double plus_inf = 1.0L / p0l;
24603     long double minus_inf = -1.0L / p0l;
24604     if (signbit (255.0L))
24605       result |= 4;
24606     if (!signbit (-255.0L))
24607       result |= 4;
24608     if (signbit (p0l))
24609       result |= 8;
24610     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24611       result |= 16;
24612     if (signbit (plus_inf))
24613       result |= 32;
24614     if (!signbit (minus_inf))
24615       result |= 64;
24616   }
24617   return result;
24618 }
24619
24620
24621 _ACEOF
24622 if ac_fn_c_try_run "$LINENO"; then :
24623   gl_cv_func_signbit=yes
24624 else
24625   gl_cv_func_signbit=no
24626 fi
24627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24628   conftest.$ac_objext conftest.beam conftest.$ac_ext
24629 fi
24630
24631
24632 fi
24633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24634 $as_echo "$gl_cv_func_signbit" >&6; }
24635           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24636 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
24637 if ${gl_cv_func_signbit_gcc+:} false; then :
24638   $as_echo_n "(cached) " >&6
24639 else
24640
24641       if test "$cross_compiling" = yes; then :
24642   case "$host_os" in
24643                    # Guess yes on glibc systems.
24644            *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
24645                    # If we don't know, assume the worst.
24646            *)      gl_cv_func_signbit_gcc="guessing no" ;;
24647          esac
24648
24649 else
24650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24651 /* end confdefs.h.  */
24652
24653 #if __GNUC__ >= 4
24654 # define signbit(x) \
24655    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
24656     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
24657     __builtin_signbitf (x))
24658 #else
24659 # error "signbit should be three compiler built-ins"
24660 #endif
24661 #include <string.h>
24662
24663 /* Global variables.
24664    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24665    but cannot constant-fold            __builtin_signbitl (variable).  */
24666 float vf;
24667 double vd;
24668 long double vl;
24669 int main ()
24670 {
24671 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24672    So we use -p0f and -p0d instead.  */
24673 float p0f = 0.0f;
24674 float m0f = -p0f;
24675 double p0d = 0.0;
24676 double m0d = -p0d;
24677 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24678    So we use another constant expression instead.
24679    But that expression does not work on other platforms, such as when
24680    cross-compiling to PowerPC on MacOS X 10.5.  */
24681 long double p0l = 0.0L;
24682 #if defined __hpux || defined __sgi
24683 long double m0l = -LDBL_MIN * LDBL_MIN;
24684 #else
24685 long double m0l = -p0l;
24686 #endif
24687   int result = 0;
24688   if (signbit (vf)) /* link check */
24689     vf++;
24690   {
24691     float plus_inf = 1.0f / p0f;
24692     float minus_inf = -1.0f / p0f;
24693     if (!(!signbit (255.0f)
24694           && signbit (-255.0f)
24695           && !signbit (p0f)
24696           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24697           && !signbit (plus_inf)
24698           && signbit (minus_inf)))
24699       result |= 1;
24700   }
24701   if (signbit (vd)) /* link check */
24702     vd++;
24703   {
24704     double plus_inf = 1.0 / p0d;
24705     double minus_inf = -1.0 / p0d;
24706     if (!(!signbit (255.0)
24707           && signbit (-255.0)
24708           && !signbit (p0d)
24709           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24710           && !signbit (plus_inf)
24711           && signbit (minus_inf)))
24712       result |= 2;
24713   }
24714   if (signbit (vl)) /* link check */
24715     vl++;
24716   {
24717     long double plus_inf = 1.0L / p0l;
24718     long double minus_inf = -1.0L / p0l;
24719     if (signbit (255.0L))
24720       result |= 4;
24721     if (!signbit (-255.0L))
24722       result |= 4;
24723     if (signbit (p0l))
24724       result |= 8;
24725     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24726       result |= 16;
24727     if (signbit (plus_inf))
24728       result |= 32;
24729     if (!signbit (minus_inf))
24730       result |= 64;
24731   }
24732   return result;
24733 }
24734
24735
24736 _ACEOF
24737 if ac_fn_c_try_run "$LINENO"; then :
24738   gl_cv_func_signbit_gcc=yes
24739 else
24740   gl_cv_func_signbit_gcc=no
24741 fi
24742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24743   conftest.$ac_objext conftest.beam conftest.$ac_ext
24744 fi
24745
24746
24747 fi
24748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24749 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
24750       case "$gl_cv_func_signbit_gcc" in
24751     *yes)
24752       REPLACE_SIGNBIT_USING_GCC=1
24753       ;;
24754     *)
24755       case "$gl_cv_func_signbit" in
24756         *yes) ;;
24757         *)
24758                     REPLACE_SIGNBIT=1
24759
24760
24761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24762 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
24763 if ${gl_cv_cc_float_signbit+:} false; then :
24764   $as_echo_n "(cached) " >&6
24765 else
24766
24767       if test "$cross_compiling" = yes; then :
24768
24769                               gl_cv_cc_float_signbit="unknown"
24770
24771 else
24772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24773 /* end confdefs.h.  */
24774
24775 #include <stddef.h>
24776 #include <stdio.h>
24777 #define NWORDS \
24778   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24779 typedef union { float value; unsigned int word[NWORDS]; }
24780         memory_float;
24781 static memory_float plus = { 1.0f };
24782 static memory_float minus = { -1.0f };
24783 int main ()
24784 {
24785   size_t j, k, i;
24786   unsigned int m;
24787   FILE *fp = fopen ("conftest.out", "w");
24788   if (fp == NULL)
24789     return 1;
24790   /* Find the different bit.  */
24791   k = 0; m = 0;
24792   for (j = 0; j < NWORDS; j++)
24793     {
24794       unsigned int x = plus.word[j] ^ minus.word[j];
24795       if ((x & (x - 1)) || (x && m))
24796         {
24797           /* More than one bit difference.  */
24798           fprintf (fp, "unknown");
24799           return 2;
24800         }
24801       if (x)
24802         {
24803           k = j;
24804           m = x;
24805         }
24806     }
24807   if (m == 0)
24808     {
24809       /* No difference.  */
24810       fprintf (fp, "unknown");
24811       return 3;
24812     }
24813   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24814   if (plus.word[k] & ~minus.word[k])
24815     {
24816       /* Oh? The sign bit is set in the positive and cleared in the negative
24817          numbers?  */
24818       fprintf (fp, "unknown");
24819       return 4;
24820     }
24821   for (i = 0; ; i++)
24822     if ((m >> i) & 1)
24823       break;
24824   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24825   if (fclose (fp) != 0)
24826     return 5;
24827   return 0;
24828 }
24829
24830 _ACEOF
24831 if ac_fn_c_try_run "$LINENO"; then :
24832   gl_cv_cc_float_signbit=`cat conftest.out`
24833 else
24834   gl_cv_cc_float_signbit="unknown"
24835 fi
24836 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24837   conftest.$ac_objext conftest.beam conftest.$ac_ext
24838 fi
24839
24840       rm -f conftest.out
24841
24842 fi
24843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24844 $as_echo "$gl_cv_cc_float_signbit" >&6; }
24845   case "$gl_cv_cc_float_signbit" in
24846     word*bit*)
24847       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24848       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
24849
24850 cat >>confdefs.h <<_ACEOF
24851 #define FLT_SIGNBIT_WORD $word
24852 _ACEOF
24853
24854
24855 cat >>confdefs.h <<_ACEOF
24856 #define FLT_SIGNBIT_BIT $bit
24857 _ACEOF
24858
24859       ;;
24860   esac
24861
24862
24863
24864
24865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24866 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
24867 if ${gl_cv_cc_double_signbit+:} false; then :
24868   $as_echo_n "(cached) " >&6
24869 else
24870
24871       if test "$cross_compiling" = yes; then :
24872
24873                               gl_cv_cc_double_signbit="unknown"
24874
24875 else
24876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24877 /* end confdefs.h.  */
24878
24879 #include <stddef.h>
24880 #include <stdio.h>
24881 #define NWORDS \
24882   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24883 typedef union { double value; unsigned int word[NWORDS]; }
24884         memory_float;
24885 static memory_float plus = { 1.0 };
24886 static memory_float minus = { -1.0 };
24887 int main ()
24888 {
24889   size_t j, k, i;
24890   unsigned int m;
24891   FILE *fp = fopen ("conftest.out", "w");
24892   if (fp == NULL)
24893     return 1;
24894   /* Find the different bit.  */
24895   k = 0; m = 0;
24896   for (j = 0; j < NWORDS; j++)
24897     {
24898       unsigned int x = plus.word[j] ^ minus.word[j];
24899       if ((x & (x - 1)) || (x && m))
24900         {
24901           /* More than one bit difference.  */
24902           fprintf (fp, "unknown");
24903           return 2;
24904         }
24905       if (x)
24906         {
24907           k = j;
24908           m = x;
24909         }
24910     }
24911   if (m == 0)
24912     {
24913       /* No difference.  */
24914       fprintf (fp, "unknown");
24915       return 3;
24916     }
24917   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24918   if (plus.word[k] & ~minus.word[k])
24919     {
24920       /* Oh? The sign bit is set in the positive and cleared in the negative
24921          numbers?  */
24922       fprintf (fp, "unknown");
24923       return 4;
24924     }
24925   for (i = 0; ; i++)
24926     if ((m >> i) & 1)
24927       break;
24928   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24929   if (fclose (fp) != 0)
24930     return 5;
24931   return 0;
24932 }
24933
24934 _ACEOF
24935 if ac_fn_c_try_run "$LINENO"; then :
24936   gl_cv_cc_double_signbit=`cat conftest.out`
24937 else
24938   gl_cv_cc_double_signbit="unknown"
24939 fi
24940 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24941   conftest.$ac_objext conftest.beam conftest.$ac_ext
24942 fi
24943
24944       rm -f conftest.out
24945
24946 fi
24947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24948 $as_echo "$gl_cv_cc_double_signbit" >&6; }
24949   case "$gl_cv_cc_double_signbit" in
24950     word*bit*)
24951       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24952       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
24953
24954 cat >>confdefs.h <<_ACEOF
24955 #define DBL_SIGNBIT_WORD $word
24956 _ACEOF
24957
24958
24959 cat >>confdefs.h <<_ACEOF
24960 #define DBL_SIGNBIT_BIT $bit
24961 _ACEOF
24962
24963       ;;
24964   esac
24965
24966
24967
24968
24969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24970 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
24971 if ${gl_cv_cc_long_double_signbit+:} false; then :
24972   $as_echo_n "(cached) " >&6
24973 else
24974
24975       if test "$cross_compiling" = yes; then :
24976
24977                               gl_cv_cc_long_double_signbit="unknown"
24978
24979 else
24980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24981 /* end confdefs.h.  */
24982
24983 #include <stddef.h>
24984 #include <stdio.h>
24985 #define NWORDS \
24986   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24987 typedef union { long double value; unsigned int word[NWORDS]; }
24988         memory_float;
24989 static memory_float plus = { 1.0L };
24990 static memory_float minus = { -1.0L };
24991 int main ()
24992 {
24993   size_t j, k, i;
24994   unsigned int m;
24995   FILE *fp = fopen ("conftest.out", "w");
24996   if (fp == NULL)
24997     return 1;
24998   /* Find the different bit.  */
24999   k = 0; m = 0;
25000   for (j = 0; j < NWORDS; j++)
25001     {
25002       unsigned int x = plus.word[j] ^ minus.word[j];
25003       if ((x & (x - 1)) || (x && m))
25004         {
25005           /* More than one bit difference.  */
25006           fprintf (fp, "unknown");
25007           return 2;
25008         }
25009       if (x)
25010         {
25011           k = j;
25012           m = x;
25013         }
25014     }
25015   if (m == 0)
25016     {
25017       /* No difference.  */
25018       fprintf (fp, "unknown");
25019       return 3;
25020     }
25021   /* Now m = plus.word[k] ^ ~minus.word[k].  */
25022   if (plus.word[k] & ~minus.word[k])
25023     {
25024       /* Oh? The sign bit is set in the positive and cleared in the negative
25025          numbers?  */
25026       fprintf (fp, "unknown");
25027       return 4;
25028     }
25029   for (i = 0; ; i++)
25030     if ((m >> i) & 1)
25031       break;
25032   fprintf (fp, "word %d bit %d", (int) k, (int) i);
25033   if (fclose (fp) != 0)
25034     return 5;
25035   return 0;
25036 }
25037
25038 _ACEOF
25039 if ac_fn_c_try_run "$LINENO"; then :
25040   gl_cv_cc_long_double_signbit=`cat conftest.out`
25041 else
25042   gl_cv_cc_long_double_signbit="unknown"
25043 fi
25044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25045   conftest.$ac_objext conftest.beam conftest.$ac_ext
25046 fi
25047
25048       rm -f conftest.out
25049
25050 fi
25051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
25052 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
25053   case "$gl_cv_cc_long_double_signbit" in
25054     word*bit*)
25055       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
25056       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
25057
25058 cat >>confdefs.h <<_ACEOF
25059 #define LDBL_SIGNBIT_WORD $word
25060 _ACEOF
25061
25062
25063 cat >>confdefs.h <<_ACEOF
25064 #define LDBL_SIGNBIT_BIT $bit
25065 _ACEOF
25066
25067       ;;
25068   esac
25069
25070
25071           if test "$gl_cv_cc_float_signbit" = unknown; then
25072                         ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
25073 "
25074 if test "x$ac_cv_have_decl_copysignf" = xyes; then :
25075   ac_have_decl=1
25076 else
25077   ac_have_decl=0
25078 fi
25079
25080 cat >>confdefs.h <<_ACEOF
25081 #define HAVE_DECL_COPYSIGNF $ac_have_decl
25082 _ACEOF
25083
25084             if test "$ac_cv_have_decl_copysignf" = yes; then
25085                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
25086 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
25087 if ${gl_cv_func_copysignf_no_libm+:} false; then :
25088   $as_echo_n "(cached) " >&6
25089 else
25090
25091                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25092 /* end confdefs.h.  */
25093 #include <math.h>
25094                          float x, y;
25095 int
25096 main ()
25097 {
25098 return copysignf (x, y) < 0;
25099   ;
25100   return 0;
25101 }
25102 _ACEOF
25103 if ac_fn_c_try_link "$LINENO"; then :
25104   gl_cv_func_copysignf_no_libm=yes
25105 else
25106   gl_cv_func_copysignf_no_libm=no
25107 fi
25108 rm -f core conftest.err conftest.$ac_objext \
25109     conftest$ac_exeext conftest.$ac_ext
25110
25111 fi
25112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25113 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
25114               if test $gl_cv_func_copysignf_no_libm = yes; then
25115
25116 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
25117
25118               fi
25119             fi
25120           fi
25121           if test "$gl_cv_cc_double_signbit" = unknown; then
25122                         ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
25123 "
25124 if test "x$ac_cv_have_decl_copysign" = xyes; then :
25125   ac_have_decl=1
25126 else
25127   ac_have_decl=0
25128 fi
25129
25130 cat >>confdefs.h <<_ACEOF
25131 #define HAVE_DECL_COPYSIGN $ac_have_decl
25132 _ACEOF
25133
25134             if test "$ac_cv_have_decl_copysign" = yes; then
25135                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25136 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
25137 if ${gl_cv_func_copysign_no_libm+:} false; then :
25138   $as_echo_n "(cached) " >&6
25139 else
25140
25141                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25142 /* end confdefs.h.  */
25143 #include <math.h>
25144                          double x, y;
25145 int
25146 main ()
25147 {
25148 return copysign (x, y) < 0;
25149   ;
25150   return 0;
25151 }
25152 _ACEOF
25153 if ac_fn_c_try_link "$LINENO"; then :
25154   gl_cv_func_copysign_no_libm=yes
25155 else
25156   gl_cv_func_copysign_no_libm=no
25157 fi
25158 rm -f core conftest.err conftest.$ac_objext \
25159     conftest$ac_exeext conftest.$ac_ext
25160
25161 fi
25162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25163 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
25164               if test $gl_cv_func_copysign_no_libm = yes; then
25165
25166 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
25167
25168               fi
25169             fi
25170           fi
25171           if test "$gl_cv_cc_long_double_signbit" = unknown; then
25172                         ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
25173 "
25174 if test "x$ac_cv_have_decl_copysignl" = xyes; then :
25175   ac_have_decl=1
25176 else
25177   ac_have_decl=0
25178 fi
25179
25180 cat >>confdefs.h <<_ACEOF
25181 #define HAVE_DECL_COPYSIGNL $ac_have_decl
25182 _ACEOF
25183
25184             if test "$ac_cv_have_decl_copysignl" = yes; then
25185                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25186 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
25187 if ${gl_cv_func_copysignl_no_libm+:} false; then :
25188   $as_echo_n "(cached) " >&6
25189 else
25190
25191                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25192 /* end confdefs.h.  */
25193 #include <math.h>
25194                          long double x, y;
25195 int
25196 main ()
25197 {
25198 return copysignl (x, y) < 0;
25199   ;
25200   return 0;
25201 }
25202 _ACEOF
25203 if ac_fn_c_try_link "$LINENO"; then :
25204   gl_cv_func_copysignl_no_libm=yes
25205 else
25206   gl_cv_func_copysignl_no_libm=no
25207 fi
25208 rm -f core conftest.err conftest.$ac_objext \
25209     conftest$ac_exeext conftest.$ac_ext
25210
25211 fi
25212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25213 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
25214               if test $gl_cv_func_copysignl_no_libm = yes; then
25215
25216 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
25217
25218               fi
25219             fi
25220           fi
25221           ;;
25222       esac
25223       ;;
25224   esac
25225
25226 if test $REPLACE_SIGNBIT = 1; then
25227
25228
25229
25230
25231
25232
25233
25234
25235   gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245   gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255   gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
25256
25257 fi
25258
25259
25260
25261
25262
25263           GNULIB_SIGNBIT=1
25264
25265
25266
25267
25268
25269 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
25270
25271
25272
25273
25274   for ac_header in stdint.h
25275 do :
25276   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
25277 if test "x$ac_cv_header_stdint_h" = xyes; then :
25278   cat >>confdefs.h <<_ACEOF
25279 #define HAVE_STDINT_H 1
25280 _ACEOF
25281
25282 fi
25283
25284 done
25285
25286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25287 $as_echo_n "checking for SIZE_MAX... " >&6; }
25288 if ${gl_cv_size_max+:} false; then :
25289   $as_echo_n "(cached) " >&6
25290 else
25291
25292     gl_cv_size_max=
25293     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25294 /* end confdefs.h.  */
25295
25296 #include <limits.h>
25297 #if HAVE_STDINT_H
25298 #include <stdint.h>
25299 #endif
25300 #ifdef SIZE_MAX
25301 Found it
25302 #endif
25303
25304 _ACEOF
25305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25306   $EGREP "Found it" >/dev/null 2>&1; then :
25307   gl_cv_size_max=yes
25308 fi
25309 rm -f conftest*
25310
25311     if test -z "$gl_cv_size_max"; then
25312                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
25313 #include <limits.h>"; then :
25314
25315 else
25316   size_t_bits_minus_1=
25317 fi
25318
25319       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
25320
25321 else
25322   fits_in_uint=
25323 fi
25324
25325       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
25326         if test $fits_in_uint = 1; then
25327                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25328 /* end confdefs.h.  */
25329 #include <stddef.h>
25330                  extern size_t foo;
25331                  extern unsigned long foo;
25332
25333 int
25334 main ()
25335 {
25336
25337   ;
25338   return 0;
25339 }
25340 _ACEOF
25341 if ac_fn_c_try_compile "$LINENO"; then :
25342   fits_in_uint=0
25343 fi
25344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25345         fi
25346                                 if test $fits_in_uint = 1; then
25347           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
25348         else
25349           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
25350         fi
25351       else
25352                 gl_cv_size_max='((size_t)~(size_t)0)'
25353       fi
25354     fi
25355
25356 fi
25357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25358 $as_echo "$gl_cv_size_max" >&6; }
25359   if test "$gl_cv_size_max" != yes; then
25360
25361 cat >>confdefs.h <<_ACEOF
25362 #define SIZE_MAX $gl_cv_size_max
25363 _ACEOF
25364
25365   fi
25366
25367
25368
25369   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25370 $as_echo_n "checking for ssize_t... " >&6; }
25371 if ${gt_cv_ssize_t+:} false; then :
25372   $as_echo_n "(cached) " >&6
25373 else
25374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25375 /* end confdefs.h.  */
25376 #include <sys/types.h>
25377 int
25378 main ()
25379 {
25380 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25381             return !x;
25382   ;
25383   return 0;
25384 }
25385 _ACEOF
25386 if ac_fn_c_try_compile "$LINENO"; then :
25387   gt_cv_ssize_t=yes
25388 else
25389   gt_cv_ssize_t=no
25390 fi
25391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25392 fi
25393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25394 $as_echo "$gt_cv_ssize_t" >&6; }
25395   if test $gt_cv_ssize_t = no; then
25396
25397 $as_echo "#define ssize_t int" >>confdefs.h
25398
25399   fi
25400
25401
25402
25403
25404     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25405 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25406 if ${gl_cv_func_stat_dir_slash+:} false; then :
25407   $as_echo_n "(cached) " >&6
25408 else
25409   if test "$cross_compiling" = yes; then :
25410   case $host_os in
25411             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25412             *) gl_cv_func_stat_dir_slash="guessing yes";;
25413           esac
25414 else
25415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25416 /* end confdefs.h.  */
25417 #include <sys/stat.h>
25418
25419 int
25420 main ()
25421 {
25422 struct stat st; return stat (".", &st) != stat ("./", &st);
25423   ;
25424   return 0;
25425 }
25426 _ACEOF
25427 if ac_fn_c_try_run "$LINENO"; then :
25428   gl_cv_func_stat_dir_slash=yes
25429 else
25430   gl_cv_func_stat_dir_slash=no
25431 fi
25432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25433   conftest.$ac_objext conftest.beam conftest.$ac_ext
25434 fi
25435
25436 fi
25437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25438 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25440 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25441 if ${gl_cv_func_stat_file_slash+:} false; then :
25442   $as_echo_n "(cached) " >&6
25443 else
25444   touch conftest.tmp
25445        # Assume that if we have lstat, we can also check symlinks.
25446        if test $ac_cv_func_lstat = yes; then
25447          ln -s conftest.tmp conftest.lnk
25448        fi
25449        if test "$cross_compiling" = yes; then :
25450   case "$host_os" in
25451                     # Guess yes on glibc systems.
25452             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25453                     # If we don't know, assume the worst.
25454             *)      gl_cv_func_stat_file_slash="guessing no" ;;
25455           esac
25456
25457 else
25458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25459 /* end confdefs.h.  */
25460 #include <sys/stat.h>
25461
25462 int
25463 main ()
25464 {
25465 int result = 0;
25466       struct stat st;
25467       if (!stat ("conftest.tmp/", &st))
25468         result |= 1;
25469 #if HAVE_LSTAT
25470       if (!stat ("conftest.lnk/", &st))
25471         result |= 2;
25472 #endif
25473       return result;
25474
25475   ;
25476   return 0;
25477 }
25478 _ACEOF
25479 if ac_fn_c_try_run "$LINENO"; then :
25480   gl_cv_func_stat_file_slash=yes
25481 else
25482   gl_cv_func_stat_file_slash=no
25483 fi
25484 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25485   conftest.$ac_objext conftest.beam conftest.$ac_ext
25486 fi
25487
25488        rm -f conftest.tmp conftest.lnk
25489 fi
25490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25491 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25492   case $gl_cv_func_stat_dir_slash in
25493     *no) REPLACE_STAT=1
25494
25495 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25496 ;;
25497   esac
25498   case $gl_cv_func_stat_file_slash in
25499     *no) REPLACE_STAT=1
25500
25501 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25502 ;;
25503   esac
25504
25505 if test $REPLACE_STAT = 1; then
25506
25507
25508
25509
25510
25511
25512
25513
25514   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25515
25516
25517
25518   :
25519
25520 fi
25521
25522
25523
25524
25525
25526           GNULIB_STAT=1
25527
25528
25529
25530
25531
25532 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25533
25534
25535
25536
25537
25538
25539
25540
25541   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>
25542      #include <sys/stat.h>
25543 "
25544 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
25545
25546 cat >>confdefs.h <<_ACEOF
25547 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25548 _ACEOF
25549
25550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25551 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25552 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
25553   $as_echo_n "(cached) " >&6
25554 else
25555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25556 /* end confdefs.h.  */
25557
25558             #include <sys/types.h>
25559             #include <sys/stat.h>
25560             #if HAVE_SYS_TIME_H
25561             # include <sys/time.h>
25562             #endif
25563             #include <time.h>
25564             struct timespec ts;
25565             struct stat st;
25566
25567 int
25568 main ()
25569 {
25570
25571             st.st_atim = ts;
25572
25573   ;
25574   return 0;
25575 }
25576 _ACEOF
25577 if ac_fn_c_try_compile "$LINENO"; then :
25578   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25579 else
25580   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25581 fi
25582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25583 fi
25584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25585 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25586      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25587
25588 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25589
25590      fi
25591 else
25592   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>
25593         #include <sys/stat.h>
25594 "
25595 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
25596
25597 cat >>confdefs.h <<_ACEOF
25598 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25599 _ACEOF
25600
25601
25602 else
25603   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25604            #include <sys/stat.h>
25605 "
25606 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
25607
25608 cat >>confdefs.h <<_ACEOF
25609 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25610 _ACEOF
25611
25612
25613 else
25614   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>
25615               #include <sys/stat.h>
25616 "
25617 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
25618
25619 cat >>confdefs.h <<_ACEOF
25620 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25621 _ACEOF
25622
25623
25624 fi
25625
25626 fi
25627
25628 fi
25629
25630 fi
25631
25632
25633
25634
25635
25636
25637   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>
25638      #include <sys/stat.h>
25639 "
25640 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
25641
25642 cat >>confdefs.h <<_ACEOF
25643 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25644 _ACEOF
25645
25646
25647 else
25648   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25649         #include <sys/stat.h>
25650 "
25651 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
25652
25653 cat >>confdefs.h <<_ACEOF
25654 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25655 _ACEOF
25656
25657
25658 else
25659   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>
25660           #include <sys/stat.h>
25661 "
25662 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
25663
25664 cat >>confdefs.h <<_ACEOF
25665 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25666 _ACEOF
25667
25668
25669 fi
25670
25671 fi
25672
25673 fi
25674
25675
25676
25677
25678
25679   # Define two additional variables used in the Makefile substitution.
25680
25681   if test "$ac_cv_header_stdbool_h" = yes; then
25682     STDBOOL_H=''
25683   else
25684     STDBOOL_H='stdbool.h'
25685   fi
25686
25687    if test -n "$STDBOOL_H"; then
25688   GL_GENERATE_STDBOOL_H_TRUE=
25689   GL_GENERATE_STDBOOL_H_FALSE='#'
25690 else
25691   GL_GENERATE_STDBOOL_H_TRUE='#'
25692   GL_GENERATE_STDBOOL_H_FALSE=
25693 fi
25694
25695
25696   if test "$ac_cv_type__Bool" = yes; then
25697     HAVE__BOOL=1
25698   else
25699     HAVE__BOOL=0
25700   fi
25701
25702
25703
25704
25705
25706   STDDEF_H=
25707   if test $gt_cv_c_wchar_t = no; then
25708     HAVE_WCHAR_T=0
25709     STDDEF_H=stddef.h
25710   fi
25711   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25712 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25713 if ${gl_cv_decl_null_works+:} false; then :
25714   $as_echo_n "(cached) " >&6
25715 else
25716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25717 /* end confdefs.h.  */
25718 #include <stddef.h>
25719       int test[2 * (sizeof NULL == sizeof (void *)) -1];
25720
25721 int
25722 main ()
25723 {
25724
25725   ;
25726   return 0;
25727 }
25728 _ACEOF
25729 if ac_fn_c_try_compile "$LINENO"; then :
25730   gl_cv_decl_null_works=yes
25731 else
25732   gl_cv_decl_null_works=no
25733 fi
25734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25735 fi
25736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25737 $as_echo "$gl_cv_decl_null_works" >&6; }
25738   if test $gl_cv_decl_null_works = no; then
25739     REPLACE_NULL=1
25740     STDDEF_H=stddef.h
25741   fi
25742
25743    if test -n "$STDDEF_H"; then
25744   GL_GENERATE_STDDEF_H_TRUE=
25745   GL_GENERATE_STDDEF_H_FALSE='#'
25746 else
25747   GL_GENERATE_STDDEF_H_TRUE='#'
25748   GL_GENERATE_STDDEF_H_FALSE=
25749 fi
25750
25751   if test -n "$STDDEF_H"; then
25752
25753
25754
25755
25756
25757
25758
25759
25760      if test $gl_cv_have_include_next = yes; then
25761        gl_cv_next_stddef_h='<'stddef.h'>'
25762      else
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25764 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25765 if ${gl_cv_next_stddef_h+:} false; then :
25766   $as_echo_n "(cached) " >&6
25767 else
25768
25769                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25770 /* end confdefs.h.  */
25771 #include <stddef.h>
25772
25773 _ACEOF
25774                                                                                                                         case "$host_os" in
25775                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25776                  *)    gl_absname_cpp="$ac_cpp" ;;
25777                esac
25778
25779                case "$host_os" in
25780                  mingw*)
25781                                                                                                                                      gl_dirsep_regex='[/\\]'
25782                    ;;
25783                  *)
25784                    gl_dirsep_regex='\/'
25785                    ;;
25786                esac
25787                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25788
25789                gl_header_literal_regex=`echo 'stddef.h' \
25790                                         | sed -e "$gl_make_literal_regex_sed"`
25791                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25792                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25793                    s|^/[^/]|//&|
25794                    p
25795                    q
25796                  }'
25797                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25798                       sed -n "$gl_absolute_header_sed"`'"'
25799
25800
25801 fi
25802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25803 $as_echo "$gl_cv_next_stddef_h" >&6; }
25804      fi
25805      NEXT_STDDEF_H=$gl_cv_next_stddef_h
25806
25807      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25808        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25809        gl_next_as_first_directive='<'stddef.h'>'
25810      else
25811        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25812        gl_next_as_first_directive=$gl_cv_next_stddef_h
25813      fi
25814      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25815
25816
25817
25818
25819   fi
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833      if test $gl_cv_have_include_next = yes; then
25834        gl_cv_next_stdio_h='<'stdio.h'>'
25835      else
25836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25837 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25838 if ${gl_cv_next_stdio_h+:} false; then :
25839   $as_echo_n "(cached) " >&6
25840 else
25841
25842                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25843 /* end confdefs.h.  */
25844 #include <stdio.h>
25845
25846 _ACEOF
25847                                                                                                                         case "$host_os" in
25848                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25849                  *)    gl_absname_cpp="$ac_cpp" ;;
25850                esac
25851
25852                case "$host_os" in
25853                  mingw*)
25854                                                                                                                                      gl_dirsep_regex='[/\\]'
25855                    ;;
25856                  *)
25857                    gl_dirsep_regex='\/'
25858                    ;;
25859                esac
25860                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25861
25862                gl_header_literal_regex=`echo 'stdio.h' \
25863                                         | sed -e "$gl_make_literal_regex_sed"`
25864                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25865                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25866                    s|^/[^/]|//&|
25867                    p
25868                    q
25869                  }'
25870                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25871                       sed -n "$gl_absolute_header_sed"`'"'
25872
25873
25874 fi
25875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25876 $as_echo "$gl_cv_next_stdio_h" >&6; }
25877      fi
25878      NEXT_STDIO_H=$gl_cv_next_stdio_h
25879
25880      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25881        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25882        gl_next_as_first_directive='<'stdio.h'>'
25883      else
25884        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25885        gl_next_as_first_directive=$gl_cv_next_stdio_h
25886      fi
25887      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25888
25889
25890
25891
25892
25893       GNULIB_FSCANF=1
25894   GNULIB_SCANF=1
25895   GNULIB_FGETC=1
25896   GNULIB_GETC=1
25897   GNULIB_GETCHAR=1
25898   GNULIB_FGETS=1
25899   GNULIB_FREAD=1
25900
25901
25902       GNULIB_FPRINTF=1
25903   GNULIB_PRINTF=1
25904   GNULIB_VFPRINTF=1
25905   GNULIB_VPRINTF=1
25906   GNULIB_FPUTC=1
25907   GNULIB_PUTC=1
25908   GNULIB_PUTCHAR=1
25909   GNULIB_FPUTS=1
25910   GNULIB_PUTS=1
25911   GNULIB_FWRITE=1
25912
25913
25914
25915
25916     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
25917     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25919 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25920 if eval \${$as_gl_Symbol+:} false; then :
25921   $as_echo_n "(cached) " >&6
25922 else
25923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25924 /* end confdefs.h.  */
25925 #include <stdio.h>
25926
25927 int
25928 main ()
25929 {
25930 #undef $gl_func
25931   (void) $gl_func;
25932   ;
25933   return 0;
25934 }
25935 _ACEOF
25936 if ac_fn_c_try_compile "$LINENO"; then :
25937   eval "$as_gl_Symbol=yes"
25938 else
25939   eval "$as_gl_Symbol=no"
25940 fi
25941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25942 fi
25943 eval ac_res=\$$as_gl_Symbol
25944                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25945 $as_echo "$ac_res" >&6; }
25946     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25947   cat >>confdefs.h <<_ACEOF
25948 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25949 _ACEOF
25950
25951                      eval ac_cv_have_decl_$gl_func=yes
25952 fi
25953       done
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966      if test $gl_cv_have_include_next = yes; then
25967        gl_cv_next_stdlib_h='<'stdlib.h'>'
25968      else
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25970 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25971 if ${gl_cv_next_stdlib_h+:} false; then :
25972   $as_echo_n "(cached) " >&6
25973 else
25974
25975                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25976 /* end confdefs.h.  */
25977 #include <stdlib.h>
25978
25979 _ACEOF
25980                                                                                                                         case "$host_os" in
25981                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25982                  *)    gl_absname_cpp="$ac_cpp" ;;
25983                esac
25984
25985                case "$host_os" in
25986                  mingw*)
25987                                                                                                                                      gl_dirsep_regex='[/\\]'
25988                    ;;
25989                  *)
25990                    gl_dirsep_regex='\/'
25991                    ;;
25992                esac
25993                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25994
25995                gl_header_literal_regex=`echo 'stdlib.h' \
25996                                         | sed -e "$gl_make_literal_regex_sed"`
25997                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25998                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25999                    s|^/[^/]|//&|
26000                    p
26001                    q
26002                  }'
26003                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26004                       sed -n "$gl_absolute_header_sed"`'"'
26005
26006
26007 fi
26008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26009 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26010      fi
26011      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26012
26013      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26014        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26015        gl_next_as_first_directive='<'stdlib.h'>'
26016      else
26017        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26018        gl_next_as_first_directive=$gl_cv_next_stdlib_h
26019      fi
26020      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26021
26022
26023
26024
26025
26026
26027     for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r random random_r realpath rpmatch     setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
26028     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26030 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26031 if eval \${$as_gl_Symbol+:} false; then :
26032   $as_echo_n "(cached) " >&6
26033 else
26034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26035 /* end confdefs.h.  */
26036 #include <stdlib.h>
26037 #if HAVE_SYS_LOADAVG_H
26038 # include <sys/loadavg.h>
26039 #endif
26040 #if HAVE_RANDOM_H
26041 # include <random.h>
26042 #endif
26043
26044 int
26045 main ()
26046 {
26047 #undef $gl_func
26048   (void) $gl_func;
26049   ;
26050   return 0;
26051 }
26052 _ACEOF
26053 if ac_fn_c_try_compile "$LINENO"; then :
26054   eval "$as_gl_Symbol=yes"
26055 else
26056   eval "$as_gl_Symbol=no"
26057 fi
26058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26059 fi
26060 eval ac_res=\$$as_gl_Symbol
26061                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26062 $as_echo "$ac_res" >&6; }
26063     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26064   cat >>confdefs.h <<_ACEOF
26065 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26066 _ACEOF
26067
26068                      eval ac_cv_have_decl_$gl_func=yes
26069 fi
26070       done
26071
26072
26073
26074
26075
26076
26077   if test $ac_cv_func_strdup = yes; then
26078     if test $gl_cv_func_malloc_posix != yes; then
26079       REPLACE_STRDUP=1
26080     fi
26081   fi
26082
26083   if test $ac_cv_have_decl_strdup = no; then
26084     HAVE_DECL_STRDUP=0
26085   fi
26086
26087 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26088
26089
26090
26091
26092
26093
26094
26095
26096   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26097
26098   :
26099 fi
26100
26101
26102
26103
26104
26105           GNULIB_STRDUP=1
26106
26107
26108
26109
26110
26111 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26124 $as_echo_n "checking for working strerror function... " >&6; }
26125 if ${gl_cv_func_working_strerror+:} false; then :
26126   $as_echo_n "(cached) " >&6
26127 else
26128   if test "$cross_compiling" = yes; then :
26129   case "$host_os" in
26130                    # Guess yes on glibc systems.
26131            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26132                    # If we don't know, assume the worst.
26133            *)      gl_cv_func_working_strerror="guessing no" ;;
26134          esac
26135
26136 else
26137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26138 /* end confdefs.h.  */
26139 #include <string.h>
26140
26141 int
26142 main ()
26143 {
26144 if (!*strerror (-2)) return 1;
26145   ;
26146   return 0;
26147 }
26148 _ACEOF
26149 if ac_fn_c_try_run "$LINENO"; then :
26150   gl_cv_func_working_strerror=yes
26151 else
26152   gl_cv_func_working_strerror=no
26153 fi
26154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26155   conftest.$ac_objext conftest.beam conftest.$ac_ext
26156 fi
26157
26158
26159 fi
26160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26161 $as_echo "$gl_cv_func_working_strerror" >&6; }
26162     case "$gl_cv_func_working_strerror" in
26163       *yes) ;;
26164       *)
26165                         REPLACE_STRERROR=1
26166         ;;
26167     esac
26168
26169                   case "$gl_cv_func_strerror_r_works" in
26170         *no) REPLACE_STRERROR=1 ;;
26171       esac
26172
26173   else
26174             REPLACE_STRERROR=1
26175   fi
26176
26177 if test $REPLACE_STRERROR = 1; then
26178
26179
26180
26181
26182
26183
26184
26185
26186   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26187
26188 fi
26189
26190
26191 cat >>confdefs.h <<_ACEOF
26192 #define GNULIB_STRERROR 1
26193 _ACEOF
26194
26195
26196
26197
26198
26199
26200
26201           GNULIB_STRERROR=1
26202
26203
26204
26205
26206
26207 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26208
26209
26210
26211
26212
26213 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26214
26215
26216
26217
26218
26219
26220
26221
26222   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26223
26224
26225
26226
26227
26228   if test $ac_cv_header_sys_socket_h != yes; then
26229                     for ac_header in winsock2.h
26230 do :
26231   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26232 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26233   cat >>confdefs.h <<_ACEOF
26234 #define HAVE_WINSOCK2_H 1
26235 _ACEOF
26236
26237 fi
26238
26239 done
26240
26241   fi
26242   if test "$ac_cv_header_winsock2_h" = yes; then
26243     HAVE_WINSOCK2_H=1
26244     UNISTD_H_HAVE_WINSOCK2_H=1
26245     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26246   else
26247     HAVE_WINSOCK2_H=0
26248   fi
26249
26250
26251 fi
26252
26253
26254
26255
26256
26257
26258
26259   if test $ac_cv_have_decl_strerror_r = no; then
26260     HAVE_DECL_STRERROR_R=0
26261   fi
26262
26263   if test $ac_cv_func_strerror_r = yes; then
26264     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26265       if test $gl_cv_func_strerror_r_posix_signature = yes; then
26266         case "$gl_cv_func_strerror_r_works" in
26267                     *no) REPLACE_STRERROR_R=1 ;;
26268         esac
26269       else
26270                 REPLACE_STRERROR_R=1
26271       fi
26272     else
26273                   REPLACE_STRERROR_R=1
26274     fi
26275   fi
26276
26277 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26278
26279
26280
26281
26282
26283
26284
26285
26286   gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26287
26288
26289
26290
26291
26292
26293 fi
26294
26295
26296
26297
26298
26299           GNULIB_STRERROR_R=1
26300
26301
26302
26303
26304
26305 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328      if test $gl_cv_have_include_next = yes; then
26329        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26330      else
26331        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26332 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26333 if ${gl_cv_next_sys_stat_h+:} false; then :
26334   $as_echo_n "(cached) " >&6
26335 else
26336
26337              if test $ac_cv_header_sys_stat_h = yes; then
26338
26339
26340                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26341 /* end confdefs.h.  */
26342 #include <sys/stat.h>
26343
26344 _ACEOF
26345                                                                                                                         case "$host_os" in
26346                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26347                  *)    gl_absname_cpp="$ac_cpp" ;;
26348                esac
26349
26350                case "$host_os" in
26351                  mingw*)
26352                                                                                                                                      gl_dirsep_regex='[/\\]'
26353                    ;;
26354                  *)
26355                    gl_dirsep_regex='\/'
26356                    ;;
26357                esac
26358                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26359
26360                gl_header_literal_regex=`echo 'sys/stat.h' \
26361                                         | sed -e "$gl_make_literal_regex_sed"`
26362                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26363                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26364                    s|^/[^/]|//&|
26365                    p
26366                    q
26367                  }'
26368                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26369                       sed -n "$gl_absolute_header_sed"`'"'
26370           else
26371                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26372              fi
26373
26374
26375 fi
26376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26377 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
26378      fi
26379      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26380
26381      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26382        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26383        gl_next_as_first_directive='<'sys/stat.h'>'
26384      else
26385        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26386        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26387      fi
26388      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26401
26402 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26403
26404   fi
26405
26406       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26407      #include <sys/stat.h>
26408 "
26409 if test "x$ac_cv_type_nlink_t" = xyes; then :
26410
26411 else
26412
26413 $as_echo "#define nlink_t int" >>confdefs.h
26414
26415 fi
26416
26417
26418
26419     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
26420     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26421     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26422 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26423 if eval \${$as_gl_Symbol+:} false; then :
26424   $as_echo_n "(cached) " >&6
26425 else
26426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26427 /* end confdefs.h.  */
26428 #include <sys/stat.h>
26429
26430 int
26431 main ()
26432 {
26433 #undef $gl_func
26434   (void) $gl_func;
26435   ;
26436   return 0;
26437 }
26438 _ACEOF
26439 if ac_fn_c_try_compile "$LINENO"; then :
26440   eval "$as_gl_Symbol=yes"
26441 else
26442   eval "$as_gl_Symbol=no"
26443 fi
26444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26445 fi
26446 eval ac_res=\$$as_gl_Symbol
26447                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26448 $as_echo "$ac_res" >&6; }
26449     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26450   cat >>confdefs.h <<_ACEOF
26451 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26452 _ACEOF
26453
26454                      eval ac_cv_have_decl_$gl_func=yes
26455 fi
26456       done
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474      if test $gl_cv_have_include_next = yes; then
26475        gl_cv_next_sys_types_h='<'sys/types.h'>'
26476      else
26477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
26478 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
26479 if ${gl_cv_next_sys_types_h+:} false; then :
26480   $as_echo_n "(cached) " >&6
26481 else
26482
26483                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26484 /* end confdefs.h.  */
26485 #include <sys/types.h>
26486
26487 _ACEOF
26488                                                                                                                         case "$host_os" in
26489                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26490                  *)    gl_absname_cpp="$ac_cpp" ;;
26491                esac
26492
26493                case "$host_os" in
26494                  mingw*)
26495                                                                                                                                      gl_dirsep_regex='[/\\]'
26496                    ;;
26497                  *)
26498                    gl_dirsep_regex='\/'
26499                    ;;
26500                esac
26501                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26502
26503                gl_header_literal_regex=`echo 'sys/types.h' \
26504                                         | sed -e "$gl_make_literal_regex_sed"`
26505                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26506                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26507                    s|^/[^/]|//&|
26508                    p
26509                    q
26510                  }'
26511                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26512                       sed -n "$gl_absolute_header_sed"`'"'
26513
26514
26515 fi
26516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
26517 $as_echo "$gl_cv_next_sys_types_h" >&6; }
26518      fi
26519      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
26520
26521      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26522        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26523        gl_next_as_first_directive='<'sys/types.h'>'
26524      else
26525        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26526        gl_next_as_first_directive=$gl_cv_next_sys_types_h
26527      fi
26528      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564      if test $gl_cv_have_include_next = yes; then
26565        gl_cv_next_unistd_h='<'unistd.h'>'
26566      else
26567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26568 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
26569 if ${gl_cv_next_unistd_h+:} false; then :
26570   $as_echo_n "(cached) " >&6
26571 else
26572
26573              if test $ac_cv_header_unistd_h = yes; then
26574
26575
26576                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26577 /* end confdefs.h.  */
26578 #include <unistd.h>
26579
26580 _ACEOF
26581                                                                                                                         case "$host_os" in
26582                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26583                  *)    gl_absname_cpp="$ac_cpp" ;;
26584                esac
26585
26586                case "$host_os" in
26587                  mingw*)
26588                                                                                                                                      gl_dirsep_regex='[/\\]'
26589                    ;;
26590                  *)
26591                    gl_dirsep_regex='\/'
26592                    ;;
26593                esac
26594                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26595
26596                gl_header_literal_regex=`echo 'unistd.h' \
26597                                         | sed -e "$gl_make_literal_regex_sed"`
26598                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26599                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26600                    s|^/[^/]|//&|
26601                    p
26602                    q
26603                  }'
26604                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26605                       sed -n "$gl_absolute_header_sed"`'"'
26606           else
26607                gl_cv_next_unistd_h='<'unistd.h'>'
26608              fi
26609
26610
26611 fi
26612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26613 $as_echo "$gl_cv_next_unistd_h" >&6; }
26614      fi
26615      NEXT_UNISTD_H=$gl_cv_next_unistd_h
26616
26617      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26618        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26619        gl_next_as_first_directive='<'unistd.h'>'
26620      else
26621        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26622        gl_next_as_first_directive=$gl_cv_next_unistd_h
26623      fi
26624      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26625
26626
26627
26628
26629   if test $ac_cv_header_unistd_h = yes; then
26630     HAVE_UNISTD_H=1
26631   else
26632     HAVE_UNISTD_H=0
26633   fi
26634
26635
26636
26637
26638
26639
26640
26641     for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize     getusershell setusershell endusershell     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r     unlink unlinkat usleep; do
26642     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26643     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26644 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26645 if eval \${$as_gl_Symbol+:} false; then :
26646   $as_echo_n "(cached) " >&6
26647 else
26648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26649 /* end confdefs.h.  */
26650
26651 #if HAVE_UNISTD_H
26652 # include <unistd.h>
26653 #endif
26654 /* Some systems declare various items in the wrong headers.  */
26655 #if !(defined __GLIBC__ && !defined __UCLIBC__)
26656 # include <fcntl.h>
26657 # include <stdio.h>
26658 # include <stdlib.h>
26659 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
26660 #  include <io.h>
26661 # endif
26662 #endif
26663
26664 int
26665 main ()
26666 {
26667 #undef $gl_func
26668   (void) $gl_func;
26669   ;
26670   return 0;
26671 }
26672 _ACEOF
26673 if ac_fn_c_try_compile "$LINENO"; then :
26674   eval "$as_gl_Symbol=yes"
26675 else
26676   eval "$as_gl_Symbol=no"
26677 fi
26678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26679 fi
26680 eval ac_res=\$$as_gl_Symbol
26681                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26682 $as_echo "$ac_res" >&6; }
26683     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26684   cat >>confdefs.h <<_ACEOF
26685 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26686 _ACEOF
26687
26688                      eval ac_cv_have_decl_$gl_func=yes
26689 fi
26690       done
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26703                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26704 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
26705 if ${gl_cv_func_futimesat_works+:} false; then :
26706   $as_echo_n "(cached) " >&6
26707 else
26708   touch conftest.file
26709        if test "$cross_compiling" = yes; then :
26710   case "$host_os" in
26711                    # Guess yes on glibc systems.
26712            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26713                    # If we don't know, assume the worst.
26714            *)      gl_cv_func_futimesat_works="guessing no" ;;
26715          esac
26716
26717 else
26718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26719 /* end confdefs.h.  */
26720
26721 #include <stddef.h>
26722 #include <sys/times.h>
26723 #include <fcntl.h>
26724
26725 int
26726 main ()
26727 {
26728     int fd = open ("conftest.file", O_RDWR);
26729           if (fd < 0) return 1;
26730           if (futimesat (fd, NULL, NULL)) return 2;
26731
26732   ;
26733   return 0;
26734 }
26735 _ACEOF
26736 if ac_fn_c_try_run "$LINENO"; then :
26737   gl_cv_func_futimesat_works=yes
26738 else
26739   gl_cv_func_futimesat_works=no
26740 fi
26741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26742   conftest.$ac_objext conftest.beam conftest.$ac_ext
26743 fi
26744
26745       rm -f conftest.file
26746 fi
26747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26748 $as_echo "$gl_cv_func_futimesat_works" >&6; }
26749     case "$gl_cv_func_futimesat_works" in
26750       *yes) ;;
26751       *)
26752
26753 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26754
26755         ;;
26756     esac
26757   fi
26758
26759
26760
26761   if test $ac_cv_func_vasnprintf = no; then
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26803
26804   if test $ac_cv_func_vasnprintf = yes; then
26805
26806 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26807
26808   fi
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26821 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26822
26823 else
26824
26825 $as_echo "#define ptrdiff_t long" >>confdefs.h
26826
26827
26828 fi
26829
26830
26831
26832
26833
26834
26835
26836   fi
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853   gl_cv_func_vfprintf_posix=no
26854   case "$gl_cv_func_printf_sizes_c99" in
26855     *yes)
26856       case "$gl_cv_func_printf_long_double" in
26857         *yes)
26858           case "$gl_cv_func_printf_infinite" in
26859             *yes)
26860               case "$gl_cv_func_printf_infinite_long_double" in
26861                 *yes)
26862                   case "$gl_cv_func_printf_directive_a" in
26863                     *yes)
26864                       case "$gl_cv_func_printf_directive_f" in
26865                         *yes)
26866                           case "$gl_cv_func_printf_directive_n" in
26867                             *yes)
26868                               case "$gl_cv_func_printf_directive_ls" in
26869                                 *yes)
26870                                   case "$gl_cv_func_printf_positions" in
26871                                     *yes)
26872                                       case "$gl_cv_func_printf_flag_grouping" in
26873                                         *yes)
26874                                           case "$gl_cv_func_printf_flag_leftadjust" in
26875                                             *yes)
26876                                               case "$gl_cv_func_printf_flag_zero" in
26877                                                 *yes)
26878                                                   case "$gl_cv_func_printf_precision" in
26879                                                     *yes)
26880                                                       case "$gl_cv_func_printf_enomem" in
26881                                                         *yes)
26882                                                           # vfprintf exists and is
26883                                                           # already POSIX compliant.
26884                                                           gl_cv_func_vfprintf_posix=yes
26885                                                           ;;
26886                                                       esac
26887                                                       ;;
26888                                                   esac
26889                                                   ;;
26890                                               esac
26891                                               ;;
26892                                           esac
26893                                           ;;
26894                                       esac
26895                                       ;;
26896                                   esac
26897                                   ;;
26898                               esac
26899                               ;;
26900                           esac
26901                           ;;
26902                       esac
26903                       ;;
26904                   esac
26905                   ;;
26906               esac
26907               ;;
26908           esac
26909           ;;
26910       esac
26911       ;;
26912   esac
26913   if test $gl_cv_func_vfprintf_posix = no; then
26914
26915
26916
26917   case "$gl_cv_func_printf_infinite" in
26918     *yes)
26919       ;;
26920     *)
26921
26922 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
26923
26924       ;;
26925   esac
26926
26927
26928
26929
26930   case "$gl_cv_func_printf_long_double" in
26931     *yes)
26932       case "$gl_cv_func_printf_infinite_long_double" in
26933         *yes)
26934           ;;
26935         *)
26936
26937 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
26938
26939           ;;
26940       esac
26941       ;;
26942   esac
26943
26944
26945
26946   case "$gl_cv_func_printf_directive_a" in
26947     *yes)
26948       ;;
26949     *)
26950
26951 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
26952
26953       for ac_func in nl_langinfo
26954 do :
26955   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
26956 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
26957   cat >>confdefs.h <<_ACEOF
26958 #define HAVE_NL_LANGINFO 1
26959 _ACEOF
26960
26961 fi
26962 done
26963
26964       ;;
26965   esac
26966
26967
26968
26969   case "$gl_cv_func_printf_directive_f" in
26970     *yes)
26971       ;;
26972     *)
26973
26974 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
26975
26976       ;;
26977   esac
26978
26979
26980
26981   case "$gl_cv_func_printf_directive_ls" in
26982     *yes)
26983       ;;
26984     *)
26985
26986 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
26987
26988       ;;
26989   esac
26990
26991
26992
26993   case "$gl_cv_func_printf_flag_grouping" in
26994     *yes)
26995       ;;
26996     *)
26997
26998 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
26999
27000       ;;
27001   esac
27002
27003
27004
27005   case "$gl_cv_func_printf_flag_leftadjust" in
27006     *yes)
27007       ;;
27008     *)
27009
27010 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
27011
27012       ;;
27013   esac
27014
27015
27016
27017   case "$gl_cv_func_printf_flag_zero" in
27018     *yes)
27019       ;;
27020     *)
27021
27022 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
27023
27024       ;;
27025   esac
27026
27027
27028
27029   case "$gl_cv_func_printf_precision" in
27030     *yes)
27031       ;;
27032     *)
27033
27034 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
27035
27036
27037 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27038
27039
27040 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27041
27042       ;;
27043   esac
27044
27045
27046
27047   case "$gl_cv_func_printf_enomem" in
27048     *yes)
27049       ;;
27050     *)
27051
27052 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
27053
27054
27055 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27056
27057
27058 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27059
27060       ;;
27061   esac
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
27104
27105   if test $ac_cv_func_vasnprintf = yes; then
27106
27107 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
27108
27109   fi
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
27122 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
27123
27124 else
27125
27126 $as_echo "#define ptrdiff_t long" >>confdefs.h
27127
27128
27129 fi
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
27148
27149   REPLACE_VFPRINTF=1
27150
27151 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
27152
27153   :
27154
27155   fi
27156
27157
27158
27159
27160
27161
27162           GNULIB_VFPRINTF_POSIX=1
27163
27164
27165
27166
27167
27168 $as_echo "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184      if test $gl_cv_have_include_next = yes; then
27185        gl_cv_next_wchar_h='<'wchar.h'>'
27186      else
27187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27188 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
27189 if ${gl_cv_next_wchar_h+:} false; then :
27190   $as_echo_n "(cached) " >&6
27191 else
27192
27193              if test $ac_cv_header_wchar_h = yes; then
27194
27195
27196                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27197 /* end confdefs.h.  */
27198 #include <wchar.h>
27199
27200 _ACEOF
27201                                                                                                                         case "$host_os" in
27202                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27203                  *)    gl_absname_cpp="$ac_cpp" ;;
27204                esac
27205
27206                case "$host_os" in
27207                  mingw*)
27208                                                                                                                                      gl_dirsep_regex='[/\\]'
27209                    ;;
27210                  *)
27211                    gl_dirsep_regex='\/'
27212                    ;;
27213                esac
27214                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27215
27216                gl_header_literal_regex=`echo 'wchar.h' \
27217                                         | sed -e "$gl_make_literal_regex_sed"`
27218                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27219                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27220                    s|^/[^/]|//&|
27221                    p
27222                    q
27223                  }'
27224                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27225                       sed -n "$gl_absolute_header_sed"`'"'
27226           else
27227                gl_cv_next_wchar_h='<'wchar.h'>'
27228              fi
27229
27230
27231 fi
27232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27233 $as_echo "$gl_cv_next_wchar_h" >&6; }
27234      fi
27235      NEXT_WCHAR_H=$gl_cv_next_wchar_h
27236
27237      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27238        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27239        gl_next_as_first_directive='<'wchar.h'>'
27240      else
27241        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27242        gl_next_as_first_directive=$gl_cv_next_wchar_h
27243      fi
27244      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27245
27246
27247
27248
27249   if test $ac_cv_header_wchar_h = yes; then
27250     HAVE_WCHAR_H=1
27251   else
27252     HAVE_WCHAR_H=0
27253   fi
27254
27255
27256
27257
27258
27259   if test $gt_cv_c_wint_t = yes; then
27260     HAVE_WINT_T=1
27261   else
27262     HAVE_WINT_T=0
27263   fi
27264
27265
27266
27267     for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
27268     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27269     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27270 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27271 if eval \${$as_gl_Symbol+:} false; then :
27272   $as_echo_n "(cached) " >&6
27273 else
27274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27275 /* end confdefs.h.  */
27276
27277 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27278    <wchar.h>.
27279    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27280    included before <wchar.h>.  */
27281 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27282 # include <stddef.h>
27283 # include <stdio.h>
27284 # include <time.h>
27285 #endif
27286 #include <wchar.h>
27287
27288 int
27289 main ()
27290 {
27291 #undef $gl_func
27292   (void) $gl_func;
27293   ;
27294   return 0;
27295 }
27296 _ACEOF
27297 if ac_fn_c_try_compile "$LINENO"; then :
27298   eval "$as_gl_Symbol=yes"
27299 else
27300   eval "$as_gl_Symbol=no"
27301 fi
27302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27303 fi
27304 eval ac_res=\$$as_gl_Symbol
27305                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27306 $as_echo "$ac_res" >&6; }
27307     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27308   cat >>confdefs.h <<_ACEOF
27309 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27310 _ACEOF
27311
27312                      eval ac_cv_have_decl_$gl_func=yes
27313 fi
27314       done
27315
27316
27317
27318
27319
27320
27321
27322   if test $ac_cv_func_iswcntrl = yes; then
27323     HAVE_ISWCNTRL=1
27324   else
27325     HAVE_ISWCNTRL=0
27326   fi
27327
27328
27329
27330
27331
27332   if test $gt_cv_c_wint_t = yes; then
27333     HAVE_WINT_T=1
27334   else
27335     HAVE_WINT_T=0
27336   fi
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348      if test $gl_cv_have_include_next = yes; then
27349        gl_cv_next_wctype_h='<'wctype.h'>'
27350      else
27351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27352 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
27353 if ${gl_cv_next_wctype_h+:} false; then :
27354   $as_echo_n "(cached) " >&6
27355 else
27356
27357              if test $ac_cv_header_wctype_h = yes; then
27358
27359
27360                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27361 /* end confdefs.h.  */
27362 #include <wctype.h>
27363
27364 _ACEOF
27365                                                                                                                         case "$host_os" in
27366                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27367                  *)    gl_absname_cpp="$ac_cpp" ;;
27368                esac
27369
27370                case "$host_os" in
27371                  mingw*)
27372                                                                                                                                      gl_dirsep_regex='[/\\]'
27373                    ;;
27374                  *)
27375                    gl_dirsep_regex='\/'
27376                    ;;
27377                esac
27378                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27379
27380                gl_header_literal_regex=`echo 'wctype.h' \
27381                                         | sed -e "$gl_make_literal_regex_sed"`
27382                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27383                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27384                    s|^/[^/]|//&|
27385                    p
27386                    q
27387                  }'
27388                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27389                       sed -n "$gl_absolute_header_sed"`'"'
27390           else
27391                gl_cv_next_wctype_h='<'wctype.h'>'
27392              fi
27393
27394
27395 fi
27396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27397 $as_echo "$gl_cv_next_wctype_h" >&6; }
27398      fi
27399      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27400
27401      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27402        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27403        gl_next_as_first_directive='<'wctype.h'>'
27404      else
27405        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27406        gl_next_as_first_directive=$gl_cv_next_wctype_h
27407      fi
27408      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27409
27410
27411
27412
27413   if test $ac_cv_header_wctype_h = yes; then
27414     if test $ac_cv_func_iswcntrl = yes; then
27415                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27416 $as_echo_n "checking whether iswcntrl works... " >&6; }
27417 if ${gl_cv_func_iswcntrl_works+:} false; then :
27418   $as_echo_n "(cached) " >&6
27419 else
27420
27421           if test "$cross_compiling" = yes; then :
27422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27423 /* end confdefs.h.  */
27424 #include <stdlib.h>
27425                           #if __GNU_LIBRARY__ == 1
27426                           Linux libc5 i18n is broken.
27427                           #endif
27428 int
27429 main ()
27430 {
27431
27432   ;
27433   return 0;
27434 }
27435 _ACEOF
27436 if ac_fn_c_try_compile "$LINENO"; then :
27437   gl_cv_func_iswcntrl_works="guessing yes"
27438 else
27439   gl_cv_func_iswcntrl_works="guessing no"
27440 fi
27441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27442
27443 else
27444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27445 /* end confdefs.h.  */
27446
27447                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27448                   included before <wchar.h>.
27449                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27450                   must be included before <wchar.h>.  */
27451                #include <stddef.h>
27452                #include <stdio.h>
27453                #include <time.h>
27454                #include <wchar.h>
27455                #include <wctype.h>
27456                int main () { return iswprint ('x') == 0; }
27457
27458 _ACEOF
27459 if ac_fn_c_try_run "$LINENO"; then :
27460   gl_cv_func_iswcntrl_works=yes
27461 else
27462   gl_cv_func_iswcntrl_works=no
27463 fi
27464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27465   conftest.$ac_objext conftest.beam conftest.$ac_ext
27466 fi
27467
27468
27469 fi
27470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27471 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27472     fi
27473     HAVE_WCTYPE_H=1
27474   else
27475     HAVE_WCTYPE_H=0
27476   fi
27477
27478
27479   case "$gl_cv_func_iswcntrl_works" in
27480     *yes) REPLACE_ISWCNTRL=0 ;;
27481     *)    REPLACE_ISWCNTRL=1 ;;
27482   esac
27483
27484
27485   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27486         :
27487   fi
27488
27489   if test $REPLACE_ISWCNTRL = 1; then
27490     REPLACE_TOWLOWER=1
27491   else
27492     for ac_func in towlower
27493 do :
27494   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27495 if test "x$ac_cv_func_towlower" = xyes; then :
27496   cat >>confdefs.h <<_ACEOF
27497 #define HAVE_TOWLOWER 1
27498 _ACEOF
27499
27500 fi
27501 done
27502
27503     if test $ac_cv_func_towlower = yes; then
27504       REPLACE_TOWLOWER=0
27505     else
27506       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27507              included before <wchar.h>.
27508              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27509              must be included before <wchar.h>.  */
27510           #include <stddef.h>
27511           #include <stdio.h>
27512           #include <time.h>
27513           #include <wchar.h>
27514           #if HAVE_WCTYPE_H
27515           # include <wctype.h>
27516           #endif
27517
27518 "
27519 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27520   ac_have_decl=1
27521 else
27522   ac_have_decl=0
27523 fi
27524
27525 cat >>confdefs.h <<_ACEOF
27526 #define HAVE_DECL_TOWLOWER $ac_have_decl
27527 _ACEOF
27528
27529       if test $ac_cv_have_decl_towlower = yes; then
27530                                 REPLACE_TOWLOWER=1
27531       else
27532         REPLACE_TOWLOWER=0
27533       fi
27534     fi
27535   fi
27536
27537
27538   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27539         :
27540   fi
27541
27542           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27543 $as_echo_n "checking for wctype_t... " >&6; }
27544 if ${gl_cv_type_wctype_t+:} false; then :
27545   $as_echo_n "(cached) " >&6
27546 else
27547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27548 /* end confdefs.h.  */
27549 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27550                included before <wchar.h>.
27551                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27552                must be included before <wchar.h>.  */
27553             #include <stddef.h>
27554             #include <stdio.h>
27555             #include <time.h>
27556             #include <wchar.h>
27557             #if HAVE_WCTYPE_H
27558             # include <wctype.h>
27559             #endif
27560             wctype_t a;
27561
27562 int
27563 main ()
27564 {
27565
27566   ;
27567   return 0;
27568 }
27569 _ACEOF
27570 if ac_fn_c_try_compile "$LINENO"; then :
27571   gl_cv_type_wctype_t=yes
27572 else
27573   gl_cv_type_wctype_t=no
27574 fi
27575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27576
27577 fi
27578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27579 $as_echo "$gl_cv_type_wctype_t" >&6; }
27580   if test $gl_cv_type_wctype_t = no; then
27581     HAVE_WCTYPE_T=0
27582   fi
27583
27584       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27585 $as_echo_n "checking for wctrans_t... " >&6; }
27586 if ${gl_cv_type_wctrans_t+:} false; then :
27587   $as_echo_n "(cached) " >&6
27588 else
27589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27590 /* end confdefs.h.  */
27591 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27592                included before <wchar.h>.
27593                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27594                must be included before <wchar.h>.  */
27595             #include <stddef.h>
27596             #include <stdio.h>
27597             #include <time.h>
27598             #include <wchar.h>
27599             #include <wctype.h>
27600             wctrans_t a;
27601
27602 int
27603 main ()
27604 {
27605
27606   ;
27607   return 0;
27608 }
27609 _ACEOF
27610 if ac_fn_c_try_compile "$LINENO"; then :
27611   gl_cv_type_wctrans_t=yes
27612 else
27613   gl_cv_type_wctrans_t=no
27614 fi
27615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27616
27617 fi
27618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27619 $as_echo "$gl_cv_type_wctrans_t" >&6; }
27620   if test $gl_cv_type_wctrans_t = no; then
27621     HAVE_WCTRANS_T=0
27622   fi
27623
27624
27625     for gl_func in wctype iswctype wctrans towctrans     ; do
27626     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27628 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27629 if eval \${$as_gl_Symbol+:} false; then :
27630   $as_echo_n "(cached) " >&6
27631 else
27632   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27633 /* end confdefs.h.  */
27634
27635 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27636    <wchar.h>.
27637    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27638    included before <wchar.h>.  */
27639 #if !(defined __GLIBC__ && !defined __UCLIBC__)
27640 # include <stddef.h>
27641 # include <stdio.h>
27642 # include <time.h>
27643 # include <wchar.h>
27644 #endif
27645 #include <wctype.h>
27646
27647 int
27648 main ()
27649 {
27650 #undef $gl_func
27651   (void) $gl_func;
27652   ;
27653   return 0;
27654 }
27655 _ACEOF
27656 if ac_fn_c_try_compile "$LINENO"; then :
27657   eval "$as_gl_Symbol=yes"
27658 else
27659   eval "$as_gl_Symbol=no"
27660 fi
27661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27662 fi
27663 eval ac_res=\$$as_gl_Symbol
27664                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27665 $as_echo "$ac_res" >&6; }
27666     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27667   cat >>confdefs.h <<_ACEOF
27668 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27669 _ACEOF
27670
27671                      eval ac_cv_have_decl_$gl_func=yes
27672 fi
27673       done
27674
27675
27676
27677
27678
27679   :
27680
27681
27682   :
27683
27684
27685
27686
27687
27688   for ac_header in stdint.h
27689 do :
27690   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27691 if test "x$ac_cv_header_stdint_h" = xyes; then :
27692   cat >>confdefs.h <<_ACEOF
27693 #define HAVE_STDINT_H 1
27694 _ACEOF
27695
27696 fi
27697
27698 done
27699
27700
27701
27702     :
27703
27704   # End of code from modules
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714   gltests_libdeps=
27715   gltests_ltlibdeps=
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725   gl_source_base='tests'
27726   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
27727
27728   gl_module_indicator_condition=$gltests_WITNESS
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738   LIBGZIP_LIBDEPS="$gl_libdeps"
27739
27740   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
27741
27742
27743
27744 # Check whether --enable-gcc-warnings was given.
27745 if test "${enable_gcc_warnings+set}" = set; then :
27746   enableval=$enable_gcc_warnings; case $enableval in
27747      yes|no) ;;
27748      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
27749    esac
27750    gl_gcc_warnings=$enableval
27751 else
27752   gl_gcc_warnings=no
27753
27754 fi
27755
27756
27757 if test "$gl_gcc_warnings" = yes; then
27758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
27759 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
27760 if ${gl_cv_warn_c__Werror+:} false; then :
27761   $as_echo_n "(cached) " >&6
27762 else
27763
27764   gl_save_compiler_FLAGS="$CFLAGS"
27765   as_fn_append CFLAGS " -Werror"
27766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27767 /* end confdefs.h.  */
27768
27769 int
27770 main ()
27771 {
27772
27773   ;
27774   return 0;
27775 }
27776 _ACEOF
27777 if ac_fn_c_try_compile "$LINENO"; then :
27778   gl_cv_warn_c__Werror=yes
27779 else
27780   gl_cv_warn_c__Werror=no
27781 fi
27782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27783   CFLAGS="$gl_save_compiler_FLAGS"
27784
27785 fi
27786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
27787 $as_echo "$gl_cv_warn_c__Werror" >&6; }
27788 if test "x$gl_cv_warn_c__Werror" = xyes; then :
27789   as_fn_append WERROR_CFLAGS " -Werror"
27790 fi
27791
27792
27793
27794
27795   nw=
27796   # This, $nw, is the list of warnings we disable.
27797   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
27798   nw="$nw -Waggregate-return"       # anachronistic
27799   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
27800   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
27801   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
27802   nw="$nw -Wtraditional"            # Warns on #elif which we use often
27803   nw="$nw -Wcast-qual"              # Too many warnings for now
27804   nw="$nw -Wconversion"             # Too many warnings for now
27805   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
27806   nw="$nw -Wsign-conversion"        # Too many warnings for now
27807   nw="$nw -Wtraditional-conversion" # Too many warnings for now
27808   nw="$nw -Wunreachable-code"       # Too many warnings for now
27809   nw="$nw -Wpadded"                 # Our structs are not padded
27810   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
27811   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
27812   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
27813   nw="$nw -Wvla"                    # warnings in gettext.h
27814   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
27815   nw="$nw -Wswitch-enum"            # Too many warnings for now
27816   nw="$nw -Wswitch-default"         # Too many warnings for now
27817   nw="$nw -Wstack-protector"        # not worth working around
27818   # things I might fix soon:
27819   nw="$nw -Wfloat-equal"            # sort.c, seq.c
27820   nw="$nw -Wmissing-format-attribute" # copy.c
27821   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
27822   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
27823   nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
27824   # initial problems in gzip
27825   nw="$nw -Wold-style-definition"
27826   nw="$nw -Wshadow"
27827   nw="$nw -Wunused-macros"
27828   # ?? -Wstrict-overflow
27829
27830
27831
27832   if test -n "$GCC"; then
27833
27834             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
27835 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
27836     if ${gl_cv_cc_nomfi_supported+:} false; then :
27837   $as_echo_n "(cached) " >&6
27838 else
27839
27840       gl_save_CFLAGS="$CFLAGS"
27841       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
27842       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27843 /* end confdefs.h.  */
27844
27845 int
27846 main ()
27847 {
27848
27849   ;
27850   return 0;
27851 }
27852 _ACEOF
27853 if ac_fn_c_try_compile "$LINENO"; then :
27854   gl_cv_cc_nomfi_supported=yes
27855 else
27856   gl_cv_cc_nomfi_supported=no
27857 fi
27858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27859       CFLAGS="$gl_save_CFLAGS"
27860 fi
27861
27862     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
27863 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
27864
27865     if test "$gl_cv_cc_nomfi_supported" = yes; then
27866                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
27867 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
27868       if ${gl_cv_cc_nomfi_needed+:} false; then :
27869   $as_echo_n "(cached) " >&6
27870 else
27871
27872         gl_save_CFLAGS="$CFLAGS"
27873         CFLAGS="$CFLAGS -W -Werror"
27874         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27875 /* end confdefs.h.  */
27876 void f (void)
27877                {
27878                  typedef struct { int a; int b; } s_t;
27879                  s_t s1 = { 0, };
27880                }
27881
27882 int
27883 main ()
27884 {
27885
27886   ;
27887   return 0;
27888 }
27889 _ACEOF
27890 if ac_fn_c_try_compile "$LINENO"; then :
27891   gl_cv_cc_nomfi_needed=no
27892 else
27893   gl_cv_cc_nomfi_needed=yes
27894 fi
27895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27896         CFLAGS="$gl_save_CFLAGS"
27897
27898 fi
27899
27900       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
27901 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
27902     fi
27903   fi
27904
27905   gl_manywarn_set=
27906   for gl_manywarn_item in \
27907     -Wall \
27908     -W \
27909     -Wformat-y2k \
27910     -Wformat-nonliteral \
27911     -Wformat-security \
27912     -Winit-self \
27913     -Wmissing-include-dirs \
27914     -Wswitch-default \
27915     -Wswitch-enum \
27916     -Wunused \
27917     -Wunknown-pragmas \
27918     -Wstrict-aliasing \
27919     -Wstrict-overflow \
27920     -Wsystem-headers \
27921     -Wfloat-equal \
27922     -Wtraditional \
27923     -Wtraditional-conversion \
27924     -Wdeclaration-after-statement \
27925     -Wundef \
27926     -Wshadow \
27927     -Wunsafe-loop-optimizations \
27928     -Wpointer-arith \
27929     -Wbad-function-cast \
27930     -Wc++-compat \
27931     -Wcast-qual \
27932     -Wcast-align \
27933     -Wwrite-strings \
27934     -Wconversion \
27935     -Wsign-conversion \
27936     -Wlogical-op \
27937     -Waggregate-return \
27938     -Wstrict-prototypes \
27939     -Wold-style-definition \
27940     -Wmissing-prototypes \
27941     -Wmissing-declarations \
27942     -Wmissing-noreturn \
27943     -Wmissing-format-attribute \
27944     -Wpacked \
27945     -Wpadded \
27946     -Wredundant-decls \
27947     -Wnested-externs \
27948     -Wunreachable-code \
27949     -Winline \
27950     -Winvalid-pch \
27951     -Wlong-long \
27952     -Wvla \
27953     -Wvolatile-register-var \
27954     -Wdisabled-optimization \
27955     -Wstack-protector \
27956     -Woverlength-strings \
27957     -Wbuiltin-macro-redefined \
27958     -Wmudflap \
27959     -Wpacked-bitfield-compat \
27960     -Wsync-nand \
27961     ; do
27962     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27963   done
27964   # The following are not documented in the manual but are included in
27965   # output from gcc --help=warnings.
27966   for gl_manywarn_item in \
27967     -Wattributes \
27968     -Wcoverage-mismatch \
27969     -Wunused-macros \
27970     ; do
27971     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27972   done
27973   # More warnings from gcc 4.6.2 --help=warnings.
27974   for gl_manywarn_item in \
27975     -Wabi \
27976     -Wcpp \
27977     -Wdeprecated \
27978     -Wdeprecated-declarations \
27979     -Wdiv-by-zero \
27980     -Wdouble-promotion \
27981     -Wendif-labels \
27982     -Wextra \
27983     -Wformat-contains-nul \
27984     -Wformat-extra-args \
27985     -Wformat-zero-length \
27986     -Wformat=2 \
27987     -Wmultichar \
27988     -Wnormalized=nfc \
27989     -Woverflow \
27990     -Wpointer-to-int-cast \
27991     -Wpragmas \
27992     -Wsuggest-attribute=const \
27993     -Wsuggest-attribute=noreturn \
27994     -Wsuggest-attribute=pure \
27995     -Wtrampolines \
27996     ; do
27997     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27998   done
27999
28000   # Disable the missing-field-initializers warning if needed
28001   if test "$gl_cv_cc_nomfi_needed" = yes; then
28002     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
28003   fi
28004
28005   ws=$gl_manywarn_set
28006
28007
28008   gl_warn_set=
28009   set x $ws; shift
28010   for gl_warn_item
28011   do
28012     case " $nw " in
28013       *" $gl_warn_item "*)
28014         ;;
28015       *)
28016         gl_warn_set="$gl_warn_set $gl_warn_item"
28017         ;;
28018     esac
28019   done
28020   ws=$gl_warn_set
28021
28022   for w in $ws; do
28023     as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
28025 $as_echo_n "checking whether C compiler handles $w... " >&6; }
28026 if eval \${$as_gl_Warn+:} false; then :
28027   $as_echo_n "(cached) " >&6
28028 else
28029
28030   gl_save_compiler_FLAGS="$CFLAGS"
28031   as_fn_append CFLAGS " $w"
28032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28033 /* end confdefs.h.  */
28034
28035 int
28036 main ()
28037 {
28038
28039   ;
28040   return 0;
28041 }
28042 _ACEOF
28043 if ac_fn_c_try_compile "$LINENO"; then :
28044   eval "$as_gl_Warn=yes"
28045 else
28046   eval "$as_gl_Warn=no"
28047 fi
28048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28049   CFLAGS="$gl_save_compiler_FLAGS"
28050
28051 fi
28052 eval ac_res=\$$as_gl_Warn
28053                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28054 $as_echo "$ac_res" >&6; }
28055 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
28056   as_fn_append WARN_CFLAGS " $w"
28057 fi
28058
28059
28060   done
28061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
28062 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
28063 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
28064   $as_echo_n "(cached) " >&6
28065 else
28066
28067   gl_save_compiler_FLAGS="$CFLAGS"
28068   as_fn_append CFLAGS " -Wno-missing-field-initializers"
28069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28070 /* end confdefs.h.  */
28071
28072 int
28073 main ()
28074 {
28075
28076   ;
28077   return 0;
28078 }
28079 _ACEOF
28080 if ac_fn_c_try_compile "$LINENO"; then :
28081   gl_cv_warn_c__Wno_missing_field_initializers=yes
28082 else
28083   gl_cv_warn_c__Wno_missing_field_initializers=no
28084 fi
28085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28086   CFLAGS="$gl_save_compiler_FLAGS"
28087
28088 fi
28089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
28090 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
28091 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
28092   as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
28093 fi
28094
28095  # We need this one
28096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
28097 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
28098 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
28099   $as_echo_n "(cached) " >&6
28100 else
28101
28102   gl_save_compiler_FLAGS="$CFLAGS"
28103   as_fn_append CFLAGS " -Wno-sign-compare"
28104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28105 /* end confdefs.h.  */
28106
28107 int
28108 main ()
28109 {
28110
28111   ;
28112   return 0;
28113 }
28114 _ACEOF
28115 if ac_fn_c_try_compile "$LINENO"; then :
28116   gl_cv_warn_c__Wno_sign_compare=yes
28117 else
28118   gl_cv_warn_c__Wno_sign_compare=no
28119 fi
28120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28121   CFLAGS="$gl_save_compiler_FLAGS"
28122
28123 fi
28124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
28125 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
28126 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
28127   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
28128 fi
28129
28130      # Too many warnings for now
28131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
28132 $as_echo_n "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
28133 if ${gl_cv_warn_c__Wno_pointer_sign+:} false; then :
28134   $as_echo_n "(cached) " >&6
28135 else
28136
28137   gl_save_compiler_FLAGS="$CFLAGS"
28138   as_fn_append CFLAGS " -Wno-pointer-sign"
28139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28140 /* end confdefs.h.  */
28141
28142 int
28143 main ()
28144 {
28145
28146   ;
28147   return 0;
28148 }
28149 _ACEOF
28150 if ac_fn_c_try_compile "$LINENO"; then :
28151   gl_cv_warn_c__Wno_pointer_sign=yes
28152 else
28153   gl_cv_warn_c__Wno_pointer_sign=no
28154 fi
28155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28156   CFLAGS="$gl_save_compiler_FLAGS"
28157
28158 fi
28159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
28160 $as_echo "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
28161 if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes; then :
28162   as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
28163 fi
28164
28165      # Too many warnings for now
28166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
28167 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
28168 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
28169   $as_echo_n "(cached) " >&6
28170 else
28171
28172   gl_save_compiler_FLAGS="$CFLAGS"
28173   as_fn_append CFLAGS " -Wno-unused-parameter"
28174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28175 /* end confdefs.h.  */
28176
28177 int
28178 main ()
28179 {
28180
28181   ;
28182   return 0;
28183 }
28184 _ACEOF
28185 if ac_fn_c_try_compile "$LINENO"; then :
28186   gl_cv_warn_c__Wno_unused_parameter=yes
28187 else
28188   gl_cv_warn_c__Wno_unused_parameter=no
28189 fi
28190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28191   CFLAGS="$gl_save_compiler_FLAGS"
28192
28193 fi
28194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
28195 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
28196 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
28197   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
28198 fi
28199
28200  # Too many warnings for now
28201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-overflow" >&5
28202 $as_echo_n "checking whether C compiler handles -Wno-overflow... " >&6; }
28203 if ${gl_cv_warn_c__Wno_overflow+:} false; then :
28204   $as_echo_n "(cached) " >&6
28205 else
28206
28207   gl_save_compiler_FLAGS="$CFLAGS"
28208   as_fn_append CFLAGS " -Wno-overflow"
28209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28210 /* end confdefs.h.  */
28211
28212 int
28213 main ()
28214 {
28215
28216   ;
28217   return 0;
28218 }
28219 _ACEOF
28220 if ac_fn_c_try_compile "$LINENO"; then :
28221   gl_cv_warn_c__Wno_overflow=yes
28222 else
28223   gl_cv_warn_c__Wno_overflow=no
28224 fi
28225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28226   CFLAGS="$gl_save_compiler_FLAGS"
28227
28228 fi
28229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_overflow" >&5
28230 $as_echo "$gl_cv_warn_c__Wno_overflow" >&6; }
28231 if test "x$gl_cv_warn_c__Wno_overflow" = xyes; then :
28232   as_fn_append WARN_CFLAGS " -Wno-overflow"
28233 fi
28234
28235          # util.c
28236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
28237 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
28238 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
28239   $as_echo_n "(cached) " >&6
28240 else
28241
28242   gl_save_compiler_FLAGS="$CFLAGS"
28243   as_fn_append CFLAGS " -Wno-type-limits"
28244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28245 /* end confdefs.h.  */
28246
28247 int
28248 main ()
28249 {
28250
28251   ;
28252   return 0;
28253 }
28254 _ACEOF
28255 if ac_fn_c_try_compile "$LINENO"; then :
28256   gl_cv_warn_c__Wno_type_limits=yes
28257 else
28258   gl_cv_warn_c__Wno_type_limits=no
28259 fi
28260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28261   CFLAGS="$gl_save_compiler_FLAGS"
28262
28263 fi
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
28265 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
28266 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
28267   as_fn_append WARN_CFLAGS " -Wno-type-limits"
28268 fi
28269
28270       # util.c
28271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
28272 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
28273 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
28274   $as_echo_n "(cached) " >&6
28275 else
28276
28277   gl_save_compiler_FLAGS="$CFLAGS"
28278   as_fn_append CFLAGS " -Wno-format-nonliteral"
28279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28280 /* end confdefs.h.  */
28281
28282 int
28283 main ()
28284 {
28285
28286   ;
28287   return 0;
28288 }
28289 _ACEOF
28290 if ac_fn_c_try_compile "$LINENO"; then :
28291   gl_cv_warn_c__Wno_format_nonliteral=yes
28292 else
28293   gl_cv_warn_c__Wno_format_nonliteral=no
28294 fi
28295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28296   CFLAGS="$gl_save_compiler_FLAGS"
28297
28298 fi
28299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
28300 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
28301 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
28302   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
28303 fi
28304
28305
28306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unsuffixed-float-constants" >&5
28307 $as_echo_n "checking whether C compiler handles -Wno-unsuffixed-float-constants... " >&6; }
28308 if ${gl_cv_warn_c__Wno_unsuffixed_float_constants+:} false; then :
28309   $as_echo_n "(cached) " >&6
28310 else
28311
28312   gl_save_compiler_FLAGS="$CFLAGS"
28313   as_fn_append CFLAGS " -Wno-unsuffixed-float-constants"
28314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28315 /* end confdefs.h.  */
28316
28317 int
28318 main ()
28319 {
28320
28321   ;
28322   return 0;
28323 }
28324 _ACEOF
28325 if ac_fn_c_try_compile "$LINENO"; then :
28326   gl_cv_warn_c__Wno_unsuffixed_float_constants=yes
28327 else
28328   gl_cv_warn_c__Wno_unsuffixed_float_constants=no
28329 fi
28330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28331   CFLAGS="$gl_save_compiler_FLAGS"
28332
28333 fi
28334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unsuffixed_float_constants" >&5
28335 $as_echo "$gl_cv_warn_c__Wno_unsuffixed_float_constants" >&6; }
28336 if test "x$gl_cv_warn_c__Wno_unsuffixed_float_constants" = xyes; then :
28337   as_fn_append WARN_CFLAGS " -Wno-unsuffixed-float-constants"
28338 fi
28339
28340
28341
28342   # In spite of excluding -Wlogical-op above, it is enabled, as of
28343   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
28344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
28345 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
28346 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
28347   $as_echo_n "(cached) " >&6
28348 else
28349
28350   gl_save_compiler_FLAGS="$CFLAGS"
28351   as_fn_append CFLAGS " -Wno-logical-op"
28352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28353 /* end confdefs.h.  */
28354
28355 int
28356 main ()
28357 {
28358
28359   ;
28360   return 0;
28361 }
28362 _ACEOF
28363 if ac_fn_c_try_compile "$LINENO"; then :
28364   gl_cv_warn_c__Wno_logical_op=yes
28365 else
28366   gl_cv_warn_c__Wno_logical_op=no
28367 fi
28368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28369   CFLAGS="$gl_save_compiler_FLAGS"
28370
28371 fi
28372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
28373 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
28374 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
28375   as_fn_append WARN_CFLAGS " -Wno-logical-op"
28376 fi
28377
28378
28379
28380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
28381 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
28382 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
28383   $as_echo_n "(cached) " >&6
28384 else
28385
28386   gl_save_compiler_FLAGS="$CFLAGS"
28387   as_fn_append CFLAGS " -fdiagnostics-show-option"
28388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28389 /* end confdefs.h.  */
28390
28391 int
28392 main ()
28393 {
28394
28395   ;
28396   return 0;
28397 }
28398 _ACEOF
28399 if ac_fn_c_try_compile "$LINENO"; then :
28400   gl_cv_warn_c__fdiagnostics_show_option=yes
28401 else
28402   gl_cv_warn_c__fdiagnostics_show_option=no
28403 fi
28404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28405   CFLAGS="$gl_save_compiler_FLAGS"
28406
28407 fi
28408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
28409 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
28410 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
28411   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
28412 fi
28413
28414
28415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
28416 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
28417 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
28418   $as_echo_n "(cached) " >&6
28419 else
28420
28421   gl_save_compiler_FLAGS="$CFLAGS"
28422   as_fn_append CFLAGS " -funit-at-a-time"
28423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28424 /* end confdefs.h.  */
28425
28426 int
28427 main ()
28428 {
28429
28430   ;
28431   return 0;
28432 }
28433 _ACEOF
28434 if ac_fn_c_try_compile "$LINENO"; then :
28435   gl_cv_warn_c__funit_at_a_time=yes
28436 else
28437   gl_cv_warn_c__funit_at_a_time=no
28438 fi
28439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28440   CFLAGS="$gl_save_compiler_FLAGS"
28441
28442 fi
28443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
28444 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
28445 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
28446   as_fn_append WARN_CFLAGS " -funit-at-a-time"
28447 fi
28448
28449
28450
28451
28452
28453
28454 $as_echo "#define lint 1" >>confdefs.h
28455
28456
28457 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
28458
28459
28460 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
28461
28462
28463   # We use a slightly smaller set of warning options for lib/.
28464   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
28465   nw=
28466   nw="$nw -Wuninitialized"
28467   nw="$nw -Wmissing-prototypes"
28468   nw="$nw -Wold-style-definition"
28469
28470   gl_warn_set=
28471   set x $WARN_CFLAGS; shift
28472   for gl_warn_item
28473   do
28474     case " $nw " in
28475       *" $gl_warn_item "*)
28476         ;;
28477       *)
28478         gl_warn_set="$gl_warn_set $gl_warn_item"
28479         ;;
28480     esac
28481   done
28482   GNULIB_WARN_CFLAGS=$gl_warn_set
28483
28484
28485 fi
28486
28487 # cc -E produces incorrect asm files on SVR4, so postprocess it.
28488 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
28489
28490
28491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
28492 $as_echo_n "checking for underline in external names... " >&6; }
28493 if ${gzip_cv_underline+:} false; then :
28494   $as_echo_n "(cached) " >&6
28495 else
28496   gzip_cv_underline=yes
28497    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28498 /* end confdefs.h.  */
28499 int foo() {return 0;}
28500 int
28501 main ()
28502 {
28503
28504   ;
28505   return 0;
28506 }
28507 _ACEOF
28508 if ac_fn_c_try_compile "$LINENO"; then :
28509   $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
28510         gzip_cv_underline=no
28511 fi
28512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28513 fi
28514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
28515 $as_echo "$gzip_cv_underline" >&6; }
28516 ASCPPFLAGS=
28517 if test $gzip_cv_underline = no; then
28518   ASCPPFLAGS='-DNO_UNDERLINE'
28519 fi
28520
28521
28522
28523 # Try to assemble match.S.
28524 # "gcc -E match.s" ignores -E, so we must use _match.S.
28525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
28526 $as_echo_n "checking for an assembler syntax supported by this package... " >&6; }
28527 if ${gzip_cv_assembler+:} false; then :
28528   $as_echo_n "(cached) " >&6
28529 else
28530   gzip_cv_assembler=no
28531    case " $DEFS " in
28532    *' NO_ASM '*) ;;
28533    *)
28534      if cp $srcdir/lib/match.c _match.S &&
28535         eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
28536         eval "$ASCPPPOST < _match.i > match_.s"; then
28537        if test ! -s match_.s || grep error < match_.s > /dev/null; then
28538          :
28539        elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
28540             test -f match_.$OBJEXT; then
28541          rm -f match_.$OBJEXT
28542          gzip_cv_assembler=yes
28543          if echo 'void foo (void) {}' > conftest.c &&
28544             eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
28545             grep '\.note\.GNU-stack' conftest.s >/dev/null &&
28546             eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
28547             test -f match_.$OBJEXT; then
28548            gzip_cv_assembler='yes, with -Wa,--noexecstack'
28549          fi
28550        fi
28551      fi
28552      rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
28553    esac
28554 fi
28555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
28556 $as_echo "$gzip_cv_assembler" >&6; }
28557 if test "$gzip_cv_assembler" != no; then
28558
28559 $as_echo "#define ASMV /**/" >>confdefs.h
28560
28561   case " $LIBOBJS " in
28562   *" match.$ac_objext "* ) ;;
28563   *) LIBOBJS="$LIBOBJS match.$ac_objext"
28564  ;;
28565 esac
28566
28567 fi
28568 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
28569   ASFLAGS_config='-Wa,--noexecstack'
28570 else
28571   ASFLAGS_config=
28572 fi
28573
28574
28575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
28576 $as_echo_n "checking for library containing strerror... " >&6; }
28577 if ${ac_cv_search_strerror+:} false; then :
28578   $as_echo_n "(cached) " >&6
28579 else
28580   ac_func_search_save_LIBS=$LIBS
28581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28582 /* end confdefs.h.  */
28583
28584 /* Override any GCC internal prototype to avoid an error.
28585    Use char because int might match the return type of a GCC
28586    builtin and then its argument prototype would still apply.  */
28587 #ifdef __cplusplus
28588 extern "C"
28589 #endif
28590 char strerror ();
28591 int
28592 main ()
28593 {
28594 return strerror ();
28595   ;
28596   return 0;
28597 }
28598 _ACEOF
28599 for ac_lib in '' cposix; do
28600   if test -z "$ac_lib"; then
28601     ac_res="none required"
28602   else
28603     ac_res=-l$ac_lib
28604     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28605   fi
28606   if ac_fn_c_try_link "$LINENO"; then :
28607   ac_cv_search_strerror=$ac_res
28608 fi
28609 rm -f core conftest.err conftest.$ac_objext \
28610     conftest$ac_exeext
28611   if ${ac_cv_search_strerror+:} false; then :
28612   break
28613 fi
28614 done
28615 if ${ac_cv_search_strerror+:} false; then :
28616
28617 else
28618   ac_cv_search_strerror=no
28619 fi
28620 rm conftest.$ac_ext
28621 LIBS=$ac_func_search_save_LIBS
28622 fi
28623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
28624 $as_echo "$ac_cv_search_strerror" >&6; }
28625 ac_res=$ac_cv_search_strerror
28626 if test "$ac_res" != no; then :
28627   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28628
28629 fi
28630
28631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
28632 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
28633 if ${ac_cv_c_const+:} false; then :
28634   $as_echo_n "(cached) " >&6
28635 else
28636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28637 /* end confdefs.h.  */
28638
28639 int
28640 main ()
28641 {
28642
28643 #ifndef __cplusplus
28644   /* Ultrix mips cc rejects this sort of thing.  */
28645   typedef int charset[2];
28646   const charset cs = { 0, 0 };
28647   /* SunOS 4.1.1 cc rejects this.  */
28648   char const *const *pcpcc;
28649   char **ppc;
28650   /* NEC SVR4.0.2 mips cc rejects this.  */
28651   struct point {int x, y;};
28652   static struct point const zero = {0,0};
28653   /* AIX XL C 1.02.0.0 rejects this.
28654      It does not let you subtract one const X* pointer from another in
28655      an arm of an if-expression whose if-part is not a constant
28656      expression */
28657   const char *g = "string";
28658   pcpcc = &g + (g ? g-g : 0);
28659   /* HPUX 7.0 cc rejects these. */
28660   ++pcpcc;
28661   ppc = (char**) pcpcc;
28662   pcpcc = (char const *const *) ppc;
28663   { /* SCO 3.2v4 cc rejects this sort of thing.  */
28664     char tx;
28665     char *t = &tx;
28666     char const *s = 0 ? (char *) 0 : (char const *) 0;
28667
28668     *t++ = 0;
28669     if (s) return 0;
28670   }
28671   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
28672     int x[] = {25, 17};
28673     const int *foo = &x[0];
28674     ++foo;
28675   }
28676   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
28677     typedef const int *iptr;
28678     iptr p = 0;
28679     ++p;
28680   }
28681   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
28682        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
28683     struct s { int j; const int *ap[3]; } bx;
28684     struct s *b = &bx; b->j = 5;
28685   }
28686   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
28687     const int foo = 10;
28688     if (!foo) return 0;
28689   }
28690   return !cs[0] && !zero.x;
28691 #endif
28692
28693   ;
28694   return 0;
28695 }
28696 _ACEOF
28697 if ac_fn_c_try_compile "$LINENO"; then :
28698   ac_cv_c_const=yes
28699 else
28700   ac_cv_c_const=no
28701 fi
28702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28703 fi
28704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
28705 $as_echo "$ac_cv_c_const" >&6; }
28706 if test $ac_cv_c_const = no; then
28707
28708 $as_echo "#define const /**/" >>confdefs.h
28709
28710 fi
28711
28712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28713 $as_echo_n "checking for ANSI C header files... " >&6; }
28714 if ${ac_cv_header_stdc+:} false; then :
28715   $as_echo_n "(cached) " >&6
28716 else
28717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28718 /* end confdefs.h.  */
28719 #include <stdlib.h>
28720 #include <stdarg.h>
28721 #include <string.h>
28722 #include <float.h>
28723
28724 int
28725 main ()
28726 {
28727
28728   ;
28729   return 0;
28730 }
28731 _ACEOF
28732 if ac_fn_c_try_compile "$LINENO"; then :
28733   ac_cv_header_stdc=yes
28734 else
28735   ac_cv_header_stdc=no
28736 fi
28737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28738
28739 if test $ac_cv_header_stdc = yes; then
28740   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28742 /* end confdefs.h.  */
28743 #include <string.h>
28744
28745 _ACEOF
28746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28747   $EGREP "memchr" >/dev/null 2>&1; then :
28748
28749 else
28750   ac_cv_header_stdc=no
28751 fi
28752 rm -f conftest*
28753
28754 fi
28755
28756 if test $ac_cv_header_stdc = yes; then
28757   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28759 /* end confdefs.h.  */
28760 #include <stdlib.h>
28761
28762 _ACEOF
28763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28764   $EGREP "free" >/dev/null 2>&1; then :
28765
28766 else
28767   ac_cv_header_stdc=no
28768 fi
28769 rm -f conftest*
28770
28771 fi
28772
28773 if test $ac_cv_header_stdc = yes; then
28774   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28775   if test "$cross_compiling" = yes; then :
28776   :
28777 else
28778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28779 /* end confdefs.h.  */
28780 #include <ctype.h>
28781 #include <stdlib.h>
28782 #if ((' ' & 0x0FF) == 0x020)
28783 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28784 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28785 #else
28786 # define ISLOWER(c) \
28787                    (('a' <= (c) && (c) <= 'i') \
28788                      || ('j' <= (c) && (c) <= 'r') \
28789                      || ('s' <= (c) && (c) <= 'z'))
28790 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28791 #endif
28792
28793 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28794 int
28795 main ()
28796 {
28797   int i;
28798   for (i = 0; i < 256; i++)
28799     if (XOR (islower (i), ISLOWER (i))
28800         || toupper (i) != TOUPPER (i))
28801       return 2;
28802   return 0;
28803 }
28804 _ACEOF
28805 if ac_fn_c_try_run "$LINENO"; then :
28806
28807 else
28808   ac_cv_header_stdc=no
28809 fi
28810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28811   conftest.$ac_objext conftest.beam conftest.$ac_ext
28812 fi
28813
28814 fi
28815 fi
28816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28817 $as_echo "$ac_cv_header_stdc" >&6; }
28818 if test $ac_cv_header_stdc = yes; then
28819
28820 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28821
28822 fi
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842 ac_header_dirent=no
28843 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28844   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
28846 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
28847 if eval \${$as_ac_Header+:} false; then :
28848   $as_echo_n "(cached) " >&6
28849 else
28850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h.  */
28852 #include <sys/types.h>
28853 #include <$ac_hdr>
28854
28855 int
28856 main ()
28857 {
28858 if ((DIR *) 0)
28859 return 0;
28860   ;
28861   return 0;
28862 }
28863 _ACEOF
28864 if ac_fn_c_try_compile "$LINENO"; then :
28865   eval "$as_ac_Header=yes"
28866 else
28867   eval "$as_ac_Header=no"
28868 fi
28869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28870 fi
28871 eval ac_res=\$$as_ac_Header
28872                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28873 $as_echo "$ac_res" >&6; }
28874 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28875   cat >>confdefs.h <<_ACEOF
28876 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
28877 _ACEOF
28878
28879 ac_header_dirent=$ac_hdr; break
28880 fi
28881
28882 done
28883 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28884 if test $ac_header_dirent = dirent.h; then
28885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28886 $as_echo_n "checking for library containing opendir... " >&6; }
28887 if ${ac_cv_search_opendir+:} false; then :
28888   $as_echo_n "(cached) " >&6
28889 else
28890   ac_func_search_save_LIBS=$LIBS
28891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28892 /* end confdefs.h.  */
28893
28894 /* Override any GCC internal prototype to avoid an error.
28895    Use char because int might match the return type of a GCC
28896    builtin and then its argument prototype would still apply.  */
28897 #ifdef __cplusplus
28898 extern "C"
28899 #endif
28900 char opendir ();
28901 int
28902 main ()
28903 {
28904 return opendir ();
28905   ;
28906   return 0;
28907 }
28908 _ACEOF
28909 for ac_lib in '' dir; do
28910   if test -z "$ac_lib"; then
28911     ac_res="none required"
28912   else
28913     ac_res=-l$ac_lib
28914     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28915   fi
28916   if ac_fn_c_try_link "$LINENO"; then :
28917   ac_cv_search_opendir=$ac_res
28918 fi
28919 rm -f core conftest.err conftest.$ac_objext \
28920     conftest$ac_exeext
28921   if ${ac_cv_search_opendir+:} false; then :
28922   break
28923 fi
28924 done
28925 if ${ac_cv_search_opendir+:} false; then :
28926
28927 else
28928   ac_cv_search_opendir=no
28929 fi
28930 rm conftest.$ac_ext
28931 LIBS=$ac_func_search_save_LIBS
28932 fi
28933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28934 $as_echo "$ac_cv_search_opendir" >&6; }
28935 ac_res=$ac_cv_search_opendir
28936 if test "$ac_res" != no; then :
28937   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28938
28939 fi
28940
28941 else
28942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28943 $as_echo_n "checking for library containing opendir... " >&6; }
28944 if ${ac_cv_search_opendir+:} false; then :
28945   $as_echo_n "(cached) " >&6
28946 else
28947   ac_func_search_save_LIBS=$LIBS
28948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28949 /* end confdefs.h.  */
28950
28951 /* Override any GCC internal prototype to avoid an error.
28952    Use char because int might match the return type of a GCC
28953    builtin and then its argument prototype would still apply.  */
28954 #ifdef __cplusplus
28955 extern "C"
28956 #endif
28957 char opendir ();
28958 int
28959 main ()
28960 {
28961 return opendir ();
28962   ;
28963   return 0;
28964 }
28965 _ACEOF
28966 for ac_lib in '' x; do
28967   if test -z "$ac_lib"; then
28968     ac_res="none required"
28969   else
28970     ac_res=-l$ac_lib
28971     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28972   fi
28973   if ac_fn_c_try_link "$LINENO"; then :
28974   ac_cv_search_opendir=$ac_res
28975 fi
28976 rm -f core conftest.err conftest.$ac_objext \
28977     conftest$ac_exeext
28978   if ${ac_cv_search_opendir+:} false; then :
28979   break
28980 fi
28981 done
28982 if ${ac_cv_search_opendir+:} false; then :
28983
28984 else
28985   ac_cv_search_opendir=no
28986 fi
28987 rm conftest.$ac_ext
28988 LIBS=$ac_func_search_save_LIBS
28989 fi
28990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28991 $as_echo "$ac_cv_search_opendir" >&6; }
28992 ac_res=$ac_cv_search_opendir
28993 if test "$ac_res" != no; then :
28994   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28995
28996 fi
28997
28998 fi
28999
29000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
29001 $as_echo_n "checking return type of signal handlers... " >&6; }
29002 if ${ac_cv_type_signal+:} false; then :
29003   $as_echo_n "(cached) " >&6
29004 else
29005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29006 /* end confdefs.h.  */
29007 #include <sys/types.h>
29008 #include <signal.h>
29009
29010 int
29011 main ()
29012 {
29013 return *(signal (0, 0)) (0) == 1;
29014   ;
29015   return 0;
29016 }
29017 _ACEOF
29018 if ac_fn_c_try_compile "$LINENO"; then :
29019   ac_cv_type_signal=int
29020 else
29021   ac_cv_type_signal=void
29022 fi
29023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29024 fi
29025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
29026 $as_echo "$ac_cv_type_signal" >&6; }
29027
29028 cat >>confdefs.h <<_ACEOF
29029 #define RETSIGTYPE $ac_cv_type_signal
29030 _ACEOF
29031
29032
29033 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
29034 if test "x$ac_cv_type_size_t" = xyes; then :
29035
29036 else
29037
29038 cat >>confdefs.h <<_ACEOF
29039 #define size_t unsigned int
29040 _ACEOF
29041
29042 fi
29043
29044 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
29045 if test "x$ac_cv_type_off_t" = xyes; then :
29046
29047 else
29048
29049 cat >>confdefs.h <<_ACEOF
29050 #define off_t long int
29051 _ACEOF
29052
29053 fi
29054
29055
29056 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
29057
29058 cat >confcache <<\_ACEOF
29059 # This file is a shell script that caches the results of configure
29060 # tests run on this system so they can be shared between configure
29061 # scripts and configure runs, see configure's option --config-cache.
29062 # It is not useful on other systems.  If it contains results you don't
29063 # want to keep, you may remove or edit it.
29064 #
29065 # config.status only pays attention to the cache file if you give it
29066 # the --recheck option to rerun configure.
29067 #
29068 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29069 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29070 # following values.
29071
29072 _ACEOF
29073
29074 # The following way of writing the cache mishandles newlines in values,
29075 # but we know of no workaround that is simple, portable, and efficient.
29076 # So, we kill variables containing newlines.
29077 # Ultrix sh set writes to stderr and can't be redirected directly,
29078 # and sets the high bit in the cache file unless we assign to the vars.
29079 (
29080   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29081     eval ac_val=\$$ac_var
29082     case $ac_val in #(
29083     *${as_nl}*)
29084       case $ac_var in #(
29085       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29086 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29087       esac
29088       case $ac_var in #(
29089       _ | IFS | as_nl) ;; #(
29090       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29091       *) { eval $ac_var=; unset $ac_var;} ;;
29092       esac ;;
29093     esac
29094   done
29095
29096   (set) 2>&1 |
29097     case $as_nl`(ac_space=' '; set) 2>&1` in #(
29098     *${as_nl}ac_space=\ *)
29099       # `set' does not quote correctly, so add quotes: double-quote
29100       # substitution turns \\\\ into \\, and sed turns \\ into \.
29101       sed -n \
29102         "s/'/'\\\\''/g;
29103           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29104       ;; #(
29105     *)
29106       # `set' quotes correctly as required by POSIX, so do not add quotes.
29107       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29108       ;;
29109     esac |
29110     sort
29111 ) |
29112   sed '
29113      /^ac_cv_env_/b end
29114      t clear
29115      :clear
29116      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29117      t end
29118      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29119      :end' >>confcache
29120 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29121   if test -w "$cache_file"; then
29122     if test "x$cache_file" != "x/dev/null"; then
29123       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29124 $as_echo "$as_me: updating cache $cache_file" >&6;}
29125       if test ! -f "$cache_file" || test -h "$cache_file"; then
29126         cat confcache >"$cache_file"
29127       else
29128         case $cache_file in #(
29129         */* | ?:*)
29130           mv -f confcache "$cache_file"$$ &&
29131           mv -f "$cache_file"$$ "$cache_file" ;; #(
29132         *)
29133           mv -f confcache "$cache_file" ;;
29134         esac
29135       fi
29136     fi
29137   else
29138     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29139 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29140   fi
29141 fi
29142 rm -f confcache
29143
29144 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29145 # Let make expand exec_prefix.
29146 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29147
29148 DEFS=-DHAVE_CONFIG_H
29149
29150 ac_libobjs=
29151 ac_ltlibobjs=
29152 U=
29153 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29154   # 1. Remove the extension, and $U if already installed.
29155   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29156   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29157   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
29158   #    will be set to the directory where LIBOBJS objects are built.
29159   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29160   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29161 done
29162 LIBOBJS=$ac_libobjs
29163
29164 LTLIBOBJS=$ac_ltlibobjs
29165
29166
29167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29168 $as_echo_n "checking that generated files are newer than configure... " >&6; }
29169    if test -n "$am_sleep_pid"; then
29170      # Hide warnings about reused PIDs.
29171      wait $am_sleep_pid 2>/dev/null
29172    fi
29173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29174 $as_echo "done" >&6; }
29175  if test -n "$EXEEXT"; then
29176   am__EXEEXT_TRUE=
29177   am__EXEEXT_FALSE='#'
29178 else
29179   am__EXEEXT_TRUE='#'
29180   am__EXEEXT_FALSE=
29181 fi
29182
29183 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
29184   as_fn_error $? "conditional \"AMDEP\" was never defined.
29185 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29186 fi
29187 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
29188   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
29189 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29190 fi
29191 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
29192   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
29193 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29194 fi
29195 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
29196   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
29197 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29198 fi
29199 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29200   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29201 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29202 fi
29203 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
29204   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
29205 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29206 fi
29207
29208
29209 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
29210   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
29211 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29212 fi
29213 CONFIG_INCLUDE=lib/config.h
29214
29215 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
29216   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
29217 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29218 fi
29219 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
29220   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
29221 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29222 fi
29223 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
29224   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
29225 Usually this means the macro was only invoked conditionally." "$LINENO" 5
29226 fi
29227
29228     gl_libobjs=
29229     gl_ltlibobjs=
29230     if test -n "$gl_LIBOBJS"; then
29231       # Remove the extension.
29232       sed_drop_objext='s/\.o$//;s/\.obj$//'
29233       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29234         gl_libobjs="$gl_libobjs $i.$ac_objext"
29235         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29236       done
29237     fi
29238     gl_LIBOBJS=$gl_libobjs
29239
29240     gl_LTLIBOBJS=$gl_ltlibobjs
29241
29242
29243
29244     gltests_libobjs=
29245     gltests_ltlibobjs=
29246     if test -n "$gltests_LIBOBJS"; then
29247       # Remove the extension.
29248       sed_drop_objext='s/\.o$//;s/\.obj$//'
29249       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29250         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29251         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29252       done
29253     fi
29254     gltests_LIBOBJS=$gltests_libobjs
29255
29256     gltests_LTLIBOBJS=$gltests_ltlibobjs
29257
29258
29259
29260 : "${CONFIG_STATUS=./config.status}"
29261 ac_write_fail=0
29262 ac_clean_files_save=$ac_clean_files
29263 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29264 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29265 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29266 as_write_fail=0
29267 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29268 #! $SHELL
29269 # Generated by $as_me.
29270 # Run this file to recreate the current configuration.
29271 # Compiler output produced by configure, useful for debugging
29272 # configure, is in config.log if it exists.
29273
29274 debug=false
29275 ac_cs_recheck=false
29276 ac_cs_silent=false
29277
29278 SHELL=\${CONFIG_SHELL-$SHELL}
29279 export SHELL
29280 _ASEOF
29281 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29282 ## -------------------- ##
29283 ## M4sh Initialization. ##
29284 ## -------------------- ##
29285
29286 # Be more Bourne compatible
29287 DUALCASE=1; export DUALCASE # for MKS sh
29288 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29289   emulate sh
29290   NULLCMD=:
29291   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29292   # is contrary to our usage.  Disable this feature.
29293   alias -g '${1+"$@"}'='"$@"'
29294   setopt NO_GLOB_SUBST
29295 else
29296   case `(set -o) 2>/dev/null` in #(
29297   *posix*) :
29298     set -o posix ;; #(
29299   *) :
29300      ;;
29301 esac
29302 fi
29303
29304
29305 as_nl='
29306 '
29307 export as_nl
29308 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29309 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29310 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29311 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29312 # Prefer a ksh shell builtin over an external printf program on Solaris,
29313 # but without wasting forks for bash or zsh.
29314 if test -z "$BASH_VERSION$ZSH_VERSION" \
29315     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29316   as_echo='print -r --'
29317   as_echo_n='print -rn --'
29318 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29319   as_echo='printf %s\n'
29320   as_echo_n='printf %s'
29321 else
29322   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29323     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29324     as_echo_n='/usr/ucb/echo -n'
29325   else
29326     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29327     as_echo_n_body='eval
29328       arg=$1;
29329       case $arg in #(
29330       *"$as_nl"*)
29331         expr "X$arg" : "X\\(.*\\)$as_nl";
29332         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29333       esac;
29334       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29335     '
29336     export as_echo_n_body
29337     as_echo_n='sh -c $as_echo_n_body as_echo'
29338   fi
29339   export as_echo_body
29340   as_echo='sh -c $as_echo_body as_echo'
29341 fi
29342
29343 # The user is always right.
29344 if test "${PATH_SEPARATOR+set}" != set; then
29345   PATH_SEPARATOR=:
29346   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29347     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29348       PATH_SEPARATOR=';'
29349   }
29350 fi
29351
29352
29353 # IFS
29354 # We need space, tab and new line, in precisely that order.  Quoting is
29355 # there to prevent editors from complaining about space-tab.
29356 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29357 # splitting by setting IFS to empty value.)
29358 IFS=" ""        $as_nl"
29359
29360 # Find who we are.  Look in the path if we contain no directory separator.
29361 as_myself=
29362 case $0 in #((
29363   *[\\/]* ) as_myself=$0 ;;
29364   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29365 for as_dir in $PATH
29366 do
29367   IFS=$as_save_IFS
29368   test -z "$as_dir" && as_dir=.
29369     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29370   done
29371 IFS=$as_save_IFS
29372
29373      ;;
29374 esac
29375 # We did not find ourselves, most probably we were run as `sh COMMAND'
29376 # in which case we are not to be found in the path.
29377 if test "x$as_myself" = x; then
29378   as_myself=$0
29379 fi
29380 if test ! -f "$as_myself"; then
29381   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29382   exit 1
29383 fi
29384
29385 # Unset variables that we do not need and which cause bugs (e.g. in
29386 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
29387 # suppresses any "Segmentation fault" message there.  '((' could
29388 # trigger a bug in pdksh 5.2.14.
29389 for as_var in BASH_ENV ENV MAIL MAILPATH
29390 do eval test x\${$as_var+set} = xset \
29391   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29392 done
29393 PS1='$ '
29394 PS2='> '
29395 PS4='+ '
29396
29397 # NLS nuisances.
29398 LC_ALL=C
29399 export LC_ALL
29400 LANGUAGE=C
29401 export LANGUAGE
29402
29403 # CDPATH.
29404 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29405
29406
29407 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29408 # ----------------------------------------
29409 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29410 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29411 # script with STATUS, using 1 if that was 0.
29412 as_fn_error ()
29413 {
29414   as_status=$1; test $as_status -eq 0 && as_status=1
29415   if test "$4"; then
29416     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29417     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29418   fi
29419   $as_echo "$as_me: error: $2" >&2
29420   as_fn_exit $as_status
29421 } # as_fn_error
29422
29423
29424 # as_fn_set_status STATUS
29425 # -----------------------
29426 # Set $? to STATUS, without forking.
29427 as_fn_set_status ()
29428 {
29429   return $1
29430 } # as_fn_set_status
29431
29432 # as_fn_exit STATUS
29433 # -----------------
29434 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29435 as_fn_exit ()
29436 {
29437   set +e
29438   as_fn_set_status $1
29439   exit $1
29440 } # as_fn_exit
29441
29442 # as_fn_unset VAR
29443 # ---------------
29444 # Portably unset VAR.
29445 as_fn_unset ()
29446 {
29447   { eval $1=; unset $1;}
29448 }
29449 as_unset=as_fn_unset
29450 # as_fn_append VAR VALUE
29451 # ----------------------
29452 # Append the text in VALUE to the end of the definition contained in VAR. Take
29453 # advantage of any shell optimizations that allow amortized linear growth over
29454 # repeated appends, instead of the typical quadratic growth present in naive
29455 # implementations.
29456 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29457   eval 'as_fn_append ()
29458   {
29459     eval $1+=\$2
29460   }'
29461 else
29462   as_fn_append ()
29463   {
29464     eval $1=\$$1\$2
29465   }
29466 fi # as_fn_append
29467
29468 # as_fn_arith ARG...
29469 # ------------------
29470 # Perform arithmetic evaluation on the ARGs, and store the result in the
29471 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29472 # must be portable across $(()) and expr.
29473 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29474   eval 'as_fn_arith ()
29475   {
29476     as_val=$(( $* ))
29477   }'
29478 else
29479   as_fn_arith ()
29480   {
29481     as_val=`expr "$@" || test $? -eq 1`
29482   }
29483 fi # as_fn_arith
29484
29485
29486 if expr a : '\(a\)' >/dev/null 2>&1 &&
29487    test "X`expr 00001 : '.*\(...\)'`" = X001; then
29488   as_expr=expr
29489 else
29490   as_expr=false
29491 fi
29492
29493 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29494   as_basename=basename
29495 else
29496   as_basename=false
29497 fi
29498
29499 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29500   as_dirname=dirname
29501 else
29502   as_dirname=false
29503 fi
29504
29505 as_me=`$as_basename -- "$0" ||
29506 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29507          X"$0" : 'X\(//\)$' \| \
29508          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29509 $as_echo X/"$0" |
29510     sed '/^.*\/\([^/][^/]*\)\/*$/{
29511             s//\1/
29512             q
29513           }
29514           /^X\/\(\/\/\)$/{
29515             s//\1/
29516             q
29517           }
29518           /^X\/\(\/\).*/{
29519             s//\1/
29520             q
29521           }
29522           s/.*/./; q'`
29523
29524 # Avoid depending upon Character Ranges.
29525 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29526 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29527 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29528 as_cr_digits='0123456789'
29529 as_cr_alnum=$as_cr_Letters$as_cr_digits
29530
29531 ECHO_C= ECHO_N= ECHO_T=
29532 case `echo -n x` in #(((((
29533 -n*)
29534   case `echo 'xy\c'` in
29535   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
29536   xy)  ECHO_C='\c';;
29537   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
29538        ECHO_T=' ';;
29539   esac;;
29540 *)
29541   ECHO_N='-n';;
29542 esac
29543
29544 rm -f conf$$ conf$$.exe conf$$.file
29545 if test -d conf$$.dir; then
29546   rm -f conf$$.dir/conf$$.file
29547 else
29548   rm -f conf$$.dir
29549   mkdir conf$$.dir 2>/dev/null
29550 fi
29551 if (echo >conf$$.file) 2>/dev/null; then
29552   if ln -s conf$$.file conf$$ 2>/dev/null; then
29553     as_ln_s='ln -s'
29554     # ... but there are two gotchas:
29555     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29556     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29557     # In both cases, we have to default to `cp -pR'.
29558     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29559       as_ln_s='cp -pR'
29560   elif ln conf$$.file conf$$ 2>/dev/null; then
29561     as_ln_s=ln
29562   else
29563     as_ln_s='cp -pR'
29564   fi
29565 else
29566   as_ln_s='cp -pR'
29567 fi
29568 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29569 rmdir conf$$.dir 2>/dev/null
29570
29571
29572 # as_fn_mkdir_p
29573 # -------------
29574 # Create "$as_dir" as a directory, including parents if necessary.
29575 as_fn_mkdir_p ()
29576 {
29577
29578   case $as_dir in #(
29579   -*) as_dir=./$as_dir;;
29580   esac
29581   test -d "$as_dir" || eval $as_mkdir_p || {
29582     as_dirs=
29583     while :; do
29584       case $as_dir in #(
29585       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29586       *) as_qdir=$as_dir;;
29587       esac
29588       as_dirs="'$as_qdir' $as_dirs"
29589       as_dir=`$as_dirname -- "$as_dir" ||
29590 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29591          X"$as_dir" : 'X\(//\)[^/]' \| \
29592          X"$as_dir" : 'X\(//\)$' \| \
29593          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29594 $as_echo X"$as_dir" |
29595     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29596             s//\1/
29597             q
29598           }
29599           /^X\(\/\/\)[^/].*/{
29600             s//\1/
29601             q
29602           }
29603           /^X\(\/\/\)$/{
29604             s//\1/
29605             q
29606           }
29607           /^X\(\/\).*/{
29608             s//\1/
29609             q
29610           }
29611           s/.*/./; q'`
29612       test -d "$as_dir" && break
29613     done
29614     test -z "$as_dirs" || eval "mkdir $as_dirs"
29615   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29616
29617
29618 } # as_fn_mkdir_p
29619 if mkdir -p . 2>/dev/null; then
29620   as_mkdir_p='mkdir -p "$as_dir"'
29621 else
29622   test -d ./-p && rmdir ./-p
29623   as_mkdir_p=false
29624 fi
29625
29626
29627 # as_fn_executable_p FILE
29628 # -----------------------
29629 # Test if FILE is an executable regular file.
29630 as_fn_executable_p ()
29631 {
29632   test -f "$1" && test -x "$1"
29633 } # as_fn_executable_p
29634 as_test_x='test -x'
29635 as_executable_p=as_fn_executable_p
29636
29637 # Sed expression to map a string onto a valid CPP name.
29638 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29639
29640 # Sed expression to map a string onto a valid variable name.
29641 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29642
29643
29644 exec 6>&1
29645 ## ----------------------------------- ##
29646 ## Main body of $CONFIG_STATUS script. ##
29647 ## ----------------------------------- ##
29648 _ASEOF
29649 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29650
29651 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29652 # Save the log message, to keep $0 and so on meaningful, and to
29653 # report actual input values of CONFIG_FILES etc. instead of their
29654 # values after options handling.
29655 ac_log="
29656 This file was extended by gzip $as_me 1.5, which was
29657 generated by GNU Autoconf 2.69.4-560f.  Invocation command line was
29658
29659   CONFIG_FILES    = $CONFIG_FILES
29660   CONFIG_HEADERS  = $CONFIG_HEADERS
29661   CONFIG_LINKS    = $CONFIG_LINKS
29662   CONFIG_COMMANDS = $CONFIG_COMMANDS
29663   $ $0 $@
29664
29665 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29666 "
29667
29668 _ACEOF
29669
29670 case $ac_config_files in *"
29671 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29672 esac
29673
29674 case $ac_config_headers in *"
29675 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29676 esac
29677
29678
29679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29680 # Files that config.status was made for.
29681 config_files="$ac_config_files"
29682 config_headers="$ac_config_headers"
29683 config_links="$ac_config_links"
29684 config_commands="$ac_config_commands"
29685
29686 _ACEOF
29687
29688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29689 ac_cs_usage="\
29690 \`$as_me' instantiates files and other configuration actions
29691 from templates according to the current configuration.  Unless the files
29692 and actions are specified as TAGs, all are instantiated by default.
29693
29694 Usage: $0 [OPTION]... [TAG]...
29695
29696   -h, --help       print this help, then exit
29697   -V, --version    print version number and configuration settings, then exit
29698       --config     print configuration, then exit
29699   -q, --quiet, --silent
29700                    do not print progress messages
29701   -d, --debug      don't remove temporary files
29702       --recheck    update $as_me by reconfiguring in the same conditions
29703       --file=FILE[:TEMPLATE]
29704                    instantiate the configuration file FILE
29705       --header=FILE[:TEMPLATE]
29706                    instantiate the configuration header FILE
29707
29708 Configuration files:
29709 $config_files
29710
29711 Configuration headers:
29712 $config_headers
29713
29714 Configuration links:
29715 $config_links
29716
29717 Configuration commands:
29718 $config_commands
29719
29720 Report bugs to <bug-gzip@gnu.org>."
29721
29722 _ACEOF
29723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29724 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29725 ac_cs_version="\\
29726 gzip config.status 1.5
29727 configured by $0, generated by GNU Autoconf 2.69.4-560f,
29728   with options \\"\$ac_cs_config\\"
29729
29730 Copyright (C) 2012 Free Software Foundation, Inc.
29731 This config.status script is free software; the Free Software Foundation
29732 gives unlimited permission to copy, distribute and modify it."
29733
29734 ac_pwd='$ac_pwd'
29735 srcdir='$srcdir'
29736 INSTALL='$INSTALL'
29737 MKDIR_P='$MKDIR_P'
29738 AWK='$AWK'
29739 test -n "\$AWK" || AWK=awk
29740 _ACEOF
29741
29742 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29743 # The default lists apply if the user does not specify any file.
29744 ac_need_defaults=:
29745 while test $# != 0
29746 do
29747   case $1 in
29748   --*=?*)
29749     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29750     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29751     ac_shift=:
29752     ;;
29753   --*=)
29754     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29755     ac_optarg=
29756     ac_shift=:
29757     ;;
29758   *)
29759     ac_option=$1
29760     ac_optarg=$2
29761     ac_shift=shift
29762     ;;
29763   esac
29764
29765   case $ac_option in
29766   # Handling of the options.
29767   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29768     ac_cs_recheck=: ;;
29769   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29770     $as_echo "$ac_cs_version"; exit ;;
29771   --config | --confi | --conf | --con | --co | --c )
29772     $as_echo "$ac_cs_config"; exit ;;
29773   --debug | --debu | --deb | --de | --d | -d )
29774     debug=: ;;
29775   --file | --fil | --fi | --f )
29776     $ac_shift
29777     case $ac_optarg in
29778     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29779     '') as_fn_error $? "missing file argument" ;;
29780     esac
29781     as_fn_append CONFIG_FILES " '$ac_optarg'"
29782     ac_need_defaults=false;;
29783   --header | --heade | --head | --hea )
29784     $ac_shift
29785     case $ac_optarg in
29786     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29787     esac
29788     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29789     ac_need_defaults=false;;
29790   --he | --h)
29791     # Conflict between --help and --header
29792     as_fn_error $? "ambiguous option: \`$1'
29793 Try \`$0 --help' for more information.";;
29794   --help | --hel | -h )
29795     $as_echo "$ac_cs_usage"; exit ;;
29796   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29797   | -silent | --silent | --silen | --sile | --sil | --si | --s)
29798     ac_cs_silent=: ;;
29799
29800   # This is an error.
29801   -*) as_fn_error $? "unrecognized option: \`$1'
29802 Try \`$0 --help' for more information." ;;
29803
29804   *) as_fn_append ac_config_targets " $1"
29805      ac_need_defaults=false ;;
29806
29807   esac
29808   shift
29809 done
29810
29811 ac_configure_extra_args=
29812
29813 if $ac_cs_silent; then
29814   exec 6>/dev/null
29815   ac_configure_extra_args="$ac_configure_extra_args --silent"
29816 fi
29817
29818 _ACEOF
29819 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29820 if \$ac_cs_recheck; then
29821   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29822   shift
29823   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29824   CONFIG_SHELL='$SHELL'
29825   export CONFIG_SHELL
29826   exec "\$@"
29827 fi
29828
29829 _ACEOF
29830 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29831 exec 5>>config.log
29832 {
29833   echo
29834   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29835 ## Running $as_me. ##
29836 _ASBOX
29837   $as_echo "$ac_log"
29838 } >&5
29839
29840 _ACEOF
29841 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29842 #
29843 # INIT-COMMANDS
29844 #
29845 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29846 GNUmakefile=$GNUmakefile
29847
29848 _ACEOF
29849
29850 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29851
29852 # Handling of arguments.
29853 for ac_config_target in $ac_config_targets
29854 do
29855   case $ac_config_target in
29856     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
29857     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29858     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
29859     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29860     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29861     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29862     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29863
29864   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29865   esac
29866 done
29867
29868
29869 # If the user did not use the arguments to specify the items to instantiate,
29870 # then the envvar interface is used.  Set only those that are not.
29871 # We use the long form for the default assignment because of an extremely
29872 # bizarre bug on SunOS 4.1.3.
29873 if $ac_need_defaults; then
29874   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29875   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29876   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
29877   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29878 fi
29879
29880 # Have a temporary directory for convenience.  Make it in the build tree
29881 # simply because there is no reason against having it here, and in addition,
29882 # creating and moving files from /tmp can sometimes cause problems.
29883 # Hook for its removal unless debugging.
29884 # Note that there is a small window in which the directory will not be cleaned:
29885 # after its creation but before its name has been assigned to `$tmp'.
29886 $debug ||
29887 {
29888   tmp= ac_tmp=
29889   trap 'exit_status=$?
29890   : "${ac_tmp:=$tmp}"
29891   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29892 ' 0
29893   trap 'as_fn_exit 1' 1 2 13 15
29894 }
29895 # Create a (secure) tmp directory for tmp files.
29896
29897 {
29898   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29899   test -d "$tmp"
29900 }  ||
29901 {
29902   tmp=./conf$$-$RANDOM
29903   (umask 077 && mkdir "$tmp")
29904 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29905 ac_tmp=$tmp
29906
29907 # Set up the scripts for CONFIG_FILES section.
29908 # No need to generate them if there are no CONFIG_FILES.
29909 # This happens for instance with `./config.status config.h'.
29910 if test -n "$CONFIG_FILES"; then
29911
29912
29913 ac_cr=`echo X | tr X '\015'`
29914 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29915 # But we know of no other shell where ac_cr would be empty at this
29916 # point, so we can use a bashism as a fallback.
29917 if test "x$ac_cr" = x; then
29918   eval ac_cr=\$\'\\r\'
29919 fi
29920 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29921 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29922   ac_cs_awk_cr='\\r'
29923 else
29924   ac_cs_awk_cr=$ac_cr
29925 fi
29926
29927 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29928 _ACEOF
29929
29930
29931 {
29932   echo "cat >conf$$subs.awk <<_ACEOF" &&
29933   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29934   echo "_ACEOF"
29935 } >conf$$subs.sh ||
29936   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29937 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29938 ac_delim='%!_!# '
29939 for ac_last_try in false false false false false :; do
29940   . ./conf$$subs.sh ||
29941     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29942
29943   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29944   if test $ac_delim_n = $ac_delim_num; then
29945     break
29946   elif $ac_last_try; then
29947     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29948   else
29949     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29950   fi
29951 done
29952 rm -f conf$$subs.sh
29953
29954 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29955 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29956 _ACEOF
29957 sed -n '
29958 h
29959 s/^/S["/; s/!.*/"]=/
29960 p
29961 g
29962 s/^[^!]*!//
29963 :repl
29964 t repl
29965 s/'"$ac_delim"'$//
29966 t delim
29967 :nl
29968 h
29969 s/\(.\{148\}\)..*/\1/
29970 t more1
29971 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29972 p
29973 n
29974 b repl
29975 :more1
29976 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29977 p
29978 g
29979 s/.\{148\}//
29980 t nl
29981 :delim
29982 h
29983 s/\(.\{148\}\)..*/\1/
29984 t more2
29985 s/["\\]/\\&/g; s/^/"/; s/$/"/
29986 p
29987 b
29988 :more2
29989 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29990 p
29991 g
29992 s/.\{148\}//
29993 t delim
29994 ' <conf$$subs.awk | sed '
29995 /^[^""]/{
29996   N
29997   s/\n//
29998 }
29999 ' >>$CONFIG_STATUS || ac_write_fail=1
30000 rm -f conf$$subs.awk
30001 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30002 _ACAWK
30003 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
30004   for (key in S) S_is_set[key] = 1
30005   FS = "\a"
30006
30007 }
30008 {
30009   line = $ 0
30010   nfields = split(line, field, "@")
30011   substed = 0
30012   len = length(field[1])
30013   for (i = 2; i < nfields; i++) {
30014     key = field[i]
30015     keylen = length(key)
30016     if (S_is_set[key]) {
30017       value = S[key]
30018       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30019       len += length(value) + length(field[++i])
30020       substed = 1
30021     } else
30022       len += 1 + keylen
30023   }
30024
30025   print line
30026 }
30027
30028 _ACAWK
30029 _ACEOF
30030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30031 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30032   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30033 else
30034   cat
30035 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
30036   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
30037 _ACEOF
30038
30039 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
30040 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
30041 # trailing colons and then remove the whole line if VPATH becomes empty
30042 # (actually we leave an empty line to preserve line numbers).
30043 if test "x$srcdir" = x.; then
30044   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
30045 h
30046 s///
30047 s/^/:/
30048 s/[      ]*$/:/
30049 s/:\$(srcdir):/:/g
30050 s/:\${srcdir}:/:/g
30051 s/:@srcdir@:/:/g
30052 s/^:*//
30053 s/:*$//
30054 x
30055 s/\(=[   ]*\).*/\1/
30056 G
30057 s/\n//
30058 s/^[^=]*=[       ]*$//
30059 }'
30060 fi
30061
30062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30063 fi # test -n "$CONFIG_FILES"
30064
30065 # Set up the scripts for CONFIG_HEADERS section.
30066 # No need to generate them if there are no CONFIG_HEADERS.
30067 # This happens for instance with `./config.status Makefile'.
30068 if test -n "$CONFIG_HEADERS"; then
30069 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
30070 BEGIN {
30071 _ACEOF
30072
30073 # Transform confdefs.h into an awk script `defines.awk', embedded as
30074 # here-document in config.status, that substitutes the proper values into
30075 # config.h.in to produce config.h.
30076
30077 # Create a delimiter string that does not exist in confdefs.h, to ease
30078 # handling of long lines.
30079 ac_delim='%!_!# '
30080 for ac_last_try in false false :; do
30081   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
30082   if test -z "$ac_tt"; then
30083     break
30084   elif $ac_last_try; then
30085     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
30086   else
30087     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30088   fi
30089 done
30090
30091 # For the awk script, D is an array of macro values keyed by name,
30092 # likewise P contains macro parameters if any.  Preserve backslash
30093 # newline sequences.
30094
30095 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30096 sed -n '
30097 s/.\{148\}/&'"$ac_delim"'/g
30098 t rset
30099 :rset
30100 s/^[     ]*#[    ]*define[       ][      ]*/ /
30101 t def
30102 d
30103 :def
30104 s/\\$//
30105 t bsnl
30106 s/["\\]/\\&/g
30107 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
30108 D["\1"]=" \3"/p
30109 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
30110 d
30111 :bsnl
30112 s/["\\]/\\&/g
30113 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
30114 D["\1"]=" \3\\\\\\n"\\/p
30115 t cont
30116 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30117 t cont
30118 d
30119 :cont
30120 n
30121 s/.\{148\}/&'"$ac_delim"'/g
30122 t clear
30123 :clear
30124 s/\\$//
30125 t bsnlc
30126 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30127 d
30128 :bsnlc
30129 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30130 b cont
30131 ' <confdefs.h | sed '
30132 s/'"$ac_delim"'/"\\\
30133 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30134
30135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30136   for (key in D) D_is_set[key] = 1
30137   FS = "\a"
30138 }
30139 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30140   line = \$ 0
30141   split(line, arg, " ")
30142   if (arg[1] == "#") {
30143     defundef = arg[2]
30144     mac1 = arg[3]
30145   } else {
30146     defundef = substr(arg[1], 2)
30147     mac1 = arg[2]
30148   }
30149   split(mac1, mac2, "(") #)
30150   macro = mac2[1]
30151   prefix = substr(line, 1, index(line, defundef) - 1)
30152   if (D_is_set[macro]) {
30153     # Preserve the white space surrounding the "#".
30154     print prefix "define", macro P[macro] D[macro]
30155     next
30156   } else {
30157     # Replace #undef with comments.  This is necessary, for example,
30158     # in the case of _POSIX_SOURCE, which is predefined and required
30159     # on some systems where configure will not decide to define it.
30160     if (defundef == "undef") {
30161       print "/*", prefix defundef, macro, "*/"
30162       next
30163     }
30164   }
30165 }
30166 { print }
30167 _ACAWK
30168 _ACEOF
30169 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30170   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
30171 fi # test -n "$CONFIG_HEADERS"
30172
30173
30174 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
30175 shift
30176 for ac_tag
30177 do
30178   case $ac_tag in
30179   :[FHLC]) ac_mode=$ac_tag; continue;;
30180   esac
30181   case $ac_mode$ac_tag in
30182   :[FHL]*:*);;
30183   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
30184   :[FH]-) ac_tag=-:-;;
30185   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30186   esac
30187   ac_save_IFS=$IFS
30188   IFS=:
30189   set x $ac_tag
30190   IFS=$ac_save_IFS
30191   shift
30192   ac_file=$1
30193   shift
30194
30195   case $ac_mode in
30196   :L) ac_source=$1;;
30197   :[FH])
30198     ac_file_inputs=
30199     for ac_f
30200     do
30201       case $ac_f in
30202       -) ac_f="$ac_tmp/stdin";;
30203       *) # Look for the file first in the build tree, then in the source tree
30204          # (if the path is not absolute).  The absolute path cannot be DOS-style,
30205          # because $ac_f cannot contain `:'.
30206          test -f "$ac_f" ||
30207            case $ac_f in
30208            [\\/$]*) false;;
30209            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30210            esac ||
30211            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
30212       esac
30213       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30214       as_fn_append ac_file_inputs " '$ac_f'"
30215     done
30216
30217     # Let's still pretend it is `configure' which instantiates (i.e., don't
30218     # use $as_me), people would be surprised to read:
30219     #    /* config.h.  Generated by config.status.  */
30220     configure_input='Generated from '`
30221           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30222         `' by configure.'
30223     if test x"$ac_file" != x-; then
30224       configure_input="$ac_file.  $configure_input"
30225       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30226 $as_echo "$as_me: creating $ac_file" >&6;}
30227     fi
30228     # Neutralize special characters interpreted by sed in replacement strings.
30229     case $configure_input in #(
30230     *\&* | *\|* | *\\* )
30231        ac_sed_conf_input=`$as_echo "$configure_input" |
30232        sed 's/[\\\\&|]/\\\\&/g'`;; #(
30233     *) ac_sed_conf_input=$configure_input;;
30234     esac
30235
30236     case $ac_tag in
30237     *:-:* | *:-) cat >"$ac_tmp/stdin" \
30238       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
30239     esac
30240     ;;
30241   esac
30242
30243   ac_dir=`$as_dirname -- "$ac_file" ||
30244 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30245          X"$ac_file" : 'X\(//\)[^/]' \| \
30246          X"$ac_file" : 'X\(//\)$' \| \
30247          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30248 $as_echo X"$ac_file" |
30249     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30250             s//\1/
30251             q
30252           }
30253           /^X\(\/\/\)[^/].*/{
30254             s//\1/
30255             q
30256           }
30257           /^X\(\/\/\)$/{
30258             s//\1/
30259             q
30260           }
30261           /^X\(\/\).*/{
30262             s//\1/
30263             q
30264           }
30265           s/.*/./; q'`
30266   as_dir="$ac_dir"; as_fn_mkdir_p
30267   ac_builddir=.
30268
30269 case "$ac_dir" in
30270 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30271 *)
30272   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30273   # A ".." for each directory in $ac_dir_suffix.
30274   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30275   case $ac_top_builddir_sub in
30276   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30277   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30278   esac ;;
30279 esac
30280 ac_abs_top_builddir=$ac_pwd
30281 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30282 # for backward compatibility:
30283 ac_top_builddir=$ac_top_build_prefix
30284
30285 case $srcdir in
30286   .)  # We are building in place.
30287     ac_srcdir=.
30288     ac_top_srcdir=$ac_top_builddir_sub
30289     ac_abs_top_srcdir=$ac_pwd ;;
30290   [\\/]* | ?:[\\/]* )  # Absolute name.
30291     ac_srcdir=$srcdir$ac_dir_suffix;
30292     ac_top_srcdir=$srcdir
30293     ac_abs_top_srcdir=$srcdir ;;
30294   *) # Relative name.
30295     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30296     ac_top_srcdir=$ac_top_build_prefix$srcdir
30297     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30298 esac
30299 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30300
30301
30302   case $ac_mode in
30303   :F)
30304   #
30305   # CONFIG_FILE
30306   #
30307
30308   case $INSTALL in
30309   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30310   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30311   esac
30312   ac_MKDIR_P=$MKDIR_P
30313   case $MKDIR_P in
30314   [\\/$]* | ?:[\\/]* ) ;;
30315   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30316   esac
30317 _ACEOF
30318
30319 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30320 # If the template does not know about datarootdir, expand it.
30321 # FIXME: This hack should be removed a few years after 2.60.
30322 ac_datarootdir_hack=; ac_datarootdir_seen=
30323 ac_sed_dataroot='
30324 /datarootdir/ {
30325   p
30326   q
30327 }
30328 /@datadir@/p
30329 /@docdir@/p
30330 /@infodir@/p
30331 /@localedir@/p
30332 /@mandir@/p'
30333 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30334 *datarootdir*) ac_datarootdir_seen=yes;;
30335 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30336   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30337 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30338 _ACEOF
30339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30340   ac_datarootdir_hack='
30341   s&@datadir@&$datadir&g
30342   s&@docdir@&$docdir&g
30343   s&@infodir@&$infodir&g
30344   s&@localedir@&$localedir&g
30345   s&@mandir@&$mandir&g
30346   s&\\\${datarootdir}&$datarootdir&g' ;;
30347 esac
30348 _ACEOF
30349
30350 # Neutralize VPATH when `$srcdir' = `.'.
30351 # Shell code in configure.ac might set extrasub.
30352 # FIXME: do we really want to maintain this feature?
30353 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30354 ac_sed_extra="$ac_vpsub
30355 $extrasub
30356 _ACEOF
30357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30358 :t
30359 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30360 s|@configure_input@|$ac_sed_conf_input|;t t
30361 s&@top_builddir@&$ac_top_builddir_sub&;t t
30362 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30363 s&@srcdir@&$ac_srcdir&;t t
30364 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30365 s&@top_srcdir@&$ac_top_srcdir&;t t
30366 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30367 s&@builddir@&$ac_builddir&;t t
30368 s&@abs_builddir@&$ac_abs_builddir&;t t
30369 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30370 s&@INSTALL@&$ac_INSTALL&;t t
30371 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30372 $ac_datarootdir_hack
30373 "
30374 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30375   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30376
30377 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30378   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30379   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
30380       "$ac_tmp/out"`; test -z "$ac_out"; } &&
30381   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30382 which seems to be undefined.  Please make sure it is defined" >&5
30383 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30384 which seems to be undefined.  Please make sure it is defined" >&2;}
30385
30386   rm -f "$ac_tmp/stdin"
30387   case $ac_file in
30388   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30389   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30390   esac \
30391   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30392  ;;
30393   :H)
30394   #
30395   # CONFIG_HEADER
30396   #
30397   if test x"$ac_file" != x-; then
30398     {
30399       $as_echo "/* $configure_input  */" \
30400       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30401     } >"$ac_tmp/config.h" \
30402       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30403     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30404       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30405 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30406     else
30407       rm -f "$ac_file"
30408       mv "$ac_tmp/config.h" "$ac_file" \
30409         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30410     fi
30411   else
30412     $as_echo "/* $configure_input  */" \
30413       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30414       || as_fn_error $? "could not create -" "$LINENO" 5
30415   fi
30416 # Compute "$ac_file"'s index in $config_headers.
30417 _am_arg="$ac_file"
30418 _am_stamp_count=1
30419 for _am_header in $config_headers :; do
30420   case $_am_header in
30421     $_am_arg | $_am_arg:* )
30422       break ;;
30423     * )
30424       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30425   esac
30426 done
30427 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30428 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30429          X"$_am_arg" : 'X\(//\)[^/]' \| \
30430          X"$_am_arg" : 'X\(//\)$' \| \
30431          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30432 $as_echo X"$_am_arg" |
30433     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30434             s//\1/
30435             q
30436           }
30437           /^X\(\/\/\)[^/].*/{
30438             s//\1/
30439             q
30440           }
30441           /^X\(\/\/\)$/{
30442             s//\1/
30443             q
30444           }
30445           /^X\(\/\).*/{
30446             s//\1/
30447             q
30448           }
30449           s/.*/./; q'`/stamp-h$_am_stamp_count
30450  ;;
30451   :L)
30452   #
30453   # CONFIG_LINK
30454   #
30455
30456   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30457     :
30458   else
30459     # Prefer the file from the source tree if names are identical.
30460     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30461       ac_source=$srcdir/$ac_source
30462     fi
30463
30464     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
30465 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
30466
30467     if test ! -r "$ac_source"; then
30468       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
30469     fi
30470     rm -f "$ac_file"
30471
30472     # Try a relative symlink, then a hard link, then a copy.
30473     case $ac_source in
30474     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30475         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30476     esac
30477     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30478       ln "$ac_source" "$ac_file" 2>/dev/null ||
30479       cp -p "$ac_source" "$ac_file" ||
30480       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
30481   fi
30482  ;;
30483   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30484 $as_echo "$as_me: executing $ac_file commands" >&6;}
30485  ;;
30486   esac
30487
30488
30489   case $ac_file$ac_mode in
30490     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30491   # Older Autoconf quotes --file arguments for eval, but not when files
30492   # are listed without --file.  Let's play safe and only enable the eval
30493   # if we detect the quoting.
30494   case $CONFIG_FILES in
30495   *\'*) eval set x "$CONFIG_FILES" ;;
30496   *)   set x $CONFIG_FILES ;;
30497   esac
30498   shift
30499   for mf
30500   do
30501     # Strip MF so we end up with the name of the file.
30502     mf=`echo "$mf" | sed -e 's/:.*$//'`
30503     # Check whether this is an Automake generated Makefile or not.
30504     # We used to match only the files named 'Makefile.in', but
30505     # some people rename them; so instead we look at the file content.
30506     # Grep'ing the first line is not enough: some people post-process
30507     # each Makefile.in and add a new line on top of each file to say so.
30508     # Grep'ing the whole file is not good either: AIX grep has a line
30509     # limit of 2048, but all sed's we know have understand at least 4000.
30510     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30511       dirpart=`$as_dirname -- "$mf" ||
30512 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30513          X"$mf" : 'X\(//\)[^/]' \| \
30514          X"$mf" : 'X\(//\)$' \| \
30515          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30516 $as_echo X"$mf" |
30517     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30518             s//\1/
30519             q
30520           }
30521           /^X\(\/\/\)[^/].*/{
30522             s//\1/
30523             q
30524           }
30525           /^X\(\/\/\)$/{
30526             s//\1/
30527             q
30528           }
30529           /^X\(\/\).*/{
30530             s//\1/
30531             q
30532           }
30533           s/.*/./; q'`
30534     else
30535       continue
30536     fi
30537     # Extract the definition of DEPDIR, am__include, and am__quote
30538     # from the Makefile without running 'make'.
30539     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30540     test -z "$DEPDIR" && continue
30541     am__include=`sed -n 's/^am__include = //p' < "$mf"`
30542     test -z "am__include" && continue
30543     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30544     # Find all dependency output files, they are included files with
30545     # $(DEPDIR) in their names.  We invoke sed twice because it is the
30546     # simplest approach to changing $(DEPDIR) to its actual value in the
30547     # expansion.
30548     for file in `sed -n "
30549       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30550          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30551       # Make sure the directory exists.
30552       test -f "$dirpart/$file" && continue
30553       fdir=`$as_dirname -- "$file" ||
30554 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30555          X"$file" : 'X\(//\)[^/]' \| \
30556          X"$file" : 'X\(//\)$' \| \
30557          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30558 $as_echo X"$file" |
30559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30560             s//\1/
30561             q
30562           }
30563           /^X\(\/\/\)[^/].*/{
30564             s//\1/
30565             q
30566           }
30567           /^X\(\/\/\)$/{
30568             s//\1/
30569             q
30570           }
30571           /^X\(\/\).*/{
30572             s//\1/
30573             q
30574           }
30575           s/.*/./; q'`
30576       as_dir=$dirpart/$fdir; as_fn_mkdir_p
30577       # echo "creating $dirpart/$file"
30578       echo '# dummy' > "$dirpart/$file"
30579     done
30580   done
30581 }
30582  ;;
30583
30584   esac
30585 done # for ac_tag
30586
30587
30588 as_fn_exit 0
30589 _ACEOF
30590 ac_clean_files=$ac_clean_files_save
30591
30592 test $ac_write_fail = 0 ||
30593   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30594
30595
30596 # configure is writing to config.log, and then calls config.status.
30597 # config.status does its own redirection, appending to config.log.
30598 # Unfortunately, on DOS this fails, as config.log is still kept open
30599 # by configure, so config.status won't be able to write to it; its
30600 # output is simply discarded.  So we exec the FD to /dev/null,
30601 # effectively closing config.log, so it can be properly (re)opened and
30602 # appended to by config.status.  When coming back to configure, we
30603 # need to make the FD available again.
30604 if test "$no_create" != yes; then
30605   ac_cs_success=:
30606   ac_config_status_args=
30607   test "$silent" = yes &&
30608     ac_config_status_args="$ac_config_status_args --quiet"
30609   exec 5>/dev/null
30610   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30611   exec 5>>config.log
30612   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30613   # would make configure fail if this is the last instruction.
30614   $ac_cs_success || as_fn_exit 1
30615 fi
30616 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30617   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30618 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30619 fi
30620