Merge tag 'upstream/1.6'
[debian/gzip] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.97-b1aba91 for gzip 1.6.
4 #
5 # Report bugs to <bug-gzip@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2013 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 # The user is always right.
37 if test "${PATH_SEPARATOR+set}" != set; then
38   PATH_SEPARATOR=:
39   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
41       PATH_SEPARATOR=';'
42   }
43 fi
44
45
46 # IFS
47 # We need space, tab and new line, in precisely that order.  Quoting is
48 # there to prevent editors from complaining about space-tab.
49 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
50 # splitting by setting IFS to empty value.)
51 as_nl='
52 '
53 export as_nl
54 IFS=" ""        $as_nl"
55
56 # Find who we are.  Look in the path if we contain no directory separator.
57 as_myself=
58 case $0 in #((
59   *[\\/]* ) as_myself=$0 ;;
60   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61 for as_dir in $PATH
62 do
63   IFS=$as_save_IFS
64   case $as_dir in #(((
65     '') as_dir=./ ;;
66     */) ;;
67     *) as_dir=$as_dir/ ;;
68   esac
69     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
70   done
71 IFS=$as_save_IFS
72
73      ;;
74 esac
75 # We did not find ourselves, most probably we were run as `sh COMMAND'
76 # in which case we are not to be found in the path.
77 if test "x$as_myself" = x; then
78   as_myself=$0
79 fi
80 if test ! -f "$as_myself"; then
81   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
82   exit 1
83 fi
84
85 # Unset variables that we do not need and which cause bugs (e.g. in
86 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
87 # suppresses any "Segmentation fault" message there.  '((' could
88 # trigger a bug in pdksh 5.2.14.
89 for as_var in BASH_ENV ENV MAIL MAILPATH
90 do eval test x\${$as_var+set} = xset \
91   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
92 done
93 PS1='$ '
94 PS2='> '
95 PS4='+ '
96
97 # NLS nuisances.
98 LC_ALL=C
99 export LC_ALL
100 LANGUAGE=C
101 export LANGUAGE
102
103 # CDPATH.
104 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
105
106 # Use a proper internal environment variable to ensure we don't fall
107   # into an infinite loop, continuously re-executing ourselves.
108   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
109     _as_can_reexec=no; export _as_can_reexec;
110     # We cannot yet assume a decent shell, so we have to provide a
111 # neutralization value for shells without unset; and this also
112 # works around shells that cannot unset nonexistent variables.
113 # Preserve -v and -x to the replacement shell.
114 BASH_ENV=/dev/null
115 ENV=/dev/null
116 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
117 case $- in # ((((
118   *v*x* | *x*v* ) as_opts=-vx ;;
119   *v* ) as_opts=-v ;;
120   *x* ) as_opts=-x ;;
121   * ) as_opts= ;;
122 esac
123 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
124 # Admittedly, this is quite paranoid, since all the known shells bail
125 # out after a failed `exec'.
126 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
127 as_fn_exit 255
128   fi
129   # We don't want this to propagate to other subprocesses.
130           { _as_can_reexec=; unset _as_can_reexec;}
131 if test "x$CONFIG_SHELL" = x; then
132   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
133   emulate sh
134   NULLCMD=:
135   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
136   # is contrary to our usage.  Disable this feature.
137   alias -g '\${1+\"\$@\"}'='\"\$@\"'
138   setopt NO_GLOB_SUBST
139 else
140   case \`(set -o) 2>/dev/null\` in #(
141   *posix*) :
142     set -o posix ;; #(
143   *) :
144      ;;
145 esac
146 fi
147 "
148   as_required="as_fn_return () { (exit \$1); }
149 as_fn_success () { as_fn_return 0; }
150 as_fn_failure () { as_fn_return 1; }
151 as_fn_ret_success () { return 0; }
152 as_fn_ret_failure () { return 1; }
153
154 exitcode=0
155 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
156 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
157 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
158 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
159 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
160
161 else
162   exitcode=1; echo positional parameters were not saved.
163 fi
164 test x\$exitcode = x0 || exit 1
165 test -x / || exit 1"
166   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
167   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
168   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
169   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
170 test \$(( 1 + 1 )) = 2 || exit 1"
171   if (eval "$as_required") 2>/dev/null; then :
172   as_have_required=yes
173 else
174   as_have_required=no
175 fi
176   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
177
178 else
179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
180 as_found=false
181 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
182 do
183   IFS=$as_save_IFS
184   case $as_dir in #(((
185     '') as_dir=./ ;;
186     */) ;;
187     *) as_dir=$as_dir/ ;;
188   esac
189   as_found=:
190   case $as_dir in #(
191          /*)
192            for as_base in sh bash ksh sh5; do
193              # Try only shells that exist, to save several forks.
194              as_shell=$as_dir$as_base
195              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197   CONFIG_SHELL=$as_shell as_have_required=yes
198                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199   break 2
200 fi
201 fi
202            done;;
203        esac
204   as_found=false
205 done
206 IFS=$as_save_IFS
207 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
208               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
209   CONFIG_SHELL=$SHELL as_have_required=yes
210 fi; }
211
212
213       if test "x$CONFIG_SHELL" != x; then :
214   export CONFIG_SHELL
215              # We cannot yet assume a decent shell, so we have to provide a
216 # neutralization value for shells without unset; and this also
217 # works around shells that cannot unset nonexistent variables.
218 # Preserve -v and -x to the replacement shell.
219 BASH_ENV=/dev/null
220 ENV=/dev/null
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 case $- in # ((((
223   *v*x* | *x*v* ) as_opts=-vx ;;
224   *v* ) as_opts=-v ;;
225   *x* ) as_opts=-x ;;
226   * ) as_opts= ;;
227 esac
228 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
229 # Admittedly, this is quite paranoid, since all the known shells bail
230 # out after a failed `exec'.
231 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
232 exit 255
233 fi
234
235     if test x$as_have_required = xno; then :
236   printf "%s\n" "$0: This script requires a shell more modern than all"
237   printf "%s\n" "$0: the shells that I found on your system."
238   if test x${ZSH_VERSION+set} = xset ; then
239     printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240     printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
241   else
242     printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
243 $0: about your system, including any error possibly output
244 $0: before this message. Then install a modern shell, or
245 $0: manually run the script under such a shell if you do
246 $0: have one."
247   fi
248   exit 1
249 fi
250 fi
251 fi
252 SHELL=${CONFIG_SHELL-/bin/sh}
253 export SHELL
254 # Unset more variables known to interfere with behavior of common tools.
255 CLICOLOR_FORCE= GREP_OPTIONS=
256 unset CLICOLOR_FORCE GREP_OPTIONS
257
258 ## --------------------- ##
259 ## M4sh Shell Functions. ##
260 ## --------------------- ##
261 # as_fn_unset VAR
262 # ---------------
263 # Portably unset VAR.
264 as_fn_unset ()
265 {
266   { eval $1=; unset $1;}
267 }
268 as_unset=as_fn_unset
269
270 # as_fn_set_status STATUS
271 # -----------------------
272 # Set $? to STATUS, without forking.
273 as_fn_set_status ()
274 {
275   return $1
276 } # as_fn_set_status
277
278 # as_fn_exit STATUS
279 # -----------------
280 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281 as_fn_exit ()
282 {
283   set +e
284   as_fn_set_status $1
285   exit $1
286 } # as_fn_exit
287
288 # as_fn_mkdir_p
289 # -------------
290 # Create "$as_dir" as a directory, including parents if necessary.
291 as_fn_mkdir_p ()
292 {
293
294   case $as_dir in #(
295   -*) as_dir=./$as_dir;;
296   esac
297   test -d "$as_dir" || eval $as_mkdir_p || {
298     as_dirs=
299     while :; do
300       case $as_dir in #(
301       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302       *) as_qdir=$as_dir;;
303       esac
304       as_dirs="'$as_qdir' $as_dirs"
305       as_dir=`$as_dirname -- "$as_dir" ||
306 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307          X"$as_dir" : 'X\(//\)[^/]' \| \
308          X"$as_dir" : 'X\(//\)$' \| \
309          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310 printf "%s\n" X"$as_dir" |
311     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312             s//\1/
313             q
314           }
315           /^X\(\/\/\)[^/].*/{
316             s//\1/
317             q
318           }
319           /^X\(\/\/\)$/{
320             s//\1/
321             q
322           }
323           /^X\(\/\).*/{
324             s//\1/
325             q
326           }
327           s/.*/./; q'`
328       test -d "$as_dir" && break
329     done
330     test -z "$as_dirs" || eval "mkdir $as_dirs"
331   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
332
333
334 } # as_fn_mkdir_p
335
336 # as_fn_executable_p FILE
337 # -----------------------
338 # Test if FILE is an executable regular file.
339 as_fn_executable_p ()
340 {
341   test -f "$1" && test -x "$1"
342 } # as_fn_executable_p
343 # as_fn_append VAR VALUE
344 # ----------------------
345 # Append the text in VALUE to the end of the definition contained in VAR. Take
346 # advantage of any shell optimizations that allow amortized linear growth over
347 # repeated appends, instead of the typical quadratic growth present in naive
348 # implementations.
349 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
350   eval 'as_fn_append ()
351   {
352     eval $1+=\$2
353   }'
354 else
355   as_fn_append ()
356   {
357     eval $1=\$$1\$2
358   }
359 fi # as_fn_append
360
361 # as_fn_arith ARG...
362 # ------------------
363 # Perform arithmetic evaluation on the ARGs, and store the result in the
364 # global $as_val. Take advantage of shells that can avoid forks. The arguments
365 # must be portable across $(()) and expr.
366 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
367   eval 'as_fn_arith ()
368   {
369     as_val=$(( $* ))
370   }'
371 else
372   as_fn_arith ()
373   {
374     as_val=`expr "$@" || test $? -eq 1`
375   }
376 fi # as_fn_arith
377
378
379 # as_fn_error STATUS ERROR [LINENO LOG_FD]
380 # ----------------------------------------
381 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
382 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
383 # script with STATUS, using 1 if that was 0.
384 as_fn_error ()
385 {
386   as_status=$1; test $as_status -eq 0 && as_status=1
387   if test "$4"; then
388     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
389     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
390   fi
391   printf "%s\n" "$as_me: error: $2" >&2
392   as_fn_exit $as_status
393 } # as_fn_error
394
395 if expr a : '\(a\)' >/dev/null 2>&1 &&
396    test "X`expr 00001 : '.*\(...\)'`" = X001; then
397   as_expr=expr
398 else
399   as_expr=false
400 fi
401
402 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
403   as_basename=basename
404 else
405   as_basename=false
406 fi
407
408 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
409   as_dirname=dirname
410 else
411   as_dirname=false
412 fi
413
414 as_me=`$as_basename -- "$0" ||
415 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
416          X"$0" : 'X\(//\)$' \| \
417          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
418 printf "%s\n" X/"$0" |
419     sed '/^.*\/\([^/][^/]*\)\/*$/{
420             s//\1/
421             q
422           }
423           /^X\/\(\/\/\)$/{
424             s//\1/
425             q
426           }
427           /^X\/\(\/\).*/{
428             s//\1/
429             q
430           }
431           s/.*/./; q'`
432
433 # Avoid depending upon Character Ranges.
434 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
435 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
436 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
437 as_cr_digits='0123456789'
438 as_cr_alnum=$as_cr_Letters$as_cr_digits
439
440
441   as_lineno_1=$LINENO as_lineno_1a=$LINENO
442   as_lineno_2=$LINENO as_lineno_2a=$LINENO
443   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
444   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
445   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
446   sed -n '
447     p
448     /[$]LINENO/=
449   ' <$as_myself |
450     sed '
451       s/[$]LINENO.*/&-/
452       t lineno
453       b
454       :lineno
455       N
456       :loop
457       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
458       t loop
459       s/-\n.*//
460     ' >$as_me.lineno &&
461   chmod +x "$as_me.lineno" ||
462     { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
463
464   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
465   # already done that, so ensure we don't try to do so again and fall
466   # in an infinite loop.  This has already happened in practice.
467   _as_can_reexec=no; export _as_can_reexec
468   # Don't try to exec as it changes $[0], causing all sort of problems
469   # (the dirname of $[0] is not the place where we might find the
470   # original and so on.  Autoconf is especially sensitive to this).
471   . "./$as_me.lineno"
472   # Exit status is that of the last command.
473   exit
474 }
475
476 ECHO_C= ECHO_N= ECHO_T=
477 case `echo -n x` in #(((((
478 -n*)
479   case `echo 'xy\c'` in
480   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
481   xy)  ECHO_C='\c';;
482   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
483        ECHO_T=' ';;
484   esac;;
485 *)
486   ECHO_N='-n';;
487 esac
488
489 rm -f conf$$ conf$$.exe conf$$.file
490 if test -d conf$$.dir; then
491   rm -f conf$$.dir/conf$$.file
492 else
493   rm -f conf$$.dir
494   mkdir conf$$.dir 2>/dev/null
495 fi
496 if (echo >conf$$.file) 2>/dev/null; then
497   if ln -s conf$$.file conf$$ 2>/dev/null; then
498     as_ln_s='ln -s'
499     # ... but there are two gotchas:
500     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
501     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
502     # In both cases, we have to default to `cp -pR'.
503     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
504       as_ln_s='cp -pR'
505   elif ln conf$$.file conf$$ 2>/dev/null; then
506     as_ln_s=ln
507   else
508     as_ln_s='cp -pR'
509   fi
510 else
511   as_ln_s='cp -pR'
512 fi
513 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
514 rmdir conf$$.dir 2>/dev/null
515
516 if mkdir -p . 2>/dev/null; then
517   as_mkdir_p='mkdir -p "$as_dir"'
518 else
519   test -d ./-p && rmdir ./-p
520   as_mkdir_p=false
521 fi
522
523 as_test_x='test -x'
524 as_executable_p=as_fn_executable_p
525
526 # Sed expression to map a string onto a valid CPP name.
527 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
528
529 # Sed expression to map a string onto a valid variable name.
530 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
531
532
533 test -n "$DJDIR" || exec 7<&0 </dev/null
534 exec 6>&1
535
536 # Name of the host.
537 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
538 # so uname gets run too.
539 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
541 #
542 # Initializations.
543 #
544 ac_default_prefix=/usr/local
545 ac_clean_files=
546 ac_config_libobj_dir=.
547 LIBOBJS=
548 cross_compiling=no
549 subdirs=
550 MFLAGS=
551 MAKEFLAGS=
552
553 # Identity of this package.
554 PACKAGE_NAME='gzip'
555 PACKAGE_TARNAME='gzip'
556 PACKAGE_VERSION='1.6'
557 PACKAGE_STRING='gzip 1.6'
558 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
559 PACKAGE_URL=''
560
561 ac_unique_file="gzip.c"
562 # Factoring default headers for most tests.
563 ac_includes_default="\
564 #include <stdio.h>
565 #ifdef HAVE_SYS_TYPES_H
566 # include <sys/types.h>
567 #endif
568 #ifdef HAVE_SYS_STAT_H
569 # include <sys/stat.h>
570 #endif
571 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
572 # include <stdlib.h>
573 #endif
574 #include <stddef.h>
575 #ifdef HAVE_STRING_H
576 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577 #  include <memory.h>
578 # endif
579 # include <string.h>
580 #endif
581 #ifdef HAVE_STRINGS_H
582 # include <strings.h>
583 #endif
584 #ifdef HAVE_INTTYPES_H
585 # include <inttypes.h>
586 #endif
587 #ifdef HAVE_STDINT_H
588 # include <stdint.h>
589 #endif
590 #ifdef HAVE_UNISTD_H
591 # include <unistd.h>
592 #endif"
593
594 gl_use_threads_default=
595 ac_header_list=
596 ac_func_list=
597 gl_getopt_required=POSIX
598 gl_getopt_required=POSIX
599 ac_subst_vars='gltests_LTLIBOBJS
600 gltests_LIBOBJS
601 gl_LTLIBOBJS
602 gl_LIBOBJS
603 CONFIG_INCLUDE
604 am__EXEEXT_FALSE
605 am__EXEEXT_TRUE
606 LTLIBOBJS
607 ASFLAGS_config
608 LIBOBJS
609 ASCPPFLAGS
610 ASCPPPOST
611 GNULIB_WARN_CFLAGS
612 WARN_CFLAGS
613 WERROR_CFLAGS
614 LIBGZIP_LTLIBDEPS
615 LIBGZIP_LIBDEPS
616 gltests_WITNESS
617 REPLACE_TOWLOWER
618 REPLACE_ISWCNTRL
619 HAVE_WCTYPE_H
620 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
621 NEXT_WCTYPE_H
622 HAVE_ISWCNTRL
623 REPLACE_ISWBLANK
624 HAVE_WCTRANS_T
625 HAVE_WCTYPE_T
626 HAVE_ISWBLANK
627 GNULIB_TOWCTRANS
628 GNULIB_WCTRANS
629 GNULIB_ISWCTYPE
630 GNULIB_WCTYPE
631 GNULIB_ISWBLANK
632 HAVE_WINT_T
633 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
634 NEXT_WCHAR_H
635 HAVE_UNISTD_H
636 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
637 NEXT_UNISTD_H
638 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
639 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
640 TIME_H_DEFINES_STRUCT_TIMESPEC
641 NEXT_AS_FIRST_DIRECTIVE_TIME_H
642 NEXT_TIME_H
643 REPLACE_TIMEGM
644 REPLACE_NANOSLEEP
645 REPLACE_MKTIME
646 REPLACE_LOCALTIME_R
647 HAVE_TIMEGM
648 HAVE_STRPTIME
649 HAVE_NANOSLEEP
650 HAVE_DECL_LOCALTIME_R
651 GNULIB_TIME_R
652 GNULIB_TIMEGM
653 GNULIB_STRPTIME
654 GNULIB_NANOSLEEP
655 GNULIB_MKTIME
656 NEXT_AS_FIRST_DIRECTIVE_STRING_H
657 NEXT_STRING_H
658 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
659 NEXT_STDLIB_H
660 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
661 NEXT_STDIO_H
662 GL_GENERATE_STDINT_H_FALSE
663 GL_GENERATE_STDINT_H_TRUE
664 STDINT_H
665 WINT_T_SUFFIX
666 WCHAR_T_SUFFIX
667 SIG_ATOMIC_T_SUFFIX
668 SIZE_T_SUFFIX
669 PTRDIFF_T_SUFFIX
670 HAVE_SIGNED_WINT_T
671 HAVE_SIGNED_WCHAR_T
672 HAVE_SIGNED_SIG_ATOMIC_T
673 BITSIZEOF_WINT_T
674 BITSIZEOF_WCHAR_T
675 BITSIZEOF_SIG_ATOMIC_T
676 BITSIZEOF_SIZE_T
677 BITSIZEOF_PTRDIFF_T
678 HAVE_SYS_BITYPES_H
679 HAVE_SYS_INTTYPES_H
680 HAVE_STDINT_H
681 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
682 NEXT_STDINT_H
683 HAVE_SYS_TYPES_H
684 HAVE_INTTYPES_H
685 HAVE_WCHAR_H
686 HAVE_UNSIGNED_LONG_LONG_INT
687 HAVE_LONG_LONG_INT
688 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
689 NEXT_STDDEF_H
690 GL_GENERATE_STDDEF_H_FALSE
691 GL_GENERATE_STDDEF_H_TRUE
692 STDDEF_H
693 HAVE_WCHAR_T
694 REPLACE_NULL
695 HAVE__BOOL
696 GL_GENERATE_STDBOOL_H_FALSE
697 GL_GENERATE_STDBOOL_H_TRUE
698 STDBOOL_H
699 ASM_SYMBOL_PREFIX
700 UNDEFINE_STRTOK_R
701 REPLACE_STRTOK_R
702 REPLACE_STRSIGNAL
703 REPLACE_STRNLEN
704 REPLACE_STRNDUP
705 REPLACE_STRNCAT
706 REPLACE_STRERROR_R
707 REPLACE_STRERROR
708 REPLACE_STRCHRNUL
709 REPLACE_STRCASESTR
710 REPLACE_STRSTR
711 REPLACE_STRDUP
712 REPLACE_STPNCPY
713 REPLACE_MEMMEM
714 REPLACE_MEMCHR
715 HAVE_STRVERSCMP
716 HAVE_DECL_STRSIGNAL
717 HAVE_DECL_STRERROR_R
718 HAVE_DECL_STRTOK_R
719 HAVE_STRCASESTR
720 HAVE_STRSEP
721 HAVE_STRPBRK
722 HAVE_DECL_STRNLEN
723 HAVE_DECL_STRNDUP
724 HAVE_DECL_STRDUP
725 HAVE_STRCHRNUL
726 HAVE_STPNCPY
727 HAVE_STPCPY
728 HAVE_RAWMEMCHR
729 HAVE_DECL_MEMRCHR
730 HAVE_MEMPCPY
731 HAVE_DECL_MEMMEM
732 HAVE_MEMCHR
733 HAVE_FFSLL
734 HAVE_FFSL
735 HAVE_MBSLEN
736 GNULIB_STRVERSCMP
737 GNULIB_STRSIGNAL
738 GNULIB_STRERROR_R
739 GNULIB_STRERROR
740 GNULIB_MBSTOK_R
741 GNULIB_MBSSEP
742 GNULIB_MBSSPN
743 GNULIB_MBSPBRK
744 GNULIB_MBSCSPN
745 GNULIB_MBSCASESTR
746 GNULIB_MBSPCASECMP
747 GNULIB_MBSNCASECMP
748 GNULIB_MBSCASECMP
749 GNULIB_MBSSTR
750 GNULIB_MBSRCHR
751 GNULIB_MBSCHR
752 GNULIB_MBSNLEN
753 GNULIB_MBSLEN
754 GNULIB_STRTOK_R
755 GNULIB_STRCASESTR
756 GNULIB_STRSTR
757 GNULIB_STRSEP
758 GNULIB_STRPBRK
759 GNULIB_STRNLEN
760 GNULIB_STRNDUP
761 GNULIB_STRNCAT
762 GNULIB_STRDUP
763 GNULIB_STRCHRNUL
764 GNULIB_STPNCPY
765 GNULIB_STPCPY
766 GNULIB_RAWMEMCHR
767 GNULIB_MEMRCHR
768 GNULIB_MEMPCPY
769 GNULIB_MEMMEM
770 GNULIB_MEMCHR
771 GNULIB_FFSLL
772 GNULIB_FFSL
773 LOCALE_FR_UTF8
774 LOCALE_ZH_CN
775 LOCALE_JA
776 REPLACE_WCSWIDTH
777 REPLACE_WCWIDTH
778 REPLACE_WCSNRTOMBS
779 REPLACE_WCSRTOMBS
780 REPLACE_WCRTOMB
781 REPLACE_MBSNRTOWCS
782 REPLACE_MBSRTOWCS
783 REPLACE_MBRLEN
784 REPLACE_MBRTOWC
785 REPLACE_MBSINIT
786 REPLACE_WCTOB
787 REPLACE_BTOWC
788 REPLACE_MBSTATE_T
789 HAVE_DECL_WCWIDTH
790 HAVE_DECL_WCTOB
791 HAVE_WCSWIDTH
792 HAVE_WCSTOK
793 HAVE_WCSSTR
794 HAVE_WCSPBRK
795 HAVE_WCSSPN
796 HAVE_WCSCSPN
797 HAVE_WCSRCHR
798 HAVE_WCSCHR
799 HAVE_WCSDUP
800 HAVE_WCSXFRM
801 HAVE_WCSCOLL
802 HAVE_WCSNCASECMP
803 HAVE_WCSCASECMP
804 HAVE_WCSNCMP
805 HAVE_WCSCMP
806 HAVE_WCSNCAT
807 HAVE_WCSCAT
808 HAVE_WCPNCPY
809 HAVE_WCSNCPY
810 HAVE_WCPCPY
811 HAVE_WCSCPY
812 HAVE_WCSNLEN
813 HAVE_WCSLEN
814 HAVE_WMEMSET
815 HAVE_WMEMMOVE
816 HAVE_WMEMCPY
817 HAVE_WMEMCMP
818 HAVE_WMEMCHR
819 HAVE_WCSNRTOMBS
820 HAVE_WCSRTOMBS
821 HAVE_WCRTOMB
822 HAVE_MBSNRTOWCS
823 HAVE_MBSRTOWCS
824 HAVE_MBRLEN
825 HAVE_MBRTOWC
826 HAVE_MBSINIT
827 HAVE_BTOWC
828 GNULIB_WCSWIDTH
829 GNULIB_WCSTOK
830 GNULIB_WCSSTR
831 GNULIB_WCSPBRK
832 GNULIB_WCSSPN
833 GNULIB_WCSCSPN
834 GNULIB_WCSRCHR
835 GNULIB_WCSCHR
836 GNULIB_WCSDUP
837 GNULIB_WCSXFRM
838 GNULIB_WCSCOLL
839 GNULIB_WCSNCASECMP
840 GNULIB_WCSCASECMP
841 GNULIB_WCSNCMP
842 GNULIB_WCSCMP
843 GNULIB_WCSNCAT
844 GNULIB_WCSCAT
845 GNULIB_WCPNCPY
846 GNULIB_WCSNCPY
847 GNULIB_WCPCPY
848 GNULIB_WCSCPY
849 GNULIB_WCSNLEN
850 GNULIB_WCSLEN
851 GNULIB_WMEMSET
852 GNULIB_WMEMMOVE
853 GNULIB_WMEMCPY
854 GNULIB_WMEMCMP
855 GNULIB_WMEMCHR
856 GNULIB_WCWIDTH
857 GNULIB_WCSNRTOMBS
858 GNULIB_WCSRTOMBS
859 GNULIB_WCRTOMB
860 GNULIB_MBSNRTOWCS
861 GNULIB_MBSRTOWCS
862 GNULIB_MBRLEN
863 GNULIB_MBRTOWC
864 GNULIB_MBSINIT
865 GNULIB_WCTOB
866 GNULIB_BTOWC
867 NEXT_AS_FIRST_DIRECTIVE_MATH_H
868 NEXT_MATH_H
869 LTLIBMULTITHREAD
870 LIBMULTITHREAD
871 LTLIBTHREAD
872 LIBTHREAD
873 LIBPTH_PREFIX
874 LTLIBPTH
875 LIBPTH
876 LOCALCHARSET_TESTS_ENVIRONMENT
877 GLIBC21
878 IGNORE_UNUSED_LIBRARIES_CFLAGS
879 GNU_MAKE_FALSE
880 GNU_MAKE_TRUE
881 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
882 NEXT_SYS_TIME_H
883 REPLACE_STRUCT_TIMEVAL
884 REPLACE_GETTIMEOFDAY
885 HAVE_SYS_TIME_H
886 HAVE_STRUCT_TIMEVAL
887 HAVE_GETTIMEOFDAY
888 GNULIB_GETTIMEOFDAY
889 LTLIBINTL
890 LIBINTL
891 GNULIB_GL_UNISTD_H_GETOPT
892 GETOPT_H
893 HAVE_GETOPT_H
894 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
895 NEXT_GETOPT_H
896 WINDOWS_64_BIT_ST_SIZE
897 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
898 NEXT_SYS_STAT_H
899 REPLACE_UTIMENSAT
900 REPLACE_STAT
901 REPLACE_MKNOD
902 REPLACE_MKFIFO
903 REPLACE_MKDIR
904 REPLACE_LSTAT
905 REPLACE_FUTIMENS
906 REPLACE_FSTATAT
907 REPLACE_FSTAT
908 HAVE_UTIMENSAT
909 HAVE_MKNODAT
910 HAVE_MKNOD
911 HAVE_MKFIFOAT
912 HAVE_MKFIFO
913 HAVE_MKDIRAT
914 HAVE_LSTAT
915 HAVE_LCHMOD
916 HAVE_FUTIMENS
917 HAVE_FSTATAT
918 HAVE_FCHMODAT
919 GNULIB_UTIMENSAT
920 GNULIB_STAT
921 GNULIB_MKNODAT
922 GNULIB_MKNOD
923 GNULIB_MKFIFOAT
924 GNULIB_MKFIFO
925 GNULIB_MKDIRAT
926 GNULIB_LSTAT
927 GNULIB_LCHMOD
928 GNULIB_FUTIMENS
929 GNULIB_FSTATAT
930 GNULIB_FSTAT
931 GNULIB_FCHMODAT
932 WINDOWS_64_BIT_OFF_T
933 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
934 NEXT_SYS_TYPES_H
935 REPLACE_TRUNCL
936 REPLACE_TRUNCF
937 REPLACE_TRUNC
938 REPLACE_SQRTL
939 REPLACE_SIGNBIT_USING_GCC
940 REPLACE_SIGNBIT
941 REPLACE_ROUNDL
942 REPLACE_ROUNDF
943 REPLACE_ROUND
944 REPLACE_REMAINDERL
945 REPLACE_REMAINDERF
946 REPLACE_REMAINDER
947 REPLACE_NAN
948 REPLACE_MODFL
949 REPLACE_MODFF
950 REPLACE_MODF
951 REPLACE_LOGBL
952 REPLACE_LOGBF
953 REPLACE_LOGB
954 REPLACE_LOG2L
955 REPLACE_LOG2F
956 REPLACE_LOG2
957 REPLACE_LOG1PL
958 REPLACE_LOG1PF
959 REPLACE_LOG1P
960 REPLACE_LOG10L
961 REPLACE_LOG10F
962 REPLACE_LOG10
963 REPLACE_LOGL
964 REPLACE_LOGF
965 REPLACE_LOG
966 REPLACE_LDEXPL
967 REPLACE_ISNAN
968 REPLACE_ISINF
969 REPLACE_ISFINITE
970 REPLACE_ILOGBF
971 REPLACE_ILOGB
972 REPLACE_HYPOTL
973 REPLACE_HYPOTF
974 REPLACE_HYPOT
975 REPLACE_HUGE_VAL
976 REPLACE_FREXPL
977 REPLACE_FREXP
978 REPLACE_FREXPF
979 REPLACE_FMODL
980 REPLACE_FMODF
981 REPLACE_FMOD
982 REPLACE_FMAL
983 REPLACE_FMAF
984 REPLACE_FMA
985 REPLACE_FLOORL
986 REPLACE_FLOORF
987 REPLACE_FLOOR
988 REPLACE_FABSL
989 REPLACE_EXP2L
990 REPLACE_EXP2
991 REPLACE_EXPM1F
992 REPLACE_EXPM1
993 REPLACE_CEILL
994 REPLACE_CEILF
995 REPLACE_CEIL
996 REPLACE_CBRTL
997 REPLACE_CBRTF
998 HAVE_DECL_TRUNCL
999 HAVE_DECL_TRUNCF
1000 HAVE_DECL_TRUNC
1001 HAVE_DECL_TANL
1002 HAVE_DECL_SQRTL
1003 HAVE_DECL_SINL
1004 HAVE_DECL_ROUNDL
1005 HAVE_DECL_ROUNDF
1006 HAVE_DECL_ROUND
1007 HAVE_DECL_RINTF
1008 HAVE_DECL_REMAINDERL
1009 HAVE_DECL_REMAINDER
1010 HAVE_DECL_LOGB
1011 HAVE_DECL_LOG2L
1012 HAVE_DECL_LOG2F
1013 HAVE_DECL_LOG2
1014 HAVE_DECL_LOG10L
1015 HAVE_DECL_LOGL
1016 HAVE_DECL_LDEXPL
1017 HAVE_DECL_FREXPL
1018 HAVE_DECL_FLOORL
1019 HAVE_DECL_FLOORF
1020 HAVE_DECL_EXPM1L
1021 HAVE_DECL_EXP2L
1022 HAVE_DECL_EXP2F
1023 HAVE_DECL_EXP2
1024 HAVE_DECL_EXPL
1025 HAVE_DECL_COSL
1026 HAVE_DECL_COPYSIGNF
1027 HAVE_DECL_CEILL
1028 HAVE_DECL_CEILF
1029 HAVE_DECL_CBRTL
1030 HAVE_DECL_CBRTF
1031 HAVE_DECL_ATANL
1032 HAVE_DECL_ASINL
1033 HAVE_DECL_ACOSL
1034 HAVE_TANHF
1035 HAVE_TANL
1036 HAVE_TANF
1037 HAVE_SQRTL
1038 HAVE_SQRTF
1039 HAVE_SINHF
1040 HAVE_SINL
1041 HAVE_SINF
1042 HAVE_RINTL
1043 HAVE_RINT
1044 HAVE_REMAINDERF
1045 HAVE_REMAINDER
1046 HAVE_POWF
1047 HAVE_MODFL
1048 HAVE_MODFF
1049 HAVE_LOGBL
1050 HAVE_LOGBF
1051 HAVE_LOG1PL
1052 HAVE_LOG1PF
1053 HAVE_LOG1P
1054 HAVE_LOG10L
1055 HAVE_LOG10F
1056 HAVE_LOGL
1057 HAVE_LOGF
1058 HAVE_LDEXPF
1059 HAVE_ISNANL
1060 HAVE_ISNAND
1061 HAVE_ISNANF
1062 HAVE_ILOGBL
1063 HAVE_ILOGBF
1064 HAVE_ILOGB
1065 HAVE_HYPOTL
1066 HAVE_HYPOTF
1067 HAVE_FREXPF
1068 HAVE_FMODL
1069 HAVE_FMODF
1070 HAVE_FMAL
1071 HAVE_FMAF
1072 HAVE_FMA
1073 HAVE_FABSL
1074 HAVE_FABSF
1075 HAVE_EXPM1F
1076 HAVE_EXPM1
1077 HAVE_EXPL
1078 HAVE_EXPF
1079 HAVE_COSHF
1080 HAVE_COSL
1081 HAVE_COSF
1082 HAVE_COPYSIGNL
1083 HAVE_COPYSIGN
1084 HAVE_CBRTL
1085 HAVE_CBRTF
1086 HAVE_CBRT
1087 HAVE_ATAN2F
1088 HAVE_ATANL
1089 HAVE_ATANF
1090 HAVE_ASINL
1091 HAVE_ASINF
1092 HAVE_ACOSL
1093 HAVE_ACOSF
1094 GNULIB_TRUNCL
1095 GNULIB_TRUNCF
1096 GNULIB_TRUNC
1097 GNULIB_TANHF
1098 GNULIB_TANL
1099 GNULIB_TANF
1100 GNULIB_SQRTL
1101 GNULIB_SQRTF
1102 GNULIB_SINHF
1103 GNULIB_SINL
1104 GNULIB_SINF
1105 GNULIB_SIGNBIT
1106 GNULIB_ROUNDL
1107 GNULIB_ROUNDF
1108 GNULIB_ROUND
1109 GNULIB_RINTL
1110 GNULIB_RINTF
1111 GNULIB_RINT
1112 GNULIB_REMAINDERL
1113 GNULIB_REMAINDERF
1114 GNULIB_REMAINDER
1115 GNULIB_POWF
1116 GNULIB_MODFL
1117 GNULIB_MODFF
1118 GNULIB_MODF
1119 GNULIB_LOGBL
1120 GNULIB_LOGBF
1121 GNULIB_LOGB
1122 GNULIB_LOG2L
1123 GNULIB_LOG2F
1124 GNULIB_LOG2
1125 GNULIB_LOG1PL
1126 GNULIB_LOG1PF
1127 GNULIB_LOG1P
1128 GNULIB_LOG10L
1129 GNULIB_LOG10F
1130 GNULIB_LOG10
1131 GNULIB_LOGL
1132 GNULIB_LOGF
1133 GNULIB_LOG
1134 GNULIB_LDEXPL
1135 GNULIB_LDEXPF
1136 GNULIB_ISNANL
1137 GNULIB_ISNAND
1138 GNULIB_ISNANF
1139 GNULIB_ISNAN
1140 GNULIB_ISINF
1141 GNULIB_ISFINITE
1142 GNULIB_ILOGBL
1143 GNULIB_ILOGBF
1144 GNULIB_ILOGB
1145 GNULIB_HYPOTL
1146 GNULIB_HYPOTF
1147 GNULIB_HYPOT
1148 GNULIB_FREXPL
1149 GNULIB_FREXP
1150 GNULIB_FREXPF
1151 GNULIB_FMODL
1152 GNULIB_FMODF
1153 GNULIB_FMOD
1154 GNULIB_FMAL
1155 GNULIB_FMAF
1156 GNULIB_FMA
1157 GNULIB_FLOORL
1158 GNULIB_FLOORF
1159 GNULIB_FLOOR
1160 GNULIB_FABSL
1161 GNULIB_FABSF
1162 GNULIB_EXPM1L
1163 GNULIB_EXPM1F
1164 GNULIB_EXPM1
1165 GNULIB_EXP2L
1166 GNULIB_EXP2F
1167 GNULIB_EXP2
1168 GNULIB_EXPL
1169 GNULIB_EXPF
1170 GNULIB_COSHF
1171 GNULIB_COSL
1172 GNULIB_COSF
1173 GNULIB_COPYSIGNL
1174 GNULIB_COPYSIGNF
1175 GNULIB_COPYSIGN
1176 GNULIB_CEILL
1177 GNULIB_CEILF
1178 GNULIB_CEIL
1179 GNULIB_CBRTL
1180 GNULIB_CBRTF
1181 GNULIB_CBRT
1182 GNULIB_ATAN2F
1183 GNULIB_ATANL
1184 GNULIB_ATANF
1185 GNULIB_ASINL
1186 GNULIB_ASINF
1187 GNULIB_ACOSL
1188 GNULIB_ACOSF
1189 HAVE_FEATURES_H
1190 APPLE_UNIVERSAL_BUILD
1191 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1192 REPLACE_ITOLD
1193 GL_GENERATE_FLOAT_H_FALSE
1194 GL_GENERATE_FLOAT_H_TRUE
1195 FLOAT_H
1196 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1197 NEXT_FLOAT_H
1198 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1199 NEXT_FCNTL_H
1200 REPLACE_OPENAT
1201 REPLACE_OPEN
1202 REPLACE_FCNTL
1203 HAVE_OPENAT
1204 HAVE_FCNTL
1205 GNULIB_OPENAT
1206 GNULIB_OPEN
1207 GNULIB_NONBLOCKING
1208 GNULIB_FCNTL
1209 REPLACE_VSPRINTF
1210 REPLACE_VSNPRINTF
1211 REPLACE_VPRINTF
1212 REPLACE_VFPRINTF
1213 REPLACE_VDPRINTF
1214 REPLACE_VASPRINTF
1215 REPLACE_TMPFILE
1216 REPLACE_STDIO_WRITE_FUNCS
1217 REPLACE_STDIO_READ_FUNCS
1218 REPLACE_SPRINTF
1219 REPLACE_SNPRINTF
1220 REPLACE_RENAMEAT
1221 REPLACE_RENAME
1222 REPLACE_REMOVE
1223 REPLACE_PRINTF
1224 REPLACE_POPEN
1225 REPLACE_PERROR
1226 REPLACE_OBSTACK_PRINTF
1227 REPLACE_GETLINE
1228 REPLACE_GETDELIM
1229 REPLACE_FTELLO
1230 REPLACE_FTELL
1231 REPLACE_FSEEKO
1232 REPLACE_FSEEK
1233 REPLACE_FREOPEN
1234 REPLACE_FPURGE
1235 REPLACE_FPRINTF
1236 REPLACE_FOPEN
1237 REPLACE_FFLUSH
1238 REPLACE_FDOPEN
1239 REPLACE_FCLOSE
1240 REPLACE_DPRINTF
1241 HAVE_VDPRINTF
1242 HAVE_VASPRINTF
1243 HAVE_RENAMEAT
1244 HAVE_POPEN
1245 HAVE_PCLOSE
1246 HAVE_FTELLO
1247 HAVE_FSEEKO
1248 HAVE_DPRINTF
1249 HAVE_DECL_VSNPRINTF
1250 HAVE_DECL_SNPRINTF
1251 HAVE_DECL_OBSTACK_PRINTF
1252 HAVE_DECL_GETLINE
1253 HAVE_DECL_GETDELIM
1254 HAVE_DECL_FTELLO
1255 HAVE_DECL_FSEEKO
1256 HAVE_DECL_FPURGE
1257 GNULIB_VSPRINTF_POSIX
1258 GNULIB_VSNPRINTF
1259 GNULIB_VPRINTF_POSIX
1260 GNULIB_VPRINTF
1261 GNULIB_VFPRINTF_POSIX
1262 GNULIB_VFPRINTF
1263 GNULIB_VDPRINTF
1264 GNULIB_VSCANF
1265 GNULIB_VFSCANF
1266 GNULIB_VASPRINTF
1267 GNULIB_TMPFILE
1268 GNULIB_STDIO_H_SIGPIPE
1269 GNULIB_STDIO_H_NONBLOCKING
1270 GNULIB_SPRINTF_POSIX
1271 GNULIB_SNPRINTF
1272 GNULIB_SCANF
1273 GNULIB_RENAMEAT
1274 GNULIB_RENAME
1275 GNULIB_REMOVE
1276 GNULIB_PUTS
1277 GNULIB_PUTCHAR
1278 GNULIB_PUTC
1279 GNULIB_PRINTF_POSIX
1280 GNULIB_PRINTF
1281 GNULIB_POPEN
1282 GNULIB_PERROR
1283 GNULIB_PCLOSE
1284 GNULIB_OBSTACK_PRINTF_POSIX
1285 GNULIB_OBSTACK_PRINTF
1286 GNULIB_GETLINE
1287 GNULIB_GETDELIM
1288 GNULIB_GETCHAR
1289 GNULIB_GETC
1290 GNULIB_FWRITE
1291 GNULIB_FTELLO
1292 GNULIB_FTELL
1293 GNULIB_FSEEKO
1294 GNULIB_FSEEK
1295 GNULIB_FSCANF
1296 GNULIB_FREOPEN
1297 GNULIB_FREAD
1298 GNULIB_FPUTS
1299 GNULIB_FPUTC
1300 GNULIB_FPURGE
1301 GNULIB_FPRINTF_POSIX
1302 GNULIB_FPRINTF
1303 GNULIB_FOPEN
1304 GNULIB_FGETS
1305 GNULIB_FGETC
1306 GNULIB_FFLUSH
1307 GNULIB_FDOPEN
1308 GNULIB_FCLOSE
1309 GNULIB_DPRINTF
1310 EOVERFLOW_VALUE
1311 EOVERFLOW_HIDDEN
1312 ENOLINK_VALUE
1313 ENOLINK_HIDDEN
1314 EMULTIHOP_VALUE
1315 EMULTIHOP_HIDDEN
1316 GL_GENERATE_ERRNO_H_FALSE
1317 GL_GENERATE_ERRNO_H_TRUE
1318 ERRNO_H
1319 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1320 NEXT_ERRNO_H
1321 HAVE_DIRENT_H
1322 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1323 NEXT_DIRENT_H
1324 PRAGMA_COLUMNS
1325 PRAGMA_SYSTEM_HEADER
1326 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1327 INCLUDE_NEXT
1328 pkglibexecdir
1329 lispdir
1330 REPLACE_FDOPENDIR
1331 REPLACE_DIRFD
1332 REPLACE_CLOSEDIR
1333 REPLACE_OPENDIR
1334 HAVE_ALPHASORT
1335 HAVE_SCANDIR
1336 HAVE_FDOPENDIR
1337 HAVE_DECL_FDOPENDIR
1338 HAVE_DECL_DIRFD
1339 HAVE_CLOSEDIR
1340 HAVE_REWINDDIR
1341 HAVE_READDIR
1342 HAVE_OPENDIR
1343 GNULIB_ALPHASORT
1344 GNULIB_SCANDIR
1345 GNULIB_FDOPENDIR
1346 GNULIB_DIRFD
1347 GNULIB_CLOSEDIR
1348 GNULIB_REWINDDIR
1349 GNULIB_READDIR
1350 GNULIB_OPENDIR
1351 HAVE_WINSOCK2_H
1352 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1353 LIB_CLOCK_GETTIME
1354 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1355 UNISTD_H_HAVE_WINSOCK2_H
1356 REPLACE_WRITE
1357 REPLACE_USLEEP
1358 REPLACE_UNLINKAT
1359 REPLACE_UNLINK
1360 REPLACE_TTYNAME_R
1361 REPLACE_SYMLINK
1362 REPLACE_SLEEP
1363 REPLACE_RMDIR
1364 REPLACE_READLINK
1365 REPLACE_READ
1366 REPLACE_PWRITE
1367 REPLACE_PREAD
1368 REPLACE_LSEEK
1369 REPLACE_LINKAT
1370 REPLACE_LINK
1371 REPLACE_LCHOWN
1372 REPLACE_ISATTY
1373 REPLACE_GETPAGESIZE
1374 REPLACE_GETGROUPS
1375 REPLACE_GETLOGIN_R
1376 REPLACE_GETDOMAINNAME
1377 REPLACE_GETCWD
1378 REPLACE_FTRUNCATE
1379 REPLACE_FCHOWNAT
1380 REPLACE_DUP2
1381 REPLACE_DUP
1382 REPLACE_CLOSE
1383 REPLACE_CHOWN
1384 HAVE_SYS_PARAM_H
1385 HAVE_OS_H
1386 HAVE_DECL_TTYNAME_R
1387 HAVE_DECL_SETHOSTNAME
1388 HAVE_DECL_GETUSERSHELL
1389 HAVE_DECL_GETPAGESIZE
1390 HAVE_DECL_GETLOGIN_R
1391 HAVE_DECL_GETDOMAINNAME
1392 HAVE_DECL_FDATASYNC
1393 HAVE_DECL_FCHDIR
1394 HAVE_DECL_ENVIRON
1395 HAVE_USLEEP
1396 HAVE_UNLINKAT
1397 HAVE_SYMLINKAT
1398 HAVE_SYMLINK
1399 HAVE_SLEEP
1400 HAVE_SETHOSTNAME
1401 HAVE_READLINKAT
1402 HAVE_READLINK
1403 HAVE_PWRITE
1404 HAVE_PREAD
1405 HAVE_PIPE2
1406 HAVE_PIPE
1407 HAVE_LINKAT
1408 HAVE_LINK
1409 HAVE_LCHOWN
1410 HAVE_GROUP_MEMBER
1411 HAVE_GETPAGESIZE
1412 HAVE_GETLOGIN
1413 HAVE_GETHOSTNAME
1414 HAVE_GETGROUPS
1415 HAVE_GETDTABLESIZE
1416 HAVE_FTRUNCATE
1417 HAVE_FSYNC
1418 HAVE_FDATASYNC
1419 HAVE_FCHOWNAT
1420 HAVE_FCHDIR
1421 HAVE_FACCESSAT
1422 HAVE_EUIDACCESS
1423 HAVE_DUP3
1424 HAVE_DUP2
1425 HAVE_CHOWN
1426 GNULIB_WRITE
1427 GNULIB_USLEEP
1428 GNULIB_UNLINKAT
1429 GNULIB_UNLINK
1430 GNULIB_UNISTD_H_SIGPIPE
1431 GNULIB_UNISTD_H_NONBLOCKING
1432 GNULIB_TTYNAME_R
1433 GNULIB_SYMLINKAT
1434 GNULIB_SYMLINK
1435 GNULIB_SLEEP
1436 GNULIB_SETHOSTNAME
1437 GNULIB_RMDIR
1438 GNULIB_READLINKAT
1439 GNULIB_READLINK
1440 GNULIB_READ
1441 GNULIB_PWRITE
1442 GNULIB_PREAD
1443 GNULIB_PIPE2
1444 GNULIB_PIPE
1445 GNULIB_LSEEK
1446 GNULIB_LINKAT
1447 GNULIB_LINK
1448 GNULIB_LCHOWN
1449 GNULIB_ISATTY
1450 GNULIB_GROUP_MEMBER
1451 GNULIB_GETUSERSHELL
1452 GNULIB_GETPAGESIZE
1453 GNULIB_GETLOGIN_R
1454 GNULIB_GETLOGIN
1455 GNULIB_GETHOSTNAME
1456 GNULIB_GETGROUPS
1457 GNULIB_GETDTABLESIZE
1458 GNULIB_GETDOMAINNAME
1459 GNULIB_GETCWD
1460 GNULIB_FTRUNCATE
1461 GNULIB_FSYNC
1462 GNULIB_FDATASYNC
1463 GNULIB_FCHOWNAT
1464 GNULIB_FCHDIR
1465 GNULIB_FACCESSAT
1466 GNULIB_EUIDACCESS
1467 GNULIB_ENVIRON
1468 GNULIB_DUP3
1469 GNULIB_DUP2
1470 GNULIB_DUP
1471 GNULIB_CLOSE
1472 GNULIB_CHOWN
1473 GNULIB_CHDIR
1474 REPLACE_WCTOMB
1475 REPLACE_UNSETENV
1476 REPLACE_STRTOD
1477 REPLACE_SETENV
1478 REPLACE_REALPATH
1479 REPLACE_REALLOC
1480 REPLACE_RANDOM_R
1481 REPLACE_PUTENV
1482 REPLACE_PTSNAME_R
1483 REPLACE_PTSNAME
1484 REPLACE_MKSTEMP
1485 REPLACE_MBTOWC
1486 REPLACE_MALLOC
1487 REPLACE_CANONICALIZE_FILE_NAME
1488 REPLACE_CALLOC
1489 HAVE_DECL_UNSETENV
1490 HAVE_UNLOCKPT
1491 HAVE_SYS_LOADAVG_H
1492 HAVE_STRUCT_RANDOM_DATA
1493 HAVE_STRTOULL
1494 HAVE_STRTOLL
1495 HAVE_STRTOD
1496 HAVE_DECL_SETENV
1497 HAVE_SETENV
1498 HAVE_SECURE_GETENV
1499 HAVE_RPMATCH
1500 HAVE_REALPATH
1501 HAVE_RANDOM_R
1502 HAVE_RANDOM_H
1503 HAVE_RANDOM
1504 HAVE_PTSNAME_R
1505 HAVE_PTSNAME
1506 HAVE_POSIX_OPENPT
1507 HAVE_MKSTEMPS
1508 HAVE_MKSTEMP
1509 HAVE_MKOSTEMPS
1510 HAVE_MKOSTEMP
1511 HAVE_MKDTEMP
1512 HAVE_GRANTPT
1513 HAVE_GETSUBOPT
1514 HAVE_DECL_GETLOADAVG
1515 HAVE_CANONICALIZE_FILE_NAME
1516 HAVE_ATOLL
1517 HAVE__EXIT
1518 GNULIB_WCTOMB
1519 GNULIB_UNSETENV
1520 GNULIB_UNLOCKPT
1521 GNULIB_SYSTEM_POSIX
1522 GNULIB_STRTOULL
1523 GNULIB_STRTOLL
1524 GNULIB_STRTOD
1525 GNULIB_SETENV
1526 GNULIB_SECURE_GETENV
1527 GNULIB_RPMATCH
1528 GNULIB_REALPATH
1529 GNULIB_REALLOC_POSIX
1530 GNULIB_RANDOM_R
1531 GNULIB_RANDOM
1532 GNULIB_PUTENV
1533 GNULIB_PTSNAME_R
1534 GNULIB_PTSNAME
1535 GNULIB_POSIX_OPENPT
1536 GNULIB_MKSTEMPS
1537 GNULIB_MKSTEMP
1538 GNULIB_MKOSTEMPS
1539 GNULIB_MKOSTEMP
1540 GNULIB_MKDTEMP
1541 GNULIB_MBTOWC
1542 GNULIB_MALLOC_POSIX
1543 GNULIB_GRANTPT
1544 GNULIB_GETSUBOPT
1545 GNULIB_GETLOADAVG
1546 GNULIB_CANONICALIZE_FILE_NAME
1547 GNULIB_CALLOC_POSIX
1548 GNULIB_ATOLL
1549 GNULIB__EXIT
1550 GL_GENERATE_ALLOCA_H_FALSE
1551 GL_GENERATE_ALLOCA_H_TRUE
1552 ALLOCA_H
1553 ALLOCA
1554 GL_COND_LIBTOOL_FALSE
1555 GL_COND_LIBTOOL_TRUE
1556 host_os
1557 host_vendor
1558 host_cpu
1559 host
1560 build_os
1561 build_vendor
1562 build_cpu
1563 build
1564 ARFLAGS
1565 AR
1566 EGREP
1567 RANLIB
1568 LN_S
1569 NM
1570 GREP
1571 CPP
1572 am__fastdepCC_FALSE
1573 am__fastdepCC_TRUE
1574 CCDEPMODE
1575 am__nodep
1576 AMDEPBACKSLASH
1577 AMDEP_FALSE
1578 AMDEP_TRUE
1579 am__quote
1580 am__include
1581 DEPDIR
1582 OBJEXT
1583 EXEEXT
1584 ac_ct_CC
1585 CPPFLAGS
1586 LDFLAGS
1587 CFLAGS
1588 CC
1589 AM_BACKSLASH
1590 AM_DEFAULT_VERBOSITY
1591 AM_DEFAULT_V
1592 AM_V
1593 am__untar
1594 am__tar
1595 AMTAR
1596 SET_MAKE
1597 AWK
1598 MKDIR_P
1599 INSTALL_STRIP_PROGRAM
1600 STRIP
1601 install_sh
1602 MAKEINFO
1603 AUTOHEADER
1604 AUTOMAKE
1605 AUTOCONF
1606 ACLOCAL
1607 VERSION
1608 PACKAGE
1609 CYGPATH_W
1610 am__isrc
1611 INSTALL_DATA
1612 INSTALL_SCRIPT
1613 INSTALL_PROGRAM
1614 mkdir_p
1615 target_alias
1616 host_alias
1617 build_alias
1618 LIBS
1619 ECHO_T
1620 ECHO_N
1621 ECHO_C
1622 DEFS
1623 mandir
1624 localedir
1625 libdir
1626 psdir
1627 pdfdir
1628 dvidir
1629 htmldir
1630 infodir
1631 docdir
1632 oldincludedir
1633 includedir
1634 localstatedir
1635 sharedstatedir
1636 sysconfdir
1637 datadir
1638 datarootdir
1639 libexecdir
1640 sbindir
1641 bindir
1642 program_transform_name
1643 prefix
1644 exec_prefix
1645 PACKAGE_URL
1646 PACKAGE_BUGREPORT
1647 PACKAGE_STRING
1648 PACKAGE_VERSION
1649 PACKAGE_TARNAME
1650 PACKAGE_NAME
1651 PATH_SEPARATOR
1652 SHELL'
1653 ac_subst_files=''
1654 ac_user_opts='
1655 enable_option_checking
1656 enable_silent_rules
1657 enable_dependency_tracking
1658 enable_largefile
1659 enable_threads
1660 with_gnu_ld
1661 enable_rpath
1662 with_libpth_prefix
1663 enable_gcc_warnings
1664 '
1665       ac_precious_vars='build_alias
1666 host_alias
1667 target_alias
1668 CC
1669 CFLAGS
1670 LDFLAGS
1671 LIBS
1672 CPPFLAGS
1673 CPP'
1674
1675
1676 # Initialize some variables set by options.
1677 ac_init_help=
1678 ac_init_version=false
1679 ac_unrecognized_opts=
1680 ac_unrecognized_sep=
1681 # The variables have the same names as the options, with
1682 # dashes changed to underlines.
1683 cache_file=/dev/null
1684 exec_prefix=NONE
1685 no_create=
1686 no_recursion=
1687 prefix=NONE
1688 program_prefix=NONE
1689 program_suffix=NONE
1690 program_transform_name=s,x,x,
1691 silent=
1692 site=
1693 srcdir=
1694 verbose=
1695 x_includes=NONE
1696 x_libraries=NONE
1697
1698 # Installation directory options.
1699 # These are left unexpanded so users can "make install exec_prefix=/foo"
1700 # and all the variables that are supposed to be based on exec_prefix
1701 # by default will actually change.
1702 # Use braces instead of parens because sh, perl, etc. also accept them.
1703 # (The list follows the same order as the GNU Coding Standards.)
1704 bindir='${exec_prefix}/bin'
1705 sbindir='${exec_prefix}/sbin'
1706 libexecdir='${exec_prefix}/libexec'
1707 datarootdir='${prefix}/share'
1708 datadir='${datarootdir}'
1709 sysconfdir='${prefix}/etc'
1710 sharedstatedir='${prefix}/com'
1711 localstatedir='${prefix}/var'
1712 includedir='${prefix}/include'
1713 oldincludedir='/usr/include'
1714 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1715 infodir='${datarootdir}/info'
1716 htmldir='${docdir}'
1717 dvidir='${docdir}'
1718 pdfdir='${docdir}'
1719 psdir='${docdir}'
1720 libdir='${exec_prefix}/lib'
1721 localedir='${datarootdir}/locale'
1722 mandir='${datarootdir}/man'
1723
1724 ac_prev=
1725 ac_dashdash=
1726 for ac_option
1727 do
1728   # If the previous option needs an argument, assign it.
1729   if test -n "$ac_prev"; then
1730     eval $ac_prev=\$ac_option
1731     ac_prev=
1732     continue
1733   fi
1734
1735   case $ac_option in
1736   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1737   *=)   ac_optarg= ;;
1738   *)    ac_optarg=yes ;;
1739   esac
1740
1741   # Accept the important Cygnus configure options, so we can diagnose typos.
1742
1743   case $ac_dashdash$ac_option in
1744   --)
1745     ac_dashdash=yes ;;
1746
1747   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1748     ac_prev=bindir ;;
1749   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1750     bindir=$ac_optarg ;;
1751
1752   -build | --build | --buil | --bui | --bu)
1753     ac_prev=build_alias ;;
1754   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1755     build_alias=$ac_optarg ;;
1756
1757   -cache-file | --cache-file | --cache-fil | --cache-fi \
1758   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1759     ac_prev=cache_file ;;
1760   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1761   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1762     cache_file=$ac_optarg ;;
1763
1764   --config-cache | -C)
1765     cache_file=config.cache ;;
1766
1767   -datadir | --datadir | --datadi | --datad)
1768     ac_prev=datadir ;;
1769   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1770     datadir=$ac_optarg ;;
1771
1772   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1773   | --dataroo | --dataro | --datar)
1774     ac_prev=datarootdir ;;
1775   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1776   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1777     datarootdir=$ac_optarg ;;
1778
1779   -disable-* | --disable-*)
1780     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1781     # Reject names that are not valid shell variable names.
1782     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1783       as_fn_error $? "invalid feature name: $ac_useropt"
1784     ac_useropt_orig=$ac_useropt
1785     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1786     case $ac_user_opts in
1787       *"
1788 "enable_$ac_useropt"
1789 "*) ;;
1790       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1791          ac_unrecognized_sep=', ';;
1792     esac
1793     eval enable_$ac_useropt=no ;;
1794
1795   -docdir | --docdir | --docdi | --doc | --do)
1796     ac_prev=docdir ;;
1797   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1798     docdir=$ac_optarg ;;
1799
1800   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1801     ac_prev=dvidir ;;
1802   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1803     dvidir=$ac_optarg ;;
1804
1805   -enable-* | --enable-*)
1806     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1807     # Reject names that are not valid shell variable names.
1808     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1809       as_fn_error $? "invalid feature name: $ac_useropt"
1810     ac_useropt_orig=$ac_useropt
1811     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1812     case $ac_user_opts in
1813       *"
1814 "enable_$ac_useropt"
1815 "*) ;;
1816       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1817          ac_unrecognized_sep=', ';;
1818     esac
1819     eval enable_$ac_useropt=\$ac_optarg ;;
1820
1821   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1822   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1823   | --exec | --exe | --ex)
1824     ac_prev=exec_prefix ;;
1825   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1826   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1827   | --exec=* | --exe=* | --ex=*)
1828     exec_prefix=$ac_optarg ;;
1829
1830   -gas | --gas | --ga | --g)
1831     # Obsolete; use --with-gas.
1832     with_gas=yes ;;
1833
1834   -help | --help | --hel | --he | -h)
1835     ac_init_help=long ;;
1836   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1837     ac_init_help=recursive ;;
1838   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1839     ac_init_help=short ;;
1840
1841   -host | --host | --hos | --ho)
1842     ac_prev=host_alias ;;
1843   -host=* | --host=* | --hos=* | --ho=*)
1844     host_alias=$ac_optarg ;;
1845
1846   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1847     ac_prev=htmldir ;;
1848   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1849   | --ht=*)
1850     htmldir=$ac_optarg ;;
1851
1852   -includedir | --includedir | --includedi | --included | --include \
1853   | --includ | --inclu | --incl | --inc)
1854     ac_prev=includedir ;;
1855   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1856   | --includ=* | --inclu=* | --incl=* | --inc=*)
1857     includedir=$ac_optarg ;;
1858
1859   -infodir | --infodir | --infodi | --infod | --info | --inf)
1860     ac_prev=infodir ;;
1861   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1862     infodir=$ac_optarg ;;
1863
1864   -libdir | --libdir | --libdi | --libd)
1865     ac_prev=libdir ;;
1866   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1867     libdir=$ac_optarg ;;
1868
1869   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1870   | --libexe | --libex | --libe)
1871     ac_prev=libexecdir ;;
1872   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1873   | --libexe=* | --libex=* | --libe=*)
1874     libexecdir=$ac_optarg ;;
1875
1876   -localedir | --localedir | --localedi | --localed | --locale)
1877     ac_prev=localedir ;;
1878   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1879     localedir=$ac_optarg ;;
1880
1881   -localstatedir | --localstatedir | --localstatedi | --localstated \
1882   | --localstate | --localstat | --localsta | --localst | --locals)
1883     ac_prev=localstatedir ;;
1884   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1885   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1886     localstatedir=$ac_optarg ;;
1887
1888   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1889     ac_prev=mandir ;;
1890   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1891     mandir=$ac_optarg ;;
1892
1893   -nfp | --nfp | --nf)
1894     # Obsolete; use --without-fp.
1895     with_fp=no ;;
1896
1897   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1898   | --no-cr | --no-c | -n)
1899     no_create=yes ;;
1900
1901   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1902   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1903     no_recursion=yes ;;
1904
1905   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1906   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1907   | --oldin | --oldi | --old | --ol | --o)
1908     ac_prev=oldincludedir ;;
1909   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1910   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1911   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1912     oldincludedir=$ac_optarg ;;
1913
1914   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1915     ac_prev=prefix ;;
1916   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1917     prefix=$ac_optarg ;;
1918
1919   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1920   | --program-pre | --program-pr | --program-p)
1921     ac_prev=program_prefix ;;
1922   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1923   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1924     program_prefix=$ac_optarg ;;
1925
1926   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1927   | --program-suf | --program-su | --program-s)
1928     ac_prev=program_suffix ;;
1929   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1930   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1931     program_suffix=$ac_optarg ;;
1932
1933   -program-transform-name | --program-transform-name \
1934   | --program-transform-nam | --program-transform-na \
1935   | --program-transform-n | --program-transform- \
1936   | --program-transform | --program-transfor \
1937   | --program-transfo | --program-transf \
1938   | --program-trans | --program-tran \
1939   | --progr-tra | --program-tr | --program-t)
1940     ac_prev=program_transform_name ;;
1941   -program-transform-name=* | --program-transform-name=* \
1942   | --program-transform-nam=* | --program-transform-na=* \
1943   | --program-transform-n=* | --program-transform-=* \
1944   | --program-transform=* | --program-transfor=* \
1945   | --program-transfo=* | --program-transf=* \
1946   | --program-trans=* | --program-tran=* \
1947   | --progr-tra=* | --program-tr=* | --program-t=*)
1948     program_transform_name=$ac_optarg ;;
1949
1950   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1951     ac_prev=pdfdir ;;
1952   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1953     pdfdir=$ac_optarg ;;
1954
1955   -psdir | --psdir | --psdi | --psd | --ps)
1956     ac_prev=psdir ;;
1957   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1958     psdir=$ac_optarg ;;
1959
1960   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1961   | -silent | --silent | --silen | --sile | --sil)
1962     silent=yes ;;
1963
1964   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1965     ac_prev=sbindir ;;
1966   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1967   | --sbi=* | --sb=*)
1968     sbindir=$ac_optarg ;;
1969
1970   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1971   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1972   | --sharedst | --shareds | --shared | --share | --shar \
1973   | --sha | --sh)
1974     ac_prev=sharedstatedir ;;
1975   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1976   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1977   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1978   | --sha=* | --sh=*)
1979     sharedstatedir=$ac_optarg ;;
1980
1981   -site | --site | --sit)
1982     ac_prev=site ;;
1983   -site=* | --site=* | --sit=*)
1984     site=$ac_optarg ;;
1985
1986   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1987     ac_prev=srcdir ;;
1988   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1989     srcdir=$ac_optarg ;;
1990
1991   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1992   | --syscon | --sysco | --sysc | --sys | --sy)
1993     ac_prev=sysconfdir ;;
1994   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1995   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1996     sysconfdir=$ac_optarg ;;
1997
1998   -target | --target | --targe | --targ | --tar | --ta | --t)
1999     ac_prev=target_alias ;;
2000   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2001     target_alias=$ac_optarg ;;
2002
2003   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2004     verbose=yes ;;
2005
2006   -version | --version | --versio | --versi | --vers | -V)
2007     ac_init_version=: ;;
2008
2009   -with-* | --with-*)
2010     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2011     # Reject names that are not valid shell variable names.
2012     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2013       as_fn_error $? "invalid package name: $ac_useropt"
2014     ac_useropt_orig=$ac_useropt
2015     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2016     case $ac_user_opts in
2017       *"
2018 "with_$ac_useropt"
2019 "*) ;;
2020       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2021          ac_unrecognized_sep=', ';;
2022     esac
2023     eval with_$ac_useropt=\$ac_optarg ;;
2024
2025   -without-* | --without-*)
2026     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2027     # Reject names that are not valid shell variable names.
2028     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2029       as_fn_error $? "invalid package name: $ac_useropt"
2030     ac_useropt_orig=$ac_useropt
2031     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2032     case $ac_user_opts in
2033       *"
2034 "with_$ac_useropt"
2035 "*) ;;
2036       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2037          ac_unrecognized_sep=', ';;
2038     esac
2039     eval with_$ac_useropt=no ;;
2040
2041   --x)
2042     # Obsolete; use --with-x.
2043     with_x=yes ;;
2044
2045   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2046   | --x-incl | --x-inc | --x-in | --x-i)
2047     ac_prev=x_includes ;;
2048   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2049   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2050     x_includes=$ac_optarg ;;
2051
2052   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2053   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2054     ac_prev=x_libraries ;;
2055   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2056   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2057     x_libraries=$ac_optarg ;;
2058
2059   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2060 Try \`$0 --help' for more information"
2061     ;;
2062
2063   *=*)
2064     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2065     # Reject names that are not valid shell variable names.
2066     case $ac_envvar in #(
2067       '' | [0-9]* | *[!_$as_cr_alnum]* )
2068       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2069     esac
2070     eval $ac_envvar=\$ac_optarg
2071     export $ac_envvar ;;
2072
2073   *)
2074     # FIXME: should be removed in autoconf 3.0.
2075     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2076     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2077       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2078     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2079     ;;
2080
2081   esac
2082 done
2083
2084 if test -n "$ac_prev"; then
2085   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2086   as_fn_error $? "missing argument to $ac_option"
2087 fi
2088
2089 if test -n "$ac_unrecognized_opts"; then
2090   case $enable_option_checking in
2091     no) ;;
2092     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2093     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2094   esac
2095 fi
2096
2097 # Check all directory arguments for consistency.
2098 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2099                 datadir sysconfdir sharedstatedir localstatedir includedir \
2100                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2101                 libdir localedir mandir
2102 do
2103   eval ac_val=\$$ac_var
2104   # Remove trailing slashes.
2105   case $ac_val in
2106     */ )
2107       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2108       eval $ac_var=\$ac_val;;
2109   esac
2110   # Be sure to have absolute directory names.
2111   case $ac_val in
2112     [\\/$]* | ?:[\\/]* )  continue;;
2113     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2114   esac
2115   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2116 done
2117
2118 # There might be people who depend on the old broken behavior: `$host'
2119 # used to hold the argument of --host etc.
2120 # FIXME: To remove some day.
2121 build=$build_alias
2122 host=$host_alias
2123 target=$target_alias
2124
2125 # FIXME: To remove some day.
2126 if test "x$host_alias" != x; then
2127   if test "x$build_alias" = x; then
2128     cross_compiling=maybe
2129   elif test "x$build_alias" != "x$host_alias"; then
2130     cross_compiling=yes
2131   fi
2132 fi
2133
2134 ac_tool_prefix=
2135 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2136
2137 test "$silent" = yes && exec 6>/dev/null
2138
2139
2140 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2141 ac_ls_di=`ls -di .` &&
2142 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2143   as_fn_error $? "working directory cannot be determined"
2144 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2145   as_fn_error $? "pwd does not report name of working directory"
2146
2147
2148 # Find the source files, if location was not specified.
2149 if test -z "$srcdir"; then
2150   ac_srcdir_defaulted=yes
2151   # Try the directory containing this script, then the parent directory.
2152   ac_confdir=`$as_dirname -- "$as_myself" ||
2153 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2154          X"$as_myself" : 'X\(//\)[^/]' \| \
2155          X"$as_myself" : 'X\(//\)$' \| \
2156          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2157 printf "%s\n" X"$as_myself" |
2158     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2159             s//\1/
2160             q
2161           }
2162           /^X\(\/\/\)[^/].*/{
2163             s//\1/
2164             q
2165           }
2166           /^X\(\/\/\)$/{
2167             s//\1/
2168             q
2169           }
2170           /^X\(\/\).*/{
2171             s//\1/
2172             q
2173           }
2174           s/.*/./; q'`
2175   srcdir=$ac_confdir
2176   if test ! -r "$srcdir/$ac_unique_file"; then
2177     srcdir=..
2178   fi
2179 else
2180   ac_srcdir_defaulted=no
2181 fi
2182 if test ! -r "$srcdir/$ac_unique_file"; then
2183   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2184   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2185 fi
2186 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2187 ac_abs_confdir=`(
2188         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2189         pwd)`
2190 # When building in place, set srcdir=.
2191 if test "$ac_abs_confdir" = "$ac_pwd"; then
2192   srcdir=.
2193 fi
2194 # Remove unnecessary trailing slashes from srcdir.
2195 # Double slashes in file names in object file debugging info
2196 # mess up M-x gdb in Emacs.
2197 case $srcdir in
2198 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2199 esac
2200 for ac_var in $ac_precious_vars; do
2201   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2202   eval ac_env_${ac_var}_value=\$${ac_var}
2203   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2204   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2205 done
2206
2207 #
2208 # Report the --help message.
2209 #
2210 if test "$ac_init_help" = "long"; then
2211   # Omit some internal or obsolete options to make the list less imposing.
2212   # This message is too long to be a string in the A/UX 3.1 sh.
2213   cat <<_ACEOF
2214 \`configure' configures gzip 1.6 to adapt to many kinds of systems.
2215
2216 Usage: $0 [OPTION]... [VAR=VALUE]...
2217
2218 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2219 VAR=VALUE.  See below for descriptions of some of the useful variables.
2220
2221 Defaults for the options are specified in brackets.
2222
2223 Configuration:
2224   -h, --help              display this help and exit
2225       --help=short        display options specific to this package
2226       --help=recursive    display the short help of all the included packages
2227   -V, --version           display version information and exit
2228   -q, --quiet, --silent   do not print \`checking ...' messages
2229       --cache-file=FILE   cache test results in FILE [disabled]
2230   -C, --config-cache      alias for \`--cache-file=config.cache'
2231   -n, --no-create         do not create output files
2232       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2233
2234 Installation directories:
2235   --prefix=PREFIX         install architecture-independent files in PREFIX
2236                           [$ac_default_prefix]
2237   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2238                           [PREFIX]
2239
2240 By default, \`make install' will install all the files in
2241 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2242 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2243 for instance \`--prefix=\$HOME'.
2244
2245 For better control, use the options below.
2246
2247 Fine tuning of the installation directories:
2248   --bindir=DIR            user executables [EPREFIX/bin]
2249   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2250   --libexecdir=DIR        program executables [EPREFIX/libexec]
2251   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2252   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2253   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2254   --libdir=DIR            object code libraries [EPREFIX/lib]
2255   --includedir=DIR        C header files [PREFIX/include]
2256   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2257   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2258   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2259   --infodir=DIR           info documentation [DATAROOTDIR/info]
2260   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2261   --mandir=DIR            man documentation [DATAROOTDIR/man]
2262   --docdir=DIR            documentation root [DATAROOTDIR/doc/gzip]
2263   --htmldir=DIR           html documentation [DOCDIR]
2264   --dvidir=DIR            dvi documentation [DOCDIR]
2265   --pdfdir=DIR            pdf documentation [DOCDIR]
2266   --psdir=DIR             ps documentation [DOCDIR]
2267 _ACEOF
2268
2269   cat <<\_ACEOF
2270
2271 Program names:
2272   --program-prefix=PREFIX            prepend PREFIX to installed program names
2273   --program-suffix=SUFFIX            append SUFFIX to installed program names
2274   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2275
2276 System types:
2277   --build=BUILD     configure for building on BUILD [guessed]
2278   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2279 _ACEOF
2280 fi
2281
2282 if test -n "$ac_init_help"; then
2283   case $ac_init_help in
2284      short | recursive ) echo "Configuration of gzip 1.6:";;
2285    esac
2286   cat <<\_ACEOF
2287
2288 Optional Features:
2289   --disable-option-checking  ignore unrecognized --enable/--with options
2290   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2291   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2292   --enable-silent-rules   less verbose build output (undo: "make V=1")
2293   --disable-silent-rules  verbose build output (undo: "make V=0")
2294   --enable-dependency-tracking
2295                           do not reject slow dependency extractors
2296   --disable-dependency-tracking
2297                           speeds up one-time build
2298   --disable-largefile     omit support for large files
2299   --enable-threads={posix|solaris|pth|windows}
2300                           specify multithreading API
2301   --disable-threads       build without multithread safety
2302   --disable-rpath         do not hardcode runtime library paths
2303   --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2304                           GNU make)
2305
2306 Optional Packages:
2307   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2308   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2309   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2310   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2311   --without-libpth-prefix     don't search for libpth in includedir and libdir
2312
2313 Some influential environment variables:
2314   CC          C compiler command
2315   CFLAGS      C compiler flags
2316   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2317               nonstandard directory <lib dir>
2318   LIBS        libraries to pass to the linker, e.g. -l<library>
2319   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2320               you have headers in a nonstandard directory <include dir>
2321   CPP         C preprocessor
2322
2323 Use these variables to override the choices made by `configure' or to help
2324 it to find libraries and programs with nonstandard names/locations.
2325
2326 Report bugs to <bug-gzip@gnu.org>.
2327 _ACEOF
2328 ac_status=$?
2329 fi
2330
2331 if test "$ac_init_help" = "recursive"; then
2332   # If there are subdirs, report their specific --help.
2333   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2334     test -d "$ac_dir" ||
2335       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2336       continue
2337     ac_builddir=.
2338
2339 case "$ac_dir" in
2340 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2341 *)
2342   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2343   # A ".." for each directory in $ac_dir_suffix.
2344   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2345   case $ac_top_builddir_sub in
2346   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2348   esac ;;
2349 esac
2350 ac_abs_top_builddir=$ac_pwd
2351 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2352 # for backward compatibility:
2353 ac_top_builddir=$ac_top_build_prefix
2354
2355 case $srcdir in
2356   .)  # We are building in place.
2357     ac_srcdir=.
2358     ac_top_srcdir=$ac_top_builddir_sub
2359     ac_abs_top_srcdir=$ac_pwd ;;
2360   [\\/]* | ?:[\\/]* )  # Absolute name.
2361     ac_srcdir=$srcdir$ac_dir_suffix;
2362     ac_top_srcdir=$srcdir
2363     ac_abs_top_srcdir=$srcdir ;;
2364   *) # Relative name.
2365     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2366     ac_top_srcdir=$ac_top_build_prefix$srcdir
2367     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2368 esac
2369 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2370
2371     cd "$ac_dir" || { ac_status=$?; continue; }
2372     # Check for guested configure.
2373     if test -f "$ac_srcdir/configure.gnu"; then
2374       echo &&
2375       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2376     elif test -f "$ac_srcdir/configure"; then
2377       echo &&
2378       $SHELL "$ac_srcdir/configure" --help=recursive
2379     else
2380       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2381     fi || ac_status=$?
2382     cd "$ac_pwd" || { ac_status=$?; break; }
2383   done
2384 fi
2385
2386 test -n "$ac_init_help" && exit $ac_status
2387 if $ac_init_version; then
2388   cat <<\_ACEOF
2389 gzip configure 1.6
2390 generated by GNU Autoconf 2.69.97-b1aba91
2391
2392 Copyright (C) 2013 Free Software Foundation, Inc.
2393 This configure script is free software; the Free Software Foundation
2394 gives unlimited permission to copy, distribute and modify it.
2395 _ACEOF
2396   exit
2397 fi
2398
2399 ## ------------------------ ##
2400 ## Autoconf initialization. ##
2401 ## ------------------------ ##
2402
2403 # ac_fn_c_try_compile LINENO
2404 # --------------------------
2405 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2406 ac_fn_c_try_compile ()
2407 {
2408   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2409   rm -f conftest.$ac_objext
2410   if { { ac_try="$ac_compile"
2411 case "(($ac_try" in
2412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2413   *) ac_try_echo=$ac_try;;
2414 esac
2415 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2416 printf "%s\n" "$ac_try_echo"; } >&5
2417   (eval "$ac_compile") 2>conftest.err
2418   ac_status=$?
2419   if test -s conftest.err; then
2420     grep -v '^ *+' conftest.err >conftest.er1
2421     cat conftest.er1 >&5
2422     mv -f conftest.er1 conftest.err
2423   fi
2424   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2425   test $ac_status = 0; } && {
2426          test -z "$ac_c_werror_flag" ||
2427          test ! -s conftest.err
2428        } && test -s conftest.$ac_objext; then :
2429   ac_retval=0
2430 else
2431   printf "%s\n" "$as_me: failed program was:" >&5
2432 sed 's/^/| /' conftest.$ac_ext >&5
2433
2434         ac_retval=1
2435 fi
2436   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2437   as_fn_set_status $ac_retval
2438
2439 } # ac_fn_c_try_compile
2440
2441 # ac_fn_c_try_cpp LINENO
2442 # ----------------------
2443 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2444 ac_fn_c_try_cpp ()
2445 {
2446   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447   if { { ac_try="$ac_cpp conftest.$ac_ext"
2448 case "(($ac_try" in
2449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450   *) ac_try_echo=$ac_try;;
2451 esac
2452 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453 printf "%s\n" "$ac_try_echo"; } >&5
2454   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2455   ac_status=$?
2456   if test -s conftest.err; then
2457     grep -v '^ *+' conftest.err >conftest.er1
2458     cat conftest.er1 >&5
2459     mv -f conftest.er1 conftest.err
2460   fi
2461   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462   test $ac_status = 0; } > conftest.i && {
2463          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2464          test ! -s conftest.err
2465        }; then :
2466   ac_retval=0
2467 else
2468   printf "%s\n" "$as_me: failed program was:" >&5
2469 sed 's/^/| /' conftest.$ac_ext >&5
2470
2471     ac_retval=1
2472 fi
2473   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474   as_fn_set_status $ac_retval
2475
2476 } # ac_fn_c_try_cpp
2477
2478 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2479 # -------------------------------------------------------
2480 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2481 # the include files in INCLUDES and setting the cache variable VAR
2482 # accordingly.
2483 ac_fn_c_check_header_mongrel ()
2484 {
2485   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2486   if eval \${$3+:} false; then :
2487   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2488 printf %s "checking for $2... " >&6; }
2489 if eval \${$3+:} false; then :
2490   printf %s "(cached) " >&6
2491 fi
2492 eval ac_res=\$$3
2493                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2494 printf "%s\n" "$ac_res" >&6; }
2495 else
2496   # Is the header compilable?
2497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2498 printf %s "checking $2 usability... " >&6; }
2499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500 /* end confdefs.h.  */
2501 $4
2502 #include <$2>
2503 _ACEOF
2504 if ac_fn_c_try_compile "$LINENO"; then :
2505   ac_header_compiler=yes
2506 else
2507   ac_header_compiler=no
2508 fi
2509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2511 printf "%s\n" "$ac_header_compiler" >&6; }
2512
2513 # Is the header present?
2514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2515 printf %s "checking $2 presence... " >&6; }
2516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2517 /* end confdefs.h.  */
2518 #include <$2>
2519 _ACEOF
2520 if ac_fn_c_try_cpp "$LINENO"; then :
2521   ac_header_preproc=yes
2522 else
2523   ac_header_preproc=no
2524 fi
2525 rm -f conftest.err conftest.i conftest.$ac_ext
2526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2527 printf "%s\n" "$ac_header_preproc" >&6; }
2528
2529 # So?  What about this header?
2530 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2531   yes:no: )
2532     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2533 printf "%s\n" "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2534     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2535 printf "%s\n" "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2536     ;;
2537   no:yes:* )
2538     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2539 printf "%s\n" "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2540     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2541 printf "%s\n" "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2542     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2543 printf "%s\n" "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2544     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2545 printf "%s\n" "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2546     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2547 printf "%s\n" "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2548 ( printf "%s\n" "## ------------------------------- ##
2549 ## Report this to bug-gzip@gnu.org ##
2550 ## ------------------------------- ##"
2551      ) | sed "s/^/$as_me: WARNING:     /" >&2
2552     ;;
2553 esac
2554   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2555 printf %s "checking for $2... " >&6; }
2556 if eval \${$3+:} false; then :
2557   printf %s "(cached) " >&6
2558 else
2559   eval "$3=\$ac_header_compiler"
2560 fi
2561 eval ac_res=\$$3
2562                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2563 printf "%s\n" "$ac_res" >&6; }
2564 fi
2565   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2566
2567 } # ac_fn_c_check_header_mongrel
2568
2569 # ac_fn_c_try_run LINENO
2570 # ----------------------
2571 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2572 # that executables *can* be run.
2573 ac_fn_c_try_run ()
2574 {
2575   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2576   if { { ac_try="$ac_link"
2577 case "(($ac_try" in
2578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579   *) ac_try_echo=$ac_try;;
2580 esac
2581 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582 printf "%s\n" "$ac_try_echo"; } >&5
2583   (eval "$ac_link") 2>&5
2584   ac_status=$?
2585   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2587   { { case "(($ac_try" in
2588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2589   *) ac_try_echo=$ac_try;;
2590 esac
2591 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2592 printf "%s\n" "$ac_try_echo"; } >&5
2593   (eval "$ac_try") 2>&5
2594   ac_status=$?
2595   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2596   test $ac_status = 0; }; }; then :
2597   ac_retval=0
2598 else
2599   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2600        printf "%s\n" "$as_me: failed program was:" >&5
2601 sed 's/^/| /' conftest.$ac_ext >&5
2602
2603        ac_retval=$ac_status
2604 fi
2605   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2606   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607   as_fn_set_status $ac_retval
2608
2609 } # ac_fn_c_try_run
2610
2611 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2612 # -------------------------------------------------------
2613 # Tests whether HEADER exists and can be compiled using the include files in
2614 # INCLUDES, setting the cache variable VAR accordingly.
2615 ac_fn_c_check_header_compile ()
2616 {
2617   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2619 printf %s "checking for $2... " >&6; }
2620 if eval \${$3+:} false; then :
2621   printf %s "(cached) " >&6
2622 else
2623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624 /* end confdefs.h.  */
2625 $4
2626 #include <$2>
2627 _ACEOF
2628 if ac_fn_c_try_compile "$LINENO"; then :
2629   eval "$3=yes"
2630 else
2631   eval "$3=no"
2632 fi
2633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2634 fi
2635 eval ac_res=\$$3
2636                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2637 printf "%s\n" "$ac_res" >&6; }
2638   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2639
2640 } # ac_fn_c_check_header_compile
2641
2642 # ac_fn_c_try_link LINENO
2643 # -----------------------
2644 # Try to link conftest.$ac_ext, and return whether this succeeded.
2645 ac_fn_c_try_link ()
2646 {
2647   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2648   rm -f conftest.$ac_objext conftest$ac_exeext
2649   if { { ac_try="$ac_link"
2650 case "(($ac_try" in
2651   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2652   *) ac_try_echo=$ac_try;;
2653 esac
2654 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2655 printf "%s\n" "$ac_try_echo"; } >&5
2656   (eval "$ac_link") 2>conftest.err
2657   ac_status=$?
2658   if test -s conftest.err; then
2659     grep -v '^ *+' conftest.err >conftest.er1
2660     cat conftest.er1 >&5
2661     mv -f conftest.er1 conftest.err
2662   fi
2663   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2664   test $ac_status = 0; } && {
2665          test -z "$ac_c_werror_flag" ||
2666          test ! -s conftest.err
2667        } && test -s conftest$ac_exeext && {
2668          test "$cross_compiling" = yes ||
2669          test -x conftest$ac_exeext
2670        }; then :
2671   ac_retval=0
2672 else
2673   printf "%s\n" "$as_me: failed program was:" >&5
2674 sed 's/^/| /' conftest.$ac_ext >&5
2675
2676         ac_retval=1
2677 fi
2678   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2679   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2680   # interfere with the next link command; also delete a directory that is
2681   # left behind by Apple's compiler.  We do this before executing the actions.
2682   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2683   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2684   as_fn_set_status $ac_retval
2685
2686 } # ac_fn_c_try_link
2687
2688 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2689 # -------------------------------------------
2690 # Tests whether TYPE exists after having included INCLUDES, setting cache
2691 # variable VAR accordingly.
2692 ac_fn_c_check_type ()
2693 {
2694   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2695   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2696 printf %s "checking for $2... " >&6; }
2697 if eval \${$3+:} false; then :
2698   printf %s "(cached) " >&6
2699 else
2700   eval "$3=no"
2701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2702 /* end confdefs.h.  */
2703 $4
2704 int
2705 main ()
2706 {
2707 if (sizeof ($2))
2708          return 0;
2709   ;
2710   return 0;
2711 }
2712 _ACEOF
2713 if ac_fn_c_try_compile "$LINENO"; then :
2714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2715 /* end confdefs.h.  */
2716 $4
2717 int
2718 main ()
2719 {
2720 if (sizeof (($2)))
2721             return 0;
2722   ;
2723   return 0;
2724 }
2725 _ACEOF
2726 if ac_fn_c_try_compile "$LINENO"; then :
2727
2728 else
2729   eval "$3=yes"
2730 fi
2731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732 fi
2733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2734 fi
2735 eval ac_res=\$$3
2736                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2737 printf "%s\n" "$ac_res" >&6; }
2738   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739
2740 } # ac_fn_c_check_type
2741
2742 # ac_fn_c_check_func LINENO FUNC VAR
2743 # ----------------------------------
2744 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2745 ac_fn_c_check_func ()
2746 {
2747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2749 printf %s "checking for $2... " >&6; }
2750 if eval \${$3+:} false; then :
2751   printf %s "(cached) " >&6
2752 else
2753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754 /* end confdefs.h.  */
2755 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2756    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2757 #define $2 innocuous_$2
2758
2759 /* System header to define __stub macros and hopefully few prototypes,
2760    which can conflict with char $2 (); below.  */
2761
2762 #include <limits.h>
2763 #undef $2
2764
2765 /* Override any GCC internal prototype to avoid an error.
2766    Use char because int might match the return type of a GCC
2767    builtin and then its argument prototype would still apply.  */
2768 #ifdef __cplusplus
2769 extern "C"
2770 #endif
2771 char $2 ();
2772 /* The GNU C library defines this for functions which it implements
2773     to always fail with ENOSYS.  Some functions are actually named
2774     something starting with __ and the normal name is an alias.  */
2775 #if defined __stub_$2 || defined __stub___$2
2776 choke me
2777 #endif
2778
2779 int
2780 main ()
2781 {
2782 return $2 ();
2783   ;
2784   return 0;
2785 }
2786 _ACEOF
2787 if ac_fn_c_try_link "$LINENO"; then :
2788   eval "$3=yes"
2789 else
2790   eval "$3=no"
2791 fi
2792 rm -f core conftest.err conftest.$ac_objext \
2793     conftest$ac_exeext conftest.$ac_ext
2794 fi
2795 eval ac_res=\$$3
2796                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2797 printf "%s\n" "$ac_res" >&6; }
2798   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2799
2800 } # ac_fn_c_check_func
2801
2802 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2803 # ---------------------------------------------
2804 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2805 # accordingly.
2806 ac_fn_c_check_decl ()
2807 {
2808   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809   as_decl_name=`echo $2|sed 's/ *(.*//'`
2810   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2811   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2812 printf %s "checking whether $as_decl_name is declared... " >&6; }
2813 if eval \${$3+:} false; then :
2814   printf %s "(cached) " >&6
2815 else
2816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817 /* end confdefs.h.  */
2818 $4
2819 int
2820 main ()
2821 {
2822 #ifndef $as_decl_name
2823 #ifdef __cplusplus
2824   (void) $as_decl_use;
2825 #else
2826   (void) $as_decl_name;
2827 #endif
2828 #endif
2829
2830   ;
2831   return 0;
2832 }
2833 _ACEOF
2834 if ac_fn_c_try_compile "$LINENO"; then :
2835   eval "$3=yes"
2836 else
2837   eval "$3=no"
2838 fi
2839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2840 fi
2841 eval ac_res=\$$3
2842                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2843 printf "%s\n" "$ac_res" >&6; }
2844   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2845
2846 } # ac_fn_c_check_decl
2847
2848 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2849 # --------------------------------------------
2850 # Tries to find the compile-time value of EXPR in a program that includes
2851 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2852 # computed
2853 ac_fn_c_compute_int ()
2854 {
2855   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2856   if test "$cross_compiling" = yes; then
2857     # Depending upon the size, compute the lo and hi bounds.
2858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2859 /* end confdefs.h.  */
2860 $4
2861 int
2862 main ()
2863 {
2864 static int test_array [1 - 2 * !(($2) >= 0)];
2865 test_array [0] = 0;
2866 return test_array [0];
2867
2868   ;
2869   return 0;
2870 }
2871 _ACEOF
2872 if ac_fn_c_try_compile "$LINENO"; then :
2873   ac_lo=0 ac_mid=0
2874   while :; do
2875     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h.  */
2877 $4
2878 int
2879 main ()
2880 {
2881 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882 test_array [0] = 0;
2883 return test_array [0];
2884
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 if ac_fn_c_try_compile "$LINENO"; then :
2890   ac_hi=$ac_mid; break
2891 else
2892   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2893                         if test $ac_lo -le $ac_mid; then
2894                           ac_lo= ac_hi=
2895                           break
2896                         fi
2897                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2898 fi
2899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900   done
2901 else
2902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903 /* end confdefs.h.  */
2904 $4
2905 int
2906 main ()
2907 {
2908 static int test_array [1 - 2 * !(($2) < 0)];
2909 test_array [0] = 0;
2910 return test_array [0];
2911
2912   ;
2913   return 0;
2914 }
2915 _ACEOF
2916 if ac_fn_c_try_compile "$LINENO"; then :
2917   ac_hi=-1 ac_mid=-1
2918   while :; do
2919     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2920 /* end confdefs.h.  */
2921 $4
2922 int
2923 main ()
2924 {
2925 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2926 test_array [0] = 0;
2927 return test_array [0];
2928
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 if ac_fn_c_try_compile "$LINENO"; then :
2934   ac_lo=$ac_mid; break
2935 else
2936   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2937                         if test $ac_mid -le $ac_hi; then
2938                           ac_lo= ac_hi=
2939                           break
2940                         fi
2941                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2942 fi
2943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2944   done
2945 else
2946   ac_lo= ac_hi=
2947 fi
2948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2949 fi
2950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951 # Binary search between lo and hi bounds.
2952 while test "x$ac_lo" != "x$ac_hi"; do
2953   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2955 /* end confdefs.h.  */
2956 $4
2957 int
2958 main ()
2959 {
2960 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2961 test_array [0] = 0;
2962 return test_array [0];
2963
2964   ;
2965   return 0;
2966 }
2967 _ACEOF
2968 if ac_fn_c_try_compile "$LINENO"; then :
2969   ac_hi=$ac_mid
2970 else
2971   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2972 fi
2973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2974 done
2975 case $ac_lo in #((
2976 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2977 '') ac_retval=1 ;;
2978 esac
2979   else
2980     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981 /* end confdefs.h.  */
2982 $4
2983 static long int longval () { return $2; }
2984 static unsigned long int ulongval () { return $2; }
2985 #include <stdio.h>
2986 #include <stdlib.h>
2987 int
2988 main ()
2989 {
2990
2991   FILE *f = fopen ("conftest.val", "w");
2992   if (! f)
2993     return 1;
2994   if (($2) < 0)
2995     {
2996       long int i = longval ();
2997       if (i != ($2))
2998         return 1;
2999       fprintf (f, "%ld", i);
3000     }
3001   else
3002     {
3003       unsigned long int i = ulongval ();
3004       if (i != ($2))
3005         return 1;
3006       fprintf (f, "%lu", i);
3007     }
3008   /* Do not output a trailing newline, as this causes \r\n confusion
3009      on some platforms.  */
3010   return ferror (f) || fclose (f) != 0;
3011
3012   ;
3013   return 0;
3014 }
3015 _ACEOF
3016 if ac_fn_c_try_run "$LINENO"; then :
3017   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3018 else
3019   ac_retval=1
3020 fi
3021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3022   conftest.$ac_objext conftest.beam conftest.$ac_ext
3023 rm -f conftest.val
3024
3025   fi
3026   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3027   as_fn_set_status $ac_retval
3028
3029 } # ac_fn_c_compute_int
3030
3031 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3032 # ----------------------------------------------------
3033 # Tries to find if the field MEMBER exists in type AGGR, after including
3034 # INCLUDES, setting cache variable VAR accordingly.
3035 ac_fn_c_check_member ()
3036 {
3037   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3038   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3039 printf %s "checking for $2.$3... " >&6; }
3040 if eval \${$4+:} false; then :
3041   printf %s "(cached) " >&6
3042 else
3043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3044 /* end confdefs.h.  */
3045 $5
3046 int
3047 main ()
3048 {
3049 static $2 ac_aggr;
3050 if (ac_aggr.$3)
3051 return 0;
3052   ;
3053   return 0;
3054 }
3055 _ACEOF
3056 if ac_fn_c_try_compile "$LINENO"; then :
3057   eval "$4=yes"
3058 else
3059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060 /* end confdefs.h.  */
3061 $5
3062 int
3063 main ()
3064 {
3065 static $2 ac_aggr;
3066 if (sizeof ac_aggr.$3)
3067 return 0;
3068   ;
3069   return 0;
3070 }
3071 _ACEOF
3072 if ac_fn_c_try_compile "$LINENO"; then :
3073   eval "$4=yes"
3074 else
3075   eval "$4=no"
3076 fi
3077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3078 fi
3079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3080 fi
3081 eval ac_res=\$$4
3082                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3083 printf "%s\n" "$ac_res" >&6; }
3084   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3085
3086 } # ac_fn_c_check_member
3087 cat >config.log <<_ACEOF
3088 This file contains any messages produced by compilers while
3089 running configure, to aid debugging if configure makes a mistake.
3090
3091 It was created by gzip $as_me 1.6, which was
3092 generated by GNU Autoconf 2.69.97-b1aba91.  Invocation command line was
3093
3094   $ $0 $@
3095
3096 _ACEOF
3097 exec 5>>config.log
3098 {
3099 cat <<_ASUNAME
3100 ## --------- ##
3101 ## Platform. ##
3102 ## --------- ##
3103
3104 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3105 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3106 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3107 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3108 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3109
3110 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3111 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3112
3113 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3114 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3115 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3116 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3117 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3118 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3119 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3120
3121 _ASUNAME
3122
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3125 do
3126   IFS=$as_save_IFS
3127   case $as_dir in #(((
3128     '') as_dir=./ ;;
3129     */) ;;
3130     *) as_dir=$as_dir/ ;;
3131   esac
3132     printf "%s\n" "PATH: $as_dir"
3133   done
3134 IFS=$as_save_IFS
3135
3136 } >&5
3137
3138 cat >&5 <<_ACEOF
3139
3140
3141 ## ----------- ##
3142 ## Core tests. ##
3143 ## ----------- ##
3144
3145 _ACEOF
3146
3147
3148 # Keep a trace of the command line.
3149 # Strip out --no-create and --no-recursion so they do not pile up.
3150 # Strip out --silent because we don't want to record it for future runs.
3151 # Also quote any args containing shell meta-characters.
3152 # Make two passes to allow for proper duplicate-argument suppression.
3153 ac_configure_args=
3154 ac_configure_args0=
3155 ac_configure_args1=
3156 ac_must_keep_next=false
3157 for ac_pass in 1 2
3158 do
3159   for ac_arg
3160   do
3161     case $ac_arg in
3162     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3163     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3164     | -silent | --silent | --silen | --sile | --sil)
3165       continue ;;
3166     *\'*)
3167       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3168     esac
3169     case $ac_pass in
3170     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3171     2)
3172       as_fn_append ac_configure_args1 " '$ac_arg'"
3173       if test $ac_must_keep_next = true; then
3174         ac_must_keep_next=false # Got value, back to normal.
3175       else
3176         case $ac_arg in
3177           *=* | --config-cache | -C | -disable-* | --disable-* \
3178           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3179           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3180           | -with-* | --with-* | -without-* | --without-* | --x)
3181             case "$ac_configure_args0 " in
3182               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3183             esac
3184             ;;
3185           -* ) ac_must_keep_next=true ;;
3186         esac
3187       fi
3188       as_fn_append ac_configure_args " '$ac_arg'"
3189       ;;
3190     esac
3191   done
3192 done
3193 { ac_configure_args0=; unset ac_configure_args0;}
3194 { ac_configure_args1=; unset ac_configure_args1;}
3195
3196 # When interrupted or exit'd, cleanup temporary files, and complete
3197 # config.log.  We remove comments because anyway the quotes in there
3198 # would cause problems or look ugly.
3199 # WARNING: Use '\'' to represent an apostrophe within the trap.
3200 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3201 trap 'exit_status=$?
3202   # Sanitize IFS.
3203   IFS=" ""      $as_nl"
3204   # Save into config.log some information that might help in debugging.
3205   {
3206     echo
3207
3208     printf "%s\n" "## ---------------- ##
3209 ## Cache variables. ##
3210 ## ---------------- ##"
3211     echo
3212     # The following way of writing the cache mishandles newlines in values,
3213 (
3214   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3215     eval ac_val=\$$ac_var
3216     case $ac_val in #(
3217     *${as_nl}*)
3218       case $ac_var in #(
3219       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3220 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3221       esac
3222       case $ac_var in #(
3223       _ | IFS | as_nl) ;; #(
3224       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3225       *) { eval $ac_var=; unset $ac_var;} ;;
3226       esac ;;
3227     esac
3228   done
3229   (set) 2>&1 |
3230     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3231     *${as_nl}ac_space=\ *)
3232       sed -n \
3233         "s/'\''/'\''\\\\'\'''\''/g;
3234           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3235       ;; #(
3236     *)
3237       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3238       ;;
3239     esac |
3240     sort
3241 )
3242     echo
3243
3244     printf "%s\n" "## ----------------- ##
3245 ## Output variables. ##
3246 ## ----------------- ##"
3247     echo
3248     for ac_var in $ac_subst_vars
3249     do
3250       eval ac_val=\$$ac_var
3251       case $ac_val in
3252       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3253       esac
3254       printf "%s\n" "$ac_var='\''$ac_val'\''"
3255     done | sort
3256     echo
3257
3258     if test -n "$ac_subst_files"; then
3259       printf "%s\n" "## ------------------- ##
3260 ## File substitutions. ##
3261 ## ------------------- ##"
3262       echo
3263       for ac_var in $ac_subst_files
3264       do
3265         eval ac_val=\$$ac_var
3266         case $ac_val in
3267         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3268         esac
3269         printf "%s\n" "$ac_var='\''$ac_val'\''"
3270       done | sort
3271       echo
3272     fi
3273
3274     if test -s confdefs.h; then
3275       printf "%s\n" "## ----------- ##
3276 ## confdefs.h. ##
3277 ## ----------- ##"
3278       echo
3279       cat confdefs.h
3280       echo
3281     fi
3282     test "$ac_signal" != 0 &&
3283       printf "%s\n" "$as_me: caught signal $ac_signal"
3284     printf "%s\n" "$as_me: exit $exit_status"
3285   } >&5
3286   rm -f core *.core core.conftest.* &&
3287     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3288     exit $exit_status
3289 ' 0
3290 for ac_signal in 1 2 13 15; do
3291   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3292 done
3293 ac_signal=0
3294
3295 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3296 rm -f -r conftest* confdefs.h
3297
3298 printf "%s\n" "/* confdefs.h */" > confdefs.h
3299
3300 # Predefined preprocessor variables.
3301
3302 cat >>confdefs.h <<_ACEOF
3303 #define PACKAGE_NAME "$PACKAGE_NAME"
3304 _ACEOF
3305
3306 cat >>confdefs.h <<_ACEOF
3307 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3308 _ACEOF
3309
3310 cat >>confdefs.h <<_ACEOF
3311 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3312 _ACEOF
3313
3314 cat >>confdefs.h <<_ACEOF
3315 #define PACKAGE_STRING "$PACKAGE_STRING"
3316 _ACEOF
3317
3318 cat >>confdefs.h <<_ACEOF
3319 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3320 _ACEOF
3321
3322 cat >>confdefs.h <<_ACEOF
3323 #define PACKAGE_URL "$PACKAGE_URL"
3324 _ACEOF
3325
3326
3327 # Let the site file select an alternate cache file if it wants to.
3328 # Prefer an explicitly selected file to automatically selected ones.
3329 ac_site_file1=NONE
3330 ac_site_file2=NONE
3331 if test -n "$CONFIG_SITE"; then
3332   # We do not want a PATH search for config.site.
3333   case $CONFIG_SITE in #((
3334     -*)  ac_site_file1=./$CONFIG_SITE;;
3335     */*) ac_site_file1=$CONFIG_SITE;;
3336     *)   ac_site_file1=./$CONFIG_SITE;;
3337   esac
3338 elif test "x$prefix" != xNONE; then
3339   ac_site_file1=$prefix/share/config.site
3340   ac_site_file2=$prefix/etc/config.site
3341 else
3342   ac_site_file1=$ac_default_prefix/share/config.site
3343   ac_site_file2=$ac_default_prefix/etc/config.site
3344 fi
3345 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3346 do
3347   test "x$ac_site_file" = xNONE && continue
3348   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3349     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3350 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3351     sed 's/^/| /' "$ac_site_file" >&5
3352     . "$ac_site_file" \
3353       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3354 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3355 as_fn_error $? "failed to load site script $ac_site_file
3356 See \`config.log' for more details" "$LINENO" 5; }
3357   fi
3358 done
3359
3360 if test -r "$cache_file"; then
3361   # Some versions of bash will fail to source /dev/null (special files
3362   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3363   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3364     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3365 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3366     case $cache_file in
3367       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3368       *)                      . "./$cache_file";;
3369     esac
3370   fi
3371 else
3372   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3373 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3374   >$cache_file
3375 fi
3376
3377 as_fn_append ac_header_list " unistd.h"
3378 as_fn_append ac_header_list " sys/param.h"
3379 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3380 as_fn_append ac_header_list " sys/socket.h"
3381 as_fn_append ac_func_list " fchdir"
3382 as_fn_append ac_header_list " dirent.h"
3383 as_fn_append ac_func_list " fdopendir"
3384 as_fn_append ac_func_list " fcntl"
3385 as_fn_append ac_func_list " symlink"
3386 as_fn_append ac_func_list " mempcpy"
3387 as_fn_append ac_header_list " stdio_ext.h"
3388 as_fn_append ac_func_list " __fpending"
3389 as_fn_append ac_func_list " vasnprintf"
3390 as_fn_append ac_header_list " features.h"
3391 as_fn_append ac_func_list " snprintf"
3392 as_fn_append ac_func_list " fpurge"
3393 as_fn_append ac_func_list " __fpurge"
3394 as_fn_append ac_func_list " __freadahead"
3395 as_fn_append ac_func_list " __freading"
3396 as_fn_append ac_func_list " __fseterr"
3397 as_fn_append ac_header_list " sys/stat.h"
3398 as_fn_append ac_func_list " getdtablesize"
3399 gl_getopt_required=GNU
3400 as_fn_append ac_header_list " getopt.h"
3401 as_fn_append ac_func_list " gettimeofday"
3402 as_fn_append ac_func_list " nanotime"
3403 as_fn_append ac_header_list " sys/time.h"
3404 as_fn_append ac_func_list " lstat"
3405 as_fn_append ac_header_list " math.h"
3406 as_fn_append ac_func_list " mbsinit"
3407 as_fn_append ac_func_list " mbrtowc"
3408 as_fn_append ac_header_list " sys/mman.h"
3409 as_fn_append ac_func_list " mprotect"
3410 as_fn_append ac_func_list " openat"
3411 as_fn_append ac_func_list " strerror_r"
3412 as_fn_append ac_func_list " __xpg_strerror_r"
3413 gl_printf_safe=yes
3414 as_fn_append ac_header_list " wchar.h"
3415 as_fn_append ac_header_list " stdint.h"
3416 as_fn_append ac_func_list " strdup"
3417 as_fn_append ac_func_list " catgets"
3418 as_fn_append ac_func_list " pipe"
3419 as_fn_append ac_header_list " utime.h"
3420 as_fn_append ac_func_list " futimes"
3421 as_fn_append ac_func_list " futimesat"
3422 as_fn_append ac_func_list " futimens"
3423 as_fn_append ac_func_list " utimensat"
3424 as_fn_append ac_func_list " lutimes"
3425 as_fn_append ac_func_list " iswcntrl"
3426 as_fn_append ac_header_list " wctype.h"
3427 as_fn_append ac_header_list " fcntl.h"
3428 as_fn_append ac_header_list " limits.h"
3429 as_fn_append ac_header_list " memory.h"
3430 as_fn_append ac_header_list " time.h"
3431 as_fn_append ac_func_list " chown"
3432 as_fn_append ac_func_list " fchmod"
3433 as_fn_append ac_func_list " fchown"
3434 as_fn_append ac_func_list " siginterrupt"
3435 # Check that the precious variables saved in the cache have kept the same
3436 # value.
3437 ac_cache_corrupted=false
3438 for ac_var in $ac_precious_vars; do
3439   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3440   eval ac_new_set=\$ac_env_${ac_var}_set
3441   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3442   eval ac_new_val=\$ac_env_${ac_var}_value
3443   case $ac_old_set,$ac_new_set in
3444     set,)
3445       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3446 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3447       ac_cache_corrupted=: ;;
3448     ,set)
3449       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3450 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3451       ac_cache_corrupted=: ;;
3452     ,);;
3453     *)
3454       if test "x$ac_old_val" != "x$ac_new_val"; then
3455         # differences in whitespace do not lead to failure.
3456         ac_old_val_w=`echo x $ac_old_val`
3457         ac_new_val_w=`echo x $ac_new_val`
3458         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3459           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3460 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3461           ac_cache_corrupted=:
3462         else
3463           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3464 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3465           eval $ac_var=\$ac_old_val
3466         fi
3467         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3468 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3469         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3470 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3471       fi;;
3472   esac
3473   # Pass precious variables to config.status.
3474   if test "$ac_new_set" = set; then
3475     case $ac_new_val in
3476     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3477     *) ac_arg=$ac_var=$ac_new_val ;;
3478     esac
3479     case " $ac_configure_args " in
3480       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3481       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3482     esac
3483   fi
3484 done
3485 if $ac_cache_corrupted; then
3486   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3488   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3489 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3490   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3491 fi
3492 ## -------------------- ##
3493 ## Main body of script. ##
3494 ## -------------------- ##
3495
3496 ac_ext=c
3497 ac_cpp='$CPP $CPPFLAGS'
3498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501
3502
3503
3504
3505 ac_aux_dir=
3506 for ac_dir in build-aux "$srcdir"/build-aux; do
3507   if test -f "$ac_dir/install-sh"; then
3508     ac_aux_dir=$ac_dir
3509     ac_install_sh="$ac_aux_dir/install-sh -c"
3510     break
3511   elif test -f "$ac_dir/install.sh"; then
3512     ac_aux_dir=$ac_dir
3513     ac_install_sh="$ac_aux_dir/install.sh -c"
3514     break
3515   elif test -f "$ac_dir/shtool"; then
3516     ac_aux_dir=$ac_dir
3517     ac_install_sh="$ac_aux_dir/shtool install -c"
3518     break
3519   fi
3520 done
3521 if test -z "$ac_aux_dir"; then
3522   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3523 fi
3524
3525 # These three variables are undocumented and unsupported,
3526 # and are intended to be withdrawn in a future Autoconf release.
3527 # They can cause serious problems if a builder's source tree is in a directory
3528 # whose full name contains unusual characters.
3529 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3530 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3531 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3532
3533
3534
3535 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3536
3537 am__api_version='1.99a'
3538
3539 # Find a good install program.  We prefer a C program (faster),
3540 # so one script is as good as another.  But avoid the broken or
3541 # incompatible versions:
3542 # SysV /etc/install, /usr/sbin/install
3543 # SunOS /usr/etc/install
3544 # IRIX /sbin/install
3545 # AIX /bin/install
3546 # AmigaOS /C/install, which installs bootblocks on floppy discs
3547 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3548 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3549 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3550 # OS/2's system install, which has a completely different semantic
3551 # ./install, which can be erroneously created by make from ./install.sh.
3552 # Reject install programs that cannot install multiple files.
3553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3554 printf %s "checking for a BSD-compatible install... " >&6; }
3555 if test -z "$INSTALL"; then
3556 if ${ac_cv_path_install+:} false; then :
3557   printf %s "(cached) " >&6
3558 else
3559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3560 for as_dir in $PATH
3561 do
3562   IFS=$as_save_IFS
3563   case $as_dir in #(((
3564     '') as_dir=./ ;;
3565     */) ;;
3566     *) as_dir=$as_dir/ ;;
3567   esac
3568     # Account for fact that we put trailing slashes in our PATH walk.
3569 case $as_dir in #((
3570   ./ | /[cC]/* | \
3571   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3572   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3573   /usr/ucb/* ) ;;
3574   *)
3575     # OSF1 and SCO ODT 3.0 have their own names for install.
3576     # Don't use installbsd from OSF since it installs stuff as root
3577     # by default.
3578     for ac_prog in ginstall scoinst install; do
3579       for ac_exec_ext in '' $ac_executable_extensions; do
3580         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3581           if test $ac_prog = install &&
3582             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3583             # AIX install.  It has an incompatible calling convention.
3584             :
3585           elif test $ac_prog = install &&
3586             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3587             # program-specific install script used by HP pwplus--don't use.
3588             :
3589           else
3590             rm -rf conftest.one conftest.two conftest.dir
3591             echo one > conftest.one
3592             echo two > conftest.two
3593             mkdir conftest.dir
3594             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3595               test -s conftest.one && test -s conftest.two &&
3596               test -s conftest.dir/conftest.one &&
3597               test -s conftest.dir/conftest.two
3598             then
3599               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3600               break 3
3601             fi
3602           fi
3603         fi
3604       done
3605     done
3606     ;;
3607 esac
3608
3609   done
3610 IFS=$as_save_IFS
3611
3612 rm -rf conftest.one conftest.two conftest.dir
3613
3614 fi
3615   if test "${ac_cv_path_install+set}" = set; then
3616     INSTALL=$ac_cv_path_install
3617   else
3618     # As a last resort, use the slow shell script.  Don't cache a
3619     # value for INSTALL within a source directory, because that will
3620     # break other packages using the cache if that directory is
3621     # removed, or if the value is a relative name.
3622     INSTALL=$ac_install_sh
3623   fi
3624 fi
3625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3626 printf "%s\n" "$INSTALL" >&6; }
3627
3628 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3629 # It thinks the first close brace ends the variable substitution.
3630 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3631
3632 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3633
3634 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3635
3636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3637 printf %s "checking whether build environment is sane... " >&6; }
3638 # Reject unsafe characters in $srcdir or the absolute working directory
3639 # name.  Accept space and tab only in the latter.
3640 am_lf='
3641 '
3642 case `pwd` in
3643   *[\\\"\#\$\&\'\`$am_lf]*)
3644     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3645 esac
3646 case $srcdir in
3647   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3648     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3649 esac
3650
3651 # Do 'set' in a subshell so we don't clobber the current shell's
3652 # arguments.  Must try -L first in case configure is actually a
3653 # symlink; some systems play weird games with the mod time of symlinks
3654 # (eg FreeBSD returns the mod time of the symlink's containing
3655 # directory).
3656 if (
3657    am_has_slept=no
3658    for am_try in 1 2; do
3659      echo "timestamp, slept: $am_has_slept" > conftest.file
3660      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3661      if test "$*" = "X"; then
3662         # -L didn't work.
3663         set X `ls -t "$srcdir/configure" conftest.file`
3664      fi
3665      if test "$*" != "X $srcdir/configure conftest.file" \
3666         && test "$*" != "X conftest.file $srcdir/configure"; then
3667
3668         # If neither matched, then we have a broken ls.  This can happen
3669         # if, for instance, CONFIG_SHELL is bash and it inherits a
3670         # broken ls alias from the environment.  This has actually
3671         # happened.  Such a system could not be considered "sane".
3672         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3673   alias in your environment" "$LINENO" 5
3674      fi
3675      if test "$2" = conftest.file || test $am_try -eq 2; then
3676        break
3677      fi
3678      # Just in case.
3679      sleep 1
3680      am_has_slept=yes
3681    done
3682    test "$2" = conftest.file
3683    )
3684 then
3685    # Ok.
3686    :
3687 else
3688    as_fn_error $? "newly created file is older than distributed files!
3689 Check your system clock" "$LINENO" 5
3690 fi
3691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3692 printf "%s\n" "yes" >&6; }
3693 # If we didn't sleep, we still need to ensure time stamps of config.status and
3694 # generated files are strictly newer.
3695 am_sleep_pid=
3696 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3697   ( sleep 1 ) &
3698   am_sleep_pid=$!
3699 fi
3700
3701 rm -f conftest.file
3702
3703 test "$program_prefix" != NONE &&
3704   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3705 # Use a double $ so make ignores it.
3706 test "$program_suffix" != NONE &&
3707   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3708 # Double any \ or $.
3709 # By default was `s,x,x', remove it if useless.
3710 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3711 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3712
3713 # expand $ac_aux_dir to an absolute path
3714 am_aux_dir=`cd $ac_aux_dir && pwd`
3715
3716 if test x"${MISSING+set}" != xset; then
3717   case $am_aux_dir in
3718   *\ * | *\     *)
3719     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3720   *)
3721     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3722   esac
3723 fi
3724 # Use eval to expand $SHELL
3725 if eval "$MISSING --is-lightweight"; then
3726   am_missing_run="$MISSING "
3727 else
3728   am_missing_run=
3729   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3730 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3731 fi
3732
3733 if test x"${install_sh}" != xset; then
3734   case $am_aux_dir in
3735   *\ * | *\     *)
3736     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3737   *)
3738     install_sh="\${SHELL} $am_aux_dir/install-sh"
3739   esac
3740 fi
3741
3742 # Installed binaries are usually stripped using 'strip' when the user
3743 # run "make install-strip".  However 'strip' might not be the right
3744 # tool to use in cross-compilation environments, therefore Automake
3745 # will honor the 'STRIP' environment variable to overrule this program.
3746 if test "$cross_compiling" != no; then
3747   if test -n "$ac_tool_prefix"; then
3748   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3749 set dummy ${ac_tool_prefix}strip; ac_word=$2
3750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3751 printf %s "checking for $ac_word... " >&6; }
3752 if ${ac_cv_prog_STRIP+:} false; then :
3753   printf %s "(cached) " >&6
3754 else
3755   if test -n "$STRIP"; then
3756   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3757 else
3758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3759 for as_dir in $PATH
3760 do
3761   IFS=$as_save_IFS
3762   case $as_dir in #(((
3763     '') as_dir=./ ;;
3764     */) ;;
3765     *) as_dir=$as_dir/ ;;
3766   esac
3767     for ac_exec_ext in '' $ac_executable_extensions; do
3768   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3769     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3770     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3771     break 2
3772   fi
3773 done
3774   done
3775 IFS=$as_save_IFS
3776
3777 fi
3778 fi
3779 STRIP=$ac_cv_prog_STRIP
3780 if test -n "$STRIP"; then
3781   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3782 printf "%s\n" "$STRIP" >&6; }
3783 else
3784   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785 printf "%s\n" "no" >&6; }
3786 fi
3787
3788
3789 fi
3790 if test -z "$ac_cv_prog_STRIP"; then
3791   ac_ct_STRIP=$STRIP
3792   # Extract the first word of "strip", so it can be a program name with args.
3793 set dummy strip; ac_word=$2
3794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3795 printf %s "checking for $ac_word... " >&6; }
3796 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3797   printf %s "(cached) " >&6
3798 else
3799   if test -n "$ac_ct_STRIP"; then
3800   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3801 else
3802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803 for as_dir in $PATH
3804 do
3805   IFS=$as_save_IFS
3806   case $as_dir in #(((
3807     '') as_dir=./ ;;
3808     */) ;;
3809     *) as_dir=$as_dir/ ;;
3810   esac
3811     for ac_exec_ext in '' $ac_executable_extensions; do
3812   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3813     ac_cv_prog_ac_ct_STRIP="strip"
3814     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3815     break 2
3816   fi
3817 done
3818   done
3819 IFS=$as_save_IFS
3820
3821 fi
3822 fi
3823 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3824 if test -n "$ac_ct_STRIP"; then
3825   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3826 printf "%s\n" "$ac_ct_STRIP" >&6; }
3827 else
3828   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829 printf "%s\n" "no" >&6; }
3830 fi
3831
3832   if test "x$ac_ct_STRIP" = x; then
3833     STRIP=":"
3834   else
3835     case $cross_compiling:$ac_tool_warned in
3836 yes:)
3837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3838 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3839 ac_tool_warned=yes ;;
3840 esac
3841     STRIP=$ac_ct_STRIP
3842   fi
3843 else
3844   STRIP="$ac_cv_prog_STRIP"
3845 fi
3846
3847 fi
3848 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3849
3850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3851 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3852 if test -z "$MKDIR_P"; then
3853   if ${ac_cv_path_mkdir+:} false; then :
3854   printf %s "(cached) " >&6
3855 else
3856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3857 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3858 do
3859   IFS=$as_save_IFS
3860   case $as_dir in #(((
3861     '') as_dir=./ ;;
3862     */) ;;
3863     *) as_dir=$as_dir/ ;;
3864   esac
3865     for ac_prog in mkdir gmkdir; do
3866          for ac_exec_ext in '' $ac_executable_extensions; do
3867            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3868            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3869              'mkdir (GNU coreutils) '* | \
3870              'mkdir (coreutils) '* | \
3871              'mkdir (fileutils) '4.1*)
3872                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3873                break 3;;
3874            esac
3875          done
3876        done
3877   done
3878 IFS=$as_save_IFS
3879
3880 fi
3881
3882   test -d ./--version && rmdir ./--version
3883   if test "${ac_cv_path_mkdir+set}" = set; then
3884     MKDIR_P="$ac_cv_path_mkdir -p"
3885   else
3886     # As a last resort, use the slow shell script.  Don't cache a
3887     # value for MKDIR_P within a source directory, because that will
3888     # break other packages using the cache if that directory is
3889     # removed, or if the value is a relative name.
3890     MKDIR_P="$ac_install_sh -d"
3891   fi
3892 fi
3893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3894 printf "%s\n" "$MKDIR_P" >&6; }
3895
3896 for ac_prog in gawk mawk nawk awk
3897 do
3898   # Extract the first word of "$ac_prog", so it can be a program name with args.
3899 set dummy $ac_prog; ac_word=$2
3900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3901 printf %s "checking for $ac_word... " >&6; }
3902 if ${ac_cv_prog_AWK+:} false; then :
3903   printf %s "(cached) " >&6
3904 else
3905   if test -n "$AWK"; then
3906   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3907 else
3908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909 for as_dir in $PATH
3910 do
3911   IFS=$as_save_IFS
3912   case $as_dir in #(((
3913     '') as_dir=./ ;;
3914     */) ;;
3915     *) as_dir=$as_dir/ ;;
3916   esac
3917     for ac_exec_ext in '' $ac_executable_extensions; do
3918   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3919     ac_cv_prog_AWK="$ac_prog"
3920     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3921     break 2
3922   fi
3923 done
3924   done
3925 IFS=$as_save_IFS
3926
3927 fi
3928 fi
3929 AWK=$ac_cv_prog_AWK
3930 if test -n "$AWK"; then
3931   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3932 printf "%s\n" "$AWK" >&6; }
3933 else
3934   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935 printf "%s\n" "no" >&6; }
3936 fi
3937
3938
3939   test -n "$AWK" && break
3940 done
3941
3942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3943 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3944 set x ${MAKE-make}
3945 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3946 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3947   printf %s "(cached) " >&6
3948 else
3949   cat >conftest.make <<\_ACEOF
3950 SHELL = /bin/sh
3951 all:
3952         @echo '@@@%%%=$(MAKE)=@@@%%%'
3953 _ACEOF
3954 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3955 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3956   *@@@%%%=?*=@@@%%%*)
3957     eval ac_cv_prog_make_${ac_make}_set=yes;;
3958   *)
3959     eval ac_cv_prog_make_${ac_make}_set=no;;
3960 esac
3961 rm -f conftest.make
3962 fi
3963 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3964   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3965 printf "%s\n" "yes" >&6; }
3966   SET_MAKE=
3967 else
3968   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3969 printf "%s\n" "no" >&6; }
3970   SET_MAKE="MAKE=${MAKE-make}"
3971 fi
3972
3973 # Check whether --enable-silent-rules was given.
3974 if test "${enable_silent_rules+set}" = set; then :
3975   enableval=$enable_silent_rules;
3976 fi
3977
3978 case $enable_silent_rules in # (((
3979   yes) AM_DEFAULT_VERBOSITY=0;;
3980    no) AM_DEFAULT_VERBOSITY=1;;
3981     *) AM_DEFAULT_VERBOSITY=1;;
3982 esac
3983 am_make=${MAKE-make}
3984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3985 printf %s "checking whether $am_make supports nested variables... " >&6; }
3986 if ${am_cv_make_support_nested_variables+:} false; then :
3987   printf %s "(cached) " >&6
3988 else
3989   if printf "%s\n" 'TRUE=$(BAR$(V))
3990 BAR0=false
3991 BAR1=true
3992 V=1
3993 am__doit:
3994         @$(TRUE)
3995 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3996   am_cv_make_support_nested_variables=yes
3997 else
3998   am_cv_make_support_nested_variables=no
3999 fi
4000 fi
4001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4002 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4003 if test $am_cv_make_support_nested_variables = yes; then
4004     AM_V='$(V)'
4005   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4006 else
4007   AM_V=$AM_DEFAULT_VERBOSITY
4008   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4009 fi
4010 AM_BACKSLASH='\'
4011
4012 mkdir_p='$(MKDIR_P)'
4013 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4014   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4015   # is not polluted with repeated "-I."
4016   am__isrc=' -I$(srcdir)'
4017   # test to see if srcdir already configured
4018   if test -f $srcdir/config.status; then
4019     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4020   fi
4021 fi
4022
4023 # test whether we have cygpath
4024 if test -z "$CYGPATH_W"; then
4025   if (cygpath --version) >/dev/null 2>/dev/null; then
4026     CYGPATH_W='cygpath -w'
4027   else
4028     CYGPATH_W=echo
4029   fi
4030 fi
4031
4032
4033 # Define the identity of the package.
4034  PACKAGE='gzip'
4035  VERSION='1.6'
4036
4037
4038 cat >>confdefs.h <<_ACEOF
4039 #define PACKAGE "$PACKAGE"
4040 _ACEOF
4041
4042
4043 cat >>confdefs.h <<_ACEOF
4044 #define VERSION "$VERSION"
4045 _ACEOF
4046
4047 # Some tools Automake needs.
4048
4049 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4050
4051
4052 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4053
4054
4055 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4056
4057
4058 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4059
4060
4061 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4062
4063 # We need awk for the "check" target.  The system "awk" is bad on
4064 # some platforms.
4065 # Always define AMTAR for backward compatibility.  Yes, it's still used
4066 # in the wild :-(  We should find a proper way to deprecate it ...
4067 AMTAR='$${TAR-tar}'
4068
4069
4070 # We'll loop over all known methods to create a tar archive until one works.
4071 _am_tools='gnutar  pax cpio none'
4072
4073 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4074
4075
4076
4077
4078
4079
4080 # POSIX will say in a future version that running "rm -f" with no argument
4081 # is OK; and we want to be able to make that assumption in our Makefile
4082 # recipes.  So use an aggressive probe to check that the usage we want is
4083 # actually supported "in the wild" to an acceptable degree.
4084 # See automake bug#10828.
4085 # To make any issue more visible, cause the running configure to be aborted
4086 # by default if the 'rm' program in use doesn't match our expectations; the
4087 # user can still override this though.
4088 if rm -f && rm -fr && rm -rf; then : OK; else
4089   cat >&2 <<'END'
4090 Oops!
4091
4092 Your 'rm' program seems unable to run without file operands specified
4093 on the command line, even when the '-f' option is present.  This is contrary
4094 to the behaviour of most rm programs out there, and not conforming with
4095 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4096
4097 Please tell bug-automake@gnu.org about your system, including the value
4098 of your $PATH and any error possibly output before this message.  This
4099 can help us improve future automake versions.
4100
4101 END
4102   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4103     echo 'Configuration will proceed anyway, since you have set the' >&2
4104     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4105     echo >&2
4106   else
4107     cat >&2 <<'END'
4108 Aborting the configuration process, to ensure you take notice of the issue.
4109
4110 You can download and install GNU coreutils to get an 'rm' implementation
4111 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4112
4113 If you want to complete the configuration process using your problematic
4114 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4115 to "yes", and re-run configure.
4116
4117 END
4118     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4119   fi
4120 fi
4121 # Check whether --enable-silent-rules was given.
4122 if test "${enable_silent_rules+set}" = set; then :
4123   enableval=$enable_silent_rules;
4124 fi
4125
4126 case $enable_silent_rules in # (((
4127   yes) AM_DEFAULT_VERBOSITY=0;;
4128    no) AM_DEFAULT_VERBOSITY=1;;
4129     *) AM_DEFAULT_VERBOSITY=0;;
4130 esac
4131 am_make=${MAKE-make}
4132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4133 printf %s "checking whether $am_make supports nested variables... " >&6; }
4134 if ${am_cv_make_support_nested_variables+:} false; then :
4135   printf %s "(cached) " >&6
4136 else
4137   if printf "%s\n" 'TRUE=$(BAR$(V))
4138 BAR0=false
4139 BAR1=true
4140 V=1
4141 am__doit:
4142         @$(TRUE)
4143 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4144   am_cv_make_support_nested_variables=yes
4145 else
4146   am_cv_make_support_nested_variables=no
4147 fi
4148 fi
4149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4150 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4151 if test $am_cv_make_support_nested_variables = yes; then
4152     AM_V='$(V)'
4153   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4154 else
4155   AM_V=$AM_DEFAULT_VERBOSITY
4156   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4157 fi
4158 AM_BACKSLASH='\'
4159  # make --enable-silent-rules the default.
4160
4161
4162
4163
4164
4165
4166 DEPDIR=.deps
4167
4168 ac_config_commands="$ac_config_commands depfiles"
4169
4170
4171 am_make=${MAKE-make}
4172 cat > confinc << 'END'
4173 am__doit:
4174         @echo this is the am__doit target
4175 .PHONY: am__doit
4176 END
4177 # If we don't find an include directive, just comment out the code.
4178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4179 printf %s "checking for style of include used by $am_make... " >&6; }
4180 am__include="#"
4181 am__quote=
4182 _am_result=none
4183 # First try GNU make style include.
4184 echo "include confinc" > confmf
4185 # Ignore all kinds of additional output from 'make'.
4186 case `$am_make -s -f confmf 2> /dev/null` in #(
4187 *the\ am__doit\ target*)
4188   am__include=include
4189   am__quote=
4190   _am_result=GNU
4191   ;;
4192 esac
4193 # Now try BSD make style include.
4194 if test "$am__include" = "#"; then
4195    echo '.include "confinc"' > confmf
4196    case `$am_make -s -f confmf 2> /dev/null` in #(
4197    *the\ am__doit\ target*)
4198      am__include=.include
4199      am__quote="\""
4200      _am_result=BSD
4201      ;;
4202    esac
4203 fi
4204
4205
4206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4207 printf "%s\n" "$_am_result" >&6; }
4208 rm -f confinc confmf
4209
4210 # Check whether --enable-dependency-tracking was given.
4211 if test "${enable_dependency_tracking+set}" = set; then :
4212   enableval=$enable_dependency_tracking;
4213 fi
4214
4215 if test "x$enable_dependency_tracking" != xno; then
4216   am_depcomp="$ac_aux_dir/depcomp"
4217   AMDEPBACKSLASH='\'
4218   am__nodep='_no'
4219 fi
4220  if test "x$enable_dependency_tracking" != xno; then
4221   AMDEP_TRUE=
4222   AMDEP_FALSE='#'
4223 else
4224   AMDEP_TRUE='#'
4225   AMDEP_FALSE=
4226 fi
4227
4228
4229 ac_ext=c
4230 ac_cpp='$CPP $CPPFLAGS'
4231 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4232 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4233 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4234 if test -n "$ac_tool_prefix"; then
4235   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4236 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4238 printf %s "checking for $ac_word... " >&6; }
4239 if ${ac_cv_prog_CC+:} false; then :
4240   printf %s "(cached) " >&6
4241 else
4242   if test -n "$CC"; then
4243   ac_cv_prog_CC="$CC" # Let the user override the test.
4244 else
4245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246 for as_dir in $PATH
4247 do
4248   IFS=$as_save_IFS
4249   case $as_dir in #(((
4250     '') as_dir=./ ;;
4251     */) ;;
4252     *) as_dir=$as_dir/ ;;
4253   esac
4254     for ac_exec_ext in '' $ac_executable_extensions; do
4255   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4256     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4257     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4258     break 2
4259   fi
4260 done
4261   done
4262 IFS=$as_save_IFS
4263
4264 fi
4265 fi
4266 CC=$ac_cv_prog_CC
4267 if test -n "$CC"; then
4268   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4269 printf "%s\n" "$CC" >&6; }
4270 else
4271   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4272 printf "%s\n" "no" >&6; }
4273 fi
4274
4275
4276 fi
4277 if test -z "$ac_cv_prog_CC"; then
4278   ac_ct_CC=$CC
4279   # Extract the first word of "gcc", so it can be a program name with args.
4280 set dummy gcc; ac_word=$2
4281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4282 printf %s "checking for $ac_word... " >&6; }
4283 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4284   printf %s "(cached) " >&6
4285 else
4286   if test -n "$ac_ct_CC"; then
4287   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4288 else
4289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4290 for as_dir in $PATH
4291 do
4292   IFS=$as_save_IFS
4293   case $as_dir in #(((
4294     '') as_dir=./ ;;
4295     */) ;;
4296     *) as_dir=$as_dir/ ;;
4297   esac
4298     for ac_exec_ext in '' $ac_executable_extensions; do
4299   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4300     ac_cv_prog_ac_ct_CC="gcc"
4301     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4302     break 2
4303   fi
4304 done
4305   done
4306 IFS=$as_save_IFS
4307
4308 fi
4309 fi
4310 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4311 if test -n "$ac_ct_CC"; then
4312   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4313 printf "%s\n" "$ac_ct_CC" >&6; }
4314 else
4315   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4316 printf "%s\n" "no" >&6; }
4317 fi
4318
4319   if test "x$ac_ct_CC" = x; then
4320     CC=""
4321   else
4322     case $cross_compiling:$ac_tool_warned in
4323 yes:)
4324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4325 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4326 ac_tool_warned=yes ;;
4327 esac
4328     CC=$ac_ct_CC
4329   fi
4330 else
4331   CC="$ac_cv_prog_CC"
4332 fi
4333
4334 if test -z "$CC"; then
4335           if test -n "$ac_tool_prefix"; then
4336     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4337 set dummy ${ac_tool_prefix}cc; ac_word=$2
4338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4339 printf %s "checking for $ac_word... " >&6; }
4340 if ${ac_cv_prog_CC+:} false; then :
4341   printf %s "(cached) " >&6
4342 else
4343   if test -n "$CC"; then
4344   ac_cv_prog_CC="$CC" # Let the user override the test.
4345 else
4346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347 for as_dir in $PATH
4348 do
4349   IFS=$as_save_IFS
4350   case $as_dir in #(((
4351     '') as_dir=./ ;;
4352     */) ;;
4353     *) as_dir=$as_dir/ ;;
4354   esac
4355     for ac_exec_ext in '' $ac_executable_extensions; do
4356   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4357     ac_cv_prog_CC="${ac_tool_prefix}cc"
4358     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4359     break 2
4360   fi
4361 done
4362   done
4363 IFS=$as_save_IFS
4364
4365 fi
4366 fi
4367 CC=$ac_cv_prog_CC
4368 if test -n "$CC"; then
4369   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4370 printf "%s\n" "$CC" >&6; }
4371 else
4372   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4373 printf "%s\n" "no" >&6; }
4374 fi
4375
4376
4377   fi
4378 fi
4379 if test -z "$CC"; then
4380   # Extract the first word of "cc", so it can be a program name with args.
4381 set dummy cc; ac_word=$2
4382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383 printf %s "checking for $ac_word... " >&6; }
4384 if ${ac_cv_prog_CC+:} false; then :
4385   printf %s "(cached) " >&6
4386 else
4387   if test -n "$CC"; then
4388   ac_cv_prog_CC="$CC" # Let the user override the test.
4389 else
4390   ac_prog_rejected=no
4391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392 for as_dir in $PATH
4393 do
4394   IFS=$as_save_IFS
4395   case $as_dir in #(((
4396     '') as_dir=./ ;;
4397     */) ;;
4398     *) as_dir=$as_dir/ ;;
4399   esac
4400     for ac_exec_ext in '' $ac_executable_extensions; do
4401   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4402     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4403        ac_prog_rejected=yes
4404        continue
4405      fi
4406     ac_cv_prog_CC="cc"
4407     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4408     break 2
4409   fi
4410 done
4411   done
4412 IFS=$as_save_IFS
4413
4414 if test $ac_prog_rejected = yes; then
4415   # We found a bogon in the path, so make sure we never use it.
4416   set dummy $ac_cv_prog_CC
4417   shift
4418   if test $# != 0; then
4419     # We chose a different compiler from the bogus one.
4420     # However, it has the same basename, so the bogon will be chosen
4421     # first if we set CC to just the basename; use the full file name.
4422     shift
4423     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4424   fi
4425 fi
4426 fi
4427 fi
4428 CC=$ac_cv_prog_CC
4429 if test -n "$CC"; then
4430   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4431 printf "%s\n" "$CC" >&6; }
4432 else
4433   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434 printf "%s\n" "no" >&6; }
4435 fi
4436
4437
4438 fi
4439 if test -z "$CC"; then
4440   if test -n "$ac_tool_prefix"; then
4441   for ac_prog in cl.exe
4442   do
4443     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4444 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446 printf %s "checking for $ac_word... " >&6; }
4447 if ${ac_cv_prog_CC+:} false; then :
4448   printf %s "(cached) " >&6
4449 else
4450   if test -n "$CC"; then
4451   ac_cv_prog_CC="$CC" # Let the user override the test.
4452 else
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454 for as_dir in $PATH
4455 do
4456   IFS=$as_save_IFS
4457   case $as_dir in #(((
4458     '') as_dir=./ ;;
4459     */) ;;
4460     *) as_dir=$as_dir/ ;;
4461   esac
4462     for ac_exec_ext in '' $ac_executable_extensions; do
4463   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4464     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4465     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4466     break 2
4467   fi
4468 done
4469   done
4470 IFS=$as_save_IFS
4471
4472 fi
4473 fi
4474 CC=$ac_cv_prog_CC
4475 if test -n "$CC"; then
4476   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4477 printf "%s\n" "$CC" >&6; }
4478 else
4479   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4480 printf "%s\n" "no" >&6; }
4481 fi
4482
4483
4484     test -n "$CC" && break
4485   done
4486 fi
4487 if test -z "$CC"; then
4488   ac_ct_CC=$CC
4489   for ac_prog in cl.exe
4490 do
4491   # Extract the first word of "$ac_prog", so it can be a program name with args.
4492 set dummy $ac_prog; ac_word=$2
4493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494 printf %s "checking for $ac_word... " >&6; }
4495 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4496   printf %s "(cached) " >&6
4497 else
4498   if test -n "$ac_ct_CC"; then
4499   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4500 else
4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502 for as_dir in $PATH
4503 do
4504   IFS=$as_save_IFS
4505   case $as_dir in #(((
4506     '') as_dir=./ ;;
4507     */) ;;
4508     *) as_dir=$as_dir/ ;;
4509   esac
4510     for ac_exec_ext in '' $ac_executable_extensions; do
4511   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4512     ac_cv_prog_ac_ct_CC="$ac_prog"
4513     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4514     break 2
4515   fi
4516 done
4517   done
4518 IFS=$as_save_IFS
4519
4520 fi
4521 fi
4522 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4523 if test -n "$ac_ct_CC"; then
4524   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4525 printf "%s\n" "$ac_ct_CC" >&6; }
4526 else
4527   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528 printf "%s\n" "no" >&6; }
4529 fi
4530
4531
4532   test -n "$ac_ct_CC" && break
4533 done
4534
4535   if test "x$ac_ct_CC" = x; then
4536     CC=""
4537   else
4538     case $cross_compiling:$ac_tool_warned in
4539 yes:)
4540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4541 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4542 ac_tool_warned=yes ;;
4543 esac
4544     CC=$ac_ct_CC
4545   fi
4546 fi
4547
4548 fi
4549
4550
4551 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4552 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4553 as_fn_error $? "no acceptable C compiler found in \$PATH
4554 See \`config.log' for more details" "$LINENO" 5; }
4555
4556 # Provide some information about the compiler.
4557 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4558 set X $ac_compile
4559 ac_compiler=$2
4560 for ac_option in --version -v -V -qversion; do
4561   { { ac_try="$ac_compiler $ac_option >&5"
4562 case "(($ac_try" in
4563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4564   *) ac_try_echo=$ac_try;;
4565 esac
4566 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4567 printf "%s\n" "$ac_try_echo"; } >&5
4568   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4569   ac_status=$?
4570   if test -s conftest.err; then
4571     sed '10a\
4572 ... rest of stderr output deleted ...
4573          10q' conftest.err >conftest.er1
4574     cat conftest.er1 >&5
4575   fi
4576   rm -f conftest.er1 conftest.err
4577   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4578   test $ac_status = 0; }
4579 done
4580
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582 /* end confdefs.h.  */
4583
4584 int
4585 main ()
4586 {
4587
4588   ;
4589   return 0;
4590 }
4591 _ACEOF
4592 ac_clean_files_save=$ac_clean_files
4593 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4594 # Try to create an executable without -o first, disregard a.out.
4595 # It will help us diagnose broken compilers, and finding out an intuition
4596 # of exeext.
4597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4598 printf %s "checking whether the C compiler works... " >&6; }
4599 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4600
4601 # The possible output files:
4602 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4603
4604 ac_rmfiles=
4605 for ac_file in $ac_files
4606 do
4607   case $ac_file in
4608     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4609     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4610   esac
4611 done
4612 rm -f $ac_rmfiles
4613
4614 if { { ac_try="$ac_link_default"
4615 case "(($ac_try" in
4616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4617   *) ac_try_echo=$ac_try;;
4618 esac
4619 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4620 printf "%s\n" "$ac_try_echo"; } >&5
4621   (eval "$ac_link_default") 2>&5
4622   ac_status=$?
4623   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4624   test $ac_status = 0; }; then :
4625   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4626 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4627 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4628 # so that the user can short-circuit this test for compilers unknown to
4629 # Autoconf.
4630 for ac_file in $ac_files ''
4631 do
4632   test -f "$ac_file" || continue
4633   case $ac_file in
4634     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4635         ;;
4636     [ab].out )
4637         # We found the default executable, but exeext='' is most
4638         # certainly right.
4639         break;;
4640     *.* )
4641         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4642         then :; else
4643            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4644         fi
4645         # We set ac_cv_exeext here because the later test for it is not
4646         # safe: cross compilers may not add the suffix if given an `-o'
4647         # argument, so we may need to know it at that point already.
4648         # Even if this section looks crufty: it has the advantage of
4649         # actually working.
4650         break;;
4651     * )
4652         break;;
4653   esac
4654 done
4655 test "$ac_cv_exeext" = no && ac_cv_exeext=
4656
4657 else
4658   ac_file=''
4659 fi
4660 if test -z "$ac_file"; then :
4661   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662 printf "%s\n" "no" >&6; }
4663 printf "%s\n" "$as_me: failed program was:" >&5
4664 sed 's/^/| /' conftest.$ac_ext >&5
4665
4666 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4667 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4668 as_fn_error 77 "C compiler cannot create executables
4669 See \`config.log' for more details" "$LINENO" 5; }
4670 else
4671   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4672 printf "%s\n" "yes" >&6; }
4673 fi
4674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4675 printf %s "checking for C compiler default output file name... " >&6; }
4676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4677 printf "%s\n" "$ac_file" >&6; }
4678 ac_exeext=$ac_cv_exeext
4679
4680 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4681 ac_clean_files=$ac_clean_files_save
4682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4683 printf %s "checking for suffix of executables... " >&6; }
4684 if { { ac_try="$ac_link"
4685 case "(($ac_try" in
4686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4687   *) ac_try_echo=$ac_try;;
4688 esac
4689 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4690 printf "%s\n" "$ac_try_echo"; } >&5
4691   (eval "$ac_link") 2>&5
4692   ac_status=$?
4693   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4694   test $ac_status = 0; }; then :
4695   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4696 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4697 # work properly (i.e., refer to `conftest.exe'), while it won't with
4698 # `rm'.
4699 for ac_file in conftest.exe conftest conftest.*; do
4700   test -f "$ac_file" || continue
4701   case $ac_file in
4702     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4703     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4704           break;;
4705     * ) break;;
4706   esac
4707 done
4708 else
4709   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4710 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4711 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4712 See \`config.log' for more details" "$LINENO" 5; }
4713 fi
4714 rm -f conftest conftest$ac_cv_exeext
4715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4716 printf "%s\n" "$ac_cv_exeext" >&6; }
4717
4718 rm -f conftest.$ac_ext
4719 EXEEXT=$ac_cv_exeext
4720 ac_exeext=$EXEEXT
4721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4722 /* end confdefs.h.  */
4723 #include <stdio.h>
4724 int
4725 main ()
4726 {
4727 FILE *f = fopen ("conftest.out", "w");
4728  return ferror (f) || fclose (f) != 0;
4729
4730   ;
4731   return 0;
4732 }
4733 _ACEOF
4734 ac_clean_files="$ac_clean_files conftest.out"
4735 # Check that the compiler produces executables we can run.  If not, either
4736 # the compiler is broken, or we cross compile.
4737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4738 printf %s "checking whether we are cross compiling... " >&6; }
4739 if test "$cross_compiling" != yes; then
4740   { { ac_try="$ac_link"
4741 case "(($ac_try" in
4742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743   *) ac_try_echo=$ac_try;;
4744 esac
4745 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4746 printf "%s\n" "$ac_try_echo"; } >&5
4747   (eval "$ac_link") 2>&5
4748   ac_status=$?
4749   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4750   test $ac_status = 0; }
4751   if { ac_try='./conftest$ac_cv_exeext'
4752   { { case "(($ac_try" in
4753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4754   *) ac_try_echo=$ac_try;;
4755 esac
4756 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4757 printf "%s\n" "$ac_try_echo"; } >&5
4758   (eval "$ac_try") 2>&5
4759   ac_status=$?
4760   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4761   test $ac_status = 0; }; }; then
4762     cross_compiling=no
4763   else
4764     if test "$cross_compiling" = maybe; then
4765         cross_compiling=yes
4766     else
4767         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4768 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4769 as_fn_error $? "cannot run C compiled programs.
4770 If you meant to cross compile, use \`--host'.
4771 See \`config.log' for more details" "$LINENO" 5; }
4772     fi
4773   fi
4774 fi
4775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4776 printf "%s\n" "$cross_compiling" >&6; }
4777
4778 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4779 ac_clean_files=$ac_clean_files_save
4780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4781 printf %s "checking for suffix of object files... " >&6; }
4782 if ${ac_cv_objext+:} false; then :
4783   printf %s "(cached) " >&6
4784 else
4785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4786 /* end confdefs.h.  */
4787
4788 int
4789 main ()
4790 {
4791
4792   ;
4793   return 0;
4794 }
4795 _ACEOF
4796 rm -f conftest.o conftest.obj
4797 if { { ac_try="$ac_compile"
4798 case "(($ac_try" in
4799   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800   *) ac_try_echo=$ac_try;;
4801 esac
4802 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4803 printf "%s\n" "$ac_try_echo"; } >&5
4804   (eval "$ac_compile") 2>&5
4805   ac_status=$?
4806   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4807   test $ac_status = 0; }; then :
4808   for ac_file in conftest.o conftest.obj conftest.*; do
4809   test -f "$ac_file" || continue;
4810   case $ac_file in
4811     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4812     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4813        break;;
4814   esac
4815 done
4816 else
4817   printf "%s\n" "$as_me: failed program was:" >&5
4818 sed 's/^/| /' conftest.$ac_ext >&5
4819
4820 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4821 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4822 as_fn_error $? "cannot compute suffix of object files: cannot compile
4823 See \`config.log' for more details" "$LINENO" 5; }
4824 fi
4825 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4826 fi
4827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4828 printf "%s\n" "$ac_cv_objext" >&6; }
4829 OBJEXT=$ac_cv_objext
4830 ac_objext=$OBJEXT
4831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4832 printf %s "checking whether we are using the GNU C compiler... " >&6; }
4833 if ${ac_cv_c_compiler_gnu+:} false; then :
4834   printf %s "(cached) " >&6
4835 else
4836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4837 /* end confdefs.h.  */
4838
4839 int
4840 main ()
4841 {
4842 #ifndef __GNUC__
4843        choke me
4844 #endif
4845
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 if ac_fn_c_try_compile "$LINENO"; then :
4851   ac_compiler_gnu=yes
4852 else
4853   ac_compiler_gnu=no
4854 fi
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4857
4858 fi
4859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4860 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4861 if test $ac_compiler_gnu = yes; then
4862   GCC=yes
4863 else
4864   GCC=
4865 fi
4866 ac_test_CFLAGS=${CFLAGS+set}
4867 ac_save_CFLAGS=$CFLAGS
4868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4869 printf %s "checking whether $CC accepts -g... " >&6; }
4870 if ${ac_cv_prog_cc_g+:} false; then :
4871   printf %s "(cached) " >&6
4872 else
4873   ac_save_c_werror_flag=$ac_c_werror_flag
4874    ac_c_werror_flag=yes
4875    ac_cv_prog_cc_g=no
4876    CFLAGS="-g"
4877    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4878 /* end confdefs.h.  */
4879
4880 int
4881 main ()
4882 {
4883
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 if ac_fn_c_try_compile "$LINENO"; then :
4889   ac_cv_prog_cc_g=yes
4890 else
4891   CFLAGS=""
4892       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4893 /* end confdefs.h.  */
4894
4895 int
4896 main ()
4897 {
4898
4899   ;
4900   return 0;
4901 }
4902 _ACEOF
4903 if ac_fn_c_try_compile "$LINENO"; then :
4904
4905 else
4906   ac_c_werror_flag=$ac_save_c_werror_flag
4907          CFLAGS="-g"
4908          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4909 /* end confdefs.h.  */
4910
4911 int
4912 main ()
4913 {
4914
4915   ;
4916   return 0;
4917 }
4918 _ACEOF
4919 if ac_fn_c_try_compile "$LINENO"; then :
4920   ac_cv_prog_cc_g=yes
4921 fi
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 fi
4924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4925 fi
4926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927    ac_c_werror_flag=$ac_save_c_werror_flag
4928 fi
4929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4930 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4931 if test "$ac_test_CFLAGS" = set; then
4932   CFLAGS=$ac_save_CFLAGS
4933 elif test $ac_cv_prog_cc_g = yes; then
4934   if test "$GCC" = yes; then
4935     CFLAGS="-g -O2"
4936   else
4937     CFLAGS="-g"
4938   fi
4939 else
4940   if test "$GCC" = yes; then
4941     CFLAGS="-O2"
4942   else
4943     CFLAGS=
4944   fi
4945 fi
4946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4947 printf %s "checking for $CC option to enable C11 features... " >&6; }
4948 if ${ac_cv_prog_cc_c11+:} false; then :
4949   printf %s "(cached) " >&6
4950 else
4951   ac_cv_prog_cc_c11=no
4952 ac_save_CC=$CC
4953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4954 /* end confdefs.h.  */
4955 #include <stdarg.h>
4956 #include <stdbool.h>
4957 #include <stdlib.h>
4958 #include <wchar.h>
4959 #include <stdio.h>
4960
4961 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4962 #define debug(...) fprintf (stderr, __VA_ARGS__)
4963 #define showlist(...) puts (#__VA_ARGS__)
4964 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4965 static void
4966 test_varargs_macros (void)
4967 {
4968   int x = 1234;
4969   int y = 5678;
4970   debug ("Flag");
4971   debug ("X = %d\n", x);
4972   showlist (The first, second, and third items.);
4973   report (x>y, "x is %d but y is %d", x, y);
4974 }
4975
4976 // Check long long types.
4977 #define BIG64 18446744073709551615ull
4978 #define BIG32 4294967295ul
4979 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4980 #if !BIG_OK
4981   your preprocessor is broken;
4982 #endif
4983 #if BIG_OK
4984 #else
4985   your preprocessor is broken;
4986 #endif
4987 static long long int bignum = -9223372036854775807LL;
4988 static unsigned long long int ubignum = BIG64;
4989
4990 struct incomplete_array
4991 {
4992   int datasize;
4993   double data[];
4994 };
4995
4996 struct named_init {
4997   int number;
4998   const wchar_t *name;
4999   double average;
5000 };
5001
5002 typedef const char *ccp;
5003
5004 static inline int
5005 test_restrict (ccp restrict text)
5006 {
5007   // See if C++-style comments work.
5008   // Iterate through items via the restricted pointer.
5009   // Also check for declarations in for loops.
5010   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5011     continue;
5012   return 0;
5013 }
5014
5015 // Check varargs and va_copy.
5016 static bool
5017 test_varargs (const char *format, ...)
5018 {
5019   va_list args;
5020   va_start (args, format);
5021   va_list args_copy;
5022   va_copy (args_copy, args);
5023
5024   const char *str = "";
5025   int number = 0;
5026   float fnumber = 0;
5027
5028   while (*format)
5029     {
5030       switch (*format++)
5031         {
5032         case 's': // string
5033           str = va_arg (args_copy, const char *);
5034           break;
5035         case 'd': // int
5036           number = va_arg (args_copy, int);
5037           break;
5038         case 'f': // float
5039           fnumber = va_arg (args_copy, double);
5040           break;
5041         default:
5042           break;
5043         }
5044     }
5045   va_end (args_copy);
5046   va_end (args);
5047
5048   return *str && number && fnumber;
5049 }
5050 // Check _Alignas.
5051 char _Alignas (double) aligned_as_double;
5052 char _Alignas (0) no_special_alignment;
5053 extern char aligned_as_int;
5054 char _Alignas (0) _Alignas (int) aligned_as_int;
5055
5056 // Check _Alignof.
5057 enum
5058 {
5059   int_alignment = _Alignof (int),
5060   int_array_alignment = _Alignof (int[100]),
5061   char_alignment = _Alignof (char)
5062 };
5063 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5064
5065 // Check _Noreturn.
5066 int _Noreturn does_not_return (void) { for (;;) continue; }
5067
5068 // Check _Static_assert.
5069 struct test_static_assert
5070 {
5071   int x;
5072   _Static_assert (sizeof (int) <= sizeof (long int),
5073                   "_Static_assert does not work in struct");
5074   long int y;
5075 };
5076
5077 // Check UTF-8 literals.
5078 #define u8 syntax error!
5079 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5080
5081 // Check duplicate typedefs.
5082 typedef long *long_ptr;
5083 typedef long int *long_ptr;
5084 typedef long_ptr long_ptr;
5085
5086 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5087 struct anonymous
5088 {
5089   union {
5090     struct { int i; int j; };
5091     struct { int k; long int l; } w;
5092   };
5093   int m;
5094 } v1;
5095
5096 int
5097 main ()
5098 {
5099
5100   // Check bool.
5101   _Bool success = false;
5102
5103   // Check restrict.
5104   if (test_restrict ("String literal") == 0)
5105     success = true;
5106   char *restrict newvar = "Another string";
5107
5108   // Check varargs.
5109   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5110   test_varargs_macros ();
5111
5112   // Check flexible array members.
5113   struct incomplete_array *ia =
5114     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5115   ia->datasize = 10;
5116   for (int i = 0; i < ia->datasize; ++i)
5117     ia->data[i] = i * 1.234;
5118
5119   // Check named initializers.
5120   struct named_init ni = {
5121     .number = 34,
5122     .name = L"Test wide string",
5123     .average = 543.34343,
5124   };
5125
5126   ni.number = 58;
5127
5128   int dynamic_array[ni.number];
5129   dynamic_array[ni.number - 1] = 543;
5130
5131   // work around unused variable warnings
5132   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5133           || dynamic_array[ni.number - 1] != 543);
5134
5135   v1.i = 2;
5136   v1.w.k = 5;
5137   _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch");
5138
5139   ;
5140   return 0;
5141 }
5142 _ACEOF
5143 for ac_arg in '' -std=gnu11
5144 do
5145   CC="$ac_save_CC $ac_arg"
5146   if ac_fn_c_try_compile "$LINENO"; then :
5147   ac_cv_prog_cc_c11=$ac_arg
5148 fi
5149 rm -f core conftest.err conftest.$ac_objext
5150   test "x$ac_cv_prog_cc_c11" != "xno" && break
5151 done
5152 rm -f conftest.$ac_ext
5153 CC=$ac_save_CC
5154
5155 fi
5156 # AC_CACHE_VAL
5157 ac_prog_cc_stdc_options=
5158 case "x$ac_cv_prog_cc_c11" in
5159   x)
5160     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5161 printf "%s\n" "none needed" >&6; } ;;
5162   xno)
5163     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5164 printf "%s\n" "unsupported" >&6; } ;;
5165   *)
5166     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5167     CC=$CC$ac_prog_cc_stdc_options
5168     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5169 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5170 esac
5171 if test "x$ac_cv_prog_cc_c11" != xno; then :
5172   ac_prog_cc_stdc=c11
5173                  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5174 else
5175   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5176 printf %s "checking for $CC option to enable C99 features... " >&6; }
5177 if ${ac_cv_prog_cc_c99+:} false; then :
5178   printf %s "(cached) " >&6
5179 else
5180   ac_cv_prog_cc_c99=no
5181 ac_save_CC=$CC
5182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5183 /* end confdefs.h.  */
5184 #include <stdarg.h>
5185 #include <stdbool.h>
5186 #include <stdlib.h>
5187 #include <wchar.h>
5188 #include <stdio.h>
5189
5190 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5191 #define debug(...) fprintf (stderr, __VA_ARGS__)
5192 #define showlist(...) puts (#__VA_ARGS__)
5193 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5194 static void
5195 test_varargs_macros (void)
5196 {
5197   int x = 1234;
5198   int y = 5678;
5199   debug ("Flag");
5200   debug ("X = %d\n", x);
5201   showlist (The first, second, and third items.);
5202   report (x>y, "x is %d but y is %d", x, y);
5203 }
5204
5205 // Check long long types.
5206 #define BIG64 18446744073709551615ull
5207 #define BIG32 4294967295ul
5208 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5209 #if !BIG_OK
5210   your preprocessor is broken;
5211 #endif
5212 #if BIG_OK
5213 #else
5214   your preprocessor is broken;
5215 #endif
5216 static long long int bignum = -9223372036854775807LL;
5217 static unsigned long long int ubignum = BIG64;
5218
5219 struct incomplete_array
5220 {
5221   int datasize;
5222   double data[];
5223 };
5224
5225 struct named_init {
5226   int number;
5227   const wchar_t *name;
5228   double average;
5229 };
5230
5231 typedef const char *ccp;
5232
5233 static inline int
5234 test_restrict (ccp restrict text)
5235 {
5236   // See if C++-style comments work.
5237   // Iterate through items via the restricted pointer.
5238   // Also check for declarations in for loops.
5239   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5240     continue;
5241   return 0;
5242 }
5243
5244 // Check varargs and va_copy.
5245 static bool
5246 test_varargs (const char *format, ...)
5247 {
5248   va_list args;
5249   va_start (args, format);
5250   va_list args_copy;
5251   va_copy (args_copy, args);
5252
5253   const char *str = "";
5254   int number = 0;
5255   float fnumber = 0;
5256
5257   while (*format)
5258     {
5259       switch (*format++)
5260         {
5261         case 's': // string
5262           str = va_arg (args_copy, const char *);
5263           break;
5264         case 'd': // int
5265           number = va_arg (args_copy, int);
5266           break;
5267         case 'f': // float
5268           fnumber = va_arg (args_copy, double);
5269           break;
5270         default:
5271           break;
5272         }
5273     }
5274   va_end (args_copy);
5275   va_end (args);
5276
5277   return *str && number && fnumber;
5278 }
5279 int
5280 main ()
5281 {
5282
5283   // Check bool.
5284   _Bool success = false;
5285
5286   // Check restrict.
5287   if (test_restrict ("String literal") == 0)
5288     success = true;
5289   char *restrict newvar = "Another string";
5290
5291   // Check varargs.
5292   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5293   test_varargs_macros ();
5294
5295   // Check flexible array members.
5296   struct incomplete_array *ia =
5297     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5298   ia->datasize = 10;
5299   for (int i = 0; i < ia->datasize; ++i)
5300     ia->data[i] = i * 1.234;
5301
5302   // Check named initializers.
5303   struct named_init ni = {
5304     .number = 34,
5305     .name = L"Test wide string",
5306     .average = 543.34343,
5307   };
5308
5309   ni.number = 58;
5310
5311   int dynamic_array[ni.number];
5312   dynamic_array[ni.number - 1] = 543;
5313
5314   // work around unused variable warnings
5315   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5316           || dynamic_array[ni.number - 1] != 543);
5317
5318   ;
5319   return 0;
5320 }
5321 _ACEOF
5322 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5323 do
5324   CC="$ac_save_CC $ac_arg"
5325   if ac_fn_c_try_compile "$LINENO"; then :
5326   ac_cv_prog_cc_c99=$ac_arg
5327 fi
5328 rm -f core conftest.err conftest.$ac_objext
5329   test "x$ac_cv_prog_cc_c99" != "xno" && break
5330 done
5331 rm -f conftest.$ac_ext
5332 CC=$ac_save_CC
5333
5334 fi
5335 # AC_CACHE_VAL
5336 ac_prog_cc_stdc_options=
5337 case "x$ac_cv_prog_cc_c99" in
5338   x)
5339     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5340 printf "%s\n" "none needed" >&6; } ;;
5341   xno)
5342     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5343 printf "%s\n" "unsupported" >&6; } ;;
5344   *)
5345     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5346     CC=$CC$ac_prog_cc_stdc_options
5347     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5348 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5349 esac
5350 if test "x$ac_cv_prog_cc_c99" != xno; then :
5351   ac_prog_cc_stdc=c99
5352                     ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5353 else
5354   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5355 printf %s "checking for $CC option to enable C89 features... " >&6; }
5356 if ${ac_cv_prog_cc_c89+:} false; then :
5357   printf %s "(cached) " >&6
5358 else
5359   ac_cv_prog_cc_c89=no
5360 ac_save_CC=$CC
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362 /* end confdefs.h.  */
5363 #include <stdarg.h>
5364 #include <stdio.h>
5365 struct stat;
5366 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5367 struct buf { int x; };
5368 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5369 static char *e (p, i)
5370      char **p;
5371      int i;
5372 {
5373   return p[i];
5374 }
5375 static char *f (char * (*g) (char **, int), char **p, ...)
5376 {
5377   char *s;
5378   va_list v;
5379   va_start (v,p);
5380   s = g (p, va_arg (v,int));
5381   va_end (v);
5382   return s;
5383 }
5384
5385 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5386    function prototypes and stuff, but not '\xHH' hex character constants.
5387    These don't provoke an error unfortunately, instead are silently treated
5388    as 'x'.  The following induces an error, until -std is added to get
5389    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5390    array size at least.  It's necessary to write '\x00'==0 to get something
5391    that's true only with -std.  */
5392 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5393
5394 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5395    inside strings and character constants.  */
5396 #define FOO(x) 'x'
5397 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5398
5399 int test (int i, double x);
5400 struct s1 {int (*f) (int a);};
5401 struct s2 {int (*f) (double a);};
5402 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5403 int argc;
5404 char **argv;
5405 int
5406 main ()
5407 {
5408 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5409   ;
5410   return 0;
5411 }
5412 _ACEOF
5413 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5414         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5415 do
5416   CC="$ac_save_CC $ac_arg"
5417   if ac_fn_c_try_compile "$LINENO"; then :
5418   ac_cv_prog_cc_c89=$ac_arg
5419 fi
5420 rm -f core conftest.err conftest.$ac_objext
5421   test "x$ac_cv_prog_cc_c89" != "xno" && break
5422 done
5423 rm -f conftest.$ac_ext
5424 CC=$ac_save_CC
5425
5426 fi
5427 # AC_CACHE_VAL
5428 ac_prog_cc_stdc_options=
5429 case "x$ac_cv_prog_cc_c89" in
5430   x)
5431     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5432 printf "%s\n" "none needed" >&6; } ;;
5433   xno)
5434     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5435 printf "%s\n" "unsupported" >&6; } ;;
5436   *)
5437     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5438     CC=$CC$ac_prog_cc_stdc_options
5439     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5440 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5441 esac
5442 if test "x$ac_cv_prog_cc_c89" != xno; then :
5443   ac_prog_cc_stdc=c89
5444                        ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5445 else
5446   ac_prog_cc_stdc=no
5447                        ac_cv_prog_cc_stdc=no
5448 fi
5449
5450 fi
5451
5452 fi
5453
5454 ac_ext=c
5455 ac_cpp='$CPP $CPPFLAGS'
5456 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5457 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5458 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5459
5460 ac_ext=c
5461 ac_cpp='$CPP $CPPFLAGS'
5462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5466 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5467 if ${am_cv_prog_cc_c_o+:} false; then :
5468   printf %s "(cached) " >&6
5469 else
5470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471 /* end confdefs.h.  */
5472
5473 int
5474 main ()
5475 {
5476
5477   ;
5478   return 0;
5479 }
5480 _ACEOF
5481   # Make sure it works both with $CC and with simple cc.
5482   # Following AC_PROG_CC_C_O, we do the test twice because some
5483   # compilers refuse to overwrite an existing .o file with -o,
5484   # though they will create one.
5485   am_cv_prog_cc_c_o=yes
5486   for am_i in 1 2; do
5487     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5488    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5489    ac_status=$?
5490    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491    (exit $ac_status); } \
5492          && test -f conftest2.$ac_objext; then
5493       : OK
5494     else
5495       am_cv_prog_cc_c_o=no
5496       break
5497     fi
5498   done
5499   rm -f core conftest*
5500   unset am_i
5501 fi
5502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5503 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5504 if test "$am_cv_prog_cc_c_o" != yes; then
5505    # Losing compiler, so override with the script.
5506    # FIXME: It is wrong to rewrite CC.
5507    # But if we don't then we get into trouble of one sort or another.
5508    # A longer-term fix would be to have automake use am__CC in this case,
5509    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5510    CC="$am_aux_dir/compile $CC"
5511 fi
5512 ac_ext=c
5513 ac_cpp='$CPP $CPPFLAGS'
5514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5517
5518
5519 depcc="$CC"   am_compiler_list=
5520
5521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5522 printf %s "checking dependency style of $depcc... " >&6; }
5523 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5524   printf %s "(cached) " >&6
5525 else
5526   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5527   # We make a subdir and do the tests there.  Otherwise we can end up
5528   # making bogus files that we don't know about and never remove.  For
5529   # instance it was reported that on HP-UX the gcc test will end up
5530   # making a dummy file named 'D' -- because '-MD' means "put the output
5531   # in D".
5532   rm -rf conftest.dir
5533   mkdir conftest.dir
5534   # Copy depcomp to subdir because otherwise we won't find it if we're
5535   # using a relative directory.
5536   cp "$am_depcomp" conftest.dir
5537   cd conftest.dir
5538   # We will build objects and dependencies in a subdirectory because
5539   # it helps to detect inapplicable dependency modes.  For instance
5540   # both Tru64's cc and ICC support -MD to output dependencies as a
5541   # side effect of compilation, but ICC will put the dependencies in
5542   # the current directory while Tru64 will put them in the object
5543   # directory.
5544   mkdir sub
5545
5546   am_cv_CC_dependencies_compiler_type=none
5547   if test "$am_compiler_list" = ""; then
5548      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5549   fi
5550   am__universal=false
5551   case " $depcc " in #(
5552      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5553      esac
5554
5555   for depmode in $am_compiler_list; do
5556     # Setup a source with many dependencies, because some compilers
5557     # like to wrap large dependency lists on column 80 (with \), and
5558     # we should not choose a depcomp mode which is confused by this.
5559     #
5560     # We need to recreate these files for each test, as the compiler may
5561     # overwrite some of them when testing with obscure command lines.
5562     # This happens at least with the AIX C compiler.
5563     : > sub/conftest.c
5564     for i in 1 2 3 4 5 6; do
5565       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5566       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5567       # Solaris 10 /bin/sh.
5568       echo '/* dummy */' > sub/conftst$i.h
5569     done
5570     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5571
5572     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5573     # mode.  It turns out that the SunPro C++ compiler does not properly
5574     # handle '-M -o', and we need to detect this.  Also, some Intel
5575     # versions had trouble with output in subdirs.
5576     am__obj=sub/conftest.${OBJEXT-o}
5577     am__minus_obj="-o $am__obj"
5578     case $depmode in
5579     gcc)
5580       # This depmode causes a compiler race in universal mode.
5581       test "$am__universal" = false || continue
5582       ;;
5583     nosideeffect)
5584       # After this tag, mechanisms are not by side-effect, so they'll
5585       # only be used when explicitly requested.
5586       if test "x$enable_dependency_tracking" = xyes; then
5587         continue
5588       else
5589         break
5590       fi
5591       ;;
5592     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5593       # This compiler won't grok '-c -o', but also, the minuso test has
5594       # not run yet.  These depmodes are late enough in the game, and
5595       # so weak that their functioning should not be impacted.
5596       am__obj=conftest.${OBJEXT-o}
5597       am__minus_obj=
5598       ;;
5599     none) break ;;
5600     esac
5601     if depmode=$depmode \
5602        source=sub/conftest.c object=$am__obj \
5603        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5604        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5605          >/dev/null 2>conftest.err &&
5606        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5607        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5608        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5609        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5610       # icc doesn't choke on unknown options, it will just issue warnings
5611       # or remarks (even with -Werror).  So we grep stderr for any message
5612       # that says an option was ignored or not supported.
5613       # When given -MP, icc 7.0 and 7.1 complain thusly:
5614       #   icc: Command line warning: ignoring option '-M'; no argument required
5615       # The diagnosis changed in icc 8.0:
5616       #   icc: Command line remark: option '-MP' not supported
5617       if (grep 'ignoring option' conftest.err ||
5618           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5619         am_cv_CC_dependencies_compiler_type=$depmode
5620         break
5621       fi
5622     fi
5623   done
5624
5625   cd ..
5626   rm -rf conftest.dir
5627 else
5628   am_cv_CC_dependencies_compiler_type=none
5629 fi
5630
5631 fi
5632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5633 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5634 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5635
5636  if
5637   test "x$enable_dependency_tracking" != xno \
5638   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5639   am__fastdepCC_TRUE=
5640   am__fastdepCC_FALSE='#'
5641 else
5642   am__fastdepCC_TRUE='#'
5643   am__fastdepCC_FALSE=
5644 fi
5645
5646
5647
5648
5649 ac_ext=c
5650 ac_cpp='$CPP $CPPFLAGS'
5651 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5652 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5653 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5655 printf %s "checking how to run the C preprocessor... " >&6; }
5656 # On Suns, sometimes $CPP names a directory.
5657 if test -n "$CPP" && test -d "$CPP"; then
5658   CPP=
5659 fi
5660 if test -z "$CPP"; then
5661   if ${ac_cv_prog_CPP+:} false; then :
5662   printf %s "(cached) " >&6
5663 else
5664       # Double quotes because CPP needs to be expanded
5665     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5666     do
5667       ac_preproc_ok=false
5668 for ac_c_preproc_warn_flag in '' yes
5669 do
5670   # Use a header file that comes with gcc, so configuring glibc
5671   # with a fresh cross-compiler works.
5672   # On the NeXT, cc -E runs the code through the compiler's parser,
5673   # not just through cpp. "Syntax error" is here to catch this case.
5674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5675 /* end confdefs.h.  */
5676 #include <limits.h>
5677                      Syntax error
5678 _ACEOF
5679 if ac_fn_c_try_cpp "$LINENO"; then :
5680
5681 else
5682   # Broken: fails on valid input.
5683 continue
5684 fi
5685 rm -f conftest.err conftest.i conftest.$ac_ext
5686
5687   # OK, works on sane cases.  Now check whether nonexistent headers
5688   # can be detected and how.
5689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5690 /* end confdefs.h.  */
5691 #include <ac_nonexistent.h>
5692 _ACEOF
5693 if ac_fn_c_try_cpp "$LINENO"; then :
5694   # Broken: success on invalid input.
5695 continue
5696 else
5697   # Passes both tests.
5698 ac_preproc_ok=:
5699 break
5700 fi
5701 rm -f conftest.err conftest.i conftest.$ac_ext
5702
5703 done
5704 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5705 rm -f conftest.i conftest.err conftest.$ac_ext
5706 if $ac_preproc_ok; then :
5707   break
5708 fi
5709
5710     done
5711     ac_cv_prog_CPP=$CPP
5712
5713 fi
5714   CPP=$ac_cv_prog_CPP
5715 else
5716   ac_cv_prog_CPP=$CPP
5717 fi
5718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5719 printf "%s\n" "$CPP" >&6; }
5720 ac_preproc_ok=false
5721 for ac_c_preproc_warn_flag in '' yes
5722 do
5723   # Use a header file that comes with gcc, so configuring glibc
5724   # with a fresh cross-compiler works.
5725   # On the NeXT, cc -E runs the code through the compiler's parser,
5726   # not just through cpp. "Syntax error" is here to catch this case.
5727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5728 /* end confdefs.h.  */
5729 #include <limits.h>
5730                      Syntax error
5731 _ACEOF
5732 if ac_fn_c_try_cpp "$LINENO"; then :
5733
5734 else
5735   # Broken: fails on valid input.
5736 continue
5737 fi
5738 rm -f conftest.err conftest.i conftest.$ac_ext
5739
5740   # OK, works on sane cases.  Now check whether nonexistent headers
5741   # can be detected and how.
5742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5743 /* end confdefs.h.  */
5744 #include <ac_nonexistent.h>
5745 _ACEOF
5746 if ac_fn_c_try_cpp "$LINENO"; then :
5747   # Broken: success on invalid input.
5748 continue
5749 else
5750   # Passes both tests.
5751 ac_preproc_ok=:
5752 break
5753 fi
5754 rm -f conftest.err conftest.i conftest.$ac_ext
5755
5756 done
5757 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5758 rm -f conftest.i conftest.err conftest.$ac_ext
5759 if $ac_preproc_ok; then :
5760
5761 else
5762   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5763 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5764 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5765 See \`config.log' for more details" "$LINENO" 5; }
5766 fi
5767
5768 ac_ext=c
5769 ac_cpp='$CPP $CPPFLAGS'
5770 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5771 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5773
5774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5775 printf %s "checking for grep that handles long lines and -e... " >&6; }
5776 if ${ac_cv_path_GREP+:} false; then :
5777   printf %s "(cached) " >&6
5778 else
5779   if test -z "$GREP"; then
5780   ac_path_GREP_found=false
5781   # Loop through the user's path and test for each of PROGNAME-LIST
5782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5783 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5784 do
5785   IFS=$as_save_IFS
5786   case $as_dir in #(((
5787     '') as_dir=./ ;;
5788     */) ;;
5789     *) as_dir=$as_dir/ ;;
5790   esac
5791     for ac_prog in grep ggrep; do
5792     for ac_exec_ext in '' $ac_executable_extensions; do
5793       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5794       as_fn_executable_p "$ac_path_GREP" || continue
5795 # Check for GNU ac_path_GREP and select it if it is found.
5796   # Check for GNU $ac_path_GREP
5797 case `"$ac_path_GREP" --version 2>&1` in
5798 *GNU*)
5799   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5800 *)
5801   ac_count=0
5802   printf %s 0123456789 >"conftest.in"
5803   while :
5804   do
5805     cat "conftest.in" "conftest.in" >"conftest.tmp"
5806     mv "conftest.tmp" "conftest.in"
5807     cp "conftest.in" "conftest.nl"
5808     printf "%s\n" 'GREP' >> "conftest.nl"
5809     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5810     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5811     as_fn_arith $ac_count + 1 && ac_count=$as_val
5812     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5813       # Best one so far, save it but keep looking for a better one
5814       ac_cv_path_GREP="$ac_path_GREP"
5815       ac_path_GREP_max=$ac_count
5816     fi
5817     # 10*(2^10) chars as input seems more than enough
5818     test $ac_count -gt 10 && break
5819   done
5820   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5821 esac
5822
5823       $ac_path_GREP_found && break 3
5824     done
5825   done
5826   done
5827 IFS=$as_save_IFS
5828   if test -z "$ac_cv_path_GREP"; then
5829     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5830   fi
5831 else
5832   ac_cv_path_GREP=$GREP
5833 fi
5834
5835 fi
5836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5837 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5838  GREP="$ac_cv_path_GREP"
5839
5840
5841 if test -n "$ac_tool_prefix"; then
5842   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5843 set dummy ${ac_tool_prefix}nm; ac_word=$2
5844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5845 printf %s "checking for $ac_word... " >&6; }
5846 if ${ac_cv_prog_NM+:} false; then :
5847   printf %s "(cached) " >&6
5848 else
5849   if test -n "$NM"; then
5850   ac_cv_prog_NM="$NM" # Let the user override the test.
5851 else
5852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5853 for as_dir in $PATH
5854 do
5855   IFS=$as_save_IFS
5856   case $as_dir in #(((
5857     '') as_dir=./ ;;
5858     */) ;;
5859     *) as_dir=$as_dir/ ;;
5860   esac
5861     for ac_exec_ext in '' $ac_executable_extensions; do
5862   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5863     ac_cv_prog_NM="${ac_tool_prefix}nm"
5864     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5865     break 2
5866   fi
5867 done
5868   done
5869 IFS=$as_save_IFS
5870
5871 fi
5872 fi
5873 NM=$ac_cv_prog_NM
5874 if test -n "$NM"; then
5875   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5876 printf "%s\n" "$NM" >&6; }
5877 else
5878   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879 printf "%s\n" "no" >&6; }
5880 fi
5881
5882
5883 fi
5884 if test -z "$ac_cv_prog_NM"; then
5885   ac_ct_NM=$NM
5886   # Extract the first word of "nm", so it can be a program name with args.
5887 set dummy nm; ac_word=$2
5888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5889 printf %s "checking for $ac_word... " >&6; }
5890 if ${ac_cv_prog_ac_ct_NM+:} false; then :
5891   printf %s "(cached) " >&6
5892 else
5893   if test -n "$ac_ct_NM"; then
5894   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5895 else
5896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897 for as_dir in $PATH
5898 do
5899   IFS=$as_save_IFS
5900   case $as_dir in #(((
5901     '') as_dir=./ ;;
5902     */) ;;
5903     *) as_dir=$as_dir/ ;;
5904   esac
5905     for ac_exec_ext in '' $ac_executable_extensions; do
5906   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5907     ac_cv_prog_ac_ct_NM="nm"
5908     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5909     break 2
5910   fi
5911 done
5912   done
5913 IFS=$as_save_IFS
5914
5915 fi
5916 fi
5917 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5918 if test -n "$ac_ct_NM"; then
5919   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5920 printf "%s\n" "$ac_ct_NM" >&6; }
5921 else
5922   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923 printf "%s\n" "no" >&6; }
5924 fi
5925
5926   if test "x$ac_ct_NM" = x; then
5927     NM="nm"
5928   else
5929     case $cross_compiling:$ac_tool_warned in
5930 yes:)
5931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5932 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5933 ac_tool_warned=yes ;;
5934 esac
5935     NM=$ac_ct_NM
5936   fi
5937 else
5938   NM="$ac_cv_prog_NM"
5939 fi
5940
5941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5942 printf %s "checking whether ln -s works... " >&6; }
5943 LN_S=$as_ln_s
5944 if test "$LN_S" = "ln -s"; then
5945   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5946 printf "%s\n" "yes" >&6; }
5947 else
5948   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5949 printf "%s\n" "no, using $LN_S" >&6; }
5950 fi
5951
5952 if test -n "$ac_tool_prefix"; then
5953   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5954 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956 printf %s "checking for $ac_word... " >&6; }
5957 if ${ac_cv_prog_RANLIB+:} false; then :
5958   printf %s "(cached) " >&6
5959 else
5960   if test -n "$RANLIB"; then
5961   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5962 else
5963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964 for as_dir in $PATH
5965 do
5966   IFS=$as_save_IFS
5967   case $as_dir in #(((
5968     '') as_dir=./ ;;
5969     */) ;;
5970     *) as_dir=$as_dir/ ;;
5971   esac
5972     for ac_exec_ext in '' $ac_executable_extensions; do
5973   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5974     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5975     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5976     break 2
5977   fi
5978 done
5979   done
5980 IFS=$as_save_IFS
5981
5982 fi
5983 fi
5984 RANLIB=$ac_cv_prog_RANLIB
5985 if test -n "$RANLIB"; then
5986   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5987 printf "%s\n" "$RANLIB" >&6; }
5988 else
5989   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990 printf "%s\n" "no" >&6; }
5991 fi
5992
5993
5994 fi
5995 if test -z "$ac_cv_prog_RANLIB"; then
5996   ac_ct_RANLIB=$RANLIB
5997   # Extract the first word of "ranlib", so it can be a program name with args.
5998 set dummy ranlib; ac_word=$2
5999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000 printf %s "checking for $ac_word... " >&6; }
6001 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6002   printf %s "(cached) " >&6
6003 else
6004   if test -n "$ac_ct_RANLIB"; then
6005   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6006 else
6007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008 for as_dir in $PATH
6009 do
6010   IFS=$as_save_IFS
6011   case $as_dir in #(((
6012     '') as_dir=./ ;;
6013     */) ;;
6014     *) as_dir=$as_dir/ ;;
6015   esac
6016     for ac_exec_ext in '' $ac_executable_extensions; do
6017   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6018     ac_cv_prog_ac_ct_RANLIB="ranlib"
6019     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6020     break 2
6021   fi
6022 done
6023   done
6024 IFS=$as_save_IFS
6025
6026 fi
6027 fi
6028 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6029 if test -n "$ac_ct_RANLIB"; then
6030   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6031 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6032 else
6033   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034 printf "%s\n" "no" >&6; }
6035 fi
6036
6037   if test "x$ac_ct_RANLIB" = x; then
6038     RANLIB=":"
6039   else
6040     case $cross_compiling:$ac_tool_warned in
6041 yes:)
6042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6043 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6044 ac_tool_warned=yes ;;
6045 esac
6046     RANLIB=$ac_ct_RANLIB
6047   fi
6048 else
6049   RANLIB="$ac_cv_prog_RANLIB"
6050 fi
6051
6052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6053 printf %s "checking for a POSIX-compliant shell... " >&6; }
6054    if ${ac_cv_path_shell+:} false; then :
6055   printf %s "(cached) " >&6
6056 else
6057   ac_command='
6058         # Test the noclobber option, using the portable POSIX.2 syntax.
6059         set -C
6060         rm -f conftest.c
6061         >conftest.c || exit
6062         >|conftest.c || exit
6063         !>conftest.c || exit
6064         # Test that $(...) works.
6065         test "$(expr 3 + 4)" -eq 7 || exit
6066       '
6067       ac_cv_path_shell=no
6068
6069       case $SHELL in
6070       /*)
6071         rm -f conftest.c
6072         if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6073           ac_cv_path_shell=$SHELL
6074         fi
6075       esac
6076
6077       case $ac_cv_path_shell in
6078       no)
6079         # Prefer shells that are more likely to be installed in the
6080         # same place on all hosts of this platform.  Therefore, prefer
6081         # shells in /bin and /usr/bin to shells in the installer's
6082         # PATH.  Also, loop through PATH first and then through
6083         # shells, since less-"nice" shells in /bin and /usr/bin are
6084         # more likely to be installed than "nicer" shells elsewhere.
6085         as_save_IFS=$IFS; IFS=:
6086         for as_dir in /bin /usr/bin $PATH
6087         do
6088           IFS=$as_save_IFS
6089           case $as_dir in
6090           /*)
6091             for ac_base in sh bash ksh sh5; do
6092               rm -f conftest.c
6093               if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6094                 ac_cv_path_shell=$as_dir/$ac_base
6095                 break
6096               fi
6097             done
6098             case $ac_cv_path_shell in
6099             /*) break
6100             esac
6101           esac
6102         done
6103         rm -f conftest.c
6104       esac
6105 fi
6106
6107    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6108 printf "%s\n" "$ac_cv_path_shell" >&6; }
6109    SHELL=$ac_cv_path_shell
6110    if test "$SHELL" = no; then
6111      SHELL=/bin/sh
6112      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6113 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6114    fi
6115
6116
6117
6118
6119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6120 printf %s "checking for egrep... " >&6; }
6121 if ${ac_cv_path_EGREP+:} false; then :
6122   printf %s "(cached) " >&6
6123 else
6124   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6125    then ac_cv_path_EGREP="$GREP -E"
6126    else
6127      if test -z "$EGREP"; then
6128   ac_path_EGREP_found=false
6129   # Loop through the user's path and test for each of PROGNAME-LIST
6130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6131 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6132 do
6133   IFS=$as_save_IFS
6134   case $as_dir in #(((
6135     '') as_dir=./ ;;
6136     */) ;;
6137     *) as_dir=$as_dir/ ;;
6138   esac
6139     for ac_prog in egrep; do
6140     for ac_exec_ext in '' $ac_executable_extensions; do
6141       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6142       as_fn_executable_p "$ac_path_EGREP" || continue
6143 # Check for GNU ac_path_EGREP and select it if it is found.
6144   # Check for GNU $ac_path_EGREP
6145 case `"$ac_path_EGREP" --version 2>&1` in
6146 *GNU*)
6147   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6148 *)
6149   ac_count=0
6150   printf %s 0123456789 >"conftest.in"
6151   while :
6152   do
6153     cat "conftest.in" "conftest.in" >"conftest.tmp"
6154     mv "conftest.tmp" "conftest.in"
6155     cp "conftest.in" "conftest.nl"
6156     printf "%s\n" 'EGREP' >> "conftest.nl"
6157     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6158     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6159     as_fn_arith $ac_count + 1 && ac_count=$as_val
6160     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6161       # Best one so far, save it but keep looking for a better one
6162       ac_cv_path_EGREP="$ac_path_EGREP"
6163       ac_path_EGREP_max=$ac_count
6164     fi
6165     # 10*(2^10) chars as input seems more than enough
6166     test $ac_count -gt 10 && break
6167   done
6168   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6169 esac
6170
6171       $ac_path_EGREP_found && break 3
6172     done
6173   done
6174   done
6175 IFS=$as_save_IFS
6176   if test -z "$ac_cv_path_EGREP"; then
6177     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6178   fi
6179 else
6180   ac_cv_path_EGREP=$EGREP
6181 fi
6182
6183    fi
6184 fi
6185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6186 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6187  EGREP="$ac_cv_path_EGREP"
6188
6189
6190
6191
6192   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6193 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6194 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6195   printf %s "(cached) " >&6
6196 else
6197
6198       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6199 /* end confdefs.h.  */
6200
6201 #ifdef __ACK__
6202 Amsterdam
6203 #endif
6204
6205 _ACEOF
6206 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6207   $EGREP "Amsterdam" >/dev/null 2>&1; then :
6208   gl_cv_c_amsterdam_compiler=yes
6209 else
6210   gl_cv_c_amsterdam_compiler=no
6211 fi
6212 rm -rf conftest*
6213
6214
6215 fi
6216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6217 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6218   if test -z "$AR"; then
6219     if test $gl_cv_c_amsterdam_compiler = yes; then
6220       AR='cc -c.a'
6221       if test -z "$ARFLAGS"; then
6222         ARFLAGS='-o'
6223       fi
6224     else
6225                   if test -n "$ac_tool_prefix"; then
6226   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6227 set dummy ${ac_tool_prefix}ar; ac_word=$2
6228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229 printf %s "checking for $ac_word... " >&6; }
6230 if ${ac_cv_prog_AR+:} false; then :
6231   printf %s "(cached) " >&6
6232 else
6233   if test -n "$AR"; then
6234   ac_cv_prog_AR="$AR" # Let the user override the test.
6235 else
6236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237 for as_dir in $PATH
6238 do
6239   IFS=$as_save_IFS
6240   case $as_dir in #(((
6241     '') as_dir=./ ;;
6242     */) ;;
6243     *) as_dir=$as_dir/ ;;
6244   esac
6245     for ac_exec_ext in '' $ac_executable_extensions; do
6246   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6247     ac_cv_prog_AR="${ac_tool_prefix}ar"
6248     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6249     break 2
6250   fi
6251 done
6252   done
6253 IFS=$as_save_IFS
6254
6255 fi
6256 fi
6257 AR=$ac_cv_prog_AR
6258 if test -n "$AR"; then
6259   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6260 printf "%s\n" "$AR" >&6; }
6261 else
6262   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263 printf "%s\n" "no" >&6; }
6264 fi
6265
6266
6267 fi
6268 if test -z "$ac_cv_prog_AR"; then
6269   ac_ct_AR=$AR
6270   # Extract the first word of "ar", so it can be a program name with args.
6271 set dummy ar; ac_word=$2
6272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273 printf %s "checking for $ac_word... " >&6; }
6274 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6275   printf %s "(cached) " >&6
6276 else
6277   if test -n "$ac_ct_AR"; then
6278   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6279 else
6280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281 for as_dir in $PATH
6282 do
6283   IFS=$as_save_IFS
6284   case $as_dir in #(((
6285     '') as_dir=./ ;;
6286     */) ;;
6287     *) as_dir=$as_dir/ ;;
6288   esac
6289     for ac_exec_ext in '' $ac_executable_extensions; do
6290   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6291     ac_cv_prog_ac_ct_AR="ar"
6292     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6293     break 2
6294   fi
6295 done
6296   done
6297 IFS=$as_save_IFS
6298
6299 fi
6300 fi
6301 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6302 if test -n "$ac_ct_AR"; then
6303   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6304 printf "%s\n" "$ac_ct_AR" >&6; }
6305 else
6306   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307 printf "%s\n" "no" >&6; }
6308 fi
6309
6310   if test "x$ac_ct_AR" = x; then
6311     AR="ar"
6312   else
6313     case $cross_compiling:$ac_tool_warned in
6314 yes:)
6315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6316 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6317 ac_tool_warned=yes ;;
6318 esac
6319     AR=$ac_ct_AR
6320   fi
6321 else
6322   AR="$ac_cv_prog_AR"
6323 fi
6324
6325       if test -z "$ARFLAGS"; then
6326         ARFLAGS='cru'
6327       fi
6328     fi
6329   else
6330     if test -z "$ARFLAGS"; then
6331       ARFLAGS='cru'
6332     fi
6333   fi
6334
6335
6336   if test -z "$RANLIB"; then
6337     if test $gl_cv_c_amsterdam_compiler = yes; then
6338       RANLIB=':'
6339     else
6340             if test -n "$ac_tool_prefix"; then
6341   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6342 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6344 printf %s "checking for $ac_word... " >&6; }
6345 if ${ac_cv_prog_RANLIB+:} false; then :
6346   printf %s "(cached) " >&6
6347 else
6348   if test -n "$RANLIB"; then
6349   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6350 else
6351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6352 for as_dir in $PATH
6353 do
6354   IFS=$as_save_IFS
6355   case $as_dir in #(((
6356     '') as_dir=./ ;;
6357     */) ;;
6358     *) as_dir=$as_dir/ ;;
6359   esac
6360     for ac_exec_ext in '' $ac_executable_extensions; do
6361   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6362     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6363     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6364     break 2
6365   fi
6366 done
6367   done
6368 IFS=$as_save_IFS
6369
6370 fi
6371 fi
6372 RANLIB=$ac_cv_prog_RANLIB
6373 if test -n "$RANLIB"; then
6374   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6375 printf "%s\n" "$RANLIB" >&6; }
6376 else
6377   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378 printf "%s\n" "no" >&6; }
6379 fi
6380
6381
6382 fi
6383 if test -z "$ac_cv_prog_RANLIB"; then
6384   ac_ct_RANLIB=$RANLIB
6385   # Extract the first word of "ranlib", so it can be a program name with args.
6386 set dummy ranlib; ac_word=$2
6387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6388 printf %s "checking for $ac_word... " >&6; }
6389 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6390   printf %s "(cached) " >&6
6391 else
6392   if test -n "$ac_ct_RANLIB"; then
6393   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6394 else
6395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396 for as_dir in $PATH
6397 do
6398   IFS=$as_save_IFS
6399   case $as_dir in #(((
6400     '') as_dir=./ ;;
6401     */) ;;
6402     *) as_dir=$as_dir/ ;;
6403   esac
6404     for ac_exec_ext in '' $ac_executable_extensions; do
6405   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6406     ac_cv_prog_ac_ct_RANLIB="ranlib"
6407     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6408     break 2
6409   fi
6410 done
6411   done
6412 IFS=$as_save_IFS
6413
6414 fi
6415 fi
6416 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6417 if test -n "$ac_ct_RANLIB"; then
6418   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6419 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6420 else
6421   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422 printf "%s\n" "no" >&6; }
6423 fi
6424
6425   if test "x$ac_ct_RANLIB" = x; then
6426     RANLIB=":"
6427   else
6428     case $cross_compiling:$ac_tool_warned in
6429 yes:)
6430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6431 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6432 ac_tool_warned=yes ;;
6433 esac
6434     RANLIB=$ac_ct_RANLIB
6435   fi
6436 else
6437   RANLIB="$ac_cv_prog_RANLIB"
6438 fi
6439
6440     fi
6441   fi
6442
6443
6444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6445 printf %s "checking for ANSI C header files... " >&6; }
6446 if ${ac_cv_header_stdc+:} false; then :
6447   printf %s "(cached) " >&6
6448 else
6449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450 /* end confdefs.h.  */
6451 #include <stdlib.h>
6452 #include <stdarg.h>
6453 #include <string.h>
6454 #include <float.h>
6455
6456 int
6457 main ()
6458 {
6459
6460   ;
6461   return 0;
6462 }
6463 _ACEOF
6464 if ac_fn_c_try_compile "$LINENO"; then :
6465   ac_cv_header_stdc=yes
6466 else
6467   ac_cv_header_stdc=no
6468 fi
6469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6470
6471 if test $ac_cv_header_stdc = yes; then
6472   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6474 /* end confdefs.h.  */
6475 #include <string.h>
6476
6477 _ACEOF
6478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6479   $EGREP "memchr" >/dev/null 2>&1; then :
6480
6481 else
6482   ac_cv_header_stdc=no
6483 fi
6484 rm -rf conftest*
6485
6486 fi
6487
6488 if test $ac_cv_header_stdc = yes; then
6489   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6491 /* end confdefs.h.  */
6492 #include <stdlib.h>
6493
6494 _ACEOF
6495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6496   $EGREP "free" >/dev/null 2>&1; then :
6497
6498 else
6499   ac_cv_header_stdc=no
6500 fi
6501 rm -rf conftest*
6502
6503 fi
6504
6505 if test $ac_cv_header_stdc = yes; then
6506   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6507   if test "$cross_compiling" = yes; then :
6508   :
6509 else
6510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511 /* end confdefs.h.  */
6512 #include <ctype.h>
6513 #include <stdlib.h>
6514 #if ((' ' & 0x0FF) == 0x020)
6515 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6516 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6517 #else
6518 # define ISLOWER(c) \
6519                    (('a' <= (c) && (c) <= 'i') \
6520                      || ('j' <= (c) && (c) <= 'r') \
6521                      || ('s' <= (c) && (c) <= 'z'))
6522 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6523 #endif
6524
6525 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6526 int
6527 main ()
6528 {
6529   int i;
6530   for (i = 0; i < 256; i++)
6531     if (XOR (islower (i), ISLOWER (i))
6532         || toupper (i) != TOUPPER (i))
6533       return 2;
6534   return 0;
6535 }
6536 _ACEOF
6537 if ac_fn_c_try_run "$LINENO"; then :
6538
6539 else
6540   ac_cv_header_stdc=no
6541 fi
6542 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6543   conftest.$ac_objext conftest.beam conftest.$ac_ext
6544 fi
6545
6546 fi
6547 fi
6548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6549 printf "%s\n" "$ac_cv_header_stdc" >&6; }
6550 if test $ac_cv_header_stdc = yes; then
6551
6552 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6553
6554 fi
6555
6556 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6557 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6558                   inttypes.h stdint.h unistd.h
6559 do :
6560   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
6561 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6562 "
6563 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6564   cat >>confdefs.h <<_ACEOF
6565 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
6566 _ACEOF
6567
6568 fi
6569
6570 done
6571
6572
6573
6574   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6575 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6576   MINIX=yes
6577 else
6578   MINIX=
6579 fi
6580
6581
6582   if test "$MINIX" = yes; then
6583
6584 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6585
6586
6587 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6588
6589
6590 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6591
6592
6593 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6594
6595   fi
6596
6597
6598   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6599 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6600 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6601   printf %s "(cached) " >&6
6602 else
6603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6604 /* end confdefs.h.  */
6605
6606 #         define __EXTENSIONS__ 1
6607           $ac_includes_default
6608 int
6609 main ()
6610 {
6611
6612   ;
6613   return 0;
6614 }
6615 _ACEOF
6616 if ac_fn_c_try_compile "$LINENO"; then :
6617   ac_cv_safe_to_define___extensions__=yes
6618 else
6619   ac_cv_safe_to_define___extensions__=no
6620 fi
6621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6622 fi
6623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6624 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6625   test $ac_cv_safe_to_define___extensions__ = yes &&
6626     printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6627
6628   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6629
6630   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6631
6632   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6633
6634   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6635
6636   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6637
6638   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6639 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6640 if ${ac_cv_should_define__xopen_source+:} false; then :
6641   printf %s "(cached) " >&6
6642 else
6643   ac_cv_should_define__xopen_source=no
6644      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6645 /* end confdefs.h.  */
6646
6647           #include <wchar.h>
6648           mbstate_t x;
6649 int
6650 main ()
6651 {
6652
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 if ac_fn_c_try_compile "$LINENO"; then :
6658
6659 else
6660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6661 /* end confdefs.h.  */
6662
6663              #define _XOPEN_SOURCE 500
6664              #include <wchar.h>
6665              mbstate_t x;
6666 int
6667 main ()
6668 {
6669
6670   ;
6671   return 0;
6672 }
6673 _ACEOF
6674 if ac_fn_c_try_compile "$LINENO"; then :
6675   ac_cv_should_define__xopen_source=yes
6676 fi
6677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6678 fi
6679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6680 fi
6681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6682 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6683   test $ac_cv_should_define__xopen_source = yes &&
6684     printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6685
6686
6687
6688
6689
6690
6691
6692
6693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6694 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6695 if ${ac_cv_sys_largefile_source+:} false; then :
6696   printf %s "(cached) " >&6
6697 else
6698   while :; do
6699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700 /* end confdefs.h.  */
6701 #include <sys/types.h> /* for off_t */
6702      #include <stdio.h>
6703 int
6704 main ()
6705 {
6706 int (*fp) (FILE *, off_t, int) = fseeko;
6707      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6708   ;
6709   return 0;
6710 }
6711 _ACEOF
6712 if ac_fn_c_try_link "$LINENO"; then :
6713   ac_cv_sys_largefile_source=no; break
6714 fi
6715 rm -f core conftest.err conftest.$ac_objext \
6716     conftest$ac_exeext conftest.$ac_ext
6717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h.  */
6719 #define _LARGEFILE_SOURCE 1
6720 #include <sys/types.h> /* for off_t */
6721      #include <stdio.h>
6722 int
6723 main ()
6724 {
6725 int (*fp) (FILE *, off_t, int) = fseeko;
6726      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6727   ;
6728   return 0;
6729 }
6730 _ACEOF
6731 if ac_fn_c_try_link "$LINENO"; then :
6732   ac_cv_sys_largefile_source=1; break
6733 fi
6734 rm -f core conftest.err conftest.$ac_objext \
6735     conftest$ac_exeext conftest.$ac_ext
6736   ac_cv_sys_largefile_source=unknown
6737   break
6738 done
6739 fi
6740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6741 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6742 case $ac_cv_sys_largefile_source in #(
6743   no | unknown) ;;
6744   *)
6745 cat >>confdefs.h <<_ACEOF
6746 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6747 _ACEOF
6748 ;;
6749 esac
6750 rm -rf conftest*
6751
6752 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6753 # in glibc 2.1.3, but that breaks too many other things.
6754 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6755 if test $ac_cv_sys_largefile_source != unknown; then
6756
6757 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
6758
6759 fi
6760
6761 # Make sure we can run config.sub.
6762 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6763   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6764
6765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6766 printf %s "checking build system type... " >&6; }
6767 if ${ac_cv_build+:} false; then :
6768   printf %s "(cached) " >&6
6769 else
6770   ac_build_alias=$build_alias
6771 test "x$ac_build_alias" = x &&
6772   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6773 test "x$ac_build_alias" = x &&
6774   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6775 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6776   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6777
6778 fi
6779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6780 printf "%s\n" "$ac_cv_build" >&6; }
6781 case $ac_cv_build in
6782 *-*-*) ;;
6783 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6784 esac
6785 build=$ac_cv_build
6786 ac_save_IFS=$IFS; IFS='-'
6787 set x $ac_cv_build
6788 shift
6789 build_cpu=$1
6790 build_vendor=$2
6791 shift; shift
6792 # Remember, the first character of IFS is used to create $*,
6793 # except with old shells:
6794 build_os=$*
6795 IFS=$ac_save_IFS
6796 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6797
6798
6799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6800 printf %s "checking host system type... " >&6; }
6801 if ${ac_cv_host+:} false; then :
6802   printf %s "(cached) " >&6
6803 else
6804   if test "x$host_alias" = x; then
6805   ac_cv_host=$ac_cv_build
6806 else
6807   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6808     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6809 fi
6810
6811 fi
6812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6813 printf "%s\n" "$ac_cv_host" >&6; }
6814 case $ac_cv_host in
6815 *-*-*) ;;
6816 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6817 esac
6818 host=$ac_cv_host
6819 ac_save_IFS=$IFS; IFS='-'
6820 set x $ac_cv_host
6821 shift
6822 host_cpu=$1
6823 host_vendor=$2
6824 shift; shift
6825 # Remember, the first character of IFS is used to create $*,
6826 # except with old shells:
6827 host_os=$*
6828 IFS=$ac_save_IFS
6829 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6830
6831
6832
6833
6834
6835   # IEEE behaviour is the default on all CPUs except Alpha and SH
6836   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6837   # and the GCC 4.1.2 manual).
6838   case "$host_cpu" in
6839     alpha*)
6840       # On Alpha systems, a compiler option provides the behaviour.
6841       # See the ieee(3) manual page, also available at
6842       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6843       if test -n "$GCC"; then
6844         # GCC has the option -mieee.
6845         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6846         CPPFLAGS="$CPPFLAGS -mieee"
6847       else
6848         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6849         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6850         CPPFLAGS="$CPPFLAGS -ieee"
6851       fi
6852       ;;
6853     sh*)
6854       if test -n "$GCC"; then
6855         # GCC has the option -mieee.
6856         CPPFLAGS="$CPPFLAGS -mieee"
6857       fi
6858       ;;
6859   esac
6860
6861 # Check whether --enable-largefile was given.
6862 if test "${enable_largefile+set}" = set; then :
6863   enableval=$enable_largefile;
6864 fi
6865
6866 if test "$enable_largefile" != no; then
6867
6868   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6869 printf %s "checking for special C compiler options needed for large files... " >&6; }
6870 if ${ac_cv_sys_largefile_CC+:} false; then :
6871   printf %s "(cached) " >&6
6872 else
6873   ac_cv_sys_largefile_CC=no
6874      if test "$GCC" != yes; then
6875        ac_save_CC=$CC
6876        while :; do
6877          # IRIX 6.2 and later do not support large files by default,
6878          # so use the C compiler's -n32 option if that helps.
6879          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880 /* end confdefs.h.  */
6881 #include <sys/types.h>
6882  /* Check that off_t can represent 2**63 - 1 correctly.
6883     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6884     since some C++ compilers masquerading as C compilers
6885     incorrectly reject 9223372036854775807.  */
6886 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6887   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6888                        && LARGE_OFF_T % 2147483647 == 1)
6889                       ? 1 : -1];
6890 int
6891 main ()
6892 {
6893
6894   ;
6895   return 0;
6896 }
6897 _ACEOF
6898          if ac_fn_c_try_compile "$LINENO"; then :
6899   break
6900 fi
6901 rm -f core conftest.err conftest.$ac_objext
6902          CC="$CC -n32"
6903          if ac_fn_c_try_compile "$LINENO"; then :
6904   ac_cv_sys_largefile_CC=' -n32'; break
6905 fi
6906 rm -f core conftest.err conftest.$ac_objext
6907          break
6908        done
6909        CC=$ac_save_CC
6910        rm -f conftest.$ac_ext
6911     fi
6912 fi
6913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6914 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
6915   if test "$ac_cv_sys_largefile_CC" != no; then
6916     CC=$CC$ac_cv_sys_largefile_CC
6917   fi
6918
6919   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6920 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6921 if ${ac_cv_sys_file_offset_bits+:} false; then :
6922   printf %s "(cached) " >&6
6923 else
6924   while :; do
6925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6926 /* end confdefs.h.  */
6927 #include <sys/types.h>
6928  /* Check that off_t can represent 2**63 - 1 correctly.
6929     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6930     since some C++ compilers masquerading as C compilers
6931     incorrectly reject 9223372036854775807.  */
6932 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6933   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6934                        && LARGE_OFF_T % 2147483647 == 1)
6935                       ? 1 : -1];
6936 int
6937 main ()
6938 {
6939
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 if ac_fn_c_try_compile "$LINENO"; then :
6945   ac_cv_sys_file_offset_bits=no; break
6946 fi
6947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949 /* end confdefs.h.  */
6950 #define _FILE_OFFSET_BITS 64
6951 #include <sys/types.h>
6952  /* Check that off_t can represent 2**63 - 1 correctly.
6953     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6954     since some C++ compilers masquerading as C compilers
6955     incorrectly reject 9223372036854775807.  */
6956 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6957   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6958                        && LARGE_OFF_T % 2147483647 == 1)
6959                       ? 1 : -1];
6960 int
6961 main ()
6962 {
6963
6964   ;
6965   return 0;
6966 }
6967 _ACEOF
6968 if ac_fn_c_try_compile "$LINENO"; then :
6969   ac_cv_sys_file_offset_bits=64; break
6970 fi
6971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6972   ac_cv_sys_file_offset_bits=unknown
6973   break
6974 done
6975 fi
6976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6977 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
6978 case $ac_cv_sys_file_offset_bits in #(
6979   no | unknown) ;;
6980   *)
6981 cat >>confdefs.h <<_ACEOF
6982 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6983 _ACEOF
6984 ;;
6985 esac
6986 rm -rf conftest*
6987   if test $ac_cv_sys_file_offset_bits = unknown; then
6988     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6989 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
6990 if ${ac_cv_sys_large_files+:} false; then :
6991   printf %s "(cached) " >&6
6992 else
6993   while :; do
6994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995 /* end confdefs.h.  */
6996 #include <sys/types.h>
6997  /* Check that off_t can represent 2**63 - 1 correctly.
6998     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6999     since some C++ compilers masquerading as C compilers
7000     incorrectly reject 9223372036854775807.  */
7001 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7002   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7003                        && LARGE_OFF_T % 2147483647 == 1)
7004                       ? 1 : -1];
7005 int
7006 main ()
7007 {
7008
7009   ;
7010   return 0;
7011 }
7012 _ACEOF
7013 if ac_fn_c_try_compile "$LINENO"; then :
7014   ac_cv_sys_large_files=no; break
7015 fi
7016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h.  */
7019 #define _LARGE_FILES 1
7020 #include <sys/types.h>
7021  /* Check that off_t can represent 2**63 - 1 correctly.
7022     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7023     since some C++ compilers masquerading as C compilers
7024     incorrectly reject 9223372036854775807.  */
7025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7026   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7027                        && LARGE_OFF_T % 2147483647 == 1)
7028                       ? 1 : -1];
7029 int
7030 main ()
7031 {
7032
7033   ;
7034   return 0;
7035 }
7036 _ACEOF
7037 if ac_fn_c_try_compile "$LINENO"; then :
7038   ac_cv_sys_large_files=1; break
7039 fi
7040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7041   ac_cv_sys_large_files=unknown
7042   break
7043 done
7044 fi
7045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7046 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7047 case $ac_cv_sys_large_files in #(
7048   no | unknown) ;;
7049   *)
7050 cat >>confdefs.h <<_ACEOF
7051 #define _LARGE_FILES $ac_cv_sys_large_files
7052 _ACEOF
7053 ;;
7054 esac
7055 rm -rf conftest*
7056   fi
7057
7058
7059 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7060
7061 fi
7062
7063
7064
7065
7066
7067
7068   # Check whether --enable-threads was given.
7069 if test "${enable_threads+set}" = set; then :
7070   enableval=$enable_threads; gl_use_threads=$enableval
7071 else
7072   if test -n "$gl_use_threads_default"; then
7073        gl_use_threads="$gl_use_threads_default"
7074      else
7075        case "$host_os" in
7076                                                                osf*) gl_use_threads=no ;;
7077          cygwin*)
7078                case `uname -r` in
7079                  1.[0-5].*) gl_use_threads=no ;;
7080                  *)         gl_use_threads=yes ;;
7081                esac
7082                ;;
7083          *)    gl_use_threads=yes ;;
7084        esac
7085      fi
7086
7087 fi
7088
7089   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7090     # For using <pthread.h>:
7091     case "$host_os" in
7092       osf*)
7093         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7094         # groks <pthread.h>. cc also understands the flag -pthread, but
7095         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7096         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7097         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7098         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7099         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7100         ;;
7101     esac
7102     # Some systems optimize for single-threaded programs by default, and
7103     # need special flags to disable these optimizations. For example, the
7104     # definition of 'errno' in <errno.h>.
7105     case "$host_os" in
7106       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7107       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7108     esac
7109   fi
7110
7111
7112
7113
7114   # Code from module alloca-opt:
7115   # Code from module announce-gen:
7116   # Code from module at-internal:
7117   # Code from module c-ctype:
7118   # Code from module c-strcase:
7119   # Code from module c-strcaseeq:
7120   # Code from module calloc:
7121   # Code from module calloc-gnu:
7122   # Code from module calloc-posix:
7123   # Code from module chdir:
7124   # Code from module chdir-long:
7125   # Code from module clock-time:
7126   # Code from module cloexec:
7127   # Code from module close:
7128   # Code from module close-stream:
7129   # Code from module closedir:
7130   # Code from module closein:
7131   # Code from module closeout:
7132   # Code from module configmake:
7133   # Code from module dirent:
7134   # Code from module dirent-safer:
7135   # Code from module dirfd:
7136   # Code from module dirname-lgpl:
7137   # Code from module do-release-commit-and-tag:
7138   # Code from module dosname:
7139   # Code from module double-slash-root:
7140   # Code from module dup:
7141   # Code from module dup2:
7142   # Code from module errno:
7143   # Code from module error:
7144   # Code from module exitfail:
7145   # Code from module extensions:
7146
7147   # Code from module extern-inline:
7148   # Code from module fchdir:
7149   # Code from module fclose:
7150   # Code from module fcntl:
7151   # Code from module fcntl-h:
7152   # Code from module fcntl-safer:
7153   # Code from module fd-hook:
7154   # Code from module fdl:
7155   # Code from module fdopendir:
7156   # Code from module fflush:
7157
7158   # Code from module filename:
7159   # Code from module filenamecat-lgpl:
7160   # Code from module float:
7161   # Code from module fpending:
7162   # Code from module fpieee:
7163
7164   # Code from module fprintf-posix:
7165   # Code from module fpucw:
7166   # Code from module fpurge:
7167   # Code from module freadahead:
7168   # Code from module freading:
7169   # Code from module frexp-nolibm:
7170   # Code from module frexpl-nolibm:
7171   # Code from module fseek:
7172   # Code from module fseeko:
7173
7174   # Code from module fseterr:
7175   # Code from module fstat:
7176   # Code from module ftell:
7177   # Code from module ftello:
7178
7179   # Code from module gendocs:
7180   # Code from module getcwd-lgpl:
7181   # Code from module getdtablesize:
7182   # Code from module getopt-gnu:
7183   # Code from module getopt-posix:
7184   # Code from module gettext-h:
7185   # Code from module gettime:
7186   # Code from module gettimeofday:
7187   # Code from module git-version-gen:
7188   # Code from module gitlog-to-changelog:
7189   # Code from module gnu-make:
7190   # Code from module gnu-web-doc-update:
7191   # Code from module gnumakefile:
7192   # Code from module gnupload:
7193   # Code from module havelib:
7194   # Code from module ignore-value:
7195   # Code from module include_next:
7196   # Code from module intprops:
7197   # Code from module isnand-nolibm:
7198   # Code from module isnanf-nolibm:
7199   # Code from module isnanl-nolibm:
7200   # Code from module largefile:
7201
7202   # Code from module lib-ignore:
7203   # Code from module localcharset:
7204   # Code from module lock:
7205   # Code from module lseek:
7206   # Code from module lstat:
7207   # Code from module maintainer-makefile:
7208   # Code from module malloc-gnu:
7209   # Code from module malloc-posix:
7210   # Code from module manywarnings:
7211   # Code from module math:
7212   # Code from module mbrtowc:
7213   # Code from module mbsinit:
7214   # Code from module memchr:
7215   # Code from module mempcpy:
7216   # Code from module memrchr:
7217   # Code from module msvc-inval:
7218   # Code from module msvc-nothrow:
7219   # Code from module multiarch:
7220   # Code from module nocrash:
7221   # Code from module open:
7222   # Code from module openat:
7223   # Code from module openat-die:
7224   # Code from module openat-h:
7225   # Code from module opendir:
7226   # Code from module pathmax:
7227   # Code from module perror:
7228   # Code from module printf-frexp:
7229   # Code from module printf-frexpl:
7230   # Code from module printf-posix:
7231   # Code from module printf-safe:
7232   # Code from module quotearg:
7233   # Code from module quotearg-simple:
7234   # Code from module readdir:
7235   # Code from module readme-release:
7236   # Code from module realloc-gnu:
7237   # Code from module realloc-posix:
7238   # Code from module save-cwd:
7239   # Code from module savedir:
7240   # Code from module signbit:
7241   # Code from module size_max:
7242   # Code from module snippet/_Noreturn:
7243   # Code from module snippet/arg-nonnull:
7244   # Code from module snippet/c++defs:
7245   # Code from module snippet/unused-parameter:
7246   # Code from module snippet/warn-on-use:
7247   # Code from module ssize_t:
7248   # Code from module stat:
7249   # Code from module stat-time:
7250   # Code from module stdbool:
7251   # Code from module stddef:
7252   # Code from module stdint:
7253   # Code from module stdio:
7254   # Code from module stdlib:
7255   # Code from module strdup-posix:
7256   # Code from module streq:
7257   # Code from module strerror:
7258   # Code from module strerror-override:
7259   # Code from module strerror_r-posix:
7260   # Code from module string:
7261   # Code from module sys_stat:
7262   # Code from module sys_time:
7263   # Code from module sys_types:
7264   # Code from module threadlib:
7265
7266
7267
7268   # Code from module time:
7269   # Code from module timespec:
7270   # Code from module unistd:
7271   # Code from module unistd-safer:
7272   # Code from module update-copyright:
7273   # Code from module useless-if-before-free:
7274   # Code from module utimens:
7275   # Code from module vasnprintf:
7276   # Code from module vc-list-files:
7277   # Code from module verify:
7278   # Code from module vfprintf-posix:
7279   # Code from module warnings:
7280   # Code from module wchar:
7281   # Code from module wctype-h:
7282   # Code from module xalloc:
7283   # Code from module xalloc-die:
7284   # Code from module xalloc-oversized:
7285   # Code from module xsize:
7286   # Code from module yesno:
7287
7288
7289
7290
7291
7292
7293
7294           LIBC_FATAL_STDERR_=1
7295   export LIBC_FATAL_STDERR_
7296
7297 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7298 if test "x$ac_cv_type_size_t" = xyes; then :
7299
7300 else
7301
7302 cat >>confdefs.h <<_ACEOF
7303 #define size_t unsigned int
7304 _ACEOF
7305
7306 fi
7307
7308 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7309 # for constant arguments.  Useless!
7310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7311 printf %s "checking for working alloca.h... " >&6; }
7312 if ${ac_cv_working_alloca_h+:} false; then :
7313   printf %s "(cached) " >&6
7314 else
7315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7316 /* end confdefs.h.  */
7317 #include <alloca.h>
7318 int
7319 main ()
7320 {
7321 char *p = (char *) alloca (2 * sizeof (int));
7322                           if (p) return 0;
7323   ;
7324   return 0;
7325 }
7326 _ACEOF
7327 if ac_fn_c_try_link "$LINENO"; then :
7328   ac_cv_working_alloca_h=yes
7329 else
7330   ac_cv_working_alloca_h=no
7331 fi
7332 rm -f core conftest.err conftest.$ac_objext \
7333     conftest$ac_exeext conftest.$ac_ext
7334 fi
7335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7336 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7337 if test $ac_cv_working_alloca_h = yes; then
7338
7339 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7340
7341 fi
7342
7343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7344 printf %s "checking for alloca... " >&6; }
7345 if ${ac_cv_func_alloca_works+:} false; then :
7346   printf %s "(cached) " >&6
7347 else
7348   if test $ac_cv_working_alloca_h = yes; then
7349   ac_cv_func_alloca_works=yes
7350 else
7351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7352 /* end confdefs.h.  */
7353 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
7354 # include <stdlib.h>
7355 #endif
7356 #include <stddef.h>
7357 #ifndef alloca
7358 # ifdef __GNUC__
7359 #  define alloca __builtin_alloca
7360 # elif defined _MSC_VER
7361 #  include <malloc.h>
7362 #  define alloca _alloca
7363 # else
7364 #  ifdef  __cplusplus
7365 extern "C"
7366 #  endif
7367 void *alloca (size_t);
7368 # endif
7369 #endif
7370
7371 int
7372 main ()
7373 {
7374 char *p = (char *) alloca (1);
7375                                     if (p) return 0;
7376   ;
7377   return 0;
7378 }
7379 _ACEOF
7380 if ac_fn_c_try_link "$LINENO"; then :
7381   ac_cv_func_alloca_works=yes
7382 else
7383   ac_cv_func_alloca_works=no
7384 fi
7385 rm -f core conftest.err conftest.$ac_objext \
7386     conftest$ac_exeext conftest.$ac_ext
7387 fi
7388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7389 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7390 fi
7391
7392 if test $ac_cv_func_alloca_works = yes; then
7393
7394 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7395
7396 else
7397   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7398 # that cause trouble.  Some versions do not even contain alloca or
7399 # contain a buggy version.  If you still want to use their alloca,
7400 # use ar to extract alloca.o from them instead of compiling alloca.c.
7401
7402
7403
7404
7405
7406 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7407
7408 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7409
7410
7411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7412 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7413 if ${ac_cv_os_cray+:} false; then :
7414   printf %s "(cached) " >&6
7415 else
7416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417 /* end confdefs.h.  */
7418 #if defined CRAY && ! defined CRAY2
7419 webecray
7420 #else
7421 wenotbecray
7422 #endif
7423
7424 _ACEOF
7425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7426   $EGREP "webecray" >/dev/null 2>&1; then :
7427   ac_cv_os_cray=yes
7428 else
7429   ac_cv_os_cray=no
7430 fi
7431 rm -rf conftest*
7432
7433 fi
7434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7435 printf "%s\n" "$ac_cv_os_cray" >&6; }
7436 if test $ac_cv_os_cray = yes; then
7437   for ac_func in _getb67 GETB67 getb67; do
7438     as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7439 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7440 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7441
7442 cat >>confdefs.h <<_ACEOF
7443 #define CRAY_STACKSEG_END $ac_func
7444 _ACEOF
7445
7446     break
7447 fi
7448
7449   done
7450 fi
7451
7452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7453 printf %s "checking stack direction for C alloca... " >&6; }
7454 if ${ac_cv_c_stack_direction+:} false; then :
7455   printf %s "(cached) " >&6
7456 else
7457   if test "$cross_compiling" = yes; then :
7458   ac_cv_c_stack_direction=0
7459 else
7460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7461 /* end confdefs.h.  */
7462 $ac_includes_default
7463 int
7464 find_stack_direction (int *addr, int depth)
7465 {
7466   int dir, dummy = 0;
7467   if (! addr)
7468     addr = &dummy;
7469   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7470   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7471   return dir + dummy;
7472 }
7473
7474 int
7475 main (int argc, char **argv)
7476 {
7477   return find_stack_direction (0, argc + !argv + 20) < 0;
7478 }
7479 _ACEOF
7480 if ac_fn_c_try_run "$LINENO"; then :
7481   ac_cv_c_stack_direction=1
7482 else
7483   ac_cv_c_stack_direction=-1
7484 fi
7485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7486   conftest.$ac_objext conftest.beam conftest.$ac_ext
7487 fi
7488
7489 fi
7490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7491 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7492 cat >>confdefs.h <<_ACEOF
7493 #define STACK_DIRECTION $ac_cv_c_stack_direction
7494 _ACEOF
7495
7496
7497 fi
7498
7499
7500   GNULIB__EXIT=0;
7501   GNULIB_ATOLL=0;
7502   GNULIB_CALLOC_POSIX=0;
7503   GNULIB_CANONICALIZE_FILE_NAME=0;
7504   GNULIB_GETLOADAVG=0;
7505   GNULIB_GETSUBOPT=0;
7506   GNULIB_GRANTPT=0;
7507   GNULIB_MALLOC_POSIX=0;
7508   GNULIB_MBTOWC=0;
7509   GNULIB_MKDTEMP=0;
7510   GNULIB_MKOSTEMP=0;
7511   GNULIB_MKOSTEMPS=0;
7512   GNULIB_MKSTEMP=0;
7513   GNULIB_MKSTEMPS=0;
7514   GNULIB_POSIX_OPENPT=0;
7515   GNULIB_PTSNAME=0;
7516   GNULIB_PTSNAME_R=0;
7517   GNULIB_PUTENV=0;
7518   GNULIB_RANDOM=0;
7519   GNULIB_RANDOM_R=0;
7520   GNULIB_REALLOC_POSIX=0;
7521   GNULIB_REALPATH=0;
7522   GNULIB_RPMATCH=0;
7523   GNULIB_SECURE_GETENV=0;
7524   GNULIB_SETENV=0;
7525   GNULIB_STRTOD=0;
7526   GNULIB_STRTOLL=0;
7527   GNULIB_STRTOULL=0;
7528   GNULIB_SYSTEM_POSIX=0;
7529   GNULIB_UNLOCKPT=0;
7530   GNULIB_UNSETENV=0;
7531   GNULIB_WCTOMB=0;
7532     HAVE__EXIT=1;
7533   HAVE_ATOLL=1;
7534   HAVE_CANONICALIZE_FILE_NAME=1;
7535   HAVE_DECL_GETLOADAVG=1;
7536   HAVE_GETSUBOPT=1;
7537   HAVE_GRANTPT=1;
7538   HAVE_MKDTEMP=1;
7539   HAVE_MKOSTEMP=1;
7540   HAVE_MKOSTEMPS=1;
7541   HAVE_MKSTEMP=1;
7542   HAVE_MKSTEMPS=1;
7543   HAVE_POSIX_OPENPT=1;
7544   HAVE_PTSNAME=1;
7545   HAVE_PTSNAME_R=1;
7546   HAVE_RANDOM=1;
7547   HAVE_RANDOM_H=1;
7548   HAVE_RANDOM_R=1;
7549   HAVE_REALPATH=1;
7550   HAVE_RPMATCH=1;
7551   HAVE_SECURE_GETENV=1;
7552   HAVE_SETENV=1;
7553   HAVE_DECL_SETENV=1;
7554   HAVE_STRTOD=1;
7555   HAVE_STRTOLL=1;
7556   HAVE_STRTOULL=1;
7557   HAVE_STRUCT_RANDOM_DATA=1;
7558   HAVE_SYS_LOADAVG_H=0;
7559   HAVE_UNLOCKPT=1;
7560   HAVE_DECL_UNSETENV=1;
7561   REPLACE_CALLOC=0;
7562   REPLACE_CANONICALIZE_FILE_NAME=0;
7563   REPLACE_MALLOC=0;
7564   REPLACE_MBTOWC=0;
7565   REPLACE_MKSTEMP=0;
7566   REPLACE_PTSNAME=0;
7567   REPLACE_PTSNAME_R=0;
7568   REPLACE_PUTENV=0;
7569   REPLACE_RANDOM_R=0;
7570   REPLACE_REALLOC=0;
7571   REPLACE_REALPATH=0;
7572   REPLACE_SETENV=0;
7573   REPLACE_STRTOD=0;
7574   REPLACE_UNSETENV=0;
7575   REPLACE_WCTOMB=0;
7576
7577
7578   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7579 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7580 if ${gl_cv_func_malloc_posix+:} false; then :
7581   printf %s "(cached) " >&6
7582 else
7583
7584                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7585 /* end confdefs.h.  */
7586
7587 int
7588 main ()
7589 {
7590 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7591              choke me
7592              #endif
7593
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 if ac_fn_c_try_compile "$LINENO"; then :
7599   gl_cv_func_malloc_posix=yes
7600 else
7601   gl_cv_func_malloc_posix=no
7602 fi
7603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7604
7605 fi
7606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7607 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7608
7609
7610   GNULIB_CHDIR=0;
7611   GNULIB_CHOWN=0;
7612   GNULIB_CLOSE=0;
7613   GNULIB_DUP=0;
7614   GNULIB_DUP2=0;
7615   GNULIB_DUP3=0;
7616   GNULIB_ENVIRON=0;
7617   GNULIB_EUIDACCESS=0;
7618   GNULIB_FACCESSAT=0;
7619   GNULIB_FCHDIR=0;
7620   GNULIB_FCHOWNAT=0;
7621   GNULIB_FDATASYNC=0;
7622   GNULIB_FSYNC=0;
7623   GNULIB_FTRUNCATE=0;
7624   GNULIB_GETCWD=0;
7625   GNULIB_GETDOMAINNAME=0;
7626   GNULIB_GETDTABLESIZE=0;
7627   GNULIB_GETGROUPS=0;
7628   GNULIB_GETHOSTNAME=0;
7629   GNULIB_GETLOGIN=0;
7630   GNULIB_GETLOGIN_R=0;
7631   GNULIB_GETPAGESIZE=0;
7632   GNULIB_GETUSERSHELL=0;
7633   GNULIB_GROUP_MEMBER=0;
7634   GNULIB_ISATTY=0;
7635   GNULIB_LCHOWN=0;
7636   GNULIB_LINK=0;
7637   GNULIB_LINKAT=0;
7638   GNULIB_LSEEK=0;
7639   GNULIB_PIPE=0;
7640   GNULIB_PIPE2=0;
7641   GNULIB_PREAD=0;
7642   GNULIB_PWRITE=0;
7643   GNULIB_READ=0;
7644   GNULIB_READLINK=0;
7645   GNULIB_READLINKAT=0;
7646   GNULIB_RMDIR=0;
7647   GNULIB_SETHOSTNAME=0;
7648   GNULIB_SLEEP=0;
7649   GNULIB_SYMLINK=0;
7650   GNULIB_SYMLINKAT=0;
7651   GNULIB_TTYNAME_R=0;
7652   GNULIB_UNISTD_H_NONBLOCKING=0;
7653   GNULIB_UNISTD_H_SIGPIPE=0;
7654   GNULIB_UNLINK=0;
7655   GNULIB_UNLINKAT=0;
7656   GNULIB_USLEEP=0;
7657   GNULIB_WRITE=0;
7658     HAVE_CHOWN=1;
7659   HAVE_DUP2=1;
7660   HAVE_DUP3=1;
7661   HAVE_EUIDACCESS=1;
7662   HAVE_FACCESSAT=1;
7663   HAVE_FCHDIR=1;
7664   HAVE_FCHOWNAT=1;
7665   HAVE_FDATASYNC=1;
7666   HAVE_FSYNC=1;
7667   HAVE_FTRUNCATE=1;
7668   HAVE_GETDTABLESIZE=1;
7669   HAVE_GETGROUPS=1;
7670   HAVE_GETHOSTNAME=1;
7671   HAVE_GETLOGIN=1;
7672   HAVE_GETPAGESIZE=1;
7673   HAVE_GROUP_MEMBER=1;
7674   HAVE_LCHOWN=1;
7675   HAVE_LINK=1;
7676   HAVE_LINKAT=1;
7677   HAVE_PIPE=1;
7678   HAVE_PIPE2=1;
7679   HAVE_PREAD=1;
7680   HAVE_PWRITE=1;
7681   HAVE_READLINK=1;
7682   HAVE_READLINKAT=1;
7683   HAVE_SETHOSTNAME=1;
7684   HAVE_SLEEP=1;
7685   HAVE_SYMLINK=1;
7686   HAVE_SYMLINKAT=1;
7687   HAVE_UNLINKAT=1;
7688   HAVE_USLEEP=1;
7689   HAVE_DECL_ENVIRON=1;
7690   HAVE_DECL_FCHDIR=1;
7691   HAVE_DECL_FDATASYNC=1;
7692   HAVE_DECL_GETDOMAINNAME=1;
7693   HAVE_DECL_GETLOGIN_R=1;
7694   HAVE_DECL_GETPAGESIZE=1;
7695   HAVE_DECL_GETUSERSHELL=1;
7696   HAVE_DECL_SETHOSTNAME=1;
7697   HAVE_DECL_TTYNAME_R=1;
7698   HAVE_OS_H=0;
7699   HAVE_SYS_PARAM_H=0;
7700   REPLACE_CHOWN=0;
7701   REPLACE_CLOSE=0;
7702   REPLACE_DUP=0;
7703   REPLACE_DUP2=0;
7704   REPLACE_FCHOWNAT=0;
7705   REPLACE_FTRUNCATE=0;
7706   REPLACE_GETCWD=0;
7707   REPLACE_GETDOMAINNAME=0;
7708   REPLACE_GETLOGIN_R=0;
7709   REPLACE_GETGROUPS=0;
7710   REPLACE_GETPAGESIZE=0;
7711   REPLACE_ISATTY=0;
7712   REPLACE_LCHOWN=0;
7713   REPLACE_LINK=0;
7714   REPLACE_LINKAT=0;
7715   REPLACE_LSEEK=0;
7716   REPLACE_PREAD=0;
7717   REPLACE_PWRITE=0;
7718   REPLACE_READ=0;
7719   REPLACE_READLINK=0;
7720   REPLACE_RMDIR=0;
7721   REPLACE_SLEEP=0;
7722   REPLACE_SYMLINK=0;
7723   REPLACE_TTYNAME_R=0;
7724   REPLACE_UNLINK=0;
7725   REPLACE_UNLINKAT=0;
7726   REPLACE_USLEEP=0;
7727   REPLACE_WRITE=0;
7728   UNISTD_H_HAVE_WINSOCK2_H=0;
7729   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7730
7731
7732
7733
7734
7735   for ac_header in $ac_header_list
7736 do :
7737   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
7738 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7739 "
7740 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7741   cat >>confdefs.h <<_ACEOF
7742 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
7743 _ACEOF
7744
7745 fi
7746
7747 done
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759   for ac_func in $ac_func_list
7760 do :
7761   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7762 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7763 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7764   cat >>confdefs.h <<_ACEOF
7765 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
7766 _ACEOF
7767
7768 fi
7769 done
7770
7771
7772
7773
7774
7775   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7776     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7777
7778 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7779
7780   else
7781     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7782   fi
7783
7784
7785
7786
7787
7788
7789
7790      GNULIB_OPENDIR=0;
7791   GNULIB_READDIR=0;
7792   GNULIB_REWINDDIR=0;
7793   GNULIB_CLOSEDIR=0;
7794   GNULIB_DIRFD=0;
7795   GNULIB_FDOPENDIR=0;
7796   GNULIB_SCANDIR=0;
7797   GNULIB_ALPHASORT=0;
7798     HAVE_OPENDIR=1;
7799   HAVE_READDIR=1;
7800   HAVE_REWINDDIR=1;
7801   HAVE_CLOSEDIR=1;
7802   HAVE_DECL_DIRFD=1;
7803   HAVE_DECL_FDOPENDIR=1;
7804   HAVE_FDOPENDIR=1;
7805   HAVE_SCANDIR=1;
7806   HAVE_ALPHASORT=1;
7807   REPLACE_OPENDIR=0;
7808   REPLACE_CLOSEDIR=0;
7809   REPLACE_DIRFD=0;
7810   REPLACE_FDOPENDIR=0;
7811
7812
7813
7814   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7815 printf %s "checking whether the preprocessor supports include_next... " >&6; }
7816 if ${gl_cv_have_include_next+:} false; then :
7817   printf %s "(cached) " >&6
7818 else
7819   rm -rf conftestd1a conftestd1b conftestd2
7820      mkdir conftestd1a conftestd1b conftestd2
7821                                                   cat <<EOF > conftestd1a/conftest.h
7822 #define DEFINED_IN_CONFTESTD1
7823 #include_next <conftest.h>
7824 #ifdef DEFINED_IN_CONFTESTD2
7825 int foo;
7826 #else
7827 #error "include_next doesn't work"
7828 #endif
7829 EOF
7830      cat <<EOF > conftestd1b/conftest.h
7831 #define DEFINED_IN_CONFTESTD1
7832 #include <stdio.h>
7833 #include_next <conftest.h>
7834 #ifdef DEFINED_IN_CONFTESTD2
7835 int foo;
7836 #else
7837 #error "include_next doesn't work"
7838 #endif
7839 EOF
7840      cat <<EOF > conftestd2/conftest.h
7841 #ifndef DEFINED_IN_CONFTESTD1
7842 #error "include_next test doesn't work"
7843 #endif
7844 #define DEFINED_IN_CONFTESTD2
7845 EOF
7846      gl_save_CPPFLAGS="$CPPFLAGS"
7847      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7848      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h.  */
7850 #include <conftest.h>
7851 _ACEOF
7852 if ac_fn_c_try_compile "$LINENO"; then :
7853   gl_cv_have_include_next=yes
7854 else
7855   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7856         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7857 /* end confdefs.h.  */
7858 #include <conftest.h>
7859 _ACEOF
7860 if ac_fn_c_try_compile "$LINENO"; then :
7861   gl_cv_have_include_next=buggy
7862 else
7863   gl_cv_have_include_next=no
7864 fi
7865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7866
7867 fi
7868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7869      CPPFLAGS="$gl_save_CPPFLAGS"
7870      rm -rf conftestd1a conftestd1b conftestd2
7871
7872 fi
7873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7874 printf "%s\n" "$gl_cv_have_include_next" >&6; }
7875   PRAGMA_SYSTEM_HEADER=
7876   if test $gl_cv_have_include_next = yes; then
7877     INCLUDE_NEXT=include_next
7878     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7879     if test -n "$GCC"; then
7880       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7881     fi
7882   else
7883     if test $gl_cv_have_include_next = buggy; then
7884       INCLUDE_NEXT=include
7885       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7886     else
7887       INCLUDE_NEXT=include
7888       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7889     fi
7890   fi
7891
7892
7893
7894   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7895 printf %s "checking whether system header files limit the line length... " >&6; }
7896 if ${gl_cv_pragma_columns+:} false; then :
7897   printf %s "(cached) " >&6
7898 else
7899        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7900 /* end confdefs.h.  */
7901
7902 #ifdef __TANDEM
7903 choke me
7904 #endif
7905
7906 _ACEOF
7907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7908   $EGREP "choke me" >/dev/null 2>&1; then :
7909   gl_cv_pragma_columns=yes
7910 else
7911   gl_cv_pragma_columns=no
7912 fi
7913 rm -rf conftest*
7914
7915
7916 fi
7917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7918 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
7919   if test $gl_cv_pragma_columns = yes; then
7920     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7921   else
7922     PRAGMA_COLUMNS=
7923   fi
7924
7925
7926
7927
7928
7929
7930
7931
7932   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7933 printf %s "checking whether // is distinct from /... " >&6; }
7934 if ${gl_cv_double_slash_root+:} false; then :
7935   printf %s "(cached) " >&6
7936 else
7937    if test x"$cross_compiling" = xyes ; then
7938         # When cross-compiling, there is no way to tell whether // is special
7939         # short of a list of hosts.  However, the only known hosts to date
7940         # that have a distinct // are Apollo DomainOS (too old to port to),
7941         # Cygwin, and z/OS.  If anyone knows of another system for which // has
7942         # special semantics and is distinct from /, please report it to
7943         # <bug-gnulib@gnu.org>.
7944         case $host in
7945           *-cygwin | i370-ibm-openedition)
7946             gl_cv_double_slash_root=yes ;;
7947           *)
7948             # Be optimistic and assume that / and // are the same when we
7949             # don't know.
7950             gl_cv_double_slash_root='unknown, assuming no' ;;
7951         esac
7952       else
7953         set x `ls -di / // 2>/dev/null`
7954         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7955           gl_cv_double_slash_root=no
7956         else
7957           gl_cv_double_slash_root=yes
7958         fi
7959       fi
7960 fi
7961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7962 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
7963   if test "$gl_cv_double_slash_root" = yes; then
7964
7965 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7966
7967   fi
7968
7969
7970
7971   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7972 printf %s "checking for complete errno.h... " >&6; }
7973 if ${gl_cv_header_errno_h_complete+:} false; then :
7974   printf %s "(cached) " >&6
7975 else
7976
7977     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978 /* end confdefs.h.  */
7979
7980 #include <errno.h>
7981 #if !defined ETXTBSY
7982 booboo
7983 #endif
7984 #if !defined ENOMSG
7985 booboo
7986 #endif
7987 #if !defined EIDRM
7988 booboo
7989 #endif
7990 #if !defined ENOLINK
7991 booboo
7992 #endif
7993 #if !defined EPROTO
7994 booboo
7995 #endif
7996 #if !defined EMULTIHOP
7997 booboo
7998 #endif
7999 #if !defined EBADMSG
8000 booboo
8001 #endif
8002 #if !defined EOVERFLOW
8003 booboo
8004 #endif
8005 #if !defined ENOTSUP
8006 booboo
8007 #endif
8008 #if !defined ENETRESET
8009 booboo
8010 #endif
8011 #if !defined ECONNABORTED
8012 booboo
8013 #endif
8014 #if !defined ESTALE
8015 booboo
8016 #endif
8017 #if !defined EDQUOT
8018 booboo
8019 #endif
8020 #if !defined ECANCELED
8021 booboo
8022 #endif
8023 #if !defined EOWNERDEAD
8024 booboo
8025 #endif
8026 #if !defined ENOTRECOVERABLE
8027 booboo
8028 #endif
8029 #if !defined EILSEQ
8030 booboo
8031 #endif
8032
8033 _ACEOF
8034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8035   $EGREP "booboo" >/dev/null 2>&1; then :
8036   gl_cv_header_errno_h_complete=no
8037 else
8038   gl_cv_header_errno_h_complete=yes
8039 fi
8040 rm -rf conftest*
8041
8042
8043 fi
8044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8045 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8046   if test $gl_cv_header_errno_h_complete = yes; then
8047     ERRNO_H=''
8048   else
8049
8050
8051
8052
8053
8054
8055
8056
8057      if test $gl_cv_have_include_next = yes; then
8058        gl_cv_next_errno_h='<'errno.h'>'
8059      else
8060        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8061 printf %s "checking absolute name of <errno.h>... " >&6; }
8062 if ${gl_cv_next_errno_h+:} false; then :
8063   printf %s "(cached) " >&6
8064 else
8065
8066                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067 /* end confdefs.h.  */
8068 #include <errno.h>
8069
8070 _ACEOF
8071                                                                                                                         case "$host_os" in
8072                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
8073                  *)    gl_absname_cpp="$ac_cpp" ;;
8074                esac
8075
8076                case "$host_os" in
8077                  mingw*)
8078                                                                                                                                      gl_dirsep_regex='[/\\]'
8079                    ;;
8080                  *)
8081                    gl_dirsep_regex='\/'
8082                    ;;
8083                esac
8084                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8085
8086                gl_header_literal_regex=`echo 'errno.h' \
8087                                         | sed -e "$gl_make_literal_regex_sed"`
8088                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8089                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8090                    s|^/[^/]|//&|
8091                    p
8092                    q
8093                  }'
8094                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8095                       sed -n "$gl_absolute_header_sed"`'"'
8096
8097
8098 fi
8099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8100 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8101      fi
8102      NEXT_ERRNO_H=$gl_cv_next_errno_h
8103
8104      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8105        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8106        gl_next_as_first_directive='<'errno.h'>'
8107      else
8108        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8109        gl_next_as_first_directive=$gl_cv_next_errno_h
8110      fi
8111      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8112
8113
8114
8115
8116     ERRNO_H='errno.h'
8117   fi
8118
8119    if test -n "$ERRNO_H"; then
8120   GL_GENERATE_ERRNO_H_TRUE=
8121   GL_GENERATE_ERRNO_H_FALSE='#'
8122 else
8123   GL_GENERATE_ERRNO_H_TRUE='#'
8124   GL_GENERATE_ERRNO_H_FALSE=
8125 fi
8126
8127
8128   if test -n "$ERRNO_H"; then
8129     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8130 printf %s "checking for EMULTIHOP value... " >&6; }
8131 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8132   printf %s "(cached) " >&6
8133 else
8134
8135       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8136 /* end confdefs.h.  */
8137
8138 #include <errno.h>
8139 #ifdef EMULTIHOP
8140 yes
8141 #endif
8142
8143 _ACEOF
8144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8145   $EGREP "yes" >/dev/null 2>&1; then :
8146   gl_cv_header_errno_h_EMULTIHOP=yes
8147 else
8148   gl_cv_header_errno_h_EMULTIHOP=no
8149 fi
8150 rm -rf conftest*
8151
8152       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8153         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8154 /* end confdefs.h.  */
8155
8156 #define _XOPEN_SOURCE_EXTENDED 1
8157 #include <errno.h>
8158 #ifdef EMULTIHOP
8159 yes
8160 #endif
8161
8162 _ACEOF
8163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8164   $EGREP "yes" >/dev/null 2>&1; then :
8165   gl_cv_header_errno_h_EMULTIHOP=hidden
8166 fi
8167 rm -rf conftest*
8168
8169         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8170                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
8171 #define _XOPEN_SOURCE_EXTENDED 1
8172 #include <errno.h>
8173 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8174 #include <stdio.h>
8175 #include <stdlib.h>
8176 "; then :
8177
8178 fi
8179
8180         fi
8181       fi
8182
8183 fi
8184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8185 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8186     case $gl_cv_header_errno_h_EMULTIHOP in
8187       yes | no)
8188         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8189         ;;
8190       *)
8191         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8192         ;;
8193     esac
8194
8195
8196   fi
8197
8198
8199   if test -n "$ERRNO_H"; then
8200     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8201 printf %s "checking for ENOLINK value... " >&6; }
8202 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8203   printf %s "(cached) " >&6
8204 else
8205
8206       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8207 /* end confdefs.h.  */
8208
8209 #include <errno.h>
8210 #ifdef ENOLINK
8211 yes
8212 #endif
8213
8214 _ACEOF
8215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8216   $EGREP "yes" >/dev/null 2>&1; then :
8217   gl_cv_header_errno_h_ENOLINK=yes
8218 else
8219   gl_cv_header_errno_h_ENOLINK=no
8220 fi
8221 rm -rf conftest*
8222
8223       if test $gl_cv_header_errno_h_ENOLINK = no; then
8224         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8225 /* end confdefs.h.  */
8226
8227 #define _XOPEN_SOURCE_EXTENDED 1
8228 #include <errno.h>
8229 #ifdef ENOLINK
8230 yes
8231 #endif
8232
8233 _ACEOF
8234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8235   $EGREP "yes" >/dev/null 2>&1; then :
8236   gl_cv_header_errno_h_ENOLINK=hidden
8237 fi
8238 rm -rf conftest*
8239
8240         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8241                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
8242 #define _XOPEN_SOURCE_EXTENDED 1
8243 #include <errno.h>
8244 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8245 #include <stdio.h>
8246 #include <stdlib.h>
8247 "; then :
8248
8249 fi
8250
8251         fi
8252       fi
8253
8254 fi
8255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8256 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8257     case $gl_cv_header_errno_h_ENOLINK in
8258       yes | no)
8259         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8260         ;;
8261       *)
8262         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8263         ;;
8264     esac
8265
8266
8267   fi
8268
8269
8270   if test -n "$ERRNO_H"; then
8271     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8272 printf %s "checking for EOVERFLOW value... " >&6; }
8273 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8274   printf %s "(cached) " >&6
8275 else
8276
8277       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8278 /* end confdefs.h.  */
8279
8280 #include <errno.h>
8281 #ifdef EOVERFLOW
8282 yes
8283 #endif
8284
8285 _ACEOF
8286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8287   $EGREP "yes" >/dev/null 2>&1; then :
8288   gl_cv_header_errno_h_EOVERFLOW=yes
8289 else
8290   gl_cv_header_errno_h_EOVERFLOW=no
8291 fi
8292 rm -rf conftest*
8293
8294       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8295         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8296 /* end confdefs.h.  */
8297
8298 #define _XOPEN_SOURCE_EXTENDED 1
8299 #include <errno.h>
8300 #ifdef EOVERFLOW
8301 yes
8302 #endif
8303
8304 _ACEOF
8305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8306   $EGREP "yes" >/dev/null 2>&1; then :
8307   gl_cv_header_errno_h_EOVERFLOW=hidden
8308 fi
8309 rm -rf conftest*
8310
8311         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8312                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
8313 #define _XOPEN_SOURCE_EXTENDED 1
8314 #include <errno.h>
8315 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8316 #include <stdio.h>
8317 #include <stdlib.h>
8318 "; then :
8319
8320 fi
8321
8322         fi
8323       fi
8324
8325 fi
8326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8327 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8328     case $gl_cv_header_errno_h_EOVERFLOW in
8329       yes | no)
8330         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8331         ;;
8332       *)
8333         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8334         ;;
8335     esac
8336
8337
8338   fi
8339
8340
8341 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8342 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8343   ac_have_decl=1
8344 else
8345   ac_have_decl=0
8346 fi
8347
8348 cat >>confdefs.h <<_ACEOF
8349 #define HAVE_DECL_STRERROR_R $ac_have_decl
8350 _ACEOF
8351
8352 for ac_func in strerror_r
8353 do :
8354   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8355 if test "x$ac_cv_func_strerror_r" = xyes; then :
8356   cat >>confdefs.h <<_ACEOF
8357 #define HAVE_STRERROR_R 1
8358 _ACEOF
8359
8360 fi
8361 done
8362
8363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8364 printf %s "checking whether strerror_r returns char *... " >&6; }
8365 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8366   printf %s "(cached) " >&6
8367 else
8368
8369     ac_cv_func_strerror_r_char_p=no
8370     if test $ac_cv_have_decl_strerror_r = yes; then
8371       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8372 /* end confdefs.h.  */
8373 $ac_includes_default
8374 int
8375 main ()
8376 {
8377
8378           char buf[100];
8379           char x = *strerror_r (0, buf, sizeof buf);
8380           char *p = strerror_r (0, buf, sizeof buf);
8381           return !p || x;
8382
8383   ;
8384   return 0;
8385 }
8386 _ACEOF
8387 if ac_fn_c_try_compile "$LINENO"; then :
8388   ac_cv_func_strerror_r_char_p=yes
8389 fi
8390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8391     else
8392       # strerror_r is not declared.  Choose between
8393       # systems that have relatively inaccessible declarations for the
8394       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8395       # former has a strerror_r that returns char*, while the latter
8396       # has a strerror_r that returns `int'.
8397       # This test should segfault on the DEC system.
8398       if test "$cross_compiling" = yes; then :
8399   :
8400 else
8401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402 /* end confdefs.h.  */
8403 $ac_includes_default
8404         extern char *strerror_r ();
8405 int
8406 main ()
8407 {
8408 char buf[100];
8409           char x = *strerror_r (0, buf, sizeof buf);
8410           return ! isalpha (x);
8411   ;
8412   return 0;
8413 }
8414 _ACEOF
8415 if ac_fn_c_try_run "$LINENO"; then :
8416   ac_cv_func_strerror_r_char_p=yes
8417 fi
8418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8419   conftest.$ac_objext conftest.beam conftest.$ac_ext
8420 fi
8421
8422     fi
8423
8424 fi
8425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8426 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8427 if test $ac_cv_func_strerror_r_char_p = yes; then
8428
8429 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8430
8431 fi
8432
8433
8434   XGETTEXT_EXTRA_OPTIONS=
8435
8436
8437
8438
8439 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8440 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8441   ac_have_decl=1
8442 else
8443   ac_have_decl=0
8444 fi
8445
8446 cat >>confdefs.h <<_ACEOF
8447 #define HAVE_DECL_FCHDIR $ac_have_decl
8448 _ACEOF
8449
8450
8451   GNULIB_DPRINTF=0;
8452   GNULIB_FCLOSE=0;
8453   GNULIB_FDOPEN=0;
8454   GNULIB_FFLUSH=0;
8455   GNULIB_FGETC=0;
8456   GNULIB_FGETS=0;
8457   GNULIB_FOPEN=0;
8458   GNULIB_FPRINTF=0;
8459   GNULIB_FPRINTF_POSIX=0;
8460   GNULIB_FPURGE=0;
8461   GNULIB_FPUTC=0;
8462   GNULIB_FPUTS=0;
8463   GNULIB_FREAD=0;
8464   GNULIB_FREOPEN=0;
8465   GNULIB_FSCANF=0;
8466   GNULIB_FSEEK=0;
8467   GNULIB_FSEEKO=0;
8468   GNULIB_FTELL=0;
8469   GNULIB_FTELLO=0;
8470   GNULIB_FWRITE=0;
8471   GNULIB_GETC=0;
8472   GNULIB_GETCHAR=0;
8473   GNULIB_GETDELIM=0;
8474   GNULIB_GETLINE=0;
8475   GNULIB_OBSTACK_PRINTF=0;
8476   GNULIB_OBSTACK_PRINTF_POSIX=0;
8477   GNULIB_PCLOSE=0;
8478   GNULIB_PERROR=0;
8479   GNULIB_POPEN=0;
8480   GNULIB_PRINTF=0;
8481   GNULIB_PRINTF_POSIX=0;
8482   GNULIB_PUTC=0;
8483   GNULIB_PUTCHAR=0;
8484   GNULIB_PUTS=0;
8485   GNULIB_REMOVE=0;
8486   GNULIB_RENAME=0;
8487   GNULIB_RENAMEAT=0;
8488   GNULIB_SCANF=0;
8489   GNULIB_SNPRINTF=0;
8490   GNULIB_SPRINTF_POSIX=0;
8491   GNULIB_STDIO_H_NONBLOCKING=0;
8492   GNULIB_STDIO_H_SIGPIPE=0;
8493   GNULIB_TMPFILE=0;
8494   GNULIB_VASPRINTF=0;
8495   GNULIB_VFSCANF=0;
8496   GNULIB_VSCANF=0;
8497   GNULIB_VDPRINTF=0;
8498   GNULIB_VFPRINTF=0;
8499   GNULIB_VFPRINTF_POSIX=0;
8500   GNULIB_VPRINTF=0;
8501   GNULIB_VPRINTF_POSIX=0;
8502   GNULIB_VSNPRINTF=0;
8503   GNULIB_VSPRINTF_POSIX=0;
8504     HAVE_DECL_FPURGE=1;
8505   HAVE_DECL_FSEEKO=1;
8506   HAVE_DECL_FTELLO=1;
8507   HAVE_DECL_GETDELIM=1;
8508   HAVE_DECL_GETLINE=1;
8509   HAVE_DECL_OBSTACK_PRINTF=1;
8510   HAVE_DECL_SNPRINTF=1;
8511   HAVE_DECL_VSNPRINTF=1;
8512   HAVE_DPRINTF=1;
8513   HAVE_FSEEKO=1;
8514   HAVE_FTELLO=1;
8515   HAVE_PCLOSE=1;
8516   HAVE_POPEN=1;
8517   HAVE_RENAMEAT=1;
8518   HAVE_VASPRINTF=1;
8519   HAVE_VDPRINTF=1;
8520   REPLACE_DPRINTF=0;
8521   REPLACE_FCLOSE=0;
8522   REPLACE_FDOPEN=0;
8523   REPLACE_FFLUSH=0;
8524   REPLACE_FOPEN=0;
8525   REPLACE_FPRINTF=0;
8526   REPLACE_FPURGE=0;
8527   REPLACE_FREOPEN=0;
8528   REPLACE_FSEEK=0;
8529   REPLACE_FSEEKO=0;
8530   REPLACE_FTELL=0;
8531   REPLACE_FTELLO=0;
8532   REPLACE_GETDELIM=0;
8533   REPLACE_GETLINE=0;
8534   REPLACE_OBSTACK_PRINTF=0;
8535   REPLACE_PERROR=0;
8536   REPLACE_POPEN=0;
8537   REPLACE_PRINTF=0;
8538   REPLACE_REMOVE=0;
8539   REPLACE_RENAME=0;
8540   REPLACE_RENAMEAT=0;
8541   REPLACE_SNPRINTF=0;
8542   REPLACE_SPRINTF=0;
8543   REPLACE_STDIO_READ_FUNCS=0;
8544   REPLACE_STDIO_WRITE_FUNCS=0;
8545   REPLACE_TMPFILE=0;
8546   REPLACE_VASPRINTF=0;
8547   REPLACE_VDPRINTF=0;
8548   REPLACE_VFPRINTF=0;
8549   REPLACE_VPRINTF=0;
8550   REPLACE_VSNPRINTF=0;
8551   REPLACE_VSPRINTF=0;
8552
8553
8554   GNULIB_FCNTL=0;
8555   GNULIB_NONBLOCKING=0;
8556   GNULIB_OPEN=0;
8557   GNULIB_OPENAT=0;
8558     HAVE_FCNTL=1;
8559   HAVE_OPENAT=1;
8560   REPLACE_FCNTL=0;
8561   REPLACE_OPEN=0;
8562   REPLACE_OPENAT=0;
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8574 printf %s "checking for working fcntl.h... " >&6; }
8575 if ${gl_cv_header_working_fcntl_h+:} false; then :
8576   printf %s "(cached) " >&6
8577 else
8578   if test "$cross_compiling" = yes; then :
8579   gl_cv_header_working_fcntl_h=cross-compiling
8580 else
8581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8582 /* end confdefs.h.  */
8583 #include <sys/types.h>
8584            #include <sys/stat.h>
8585            #if HAVE_UNISTD_H
8586            # include <unistd.h>
8587            #else /* on Windows with MSVC */
8588            # include <io.h>
8589            # include <stdlib.h>
8590            # defined sleep(n) _sleep ((n) * 1000)
8591            #endif
8592            #include <fcntl.h>
8593            #ifndef O_NOATIME
8594             #define O_NOATIME 0
8595            #endif
8596            #ifndef O_NOFOLLOW
8597             #define O_NOFOLLOW 0
8598            #endif
8599            static int const constants[] =
8600             {
8601               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8602               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8603             };
8604
8605 int
8606 main ()
8607 {
8608
8609             int result = !constants;
8610             #if HAVE_SYMLINK
8611             {
8612               static char const sym[] = "conftest.sym";
8613               if (symlink ("/dev/null", sym) != 0)
8614                 result |= 2;
8615               else
8616                 {
8617                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8618                   if (fd >= 0)
8619                     {
8620                       close (fd);
8621                       result |= 4;
8622                     }
8623                 }
8624               if (unlink (sym) != 0 || symlink (".", sym) != 0)
8625                 result |= 2;
8626               else
8627                 {
8628                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8629                   if (fd >= 0)
8630                     {
8631                       close (fd);
8632                       result |= 4;
8633                     }
8634                 }
8635               unlink (sym);
8636             }
8637             #endif
8638             {
8639               static char const file[] = "confdefs.h";
8640               int fd = open (file, O_RDONLY | O_NOATIME);
8641               if (fd < 0)
8642                 result |= 8;
8643               else
8644                 {
8645                   struct stat st0;
8646                   if (fstat (fd, &st0) != 0)
8647                     result |= 16;
8648                   else
8649                     {
8650                       char c;
8651                       sleep (1);
8652                       if (read (fd, &c, 1) != 1)
8653                         result |= 24;
8654                       else
8655                         {
8656                           if (close (fd) != 0)
8657                             result |= 32;
8658                           else
8659                             {
8660                               struct stat st1;
8661                               if (stat (file, &st1) != 0)
8662                                 result |= 40;
8663                               else
8664                                 if (st0.st_atime != st1.st_atime)
8665                                   result |= 64;
8666                             }
8667                         }
8668                     }
8669                 }
8670             }
8671             return result;
8672   ;
8673   return 0;
8674 }
8675 _ACEOF
8676 if ac_fn_c_try_run "$LINENO"; then :
8677   gl_cv_header_working_fcntl_h=yes
8678 else
8679   case $? in #(
8680         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8681         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8682         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8683          *) gl_cv_header_working_fcntl_h='no';;
8684         esac
8685 fi
8686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8687   conftest.$ac_objext conftest.beam conftest.$ac_ext
8688 fi
8689
8690 fi
8691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8692 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
8693
8694   case $gl_cv_header_working_fcntl_h in #(
8695   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8696   *) ac_val=1;;
8697   esac
8698
8699 cat >>confdefs.h <<_ACEOF
8700 #define HAVE_WORKING_O_NOATIME $ac_val
8701 _ACEOF
8702
8703
8704   case $gl_cv_header_working_fcntl_h in #(
8705   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8706   *) ac_val=1;;
8707   esac
8708
8709 cat >>confdefs.h <<_ACEOF
8710 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8711 _ACEOF
8712
8713
8714 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8715 if test "x$ac_cv_type_pid_t" = xyes; then :
8716
8717 else
8718
8719 cat >>confdefs.h <<_ACEOF
8720 #define pid_t int
8721 _ACEOF
8722
8723 fi
8724
8725 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8726 if test "x$ac_cv_type_mode_t" = xyes; then :
8727
8728 else
8729
8730 cat >>confdefs.h <<_ACEOF
8731 #define mode_t int
8732 _ACEOF
8733
8734 fi
8735
8736
8737
8738   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8739 printf %s "checking for promoted mode_t type... " >&6; }
8740 if ${gl_cv_promoted_mode_t+:} false; then :
8741   printf %s "(cached) " >&6
8742 else
8743
8744                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8745 /* end confdefs.h.  */
8746 #include <sys/types.h>
8747 int
8748 main ()
8749 {
8750 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
8751   ;
8752   return 0;
8753 }
8754 _ACEOF
8755 if ac_fn_c_try_compile "$LINENO"; then :
8756   gl_cv_promoted_mode_t='int'
8757 else
8758   gl_cv_promoted_mode_t='mode_t'
8759 fi
8760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8761
8762 fi
8763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
8764 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
8765
8766 cat >>confdefs.h <<_ACEOF
8767 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
8768 _ACEOF
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
8779 printf %s "checking for stdint.h... " >&6; }
8780 if ${gl_cv_header_stdint_h+:} false; then :
8781   printf %s "(cached) " >&6
8782 else
8783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784 /* end confdefs.h.  */
8785 #include <sys/types.h>
8786             #include <stdint.h>
8787 int
8788 main ()
8789 {
8790 uintmax_t i = (uintmax_t) -1; return !i;
8791   ;
8792   return 0;
8793 }
8794 _ACEOF
8795 if ac_fn_c_try_compile "$LINENO"; then :
8796   gl_cv_header_stdint_h=yes
8797 else
8798   gl_cv_header_stdint_h=no
8799 fi
8800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8801 fi
8802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
8803 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
8804   if test $gl_cv_header_stdint_h = yes; then
8805
8806 cat >>confdefs.h <<_ACEOF
8807 #define HAVE_STDINT_H_WITH_UINTMAX 1
8808 _ACEOF
8809
8810   fi
8811
8812
8813   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8814 printf %s "checking for inttypes.h... " >&6; }
8815 if ${gl_cv_header_inttypes_h+:} false; then :
8816   printf %s "(cached) " >&6
8817 else
8818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8819 /* end confdefs.h.  */
8820
8821 #include <sys/types.h>
8822 #include <inttypes.h>
8823
8824 int
8825 main ()
8826 {
8827 uintmax_t i = (uintmax_t) -1; return !i;
8828   ;
8829   return 0;
8830 }
8831 _ACEOF
8832 if ac_fn_c_try_compile "$LINENO"; then :
8833   gl_cv_header_inttypes_h=yes
8834 else
8835   gl_cv_header_inttypes_h=no
8836 fi
8837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8838 fi
8839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
8840 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
8841   if test $gl_cv_header_inttypes_h = yes; then
8842
8843 cat >>confdefs.h <<_ACEOF
8844 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
8845 _ACEOF
8846
8847   fi
8848
8849
8850
8851
8852
8853      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
8854 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
8855 if ${gl_cv_func_printf_sizes_c99+:} false; then :
8856   printf %s "(cached) " >&6
8857 else
8858
8859       if test "$cross_compiling" = yes; then :
8860
8861          case "$host_os" in
8862                                  # Guess yes on glibc systems.
8863            *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
8864                                  # Guess yes on FreeBSD >= 5.
8865            freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
8866            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8867                                  # Guess yes on Mac OS X >= 10.3.
8868            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
8869            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
8870                                  # Guess yes on OpenBSD >= 3.9.
8871            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
8872                                  gl_cv_func_printf_sizes_c99="guessing no";;
8873            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
8874                                  # Guess yes on Solaris >= 2.10.
8875            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
8876            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
8877                                  # Guess yes on NetBSD >= 3.
8878            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
8879                                  gl_cv_func_printf_sizes_c99="guessing no";;
8880            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
8881                                  # If we don't know, assume the worst.
8882            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
8883          esac
8884
8885 else
8886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8887 /* end confdefs.h.  */
8888
8889 #include <stddef.h>
8890 #include <stdio.h>
8891 #include <string.h>
8892 #include <sys/types.h>
8893 #if HAVE_STDINT_H_WITH_UINTMAX
8894 # include <stdint.h>
8895 #endif
8896 #if HAVE_INTTYPES_H_WITH_UINTMAX
8897 # include <inttypes.h>
8898 #endif
8899 static char buf[100];
8900 int main ()
8901 {
8902   int result = 0;
8903 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
8904   buf[0] = '\0';
8905   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
8906       || strcmp (buf, "12345671 33") != 0)
8907     result |= 1;
8908 #endif
8909   buf[0] = '\0';
8910   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
8911       || strcmp (buf, "12345672 33") != 0)
8912     result |= 2;
8913   buf[0] = '\0';
8914   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
8915       || strcmp (buf, "12345673 33") != 0)
8916     result |= 4;
8917   buf[0] = '\0';
8918   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
8919       || strcmp (buf, "1.5 33") != 0)
8920     result |= 8;
8921   return result;
8922 }
8923 _ACEOF
8924 if ac_fn_c_try_run "$LINENO"; then :
8925   gl_cv_func_printf_sizes_c99=yes
8926 else
8927   gl_cv_func_printf_sizes_c99=no
8928 fi
8929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8930   conftest.$ac_objext conftest.beam conftest.$ac_ext
8931 fi
8932
8933
8934 fi
8935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
8936 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
8937
8938
8939
8940      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
8941 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
8942 if ${gl_cv_func_printf_long_double+:} false; then :
8943   printf %s "(cached) " >&6
8944 else
8945
8946       if test "$cross_compiling" = yes; then :
8947
8948          case "$host_os" in
8949            beos*)        gl_cv_func_printf_long_double="guessing no";;
8950            mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
8951            *)            gl_cv_func_printf_long_double="guessing yes";;
8952          esac
8953
8954 else
8955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8956 /* end confdefs.h.  */
8957
8958 #include <stdio.h>
8959 #include <string.h>
8960 static char buf[10000];
8961 int main ()
8962 {
8963   int result = 0;
8964   buf[0] = '\0';
8965   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
8966       || strcmp (buf, "1.750000 33") != 0)
8967     result |= 1;
8968   buf[0] = '\0';
8969   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
8970       || strcmp (buf, "1.750000e+00 33") != 0)
8971     result |= 2;
8972   buf[0] = '\0';
8973   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
8974       || strcmp (buf, "1.75 33") != 0)
8975     result |= 4;
8976   return result;
8977 }
8978 _ACEOF
8979 if ac_fn_c_try_run "$LINENO"; then :
8980   gl_cv_func_printf_long_double=yes
8981 else
8982   gl_cv_func_printf_long_double=no
8983 fi
8984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8985   conftest.$ac_objext conftest.beam conftest.$ac_ext
8986 fi
8987
8988
8989 fi
8990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
8991 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
8992
8993
8994
8995      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
8996 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
8997 if ${gl_cv_func_printf_infinite+:} false; then :
8998   printf %s "(cached) " >&6
8999 else
9000
9001       if test "$cross_compiling" = yes; then :
9002
9003          case "$host_os" in
9004                                  # Guess yes on glibc systems.
9005            *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
9006                                  # Guess yes on FreeBSD >= 6.
9007            freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
9008            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9009                                  # Guess yes on Mac OS X >= 10.3.
9010            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
9011            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
9012                                  # Guess yes on HP-UX >= 11.
9013            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9014            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
9015                                  # Guess yes on NetBSD >= 3.
9016            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9017                                  gl_cv_func_printf_infinite="guessing no";;
9018            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
9019                                  # Guess yes on BeOS.
9020            beos*)                gl_cv_func_printf_infinite="guessing yes";;
9021                                  # If we don't know, assume the worst.
9022            *)                    gl_cv_func_printf_infinite="guessing no";;
9023          esac
9024
9025 else
9026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9027 /* end confdefs.h.  */
9028
9029 #include <stdio.h>
9030 #include <string.h>
9031 static int
9032 strisnan (const char *string, size_t start_index, size_t end_index)
9033 {
9034   if (start_index < end_index)
9035     {
9036       if (string[start_index] == '-')
9037         start_index++;
9038       if (start_index + 3 <= end_index
9039           && memcmp (string + start_index, "nan", 3) == 0)
9040         {
9041           start_index += 3;
9042           if (start_index == end_index
9043               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9044             return 1;
9045         }
9046     }
9047   return 0;
9048 }
9049 static int
9050 have_minus_zero ()
9051 {
9052   static double plus_zero = 0.0;
9053   double minus_zero = - plus_zero;
9054   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9055 }
9056 static char buf[10000];
9057 static double zero = 0.0;
9058 int main ()
9059 {
9060   int result = 0;
9061   if (sprintf (buf, "%f", 1.0 / zero) < 0
9062       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9063     result |= 1;
9064   if (sprintf (buf, "%f", -1.0 / zero) < 0
9065       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9066     result |= 1;
9067   if (sprintf (buf, "%f", zero / zero) < 0
9068       || !strisnan (buf, 0, strlen (buf)))
9069     result |= 2;
9070   if (sprintf (buf, "%e", 1.0 / zero) < 0
9071       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9072     result |= 4;
9073   if (sprintf (buf, "%e", -1.0 / zero) < 0
9074       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9075     result |= 4;
9076   if (sprintf (buf, "%e", zero / zero) < 0
9077       || !strisnan (buf, 0, strlen (buf)))
9078     result |= 8;
9079   if (sprintf (buf, "%g", 1.0 / zero) < 0
9080       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9081     result |= 16;
9082   if (sprintf (buf, "%g", -1.0 / zero) < 0
9083       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9084     result |= 16;
9085   if (sprintf (buf, "%g", zero / zero) < 0
9086       || !strisnan (buf, 0, strlen (buf)))
9087     result |= 32;
9088   /* This test fails on HP-UX 10.20.  */
9089   if (have_minus_zero ())
9090     if (sprintf (buf, "%g", - zero) < 0
9091         || strcmp (buf, "-0") != 0)
9092     result |= 64;
9093   return result;
9094 }
9095 _ACEOF
9096 if ac_fn_c_try_run "$LINENO"; then :
9097   gl_cv_func_printf_infinite=yes
9098 else
9099   gl_cv_func_printf_infinite=no
9100 fi
9101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9102   conftest.$ac_objext conftest.beam conftest.$ac_ext
9103 fi
9104
9105
9106 fi
9107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9108 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9109
9110
9111    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9112 printf %s "checking whether byte ordering is bigendian... " >&6; }
9113 if ${ac_cv_c_bigendian+:} false; then :
9114   printf %s "(cached) " >&6
9115 else
9116   ac_cv_c_bigendian=unknown
9117     # See if we're dealing with a universal compiler.
9118     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9119 /* end confdefs.h.  */
9120 #ifndef __APPLE_CC__
9121                not a universal capable compiler
9122              #endif
9123              typedef int dummy;
9124
9125 _ACEOF
9126 if ac_fn_c_try_compile "$LINENO"; then :
9127
9128         # Check for potential -arch flags.  It is not universal unless
9129         # there are at least two -arch flags with different values.
9130         ac_arch=
9131         ac_prev=
9132         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9133          if test -n "$ac_prev"; then
9134            case $ac_word in
9135              i?86 | x86_64 | ppc | ppc64)
9136                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9137                  ac_arch=$ac_word
9138                else
9139                  ac_cv_c_bigendian=universal
9140                  break
9141                fi
9142                ;;
9143            esac
9144            ac_prev=
9145          elif test "x$ac_word" = "x-arch"; then
9146            ac_prev=arch
9147          fi
9148        done
9149 fi
9150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9151     if test $ac_cv_c_bigendian = unknown; then
9152       # See if sys/param.h defines the BYTE_ORDER macro.
9153       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154 /* end confdefs.h.  */
9155 #include <sys/types.h>
9156              #include <sys/param.h>
9157
9158 int
9159 main ()
9160 {
9161 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9162                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9163                      && LITTLE_ENDIAN)
9164               bogus endian macros
9165              #endif
9166
9167   ;
9168   return 0;
9169 }
9170 _ACEOF
9171 if ac_fn_c_try_compile "$LINENO"; then :
9172   # It does; now see whether it defined to BIG_ENDIAN or not.
9173          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9174 /* end confdefs.h.  */
9175 #include <sys/types.h>
9176                 #include <sys/param.h>
9177
9178 int
9179 main ()
9180 {
9181 #if BYTE_ORDER != BIG_ENDIAN
9182                  not big endian
9183                 #endif
9184
9185   ;
9186   return 0;
9187 }
9188 _ACEOF
9189 if ac_fn_c_try_compile "$LINENO"; then :
9190   ac_cv_c_bigendian=yes
9191 else
9192   ac_cv_c_bigendian=no
9193 fi
9194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9195 fi
9196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9197     fi
9198     if test $ac_cv_c_bigendian = unknown; then
9199       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9200       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9201 /* end confdefs.h.  */
9202 #include <limits.h>
9203
9204 int
9205 main ()
9206 {
9207 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9208               bogus endian macros
9209              #endif
9210
9211   ;
9212   return 0;
9213 }
9214 _ACEOF
9215 if ac_fn_c_try_compile "$LINENO"; then :
9216   # It does; now see whether it defined to _BIG_ENDIAN or not.
9217          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218 /* end confdefs.h.  */
9219 #include <limits.h>
9220
9221 int
9222 main ()
9223 {
9224 #ifndef _BIG_ENDIAN
9225                  not big endian
9226                 #endif
9227
9228   ;
9229   return 0;
9230 }
9231 _ACEOF
9232 if ac_fn_c_try_compile "$LINENO"; then :
9233   ac_cv_c_bigendian=yes
9234 else
9235   ac_cv_c_bigendian=no
9236 fi
9237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9238 fi
9239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9240     fi
9241     if test $ac_cv_c_bigendian = unknown; then
9242       # Compile a test program.
9243       if test "$cross_compiling" = yes; then :
9244   # Try to guess by grepping values from an object file.
9245          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9246 /* end confdefs.h.  */
9247 short int ascii_mm[] =
9248                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9249                 short int ascii_ii[] =
9250                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9251                 int use_ascii (int i) {
9252                   return ascii_mm[i] + ascii_ii[i];
9253                 }
9254                 short int ebcdic_ii[] =
9255                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9256                 short int ebcdic_mm[] =
9257                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9258                 int use_ebcdic (int i) {
9259                   return ebcdic_mm[i] + ebcdic_ii[i];
9260                 }
9261                 extern int foo;
9262
9263 int
9264 main ()
9265 {
9266 return use_ascii (foo) == use_ebcdic (foo);
9267   ;
9268   return 0;
9269 }
9270 _ACEOF
9271 if ac_fn_c_try_compile "$LINENO"; then :
9272   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9273               ac_cv_c_bigendian=yes
9274             fi
9275             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9276               if test "$ac_cv_c_bigendian" = unknown; then
9277                 ac_cv_c_bigendian=no
9278               else
9279                 # finding both strings is unlikely to happen, but who knows?
9280                 ac_cv_c_bigendian=unknown
9281               fi
9282             fi
9283 fi
9284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9285 else
9286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9287 /* end confdefs.h.  */
9288 $ac_includes_default
9289 int
9290 main ()
9291 {
9292
9293              /* Are we little or big endian?  From Harbison&Steele.  */
9294              union
9295              {
9296                long int l;
9297                char c[sizeof (long int)];
9298              } u;
9299              u.l = 1;
9300              return u.c[sizeof (long int) - 1] == 1;
9301
9302   ;
9303   return 0;
9304 }
9305 _ACEOF
9306 if ac_fn_c_try_run "$LINENO"; then :
9307   ac_cv_c_bigendian=no
9308 else
9309   ac_cv_c_bigendian=yes
9310 fi
9311 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9312   conftest.$ac_objext conftest.beam conftest.$ac_ext
9313 fi
9314
9315     fi
9316 fi
9317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9318 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9319  case $ac_cv_c_bigendian in #(
9320    yes)
9321      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9322 ;; #(
9323    no)
9324       ;; #(
9325    universal)
9326
9327 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9328
9329      ;; #(
9330    *)
9331      as_fn_error $? "unknown endianness
9332  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9333  esac
9334
9335
9336
9337   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9338 printf %s "checking whether long double and double are the same... " >&6; }
9339 if ${gl_cv_long_double_equals_double+:} false; then :
9340   printf %s "(cached) " >&6
9341 else
9342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9343 /* end confdefs.h.  */
9344 #include <float.h>
9345 int
9346 main ()
9347 {
9348 typedef int check[sizeof (long double) == sizeof (double)
9349                               && LDBL_MANT_DIG == DBL_MANT_DIG
9350                               && LDBL_MAX_EXP == DBL_MAX_EXP
9351                               && LDBL_MIN_EXP == DBL_MIN_EXP
9352                               ? 1 : -1];
9353
9354   ;
9355   return 0;
9356 }
9357 _ACEOF
9358 if ac_fn_c_try_compile "$LINENO"; then :
9359   gl_cv_long_double_equals_double=yes
9360 else
9361   gl_cv_long_double_equals_double=no
9362 fi
9363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9364
9365 fi
9366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9367 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9368   if test $gl_cv_long_double_equals_double = yes; then
9369
9370 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9371
9372     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9373   else
9374     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9375   fi
9376
9377
9378
9379
9380
9381
9382
9383          if test -n "$gl_printf_safe"; then
9384
9385 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9386
9387   fi
9388   case "$gl_cv_func_printf_long_double" in
9389     *yes)
9390       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9391 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9392 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
9393   printf %s "(cached) " >&6
9394 else
9395
9396           if test "$cross_compiling" = yes; then :
9397
9398              case "$host_cpu" in
9399                                      # Guess no on ia64, x86_64, i386.
9400                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9401                *)
9402                  case "$host_os" in
9403                                          # Guess yes on glibc systems.
9404                    *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
9405                                          # Guess yes on FreeBSD >= 6.
9406                    freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
9407                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9408                                          # Guess yes on HP-UX >= 11.
9409                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9410                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
9411                                          # If we don't know, assume the worst.
9412                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
9413                  esac
9414                  ;;
9415              esac
9416
9417 else
9418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9419 /* end confdefs.h.  */
9420
9421
9422 #include <stdlib.h>
9423 #if defined __MACH__ && defined __APPLE__
9424 /* Avoid a crash on Mac OS X.  */
9425 #include <mach/mach.h>
9426 #include <mach/mach_error.h>
9427 #include <mach/thread_status.h>
9428 #include <mach/exception.h>
9429 #include <mach/task.h>
9430 #include <pthread.h>
9431 /* The exception port on which our thread listens.  */
9432 static mach_port_t our_exception_port;
9433 /* The main function of the thread listening for exceptions of type
9434    EXC_BAD_ACCESS.  */
9435 static void *
9436 mach_exception_thread (void *arg)
9437 {
9438   /* Buffer for a message to be received.  */
9439   struct {
9440     mach_msg_header_t head;
9441     mach_msg_body_t msgh_body;
9442     char data[1024];
9443   } msg;
9444   mach_msg_return_t retval;
9445   /* Wait for a message on the exception port.  */
9446   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9447                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9448   if (retval != MACH_MSG_SUCCESS)
9449     abort ();
9450   exit (1);
9451 }
9452 static void
9453 nocrash_init (void)
9454 {
9455   mach_port_t self = mach_task_self ();
9456   /* Allocate a port on which the thread shall listen for exceptions.  */
9457   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9458       == KERN_SUCCESS) {
9459     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9460     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9461                                 MACH_MSG_TYPE_MAKE_SEND)
9462         == KERN_SUCCESS) {
9463       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9464          for us.  */
9465       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9466       /* Create the thread listening on the exception port.  */
9467       pthread_attr_t attr;
9468       pthread_t thread;
9469       if (pthread_attr_init (&attr) == 0
9470           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9471           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9472         pthread_attr_destroy (&attr);
9473         /* Replace the exception port info for these exceptions with our own.
9474            Note that we replace the exception port for the entire task, not only
9475            for a particular thread.  This has the effect that when our exception
9476            port gets the message, the thread specific exception port has already
9477            been asked, and we don't need to bother about it.
9478            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9479         task_set_exception_ports (self, mask, our_exception_port,
9480                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9481       }
9482     }
9483   }
9484 }
9485 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9486 /* Avoid a crash on native Windows.  */
9487 #define WIN32_LEAN_AND_MEAN
9488 #include <windows.h>
9489 #include <winerror.h>
9490 static LONG WINAPI
9491 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9492 {
9493   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9494     {
9495     case EXCEPTION_ACCESS_VIOLATION:
9496     case EXCEPTION_IN_PAGE_ERROR:
9497     case EXCEPTION_STACK_OVERFLOW:
9498     case EXCEPTION_GUARD_PAGE:
9499     case EXCEPTION_PRIV_INSTRUCTION:
9500     case EXCEPTION_ILLEGAL_INSTRUCTION:
9501     case EXCEPTION_DATATYPE_MISALIGNMENT:
9502     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9503     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9504       exit (1);
9505     }
9506   return EXCEPTION_CONTINUE_SEARCH;
9507 }
9508 static void
9509 nocrash_init (void)
9510 {
9511   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9512 }
9513 #else
9514 /* Avoid a crash on POSIX systems.  */
9515 #include <signal.h>
9516 /* A POSIX signal handler.  */
9517 static void
9518 exception_handler (int sig)
9519 {
9520   exit (1);
9521 }
9522 static void
9523 nocrash_init (void)
9524 {
9525 #ifdef SIGSEGV
9526   signal (SIGSEGV, exception_handler);
9527 #endif
9528 #ifdef SIGBUS
9529   signal (SIGBUS, exception_handler);
9530 #endif
9531 }
9532 #endif
9533
9534 #include <float.h>
9535 #include <stdio.h>
9536 #include <string.h>
9537 static int
9538 strisnan (const char *string, size_t start_index, size_t end_index)
9539 {
9540   if (start_index < end_index)
9541     {
9542       if (string[start_index] == '-')
9543         start_index++;
9544       if (start_index + 3 <= end_index
9545           && memcmp (string + start_index, "nan", 3) == 0)
9546         {
9547           start_index += 3;
9548           if (start_index == end_index
9549               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9550             return 1;
9551         }
9552     }
9553   return 0;
9554 }
9555 static char buf[10000];
9556 static long double zeroL = 0.0L;
9557 int main ()
9558 {
9559   int result = 0;
9560   nocrash_init();
9561   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9562       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9563     result |= 1;
9564   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9565       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9566     result |= 1;
9567   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9568       || !strisnan (buf, 0, strlen (buf)))
9569     result |= 1;
9570   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9571       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9572     result |= 1;
9573   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9574       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9575     result |= 1;
9576   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9577       || !strisnan (buf, 0, strlen (buf)))
9578     result |= 1;
9579   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9580       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9581     result |= 1;
9582   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9583       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9584     result |= 1;
9585   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9586       || !strisnan (buf, 0, strlen (buf)))
9587     result |= 1;
9588 #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
9589 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9590    of 'unsigned int' words.  */
9591 # ifdef WORDS_BIGENDIAN
9592 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9593      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9594        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
9595        (unsigned int) (mantlo) << 16                                        \
9596      }
9597 # else
9598 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9599      { mantlo, manthi, exponent }
9600 # endif
9601   { /* Quiet NaN.  */
9602     static union { unsigned int word[4]; long double value; } x =
9603       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9604     if (sprintf (buf, "%Lf", x.value) < 0
9605         || !strisnan (buf, 0, strlen (buf)))
9606       result |= 2;
9607     if (sprintf (buf, "%Le", x.value) < 0
9608         || !strisnan (buf, 0, strlen (buf)))
9609       result |= 2;
9610     if (sprintf (buf, "%Lg", x.value) < 0
9611         || !strisnan (buf, 0, strlen (buf)))
9612       result |= 2;
9613   }
9614   {
9615     /* Signalling NaN.  */
9616     static union { unsigned int word[4]; long double value; } x =
9617       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9618     if (sprintf (buf, "%Lf", x.value) < 0
9619         || !strisnan (buf, 0, strlen (buf)))
9620       result |= 2;
9621     if (sprintf (buf, "%Le", x.value) < 0
9622         || !strisnan (buf, 0, strlen (buf)))
9623       result |= 2;
9624     if (sprintf (buf, "%Lg", x.value) < 0
9625         || !strisnan (buf, 0, strlen (buf)))
9626       result |= 2;
9627   }
9628   { /* Pseudo-NaN.  */
9629     static union { unsigned int word[4]; long double value; } x =
9630       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9631     if (sprintf (buf, "%Lf", x.value) < 0
9632         || !strisnan (buf, 0, strlen (buf)))
9633       result |= 4;
9634     if (sprintf (buf, "%Le", x.value) < 0
9635         || !strisnan (buf, 0, strlen (buf)))
9636       result |= 4;
9637     if (sprintf (buf, "%Lg", x.value) < 0
9638         || !strisnan (buf, 0, strlen (buf)))
9639       result |= 4;
9640   }
9641   { /* Pseudo-Infinity.  */
9642     static union { unsigned int word[4]; long double value; } x =
9643       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9644     if (sprintf (buf, "%Lf", x.value) < 0
9645         || !strisnan (buf, 0, strlen (buf)))
9646       result |= 8;
9647     if (sprintf (buf, "%Le", x.value) < 0
9648         || !strisnan (buf, 0, strlen (buf)))
9649       result |= 8;
9650     if (sprintf (buf, "%Lg", x.value) < 0
9651         || !strisnan (buf, 0, strlen (buf)))
9652       result |= 8;
9653   }
9654   { /* Pseudo-Zero.  */
9655     static union { unsigned int word[4]; long double value; } x =
9656       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
9657     if (sprintf (buf, "%Lf", x.value) < 0
9658         || !strisnan (buf, 0, strlen (buf)))
9659       result |= 16;
9660     if (sprintf (buf, "%Le", x.value) < 0
9661         || !strisnan (buf, 0, strlen (buf)))
9662       result |= 16;
9663     if (sprintf (buf, "%Lg", x.value) < 0
9664         || !strisnan (buf, 0, strlen (buf)))
9665       result |= 16;
9666   }
9667   { /* Unnormalized number.  */
9668     static union { unsigned int word[4]; long double value; } x =
9669       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
9670     if (sprintf (buf, "%Lf", x.value) < 0
9671         || !strisnan (buf, 0, strlen (buf)))
9672       result |= 32;
9673     if (sprintf (buf, "%Le", x.value) < 0
9674         || !strisnan (buf, 0, strlen (buf)))
9675       result |= 32;
9676     if (sprintf (buf, "%Lg", x.value) < 0
9677         || !strisnan (buf, 0, strlen (buf)))
9678       result |= 32;
9679   }
9680   { /* Pseudo-Denormal.  */
9681     static union { unsigned int word[4]; long double value; } x =
9682       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
9683     if (sprintf (buf, "%Lf", x.value) < 0
9684         || !strisnan (buf, 0, strlen (buf)))
9685       result |= 64;
9686     if (sprintf (buf, "%Le", x.value) < 0
9687         || !strisnan (buf, 0, strlen (buf)))
9688       result |= 64;
9689     if (sprintf (buf, "%Lg", x.value) < 0
9690         || !strisnan (buf, 0, strlen (buf)))
9691       result |= 64;
9692   }
9693 #endif
9694   return result;
9695 }
9696 _ACEOF
9697 if ac_fn_c_try_run "$LINENO"; then :
9698   gl_cv_func_printf_infinite_long_double=yes
9699 else
9700   gl_cv_func_printf_infinite_long_double=no
9701 fi
9702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9703   conftest.$ac_objext conftest.beam conftest.$ac_ext
9704 fi
9705
9706
9707 fi
9708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
9709 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
9710       ;;
9711     *)
9712       gl_cv_func_printf_infinite_long_double="irrelevant"
9713       ;;
9714   esac
9715
9716
9717
9718      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
9719 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
9720 if ${gl_cv_func_printf_directive_a+:} false; then :
9721   printf %s "(cached) " >&6
9722 else
9723
9724       if test "$cross_compiling" = yes; then :
9725
9726          case "$host_os" in
9727                                  # Guess yes on glibc >= 2.5 systems.
9728            *-gnu*)
9729              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730 /* end confdefs.h.  */
9731
9732                #include <features.h>
9733                #ifdef __GNU_LIBRARY__
9734                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
9735                  BZ2908
9736                 #endif
9737                #endif
9738
9739 _ACEOF
9740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9741   $EGREP "BZ2908" >/dev/null 2>&1; then :
9742   gl_cv_func_printf_directive_a="guessing yes"
9743 else
9744   gl_cv_func_printf_directive_a="guessing no"
9745 fi
9746 rm -rf conftest*
9747
9748              ;;
9749                                  # If we don't know, assume the worst.
9750            *)                    gl_cv_func_printf_directive_a="guessing no";;
9751          esac
9752
9753 else
9754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9755 /* end confdefs.h.  */
9756
9757 #include <stdio.h>
9758 #include <string.h>
9759 static char buf[100];
9760 static double zero = 0.0;
9761 int main ()
9762 {
9763   int result = 0;
9764   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
9765       || (strcmp (buf, "0x1.922p+1 33") != 0
9766           && strcmp (buf, "0x3.244p+0 33") != 0
9767           && strcmp (buf, "0x6.488p-1 33") != 0
9768           && strcmp (buf, "0xc.91p-2 33") != 0))
9769     result |= 1;
9770   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
9771       || (strcmp (buf, "-0X1.922P+1 33") != 0
9772           && strcmp (buf, "-0X3.244P+0 33") != 0
9773           && strcmp (buf, "-0X6.488P-1 33") != 0
9774           && strcmp (buf, "-0XC.91P-2 33") != 0))
9775     result |= 2;
9776   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
9777   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
9778       || (strcmp (buf, "0x1.83p+0 33") != 0
9779           && strcmp (buf, "0x3.05p-1 33") != 0
9780           && strcmp (buf, "0x6.0ap-2 33") != 0
9781           && strcmp (buf, "0xc.14p-3 33") != 0))
9782     result |= 4;
9783   /* This catches a FreeBSD 6.1 bug.  See
9784      <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
9785   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
9786       || buf[0] == '0')
9787     result |= 8;
9788   /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
9789   if (sprintf (buf, "%.1a", 1.999) < 0
9790       || (strcmp (buf, "0x1.0p+1") != 0
9791           && strcmp (buf, "0x2.0p+0") != 0
9792           && strcmp (buf, "0x4.0p-1") != 0
9793           && strcmp (buf, "0x8.0p-2") != 0))
9794     result |= 16;
9795   /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
9796      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
9797   if (sprintf (buf, "%.1La", 1.999L) < 0
9798       || (strcmp (buf, "0x1.0p+1") != 0
9799           && strcmp (buf, "0x2.0p+0") != 0
9800           && strcmp (buf, "0x4.0p-1") != 0
9801           && strcmp (buf, "0x8.0p-2") != 0))
9802     result |= 32;
9803   return result;
9804 }
9805 _ACEOF
9806 if ac_fn_c_try_run "$LINENO"; then :
9807   gl_cv_func_printf_directive_a=yes
9808 else
9809   gl_cv_func_printf_directive_a=no
9810 fi
9811 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9812   conftest.$ac_objext conftest.beam conftest.$ac_ext
9813 fi
9814
9815
9816 fi
9817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
9818 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
9819
9820
9821
9822      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
9823 printf %s "checking whether printf supports the 'F' directive... " >&6; }
9824 if ${gl_cv_func_printf_directive_f+:} false; then :
9825   printf %s "(cached) " >&6
9826 else
9827
9828       if test "$cross_compiling" = yes; then :
9829
9830          case "$host_os" in
9831                                  # Guess yes on glibc systems.
9832            *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
9833                                  # Guess yes on FreeBSD >= 6.
9834            freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
9835            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
9836                                  # Guess yes on Mac OS X >= 10.3.
9837            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
9838            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
9839                                  # Guess yes on Solaris >= 2.10.
9840            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9841            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
9842                                  # If we don't know, assume the worst.
9843            *)                    gl_cv_func_printf_directive_f="guessing no";;
9844          esac
9845
9846 else
9847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9848 /* end confdefs.h.  */
9849
9850 #include <stdio.h>
9851 #include <string.h>
9852 static char buf[100];
9853 static double zero = 0.0;
9854 int main ()
9855 {
9856   int result = 0;
9857   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
9858       || strcmp (buf, "1234567.000000 33") != 0)
9859     result |= 1;
9860   if (sprintf (buf, "%F", 1.0 / zero) < 0
9861       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
9862     result |= 2;
9863   /* This catches a Cygwin 1.5.x bug.  */
9864   if (sprintf (buf, "%.F", 1234.0) < 0
9865       || strcmp (buf, "1234") != 0)
9866     result |= 4;
9867   return result;
9868 }
9869 _ACEOF
9870 if ac_fn_c_try_run "$LINENO"; then :
9871   gl_cv_func_printf_directive_f=yes
9872 else
9873   gl_cv_func_printf_directive_f=no
9874 fi
9875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9876   conftest.$ac_objext conftest.beam conftest.$ac_ext
9877 fi
9878
9879
9880 fi
9881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
9882 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
9883
9884
9885
9886      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
9887 printf %s "checking whether printf supports the 'n' directive... " >&6; }
9888 if ${gl_cv_func_printf_directive_n+:} false; then :
9889   printf %s "(cached) " >&6
9890 else
9891
9892       if test "$cross_compiling" = yes; then :
9893
9894          case "$host_os" in
9895            mingw*) gl_cv_func_printf_directive_n="guessing no";;
9896            *)      gl_cv_func_printf_directive_n="guessing yes";;
9897          esac
9898
9899 else
9900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9901 /* end confdefs.h.  */
9902
9903 #include <stdio.h>
9904 #include <stdlib.h>
9905 #include <string.h>
9906 #ifdef _MSC_VER
9907 /* See page about "Parameter Validation" on msdn.microsoft.com.  */
9908 static void cdecl
9909 invalid_parameter_handler (const wchar_t *expression,
9910                            const wchar_t *function,
9911                            const wchar_t *file, unsigned int line,
9912                            uintptr_t dummy)
9913 {
9914   exit (1);
9915 }
9916 #endif
9917 static char fmtstring[10];
9918 static char buf[100];
9919 int main ()
9920 {
9921   int count = -1;
9922 #ifdef _MSC_VER
9923   _set_invalid_parameter_handler (invalid_parameter_handler);
9924 #endif
9925   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
9926      support %n in format strings in read-only memory but not in writable
9927      memory.  */
9928   strcpy (fmtstring, "%d %n");
9929   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
9930       || strcmp (buf, "123 ") != 0
9931       || count != 4)
9932     return 1;
9933   return 0;
9934 }
9935 _ACEOF
9936 if ac_fn_c_try_run "$LINENO"; then :
9937   gl_cv_func_printf_directive_n=yes
9938 else
9939   gl_cv_func_printf_directive_n=no
9940 fi
9941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9942   conftest.$ac_objext conftest.beam conftest.$ac_ext
9943 fi
9944
9945
9946 fi
9947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
9948 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
9949
9950
9951
9952      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
9953 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
9954 if ${gl_cv_func_printf_directive_ls+:} false; then :
9955   printf %s "(cached) " >&6
9956 else
9957
9958       if test "$cross_compiling" = yes; then :
9959
9960          case "$host_os" in
9961            openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
9962            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
9963            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
9964            cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
9965            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
9966            *)               gl_cv_func_printf_directive_ls="guessing yes";;
9967          esac
9968
9969 else
9970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9971 /* end confdefs.h.  */
9972
9973 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9974    <wchar.h>.
9975    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9976    included before <wchar.h>.  */
9977 #include <stddef.h>
9978 #include <stdio.h>
9979 #include <time.h>
9980 #include <wchar.h>
9981 #include <string.h>
9982 int main ()
9983 {
9984   int result = 0;
9985   char buf[100];
9986   /* Test whether %ls works at all.
9987      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
9988      Cygwin 1.5.  */
9989   {
9990     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
9991     buf[0] = '\0';
9992     if (sprintf (buf, "%ls", wstring) < 0
9993         || strcmp (buf, "abc") != 0)
9994       result |= 1;
9995   }
9996   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
9997      assertion failure inside libc), but not on OpenBSD 4.0.  */
9998   {
9999     static const wchar_t wstring[] = { 'a', 0 };
10000     buf[0] = '\0';
10001     if (sprintf (buf, "%ls", wstring) < 0
10002         || strcmp (buf, "a") != 0)
10003       result |= 2;
10004   }
10005   /* Test whether precisions in %ls are supported as specified in ISO C 99
10006      section 7.19.6.1:
10007        "If a precision is specified, no more than that many bytes are written
10008         (including shift sequences, if any), and the array shall contain a
10009         null wide character if, to equal the multibyte character sequence
10010         length given by the precision, the function would need to access a
10011         wide character one past the end of the array."
10012      This test fails on Solaris 10.  */
10013   {
10014     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10015     buf[0] = '\0';
10016     if (sprintf (buf, "%.2ls", wstring) < 0
10017         || strcmp (buf, "ab") != 0)
10018       result |= 8;
10019   }
10020   return result;
10021 }
10022 _ACEOF
10023 if ac_fn_c_try_run "$LINENO"; then :
10024   gl_cv_func_printf_directive_ls=yes
10025 else
10026   gl_cv_func_printf_directive_ls=no
10027 fi
10028 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10029   conftest.$ac_objext conftest.beam conftest.$ac_ext
10030 fi
10031
10032
10033 fi
10034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10035 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10036
10037
10038
10039      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10040 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10041 if ${gl_cv_func_printf_positions+:} false; then :
10042   printf %s "(cached) " >&6
10043 else
10044
10045       if test "$cross_compiling" = yes; then :
10046
10047          case "$host_os" in
10048            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10049                          gl_cv_func_printf_positions="guessing no";;
10050            beos*)        gl_cv_func_printf_positions="guessing no";;
10051            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10052            *)            gl_cv_func_printf_positions="guessing yes";;
10053          esac
10054
10055 else
10056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057 /* end confdefs.h.  */
10058
10059 #include <stdio.h>
10060 #include <string.h>
10061 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10062    dollar expansion (possibly an autoconf bug).  */
10063 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10064 static char buf[100];
10065 int main ()
10066 {
10067   sprintf (buf, format, 33, 55);
10068   return (strcmp (buf, "55 33") != 0);
10069 }
10070 _ACEOF
10071 if ac_fn_c_try_run "$LINENO"; then :
10072   gl_cv_func_printf_positions=yes
10073 else
10074   gl_cv_func_printf_positions=no
10075 fi
10076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10077   conftest.$ac_objext conftest.beam conftest.$ac_ext
10078 fi
10079
10080
10081 fi
10082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10083 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10084
10085
10086
10087      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10088 printf %s "checking whether printf supports the grouping flag... " >&6; }
10089 if ${gl_cv_func_printf_flag_grouping+:} false; then :
10090   printf %s "(cached) " >&6
10091 else
10092
10093       if test "$cross_compiling" = yes; then :
10094
10095          case "$host_os" in
10096            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
10097            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
10098            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10099            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
10100          esac
10101
10102 else
10103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10104 /* end confdefs.h.  */
10105
10106 #include <stdio.h>
10107 #include <string.h>
10108 static char buf[100];
10109 int main ()
10110 {
10111   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10112       || buf[strlen (buf) - 1] != '9')
10113     return 1;
10114   return 0;
10115 }
10116 _ACEOF
10117 if ac_fn_c_try_run "$LINENO"; then :
10118   gl_cv_func_printf_flag_grouping=yes
10119 else
10120   gl_cv_func_printf_flag_grouping=no
10121 fi
10122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10123   conftest.$ac_objext conftest.beam conftest.$ac_ext
10124 fi
10125
10126
10127 fi
10128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10129 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10130
10131
10132
10133      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10134 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10135 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
10136   printf %s "(cached) " >&6
10137 else
10138
10139       if test "$cross_compiling" = yes; then :
10140
10141          case "$host_os" in
10142                     # Guess yes on HP-UX 11.
10143            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10144                     # Guess no on HP-UX 10 and older.
10145            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
10146                     # Guess yes otherwise.
10147            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
10148          esac
10149
10150 else
10151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10152 /* end confdefs.h.  */
10153
10154 #include <stdio.h>
10155 #include <string.h>
10156 static char buf[100];
10157 int main ()
10158 {
10159   /* Check that a '-' flag is not annihilated by a negative width.  */
10160   if (sprintf (buf, "a%-*sc", -3, "b") < 0
10161       || strcmp (buf, "ab  c") != 0)
10162     return 1;
10163   return 0;
10164 }
10165 _ACEOF
10166 if ac_fn_c_try_run "$LINENO"; then :
10167   gl_cv_func_printf_flag_leftadjust=yes
10168 else
10169   gl_cv_func_printf_flag_leftadjust=no
10170 fi
10171 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10172   conftest.$ac_objext conftest.beam conftest.$ac_ext
10173 fi
10174
10175
10176 fi
10177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10178 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10179
10180
10181
10182      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10183 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10184 if ${gl_cv_func_printf_flag_zero+:} false; then :
10185   printf %s "(cached) " >&6
10186 else
10187
10188       if test "$cross_compiling" = yes; then :
10189
10190          case "$host_os" in
10191                    # Guess yes on glibc systems.
10192            *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10193                    # Guess yes on BeOS.
10194            beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
10195                    # If we don't know, assume the worst.
10196            *)      gl_cv_func_printf_flag_zero="guessing no";;
10197          esac
10198
10199 else
10200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h.  */
10202
10203 #include <stdio.h>
10204 #include <string.h>
10205 static char buf[100];
10206 static double zero = 0.0;
10207 int main ()
10208 {
10209   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10210       || (strcmp (buf, "       inf") != 0
10211           && strcmp (buf, "  infinity") != 0))
10212     return 1;
10213   return 0;
10214 }
10215 _ACEOF
10216 if ac_fn_c_try_run "$LINENO"; then :
10217   gl_cv_func_printf_flag_zero=yes
10218 else
10219   gl_cv_func_printf_flag_zero=no
10220 fi
10221 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10222   conftest.$ac_objext conftest.beam conftest.$ac_ext
10223 fi
10224
10225
10226 fi
10227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10228 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10229
10230
10231
10232      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10233 printf %s "checking whether printf supports large precisions... " >&6; }
10234 if ${gl_cv_func_printf_precision+:} false; then :
10235   printf %s "(cached) " >&6
10236 else
10237
10238       if test "$cross_compiling" = yes; then :
10239
10240          case "$host_os" in
10241            # Guess no only on Solaris, native Windows, and BeOS systems.
10242            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
10243            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10244            beos*)        gl_cv_func_printf_precision="guessing no" ;;
10245            *)            gl_cv_func_printf_precision="guessing yes" ;;
10246          esac
10247
10248 else
10249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250 /* end confdefs.h.  */
10251
10252 #include <stdio.h>
10253 #include <string.h>
10254 static char buf[5000];
10255 int main ()
10256 {
10257   int result = 0;
10258 #ifdef __BEOS__
10259   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
10260   return 1;
10261 #endif
10262   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10263     result |= 1;
10264   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10265     result |= 2;
10266   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10267       || buf[0] != '1')
10268     result |= 4;
10269   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10270       || buf[0] != '1')
10271     result |= 4;
10272   return result;
10273 }
10274 _ACEOF
10275 if ac_fn_c_try_run "$LINENO"; then :
10276   gl_cv_func_printf_precision=yes
10277 else
10278   gl_cv_func_printf_precision=no
10279 fi
10280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10281   conftest.$ac_objext conftest.beam conftest.$ac_ext
10282 fi
10283
10284
10285 fi
10286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10287 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10288
10289
10290     gl_cv_c_multiarch=no
10291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10292 /* end confdefs.h.  */
10293 #ifndef __APPLE_CC__
10294          not a universal capable compiler
10295         #endif
10296         typedef int dummy;
10297
10298 _ACEOF
10299 if ac_fn_c_try_compile "$LINENO"; then :
10300
10301                arch=
10302      prev=
10303      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10304        if test -n "$prev"; then
10305          case $word in
10306            i?86 | x86_64 | ppc | ppc64)
10307              if test -z "$arch" || test "$arch" = "$word"; then
10308                arch="$word"
10309              else
10310                gl_cv_c_multiarch=yes
10311              fi
10312              ;;
10313          esac
10314          prev=
10315        else
10316          if test "x$word" = "x-arch"; then
10317            prev=arch
10318          fi
10319        fi
10320      done
10321
10322 fi
10323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10324   if test $gl_cv_c_multiarch = yes; then
10325     APPLE_UNIVERSAL_BUILD=1
10326   else
10327     APPLE_UNIVERSAL_BUILD=0
10328   fi
10329
10330
10331
10332
10333
10334      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10335 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10336 if ${gl_cv_func_printf_enomem+:} false; then :
10337   printf %s "(cached) " >&6
10338 else
10339
10340       gl_cv_func_printf_enomem="guessing no"
10341       if test "$cross_compiling" = no; then
10342         if test $APPLE_UNIVERSAL_BUILD = 0; then
10343           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344 /* end confdefs.h.  */
10345
10346
10347 #include <stdlib.h>
10348 #if defined __MACH__ && defined __APPLE__
10349 /* Avoid a crash on Mac OS X.  */
10350 #include <mach/mach.h>
10351 #include <mach/mach_error.h>
10352 #include <mach/thread_status.h>
10353 #include <mach/exception.h>
10354 #include <mach/task.h>
10355 #include <pthread.h>
10356 /* The exception port on which our thread listens.  */
10357 static mach_port_t our_exception_port;
10358 /* The main function of the thread listening for exceptions of type
10359    EXC_BAD_ACCESS.  */
10360 static void *
10361 mach_exception_thread (void *arg)
10362 {
10363   /* Buffer for a message to be received.  */
10364   struct {
10365     mach_msg_header_t head;
10366     mach_msg_body_t msgh_body;
10367     char data1024;
10368   } msg;
10369   mach_msg_return_t retval;
10370   /* Wait for a message on the exception port.  */
10371   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10372                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10373   if (retval != MACH_MSG_SUCCESS)
10374     abort ();
10375   exit (1);
10376 }
10377 static void
10378 nocrash_init (void)
10379 {
10380   mach_port_t self = mach_task_self ();
10381   /* Allocate a port on which the thread shall listen for exceptions.  */
10382   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10383       == KERN_SUCCESS) {
10384     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10385     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10386                                 MACH_MSG_TYPE_MAKE_SEND)
10387         == KERN_SUCCESS) {
10388       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10389          for us.  */
10390       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10391       /* Create the thread listening on the exception port.  */
10392       pthread_attr_t attr;
10393       pthread_t thread;
10394       if (pthread_attr_init (&attr) == 0
10395           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10396           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10397         pthread_attr_destroy (&attr);
10398         /* Replace the exception port info for these exceptions with our own.
10399            Note that we replace the exception port for the entire task, not only
10400            for a particular thread.  This has the effect that when our exception
10401            port gets the message, the thread specific exception port has already
10402            been asked, and we don't need to bother about it.
10403            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10404         task_set_exception_ports (self, mask, our_exception_port,
10405                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10406       }
10407     }
10408   }
10409 }
10410 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10411 /* Avoid a crash on native Windows.  */
10412 #define WIN32_LEAN_AND_MEAN
10413 #include <windows.h>
10414 #include <winerror.h>
10415 static LONG WINAPI
10416 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10417 {
10418   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10419     {
10420     case EXCEPTION_ACCESS_VIOLATION:
10421     case EXCEPTION_IN_PAGE_ERROR:
10422     case EXCEPTION_STACK_OVERFLOW:
10423     case EXCEPTION_GUARD_PAGE:
10424     case EXCEPTION_PRIV_INSTRUCTION:
10425     case EXCEPTION_ILLEGAL_INSTRUCTION:
10426     case EXCEPTION_DATATYPE_MISALIGNMENT:
10427     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10428     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10429       exit (1);
10430     }
10431   return EXCEPTION_CONTINUE_SEARCH;
10432 }
10433 static void
10434 nocrash_init (void)
10435 {
10436   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10437 }
10438 #else
10439 /* Avoid a crash on POSIX systems.  */
10440 #include <signal.h>
10441 /* A POSIX signal handler.  */
10442 static void
10443 exception_handler (int sig)
10444 {
10445   exit (1);
10446 }
10447 static void
10448 nocrash_init (void)
10449 {
10450 #ifdef SIGSEGV
10451   signal (SIGSEGV, exception_handler);
10452 #endif
10453 #ifdef SIGBUS
10454   signal (SIGBUS, exception_handler);
10455 #endif
10456 }
10457 #endif
10458
10459 #include <stdio.h>
10460 #include <sys/types.h>
10461 #include <sys/time.h>
10462 #include <sys/resource.h>
10463 #include <errno.h>
10464 int main()
10465 {
10466   struct rlimit limit;
10467   int ret;
10468   nocrash_init ();
10469   /* Some printf implementations allocate temporary space with malloc.  */
10470   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
10471 #ifdef RLIMIT_DATA
10472   if (getrlimit (RLIMIT_DATA, &limit) < 0)
10473     return 77;
10474   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10475     limit.rlim_max = 5000000;
10476   limit.rlim_cur = limit.rlim_max;
10477   if (setrlimit (RLIMIT_DATA, &limit) < 0)
10478     return 77;
10479 #endif
10480   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
10481 #ifdef RLIMIT_AS
10482   if (getrlimit (RLIMIT_AS, &limit) < 0)
10483     return 77;
10484   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10485     limit.rlim_max = 5000000;
10486   limit.rlim_cur = limit.rlim_max;
10487   if (setrlimit (RLIMIT_AS, &limit) < 0)
10488     return 77;
10489 #endif
10490   /* Some printf implementations allocate temporary space on the stack.  */
10491 #ifdef RLIMIT_STACK
10492   if (getrlimit (RLIMIT_STACK, &limit) < 0)
10493     return 77;
10494   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10495     limit.rlim_max = 5000000;
10496   limit.rlim_cur = limit.rlim_max;
10497   if (setrlimit (RLIMIT_STACK, &limit) < 0)
10498     return 77;
10499 #endif
10500   ret = printf ("%.5000000f", 1.0);
10501   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10502 }
10503
10504 _ACEOF
10505           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10506   (eval $ac_link) 2>&5
10507   ac_status=$?
10508   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10509   test $ac_status = 0; } && test -s conftest$ac_exeext; then
10510             (./conftest 2>&5
10511              result=$?
10512              printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10513              if test $result != 0 && test $result != 77; then result=1; fi
10514              exit $result
10515             ) >/dev/null 2>/dev/null
10516             case $? in
10517               0) gl_cv_func_printf_enomem="yes" ;;
10518               77) gl_cv_func_printf_enomem="guessing no" ;;
10519               *) gl_cv_func_printf_enomem="no" ;;
10520             esac
10521           else
10522             gl_cv_func_printf_enomem="guessing no"
10523           fi
10524           rm -fr conftest*
10525         else
10526                                         gl_cv_func_printf_enomem="guessing no"
10527         fi
10528       fi
10529       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10530         case "$host_os" in
10531                     # Guess yes on glibc systems.
10532           *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
10533                     # Guess yes on Solaris.
10534           solaris*) gl_cv_func_printf_enomem="guessing yes";;
10535                     # Guess yes on AIX.
10536           aix*)     gl_cv_func_printf_enomem="guessing yes";;
10537                     # Guess yes on HP-UX/hppa.
10538           hpux*)    case "$host_cpu" in
10539                       hppa*) gl_cv_func_printf_enomem="guessing yes";;
10540                       *)     gl_cv_func_printf_enomem="guessing no";;
10541                     esac
10542                     ;;
10543                     # Guess yes on IRIX.
10544           irix*)    gl_cv_func_printf_enomem="guessing yes";;
10545                     # Guess yes on OSF/1.
10546           osf*)     gl_cv_func_printf_enomem="guessing yes";;
10547                     # Guess yes on BeOS.
10548           beos*)    gl_cv_func_printf_enomem="guessing yes";;
10549                     # Guess yes on Haiku.
10550           haiku*)   gl_cv_func_printf_enomem="guessing yes";;
10551                     # If we don't know, assume the worst.
10552           *)        gl_cv_func_printf_enomem="guessing no";;
10553         esac
10554       fi
10555
10556 fi
10557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10558 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
10559
10560
10561
10562   case "$gl_cv_func_printf_long_double" in
10563     *yes)
10564       ;;
10565     *)
10566
10567 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10568
10569       ;;
10570   esac
10571
10572
10573
10574
10575   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10576 printf %s "checking for unsigned long long int... " >&6; }
10577 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
10578   printf %s "(cached) " >&6
10579 else
10580   ac_cv_type_unsigned_long_long_int=yes
10581      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10582        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583 /* end confdefs.h.  */
10584
10585   /* For now, do not test the preprocessor; as of 2007 there are too many
10586          implementations with broken preprocessors.  Perhaps this can
10587          be revisited in 2012.  In the meantime, code should not expect
10588          #if to work with literals wider than 32 bits.  */
10589       /* Test literals.  */
10590       long long int ll = 9223372036854775807ll;
10591       long long int nll = -9223372036854775807LL;
10592       unsigned long long int ull = 18446744073709551615ULL;
10593       /* Test constant expressions.   */
10594       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10595                      ? 1 : -1)];
10596       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10597                      ? 1 : -1)];
10598       int i = 63;
10599 int
10600 main ()
10601 {
10602 /* Test availability of runtime routines for shift and division.  */
10603       long long int llmax = 9223372036854775807ll;
10604       unsigned long long int ullmax = 18446744073709551615ull;
10605       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10606               | (llmax / ll) | (llmax % ll)
10607               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10608               | (ullmax / ull) | (ullmax % ull));
10609   ;
10610   return 0;
10611 }
10612
10613 _ACEOF
10614 if ac_fn_c_try_link "$LINENO"; then :
10615
10616 else
10617   ac_cv_type_unsigned_long_long_int=no
10618 fi
10619 rm -f core conftest.err conftest.$ac_objext \
10620     conftest$ac_exeext conftest.$ac_ext
10621      fi
10622 fi
10623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10624 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
10625   if test $ac_cv_type_unsigned_long_long_int = yes; then
10626
10627 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10628
10629   fi
10630
10631
10632
10633   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10634 printf %s "checking for long long int... " >&6; }
10635 if ${ac_cv_type_long_long_int+:} false; then :
10636   printf %s "(cached) " >&6
10637 else
10638   ac_cv_type_long_long_int=yes
10639       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10640         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10641         if test $ac_cv_type_long_long_int = yes; then
10642                                         if test "$cross_compiling" = yes; then :
10643   :
10644 else
10645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10646 /* end confdefs.h.  */
10647 #include <limits.h>
10648                  #ifndef LLONG_MAX
10649                  # define HALF \
10650                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10651                  # define LLONG_MAX (HALF - 1 + HALF)
10652                  #endif
10653 int
10654 main ()
10655 {
10656 long long int n = 1;
10657                  int i;
10658                  for (i = 0; ; i++)
10659                    {
10660                      long long int m = n << i;
10661                      if (m >> i != n)
10662                        return 1;
10663                      if (LLONG_MAX / 2 < m)
10664                        break;
10665                    }
10666                  return 0;
10667   ;
10668   return 0;
10669 }
10670 _ACEOF
10671 if ac_fn_c_try_run "$LINENO"; then :
10672
10673 else
10674   ac_cv_type_long_long_int=no
10675 fi
10676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10677   conftest.$ac_objext conftest.beam conftest.$ac_ext
10678 fi
10679
10680         fi
10681       fi
10682 fi
10683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10684 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
10685   if test $ac_cv_type_long_long_int = yes; then
10686
10687 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10688
10689   fi
10690
10691
10692   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10693 printf %s "checking for wchar_t... " >&6; }
10694 if ${gt_cv_c_wchar_t+:} false; then :
10695   printf %s "(cached) " >&6
10696 else
10697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10698 /* end confdefs.h.  */
10699 #include <stddef.h>
10700             wchar_t foo = (wchar_t)'\0';
10701 int
10702 main ()
10703 {
10704
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 if ac_fn_c_try_compile "$LINENO"; then :
10710   gt_cv_c_wchar_t=yes
10711 else
10712   gt_cv_c_wchar_t=no
10713 fi
10714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10715 fi
10716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10717 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
10718   if test $gt_cv_c_wchar_t = yes; then
10719
10720 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
10721
10722   fi
10723
10724
10725   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
10726 printf %s "checking for wint_t... " >&6; }
10727 if ${gt_cv_c_wint_t+:} false; then :
10728   printf %s "(cached) " >&6
10729 else
10730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10731 /* end confdefs.h.  */
10732
10733 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10734    <wchar.h>.
10735    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
10736    before <wchar.h>.  */
10737 #include <stddef.h>
10738 #include <stdio.h>
10739 #include <time.h>
10740 #include <wchar.h>
10741             wint_t foo = (wchar_t)'\0';
10742 int
10743 main ()
10744 {
10745
10746   ;
10747   return 0;
10748 }
10749 _ACEOF
10750 if ac_fn_c_try_compile "$LINENO"; then :
10751   gt_cv_c_wint_t=yes
10752 else
10753   gt_cv_c_wint_t=no
10754 fi
10755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10756 fi
10757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
10758 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
10759   if test $gt_cv_c_wint_t = yes; then
10760
10761 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
10762
10763   fi
10764
10765
10766
10767
10768
10769   if test $ac_cv_header_features_h = yes; then
10770     HAVE_FEATURES_H=1
10771   else
10772     HAVE_FEATURES_H=0
10773   fi
10774
10775
10776
10777
10778
10779   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
10780 printf %s "checking for intmax_t... " >&6; }
10781 if ${gt_cv_c_intmax_t+:} false; then :
10782   printf %s "(cached) " >&6
10783 else
10784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10785 /* end confdefs.h.  */
10786
10787 #include <stddef.h>
10788 #include <stdlib.h>
10789 #if HAVE_STDINT_H_WITH_UINTMAX
10790 #include <stdint.h>
10791 #endif
10792 #if HAVE_INTTYPES_H_WITH_UINTMAX
10793 #include <inttypes.h>
10794 #endif
10795
10796 int
10797 main ()
10798 {
10799 intmax_t x = -1; return !x;
10800   ;
10801   return 0;
10802 }
10803 _ACEOF
10804 if ac_fn_c_try_compile "$LINENO"; then :
10805   gt_cv_c_intmax_t=yes
10806 else
10807   gt_cv_c_intmax_t=no
10808 fi
10809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10810 fi
10811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
10812 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
10813   if test $gt_cv_c_intmax_t = yes; then
10814
10815 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
10816
10817   else
10818
10819     test $ac_cv_type_long_long_int = yes \
10820       && ac_type='long long' \
10821       || ac_type='long'
10822
10823 cat >>confdefs.h <<_ACEOF
10824 #define intmax_t $ac_type
10825 _ACEOF
10826
10827   fi
10828
10829
10830   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10831 printf %s "checking where to find the exponent in a 'double'... " >&6; }
10832 if ${gl_cv_cc_double_expbit0+:} false; then :
10833   printf %s "(cached) " >&6
10834 else
10835
10836       if test "$cross_compiling" = yes; then :
10837
10838                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10839 /* end confdefs.h.  */
10840
10841 #if defined arm || defined __arm || defined __arm__
10842   mixed_endianness
10843 #endif
10844
10845 _ACEOF
10846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10847   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10848   gl_cv_cc_double_expbit0="unknown"
10849 else
10850
10851                                                          :
10852 if ${ac_cv_c_bigendian+:} false; then :
10853   printf %s "(cached) " >&6
10854 else
10855   ac_cv_c_bigendian=unknown
10856     # See if we're dealing with a universal compiler.
10857     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10858 /* end confdefs.h.  */
10859 #ifndef __APPLE_CC__
10860                not a universal capable compiler
10861              #endif
10862              typedef int dummy;
10863
10864 _ACEOF
10865 if ac_fn_c_try_compile "$LINENO"; then :
10866
10867         # Check for potential -arch flags.  It is not universal unless
10868         # there are at least two -arch flags with different values.
10869         ac_arch=
10870         ac_prev=
10871         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10872          if test -n "$ac_prev"; then
10873            case $ac_word in
10874              i?86 | x86_64 | ppc | ppc64)
10875                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10876                  ac_arch=$ac_word
10877                else
10878                  ac_cv_c_bigendian=universal
10879                  break
10880                fi
10881                ;;
10882            esac
10883            ac_prev=
10884          elif test "x$ac_word" = "x-arch"; then
10885            ac_prev=arch
10886          fi
10887        done
10888 fi
10889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890     if test $ac_cv_c_bigendian = unknown; then
10891       # See if sys/param.h defines the BYTE_ORDER macro.
10892       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10893 /* end confdefs.h.  */
10894 #include <sys/types.h>
10895              #include <sys/param.h>
10896
10897 int
10898 main ()
10899 {
10900 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10901                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10902                      && LITTLE_ENDIAN)
10903               bogus endian macros
10904              #endif
10905
10906   ;
10907   return 0;
10908 }
10909 _ACEOF
10910 if ac_fn_c_try_compile "$LINENO"; then :
10911   # It does; now see whether it defined to BIG_ENDIAN or not.
10912          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h.  */
10914 #include <sys/types.h>
10915                 #include <sys/param.h>
10916
10917 int
10918 main ()
10919 {
10920 #if BYTE_ORDER != BIG_ENDIAN
10921                  not big endian
10922                 #endif
10923
10924   ;
10925   return 0;
10926 }
10927 _ACEOF
10928 if ac_fn_c_try_compile "$LINENO"; then :
10929   ac_cv_c_bigendian=yes
10930 else
10931   ac_cv_c_bigendian=no
10932 fi
10933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934 fi
10935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10936     fi
10937     if test $ac_cv_c_bigendian = unknown; then
10938       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10939       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940 /* end confdefs.h.  */
10941 #include <limits.h>
10942
10943 int
10944 main ()
10945 {
10946 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10947               bogus endian macros
10948              #endif
10949
10950   ;
10951   return 0;
10952 }
10953 _ACEOF
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955   # It does; now see whether it defined to _BIG_ENDIAN or not.
10956          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10957 /* end confdefs.h.  */
10958 #include <limits.h>
10959
10960 int
10961 main ()
10962 {
10963 #ifndef _BIG_ENDIAN
10964                  not big endian
10965                 #endif
10966
10967   ;
10968   return 0;
10969 }
10970 _ACEOF
10971 if ac_fn_c_try_compile "$LINENO"; then :
10972   ac_cv_c_bigendian=yes
10973 else
10974   ac_cv_c_bigendian=no
10975 fi
10976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977 fi
10978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979     fi
10980     if test $ac_cv_c_bigendian = unknown; then
10981       # Compile a test program.
10982       if test "$cross_compiling" = yes; then :
10983   # Try to guess by grepping values from an object file.
10984          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985 /* end confdefs.h.  */
10986 short int ascii_mm[] =
10987                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10988                 short int ascii_ii[] =
10989                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10990                 int use_ascii (int i) {
10991                   return ascii_mm[i] + ascii_ii[i];
10992                 }
10993                 short int ebcdic_ii[] =
10994                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10995                 short int ebcdic_mm[] =
10996                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10997                 int use_ebcdic (int i) {
10998                   return ebcdic_mm[i] + ebcdic_ii[i];
10999                 }
11000                 extern int foo;
11001
11002 int
11003 main ()
11004 {
11005 return use_ascii (foo) == use_ebcdic (foo);
11006   ;
11007   return 0;
11008 }
11009 _ACEOF
11010 if ac_fn_c_try_compile "$LINENO"; then :
11011   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11012               ac_cv_c_bigendian=yes
11013             fi
11014             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11015               if test "$ac_cv_c_bigendian" = unknown; then
11016                 ac_cv_c_bigendian=no
11017               else
11018                 # finding both strings is unlikely to happen, but who knows?
11019                 ac_cv_c_bigendian=unknown
11020               fi
11021             fi
11022 fi
11023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11024 else
11025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h.  */
11027 $ac_includes_default
11028 int
11029 main ()
11030 {
11031
11032              /* Are we little or big endian?  From Harbison&Steele.  */
11033              union
11034              {
11035                long int l;
11036                char c[sizeof (long int)];
11037              } u;
11038              u.l = 1;
11039              return u.c[sizeof (long int) - 1] == 1;
11040
11041   ;
11042   return 0;
11043 }
11044 _ACEOF
11045 if ac_fn_c_try_run "$LINENO"; then :
11046   ac_cv_c_bigendian=no
11047 else
11048   ac_cv_c_bigendian=yes
11049 fi
11050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11051   conftest.$ac_objext conftest.beam conftest.$ac_ext
11052 fi
11053
11054     fi
11055 fi
11056 :
11057  case $ac_cv_c_bigendian in #(
11058    yes)
11059      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11060    no)
11061      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11062    universal)
11063
11064 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11065
11066      ;; #(
11067    *)
11068      gl_cv_cc_double_expbit0="unknown" ;;
11069  esac
11070
11071
11072 fi
11073 rm -rf conftest*
11074
11075
11076 else
11077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11078 /* end confdefs.h.  */
11079
11080 #include <float.h>
11081 #include <stddef.h>
11082 #include <stdio.h>
11083 #include <string.h>
11084 #define NWORDS \
11085   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11086 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11087 static unsigned int ored_words[NWORDS];
11088 static unsigned int anded_words[NWORDS];
11089 static void add_to_ored_words (double x)
11090 {
11091   memory_double m;
11092   size_t i;
11093   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
11094   memset (&m, 0, sizeof (memory_double));
11095   m.value = x;
11096   for (i = 0; i < NWORDS; i++)
11097     {
11098       ored_words[i] |= m.word[i];
11099       anded_words[i] &= m.word[i];
11100     }
11101 }
11102 int main ()
11103 {
11104   size_t j;
11105   FILE *fp = fopen ("conftest.out", "w");
11106   if (fp == NULL)
11107     return 1;
11108   for (j = 0; j < NWORDS; j++)
11109     anded_words[j] = ~ (unsigned int) 0;
11110   add_to_ored_words (0.25);
11111   add_to_ored_words (0.5);
11112   add_to_ored_words (1.0);
11113   add_to_ored_words (2.0);
11114   add_to_ored_words (4.0);
11115   /* Remove bits that are common (e.g. if representation of the first mantissa
11116      bit is explicit).  */
11117   for (j = 0; j < NWORDS; j++)
11118     ored_words[j] &= ~anded_words[j];
11119   /* Now find the nonzero word.  */
11120   for (j = 0; j < NWORDS; j++)
11121     if (ored_words[j] != 0)
11122       break;
11123   if (j < NWORDS)
11124     {
11125       size_t i;
11126       for (i = j + 1; i < NWORDS; i++)
11127         if (ored_words[i] != 0)
11128           {
11129             fprintf (fp, "unknown");
11130             return (fclose (fp) != 0);
11131           }
11132       for (i = 0; ; i++)
11133         if ((ored_words[j] >> i) & 1)
11134           {
11135             fprintf (fp, "word %d bit %d", (int) j, (int) i);
11136             return (fclose (fp) != 0);
11137           }
11138     }
11139   fprintf (fp, "unknown");
11140   return (fclose (fp) != 0);
11141 }
11142
11143 _ACEOF
11144 if ac_fn_c_try_run "$LINENO"; then :
11145   gl_cv_cc_double_expbit0=`cat conftest.out`
11146 else
11147   gl_cv_cc_double_expbit0="unknown"
11148 fi
11149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11150   conftest.$ac_objext conftest.beam conftest.$ac_ext
11151 fi
11152
11153       rm -f conftest.out
11154
11155 fi
11156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11157 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11158   case "$gl_cv_cc_double_expbit0" in
11159     word*bit*)
11160       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11161       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11162
11163 cat >>confdefs.h <<_ACEOF
11164 #define DBL_EXPBIT0_WORD $word
11165 _ACEOF
11166
11167
11168 cat >>confdefs.h <<_ACEOF
11169 #define DBL_EXPBIT0_BIT $bit
11170 _ACEOF
11171
11172       ;;
11173   esac
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11184 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11185 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
11186   printf %s "(cached) " >&6
11187 else
11188
11189       if test "$cross_compiling" = yes; then :
11190
11191          case "$host_os" in
11192                                  # Guess yes on glibc systems.
11193            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
11194                                  # Guess yes on FreeBSD >= 5.
11195            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
11196            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11197                                  # Guess yes on Mac OS X >= 10.3.
11198            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
11199            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11200                                  # Guess yes on OpenBSD >= 3.9.
11201            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11202                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11203            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
11204                                  # Guess yes on Solaris >= 2.10.
11205            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11206            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
11207                                  # Guess yes on AIX >= 4.
11208            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
11209            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
11210                                  # Guess yes on NetBSD >= 3.
11211            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11212                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11213            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11214                                  # Guess yes on BeOS.
11215            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
11216                                  # If we don't know, assume the worst.
11217            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
11218          esac
11219
11220 else
11221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11222 /* end confdefs.h.  */
11223
11224 #include <stdio.h>
11225 #include <string.h>
11226 #if HAVE_SNPRINTF
11227 # define my_snprintf snprintf
11228 #else
11229 # include <stdarg.h>
11230 static int my_snprintf (char *buf, int size, const char *format, ...)
11231 {
11232   va_list args;
11233   int ret;
11234   va_start (args, format);
11235   ret = vsnprintf (buf, size, format, args);
11236   va_end (args);
11237   return ret;
11238 }
11239 #endif
11240 static char buf[100];
11241 int main ()
11242 {
11243   strcpy (buf, "ABCDEF");
11244   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11245     return 1;
11246   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11247     return 2;
11248   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11249     return 3;
11250   return 0;
11251 }
11252 _ACEOF
11253 if ac_fn_c_try_run "$LINENO"; then :
11254   gl_cv_func_snprintf_retval_c99=yes
11255 else
11256   gl_cv_func_snprintf_retval_c99=no
11257 fi
11258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11259   conftest.$ac_objext conftest.beam conftest.$ac_ext
11260 fi
11261
11262
11263 fi
11264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11265 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11266
11267
11268
11269
11270
11271
11272   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
11273 do :
11274   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
11275 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11276 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11277   cat >>confdefs.h <<_ACEOF
11278 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
11279 _ACEOF
11280
11281 fi
11282 done
11283
11284       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11285 "
11286 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
11287   ac_have_decl=1
11288 else
11289   ac_have_decl=0
11290 fi
11291
11292 cat >>confdefs.h <<_ACEOF
11293 #define HAVE_DECL__SNPRINTF $ac_have_decl
11294 _ACEOF
11295
11296
11297
11298   case "$gl_cv_func_snprintf_retval_c99" in
11299     *yes)
11300
11301 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11302
11303       ;;
11304   esac
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315   GNULIB_ACOSF=0;
11316   GNULIB_ACOSL=0;
11317   GNULIB_ASINF=0;
11318   GNULIB_ASINL=0;
11319   GNULIB_ATANF=0;
11320   GNULIB_ATANL=0;
11321   GNULIB_ATAN2F=0;
11322   GNULIB_CBRT=0;
11323   GNULIB_CBRTF=0;
11324   GNULIB_CBRTL=0;
11325   GNULIB_CEIL=0;
11326   GNULIB_CEILF=0;
11327   GNULIB_CEILL=0;
11328   GNULIB_COPYSIGN=0;
11329   GNULIB_COPYSIGNF=0;
11330   GNULIB_COPYSIGNL=0;
11331   GNULIB_COSF=0;
11332   GNULIB_COSL=0;
11333   GNULIB_COSHF=0;
11334   GNULIB_EXPF=0;
11335   GNULIB_EXPL=0;
11336   GNULIB_EXP2=0;
11337   GNULIB_EXP2F=0;
11338   GNULIB_EXP2L=0;
11339   GNULIB_EXPM1=0;
11340   GNULIB_EXPM1F=0;
11341   GNULIB_EXPM1L=0;
11342   GNULIB_FABSF=0;
11343   GNULIB_FABSL=0;
11344   GNULIB_FLOOR=0;
11345   GNULIB_FLOORF=0;
11346   GNULIB_FLOORL=0;
11347   GNULIB_FMA=0;
11348   GNULIB_FMAF=0;
11349   GNULIB_FMAL=0;
11350   GNULIB_FMOD=0;
11351   GNULIB_FMODF=0;
11352   GNULIB_FMODL=0;
11353   GNULIB_FREXPF=0;
11354   GNULIB_FREXP=0;
11355   GNULIB_FREXPL=0;
11356   GNULIB_HYPOT=0;
11357   GNULIB_HYPOTF=0;
11358   GNULIB_HYPOTL=0;
11359   GNULIB_ILOGB=0;
11360   GNULIB_ILOGBF=0;
11361   GNULIB_ILOGBL=0;
11362   GNULIB_ISFINITE=0;
11363   GNULIB_ISINF=0;
11364   GNULIB_ISNAN=0;
11365   GNULIB_ISNANF=0;
11366   GNULIB_ISNAND=0;
11367   GNULIB_ISNANL=0;
11368   GNULIB_LDEXPF=0;
11369   GNULIB_LDEXPL=0;
11370   GNULIB_LOG=0;
11371   GNULIB_LOGF=0;
11372   GNULIB_LOGL=0;
11373   GNULIB_LOG10=0;
11374   GNULIB_LOG10F=0;
11375   GNULIB_LOG10L=0;
11376   GNULIB_LOG1P=0;
11377   GNULIB_LOG1PF=0;
11378   GNULIB_LOG1PL=0;
11379   GNULIB_LOG2=0;
11380   GNULIB_LOG2F=0;
11381   GNULIB_LOG2L=0;
11382   GNULIB_LOGB=0;
11383   GNULIB_LOGBF=0;
11384   GNULIB_LOGBL=0;
11385   GNULIB_MODF=0;
11386   GNULIB_MODFF=0;
11387   GNULIB_MODFL=0;
11388   GNULIB_POWF=0;
11389   GNULIB_REMAINDER=0;
11390   GNULIB_REMAINDERF=0;
11391   GNULIB_REMAINDERL=0;
11392   GNULIB_RINT=0;
11393   GNULIB_RINTF=0;
11394   GNULIB_RINTL=0;
11395   GNULIB_ROUND=0;
11396   GNULIB_ROUNDF=0;
11397   GNULIB_ROUNDL=0;
11398   GNULIB_SIGNBIT=0;
11399   GNULIB_SINF=0;
11400   GNULIB_SINL=0;
11401   GNULIB_SINHF=0;
11402   GNULIB_SQRTF=0;
11403   GNULIB_SQRTL=0;
11404   GNULIB_TANF=0;
11405   GNULIB_TANL=0;
11406   GNULIB_TANHF=0;
11407   GNULIB_TRUNC=0;
11408   GNULIB_TRUNCF=0;
11409   GNULIB_TRUNCL=0;
11410     HAVE_ACOSF=1;
11411   HAVE_ACOSL=1;
11412   HAVE_ASINF=1;
11413   HAVE_ASINL=1;
11414   HAVE_ATANF=1;
11415   HAVE_ATANL=1;
11416   HAVE_ATAN2F=1;
11417   HAVE_CBRT=1;
11418   HAVE_CBRTF=1;
11419   HAVE_CBRTL=1;
11420   HAVE_COPYSIGN=1;
11421   HAVE_COPYSIGNL=1;
11422   HAVE_COSF=1;
11423   HAVE_COSL=1;
11424   HAVE_COSHF=1;
11425   HAVE_EXPF=1;
11426   HAVE_EXPL=1;
11427   HAVE_EXPM1=1;
11428   HAVE_EXPM1F=1;
11429   HAVE_FABSF=1;
11430   HAVE_FABSL=1;
11431   HAVE_FMA=1;
11432   HAVE_FMAF=1;
11433   HAVE_FMAL=1;
11434   HAVE_FMODF=1;
11435   HAVE_FMODL=1;
11436   HAVE_FREXPF=1;
11437   HAVE_HYPOTF=1;
11438   HAVE_HYPOTL=1;
11439   HAVE_ILOGB=1;
11440   HAVE_ILOGBF=1;
11441   HAVE_ILOGBL=1;
11442   HAVE_ISNANF=1;
11443   HAVE_ISNAND=1;
11444   HAVE_ISNANL=1;
11445   HAVE_LDEXPF=1;
11446   HAVE_LOGF=1;
11447   HAVE_LOGL=1;
11448   HAVE_LOG10F=1;
11449   HAVE_LOG10L=1;
11450   HAVE_LOG1P=1;
11451   HAVE_LOG1PF=1;
11452   HAVE_LOG1PL=1;
11453   HAVE_LOGBF=1;
11454   HAVE_LOGBL=1;
11455   HAVE_MODFF=1;
11456   HAVE_MODFL=1;
11457   HAVE_POWF=1;
11458   HAVE_REMAINDER=1;
11459   HAVE_REMAINDERF=1;
11460   HAVE_RINT=1;
11461   HAVE_RINTL=1;
11462   HAVE_SINF=1;
11463   HAVE_SINL=1;
11464   HAVE_SINHF=1;
11465   HAVE_SQRTF=1;
11466   HAVE_SQRTL=1;
11467   HAVE_TANF=1;
11468   HAVE_TANL=1;
11469   HAVE_TANHF=1;
11470   HAVE_DECL_ACOSL=1;
11471   HAVE_DECL_ASINL=1;
11472   HAVE_DECL_ATANL=1;
11473   HAVE_DECL_CBRTF=1;
11474   HAVE_DECL_CBRTL=1;
11475   HAVE_DECL_CEILF=1;
11476   HAVE_DECL_CEILL=1;
11477   HAVE_DECL_COPYSIGNF=1;
11478   HAVE_DECL_COSL=1;
11479   HAVE_DECL_EXPL=1;
11480   HAVE_DECL_EXP2=1;
11481   HAVE_DECL_EXP2F=1;
11482   HAVE_DECL_EXP2L=1;
11483   HAVE_DECL_EXPM1L=1;
11484   HAVE_DECL_FLOORF=1;
11485   HAVE_DECL_FLOORL=1;
11486   HAVE_DECL_FREXPL=1;
11487   HAVE_DECL_LDEXPL=1;
11488   HAVE_DECL_LOGL=1;
11489   HAVE_DECL_LOG10L=1;
11490   HAVE_DECL_LOG2=1;
11491   HAVE_DECL_LOG2F=1;
11492   HAVE_DECL_LOG2L=1;
11493   HAVE_DECL_LOGB=1;
11494   HAVE_DECL_REMAINDER=1;
11495   HAVE_DECL_REMAINDERL=1;
11496   HAVE_DECL_RINTF=1;
11497   HAVE_DECL_ROUND=1;
11498   HAVE_DECL_ROUNDF=1;
11499   HAVE_DECL_ROUNDL=1;
11500   HAVE_DECL_SINL=1;
11501   HAVE_DECL_SQRTL=1;
11502   HAVE_DECL_TANL=1;
11503   HAVE_DECL_TRUNC=1;
11504   HAVE_DECL_TRUNCF=1;
11505   HAVE_DECL_TRUNCL=1;
11506   REPLACE_CBRTF=0;
11507   REPLACE_CBRTL=0;
11508   REPLACE_CEIL=0;
11509   REPLACE_CEILF=0;
11510   REPLACE_CEILL=0;
11511   REPLACE_EXPM1=0;
11512   REPLACE_EXPM1F=0;
11513   REPLACE_EXP2=0;
11514   REPLACE_EXP2L=0;
11515   REPLACE_FABSL=0;
11516   REPLACE_FLOOR=0;
11517   REPLACE_FLOORF=0;
11518   REPLACE_FLOORL=0;
11519   REPLACE_FMA=0;
11520   REPLACE_FMAF=0;
11521   REPLACE_FMAL=0;
11522   REPLACE_FMOD=0;
11523   REPLACE_FMODF=0;
11524   REPLACE_FMODL=0;
11525   REPLACE_FREXPF=0;
11526   REPLACE_FREXP=0;
11527   REPLACE_FREXPL=0;
11528   REPLACE_HUGE_VAL=0;
11529   REPLACE_HYPOT=0;
11530   REPLACE_HYPOTF=0;
11531   REPLACE_HYPOTL=0;
11532   REPLACE_ILOGB=0;
11533   REPLACE_ILOGBF=0;
11534   REPLACE_ISFINITE=0;
11535   REPLACE_ISINF=0;
11536   REPLACE_ISNAN=0;
11537   REPLACE_LDEXPL=0;
11538   REPLACE_LOG=0;
11539   REPLACE_LOGF=0;
11540   REPLACE_LOGL=0;
11541   REPLACE_LOG10=0;
11542   REPLACE_LOG10F=0;
11543   REPLACE_LOG10L=0;
11544   REPLACE_LOG1P=0;
11545   REPLACE_LOG1PF=0;
11546   REPLACE_LOG1PL=0;
11547   REPLACE_LOG2=0;
11548   REPLACE_LOG2F=0;
11549   REPLACE_LOG2L=0;
11550   REPLACE_LOGB=0;
11551   REPLACE_LOGBF=0;
11552   REPLACE_LOGBL=0;
11553   REPLACE_MODF=0;
11554   REPLACE_MODFF=0;
11555   REPLACE_MODFL=0;
11556   REPLACE_NAN=0;
11557   REPLACE_REMAINDER=0;
11558   REPLACE_REMAINDERF=0;
11559   REPLACE_REMAINDERL=0;
11560   REPLACE_ROUND=0;
11561   REPLACE_ROUNDF=0;
11562   REPLACE_ROUNDL=0;
11563   REPLACE_SIGNBIT=0;
11564   REPLACE_SIGNBIT_USING_GCC=0;
11565   REPLACE_SQRTL=0;
11566   REPLACE_TRUNC=0;
11567   REPLACE_TRUNCF=0;
11568   REPLACE_TRUNCL=0;
11569
11570
11571   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11572 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
11573 if ${gl_cv_func_frexp_no_libm+:} false; then :
11574   printf %s "(cached) " >&6
11575 else
11576
11577       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11578 /* end confdefs.h.  */
11579 #include <math.h>
11580              double x;
11581 int
11582 main ()
11583 {
11584 int e; return frexp (x, &e) > 0;
11585   ;
11586   return 0;
11587 }
11588 _ACEOF
11589 if ac_fn_c_try_link "$LINENO"; then :
11590   gl_cv_func_frexp_no_libm=yes
11591 else
11592   gl_cv_func_frexp_no_libm=no
11593 fi
11594 rm -f core conftest.err conftest.$ac_objext \
11595     conftest$ac_exeext conftest.$ac_ext
11596
11597 fi
11598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11599 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
11600
11601 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11602 if test "x$ac_cv_have_decl_alarm" = xyes; then :
11603   ac_have_decl=1
11604 else
11605   ac_have_decl=0
11606 fi
11607
11608 cat >>confdefs.h <<_ACEOF
11609 #define HAVE_DECL_ALARM $ac_have_decl
11610 _ACEOF
11611
11612
11613     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11614 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
11615 if ${gl_cv_var_stdin_large_offset+:} false; then :
11616   printf %s "(cached) " >&6
11617 else
11618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11619 /* end confdefs.h.  */
11620 #include <stdio.h>
11621 int
11622 main ()
11623 {
11624 #if defined __SL64 && defined __SCLE /* cygwin */
11625   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11626      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
11627      it is easier to do a version check than building a runtime test.  */
11628 # include <cygwin/version.h>
11629 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11630   choke me
11631 # endif
11632 #endif
11633   ;
11634   return 0;
11635 }
11636 _ACEOF
11637 if ac_fn_c_try_link "$LINENO"; then :
11638   gl_cv_var_stdin_large_offset=yes
11639 else
11640   gl_cv_var_stdin_large_offset=no
11641 fi
11642 rm -f core conftest.err conftest.$ac_objext \
11643     conftest$ac_exeext conftest.$ac_ext
11644 fi
11645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11646 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
11647
11648
11649
11650
11651
11652   case "$host_os" in
11653     mingw*)
11654                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11655 printf %s "checking for 64-bit off_t... " >&6; }
11656 if ${gl_cv_type_off_t_64+:} false; then :
11657   printf %s "(cached) " >&6
11658 else
11659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11660 /* end confdefs.h.  */
11661 #include <sys/types.h>
11662                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11663
11664 int
11665 main ()
11666 {
11667
11668   ;
11669   return 0;
11670 }
11671 _ACEOF
11672 if ac_fn_c_try_compile "$LINENO"; then :
11673   gl_cv_type_off_t_64=yes
11674 else
11675   gl_cv_type_off_t_64=no
11676 fi
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11678
11679 fi
11680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11681 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
11682       if test $gl_cv_type_off_t_64 = no; then
11683         WINDOWS_64_BIT_OFF_T=1
11684       else
11685         WINDOWS_64_BIT_OFF_T=0
11686       fi
11687                   WINDOWS_64_BIT_ST_SIZE=1
11688       ;;
11689     *)
11690                                                       WINDOWS_64_BIT_OFF_T=0
11691       WINDOWS_64_BIT_ST_SIZE=0
11692       ;;
11693   esac
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711      if test $gl_cv_have_include_next = yes; then
11712        gl_cv_next_sys_types_h='<'sys/types.h'>'
11713      else
11714        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11715 printf %s "checking absolute name of <sys/types.h>... " >&6; }
11716 if ${gl_cv_next_sys_types_h+:} false; then :
11717   printf %s "(cached) " >&6
11718 else
11719
11720                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721 /* end confdefs.h.  */
11722 #include <sys/types.h>
11723
11724 _ACEOF
11725                                                                                                                         case "$host_os" in
11726                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11727                  *)    gl_absname_cpp="$ac_cpp" ;;
11728                esac
11729
11730                case "$host_os" in
11731                  mingw*)
11732                                                                                                                                      gl_dirsep_regex='[/\\]'
11733                    ;;
11734                  *)
11735                    gl_dirsep_regex='\/'
11736                    ;;
11737                esac
11738                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11739
11740                gl_header_literal_regex=`echo 'sys/types.h' \
11741                                         | sed -e "$gl_make_literal_regex_sed"`
11742                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11743                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11744                    s|^/[^/]|//&|
11745                    p
11746                    q
11747                  }'
11748                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11749                       sed -n "$gl_absolute_header_sed"`'"'
11750
11751
11752 fi
11753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11754 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
11755      fi
11756      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11757
11758      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11759        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11760        gl_next_as_first_directive='<'sys/types.h'>'
11761      else
11762        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11763        gl_next_as_first_directive=$gl_cv_next_sys_types_h
11764      fi
11765      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11778 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11779   ac_have_decl=1
11780 else
11781   ac_have_decl=0
11782 fi
11783
11784 cat >>confdefs.h <<_ACEOF
11785 #define HAVE_DECL_FSEEKO $ac_have_decl
11786 _ACEOF
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11797 printf %s "checking for fseeko... " >&6; }
11798 if ${gl_cv_func_fseeko+:} false; then :
11799   printf %s "(cached) " >&6
11800 else
11801
11802       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11803 /* end confdefs.h.  */
11804 #include <stdio.h>
11805
11806 int
11807 main ()
11808 {
11809 fseeko (stdin, 0, 0);
11810   ;
11811   return 0;
11812 }
11813 _ACEOF
11814 if ac_fn_c_try_link "$LINENO"; then :
11815   gl_cv_func_fseeko=yes
11816 else
11817   gl_cv_func_fseeko=no
11818 fi
11819 rm -f core conftest.err conftest.$ac_objext \
11820     conftest$ac_exeext conftest.$ac_ext
11821
11822 fi
11823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11824 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
11825
11826
11827   if test $ac_cv_have_decl_fseeko = no; then
11828     HAVE_DECL_FSEEKO=0
11829   fi
11830
11831   if test $gl_cv_func_fseeko = no; then
11832     HAVE_FSEEKO=0
11833   else
11834     if test $WINDOWS_64_BIT_OFF_T = 1; then
11835       REPLACE_FSEEKO=1
11836     fi
11837     if test $gl_cv_var_stdin_large_offset = no; then
11838       REPLACE_FSEEKO=1
11839     fi
11840
11841
11842
11843   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11844 printf %s "checking whether fflush works on input streams... " >&6; }
11845 if ${gl_cv_func_fflush_stdin+:} false; then :
11846   printf %s "(cached) " >&6
11847 else
11848   echo hello world > conftest.txt
11849      if test "$cross_compiling" = yes; then :
11850         gl_cv_func_fflush_stdin=no
11851 else
11852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h.  */
11854
11855 #include <stdio.h>
11856 #if HAVE_UNISTD_H
11857 # include <unistd.h>
11858 #else /* on Windows with MSVC */
11859 # include <io.h>
11860 #endif
11861
11862 int
11863 main ()
11864 {
11865 FILE *f = fopen ("conftest.txt", "r");
11866          char buffer[10];
11867          int fd;
11868          int c;
11869          if (f == NULL)
11870            return 1;
11871          fd = fileno (f);
11872          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
11873            return 2;
11874          /* For deterministic results, ensure f read a bigger buffer.  */
11875          if (lseek (fd, 0, SEEK_CUR) == 5)
11876            return 3;
11877          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
11878             on BSD systems and on mingw.  */
11879          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
11880            return 4;
11881          if (lseek (fd, 0, SEEK_CUR) != 5)
11882            return 5;
11883          /* Verify behaviour of fflush after ungetc. See
11884             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
11885          /* Verify behaviour of fflush after a backup ungetc.  This fails on
11886             mingw.  */
11887          c = fgetc (f);
11888          ungetc (c, f);
11889          fflush (f);
11890          if (fgetc (f) != c)
11891            return 6;
11892          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
11893             on glibc 2.8 and on BSD systems.  */
11894          c = fgetc (f);
11895          ungetc ('@', f);
11896          fflush (f);
11897          if (fgetc (f) != c)
11898            return 7;
11899          return 0;
11900
11901   ;
11902   return 0;
11903 }
11904 _ACEOF
11905 if ac_fn_c_try_run "$LINENO"; then :
11906   gl_cv_func_fflush_stdin=yes
11907 else
11908   gl_cv_func_fflush_stdin=no
11909 fi
11910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11911   conftest.$ac_objext conftest.beam conftest.$ac_ext
11912 fi
11913
11914      rm conftest.txt
11915
11916 fi
11917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
11918 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
11919
11920       if test $gl_cv_func_fflush_stdin = no; then
11921         REPLACE_FSEEKO=1
11922       fi
11923
11924   fi
11925
11926
11927
11928
11929      GNULIB_FCHMODAT=0;
11930   GNULIB_FSTAT=0;
11931   GNULIB_FSTATAT=0;
11932   GNULIB_FUTIMENS=0;
11933   GNULIB_LCHMOD=0;
11934   GNULIB_LSTAT=0;
11935   GNULIB_MKDIRAT=0;
11936   GNULIB_MKFIFO=0;
11937   GNULIB_MKFIFOAT=0;
11938   GNULIB_MKNOD=0;
11939   GNULIB_MKNODAT=0;
11940   GNULIB_STAT=0;
11941   GNULIB_UTIMENSAT=0;
11942     HAVE_FCHMODAT=1;
11943   HAVE_FSTATAT=1;
11944   HAVE_FUTIMENS=1;
11945   HAVE_LCHMOD=1;
11946   HAVE_LSTAT=1;
11947   HAVE_MKDIRAT=1;
11948   HAVE_MKFIFO=1;
11949   HAVE_MKFIFOAT=1;
11950   HAVE_MKNOD=1;
11951   HAVE_MKNODAT=1;
11952   HAVE_UTIMENSAT=1;
11953   REPLACE_FSTAT=0;
11954   REPLACE_FSTATAT=0;
11955   REPLACE_FUTIMENS=0;
11956   REPLACE_LSTAT=0;
11957   REPLACE_MKDIR=0;
11958   REPLACE_MKFIFO=0;
11959   REPLACE_MKNOD=0;
11960   REPLACE_STAT=0;
11961   REPLACE_UTIMENSAT=0;
11962
11963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11964 printf %s "checking whether stat file-mode macros are broken... " >&6; }
11965 if ${ac_cv_header_stat_broken+:} false; then :
11966   printf %s "(cached) " >&6
11967 else
11968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11969 /* end confdefs.h.  */
11970 #include <sys/types.h>
11971 #include <sys/stat.h>
11972
11973 #if defined S_ISBLK && defined S_IFDIR
11974 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11975 #endif
11976
11977 #if defined S_ISBLK && defined S_IFCHR
11978 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11979 #endif
11980
11981 #if defined S_ISLNK && defined S_IFREG
11982 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11983 #endif
11984
11985 #if defined S_ISSOCK && defined S_IFREG
11986 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11987 #endif
11988
11989 _ACEOF
11990 if ac_fn_c_try_compile "$LINENO"; then :
11991   ac_cv_header_stat_broken=no
11992 else
11993   ac_cv_header_stat_broken=yes
11994 fi
11995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11996 fi
11997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11998 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
11999 if test $ac_cv_header_stat_broken = yes; then
12000
12001 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12002
12003 fi
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021      if test $gl_cv_have_include_next = yes; then
12022        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12023      else
12024        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12025 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12026 if ${gl_cv_next_sys_stat_h+:} false; then :
12027   printf %s "(cached) " >&6
12028 else
12029
12030              if test $ac_cv_header_sys_stat_h = yes; then
12031
12032
12033                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12034 /* end confdefs.h.  */
12035 #include <sys/stat.h>
12036
12037 _ACEOF
12038                                                                                                                         case "$host_os" in
12039                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12040                  *)    gl_absname_cpp="$ac_cpp" ;;
12041                esac
12042
12043                case "$host_os" in
12044                  mingw*)
12045                                                                                                                                      gl_dirsep_regex='[/\\]'
12046                    ;;
12047                  *)
12048                    gl_dirsep_regex='\/'
12049                    ;;
12050                esac
12051                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12052
12053                gl_header_literal_regex=`echo 'sys/stat.h' \
12054                                         | sed -e "$gl_make_literal_regex_sed"`
12055                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12056                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12057                    s|^/[^/]|//&|
12058                    p
12059                    q
12060                  }'
12061                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12062                       sed -n "$gl_absolute_header_sed"`'"'
12063           else
12064                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12065              fi
12066
12067
12068 fi
12069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12070 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12071      fi
12072      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12073
12074      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12075        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12076        gl_next_as_first_directive='<'sys/stat.h'>'
12077      else
12078        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12079        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12080      fi
12081      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12094
12095 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12096
12097   fi
12098
12099       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12100      #include <sys/stat.h>
12101 "
12102 if test "x$ac_cv_type_nlink_t" = xyes; then :
12103
12104 else
12105
12106 printf "%s\n" "#define nlink_t int" >>confdefs.h
12107
12108 fi
12109
12110
12111
12112
12113 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12114 if test "x$ac_cv_have_decl_ftello" = xyes; then :
12115   ac_have_decl=1
12116 else
12117   ac_have_decl=0
12118 fi
12119
12120 cat >>confdefs.h <<_ACEOF
12121 #define HAVE_DECL_FTELLO $ac_have_decl
12122 _ACEOF
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133   if test $ac_cv_have_decl_ftello = no; then
12134     HAVE_DECL_FTELLO=0
12135   fi
12136
12137   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12138 printf %s "checking for ftello... " >&6; }
12139 if ${gl_cv_func_ftello+:} false; then :
12140   printf %s "(cached) " >&6
12141 else
12142
12143       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144 /* end confdefs.h.  */
12145 #include <stdio.h>
12146 int
12147 main ()
12148 {
12149 ftello (stdin);
12150   ;
12151   return 0;
12152 }
12153 _ACEOF
12154 if ac_fn_c_try_link "$LINENO"; then :
12155   gl_cv_func_ftello=yes
12156 else
12157   gl_cv_func_ftello=no
12158 fi
12159 rm -f core conftest.err conftest.$ac_objext \
12160     conftest$ac_exeext conftest.$ac_ext
12161
12162 fi
12163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12164 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12165   if test $gl_cv_func_ftello = no; then
12166     HAVE_FTELLO=0
12167   else
12168     if test $WINDOWS_64_BIT_OFF_T = 1; then
12169       REPLACE_FTELLO=1
12170     fi
12171     if test $gl_cv_var_stdin_large_offset = no; then
12172       REPLACE_FTELLO=1
12173     fi
12174     if test $REPLACE_FTELLO = 0; then
12175
12176       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12177 printf %s "checking whether ftello works... " >&6; }
12178 if ${gl_cv_func_ftello_works+:} false; then :
12179   printf %s "(cached) " >&6
12180 else
12181
12182                               case "$host_os" in
12183                       # Guess no on Solaris.
12184             solaris*) gl_cv_func_ftello_works="guessing no" ;;
12185                       # Guess yes otherwise.
12186             *)        gl_cv_func_ftello_works="guessing yes" ;;
12187           esac
12188           if test "$cross_compiling" = yes; then :
12189   :
12190 else
12191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12192 /* end confdefs.h.  */
12193
12194 #include <stdio.h>
12195 #include <stdlib.h>
12196 #include <string.h>
12197 #define TESTFILE "conftest.tmp"
12198 int
12199 main (void)
12200 {
12201   FILE *fp;
12202
12203   /* Create a file with some contents.  */
12204   fp = fopen (TESTFILE, "w");
12205   if (fp == NULL)
12206     return 70;
12207   if (fwrite ("foogarsh", 1, 8, fp) < 8)
12208     return 71;
12209   if (fclose (fp))
12210     return 72;
12211
12212   /* The file's contents is now "foogarsh".  */
12213
12214   /* Try writing after reading to EOF.  */
12215   fp = fopen (TESTFILE, "r+");
12216   if (fp == NULL)
12217     return 73;
12218   if (fseek (fp, -1, SEEK_END))
12219     return 74;
12220   if (!(getc (fp) == 'h'))
12221     return 1;
12222   if (!(getc (fp) == EOF))
12223     return 2;
12224   if (!(ftell (fp) == 8))
12225     return 3;
12226   if (!(ftell (fp) == 8))
12227     return 4;
12228   if (!(putc ('!', fp) == '!'))
12229     return 5;
12230   if (!(ftell (fp) == 9))
12231     return 6;
12232   if (!(fclose (fp) == 0))
12233     return 7;
12234   fp = fopen (TESTFILE, "r");
12235   if (fp == NULL)
12236     return 75;
12237   {
12238     char buf[10];
12239     if (!(fread (buf, 1, 10, fp) == 9))
12240       return 10;
12241     if (!(memcmp (buf, "foogarsh!", 9) == 0))
12242       return 11;
12243   }
12244   if (!(fclose (fp) == 0))
12245     return 12;
12246
12247   /* The file's contents is now "foogarsh!".  */
12248
12249   return 0;
12250 }
12251 _ACEOF
12252 if ac_fn_c_try_run "$LINENO"; then :
12253   gl_cv_func_ftello_works=yes
12254 else
12255   gl_cv_func_ftello_works=no
12256 fi
12257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12258   conftest.$ac_objext conftest.beam conftest.$ac_ext
12259 fi
12260
12261
12262 fi
12263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12264 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12265       case "$gl_cv_func_ftello_works" in
12266         *yes) ;;
12267         *)
12268           REPLACE_FTELLO=1
12269
12270 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12271
12272           ;;
12273       esac
12274     fi
12275   fi
12276
12277
12278
12279    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12280 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12281 if ${gl_cv_func_getcwd_null+:} false; then :
12282   printf %s "(cached) " >&6
12283 else
12284   if test "$cross_compiling" = yes; then :
12285   case "$host_os" in
12286                      # Guess yes on glibc systems.
12287             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
12288                      # Guess yes on Cygwin.
12289             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12290                      # If we don't know, assume the worst.
12291             *)       gl_cv_func_getcwd_null="guessing no";;
12292           esac
12293
12294 else
12295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296 /* end confdefs.h.  */
12297
12298 #        if HAVE_UNISTD_H
12299 #         include <unistd.h>
12300 #        else /* on Windows with MSVC */
12301 #         include <direct.h>
12302 #        endif
12303 #        ifndef getcwd
12304          char *getcwd ();
12305 #        endif
12306
12307 int
12308 main ()
12309 {
12310
12311 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12312 /* mingw cwd does not start with '/', but getcwd does allocate.
12313    However, mingw fails to honor non-zero size.  */
12314 #else
12315            if (chdir ("/") != 0)
12316              return 1;
12317            else
12318              {
12319                char *f = getcwd (NULL, 0);
12320                if (! f)
12321                  return 2;
12322                if (f[0] != '/')
12323                  return 3;
12324                if (f[1] != '\0')
12325                  return 4;
12326                return 0;
12327              }
12328 #endif
12329
12330   ;
12331   return 0;
12332 }
12333 _ACEOF
12334 if ac_fn_c_try_run "$LINENO"; then :
12335   gl_cv_func_getcwd_null=yes
12336 else
12337   gl_cv_func_getcwd_null=no
12338 fi
12339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340   conftest.$ac_objext conftest.beam conftest.$ac_ext
12341 fi
12342
12343 fi
12344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12345 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
12346
12347
12348   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12349 printf %s "checking for getcwd with POSIX signature... " >&6; }
12350 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
12351   printf %s "(cached) " >&6
12352 else
12353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12354 /* end confdefs.h.  */
12355 #include <unistd.h>
12356 int
12357 main ()
12358 {
12359 extern
12360            #ifdef __cplusplus
12361            "C"
12362            #endif
12363            char *getcwd (char *, size_t);
12364
12365   ;
12366   return 0;
12367 }
12368
12369 _ACEOF
12370 if ac_fn_c_try_compile "$LINENO"; then :
12371   gl_cv_func_getcwd_posix_signature=yes
12372 else
12373   gl_cv_func_getcwd_posix_signature=no
12374 fi
12375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12376
12377 fi
12378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12379 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398      if test $gl_cv_have_include_next = yes; then
12399        gl_cv_next_getopt_h='<'getopt.h'>'
12400      else
12401        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12402 printf %s "checking absolute name of <getopt.h>... " >&6; }
12403 if ${gl_cv_next_getopt_h+:} false; then :
12404   printf %s "(cached) " >&6
12405 else
12406
12407              if test $ac_cv_header_getopt_h = yes; then
12408
12409
12410                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12411 /* end confdefs.h.  */
12412 #include <getopt.h>
12413
12414 _ACEOF
12415                                                                                                                         case "$host_os" in
12416                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12417                  *)    gl_absname_cpp="$ac_cpp" ;;
12418                esac
12419
12420                case "$host_os" in
12421                  mingw*)
12422                                                                                                                                      gl_dirsep_regex='[/\\]'
12423                    ;;
12424                  *)
12425                    gl_dirsep_regex='\/'
12426                    ;;
12427                esac
12428                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12429
12430                gl_header_literal_regex=`echo 'getopt.h' \
12431                                         | sed -e "$gl_make_literal_regex_sed"`
12432                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12433                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12434                    s|^/[^/]|//&|
12435                    p
12436                    q
12437                  }'
12438                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12439                       sed -n "$gl_absolute_header_sed"`'"'
12440           else
12441                gl_cv_next_getopt_h='<'getopt.h'>'
12442              fi
12443
12444
12445 fi
12446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12447 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
12448      fi
12449      NEXT_GETOPT_H=$gl_cv_next_getopt_h
12450
12451      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12452        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12453        gl_next_as_first_directive='<'getopt.h'>'
12454      else
12455        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12456        gl_next_as_first_directive=$gl_cv_next_getopt_h
12457      fi
12458      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12459
12460
12461
12462
12463   if test $ac_cv_header_getopt_h = yes; then
12464     HAVE_GETOPT_H=1
12465   else
12466     HAVE_GETOPT_H=0
12467   fi
12468
12469
12470   gl_replace_getopt=
12471
12472     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12473     for ac_header in getopt.h
12474 do :
12475   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12476 if test "x$ac_cv_header_getopt_h" = xyes; then :
12477   cat >>confdefs.h <<_ACEOF
12478 #define HAVE_GETOPT_H 1
12479 _ACEOF
12480
12481 else
12482   gl_replace_getopt=yes
12483 fi
12484
12485 done
12486
12487   fi
12488
12489     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12490     for ac_func in getopt_long_only
12491 do :
12492   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12493 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12494   cat >>confdefs.h <<_ACEOF
12495 #define HAVE_GETOPT_LONG_ONLY 1
12496 _ACEOF
12497
12498 else
12499   gl_replace_getopt=yes
12500 fi
12501 done
12502
12503   fi
12504
12505           if test -z "$gl_replace_getopt"; then
12506     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12507 printf %s "checking whether getopt is POSIX compatible... " >&6; }
12508 if ${gl_cv_func_getopt_posix+:} false; then :
12509   printf %s "(cached) " >&6
12510 else
12511
12512                                                 if test $cross_compiling = no; then
12513                               if test "$cross_compiling" = yes; then :
12514   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12515 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12516 as_fn_error $? "cannot run test program while cross compiling
12517 See \`config.log' for more details" "$LINENO" 5; }
12518 else
12519   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12520 /* end confdefs.h.  */
12521
12522 #include <unistd.h>
12523 #include <stdlib.h>
12524 #include <string.h>
12525
12526 int
12527 main ()
12528 {
12529   static char program[] = "program";
12530   static char a[] = "-a";
12531   static char foo[] = "foo";
12532   static char bar[] = "bar";
12533   char *argv[] = { program, a, foo, bar, NULL };
12534   int c;
12535
12536   c = getopt (4, argv, "ab");
12537   if (!(c == 'a'))
12538     return 1;
12539   c = getopt (4, argv, "ab");
12540   if (!(c == -1))
12541     return 2;
12542   if (!(optind == 2))
12543     return 3;
12544   return 0;
12545 }
12546
12547 _ACEOF
12548 if ac_fn_c_try_run "$LINENO"; then :
12549   gl_cv_func_getopt_posix=maybe
12550 else
12551   gl_cv_func_getopt_posix=no
12552 fi
12553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12554   conftest.$ac_objext conftest.beam conftest.$ac_ext
12555 fi
12556
12557           if test $gl_cv_func_getopt_posix = maybe; then
12558                                     if test "$cross_compiling" = yes; then :
12559   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12560 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12561 as_fn_error $? "cannot run test program while cross compiling
12562 See \`config.log' for more details" "$LINENO" 5; }
12563 else
12564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565 /* end confdefs.h.  */
12566
12567 #include <unistd.h>
12568 #include <stdlib.h>
12569 #include <string.h>
12570
12571 int
12572 main ()
12573 {
12574   static char program[] = "program";
12575   static char donald[] = "donald";
12576   static char p[] = "-p";
12577   static char billy[] = "billy";
12578   static char duck[] = "duck";
12579   static char a[] = "-a";
12580   static char bar[] = "bar";
12581   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12582   int c;
12583
12584   c = getopt (7, argv, "+abp:q:");
12585   if (!(c == -1))
12586     return 4;
12587   if (!(strcmp (argv[0], "program") == 0))
12588     return 5;
12589   if (!(strcmp (argv[1], "donald") == 0))
12590     return 6;
12591   if (!(strcmp (argv[2], "-p") == 0))
12592     return 7;
12593   if (!(strcmp (argv[3], "billy") == 0))
12594     return 8;
12595   if (!(strcmp (argv[4], "duck") == 0))
12596     return 9;
12597   if (!(strcmp (argv[5], "-a") == 0))
12598     return 10;
12599   if (!(strcmp (argv[6], "bar") == 0))
12600     return 11;
12601   if (!(optind == 1))
12602     return 12;
12603   return 0;
12604 }
12605
12606 _ACEOF
12607 if ac_fn_c_try_run "$LINENO"; then :
12608   gl_cv_func_getopt_posix=maybe
12609 else
12610   gl_cv_func_getopt_posix=no
12611 fi
12612 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12613   conftest.$ac_objext conftest.beam conftest.$ac_ext
12614 fi
12615
12616           fi
12617           if test $gl_cv_func_getopt_posix = maybe; then
12618                         if test "$cross_compiling" = yes; then :
12619   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12620 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12621 as_fn_error $? "cannot run test program while cross compiling
12622 See \`config.log' for more details" "$LINENO" 5; }
12623 else
12624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12625 /* end confdefs.h.  */
12626
12627 #include <unistd.h>
12628 #include <stdlib.h>
12629 #include <string.h>
12630
12631 int
12632 main ()
12633 {
12634   static char program[] = "program";
12635   static char ab[] = "-ab";
12636   char *argv[3] = { program, ab, NULL };
12637   if (getopt (2, argv, "ab:") != 'a')
12638     return 13;
12639   if (getopt (2, argv, "ab:") != '?')
12640     return 14;
12641   if (optopt != 'b')
12642     return 15;
12643   if (optind != 2)
12644     return 16;
12645   return 0;
12646 }
12647
12648 _ACEOF
12649 if ac_fn_c_try_run "$LINENO"; then :
12650   gl_cv_func_getopt_posix=yes
12651 else
12652   gl_cv_func_getopt_posix=no
12653 fi
12654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12655   conftest.$ac_objext conftest.beam conftest.$ac_ext
12656 fi
12657
12658           fi
12659         else
12660           case "$host_os" in
12661             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
12662             *)                       gl_cv_func_getopt_posix="guessing yes";;
12663           esac
12664         fi
12665
12666 fi
12667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12668 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
12669     case "$gl_cv_func_getopt_posix" in
12670       *no) gl_replace_getopt=yes ;;
12671     esac
12672   fi
12673
12674   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12675     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12676 printf %s "checking for working GNU getopt function... " >&6; }
12677 if ${gl_cv_func_getopt_gnu+:} false; then :
12678   printf %s "(cached) " >&6
12679 else
12680   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12681        # optstring is necessary for programs like m4 that have POSIX-mandated
12682        # semantics for supporting options interspersed with files.
12683        # Also, since getopt_long is a GNU extension, we require optind=0.
12684        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12685        # so take care to revert to the correct (non-)export state.
12686        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12687        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12688          xx) gl_had_POSIXLY_CORRECT=exported ;;
12689          x)  gl_had_POSIXLY_CORRECT=yes      ;;
12690          *)  gl_had_POSIXLY_CORRECT=         ;;
12691        esac
12692        POSIXLY_CORRECT=1
12693        export POSIXLY_CORRECT
12694        if test "$cross_compiling" = yes; then :
12695            gl_cv_func_getopt_gnu="guessing no"
12696
12697 else
12698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699 /* end confdefs.h.  */
12700 #include <getopt.h>
12701                            #include <stddef.h>
12702                            #include <string.h>
12703
12704 #include <stdlib.h>
12705 #if defined __MACH__ && defined __APPLE__
12706 /* Avoid a crash on Mac OS X.  */
12707 #include <mach/mach.h>
12708 #include <mach/mach_error.h>
12709 #include <mach/thread_status.h>
12710 #include <mach/exception.h>
12711 #include <mach/task.h>
12712 #include <pthread.h>
12713 /* The exception port on which our thread listens.  */
12714 static mach_port_t our_exception_port;
12715 /* The main function of the thread listening for exceptions of type
12716    EXC_BAD_ACCESS.  */
12717 static void *
12718 mach_exception_thread (void *arg)
12719 {
12720   /* Buffer for a message to be received.  */
12721   struct {
12722     mach_msg_header_t head;
12723     mach_msg_body_t msgh_body;
12724     char data[1024];
12725   } msg;
12726   mach_msg_return_t retval;
12727   /* Wait for a message on the exception port.  */
12728   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12729                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12730   if (retval != MACH_MSG_SUCCESS)
12731     abort ();
12732   exit (1);
12733 }
12734 static void
12735 nocrash_init (void)
12736 {
12737   mach_port_t self = mach_task_self ();
12738   /* Allocate a port on which the thread shall listen for exceptions.  */
12739   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12740       == KERN_SUCCESS) {
12741     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
12742     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12743                                 MACH_MSG_TYPE_MAKE_SEND)
12744         == KERN_SUCCESS) {
12745       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
12746          for us.  */
12747       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12748       /* Create the thread listening on the exception port.  */
12749       pthread_attr_t attr;
12750       pthread_t thread;
12751       if (pthread_attr_init (&attr) == 0
12752           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12753           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12754         pthread_attr_destroy (&attr);
12755         /* Replace the exception port info for these exceptions with our own.
12756            Note that we replace the exception port for the entire task, not only
12757            for a particular thread.  This has the effect that when our exception
12758            port gets the message, the thread specific exception port has already
12759            been asked, and we don't need to bother about it.
12760            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
12761         task_set_exception_ports (self, mask, our_exception_port,
12762                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12763       }
12764     }
12765   }
12766 }
12767 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12768 /* Avoid a crash on native Windows.  */
12769 #define WIN32_LEAN_AND_MEAN
12770 #include <windows.h>
12771 #include <winerror.h>
12772 static LONG WINAPI
12773 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12774 {
12775   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12776     {
12777     case EXCEPTION_ACCESS_VIOLATION:
12778     case EXCEPTION_IN_PAGE_ERROR:
12779     case EXCEPTION_STACK_OVERFLOW:
12780     case EXCEPTION_GUARD_PAGE:
12781     case EXCEPTION_PRIV_INSTRUCTION:
12782     case EXCEPTION_ILLEGAL_INSTRUCTION:
12783     case EXCEPTION_DATATYPE_MISALIGNMENT:
12784     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12785     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12786       exit (1);
12787     }
12788   return EXCEPTION_CONTINUE_SEARCH;
12789 }
12790 static void
12791 nocrash_init (void)
12792 {
12793   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12794 }
12795 #else
12796 /* Avoid a crash on POSIX systems.  */
12797 #include <signal.h>
12798 /* A POSIX signal handler.  */
12799 static void
12800 exception_handler (int sig)
12801 {
12802   exit (1);
12803 }
12804 static void
12805 nocrash_init (void)
12806 {
12807 #ifdef SIGSEGV
12808   signal (SIGSEGV, exception_handler);
12809 #endif
12810 #ifdef SIGBUS
12811   signal (SIGBUS, exception_handler);
12812 #endif
12813 }
12814 #endif
12815
12816
12817 int
12818 main ()
12819 {
12820
12821              int result = 0;
12822
12823              nocrash_init();
12824
12825              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12826                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12827                 OSF/1 5.1, Solaris 10.  */
12828              {
12829                static char conftest[] = "conftest";
12830                static char plus[] = "-+";
12831                char *argv[3] = { conftest, plus, NULL };
12832                opterr = 0;
12833                if (getopt (2, argv, "+a") != '?')
12834                  result |= 1;
12835              }
12836              /* This code succeeds on glibc 2.8, mingw,
12837                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12838                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
12839              {
12840                static char program[] = "program";
12841                static char p[] = "-p";
12842                static char foo[] = "foo";
12843                static char bar[] = "bar";
12844                char *argv[] = { program, p, foo, bar, NULL };
12845
12846                optind = 1;
12847                if (getopt (4, argv, "p::") != 'p')
12848                  result |= 2;
12849                else if (optarg != NULL)
12850                  result |= 4;
12851                else if (getopt (4, argv, "p::") != -1)
12852                  result |= 6;
12853                else if (optind != 2)
12854                  result |= 8;
12855              }
12856              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
12857              {
12858                static char program[] = "program";
12859                static char foo[] = "foo";
12860                static char p[] = "-p";
12861                char *argv[] = { program, foo, p, NULL };
12862                optind = 0;
12863                if (getopt (3, argv, "-p") != 1)
12864                  result |= 16;
12865                else if (getopt (3, argv, "-p") != 'p')
12866                  result |= 16;
12867              }
12868              /* This code fails on glibc 2.11.  */
12869              {
12870                static char program[] = "program";
12871                static char b[] = "-b";
12872                static char a[] = "-a";
12873                char *argv[] = { program, b, a, NULL };
12874                optind = opterr = 0;
12875                if (getopt (3, argv, "+:a:b") != 'b')
12876                  result |= 32;
12877                else if (getopt (3, argv, "+:a:b") != ':')
12878                  result |= 32;
12879              }
12880              /* This code dumps core on glibc 2.14.  */
12881              {
12882                static char program[] = "program";
12883                static char w[] = "-W";
12884                static char dummy[] = "dummy";
12885                char *argv[] = { program, w, dummy, NULL };
12886                optind = opterr = 1;
12887                if (getopt (3, argv, "W;") != 'W')
12888                  result |= 64;
12889              }
12890              return result;
12891
12892   ;
12893   return 0;
12894 }
12895 _ACEOF
12896 if ac_fn_c_try_run "$LINENO"; then :
12897   gl_cv_func_getopt_gnu=yes
12898 else
12899   gl_cv_func_getopt_gnu=no
12900 fi
12901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12902   conftest.$ac_objext conftest.beam conftest.$ac_ext
12903 fi
12904
12905        case $gl_had_POSIXLY_CORRECT in
12906          exported) ;;
12907          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12908          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12909        esac
12910
12911 fi
12912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12913 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
12914     if test "$gl_cv_func_getopt_gnu" != yes; then
12915       gl_replace_getopt=yes
12916     else
12917       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12918 printf %s "checking for working GNU getopt_long function... " >&6; }
12919 if ${gl_cv_func_getopt_long_gnu+:} false; then :
12920   printf %s "(cached) " >&6
12921 else
12922   if test "$cross_compiling" = yes; then :
12923               case "$host_os" in
12924               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12925               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
12926             esac
12927
12928 else
12929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h.  */
12931 #include <getopt.h>
12932                 #include <stddef.h>
12933                 #include <string.h>
12934
12935 int
12936 main ()
12937 {
12938 static const struct option long_options[] =
12939                   {
12940                     { "xtremely-",no_argument,       NULL, 1003 },
12941                     { "xtra",     no_argument,       NULL, 1001 },
12942                     { "xtreme",   no_argument,       NULL, 1002 },
12943                     { "xtremely", no_argument,       NULL, 1003 },
12944                     { NULL,       0,                 NULL, 0 }
12945                   };
12946                 /* This code fails on OpenBSD 5.0.  */
12947                 {
12948                   static char program[] = "program";
12949                   static char xtremel[] = "--xtremel";
12950                   char *argv[] = { program, xtremel, NULL };
12951                   int option_index;
12952                   optind = 1; opterr = 0;
12953                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12954                     return 1;
12955                 }
12956                 return 0;
12957
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 if ac_fn_c_try_run "$LINENO"; then :
12963   gl_cv_func_getopt_long_gnu=yes
12964 else
12965   gl_cv_func_getopt_long_gnu=no
12966 fi
12967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12968   conftest.$ac_objext conftest.beam conftest.$ac_ext
12969 fi
12970
12971
12972 fi
12973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12974 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
12975       case "$gl_cv_func_getopt_long_gnu" in
12976         *yes) ;;
12977         *) gl_replace_getopt=yes ;;
12978       esac
12979     fi
12980   fi
12981
12982
12983
12984
12985
12986
12987     REPLACE_GETOPT=0
12988     if test -n "$gl_replace_getopt"; then
12989       REPLACE_GETOPT=1
12990     fi
12991
12992   if test $REPLACE_GETOPT = 1; then
12993
12994   GETOPT_H=getopt.h
12995
12996 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12997
12998
12999
13000   fi
13001
13002 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
13003 if test "x$ac_cv_have_decl_getenv" = xyes; then :
13004   ac_have_decl=1
13005 else
13006   ac_have_decl=0
13007 fi
13008
13009 cat >>confdefs.h <<_ACEOF
13010 #define HAVE_DECL_GETENV $ac_have_decl
13011 _ACEOF
13012
13013 :
13014
13015
13016
13017
13018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13019 printf %s "checking for C/C++ restrict keyword... " >&6; }
13020 if ${ac_cv_c_restrict+:} false; then :
13021   printf %s "(cached) " >&6
13022 else
13023   ac_cv_c_restrict=no
13024    # The order here caters to the fact that C++ does not require restrict.
13025    for ac_kw in __restrict __restrict__ _Restrict restrict; do
13026      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h.  */
13028 typedef int * int_ptr;
13029         int foo (int_ptr $ac_kw ip) {
13030         return ip[0];
13031        }
13032 int
13033 main ()
13034 {
13035 int s[1];
13036         int * $ac_kw t = s;
13037         t[0] = 0;
13038         return foo(t)
13039   ;
13040   return 0;
13041 }
13042 _ACEOF
13043 if ac_fn_c_try_compile "$LINENO"; then :
13044   ac_cv_c_restrict=$ac_kw
13045 fi
13046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047      test "$ac_cv_c_restrict" != no && break
13048    done
13049
13050 fi
13051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13052 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13053
13054  case $ac_cv_c_restrict in
13055    restrict) ;;
13056    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13057  ;;
13058    *)  cat >>confdefs.h <<_ACEOF
13059 #define restrict $ac_cv_c_restrict
13060 _ACEOF
13061  ;;
13062  esac
13063
13064
13065   GNULIB_GETTIMEOFDAY=0;
13066     HAVE_GETTIMEOFDAY=1;
13067   HAVE_STRUCT_TIMEVAL=1;
13068   HAVE_SYS_TIME_H=1;
13069   REPLACE_GETTIMEOFDAY=0;
13070   REPLACE_STRUCT_TIMEVAL=0;
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087      if test $gl_cv_have_include_next = yes; then
13088        gl_cv_next_sys_time_h='<'sys/time.h'>'
13089      else
13090        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13091 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13092 if ${gl_cv_next_sys_time_h+:} false; then :
13093   printf %s "(cached) " >&6
13094 else
13095
13096              if test $ac_cv_header_sys_time_h = yes; then
13097
13098
13099                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13100 /* end confdefs.h.  */
13101 #include <sys/time.h>
13102
13103 _ACEOF
13104                                                                                                                         case "$host_os" in
13105                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13106                  *)    gl_absname_cpp="$ac_cpp" ;;
13107                esac
13108
13109                case "$host_os" in
13110                  mingw*)
13111                                                                                                                                      gl_dirsep_regex='[/\\]'
13112                    ;;
13113                  *)
13114                    gl_dirsep_regex='\/'
13115                    ;;
13116                esac
13117                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13118
13119                gl_header_literal_regex=`echo 'sys/time.h' \
13120                                         | sed -e "$gl_make_literal_regex_sed"`
13121                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13122                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13123                    s|^/[^/]|//&|
13124                    p
13125                    q
13126                  }'
13127                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13128                       sed -n "$gl_absolute_header_sed"`'"'
13129           else
13130                gl_cv_next_sys_time_h='<'sys/time.h'>'
13131              fi
13132
13133
13134 fi
13135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13136 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13137      fi
13138      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13139
13140      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13141        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13142        gl_next_as_first_directive='<'sys/time.h'>'
13143      else
13144        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13145        gl_next_as_first_directive=$gl_cv_next_sys_time_h
13146      fi
13147      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13148
13149
13150
13151
13152
13153   if test $ac_cv_header_sys_time_h != yes; then
13154     HAVE_SYS_TIME_H=0
13155   fi
13156
13157
13158
13159
13160
13161   if test $ac_cv_header_sys_socket_h != yes; then
13162                     for ac_header in winsock2.h
13163 do :
13164   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_winsock2_h" = xyes; then :
13166   cat >>confdefs.h <<_ACEOF
13167 #define HAVE_WINSOCK2_H 1
13168 _ACEOF
13169
13170 fi
13171
13172 done
13173
13174   fi
13175   if test "$ac_cv_header_winsock2_h" = yes; then
13176     HAVE_WINSOCK2_H=1
13177     UNISTD_H_HAVE_WINSOCK2_H=1
13178     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13179   else
13180     HAVE_WINSOCK2_H=0
13181   fi
13182
13183
13184   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13185 printf %s "checking for struct timeval... " >&6; }
13186 if ${gl_cv_sys_struct_timeval+:} false; then :
13187   printf %s "(cached) " >&6
13188 else
13189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190 /* end confdefs.h.  */
13191 #if HAVE_SYS_TIME_H
13192              #include <sys/time.h>
13193             #endif
13194             #include <time.h>
13195             #if HAVE_WINSOCK2_H
13196             # include <winsock2.h>
13197             #endif
13198
13199 int
13200 main ()
13201 {
13202 static struct timeval x; x.tv_sec = x.tv_usec;
13203   ;
13204   return 0;
13205 }
13206 _ACEOF
13207 if ac_fn_c_try_compile "$LINENO"; then :
13208   gl_cv_sys_struct_timeval=yes
13209 else
13210   gl_cv_sys_struct_timeval=no
13211 fi
13212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13213
13214 fi
13215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13216 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13217   if test $gl_cv_sys_struct_timeval != yes; then
13218     HAVE_STRUCT_TIMEVAL=0
13219   else
13220                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13221 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13222 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13223   printf %s "(cached) " >&6
13224 else
13225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226 /* end confdefs.h.  */
13227 #if HAVE_SYS_TIME_H
13228                #include <sys/time.h>
13229               #endif
13230               #include <time.h>
13231               #if HAVE_WINSOCK2_H
13232               # include <winsock2.h>
13233               #endif
13234
13235 int
13236 main ()
13237 {
13238 static struct timeval x;
13239               typedef int verify_tv_sec_type[
13240                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13241               ];
13242
13243   ;
13244   return 0;
13245 }
13246 _ACEOF
13247 if ac_fn_c_try_compile "$LINENO"; then :
13248   gl_cv_sys_struct_timeval_tv_sec=yes
13249 else
13250   gl_cv_sys_struct_timeval_tv_sec=no
13251 fi
13252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13253
13254 fi
13255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13256 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13257     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13258       REPLACE_STRUCT_TIMEVAL=1
13259     fi
13260   fi
13261
13262
13263
13264
13265
13266
13267
13268   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13269 printf %s "checking where to find the exponent in a 'float'... " >&6; }
13270 if ${gl_cv_cc_float_expbit0+:} false; then :
13271   printf %s "(cached) " >&6
13272 else
13273
13274       if test "$cross_compiling" = yes; then :
13275   gl_cv_cc_float_expbit0="word 0 bit 23"
13276 else
13277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h.  */
13279
13280 #include <float.h>
13281 #include <stddef.h>
13282 #include <stdio.h>
13283 #include <string.h>
13284 #define NWORDS \
13285   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13286 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13287 static unsigned int ored_words[NWORDS];
13288 static unsigned int anded_words[NWORDS];
13289 static void add_to_ored_words (float x)
13290 {
13291   memory_float m;
13292   size_t i;
13293   /* Clear it first, in case
13294      sizeof (float) < sizeof (memory_float).  */
13295   memset (&m, 0, sizeof (memory_float));
13296   m.value = x;
13297   for (i = 0; i < NWORDS; i++)
13298     {
13299       ored_words[i] |= m.word[i];
13300       anded_words[i] &= m.word[i];
13301     }
13302 }
13303 int main ()
13304 {
13305   size_t j;
13306   FILE *fp = fopen ("conftest.out", "w");
13307   if (fp == NULL)
13308     return 1;
13309   for (j = 0; j < NWORDS; j++)
13310     anded_words[j] = ~ (unsigned int) 0;
13311   add_to_ored_words (0.25f);
13312   add_to_ored_words (0.5f);
13313   add_to_ored_words (1.0f);
13314   add_to_ored_words (2.0f);
13315   add_to_ored_words (4.0f);
13316   /* Remove bits that are common (e.g. if representation of the first mantissa
13317      bit is explicit).  */
13318   for (j = 0; j < NWORDS; j++)
13319     ored_words[j] &= ~anded_words[j];
13320   /* Now find the nonzero word.  */
13321   for (j = 0; j < NWORDS; j++)
13322     if (ored_words[j] != 0)
13323       break;
13324   if (j < NWORDS)
13325     {
13326       size_t i;
13327       for (i = j + 1; i < NWORDS; i++)
13328         if (ored_words[i] != 0)
13329           {
13330             fprintf (fp, "unknown");
13331             return (fclose (fp) != 0);
13332           }
13333       for (i = 0; ; i++)
13334         if ((ored_words[j] >> i) & 1)
13335           {
13336             fprintf (fp, "word %d bit %d", (int) j, (int) i);
13337             return (fclose (fp) != 0);
13338           }
13339     }
13340   fprintf (fp, "unknown");
13341   return (fclose (fp) != 0);
13342 }
13343
13344 _ACEOF
13345 if ac_fn_c_try_run "$LINENO"; then :
13346   gl_cv_cc_float_expbit0=`cat conftest.out`
13347 else
13348   gl_cv_cc_float_expbit0="unknown"
13349 fi
13350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13351   conftest.$ac_objext conftest.beam conftest.$ac_ext
13352 fi
13353
13354       rm -f conftest.out
13355
13356 fi
13357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13358 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
13359   case "$gl_cv_cc_float_expbit0" in
13360     word*bit*)
13361       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13362       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13363
13364 cat >>confdefs.h <<_ACEOF
13365 #define FLT_EXPBIT0_WORD $word
13366 _ACEOF
13367
13368
13369 cat >>confdefs.h <<_ACEOF
13370 #define FLT_EXPBIT0_BIT $bit
13371 _ACEOF
13372
13373       ;;
13374   esac
13375
13376
13377   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13378 printf %s "checking for nl_langinfo and CODESET... " >&6; }
13379 if ${am_cv_langinfo_codeset+:} false; then :
13380   printf %s "(cached) " >&6
13381 else
13382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13383 /* end confdefs.h.  */
13384 #include <langinfo.h>
13385 int
13386 main ()
13387 {
13388 char* cs = nl_langinfo(CODESET); return !cs;
13389   ;
13390   return 0;
13391 }
13392 _ACEOF
13393 if ac_fn_c_try_link "$LINENO"; then :
13394   am_cv_langinfo_codeset=yes
13395 else
13396   am_cv_langinfo_codeset=no
13397 fi
13398 rm -f core conftest.err conftest.$ac_objext \
13399     conftest$ac_exeext conftest.$ac_ext
13400
13401 fi
13402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13403 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
13404   if test $am_cv_langinfo_codeset = yes; then
13405
13406 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13407
13408   fi
13409
13410 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13411 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13412   ac_have_decl=1
13413 else
13414   ac_have_decl=0
13415 fi
13416
13417 cat >>confdefs.h <<_ACEOF
13418 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13419 _ACEOF
13420
13421
13422     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13423 printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13424 if ${ac_cv_gnu_library_2_1+:} false; then :
13425   printf %s "(cached) " >&6
13426 else
13427   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428 /* end confdefs.h.  */
13429
13430 #include <features.h>
13431 #ifdef __GNU_LIBRARY__
13432  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13433   Lucky GNU user
13434  #endif
13435 #endif
13436 #ifdef __UCLIBC__
13437  Lucky user
13438 #endif
13439
13440 _ACEOF
13441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13442   $EGREP "Lucky" >/dev/null 2>&1; then :
13443   ac_cv_gnu_library_2_1=yes
13444 else
13445   ac_cv_gnu_library_2_1=no
13446 fi
13447 rm -rf conftest*
13448
13449
13450
13451 fi
13452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13453 printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
13454
13455     GLIBC21="$ac_cv_gnu_library_2_1"
13456
13457
13458
13459       if test "X$prefix" = "XNONE"; then
13460     acl_final_prefix="$ac_default_prefix"
13461   else
13462     acl_final_prefix="$prefix"
13463   fi
13464   if test "X$exec_prefix" = "XNONE"; then
13465     acl_final_exec_prefix='${prefix}'
13466   else
13467     acl_final_exec_prefix="$exec_prefix"
13468   fi
13469   acl_save_prefix="$prefix"
13470   prefix="$acl_final_prefix"
13471   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13472   prefix="$acl_save_prefix"
13473
13474
13475
13476 # Check whether --with-gnu-ld was given.
13477 if test "${with_gnu_ld+set}" = set; then :
13478   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13479 else
13480   with_gnu_ld=no
13481 fi
13482
13483 # Prepare PATH_SEPARATOR.
13484 # The user is always right.
13485 if test "${PATH_SEPARATOR+set}" != set; then
13486   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13487   # contains only /bin. Note that ksh looks also at the FPATH variable,
13488   # so we have to set that as well for the test.
13489   PATH_SEPARATOR=:
13490   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13491     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13492            || PATH_SEPARATOR=';'
13493        }
13494 fi
13495
13496 ac_prog=ld
13497 if test "$GCC" = yes; then
13498   # Check if gcc -print-prog-name=ld gives a path.
13499   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13500 printf %s "checking for ld used by $CC... " >&6; }
13501   case $host in
13502   *-*-mingw*)
13503     # gcc leaves a trailing carriage return which upsets mingw
13504     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13505   *)
13506     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13507   esac
13508   case $ac_prog in
13509     # Accept absolute paths.
13510     [\\/]* | ?:[\\/]*)
13511       re_direlt='/[^/][^/]*/\.\./'
13512       # Canonicalize the pathname of ld
13513       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
13514       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
13515         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13516       done
13517       test -z "$LD" && LD="$ac_prog"
13518       ;;
13519   "")
13520     # If it fails, then pretend we aren't using GCC.
13521     ac_prog=ld
13522     ;;
13523   *)
13524     # If it is relative, then search for the first ld in PATH.
13525     with_gnu_ld=unknown
13526     ;;
13527   esac
13528 elif test "$with_gnu_ld" = yes; then
13529   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13530 printf %s "checking for GNU ld... " >&6; }
13531 else
13532   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13533 printf %s "checking for non-GNU ld... " >&6; }
13534 fi
13535 if ${acl_cv_path_LD+:} false; then :
13536   printf %s "(cached) " >&6
13537 else
13538   if test -z "$LD"; then
13539   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13540   for ac_dir in $PATH; do
13541     IFS="$acl_save_ifs"
13542     test -z "$ac_dir" && ac_dir=.
13543     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13544       acl_cv_path_LD="$ac_dir/$ac_prog"
13545       # Check to see if the program is GNU ld.  I'd rather use --version,
13546       # but apparently some variants of GNU ld only accept -v.
13547       # Break only if it was the GNU/non-GNU ld that we prefer.
13548       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13549       *GNU* | *'with BFD'*)
13550         test "$with_gnu_ld" != no && break
13551         ;;
13552       *)
13553         test "$with_gnu_ld" != yes && break
13554         ;;
13555       esac
13556     fi
13557   done
13558   IFS="$acl_save_ifs"
13559 else
13560   acl_cv_path_LD="$LD" # Let the user override the test with a path.
13561 fi
13562 fi
13563
13564 LD="$acl_cv_path_LD"
13565 if test -n "$LD"; then
13566   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13567 printf "%s\n" "$LD" >&6; }
13568 else
13569   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13570 printf "%s\n" "no" >&6; }
13571 fi
13572 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13574 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13575 if ${acl_cv_prog_gnu_ld+:} false; then :
13576   printf %s "(cached) " >&6
13577 else
13578   # I'd rather use --version here, but apparently some GNU lds only accept -v.
13579 case `$LD -v 2>&1 </dev/null` in
13580 *GNU* | *'with BFD'*)
13581   acl_cv_prog_gnu_ld=yes
13582   ;;
13583 *)
13584   acl_cv_prog_gnu_ld=no
13585   ;;
13586 esac
13587 fi
13588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
13589 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
13590 with_gnu_ld=$acl_cv_prog_gnu_ld
13591
13592
13593
13594
13595                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
13596 printf %s "checking for shared library run path origin... " >&6; }
13597 if ${acl_cv_rpath+:} false; then :
13598   printf %s "(cached) " >&6
13599 else
13600
13601     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
13602     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
13603     . ./conftest.sh
13604     rm -f ./conftest.sh
13605     acl_cv_rpath=done
13606
13607 fi
13608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
13609 printf "%s\n" "$acl_cv_rpath" >&6; }
13610   wl="$acl_cv_wl"
13611   acl_libext="$acl_cv_libext"
13612   acl_shlibext="$acl_cv_shlibext"
13613   acl_libname_spec="$acl_cv_libname_spec"
13614   acl_library_names_spec="$acl_cv_library_names_spec"
13615   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
13616   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
13617   acl_hardcode_direct="$acl_cv_hardcode_direct"
13618   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
13619     # Check whether --enable-rpath was given.
13620 if test "${enable_rpath+set}" = set; then :
13621   enableval=$enable_rpath; :
13622 else
13623   enable_rpath=yes
13624 fi
13625
13626
13627
13628
13629   acl_libdirstem=lib
13630   acl_libdirstem2=
13631   case "$host_os" in
13632     solaris*)
13633                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
13634 printf %s "checking for 64-bit host... " >&6; }
13635 if ${gl_cv_solaris_64bit+:} false; then :
13636   printf %s "(cached) " >&6
13637 else
13638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639 /* end confdefs.h.  */
13640
13641 #ifdef _LP64
13642 sixtyfour bits
13643 #endif
13644
13645 _ACEOF
13646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13647   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
13648   gl_cv_solaris_64bit=yes
13649 else
13650   gl_cv_solaris_64bit=no
13651 fi
13652 rm -rf conftest*
13653
13654
13655 fi
13656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
13657 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
13658       if test $gl_cv_solaris_64bit = yes; then
13659         acl_libdirstem=lib/64
13660         case "$host_cpu" in
13661           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
13662           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
13663         esac
13664       fi
13665       ;;
13666     *)
13667       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
13668       if test -n "$searchpath"; then
13669         acl_save_IFS="${IFS=    }"; IFS=":"
13670         for searchdir in $searchpath; do
13671           if test -d "$searchdir"; then
13672             case "$searchdir" in
13673               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13674               */../ | */.. )
13675                 # Better ignore directories of this form. They are misleading.
13676                 ;;
13677               *) searchdir=`cd "$searchdir" && pwd`
13678                  case "$searchdir" in
13679                    */lib64 ) acl_libdirstem=lib64 ;;
13680                  esac ;;
13681             esac
13682           fi
13683         done
13684         IFS="$acl_save_IFS"
13685       fi
13686       ;;
13687   esac
13688   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
13689
13690
13691
13692   gl_threads_api=none
13693   LIBTHREAD=
13694   LTLIBTHREAD=
13695   LIBMULTITHREAD=
13696   LTLIBMULTITHREAD=
13697   if test "$gl_use_threads" != no; then
13698         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13699 printf %s "checking whether imported symbols can be declared weak... " >&6; }
13700 if ${gl_cv_have_weak+:} false; then :
13701   printf %s "(cached) " >&6
13702 else
13703   gl_cv_have_weak=no
13704               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13705 /* end confdefs.h.  */
13706 extern void xyzzy ();
13707 #pragma weak xyzzy
13708 int
13709 main ()
13710 {
13711 xyzzy();
13712   ;
13713   return 0;
13714 }
13715 _ACEOF
13716 if ac_fn_c_try_link "$LINENO"; then :
13717   gl_cv_have_weak=maybe
13718 fi
13719 rm -f core conftest.err conftest.$ac_objext \
13720     conftest$ac_exeext conftest.$ac_ext
13721        if test $gl_cv_have_weak = maybe; then
13722                            if test "$cross_compiling" = yes; then :
13723                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13724 /* end confdefs.h.  */
13725 #ifdef __ELF__
13726                Extensible Linking Format
13727                #endif
13728
13729 _ACEOF
13730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13731   $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13732   gl_cv_have_weak="guessing yes"
13733 else
13734   gl_cv_have_weak="guessing no"
13735 fi
13736 rm -rf conftest*
13737
13738
13739 else
13740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13741 /* end confdefs.h.  */
13742
13743 #include <stdio.h>
13744 #pragma weak fputs
13745 int main ()
13746 {
13747   return (fputs == NULL);
13748 }
13749 _ACEOF
13750 if ac_fn_c_try_run "$LINENO"; then :
13751   gl_cv_have_weak=yes
13752 else
13753   gl_cv_have_weak=no
13754 fi
13755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756   conftest.$ac_objext conftest.beam conftest.$ac_ext
13757 fi
13758
13759        fi
13760
13761 fi
13762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13763 printf "%s\n" "$gl_cv_have_weak" >&6; }
13764     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
13765       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13766       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
13767       ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13768 if test "x$ac_cv_header_pthread_h" = xyes; then :
13769   gl_have_pthread_h=yes
13770 else
13771   gl_have_pthread_h=no
13772 fi
13773
13774
13775       if test "$gl_have_pthread_h" = yes; then
13776         # Other possible tests:
13777         #   -lpthreads (FSU threads, PCthreads)
13778         #   -lgthreads
13779         gl_have_pthread=
13780         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13781         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13782         # the second one only in libpthread, and lock.c needs it.
13783         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13784 /* end confdefs.h.  */
13785 #include <pthread.h>
13786 int
13787 main ()
13788 {
13789 pthread_mutex_lock((pthread_mutex_t*)0);
13790                pthread_mutexattr_init((pthread_mutexattr_t*)0);
13791   ;
13792   return 0;
13793 }
13794 _ACEOF
13795 if ac_fn_c_try_link "$LINENO"; then :
13796   gl_have_pthread=yes
13797 fi
13798 rm -f core conftest.err conftest.$ac_objext \
13799     conftest$ac_exeext conftest.$ac_ext
13800         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13801         # since it is defined as a macro on OSF/1.)
13802         if test -n "$gl_have_pthread"; then
13803           # The program links fine without libpthread. But it may actually
13804           # need to link with libpthread in order to create multiple threads.
13805           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13806 printf %s "checking for pthread_kill in -lpthread... " >&6; }
13807 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13808   printf %s "(cached) " >&6
13809 else
13810   ac_check_lib_save_LIBS=$LIBS
13811 LIBS="-lpthread  $LIBS"
13812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13813 /* end confdefs.h.  */
13814
13815 /* Override any GCC internal prototype to avoid an error.
13816    Use char because int might match the return type of a GCC
13817    builtin and then its argument prototype would still apply.  */
13818 #ifdef __cplusplus
13819 extern "C"
13820 #endif
13821 char pthread_kill ();
13822 int
13823 main ()
13824 {
13825 return pthread_kill ();
13826   ;
13827   return 0;
13828 }
13829 _ACEOF
13830 if ac_fn_c_try_link "$LINENO"; then :
13831   ac_cv_lib_pthread_pthread_kill=yes
13832 else
13833   ac_cv_lib_pthread_pthread_kill=no
13834 fi
13835 rm -f core conftest.err conftest.$ac_objext \
13836     conftest$ac_exeext conftest.$ac_ext
13837 LIBS=$ac_check_lib_save_LIBS
13838 fi
13839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13840 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
13841 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13842   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13843              # On Solaris and HP-UX, most pthread functions exist also in libc.
13844              # Therefore pthread_in_use() needs to actually try to create a
13845              # thread: pthread_create from libc will fail, whereas
13846              # pthread_create will actually create a thread.
13847              case "$host_os" in
13848                solaris* | hpux*)
13849
13850 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13851
13852              esac
13853
13854 fi
13855
13856         else
13857           # Some library is needed. Try libpthread and libc_r.
13858           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13859 printf %s "checking for pthread_kill in -lpthread... " >&6; }
13860 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13861   printf %s "(cached) " >&6
13862 else
13863   ac_check_lib_save_LIBS=$LIBS
13864 LIBS="-lpthread  $LIBS"
13865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13866 /* end confdefs.h.  */
13867
13868 /* Override any GCC internal prototype to avoid an error.
13869    Use char because int might match the return type of a GCC
13870    builtin and then its argument prototype would still apply.  */
13871 #ifdef __cplusplus
13872 extern "C"
13873 #endif
13874 char pthread_kill ();
13875 int
13876 main ()
13877 {
13878 return pthread_kill ();
13879   ;
13880   return 0;
13881 }
13882 _ACEOF
13883 if ac_fn_c_try_link "$LINENO"; then :
13884   ac_cv_lib_pthread_pthread_kill=yes
13885 else
13886   ac_cv_lib_pthread_pthread_kill=no
13887 fi
13888 rm -f core conftest.err conftest.$ac_objext \
13889     conftest$ac_exeext conftest.$ac_ext
13890 LIBS=$ac_check_lib_save_LIBS
13891 fi
13892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13893 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
13894 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13895   gl_have_pthread=yes
13896              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
13897              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13898 fi
13899
13900           if test -z "$gl_have_pthread"; then
13901             # For FreeBSD 4.
13902             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13903 printf %s "checking for pthread_kill in -lc_r... " >&6; }
13904 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13905   printf %s "(cached) " >&6
13906 else
13907   ac_check_lib_save_LIBS=$LIBS
13908 LIBS="-lc_r  $LIBS"
13909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13910 /* end confdefs.h.  */
13911
13912 /* Override any GCC internal prototype to avoid an error.
13913    Use char because int might match the return type of a GCC
13914    builtin and then its argument prototype would still apply.  */
13915 #ifdef __cplusplus
13916 extern "C"
13917 #endif
13918 char pthread_kill ();
13919 int
13920 main ()
13921 {
13922 return pthread_kill ();
13923   ;
13924   return 0;
13925 }
13926 _ACEOF
13927 if ac_fn_c_try_link "$LINENO"; then :
13928   ac_cv_lib_c_r_pthread_kill=yes
13929 else
13930   ac_cv_lib_c_r_pthread_kill=no
13931 fi
13932 rm -f core conftest.err conftest.$ac_objext \
13933     conftest$ac_exeext conftest.$ac_ext
13934 LIBS=$ac_check_lib_save_LIBS
13935 fi
13936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13937 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
13938 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13939   gl_have_pthread=yes
13940                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13941                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13942 fi
13943
13944           fi
13945         fi
13946         if test -n "$gl_have_pthread"; then
13947           gl_threads_api=posix
13948
13949 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
13950
13951           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13952             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13953
13954 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13955
13956               LIBTHREAD=
13957               LTLIBTHREAD=
13958             fi
13959           fi
13960         fi
13961       fi
13962     fi
13963     if test -z "$gl_have_pthread"; then
13964       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13965         gl_have_solaristhread=
13966         gl_save_LIBS="$LIBS"
13967         LIBS="$LIBS -lthread"
13968         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13969 /* end confdefs.h.  */
13970
13971 #include <thread.h>
13972 #include <synch.h>
13973
13974 int
13975 main ()
13976 {
13977 thr_self();
13978   ;
13979   return 0;
13980 }
13981 _ACEOF
13982 if ac_fn_c_try_link "$LINENO"; then :
13983   gl_have_solaristhread=yes
13984 fi
13985 rm -f core conftest.err conftest.$ac_objext \
13986     conftest$ac_exeext conftest.$ac_ext
13987         LIBS="$gl_save_LIBS"
13988         if test -n "$gl_have_solaristhread"; then
13989           gl_threads_api=solaris
13990           LIBTHREAD=-lthread
13991           LTLIBTHREAD=-lthread
13992           LIBMULTITHREAD="$LIBTHREAD"
13993           LTLIBMULTITHREAD="$LTLIBTHREAD"
13994
13995 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13996
13997           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13998
13999 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14000
14001             LIBTHREAD=
14002             LTLIBTHREAD=
14003           fi
14004         fi
14005       fi
14006     fi
14007     if test "$gl_use_threads" = pth; then
14008       gl_save_CPPFLAGS="$CPPFLAGS"
14009
14010
14011
14012
14013
14014   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
14015 printf %s "checking how to link with libpth... " >&6; }
14016 if ${ac_cv_libpth_libs+:} false; then :
14017   printf %s "(cached) " >&6
14018 else
14019
14020
14021
14022
14023
14024
14025
14026
14027     use_additional=yes
14028
14029   acl_save_prefix="$prefix"
14030   prefix="$acl_final_prefix"
14031   acl_save_exec_prefix="$exec_prefix"
14032   exec_prefix="$acl_final_exec_prefix"
14033
14034     eval additional_includedir=\"$includedir\"
14035     eval additional_libdir=\"$libdir\"
14036
14037   exec_prefix="$acl_save_exec_prefix"
14038   prefix="$acl_save_prefix"
14039
14040
14041 # Check whether --with-libpth-prefix was given.
14042 if test "${with_libpth_prefix+set}" = set; then :
14043   withval=$with_libpth_prefix;
14044     if test "X$withval" = "Xno"; then
14045       use_additional=no
14046     else
14047       if test "X$withval" = "X"; then
14048
14049   acl_save_prefix="$prefix"
14050   prefix="$acl_final_prefix"
14051   acl_save_exec_prefix="$exec_prefix"
14052   exec_prefix="$acl_final_exec_prefix"
14053
14054           eval additional_includedir=\"$includedir\"
14055           eval additional_libdir=\"$libdir\"
14056
14057   exec_prefix="$acl_save_exec_prefix"
14058   prefix="$acl_save_prefix"
14059
14060       else
14061         additional_includedir="$withval/include"
14062         additional_libdir="$withval/$acl_libdirstem"
14063         if test "$acl_libdirstem2" != "$acl_libdirstem" \
14064            && ! test -d "$withval/$acl_libdirstem"; then
14065           additional_libdir="$withval/$acl_libdirstem2"
14066         fi
14067       fi
14068     fi
14069
14070 fi
14071
14072       LIBPTH=
14073   LTLIBPTH=
14074   INCPTH=
14075   LIBPTH_PREFIX=
14076       HAVE_LIBPTH=
14077   rpathdirs=
14078   ltrpathdirs=
14079   names_already_handled=
14080   names_next_round='pth '
14081   while test -n "$names_next_round"; do
14082     names_this_round="$names_next_round"
14083     names_next_round=
14084     for name in $names_this_round; do
14085       already_handled=
14086       for n in $names_already_handled; do
14087         if test "$n" = "$name"; then
14088           already_handled=yes
14089           break
14090         fi
14091       done
14092       if test -z "$already_handled"; then
14093         names_already_handled="$names_already_handled $name"
14094                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14095         eval value=\"\$HAVE_LIB$uppername\"
14096         if test -n "$value"; then
14097           if test "$value" = yes; then
14098             eval value=\"\$LIB$uppername\"
14099             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
14100             eval value=\"\$LTLIB$uppername\"
14101             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
14102           else
14103                                     :
14104           fi
14105         else
14106                               found_dir=
14107           found_la=
14108           found_so=
14109           found_a=
14110           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
14111           if test -n "$acl_shlibext"; then
14112             shrext=".$acl_shlibext"             # typically: shrext=.so
14113           else
14114             shrext=
14115           fi
14116           if test $use_additional = yes; then
14117             dir="$additional_libdir"
14118                                     if test -n "$acl_shlibext"; then
14119               if test -f "$dir/$libname$shrext"; then
14120                 found_dir="$dir"
14121                 found_so="$dir/$libname$shrext"
14122               else
14123                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14124                   ver=`(cd "$dir" && \
14125                         for f in "$libname$shrext".*; do echo "$f"; done \
14126                         | sed -e "s,^$libname$shrext\\\\.,," \
14127                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14128                         | sed 1q ) 2>/dev/null`
14129                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14130                     found_dir="$dir"
14131                     found_so="$dir/$libname$shrext.$ver"
14132                   fi
14133                 else
14134                   eval library_names=\"$acl_library_names_spec\"
14135                   for f in $library_names; do
14136                     if test -f "$dir/$f"; then
14137                       found_dir="$dir"
14138                       found_so="$dir/$f"
14139                       break
14140                     fi
14141                   done
14142                 fi
14143               fi
14144             fi
14145                         if test "X$found_dir" = "X"; then
14146               if test -f "$dir/$libname.$acl_libext"; then
14147                 found_dir="$dir"
14148                 found_a="$dir/$libname.$acl_libext"
14149               fi
14150             fi
14151             if test "X$found_dir" != "X"; then
14152               if test -f "$dir/$libname.la"; then
14153                 found_la="$dir/$libname.la"
14154               fi
14155             fi
14156           fi
14157           if test "X$found_dir" = "X"; then
14158             for x in $LDFLAGS $LTLIBPTH; do
14159
14160   acl_save_prefix="$prefix"
14161   prefix="$acl_final_prefix"
14162   acl_save_exec_prefix="$exec_prefix"
14163   exec_prefix="$acl_final_exec_prefix"
14164   eval x=\"$x\"
14165   exec_prefix="$acl_save_exec_prefix"
14166   prefix="$acl_save_prefix"
14167
14168               case "$x" in
14169                 -L*)
14170                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14171                                     if test -n "$acl_shlibext"; then
14172                     if test -f "$dir/$libname$shrext"; then
14173                       found_dir="$dir"
14174                       found_so="$dir/$libname$shrext"
14175                     else
14176                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14177                         ver=`(cd "$dir" && \
14178                               for f in "$libname$shrext".*; do echo "$f"; done \
14179                               | sed -e "s,^$libname$shrext\\\\.,," \
14180                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14181                               | sed 1q ) 2>/dev/null`
14182                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14183                           found_dir="$dir"
14184                           found_so="$dir/$libname$shrext.$ver"
14185                         fi
14186                       else
14187                         eval library_names=\"$acl_library_names_spec\"
14188                         for f in $library_names; do
14189                           if test -f "$dir/$f"; then
14190                             found_dir="$dir"
14191                             found_so="$dir/$f"
14192                             break
14193                           fi
14194                         done
14195                       fi
14196                     fi
14197                   fi
14198                                     if test "X$found_dir" = "X"; then
14199                     if test -f "$dir/$libname.$acl_libext"; then
14200                       found_dir="$dir"
14201                       found_a="$dir/$libname.$acl_libext"
14202                     fi
14203                   fi
14204                   if test "X$found_dir" != "X"; then
14205                     if test -f "$dir/$libname.la"; then
14206                       found_la="$dir/$libname.la"
14207                     fi
14208                   fi
14209                   ;;
14210               esac
14211               if test "X$found_dir" != "X"; then
14212                 break
14213               fi
14214             done
14215           fi
14216           if test "X$found_dir" != "X"; then
14217                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14218             if test "X$found_so" != "X"; then
14219                                                         if test "$enable_rpath" = no \
14220                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14221                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14222                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14223               else
14224                                                                                 haveit=
14225                 for x in $ltrpathdirs; do
14226                   if test "X$x" = "X$found_dir"; then
14227                     haveit=yes
14228                     break
14229                   fi
14230                 done
14231                 if test -z "$haveit"; then
14232                   ltrpathdirs="$ltrpathdirs $found_dir"
14233                 fi
14234                                 if test "$acl_hardcode_direct" = yes; then
14235                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14236                 else
14237                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14238                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14239                                                             haveit=
14240                     for x in $rpathdirs; do
14241                       if test "X$x" = "X$found_dir"; then
14242                         haveit=yes
14243                         break
14244                       fi
14245                     done
14246                     if test -z "$haveit"; then
14247                       rpathdirs="$rpathdirs $found_dir"
14248                     fi
14249                   else
14250                                                                                 haveit=
14251                     for x in $LDFLAGS $LIBPTH; do
14252
14253   acl_save_prefix="$prefix"
14254   prefix="$acl_final_prefix"
14255   acl_save_exec_prefix="$exec_prefix"
14256   exec_prefix="$acl_final_exec_prefix"
14257   eval x=\"$x\"
14258   exec_prefix="$acl_save_exec_prefix"
14259   prefix="$acl_save_prefix"
14260
14261                       if test "X$x" = "X-L$found_dir"; then
14262                         haveit=yes
14263                         break
14264                       fi
14265                     done
14266                     if test -z "$haveit"; then
14267                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14268                     fi
14269                     if test "$acl_hardcode_minus_L" != no; then
14270                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14271                     else
14272                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14273                     fi
14274                   fi
14275                 fi
14276               fi
14277             else
14278               if test "X$found_a" != "X"; then
14279                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14280               else
14281                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14282               fi
14283             fi
14284                         additional_includedir=
14285             case "$found_dir" in
14286               */$acl_libdirstem | */$acl_libdirstem/)
14287                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14288                 if test "$name" = 'pth'; then
14289                   LIBPTH_PREFIX="$basedir"
14290                 fi
14291                 additional_includedir="$basedir/include"
14292                 ;;
14293               */$acl_libdirstem2 | */$acl_libdirstem2/)
14294                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14295                 if test "$name" = 'pth'; then
14296                   LIBPTH_PREFIX="$basedir"
14297                 fi
14298                 additional_includedir="$basedir/include"
14299                 ;;
14300             esac
14301             if test "X$additional_includedir" != "X"; then
14302                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14303                 haveit=
14304                 if test "X$additional_includedir" = "X/usr/local/include"; then
14305                   if test -n "$GCC"; then
14306                     case $host_os in
14307                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14308                     esac
14309                   fi
14310                 fi
14311                 if test -z "$haveit"; then
14312                   for x in $CPPFLAGS $INCPTH; do
14313
14314   acl_save_prefix="$prefix"
14315   prefix="$acl_final_prefix"
14316   acl_save_exec_prefix="$exec_prefix"
14317   exec_prefix="$acl_final_exec_prefix"
14318   eval x=\"$x\"
14319   exec_prefix="$acl_save_exec_prefix"
14320   prefix="$acl_save_prefix"
14321
14322                     if test "X$x" = "X-I$additional_includedir"; then
14323                       haveit=yes
14324                       break
14325                     fi
14326                   done
14327                   if test -z "$haveit"; then
14328                     if test -d "$additional_includedir"; then
14329                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14330                     fi
14331                   fi
14332                 fi
14333               fi
14334             fi
14335                         if test -n "$found_la"; then
14336                                                         save_libdir="$libdir"
14337               case "$found_la" in
14338                 */* | *\\*) . "$found_la" ;;
14339                 *) . "./$found_la" ;;
14340               esac
14341               libdir="$save_libdir"
14342                             for dep in $dependency_libs; do
14343                 case "$dep" in
14344                   -L*)
14345                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14346                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14347                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14348                       haveit=
14349                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14350                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14351                         if test -n "$GCC"; then
14352                           case $host_os in
14353                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14354                           esac
14355                         fi
14356                       fi
14357                       if test -z "$haveit"; then
14358                         haveit=
14359                         for x in $LDFLAGS $LIBPTH; do
14360
14361   acl_save_prefix="$prefix"
14362   prefix="$acl_final_prefix"
14363   acl_save_exec_prefix="$exec_prefix"
14364   exec_prefix="$acl_final_exec_prefix"
14365   eval x=\"$x\"
14366   exec_prefix="$acl_save_exec_prefix"
14367   prefix="$acl_save_prefix"
14368
14369                           if test "X$x" = "X-L$additional_libdir"; then
14370                             haveit=yes
14371                             break
14372                           fi
14373                         done
14374                         if test -z "$haveit"; then
14375                           if test -d "$additional_libdir"; then
14376                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14377                           fi
14378                         fi
14379                         haveit=
14380                         for x in $LDFLAGS $LTLIBPTH; do
14381
14382   acl_save_prefix="$prefix"
14383   prefix="$acl_final_prefix"
14384   acl_save_exec_prefix="$exec_prefix"
14385   exec_prefix="$acl_final_exec_prefix"
14386   eval x=\"$x\"
14387   exec_prefix="$acl_save_exec_prefix"
14388   prefix="$acl_save_prefix"
14389
14390                           if test "X$x" = "X-L$additional_libdir"; then
14391                             haveit=yes
14392                             break
14393                           fi
14394                         done
14395                         if test -z "$haveit"; then
14396                           if test -d "$additional_libdir"; then
14397                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14398                           fi
14399                         fi
14400                       fi
14401                     fi
14402                     ;;
14403                   -R*)
14404                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14405                     if test "$enable_rpath" != no; then
14406                                                                   haveit=
14407                       for x in $rpathdirs; do
14408                         if test "X$x" = "X$dir"; then
14409                           haveit=yes
14410                           break
14411                         fi
14412                       done
14413                       if test -z "$haveit"; then
14414                         rpathdirs="$rpathdirs $dir"
14415                       fi
14416                                                                   haveit=
14417                       for x in $ltrpathdirs; do
14418                         if test "X$x" = "X$dir"; then
14419                           haveit=yes
14420                           break
14421                         fi
14422                       done
14423                       if test -z "$haveit"; then
14424                         ltrpathdirs="$ltrpathdirs $dir"
14425                       fi
14426                     fi
14427                     ;;
14428                   -l*)
14429                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14430                     ;;
14431                   *.la)
14432                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14433                     ;;
14434                   *)
14435                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14436                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14437                     ;;
14438                 esac
14439               done
14440             fi
14441           else
14442                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14443             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14444           fi
14445         fi
14446       fi
14447     done
14448   done
14449   if test "X$rpathdirs" != "X"; then
14450     if test -n "$acl_hardcode_libdir_separator"; then
14451                         alldirs=
14452       for found_dir in $rpathdirs; do
14453         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14454       done
14455             acl_save_libdir="$libdir"
14456       libdir="$alldirs"
14457       eval flag=\"$acl_hardcode_libdir_flag_spec\"
14458       libdir="$acl_save_libdir"
14459       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14460     else
14461             for found_dir in $rpathdirs; do
14462         acl_save_libdir="$libdir"
14463         libdir="$found_dir"
14464         eval flag=\"$acl_hardcode_libdir_flag_spec\"
14465         libdir="$acl_save_libdir"
14466         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14467       done
14468     fi
14469   fi
14470   if test "X$ltrpathdirs" != "X"; then
14471             for found_dir in $ltrpathdirs; do
14472       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14473     done
14474   fi
14475
14476
14477
14478
14479
14480
14481     ac_cv_libpth_libs="$LIBPTH"
14482     ac_cv_libpth_ltlibs="$LTLIBPTH"
14483     ac_cv_libpth_cppflags="$INCPTH"
14484     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14485
14486 fi
14487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14488 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
14489   LIBPTH="$ac_cv_libpth_libs"
14490   LTLIBPTH="$ac_cv_libpth_ltlibs"
14491   INCPTH="$ac_cv_libpth_cppflags"
14492   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14493
14494   for element in $INCPTH; do
14495     haveit=
14496     for x in $CPPFLAGS; do
14497
14498   acl_save_prefix="$prefix"
14499   prefix="$acl_final_prefix"
14500   acl_save_exec_prefix="$exec_prefix"
14501   exec_prefix="$acl_final_exec_prefix"
14502   eval x=\"$x\"
14503   exec_prefix="$acl_save_exec_prefix"
14504   prefix="$acl_save_prefix"
14505
14506       if test "X$x" = "X$element"; then
14507         haveit=yes
14508         break
14509       fi
14510     done
14511     if test -z "$haveit"; then
14512       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14513     fi
14514   done
14515
14516
14517
14518
14519       HAVE_LIBPTH=yes
14520
14521
14522
14523       gl_have_pth=
14524       gl_save_LIBS="$LIBS"
14525       LIBS="$LIBS $LIBPTH"
14526       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527 /* end confdefs.h.  */
14528 #include <pth.h>
14529 int
14530 main ()
14531 {
14532 pth_self();
14533   ;
14534   return 0;
14535 }
14536 _ACEOF
14537 if ac_fn_c_try_link "$LINENO"; then :
14538   gl_have_pth=yes
14539 fi
14540 rm -f core conftest.err conftest.$ac_objext \
14541     conftest$ac_exeext conftest.$ac_ext
14542       LIBS="$gl_save_LIBS"
14543       if test -n "$gl_have_pth"; then
14544         gl_threads_api=pth
14545         LIBTHREAD="$LIBPTH"
14546         LTLIBTHREAD="$LTLIBPTH"
14547         LIBMULTITHREAD="$LIBTHREAD"
14548         LTLIBMULTITHREAD="$LTLIBTHREAD"
14549
14550 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
14551
14552         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14553           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14554
14555 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14556
14557             LIBTHREAD=
14558             LTLIBTHREAD=
14559           fi
14560         fi
14561       else
14562         CPPFLAGS="$gl_save_CPPFLAGS"
14563       fi
14564     fi
14565     if test -z "$gl_have_pthread"; then
14566       case "$gl_use_threads" in
14567         yes | windows | win32) # The 'win32' is for backward compatibility.
14568           if { case "$host_os" in
14569                  mingw*) true;;
14570                  *) false;;
14571                esac
14572              }; then
14573             gl_threads_api=windows
14574
14575 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14576
14577           fi
14578           ;;
14579       esac
14580     fi
14581   fi
14582   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14583 printf %s "checking for multithread API to use... " >&6; }
14584   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14585 printf "%s\n" "$gl_threads_api" >&6; }
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14599 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
14600 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14601   printf %s "(cached) " >&6
14602 else
14603   rm -f conftest.sym conftest.file
14604      echo >conftest.file
14605      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
14606        if test "$cross_compiling" = yes; then :
14607   case "$host_os" in
14608                     # Guess yes on glibc systems.
14609             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14610                     # If we don't know, assume the worst.
14611             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14612           esac
14613
14614 else
14615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h.  */
14617 $ac_includes_default
14618 int
14619 main ()
14620 {
14621 struct stat sbuf;
14622               /* Linux will dereference the symlink and fail, as required by
14623                  POSIX.  That is better in the sense that it means we will not
14624                  have to compile and use the lstat wrapper.  */
14625               return lstat ("conftest.sym/", &sbuf) == 0;
14626
14627   ;
14628   return 0;
14629 }
14630 _ACEOF
14631 if ac_fn_c_try_run "$LINENO"; then :
14632   gl_cv_func_lstat_dereferences_slashed_symlink=yes
14633 else
14634   gl_cv_func_lstat_dereferences_slashed_symlink=no
14635 fi
14636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14637   conftest.$ac_objext conftest.beam conftest.$ac_ext
14638 fi
14639
14640      else
14641        # If the 'ln -s' command failed, then we probably don't even
14642        # have an lstat function.
14643        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
14644      fi
14645      rm -f conftest.sym conftest.file
14646
14647 fi
14648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14649 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14650   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14651     *yes)
14652
14653 cat >>confdefs.h <<_ACEOF
14654 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
14655 _ACEOF
14656
14657       ;;
14658   esac
14659
14660
14661
14662
14663   GNULIB_BTOWC=0;
14664   GNULIB_WCTOB=0;
14665   GNULIB_MBSINIT=0;
14666   GNULIB_MBRTOWC=0;
14667   GNULIB_MBRLEN=0;
14668   GNULIB_MBSRTOWCS=0;
14669   GNULIB_MBSNRTOWCS=0;
14670   GNULIB_WCRTOMB=0;
14671   GNULIB_WCSRTOMBS=0;
14672   GNULIB_WCSNRTOMBS=0;
14673   GNULIB_WCWIDTH=0;
14674   GNULIB_WMEMCHR=0;
14675   GNULIB_WMEMCMP=0;
14676   GNULIB_WMEMCPY=0;
14677   GNULIB_WMEMMOVE=0;
14678   GNULIB_WMEMSET=0;
14679   GNULIB_WCSLEN=0;
14680   GNULIB_WCSNLEN=0;
14681   GNULIB_WCSCPY=0;
14682   GNULIB_WCPCPY=0;
14683   GNULIB_WCSNCPY=0;
14684   GNULIB_WCPNCPY=0;
14685   GNULIB_WCSCAT=0;
14686   GNULIB_WCSNCAT=0;
14687   GNULIB_WCSCMP=0;
14688   GNULIB_WCSNCMP=0;
14689   GNULIB_WCSCASECMP=0;
14690   GNULIB_WCSNCASECMP=0;
14691   GNULIB_WCSCOLL=0;
14692   GNULIB_WCSXFRM=0;
14693   GNULIB_WCSDUP=0;
14694   GNULIB_WCSCHR=0;
14695   GNULIB_WCSRCHR=0;
14696   GNULIB_WCSCSPN=0;
14697   GNULIB_WCSSPN=0;
14698   GNULIB_WCSPBRK=0;
14699   GNULIB_WCSSTR=0;
14700   GNULIB_WCSTOK=0;
14701   GNULIB_WCSWIDTH=0;
14702     HAVE_BTOWC=1;
14703   HAVE_MBSINIT=1;
14704   HAVE_MBRTOWC=1;
14705   HAVE_MBRLEN=1;
14706   HAVE_MBSRTOWCS=1;
14707   HAVE_MBSNRTOWCS=1;
14708   HAVE_WCRTOMB=1;
14709   HAVE_WCSRTOMBS=1;
14710   HAVE_WCSNRTOMBS=1;
14711   HAVE_WMEMCHR=1;
14712   HAVE_WMEMCMP=1;
14713   HAVE_WMEMCPY=1;
14714   HAVE_WMEMMOVE=1;
14715   HAVE_WMEMSET=1;
14716   HAVE_WCSLEN=1;
14717   HAVE_WCSNLEN=1;
14718   HAVE_WCSCPY=1;
14719   HAVE_WCPCPY=1;
14720   HAVE_WCSNCPY=1;
14721   HAVE_WCPNCPY=1;
14722   HAVE_WCSCAT=1;
14723   HAVE_WCSNCAT=1;
14724   HAVE_WCSCMP=1;
14725   HAVE_WCSNCMP=1;
14726   HAVE_WCSCASECMP=1;
14727   HAVE_WCSNCASECMP=1;
14728   HAVE_WCSCOLL=1;
14729   HAVE_WCSXFRM=1;
14730   HAVE_WCSDUP=1;
14731   HAVE_WCSCHR=1;
14732   HAVE_WCSRCHR=1;
14733   HAVE_WCSCSPN=1;
14734   HAVE_WCSSPN=1;
14735   HAVE_WCSPBRK=1;
14736   HAVE_WCSSTR=1;
14737   HAVE_WCSTOK=1;
14738   HAVE_WCSWIDTH=1;
14739   HAVE_DECL_WCTOB=1;
14740   HAVE_DECL_WCWIDTH=1;
14741   REPLACE_MBSTATE_T=0;
14742   REPLACE_BTOWC=0;
14743   REPLACE_WCTOB=0;
14744   REPLACE_MBSINIT=0;
14745   REPLACE_MBRTOWC=0;
14746   REPLACE_MBRLEN=0;
14747   REPLACE_MBSRTOWCS=0;
14748   REPLACE_MBSNRTOWCS=0;
14749   REPLACE_WCRTOMB=0;
14750   REPLACE_WCSRTOMBS=0;
14751   REPLACE_WCSNRTOMBS=0;
14752   REPLACE_WCWIDTH=0;
14753   REPLACE_WCSWIDTH=0;
14754
14755
14756
14757    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14758 printf %s "checking for mbstate_t... " >&6; }
14759 if ${ac_cv_type_mbstate_t+:} false; then :
14760   printf %s "(cached) " >&6
14761 else
14762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14763 /* end confdefs.h.  */
14764 $ac_includes_default
14765 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14766    <wchar.h>.
14767    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14768    included before <wchar.h>.  */
14769 #include <stddef.h>
14770 #include <stdio.h>
14771 #include <time.h>
14772 #include <wchar.h>
14773 int
14774 main ()
14775 {
14776 mbstate_t x; return sizeof x;
14777   ;
14778   return 0;
14779 }
14780 _ACEOF
14781 if ac_fn_c_try_compile "$LINENO"; then :
14782   ac_cv_type_mbstate_t=yes
14783 else
14784   ac_cv_type_mbstate_t=no
14785 fi
14786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14787 fi
14788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14789 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
14790    if test $ac_cv_type_mbstate_t = yes; then
14791
14792 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
14793
14794    else
14795
14796 printf "%s\n" "#define mbstate_t int" >>confdefs.h
14797
14798    fi
14799
14800
14801
14802
14803
14804
14805
14806
14807   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14808 printf %s "checking for a traditional japanese locale... " >&6; }
14809 if ${gt_cv_locale_ja+:} false; then :
14810   printf %s "(cached) " >&6
14811 else
14812
14813     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14814 /* end confdefs.h.  */
14815
14816 #include <locale.h>
14817 #include <time.h>
14818 #if HAVE_LANGINFO_CODESET
14819 # include <langinfo.h>
14820 #endif
14821 #include <stdlib.h>
14822 #include <string.h>
14823 struct tm t;
14824 char buf[16];
14825 int main ()
14826 {
14827   const char *p;
14828   /* Check whether the given locale name is recognized by the system.  */
14829 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14830   /* On native Windows, setlocale(category, "") looks at the system settings,
14831      not at the environment variables.  Also, when an encoding suffix such
14832      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14833      category of the locale to "C".  */
14834   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14835       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14836     return 1;
14837 #else
14838   if (setlocale (LC_ALL, "") == NULL) return 1;
14839 #endif
14840   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14841      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14842      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14843      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14844      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14845      some unit tests fail.
14846      On MirBSD 10, when an unsupported locale is specified, setlocale()
14847      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14848 #if HAVE_LANGINFO_CODESET
14849   {
14850     const char *cs = nl_langinfo (CODESET);
14851     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14852         || strcmp (cs, "UTF-8") == 0)
14853       return 1;
14854   }
14855 #endif
14856 #ifdef __CYGWIN__
14857   /* On Cygwin, avoid locale names without encoding suffix, because the
14858      locale_charset() function relies on the encoding suffix.  Note that
14859      LC_ALL is set on the command line.  */
14860   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14861 #endif
14862   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14863      on Cygwin 1.5.x.  */
14864   if (MB_CUR_MAX == 1)
14865     return 1;
14866   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14867      This excludes the UTF-8 encoding (except on MirBSD).  */
14868   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14869   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14870   for (p = buf; *p != '\0'; p++)
14871     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14872       return 1;
14873   return 0;
14874 }
14875
14876 _ACEOF
14877     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14878   (eval $ac_link) 2>&5
14879   ac_status=$?
14880   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14881   test $ac_status = 0; } && test -s conftest$ac_exeext; then
14882       case "$host_os" in
14883         # Handle native Windows specially, because there setlocale() interprets
14884         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14885         # "fr" or "fra" as "French" or "French_France.1252",
14886         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14887         # "ja" as "Japanese" or "Japanese_Japan.932",
14888         # and similar.
14889         mingw*)
14890           # Note that on native Windows, the Japanese locale is
14891           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14892           # cannot use it here.
14893           gt_cv_locale_ja=none
14894           ;;
14895         *)
14896           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14897           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14898           # configure script would override the LC_ALL setting. Likewise for
14899           # LC_CTYPE, which is also set at the beginning of the configure script.
14900           # Test for the AIX locale name.
14901           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14902             gt_cv_locale_ja=ja_JP
14903           else
14904             # Test for the locale name with explicit encoding suffix.
14905             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14906               gt_cv_locale_ja=ja_JP.EUC-JP
14907             else
14908               # Test for the HP-UX, OSF/1, NetBSD locale name.
14909               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14910                 gt_cv_locale_ja=ja_JP.eucJP
14911               else
14912                 # Test for the IRIX, FreeBSD locale name.
14913                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14914                   gt_cv_locale_ja=ja_JP.EUC
14915                 else
14916                   # Test for the Solaris 7 locale name.
14917                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14918                     gt_cv_locale_ja=ja
14919                   else
14920                     # Special test for NetBSD 1.6.
14921                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14922                       gt_cv_locale_ja=ja_JP.eucJP
14923                     else
14924                       # None found.
14925                       gt_cv_locale_ja=none
14926                     fi
14927                   fi
14928                 fi
14929               fi
14930             fi
14931           fi
14932           ;;
14933       esac
14934     fi
14935     rm -fr conftest*
14936
14937 fi
14938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14939 printf "%s\n" "$gt_cv_locale_ja" >&6; }
14940   LOCALE_JA=$gt_cv_locale_ja
14941
14942
14943
14944
14945
14946   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14947 printf %s "checking for a transitional chinese locale... " >&6; }
14948 if ${gt_cv_locale_zh_CN+:} false; then :
14949   printf %s "(cached) " >&6
14950 else
14951
14952     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14953 /* end confdefs.h.  */
14954
14955 #include <locale.h>
14956 #include <stdlib.h>
14957 #include <time.h>
14958 #if HAVE_LANGINFO_CODESET
14959 # include <langinfo.h>
14960 #endif
14961 #include <stdlib.h>
14962 #include <string.h>
14963 struct tm t;
14964 char buf[16];
14965 int main ()
14966 {
14967   const char *p;
14968   /* Check whether the given locale name is recognized by the system.  */
14969 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14970   /* On native Windows, setlocale(category, "") looks at the system settings,
14971      not at the environment variables.  Also, when an encoding suffix such
14972      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14973      category of the locale to "C".  */
14974   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14975       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14976     return 1;
14977 #else
14978   if (setlocale (LC_ALL, "") == NULL) return 1;
14979 #endif
14980   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14981      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14982      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14983      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14984      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14985      some unit tests fail.
14986      On MirBSD 10, when an unsupported locale is specified, setlocale()
14987      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
14988 #if HAVE_LANGINFO_CODESET
14989   {
14990     const char *cs = nl_langinfo (CODESET);
14991     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14992         || strcmp (cs, "UTF-8") == 0)
14993       return 1;
14994   }
14995 #endif
14996 #ifdef __CYGWIN__
14997   /* On Cygwin, avoid locale names without encoding suffix, because the
14998      locale_charset() function relies on the encoding suffix.  Note that
14999      LC_ALL is set on the command line.  */
15000   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15001 #endif
15002   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15003      This excludes the UTF-8 encoding (except on MirBSD).  */
15004   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15005   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15006   for (p = buf; *p != '\0'; p++)
15007     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15008       return 1;
15009   /* Check whether a typical GB18030 multibyte sequence is recognized as a
15010      single wide character.  This excludes the GB2312 and GBK encodings.  */
15011   if (mblen ("\203\062\332\066", 5) != 4)
15012     return 1;
15013   return 0;
15014 }
15015
15016 _ACEOF
15017     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15018   (eval $ac_link) 2>&5
15019   ac_status=$?
15020   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15021   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15022       case "$host_os" in
15023         # Handle native Windows specially, because there setlocale() interprets
15024         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15025         # "fr" or "fra" as "French" or "French_France.1252",
15026         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15027         # "ja" as "Japanese" or "Japanese_Japan.932",
15028         # and similar.
15029         mingw*)
15030           # Test for the hypothetical native Windows locale name.
15031           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15032             gt_cv_locale_zh_CN=Chinese_China.54936
15033           else
15034             # None found.
15035             gt_cv_locale_zh_CN=none
15036           fi
15037           ;;
15038         solaris2.8)
15039           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15040           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15041           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15042           gt_cv_locale_zh_CN=none
15043           ;;
15044         *)
15045           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15046           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15047           # configure script would override the LC_ALL setting. Likewise for
15048           # LC_CTYPE, which is also set at the beginning of the configure script.
15049           # Test for the locale name without encoding suffix.
15050           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15051             gt_cv_locale_zh_CN=zh_CN
15052           else
15053             # Test for the locale name with explicit encoding suffix.
15054             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15055               gt_cv_locale_zh_CN=zh_CN.GB18030
15056             else
15057               # None found.
15058               gt_cv_locale_zh_CN=none
15059             fi
15060           fi
15061           ;;
15062       esac
15063     else
15064       # If there was a link error, due to mblen(), the system is so old that
15065       # it certainly doesn't have a chinese locale.
15066       gt_cv_locale_zh_CN=none
15067     fi
15068     rm -fr conftest*
15069
15070 fi
15071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15072 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
15073   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15074
15075
15076
15077
15078   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15079 printf %s "checking for a french Unicode locale... " >&6; }
15080 if ${gt_cv_locale_fr_utf8+:} false; then :
15081   printf %s "(cached) " >&6
15082 else
15083
15084     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085 /* end confdefs.h.  */
15086
15087 #include <locale.h>
15088 #include <time.h>
15089 #if HAVE_LANGINFO_CODESET
15090 # include <langinfo.h>
15091 #endif
15092 #include <stdlib.h>
15093 #include <string.h>
15094 struct tm t;
15095 char buf[16];
15096 int main () {
15097   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15098      imitates locale dependent behaviour by looking at the environment
15099      variables, and all locales use the UTF-8 encoding.  */
15100 #if !(defined __BEOS__ || defined __HAIKU__)
15101   /* Check whether the given locale name is recognized by the system.  */
15102 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15103   /* On native Windows, setlocale(category, "") looks at the system settings,
15104      not at the environment variables.  Also, when an encoding suffix such
15105      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15106      category of the locale to "C".  */
15107   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15108       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15109     return 1;
15110 # else
15111   if (setlocale (LC_ALL, "") == NULL) return 1;
15112 # endif
15113   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15114      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15115      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15116      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15117      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15118      some unit tests fail.  */
15119 # if HAVE_LANGINFO_CODESET
15120   {
15121     const char *cs = nl_langinfo (CODESET);
15122     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15123       return 1;
15124   }
15125 # endif
15126 # ifdef __CYGWIN__
15127   /* On Cygwin, avoid locale names without encoding suffix, because the
15128      locale_charset() function relies on the encoding suffix.  Note that
15129      LC_ALL is set on the command line.  */
15130   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15131 # endif
15132   /* Check whether in the abbreviation of the second month, the second
15133      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15134      two bytes long, with UTF-8 encoding.  */
15135   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15136   if (strftime (buf, sizeof (buf), "%b", &t) < 4
15137       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15138     return 1;
15139 #endif
15140 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
15141   /* Check whether the decimal separator is a comma.
15142      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15143      are nl_langinfo(RADIXCHAR) are both ".".  */
15144   if (localeconv () ->decimal_point[0] != ',') return 1;
15145 #endif
15146   return 0;
15147 }
15148
15149 _ACEOF
15150     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15151   (eval $ac_link) 2>&5
15152   ac_status=$?
15153   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15154   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15155       case "$host_os" in
15156         # Handle native Windows specially, because there setlocale() interprets
15157         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15158         # "fr" or "fra" as "French" or "French_France.1252",
15159         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15160         # "ja" as "Japanese" or "Japanese_Japan.932",
15161         # and similar.
15162         mingw*)
15163           # Test for the hypothetical native Windows locale name.
15164           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15165             gt_cv_locale_fr_utf8=French_France.65001
15166           else
15167             # None found.
15168             gt_cv_locale_fr_utf8=none
15169           fi
15170           ;;
15171         *)
15172           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15173           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15174           # configure script would override the LC_ALL setting. Likewise for
15175           # LC_CTYPE, which is also set at the beginning of the configure script.
15176           # Test for the usual locale name.
15177           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15178             gt_cv_locale_fr_utf8=fr_FR
15179           else
15180             # Test for the locale name with explicit encoding suffix.
15181             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15182               gt_cv_locale_fr_utf8=fr_FR.UTF-8
15183             else
15184               # Test for the Solaris 7 locale name.
15185               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15186                 gt_cv_locale_fr_utf8=fr.UTF-8
15187               else
15188                 # None found.
15189                 gt_cv_locale_fr_utf8=none
15190               fi
15191             fi
15192           fi
15193           ;;
15194       esac
15195     fi
15196     rm -fr conftest*
15197
15198 fi
15199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15200 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
15201   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15202
15203
15204
15205
15206
15207
15208
15209   GNULIB_FFSL=0;
15210   GNULIB_FFSLL=0;
15211   GNULIB_MEMCHR=0;
15212   GNULIB_MEMMEM=0;
15213   GNULIB_MEMPCPY=0;
15214   GNULIB_MEMRCHR=0;
15215   GNULIB_RAWMEMCHR=0;
15216   GNULIB_STPCPY=0;
15217   GNULIB_STPNCPY=0;
15218   GNULIB_STRCHRNUL=0;
15219   GNULIB_STRDUP=0;
15220   GNULIB_STRNCAT=0;
15221   GNULIB_STRNDUP=0;
15222   GNULIB_STRNLEN=0;
15223   GNULIB_STRPBRK=0;
15224   GNULIB_STRSEP=0;
15225   GNULIB_STRSTR=0;
15226   GNULIB_STRCASESTR=0;
15227   GNULIB_STRTOK_R=0;
15228   GNULIB_MBSLEN=0;
15229   GNULIB_MBSNLEN=0;
15230   GNULIB_MBSCHR=0;
15231   GNULIB_MBSRCHR=0;
15232   GNULIB_MBSSTR=0;
15233   GNULIB_MBSCASECMP=0;
15234   GNULIB_MBSNCASECMP=0;
15235   GNULIB_MBSPCASECMP=0;
15236   GNULIB_MBSCASESTR=0;
15237   GNULIB_MBSCSPN=0;
15238   GNULIB_MBSPBRK=0;
15239   GNULIB_MBSSPN=0;
15240   GNULIB_MBSSEP=0;
15241   GNULIB_MBSTOK_R=0;
15242   GNULIB_STRERROR=0;
15243   GNULIB_STRERROR_R=0;
15244   GNULIB_STRSIGNAL=0;
15245   GNULIB_STRVERSCMP=0;
15246   HAVE_MBSLEN=0;
15247     HAVE_FFSL=1;
15248   HAVE_FFSLL=1;
15249   HAVE_MEMCHR=1;
15250   HAVE_DECL_MEMMEM=1;
15251   HAVE_MEMPCPY=1;
15252   HAVE_DECL_MEMRCHR=1;
15253   HAVE_RAWMEMCHR=1;
15254   HAVE_STPCPY=1;
15255   HAVE_STPNCPY=1;
15256   HAVE_STRCHRNUL=1;
15257   HAVE_DECL_STRDUP=1;
15258   HAVE_DECL_STRNDUP=1;
15259   HAVE_DECL_STRNLEN=1;
15260   HAVE_STRPBRK=1;
15261   HAVE_STRSEP=1;
15262   HAVE_STRCASESTR=1;
15263   HAVE_DECL_STRTOK_R=1;
15264   HAVE_DECL_STRERROR_R=1;
15265   HAVE_DECL_STRSIGNAL=1;
15266   HAVE_STRVERSCMP=1;
15267   REPLACE_MEMCHR=0;
15268   REPLACE_MEMMEM=0;
15269   REPLACE_STPNCPY=0;
15270   REPLACE_STRDUP=0;
15271   REPLACE_STRSTR=0;
15272   REPLACE_STRCASESTR=0;
15273   REPLACE_STRCHRNUL=0;
15274   REPLACE_STRERROR=0;
15275   REPLACE_STRERROR_R=0;
15276   REPLACE_STRNCAT=0;
15277   REPLACE_STRNDUP=0;
15278   REPLACE_STRNLEN=0;
15279   REPLACE_STRSIGNAL=0;
15280   REPLACE_STRTOK_R=0;
15281   UNDEFINE_STRTOK_R=0;
15282
15283
15284
15285
15286
15287   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15288   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15289   # irrelevant for anonymous mappings.
15290   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15291 if test "x$ac_cv_func_mmap" = xyes; then :
15292   gl_have_mmap=yes
15293 else
15294   gl_have_mmap=no
15295 fi
15296
15297
15298   # Try to allow MAP_ANONYMOUS.
15299   gl_have_mmap_anonymous=no
15300   if test $gl_have_mmap = yes; then
15301     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15302 printf %s "checking for MAP_ANONYMOUS... " >&6; }
15303     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304 /* end confdefs.h.  */
15305
15306 #include <sys/mman.h>
15307 #ifdef MAP_ANONYMOUS
15308     I cannot identify this map
15309 #endif
15310
15311 _ACEOF
15312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15313   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15314   gl_have_mmap_anonymous=yes
15315 fi
15316 rm -rf conftest*
15317
15318     if test $gl_have_mmap_anonymous != yes; then
15319       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15320 /* end confdefs.h.  */
15321
15322 #include <sys/mman.h>
15323 #ifdef MAP_ANON
15324     I cannot identify this map
15325 #endif
15326
15327 _ACEOF
15328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15329   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15330
15331 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15332
15333          gl_have_mmap_anonymous=yes
15334 fi
15335 rm -rf conftest*
15336
15337     fi
15338     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15339 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
15340     if test $gl_have_mmap_anonymous = yes; then
15341
15342 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15343
15344     fi
15345   fi
15346
15347
15348
15349
15350
15351
15352   if test $HAVE_MEMCHR = 1; then
15353     # Detect platform-specific bugs in some versions of glibc:
15354     # memchr should not dereference anything with length 0
15355     #   http://bugzilla.redhat.com/499689
15356     # memchr should not dereference overestimated length after a match
15357     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15358     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15359     # Assume that memchr works on platforms that lack mprotect.
15360     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15361 printf %s "checking whether memchr works... " >&6; }
15362 if ${gl_cv_func_memchr_works+:} false; then :
15363   printf %s "(cached) " >&6
15364 else
15365   if test "$cross_compiling" = yes; then :
15366          gl_cv_func_memchr_works="guessing no"
15367 else
15368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h.  */
15370
15371 #include <string.h>
15372 #if HAVE_SYS_MMAN_H
15373 # include <fcntl.h>
15374 # include <unistd.h>
15375 # include <sys/types.h>
15376 # include <sys/mman.h>
15377 # ifndef MAP_FILE
15378 #  define MAP_FILE 0
15379 # endif
15380 #endif
15381
15382 int
15383 main ()
15384 {
15385
15386   int result = 0;
15387   char *fence = NULL;
15388 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15389 # if HAVE_MAP_ANONYMOUS
15390   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15391   const int fd = -1;
15392 # else /* !HAVE_MAP_ANONYMOUS */
15393   const int flags = MAP_FILE | MAP_PRIVATE;
15394   int fd = open ("/dev/zero", O_RDONLY, 0666);
15395   if (fd >= 0)
15396 # endif
15397     {
15398       int pagesize = getpagesize ();
15399       char *two_pages =
15400         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15401                        flags, fd, 0);
15402       if (two_pages != (char *)(-1)
15403           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15404         fence = two_pages + pagesize;
15405     }
15406 #endif
15407   if (fence)
15408     {
15409       if (memchr (fence, 0, 0))
15410         result |= 1;
15411       strcpy (fence - 9, "12345678");
15412       if (memchr (fence - 9, 0, 79) != fence - 1)
15413         result |= 2;
15414       if (memchr (fence - 1, 0, 3) != fence - 1)
15415         result |= 4;
15416     }
15417   return result;
15418
15419   ;
15420   return 0;
15421 }
15422 _ACEOF
15423 if ac_fn_c_try_run "$LINENO"; then :
15424   gl_cv_func_memchr_works=yes
15425 else
15426   gl_cv_func_memchr_works=no
15427 fi
15428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15429   conftest.$ac_objext conftest.beam conftest.$ac_ext
15430 fi
15431
15432 fi
15433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15434 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
15435     if test "$gl_cv_func_memchr_works" != yes; then
15436       REPLACE_MEMCHR=1
15437     fi
15438   fi
15439
15440 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15441 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15442   ac_have_decl=1
15443 else
15444   ac_have_decl=0
15445 fi
15446
15447 cat >>confdefs.h <<_ACEOF
15448 #define HAVE_DECL_MEMRCHR $ac_have_decl
15449 _ACEOF
15450
15451
15452
15453
15454      REPLACE_STRERROR_0=0
15455   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15456 printf %s "checking whether strerror(0) succeeds... " >&6; }
15457 if ${gl_cv_func_strerror_0_works+:} false; then :
15458   printf %s "(cached) " >&6
15459 else
15460   if test "$cross_compiling" = yes; then :
15461   case "$host_os" in
15462                  # Guess yes on glibc systems.
15463          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15464                  # If we don't know, assume the worst.
15465          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15466        esac
15467
15468 else
15469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15470 /* end confdefs.h.  */
15471 #include <string.h>
15472            #include <errno.h>
15473
15474 int
15475 main ()
15476 {
15477 int result = 0;
15478            char *str;
15479            errno = 0;
15480            str = strerror (0);
15481            if (!*str) result |= 1;
15482            if (errno) result |= 2;
15483            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15484              result |= 4;
15485            return result;
15486   ;
15487   return 0;
15488 }
15489 _ACEOF
15490 if ac_fn_c_try_run "$LINENO"; then :
15491   gl_cv_func_strerror_0_works=yes
15492 else
15493   gl_cv_func_strerror_0_works=no
15494 fi
15495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15496   conftest.$ac_objext conftest.beam conftest.$ac_ext
15497 fi
15498
15499
15500 fi
15501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15502 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
15503   case "$gl_cv_func_strerror_0_works" in
15504     *yes) ;;
15505     *)
15506       REPLACE_STRERROR_0=1
15507
15508 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
15509
15510       ;;
15511   esac
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522   if test $ac_cv_func_strerror_r = yes; then
15523     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15524                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15525 printf %s "checking for strerror_r with POSIX signature... " >&6; }
15526 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15527   printf %s "(cached) " >&6
15528 else
15529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15530 /* end confdefs.h.  */
15531 #include <string.h>
15532                 int strerror_r (int, char *, size_t);
15533
15534 int
15535 main ()
15536 {
15537
15538   ;
15539   return 0;
15540 }
15541 _ACEOF
15542 if ac_fn_c_try_compile "$LINENO"; then :
15543   gl_cv_func_strerror_r_posix_signature=yes
15544 else
15545   gl_cv_func_strerror_r_posix_signature=no
15546 fi
15547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15548
15549 fi
15550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15551 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
15552       if test $gl_cv_func_strerror_r_posix_signature = yes; then
15553                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15554 printf %s "checking whether strerror_r works... " >&6; }
15555 if ${gl_cv_func_strerror_r_works+:} false; then :
15556   printf %s "(cached) " >&6
15557 else
15558   if test "$cross_compiling" = yes; then :
15559
15560               case "$host_os" in
15561                        # Guess no on AIX.
15562                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
15563                        # Guess no on HP-UX.
15564                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15565                        # Guess no on BSD variants.
15566                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
15567                        # Guess yes otherwise.
15568                 *)     gl_cv_func_strerror_r_works="guessing yes";;
15569               esac
15570
15571 else
15572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15573 /* end confdefs.h.  */
15574 #include <errno.h>
15575                   #include <string.h>
15576
15577 int
15578 main ()
15579 {
15580 int result = 0;
15581                   char buf[79];
15582                   if (strerror_r (EACCES, buf, 0) < 0)
15583                     result |= 1;
15584                   errno = 0;
15585                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
15586                     result |= 2;
15587                   strcpy (buf, "Unknown");
15588                   if (strerror_r (0, buf, sizeof buf) != 0)
15589                     result |= 4;
15590                   if (errno)
15591                     result |= 8;
15592                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15593                     result |= 0x10;
15594                   errno = 0;
15595                   *buf = 0;
15596                   if (strerror_r (-3, buf, sizeof buf) < 0)
15597                     result |= 0x20;
15598                   if (errno)
15599                     result |= 0x40;
15600                   if (!*buf)
15601                     result |= 0x80;
15602                   return result;
15603
15604   ;
15605   return 0;
15606 }
15607 _ACEOF
15608 if ac_fn_c_try_run "$LINENO"; then :
15609   gl_cv_func_strerror_r_works=yes
15610 else
15611   gl_cv_func_strerror_r_works=no
15612 fi
15613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15614   conftest.$ac_objext conftest.beam conftest.$ac_ext
15615 fi
15616
15617
15618 fi
15619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15620 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
15621       else
15622
15623                         if test $ac_cv_func___xpg_strerror_r = yes; then
15624           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15625 printf %s "checking whether __xpg_strerror_r works... " >&6; }
15626 if ${gl_cv_func_strerror_r_works+:} false; then :
15627   printf %s "(cached) " >&6
15628 else
15629   if test "$cross_compiling" = yes; then :
15630                                   gl_cv_func_strerror_r_works="guessing no"
15631
15632 else
15633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634 /* end confdefs.h.  */
15635 #include <errno.h>
15636                     #include <string.h>
15637                     extern
15638                     #ifdef __cplusplus
15639                     "C"
15640                     #endif
15641                     int __xpg_strerror_r(int, char *, size_t);
15642
15643 int
15644 main ()
15645 {
15646 int result = 0;
15647                     char buf[256] = "^";
15648                     char copy[256];
15649                     char *str = strerror (-1);
15650                     strcpy (copy, str);
15651                     if (__xpg_strerror_r (-2, buf, 1) == 0)
15652                       result |= 1;
15653                     if (*buf)
15654                       result |= 2;
15655                     __xpg_strerror_r (-2, buf, 256);
15656                     if (strcmp (str, copy))
15657                       result |= 4;
15658                     return result;
15659
15660   ;
15661   return 0;
15662 }
15663 _ACEOF
15664 if ac_fn_c_try_run "$LINENO"; then :
15665   gl_cv_func_strerror_r_works=yes
15666 else
15667   gl_cv_func_strerror_r_works=no
15668 fi
15669 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15670   conftest.$ac_objext conftest.beam conftest.$ac_ext
15671 fi
15672
15673
15674 fi
15675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15676 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
15677         fi
15678       fi
15679     fi
15680   fi
15681
15682 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
15683 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
15684   ac_have_decl=1
15685 else
15686   ac_have_decl=0
15687 fi
15688
15689 cat >>confdefs.h <<_ACEOF
15690 #define HAVE_DECL_STRERROR_R $ac_have_decl
15691 _ACEOF
15692
15693
15694
15695
15696
15697
15698
15699
15700   if test $ac_cv_have_decl_strerror_r = no; then
15701     HAVE_DECL_STRERROR_R=0
15702   fi
15703
15704   if test $ac_cv_func_strerror_r = yes; then
15705     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15706       if test $gl_cv_func_strerror_r_posix_signature = yes; then
15707         case "$gl_cv_func_strerror_r_works" in
15708                     *no) REPLACE_STRERROR_R=1 ;;
15709         esac
15710       else
15711                 REPLACE_STRERROR_R=1
15712       fi
15713     else
15714                   REPLACE_STRERROR_R=1
15715     fi
15716   fi
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733   gl_cv_func_vfprintf_posix=no
15734   case "$gl_cv_func_printf_sizes_c99" in
15735     *yes)
15736       case "$gl_cv_func_printf_long_double" in
15737         *yes)
15738           case "$gl_cv_func_printf_infinite" in
15739             *yes)
15740               case "$gl_cv_func_printf_infinite_long_double" in
15741                 *yes)
15742                   case "$gl_cv_func_printf_directive_a" in
15743                     *yes)
15744                       case "$gl_cv_func_printf_directive_f" in
15745                         *yes)
15746                           case "$gl_cv_func_printf_directive_n" in
15747                             *yes)
15748                               case "$gl_cv_func_printf_directive_ls" in
15749                                 *yes)
15750                                   case "$gl_cv_func_printf_positions" in
15751                                     *yes)
15752                                       case "$gl_cv_func_printf_flag_grouping" in
15753                                         *yes)
15754                                           case "$gl_cv_func_printf_flag_leftadjust" in
15755                                             *yes)
15756                                               case "$gl_cv_func_printf_flag_zero" in
15757                                                 *yes)
15758                                                   case "$gl_cv_func_printf_precision" in
15759                                                     *yes)
15760                                                       case "$gl_cv_func_printf_enomem" in
15761                                                         *yes)
15762                                                           # vfprintf exists and is
15763                                                           # already POSIX compliant.
15764                                                           gl_cv_func_vfprintf_posix=yes
15765                                                           ;;
15766                                                       esac
15767                                                       ;;
15768                                                   esac
15769                                                   ;;
15770                                               esac
15771                                               ;;
15772                                           esac
15773                                           ;;
15774                                       esac
15775                                       ;;
15776                                   esac
15777                                   ;;
15778                               esac
15779                               ;;
15780                           esac
15781                           ;;
15782                       esac
15783                       ;;
15784                   esac
15785                   ;;
15786               esac
15787               ;;
15788           esac
15789           ;;
15790       esac
15791       ;;
15792   esac
15793   if test $gl_cv_func_vfprintf_posix = no; then
15794
15795
15796
15797   case "$gl_cv_func_printf_infinite" in
15798     *yes)
15799       ;;
15800     *)
15801
15802 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
15803
15804       ;;
15805   esac
15806
15807
15808
15809
15810   case "$gl_cv_func_printf_long_double" in
15811     *yes)
15812       case "$gl_cv_func_printf_infinite_long_double" in
15813         *yes)
15814           ;;
15815         *)
15816
15817 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
15818
15819           ;;
15820       esac
15821       ;;
15822   esac
15823
15824
15825
15826   case "$gl_cv_func_printf_directive_a" in
15827     *yes)
15828       ;;
15829     *)
15830
15831 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
15832
15833       for ac_func in nl_langinfo
15834 do :
15835   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
15836 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
15837   cat >>confdefs.h <<_ACEOF
15838 #define HAVE_NL_LANGINFO 1
15839 _ACEOF
15840
15841 fi
15842 done
15843
15844       ;;
15845   esac
15846
15847
15848
15849   case "$gl_cv_func_printf_directive_f" in
15850     *yes)
15851       ;;
15852     *)
15853
15854 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
15855
15856       ;;
15857   esac
15858
15859
15860
15861   case "$gl_cv_func_printf_directive_ls" in
15862     *yes)
15863       ;;
15864     *)
15865
15866 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
15867
15868       ;;
15869   esac
15870
15871
15872
15873   case "$gl_cv_func_printf_flag_grouping" in
15874     *yes)
15875       ;;
15876     *)
15877
15878 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
15879
15880       ;;
15881   esac
15882
15883
15884
15885   case "$gl_cv_func_printf_flag_leftadjust" in
15886     *yes)
15887       ;;
15888     *)
15889
15890 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
15891
15892       ;;
15893   esac
15894
15895
15896
15897   case "$gl_cv_func_printf_flag_zero" in
15898     *yes)
15899       ;;
15900     *)
15901
15902 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
15903
15904       ;;
15905   esac
15906
15907
15908
15909   case "$gl_cv_func_printf_precision" in
15910     *yes)
15911       ;;
15912     *)
15913
15914 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
15915
15916
15917 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15918
15919
15920 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15921
15922       ;;
15923   esac
15924
15925
15926
15927   case "$gl_cv_func_printf_enomem" in
15928     *yes)
15929       ;;
15930     *)
15931
15932 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
15933
15934
15935 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15936
15937
15938 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15939
15940       ;;
15941   esac
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
15984
15985   if test $ac_cv_func_vasnprintf = yes; then
15986
15987 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
15988
15989   fi
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16002 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16003
16004 else
16005
16006 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
16007
16008
16009 fi
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
16028
16029   REPLACE_VFPRINTF=1
16030
16031 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
16032
16033   :
16034
16035   fi
16036
16037
16038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16039 /* end confdefs.h.  */
16040
16041 #ifdef _MSC_VER
16042 MicrosoftCompiler
16043 #endif
16044
16045 _ACEOF
16046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16047   $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
16048   gl_asmext='asm'
16049      gl_c_asm_opt='-c -Fa'
16050
16051 else
16052   gl_asmext='s'
16053      gl_c_asm_opt='-S'
16054
16055 fi
16056 rm -rf conftest*
16057
16058
16059
16060
16061   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16062 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16063 if ${gl_cv_prog_as_underscore+:} false; then :
16064   printf %s "(cached) " >&6
16065 else
16066   cat > conftest.c <<EOF
16067 #ifdef __cplusplus
16068 extern "C" int foo (void);
16069 #endif
16070 int foo(void) { return 0; }
16071 EOF
16072      # Look for the assembly language name in the .s file.
16073      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16074   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16078   test $ac_status = 0; }; } >/dev/null 2>&1
16079      if grep _foo conftest.$gl_asmext >/dev/null ; then
16080        gl_cv_prog_as_underscore=yes
16081      else
16082        gl_cv_prog_as_underscore=no
16083      fi
16084      rm -f conftest*
16085
16086 fi
16087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16088 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16089   if test $gl_cv_prog_as_underscore = yes; then
16090     USER_LABEL_PREFIX=_
16091   else
16092     USER_LABEL_PREFIX=
16093   fi
16094
16095 cat >>confdefs.h <<_ACEOF
16096 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
16097 _ACEOF
16098
16099   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16100
16101
16102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16103 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16104 if ${ac_cv_header_stdbool_h+:} false; then :
16105   printf %s "(cached) " >&6
16106 else
16107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108 /* end confdefs.h.  */
16109
16110              #include <stdbool.h>
16111              #ifndef bool
16112               "error: bool is not defined"
16113              #endif
16114              #ifndef false
16115               "error: false is not defined"
16116              #endif
16117              #if false
16118               "error: false is not 0"
16119              #endif
16120              #ifndef true
16121               "error: true is not defined"
16122              #endif
16123              #if true != 1
16124               "error: true is not 1"
16125              #endif
16126              #ifndef __bool_true_false_are_defined
16127               "error: __bool_true_false_are_defined is not defined"
16128              #endif
16129
16130              struct s { _Bool s: 1; _Bool t; } s;
16131
16132              char a[true == 1 ? 1 : -1];
16133              char b[false == 0 ? 1 : -1];
16134              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16135              char d[(bool) 0.5 == true ? 1 : -1];
16136              /* See body of main program for 'e'.  */
16137              char f[(_Bool) 0.0 == false ? 1 : -1];
16138              char g[true];
16139              char h[sizeof (_Bool)];
16140              char i[sizeof s.t];
16141              enum { j = false, k = true, l = false * true, m = true * 256 };
16142              /* The following fails for
16143                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16144              _Bool n[m];
16145              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16146              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16147              /* Catch a bug in an HP-UX C compiler.  See
16148                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16149                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
16150               */
16151              _Bool q = true;
16152              _Bool *pq = &q;
16153
16154 int
16155 main ()
16156 {
16157
16158              bool e = &s;
16159              *pq |= q;
16160              *pq |= ! q;
16161              /* Refer to every declared value, to avoid compiler optimizations.  */
16162              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16163                      + !m + !n + !o + !p + !q + !pq);
16164
16165   ;
16166   return 0;
16167 }
16168 _ACEOF
16169 if ac_fn_c_try_compile "$LINENO"; then :
16170   ac_cv_header_stdbool_h=yes
16171 else
16172   ac_cv_header_stdbool_h=no
16173 fi
16174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16175 fi
16176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16177 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16178    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16179 if test "x$ac_cv_type__Bool" = xyes; then :
16180
16181 cat >>confdefs.h <<_ACEOF
16182 #define HAVE__BOOL 1
16183 _ACEOF
16184
16185
16186 fi
16187
16188
16189
16190     REPLACE_NULL=0;
16191   HAVE_WCHAR_T=1;
16192
16193
16194
16195
16196
16197
16198
16199
16200   if test $ac_cv_type_long_long_int = yes; then
16201     HAVE_LONG_LONG_INT=1
16202   else
16203     HAVE_LONG_LONG_INT=0
16204   fi
16205
16206
16207   if test $ac_cv_type_unsigned_long_long_int = yes; then
16208     HAVE_UNSIGNED_LONG_LONG_INT=1
16209   else
16210     HAVE_UNSIGNED_LONG_LONG_INT=0
16211   fi
16212
16213
16214
16215   if test $ac_cv_header_wchar_h = yes; then
16216     HAVE_WCHAR_H=1
16217   else
16218     HAVE_WCHAR_H=0
16219   fi
16220
16221
16222       if test $ac_cv_header_inttypes_h = yes; then
16223     HAVE_INTTYPES_H=1
16224   else
16225     HAVE_INTTYPES_H=0
16226   fi
16227
16228
16229       if test $ac_cv_header_sys_types_h = yes; then
16230     HAVE_SYS_TYPES_H=1
16231   else
16232     HAVE_SYS_TYPES_H=0
16233   fi
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245      if test $gl_cv_have_include_next = yes; then
16246        gl_cv_next_stdint_h='<'stdint.h'>'
16247      else
16248        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16249 printf %s "checking absolute name of <stdint.h>... " >&6; }
16250 if ${gl_cv_next_stdint_h+:} false; then :
16251   printf %s "(cached) " >&6
16252 else
16253
16254              if test $ac_cv_header_stdint_h = yes; then
16255
16256
16257                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258 /* end confdefs.h.  */
16259 #include <stdint.h>
16260
16261 _ACEOF
16262                                                                                                                         case "$host_os" in
16263                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
16264                  *)    gl_absname_cpp="$ac_cpp" ;;
16265                esac
16266
16267                case "$host_os" in
16268                  mingw*)
16269                                                                                                                                      gl_dirsep_regex='[/\\]'
16270                    ;;
16271                  *)
16272                    gl_dirsep_regex='\/'
16273                    ;;
16274                esac
16275                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16276
16277                gl_header_literal_regex=`echo 'stdint.h' \
16278                                         | sed -e "$gl_make_literal_regex_sed"`
16279                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16280                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16281                    s|^/[^/]|//&|
16282                    p
16283                    q
16284                  }'
16285                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16286                       sed -n "$gl_absolute_header_sed"`'"'
16287           else
16288                gl_cv_next_stdint_h='<'stdint.h'>'
16289              fi
16290
16291
16292 fi
16293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16294 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
16295      fi
16296      NEXT_STDINT_H=$gl_cv_next_stdint_h
16297
16298      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16299        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16300        gl_next_as_first_directive='<'stdint.h'>'
16301      else
16302        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16303        gl_next_as_first_directive=$gl_cv_next_stdint_h
16304      fi
16305      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16306
16307
16308
16309
16310   if test $ac_cv_header_stdint_h = yes; then
16311     HAVE_STDINT_H=1
16312   else
16313     HAVE_STDINT_H=0
16314   fi
16315
16316
16317     if test $ac_cv_header_stdint_h = yes; then
16318     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16319 printf %s "checking whether stdint.h conforms to C99... " >&6; }
16320 if ${gl_cv_header_working_stdint_h+:} false; then :
16321   printf %s "(cached) " >&6
16322 else
16323   gl_cv_header_working_stdint_h=no
16324        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16325 /* end confdefs.h.  */
16326
16327
16328 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16329 #include <stdint.h>
16330 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
16331 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16332 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16333 #endif
16334
16335
16336   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16337      included before <wchar.h>.  */
16338   #include <stddef.h>
16339   #include <signal.h>
16340   #if HAVE_WCHAR_H
16341   # include <stdio.h>
16342   # include <time.h>
16343   # include <wchar.h>
16344   #endif
16345
16346
16347 #ifdef INT8_MAX
16348 int8_t a1 = INT8_MAX;
16349 int8_t a1min = INT8_MIN;
16350 #endif
16351 #ifdef INT16_MAX
16352 int16_t a2 = INT16_MAX;
16353 int16_t a2min = INT16_MIN;
16354 #endif
16355 #ifdef INT32_MAX
16356 int32_t a3 = INT32_MAX;
16357 int32_t a3min = INT32_MIN;
16358 #endif
16359 #ifdef INT64_MAX
16360 int64_t a4 = INT64_MAX;
16361 int64_t a4min = INT64_MIN;
16362 #endif
16363 #ifdef UINT8_MAX
16364 uint8_t b1 = UINT8_MAX;
16365 #else
16366 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16367 #endif
16368 #ifdef UINT16_MAX
16369 uint16_t b2 = UINT16_MAX;
16370 #endif
16371 #ifdef UINT32_MAX
16372 uint32_t b3 = UINT32_MAX;
16373 #endif
16374 #ifdef UINT64_MAX
16375 uint64_t b4 = UINT64_MAX;
16376 #endif
16377 int_least8_t c1 = INT8_C (0x7f);
16378 int_least8_t c1max = INT_LEAST8_MAX;
16379 int_least8_t c1min = INT_LEAST8_MIN;
16380 int_least16_t c2 = INT16_C (0x7fff);
16381 int_least16_t c2max = INT_LEAST16_MAX;
16382 int_least16_t c2min = INT_LEAST16_MIN;
16383 int_least32_t c3 = INT32_C (0x7fffffff);
16384 int_least32_t c3max = INT_LEAST32_MAX;
16385 int_least32_t c3min = INT_LEAST32_MIN;
16386 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16387 int_least64_t c4max = INT_LEAST64_MAX;
16388 int_least64_t c4min = INT_LEAST64_MIN;
16389 uint_least8_t d1 = UINT8_C (0xff);
16390 uint_least8_t d1max = UINT_LEAST8_MAX;
16391 uint_least16_t d2 = UINT16_C (0xffff);
16392 uint_least16_t d2max = UINT_LEAST16_MAX;
16393 uint_least32_t d3 = UINT32_C (0xffffffff);
16394 uint_least32_t d3max = UINT_LEAST32_MAX;
16395 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16396 uint_least64_t d4max = UINT_LEAST64_MAX;
16397 int_fast8_t e1 = INT_FAST8_MAX;
16398 int_fast8_t e1min = INT_FAST8_MIN;
16399 int_fast16_t e2 = INT_FAST16_MAX;
16400 int_fast16_t e2min = INT_FAST16_MIN;
16401 int_fast32_t e3 = INT_FAST32_MAX;
16402 int_fast32_t e3min = INT_FAST32_MIN;
16403 int_fast64_t e4 = INT_FAST64_MAX;
16404 int_fast64_t e4min = INT_FAST64_MIN;
16405 uint_fast8_t f1 = UINT_FAST8_MAX;
16406 uint_fast16_t f2 = UINT_FAST16_MAX;
16407 uint_fast32_t f3 = UINT_FAST32_MAX;
16408 uint_fast64_t f4 = UINT_FAST64_MAX;
16409 #ifdef INTPTR_MAX
16410 intptr_t g = INTPTR_MAX;
16411 intptr_t gmin = INTPTR_MIN;
16412 #endif
16413 #ifdef UINTPTR_MAX
16414 uintptr_t h = UINTPTR_MAX;
16415 #endif
16416 intmax_t i = INTMAX_MAX;
16417 uintmax_t j = UINTMAX_MAX;
16418
16419 #include <limits.h> /* for CHAR_BIT */
16420 #define TYPE_MINIMUM(t) \
16421   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16422 #define TYPE_MAXIMUM(t) \
16423   ((t) ((t) 0 < (t) -1 \
16424         ? (t) -1 \
16425         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16426 struct s {
16427   int check_PTRDIFF:
16428       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16429       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16430       ? 1 : -1;
16431   /* Detect bug in FreeBSD 6.0 / ia64.  */
16432   int check_SIG_ATOMIC:
16433       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16434       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16435       ? 1 : -1;
16436   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16437   int check_WCHAR:
16438       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16439       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16440       ? 1 : -1;
16441   /* Detect bug in mingw.  */
16442   int check_WINT:
16443       WINT_MIN == TYPE_MINIMUM (wint_t)
16444       && WINT_MAX == TYPE_MAXIMUM (wint_t)
16445       ? 1 : -1;
16446
16447   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
16448   int check_UINT8_C:
16449         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16450   int check_UINT16_C:
16451         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16452
16453   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
16454 #ifdef UINT8_MAX
16455   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16456 #endif
16457 #ifdef UINT16_MAX
16458   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16459 #endif
16460 #ifdef UINT32_MAX
16461   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16462 #endif
16463 #ifdef UINT64_MAX
16464   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16465 #endif
16466   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16467   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16468   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16469   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16470   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16471   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16472   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16473   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16474   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16475   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16476   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16477 };
16478
16479 int
16480 main ()
16481 {
16482
16483   ;
16484   return 0;
16485 }
16486 _ACEOF
16487 if ac_fn_c_try_compile "$LINENO"; then :
16488                                                     if test "$cross_compiling" = yes; then :
16489                  gl_cv_header_working_stdint_h=yes
16490
16491 else
16492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16493 /* end confdefs.h.  */
16494
16495
16496 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16497 #include <stdint.h>
16498
16499
16500   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16501      included before <wchar.h>.  */
16502   #include <stddef.h>
16503   #include <signal.h>
16504   #if HAVE_WCHAR_H
16505   # include <stdio.h>
16506   # include <time.h>
16507   # include <wchar.h>
16508   #endif
16509
16510
16511 #include <stdio.h>
16512 #include <string.h>
16513 #define MVAL(macro) MVAL1(macro)
16514 #define MVAL1(expression) #expression
16515 static const char *macro_values[] =
16516   {
16517 #ifdef INT8_MAX
16518     MVAL (INT8_MAX),
16519 #endif
16520 #ifdef INT16_MAX
16521     MVAL (INT16_MAX),
16522 #endif
16523 #ifdef INT32_MAX
16524     MVAL (INT32_MAX),
16525 #endif
16526 #ifdef INT64_MAX
16527     MVAL (INT64_MAX),
16528 #endif
16529 #ifdef UINT8_MAX
16530     MVAL (UINT8_MAX),
16531 #endif
16532 #ifdef UINT16_MAX
16533     MVAL (UINT16_MAX),
16534 #endif
16535 #ifdef UINT32_MAX
16536     MVAL (UINT32_MAX),
16537 #endif
16538 #ifdef UINT64_MAX
16539     MVAL (UINT64_MAX),
16540 #endif
16541     NULL
16542   };
16543
16544 int
16545 main ()
16546 {
16547
16548   const char **mv;
16549   for (mv = macro_values; *mv != NULL; mv++)
16550     {
16551       const char *value = *mv;
16552       /* Test whether it looks like a cast expression.  */
16553       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
16554           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
16555           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
16556           || strncmp (value, "((int)"/*)*/, 6) == 0
16557           || strncmp (value, "((signed short)"/*)*/, 15) == 0
16558           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
16559         return mv - macro_values + 1;
16560     }
16561   return 0;
16562
16563   ;
16564   return 0;
16565 }
16566 _ACEOF
16567 if ac_fn_c_try_run "$LINENO"; then :
16568   gl_cv_header_working_stdint_h=yes
16569 fi
16570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16571   conftest.$ac_objext conftest.beam conftest.$ac_ext
16572 fi
16573
16574
16575 fi
16576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16577
16578 fi
16579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
16580 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
16581   fi
16582   if test "$gl_cv_header_working_stdint_h" = yes; then
16583     STDINT_H=
16584   else
16585             for ac_header in sys/inttypes.h sys/bitypes.h
16586 do :
16587   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
16588 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16589 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16590   cat >>confdefs.h <<_ACEOF
16591 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
16592 _ACEOF
16593
16594 fi
16595
16596 done
16597
16598     if test $ac_cv_header_sys_inttypes_h = yes; then
16599       HAVE_SYS_INTTYPES_H=1
16600     else
16601       HAVE_SYS_INTTYPES_H=0
16602     fi
16603
16604     if test $ac_cv_header_sys_bitypes_h = yes; then
16605       HAVE_SYS_BITYPES_H=1
16606     else
16607       HAVE_SYS_BITYPES_H=0
16608     fi
16609
16610
16611
16612
16613   if test $APPLE_UNIVERSAL_BUILD = 0; then
16614
16615
16616   for gltype in ptrdiff_t size_t ; do
16617     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16618 printf %s "checking for bit size of $gltype... " >&6; }
16619 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16620   printf %s "(cached) " >&6
16621 else
16622   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
16623   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16624      included before <wchar.h>.  */
16625   #include <stddef.h>
16626   #include <signal.h>
16627   #if HAVE_WCHAR_H
16628   # include <stdio.h>
16629   # include <time.h>
16630   # include <wchar.h>
16631   #endif
16632
16633 #include <limits.h>"; then :
16634
16635 else
16636   result=unknown
16637 fi
16638
16639        eval gl_cv_bitsizeof_${gltype}=\$result
16640
16641 fi
16642 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16643                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16644 printf "%s\n" "$ac_res" >&6; }
16645     eval result=\$gl_cv_bitsizeof_${gltype}
16646     if test $result = unknown; then
16647                                                 result=0
16648     fi
16649     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16650     cat >>confdefs.h <<_ACEOF
16651 #define BITSIZEOF_${GLTYPE} $result
16652 _ACEOF
16653
16654     eval BITSIZEOF_${GLTYPE}=\$result
16655   done
16656
16657
16658   fi
16659
16660
16661   for gltype in sig_atomic_t wchar_t wint_t ; do
16662     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16663 printf %s "checking for bit size of $gltype... " >&6; }
16664 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
16665   printf %s "(cached) " >&6
16666 else
16667   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
16668   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16669      included before <wchar.h>.  */
16670   #include <stddef.h>
16671   #include <signal.h>
16672   #if HAVE_WCHAR_H
16673   # include <stdio.h>
16674   # include <time.h>
16675   # include <wchar.h>
16676   #endif
16677
16678 #include <limits.h>"; then :
16679
16680 else
16681   result=unknown
16682 fi
16683
16684        eval gl_cv_bitsizeof_${gltype}=\$result
16685
16686 fi
16687 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16688                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16689 printf "%s\n" "$ac_res" >&6; }
16690     eval result=\$gl_cv_bitsizeof_${gltype}
16691     if test $result = unknown; then
16692                                                 result=0
16693     fi
16694     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16695     cat >>confdefs.h <<_ACEOF
16696 #define BITSIZEOF_${GLTYPE} $result
16697 _ACEOF
16698
16699     eval BITSIZEOF_${GLTYPE}=\$result
16700   done
16701
16702
16703
16704
16705   for gltype in sig_atomic_t wchar_t wint_t ; do
16706     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16707 printf %s "checking whether $gltype is signed... " >&6; }
16708 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
16709   printf %s "(cached) " >&6
16710 else
16711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16712 /* end confdefs.h.  */
16713
16714   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16715      included before <wchar.h>.  */
16716   #include <stddef.h>
16717   #include <signal.h>
16718   #if HAVE_WCHAR_H
16719   # include <stdio.h>
16720   # include <time.h>
16721   # include <wchar.h>
16722   #endif
16723
16724             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16725 int
16726 main ()
16727 {
16728
16729   ;
16730   return 0;
16731 }
16732 _ACEOF
16733 if ac_fn_c_try_compile "$LINENO"; then :
16734   result=yes
16735 else
16736   result=no
16737 fi
16738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16739        eval gl_cv_type_${gltype}_signed=\$result
16740
16741 fi
16742 eval ac_res=\$gl_cv_type_${gltype}_signed
16743                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16744 printf "%s\n" "$ac_res" >&6; }
16745     eval result=\$gl_cv_type_${gltype}_signed
16746     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16747     if test "$result" = yes; then
16748       cat >>confdefs.h <<_ACEOF
16749 #define HAVE_SIGNED_${GLTYPE} 1
16750 _ACEOF
16751
16752       eval HAVE_SIGNED_${GLTYPE}=1
16753     else
16754       eval HAVE_SIGNED_${GLTYPE}=0
16755     fi
16756   done
16757
16758
16759   gl_cv_type_ptrdiff_t_signed=yes
16760   gl_cv_type_size_t_signed=no
16761   if test $APPLE_UNIVERSAL_BUILD = 0; then
16762
16763
16764   for gltype in ptrdiff_t size_t ; do
16765     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16766 printf %s "checking for $gltype integer literal suffix... " >&6; }
16767 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16768   printf %s "(cached) " >&6
16769 else
16770   eval gl_cv_type_${gltype}_suffix=no
16771        eval result=\$gl_cv_type_${gltype}_signed
16772        if test "$result" = yes; then
16773          glsufu=
16774        else
16775          glsufu=u
16776        fi
16777        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16778          case $glsuf in
16779            '')  gltype1='int';;
16780            l)   gltype1='long int';;
16781            ll)  gltype1='long long int';;
16782            i64) gltype1='__int64';;
16783            u)   gltype1='unsigned int';;
16784            ul)  gltype1='unsigned long int';;
16785            ull) gltype1='unsigned long long int';;
16786            ui64)gltype1='unsigned __int64';;
16787          esac
16788          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16789 /* end confdefs.h.  */
16790
16791   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16792      included before <wchar.h>.  */
16793   #include <stddef.h>
16794   #include <signal.h>
16795   #if HAVE_WCHAR_H
16796   # include <stdio.h>
16797   # include <time.h>
16798   # include <wchar.h>
16799   #endif
16800
16801               extern $gltype foo;
16802               extern $gltype1 foo;
16803 int
16804 main ()
16805 {
16806
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 if ac_fn_c_try_compile "$LINENO"; then :
16812   eval gl_cv_type_${gltype}_suffix=\$glsuf
16813 fi
16814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16815          eval result=\$gl_cv_type_${gltype}_suffix
16816          test "$result" != no && break
16817        done
16818 fi
16819 eval ac_res=\$gl_cv_type_${gltype}_suffix
16820                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16821 printf "%s\n" "$ac_res" >&6; }
16822     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16823     eval result=\$gl_cv_type_${gltype}_suffix
16824     test "$result" = no && result=
16825     eval ${GLTYPE}_SUFFIX=\$result
16826     cat >>confdefs.h <<_ACEOF
16827 #define ${GLTYPE}_SUFFIX $result
16828 _ACEOF
16829
16830   done
16831
16832
16833   fi
16834
16835
16836   for gltype in sig_atomic_t wchar_t wint_t ; do
16837     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16838 printf %s "checking for $gltype integer literal suffix... " >&6; }
16839 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
16840   printf %s "(cached) " >&6
16841 else
16842   eval gl_cv_type_${gltype}_suffix=no
16843        eval result=\$gl_cv_type_${gltype}_signed
16844        if test "$result" = yes; then
16845          glsufu=
16846        else
16847          glsufu=u
16848        fi
16849        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16850          case $glsuf in
16851            '')  gltype1='int';;
16852            l)   gltype1='long int';;
16853            ll)  gltype1='long long int';;
16854            i64) gltype1='__int64';;
16855            u)   gltype1='unsigned int';;
16856            ul)  gltype1='unsigned long int';;
16857            ull) gltype1='unsigned long long int';;
16858            ui64)gltype1='unsigned __int64';;
16859          esac
16860          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861 /* end confdefs.h.  */
16862
16863   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16864      included before <wchar.h>.  */
16865   #include <stddef.h>
16866   #include <signal.h>
16867   #if HAVE_WCHAR_H
16868   # include <stdio.h>
16869   # include <time.h>
16870   # include <wchar.h>
16871   #endif
16872
16873               extern $gltype foo;
16874               extern $gltype1 foo;
16875 int
16876 main ()
16877 {
16878
16879   ;
16880   return 0;
16881 }
16882 _ACEOF
16883 if ac_fn_c_try_compile "$LINENO"; then :
16884   eval gl_cv_type_${gltype}_suffix=\$glsuf
16885 fi
16886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16887          eval result=\$gl_cv_type_${gltype}_suffix
16888          test "$result" != no && break
16889        done
16890 fi
16891 eval ac_res=\$gl_cv_type_${gltype}_suffix
16892                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16893 printf "%s\n" "$ac_res" >&6; }
16894     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16895     eval result=\$gl_cv_type_${gltype}_suffix
16896     test "$result" = no && result=
16897     eval ${GLTYPE}_SUFFIX=\$result
16898     cat >>confdefs.h <<_ACEOF
16899 #define ${GLTYPE}_SUFFIX $result
16900 _ACEOF
16901
16902   done
16903
16904
16905
16906           if test $BITSIZEOF_WINT_T -lt 32; then
16907     BITSIZEOF_WINT_T=32
16908   fi
16909
16910     STDINT_H=stdint.h
16911   fi
16912
16913    if test -n "$STDINT_H"; then
16914   GL_GENERATE_STDINT_H_TRUE=
16915   GL_GENERATE_STDINT_H_FALSE='#'
16916 else
16917   GL_GENERATE_STDINT_H_TRUE='#'
16918   GL_GENERATE_STDINT_H_FALSE=
16919 fi
16920
16921
16922
16923
16924 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16925 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16926   ac_have_decl=1
16927 else
16928   ac_have_decl=0
16929 fi
16930
16931 cat >>confdefs.h <<_ACEOF
16932 #define HAVE_DECL_STRDUP $ac_have_decl
16933 _ACEOF
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948      if test $gl_cv_have_include_next = yes; then
16949        gl_cv_next_string_h='<'string.h'>'
16950      else
16951        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16952 printf %s "checking absolute name of <string.h>... " >&6; }
16953 if ${gl_cv_next_string_h+:} false; then :
16954   printf %s "(cached) " >&6
16955 else
16956
16957                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958 /* end confdefs.h.  */
16959 #include <string.h>
16960
16961 _ACEOF
16962                                                                                                                         case "$host_os" in
16963                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
16964                  *)    gl_absname_cpp="$ac_cpp" ;;
16965                esac
16966
16967                case "$host_os" in
16968                  mingw*)
16969                                                                                                                                      gl_dirsep_regex='[/\\]'
16970                    ;;
16971                  *)
16972                    gl_dirsep_regex='\/'
16973                    ;;
16974                esac
16975                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16976
16977                gl_header_literal_regex=`echo 'string.h' \
16978                                         | sed -e "$gl_make_literal_regex_sed"`
16979                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16980                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16981                    s|^/[^/]|//&|
16982                    p
16983                    q
16984                  }'
16985                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16986                       sed -n "$gl_absolute_header_sed"`'"'
16987
16988
16989 fi
16990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16991 printf "%s\n" "$gl_cv_next_string_h" >&6; }
16992      fi
16993      NEXT_STRING_H=$gl_cv_next_string_h
16994
16995      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16996        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16997        gl_next_as_first_directive='<'string.h'>'
16998      else
16999        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17000        gl_next_as_first_directive=$gl_cv_next_string_h
17001      fi
17002      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17003
17004
17005
17006
17007
17008
17009
17010
17011   GNULIB_MKTIME=0;
17012   GNULIB_NANOSLEEP=0;
17013   GNULIB_STRPTIME=0;
17014   GNULIB_TIMEGM=0;
17015   GNULIB_TIME_R=0;
17016     HAVE_DECL_LOCALTIME_R=1;
17017   HAVE_NANOSLEEP=1;
17018   HAVE_STRPTIME=1;
17019   HAVE_TIMEGM=1;
17020         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17021   REPLACE_MKTIME=GNULIB_PORTCHECK;
17022   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17023   REPLACE_TIMEGM=GNULIB_PORTCHECK;
17024
17025
17026
17027   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17028 printf %s "checking for struct timespec in <time.h>... " >&6; }
17029 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17030   printf %s "(cached) " >&6
17031 else
17032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17033 /* end confdefs.h.  */
17034 #include <time.h>
17035
17036 int
17037 main ()
17038 {
17039 static struct timespec x; x.tv_sec = x.tv_nsec;
17040   ;
17041   return 0;
17042 }
17043 _ACEOF
17044 if ac_fn_c_try_compile "$LINENO"; then :
17045   gl_cv_sys_struct_timespec_in_time_h=yes
17046 else
17047   gl_cv_sys_struct_timespec_in_time_h=no
17048 fi
17049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17050 fi
17051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17052 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17053
17054   TIME_H_DEFINES_STRUCT_TIMESPEC=0
17055   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17056   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17057   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17058     TIME_H_DEFINES_STRUCT_TIMESPEC=1
17059   else
17060     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17061 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
17062 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17063   printf %s "(cached) " >&6
17064 else
17065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17066 /* end confdefs.h.  */
17067 #include <sys/time.h>
17068
17069 int
17070 main ()
17071 {
17072 static struct timespec x; x.tv_sec = x.tv_nsec;
17073   ;
17074   return 0;
17075 }
17076 _ACEOF
17077 if ac_fn_c_try_compile "$LINENO"; then :
17078   gl_cv_sys_struct_timespec_in_sys_time_h=yes
17079 else
17080   gl_cv_sys_struct_timespec_in_sys_time_h=no
17081 fi
17082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17083 fi
17084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17085 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17086     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17087       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17088     else
17089       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17090 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
17091 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17092   printf %s "(cached) " >&6
17093 else
17094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095 /* end confdefs.h.  */
17096 #include <pthread.h>
17097
17098 int
17099 main ()
17100 {
17101 static struct timespec x; x.tv_sec = x.tv_nsec;
17102   ;
17103   return 0;
17104 }
17105 _ACEOF
17106 if ac_fn_c_try_compile "$LINENO"; then :
17107   gl_cv_sys_struct_timespec_in_pthread_h=yes
17108 else
17109   gl_cv_sys_struct_timespec_in_pthread_h=no
17110 fi
17111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17112 fi
17113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17114 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17115       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17116         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17117       fi
17118     fi
17119   fi
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135      if test $gl_cv_have_include_next = yes; then
17136        gl_cv_next_time_h='<'time.h'>'
17137      else
17138        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17139 printf %s "checking absolute name of <time.h>... " >&6; }
17140 if ${gl_cv_next_time_h+:} false; then :
17141   printf %s "(cached) " >&6
17142 else
17143
17144                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h.  */
17146 #include <time.h>
17147
17148 _ACEOF
17149                                                                                                                         case "$host_os" in
17150                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17151                  *)    gl_absname_cpp="$ac_cpp" ;;
17152                esac
17153
17154                case "$host_os" in
17155                  mingw*)
17156                                                                                                                                      gl_dirsep_regex='[/\\]'
17157                    ;;
17158                  *)
17159                    gl_dirsep_regex='\/'
17160                    ;;
17161                esac
17162                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17163
17164                gl_header_literal_regex=`echo 'time.h' \
17165                                         | sed -e "$gl_make_literal_regex_sed"`
17166                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17167                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17168                    s|^/[^/]|//&|
17169                    p
17170                    q
17171                  }'
17172                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17173                       sed -n "$gl_absolute_header_sed"`'"'
17174
17175
17176 fi
17177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17178 printf "%s\n" "$gl_cv_next_time_h" >&6; }
17179      fi
17180      NEXT_TIME_H=$gl_cv_next_time_h
17181
17182      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17183        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17184        gl_next_as_first_directive='<'time.h'>'
17185      else
17186        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17187        gl_next_as_first_directive=$gl_cv_next_time_h
17188      fi
17189      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17200 printf %s "checking whether the utimes function works... " >&6; }
17201 if ${gl_cv_func_working_utimes+:} false; then :
17202   printf %s "(cached) " >&6
17203 else
17204
17205   if test "$cross_compiling" = yes; then :
17206   gl_cv_func_working_utimes=no
17207 else
17208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17209 /* end confdefs.h.  */
17210
17211 #include <sys/types.h>
17212 #include <sys/stat.h>
17213 #include <fcntl.h>
17214 #include <sys/time.h>
17215 #include <time.h>
17216 #include <unistd.h>
17217 #include <stdlib.h>
17218 #include <stdio.h>
17219 #include <utime.h>
17220
17221 static int
17222 inorder (time_t a, time_t b, time_t c)
17223 {
17224   return a <= b && b <= c;
17225 }
17226
17227 int
17228 main ()
17229 {
17230   int result = 0;
17231   char const *file = "conftest.utimes";
17232   static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
17233
17234   /* Test whether utimes() essentially works.  */
17235   {
17236     struct stat sbuf;
17237     FILE *f = fopen (file, "w");
17238     if (f == NULL)
17239       result |= 1;
17240     else if (fclose (f) != 0)
17241       result |= 1;
17242     else if (utimes (file, timeval) != 0)
17243       result |= 2;
17244     else if (lstat (file, &sbuf) != 0)
17245       result |= 1;
17246     else if (!(sbuf.st_atime == timeval[0].tv_sec
17247                && sbuf.st_mtime == timeval[1].tv_sec))
17248       result |= 4;
17249     if (unlink (file) != 0)
17250       result |= 1;
17251   }
17252
17253   /* Test whether utimes() with a NULL argument sets the file's timestamp
17254      to the current time.  Use 'fstat' as well as 'time' to
17255      determine the "current" time, to accommodate NFS file systems
17256      if there is a time skew between the host and the NFS server.  */
17257   {
17258     int fd = open (file, O_WRONLY|O_CREAT, 0644);
17259     if (fd < 0)
17260       result |= 1;
17261     else
17262       {
17263         time_t t0, t2;
17264         struct stat st0, st1, st2;
17265         if (time (&t0) == (time_t) -1)
17266           result |= 1;
17267         else if (fstat (fd, &st0) != 0)
17268           result |= 1;
17269         else if (utimes (file, timeval) != 0)
17270           result |= 2;
17271         else if (utimes (file, NULL) != 0)
17272           result |= 8;
17273         else if (fstat (fd, &st1) != 0)
17274           result |= 1;
17275         else if (write (fd, "\n", 1) != 1)
17276           result |= 1;
17277         else if (fstat (fd, &st2) != 0)
17278           result |= 1;
17279         else if (time (&t2) == (time_t) -1)
17280           result |= 1;
17281         else
17282           {
17283             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
17284             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
17285             if (! (st1.st_atime == st1.st_mtime))
17286               result |= 16;
17287             if (! (m_ok_POSIX || m_ok_NFS))
17288               result |= 32;
17289           }
17290         if (close (fd) != 0)
17291           result |= 1;
17292       }
17293     if (unlink (file) != 0)
17294       result |= 1;
17295   }
17296
17297   /* Test whether utimes() with a NULL argument works on read-only files.  */
17298   {
17299     int fd = open (file, O_WRONLY|O_CREAT, 0444);
17300     if (fd < 0)
17301       result |= 1;
17302     else if (close (fd) != 0)
17303       result |= 1;
17304     else if (utimes (file, NULL) != 0)
17305       result |= 64;
17306     if (unlink (file) != 0)
17307       result |= 1;
17308   }
17309
17310   return result;
17311 }
17312
17313 _ACEOF
17314 if ac_fn_c_try_run "$LINENO"; then :
17315   gl_cv_func_working_utimes=yes
17316 else
17317   gl_cv_func_working_utimes=no
17318 fi
17319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17320   conftest.$ac_objext conftest.beam conftest.$ac_ext
17321 fi
17322
17323 fi
17324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
17325 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
17326
17327   if test $gl_cv_func_working_utimes = yes; then
17328
17329 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
17330
17331   fi
17332
17333
17334
17335
17336
17337   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
17338 printf %s "checking for struct utimbuf... " >&6; }
17339 if ${gl_cv_sys_struct_utimbuf+:} false; then :
17340   printf %s "(cached) " >&6
17341 else
17342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17343 /* end confdefs.h.  */
17344 #if HAVE_SYS_TIME_H
17345              #include <sys/time.h>
17346             #endif
17347             #include <time.h>
17348             #ifdef HAVE_UTIME_H
17349              #include <utime.h>
17350             #endif
17351
17352 int
17353 main ()
17354 {
17355 static struct utimbuf x; x.actime = x.modtime;
17356   ;
17357   return 0;
17358 }
17359 _ACEOF
17360 if ac_fn_c_try_compile "$LINENO"; then :
17361   gl_cv_sys_struct_utimbuf=yes
17362 else
17363   gl_cv_sys_struct_utimbuf=no
17364 fi
17365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17366 fi
17367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
17368 printf "%s\n" "$gl_cv_sys_struct_utimbuf" >&6; }
17369
17370   if test $gl_cv_sys_struct_utimbuf = yes; then
17371
17372 printf "%s\n" "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
17373
17374   fi
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
17388 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
17389 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
17390   printf %s "(cached) " >&6
17391 else
17392   gl_cv_header_wchar_h_correct_inline=yes
17393      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17394 /* end confdefs.h.  */
17395
17396        #define wcstod renamed_wcstod
17397 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17398    <wchar.h>.
17399    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17400    included before <wchar.h>.  */
17401 #include <stddef.h>
17402 #include <stdio.h>
17403 #include <time.h>
17404 #include <wchar.h>
17405 extern int zero (void);
17406 int main () { return zero(); }
17407
17408 _ACEOF
17409      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17410   (eval $ac_compile) 2>&5
17411   ac_status=$?
17412   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17413   test $ac_status = 0; }; then
17414        mv conftest.$ac_objext conftest1.$ac_objext
17415        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17416 /* end confdefs.h.  */
17417
17418          #define wcstod renamed_wcstod
17419 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17420    <wchar.h>.
17421    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17422    included before <wchar.h>.  */
17423 #include <stddef.h>
17424 #include <stdio.h>
17425 #include <time.h>
17426 #include <wchar.h>
17427 int zero (void) { return 0; }
17428
17429 _ACEOF
17430        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17431   (eval $ac_compile) 2>&5
17432   ac_status=$?
17433   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17434   test $ac_status = 0; }; then
17435          mv conftest.$ac_objext conftest2.$ac_objext
17436          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
17437            :
17438          else
17439            gl_cv_header_wchar_h_correct_inline=no
17440          fi
17441        fi
17442      fi
17443      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
17444
17445 fi
17446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
17447 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
17448   if test $gl_cv_header_wchar_h_correct_inline = no; then
17449     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
17450 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
17451 C99 mode. You have four options:
17452   - Add the flag -fgnu89-inline to CC and reconfigure, or
17453   - Fix your include files, using parts of
17454     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
17455   - Use a gcc version older than 4.3, or
17456   - Don't use the flags -std=c99 or -std=gnu99.
17457 Configuration aborted." "$LINENO" 5
17458   fi
17459
17460
17461   GNULIB_ISWBLANK=0;
17462   GNULIB_WCTYPE=0;
17463   GNULIB_ISWCTYPE=0;
17464   GNULIB_WCTRANS=0;
17465   GNULIB_TOWCTRANS=0;
17466     HAVE_ISWBLANK=1;
17467   HAVE_WCTYPE_T=1;
17468   HAVE_WCTRANS_T=1;
17469   REPLACE_ISWBLANK=0;
17470
17471
17472
17473
17474
17475
17476    if false; then
17477   GL_COND_LIBTOOL_TRUE=
17478   GL_COND_LIBTOOL_FALSE='#'
17479 else
17480   GL_COND_LIBTOOL_TRUE='#'
17481   GL_COND_LIBTOOL_FALSE=
17482 fi
17483
17484   gl_cond_libtool=false
17485   gl_libdeps=
17486   gl_ltlibdeps=
17487   gl_m4_base='m4'
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497   gl_source_base='lib'
17498
17499
17500   if test $ac_cv_func_alloca_works = no; then
17501     :
17502   fi
17503
17504   # Define an additional variable used in the Makefile substitution.
17505   if test $ac_cv_working_alloca_h = yes; then
17506     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17507 printf %s "checking for alloca as a compiler built-in... " >&6; }
17508 if ${gl_cv_rpl_alloca+:} false; then :
17509   printf %s "(cached) " >&6
17510 else
17511
17512       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17513 /* end confdefs.h.  */
17514
17515 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17516         Need own alloca
17517 #endif
17518
17519 _ACEOF
17520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17521   $EGREP "Need own alloca" >/dev/null 2>&1; then :
17522   gl_cv_rpl_alloca=yes
17523 else
17524   gl_cv_rpl_alloca=no
17525 fi
17526 rm -rf conftest*
17527
17528
17529 fi
17530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17531 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
17532     if test $gl_cv_rpl_alloca = yes; then
17533
17534 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
17535
17536       ALLOCA_H=alloca.h
17537     else
17538                   ALLOCA_H=
17539     fi
17540   else
17541     ALLOCA_H=alloca.h
17542   fi
17543
17544    if test -n "$ALLOCA_H"; then
17545   GL_GENERATE_ALLOCA_H_TRUE=
17546   GL_GENERATE_ALLOCA_H_FALSE='#'
17547 else
17548   GL_GENERATE_ALLOCA_H_TRUE='#'
17549   GL_GENERATE_ALLOCA_H_FALSE=
17550 fi
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17562
17563
17564
17565
17566        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
17567 printf %s "checking for GNU libc compatible calloc... " >&6; }
17568 if ${ac_cv_func_calloc_0_nonnull+:} false; then :
17569   printf %s "(cached) " >&6
17570 else
17571   if test "$cross_compiling" = yes; then :
17572   case "$host_os" in
17573                   # Guess yes on glibc systems.
17574           *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
17575                   # If we don't know, assume the worst.
17576           *)      ac_cv_func_calloc_0_nonnull="guessing no" ;;
17577         esac
17578
17579 else
17580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h.  */
17582 $ac_includes_default
17583 int
17584 main ()
17585 {
17586 int result = 0;
17587             if (!calloc (0, 0))
17588               result |= 1;
17589             if (calloc ((size_t) -1 / 8 + 1, 8))
17590               result |= 2;
17591             return result;
17592
17593   ;
17594   return 0;
17595 }
17596 _ACEOF
17597 if ac_fn_c_try_run "$LINENO"; then :
17598   ac_cv_func_calloc_0_nonnull=yes
17599 else
17600   ac_cv_func_calloc_0_nonnull=no
17601 fi
17602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17603   conftest.$ac_objext conftest.beam conftest.$ac_ext
17604 fi
17605
17606 fi
17607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
17608 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
17609   case "$ac_cv_func_calloc_0_nonnull" in
17610     *yes)
17611
17612 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
17613
17614       ;;
17615     *)
17616       printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
17617
17618      REPLACE_CALLOC=1
17619
17620       ;;
17621   esac
17622
17623
17624   if test $REPLACE_CALLOC = 1; then
17625
17626
17627
17628
17629
17630
17631
17632
17633   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17634
17635   fi
17636
17637
17638 cat >>confdefs.h <<_ACEOF
17639 #define GNULIB_CALLOC_GNU 1
17640 _ACEOF
17641
17642
17643
17644
17645
17646   if test $gl_cv_func_malloc_posix = yes; then
17647
17648 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
17649
17650   else
17651     REPLACE_CALLOC=1
17652   fi
17653
17654   if test $REPLACE_CALLOC = 1; then
17655
17656
17657
17658
17659
17660
17661
17662
17663   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17664
17665   fi
17666
17667
17668
17669
17670
17671           GNULIB_CALLOC_POSIX=1
17672
17673
17674
17675
17676
17677 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
17678
17679
17680
17681
17682
17683
17684
17685
17686           GNULIB_CHDIR=1
17687
17688
17689
17690
17691
17692 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17693
17694
17695
17696
17697
17698   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17699 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
17700 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17701   printf %s "(cached) " >&6
17702 else
17703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17704 /* end confdefs.h.  */
17705
17706 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17707 #if HAVE_UNISTD_H
17708 # include <unistd.h>
17709 #endif
17710 #include <limits.h>
17711 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17712 # include <sys/param.h>
17713 #endif
17714 #if !defined PATH_MAX && defined MAXPATHLEN
17715 # define PATH_MAX MAXPATHLEN
17716 #endif
17717 #ifdef __hpux
17718 # undef PATH_MAX
17719 # define PATH_MAX 1024
17720 #endif
17721 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17722 # undef PATH_MAX
17723 # define PATH_MAX 260
17724 #endif
17725
17726 #ifdef PATH_MAX
17727 have_arbitrary_file_name_length_limit
17728 #endif
17729 _ACEOF
17730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17731   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17732   gl_cv_have_arbitrary_file_name_length_limit=yes
17733 else
17734   gl_cv_have_arbitrary_file_name_length_limit=no
17735 fi
17736 rm -rf conftest*
17737
17738 fi
17739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17740 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17741
17742   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17743
17744
17745
17746
17747
17748
17749
17750
17751   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17752
17753     :
17754   fi
17755
17756
17757
17758   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17759   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17760
17761   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17762   # programs in the package would end up linked with that potentially-shared
17763   # library, inducing unnecessary run-time overhead.
17764   LIB_CLOCK_GETTIME=
17765
17766   gl_saved_libs=$LIBS
17767     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17768 printf %s "checking for library containing clock_gettime... " >&6; }
17769 if ${ac_cv_search_clock_gettime+:} false; then :
17770   printf %s "(cached) " >&6
17771 else
17772   ac_func_search_save_LIBS=$LIBS
17773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17774 /* end confdefs.h.  */
17775
17776 /* Override any GCC internal prototype to avoid an error.
17777    Use char because int might match the return type of a GCC
17778    builtin and then its argument prototype would still apply.  */
17779 #ifdef __cplusplus
17780 extern "C"
17781 #endif
17782 char clock_gettime ();
17783 int
17784 main ()
17785 {
17786 return clock_gettime ();
17787   ;
17788   return 0;
17789 }
17790 _ACEOF
17791 for ac_lib in '' rt posix4; do
17792   if test -z "$ac_lib"; then
17793     ac_res="none required"
17794   else
17795     ac_res=-l$ac_lib
17796     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17797   fi
17798   if ac_fn_c_try_link "$LINENO"; then :
17799   ac_cv_search_clock_gettime=$ac_res
17800 fi
17801 rm -f core conftest.err conftest.$ac_objext \
17802     conftest$ac_exeext
17803   if ${ac_cv_search_clock_gettime+:} false; then :
17804   break
17805 fi
17806 done
17807 if ${ac_cv_search_clock_gettime+:} false; then :
17808
17809 else
17810   ac_cv_search_clock_gettime=no
17811 fi
17812 rm conftest.$ac_ext
17813 LIBS=$ac_func_search_save_LIBS
17814 fi
17815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17816 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
17817 ac_res=$ac_cv_search_clock_gettime
17818 if test "$ac_res" != no; then :
17819   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17820   test "$ac_cv_search_clock_gettime" = "none required" ||
17821                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17822 fi
17823
17824     for ac_func in clock_gettime clock_settime
17825 do :
17826   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
17827 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17828 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17829   cat >>confdefs.h <<_ACEOF
17830 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
17831 _ACEOF
17832
17833 fi
17834 done
17835
17836   LIBS=$gl_saved_libs
17837
17838
17839
17840 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17841
17842
17843
17844
17845
17846   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17847     REPLACE_CLOSE=1
17848   fi
17849
17850
17851
17852
17853
17854   if test $ac_cv_header_sys_socket_h != yes; then
17855                     for ac_header in winsock2.h
17856 do :
17857   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17858 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17859   cat >>confdefs.h <<_ACEOF
17860 #define HAVE_WINSOCK2_H 1
17861 _ACEOF
17862
17863 fi
17864
17865 done
17866
17867   fi
17868   if test "$ac_cv_header_winsock2_h" = yes; then
17869     HAVE_WINSOCK2_H=1
17870     UNISTD_H_HAVE_WINSOCK2_H=1
17871     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17872   else
17873     HAVE_WINSOCK2_H=0
17874   fi
17875
17876
17877     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17878                         REPLACE_CLOSE=1
17879     fi
17880
17881
17882     if test $REPLACE_CLOSE = 0; then
17883
17884
17885
17886   if test $ac_cv_func_fchdir = no; then
17887     HAVE_FCHDIR=0
17888   fi
17889
17890       if test $HAVE_FCHDIR = 0; then
17891         REPLACE_CLOSE=1
17892       fi
17893     fi
17894
17895
17896   if test $REPLACE_CLOSE = 1; then
17897
17898
17899
17900
17901
17902
17903
17904
17905   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17906
17907   fi
17908
17909
17910
17911
17912
17913           GNULIB_CLOSE=1
17914
17915
17916
17917
17918
17919 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17920
17921
17922
17923
17924   :
17925
17926
17927
17928 cat >>confdefs.h <<_ACEOF
17929 #define GNULIB_CLOSE_STREAM 1
17930 _ACEOF
17931
17932
17933
17934
17935
17936   for ac_func in closedir
17937 do :
17938   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17939 if test "x$ac_cv_func_closedir" = xyes; then :
17940   cat >>confdefs.h <<_ACEOF
17941 #define HAVE_CLOSEDIR 1
17942 _ACEOF
17943
17944 fi
17945 done
17946
17947   if test $ac_cv_func_closedir = no; then
17948     HAVE_CLOSEDIR=0
17949   fi
17950
17951
17952
17953
17954   if test $ac_cv_func_fchdir = no; then
17955     HAVE_FCHDIR=0
17956   fi
17957
17958     if test $HAVE_FCHDIR = 0; then
17959       if test $HAVE_CLOSEDIR = 1; then
17960         REPLACE_CLOSEDIR=1
17961       fi
17962     fi
17963
17964
17965   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17966
17967
17968
17969
17970
17971
17972
17973
17974   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17975
17976   fi
17977
17978
17979
17980
17981
17982           GNULIB_CLOSEDIR=1
17983
17984
17985
17986
17987
17988 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17989
17990
17991
17992
17993   :
17994
17995
17996   :
17997
17998
17999           if test "x$datarootdir" = x; then
18000     datarootdir='${datadir}'
18001
18002   fi
18003     if test "x$docdir" = x; then
18004     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
18005
18006   fi
18007     if test "x$htmldir" = x; then
18008     htmldir='${docdir}'
18009
18010   fi
18011   if test "x$dvidir" = x; then
18012     dvidir='${docdir}'
18013
18014   fi
18015   if test "x$pdfdir" = x; then
18016     pdfdir='${docdir}'
18017
18018   fi
18019   if test "x$psdir" = x; then
18020     psdir='${docdir}'
18021
18022   fi
18023   if test "x$lispdir" = x; then
18024     lispdir='${datarootdir}/emacs/site-lisp'
18025
18026   fi
18027   if test "x$localedir" = x; then
18028     localedir='${datarootdir}/locale'
18029
18030   fi
18031
18032       pkglibexecdir='${libexecdir}/${PACKAGE}'
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047      if test $gl_cv_have_include_next = yes; then
18048        gl_cv_next_dirent_h='<'dirent.h'>'
18049      else
18050        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18051 printf %s "checking absolute name of <dirent.h>... " >&6; }
18052 if ${gl_cv_next_dirent_h+:} false; then :
18053   printf %s "(cached) " >&6
18054 else
18055
18056              if test $ac_cv_header_dirent_h = yes; then
18057
18058
18059                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18060 /* end confdefs.h.  */
18061 #include <dirent.h>
18062
18063 _ACEOF
18064                                                                                                                         case "$host_os" in
18065                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18066                  *)    gl_absname_cpp="$ac_cpp" ;;
18067                esac
18068
18069                case "$host_os" in
18070                  mingw*)
18071                                                                                                                                      gl_dirsep_regex='[/\\]'
18072                    ;;
18073                  *)
18074                    gl_dirsep_regex='\/'
18075                    ;;
18076                esac
18077                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18078
18079                gl_header_literal_regex=`echo 'dirent.h' \
18080                                         | sed -e "$gl_make_literal_regex_sed"`
18081                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18082                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18083                    s|^/[^/]|//&|
18084                    p
18085                    q
18086                  }'
18087                                                             gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18088                       sed -n "$gl_absolute_header_sed"`'"'
18089           else
18090                gl_cv_next_dirent_h='<'dirent.h'>'
18091              fi
18092
18093
18094 fi
18095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18096 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
18097      fi
18098      NEXT_DIRENT_H=$gl_cv_next_dirent_h
18099
18100      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18101        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18102        gl_next_as_first_directive='<'dirent.h'>'
18103      else
18104        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18105        gl_next_as_first_directive=$gl_cv_next_dirent_h
18106      fi
18107      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18108
18109
18110
18111
18112   if test $ac_cv_header_dirent_h = yes; then
18113     HAVE_DIRENT_H=1
18114   else
18115     HAVE_DIRENT_H=0
18116   fi
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126 cat >>confdefs.h <<_ACEOF
18127 #define GNULIB_DIRENT_SAFER 1
18128 _ACEOF
18129
18130
18131
18132
18133
18134
18135
18136   for ac_func in dirfd
18137 do :
18138   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18139 if test "x$ac_cv_func_dirfd" = xyes; then :
18140   cat >>confdefs.h <<_ACEOF
18141 #define HAVE_DIRFD 1
18142 _ACEOF
18143
18144 fi
18145 done
18146
18147   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18148       #include <dirent.h>
18149 "
18150 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18151   ac_have_decl=1
18152 else
18153   ac_have_decl=0
18154 fi
18155
18156 cat >>confdefs.h <<_ACEOF
18157 #define HAVE_DECL_DIRFD $ac_have_decl
18158 _ACEOF
18159
18160   if test $ac_cv_have_decl_dirfd = no; then
18161     HAVE_DECL_DIRFD=0
18162   fi
18163
18164   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18165 printf %s "checking whether dirfd is a macro... " >&6; }
18166 if ${gl_cv_func_dirfd_macro+:} false; then :
18167   printf %s "(cached) " >&6
18168 else
18169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18170 /* end confdefs.h.  */
18171
18172 #include <sys/types.h>
18173 #include <dirent.h>
18174 #ifdef dirfd
18175  dirent_header_defines_dirfd
18176 #endif
18177 _ACEOF
18178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18179   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18180   gl_cv_func_dirfd_macro=yes
18181 else
18182   gl_cv_func_dirfd_macro=no
18183 fi
18184 rm -rf conftest*
18185
18186 fi
18187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18188 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
18189
18190   # Use the replacement only if we have no function or macro with that name.
18191   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18192     if test $ac_cv_have_decl_dirfd = yes; then
18193       # If the system declares dirfd already, let's declare rpl_dirfd instead.
18194       REPLACE_DIRFD=1
18195     fi
18196   fi
18197
18198   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
18199
18200
18201
18202
18203
18204
18205
18206
18207   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18208
18209
18210   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18211 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18212 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18213   printf %s "(cached) " >&6
18214 else
18215
18216       dirfd_save_CFLAGS=$CFLAGS
18217       for ac_expr in d_fd dd_fd; do
18218
18219         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18220         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18221 /* end confdefs.h.  */
18222
18223            #include <sys/types.h>
18224            #include <dirent.h>
18225 int
18226 main ()
18227 {
18228 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18229   ;
18230   return 0;
18231 }
18232 _ACEOF
18233 if ac_fn_c_try_compile "$LINENO"; then :
18234   dir_fd_found=yes
18235
18236 fi
18237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18238         CFLAGS=$dirfd_save_CFLAGS
18239         test "$dir_fd_found" = yes && break
18240       done
18241       test "$dir_fd_found" = yes || ac_expr=no_such_member
18242
18243       gl_cv_sys_dir_fd_member_name=$ac_expr
18244
18245
18246 fi
18247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18248 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
18249   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18250
18251 cat >>confdefs.h <<_ACEOF
18252 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18253 _ACEOF
18254
18255   fi
18256
18257
18258   fi
18259
18260
18261
18262
18263
18264           GNULIB_DIRFD=1
18265
18266
18267
18268
18269
18270 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18281 printf %s "checking whether // is distinct from /... " >&6; }
18282 if ${gl_cv_double_slash_root+:} false; then :
18283   printf %s "(cached) " >&6
18284 else
18285    if test x"$cross_compiling" = xyes ; then
18286         # When cross-compiling, there is no way to tell whether // is special
18287         # short of a list of hosts.  However, the only known hosts to date
18288         # that have a distinct // are Apollo DomainOS (too old to port to),
18289         # Cygwin, and z/OS.  If anyone knows of another system for which // has
18290         # special semantics and is distinct from /, please report it to
18291         # <bug-gnulib@gnu.org>.
18292         case $host in
18293           *-cygwin | i370-ibm-openedition)
18294             gl_cv_double_slash_root=yes ;;
18295           *)
18296             # Be optimistic and assume that / and // are the same when we
18297             # don't know.
18298             gl_cv_double_slash_root='unknown, assuming no' ;;
18299         esac
18300       else
18301         set x `ls -di / // 2>/dev/null`
18302         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18303           gl_cv_double_slash_root=no
18304         else
18305           gl_cv_double_slash_root=yes
18306         fi
18307       fi
18308 fi
18309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18310 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
18311   if test "$gl_cv_double_slash_root" = yes; then
18312
18313 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18314
18315   fi
18316
18317
18318
18319
18320   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18321     REPLACE_DUP=1
18322   fi
18323
18324
18325
18326
18327   if test $ac_cv_func_fchdir = no; then
18328     HAVE_FCHDIR=0
18329   fi
18330
18331     if test $HAVE_FCHDIR = 0; then
18332       REPLACE_DUP=1
18333     fi
18334
18335
18336   if test $REPLACE_DUP = 1; then
18337
18338
18339
18340
18341
18342
18343
18344
18345   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18346
18347     :
18348   fi
18349
18350
18351
18352
18353
18354           GNULIB_DUP=1
18355
18356
18357
18358
18359
18360 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
18361
18362
18363
18364
18365
18366
18367
18368
18369 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
18370
18371
18372   if test $HAVE_DUP2 = 1; then
18373     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18374 printf %s "checking whether dup2 works... " >&6; }
18375 if ${gl_cv_func_dup2_works+:} false; then :
18376   printf %s "(cached) " >&6
18377 else
18378   if test "$cross_compiling" = yes; then :
18379   case "$host_os" in
18380            mingw*) # on this platform, dup2 always returns 0 for success
18381              gl_cv_func_dup2_works="guessing no" ;;
18382            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18383              gl_cv_func_dup2_works="guessing no" ;;
18384            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
18385                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
18386              gl_cv_func_dup2_works="guessing no" ;;
18387            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
18388              gl_cv_func_dup2_works="guessing no" ;;
18389            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18390              gl_cv_func_dup2_works="guessing no" ;;
18391            *) gl_cv_func_dup2_works="guessing yes" ;;
18392          esac
18393 else
18394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18395 /* end confdefs.h.  */
18396
18397          #include <unistd.h>
18398 #include <fcntl.h>
18399 #include <errno.h>
18400 int
18401 main ()
18402 {
18403 int result = 0;
18404 #ifdef FD_CLOEXEC
18405             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18406               result |= 1;
18407 #endif
18408             if (dup2 (1, 1) == 0)
18409               result |= 2;
18410 #ifdef FD_CLOEXEC
18411             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18412               result |= 4;
18413 #endif
18414             close (0);
18415             if (dup2 (0, 0) != -1)
18416               result |= 8;
18417             /* Many gnulib modules require POSIX conformance of EBADF.  */
18418             if (dup2 (2, 1000000) == -1 && errno != EBADF)
18419               result |= 16;
18420             /* Flush out a cygwin core dump.  */
18421             if (dup2 (2, -1) != -1 || errno != EBADF)
18422               result |= 32;
18423             return result;
18424
18425   ;
18426   return 0;
18427 }
18428
18429 _ACEOF
18430 if ac_fn_c_try_run "$LINENO"; then :
18431   gl_cv_func_dup2_works=yes
18432 else
18433   gl_cv_func_dup2_works=no
18434 fi
18435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18436   conftest.$ac_objext conftest.beam conftest.$ac_ext
18437 fi
18438
18439
18440 fi
18441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18442 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
18443     case "$gl_cv_func_dup2_works" in
18444       *yes) ;;
18445       *)
18446         REPLACE_DUP2=1
18447         ;;
18448     esac
18449   fi
18450
18451
18452
18453
18454   if test $ac_cv_func_fchdir = no; then
18455     HAVE_FCHDIR=0
18456   fi
18457
18458     if test $HAVE_FCHDIR = 0; then
18459       if test $HAVE_DUP2 = 1; then
18460         REPLACE_DUP2=1
18461       fi
18462     fi
18463
18464
18465   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18466
18467
18468
18469
18470
18471
18472
18473
18474   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18475
18476
18477   fi
18478
18479
18480
18481
18482
18483           GNULIB_DUP2=1
18484
18485
18486
18487
18488
18489 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18490
18491
18492
18493
18494
18495       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18496 printf %s "checking for error_at_line... " >&6; }
18497 if ${ac_cv_lib_error_at_line+:} false; then :
18498   printf %s "(cached) " >&6
18499 else
18500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18501 /* end confdefs.h.  */
18502 #include <error.h>
18503 int
18504 main ()
18505 {
18506 error_at_line (0, 0, "", 0, "an error occurred");
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 if ac_fn_c_try_link "$LINENO"; then :
18512   ac_cv_lib_error_at_line=yes
18513 else
18514   ac_cv_lib_error_at_line=no
18515 fi
18516 rm -f core conftest.err conftest.$ac_objext \
18517     conftest$ac_exeext conftest.$ac_ext
18518 fi
18519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18520 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
18521
18522   if test $ac_cv_lib_error_at_line = no; then
18523
18524
18525
18526
18527
18528
18529
18530
18531   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18532
18533
18534
18535   :
18536
18537   fi
18538
18539
18540   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18541
18542
18543
18544   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18545
18546
18547
18548
18549
18550
18551
18552   if test $ac_cv_have_decl_fchdir = no; then
18553     HAVE_DECL_FCHDIR=0
18554   fi
18555
18556
18557   if test $HAVE_FCHDIR = 0; then
18558
18559
18560
18561
18562
18563
18564
18565
18566   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18567
18568     :
18569
18570 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
18571
18572                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18573 printf %s "checking whether open can visit directories... " >&6; }
18574 if ${gl_cv_func_open_directory_works+:} false; then :
18575   printf %s "(cached) " >&6
18576 else
18577   if test "$cross_compiling" = yes; then :
18578   case "$host_os" in
18579                    # Guess yes on glibc systems.
18580            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18581                    # If we don't know, assume the worst.
18582            *)      gl_cv_func_open_directory_works="guessing no" ;;
18583          esac
18584
18585 else
18586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18587 /* end confdefs.h.  */
18588 #include <fcntl.h>
18589
18590 int
18591 main ()
18592 {
18593 return open(".", O_RDONLY) < 0;
18594   ;
18595   return 0;
18596 }
18597 _ACEOF
18598 if ac_fn_c_try_run "$LINENO"; then :
18599   gl_cv_func_open_directory_works=yes
18600 else
18601   gl_cv_func_open_directory_works=no
18602 fi
18603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18604   conftest.$ac_objext conftest.beam conftest.$ac_ext
18605 fi
18606
18607 fi
18608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18609 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
18610     case "$gl_cv_func_open_directory_works" in
18611       *yes) ;;
18612       *)
18613
18614 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18615
18616         ;;
18617     esac
18618   fi
18619
18620
18621
18622
18623
18624
18625           GNULIB_FCHDIR=1
18626
18627
18628
18629
18630
18631 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18632
18633
18634
18635
18636
18637
18638
18639
18640   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
18641 printf %s "checking whether fflush works on input streams... " >&6; }
18642 if ${gl_cv_func_fflush_stdin+:} false; then :
18643   printf %s "(cached) " >&6
18644 else
18645   echo hello world > conftest.txt
18646      if test "$cross_compiling" = yes; then :
18647         gl_cv_func_fflush_stdin=no
18648 else
18649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18650 /* end confdefs.h.  */
18651
18652 #include <stdio.h>
18653 #if HAVE_UNISTD_H
18654 # include <unistd.h>
18655 #else /* on Windows with MSVC */
18656 # include <io.h>
18657 #endif
18658
18659 int
18660 main ()
18661 {
18662 FILE *f = fopen ("conftest.txt", "r");
18663          char buffer[10];
18664          int fd;
18665          int c;
18666          if (f == NULL)
18667            return 1;
18668          fd = fileno (f);
18669          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
18670            return 2;
18671          /* For deterministic results, ensure f read a bigger buffer.  */
18672          if (lseek (fd, 0, SEEK_CUR) == 5)
18673            return 3;
18674          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
18675             on BSD systems and on mingw.  */
18676          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
18677            return 4;
18678          if (lseek (fd, 0, SEEK_CUR) != 5)
18679            return 5;
18680          /* Verify behaviour of fflush after ungetc. See
18681             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
18682          /* Verify behaviour of fflush after a backup ungetc.  This fails on
18683             mingw.  */
18684          c = fgetc (f);
18685          ungetc (c, f);
18686          fflush (f);
18687          if (fgetc (f) != c)
18688            return 6;
18689          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
18690             on glibc 2.8 and on BSD systems.  */
18691          c = fgetc (f);
18692          ungetc ('@', f);
18693          fflush (f);
18694          if (fgetc (f) != c)
18695            return 7;
18696          return 0;
18697
18698   ;
18699   return 0;
18700 }
18701 _ACEOF
18702 if ac_fn_c_try_run "$LINENO"; then :
18703   gl_cv_func_fflush_stdin=yes
18704 else
18705   gl_cv_func_fflush_stdin=no
18706 fi
18707 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18708   conftest.$ac_objext conftest.beam conftest.$ac_ext
18709 fi
18710
18711      rm conftest.txt
18712
18713 fi
18714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
18715 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
18716
18717   if test $gl_cv_func_fflush_stdin = no; then
18718     REPLACE_FCLOSE=1
18719   fi
18720
18721
18722   if test $REPLACE_CLOSE = 1; then
18723     REPLACE_FCLOSE=1
18724   fi
18725
18726   if test $REPLACE_FCLOSE = 1; then
18727
18728
18729
18730
18731
18732
18733
18734
18735   gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
18736
18737   fi
18738
18739
18740
18741
18742
18743           GNULIB_FCLOSE=1
18744
18745
18746
18747
18748
18749 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
18750
18751
18752
18753
18754
18755
18756
18757
18758   if test $ac_cv_func_fcntl = no; then
18759
18760
18761
18762   if test $ac_cv_func_fcntl = no; then
18763     HAVE_FCNTL=0
18764   else
18765     REPLACE_FCNTL=1
18766   fi
18767
18768   else
18769             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18770 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18771 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18772   printf %s "(cached) " >&6
18773 else
18774   if test "$cross_compiling" = yes; then :
18775   # Guess that it works on glibc systems
18776           case $host_os in #((
18777             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18778             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18779           esac
18780 else
18781   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18782 /* end confdefs.h.  */
18783
18784 #include <fcntl.h>
18785 #include <errno.h>
18786
18787 int
18788 main ()
18789 {
18790 int result = 0;
18791       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18792       if (errno != EINVAL) result |= 2;
18793       return result;
18794
18795   ;
18796   return 0;
18797 }
18798 _ACEOF
18799 if ac_fn_c_try_run "$LINENO"; then :
18800   gl_cv_func_fcntl_f_dupfd_works=yes
18801 else
18802   gl_cv_func_fcntl_f_dupfd_works=no
18803 fi
18804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18805   conftest.$ac_objext conftest.beam conftest.$ac_ext
18806 fi
18807
18808 fi
18809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18810 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18811     case $gl_cv_func_fcntl_f_dupfd_works in
18812       *yes) ;;
18813       *)
18814
18815
18816   if test $ac_cv_func_fcntl = no; then
18817     HAVE_FCNTL=0
18818   else
18819     REPLACE_FCNTL=1
18820   fi
18821
18822
18823 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18824  ;;
18825     esac
18826
18827         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18828 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18829 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18830   printf %s "(cached) " >&6
18831 else
18832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18833 /* end confdefs.h.  */
18834
18835 #include <fcntl.h>
18836 #ifndef F_DUPFD_CLOEXEC
18837 choke me
18838 #endif
18839
18840 int
18841 main ()
18842 {
18843
18844   ;
18845   return 0;
18846 }
18847 _ACEOF
18848 if ac_fn_c_try_compile "$LINENO"; then :
18849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18850 /* end confdefs.h.  */
18851
18852 #ifdef __linux__
18853 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18854    it to support the semantics on older kernels that failed with EINVAL.  */
18855 choke me
18856 #endif
18857
18858 int
18859 main ()
18860 {
18861
18862   ;
18863   return 0;
18864 }
18865 _ACEOF
18866 if ac_fn_c_try_compile "$LINENO"; then :
18867   gl_cv_func_fcntl_f_dupfd_cloexec=yes
18868 else
18869   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18870 fi
18871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18872 else
18873   gl_cv_func_fcntl_f_dupfd_cloexec=no
18874 fi
18875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18876 fi
18877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18878 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18879     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18880
18881
18882
18883   if test $ac_cv_func_fcntl = no; then
18884     HAVE_FCNTL=0
18885   else
18886     REPLACE_FCNTL=1
18887   fi
18888
18889           fi
18890   fi
18891
18892
18893
18894
18895   if test $ac_cv_func_fchdir = no; then
18896     HAVE_FCHDIR=0
18897   fi
18898
18899     if test $HAVE_FCHDIR = 0; then
18900
18901
18902
18903   if test $ac_cv_func_fcntl = no; then
18904     HAVE_FCNTL=0
18905   else
18906     REPLACE_FCNTL=1
18907   fi
18908
18909     fi
18910
18911
18912   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18913
18914
18915
18916
18917
18918
18919
18920
18921   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18922
18923   fi
18924
18925
18926
18927
18928
18929           GNULIB_FCNTL=1
18930
18931
18932
18933
18934
18935 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950      if test $gl_cv_have_include_next = yes; then
18951        gl_cv_next_fcntl_h='<'fcntl.h'>'
18952      else
18953        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18954 printf %s "checking absolute name of <fcntl.h>... " >&6; }
18955 if ${gl_cv_next_fcntl_h+:} false; then :
18956   printf %s "(cached) " >&6
18957 else
18958
18959                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18960 /* end confdefs.h.  */
18961 #include <fcntl.h>
18962
18963 _ACEOF
18964                                                                                                                         case "$host_os" in
18965                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
18966                  *)    gl_absname_cpp="$ac_cpp" ;;
18967                esac
18968
18969                case "$host_os" in
18970                  mingw*)
18971                                                                                                                                      gl_dirsep_regex='[/\\]'
18972                    ;;
18973                  *)
18974                    gl_dirsep_regex='\/'
18975                    ;;
18976                esac
18977                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18978
18979                gl_header_literal_regex=`echo 'fcntl.h' \
18980                                         | sed -e "$gl_make_literal_regex_sed"`
18981                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18982                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18983                    s|^/[^/]|//&|
18984                    p
18985                    q
18986                  }'
18987                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18988                       sed -n "$gl_absolute_header_sed"`'"'
18989
18990
18991 fi
18992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18993 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
18994      fi
18995      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18996
18997      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18998        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18999        gl_next_as_first_directive='<'fcntl.h'>'
19000      else
19001        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19002        gl_next_as_first_directive=$gl_cv_next_fcntl_h
19003      fi
19004      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021 cat >>confdefs.h <<_ACEOF
19022 #define GNULIB_FCNTL_SAFER 1
19023 _ACEOF
19024
19025
19026
19027
19028
19029
19030
19031     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19032 #include <dirent.h>
19033
19034 "
19035 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
19036   ac_have_decl=1
19037 else
19038   ac_have_decl=0
19039 fi
19040
19041 cat >>confdefs.h <<_ACEOF
19042 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19043 _ACEOF
19044 if test $ac_have_decl = 1; then :
19045
19046 else
19047   HAVE_DECL_FDOPENDIR=0
19048 fi
19049
19050
19051   if test $ac_cv_func_fdopendir = no; then
19052     HAVE_FDOPENDIR=0
19053   else
19054     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19055 printf %s "checking whether fdopendir works... " >&6; }
19056 if ${gl_cv_func_fdopendir_works+:} false; then :
19057   printf %s "(cached) " >&6
19058 else
19059   if test "$cross_compiling" = yes; then :
19060   case "$host_os" in
19061                     # Guess yes on glibc systems.
19062             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19063                     # If we don't know, assume the worst.
19064             *)      gl_cv_func_fdopendir_works="guessing no" ;;
19065           esac
19066
19067 else
19068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19069 /* end confdefs.h.  */
19070
19071 #include <dirent.h>
19072 #include <fcntl.h>
19073 #include <unistd.h>
19074 #if !HAVE_DECL_FDOPENDIR
19075 extern
19076 # ifdef __cplusplus
19077 "C"
19078 # endif
19079 DIR *fdopendir (int);
19080 #endif
19081
19082 int
19083 main ()
19084 {
19085 int result = 0;
19086      int fd = open ("conftest.c", O_RDONLY);
19087      if (fd < 0) result |= 1;
19088      if (fdopendir (fd)) result |= 2;
19089      if (close (fd)) result |= 4;
19090      return result;
19091   ;
19092   return 0;
19093 }
19094 _ACEOF
19095 if ac_fn_c_try_run "$LINENO"; then :
19096   gl_cv_func_fdopendir_works=yes
19097 else
19098   gl_cv_func_fdopendir_works=no
19099 fi
19100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19101   conftest.$ac_objext conftest.beam conftest.$ac_ext
19102 fi
19103
19104 fi
19105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19106 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
19107     case "$gl_cv_func_fdopendir_works" in
19108       *yes) ;;
19109       *)
19110         REPLACE_FDOPENDIR=1
19111         ;;
19112     esac
19113   fi
19114
19115   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19116
19117
19118
19119
19120
19121
19122
19123
19124   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19125
19126   fi
19127
19128
19129
19130
19131
19132           GNULIB_FDOPENDIR=1
19133
19134
19135
19136
19137
19138 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19139
19140
19141
19142
19143
19144 cat >>confdefs.h <<_ACEOF
19145 #define GNULIB_FDOPENDIR 1
19146 _ACEOF
19147
19148
19149
19150
19151
19152
19153   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19154 printf %s "checking whether fflush works on input streams... " >&6; }
19155 if ${gl_cv_func_fflush_stdin+:} false; then :
19156   printf %s "(cached) " >&6
19157 else
19158   echo hello world > conftest.txt
19159      if test "$cross_compiling" = yes; then :
19160         gl_cv_func_fflush_stdin=no
19161 else
19162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19163 /* end confdefs.h.  */
19164
19165 #include <stdio.h>
19166 #if HAVE_UNISTD_H
19167 # include <unistd.h>
19168 #else /* on Windows with MSVC */
19169 # include <io.h>
19170 #endif
19171
19172 int
19173 main ()
19174 {
19175 FILE *f = fopen ("conftest.txt", "r");
19176          char buffer[10];
19177          int fd;
19178          int c;
19179          if (f == NULL)
19180            return 1;
19181          fd = fileno (f);
19182          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19183            return 2;
19184          /* For deterministic results, ensure f read a bigger buffer.  */
19185          if (lseek (fd, 0, SEEK_CUR) == 5)
19186            return 3;
19187          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
19188             on BSD systems and on mingw.  */
19189          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19190            return 4;
19191          if (lseek (fd, 0, SEEK_CUR) != 5)
19192            return 5;
19193          /* Verify behaviour of fflush after ungetc. See
19194             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
19195          /* Verify behaviour of fflush after a backup ungetc.  This fails on
19196             mingw.  */
19197          c = fgetc (f);
19198          ungetc (c, f);
19199          fflush (f);
19200          if (fgetc (f) != c)
19201            return 6;
19202          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
19203             on glibc 2.8 and on BSD systems.  */
19204          c = fgetc (f);
19205          ungetc ('@', f);
19206          fflush (f);
19207          if (fgetc (f) != c)
19208            return 7;
19209          return 0;
19210
19211   ;
19212   return 0;
19213 }
19214 _ACEOF
19215 if ac_fn_c_try_run "$LINENO"; then :
19216   gl_cv_func_fflush_stdin=yes
19217 else
19218   gl_cv_func_fflush_stdin=no
19219 fi
19220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19221   conftest.$ac_objext conftest.beam conftest.$ac_ext
19222 fi
19223
19224      rm conftest.txt
19225
19226 fi
19227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19228 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19229
19230   if test $gl_cv_func_fflush_stdin = no; then
19231     REPLACE_FFLUSH=1
19232   fi
19233
19234   if test $REPLACE_FFLUSH = 1; then
19235
19236
19237
19238
19239
19240
19241
19242
19243   gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
19244
19245     :
19246   fi
19247
19248
19249 cat >>confdefs.h <<_ACEOF
19250 #define GNULIB_FFLUSH 1
19251 _ACEOF
19252
19253
19254
19255
19256
19257
19258
19259           GNULIB_FFLUSH=1
19260
19261
19262
19263
19264
19265 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275   FLOAT_H=
19276   REPLACE_FLOAT_LDBL=0
19277   case "$host_os" in
19278     aix* | beos* | openbsd* | mirbsd* | irix*)
19279       FLOAT_H=float.h
19280       ;;
19281     freebsd*)
19282       case "$host_cpu" in
19283         i[34567]86 )
19284           FLOAT_H=float.h
19285           ;;
19286         x86_64 )
19287           # On x86_64 systems, the C compiler may still be generating
19288           # 32-bit code.
19289           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19290 /* end confdefs.h.  */
19291 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19292              yes
19293              #endif
19294 _ACEOF
19295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19296   $EGREP "yes" >/dev/null 2>&1; then :
19297
19298 else
19299   FLOAT_H=float.h
19300 fi
19301 rm -rf conftest*
19302
19303           ;;
19304       esac
19305       ;;
19306     linux*)
19307       case "$host_cpu" in
19308         powerpc*)
19309           FLOAT_H=float.h
19310           ;;
19311       esac
19312       ;;
19313   esac
19314   case "$host_os" in
19315     aix* | freebsd* | linux*)
19316       if test -n "$FLOAT_H"; then
19317         REPLACE_FLOAT_LDBL=1
19318       fi
19319       ;;
19320   esac
19321
19322     REPLACE_ITOLD=0
19323   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19324 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
19325 if ${gl_cv_func_itold_works+:} false; then :
19326   printf %s "(cached) " >&6
19327 else
19328
19329       if test "$cross_compiling" = yes; then :
19330   case "$host" in
19331            sparc*-*-linux*)
19332              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19333 /* end confdefs.h.  */
19334 #if defined __LP64__ || defined __arch64__
19335                 yes
19336                 #endif
19337 _ACEOF
19338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19339   $EGREP "yes" >/dev/null 2>&1; then :
19340   gl_cv_func_itold_works="guessing no"
19341 else
19342   gl_cv_func_itold_works="guessing yes"
19343 fi
19344 rm -rf conftest*
19345
19346              ;;
19347            *) gl_cv_func_itold_works="guessing yes" ;;
19348          esac
19349
19350 else
19351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19352 /* end confdefs.h.  */
19353
19354 int i = -1;
19355 volatile long double ld;
19356 int main ()
19357 {
19358   ld += i * 1.0L;
19359   if (ld > 0)
19360     return 1;
19361   return 0;
19362 }
19363 _ACEOF
19364 if ac_fn_c_try_run "$LINENO"; then :
19365   gl_cv_func_itold_works=yes
19366 else
19367   gl_cv_func_itold_works=no
19368 fi
19369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19370   conftest.$ac_objext conftest.beam conftest.$ac_ext
19371 fi
19372
19373
19374 fi
19375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19376 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
19377   case "$gl_cv_func_itold_works" in
19378     *no)
19379       REPLACE_ITOLD=1
19380                   FLOAT_H=float.h
19381       ;;
19382   esac
19383
19384   if test -n "$FLOAT_H"; then
19385
19386
19387
19388
19389
19390
19391
19392
19393      if test $gl_cv_have_include_next = yes; then
19394        gl_cv_next_float_h='<'float.h'>'
19395      else
19396        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19397 printf %s "checking absolute name of <float.h>... " >&6; }
19398 if ${gl_cv_next_float_h+:} false; then :
19399   printf %s "(cached) " >&6
19400 else
19401
19402                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19403 /* end confdefs.h.  */
19404 #include <float.h>
19405
19406 _ACEOF
19407                                                                                                                         case "$host_os" in
19408                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19409                  *)    gl_absname_cpp="$ac_cpp" ;;
19410                esac
19411
19412                case "$host_os" in
19413                  mingw*)
19414                                                                                                                                      gl_dirsep_regex='[/\\]'
19415                    ;;
19416                  *)
19417                    gl_dirsep_regex='\/'
19418                    ;;
19419                esac
19420                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19421
19422                gl_header_literal_regex=`echo 'float.h' \
19423                                         | sed -e "$gl_make_literal_regex_sed"`
19424                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19425                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19426                    s|^/[^/]|//&|
19427                    p
19428                    q
19429                  }'
19430                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19431                       sed -n "$gl_absolute_header_sed"`'"'
19432
19433
19434 fi
19435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19436 printf "%s\n" "$gl_cv_next_float_h" >&6; }
19437      fi
19438      NEXT_FLOAT_H=$gl_cv_next_float_h
19439
19440      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19441        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19442        gl_next_as_first_directive='<'float.h'>'
19443      else
19444        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19445        gl_next_as_first_directive=$gl_cv_next_float_h
19446      fi
19447      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19448
19449
19450
19451
19452   fi
19453
19454    if test -n "$FLOAT_H"; then
19455   GL_GENERATE_FLOAT_H_TRUE=
19456   GL_GENERATE_FLOAT_H_FALSE='#'
19457 else
19458   GL_GENERATE_FLOAT_H_TRUE='#'
19459   GL_GENERATE_FLOAT_H_FALSE=
19460 fi
19461
19462
19463
19464   if test $REPLACE_FLOAT_LDBL = 1; then
19465
19466
19467
19468
19469
19470
19471
19472
19473   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19474
19475   fi
19476   if test $REPLACE_ITOLD = 1; then
19477
19478
19479
19480
19481
19482
19483
19484
19485   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19486
19487   fi
19488
19489
19490
19491   fp_headers='
19492 #     include <stdio.h>
19493 #     if HAVE_STDIO_EXT_H
19494 #      include <stdio_ext.h>
19495 #     endif
19496 '
19497   ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19498 "
19499 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19500   ac_have_decl=1
19501 else
19502   ac_have_decl=0
19503 fi
19504
19505 cat >>confdefs.h <<_ACEOF
19506 #define HAVE_DECL___FPENDING $ac_have_decl
19507 _ACEOF
19508
19509
19510   if test $ac_cv_func___fpending = no; then
19511
19512
19513
19514
19515
19516
19517
19518
19519   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19520
19521
19522   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19523 printf %s "checking how to determine the number of pending output bytes on a stream... " >&6; }
19524 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19525   printf %s "(cached) " >&6
19526 else
19527
19528       for ac_expr in                                                    \
19529                                                                         \
19530           '# glibc2'                                                    \
19531           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
19532                                                                         \
19533           '# traditional Unix'                                          \
19534           'fp->_ptr - fp->_base'                                        \
19535                                                                         \
19536           '# BSD'                                                       \
19537           'fp->_p - fp->_bf._base'                                      \
19538                                                                         \
19539           '# SCO, Unixware'                                             \
19540           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
19541                                                                         \
19542           '# QNX'                                                       \
19543           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19544                                                                         \
19545           '# old glibc?'                                                \
19546           'fp->__bufp - fp->__buffer'                                   \
19547                                                                         \
19548           '# old glibc iostream?'                                       \
19549           'fp->_pptr - fp->_pbase'                                      \
19550                                                                         \
19551           '# emx+gcc'                                                   \
19552           'fp->_ptr - fp->_buffer'                                      \
19553                                                                         \
19554           '# Minix'                                                     \
19555           'fp->_ptr - fp->_buf'                                         \
19556                                                                         \
19557           '# Plan9'                                                     \
19558           'fp->wp - fp->buf'                                            \
19559                                                                         \
19560           '# VMS'                                                       \
19561           '(*fp)->_ptr - (*fp)->_base'                                  \
19562                                                                         \
19563           '# e.g., DGUX R4.11; the info is not available'               \
19564           1                                                             \
19565           ; do
19566
19567         # Skip each embedded comment.
19568         case "$ac_expr" in '#'*) continue;; esac
19569
19570         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19571 /* end confdefs.h.  */
19572 #include <stdio.h>
19573 int
19574 main ()
19575 {
19576 FILE *fp = stdin; (void) ($ac_expr);
19577   ;
19578   return 0;
19579 }
19580 _ACEOF
19581 if ac_fn_c_try_compile "$LINENO"; then :
19582   fp_done=yes
19583
19584 fi
19585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19586         test "$fp_done" = yes && break
19587       done
19588
19589       ac_cv_sys_pending_output_n_bytes=$ac_expr
19590
19591
19592 fi
19593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19594 printf "%s\n" "$ac_cv_sys_pending_output_n_bytes" >&6; }
19595
19596 cat >>confdefs.h <<_ACEOF
19597 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19598 _ACEOF
19599
19600
19601   fi
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617   gl_cv_func_fprintf_posix=no
19618   case "$gl_cv_func_printf_sizes_c99" in
19619     *yes)
19620       case "$gl_cv_func_printf_long_double" in
19621         *yes)
19622           case "$gl_cv_func_printf_infinite" in
19623             *yes)
19624               case "$gl_cv_func_printf_infinite_long_double" in
19625                 *yes)
19626                   case "$gl_cv_func_printf_directive_a" in
19627                     *yes)
19628                       case "$gl_cv_func_printf_directive_f" in
19629                         *yes)
19630                           case "$gl_cv_func_printf_directive_n" in
19631                             *yes)
19632                               case "$gl_cv_func_printf_directive_ls" in
19633                                 *yes)
19634                                   case "$gl_cv_func_printf_positions" in
19635                                     *yes)
19636                                       case "$gl_cv_func_printf_flag_grouping" in
19637                                         *yes)
19638                                           case "$gl_cv_func_printf_flag_leftadjust" in
19639                                             *yes)
19640                                               case "$gl_cv_func_printf_flag_zero" in
19641                                                 *yes)
19642                                                   case "$gl_cv_func_printf_precision" in
19643                                                     *yes)
19644                                                       case "$gl_cv_func_printf_enomem" in
19645                                                         *yes)
19646                                                           # fprintf exists and is
19647                                                           # already POSIX compliant.
19648                                                           gl_cv_func_fprintf_posix=yes
19649                                                           ;;
19650                                                       esac
19651                                                       ;;
19652                                                   esac
19653                                                   ;;
19654                                               esac
19655                                               ;;
19656                                           esac
19657                                           ;;
19658                                       esac
19659                                       ;;
19660                                   esac
19661                                   ;;
19662                               esac
19663                               ;;
19664                           esac
19665                           ;;
19666                       esac
19667                       ;;
19668                   esac
19669                   ;;
19670               esac
19671               ;;
19672           esac
19673           ;;
19674       esac
19675       ;;
19676   esac
19677   if test $gl_cv_func_fprintf_posix = no; then
19678
19679
19680
19681   case "$gl_cv_func_printf_infinite" in
19682     *yes)
19683       ;;
19684     *)
19685
19686 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
19687
19688       ;;
19689   esac
19690
19691
19692
19693
19694   case "$gl_cv_func_printf_long_double" in
19695     *yes)
19696       case "$gl_cv_func_printf_infinite_long_double" in
19697         *yes)
19698           ;;
19699         *)
19700
19701 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
19702
19703           ;;
19704       esac
19705       ;;
19706   esac
19707
19708
19709
19710   case "$gl_cv_func_printf_directive_a" in
19711     *yes)
19712       ;;
19713     *)
19714
19715 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
19716
19717       for ac_func in nl_langinfo
19718 do :
19719   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
19720 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
19721   cat >>confdefs.h <<_ACEOF
19722 #define HAVE_NL_LANGINFO 1
19723 _ACEOF
19724
19725 fi
19726 done
19727
19728       ;;
19729   esac
19730
19731
19732
19733   case "$gl_cv_func_printf_directive_f" in
19734     *yes)
19735       ;;
19736     *)
19737
19738 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
19739
19740       ;;
19741   esac
19742
19743
19744
19745   case "$gl_cv_func_printf_directive_ls" in
19746     *yes)
19747       ;;
19748     *)
19749
19750 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
19751
19752       ;;
19753   esac
19754
19755
19756
19757   case "$gl_cv_func_printf_flag_grouping" in
19758     *yes)
19759       ;;
19760     *)
19761
19762 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
19763
19764       ;;
19765   esac
19766
19767
19768
19769   case "$gl_cv_func_printf_flag_leftadjust" in
19770     *yes)
19771       ;;
19772     *)
19773
19774 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
19775
19776       ;;
19777   esac
19778
19779
19780
19781   case "$gl_cv_func_printf_flag_zero" in
19782     *yes)
19783       ;;
19784     *)
19785
19786 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
19787
19788       ;;
19789   esac
19790
19791
19792
19793   case "$gl_cv_func_printf_precision" in
19794     *yes)
19795       ;;
19796     *)
19797
19798 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
19799
19800
19801 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19802
19803
19804 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19805
19806       ;;
19807   esac
19808
19809
19810
19811   case "$gl_cv_func_printf_enomem" in
19812     *yes)
19813       ;;
19814     *)
19815
19816 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
19817
19818
19819 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
19820
19821
19822 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19823
19824       ;;
19825   esac
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
19868
19869   if test $ac_cv_func_vasnprintf = yes; then
19870
19871 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
19872
19873   fi
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
19886 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
19887
19888 else
19889
19890 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
19891
19892
19893 fi
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911   gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
19912
19913   REPLACE_FPRINTF=1
19914
19915 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
19916
19917   :
19918
19919   fi
19920
19921
19922
19923
19924
19925
19926           GNULIB_FPRINTF_POSIX=1
19927
19928
19929
19930
19931
19932 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
19933
19934
19935
19936
19937
19938
19939
19940   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
19941 "
19942 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
19943   ac_have_decl=1
19944 else
19945   ac_have_decl=0
19946 fi
19947
19948 cat >>confdefs.h <<_ACEOF
19949 #define HAVE_DECL_FPURGE $ac_have_decl
19950 _ACEOF
19951
19952   if test "x$ac_cv_func_fpurge" = xyes; then
19953     HAVE_FPURGE=1
19954     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
19955     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
19956 printf %s "checking whether fpurge works... " >&6; }
19957 if ${gl_cv_func_fpurge_works+:} false; then :
19958   printf %s "(cached) " >&6
19959 else
19960   if test "$cross_compiling" = yes; then :
19961   gl_cv_func_fpurge_works='guessing no'
19962 else
19963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19964 /* end confdefs.h.  */
19965 #include <stdio.h>
19966
19967 int
19968 main ()
19969 {
19970 FILE *f = fopen ("conftest.txt", "w+");
19971         if (!f) return 1;
19972         if (fputc ('a', f) != 'a') return 2;
19973         rewind (f);
19974         if (fgetc (f) != 'a') return 3;
19975         if (fgetc (f) != EOF) return 4;
19976         if (fpurge (f) != 0) return 5;
19977         if (putc ('b', f) != 'b') return 6;
19978         if (fclose (f) != 0) return 7;
19979         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
19980         if (fgetc (f) != 'a') return 9;
19981         if (fgetc (f) != 'b') return 10;
19982         if (fgetc (f) != EOF) return 11;
19983         if (fclose (f) != 0) return 12;
19984         if (remove ("conftest.txt") != 0) return 13;
19985         return 0;
19986   ;
19987   return 0;
19988 }
19989 _ACEOF
19990 if ac_fn_c_try_run "$LINENO"; then :
19991   gl_cv_func_fpurge_works=yes
19992 else
19993   gl_cv_func_fpurge_works=no
19994 fi
19995 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19996   conftest.$ac_objext conftest.beam conftest.$ac_ext
19997 fi
19998
19999 fi
20000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
20001 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
20002     if test "x$gl_cv_func_fpurge_works" != xyes; then
20003       REPLACE_FPURGE=1
20004     fi
20005   else
20006     HAVE_FPURGE=0
20007   fi
20008   if test "x$ac_cv_have_decl_fpurge" = xno; then
20009     HAVE_DECL_FPURGE=0
20010   fi
20011
20012   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
20013
20014
20015
20016
20017
20018
20019
20020
20021   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
20022
20023   fi
20024
20025
20026
20027
20028
20029           GNULIB_FPURGE=1
20030
20031
20032
20033
20034
20035 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
20036
20037
20038
20039
20040
20041
20042   if test $ac_cv_func___freadahead = no; then
20043
20044
20045
20046
20047
20048
20049
20050
20051   gl_LIBOBJS="$gl_LIBOBJS freadahead.$ac_objext"
20052
20053   fi
20054
20055
20056
20057
20058
20059
20060   if test $gl_cv_func_frexp_no_libm = yes; then
20061
20062
20063
20064   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
20065 printf %s "checking whether frexp works... " >&6; }
20066 if ${gl_cv_func_frexp_works+:} false; then :
20067   printf %s "(cached) " >&6
20068 else
20069
20070       if test "$cross_compiling" = yes; then :
20071   case "$host_os" in
20072            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
20073            *)                        gl_cv_func_frexp_works="guessing yes";;
20074          esac
20075
20076 else
20077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20078 /* end confdefs.h.  */
20079
20080 #include <float.h>
20081 #include <math.h>
20082 #include <string.h>
20083 #if HAVE_DECL_ALARM
20084 # include <signal.h>
20085 # include <unistd.h>
20086 #endif
20087 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
20088    ICC 10.0 has a bug when optimizing the expression -zero.
20089    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
20090    to PowerPC on Mac OS X 10.5.  */
20091 #if defined __hpux || defined __sgi || defined __ICC
20092 static double
20093 compute_minus_zero (void)
20094 {
20095   return -DBL_MIN * DBL_MIN;
20096 }
20097 # define minus_zero compute_minus_zero ()
20098 #else
20099 double minus_zero = -0.0;
20100 #endif
20101 int main()
20102 {
20103   int result = 0;
20104   int i;
20105   volatile double x;
20106   double zero = 0.0;
20107 #if HAVE_DECL_ALARM
20108   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
20109      number.  Let the test fail in this case.  */
20110   signal (SIGALRM, SIG_DFL);
20111   alarm (5);
20112 #endif
20113   /* Test on denormalized numbers.  */
20114   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
20115     ;
20116   if (x > 0.0)
20117     {
20118       int exp;
20119       double y = frexp (x, &exp);
20120       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
20121          On NetBSD: y = 0.75. Correct: y = 0.5.  */
20122       if (y != 0.5)
20123         result |= 1;
20124     }
20125   /* Test on infinite numbers.  */
20126   x = 1.0 / zero;
20127   {
20128     int exp;
20129     double y = frexp (x, &exp);
20130     if (y != x)
20131       result |= 2;
20132   }
20133   /* Test on negative zero.  */
20134   x = minus_zero;
20135   {
20136     int exp;
20137     double y = frexp (x, &exp);
20138     if (memcmp (&y, &x, sizeof x))
20139       result |= 4;
20140   }
20141   return result;
20142 }
20143 _ACEOF
20144 if ac_fn_c_try_run "$LINENO"; then :
20145   gl_cv_func_frexp_works=yes
20146 else
20147   gl_cv_func_frexp_works=no
20148 fi
20149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20150   conftest.$ac_objext conftest.beam conftest.$ac_ext
20151 fi
20152
20153
20154 fi
20155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
20156 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
20157
20158     case "$gl_cv_func_frexp_works" in
20159       *yes) gl_func_frexp_no_libm=yes ;;
20160       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
20161     esac
20162   else
20163     gl_func_frexp_no_libm=no
20164         REPLACE_FREXP=1
20165   fi
20166   if test $gl_func_frexp_no_libm = yes; then
20167
20168 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
20169
20170   fi
20171
20172   if test $gl_func_frexp_no_libm != yes; then
20173
20174
20175
20176
20177
20178
20179
20180
20181   gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20182
20183   fi
20184
20185
20186
20187
20188
20189           GNULIB_FREXP=1
20190
20191
20192
20193
20194
20195 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20196
20197
20198
20199
20200
20201
20202       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
20203 "
20204 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
20205
20206 else
20207   HAVE_DECL_FREXPL=0
20208 fi
20209
20210   if test $HAVE_DECL_FREXPL = 1; then
20211
20212   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
20213 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
20214 if ${gl_cv_func_frexpl_no_libm+:} false; then :
20215   printf %s "(cached) " >&6
20216 else
20217
20218       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219 /* end confdefs.h.  */
20220 #include <math.h>
20221              long double x;
20222 int
20223 main ()
20224 {
20225 int e; return frexpl (x, &e) > 0;
20226   ;
20227   return 0;
20228 }
20229 _ACEOF
20230 if ac_fn_c_try_link "$LINENO"; then :
20231   gl_cv_func_frexpl_no_libm=yes
20232 else
20233   gl_cv_func_frexpl_no_libm=no
20234 fi
20235 rm -f core conftest.err conftest.$ac_objext \
20236     conftest$ac_exeext conftest.$ac_ext
20237
20238 fi
20239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
20240 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
20241
20242     if test $gl_cv_func_frexpl_no_libm = yes; then
20243
20244
20245      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
20246 printf %s "checking whether frexpl works... " >&6; }
20247 if ${gl_cv_func_frexpl_works+:} false; then :
20248   printf %s "(cached) " >&6
20249 else
20250
20251       if test "$cross_compiling" = yes; then :
20252
20253          case "$host_os" in
20254            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
20255               gl_cv_func_frexpl_works="guessing no";;
20256            *) gl_cv_func_frexpl_works="guessing yes";;
20257          esac
20258
20259 else
20260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20261 /* end confdefs.h.  */
20262
20263 #include <float.h>
20264 #include <math.h>
20265 /* Override the values of <float.h>, like done in float.in.h.  */
20266 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
20267 # undef LDBL_MIN_EXP
20268 # define LDBL_MIN_EXP    (-16381)
20269 #endif
20270 #if defined __i386__ && defined __FreeBSD__
20271 # undef LDBL_MIN_EXP
20272 # define LDBL_MIN_EXP    (-16381)
20273 #endif
20274 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
20275 # undef LDBL_MIN_EXP
20276 # define LDBL_MIN_EXP DBL_MIN_EXP
20277 #endif
20278 #if defined __sgi && (LDBL_MANT_DIG >= 106)
20279 # if defined __GNUC__
20280 #  undef LDBL_MIN_EXP
20281 #  define LDBL_MIN_EXP DBL_MIN_EXP
20282 # endif
20283 #endif
20284 extern
20285 #ifdef __cplusplus
20286 "C"
20287 #endif
20288 long double frexpl (long double, int *);
20289 int main()
20290 {
20291   int result = 0;
20292   volatile long double x;
20293   /* Test on finite numbers that fails on AIX 5.1.  */
20294   x = 16.0L;
20295   {
20296     int exp = -9999;
20297     frexpl (x, &exp);
20298     if (exp != 5)
20299       result |= 1;
20300   }
20301   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
20302      function returns an invalid (incorrectly normalized) value: it returns
20303                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
20304      but the correct result is
20305           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
20306   x = 1.01L;
20307   {
20308     int exp = -9999;
20309     long double y = frexpl (x, &exp);
20310     if (!(exp == 1 && y == 0.505L))
20311       result |= 2;
20312   }
20313   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
20314      LDBL_MAX_EXP = 16384.
20315      In the loop end test, we test x against Infinity, rather than comparing
20316      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
20317   {
20318     int i;
20319     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
20320       {
20321         int exp = -9999;
20322         frexpl (x, &exp);
20323         if (exp != i)
20324           {
20325             result |= 4;
20326             break;
20327           }
20328       }
20329   }
20330   /* Test on denormalized numbers.  */
20331   {
20332     int i;
20333     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
20334       ;
20335     if (x > 0.0L)
20336       {
20337         int exp;
20338         long double y = frexpl (x, &exp);
20339         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
20340            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
20341         if (exp != LDBL_MIN_EXP - 1)
20342           result |= 8;
20343       }
20344   }
20345   /* Test on infinite numbers.  */
20346   x = 1.0L / 0.0L;
20347   {
20348     int exp;
20349     long double y = frexpl (x, &exp);
20350     if (y != x)
20351       result |= 16;
20352   }
20353   return result;
20354 }
20355 _ACEOF
20356 if ac_fn_c_try_run "$LINENO"; then :
20357   gl_cv_func_frexpl_works=yes
20358 else
20359   gl_cv_func_frexpl_works=no
20360 fi
20361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20362   conftest.$ac_objext conftest.beam conftest.$ac_ext
20363 fi
20364
20365
20366 fi
20367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
20368 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
20369
20370       case "$gl_cv_func_frexpl_works" in
20371         *yes) gl_func_frexpl_no_libm=yes ;;
20372         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
20373       esac
20374     else
20375       gl_func_frexpl_no_libm=no
20376             REPLACE_FREXPL=1
20377     fi
20378     if test $gl_func_frexpl_no_libm = yes; then
20379
20380 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
20381
20382     fi
20383   fi
20384
20385   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
20386
20387
20388
20389
20390
20391
20392
20393
20394   gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20395
20396   fi
20397
20398
20399
20400
20401
20402           GNULIB_FREXPL=1
20403
20404
20405
20406
20407
20408 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20409
20410
20411
20412
20413
20414
20415     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20416     REPLACE_FSEEK=1
20417   fi
20418
20419   if test $REPLACE_FSEEK = 1; then
20420
20421
20422
20423
20424
20425
20426
20427
20428   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20429
20430   fi
20431
20432
20433
20434
20435
20436           GNULIB_FSEEK=1
20437
20438
20439
20440
20441
20442 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20455 printf %s "checking for fseeko... " >&6; }
20456 if ${gl_cv_func_fseeko+:} false; then :
20457   printf %s "(cached) " >&6
20458 else
20459
20460       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20461 /* end confdefs.h.  */
20462 #include <stdio.h>
20463
20464 int
20465 main ()
20466 {
20467 fseeko (stdin, 0, 0);
20468   ;
20469   return 0;
20470 }
20471 _ACEOF
20472 if ac_fn_c_try_link "$LINENO"; then :
20473   gl_cv_func_fseeko=yes
20474 else
20475   gl_cv_func_fseeko=no
20476 fi
20477 rm -f core conftest.err conftest.$ac_objext \
20478     conftest$ac_exeext conftest.$ac_ext
20479
20480 fi
20481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20482 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
20483
20484
20485   if test $ac_cv_have_decl_fseeko = no; then
20486     HAVE_DECL_FSEEKO=0
20487   fi
20488
20489   if test $gl_cv_func_fseeko = no; then
20490     HAVE_FSEEKO=0
20491   else
20492     if test $WINDOWS_64_BIT_OFF_T = 1; then
20493       REPLACE_FSEEKO=1
20494     fi
20495     if test $gl_cv_var_stdin_large_offset = no; then
20496       REPLACE_FSEEKO=1
20497     fi
20498
20499
20500
20501   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20502 printf %s "checking whether fflush works on input streams... " >&6; }
20503 if ${gl_cv_func_fflush_stdin+:} false; then :
20504   printf %s "(cached) " >&6
20505 else
20506   echo hello world > conftest.txt
20507      if test "$cross_compiling" = yes; then :
20508         gl_cv_func_fflush_stdin=no
20509 else
20510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20511 /* end confdefs.h.  */
20512
20513 #include <stdio.h>
20514 #if HAVE_UNISTD_H
20515 # include <unistd.h>
20516 #else /* on Windows with MSVC */
20517 # include <io.h>
20518 #endif
20519
20520 int
20521 main ()
20522 {
20523 FILE *f = fopen ("conftest.txt", "r");
20524          char buffer[10];
20525          int fd;
20526          int c;
20527          if (f == NULL)
20528            return 1;
20529          fd = fileno (f);
20530          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20531            return 2;
20532          /* For deterministic results, ensure f read a bigger buffer.  */
20533          if (lseek (fd, 0, SEEK_CUR) == 5)
20534            return 3;
20535          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
20536             on BSD systems and on mingw.  */
20537          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20538            return 4;
20539          if (lseek (fd, 0, SEEK_CUR) != 5)
20540            return 5;
20541          /* Verify behaviour of fflush after ungetc. See
20542             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
20543          /* Verify behaviour of fflush after a backup ungetc.  This fails on
20544             mingw.  */
20545          c = fgetc (f);
20546          ungetc (c, f);
20547          fflush (f);
20548          if (fgetc (f) != c)
20549            return 6;
20550          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
20551             on glibc 2.8 and on BSD systems.  */
20552          c = fgetc (f);
20553          ungetc ('@', f);
20554          fflush (f);
20555          if (fgetc (f) != c)
20556            return 7;
20557          return 0;
20558
20559   ;
20560   return 0;
20561 }
20562 _ACEOF
20563 if ac_fn_c_try_run "$LINENO"; then :
20564   gl_cv_func_fflush_stdin=yes
20565 else
20566   gl_cv_func_fflush_stdin=no
20567 fi
20568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20569   conftest.$ac_objext conftest.beam conftest.$ac_ext
20570 fi
20571
20572      rm conftest.txt
20573
20574 fi
20575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20576 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20577
20578       if test $gl_cv_func_fflush_stdin = no; then
20579         REPLACE_FSEEKO=1
20580       fi
20581
20582   fi
20583
20584   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20585
20586
20587
20588
20589
20590
20591
20592
20593   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20594
20595
20596       for ac_func in _fseeki64
20597 do :
20598   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20599 if test "x$ac_cv_func__fseeki64" = xyes; then :
20600   cat >>confdefs.h <<_ACEOF
20601 #define HAVE__FSEEKI64 1
20602 _ACEOF
20603
20604 fi
20605 done
20606
20607
20608   fi
20609
20610
20611
20612
20613
20614           GNULIB_FSEEKO=1
20615
20616
20617
20618
20619
20620 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20621
20622
20623
20624
20625
20626
20627   if test $ac_cv_func___fseterr = no; then
20628
20629
20630
20631
20632
20633
20634
20635
20636   gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
20637
20638   fi
20639
20640
20641
20642
20643   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20644     REPLACE_FSTAT=1
20645   fi
20646
20647
20648   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
20649     REPLACE_FSTAT=1
20650   fi
20651
20652
20653
20654
20655
20656   if test $ac_cv_func_fchdir = no; then
20657     HAVE_FCHDIR=0
20658   fi
20659
20660     if test $HAVE_FCHDIR = 0; then
20661       case "$gl_cv_func_open_directory_works" in
20662         *yes) ;;
20663         *)
20664           REPLACE_FSTAT=1
20665           ;;
20666       esac
20667     fi
20668
20669
20670   if test $REPLACE_FSTAT = 1; then
20671
20672
20673
20674
20675
20676
20677
20678
20679   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20680
20681     :
20682   fi
20683
20684
20685
20686
20687
20688           GNULIB_FSTAT=1
20689
20690
20691
20692
20693
20694 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20695
20696
20697
20698
20699
20700
20701     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20702     REPLACE_FTELL=1
20703   fi
20704
20705   if test $REPLACE_FTELL = 1; then
20706
20707
20708
20709
20710
20711
20712
20713
20714   gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
20715
20716   fi
20717
20718
20719
20720
20721
20722           GNULIB_FTELL=1
20723
20724
20725
20726
20727
20728 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741   if test $ac_cv_have_decl_ftello = no; then
20742     HAVE_DECL_FTELLO=0
20743   fi
20744
20745   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
20746 printf %s "checking for ftello... " >&6; }
20747 if ${gl_cv_func_ftello+:} false; then :
20748   printf %s "(cached) " >&6
20749 else
20750
20751       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20752 /* end confdefs.h.  */
20753 #include <stdio.h>
20754 int
20755 main ()
20756 {
20757 ftello (stdin);
20758   ;
20759   return 0;
20760 }
20761 _ACEOF
20762 if ac_fn_c_try_link "$LINENO"; then :
20763   gl_cv_func_ftello=yes
20764 else
20765   gl_cv_func_ftello=no
20766 fi
20767 rm -f core conftest.err conftest.$ac_objext \
20768     conftest$ac_exeext conftest.$ac_ext
20769
20770 fi
20771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
20772 printf "%s\n" "$gl_cv_func_ftello" >&6; }
20773   if test $gl_cv_func_ftello = no; then
20774     HAVE_FTELLO=0
20775   else
20776     if test $WINDOWS_64_BIT_OFF_T = 1; then
20777       REPLACE_FTELLO=1
20778     fi
20779     if test $gl_cv_var_stdin_large_offset = no; then
20780       REPLACE_FTELLO=1
20781     fi
20782     if test $REPLACE_FTELLO = 0; then
20783
20784       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
20785 printf %s "checking whether ftello works... " >&6; }
20786 if ${gl_cv_func_ftello_works+:} false; then :
20787   printf %s "(cached) " >&6
20788 else
20789
20790                               case "$host_os" in
20791                       # Guess no on Solaris.
20792             solaris*) gl_cv_func_ftello_works="guessing no" ;;
20793                       # Guess yes otherwise.
20794             *)        gl_cv_func_ftello_works="guessing yes" ;;
20795           esac
20796           if test "$cross_compiling" = yes; then :
20797   :
20798 else
20799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20800 /* end confdefs.h.  */
20801
20802 #include <stdio.h>
20803 #include <stdlib.h>
20804 #include <string.h>
20805 #define TESTFILE "conftest.tmp"
20806 int
20807 main (void)
20808 {
20809   FILE *fp;
20810
20811   /* Create a file with some contents.  */
20812   fp = fopen (TESTFILE, "w");
20813   if (fp == NULL)
20814     return 70;
20815   if (fwrite ("foogarsh", 1, 8, fp) < 8)
20816     return 71;
20817   if (fclose (fp))
20818     return 72;
20819
20820   /* The file's contents is now "foogarsh".  */
20821
20822   /* Try writing after reading to EOF.  */
20823   fp = fopen (TESTFILE, "r+");
20824   if (fp == NULL)
20825     return 73;
20826   if (fseek (fp, -1, SEEK_END))
20827     return 74;
20828   if (!(getc (fp) == 'h'))
20829     return 1;
20830   if (!(getc (fp) == EOF))
20831     return 2;
20832   if (!(ftell (fp) == 8))
20833     return 3;
20834   if (!(ftell (fp) == 8))
20835     return 4;
20836   if (!(putc ('!', fp) == '!'))
20837     return 5;
20838   if (!(ftell (fp) == 9))
20839     return 6;
20840   if (!(fclose (fp) == 0))
20841     return 7;
20842   fp = fopen (TESTFILE, "r");
20843   if (fp == NULL)
20844     return 75;
20845   {
20846     char buf[10];
20847     if (!(fread (buf, 1, 10, fp) == 9))
20848       return 10;
20849     if (!(memcmp (buf, "foogarsh!", 9) == 0))
20850       return 11;
20851   }
20852   if (!(fclose (fp) == 0))
20853     return 12;
20854
20855   /* The file's contents is now "foogarsh!".  */
20856
20857   return 0;
20858 }
20859 _ACEOF
20860 if ac_fn_c_try_run "$LINENO"; then :
20861   gl_cv_func_ftello_works=yes
20862 else
20863   gl_cv_func_ftello_works=no
20864 fi
20865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20866   conftest.$ac_objext conftest.beam conftest.$ac_ext
20867 fi
20868
20869
20870 fi
20871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
20872 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
20873       case "$gl_cv_func_ftello_works" in
20874         *yes) ;;
20875         *)
20876           REPLACE_FTELLO=1
20877
20878 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
20879
20880           ;;
20881       esac
20882     fi
20883   fi
20884
20885   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
20886
20887
20888
20889
20890
20891
20892
20893
20894   gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
20895
20896
20897       for ac_func in _ftelli64
20898 do :
20899   ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
20900 if test "x$ac_cv_func__ftelli64" = xyes; then :
20901   cat >>confdefs.h <<_ACEOF
20902 #define HAVE__FTELLI64 1
20903 _ACEOF
20904
20905 fi
20906 done
20907
20908
20909   fi
20910
20911
20912
20913
20914
20915           GNULIB_FTELLO=1
20916
20917
20918
20919
20920
20921 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
20922
20923
20924
20925
20926
20927
20928
20929
20930   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20931   *yes,yes) ;;
20932   *)
20933         REPLACE_GETCWD=1
20934     ;;
20935   esac
20936
20937   if test $REPLACE_GETCWD = 1; then
20938
20939
20940
20941
20942
20943
20944
20945
20946   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20947
20948   fi
20949
20950
20951
20952
20953
20954           GNULIB_GETCWD=1
20955
20956
20957
20958
20959
20960 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20961
20962
20963
20964
20965
20966
20967   if test $ac_cv_func_getdtablesize != yes; then
20968     HAVE_GETDTABLESIZE=0
20969   fi
20970
20971   if test $HAVE_GETDTABLESIZE = 0; then
20972
20973
20974
20975
20976
20977
20978
20979
20980   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20981
20982     :
20983   fi
20984
20985
20986
20987
20988
20989           GNULIB_GETDTABLESIZE=1
20990
20991
20992
20993
20994
20995 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20996
20997
20998
20999
21000
21001
21002
21003
21004   if test $REPLACE_GETOPT = 1; then
21005
21006
21007
21008
21009
21010
21011
21012
21013   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21024
21025
21026
21027
21028         GNULIB_GL_UNISTD_H_GETOPT=1
21029   fi
21030
21031
21032
21033 printf "%s\n" "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21034
21035
21036
21037
21038
21039
21040
21041     REPLACE_GETOPT=0
21042     if test -n "$gl_replace_getopt"; then
21043       REPLACE_GETOPT=1
21044     fi
21045
21046   if test $REPLACE_GETOPT = 1; then
21047
21048   GETOPT_H=getopt.h
21049
21050 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21051
21052
21053
21054   fi
21055
21056   if test $REPLACE_GETOPT = 1; then
21057
21058
21059
21060
21061
21062
21063
21064
21065   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21076
21077
21078
21079
21080         GNULIB_GL_UNISTD_H_GETOPT=1
21081   fi
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096   gl_gettimeofday_timezone=void
21097   if test $ac_cv_func_gettimeofday != yes; then
21098     HAVE_GETTIMEOFDAY=0
21099   else
21100
21101
21102
21103  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21104 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21105 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21106   printf %s "(cached) " >&6
21107 else
21108   if test "$cross_compiling" = yes; then :
21109   # When cross-compiling:
21110       case "$host_os" in
21111                 # Guess all is fine on glibc systems.
21112         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21113                 # If we don't know, assume the worst.
21114         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21115       esac
21116
21117 else
21118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21119 /* end confdefs.h.  */
21120 #include <string.h>
21121           #include <sys/time.h>
21122           #include <time.h>
21123           #include <stdlib.h>
21124
21125 int
21126 main ()
21127 {
21128
21129           time_t t = 0;
21130           struct tm *lt;
21131           struct tm saved_lt;
21132           struct timeval tv;
21133           lt = localtime (&t);
21134           saved_lt = *lt;
21135           gettimeofday (&tv, NULL);
21136           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21137
21138   ;
21139   return 0;
21140 }
21141 _ACEOF
21142 if ac_fn_c_try_run "$LINENO"; then :
21143   gl_cv_func_gettimeofday_clobber=no
21144 else
21145   gl_cv_func_gettimeofday_clobber=yes
21146 fi
21147 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21148   conftest.$ac_objext conftest.beam conftest.$ac_ext
21149 fi
21150
21151 fi
21152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21153 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
21154
21155  case "$gl_cv_func_gettimeofday_clobber" in
21156    *yes)
21157      REPLACE_GETTIMEOFDAY=1
21158
21159
21160 printf "%s\n" "#define gmtime rpl_gmtime" >>confdefs.h
21161
21162
21163 printf "%s\n" "#define localtime rpl_localtime" >>confdefs.h
21164
21165
21166
21167 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21168
21169      ;;
21170  esac
21171
21172     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21173 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
21174 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21175   printf %s "(cached) " >&6
21176 else
21177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21178 /* end confdefs.h.  */
21179 #include <sys/time.h>
21180               struct timeval c;
21181               int gettimeofday (struct timeval *restrict, void *restrict);
21182
21183 int
21184 main ()
21185 {
21186 /* glibc uses struct timezone * rather than the POSIX void *
21187                  if _GNU_SOURCE is defined.  However, since the only portable
21188                  use of gettimeofday uses NULL as the second parameter, and
21189                  since the glibc definition is actually more typesafe, it is
21190                  not worth wrapping this to get a compliant signature.  */
21191               int (*f) (struct timeval *restrict, void *restrict)
21192                 = gettimeofday;
21193               int x = f (&c, 0);
21194               return !(x | c.tv_sec | c.tv_usec);
21195
21196   ;
21197   return 0;
21198 }
21199 _ACEOF
21200 if ac_fn_c_try_compile "$LINENO"; then :
21201   gl_cv_func_gettimeofday_posix_signature=yes
21202 else
21203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21204 /* end confdefs.h.  */
21205 #include <sys/time.h>
21206 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21207
21208 int
21209 main ()
21210 {
21211
21212   ;
21213   return 0;
21214 }
21215 _ACEOF
21216 if ac_fn_c_try_compile "$LINENO"; then :
21217   gl_cv_func_gettimeofday_posix_signature=almost
21218 else
21219   gl_cv_func_gettimeofday_posix_signature=no
21220 fi
21221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21222 fi
21223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21224 fi
21225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21226 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21227     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21228       gl_gettimeofday_timezone='struct timezone'
21229     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21230       REPLACE_GETTIMEOFDAY=1
21231     fi
21232         if test $REPLACE_STRUCT_TIMEVAL = 1; then
21233       REPLACE_GETTIMEOFDAY=1
21234     fi
21235
21236   fi
21237
21238 cat >>confdefs.h <<_ACEOF
21239 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21240 _ACEOF
21241
21242
21243   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21244
21245
21246
21247
21248
21249
21250
21251
21252   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21253
21254
21255   for ac_header in sys/timeb.h
21256 do :
21257   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21258 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
21259   cat >>confdefs.h <<_ACEOF
21260 #define HAVE_SYS_TIMEB_H 1
21261 _ACEOF
21262
21263 fi
21264
21265 done
21266
21267   for ac_func in _ftime
21268 do :
21269   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21270 if test "x$ac_cv_func__ftime" = xyes; then :
21271   cat >>confdefs.h <<_ACEOF
21272 #define HAVE__FTIME 1
21273 _ACEOF
21274
21275 fi
21276 done
21277
21278
21279   fi
21280
21281
21282
21283
21284
21285           GNULIB_GETTIMEOFDAY=1
21286
21287
21288
21289
21290
21291 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21292
21293
21294
21295
21296    if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
21297   GNU_MAKE_TRUE=
21298   GNU_MAKE_FALSE='#'
21299 else
21300   GNU_MAKE_TRUE='#'
21301   GNU_MAKE_FALSE=
21302 fi
21303
21304
21305   # Autoconf 2.61a.99 and earlier don't support linking a file only
21306   # in VPATH builds.  But since GNUmakefile is for maintainer use
21307   # only, it does not matter if we skip the link with older autoconf.
21308   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21309   # builds, so use a shell variable to bypass this.
21310   GNUmakefile=GNUmakefile
21311   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21312
21313
21314
21315   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21316 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
21317 if ${gl_cv_func_isnand_no_libm+:} false; then :
21318   printf %s "(cached) " >&6
21319 else
21320
21321       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21322 /* end confdefs.h.  */
21323 #include <math.h>
21324              #if __GNUC__ >= 4
21325              # undef isnand
21326              # define isnand(x) __builtin_isnan ((double)(x))
21327              #else
21328              # undef isnand
21329              # define isnand(x) isnan ((double)(x))
21330              #endif
21331              double x;
21332 int
21333 main ()
21334 {
21335 return isnand (x);
21336   ;
21337   return 0;
21338 }
21339 _ACEOF
21340 if ac_fn_c_try_link "$LINENO"; then :
21341   gl_cv_func_isnand_no_libm=yes
21342 else
21343   gl_cv_func_isnand_no_libm=no
21344 fi
21345 rm -f core conftest.err conftest.$ac_objext \
21346     conftest$ac_exeext conftest.$ac_ext
21347
21348 fi
21349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21350 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
21351
21352   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21353   if test $gl_cv_func_isnand_no_libm = yes; then
21354
21355 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21356
21357   fi
21358
21359   if test $gl_func_isnand_no_libm != yes; then
21360
21361
21362
21363
21364
21365
21366
21367
21368   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21369
21370
21371
21372
21373   fi
21374
21375
21376   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
21377 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
21378 if ${gl_cv_func_isnanf_no_libm+:} false; then :
21379   printf %s "(cached) " >&6
21380 else
21381
21382       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21383 /* end confdefs.h.  */
21384 #include <math.h>
21385              #if __GNUC__ >= 4
21386              # undef isnanf
21387              # define isnanf(x) __builtin_isnanf ((float)(x))
21388              #elif defined isnan
21389              # undef isnanf
21390              # define isnanf(x) isnan ((float)(x))
21391              #endif
21392              float x;
21393 int
21394 main ()
21395 {
21396 return isnanf (x);
21397   ;
21398   return 0;
21399 }
21400 _ACEOF
21401 if ac_fn_c_try_link "$LINENO"; then :
21402   gl_cv_func_isnanf_no_libm=yes
21403 else
21404   gl_cv_func_isnanf_no_libm=no
21405 fi
21406 rm -f core conftest.err conftest.$ac_objext \
21407     conftest$ac_exeext conftest.$ac_ext
21408
21409 fi
21410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
21411 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
21412
21413   if test $gl_cv_func_isnanf_no_libm = yes; then
21414
21415
21416
21417   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
21418 printf %s "checking whether isnan(float) works... " >&6; }
21419 if ${gl_cv_func_isnanf_works+:} false; then :
21420   printf %s "(cached) " >&6
21421 else
21422
21423       if test "$cross_compiling" = yes; then :
21424   case "$host_os" in
21425            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
21426            *)                gl_cv_func_isnanf_works="guessing yes";;
21427          esac
21428
21429 else
21430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21431 /* end confdefs.h.  */
21432
21433 #include <math.h>
21434 #if __GNUC__ >= 4
21435 # undef isnanf
21436 # define isnanf(x) __builtin_isnanf ((float)(x))
21437 #elif defined isnan
21438 # undef isnanf
21439 # define isnanf(x) isnan ((float)(x))
21440 #endif
21441 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
21442 #ifdef __DECC
21443 static float
21444 NaN ()
21445 {
21446   static float zero = 0.0f;
21447   return zero / zero;
21448 }
21449 #else
21450 # define NaN() (0.0f / 0.0f)
21451 #endif
21452 #define NWORDS \
21453   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21454 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
21455 int main()
21456 {
21457   int result = 0;
21458
21459   if (isnanf (1.0f / 0.0f))
21460     result |= 1;
21461
21462   if (!isnanf (NaN ()))
21463     result |= 2;
21464
21465 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
21466   /* The isnanf function should be immune against changes in the sign bit and
21467      in the mantissa bits.  The xor operation twiddles a bit that can only be
21468      a sign bit or a mantissa bit.  */
21469   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
21470     {
21471       memory_float m;
21472
21473       m.value = NaN ();
21474       /* Set the bits below the exponent to 01111...111.  */
21475       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
21476       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
21477       if (!isnanf (m.value))
21478         result |= 4;
21479     }
21480 #endif
21481
21482   return result;
21483 }
21484 _ACEOF
21485 if ac_fn_c_try_run "$LINENO"; then :
21486   gl_cv_func_isnanf_works=yes
21487 else
21488   gl_cv_func_isnanf_works=no
21489 fi
21490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21491   conftest.$ac_objext conftest.beam conftest.$ac_ext
21492 fi
21493
21494
21495 fi
21496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
21497 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
21498
21499   fi
21500   if test $gl_cv_func_isnanf_no_libm = yes \
21501      && { case "$gl_cv_func_isnanf_works" in
21502             *yes) true;;
21503             *) false;;
21504           esac
21505         }; then
21506     gl_func_isnanf_no_libm=yes
21507
21508 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
21509
21510   else
21511     gl_func_isnanf_no_libm=no
21512   fi
21513
21514   if test $gl_func_isnanf_no_libm != yes; then
21515
21516
21517
21518
21519
21520
21521
21522
21523   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
21524
21525
21526
21527   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
21528 printf %s "checking where to find the exponent in a 'float'... " >&6; }
21529 if ${gl_cv_cc_float_expbit0+:} false; then :
21530   printf %s "(cached) " >&6
21531 else
21532
21533       if test "$cross_compiling" = yes; then :
21534   gl_cv_cc_float_expbit0="word 0 bit 23"
21535 else
21536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21537 /* end confdefs.h.  */
21538
21539 #include <float.h>
21540 #include <stddef.h>
21541 #include <stdio.h>
21542 #include <string.h>
21543 #define NWORDS \
21544   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21545 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
21546 static unsigned int ored_words[NWORDS];
21547 static unsigned int anded_words[NWORDS];
21548 static void add_to_ored_words (float x)
21549 {
21550   memory_float m;
21551   size_t i;
21552   /* Clear it first, in case
21553      sizeof (float) < sizeof (memory_float).  */
21554   memset (&m, 0, sizeof (memory_float));
21555   m.value = x;
21556   for (i = 0; i < NWORDS; i++)
21557     {
21558       ored_words[i] |= m.word[i];
21559       anded_words[i] &= m.word[i];
21560     }
21561 }
21562 int main ()
21563 {
21564   size_t j;
21565   FILE *fp = fopen ("conftest.out", "w");
21566   if (fp == NULL)
21567     return 1;
21568   for (j = 0; j < NWORDS; j++)
21569     anded_words[j] = ~ (unsigned int) 0;
21570   add_to_ored_words (0.25f);
21571   add_to_ored_words (0.5f);
21572   add_to_ored_words (1.0f);
21573   add_to_ored_words (2.0f);
21574   add_to_ored_words (4.0f);
21575   /* Remove bits that are common (e.g. if representation of the first mantissa
21576      bit is explicit).  */
21577   for (j = 0; j < NWORDS; j++)
21578     ored_words[j] &= ~anded_words[j];
21579   /* Now find the nonzero word.  */
21580   for (j = 0; j < NWORDS; j++)
21581     if (ored_words[j] != 0)
21582       break;
21583   if (j < NWORDS)
21584     {
21585       size_t i;
21586       for (i = j + 1; i < NWORDS; i++)
21587         if (ored_words[i] != 0)
21588           {
21589             fprintf (fp, "unknown");
21590             return (fclose (fp) != 0);
21591           }
21592       for (i = 0; ; i++)
21593         if ((ored_words[j] >> i) & 1)
21594           {
21595             fprintf (fp, "word %d bit %d", (int) j, (int) i);
21596             return (fclose (fp) != 0);
21597           }
21598     }
21599   fprintf (fp, "unknown");
21600   return (fclose (fp) != 0);
21601 }
21602
21603 _ACEOF
21604 if ac_fn_c_try_run "$LINENO"; then :
21605   gl_cv_cc_float_expbit0=`cat conftest.out`
21606 else
21607   gl_cv_cc_float_expbit0="unknown"
21608 fi
21609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21610   conftest.$ac_objext conftest.beam conftest.$ac_ext
21611 fi
21612
21613       rm -f conftest.out
21614
21615 fi
21616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
21617 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
21618   case "$gl_cv_cc_float_expbit0" in
21619     word*bit*)
21620       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21621       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
21622
21623 cat >>confdefs.h <<_ACEOF
21624 #define FLT_EXPBIT0_WORD $word
21625 _ACEOF
21626
21627
21628 cat >>confdefs.h <<_ACEOF
21629 #define FLT_EXPBIT0_BIT $bit
21630 _ACEOF
21631
21632       ;;
21633   esac
21634
21635
21636   fi
21637
21638
21639   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21640 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21641 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21642   printf %s "(cached) " >&6
21643 else
21644
21645       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21646 /* end confdefs.h.  */
21647 #include <math.h>
21648              #if __GNUC__ >= 4
21649              # undef isnanl
21650              # define isnanl(x) __builtin_isnanl ((long double)(x))
21651              #elif defined isnan
21652              # undef isnanl
21653              # define isnanl(x) isnan ((long double)(x))
21654              #endif
21655              long double x;
21656 int
21657 main ()
21658 {
21659 return isnanl (x);
21660   ;
21661   return 0;
21662 }
21663 _ACEOF
21664 if ac_fn_c_try_link "$LINENO"; then :
21665   gl_cv_func_isnanl_no_libm=yes
21666 else
21667   gl_cv_func_isnanl_no_libm=no
21668 fi
21669 rm -f core conftest.err conftest.$ac_objext \
21670     conftest$ac_exeext conftest.$ac_ext
21671
21672 fi
21673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21674 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
21675
21676   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21677   if test $gl_func_isnanl_no_libm = yes; then
21678
21679
21680
21681
21682      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21683 printf %s "checking whether isnanl works... " >&6; }
21684 if ${gl_cv_func_isnanl_works+:} false; then :
21685   printf %s "(cached) " >&6
21686 else
21687
21688       if test "$cross_compiling" = yes; then :
21689   case "$host_cpu" in
21690                                  # Guess no on ia64, x86_64, i386.
21691            ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
21692            *)
21693              case "$host_os" in
21694                netbsd*) gl_cv_func_isnanl_works="guessing no";;
21695                *)       gl_cv_func_isnanl_works="guessing yes";;
21696              esac
21697              ;;
21698          esac
21699
21700 else
21701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21702 /* end confdefs.h.  */
21703
21704 #include <float.h>
21705 #include <limits.h>
21706 #include <math.h>
21707 #if __GNUC__ >= 4
21708 # undef isnanl
21709 # define isnanl(x) __builtin_isnanl ((long double)(x))
21710 #elif defined isnan
21711 # undef isnanl
21712 # define isnanl(x) isnan ((long double)(x))
21713 #endif
21714 #define NWORDS \
21715   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21716 typedef union { unsigned int word[NWORDS]; long double value; }
21717         memory_long_double;
21718 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21719    runtime type conversion.  */
21720 #ifdef __sgi
21721 static long double NaNl ()
21722 {
21723   double zero = 0.0;
21724   return zero / zero;
21725 }
21726 #else
21727 # define NaNl() (0.0L / 0.0L)
21728 #endif
21729 int main ()
21730 {
21731   int result = 0;
21732
21733   if (!isnanl (NaNl ()))
21734     result |= 1;
21735
21736   {
21737     memory_long_double m;
21738     unsigned int i;
21739
21740     /* The isnanl function should be immune against changes in the sign bit and
21741        in the mantissa bits.  The xor operation twiddles a bit that can only be
21742        a sign bit or a mantissa bit (since the exponent never extends to
21743        bit 31).  */
21744     m.value = NaNl ();
21745     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21746     for (i = 0; i < NWORDS; i++)
21747       m.word[i] |= 1;
21748     if (!isnanl (m.value))
21749       result |= 1;
21750   }
21751
21752 #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
21753 /* Representation of an 80-bit 'long double' as an initializer for a sequence
21754    of 'unsigned int' words.  */
21755 # ifdef WORDS_BIGENDIAN
21756 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
21757      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
21758        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
21759        (unsigned int) (mantlo) << 16                                        \
21760      }
21761 # else
21762 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
21763      { mantlo, manthi, exponent }
21764 # endif
21765   { /* Quiet NaN.  */
21766     static memory_long_double x =
21767       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21768     if (!isnanl (x.value))
21769       result |= 2;
21770   }
21771   {
21772     /* Signalling NaN.  */
21773     static memory_long_double x =
21774       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21775     if (!isnanl (x.value))
21776       result |= 2;
21777   }
21778   /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
21779      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
21780        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
21781        Application Architecture.
21782        Table 5-2 "Floating-Point Register Encodings"
21783        Figure 5-6 "Memory to Floating-Point Register Data Translation"
21784    */
21785   { /* Pseudo-NaN.  */
21786     static memory_long_double x =
21787       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
21788     if (!isnanl (x.value))
21789       result |= 4;
21790   }
21791   { /* Pseudo-Infinity.  */
21792     static memory_long_double x =
21793       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
21794     if (!isnanl (x.value))
21795       result |= 8;
21796   }
21797   { /* Pseudo-Zero.  */
21798     static memory_long_double x =
21799       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
21800     if (!isnanl (x.value))
21801       result |= 16;
21802   }
21803   { /* Unnormalized number.  */
21804     static memory_long_double x =
21805       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
21806     if (!isnanl (x.value))
21807       result |= 32;
21808   }
21809   { /* Pseudo-Denormal.  */
21810     static memory_long_double x =
21811       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
21812     if (!isnanl (x.value))
21813       result |= 64;
21814   }
21815 #endif
21816
21817   return result;
21818 }
21819 _ACEOF
21820 if ac_fn_c_try_run "$LINENO"; then :
21821   gl_cv_func_isnanl_works=yes
21822 else
21823   gl_cv_func_isnanl_works=no
21824 fi
21825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21826   conftest.$ac_objext conftest.beam conftest.$ac_ext
21827 fi
21828
21829
21830 fi
21831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21832 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
21833
21834     case "$gl_cv_func_isnanl_works" in
21835       *yes) ;;
21836       *)    gl_func_isnanl_no_libm=no ;;
21837     esac
21838   fi
21839   if test $gl_func_isnanl_no_libm = yes; then
21840
21841 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21842
21843   fi
21844
21845   if test $gl_func_isnanl_no_libm != yes; then
21846
21847
21848
21849
21850
21851
21852
21853
21854   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21855
21856
21857
21858
21859   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
21860 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
21861 if ${gl_cv_cc_long_double_expbit0+:} false; then :
21862   printf %s "(cached) " >&6
21863 else
21864
21865       if test "$cross_compiling" = yes; then :
21866
21867                               gl_cv_cc_long_double_expbit0="unknown"
21868
21869 else
21870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21871 /* end confdefs.h.  */
21872
21873 #include <float.h>
21874 #include <stddef.h>
21875 #include <stdio.h>
21876 #include <string.h>
21877 #define NWORDS \
21878   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21879 typedef union { long double value; unsigned int word[NWORDS]; }
21880         memory_long_double;
21881 static unsigned int ored_words[NWORDS];
21882 static unsigned int anded_words[NWORDS];
21883 static void add_to_ored_words (long double x)
21884 {
21885   memory_long_double m;
21886   size_t i;
21887   /* Clear it first, in case
21888      sizeof (long double) < sizeof (memory_long_double).  */
21889   memset (&m, 0, sizeof (memory_long_double));
21890   m.value = x;
21891   for (i = 0; i < NWORDS; i++)
21892     {
21893       ored_words[i] |= m.word[i];
21894       anded_words[i] &= m.word[i];
21895     }
21896 }
21897 int main ()
21898 {
21899   size_t j;
21900   FILE *fp = fopen ("conftest.out", "w");
21901   if (fp == NULL)
21902     return 1;
21903   for (j = 0; j < NWORDS; j++)
21904     anded_words[j] = ~ (unsigned int) 0;
21905   add_to_ored_words (0.25L);
21906   add_to_ored_words (0.5L);
21907   add_to_ored_words (1.0L);
21908   add_to_ored_words (2.0L);
21909   add_to_ored_words (4.0L);
21910   /* Remove bits that are common (e.g. if representation of the first mantissa
21911      bit is explicit).  */
21912   for (j = 0; j < NWORDS; j++)
21913     ored_words[j] &= ~anded_words[j];
21914   /* Now find the nonzero word.  */
21915   for (j = 0; j < NWORDS; j++)
21916     if (ored_words[j] != 0)
21917       break;
21918   if (j < NWORDS)
21919     {
21920       size_t i;
21921       for (i = j + 1; i < NWORDS; i++)
21922         if (ored_words[i] != 0)
21923           {
21924             fprintf (fp, "unknown");
21925             return (fclose (fp) != 0);
21926           }
21927       for (i = 0; ; i++)
21928         if ((ored_words[j] >> i) & 1)
21929           {
21930             fprintf (fp, "word %d bit %d", (int) j, (int) i);
21931             return (fclose (fp) != 0);
21932           }
21933     }
21934   fprintf (fp, "unknown");
21935   return (fclose (fp) != 0);
21936 }
21937
21938 _ACEOF
21939 if ac_fn_c_try_run "$LINENO"; then :
21940   gl_cv_cc_long_double_expbit0=`cat conftest.out`
21941 else
21942   gl_cv_cc_long_double_expbit0="unknown"
21943 fi
21944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21945   conftest.$ac_objext conftest.beam conftest.$ac_ext
21946 fi
21947
21948       rm -f conftest.out
21949
21950 fi
21951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21952 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
21953   case "$gl_cv_cc_long_double_expbit0" in
21954     word*bit*)
21955       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21956       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21957
21958 cat >>confdefs.h <<_ACEOF
21959 #define LDBL_EXPBIT0_WORD $word
21960 _ACEOF
21961
21962
21963 cat >>confdefs.h <<_ACEOF
21964 #define LDBL_EXPBIT0_BIT $bit
21965 _ACEOF
21966
21967       ;;
21968   esac
21969
21970
21971
21972   fi
21973
21974
21975   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
21976 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
21977 if ${gl_cv_prog_c_ignore_unused_libraries+:} false; then :
21978   printf %s "(cached) " >&6
21979 else
21980   gl_cv_prog_c_ignore_unused_libraries=none
21981      gl_saved_ldflags=$LDFLAGS
21982      gl_saved_libs=$LIBS
21983      # Link with -lm to detect binutils 2.16 bug with --as-needed; see
21984      # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
21985      LIBS="$LIBS -lm"
21986      # Use long option sequences like '-z ignore' to test for the feature,
21987      # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
21988      # GCC + binutils likes '-Wl,--as-needed'.
21989      # GCC + Solaris ld likes '-Wl,-z,ignore'.
21990      # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
21991      # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
21992      # native cc issues annoying warnings and then ignores it,
21993      # which would cause us to incorrectly conclude that it worked.
21994      for gl_flags in  '-Wl,--as-needed' \
21995   '-Wl,-z,ignore' \
21996   '-z ignore'
21997
21998      do
21999        LDFLAGS="$gl_flags $LDFLAGS"
22000        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22001 /* end confdefs.h.  */
22002
22003 int
22004 main ()
22005 {
22006
22007   ;
22008   return 0;
22009 }
22010 _ACEOF
22011 if ac_fn_c_try_link "$LINENO"; then :
22012   gl_cv_prog_c_ignore_unused_libraries=$gl_flags
22013 fi
22014 rm -f core conftest.err conftest.$ac_objext \
22015     conftest$ac_exeext conftest.$ac_ext
22016        LDFLAGS=$gl_saved_ldflags
22017        test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
22018          break
22019      done
22020      LIBS=$gl_saved_libs
22021
22022 fi
22023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
22024 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
22025   IGNORE_UNUSED_LIBRARIES_CFLAGS=
22026   if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
22027     IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
22028   fi
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22040
22041
22042
22043   if test "$gl_threads_api" = posix; then
22044     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
22045     # pthread_rwlock_* functions.
22046     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22047 "
22048 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
22049
22050 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22051
22052 fi
22053
22054     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22055     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22056 /* end confdefs.h.  */
22057
22058       #include <pthread.h>
22059 int
22060 main ()
22061 {
22062
22063 #if __FreeBSD__ == 4
22064 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22065 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
22066        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
22067 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
22068 #else
22069 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22070 return !x;
22071 #endif
22072
22073   ;
22074   return 0;
22075 }
22076 _ACEOF
22077 if ac_fn_c_try_compile "$LINENO"; then :
22078
22079 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22080
22081 fi
22082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22083   fi
22084   :
22085
22086
22087
22088 cat >>confdefs.h <<_ACEOF
22089 #define GNULIB_LOCK 1
22090 _ACEOF
22091
22092
22093
22094
22095
22096
22097
22098
22099   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22100 printf %s "checking whether lseek detects pipes... " >&6; }
22101 if ${gl_cv_func_lseek_pipe+:} false; then :
22102   printf %s "(cached) " >&6
22103 else
22104   case "$host_os" in
22105        mingw*)
22106                                                                gl_cv_func_lseek_pipe=no
22107          ;;
22108        *)
22109          if test $cross_compiling = no; then
22110            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22111 /* end confdefs.h.  */
22112
22113 #include <sys/types.h> /* for off_t */
22114 #include <stdio.h> /* for SEEK_CUR */
22115 #if HAVE_UNISTD_H
22116 # include <unistd.h>
22117 #else /* on Windows with MSVC */
22118 # include <io.h>
22119 #endif
22120
22121 int
22122 main ()
22123 {
22124
22125   /* Exit with success only if stdin is seekable.  */
22126   return lseek (0, (off_t)0, SEEK_CUR) < 0;
22127
22128   ;
22129   return 0;
22130 }
22131 _ACEOF
22132 if ac_fn_c_try_link "$LINENO"; then :
22133   if test -s conftest$ac_exeext \
22134                  && ./conftest$ac_exeext < conftest.$ac_ext \
22135                  && test 1 = "`echo hi \
22136                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22137                 gl_cv_func_lseek_pipe=yes
22138               else
22139                 gl_cv_func_lseek_pipe=no
22140               fi
22141
22142 else
22143   gl_cv_func_lseek_pipe=no
22144 fi
22145 rm -f core conftest.err conftest.$ac_objext \
22146     conftest$ac_exeext conftest.$ac_ext
22147          else
22148            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22149 /* end confdefs.h.  */
22150
22151 #if defined __BEOS__
22152 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
22153   Choke me.
22154 #endif
22155 _ACEOF
22156 if ac_fn_c_try_compile "$LINENO"; then :
22157   gl_cv_func_lseek_pipe=yes
22158 else
22159   gl_cv_func_lseek_pipe=no
22160 fi
22161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22162          fi
22163          ;;
22164      esac
22165
22166 fi
22167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22168 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
22169   if test $gl_cv_func_lseek_pipe = no; then
22170     REPLACE_LSEEK=1
22171
22172 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22173
22174   fi
22175
22176
22177   if test $WINDOWS_64_BIT_OFF_T = 1; then
22178     REPLACE_LSEEK=1
22179   fi
22180
22181   if test $REPLACE_LSEEK = 1; then
22182
22183
22184
22185
22186
22187
22188
22189
22190   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22191
22192   fi
22193
22194
22195
22196
22197
22198           GNULIB_LSEEK=1
22199
22200
22201
22202
22203
22204 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22205
22206
22207
22208
22209
22210
22211   if test $ac_cv_func_lstat = yes; then
22212
22213     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22214       *no)
22215         REPLACE_LSTAT=1
22216         ;;
22217     esac
22218   else
22219     HAVE_LSTAT=0
22220   fi
22221
22222   if test $REPLACE_LSTAT = 1; then
22223
22224
22225
22226
22227
22228
22229
22230
22231   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22232
22233     :
22234   fi
22235
22236
22237
22238
22239
22240           GNULIB_LSTAT=1
22241
22242
22243
22244
22245
22246 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22247
22248
22249
22250
22251
22252
22253
22254       for ac_header in stdlib.h
22255 do :
22256   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22257 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22258   cat >>confdefs.h <<_ACEOF
22259 #define HAVE_STDLIB_H 1
22260 _ACEOF
22261
22262 fi
22263
22264 done
22265
22266   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22267 printf %s "checking for GNU libc compatible malloc... " >&6; }
22268 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22269   printf %s "(cached) " >&6
22270 else
22271   if test "$cross_compiling" = yes; then :
22272   case "$host_os" in
22273           # Guess yes on platforms where we know the result.
22274           *-gnu* | freebsd* | netbsd* | openbsd* \
22275           | hpux* | solaris* | cygwin* | mingw*)
22276             ac_cv_func_malloc_0_nonnull=yes ;;
22277           # If we don't know, assume the worst.
22278           *) ac_cv_func_malloc_0_nonnull=no ;;
22279         esac
22280
22281 else
22282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22283 /* end confdefs.h.  */
22284 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22285             # include <stdlib.h>
22286             #else
22287             char *malloc ();
22288             #endif
22289
22290 int
22291 main ()
22292 {
22293 return ! malloc (0);
22294   ;
22295   return 0;
22296 }
22297
22298 _ACEOF
22299 if ac_fn_c_try_run "$LINENO"; then :
22300   ac_cv_func_malloc_0_nonnull=yes
22301 else
22302   ac_cv_func_malloc_0_nonnull=no
22303 fi
22304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22305   conftest.$ac_objext conftest.beam conftest.$ac_ext
22306 fi
22307
22308
22309 fi
22310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22311 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
22312   if test $ac_cv_func_malloc_0_nonnull = yes; then :
22313
22314 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22315
22316 else
22317   printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22318
22319      REPLACE_MALLOC=1
22320
22321 fi
22322
22323
22324   if test $REPLACE_MALLOC = 1; then
22325
22326
22327
22328
22329
22330
22331
22332
22333   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22334
22335   fi
22336
22337
22338 cat >>confdefs.h <<_ACEOF
22339 #define GNULIB_MALLOC_GNU 1
22340 _ACEOF
22341
22342
22343
22344
22345
22346   if test $gl_cv_func_malloc_posix = yes; then
22347
22348 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22349
22350   else
22351     REPLACE_MALLOC=1
22352   fi
22353
22354   if test $REPLACE_MALLOC = 1; then
22355
22356
22357
22358
22359
22360
22361
22362
22363   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22364
22365   fi
22366
22367
22368
22369
22370
22371           GNULIB_MALLOC_POSIX=1
22372
22373
22374
22375
22376
22377 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392      if test $gl_cv_have_include_next = yes; then
22393        gl_cv_next_math_h='<'math.h'>'
22394      else
22395        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22396 printf %s "checking absolute name of <math.h>... " >&6; }
22397 if ${gl_cv_next_math_h+:} false; then :
22398   printf %s "(cached) " >&6
22399 else
22400
22401              if test $ac_cv_header_math_h = yes; then
22402
22403
22404                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22405 /* end confdefs.h.  */
22406 #include <math.h>
22407
22408 _ACEOF
22409                                                                                                                         case "$host_os" in
22410                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
22411                  *)    gl_absname_cpp="$ac_cpp" ;;
22412                esac
22413
22414                case "$host_os" in
22415                  mingw*)
22416                                                                                                                                      gl_dirsep_regex='[/\\]'
22417                    ;;
22418                  *)
22419                    gl_dirsep_regex='\/'
22420                    ;;
22421                esac
22422                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22423
22424                gl_header_literal_regex=`echo 'math.h' \
22425                                         | sed -e "$gl_make_literal_regex_sed"`
22426                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22427                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22428                    s|^/[^/]|//&|
22429                    p
22430                    q
22431                  }'
22432                                                             gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22433                       sed -n "$gl_absolute_header_sed"`'"'
22434           else
22435                gl_cv_next_math_h='<'math.h'>'
22436              fi
22437
22438
22439 fi
22440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22441 printf "%s\n" "$gl_cv_next_math_h" >&6; }
22442      fi
22443      NEXT_MATH_H=$gl_cv_next_math_h
22444
22445      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22446        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22447        gl_next_as_first_directive='<'math.h'>'
22448      else
22449        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22450        gl_next_as_first_directive=$gl_cv_next_math_h
22451      fi
22452      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
22453
22454
22455
22456
22457
22458   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
22459 printf %s "checking whether NAN macro works... " >&6; }
22460 if ${gl_cv_header_math_nan_works+:} false; then :
22461   printf %s "(cached) " >&6
22462 else
22463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22464 /* end confdefs.h.  */
22465 #include <math.h>
22466 int
22467 main ()
22468 {
22469 /* Solaris 10 has a broken definition of NAN.  Other platforms
22470         fail to provide NAN, or provide it only in C99 mode; this
22471         test only needs to fail when NAN is provided but wrong.  */
22472          float f = 1.0f;
22473 #ifdef NAN
22474          f = NAN;
22475 #endif
22476          return f == 0;
22477   ;
22478   return 0;
22479 }
22480 _ACEOF
22481 if ac_fn_c_try_compile "$LINENO"; then :
22482   gl_cv_header_math_nan_works=yes
22483 else
22484   gl_cv_header_math_nan_works=no
22485 fi
22486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22487 fi
22488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
22489 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
22490   if test $gl_cv_header_math_nan_works = no; then
22491     REPLACE_NAN=1
22492   fi
22493   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
22494 printf %s "checking whether HUGE_VAL works... " >&6; }
22495 if ${gl_cv_header_math_huge_val_works+:} false; then :
22496   printf %s "(cached) " >&6
22497 else
22498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22499 /* end confdefs.h.  */
22500 #include <math.h>
22501 int
22502 main ()
22503 {
22504 /* Solaris 10 has a broken definition of HUGE_VAL.  */
22505          double d = HUGE_VAL;
22506          return d == 0;
22507   ;
22508   return 0;
22509 }
22510 _ACEOF
22511 if ac_fn_c_try_compile "$LINENO"; then :
22512   gl_cv_header_math_huge_val_works=yes
22513 else
22514   gl_cv_header_math_huge_val_works=no
22515 fi
22516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22517 fi
22518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
22519 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
22520   if test $gl_cv_header_math_huge_val_works = no; then
22521     REPLACE_HUGE_VAL=1
22522   fi
22523
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      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22541 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
22542 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22543   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22598 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22599
22600
22601
22602
22603      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22604 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
22605 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22606   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22665 printf "%s\n" "$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      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22716 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22717 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22718   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22787 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22788
22789
22790
22791
22792      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22793 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
22794 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22795   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22852 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22853
22854
22855
22856
22857
22858
22859   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22860 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
22861 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22862   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22990 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
22991
22992
22993
22994
22995      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22996 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
22997 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
22998   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23052 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23053
23054       case "$gl_cv_func_mbrtowc_null_arg1" in
23055         *yes) ;;
23056         *)
23057 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23135 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
23136 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23137   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23192 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23193
23194
23195
23196
23197      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23198 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
23199 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23200   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23259 printf "%s\n" "$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 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23533 printf %s "checking whether open recognizes a trailing slash... " >&6; }
23534 if ${gl_cv_func_open_slash+:} false; then :
23535   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23584 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
23585       case "$gl_cv_func_open_slash" in
23586         *no)
23587
23588 printf "%s\n" "#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   fi
23627
23628
23629
23630
23631
23632           GNULIB_OPEN=1
23633
23634
23635
23636
23637
23638 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
23639
23640
23641
23642
23643
23644
23645
23646
23647   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
23648   yes+*yes)
23649     ;;
23650   yes+*)
23651     # Solaris 9 has *at functions, but uniformly mishandles trailing
23652     # slash in all of them.
23653     REPLACE_OPENAT=1
23654     ;;
23655   *)
23656     HAVE_OPENAT=0
23657     ;;
23658   esac
23659
23660   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
23661
23662
23663
23664
23665
23666
23667
23668
23669   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23670
23671
23672
23673   :
23674
23675   fi
23676
23677
23678 cat >>confdefs.h <<_ACEOF
23679 #define GNULIB_OPENAT 1
23680 _ACEOF
23681
23682
23683
23684
23685
23686
23687           GNULIB_OPENAT=1
23688
23689
23690
23691
23692
23693 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
23694
23695
23696
23697
23698
23699
23700   for ac_func in opendir
23701 do :
23702   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
23703 if test "x$ac_cv_func_opendir" = xyes; then :
23704   cat >>confdefs.h <<_ACEOF
23705 #define HAVE_OPENDIR 1
23706 _ACEOF
23707
23708 fi
23709 done
23710
23711   if test $ac_cv_func_opendir = no; then
23712     HAVE_OPENDIR=0
23713   fi
23714
23715
23716
23717
23718   if test $ac_cv_func_fchdir = no; then
23719     HAVE_FCHDIR=0
23720   fi
23721
23722     if test $HAVE_FCHDIR = 0; then
23723       if test $HAVE_OPENDIR = 1; then
23724         REPLACE_OPENDIR=1
23725       fi
23726     fi
23727
23728
23729   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
23730
23731
23732
23733
23734
23735
23736
23737
23738   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
23739
23740   fi
23741
23742
23743
23744
23745
23746           GNULIB_OPENDIR=1
23747
23748
23749
23750
23751
23752 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764           if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
23765             REPLACE_PERROR=1
23766   fi
23767   case ${gl_cv_func_strerror_r_works-unset} in
23768     unset|*yes)
23769       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
23770 printf %s "checking whether perror matches strerror... " >&6; }
23771 if ${gl_cv_func_perror_works+:} false; then :
23772   printf %s "(cached) " >&6
23773 else
23774   if test "$cross_compiling" = yes; then :
23775               gl_cv_func_perror_works="guessing no"
23776
23777 else
23778   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23779 /* end confdefs.h.  */
23780 #include <errno.h>
23781                 #include <stdio.h>
23782                 #include <stdlib.h>
23783                 #include <string.h>
23784
23785 int
23786 main ()
23787 {
23788 char *str = strerror (-1);
23789                 if (!getenv("CONFTEST_OUTPUT")) return 0;
23790                 if (!str) str = "";
23791                 puts (str);
23792                 errno = -1;
23793                 perror ("");
23794                 return 0;
23795
23796   ;
23797   return 0;
23798 }
23799 _ACEOF
23800 if ac_fn_c_try_run "$LINENO"; then :
23801   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
23802                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
23803               gl_cv_func_perror_works=yes
23804             else
23805               gl_cv_func_perror_works=no
23806             fi
23807             rm -rf conftest.txt1 conftest.txt2
23808 else
23809   gl_cv_func_perror_works=no
23810 fi
23811 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23812   conftest.$ac_objext conftest.beam conftest.$ac_ext
23813 fi
23814
23815
23816 fi
23817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
23818 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
23819       if test "$gl_cv_func_perror_works" != yes; then
23820         REPLACE_PERROR=1
23821       fi
23822       ;;
23823     *)
23824                   REPLACE_PERROR=1
23825       ;;
23826   esac
23827
23828   if test $REPLACE_PERROR = 1; then
23829
23830
23831
23832
23833
23834
23835
23836
23837   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
23838
23839   fi
23840
23841
23842
23843
23844
23845           GNULIB_PERROR=1
23846
23847
23848
23849
23850
23851 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
23852
23853
23854
23855
23856
23857   if test $gl_cv_func_frexp_no_libm = yes; then
23858
23859
23860
23861   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23862 printf %s "checking whether frexp works... " >&6; }
23863 if ${gl_cv_func_frexp_works+:} false; then :
23864   printf %s "(cached) " >&6
23865 else
23866
23867       if test "$cross_compiling" = yes; then :
23868   case "$host_os" in
23869            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
23870            *)                        gl_cv_func_frexp_works="guessing yes";;
23871          esac
23872
23873 else
23874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23875 /* end confdefs.h.  */
23876
23877 #include <float.h>
23878 #include <math.h>
23879 #include <string.h>
23880 #if HAVE_DECL_ALARM
23881 # include <signal.h>
23882 # include <unistd.h>
23883 #endif
23884 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23885    ICC 10.0 has a bug when optimizing the expression -zero.
23886    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23887    to PowerPC on Mac OS X 10.5.  */
23888 #if defined __hpux || defined __sgi || defined __ICC
23889 static double
23890 compute_minus_zero (void)
23891 {
23892   return -DBL_MIN * DBL_MIN;
23893 }
23894 # define minus_zero compute_minus_zero ()
23895 #else
23896 double minus_zero = -0.0;
23897 #endif
23898 int main()
23899 {
23900   int result = 0;
23901   int i;
23902   volatile double x;
23903   double zero = 0.0;
23904 #if HAVE_DECL_ALARM
23905   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23906      number.  Let the test fail in this case.  */
23907   signal (SIGALRM, SIG_DFL);
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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23953 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
23954
23955     case "$gl_cv_func_frexp_works" in
23956       *yes)
23957
23958 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23959
23960         ;;
23961     esac
23962   fi
23963
23964   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23965 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
23966 if ${gl_cv_func_ldexp_no_libm+:} false; then :
23967   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23993 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
23994   if test $gl_cv_func_ldexp_no_libm = yes; then
23995
23996 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
23997
23998   fi
23999
24000
24001
24002
24003
24004
24005   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
24006 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
24007 if ${gl_cv_func_frexpl_no_libm+:} false; then :
24008   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
24033 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
24034
24035   if test $gl_cv_func_frexpl_no_libm = yes; then
24036
24037
24038      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
24039 printf %s "checking whether frexpl works... " >&6; }
24040 if ${gl_cv_func_frexpl_works+:} false; then :
24041   printf %s "(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 Mac OS 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 Mac OS 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
24161 printf "%s\n" "$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 printf "%s\n" "#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   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
24187 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
24188 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
24189   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
24214 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
24215
24216   if test $gl_cv_func_ldexpl_no_libm = yes; then
24217
24218
24219      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
24220 printf %s "checking whether ldexpl works... " >&6; }
24221 if ${gl_cv_func_ldexpl_works+:} false; then :
24222   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
24272 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
24273
24274     case "$gl_cv_func_ldexpl_works" in
24275       *yes)
24276
24277 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#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   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
24395 printf %s "checking for GNU libc compatible realloc... " >&6; }
24396 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
24397   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
24439 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
24440   if test $ac_cv_func_realloc_0_nonnull = yes; then :
24441
24442 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
24443
24444 else
24445   printf "%s\n" "#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 printf "%s\n" "#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 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24506
24507
24508
24509
24510
24511
24512
24513   :
24514
24515
24516
24517      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24518 printf %s "checking for signbit macro... " >&6; }
24519 if ${gl_cv_func_signbit+:} false; then :
24520   printf %s "(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 Mac OS 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24634 printf "%s\n" "$gl_cv_func_signbit" >&6; }
24635           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24636 printf %s "checking for signbit compiler built-ins... " >&6; }
24637 if ${gl_cv_func_signbit_gcc+:} false; then :
24638   printf %s "(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 Mac OS 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24749 printf "%s\n" "$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   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24762 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
24763 if ${gl_cv_cc_float_signbit+:} false; then :
24764   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24844 printf "%s\n" "$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   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24866 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
24867 if ${gl_cv_cc_double_signbit+:} false; then :
24868   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24948 printf "%s\n" "$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   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24970 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
24971 if ${gl_cv_cc_long_double_signbit+:} false; then :
24972   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
25052 printf "%s\n" "$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                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
25086 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
25087 if ${gl_cv_func_copysignf_no_libm+:} false; then :
25088   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25113 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
25114               if test $gl_cv_func_copysignf_no_libm = yes; then
25115
25116 printf "%s\n" "#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                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25136 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
25137 if ${gl_cv_func_copysign_no_libm+:} false; then :
25138   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25163 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
25164               if test $gl_cv_func_copysign_no_libm = yes; then
25165
25166 printf "%s\n" "#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                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25186 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
25187 if ${gl_cv_func_copysignl_no_libm+:} false; then :
25188   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25213 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
25214               if test $gl_cv_func_copysignl_no_libm = yes; then
25215
25216 printf "%s\n" "#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 printf "%s\n" "#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     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25287 printf %s "checking for SIZE_MAX... " >&6; }
25288 if ${gl_cv_size_max+:} false; then :
25289   printf %s "(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 -rf 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25358 printf "%s\n" "$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   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25370 printf %s "checking for ssize_t... " >&6; }
25371 if ${gt_cv_ssize_t+:} false; then :
25372   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25394 printf "%s\n" "$gt_cv_ssize_t" >&6; }
25395   if test $gt_cv_ssize_t = no; then
25396
25397 printf "%s\n" "#define ssize_t int" >>confdefs.h
25398
25399   fi
25400
25401
25402
25403
25404     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25405 printf %s "checking whether stat handles trailing slashes on directories... " >&6; }
25406 if ${gl_cv_func_stat_dir_slash+:} false; then :
25407   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25438 printf "%s\n" "$gl_cv_func_stat_dir_slash" >&6; }
25439         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25440 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
25441 if ${gl_cv_func_stat_file_slash+:} false; then :
25442   printf %s "(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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25491 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
25492   case $gl_cv_func_stat_dir_slash in
25493     *no) REPLACE_STAT=1
25494
25495 printf "%s\n" "#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 printf "%s\n" "#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   fi
25518
25519
25520
25521
25522
25523           GNULIB_STAT=1
25524
25525
25526
25527
25528
25529 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
25530
25531
25532
25533
25534
25535
25536
25537   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>
25538      #include <sys/stat.h>
25539 "
25540 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
25541
25542 cat >>confdefs.h <<_ACEOF
25543 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25544 _ACEOF
25545
25546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25547 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25548 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
25549   printf %s "(cached) " >&6
25550 else
25551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25552 /* end confdefs.h.  */
25553
25554             #include <sys/types.h>
25555             #include <sys/stat.h>
25556             #if HAVE_SYS_TIME_H
25557             # include <sys/time.h>
25558             #endif
25559             #include <time.h>
25560             struct timespec ts;
25561             struct stat st;
25562
25563 int
25564 main ()
25565 {
25566
25567             st.st_atim = ts;
25568
25569   ;
25570   return 0;
25571 }
25572 _ACEOF
25573 if ac_fn_c_try_compile "$LINENO"; then :
25574   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25575 else
25576   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25577 fi
25578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25579 fi
25580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25581 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25582      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25583
25584 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25585
25586      fi
25587 else
25588   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>
25589         #include <sys/stat.h>
25590 "
25591 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
25592
25593 cat >>confdefs.h <<_ACEOF
25594 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25595 _ACEOF
25596
25597
25598 else
25599   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25600            #include <sys/stat.h>
25601 "
25602 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
25603
25604 cat >>confdefs.h <<_ACEOF
25605 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25606 _ACEOF
25607
25608
25609 else
25610   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>
25611               #include <sys/stat.h>
25612 "
25613 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
25614
25615 cat >>confdefs.h <<_ACEOF
25616 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25617 _ACEOF
25618
25619
25620 fi
25621
25622 fi
25623
25624 fi
25625
25626 fi
25627
25628
25629
25630
25631
25632   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>
25633      #include <sys/stat.h>
25634 "
25635 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
25636
25637 cat >>confdefs.h <<_ACEOF
25638 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25639 _ACEOF
25640
25641
25642 else
25643   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25644         #include <sys/stat.h>
25645 "
25646 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
25647
25648 cat >>confdefs.h <<_ACEOF
25649 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25650 _ACEOF
25651
25652
25653 else
25654   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>
25655           #include <sys/stat.h>
25656 "
25657 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
25658
25659 cat >>confdefs.h <<_ACEOF
25660 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25661 _ACEOF
25662
25663
25664 fi
25665
25666 fi
25667
25668 fi
25669
25670
25671
25672
25673
25674   # Define two additional variables used in the Makefile substitution.
25675
25676   if test "$ac_cv_header_stdbool_h" = yes; then
25677     STDBOOL_H=''
25678   else
25679     STDBOOL_H='stdbool.h'
25680   fi
25681
25682    if test -n "$STDBOOL_H"; then
25683   GL_GENERATE_STDBOOL_H_TRUE=
25684   GL_GENERATE_STDBOOL_H_FALSE='#'
25685 else
25686   GL_GENERATE_STDBOOL_H_TRUE='#'
25687   GL_GENERATE_STDBOOL_H_FALSE=
25688 fi
25689
25690
25691   if test "$ac_cv_type__Bool" = yes; then
25692     HAVE__BOOL=1
25693   else
25694     HAVE__BOOL=0
25695   fi
25696
25697
25698
25699
25700
25701   STDDEF_H=
25702   if test $gt_cv_c_wchar_t = no; then
25703     HAVE_WCHAR_T=0
25704     STDDEF_H=stddef.h
25705   fi
25706   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25707 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
25708 if ${gl_cv_decl_null_works+:} false; then :
25709   printf %s "(cached) " >&6
25710 else
25711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25712 /* end confdefs.h.  */
25713 #include <stddef.h>
25714       int test[2 * (sizeof NULL == sizeof (void *)) -1];
25715
25716 int
25717 main ()
25718 {
25719
25720   ;
25721   return 0;
25722 }
25723 _ACEOF
25724 if ac_fn_c_try_compile "$LINENO"; then :
25725   gl_cv_decl_null_works=yes
25726 else
25727   gl_cv_decl_null_works=no
25728 fi
25729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25730 fi
25731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25732 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
25733   if test $gl_cv_decl_null_works = no; then
25734     REPLACE_NULL=1
25735     STDDEF_H=stddef.h
25736   fi
25737
25738    if test -n "$STDDEF_H"; then
25739   GL_GENERATE_STDDEF_H_TRUE=
25740   GL_GENERATE_STDDEF_H_FALSE='#'
25741 else
25742   GL_GENERATE_STDDEF_H_TRUE='#'
25743   GL_GENERATE_STDDEF_H_FALSE=
25744 fi
25745
25746   if test -n "$STDDEF_H"; then
25747
25748
25749
25750
25751
25752
25753
25754
25755      if test $gl_cv_have_include_next = yes; then
25756        gl_cv_next_stddef_h='<'stddef.h'>'
25757      else
25758        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25759 printf %s "checking absolute name of <stddef.h>... " >&6; }
25760 if ${gl_cv_next_stddef_h+:} false; then :
25761   printf %s "(cached) " >&6
25762 else
25763
25764                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25765 /* end confdefs.h.  */
25766 #include <stddef.h>
25767
25768 _ACEOF
25769                                                                                                                         case "$host_os" in
25770                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25771                  *)    gl_absname_cpp="$ac_cpp" ;;
25772                esac
25773
25774                case "$host_os" in
25775                  mingw*)
25776                                                                                                                                      gl_dirsep_regex='[/\\]'
25777                    ;;
25778                  *)
25779                    gl_dirsep_regex='\/'
25780                    ;;
25781                esac
25782                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25783
25784                gl_header_literal_regex=`echo 'stddef.h' \
25785                                         | sed -e "$gl_make_literal_regex_sed"`
25786                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25787                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25788                    s|^/[^/]|//&|
25789                    p
25790                    q
25791                  }'
25792                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25793                       sed -n "$gl_absolute_header_sed"`'"'
25794
25795
25796 fi
25797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25798 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
25799      fi
25800      NEXT_STDDEF_H=$gl_cv_next_stddef_h
25801
25802      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25803        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25804        gl_next_as_first_directive='<'stddef.h'>'
25805      else
25806        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25807        gl_next_as_first_directive=$gl_cv_next_stddef_h
25808      fi
25809      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25810
25811
25812
25813
25814   fi
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827      if test $gl_cv_have_include_next = yes; then
25828        gl_cv_next_stdio_h='<'stdio.h'>'
25829      else
25830        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25831 printf %s "checking absolute name of <stdio.h>... " >&6; }
25832 if ${gl_cv_next_stdio_h+:} false; then :
25833   printf %s "(cached) " >&6
25834 else
25835
25836                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25837 /* end confdefs.h.  */
25838 #include <stdio.h>
25839
25840 _ACEOF
25841                                                                                                                         case "$host_os" in
25842                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25843                  *)    gl_absname_cpp="$ac_cpp" ;;
25844                esac
25845
25846                case "$host_os" in
25847                  mingw*)
25848                                                                                                                                      gl_dirsep_regex='[/\\]'
25849                    ;;
25850                  *)
25851                    gl_dirsep_regex='\/'
25852                    ;;
25853                esac
25854                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25855
25856                gl_header_literal_regex=`echo 'stdio.h' \
25857                                         | sed -e "$gl_make_literal_regex_sed"`
25858                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25859                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25860                    s|^/[^/]|//&|
25861                    p
25862                    q
25863                  }'
25864                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25865                       sed -n "$gl_absolute_header_sed"`'"'
25866
25867
25868 fi
25869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25870 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
25871      fi
25872      NEXT_STDIO_H=$gl_cv_next_stdio_h
25873
25874      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25875        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25876        gl_next_as_first_directive='<'stdio.h'>'
25877      else
25878        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25879        gl_next_as_first_directive=$gl_cv_next_stdio_h
25880      fi
25881      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25882
25883
25884
25885
25886
25887       GNULIB_FSCANF=1
25888
25889
25890 cat >>confdefs.h <<_ACEOF
25891 #define GNULIB_FSCANF 1
25892 _ACEOF
25893
25894
25895   GNULIB_SCANF=1
25896
25897
25898 cat >>confdefs.h <<_ACEOF
25899 #define GNULIB_SCANF 1
25900 _ACEOF
25901
25902
25903   GNULIB_FGETC=1
25904   GNULIB_GETC=1
25905   GNULIB_GETCHAR=1
25906   GNULIB_FGETS=1
25907   GNULIB_FREAD=1
25908
25909
25910       GNULIB_FPRINTF=1
25911   GNULIB_PRINTF=1
25912   GNULIB_VFPRINTF=1
25913   GNULIB_VPRINTF=1
25914   GNULIB_FPUTC=1
25915   GNULIB_PUTC=1
25916   GNULIB_PUTCHAR=1
25917   GNULIB_FPUTS=1
25918   GNULIB_PUTS=1
25919   GNULIB_FWRITE=1
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935      if test $gl_cv_have_include_next = yes; then
25936        gl_cv_next_stdlib_h='<'stdlib.h'>'
25937      else
25938        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25939 printf %s "checking absolute name of <stdlib.h>... " >&6; }
25940 if ${gl_cv_next_stdlib_h+:} false; then :
25941   printf %s "(cached) " >&6
25942 else
25943
25944                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25945 /* end confdefs.h.  */
25946 #include <stdlib.h>
25947
25948 _ACEOF
25949                                                                                                                         case "$host_os" in
25950                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25951                  *)    gl_absname_cpp="$ac_cpp" ;;
25952                esac
25953
25954                case "$host_os" in
25955                  mingw*)
25956                                                                                                                                      gl_dirsep_regex='[/\\]'
25957                    ;;
25958                  *)
25959                    gl_dirsep_regex='\/'
25960                    ;;
25961                esac
25962                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25963
25964                gl_header_literal_regex=`echo 'stdlib.h' \
25965                                         | sed -e "$gl_make_literal_regex_sed"`
25966                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25967                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25968                    s|^/[^/]|//&|
25969                    p
25970                    q
25971                  }'
25972                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25973                       sed -n "$gl_absolute_header_sed"`'"'
25974
25975
25976 fi
25977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25978 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
25979      fi
25980      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25981
25982      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25983        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25984        gl_next_as_first_directive='<'stdlib.h'>'
25985      else
25986        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25987        gl_next_as_first_directive=$gl_cv_next_stdlib_h
25988      fi
25989      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001   if test $ac_cv_func_strdup = yes; then
26002     if test $gl_cv_func_malloc_posix != yes; then
26003       REPLACE_STRDUP=1
26004     fi
26005   fi
26006
26007   if test $ac_cv_have_decl_strdup = no; then
26008     HAVE_DECL_STRDUP=0
26009   fi
26010
26011   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26012
26013
26014
26015
26016
26017
26018
26019
26020   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26021
26022     :
26023   fi
26024
26025
26026
26027
26028
26029           GNULIB_STRDUP=1
26030
26031
26032
26033
26034
26035 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26047     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26048 printf %s "checking for working strerror function... " >&6; }
26049 if ${gl_cv_func_working_strerror+:} false; then :
26050   printf %s "(cached) " >&6
26051 else
26052   if test "$cross_compiling" = yes; then :
26053   case "$host_os" in
26054                    # Guess yes on glibc systems.
26055            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26056                    # If we don't know, assume the worst.
26057            *)      gl_cv_func_working_strerror="guessing no" ;;
26058          esac
26059
26060 else
26061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26062 /* end confdefs.h.  */
26063 #include <string.h>
26064
26065 int
26066 main ()
26067 {
26068 if (!*strerror (-2)) return 1;
26069   ;
26070   return 0;
26071 }
26072 _ACEOF
26073 if ac_fn_c_try_run "$LINENO"; then :
26074   gl_cv_func_working_strerror=yes
26075 else
26076   gl_cv_func_working_strerror=no
26077 fi
26078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26079   conftest.$ac_objext conftest.beam conftest.$ac_ext
26080 fi
26081
26082
26083 fi
26084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26085 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
26086     case "$gl_cv_func_working_strerror" in
26087       *yes) ;;
26088       *)
26089                         REPLACE_STRERROR=1
26090         ;;
26091     esac
26092
26093                   case "$gl_cv_func_strerror_r_works" in
26094         *no) REPLACE_STRERROR=1 ;;
26095       esac
26096
26097   else
26098             REPLACE_STRERROR=1
26099   fi
26100
26101   if test $REPLACE_STRERROR = 1; then
26102
26103
26104
26105
26106
26107
26108
26109
26110   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26111
26112   fi
26113
26114
26115 cat >>confdefs.h <<_ACEOF
26116 #define GNULIB_STRERROR 1
26117 _ACEOF
26118
26119
26120
26121
26122
26123
26124
26125           GNULIB_STRERROR=1
26126
26127
26128
26129
26130
26131 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26132
26133
26134
26135
26136
26137   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26138
26139
26140
26141
26142
26143
26144
26145
26146   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26147
26148
26149
26150
26151
26152   if test $ac_cv_header_sys_socket_h != yes; then
26153                     for ac_header in winsock2.h
26154 do :
26155   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26156 if test "x$ac_cv_header_winsock2_h" = xyes; then :
26157   cat >>confdefs.h <<_ACEOF
26158 #define HAVE_WINSOCK2_H 1
26159 _ACEOF
26160
26161 fi
26162
26163 done
26164
26165   fi
26166   if test "$ac_cv_header_winsock2_h" = yes; then
26167     HAVE_WINSOCK2_H=1
26168     UNISTD_H_HAVE_WINSOCK2_H=1
26169     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26170   else
26171     HAVE_WINSOCK2_H=0
26172   fi
26173
26174
26175   fi
26176
26177
26178
26179
26180
26181
26182
26183   if test $ac_cv_have_decl_strerror_r = no; then
26184     HAVE_DECL_STRERROR_R=0
26185   fi
26186
26187   if test $ac_cv_func_strerror_r = yes; then
26188     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26189       if test $gl_cv_func_strerror_r_posix_signature = yes; then
26190         case "$gl_cv_func_strerror_r_works" in
26191                     *no) REPLACE_STRERROR_R=1 ;;
26192         esac
26193       else
26194                 REPLACE_STRERROR_R=1
26195       fi
26196     else
26197                   REPLACE_STRERROR_R=1
26198     fi
26199   fi
26200
26201   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26202
26203
26204
26205
26206
26207
26208
26209
26210   gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26211
26212
26213
26214
26215
26216
26217   fi
26218
26219
26220
26221
26222
26223           GNULIB_STRERROR_R=1
26224
26225
26226
26227
26228
26229 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250      if test $gl_cv_have_include_next = yes; then
26251        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26252      else
26253        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26254 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
26255 if ${gl_cv_next_sys_stat_h+:} false; then :
26256   printf %s "(cached) " >&6
26257 else
26258
26259              if test $ac_cv_header_sys_stat_h = yes; then
26260
26261
26262                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26263 /* end confdefs.h.  */
26264 #include <sys/stat.h>
26265
26266 _ACEOF
26267                                                                                                                         case "$host_os" in
26268                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26269                  *)    gl_absname_cpp="$ac_cpp" ;;
26270                esac
26271
26272                case "$host_os" in
26273                  mingw*)
26274                                                                                                                                      gl_dirsep_regex='[/\\]'
26275                    ;;
26276                  *)
26277                    gl_dirsep_regex='\/'
26278                    ;;
26279                esac
26280                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26281
26282                gl_header_literal_regex=`echo 'sys/stat.h' \
26283                                         | sed -e "$gl_make_literal_regex_sed"`
26284                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26285                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26286                    s|^/[^/]|//&|
26287                    p
26288                    q
26289                  }'
26290                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26291                       sed -n "$gl_absolute_header_sed"`'"'
26292           else
26293                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26294              fi
26295
26296
26297 fi
26298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26299 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
26300      fi
26301      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26302
26303      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26304        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26305        gl_next_as_first_directive='<'sys/stat.h'>'
26306      else
26307        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26308        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26309      fi
26310      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26323
26324 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26325
26326   fi
26327
26328       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26329      #include <sys/stat.h>
26330 "
26331 if test "x$ac_cv_type_nlink_t" = xyes; then :
26332
26333 else
26334
26335 printf "%s\n" "#define nlink_t int" >>confdefs.h
26336
26337 fi
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356   :
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369      if test $gl_cv_have_include_next = yes; then
26370        gl_cv_next_unistd_h='<'unistd.h'>'
26371      else
26372        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26373 printf %s "checking absolute name of <unistd.h>... " >&6; }
26374 if ${gl_cv_next_unistd_h+:} false; then :
26375   printf %s "(cached) " >&6
26376 else
26377
26378              if test $ac_cv_header_unistd_h = yes; then
26379
26380
26381                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26382 /* end confdefs.h.  */
26383 #include <unistd.h>
26384
26385 _ACEOF
26386                                                                                                                         case "$host_os" in
26387                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26388                  *)    gl_absname_cpp="$ac_cpp" ;;
26389                esac
26390
26391                case "$host_os" in
26392                  mingw*)
26393                                                                                                                                      gl_dirsep_regex='[/\\]'
26394                    ;;
26395                  *)
26396                    gl_dirsep_regex='\/'
26397                    ;;
26398                esac
26399                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26400
26401                gl_header_literal_regex=`echo 'unistd.h' \
26402                                         | sed -e "$gl_make_literal_regex_sed"`
26403                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26404                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26405                    s|^/[^/]|//&|
26406                    p
26407                    q
26408                  }'
26409                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26410                       sed -n "$gl_absolute_header_sed"`'"'
26411           else
26412                gl_cv_next_unistd_h='<'unistd.h'>'
26413              fi
26414
26415
26416 fi
26417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26418 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
26419      fi
26420      NEXT_UNISTD_H=$gl_cv_next_unistd_h
26421
26422      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26423        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26424        gl_next_as_first_directive='<'unistd.h'>'
26425      else
26426        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26427        gl_next_as_first_directive=$gl_cv_next_unistd_h
26428      fi
26429      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26430
26431
26432
26433
26434   if test $ac_cv_header_unistd_h = yes; then
26435     HAVE_UNISTD_H=1
26436   else
26437     HAVE_UNISTD_H=0
26438   fi
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26457                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26458 printf %s "checking whether futimesat handles NULL file... " >&6; }
26459 if ${gl_cv_func_futimesat_works+:} false; then :
26460   printf %s "(cached) " >&6
26461 else
26462   touch conftest.file
26463        if test "$cross_compiling" = yes; then :
26464   case "$host_os" in
26465                    # Guess yes on glibc systems.
26466            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26467                    # If we don't know, assume the worst.
26468            *)      gl_cv_func_futimesat_works="guessing no" ;;
26469          esac
26470
26471 else
26472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26473 /* end confdefs.h.  */
26474
26475 #include <stddef.h>
26476 #include <sys/times.h>
26477 #include <fcntl.h>
26478
26479 int
26480 main ()
26481 {
26482     int fd = open ("conftest.file", O_RDWR);
26483           if (fd < 0) return 1;
26484           if (futimesat (fd, NULL, NULL)) return 2;
26485
26486   ;
26487   return 0;
26488 }
26489 _ACEOF
26490 if ac_fn_c_try_run "$LINENO"; then :
26491   gl_cv_func_futimesat_works=yes
26492 else
26493   gl_cv_func_futimesat_works=no
26494 fi
26495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26496   conftest.$ac_objext conftest.beam conftest.$ac_ext
26497 fi
26498
26499       rm -f conftest.file
26500 fi
26501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26502 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
26503     case "$gl_cv_func_futimesat_works" in
26504       *yes) ;;
26505       *)
26506
26507 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26508
26509         ;;
26510     esac
26511   fi
26512
26513
26514
26515   if test $ac_cv_func_vasnprintf = no; then
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26557
26558   if test $ac_cv_func_vasnprintf = yes; then
26559
26560 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26561
26562   fi
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26575 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26576
26577 else
26578
26579 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
26580
26581
26582 fi
26583
26584
26585
26586
26587
26588
26589
26590   fi
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607   gl_cv_func_vfprintf_posix=no
26608   case "$gl_cv_func_printf_sizes_c99" in
26609     *yes)
26610       case "$gl_cv_func_printf_long_double" in
26611         *yes)
26612           case "$gl_cv_func_printf_infinite" in
26613             *yes)
26614               case "$gl_cv_func_printf_infinite_long_double" in
26615                 *yes)
26616                   case "$gl_cv_func_printf_directive_a" in
26617                     *yes)
26618                       case "$gl_cv_func_printf_directive_f" in
26619                         *yes)
26620                           case "$gl_cv_func_printf_directive_n" in
26621                             *yes)
26622                               case "$gl_cv_func_printf_directive_ls" in
26623                                 *yes)
26624                                   case "$gl_cv_func_printf_positions" in
26625                                     *yes)
26626                                       case "$gl_cv_func_printf_flag_grouping" in
26627                                         *yes)
26628                                           case "$gl_cv_func_printf_flag_leftadjust" in
26629                                             *yes)
26630                                               case "$gl_cv_func_printf_flag_zero" in
26631                                                 *yes)
26632                                                   case "$gl_cv_func_printf_precision" in
26633                                                     *yes)
26634                                                       case "$gl_cv_func_printf_enomem" in
26635                                                         *yes)
26636                                                           # vfprintf exists and is
26637                                                           # already POSIX compliant.
26638                                                           gl_cv_func_vfprintf_posix=yes
26639                                                           ;;
26640                                                       esac
26641                                                       ;;
26642                                                   esac
26643                                                   ;;
26644                                               esac
26645                                               ;;
26646                                           esac
26647                                           ;;
26648                                       esac
26649                                       ;;
26650                                   esac
26651                                   ;;
26652                               esac
26653                               ;;
26654                           esac
26655                           ;;
26656                       esac
26657                       ;;
26658                   esac
26659                   ;;
26660               esac
26661               ;;
26662           esac
26663           ;;
26664       esac
26665       ;;
26666   esac
26667   if test $gl_cv_func_vfprintf_posix = no; then
26668
26669
26670
26671   case "$gl_cv_func_printf_infinite" in
26672     *yes)
26673       ;;
26674     *)
26675
26676 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
26677
26678       ;;
26679   esac
26680
26681
26682
26683
26684   case "$gl_cv_func_printf_long_double" in
26685     *yes)
26686       case "$gl_cv_func_printf_infinite_long_double" in
26687         *yes)
26688           ;;
26689         *)
26690
26691 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
26692
26693           ;;
26694       esac
26695       ;;
26696   esac
26697
26698
26699
26700   case "$gl_cv_func_printf_directive_a" in
26701     *yes)
26702       ;;
26703     *)
26704
26705 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
26706
26707       for ac_func in nl_langinfo
26708 do :
26709   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
26710 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
26711   cat >>confdefs.h <<_ACEOF
26712 #define HAVE_NL_LANGINFO 1
26713 _ACEOF
26714
26715 fi
26716 done
26717
26718       ;;
26719   esac
26720
26721
26722
26723   case "$gl_cv_func_printf_directive_f" in
26724     *yes)
26725       ;;
26726     *)
26727
26728 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
26729
26730       ;;
26731   esac
26732
26733
26734
26735   case "$gl_cv_func_printf_directive_ls" in
26736     *yes)
26737       ;;
26738     *)
26739
26740 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
26741
26742       ;;
26743   esac
26744
26745
26746
26747   case "$gl_cv_func_printf_flag_grouping" in
26748     *yes)
26749       ;;
26750     *)
26751
26752 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
26753
26754       ;;
26755   esac
26756
26757
26758
26759   case "$gl_cv_func_printf_flag_leftadjust" in
26760     *yes)
26761       ;;
26762     *)
26763
26764 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
26765
26766       ;;
26767   esac
26768
26769
26770
26771   case "$gl_cv_func_printf_flag_zero" in
26772     *yes)
26773       ;;
26774     *)
26775
26776 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
26777
26778       ;;
26779   esac
26780
26781
26782
26783   case "$gl_cv_func_printf_precision" in
26784     *yes)
26785       ;;
26786     *)
26787
26788 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
26789
26790
26791 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
26792
26793
26794 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
26795
26796       ;;
26797   esac
26798
26799
26800
26801   case "$gl_cv_func_printf_enomem" in
26802     *yes)
26803       ;;
26804     *)
26805
26806 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
26807
26808
26809 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
26810
26811
26812 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
26813
26814       ;;
26815   esac
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26858
26859   if test $ac_cv_func_vasnprintf = yes; then
26860
26861 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26862
26863   fi
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26876 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26877
26878 else
26879
26880 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
26881
26882
26883 fi
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
26902
26903   REPLACE_VFPRINTF=1
26904
26905 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
26906
26907   :
26908
26909   fi
26910
26911
26912
26913
26914
26915
26916           GNULIB_VFPRINTF_POSIX=1
26917
26918
26919
26920
26921
26922 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938      if test $gl_cv_have_include_next = yes; then
26939        gl_cv_next_wchar_h='<'wchar.h'>'
26940      else
26941        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
26942 printf %s "checking absolute name of <wchar.h>... " >&6; }
26943 if ${gl_cv_next_wchar_h+:} false; then :
26944   printf %s "(cached) " >&6
26945 else
26946
26947              if test $ac_cv_header_wchar_h = yes; then
26948
26949
26950                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26951 /* end confdefs.h.  */
26952 #include <wchar.h>
26953
26954 _ACEOF
26955                                                                                                                         case "$host_os" in
26956                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26957                  *)    gl_absname_cpp="$ac_cpp" ;;
26958                esac
26959
26960                case "$host_os" in
26961                  mingw*)
26962                                                                                                                                      gl_dirsep_regex='[/\\]'
26963                    ;;
26964                  *)
26965                    gl_dirsep_regex='\/'
26966                    ;;
26967                esac
26968                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26969
26970                gl_header_literal_regex=`echo 'wchar.h' \
26971                                         | sed -e "$gl_make_literal_regex_sed"`
26972                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26973                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26974                    s|^/[^/]|//&|
26975                    p
26976                    q
26977                  }'
26978                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26979                       sed -n "$gl_absolute_header_sed"`'"'
26980           else
26981                gl_cv_next_wchar_h='<'wchar.h'>'
26982              fi
26983
26984
26985 fi
26986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
26987 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
26988      fi
26989      NEXT_WCHAR_H=$gl_cv_next_wchar_h
26990
26991      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26992        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26993        gl_next_as_first_directive='<'wchar.h'>'
26994      else
26995        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26996        gl_next_as_first_directive=$gl_cv_next_wchar_h
26997      fi
26998      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
26999
27000
27001
27002
27003   if test $ac_cv_header_wchar_h = yes; then
27004     HAVE_WCHAR_H=1
27005   else
27006     HAVE_WCHAR_H=0
27007   fi
27008
27009
27010
27011
27012
27013   if test $gt_cv_c_wint_t = yes; then
27014     HAVE_WINT_T=1
27015   else
27016     HAVE_WINT_T=0
27017   fi
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027   if test $ac_cv_func_iswcntrl = yes; then
27028     HAVE_ISWCNTRL=1
27029   else
27030     HAVE_ISWCNTRL=0
27031   fi
27032
27033
27034
27035   if test $gt_cv_c_wint_t = yes; then
27036     HAVE_WINT_T=1
27037   else
27038     HAVE_WINT_T=0
27039   fi
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051      if test $gl_cv_have_include_next = yes; then
27052        gl_cv_next_wctype_h='<'wctype.h'>'
27053      else
27054        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27055 printf %s "checking absolute name of <wctype.h>... " >&6; }
27056 if ${gl_cv_next_wctype_h+:} false; then :
27057   printf %s "(cached) " >&6
27058 else
27059
27060              if test $ac_cv_header_wctype_h = yes; then
27061
27062
27063                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27064 /* end confdefs.h.  */
27065 #include <wctype.h>
27066
27067 _ACEOF
27068                                                                                                                         case "$host_os" in
27069                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27070                  *)    gl_absname_cpp="$ac_cpp" ;;
27071                esac
27072
27073                case "$host_os" in
27074                  mingw*)
27075                                                                                                                                      gl_dirsep_regex='[/\\]'
27076                    ;;
27077                  *)
27078                    gl_dirsep_regex='\/'
27079                    ;;
27080                esac
27081                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27082
27083                gl_header_literal_regex=`echo 'wctype.h' \
27084                                         | sed -e "$gl_make_literal_regex_sed"`
27085                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27086                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27087                    s|^/[^/]|//&|
27088                    p
27089                    q
27090                  }'
27091                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27092                       sed -n "$gl_absolute_header_sed"`'"'
27093           else
27094                gl_cv_next_wctype_h='<'wctype.h'>'
27095              fi
27096
27097
27098 fi
27099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27100 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
27101      fi
27102      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
27103
27104      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27105        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27106        gl_next_as_first_directive='<'wctype.h'>'
27107      else
27108        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27109        gl_next_as_first_directive=$gl_cv_next_wctype_h
27110      fi
27111      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27112
27113
27114
27115
27116   if test $ac_cv_header_wctype_h = yes; then
27117     if test $ac_cv_func_iswcntrl = yes; then
27118                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27119 printf %s "checking whether iswcntrl works... " >&6; }
27120 if ${gl_cv_func_iswcntrl_works+:} false; then :
27121   printf %s "(cached) " >&6
27122 else
27123
27124           if test "$cross_compiling" = yes; then :
27125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27126 /* end confdefs.h.  */
27127 #include <stdlib.h>
27128                           #if __GNU_LIBRARY__ == 1
27129                           Linux libc5 i18n is broken.
27130                           #endif
27131 int
27132 main ()
27133 {
27134
27135   ;
27136   return 0;
27137 }
27138 _ACEOF
27139 if ac_fn_c_try_compile "$LINENO"; then :
27140   gl_cv_func_iswcntrl_works="guessing yes"
27141 else
27142   gl_cv_func_iswcntrl_works="guessing no"
27143 fi
27144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27145
27146 else
27147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27148 /* end confdefs.h.  */
27149
27150                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27151                   included before <wchar.h>.
27152                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27153                   must be included before <wchar.h>.  */
27154                #include <stddef.h>
27155                #include <stdio.h>
27156                #include <time.h>
27157                #include <wchar.h>
27158                #include <wctype.h>
27159                int main () { return iswprint ('x') == 0; }
27160
27161 _ACEOF
27162 if ac_fn_c_try_run "$LINENO"; then :
27163   gl_cv_func_iswcntrl_works=yes
27164 else
27165   gl_cv_func_iswcntrl_works=no
27166 fi
27167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27168   conftest.$ac_objext conftest.beam conftest.$ac_ext
27169 fi
27170
27171
27172 fi
27173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27174 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
27175     fi
27176     HAVE_WCTYPE_H=1
27177   else
27178     HAVE_WCTYPE_H=0
27179   fi
27180
27181
27182   case "$gl_cv_func_iswcntrl_works" in
27183     *yes) REPLACE_ISWCNTRL=0 ;;
27184     *)    REPLACE_ISWCNTRL=1 ;;
27185   esac
27186
27187
27188   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27189         :
27190   fi
27191
27192   if test $REPLACE_ISWCNTRL = 1; then
27193     REPLACE_TOWLOWER=1
27194   else
27195     for ac_func in towlower
27196 do :
27197   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
27198 if test "x$ac_cv_func_towlower" = xyes; then :
27199   cat >>confdefs.h <<_ACEOF
27200 #define HAVE_TOWLOWER 1
27201 _ACEOF
27202
27203 fi
27204 done
27205
27206     if test $ac_cv_func_towlower = yes; then
27207       REPLACE_TOWLOWER=0
27208     else
27209       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27210              included before <wchar.h>.
27211              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27212              must be included before <wchar.h>.  */
27213           #include <stddef.h>
27214           #include <stdio.h>
27215           #include <time.h>
27216           #include <wchar.h>
27217           #if HAVE_WCTYPE_H
27218           # include <wctype.h>
27219           #endif
27220
27221 "
27222 if test "x$ac_cv_have_decl_towlower" = xyes; then :
27223   ac_have_decl=1
27224 else
27225   ac_have_decl=0
27226 fi
27227
27228 cat >>confdefs.h <<_ACEOF
27229 #define HAVE_DECL_TOWLOWER $ac_have_decl
27230 _ACEOF
27231
27232       if test $ac_cv_have_decl_towlower = yes; then
27233                                 REPLACE_TOWLOWER=1
27234       else
27235         REPLACE_TOWLOWER=0
27236       fi
27237     fi
27238   fi
27239
27240
27241   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27242         :
27243   fi
27244
27245           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27246 printf %s "checking for wctype_t... " >&6; }
27247 if ${gl_cv_type_wctype_t+:} false; then :
27248   printf %s "(cached) " >&6
27249 else
27250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27251 /* end confdefs.h.  */
27252 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27253                included before <wchar.h>.
27254                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27255                must be included before <wchar.h>.  */
27256             #include <stddef.h>
27257             #include <stdio.h>
27258             #include <time.h>
27259             #include <wchar.h>
27260             #if HAVE_WCTYPE_H
27261             # include <wctype.h>
27262             #endif
27263             wctype_t a;
27264
27265 int
27266 main ()
27267 {
27268
27269   ;
27270   return 0;
27271 }
27272 _ACEOF
27273 if ac_fn_c_try_compile "$LINENO"; then :
27274   gl_cv_type_wctype_t=yes
27275 else
27276   gl_cv_type_wctype_t=no
27277 fi
27278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27279
27280 fi
27281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27282 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
27283   if test $gl_cv_type_wctype_t = no; then
27284     HAVE_WCTYPE_T=0
27285   fi
27286
27287       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27288 printf %s "checking for wctrans_t... " >&6; }
27289 if ${gl_cv_type_wctrans_t+:} false; then :
27290   printf %s "(cached) " >&6
27291 else
27292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27293 /* end confdefs.h.  */
27294 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27295                included before <wchar.h>.
27296                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27297                must be included before <wchar.h>.  */
27298             #include <stddef.h>
27299             #include <stdio.h>
27300             #include <time.h>
27301             #include <wchar.h>
27302             #include <wctype.h>
27303             wctrans_t a;
27304
27305 int
27306 main ()
27307 {
27308
27309   ;
27310   return 0;
27311 }
27312 _ACEOF
27313 if ac_fn_c_try_compile "$LINENO"; then :
27314   gl_cv_type_wctrans_t=yes
27315 else
27316   gl_cv_type_wctrans_t=no
27317 fi
27318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27319
27320 fi
27321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27322 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
27323   if test $gl_cv_type_wctrans_t = no; then
27324     HAVE_WCTRANS_T=0
27325   fi
27326
27327
27328
27329   :
27330
27331
27332   for ac_header in stdint.h
27333 do :
27334   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27335 if test "x$ac_cv_header_stdint_h" = xyes; then :
27336   cat >>confdefs.h <<_ACEOF
27337 #define HAVE_STDINT_H 1
27338 _ACEOF
27339
27340 fi
27341
27342 done
27343
27344
27345
27346     :
27347
27348   # End of code from modules
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358   gltests_libdeps=
27359   gltests_ltlibdeps=
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369   gl_source_base='tests'
27370   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
27371
27372   gl_module_indicator_condition=$gltests_WITNESS
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382   LIBGZIP_LIBDEPS="$gl_libdeps"
27383
27384   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
27385
27386
27387
27388 # Check whether --enable-gcc-warnings was given.
27389 if test "${enable_gcc_warnings+set}" = set; then :
27390   enableval=$enable_gcc_warnings; case $enableval in
27391      yes|no) ;;
27392      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
27393    esac
27394    gl_gcc_warnings=$enableval
27395 else
27396   if test -d "$srcdir"/.git; then
27397      gl_gcc_warnings=yes
27398    else
27399      gl_gcc_warnings=no
27400    fi
27401
27402 fi
27403
27404
27405 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
27406 # ------------------------------------------------
27407 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
27408 # Otherwise, run RUN-IF-NOT-FOUND.
27409
27410
27411 if test "$gl_gcc_warnings" = yes; then
27412   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
27413 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
27414 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
27415   printf %s "(cached) " >&6
27416 else
27417
27418   gl_save_compiler_FLAGS="$CFLAGS"
27419   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
27420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27421 /* end confdefs.h.  */
27422
27423 int
27424 main ()
27425 {
27426
27427   ;
27428   return 0;
27429 }
27430 _ACEOF
27431 if ac_fn_c_try_compile "$LINENO"; then :
27432   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
27433 else
27434   gl_cv_warn_c__Werror__Wunknown_warning_option=no
27435 fi
27436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27437   CFLAGS="$gl_save_compiler_FLAGS"
27438
27439 fi
27440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
27441 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
27442 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
27443   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
27444 else
27445   gl_unknown_warnings_are_errors=
27446 fi
27447
27448
27449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
27450 printf %s "checking whether C compiler handles -Werror... " >&6; }
27451 if ${gl_cv_warn_c__Werror+:} false; then :
27452   printf %s "(cached) " >&6
27453 else
27454
27455   gl_save_compiler_FLAGS="$CFLAGS"
27456   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
27457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27458 /* end confdefs.h.  */
27459
27460 int
27461 main ()
27462 {
27463
27464   ;
27465   return 0;
27466 }
27467 _ACEOF
27468 if ac_fn_c_try_compile "$LINENO"; then :
27469   gl_cv_warn_c__Werror=yes
27470 else
27471   gl_cv_warn_c__Werror=no
27472 fi
27473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27474   CFLAGS="$gl_save_compiler_FLAGS"
27475
27476 fi
27477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
27478 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
27479 if test "x$gl_cv_warn_c__Werror" = xyes; then :
27480   as_fn_append WERROR_CFLAGS " -Werror"
27481 fi
27482
27483
27484
27485
27486   nw=
27487   # This, $nw, is the list of warnings we disable.
27488   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
27489   nw="$nw -Waggregate-return"       # anachronistic
27490   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
27491   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
27492   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
27493   nw="$nw -Wtraditional"            # Warns on #elif which we use often
27494   nw="$nw -Wcast-qual"              # Too many warnings for now
27495   nw="$nw -Wconversion"             # Too many warnings for now
27496   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
27497   nw="$nw -Wsign-conversion"        # Too many warnings for now
27498   nw="$nw -Wtraditional-conversion" # Too many warnings for now
27499   nw="$nw -Wunreachable-code"       # Too many warnings for now
27500   nw="$nw -Wpadded"                 # Our structs are not padded
27501   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
27502   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
27503   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
27504   nw="$nw -Wvla"                    # warnings in gettext.h
27505   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
27506   nw="$nw -Wswitch-enum"            # Too many warnings for now
27507   nw="$nw -Wswitch-default"         # Too many warnings for now
27508   nw="$nw -Wstack-protector"        # not worth working around
27509   # things I might fix soon:
27510   nw="$nw -Wfloat-equal"            # sort.c, seq.c
27511   nw="$nw -Wmissing-format-attribute" # copy.c
27512   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
27513   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
27514
27515   # Warnings that gzip runs afoul of but coreutils does not.
27516   nw="$nw -Wold-style-definition"
27517   nw="$nw -Wshadow"
27518   nw="$nw -Wstrict-overflow"
27519
27520   # Using -Wstrict-overflow is a pain, but the alternative is worse.
27521   # For an example, see the code that provoked this report:
27522   # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
27523   # Code like that still infloops with gcc-4.6.0 and -O2.  Scary indeed.
27524
27525
27526
27527   if test -n "$GCC"; then
27528
27529             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
27530 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
27531     if ${gl_cv_cc_nomfi_supported+:} false; then :
27532   printf %s "(cached) " >&6
27533 else
27534
27535       gl_save_CFLAGS="$CFLAGS"
27536       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
27537       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27538 /* end confdefs.h.  */
27539
27540 int
27541 main ()
27542 {
27543
27544   ;
27545   return 0;
27546 }
27547 _ACEOF
27548 if ac_fn_c_try_compile "$LINENO"; then :
27549   gl_cv_cc_nomfi_supported=yes
27550 else
27551   gl_cv_cc_nomfi_supported=no
27552 fi
27553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27554       CFLAGS="$gl_save_CFLAGS"
27555 fi
27556
27557     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
27558 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
27559
27560     if test "$gl_cv_cc_nomfi_supported" = yes; then
27561                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
27562 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
27563       if ${gl_cv_cc_nomfi_needed+:} false; then :
27564   printf %s "(cached) " >&6
27565 else
27566
27567         gl_save_CFLAGS="$CFLAGS"
27568         CFLAGS="$CFLAGS -W -Werror"
27569         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27570 /* end confdefs.h.  */
27571 void f (void)
27572                {
27573                  typedef struct { int a; int b; } s_t;
27574                  s_t s1 = { 0, };
27575                }
27576
27577 int
27578 main ()
27579 {
27580
27581   ;
27582   return 0;
27583 }
27584 _ACEOF
27585 if ac_fn_c_try_compile "$LINENO"; then :
27586   gl_cv_cc_nomfi_needed=no
27587 else
27588   gl_cv_cc_nomfi_needed=yes
27589 fi
27590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27591         CFLAGS="$gl_save_CFLAGS"
27592
27593 fi
27594
27595       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
27596 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
27597     fi
27598
27599                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
27600 printf %s "checking whether -Wuninitialized is supported... " >&6; }
27601     if ${gl_cv_cc_uninitialized_supported+:} false; then :
27602   printf %s "(cached) " >&6
27603 else
27604
27605       gl_save_CFLAGS="$CFLAGS"
27606       CFLAGS="$CFLAGS -Werror -Wuninitialized"
27607       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27608 /* end confdefs.h.  */
27609
27610 int
27611 main ()
27612 {
27613
27614   ;
27615   return 0;
27616 }
27617 _ACEOF
27618 if ac_fn_c_try_compile "$LINENO"; then :
27619   gl_cv_cc_uninitialized_supported=yes
27620 else
27621   gl_cv_cc_uninitialized_supported=no
27622 fi
27623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27624       CFLAGS="$gl_save_CFLAGS"
27625 fi
27626
27627     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
27628 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
27629
27630   fi
27631
27632   # List all gcc warning categories.
27633   gl_manywarn_set=
27634   for gl_manywarn_item in \
27635     -W \
27636     -Wabi \
27637     -Waddress \
27638     -Waggressive-loop-optimizations \
27639     -Wall \
27640     -Warray-bounds \
27641     -Wattributes \
27642     -Wbad-function-cast \
27643     -Wbuiltin-macro-redefined \
27644     -Wcast-align \
27645     -Wchar-subscripts \
27646     -Wclobbered \
27647     -Wcomment \
27648     -Wcomments \
27649     -Wcoverage-mismatch \
27650     -Wcpp \
27651     -Wdeprecated \
27652     -Wdeprecated-declarations \
27653     -Wdisabled-optimization \
27654     -Wdiv-by-zero \
27655     -Wdouble-promotion \
27656     -Wempty-body \
27657     -Wendif-labels \
27658     -Wenum-compare \
27659     -Wextra \
27660     -Wformat-contains-nul \
27661     -Wformat-extra-args \
27662     -Wformat-nonliteral \
27663     -Wformat-security \
27664     -Wformat-y2k \
27665     -Wformat-zero-length \
27666     -Wfree-nonheap-object \
27667     -Wignored-qualifiers \
27668     -Wimplicit \
27669     -Wimplicit-function-declaration \
27670     -Wimplicit-int \
27671     -Winit-self \
27672     -Winline \
27673     -Wint-to-pointer-cast \
27674     -Winvalid-memory-model \
27675     -Winvalid-pch \
27676     -Wjump-misses-init \
27677     -Wlogical-op \
27678     -Wmain \
27679     -Wmaybe-uninitialized \
27680     -Wmissing-braces \
27681     -Wmissing-declarations \
27682     -Wmissing-field-initializers \
27683     -Wmissing-include-dirs \
27684     -Wmissing-parameter-type \
27685     -Wmissing-prototypes \
27686     -Wmudflap \
27687     -Wmultichar \
27688     -Wnarrowing \
27689     -Wnested-externs \
27690     -Wnonnull \
27691     -Wnormalized=nfc \
27692     -Wold-style-declaration \
27693     -Wold-style-definition \
27694     -Woverflow \
27695     -Woverlength-strings \
27696     -Woverride-init \
27697     -Wpacked \
27698     -Wpacked-bitfield-compat \
27699     -Wparentheses \
27700     -Wpointer-arith \
27701     -Wpointer-sign \
27702     -Wpointer-to-int-cast \
27703     -Wpragmas \
27704     -Wreturn-local-addr \
27705     -Wreturn-type \
27706     -Wsequence-point \
27707     -Wshadow \
27708     -Wsizeof-pointer-memaccess \
27709     -Wstack-protector \
27710     -Wstrict-aliasing \
27711     -Wstrict-overflow \
27712     -Wstrict-prototypes \
27713     -Wsuggest-attribute=const \
27714     -Wsuggest-attribute=format \
27715     -Wsuggest-attribute=noreturn \
27716     -Wsuggest-attribute=pure \
27717     -Wswitch \
27718     -Wswitch-default \
27719     -Wsync-nand \
27720     -Wsystem-headers \
27721     -Wtrampolines \
27722     -Wtrigraphs \
27723     -Wtype-limits \
27724     -Wuninitialized \
27725     -Wunknown-pragmas \
27726     -Wunsafe-loop-optimizations \
27727     -Wunused \
27728     -Wunused-but-set-parameter \
27729     -Wunused-but-set-variable \
27730     -Wunused-function \
27731     -Wunused-label \
27732     -Wunused-local-typedefs \
27733     -Wunused-macros \
27734     -Wunused-parameter \
27735     -Wunused-result \
27736     -Wunused-value \
27737     -Wunused-variable \
27738     -Wvarargs \
27739     -Wvariadic-macros \
27740     -Wvector-operation-performance \
27741     -Wvla \
27742     -Wvolatile-register-var \
27743     -Wwrite-strings \
27744     \
27745     ; do
27746     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27747   done
27748
27749   # Disable specific options as needed.
27750   if test "$gl_cv_cc_nomfi_needed" = yes; then
27751     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
27752   fi
27753
27754   if test "$gl_cv_cc_uninitialized_supported" = no; then
27755     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
27756   fi
27757
27758   ws=$gl_manywarn_set
27759
27760
27761   gl_warn_set=
27762   set x $ws; shift
27763   for gl_warn_item
27764   do
27765     case " $nw " in
27766       *" $gl_warn_item "*)
27767         ;;
27768       *)
27769         gl_warn_set="$gl_warn_set $gl_warn_item"
27770         ;;
27771     esac
27772   done
27773   ws=$gl_warn_set
27774
27775   for w in $ws; do
27776
27777 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
27778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
27779 printf %s "checking whether C compiler handles $w... " >&6; }
27780 if eval \${$as_gl_Warn+:} false; then :
27781   printf %s "(cached) " >&6
27782 else
27783
27784   gl_save_compiler_FLAGS="$CFLAGS"
27785   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
27786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27787 /* end confdefs.h.  */
27788
27789 int
27790 main ()
27791 {
27792
27793   ;
27794   return 0;
27795 }
27796 _ACEOF
27797 if ac_fn_c_try_compile "$LINENO"; then :
27798   eval "$as_gl_Warn=yes"
27799 else
27800   eval "$as_gl_Warn=no"
27801 fi
27802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27803   CFLAGS="$gl_save_compiler_FLAGS"
27804
27805 fi
27806 eval ac_res=\$$as_gl_Warn
27807                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27808 printf "%s\n" "$ac_res" >&6; }
27809 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
27810   as_fn_append WARN_CFLAGS " $w"
27811 fi
27812
27813
27814   done
27815
27816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
27817 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
27818 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
27819   printf %s "(cached) " >&6
27820 else
27821
27822   gl_save_compiler_FLAGS="$CFLAGS"
27823   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
27824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27825 /* end confdefs.h.  */
27826
27827 int
27828 main ()
27829 {
27830
27831   ;
27832   return 0;
27833 }
27834 _ACEOF
27835 if ac_fn_c_try_compile "$LINENO"; then :
27836   gl_cv_warn_c__Wno_sign_compare=yes
27837 else
27838   gl_cv_warn_c__Wno_sign_compare=no
27839 fi
27840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27841   CFLAGS="$gl_save_compiler_FLAGS"
27842
27843 fi
27844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
27845 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
27846 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
27847   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
27848 fi
27849
27850      # Too many warnings for now
27851
27852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
27853 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
27854 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
27855   printf %s "(cached) " >&6
27856 else
27857
27858   gl_save_compiler_FLAGS="$CFLAGS"
27859   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
27860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27861 /* end confdefs.h.  */
27862
27863 int
27864 main ()
27865 {
27866
27867   ;
27868   return 0;
27869 }
27870 _ACEOF
27871 if ac_fn_c_try_compile "$LINENO"; then :
27872   gl_cv_warn_c__Wno_unused_parameter=yes
27873 else
27874   gl_cv_warn_c__Wno_unused_parameter=no
27875 fi
27876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27877   CFLAGS="$gl_save_compiler_FLAGS"
27878
27879 fi
27880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
27881 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
27882 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
27883   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
27884 fi
27885
27886  # Too many warnings for now
27887
27888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
27889 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
27890 if ${gl_cv_warn_c__Wsuggest_attribute_const+:} false; then :
27891   printf %s "(cached) " >&6
27892 else
27893
27894   gl_save_compiler_FLAGS="$CFLAGS"
27895   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
27896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27897 /* end confdefs.h.  */
27898
27899 int
27900 main ()
27901 {
27902
27903   ;
27904   return 0;
27905 }
27906 _ACEOF
27907 if ac_fn_c_try_compile "$LINENO"; then :
27908   gl_cv_warn_c__Wsuggest_attribute_const=yes
27909 else
27910   gl_cv_warn_c__Wsuggest_attribute_const=no
27911 fi
27912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27913   CFLAGS="$gl_save_compiler_FLAGS"
27914
27915 fi
27916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
27917 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
27918 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes; then :
27919   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
27920 fi
27921
27922
27923
27924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
27925 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
27926 if ${gl_cv_warn_c__Wsuggest_attribute_noreturn+:} false; then :
27927   printf %s "(cached) " >&6
27928 else
27929
27930   gl_save_compiler_FLAGS="$CFLAGS"
27931   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
27932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27933 /* end confdefs.h.  */
27934
27935 int
27936 main ()
27937 {
27938
27939   ;
27940   return 0;
27941 }
27942 _ACEOF
27943 if ac_fn_c_try_compile "$LINENO"; then :
27944   gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
27945 else
27946   gl_cv_warn_c__Wsuggest_attribute_noreturn=no
27947 fi
27948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27949   CFLAGS="$gl_save_compiler_FLAGS"
27950
27951 fi
27952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
27953 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
27954 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes; then :
27955   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
27956 fi
27957
27958
27959
27960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
27961 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
27962 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
27963   printf %s "(cached) " >&6
27964 else
27965
27966   gl_save_compiler_FLAGS="$CFLAGS"
27967   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
27968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27969 /* end confdefs.h.  */
27970
27971 int
27972 main ()
27973 {
27974
27975   ;
27976   return 0;
27977 }
27978 _ACEOF
27979 if ac_fn_c_try_compile "$LINENO"; then :
27980   gl_cv_warn_c__Wno_format_nonliteral=yes
27981 else
27982   gl_cv_warn_c__Wno_format_nonliteral=no
27983 fi
27984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27985   CFLAGS="$gl_save_compiler_FLAGS"
27986
27987 fi
27988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
27989 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
27990 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
27991   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
27992 fi
27993
27994
27995
27996   # Enable this warning only with gcc-4.7 and newer.  With 4.6.2 20111027,
27997   # it suggests test.c's advance function may be pure, even though it
27998   # increments a global variable.  Oops.
27999   # Normally we'd write code to test for the precise failure, but that
28000   # requires a relatively large input to make gcc exhibit the failure.
28001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28002 /* end confdefs.h.  */
28003
28004 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
28005 /* ok */
28006 #else
28007 # error "your version of gcc is older than 4.7"
28008 #endif
28009
28010 int
28011 main ()
28012 {
28013
28014   ;
28015   return 0;
28016 },
28017
28018 _ACEOF
28019 if ac_fn_c_try_cpp "$LINENO"; then :
28020
28021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
28022 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
28023 if ${gl_cv_warn_c__Wsuggest_attribute_pure+:} false; then :
28024   printf %s "(cached) " >&6
28025 else
28026
28027   gl_save_compiler_FLAGS="$CFLAGS"
28028   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
28029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28030 /* end confdefs.h.  */
28031
28032 int
28033 main ()
28034 {
28035
28036   ;
28037   return 0;
28038 }
28039 _ACEOF
28040 if ac_fn_c_try_compile "$LINENO"; then :
28041   gl_cv_warn_c__Wsuggest_attribute_pure=yes
28042 else
28043   gl_cv_warn_c__Wsuggest_attribute_pure=no
28044 fi
28045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28046   CFLAGS="$gl_save_compiler_FLAGS"
28047
28048 fi
28049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
28050 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
28051 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes; then :
28052   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
28053 fi
28054
28055
28056 fi
28057 rm -f conftest.err conftest.i conftest.$ac_ext
28058
28059
28060
28061   # In spite of excluding -Wlogical-op above, it is enabled, as of
28062   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
28063
28064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
28065 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
28066 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
28067   printf %s "(cached) " >&6
28068 else
28069
28070   gl_save_compiler_FLAGS="$CFLAGS"
28071   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
28072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28073 /* end confdefs.h.  */
28074
28075 int
28076 main ()
28077 {
28078
28079   ;
28080   return 0;
28081 }
28082 _ACEOF
28083 if ac_fn_c_try_compile "$LINENO"; then :
28084   gl_cv_warn_c__Wno_logical_op=yes
28085 else
28086   gl_cv_warn_c__Wno_logical_op=no
28087 fi
28088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28089   CFLAGS="$gl_save_compiler_FLAGS"
28090
28091 fi
28092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
28093 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
28094 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
28095   as_fn_append WARN_CFLAGS " -Wno-logical-op"
28096 fi
28097
28098
28099
28100
28101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
28102 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
28103 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
28104   printf %s "(cached) " >&6
28105 else
28106
28107   gl_save_compiler_FLAGS="$CFLAGS"
28108   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
28109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28110 /* end confdefs.h.  */
28111
28112 int
28113 main ()
28114 {
28115
28116   ;
28117   return 0;
28118 }
28119 _ACEOF
28120 if ac_fn_c_try_compile "$LINENO"; then :
28121   gl_cv_warn_c__fdiagnostics_show_option=yes
28122 else
28123   gl_cv_warn_c__fdiagnostics_show_option=no
28124 fi
28125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28126   CFLAGS="$gl_save_compiler_FLAGS"
28127
28128 fi
28129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
28130 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
28131 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
28132   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
28133 fi
28134
28135
28136
28137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
28138 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
28139 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
28140   printf %s "(cached) " >&6
28141 else
28142
28143   gl_save_compiler_FLAGS="$CFLAGS"
28144   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
28145   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28146 /* end confdefs.h.  */
28147
28148 int
28149 main ()
28150 {
28151
28152   ;
28153   return 0;
28154 }
28155 _ACEOF
28156 if ac_fn_c_try_compile "$LINENO"; then :
28157   gl_cv_warn_c__funit_at_a_time=yes
28158 else
28159   gl_cv_warn_c__funit_at_a_time=no
28160 fi
28161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28162   CFLAGS="$gl_save_compiler_FLAGS"
28163
28164 fi
28165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
28166 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
28167 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
28168   as_fn_append WARN_CFLAGS " -funit-at-a-time"
28169 fi
28170
28171
28172
28173
28174
28175
28176 printf "%s\n" "#define lint 1" >>confdefs.h
28177
28178
28179
28180 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
28181
28182
28183   # We use a slightly smaller set of warning options for lib/.
28184   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
28185   nw=
28186   nw="$nw -Wstrict-overflow"
28187   nw="$nw -Wuninitialized"
28188   nw="$nw -Wunused-macros"
28189   nw="$nw -Wmissing-prototypes"
28190   nw="$nw -Wold-style-definition"
28191
28192   gl_warn_set=
28193   set x $WARN_CFLAGS; shift
28194   for gl_warn_item
28195   do
28196     case " $nw " in
28197       *" $gl_warn_item "*)
28198         ;;
28199       *)
28200         gl_warn_set="$gl_warn_set $gl_warn_item"
28201         ;;
28202     esac
28203   done
28204   GNULIB_WARN_CFLAGS=$gl_warn_set
28205
28206
28207 fi
28208
28209 # cc -E produces incorrect asm files on SVR4, so postprocess it.
28210 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
28211
28212
28213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
28214 printf %s "checking for underline in external names... " >&6; }
28215 if ${gzip_cv_underline+:} false; then :
28216   printf %s "(cached) " >&6
28217 else
28218   gzip_cv_underline=yes
28219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28220 /* end confdefs.h.  */
28221 int foo() {return 0;}
28222 int
28223 main ()
28224 {
28225
28226   ;
28227   return 0;
28228 }
28229 _ACEOF
28230 if ac_fn_c_try_compile "$LINENO"; then :
28231   $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
28232         gzip_cv_underline=no
28233 fi
28234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28235 fi
28236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
28237 printf "%s\n" "$gzip_cv_underline" >&6; }
28238 ASCPPFLAGS=
28239 if test $gzip_cv_underline = no; then
28240   ASCPPFLAGS='-DNO_UNDERLINE'
28241 fi
28242
28243
28244
28245 # Try to assemble match.S.
28246 # "gcc -E match.s" ignores -E, so we must use _match.S.
28247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
28248 printf %s "checking for an assembler syntax supported by this package... " >&6; }
28249 if ${gzip_cv_assembler+:} false; then :
28250   printf %s "(cached) " >&6
28251 else
28252   gzip_cv_assembler=no
28253    case " $DEFS " in
28254    *' NO_ASM '*) ;;
28255    *)
28256      if cp $srcdir/lib/match.c _match.S &&
28257         eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
28258         eval "$ASCPPPOST < _match.i > match_.s"; then
28259        if test ! -s match_.s || grep error < match_.s > /dev/null; then
28260          :
28261        elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
28262             test -f match_.$OBJEXT; then
28263          rm -f match_.$OBJEXT
28264          gzip_cv_assembler=yes
28265          if echo 'void foo (void) {}' > conftest.c &&
28266             eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
28267             grep '\.note\.GNU-stack' conftest.s >/dev/null &&
28268             eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
28269             test -f match_.$OBJEXT; then
28270            gzip_cv_assembler='yes, with -Wa,--noexecstack'
28271          fi
28272        fi
28273      fi
28274      rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
28275    esac
28276 fi
28277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
28278 printf "%s\n" "$gzip_cv_assembler" >&6; }
28279 if test "$gzip_cv_assembler" != no; then
28280
28281 printf "%s\n" "#define ASMV /**/" >>confdefs.h
28282
28283   case " $LIBOBJS " in
28284   *" match.$ac_objext "* ) ;;
28285   *) LIBOBJS="$LIBOBJS match.$ac_objext"
28286  ;;
28287 esac
28288
28289 fi
28290 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
28291   ASFLAGS_config='-Wa,--noexecstack'
28292 else
28293   ASFLAGS_config=
28294 fi
28295
28296
28297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
28298 printf %s "checking for library containing strerror... " >&6; }
28299 if ${ac_cv_search_strerror+:} false; then :
28300   printf %s "(cached) " >&6
28301 else
28302   ac_func_search_save_LIBS=$LIBS
28303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28304 /* end confdefs.h.  */
28305
28306 /* Override any GCC internal prototype to avoid an error.
28307    Use char because int might match the return type of a GCC
28308    builtin and then its argument prototype would still apply.  */
28309 #ifdef __cplusplus
28310 extern "C"
28311 #endif
28312 char strerror ();
28313 int
28314 main ()
28315 {
28316 return strerror ();
28317   ;
28318   return 0;
28319 }
28320 _ACEOF
28321 for ac_lib in '' cposix; do
28322   if test -z "$ac_lib"; then
28323     ac_res="none required"
28324   else
28325     ac_res=-l$ac_lib
28326     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28327   fi
28328   if ac_fn_c_try_link "$LINENO"; then :
28329   ac_cv_search_strerror=$ac_res
28330 fi
28331 rm -f core conftest.err conftest.$ac_objext \
28332     conftest$ac_exeext
28333   if ${ac_cv_search_strerror+:} false; then :
28334   break
28335 fi
28336 done
28337 if ${ac_cv_search_strerror+:} false; then :
28338
28339 else
28340   ac_cv_search_strerror=no
28341 fi
28342 rm conftest.$ac_ext
28343 LIBS=$ac_func_search_save_LIBS
28344 fi
28345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
28346 printf "%s\n" "$ac_cv_search_strerror" >&6; }
28347 ac_res=$ac_cv_search_strerror
28348 if test "$ac_res" != no; then :
28349   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28350
28351 fi
28352
28353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
28354 printf %s "checking for an ANSI C-conforming const... " >&6; }
28355 if ${ac_cv_c_const+:} false; then :
28356   printf %s "(cached) " >&6
28357 else
28358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28359 /* end confdefs.h.  */
28360
28361 int
28362 main ()
28363 {
28364
28365 #ifndef __cplusplus
28366   /* Ultrix mips cc rejects this sort of thing.  */
28367   typedef int charset[2];
28368   const charset cs = { 0, 0 };
28369   /* SunOS 4.1.1 cc rejects this.  */
28370   char const *const *pcpcc;
28371   char **ppc;
28372   /* NEC SVR4.0.2 mips cc rejects this.  */
28373   struct point {int x, y;};
28374   static struct point const zero = {0,0};
28375   /* IBM XL C 1.02.0.0 rejects this.
28376      It does not let you subtract one const X* pointer from another in
28377      an arm of an if-expression whose if-part is not a constant
28378      expression */
28379   const char *g = "string";
28380   pcpcc = &g + (g ? g-g : 0);
28381   /* HPUX 7.0 cc rejects these. */
28382   ++pcpcc;
28383   ppc = (char**) pcpcc;
28384   pcpcc = (char const *const *) ppc;
28385   { /* SCO 3.2v4 cc rejects this sort of thing.  */
28386     char tx;
28387     char *t = &tx;
28388     char const *s = 0 ? (char *) 0 : (char const *) 0;
28389
28390     *t++ = 0;
28391     if (s) return 0;
28392   }
28393   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
28394     int x[] = {25, 17};
28395     const int *foo = &x[0];
28396     ++foo;
28397   }
28398   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
28399     typedef const int *iptr;
28400     iptr p = 0;
28401     ++p;
28402   }
28403   { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
28404        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
28405     struct s { int j; const int *ap[3]; } bx;
28406     struct s *b = &bx; b->j = 5;
28407   }
28408   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
28409     const int foo = 10;
28410     if (!foo) return 0;
28411   }
28412   return !cs[0] && !zero.x;
28413 #endif
28414
28415   ;
28416   return 0;
28417 }
28418 _ACEOF
28419 if ac_fn_c_try_compile "$LINENO"; then :
28420   ac_cv_c_const=yes
28421 else
28422   ac_cv_c_const=no
28423 fi
28424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28425 fi
28426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
28427 printf "%s\n" "$ac_cv_c_const" >&6; }
28428 if test $ac_cv_c_const = no; then
28429
28430 printf "%s\n" "#define const /**/" >>confdefs.h
28431
28432 fi
28433
28434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28435 printf %s "checking for ANSI C header files... " >&6; }
28436 if ${ac_cv_header_stdc+:} false; then :
28437   printf %s "(cached) " >&6
28438 else
28439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28440 /* end confdefs.h.  */
28441 #include <stdlib.h>
28442 #include <stdarg.h>
28443 #include <string.h>
28444 #include <float.h>
28445
28446 int
28447 main ()
28448 {
28449
28450   ;
28451   return 0;
28452 }
28453 _ACEOF
28454 if ac_fn_c_try_compile "$LINENO"; then :
28455   ac_cv_header_stdc=yes
28456 else
28457   ac_cv_header_stdc=no
28458 fi
28459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28460
28461 if test $ac_cv_header_stdc = yes; then
28462   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28464 /* end confdefs.h.  */
28465 #include <string.h>
28466
28467 _ACEOF
28468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28469   $EGREP "memchr" >/dev/null 2>&1; then :
28470
28471 else
28472   ac_cv_header_stdc=no
28473 fi
28474 rm -rf conftest*
28475
28476 fi
28477
28478 if test $ac_cv_header_stdc = yes; then
28479   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28480   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28481 /* end confdefs.h.  */
28482 #include <stdlib.h>
28483
28484 _ACEOF
28485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28486   $EGREP "free" >/dev/null 2>&1; then :
28487
28488 else
28489   ac_cv_header_stdc=no
28490 fi
28491 rm -rf conftest*
28492
28493 fi
28494
28495 if test $ac_cv_header_stdc = yes; then
28496   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28497   if test "$cross_compiling" = yes; then :
28498   :
28499 else
28500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28501 /* end confdefs.h.  */
28502 #include <ctype.h>
28503 #include <stdlib.h>
28504 #if ((' ' & 0x0FF) == 0x020)
28505 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28506 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28507 #else
28508 # define ISLOWER(c) \
28509                    (('a' <= (c) && (c) <= 'i') \
28510                      || ('j' <= (c) && (c) <= 'r') \
28511                      || ('s' <= (c) && (c) <= 'z'))
28512 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28513 #endif
28514
28515 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28516 int
28517 main ()
28518 {
28519   int i;
28520   for (i = 0; i < 256; i++)
28521     if (XOR (islower (i), ISLOWER (i))
28522         || toupper (i) != TOUPPER (i))
28523       return 2;
28524   return 0;
28525 }
28526 _ACEOF
28527 if ac_fn_c_try_run "$LINENO"; then :
28528
28529 else
28530   ac_cv_header_stdc=no
28531 fi
28532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28533   conftest.$ac_objext conftest.beam conftest.$ac_ext
28534 fi
28535
28536 fi
28537 fi
28538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28539 printf "%s\n" "$ac_cv_header_stdc" >&6; }
28540 if test $ac_cv_header_stdc = yes; then
28541
28542 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
28543
28544 fi
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564 ac_header_dirent=no
28565 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28566   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
28568 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
28569 if eval \${$as_ac_Header+:} false; then :
28570   printf %s "(cached) " >&6
28571 else
28572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28573 /* end confdefs.h.  */
28574 #include <sys/types.h>
28575 #include <$ac_hdr>
28576
28577 int
28578 main ()
28579 {
28580 if ((DIR *) 0)
28581 return 0;
28582   ;
28583   return 0;
28584 }
28585 _ACEOF
28586 if ac_fn_c_try_compile "$LINENO"; then :
28587   eval "$as_ac_Header=yes"
28588 else
28589   eval "$as_ac_Header=no"
28590 fi
28591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28592 fi
28593 eval ac_res=\$$as_ac_Header
28594                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28595 printf "%s\n" "$ac_res" >&6; }
28596 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28597   cat >>confdefs.h <<_ACEOF
28598 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
28599 _ACEOF
28600
28601 ac_header_dirent=$ac_hdr; break
28602 fi
28603
28604 done
28605 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28606 if test $ac_header_dirent = dirent.h; then
28607   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28608 printf %s "checking for library containing opendir... " >&6; }
28609 if ${ac_cv_search_opendir+:} false; then :
28610   printf %s "(cached) " >&6
28611 else
28612   ac_func_search_save_LIBS=$LIBS
28613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28614 /* end confdefs.h.  */
28615
28616 /* Override any GCC internal prototype to avoid an error.
28617    Use char because int might match the return type of a GCC
28618    builtin and then its argument prototype would still apply.  */
28619 #ifdef __cplusplus
28620 extern "C"
28621 #endif
28622 char opendir ();
28623 int
28624 main ()
28625 {
28626 return opendir ();
28627   ;
28628   return 0;
28629 }
28630 _ACEOF
28631 for ac_lib in '' dir; do
28632   if test -z "$ac_lib"; then
28633     ac_res="none required"
28634   else
28635     ac_res=-l$ac_lib
28636     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28637   fi
28638   if ac_fn_c_try_link "$LINENO"; then :
28639   ac_cv_search_opendir=$ac_res
28640 fi
28641 rm -f core conftest.err conftest.$ac_objext \
28642     conftest$ac_exeext
28643   if ${ac_cv_search_opendir+:} false; then :
28644   break
28645 fi
28646 done
28647 if ${ac_cv_search_opendir+:} false; then :
28648
28649 else
28650   ac_cv_search_opendir=no
28651 fi
28652 rm conftest.$ac_ext
28653 LIBS=$ac_func_search_save_LIBS
28654 fi
28655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28656 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28657 ac_res=$ac_cv_search_opendir
28658 if test "$ac_res" != no; then :
28659   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28660
28661 fi
28662
28663 else
28664   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28665 printf %s "checking for library containing opendir... " >&6; }
28666 if ${ac_cv_search_opendir+:} false; then :
28667   printf %s "(cached) " >&6
28668 else
28669   ac_func_search_save_LIBS=$LIBS
28670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28671 /* end confdefs.h.  */
28672
28673 /* Override any GCC internal prototype to avoid an error.
28674    Use char because int might match the return type of a GCC
28675    builtin and then its argument prototype would still apply.  */
28676 #ifdef __cplusplus
28677 extern "C"
28678 #endif
28679 char opendir ();
28680 int
28681 main ()
28682 {
28683 return opendir ();
28684   ;
28685   return 0;
28686 }
28687 _ACEOF
28688 for ac_lib in '' x; do
28689   if test -z "$ac_lib"; then
28690     ac_res="none required"
28691   else
28692     ac_res=-l$ac_lib
28693     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28694   fi
28695   if ac_fn_c_try_link "$LINENO"; then :
28696   ac_cv_search_opendir=$ac_res
28697 fi
28698 rm -f core conftest.err conftest.$ac_objext \
28699     conftest$ac_exeext
28700   if ${ac_cv_search_opendir+:} false; then :
28701   break
28702 fi
28703 done
28704 if ${ac_cv_search_opendir+:} false; then :
28705
28706 else
28707   ac_cv_search_opendir=no
28708 fi
28709 rm conftest.$ac_ext
28710 LIBS=$ac_func_search_save_LIBS
28711 fi
28712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28713 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28714 ac_res=$ac_cv_search_opendir
28715 if test "$ac_res" != no; then :
28716   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28717
28718 fi
28719
28720 fi
28721
28722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
28723 printf %s "checking return type of signal handlers... " >&6; }
28724 if ${ac_cv_type_signal+:} false; then :
28725   printf %s "(cached) " >&6
28726 else
28727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28728 /* end confdefs.h.  */
28729 #include <sys/types.h>
28730 #include <signal.h>
28731
28732 int
28733 main ()
28734 {
28735 return *(signal (0, 0)) (0) == 1;
28736   ;
28737   return 0;
28738 }
28739 _ACEOF
28740 if ac_fn_c_try_compile "$LINENO"; then :
28741   ac_cv_type_signal=int
28742 else
28743   ac_cv_type_signal=void
28744 fi
28745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28746 fi
28747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
28748 printf "%s\n" "$ac_cv_type_signal" >&6; }
28749
28750 cat >>confdefs.h <<_ACEOF
28751 #define RETSIGTYPE $ac_cv_type_signal
28752 _ACEOF
28753
28754
28755 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
28756 if test "x$ac_cv_type_size_t" = xyes; then :
28757
28758 else
28759
28760 cat >>confdefs.h <<_ACEOF
28761 #define size_t unsigned int
28762 _ACEOF
28763
28764 fi
28765
28766 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
28767 if test "x$ac_cv_type_off_t" = xyes; then :
28768
28769 else
28770
28771 cat >>confdefs.h <<_ACEOF
28772 #define off_t long int
28773 _ACEOF
28774
28775 fi
28776
28777
28778 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
28779
28780 cat >confcache <<\_ACEOF
28781 # This file is a shell script that caches the results of configure
28782 # tests run on this system so they can be shared between configure
28783 # scripts and configure runs, see configure's option --config-cache.
28784 # It is not useful on other systems.  If it contains results you don't
28785 # want to keep, you may remove or edit it.
28786 #
28787 # config.status only pays attention to the cache file if you give it
28788 # the --recheck option to rerun configure.
28789 #
28790 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28791 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28792 # following values.
28793
28794 _ACEOF
28795
28796 # The following way of writing the cache mishandles newlines in values,
28797 # but we know of no workaround that is simple, portable, and efficient.
28798 # So, we kill variables containing newlines.
28799 # Ultrix sh set writes to stderr and can't be redirected directly,
28800 # and sets the high bit in the cache file unless we assign to the vars.
28801 (
28802   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28803     eval ac_val=\$$ac_var
28804     case $ac_val in #(
28805     *${as_nl}*)
28806       case $ac_var in #(
28807       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28808 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28809       esac
28810       case $ac_var in #(
28811       _ | IFS | as_nl) ;; #(
28812       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28813       *) { eval $ac_var=; unset $ac_var;} ;;
28814       esac ;;
28815     esac
28816   done
28817
28818   (set) 2>&1 |
28819     case $as_nl`(ac_space=' '; set) 2>&1` in #(
28820     *${as_nl}ac_space=\ *)
28821       # `set' does not quote correctly, so add quotes: double-quote
28822       # substitution turns \\\\ into \\, and sed turns \\ into \.
28823       sed -n \
28824         "s/'/'\\\\''/g;
28825           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28826       ;; #(
28827     *)
28828       # `set' quotes correctly as required by POSIX, so do not add quotes.
28829       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28830       ;;
28831     esac |
28832     sort
28833 ) |
28834   sed '
28835      /^ac_cv_env_/b end
28836      t clear
28837      :clear
28838      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28839      t end
28840      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28841      :end' >>confcache
28842 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28843   if test -w "$cache_file"; then
28844     if test "x$cache_file" != "x/dev/null"; then
28845       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28846 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
28847       if test ! -f "$cache_file" || test -h "$cache_file"; then
28848         cat confcache >"$cache_file"
28849       else
28850         case $cache_file in #(
28851         */* | ?:*)
28852           mv -f confcache "$cache_file"$$ &&
28853           mv -f "$cache_file"$$ "$cache_file" ;; #(
28854         *)
28855           mv -f confcache "$cache_file" ;;
28856         esac
28857       fi
28858     fi
28859   else
28860     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28861 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
28862   fi
28863 fi
28864 rm -f confcache
28865
28866 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28867 # Let make expand exec_prefix.
28868 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28869
28870 DEFS=-DHAVE_CONFIG_H
28871
28872 ac_libobjs=
28873 ac_ltlibobjs=
28874 U=
28875 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28876   # 1. Remove the extension, and $U if already installed.
28877   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28878   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
28879   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
28880   #    will be set to the directory where LIBOBJS objects are built.
28881   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28882   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28883 done
28884 LIBOBJS=$ac_libobjs
28885
28886 LTLIBOBJS=$ac_ltlibobjs
28887
28888
28889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
28890 printf %s "checking that generated files are newer than configure... " >&6; }
28891    if test -n "$am_sleep_pid"; then
28892      # Hide warnings about reused PIDs.
28893      wait $am_sleep_pid 2>/dev/null
28894    fi
28895    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
28896 printf "%s\n" "done" >&6; }
28897  if test -n "$EXEEXT"; then
28898   am__EXEEXT_TRUE=
28899   am__EXEEXT_FALSE='#'
28900 else
28901   am__EXEEXT_TRUE='#'
28902   am__EXEEXT_FALSE=
28903 fi
28904
28905 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28906   as_fn_error $? "conditional \"AMDEP\" was never defined.
28907 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28908 fi
28909 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28910   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
28911 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28912 fi
28913 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28914   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
28915 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28916 fi
28917 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28918   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28919 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28920 fi
28921 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28922   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28923 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28924 fi
28925 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
28926   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
28927 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28928 fi
28929
28930
28931 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
28932   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
28933 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28934 fi
28935 CONFIG_INCLUDE=lib/config.h
28936
28937 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28938   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28939 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28940 fi
28941 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28942   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28943 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28944 fi
28945 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28946   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28947 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28948 fi
28949
28950     gl_libobjs=
28951     gl_ltlibobjs=
28952     if test -n "$gl_LIBOBJS"; then
28953       # Remove the extension.
28954       sed_drop_objext='s/\.o$//;s/\.obj$//'
28955       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28956         gl_libobjs="$gl_libobjs $i.$ac_objext"
28957         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28958       done
28959     fi
28960     gl_LIBOBJS=$gl_libobjs
28961
28962     gl_LTLIBOBJS=$gl_ltlibobjs
28963
28964
28965
28966     gltests_libobjs=
28967     gltests_ltlibobjs=
28968     if test -n "$gltests_LIBOBJS"; then
28969       # Remove the extension.
28970       sed_drop_objext='s/\.o$//;s/\.obj$//'
28971       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28972         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28973         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28974       done
28975     fi
28976     gltests_LIBOBJS=$gltests_libobjs
28977
28978     gltests_LTLIBOBJS=$gltests_ltlibobjs
28979
28980
28981
28982 : "${CONFIG_STATUS=./config.status}"
28983 ac_write_fail=0
28984 ac_clean_files_save=$ac_clean_files
28985 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28987 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
28988 as_write_fail=0
28989 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28990 #! $SHELL
28991 # Generated by $as_me.
28992 # Run this file to recreate the current configuration.
28993 # Compiler output produced by configure, useful for debugging
28994 # configure, is in config.log if it exists.
28995
28996 debug=false
28997 ac_cs_recheck=false
28998 ac_cs_silent=false
28999
29000 SHELL=\${CONFIG_SHELL-$SHELL}
29001 export SHELL
29002 _ASEOF
29003 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29004 ## -------------------- ##
29005 ## M4sh Initialization. ##
29006 ## -------------------- ##
29007
29008 # Be more Bourne compatible
29009 DUALCASE=1; export DUALCASE # for MKS sh
29010 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29011   emulate sh
29012   NULLCMD=:
29013   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29014   # is contrary to our usage.  Disable this feature.
29015   alias -g '${1+"$@"}'='"$@"'
29016   setopt NO_GLOB_SUBST
29017 else
29018   case `(set -o) 2>/dev/null` in #(
29019   *posix*) :
29020     set -o posix ;; #(
29021   *) :
29022      ;;
29023 esac
29024 fi
29025
29026
29027 # The user is always right.
29028 if test "${PATH_SEPARATOR+set}" != set; then
29029   PATH_SEPARATOR=:
29030   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29031     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29032       PATH_SEPARATOR=';'
29033   }
29034 fi
29035
29036
29037 # IFS
29038 # We need space, tab and new line, in precisely that order.  Quoting is
29039 # there to prevent editors from complaining about space-tab.
29040 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29041 # splitting by setting IFS to empty value.)
29042 as_nl='
29043 '
29044 export as_nl
29045 IFS=" ""        $as_nl"
29046
29047 # Find who we are.  Look in the path if we contain no directory separator.
29048 as_myself=
29049 case $0 in #((
29050   *[\\/]* ) as_myself=$0 ;;
29051   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29052 for as_dir in $PATH
29053 do
29054   IFS=$as_save_IFS
29055   case $as_dir in #(((
29056     '') as_dir=./ ;;
29057     */) ;;
29058     *) as_dir=$as_dir/ ;;
29059   esac
29060     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
29061   done
29062 IFS=$as_save_IFS
29063
29064      ;;
29065 esac
29066 # We did not find ourselves, most probably we were run as `sh COMMAND'
29067 # in which case we are not to be found in the path.
29068 if test "x$as_myself" = x; then
29069   as_myself=$0
29070 fi
29071 if test ! -f "$as_myself"; then
29072   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29073   exit 1
29074 fi
29075
29076 # Unset variables that we do not need and which cause bugs (e.g. in
29077 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
29078 # suppresses any "Segmentation fault" message there.  '((' could
29079 # trigger a bug in pdksh 5.2.14.
29080 for as_var in BASH_ENV ENV MAIL MAILPATH
29081 do eval test x\${$as_var+set} = xset \
29082   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29083 done
29084 PS1='$ '
29085 PS2='> '
29086 PS4='+ '
29087
29088 # NLS nuisances.
29089 LC_ALL=C
29090 export LC_ALL
29091 LANGUAGE=C
29092 export LANGUAGE
29093
29094 # CDPATH.
29095 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29096
29097
29098 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29099 # ----------------------------------------
29100 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29101 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29102 # script with STATUS, using 1 if that was 0.
29103 as_fn_error ()
29104 {
29105   as_status=$1; test $as_status -eq 0 && as_status=1
29106   if test "$4"; then
29107     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29108     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29109   fi
29110   printf "%s\n" "$as_me: error: $2" >&2
29111   as_fn_exit $as_status
29112 } # as_fn_error
29113
29114
29115 # as_fn_set_status STATUS
29116 # -----------------------
29117 # Set $? to STATUS, without forking.
29118 as_fn_set_status ()
29119 {
29120   return $1
29121 } # as_fn_set_status
29122
29123 # as_fn_exit STATUS
29124 # -----------------
29125 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29126 as_fn_exit ()
29127 {
29128   set +e
29129   as_fn_set_status $1
29130   exit $1
29131 } # as_fn_exit
29132
29133 # as_fn_unset VAR
29134 # ---------------
29135 # Portably unset VAR.
29136 as_fn_unset ()
29137 {
29138   { eval $1=; unset $1;}
29139 }
29140 as_unset=as_fn_unset
29141 # as_fn_append VAR VALUE
29142 # ----------------------
29143 # Append the text in VALUE to the end of the definition contained in VAR. Take
29144 # advantage of any shell optimizations that allow amortized linear growth over
29145 # repeated appends, instead of the typical quadratic growth present in naive
29146 # implementations.
29147 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29148   eval 'as_fn_append ()
29149   {
29150     eval $1+=\$2
29151   }'
29152 else
29153   as_fn_append ()
29154   {
29155     eval $1=\$$1\$2
29156   }
29157 fi # as_fn_append
29158
29159 # as_fn_arith ARG...
29160 # ------------------
29161 # Perform arithmetic evaluation on the ARGs, and store the result in the
29162 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29163 # must be portable across $(()) and expr.
29164 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29165   eval 'as_fn_arith ()
29166   {
29167     as_val=$(( $* ))
29168   }'
29169 else
29170   as_fn_arith ()
29171   {
29172     as_val=`expr "$@" || test $? -eq 1`
29173   }
29174 fi # as_fn_arith
29175
29176
29177 if expr a : '\(a\)' >/dev/null 2>&1 &&
29178    test "X`expr 00001 : '.*\(...\)'`" = X001; then
29179   as_expr=expr
29180 else
29181   as_expr=false
29182 fi
29183
29184 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29185   as_basename=basename
29186 else
29187   as_basename=false
29188 fi
29189
29190 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29191   as_dirname=dirname
29192 else
29193   as_dirname=false
29194 fi
29195
29196 as_me=`$as_basename -- "$0" ||
29197 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29198          X"$0" : 'X\(//\)$' \| \
29199          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29200 printf "%s\n" X/"$0" |
29201     sed '/^.*\/\([^/][^/]*\)\/*$/{
29202             s//\1/
29203             q
29204           }
29205           /^X\/\(\/\/\)$/{
29206             s//\1/
29207             q
29208           }
29209           /^X\/\(\/\).*/{
29210             s//\1/
29211             q
29212           }
29213           s/.*/./; q'`
29214
29215 # Avoid depending upon Character Ranges.
29216 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29217 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29218 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29219 as_cr_digits='0123456789'
29220 as_cr_alnum=$as_cr_Letters$as_cr_digits
29221
29222 ECHO_C= ECHO_N= ECHO_T=
29223 case `echo -n x` in #(((((
29224 -n*)
29225   case `echo 'xy\c'` in
29226   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
29227   xy)  ECHO_C='\c';;
29228   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
29229        ECHO_T=' ';;
29230   esac;;
29231 *)
29232   ECHO_N='-n';;
29233 esac
29234
29235 rm -f conf$$ conf$$.exe conf$$.file
29236 if test -d conf$$.dir; then
29237   rm -f conf$$.dir/conf$$.file
29238 else
29239   rm -f conf$$.dir
29240   mkdir conf$$.dir 2>/dev/null
29241 fi
29242 if (echo >conf$$.file) 2>/dev/null; then
29243   if ln -s conf$$.file conf$$ 2>/dev/null; then
29244     as_ln_s='ln -s'
29245     # ... but there are two gotchas:
29246     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29247     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29248     # In both cases, we have to default to `cp -pR'.
29249     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29250       as_ln_s='cp -pR'
29251   elif ln conf$$.file conf$$ 2>/dev/null; then
29252     as_ln_s=ln
29253   else
29254     as_ln_s='cp -pR'
29255   fi
29256 else
29257   as_ln_s='cp -pR'
29258 fi
29259 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29260 rmdir conf$$.dir 2>/dev/null
29261
29262
29263 # as_fn_mkdir_p
29264 # -------------
29265 # Create "$as_dir" as a directory, including parents if necessary.
29266 as_fn_mkdir_p ()
29267 {
29268
29269   case $as_dir in #(
29270   -*) as_dir=./$as_dir;;
29271   esac
29272   test -d "$as_dir" || eval $as_mkdir_p || {
29273     as_dirs=
29274     while :; do
29275       case $as_dir in #(
29276       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29277       *) as_qdir=$as_dir;;
29278       esac
29279       as_dirs="'$as_qdir' $as_dirs"
29280       as_dir=`$as_dirname -- "$as_dir" ||
29281 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29282          X"$as_dir" : 'X\(//\)[^/]' \| \
29283          X"$as_dir" : 'X\(//\)$' \| \
29284          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29285 printf "%s\n" X"$as_dir" |
29286     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29287             s//\1/
29288             q
29289           }
29290           /^X\(\/\/\)[^/].*/{
29291             s//\1/
29292             q
29293           }
29294           /^X\(\/\/\)$/{
29295             s//\1/
29296             q
29297           }
29298           /^X\(\/\).*/{
29299             s//\1/
29300             q
29301           }
29302           s/.*/./; q'`
29303       test -d "$as_dir" && break
29304     done
29305     test -z "$as_dirs" || eval "mkdir $as_dirs"
29306   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29307
29308
29309 } # as_fn_mkdir_p
29310 if mkdir -p . 2>/dev/null; then
29311   as_mkdir_p='mkdir -p "$as_dir"'
29312 else
29313   test -d ./-p && rmdir ./-p
29314   as_mkdir_p=false
29315 fi
29316
29317
29318 # as_fn_executable_p FILE
29319 # -----------------------
29320 # Test if FILE is an executable regular file.
29321 as_fn_executable_p ()
29322 {
29323   test -f "$1" && test -x "$1"
29324 } # as_fn_executable_p
29325 as_test_x='test -x'
29326 as_executable_p=as_fn_executable_p
29327
29328 # Sed expression to map a string onto a valid CPP name.
29329 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29330
29331 # Sed expression to map a string onto a valid variable name.
29332 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29333
29334
29335 exec 6>&1
29336 ## ----------------------------------- ##
29337 ## Main body of $CONFIG_STATUS script. ##
29338 ## ----------------------------------- ##
29339 _ASEOF
29340 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29341
29342 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29343 # Save the log message, to keep $0 and so on meaningful, and to
29344 # report actual input values of CONFIG_FILES etc. instead of their
29345 # values after options handling.
29346 ac_log="
29347 This file was extended by gzip $as_me 1.6, which was
29348 generated by GNU Autoconf 2.69.97-b1aba91.  Invocation command line was
29349
29350   CONFIG_FILES    = $CONFIG_FILES
29351   CONFIG_HEADERS  = $CONFIG_HEADERS
29352   CONFIG_LINKS    = $CONFIG_LINKS
29353   CONFIG_COMMANDS = $CONFIG_COMMANDS
29354   $ $0 $@
29355
29356 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29357 "
29358
29359 _ACEOF
29360
29361 case $ac_config_files in *"
29362 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29363 esac
29364
29365 case $ac_config_headers in *"
29366 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29367 esac
29368
29369
29370 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29371 # Files that config.status was made for.
29372 config_files="$ac_config_files"
29373 config_headers="$ac_config_headers"
29374 config_links="$ac_config_links"
29375 config_commands="$ac_config_commands"
29376
29377 _ACEOF
29378
29379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29380 ac_cs_usage="\
29381 \`$as_me' instantiates files and other configuration actions
29382 from templates according to the current configuration.  Unless the files
29383 and actions are specified as TAGs, all are instantiated by default.
29384
29385 Usage: $0 [OPTION]... [TAG]...
29386
29387   -h, --help       print this help, then exit
29388   -V, --version    print version number and configuration settings, then exit
29389       --config     print configuration, then exit
29390   -q, --quiet, --silent
29391                    do not print progress messages
29392   -d, --debug      don't remove temporary files
29393       --recheck    update $as_me by reconfiguring in the same conditions
29394       --file=FILE[:TEMPLATE]
29395                    instantiate the configuration file FILE
29396       --header=FILE[:TEMPLATE]
29397                    instantiate the configuration header FILE
29398
29399 Configuration files:
29400 $config_files
29401
29402 Configuration headers:
29403 $config_headers
29404
29405 Configuration links:
29406 $config_links
29407
29408 Configuration commands:
29409 $config_commands
29410
29411 Report bugs to <bug-gzip@gnu.org>."
29412
29413 _ACEOF
29414 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29415 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29416 ac_cs_version="\\
29417 gzip config.status 1.6
29418 configured by $0, generated by GNU Autoconf 2.69.97-b1aba91,
29419   with options \\"\$ac_cs_config\\"
29420
29421 Copyright (C) 2013 Free Software Foundation, Inc.
29422 This config.status script is free software; the Free Software Foundation
29423 gives unlimited permission to copy, distribute and modify it."
29424
29425 ac_pwd='$ac_pwd'
29426 srcdir='$srcdir'
29427 INSTALL='$INSTALL'
29428 MKDIR_P='$MKDIR_P'
29429 AWK='$AWK'
29430 test -n "\$AWK" || AWK=awk
29431 _ACEOF
29432
29433 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29434 # The default lists apply if the user does not specify any file.
29435 ac_need_defaults=:
29436 while test $# != 0
29437 do
29438   case $1 in
29439   --*=?*)
29440     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29441     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29442     ac_shift=:
29443     ;;
29444   --*=)
29445     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29446     ac_optarg=
29447     ac_shift=:
29448     ;;
29449   *)
29450     ac_option=$1
29451     ac_optarg=$2
29452     ac_shift=shift
29453     ;;
29454   esac
29455
29456   case $ac_option in
29457   # Handling of the options.
29458   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29459     ac_cs_recheck=: ;;
29460   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29461     printf "%s\n" "$ac_cs_version"; exit ;;
29462   --config | --confi | --conf | --con | --co | --c )
29463     printf "%s\n" "$ac_cs_config"; exit ;;
29464   --debug | --debu | --deb | --de | --d | -d )
29465     debug=: ;;
29466   --file | --fil | --fi | --f )
29467     $ac_shift
29468     case $ac_optarg in
29469     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29470     '') as_fn_error $? "missing file argument" ;;
29471     esac
29472     as_fn_append CONFIG_FILES " '$ac_optarg'"
29473     ac_need_defaults=false;;
29474   --header | --heade | --head | --hea )
29475     $ac_shift
29476     case $ac_optarg in
29477     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29478     esac
29479     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29480     ac_need_defaults=false;;
29481   --he | --h)
29482     # Conflict between --help and --header
29483     as_fn_error $? "ambiguous option: \`$1'
29484 Try \`$0 --help' for more information.";;
29485   --help | --hel | -h )
29486     printf "%s\n" "$ac_cs_usage"; exit ;;
29487   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29488   | -silent | --silent | --silen | --sile | --sil | --si | --s)
29489     ac_cs_silent=: ;;
29490
29491   # This is an error.
29492   -*) as_fn_error $? "unrecognized option: \`$1'
29493 Try \`$0 --help' for more information." ;;
29494
29495   *) as_fn_append ac_config_targets " $1"
29496      ac_need_defaults=false ;;
29497
29498   esac
29499   shift
29500 done
29501
29502 ac_configure_extra_args=
29503
29504 if $ac_cs_silent; then
29505   exec 6>/dev/null
29506   ac_configure_extra_args="$ac_configure_extra_args --silent"
29507 fi
29508
29509 _ACEOF
29510 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29511 if \$ac_cs_recheck; then
29512   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29513   shift
29514   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
29515   CONFIG_SHELL='$SHELL'
29516   export CONFIG_SHELL
29517   exec "\$@"
29518 fi
29519
29520 _ACEOF
29521 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29522 exec 5>>config.log
29523 {
29524   echo
29525   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29526 ## Running $as_me. ##
29527 _ASBOX
29528   printf "%s\n" "$ac_log"
29529 } >&5
29530
29531 _ACEOF
29532 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29533 #
29534 # INIT-COMMANDS
29535 #
29536 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29537 GNUmakefile=$GNUmakefile
29538
29539 _ACEOF
29540
29541 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29542
29543 # Handling of arguments.
29544 for ac_config_target in $ac_config_targets
29545 do
29546   case $ac_config_target in
29547     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
29548     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29549     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
29550     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29551     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29552     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29553     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29554
29555   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29556   esac
29557 done
29558
29559
29560 # If the user did not use the arguments to specify the items to instantiate,
29561 # then the envvar interface is used.  Set only those that are not.
29562 # We use the long form for the default assignment because of an extremely
29563 # bizarre bug on SunOS 4.1.3.
29564 if $ac_need_defaults; then
29565   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29566   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29567   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
29568   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29569 fi
29570
29571 # Have a temporary directory for convenience.  Make it in the build tree
29572 # simply because there is no reason against having it here, and in addition,
29573 # creating and moving files from /tmp can sometimes cause problems.
29574 # Hook for its removal unless debugging.
29575 # Note that there is a small window in which the directory will not be cleaned:
29576 # after its creation but before its name has been assigned to `$tmp'.
29577 $debug ||
29578 {
29579   tmp= ac_tmp=
29580   trap 'exit_status=$?
29581   : "${ac_tmp:=$tmp}"
29582   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29583 ' 0
29584   trap 'as_fn_exit 1' 1 2 13 15
29585 }
29586 # Create a (secure) tmp directory for tmp files.
29587
29588 {
29589   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29590   test -d "$tmp"
29591 }  ||
29592 {
29593   tmp=./conf$$-$RANDOM
29594   (umask 077 && mkdir "$tmp")
29595 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29596 ac_tmp=$tmp
29597
29598 # Set up the scripts for CONFIG_FILES section.
29599 # No need to generate them if there are no CONFIG_FILES.
29600 # This happens for instance with `./config.status config.h'.
29601 if test -n "$CONFIG_FILES"; then
29602
29603
29604 ac_cr=`echo X | tr X '\015'`
29605 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29606 # But we know of no other shell where ac_cr would be empty at this
29607 # point, so we can use a bashism as a fallback.
29608 if test "x$ac_cr" = x; then
29609   eval ac_cr=\$\'\\r\'
29610 fi
29611 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29612 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29613   ac_cs_awk_cr='\\r'
29614 else
29615   ac_cs_awk_cr=$ac_cr
29616 fi
29617
29618 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29619 _ACEOF
29620
29621
29622 {
29623   echo "cat >conf$$subs.awk <<_ACEOF" &&
29624   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29625   echo "_ACEOF"
29626 } >conf$$subs.sh ||
29627   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29628 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29629 ac_delim='%!_!# '
29630 for ac_last_try in false false false false false :; do
29631   . ./conf$$subs.sh ||
29632     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29633
29634   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29635   if test $ac_delim_n = $ac_delim_num; then
29636     break
29637   elif $ac_last_try; then
29638     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29639   else
29640     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29641   fi
29642 done
29643 rm -f conf$$subs.sh
29644
29645 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29646 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29647 _ACEOF
29648 sed -n '
29649 h
29650 s/^/S["/; s/!.*/"]=/
29651 p
29652 g
29653 s/^[^!]*!//
29654 :repl
29655 t repl
29656 s/'"$ac_delim"'$//
29657 t delim
29658 :nl
29659 h
29660 s/\(.\{148\}\)..*/\1/
29661 t more1
29662 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29663 p
29664 n
29665 b repl
29666 :more1
29667 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29668 p
29669 g
29670 s/.\{148\}//
29671 t nl
29672 :delim
29673 h
29674 s/\(.\{148\}\)..*/\1/
29675 t more2
29676 s/["\\]/\\&/g; s/^/"/; s/$/"/
29677 p
29678 b
29679 :more2
29680 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29681 p
29682 g
29683 s/.\{148\}//
29684 t delim
29685 ' <conf$$subs.awk | sed '
29686 /^[^""]/{
29687   N
29688   s/\n//
29689 }
29690 ' >>$CONFIG_STATUS || ac_write_fail=1
29691 rm -f conf$$subs.awk
29692 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29693 _ACAWK
29694 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29695   for (key in S) S_is_set[key] = 1
29696   FS = "\a"
29697
29698 }
29699 {
29700   line = $ 0
29701   nfields = split(line, field, "@")
29702   substed = 0
29703   len = length(field[1])
29704   for (i = 2; i < nfields; i++) {
29705     key = field[i]
29706     keylen = length(key)
29707     if (S_is_set[key]) {
29708       value = S[key]
29709       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29710       len += length(value) + length(field[++i])
29711       substed = 1
29712     } else
29713       len += 1 + keylen
29714   }
29715
29716   print line
29717 }
29718
29719 _ACAWK
29720 _ACEOF
29721 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29722 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29723   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29724 else
29725   cat
29726 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29727   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29728 _ACEOF
29729
29730 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29731 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29732 # trailing colons and then remove the whole line if VPATH becomes empty
29733 # (actually we leave an empty line to preserve line numbers).
29734 if test "x$srcdir" = x.; then
29735   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
29736 h
29737 s///
29738 s/^/:/
29739 s/[      ]*$/:/
29740 s/:\$(srcdir):/:/g
29741 s/:\${srcdir}:/:/g
29742 s/:@srcdir@:/:/g
29743 s/^:*//
29744 s/:*$//
29745 x
29746 s/\(=[   ]*\).*/\1/
29747 G
29748 s/\n//
29749 s/^[^=]*=[       ]*$//
29750 }'
29751 fi
29752
29753 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29754 fi # test -n "$CONFIG_FILES"
29755
29756 # Set up the scripts for CONFIG_HEADERS section.
29757 # No need to generate them if there are no CONFIG_HEADERS.
29758 # This happens for instance with `./config.status Makefile'.
29759 if test -n "$CONFIG_HEADERS"; then
29760 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29761 BEGIN {
29762 _ACEOF
29763
29764 # Transform confdefs.h into an awk script `defines.awk', embedded as
29765 # here-document in config.status, that substitutes the proper values into
29766 # config.h.in to produce config.h.
29767
29768 # Create a delimiter string that does not exist in confdefs.h, to ease
29769 # handling of long lines.
29770 ac_delim='%!_!# '
29771 for ac_last_try in false false :; do
29772   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29773   if test -z "$ac_tt"; then
29774     break
29775   elif $ac_last_try; then
29776     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29777   else
29778     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29779   fi
29780 done
29781
29782 # For the awk script, D is an array of macro values keyed by name,
29783 # likewise P contains macro parameters if any.  Preserve backslash
29784 # newline sequences.
29785
29786 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29787 sed -n '
29788 s/.\{148\}/&'"$ac_delim"'/g
29789 t rset
29790 :rset
29791 s/^[     ]*#[    ]*define[       ][      ]*/ /
29792 t def
29793 d
29794 :def
29795 s/\\$//
29796 t bsnl
29797 s/["\\]/\\&/g
29798 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
29799 D["\1"]=" \3"/p
29800 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
29801 d
29802 :bsnl
29803 s/["\\]/\\&/g
29804 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
29805 D["\1"]=" \3\\\\\\n"\\/p
29806 t cont
29807 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29808 t cont
29809 d
29810 :cont
29811 n
29812 s/.\{148\}/&'"$ac_delim"'/g
29813 t clear
29814 :clear
29815 s/\\$//
29816 t bsnlc
29817 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29818 d
29819 :bsnlc
29820 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29821 b cont
29822 ' <confdefs.h | sed '
29823 s/'"$ac_delim"'/"\\\
29824 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29825
29826 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29827   for (key in D) D_is_set[key] = 1
29828   FS = "\a"
29829 }
29830 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29831   line = \$ 0
29832   split(line, arg, " ")
29833   if (arg[1] == "#") {
29834     defundef = arg[2]
29835     mac1 = arg[3]
29836   } else {
29837     defundef = substr(arg[1], 2)
29838     mac1 = arg[2]
29839   }
29840   split(mac1, mac2, "(") #)
29841   macro = mac2[1]
29842   prefix = substr(line, 1, index(line, defundef) - 1)
29843   if (D_is_set[macro]) {
29844     # Preserve the white space surrounding the "#".
29845     print prefix "define", macro P[macro] D[macro]
29846     next
29847   } else {
29848     # Replace #undef with comments.  This is necessary, for example,
29849     # in the case of _POSIX_SOURCE, which is predefined and required
29850     # on some systems where configure will not decide to define it.
29851     if (defundef == "undef") {
29852       print "/*", prefix defundef, macro, "*/"
29853       next
29854     }
29855   }
29856 }
29857 { print }
29858 _ACAWK
29859 _ACEOF
29860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29861   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
29862 fi # test -n "$CONFIG_HEADERS"
29863
29864
29865 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
29866 shift
29867 for ac_tag
29868 do
29869   case $ac_tag in
29870   :[FHLC]) ac_mode=$ac_tag; continue;;
29871   esac
29872   case $ac_mode$ac_tag in
29873   :[FHL]*:*);;
29874   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
29875   :[FH]-) ac_tag=-:-;;
29876   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29877   esac
29878   ac_save_IFS=$IFS
29879   IFS=:
29880   set x $ac_tag
29881   IFS=$ac_save_IFS
29882   shift
29883   ac_file=$1
29884   shift
29885
29886   case $ac_mode in
29887   :L) ac_source=$1;;
29888   :[FH])
29889     ac_file_inputs=
29890     for ac_f
29891     do
29892       case $ac_f in
29893       -) ac_f="$ac_tmp/stdin";;
29894       *) # Look for the file first in the build tree, then in the source tree
29895          # (if the path is not absolute).  The absolute path cannot be DOS-style,
29896          # because $ac_f cannot contain `:'.
29897          test -f "$ac_f" ||
29898            case $ac_f in
29899            [\\/$]*) false;;
29900            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29901            esac ||
29902            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29903       esac
29904       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29905       as_fn_append ac_file_inputs " '$ac_f'"
29906     done
29907
29908     # Let's still pretend it is `configure' which instantiates (i.e., don't
29909     # use $as_me), people would be surprised to read:
29910     #    /* config.h.  Generated by config.status.  */
29911     configure_input='Generated from '`
29912           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29913         `' by configure.'
29914     if test x"$ac_file" != x-; then
29915       configure_input="$ac_file.  $configure_input"
29916       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29917 printf "%s\n" "$as_me: creating $ac_file" >&6;}
29918     fi
29919     # Neutralize special characters interpreted by sed in replacement strings.
29920     case $configure_input in #(
29921     *\&* | *\|* | *\\* )
29922        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
29923        sed 's/[\\\\&|]/\\\\&/g'`;; #(
29924     *) ac_sed_conf_input=$configure_input;;
29925     esac
29926
29927     case $ac_tag in
29928     *:-:* | *:-) cat >"$ac_tmp/stdin" \
29929       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
29930     esac
29931     ;;
29932   esac
29933
29934   ac_dir=`$as_dirname -- "$ac_file" ||
29935 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29936          X"$ac_file" : 'X\(//\)[^/]' \| \
29937          X"$ac_file" : 'X\(//\)$' \| \
29938          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29939 printf "%s\n" X"$ac_file" |
29940     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29941             s//\1/
29942             q
29943           }
29944           /^X\(\/\/\)[^/].*/{
29945             s//\1/
29946             q
29947           }
29948           /^X\(\/\/\)$/{
29949             s//\1/
29950             q
29951           }
29952           /^X\(\/\).*/{
29953             s//\1/
29954             q
29955           }
29956           s/.*/./; q'`
29957   as_dir="$ac_dir"; as_fn_mkdir_p
29958   ac_builddir=.
29959
29960 case "$ac_dir" in
29961 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29962 *)
29963   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
29964   # A ".." for each directory in $ac_dir_suffix.
29965   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29966   case $ac_top_builddir_sub in
29967   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29968   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29969   esac ;;
29970 esac
29971 ac_abs_top_builddir=$ac_pwd
29972 ac_abs_builddir=$ac_pwd$ac_dir_suffix
29973 # for backward compatibility:
29974 ac_top_builddir=$ac_top_build_prefix
29975
29976 case $srcdir in
29977   .)  # We are building in place.
29978     ac_srcdir=.
29979     ac_top_srcdir=$ac_top_builddir_sub
29980     ac_abs_top_srcdir=$ac_pwd ;;
29981   [\\/]* | ?:[\\/]* )  # Absolute name.
29982     ac_srcdir=$srcdir$ac_dir_suffix;
29983     ac_top_srcdir=$srcdir
29984     ac_abs_top_srcdir=$srcdir ;;
29985   *) # Relative name.
29986     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29987     ac_top_srcdir=$ac_top_build_prefix$srcdir
29988     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29989 esac
29990 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29991
29992
29993   case $ac_mode in
29994   :F)
29995   #
29996   # CONFIG_FILE
29997   #
29998
29999   case $INSTALL in
30000   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30001   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30002   esac
30003   ac_MKDIR_P=$MKDIR_P
30004   case $MKDIR_P in
30005   [\\/$]* | ?:[\\/]* ) ;;
30006   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30007   esac
30008 _ACEOF
30009
30010 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30011 # If the template does not know about datarootdir, expand it.
30012 # FIXME: This hack should be removed a few years after 2.60.
30013 ac_datarootdir_hack=; ac_datarootdir_seen=
30014 ac_sed_dataroot='
30015 /datarootdir/ {
30016   p
30017   q
30018 }
30019 /@datadir@/p
30020 /@docdir@/p
30021 /@infodir@/p
30022 /@localedir@/p
30023 /@mandir@/p'
30024 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30025 *datarootdir*) ac_datarootdir_seen=yes;;
30026 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30027   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30028 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30029 _ACEOF
30030 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30031   ac_datarootdir_hack='
30032   s&@datadir@&$datadir&g
30033   s&@docdir@&$docdir&g
30034   s&@infodir@&$infodir&g
30035   s&@localedir@&$localedir&g
30036   s&@mandir@&$mandir&g
30037   s&\\\${datarootdir}&$datarootdir&g' ;;
30038 esac
30039 _ACEOF
30040
30041 # Neutralize VPATH when `$srcdir' = `.'.
30042 # Shell code in configure.ac might set extrasub.
30043 # FIXME: do we really want to maintain this feature?
30044 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30045 ac_sed_extra="$ac_vpsub
30046 $extrasub
30047 _ACEOF
30048 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30049 :t
30050 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30051 s|@configure_input@|$ac_sed_conf_input|;t t
30052 s&@top_builddir@&$ac_top_builddir_sub&;t t
30053 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30054 s&@srcdir@&$ac_srcdir&;t t
30055 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30056 s&@top_srcdir@&$ac_top_srcdir&;t t
30057 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30058 s&@builddir@&$ac_builddir&;t t
30059 s&@abs_builddir@&$ac_abs_builddir&;t t
30060 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30061 s&@INSTALL@&$ac_INSTALL&;t t
30062 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30063 $ac_datarootdir_hack
30064 "
30065 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30066   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30067
30068 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30069   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30070   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
30071       "$ac_tmp/out"`; test -z "$ac_out"; } &&
30072   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30073 which seems to be undefined.  Please make sure it is defined" >&5
30074 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30075 which seems to be undefined.  Please make sure it is defined" >&2;}
30076
30077   rm -f "$ac_tmp/stdin"
30078   case $ac_file in
30079   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30080   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30081   esac \
30082   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30083  ;;
30084   :H)
30085   #
30086   # CONFIG_HEADER
30087   #
30088   if test x"$ac_file" != x-; then
30089     {
30090       printf "%s\n" "/* $configure_input  */" \
30091       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30092     } >"$ac_tmp/config.h" \
30093       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30094     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30095       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30096 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
30097     else
30098       rm -f "$ac_file"
30099       mv "$ac_tmp/config.h" "$ac_file" \
30100         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30101     fi
30102   else
30103     printf "%s\n" "/* $configure_input  */" \
30104       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30105       || as_fn_error $? "could not create -" "$LINENO" 5
30106   fi
30107 # Compute "$ac_file"'s index in $config_headers.
30108 _am_arg="$ac_file"
30109 _am_stamp_count=1
30110 for _am_header in $config_headers :; do
30111   case $_am_header in
30112     $_am_arg | $_am_arg:* )
30113       break ;;
30114     * )
30115       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30116   esac
30117 done
30118 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30119 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30120          X"$_am_arg" : 'X\(//\)[^/]' \| \
30121          X"$_am_arg" : 'X\(//\)$' \| \
30122          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30123 printf "%s\n" X"$_am_arg" |
30124     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30125             s//\1/
30126             q
30127           }
30128           /^X\(\/\/\)[^/].*/{
30129             s//\1/
30130             q
30131           }
30132           /^X\(\/\/\)$/{
30133             s//\1/
30134             q
30135           }
30136           /^X\(\/\).*/{
30137             s//\1/
30138             q
30139           }
30140           s/.*/./; q'`/stamp-h$_am_stamp_count
30141  ;;
30142   :L)
30143   #
30144   # CONFIG_LINK
30145   #
30146
30147   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30148     :
30149   else
30150     # Prefer the file from the source tree if names are identical.
30151     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30152       ac_source=$srcdir/$ac_source
30153     fi
30154
30155     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
30156 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
30157
30158     if test ! -r "$ac_source"; then
30159       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
30160     fi
30161     rm -f "$ac_file"
30162
30163     # Try a relative symlink, then a hard link, then a copy.
30164     case $ac_source in
30165     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30166         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30167     esac
30168     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30169       ln "$ac_source" "$ac_file" 2>/dev/null ||
30170       cp -p "$ac_source" "$ac_file" ||
30171       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
30172   fi
30173  ;;
30174   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30175 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
30176  ;;
30177   esac
30178
30179
30180   case $ac_file$ac_mode in
30181     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30182   # Older Autoconf quotes --file arguments for eval, but not when files
30183   # are listed without --file.  Let's play safe and only enable the eval
30184   # if we detect the quoting.
30185   case $CONFIG_FILES in
30186   *\'*) eval set x "$CONFIG_FILES" ;;
30187   *)   set x $CONFIG_FILES ;;
30188   esac
30189   shift
30190   for mf
30191   do
30192     # Strip MF so we end up with the name of the file.
30193     mf=`echo "$mf" | sed -e 's/:.*$//'`
30194     # Check whether this is an Automake generated Makefile or not.
30195     # We used to match only the files named 'Makefile.in', but
30196     # some people rename them; so instead we look at the file content.
30197     # Grep'ing the first line is not enough: some people post-process
30198     # each Makefile.in and add a new line on top of each file to say so.
30199     # Grep'ing the whole file is not good either: AIX grep has a line
30200     # limit of 2048, but all sed's we know have understand at least 4000.
30201     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30202       dirpart=`$as_dirname -- "$mf" ||
30203 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30204          X"$mf" : 'X\(//\)[^/]' \| \
30205          X"$mf" : 'X\(//\)$' \| \
30206          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30207 printf "%s\n" X"$mf" |
30208     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30209             s//\1/
30210             q
30211           }
30212           /^X\(\/\/\)[^/].*/{
30213             s//\1/
30214             q
30215           }
30216           /^X\(\/\/\)$/{
30217             s//\1/
30218             q
30219           }
30220           /^X\(\/\).*/{
30221             s//\1/
30222             q
30223           }
30224           s/.*/./; q'`
30225     else
30226       continue
30227     fi
30228     # Extract the definition of DEPDIR, am__include, and am__quote
30229     # from the Makefile without running 'make'.
30230     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30231     test -z "$DEPDIR" && continue
30232     am__include=`sed -n 's/^am__include = //p' < "$mf"`
30233     test -z "$am__include" && continue
30234     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30235     # Find all dependency output files, they are included files with
30236     # $(DEPDIR) in their names.  We invoke sed twice because it is the
30237     # simplest approach to changing $(DEPDIR) to its actual value in the
30238     # expansion.
30239     for file in `sed -n "
30240       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30241          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
30242       # Make sure the directory exists.
30243       test -f "$dirpart/$file" && continue
30244       fdir=`$as_dirname -- "$file" ||
30245 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30246          X"$file" : 'X\(//\)[^/]' \| \
30247          X"$file" : 'X\(//\)$' \| \
30248          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30249 printf "%s\n" X"$file" |
30250     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30251             s//\1/
30252             q
30253           }
30254           /^X\(\/\/\)[^/].*/{
30255             s//\1/
30256             q
30257           }
30258           /^X\(\/\/\)$/{
30259             s//\1/
30260             q
30261           }
30262           /^X\(\/\).*/{
30263             s//\1/
30264             q
30265           }
30266           s/.*/./; q'`
30267       as_dir=$dirpart/$fdir; as_fn_mkdir_p
30268       # echo "creating $dirpart/$file"
30269       echo '# dummy' > "$dirpart/$file"
30270     done
30271   done
30272 }
30273  ;;
30274
30275   esac
30276 done # for ac_tag
30277
30278
30279 as_fn_exit 0
30280 _ACEOF
30281 ac_clean_files=$ac_clean_files_save
30282
30283 test $ac_write_fail = 0 ||
30284   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30285
30286
30287 # configure is writing to config.log, and then calls config.status.
30288 # config.status does its own redirection, appending to config.log.
30289 # Unfortunately, on DOS this fails, as config.log is still kept open
30290 # by configure, so config.status won't be able to write to it; its
30291 # output is simply discarded.  So we exec the FD to /dev/null,
30292 # effectively closing config.log, so it can be properly (re)opened and
30293 # appended to by config.status.  When coming back to configure, we
30294 # need to make the FD available again.
30295 if test "$no_create" != yes; then
30296   ac_cs_success=:
30297   ac_config_status_args=
30298   test "$silent" = yes &&
30299     ac_config_status_args="$ac_config_status_args --quiet"
30300   exec 5>/dev/null
30301   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30302   exec 5>>config.log
30303   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30304   # would make configure fail if this is the last instruction.
30305   $ac_cs_success || as_fn_exit 1
30306 fi
30307 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30308   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30309 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30310 fi
30311