New upstream version 1.8
[debian/gzip] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.147-5ad35 for gzip 1.8.
4 #
5 # Report bugs to <bug-gzip@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2015 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 ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20 then :
21   emulate sh
22   NULLCMD=:
23   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24   # is contrary to our usage.  Disable this feature.
25   alias -g '${1+"$@"}'='"$@"'
26   setopt NO_GLOB_SUBST
27 else
28   case `(set -o) 2>/dev/null` in #(
29   *posix*) :
30     set -o posix ;; #(
31   *) :
32      ;;
33 esac
34 fi
35
36
37 # The user is always right.
38 if ${PATH_SEPARATOR+false} :; then
39   PATH_SEPARATOR=:
40   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
41     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
42       PATH_SEPARATOR=';'
43   }
44 fi
45
46
47 # IFS
48 # We need space, tab and new line, in precisely that order.  Quoting is
49 # there to prevent editors from complaining about space-tab.
50 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51 # splitting by setting IFS to empty value.)
52 as_nl='
53 '
54 export as_nl
55 IFS=" ""        $as_nl"
56
57 # Find who we are.  Look in the path if we contain no directory separator.
58 as_myself=
59 case $0 in #((
60   *[\\/]* ) as_myself=$0 ;;
61   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62 for as_dir in $PATH
63 do
64   IFS=$as_save_IFS
65   case $as_dir in #(((
66     '') as_dir=./ ;;
67     */) ;;
68     *) as_dir=$as_dir/ ;;
69   esac
70     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
71   done
72 IFS=$as_save_IFS
73
74      ;;
75 esac
76 # We did not find ourselves, most probably we were run as `sh COMMAND'
77 # in which case we are not to be found in the path.
78 if test "x$as_myself" = x; then
79   as_myself=$0
80 fi
81 if test ! -f "$as_myself"; then
82   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
83   exit 1
84 fi
85
86 # Unset variables that we do not need and which cause bugs (e.g. in
87 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
88 # suppresses any "Segmentation fault" message there.  '((' could
89 # trigger a bug in pdksh 5.2.14.
90 for as_var in BASH_ENV ENV MAIL MAILPATH
91 do eval test \${$as_var+y} \
92   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
93 done
94 PS1='$ '
95 PS2='> '
96 PS4='+ '
97
98 # NLS nuisances.
99 LC_ALL=C
100 export LC_ALL
101 LANGUAGE=C
102 export LANGUAGE
103
104 # CDPATH.
105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
106
107 # Use a proper internal environment variable to ensure we don't fall
108   # into an infinite loop, continuously re-executing ourselves.
109   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
110     _as_can_reexec=no; export _as_can_reexec;
111     # We cannot yet assume a decent shell, so we have to provide a
112 # neutralization value for shells without unset; and this also
113 # works around shells that cannot unset nonexistent variables.
114 # Preserve -v and -x to the replacement shell.
115 BASH_ENV=/dev/null
116 ENV=/dev/null
117 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
118 case $- in # ((((
119   *v*x* | *x*v* ) as_opts=-vx ;;
120   *v* ) as_opts=-v ;;
121   *x* ) as_opts=-x ;;
122   * ) as_opts= ;;
123 esac
124 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
125 # Admittedly, this is quite paranoid, since all the known shells bail
126 # out after a failed `exec'.
127 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
128 as_fn_exit 255
129   fi
130   # We don't want this to propagate to other subprocesses.
131           { _as_can_reexec=; unset _as_can_reexec;}
132 if test "x$CONFIG_SHELL" = x; then
133   as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
134 then :
135   emulate sh
136   NULLCMD=:
137   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
138   # is contrary to our usage.  Disable this feature.
139   alias -g '\${1+\"\$@\"}'='\"\$@\"'
140   setopt NO_GLOB_SUBST
141 else
142   case \`(set -o) 2>/dev/null\` in #(
143   *posix*) :
144     set -o posix ;; #(
145   *) :
146      ;;
147 esac
148 fi
149 "
150   as_required="as_fn_return () { (exit \$1); }
151 as_fn_success () { as_fn_return 0; }
152 as_fn_failure () { as_fn_return 1; }
153 as_fn_ret_success () { return 0; }
154 as_fn_ret_failure () { return 1; }
155
156 exitcode=0
157 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
158 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
159 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
160 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
161 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
162 then :
163
164 else
165   exitcode=1; echo positional parameters were not saved.
166 fi
167 test x\$exitcode = x0 || exit 1
168 test -x / || exit 1"
169   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
173 test \$(( 1 + 1 )) = 2 || exit 1"
174   if (eval "$as_required") 2>/dev/null
175 then :
176   as_have_required=yes
177 else
178   as_have_required=no
179 fi
180   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
181 then :
182
183 else
184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
185 as_found=false
186 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
187 do
188   IFS=$as_save_IFS
189   case $as_dir in #(((
190     '') as_dir=./ ;;
191     */) ;;
192     *) as_dir=$as_dir/ ;;
193   esac
194   as_found=:
195   case $as_dir in #(
196          /*)
197            for as_base in sh bash ksh sh5; do
198              # Try only shells that exist, to save several forks.
199              as_shell=$as_dir$as_base
200              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
201                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
202 then :
203   CONFIG_SHELL=$as_shell as_have_required=yes
204                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
205 then :
206   break 2
207 fi
208 fi
209            done;;
210        esac
211   as_found=false
212 done
213 IFS=$as_save_IFS
214 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
215               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
216 then :
217   CONFIG_SHELL=$SHELL as_have_required=yes
218 fi; }
219
220
221       if test "x$CONFIG_SHELL" != x
222 then :
223   export CONFIG_SHELL
224              # We cannot yet assume a decent shell, so we have to provide a
225 # neutralization value for shells without unset; and this also
226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
228 BASH_ENV=/dev/null
229 ENV=/dev/null
230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
231 case $- in # ((((
232   *v*x* | *x*v* ) as_opts=-vx ;;
233   *v* ) as_opts=-v ;;
234   *x* ) as_opts=-x ;;
235   * ) as_opts= ;;
236 esac
237 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
238 # Admittedly, this is quite paranoid, since all the known shells bail
239 # out after a failed `exec'.
240 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
241 exit 255
242 fi
243
244     if test x$as_have_required = xno
245 then :
246   printf "%s\n" "$0: This script requires a shell more modern than all"
247   printf "%s\n" "$0: the shells that I found on your system."
248   if test ${ZSH_VERSION+y} ; then
249     printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
250     printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
251   else
252     printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-gzip@gnu.org
253 $0: about your system, including any error possibly output
254 $0: before this message. Then install a modern shell, or
255 $0: manually run the script under such a shell if you do
256 $0: have one."
257   fi
258   exit 1
259 fi
260 fi
261 fi
262 SHELL=${CONFIG_SHELL-/bin/sh}
263 export SHELL
264 # Unset more variables known to interfere with behavior of common tools.
265 CLICOLOR_FORCE= GREP_OPTIONS=
266 unset CLICOLOR_FORCE GREP_OPTIONS
267
268 ## --------------------- ##
269 ## M4sh Shell Functions. ##
270 ## --------------------- ##
271 # as_fn_unset VAR
272 # ---------------
273 # Portably unset VAR.
274 as_fn_unset ()
275 {
276   { eval $1=; unset $1;}
277 }
278 as_unset=as_fn_unset
279
280 # as_fn_set_status STATUS
281 # -----------------------
282 # Set $? to STATUS, without forking.
283 as_fn_set_status ()
284 {
285   return $1
286 } # as_fn_set_status
287
288 # as_fn_exit STATUS
289 # -----------------
290 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
291 as_fn_exit ()
292 {
293   set +e
294   as_fn_set_status $1
295   exit $1
296 } # as_fn_exit
297
298 # as_fn_mkdir_p
299 # -------------
300 # Create "$as_dir" as a directory, including parents if necessary.
301 as_fn_mkdir_p ()
302 {
303
304   case $as_dir in #(
305   -*) as_dir=./$as_dir;;
306   esac
307   test -d "$as_dir" || eval $as_mkdir_p || {
308     as_dirs=
309     while :; do
310       case $as_dir in #(
311       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
312       *) as_qdir=$as_dir;;
313       esac
314       as_dirs="'$as_qdir' $as_dirs"
315       as_dir=`$as_dirname -- "$as_dir" ||
316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
317          X"$as_dir" : 'X\(//\)[^/]' \| \
318          X"$as_dir" : 'X\(//\)$' \| \
319          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
320 printf "%s\n" X"$as_dir" |
321     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
322             s//\1/
323             q
324           }
325           /^X\(\/\/\)[^/].*/{
326             s//\1/
327             q
328           }
329           /^X\(\/\/\)$/{
330             s//\1/
331             q
332           }
333           /^X\(\/\).*/{
334             s//\1/
335             q
336           }
337           s/.*/./; q'`
338       test -d "$as_dir" && break
339     done
340     test -z "$as_dirs" || eval "mkdir $as_dirs"
341   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
342
343
344 } # as_fn_mkdir_p
345
346 # as_fn_executable_p FILE
347 # -----------------------
348 # Test if FILE is an executable regular file.
349 as_fn_executable_p ()
350 {
351   test -f "$1" && test -x "$1"
352 } # as_fn_executable_p
353 # as_fn_append VAR VALUE
354 # ----------------------
355 # Append the text in VALUE to the end of the definition contained in VAR. Take
356 # advantage of any shell optimizations that allow amortized linear growth over
357 # repeated appends, instead of the typical quadratic growth present in naive
358 # implementations.
359 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
360 then :
361   eval 'as_fn_append ()
362   {
363     eval $1+=\$2
364   }'
365 else
366   as_fn_append ()
367   {
368     eval $1=\$$1\$2
369   }
370 fi # as_fn_append
371
372 # as_fn_arith ARG...
373 # ------------------
374 # Perform arithmetic evaluation on the ARGs, and store the result in the
375 # global $as_val. Take advantage of shells that can avoid forks. The arguments
376 # must be portable across $(()) and expr.
377 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
378 then :
379   eval 'as_fn_arith ()
380   {
381     as_val=$(( $* ))
382   }'
383 else
384   as_fn_arith ()
385   {
386     as_val=`expr "$@" || test $? -eq 1`
387   }
388 fi # as_fn_arith
389
390
391 # as_fn_error STATUS ERROR [LINENO LOG_FD]
392 # ----------------------------------------
393 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
394 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
395 # script with STATUS, using 1 if that was 0.
396 as_fn_error ()
397 {
398   as_status=$1; test $as_status -eq 0 && as_status=1
399   if test "$4"; then
400     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
401     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
402   fi
403   printf "%s\n" "$as_me: error: $2" >&2
404   as_fn_exit $as_status
405 } # as_fn_error
406
407 if expr a : '\(a\)' >/dev/null 2>&1 &&
408    test "X`expr 00001 : '.*\(...\)'`" = X001; then
409   as_expr=expr
410 else
411   as_expr=false
412 fi
413
414 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
415   as_basename=basename
416 else
417   as_basename=false
418 fi
419
420 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
421   as_dirname=dirname
422 else
423   as_dirname=false
424 fi
425
426 as_me=`$as_basename -- "$0" ||
427 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
428          X"$0" : 'X\(//\)$' \| \
429          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
430 printf "%s\n" X/"$0" |
431     sed '/^.*\/\([^/][^/]*\)\/*$/{
432             s//\1/
433             q
434           }
435           /^X\/\(\/\/\)$/{
436             s//\1/
437             q
438           }
439           /^X\/\(\/\).*/{
440             s//\1/
441             q
442           }
443           s/.*/./; q'`
444
445 # Avoid depending upon Character Ranges.
446 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
447 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
448 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
449 as_cr_digits='0123456789'
450 as_cr_alnum=$as_cr_Letters$as_cr_digits
451
452
453   as_lineno_1=$LINENO as_lineno_1a=$LINENO
454   as_lineno_2=$LINENO as_lineno_2a=$LINENO
455   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
456   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
457   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
458   sed -n '
459     p
460     /[$]LINENO/=
461   ' <$as_myself |
462     sed '
463       s/[$]LINENO.*/&-/
464       t lineno
465       b
466       :lineno
467       N
468       :loop
469       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470       t loop
471       s/-\n.*//
472     ' >$as_me.lineno &&
473   chmod +x "$as_me.lineno" ||
474     { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
475
476   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
477   # already done that, so ensure we don't try to do so again and fall
478   # in an infinite loop.  This has already happened in practice.
479   _as_can_reexec=no; export _as_can_reexec
480   # Don't try to exec as it changes $[0], causing all sort of problems
481   # (the dirname of $[0] is not the place where we might find the
482   # original and so on.  Autoconf is especially sensitive to this).
483   . "./$as_me.lineno"
484   # Exit status is that of the last command.
485   exit
486 }
487
488 ECHO_C= ECHO_N= ECHO_T=
489 case `echo -n x` in #(((((
490 -n*)
491   case `echo 'xy\c'` in
492   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
493   xy)  ECHO_C='\c';;
494   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
495        ECHO_T=' ';;
496   esac;;
497 *)
498   ECHO_N='-n';;
499 esac
500
501 rm -f conf$$ conf$$.exe conf$$.file
502 if test -d conf$$.dir; then
503   rm -f conf$$.dir/conf$$.file
504 else
505   rm -f conf$$.dir
506   mkdir conf$$.dir 2>/dev/null
507 fi
508 if (echo >conf$$.file) 2>/dev/null; then
509   if ln -s conf$$.file conf$$ 2>/dev/null; then
510     as_ln_s='ln -s'
511     # ... but there are two gotchas:
512     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
513     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
514     # In both cases, we have to default to `cp -pR'.
515     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
516       as_ln_s='cp -pR'
517   elif ln conf$$.file conf$$ 2>/dev/null; then
518     as_ln_s=ln
519   else
520     as_ln_s='cp -pR'
521   fi
522 else
523   as_ln_s='cp -pR'
524 fi
525 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
526 rmdir conf$$.dir 2>/dev/null
527
528 if mkdir -p . 2>/dev/null; then
529   as_mkdir_p='mkdir -p "$as_dir"'
530 else
531   test -d ./-p && rmdir ./-p
532   as_mkdir_p=false
533 fi
534
535 as_test_x='test -x'
536 as_executable_p=as_fn_executable_p
537
538 # Sed expression to map a string onto a valid CPP name.
539 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
540
541 # Sed expression to map a string onto a valid variable name.
542 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
543
544
545 test -n "$DJDIR" || exec 7<&0 </dev/null
546 exec 6>&1
547
548 # Name of the host.
549 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
550 # so uname gets run too.
551 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
552
553 #
554 # Initializations.
555 #
556 ac_default_prefix=/usr/local
557 ac_clean_files=
558 ac_config_libobj_dir=.
559 LIBOBJS=
560 cross_compiling=no
561 subdirs=
562 MFLAGS=
563 MAKEFLAGS=
564
565 # Identity of this package.
566 PACKAGE_NAME='gzip'
567 PACKAGE_TARNAME='gzip'
568 PACKAGE_VERSION='1.8'
569 PACKAGE_STRING='gzip 1.8'
570 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
571 PACKAGE_URL=''
572
573 ac_unique_file="gzip.c"
574 # Factoring default headers for most tests.
575 ac_includes_default="\
576 #include <stddef.h>
577 #include <stdio.h>
578 #include <stdlib.h>
579 #include <string.h>
580 #ifdef HAVE_SYS_TYPES_H
581 # include <sys/types.h>
582 #endif
583 #ifdef HAVE_SYS_STAT_H
584 # include <sys/stat.h>
585 #endif
586 #ifdef HAVE_STRINGS_H
587 # include <strings.h>
588 #endif
589 #ifdef HAVE_INTTYPES_H
590 # include <inttypes.h>
591 #endif
592 #ifdef HAVE_STDINT_H
593 # include <stdint.h>
594 #endif
595 #ifdef HAVE_UNISTD_H
596 # include <unistd.h>
597 #endif"
598
599 ac_header_list=
600 gl_use_threads_default=
601 ac_func_list=
602 gl_getopt_required=POSIX
603 gl_getopt_required=POSIX
604 ac_subst_vars='gltests_LTLIBOBJS
605 gltests_LIBOBJS
606 gl_LTLIBOBJS
607 gl_LIBOBJS
608 CONFIG_INCLUDE
609 am__EXEEXT_FALSE
610 am__EXEEXT_TRUE
611 LTLIBOBJS
612 ASFLAGS_config
613 LIBOBJS
614 ASCPPFLAGS
615 ASCPPPOST
616 GNULIB_WARN_CFLAGS
617 WARN_CFLAGS
618 WERROR_CFLAGS
619 LIBGZIP_LTLIBDEPS
620 LIBGZIP_LIBDEPS
621 gltests_WITNESS
622 HAVE_WINT_T
623 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
624 NEXT_WCHAR_H
625 REPLACE_WCSWIDTH
626 REPLACE_WCWIDTH
627 REPLACE_WCSNRTOMBS
628 REPLACE_WCSRTOMBS
629 REPLACE_WCRTOMB
630 REPLACE_MBSNRTOWCS
631 REPLACE_MBSRTOWCS
632 REPLACE_MBRLEN
633 REPLACE_MBRTOWC
634 REPLACE_MBSINIT
635 REPLACE_WCTOB
636 REPLACE_BTOWC
637 REPLACE_MBSTATE_T
638 HAVE_DECL_WCWIDTH
639 HAVE_DECL_WCTOB
640 HAVE_WCSWIDTH
641 HAVE_WCSTOK
642 HAVE_WCSSTR
643 HAVE_WCSPBRK
644 HAVE_WCSSPN
645 HAVE_WCSCSPN
646 HAVE_WCSRCHR
647 HAVE_WCSCHR
648 HAVE_WCSDUP
649 HAVE_WCSXFRM
650 HAVE_WCSCOLL
651 HAVE_WCSNCASECMP
652 HAVE_WCSCASECMP
653 HAVE_WCSNCMP
654 HAVE_WCSCMP
655 HAVE_WCSNCAT
656 HAVE_WCSCAT
657 HAVE_WCPNCPY
658 HAVE_WCSNCPY
659 HAVE_WCPCPY
660 HAVE_WCSCPY
661 HAVE_WCSNLEN
662 HAVE_WCSLEN
663 HAVE_WMEMSET
664 HAVE_WMEMMOVE
665 HAVE_WMEMCPY
666 HAVE_WMEMCMP
667 HAVE_WMEMCHR
668 HAVE_WCSNRTOMBS
669 HAVE_WCSRTOMBS
670 HAVE_WCRTOMB
671 HAVE_MBSNRTOWCS
672 HAVE_MBSRTOWCS
673 HAVE_MBRLEN
674 HAVE_MBRTOWC
675 HAVE_MBSINIT
676 HAVE_BTOWC
677 GNULIB_WCSWIDTH
678 GNULIB_WCSTOK
679 GNULIB_WCSSTR
680 GNULIB_WCSPBRK
681 GNULIB_WCSSPN
682 GNULIB_WCSCSPN
683 GNULIB_WCSRCHR
684 GNULIB_WCSCHR
685 GNULIB_WCSDUP
686 GNULIB_WCSXFRM
687 GNULIB_WCSCOLL
688 GNULIB_WCSNCASECMP
689 GNULIB_WCSCASECMP
690 GNULIB_WCSNCMP
691 GNULIB_WCSCMP
692 GNULIB_WCSNCAT
693 GNULIB_WCSCAT
694 GNULIB_WCPNCPY
695 GNULIB_WCSNCPY
696 GNULIB_WCPCPY
697 GNULIB_WCSCPY
698 GNULIB_WCSNLEN
699 GNULIB_WCSLEN
700 GNULIB_WMEMSET
701 GNULIB_WMEMMOVE
702 GNULIB_WMEMCPY
703 GNULIB_WMEMCMP
704 GNULIB_WMEMCHR
705 GNULIB_WCWIDTH
706 GNULIB_WCSNRTOMBS
707 GNULIB_WCSRTOMBS
708 GNULIB_WCRTOMB
709 GNULIB_MBSNRTOWCS
710 GNULIB_MBSRTOWCS
711 GNULIB_MBRLEN
712 GNULIB_MBRTOWC
713 GNULIB_MBSINIT
714 GNULIB_WCTOB
715 GNULIB_BTOWC
716 HAVE_UNISTD_H
717 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
718 NEXT_UNISTD_H
719 UNISTD_H_DEFINES_STRUCT_TIMESPEC
720 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
721 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
722 TIME_H_DEFINES_STRUCT_TIMESPEC
723 NEXT_AS_FIRST_DIRECTIVE_TIME_H
724 NEXT_TIME_H
725 REPLACE_LOCALTIME
726 REPLACE_GMTIME
727 REPLACE_TIMEGM
728 REPLACE_NANOSLEEP
729 REPLACE_MKTIME
730 REPLACE_LOCALTIME_R
731 HAVE_TIMEGM
732 HAVE_STRPTIME
733 HAVE_NANOSLEEP
734 HAVE_DECL_LOCALTIME_R
735 GNULIB_TIME_RZ
736 GNULIB_TIME_R
737 GNULIB_TIMEGM
738 GNULIB_STRPTIME
739 GNULIB_NANOSLEEP
740 GNULIB_MKTIME
741 NEXT_AS_FIRST_DIRECTIVE_STRING_H
742 NEXT_STRING_H
743 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
744 NEXT_STDLIB_H
745 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
746 NEXT_STDIO_H
747 GL_GENERATE_STDINT_H_FALSE
748 GL_GENERATE_STDINT_H_TRUE
749 STDINT_H
750 WINT_T_SUFFIX
751 WCHAR_T_SUFFIX
752 SIG_ATOMIC_T_SUFFIX
753 SIZE_T_SUFFIX
754 PTRDIFF_T_SUFFIX
755 HAVE_SIGNED_WINT_T
756 HAVE_SIGNED_WCHAR_T
757 HAVE_SIGNED_SIG_ATOMIC_T
758 BITSIZEOF_WINT_T
759 BITSIZEOF_WCHAR_T
760 BITSIZEOF_SIG_ATOMIC_T
761 BITSIZEOF_SIZE_T
762 BITSIZEOF_PTRDIFF_T
763 HAVE_SYS_BITYPES_H
764 HAVE_SYS_INTTYPES_H
765 HAVE_STDINT_H
766 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
767 NEXT_STDINT_H
768 HAVE_SYS_TYPES_H
769 HAVE_INTTYPES_H
770 HAVE_WCHAR_H
771 HAVE_UNSIGNED_LONG_LONG_INT
772 HAVE_LONG_LONG_INT
773 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
774 NEXT_STDDEF_H
775 GL_GENERATE_STDDEF_H_FALSE
776 GL_GENERATE_STDDEF_H_TRUE
777 STDDEF_H
778 HAVE_WCHAR_T
779 HAVE_MAX_ALIGN_T
780 REPLACE_NULL
781 HAVE__BOOL
782 GL_GENERATE_STDBOOL_H_FALSE
783 GL_GENERATE_STDBOOL_H_TRUE
784 STDBOOL_H
785 ASM_SYMBOL_PREFIX
786 UNDEFINE_STRTOK_R
787 REPLACE_STRTOK_R
788 REPLACE_STRSIGNAL
789 REPLACE_STRNLEN
790 REPLACE_STRNDUP
791 REPLACE_STRNCAT
792 REPLACE_STRERROR_R
793 REPLACE_STRERROR
794 REPLACE_STRCHRNUL
795 REPLACE_STRCASESTR
796 REPLACE_STRSTR
797 REPLACE_STRDUP
798 REPLACE_STPNCPY
799 REPLACE_MEMMEM
800 REPLACE_MEMCHR
801 HAVE_STRVERSCMP
802 HAVE_DECL_STRSIGNAL
803 HAVE_DECL_STRERROR_R
804 HAVE_DECL_STRTOK_R
805 HAVE_STRCASESTR
806 HAVE_STRSEP
807 HAVE_STRPBRK
808 HAVE_DECL_STRNLEN
809 HAVE_DECL_STRNDUP
810 HAVE_DECL_STRDUP
811 HAVE_STRCHRNUL
812 HAVE_STPNCPY
813 HAVE_STPCPY
814 HAVE_RAWMEMCHR
815 HAVE_DECL_MEMRCHR
816 HAVE_MEMPCPY
817 HAVE_DECL_MEMMEM
818 HAVE_MEMCHR
819 HAVE_FFSLL
820 HAVE_FFSL
821 HAVE_MBSLEN
822 GNULIB_STRVERSCMP
823 GNULIB_STRSIGNAL
824 GNULIB_STRERROR_R
825 GNULIB_STRERROR
826 GNULIB_MBSTOK_R
827 GNULIB_MBSSEP
828 GNULIB_MBSSPN
829 GNULIB_MBSPBRK
830 GNULIB_MBSCSPN
831 GNULIB_MBSCASESTR
832 GNULIB_MBSPCASECMP
833 GNULIB_MBSNCASECMP
834 GNULIB_MBSCASECMP
835 GNULIB_MBSSTR
836 GNULIB_MBSRCHR
837 GNULIB_MBSCHR
838 GNULIB_MBSNLEN
839 GNULIB_MBSLEN
840 GNULIB_STRTOK_R
841 GNULIB_STRCASESTR
842 GNULIB_STRSTR
843 GNULIB_STRSEP
844 GNULIB_STRPBRK
845 GNULIB_STRNLEN
846 GNULIB_STRNDUP
847 GNULIB_STRNCAT
848 GNULIB_STRDUP
849 GNULIB_STRCHRNUL
850 GNULIB_STPNCPY
851 GNULIB_STPCPY
852 GNULIB_RAWMEMCHR
853 GNULIB_MEMRCHR
854 GNULIB_MEMPCPY
855 GNULIB_MEMMEM
856 GNULIB_MEMCHR
857 GNULIB_FFSLL
858 GNULIB_FFSL
859 NEXT_AS_FIRST_DIRECTIVE_MATH_H
860 NEXT_MATH_H
861 SED
862 LTLIBMULTITHREAD
863 LIBMULTITHREAD
864 LTLIBTHREAD
865 LIBTHREAD
866 LIBPTH_PREFIX
867 LTLIBPTH
868 LIBPTH
869 IGNORE_UNUSED_LIBRARIES_CFLAGS
870 GNU_MAKE_FALSE
871 GNU_MAKE_TRUE
872 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
873 NEXT_SYS_TIME_H
874 REPLACE_STRUCT_TIMEVAL
875 REPLACE_GETTIMEOFDAY
876 HAVE_TIMEZONE_T
877 HAVE_SYS_TIME_H
878 HAVE_STRUCT_TIMEVAL
879 HAVE_GETTIMEOFDAY
880 GNULIB_GETTIMEOFDAY
881 LTLIBINTL
882 LIBINTL
883 GNULIB_GL_UNISTD_H_GETOPT
884 GETOPT_H
885 HAVE_GETOPT_H
886 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
887 NEXT_GETOPT_H
888 WINDOWS_64_BIT_ST_SIZE
889 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
890 NEXT_SYS_STAT_H
891 REPLACE_UTIMENSAT
892 REPLACE_STAT
893 REPLACE_MKNOD
894 REPLACE_MKFIFO
895 REPLACE_MKDIR
896 REPLACE_LSTAT
897 REPLACE_FUTIMENS
898 REPLACE_FSTATAT
899 REPLACE_FSTAT
900 HAVE_UTIMENSAT
901 HAVE_MKNODAT
902 HAVE_MKNOD
903 HAVE_MKFIFOAT
904 HAVE_MKFIFO
905 HAVE_MKDIRAT
906 HAVE_LSTAT
907 HAVE_LCHMOD
908 HAVE_FUTIMENS
909 HAVE_FSTATAT
910 HAVE_FCHMODAT
911 GNULIB_UTIMENSAT
912 GNULIB_STAT
913 GNULIB_MKNODAT
914 GNULIB_MKNOD
915 GNULIB_MKFIFOAT
916 GNULIB_MKFIFO
917 GNULIB_MKDIRAT
918 GNULIB_LSTAT
919 GNULIB_LCHMOD
920 GNULIB_FUTIMENS
921 GNULIB_FSTATAT
922 GNULIB_FSTAT
923 GNULIB_FCHMODAT
924 WINDOWS_64_BIT_OFF_T
925 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
926 NEXT_SYS_TYPES_H
927 REPLACE_TRUNCL
928 REPLACE_TRUNCF
929 REPLACE_TRUNC
930 REPLACE_SQRTL
931 REPLACE_SIGNBIT_USING_GCC
932 REPLACE_SIGNBIT
933 REPLACE_ROUNDL
934 REPLACE_ROUNDF
935 REPLACE_ROUND
936 REPLACE_REMAINDERL
937 REPLACE_REMAINDERF
938 REPLACE_REMAINDER
939 REPLACE_NAN
940 REPLACE_MODFL
941 REPLACE_MODFF
942 REPLACE_MODF
943 REPLACE_LOGBL
944 REPLACE_LOGBF
945 REPLACE_LOGB
946 REPLACE_LOG2L
947 REPLACE_LOG2F
948 REPLACE_LOG2
949 REPLACE_LOG1PL
950 REPLACE_LOG1PF
951 REPLACE_LOG1P
952 REPLACE_LOG10L
953 REPLACE_LOG10F
954 REPLACE_LOG10
955 REPLACE_LOGL
956 REPLACE_LOGF
957 REPLACE_LOG
958 REPLACE_LDEXPL
959 REPLACE_ISNAN
960 REPLACE_ISINF
961 REPLACE_ISFINITE
962 REPLACE_ILOGBF
963 REPLACE_ILOGB
964 REPLACE_HYPOTL
965 REPLACE_HYPOTF
966 REPLACE_HYPOT
967 REPLACE_HUGE_VAL
968 REPLACE_FREXPL
969 REPLACE_FREXP
970 REPLACE_FREXPF
971 REPLACE_FMODL
972 REPLACE_FMODF
973 REPLACE_FMOD
974 REPLACE_FMAL
975 REPLACE_FMAF
976 REPLACE_FMA
977 REPLACE_FLOORL
978 REPLACE_FLOORF
979 REPLACE_FLOOR
980 REPLACE_FABSL
981 REPLACE_EXP2L
982 REPLACE_EXP2
983 REPLACE_EXPM1F
984 REPLACE_EXPM1
985 REPLACE_CEILL
986 REPLACE_CEILF
987 REPLACE_CEIL
988 REPLACE_CBRTL
989 REPLACE_CBRTF
990 HAVE_DECL_TRUNCL
991 HAVE_DECL_TRUNCF
992 HAVE_DECL_TRUNC
993 HAVE_DECL_TANL
994 HAVE_DECL_SQRTL
995 HAVE_DECL_SINL
996 HAVE_DECL_ROUNDL
997 HAVE_DECL_ROUNDF
998 HAVE_DECL_ROUND
999 HAVE_DECL_RINTF
1000 HAVE_DECL_REMAINDERL
1001 HAVE_DECL_REMAINDER
1002 HAVE_DECL_LOGB
1003 HAVE_DECL_LOG2L
1004 HAVE_DECL_LOG2F
1005 HAVE_DECL_LOG2
1006 HAVE_DECL_LOG10L
1007 HAVE_DECL_LOGL
1008 HAVE_DECL_LDEXPL
1009 HAVE_DECL_FREXPL
1010 HAVE_DECL_FLOORL
1011 HAVE_DECL_FLOORF
1012 HAVE_DECL_EXPM1L
1013 HAVE_DECL_EXP2L
1014 HAVE_DECL_EXP2F
1015 HAVE_DECL_EXP2
1016 HAVE_DECL_EXPL
1017 HAVE_DECL_COSL
1018 HAVE_DECL_COPYSIGNF
1019 HAVE_DECL_CEILL
1020 HAVE_DECL_CEILF
1021 HAVE_DECL_CBRTL
1022 HAVE_DECL_CBRTF
1023 HAVE_DECL_ATANL
1024 HAVE_DECL_ASINL
1025 HAVE_DECL_ACOSL
1026 HAVE_TANHF
1027 HAVE_TANL
1028 HAVE_TANF
1029 HAVE_SQRTL
1030 HAVE_SQRTF
1031 HAVE_SINHF
1032 HAVE_SINL
1033 HAVE_SINF
1034 HAVE_RINTL
1035 HAVE_RINT
1036 HAVE_REMAINDERF
1037 HAVE_REMAINDER
1038 HAVE_POWF
1039 HAVE_MODFL
1040 HAVE_MODFF
1041 HAVE_LOGBL
1042 HAVE_LOGBF
1043 HAVE_LOG1PL
1044 HAVE_LOG1PF
1045 HAVE_LOG1P
1046 HAVE_LOG10L
1047 HAVE_LOG10F
1048 HAVE_LOGL
1049 HAVE_LOGF
1050 HAVE_LDEXPF
1051 HAVE_ISNANL
1052 HAVE_ISNAND
1053 HAVE_ISNANF
1054 HAVE_ILOGBL
1055 HAVE_ILOGBF
1056 HAVE_ILOGB
1057 HAVE_HYPOTL
1058 HAVE_HYPOTF
1059 HAVE_FREXPF
1060 HAVE_FMODL
1061 HAVE_FMODF
1062 HAVE_FMAL
1063 HAVE_FMAF
1064 HAVE_FMA
1065 HAVE_FABSL
1066 HAVE_FABSF
1067 HAVE_EXPM1F
1068 HAVE_EXPM1
1069 HAVE_EXPL
1070 HAVE_EXPF
1071 HAVE_COSHF
1072 HAVE_COSL
1073 HAVE_COSF
1074 HAVE_COPYSIGNL
1075 HAVE_COPYSIGN
1076 HAVE_CBRTL
1077 HAVE_CBRTF
1078 HAVE_CBRT
1079 HAVE_ATAN2F
1080 HAVE_ATANL
1081 HAVE_ATANF
1082 HAVE_ASINL
1083 HAVE_ASINF
1084 HAVE_ACOSL
1085 HAVE_ACOSF
1086 GNULIB_TRUNCL
1087 GNULIB_TRUNCF
1088 GNULIB_TRUNC
1089 GNULIB_TANHF
1090 GNULIB_TANL
1091 GNULIB_TANF
1092 GNULIB_SQRTL
1093 GNULIB_SQRTF
1094 GNULIB_SINHF
1095 GNULIB_SINL
1096 GNULIB_SINF
1097 GNULIB_SIGNBIT
1098 GNULIB_ROUNDL
1099 GNULIB_ROUNDF
1100 GNULIB_ROUND
1101 GNULIB_RINTL
1102 GNULIB_RINTF
1103 GNULIB_RINT
1104 GNULIB_REMAINDERL
1105 GNULIB_REMAINDERF
1106 GNULIB_REMAINDER
1107 GNULIB_POWF
1108 GNULIB_MODFL
1109 GNULIB_MODFF
1110 GNULIB_MODF
1111 GNULIB_LOGBL
1112 GNULIB_LOGBF
1113 GNULIB_LOGB
1114 GNULIB_LOG2L
1115 GNULIB_LOG2F
1116 GNULIB_LOG2
1117 GNULIB_LOG1PL
1118 GNULIB_LOG1PF
1119 GNULIB_LOG1P
1120 GNULIB_LOG10L
1121 GNULIB_LOG10F
1122 GNULIB_LOG10
1123 GNULIB_LOGL
1124 GNULIB_LOGF
1125 GNULIB_LOG
1126 GNULIB_LDEXPL
1127 GNULIB_LDEXPF
1128 GNULIB_ISNANL
1129 GNULIB_ISNAND
1130 GNULIB_ISNANF
1131 GNULIB_ISNAN
1132 GNULIB_ISINF
1133 GNULIB_ISFINITE
1134 GNULIB_ILOGBL
1135 GNULIB_ILOGBF
1136 GNULIB_ILOGB
1137 GNULIB_HYPOTL
1138 GNULIB_HYPOTF
1139 GNULIB_HYPOT
1140 GNULIB_FREXPL
1141 GNULIB_FREXP
1142 GNULIB_FREXPF
1143 GNULIB_FMODL
1144 GNULIB_FMODF
1145 GNULIB_FMOD
1146 GNULIB_FMAL
1147 GNULIB_FMAF
1148 GNULIB_FMA
1149 GNULIB_FLOORL
1150 GNULIB_FLOORF
1151 GNULIB_FLOOR
1152 GNULIB_FABSL
1153 GNULIB_FABSF
1154 GNULIB_EXPM1L
1155 GNULIB_EXPM1F
1156 GNULIB_EXPM1
1157 GNULIB_EXP2L
1158 GNULIB_EXP2F
1159 GNULIB_EXP2
1160 GNULIB_EXPL
1161 GNULIB_EXPF
1162 GNULIB_COSHF
1163 GNULIB_COSL
1164 GNULIB_COSF
1165 GNULIB_COPYSIGNL
1166 GNULIB_COPYSIGNF
1167 GNULIB_COPYSIGN
1168 GNULIB_CEILL
1169 GNULIB_CEILF
1170 GNULIB_CEIL
1171 GNULIB_CBRTL
1172 GNULIB_CBRTF
1173 GNULIB_CBRT
1174 GNULIB_ATAN2F
1175 GNULIB_ATANL
1176 GNULIB_ATANF
1177 GNULIB_ASINL
1178 GNULIB_ASINF
1179 GNULIB_ACOSL
1180 GNULIB_ACOSF
1181 HAVE_FEATURES_H
1182 APPLE_UNIVERSAL_BUILD
1183 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1184 REPLACE_ITOLD
1185 GL_GENERATE_FLOAT_H_FALSE
1186 GL_GENERATE_FLOAT_H_TRUE
1187 FLOAT_H
1188 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1189 NEXT_FLOAT_H
1190 LIB_FDATASYNC
1191 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1192 NEXT_FCNTL_H
1193 REPLACE_OPENAT
1194 REPLACE_OPEN
1195 REPLACE_FCNTL
1196 HAVE_OPENAT
1197 HAVE_FCNTL
1198 GNULIB_OPENAT
1199 GNULIB_OPEN
1200 GNULIB_NONBLOCKING
1201 GNULIB_FCNTL
1202 REPLACE_VSPRINTF
1203 REPLACE_VSNPRINTF
1204 REPLACE_VPRINTF
1205 REPLACE_VFPRINTF
1206 REPLACE_VDPRINTF
1207 REPLACE_VASPRINTF
1208 REPLACE_TMPFILE
1209 REPLACE_STDIO_WRITE_FUNCS
1210 REPLACE_STDIO_READ_FUNCS
1211 REPLACE_SPRINTF
1212 REPLACE_SNPRINTF
1213 REPLACE_RENAMEAT
1214 REPLACE_RENAME
1215 REPLACE_REMOVE
1216 REPLACE_PRINTF
1217 REPLACE_POPEN
1218 REPLACE_PERROR
1219 REPLACE_OBSTACK_PRINTF
1220 REPLACE_GETLINE
1221 REPLACE_GETDELIM
1222 REPLACE_FTELLO
1223 REPLACE_FTELL
1224 REPLACE_FSEEKO
1225 REPLACE_FSEEK
1226 REPLACE_FREOPEN
1227 REPLACE_FPURGE
1228 REPLACE_FPRINTF
1229 REPLACE_FOPEN
1230 REPLACE_FFLUSH
1231 REPLACE_FDOPEN
1232 REPLACE_FCLOSE
1233 REPLACE_DPRINTF
1234 HAVE_VDPRINTF
1235 HAVE_VASPRINTF
1236 HAVE_RENAMEAT
1237 HAVE_POPEN
1238 HAVE_PCLOSE
1239 HAVE_FTELLO
1240 HAVE_FSEEKO
1241 HAVE_DPRINTF
1242 HAVE_DECL_VSNPRINTF
1243 HAVE_DECL_SNPRINTF
1244 HAVE_DECL_OBSTACK_PRINTF
1245 HAVE_DECL_GETLINE
1246 HAVE_DECL_GETDELIM
1247 HAVE_DECL_FTELLO
1248 HAVE_DECL_FSEEKO
1249 HAVE_DECL_FPURGE
1250 GNULIB_VSPRINTF_POSIX
1251 GNULIB_VSNPRINTF
1252 GNULIB_VPRINTF_POSIX
1253 GNULIB_VPRINTF
1254 GNULIB_VFPRINTF_POSIX
1255 GNULIB_VFPRINTF
1256 GNULIB_VDPRINTF
1257 GNULIB_VSCANF
1258 GNULIB_VFSCANF
1259 GNULIB_VASPRINTF
1260 GNULIB_TMPFILE
1261 GNULIB_STDIO_H_SIGPIPE
1262 GNULIB_STDIO_H_NONBLOCKING
1263 GNULIB_SPRINTF_POSIX
1264 GNULIB_SNPRINTF
1265 GNULIB_SCANF
1266 GNULIB_RENAMEAT
1267 GNULIB_RENAME
1268 GNULIB_REMOVE
1269 GNULIB_PUTS
1270 GNULIB_PUTCHAR
1271 GNULIB_PUTC
1272 GNULIB_PRINTF_POSIX
1273 GNULIB_PRINTF
1274 GNULIB_POPEN
1275 GNULIB_PERROR
1276 GNULIB_PCLOSE
1277 GNULIB_OBSTACK_PRINTF_POSIX
1278 GNULIB_OBSTACK_PRINTF
1279 GNULIB_GETLINE
1280 GNULIB_GETDELIM
1281 GNULIB_GETCHAR
1282 GNULIB_GETC
1283 GNULIB_FWRITE
1284 GNULIB_FTELLO
1285 GNULIB_FTELL
1286 GNULIB_FSEEKO
1287 GNULIB_FSEEK
1288 GNULIB_FSCANF
1289 GNULIB_FREOPEN
1290 GNULIB_FREAD
1291 GNULIB_FPUTS
1292 GNULIB_FPUTC
1293 GNULIB_FPURGE
1294 GNULIB_FPRINTF_POSIX
1295 GNULIB_FPRINTF
1296 GNULIB_FOPEN
1297 GNULIB_FGETS
1298 GNULIB_FGETC
1299 GNULIB_FFLUSH
1300 GNULIB_FDOPEN
1301 GNULIB_FCLOSE
1302 GNULIB_DPRINTF
1303 EOVERFLOW_VALUE
1304 EOVERFLOW_HIDDEN
1305 ENOLINK_VALUE
1306 ENOLINK_HIDDEN
1307 EMULTIHOP_VALUE
1308 EMULTIHOP_HIDDEN
1309 GL_GENERATE_ERRNO_H_FALSE
1310 GL_GENERATE_ERRNO_H_TRUE
1311 ERRNO_H
1312 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1313 NEXT_ERRNO_H
1314 HAVE_DIRENT_H
1315 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1316 NEXT_DIRENT_H
1317 PRAGMA_COLUMNS
1318 PRAGMA_SYSTEM_HEADER
1319 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1320 INCLUDE_NEXT
1321 REPLACE_FDOPENDIR
1322 REPLACE_DIRFD
1323 REPLACE_CLOSEDIR
1324 REPLACE_OPENDIR
1325 HAVE_ALPHASORT
1326 HAVE_SCANDIR
1327 HAVE_FDOPENDIR
1328 HAVE_DECL_FDOPENDIR
1329 HAVE_DECL_DIRFD
1330 HAVE_CLOSEDIR
1331 HAVE_REWINDDIR
1332 HAVE_READDIR
1333 HAVE_OPENDIR
1334 GNULIB_ALPHASORT
1335 GNULIB_SCANDIR
1336 GNULIB_FDOPENDIR
1337 GNULIB_DIRFD
1338 GNULIB_CLOSEDIR
1339 GNULIB_REWINDDIR
1340 GNULIB_READDIR
1341 GNULIB_OPENDIR
1342 HAVE_WINSOCK2_H
1343 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1344 LIB_CLOCK_GETTIME
1345 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1346 UNISTD_H_HAVE_WINSOCK2_H
1347 REPLACE_WRITE
1348 REPLACE_USLEEP
1349 REPLACE_UNLINKAT
1350 REPLACE_UNLINK
1351 REPLACE_TTYNAME_R
1352 REPLACE_SYMLINKAT
1353 REPLACE_SYMLINK
1354 REPLACE_SLEEP
1355 REPLACE_RMDIR
1356 REPLACE_READLINKAT
1357 REPLACE_READLINK
1358 REPLACE_READ
1359 REPLACE_PWRITE
1360 REPLACE_PREAD
1361 REPLACE_LSEEK
1362 REPLACE_LINKAT
1363 REPLACE_LINK
1364 REPLACE_LCHOWN
1365 REPLACE_ISATTY
1366 REPLACE_GETPAGESIZE
1367 REPLACE_GETGROUPS
1368 REPLACE_GETLOGIN_R
1369 REPLACE_GETDTABLESIZE
1370 REPLACE_GETDOMAINNAME
1371 REPLACE_GETCWD
1372 REPLACE_FTRUNCATE
1373 REPLACE_FCHOWNAT
1374 REPLACE_DUP2
1375 REPLACE_DUP
1376 REPLACE_CLOSE
1377 REPLACE_CHOWN
1378 HAVE_SYS_PARAM_H
1379 HAVE_OS_H
1380 HAVE_DECL_TTYNAME_R
1381 HAVE_DECL_SETHOSTNAME
1382 HAVE_DECL_GETUSERSHELL
1383 HAVE_DECL_GETPAGESIZE
1384 HAVE_DECL_GETLOGIN_R
1385 HAVE_DECL_GETDOMAINNAME
1386 HAVE_DECL_FDATASYNC
1387 HAVE_DECL_FCHDIR
1388 HAVE_DECL_ENVIRON
1389 HAVE_USLEEP
1390 HAVE_UNLINKAT
1391 HAVE_SYMLINKAT
1392 HAVE_SYMLINK
1393 HAVE_SLEEP
1394 HAVE_SETHOSTNAME
1395 HAVE_READLINKAT
1396 HAVE_READLINK
1397 HAVE_PWRITE
1398 HAVE_PREAD
1399 HAVE_PIPE2
1400 HAVE_PIPE
1401 HAVE_LINKAT
1402 HAVE_LINK
1403 HAVE_LCHOWN
1404 HAVE_GROUP_MEMBER
1405 HAVE_GETPAGESIZE
1406 HAVE_GETLOGIN
1407 HAVE_GETHOSTNAME
1408 HAVE_GETGROUPS
1409 HAVE_GETDTABLESIZE
1410 HAVE_FTRUNCATE
1411 HAVE_FSYNC
1412 HAVE_FDATASYNC
1413 HAVE_FCHOWNAT
1414 HAVE_FCHDIR
1415 HAVE_FACCESSAT
1416 HAVE_EUIDACCESS
1417 HAVE_DUP3
1418 HAVE_DUP2
1419 HAVE_CHOWN
1420 GNULIB_WRITE
1421 GNULIB_USLEEP
1422 GNULIB_UNLINKAT
1423 GNULIB_UNLINK
1424 GNULIB_UNISTD_H_SIGPIPE
1425 GNULIB_UNISTD_H_NONBLOCKING
1426 GNULIB_TTYNAME_R
1427 GNULIB_SYMLINKAT
1428 GNULIB_SYMLINK
1429 GNULIB_SLEEP
1430 GNULIB_SETHOSTNAME
1431 GNULIB_RMDIR
1432 GNULIB_READLINKAT
1433 GNULIB_READLINK
1434 GNULIB_READ
1435 GNULIB_PWRITE
1436 GNULIB_PREAD
1437 GNULIB_PIPE2
1438 GNULIB_PIPE
1439 GNULIB_LSEEK
1440 GNULIB_LINKAT
1441 GNULIB_LINK
1442 GNULIB_LCHOWN
1443 GNULIB_ISATTY
1444 GNULIB_GROUP_MEMBER
1445 GNULIB_GETUSERSHELL
1446 GNULIB_GETPAGESIZE
1447 GNULIB_GETLOGIN_R
1448 GNULIB_GETLOGIN
1449 GNULIB_GETHOSTNAME
1450 GNULIB_GETGROUPS
1451 GNULIB_GETDTABLESIZE
1452 GNULIB_GETDOMAINNAME
1453 GNULIB_GETCWD
1454 GNULIB_FTRUNCATE
1455 GNULIB_FSYNC
1456 GNULIB_FDATASYNC
1457 GNULIB_FCHOWNAT
1458 GNULIB_FCHDIR
1459 GNULIB_FACCESSAT
1460 GNULIB_EUIDACCESS
1461 GNULIB_ENVIRON
1462 GNULIB_DUP3
1463 GNULIB_DUP2
1464 GNULIB_DUP
1465 GNULIB_CLOSE
1466 GNULIB_CHOWN
1467 GNULIB_CHDIR
1468 REPLACE_WCTOMB
1469 REPLACE_UNSETENV
1470 REPLACE_STRTOD
1471 REPLACE_SETENV
1472 REPLACE_REALPATH
1473 REPLACE_REALLOC
1474 REPLACE_RANDOM_R
1475 REPLACE_QSORT_R
1476 REPLACE_PUTENV
1477 REPLACE_PTSNAME_R
1478 REPLACE_PTSNAME
1479 REPLACE_MKSTEMP
1480 REPLACE_MBTOWC
1481 REPLACE_MALLOC
1482 REPLACE_CANONICALIZE_FILE_NAME
1483 REPLACE_CALLOC
1484 HAVE_DECL_UNSETENV
1485 HAVE_UNLOCKPT
1486 HAVE_SYS_LOADAVG_H
1487 HAVE_STRUCT_RANDOM_DATA
1488 HAVE_STRTOULL
1489 HAVE_STRTOLL
1490 HAVE_STRTOD
1491 HAVE_DECL_SETENV
1492 HAVE_SETENV
1493 HAVE_SECURE_GETENV
1494 HAVE_RPMATCH
1495 HAVE_REALPATH
1496 HAVE_RANDOM_R
1497 HAVE_RANDOM_H
1498 HAVE_RANDOM
1499 HAVE_PTSNAME_R
1500 HAVE_PTSNAME
1501 HAVE_POSIX_OPENPT
1502 HAVE_MKSTEMPS
1503 HAVE_MKSTEMP
1504 HAVE_MKOSTEMPS
1505 HAVE_MKOSTEMP
1506 HAVE_MKDTEMP
1507 HAVE_GRANTPT
1508 HAVE_GETSUBOPT
1509 HAVE_DECL_GETLOADAVG
1510 HAVE_CANONICALIZE_FILE_NAME
1511 HAVE_ATOLL
1512 HAVE__EXIT
1513 GNULIB_WCTOMB
1514 GNULIB_UNSETENV
1515 GNULIB_UNLOCKPT
1516 GNULIB_SYSTEM_POSIX
1517 GNULIB_STRTOULL
1518 GNULIB_STRTOLL
1519 GNULIB_STRTOD
1520 GNULIB_SETENV
1521 GNULIB_SECURE_GETENV
1522 GNULIB_RPMATCH
1523 GNULIB_REALPATH
1524 GNULIB_REALLOC_POSIX
1525 GNULIB_RANDOM_R
1526 GNULIB_RANDOM
1527 GNULIB_QSORT_R
1528 GNULIB_PUTENV
1529 GNULIB_PTSNAME_R
1530 GNULIB_PTSNAME
1531 GNULIB_POSIX_OPENPT
1532 GNULIB_MKSTEMPS
1533 GNULIB_MKSTEMP
1534 GNULIB_MKOSTEMPS
1535 GNULIB_MKOSTEMP
1536 GNULIB_MKDTEMP
1537 GNULIB_MBTOWC
1538 GNULIB_MALLOC_POSIX
1539 GNULIB_GRANTPT
1540 GNULIB_GETSUBOPT
1541 GNULIB_GETLOADAVG
1542 GNULIB_CANONICALIZE_FILE_NAME
1543 GNULIB_CALLOC_POSIX
1544 GNULIB_ATOLL
1545 GNULIB__EXIT
1546 GL_GENERATE_ALLOCA_H_FALSE
1547 GL_GENERATE_ALLOCA_H_TRUE
1548 ALLOCA_H
1549 ALLOCA
1550 GL_COND_LIBTOOL_FALSE
1551 GL_COND_LIBTOOL_TRUE
1552 host_os
1553 host_vendor
1554 host_cpu
1555 host
1556 build_os
1557 build_vendor
1558 build_cpu
1559 build
1560 ARFLAGS
1561 ac_ct_AR
1562 AR
1563 EGREP
1564 RANLIB
1565 LN_S
1566 NM
1567 GREP
1568 CPP
1569 am__fastdepCC_FALSE
1570 am__fastdepCC_TRUE
1571 CCDEPMODE
1572 am__nodep
1573 AMDEPBACKSLASH
1574 AMDEP_FALSE
1575 AMDEP_TRUE
1576 am__include
1577 DEPDIR
1578 OBJEXT
1579 EXEEXT
1580 ac_ct_CC
1581 CPPFLAGS
1582 LDFLAGS
1583 CFLAGS
1584 CC
1585 AM_BACKSLASH
1586 AM_DEFAULT_VERBOSITY
1587 AM_DEFAULT_V
1588 AM_V
1589 am__untar
1590 am__tar
1591 AMTAR
1592 SET_MAKE
1593 AWK
1594 MKDIR_P
1595 INSTALL_STRIP_PROGRAM
1596 STRIP
1597 install_sh
1598 MAKEINFO
1599 AUTOHEADER
1600 AUTOMAKE
1601 AUTOCONF
1602 ACLOCAL
1603 VERSION
1604 PACKAGE
1605 CYGPATH_W
1606 am__isrc
1607 INSTALL_DATA
1608 INSTALL_SCRIPT
1609 INSTALL_PROGRAM
1610 mkdir_p
1611 target_alias
1612 host_alias
1613 build_alias
1614 LIBS
1615 ECHO_T
1616 ECHO_N
1617 ECHO_C
1618 DEFS
1619 mandir
1620 localedir
1621 libdir
1622 psdir
1623 pdfdir
1624 dvidir
1625 htmldir
1626 infodir
1627 docdir
1628 oldincludedir
1629 includedir
1630 runstatedir
1631 localstatedir
1632 sharedstatedir
1633 sysconfdir
1634 datadir
1635 datarootdir
1636 libexecdir
1637 sbindir
1638 bindir
1639 program_transform_name
1640 prefix
1641 exec_prefix
1642 PACKAGE_URL
1643 PACKAGE_BUGREPORT
1644 PACKAGE_STRING
1645 PACKAGE_VERSION
1646 PACKAGE_TARNAME
1647 PACKAGE_NAME
1648 PATH_SEPARATOR
1649 SHELL
1650 am__quote'
1651 ac_subst_files=''
1652 ac_user_opts='
1653 enable_option_checking
1654 enable_silent_rules
1655 enable_dependency_tracking
1656 enable_largefile
1657 enable_threads
1658 with_gnu_ld
1659 enable_rpath
1660 with_libpth_prefix
1661 enable_gcc_warnings
1662 '
1663       ac_precious_vars='build_alias
1664 host_alias
1665 target_alias
1666 CC
1667 CFLAGS
1668 LDFLAGS
1669 LIBS
1670 CPPFLAGS
1671 CPP'
1672
1673
1674 # Initialize some variables set by options.
1675 ac_init_help=
1676 ac_init_version=false
1677 ac_unrecognized_opts=
1678 ac_unrecognized_sep=
1679 # The variables have the same names as the options, with
1680 # dashes changed to underlines.
1681 cache_file=/dev/null
1682 exec_prefix=NONE
1683 no_create=
1684 no_recursion=
1685 prefix=NONE
1686 program_prefix=NONE
1687 program_suffix=NONE
1688 program_transform_name=s,x,x,
1689 silent=
1690 site=
1691 srcdir=
1692 verbose=
1693 x_includes=NONE
1694 x_libraries=NONE
1695
1696 # Installation directory options.
1697 # These are left unexpanded so users can "make install exec_prefix=/foo"
1698 # and all the variables that are supposed to be based on exec_prefix
1699 # by default will actually change.
1700 # Use braces instead of parens because sh, perl, etc. also accept them.
1701 # (The list follows the same order as the GNU Coding Standards.)
1702 bindir='${exec_prefix}/bin'
1703 sbindir='${exec_prefix}/sbin'
1704 libexecdir='${exec_prefix}/libexec'
1705 datarootdir='${prefix}/share'
1706 datadir='${datarootdir}'
1707 sysconfdir='${prefix}/etc'
1708 sharedstatedir='${prefix}/com'
1709 localstatedir='${prefix}/var'
1710 runstatedir='${localstatedir}/run'
1711 includedir='${prefix}/include'
1712 oldincludedir='/usr/include'
1713 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1714 infodir='${datarootdir}/info'
1715 htmldir='${docdir}'
1716 dvidir='${docdir}'
1717 pdfdir='${docdir}'
1718 psdir='${docdir}'
1719 libdir='${exec_prefix}/lib'
1720 localedir='${datarootdir}/locale'
1721 mandir='${datarootdir}/man'
1722
1723 ac_prev=
1724 ac_dashdash=
1725 for ac_option
1726 do
1727   # If the previous option needs an argument, assign it.
1728   if test -n "$ac_prev"; then
1729     eval $ac_prev=\$ac_option
1730     ac_prev=
1731     continue
1732   fi
1733
1734   case $ac_option in
1735   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1736   *=)   ac_optarg= ;;
1737   *)    ac_optarg=yes ;;
1738   esac
1739
1740   # Accept the important Cygnus configure options, so we can diagnose typos.
1741
1742   case $ac_dashdash$ac_option in
1743   --)
1744     ac_dashdash=yes ;;
1745
1746   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1747     ac_prev=bindir ;;
1748   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1749     bindir=$ac_optarg ;;
1750
1751   -build | --build | --buil | --bui | --bu)
1752     ac_prev=build_alias ;;
1753   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1754     build_alias=$ac_optarg ;;
1755
1756   -cache-file | --cache-file | --cache-fil | --cache-fi \
1757   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1758     ac_prev=cache_file ;;
1759   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1760   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1761     cache_file=$ac_optarg ;;
1762
1763   --config-cache | -C)
1764     cache_file=config.cache ;;
1765
1766   -datadir | --datadir | --datadi | --datad)
1767     ac_prev=datadir ;;
1768   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1769     datadir=$ac_optarg ;;
1770
1771   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1772   | --dataroo | --dataro | --datar)
1773     ac_prev=datarootdir ;;
1774   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1775   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1776     datarootdir=$ac_optarg ;;
1777
1778   -disable-* | --disable-*)
1779     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1780     # Reject names that are not valid shell variable names.
1781     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1782       as_fn_error $? "invalid feature name: \`$ac_useropt'"
1783     ac_useropt_orig=$ac_useropt
1784     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1785     case $ac_user_opts in
1786       *"
1787 "enable_$ac_useropt"
1788 "*) ;;
1789       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1790          ac_unrecognized_sep=', ';;
1791     esac
1792     eval enable_$ac_useropt=no ;;
1793
1794   -docdir | --docdir | --docdi | --doc | --do)
1795     ac_prev=docdir ;;
1796   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1797     docdir=$ac_optarg ;;
1798
1799   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1800     ac_prev=dvidir ;;
1801   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1802     dvidir=$ac_optarg ;;
1803
1804   -enable-* | --enable-*)
1805     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1806     # Reject names that are not valid shell variable names.
1807     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1808       as_fn_error $? "invalid feature name: \`$ac_useropt'"
1809     ac_useropt_orig=$ac_useropt
1810     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1811     case $ac_user_opts in
1812       *"
1813 "enable_$ac_useropt"
1814 "*) ;;
1815       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1816          ac_unrecognized_sep=', ';;
1817     esac
1818     eval enable_$ac_useropt=\$ac_optarg ;;
1819
1820   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1821   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1822   | --exec | --exe | --ex)
1823     ac_prev=exec_prefix ;;
1824   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1825   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1826   | --exec=* | --exe=* | --ex=*)
1827     exec_prefix=$ac_optarg ;;
1828
1829   -gas | --gas | --ga | --g)
1830     # Obsolete; use --with-gas.
1831     with_gas=yes ;;
1832
1833   -help | --help | --hel | --he | -h)
1834     ac_init_help=long ;;
1835   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1836     ac_init_help=recursive ;;
1837   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1838     ac_init_help=short ;;
1839
1840   -host | --host | --hos | --ho)
1841     ac_prev=host_alias ;;
1842   -host=* | --host=* | --hos=* | --ho=*)
1843     host_alias=$ac_optarg ;;
1844
1845   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1846     ac_prev=htmldir ;;
1847   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1848   | --ht=*)
1849     htmldir=$ac_optarg ;;
1850
1851   -includedir | --includedir | --includedi | --included | --include \
1852   | --includ | --inclu | --incl | --inc)
1853     ac_prev=includedir ;;
1854   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1855   | --includ=* | --inclu=* | --incl=* | --inc=*)
1856     includedir=$ac_optarg ;;
1857
1858   -infodir | --infodir | --infodi | --infod | --info | --inf)
1859     ac_prev=infodir ;;
1860   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1861     infodir=$ac_optarg ;;
1862
1863   -libdir | --libdir | --libdi | --libd)
1864     ac_prev=libdir ;;
1865   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1866     libdir=$ac_optarg ;;
1867
1868   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1869   | --libexe | --libex | --libe)
1870     ac_prev=libexecdir ;;
1871   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1872   | --libexe=* | --libex=* | --libe=*)
1873     libexecdir=$ac_optarg ;;
1874
1875   -localedir | --localedir | --localedi | --localed | --locale)
1876     ac_prev=localedir ;;
1877   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1878     localedir=$ac_optarg ;;
1879
1880   -localstatedir | --localstatedir | --localstatedi | --localstated \
1881   | --localstate | --localstat | --localsta | --localst | --locals)
1882     ac_prev=localstatedir ;;
1883   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1884   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1885     localstatedir=$ac_optarg ;;
1886
1887   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1888     ac_prev=mandir ;;
1889   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1890     mandir=$ac_optarg ;;
1891
1892   -nfp | --nfp | --nf)
1893     # Obsolete; use --without-fp.
1894     with_fp=no ;;
1895
1896   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1897   | --no-cr | --no-c | -n)
1898     no_create=yes ;;
1899
1900   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1901   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1902     no_recursion=yes ;;
1903
1904   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1905   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1906   | --oldin | --oldi | --old | --ol | --o)
1907     ac_prev=oldincludedir ;;
1908   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1909   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1910   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1911     oldincludedir=$ac_optarg ;;
1912
1913   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1914     ac_prev=prefix ;;
1915   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1916     prefix=$ac_optarg ;;
1917
1918   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1919   | --program-pre | --program-pr | --program-p)
1920     ac_prev=program_prefix ;;
1921   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1922   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1923     program_prefix=$ac_optarg ;;
1924
1925   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1926   | --program-suf | --program-su | --program-s)
1927     ac_prev=program_suffix ;;
1928   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1929   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1930     program_suffix=$ac_optarg ;;
1931
1932   -program-transform-name | --program-transform-name \
1933   | --program-transform-nam | --program-transform-na \
1934   | --program-transform-n | --program-transform- \
1935   | --program-transform | --program-transfor \
1936   | --program-transfo | --program-transf \
1937   | --program-trans | --program-tran \
1938   | --progr-tra | --program-tr | --program-t)
1939     ac_prev=program_transform_name ;;
1940   -program-transform-name=* | --program-transform-name=* \
1941   | --program-transform-nam=* | --program-transform-na=* \
1942   | --program-transform-n=* | --program-transform-=* \
1943   | --program-transform=* | --program-transfor=* \
1944   | --program-transfo=* | --program-transf=* \
1945   | --program-trans=* | --program-tran=* \
1946   | --progr-tra=* | --program-tr=* | --program-t=*)
1947     program_transform_name=$ac_optarg ;;
1948
1949   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1950     ac_prev=pdfdir ;;
1951   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1952     pdfdir=$ac_optarg ;;
1953
1954   -psdir | --psdir | --psdi | --psd | --ps)
1955     ac_prev=psdir ;;
1956   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1957     psdir=$ac_optarg ;;
1958
1959   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1960   | -silent | --silent | --silen | --sile | --sil)
1961     silent=yes ;;
1962
1963   -runstatedir | --runstatedir | --runstatedi | --runstated \
1964   | --runstate | --runstat | --runsta | --runst | --runs \
1965   | --run | --ru | --r)
1966     ac_prev=runstatedir ;;
1967   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1968   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1969   | --run=* | --ru=* | --r=*)
1970     runstatedir=$ac_optarg ;;
1971
1972   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1973     ac_prev=sbindir ;;
1974   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1975   | --sbi=* | --sb=*)
1976     sbindir=$ac_optarg ;;
1977
1978   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1979   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1980   | --sharedst | --shareds | --shared | --share | --shar \
1981   | --sha | --sh)
1982     ac_prev=sharedstatedir ;;
1983   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1984   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1985   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1986   | --sha=* | --sh=*)
1987     sharedstatedir=$ac_optarg ;;
1988
1989   -site | --site | --sit)
1990     ac_prev=site ;;
1991   -site=* | --site=* | --sit=*)
1992     site=$ac_optarg ;;
1993
1994   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1995     ac_prev=srcdir ;;
1996   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1997     srcdir=$ac_optarg ;;
1998
1999   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2000   | --syscon | --sysco | --sysc | --sys | --sy)
2001     ac_prev=sysconfdir ;;
2002   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2003   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2004     sysconfdir=$ac_optarg ;;
2005
2006   -target | --target | --targe | --targ | --tar | --ta | --t)
2007     ac_prev=target_alias ;;
2008   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2009     target_alias=$ac_optarg ;;
2010
2011   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2012     verbose=yes ;;
2013
2014   -version | --version | --versio | --versi | --vers | -V)
2015     ac_init_version=: ;;
2016
2017   -with-* | --with-*)
2018     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2019     # Reject names that are not valid shell variable names.
2020     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2021       as_fn_error $? "invalid package name: \`$ac_useropt'"
2022     ac_useropt_orig=$ac_useropt
2023     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2024     case $ac_user_opts in
2025       *"
2026 "with_$ac_useropt"
2027 "*) ;;
2028       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2029          ac_unrecognized_sep=', ';;
2030     esac
2031     eval with_$ac_useropt=\$ac_optarg ;;
2032
2033   -without-* | --without-*)
2034     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2035     # Reject names that are not valid shell variable names.
2036     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2037       as_fn_error $? "invalid package name: \`$ac_useropt'"
2038     ac_useropt_orig=$ac_useropt
2039     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2040     case $ac_user_opts in
2041       *"
2042 "with_$ac_useropt"
2043 "*) ;;
2044       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2045          ac_unrecognized_sep=', ';;
2046     esac
2047     eval with_$ac_useropt=no ;;
2048
2049   --x)
2050     # Obsolete; use --with-x.
2051     with_x=yes ;;
2052
2053   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2054   | --x-incl | --x-inc | --x-in | --x-i)
2055     ac_prev=x_includes ;;
2056   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2057   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2058     x_includes=$ac_optarg ;;
2059
2060   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2061   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2062     ac_prev=x_libraries ;;
2063   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2064   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2065     x_libraries=$ac_optarg ;;
2066
2067   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2068 Try \`$0 --help' for more information"
2069     ;;
2070
2071   *=*)
2072     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2073     # Reject names that are not valid shell variable names.
2074     case $ac_envvar in #(
2075       '' | [0-9]* | *[!_$as_cr_alnum]* )
2076       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2077     esac
2078     eval $ac_envvar=\$ac_optarg
2079     export $ac_envvar ;;
2080
2081   *)
2082     # FIXME: should be removed in autoconf 3.0.
2083     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2084     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2085       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2086     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2087     ;;
2088
2089   esac
2090 done
2091
2092 if test -n "$ac_prev"; then
2093   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2094   as_fn_error $? "missing argument to $ac_option"
2095 fi
2096
2097 if test -n "$ac_unrecognized_opts"; then
2098   case $enable_option_checking in
2099     no) ;;
2100     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2101     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2102   esac
2103 fi
2104
2105 # Check all directory arguments for consistency.
2106 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2107                 datadir sysconfdir sharedstatedir localstatedir includedir \
2108                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2109                 libdir localedir mandir runstatedir
2110 do
2111   eval ac_val=\$$ac_var
2112   # Remove trailing slashes.
2113   case $ac_val in
2114     */ )
2115       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2116       eval $ac_var=\$ac_val;;
2117   esac
2118   # Be sure to have absolute directory names.
2119   case $ac_val in
2120     [\\/$]* | ?:[\\/]* )  continue;;
2121     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2122   esac
2123   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2124 done
2125
2126 # There might be people who depend on the old broken behavior: `$host'
2127 # used to hold the argument of --host etc.
2128 # FIXME: To remove some day.
2129 build=$build_alias
2130 host=$host_alias
2131 target=$target_alias
2132
2133 # FIXME: To remove some day.
2134 if test "x$host_alias" != x; then
2135   if test "x$build_alias" = x; then
2136     cross_compiling=maybe
2137   elif test "x$build_alias" != "x$host_alias"; then
2138     cross_compiling=yes
2139   fi
2140 fi
2141
2142 ac_tool_prefix=
2143 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2144
2145 test "$silent" = yes && exec 6>/dev/null
2146
2147
2148 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2149 ac_ls_di=`ls -di .` &&
2150 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2151   as_fn_error $? "working directory cannot be determined"
2152 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2153   as_fn_error $? "pwd does not report name of working directory"
2154
2155
2156 # Find the source files, if location was not specified.
2157 if test -z "$srcdir"; then
2158   ac_srcdir_defaulted=yes
2159   # Try the directory containing this script, then the parent directory.
2160   ac_confdir=`$as_dirname -- "$as_myself" ||
2161 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2162          X"$as_myself" : 'X\(//\)[^/]' \| \
2163          X"$as_myself" : 'X\(//\)$' \| \
2164          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2165 printf "%s\n" X"$as_myself" |
2166     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2167             s//\1/
2168             q
2169           }
2170           /^X\(\/\/\)[^/].*/{
2171             s//\1/
2172             q
2173           }
2174           /^X\(\/\/\)$/{
2175             s//\1/
2176             q
2177           }
2178           /^X\(\/\).*/{
2179             s//\1/
2180             q
2181           }
2182           s/.*/./; q'`
2183   srcdir=$ac_confdir
2184   if test ! -r "$srcdir/$ac_unique_file"; then
2185     srcdir=..
2186   fi
2187 else
2188   ac_srcdir_defaulted=no
2189 fi
2190 if test ! -r "$srcdir/$ac_unique_file"; then
2191   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2192   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2193 fi
2194 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2195 ac_abs_confdir=`(
2196         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2197         pwd)`
2198 # When building in place, set srcdir=.
2199 if test "$ac_abs_confdir" = "$ac_pwd"; then
2200   srcdir=.
2201 fi
2202 # Remove unnecessary trailing slashes from srcdir.
2203 # Double slashes in file names in object file debugging info
2204 # mess up M-x gdb in Emacs.
2205 case $srcdir in
2206 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2207 esac
2208 for ac_var in $ac_precious_vars; do
2209   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2210   eval ac_env_${ac_var}_value=\$${ac_var}
2211   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2212   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2213 done
2214
2215 #
2216 # Report the --help message.
2217 #
2218 if test "$ac_init_help" = "long"; then
2219   # Omit some internal or obsolete options to make the list less imposing.
2220   # This message is too long to be a string in the A/UX 3.1 sh.
2221   cat <<_ACEOF
2222 \`configure' configures gzip 1.8 to adapt to many kinds of systems.
2223
2224 Usage: $0 [OPTION]... [VAR=VALUE]...
2225
2226 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2227 VAR=VALUE.  See below for descriptions of some of the useful variables.
2228
2229 Defaults for the options are specified in brackets.
2230
2231 Configuration:
2232   -h, --help              display this help and exit
2233       --help=short        display options specific to this package
2234       --help=recursive    display the short help of all the included packages
2235   -V, --version           display version information and exit
2236   -q, --quiet, --silent   do not print \`checking ...' messages
2237       --cache-file=FILE   cache test results in FILE [disabled]
2238   -C, --config-cache      alias for \`--cache-file=config.cache'
2239   -n, --no-create         do not create output files
2240       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2241
2242 Installation directories:
2243   --prefix=PREFIX         install architecture-independent files in PREFIX
2244                           [$ac_default_prefix]
2245   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2246                           [PREFIX]
2247
2248 By default, \`make install' will install all the files in
2249 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2250 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2251 for instance \`--prefix=\$HOME'.
2252
2253 For better control, use the options below.
2254
2255 Fine tuning of the installation directories:
2256   --bindir=DIR            user executables [EPREFIX/bin]
2257   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2258   --libexecdir=DIR        program executables [EPREFIX/libexec]
2259   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2260   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2261   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2262   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2263   --libdir=DIR            object code libraries [EPREFIX/lib]
2264   --includedir=DIR        C header files [PREFIX/include]
2265   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2266   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2267   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2268   --infodir=DIR           info documentation [DATAROOTDIR/info]
2269   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2270   --mandir=DIR            man documentation [DATAROOTDIR/man]
2271   --docdir=DIR            documentation root [DATAROOTDIR/doc/gzip]
2272   --htmldir=DIR           html documentation [DOCDIR]
2273   --dvidir=DIR            dvi documentation [DOCDIR]
2274   --pdfdir=DIR            pdf documentation [DOCDIR]
2275   --psdir=DIR             ps documentation [DOCDIR]
2276 _ACEOF
2277
2278   cat <<\_ACEOF
2279
2280 Program names:
2281   --program-prefix=PREFIX            prepend PREFIX to installed program names
2282   --program-suffix=SUFFIX            append SUFFIX to installed program names
2283   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2284
2285 System types:
2286   --build=BUILD     configure for building on BUILD [guessed]
2287   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2288 _ACEOF
2289 fi
2290
2291 if test -n "$ac_init_help"; then
2292   case $ac_init_help in
2293      short | recursive ) echo "Configuration of gzip 1.8:";;
2294    esac
2295   cat <<\_ACEOF
2296
2297 Optional Features:
2298   --disable-option-checking  ignore unrecognized --enable/--with options
2299   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2300   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2301   --enable-silent-rules   less verbose build output (undo: "make V=1")
2302   --disable-silent-rules  verbose build output (undo: "make V=0")
2303   --enable-dependency-tracking
2304                           do not reject slow dependency extractors
2305   --disable-dependency-tracking
2306                           speeds up one-time build
2307   --disable-largefile     omit support for large files
2308   --enable-threads={posix|solaris|pth|windows}
2309                           specify multithreading API
2310   --disable-threads       build without multithread safety
2311   --disable-rpath         do not hardcode runtime library paths
2312   --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2313                           GNU make)
2314
2315 Optional Packages:
2316   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2317   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2318   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2319   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2320   --without-libpth-prefix     don't search for libpth in includedir and libdir
2321
2322 Some influential environment variables:
2323   CC          C compiler command
2324   CFLAGS      C compiler flags
2325   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2326               nonstandard directory <lib dir>
2327   LIBS        libraries to pass to the linker, e.g. -l<library>
2328   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2329               you have headers in a nonstandard directory <include dir>
2330   CPP         C preprocessor
2331
2332 Use these variables to override the choices made by `configure' or to help
2333 it to find libraries and programs with nonstandard names/locations.
2334
2335 Report bugs to <bug-gzip@gnu.org>.
2336 _ACEOF
2337 ac_status=$?
2338 fi
2339
2340 if test "$ac_init_help" = "recursive"; then
2341   # If there are subdirs, report their specific --help.
2342   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2343     test -d "$ac_dir" ||
2344       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2345       continue
2346     ac_builddir=.
2347
2348 case "$ac_dir" in
2349 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2350 *)
2351   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2352   # A ".." for each directory in $ac_dir_suffix.
2353   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2354   case $ac_top_builddir_sub in
2355   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2356   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2357   esac ;;
2358 esac
2359 ac_abs_top_builddir=$ac_pwd
2360 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2361 # for backward compatibility:
2362 ac_top_builddir=$ac_top_build_prefix
2363
2364 case $srcdir in
2365   .)  # We are building in place.
2366     ac_srcdir=.
2367     ac_top_srcdir=$ac_top_builddir_sub
2368     ac_abs_top_srcdir=$ac_pwd ;;
2369   [\\/]* | ?:[\\/]* )  # Absolute name.
2370     ac_srcdir=$srcdir$ac_dir_suffix;
2371     ac_top_srcdir=$srcdir
2372     ac_abs_top_srcdir=$srcdir ;;
2373   *) # Relative name.
2374     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2375     ac_top_srcdir=$ac_top_build_prefix$srcdir
2376     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2377 esac
2378 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2379
2380     cd "$ac_dir" || { ac_status=$?; continue; }
2381     # Check for guested configure.
2382     if test -f "$ac_srcdir/configure.gnu"; then
2383       echo &&
2384       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2385     elif test -f "$ac_srcdir/configure"; then
2386       echo &&
2387       $SHELL "$ac_srcdir/configure" --help=recursive
2388     else
2389       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2390     fi || ac_status=$?
2391     cd "$ac_pwd" || { ac_status=$?; break; }
2392   done
2393 fi
2394
2395 test -n "$ac_init_help" && exit $ac_status
2396 if $ac_init_version; then
2397   cat <<\_ACEOF
2398 gzip configure 1.8
2399 generated by GNU Autoconf 2.69.147-5ad35
2400
2401 Copyright (C) 2015 Free Software Foundation, Inc.
2402 This configure script is free software; the Free Software Foundation
2403 gives unlimited permission to copy, distribute and modify it.
2404 _ACEOF
2405   exit
2406 fi
2407
2408 ## ------------------------ ##
2409 ## Autoconf initialization. ##
2410 ## ------------------------ ##
2411
2412 # ac_fn_c_try_compile LINENO
2413 # --------------------------
2414 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2415 ac_fn_c_try_compile ()
2416 {
2417   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418   rm -f conftest.$ac_objext
2419   if { { ac_try="$ac_compile"
2420 case "(($ac_try" in
2421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422   *) ac_try_echo=$ac_try;;
2423 esac
2424 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425 printf "%s\n" "$ac_try_echo"; } >&5
2426   (eval "$ac_compile") 2>conftest.err
2427   ac_status=$?
2428   if test -s conftest.err; then
2429     grep -v '^ *+' conftest.err >conftest.er1
2430     cat conftest.er1 >&5
2431     mv -f conftest.er1 conftest.err
2432   fi
2433   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434   test $ac_status = 0; } && {
2435          test -z "$ac_c_werror_flag" ||
2436          test ! -s conftest.err
2437        } && test -s conftest.$ac_objext
2438 then :
2439   ac_retval=0
2440 else
2441   printf "%s\n" "$as_me: failed program was:" >&5
2442 sed 's/^/| /' conftest.$ac_ext >&5
2443
2444         ac_retval=1
2445 fi
2446   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447   as_fn_set_status $ac_retval
2448
2449 } # ac_fn_c_try_compile
2450
2451 # ac_fn_c_try_cpp LINENO
2452 # ----------------------
2453 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2454 ac_fn_c_try_cpp ()
2455 {
2456   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457   if { { ac_try="$ac_cpp conftest.$ac_ext"
2458 case "(($ac_try" in
2459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460   *) ac_try_echo=$ac_try;;
2461 esac
2462 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463 printf "%s\n" "$ac_try_echo"; } >&5
2464   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2465   ac_status=$?
2466   if test -s conftest.err; then
2467     grep -v '^ *+' conftest.err >conftest.er1
2468     cat conftest.er1 >&5
2469     mv -f conftest.er1 conftest.err
2470   fi
2471   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472   test $ac_status = 0; } > conftest.i && {
2473          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2474          test ! -s conftest.err
2475        }
2476 then :
2477   ac_retval=0
2478 else
2479   printf "%s\n" "$as_me: failed program was:" >&5
2480 sed 's/^/| /' conftest.$ac_ext >&5
2481
2482     ac_retval=1
2483 fi
2484   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2485   as_fn_set_status $ac_retval
2486
2487 } # ac_fn_c_try_cpp
2488
2489 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2490 # -------------------------------------------------------
2491 # Tests whether HEADER exists and can be compiled using the include files in
2492 # INCLUDES, setting the cache variable VAR accordingly.
2493 ac_fn_c_check_header_compile ()
2494 {
2495   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2497 printf %s "checking for $2... " >&6; }
2498 if eval test \${$3+y}
2499 then :
2500   printf %s "(cached) " >&6
2501 else
2502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2503 /* end confdefs.h.  */
2504 $4
2505 #include <$2>
2506 _ACEOF
2507 if ac_fn_c_try_compile "$LINENO"
2508 then :
2509   eval "$3=yes"
2510 else
2511   eval "$3=no"
2512 fi
2513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2514 fi
2515 eval ac_res=\$$3
2516                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2517 printf "%s\n" "$ac_res" >&6; }
2518   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519
2520 } # ac_fn_c_check_header_compile
2521
2522 # ac_fn_c_try_link LINENO
2523 # -----------------------
2524 # Try to link conftest.$ac_ext, and return whether this succeeded.
2525 ac_fn_c_try_link ()
2526 {
2527   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528   rm -f conftest.$ac_objext conftest$ac_exeext
2529   if { { ac_try="$ac_link"
2530 case "(($ac_try" in
2531   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532   *) ac_try_echo=$ac_try;;
2533 esac
2534 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535 printf "%s\n" "$ac_try_echo"; } >&5
2536   (eval "$ac_link") 2>conftest.err
2537   ac_status=$?
2538   if test -s conftest.err; then
2539     grep -v '^ *+' conftest.err >conftest.er1
2540     cat conftest.er1 >&5
2541     mv -f conftest.er1 conftest.err
2542   fi
2543   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544   test $ac_status = 0; } && {
2545          test -z "$ac_c_werror_flag" ||
2546          test ! -s conftest.err
2547        } && test -s conftest$ac_exeext && {
2548          test "$cross_compiling" = yes ||
2549          test -x conftest$ac_exeext
2550        }
2551 then :
2552   ac_retval=0
2553 else
2554   printf "%s\n" "$as_me: failed program was:" >&5
2555 sed 's/^/| /' conftest.$ac_ext >&5
2556
2557         ac_retval=1
2558 fi
2559   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2560   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2561   # interfere with the next link command; also delete a directory that is
2562   # left behind by Apple's compiler.  We do this before executing the actions.
2563   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2564   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2565   as_fn_set_status $ac_retval
2566
2567 } # ac_fn_c_try_link
2568
2569 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2570 # -------------------------------------------
2571 # Tests whether TYPE exists after having included INCLUDES, setting cache
2572 # variable VAR accordingly.
2573 ac_fn_c_check_type ()
2574 {
2575   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2576   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2577 printf %s "checking for $2... " >&6; }
2578 if eval test \${$3+y}
2579 then :
2580   printf %s "(cached) " >&6
2581 else
2582   eval "$3=no"
2583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2584 /* end confdefs.h.  */
2585 $4
2586 int
2587 main (void)
2588 {
2589 if (sizeof ($2))
2590          return 0;
2591   ;
2592   return 0;
2593 }
2594 _ACEOF
2595 if ac_fn_c_try_compile "$LINENO"
2596 then :
2597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598 /* end confdefs.h.  */
2599 $4
2600 int
2601 main (void)
2602 {
2603 if (sizeof (($2)))
2604             return 0;
2605   ;
2606   return 0;
2607 }
2608 _ACEOF
2609 if ac_fn_c_try_compile "$LINENO"
2610 then :
2611
2612 else
2613   eval "$3=yes"
2614 fi
2615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2616 fi
2617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2618 fi
2619 eval ac_res=\$$3
2620                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621 printf "%s\n" "$ac_res" >&6; }
2622   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2623
2624 } # ac_fn_c_check_type
2625
2626 # ac_fn_c_check_func LINENO FUNC VAR
2627 # ----------------------------------
2628 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2629 ac_fn_c_check_func ()
2630 {
2631   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2632   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2633 printf %s "checking for $2... " >&6; }
2634 if eval test \${$3+y}
2635 then :
2636   printf %s "(cached) " >&6
2637 else
2638   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2639 /* end confdefs.h.  */
2640 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2641    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2642 #define $2 innocuous_$2
2643
2644 /* System header to define __stub macros and hopefully few prototypes,
2645    which can conflict with char $2 (); below.  */
2646
2647 #include <limits.h>
2648 #undef $2
2649
2650 /* Override any GCC internal prototype to avoid an error.
2651    Use char because int might match the return type of a GCC
2652    builtin and then its argument prototype would still apply.  */
2653 #ifdef __cplusplus
2654 extern "C"
2655 #endif
2656 char $2 ();
2657 /* The GNU C library defines this for functions which it implements
2658     to always fail with ENOSYS.  Some functions are actually named
2659     something starting with __ and the normal name is an alias.  */
2660 #if defined __stub_$2 || defined __stub___$2
2661 choke me
2662 #endif
2663
2664 int
2665 main (void)
2666 {
2667 return $2 ();
2668   ;
2669   return 0;
2670 }
2671 _ACEOF
2672 if ac_fn_c_try_link "$LINENO"
2673 then :
2674   eval "$3=yes"
2675 else
2676   eval "$3=no"
2677 fi
2678 rm -f core conftest.err conftest.$ac_objext \
2679     conftest$ac_exeext conftest.$ac_ext
2680 fi
2681 eval ac_res=\$$3
2682                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683 printf "%s\n" "$ac_res" >&6; }
2684   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2685
2686 } # ac_fn_c_check_func
2687
2688 # ac_fn_c_try_run LINENO
2689 # ----------------------
2690 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2691 # executables *can* be run.
2692 ac_fn_c_try_run ()
2693 {
2694   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2695   if { { ac_try="$ac_link"
2696 case "(($ac_try" in
2697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698   *) ac_try_echo=$ac_try;;
2699 esac
2700 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701 printf "%s\n" "$ac_try_echo"; } >&5
2702   (eval "$ac_link") 2>&5
2703   ac_status=$?
2704   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2706   { { case "(($ac_try" in
2707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708   *) ac_try_echo=$ac_try;;
2709 esac
2710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2711 printf "%s\n" "$ac_try_echo"; } >&5
2712   (eval "$ac_try") 2>&5
2713   ac_status=$?
2714   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2715   test $ac_status = 0; }; }
2716 then :
2717   ac_retval=0
2718 else
2719   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2720        printf "%s\n" "$as_me: failed program was:" >&5
2721 sed 's/^/| /' conftest.$ac_ext >&5
2722
2723        ac_retval=$ac_status
2724 fi
2725   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2726   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2727   as_fn_set_status $ac_retval
2728
2729 } # ac_fn_c_try_run
2730
2731 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2732 # ---------------------------------------------
2733 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2734 # accordingly.
2735 ac_fn_c_check_decl ()
2736 {
2737   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2739       as_decl_name=`echo $2|sed 's/ *(.*//'`
2740   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2741   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2742 printf %s "checking whether $as_decl_name is declared... " >&6; }
2743 if eval test \${$3+y}
2744 then :
2745   printf %s "(cached) " >&6
2746 else
2747   ac_save_werror_flag=$ac_c_werror_flag
2748   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2750 /* end confdefs.h.  */
2751 $4
2752 int
2753 main (void)
2754 {
2755 #ifndef $as_decl_name
2756 #ifdef __cplusplus
2757   (void) $as_decl_use;
2758 #else
2759   (void) $as_decl_name;
2760 #endif
2761 #endif
2762
2763   ;
2764   return 0;
2765 }
2766 _ACEOF
2767 if ac_fn_c_try_compile "$LINENO"
2768 then :
2769   eval "$3=yes"
2770 else
2771   eval "$3=no"
2772 fi
2773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2774 fi
2775 eval ac_res=\$$3
2776                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2777 printf "%s\n" "$ac_res" >&6; }
2778   ac_c_werror_flag=$ac_save_werror_flag
2779   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2780
2781 } # ac_fn_c_check_decl
2782
2783 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2784 # --------------------------------------------
2785 # Tries to find the compile-time value of EXPR in a program that includes
2786 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2787 # computed
2788 ac_fn_c_compute_int ()
2789 {
2790   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2791   if test "$cross_compiling" = yes; then
2792     # Depending upon the size, compute the lo and hi bounds.
2793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h.  */
2795 $4
2796 int
2797 main (void)
2798 {
2799 static int test_array [1 - 2 * !(($2) >= 0)];
2800 test_array [0] = 0;
2801 return test_array [0];
2802
2803   ;
2804   return 0;
2805 }
2806 _ACEOF
2807 if ac_fn_c_try_compile "$LINENO"
2808 then :
2809   ac_lo=0 ac_mid=0
2810   while :; do
2811     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812 /* end confdefs.h.  */
2813 $4
2814 int
2815 main (void)
2816 {
2817 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2818 test_array [0] = 0;
2819 return test_array [0];
2820
2821   ;
2822   return 0;
2823 }
2824 _ACEOF
2825 if ac_fn_c_try_compile "$LINENO"
2826 then :
2827   ac_hi=$ac_mid; break
2828 else
2829   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2830                         if test $ac_lo -le $ac_mid; then
2831                           ac_lo= ac_hi=
2832                           break
2833                         fi
2834                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2835 fi
2836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2837   done
2838 else
2839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840 /* end confdefs.h.  */
2841 $4
2842 int
2843 main (void)
2844 {
2845 static int test_array [1 - 2 * !(($2) < 0)];
2846 test_array [0] = 0;
2847 return test_array [0];
2848
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 if ac_fn_c_try_compile "$LINENO"
2854 then :
2855   ac_hi=-1 ac_mid=-1
2856   while :; do
2857     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858 /* end confdefs.h.  */
2859 $4
2860 int
2861 main (void)
2862 {
2863 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2864 test_array [0] = 0;
2865 return test_array [0];
2866
2867   ;
2868   return 0;
2869 }
2870 _ACEOF
2871 if ac_fn_c_try_compile "$LINENO"
2872 then :
2873   ac_lo=$ac_mid; break
2874 else
2875   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2876                         if test $ac_mid -le $ac_hi; then
2877                           ac_lo= ac_hi=
2878                           break
2879                         fi
2880                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2881 fi
2882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2883   done
2884 else
2885   ac_lo= ac_hi=
2886 fi
2887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2888 fi
2889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2890 # Binary search between lo and hi bounds.
2891 while test "x$ac_lo" != "x$ac_hi"; do
2892   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894 /* end confdefs.h.  */
2895 $4
2896 int
2897 main (void)
2898 {
2899 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2900 test_array [0] = 0;
2901 return test_array [0];
2902
2903   ;
2904   return 0;
2905 }
2906 _ACEOF
2907 if ac_fn_c_try_compile "$LINENO"
2908 then :
2909   ac_hi=$ac_mid
2910 else
2911   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2912 fi
2913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2914 done
2915 case $ac_lo in #((
2916 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2917 '') ac_retval=1 ;;
2918 esac
2919   else
2920     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2921 /* end confdefs.h.  */
2922 $4
2923 static long int longval () { return $2; }
2924 static unsigned long int ulongval () { return $2; }
2925 #include <stdio.h>
2926 #include <stdlib.h>
2927 int
2928 main (void)
2929 {
2930
2931   FILE *f = fopen ("conftest.val", "w");
2932   if (! f)
2933     return 1;
2934   if (($2) < 0)
2935     {
2936       long int i = longval ();
2937       if (i != ($2))
2938         return 1;
2939       fprintf (f, "%ld", i);
2940     }
2941   else
2942     {
2943       unsigned long int i = ulongval ();
2944       if (i != ($2))
2945         return 1;
2946       fprintf (f, "%lu", i);
2947     }
2948   /* Do not output a trailing newline, as this causes \r\n confusion
2949      on some platforms.  */
2950   return ferror (f) || fclose (f) != 0;
2951
2952   ;
2953   return 0;
2954 }
2955 _ACEOF
2956 if ac_fn_c_try_run "$LINENO"
2957 then :
2958   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2959 else
2960   ac_retval=1
2961 fi
2962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2963   conftest.$ac_objext conftest.beam conftest.$ac_ext
2964 rm -f conftest.val
2965
2966   fi
2967   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2968   as_fn_set_status $ac_retval
2969
2970 } # ac_fn_c_compute_int
2971
2972 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2973 # ----------------------------------------------------
2974 # Tries to find if the field MEMBER exists in type AGGR, after including
2975 # INCLUDES, setting cache variable VAR accordingly.
2976 ac_fn_c_check_member ()
2977 {
2978   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2979   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2980 printf %s "checking for $2.$3... " >&6; }
2981 if eval test \${$4+y}
2982 then :
2983   printf %s "(cached) " >&6
2984 else
2985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2986 /* end confdefs.h.  */
2987 $5
2988 int
2989 main (void)
2990 {
2991 static $2 ac_aggr;
2992 if (ac_aggr.$3)
2993 return 0;
2994   ;
2995   return 0;
2996 }
2997 _ACEOF
2998 if ac_fn_c_try_compile "$LINENO"
2999 then :
3000   eval "$4=yes"
3001 else
3002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3003 /* end confdefs.h.  */
3004 $5
3005 int
3006 main (void)
3007 {
3008 static $2 ac_aggr;
3009 if (sizeof ac_aggr.$3)
3010 return 0;
3011   ;
3012   return 0;
3013 }
3014 _ACEOF
3015 if ac_fn_c_try_compile "$LINENO"
3016 then :
3017   eval "$4=yes"
3018 else
3019   eval "$4=no"
3020 fi
3021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3022 fi
3023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3024 fi
3025 eval ac_res=\$$4
3026                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3027 printf "%s\n" "$ac_res" >&6; }
3028   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3029
3030 } # ac_fn_c_check_member
3031 cat >config.log <<_ACEOF
3032 This file contains any messages produced by compilers while
3033 running configure, to aid debugging if configure makes a mistake.
3034
3035 It was created by gzip $as_me 1.8, which was
3036 generated by GNU Autoconf 2.69.147-5ad35.  Invocation command line was
3037
3038   $ $0 $@
3039
3040 _ACEOF
3041 exec 5>>config.log
3042 {
3043 cat <<_ASUNAME
3044 ## --------- ##
3045 ## Platform. ##
3046 ## --------- ##
3047
3048 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3049 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3050 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3051 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3052 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3053
3054 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3055 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3056
3057 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3058 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3059 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3060 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3061 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3062 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3063 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3064
3065 _ASUNAME
3066
3067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3068 for as_dir in $PATH
3069 do
3070   IFS=$as_save_IFS
3071   case $as_dir in #(((
3072     '') as_dir=./ ;;
3073     */) ;;
3074     *) as_dir=$as_dir/ ;;
3075   esac
3076     printf "%s\n" "PATH: $as_dir"
3077   done
3078 IFS=$as_save_IFS
3079
3080 } >&5
3081
3082 cat >&5 <<_ACEOF
3083
3084
3085 ## ----------- ##
3086 ## Core tests. ##
3087 ## ----------- ##
3088
3089 _ACEOF
3090
3091
3092 # Keep a trace of the command line.
3093 # Strip out --no-create and --no-recursion so they do not pile up.
3094 # Strip out --silent because we don't want to record it for future runs.
3095 # Also quote any args containing shell meta-characters.
3096 # Make two passes to allow for proper duplicate-argument suppression.
3097 ac_configure_args=
3098 ac_configure_args0=
3099 ac_configure_args1=
3100 ac_must_keep_next=false
3101 for ac_pass in 1 2
3102 do
3103   for ac_arg
3104   do
3105     case $ac_arg in
3106     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3107     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3108     | -silent | --silent | --silen | --sile | --sil)
3109       continue ;;
3110     *\'*)
3111       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3112     esac
3113     case $ac_pass in
3114     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3115     2)
3116       as_fn_append ac_configure_args1 " '$ac_arg'"
3117       if test $ac_must_keep_next = true; then
3118         ac_must_keep_next=false # Got value, back to normal.
3119       else
3120         case $ac_arg in
3121           *=* | --config-cache | -C | -disable-* | --disable-* \
3122           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3123           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3124           | -with-* | --with-* | -without-* | --without-* | --x)
3125             case "$ac_configure_args0 " in
3126               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3127             esac
3128             ;;
3129           -* ) ac_must_keep_next=true ;;
3130         esac
3131       fi
3132       as_fn_append ac_configure_args " '$ac_arg'"
3133       ;;
3134     esac
3135   done
3136 done
3137 { ac_configure_args0=; unset ac_configure_args0;}
3138 { ac_configure_args1=; unset ac_configure_args1;}
3139
3140 # When interrupted or exit'd, cleanup temporary files, and complete
3141 # config.log.  We remove comments because anyway the quotes in there
3142 # would cause problems or look ugly.
3143 # WARNING: Use '\'' to represent an apostrophe within the trap.
3144 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3145 trap 'exit_status=$?
3146   # Sanitize IFS.
3147   IFS=" ""      $as_nl"
3148   # Save into config.log some information that might help in debugging.
3149   {
3150     echo
3151
3152     printf "%s\n" "## ---------------- ##
3153 ## Cache variables. ##
3154 ## ---------------- ##"
3155     echo
3156     # The following way of writing the cache mishandles newlines in values,
3157 (
3158   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3159     eval ac_val=\$$ac_var
3160     case $ac_val in #(
3161     *${as_nl}*)
3162       case $ac_var in #(
3163       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3164 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3165       esac
3166       case $ac_var in #(
3167       _ | IFS | as_nl) ;; #(
3168       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3169       *) { eval $ac_var=; unset $ac_var;} ;;
3170       esac ;;
3171     esac
3172   done
3173   (set) 2>&1 |
3174     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3175     *${as_nl}ac_space=\ *)
3176       sed -n \
3177         "s/'\''/'\''\\\\'\'''\''/g;
3178           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3179       ;; #(
3180     *)
3181       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3182       ;;
3183     esac |
3184     sort
3185 )
3186     echo
3187
3188     printf "%s\n" "## ----------------- ##
3189 ## Output variables. ##
3190 ## ----------------- ##"
3191     echo
3192     for ac_var in $ac_subst_vars
3193     do
3194       eval ac_val=\$$ac_var
3195       case $ac_val in
3196       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3197       esac
3198       printf "%s\n" "$ac_var='\''$ac_val'\''"
3199     done | sort
3200     echo
3201
3202     if test -n "$ac_subst_files"; then
3203       printf "%s\n" "## ------------------- ##
3204 ## File substitutions. ##
3205 ## ------------------- ##"
3206       echo
3207       for ac_var in $ac_subst_files
3208       do
3209         eval ac_val=\$$ac_var
3210         case $ac_val in
3211         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3212         esac
3213         printf "%s\n" "$ac_var='\''$ac_val'\''"
3214       done | sort
3215       echo
3216     fi
3217
3218     if test -s confdefs.h; then
3219       printf "%s\n" "## ----------- ##
3220 ## confdefs.h. ##
3221 ## ----------- ##"
3222       echo
3223       cat confdefs.h
3224       echo
3225     fi
3226     test "$ac_signal" != 0 &&
3227       printf "%s\n" "$as_me: caught signal $ac_signal"
3228     printf "%s\n" "$as_me: exit $exit_status"
3229   } >&5
3230   rm -f core *.core core.conftest.* &&
3231     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3232     exit $exit_status
3233 ' 0
3234 for ac_signal in 1 2 13 15; do
3235   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3236 done
3237 ac_signal=0
3238
3239 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3240 rm -f -r conftest* confdefs.h
3241
3242 printf "%s\n" "/* confdefs.h */" > confdefs.h
3243
3244 # Predefined preprocessor variables.
3245
3246 cat >>confdefs.h <<_ACEOF
3247 #define PACKAGE_NAME "$PACKAGE_NAME"
3248 _ACEOF
3249
3250 cat >>confdefs.h <<_ACEOF
3251 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3252 _ACEOF
3253
3254 cat >>confdefs.h <<_ACEOF
3255 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3256 _ACEOF
3257
3258 cat >>confdefs.h <<_ACEOF
3259 #define PACKAGE_STRING "$PACKAGE_STRING"
3260 _ACEOF
3261
3262 cat >>confdefs.h <<_ACEOF
3263 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3264 _ACEOF
3265
3266 cat >>confdefs.h <<_ACEOF
3267 #define PACKAGE_URL "$PACKAGE_URL"
3268 _ACEOF
3269
3270
3271 # Let the site file select an alternate cache file if it wants to.
3272 # Prefer an explicitly selected file to automatically selected ones.
3273 ac_site_file1=NONE
3274 ac_site_file2=NONE
3275 if test -n "$CONFIG_SITE"; then
3276   # We do not want a PATH search for config.site.
3277   case $CONFIG_SITE in #((
3278     -*)  ac_site_file1=./$CONFIG_SITE;;
3279     */*) ac_site_file1=$CONFIG_SITE;;
3280     *)   ac_site_file1=./$CONFIG_SITE;;
3281   esac
3282 elif test "x$prefix" != xNONE; then
3283   ac_site_file1=$prefix/share/config.site
3284   ac_site_file2=$prefix/etc/config.site
3285 else
3286   ac_site_file1=$ac_default_prefix/share/config.site
3287   ac_site_file2=$ac_default_prefix/etc/config.site
3288 fi
3289 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3290 do
3291   test "x$ac_site_file" = xNONE && continue
3292   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3293     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3294 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3295     sed 's/^/| /' "$ac_site_file" >&5
3296     . "$ac_site_file" \
3297       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3298 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3299 as_fn_error $? "failed to load site script $ac_site_file
3300 See \`config.log' for more details" "$LINENO" 5; }
3301   fi
3302 done
3303
3304 if test -r "$cache_file"; then
3305   # Some versions of bash will fail to source /dev/null (special files
3306   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3307   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3308     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3309 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3310     case $cache_file in
3311       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3312       *)                      . "./$cache_file";;
3313     esac
3314   fi
3315 else
3316   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3317 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3318   >$cache_file
3319 fi
3320
3321 as_fn_append ac_header_list " sys/types.h"
3322 as_fn_append ac_header_list " sys/stat.h"
3323 as_fn_append ac_header_list " strings.h"
3324 as_fn_append ac_header_list " inttypes.h"
3325 as_fn_append ac_header_list " stdint.h"
3326 as_fn_append ac_header_list " unistd.h"
3327 as_fn_append ac_header_list " sys/param.h"
3328 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3329 as_fn_append ac_header_list " sys/socket.h"
3330 as_fn_append ac_func_list " fchdir"
3331 as_fn_append ac_header_list " dirent.h"
3332 as_fn_append ac_func_list " fdopendir"
3333 as_fn_append ac_func_list " strerror_r"
3334 as_fn_append ac_func_list " fcntl"
3335 as_fn_append ac_func_list " symlink"
3336 as_fn_append ac_func_list " mempcpy"
3337 as_fn_append ac_func_list " vasnprintf"
3338 as_fn_append ac_header_list " features.h"
3339 as_fn_append ac_func_list " snprintf"
3340 as_fn_append ac_func_list " fpurge"
3341 as_fn_append ac_func_list " __fpurge"
3342 as_fn_append ac_func_list " __freading"
3343 as_fn_append ac_func_list " __fseterr"
3344 as_fn_append ac_func_list " fstatat"
3345 as_fn_append ac_func_list " fsync"
3346 as_fn_append ac_func_list " getdtablesize"
3347 gl_getopt_required=GNU
3348 as_fn_append ac_header_list " getopt.h"
3349 as_fn_append ac_func_list " gettimeofday"
3350 as_fn_append ac_func_list " nanotime"
3351 as_fn_append ac_header_list " sys/time.h"
3352 as_fn_append ac_func_list " lstat"
3353 as_fn_append ac_header_list " math.h"
3354 as_fn_append ac_header_list " sys/mman.h"
3355 as_fn_append ac_func_list " mprotect"
3356 as_fn_append ac_func_list " openat"
3357 as_fn_append ac_func_list " __xpg_strerror_r"
3358 gl_printf_safe=yes
3359 as_fn_append ac_header_list " wchar.h"
3360 as_fn_append ac_func_list " strdup"
3361 as_fn_append ac_func_list " catgets"
3362 as_fn_append ac_func_list " pipe"
3363 as_fn_append ac_func_list " unlinkat"
3364 as_fn_append ac_header_list " utime.h"
3365 as_fn_append ac_func_list " futimes"
3366 as_fn_append ac_func_list " futimesat"
3367 as_fn_append ac_func_list " futimens"
3368 as_fn_append ac_func_list " utimensat"
3369 as_fn_append ac_func_list " lutimes"
3370 as_fn_append ac_header_list " fcntl.h"
3371 as_fn_append ac_header_list " limits.h"
3372 as_fn_append ac_header_list " memory.h"
3373 as_fn_append ac_header_list " time.h"
3374 as_fn_append ac_func_list " chown"
3375 as_fn_append ac_func_list " fchmod"
3376 as_fn_append ac_func_list " fchown"
3377 as_fn_append ac_func_list " siginterrupt"
3378 # Check that the precious variables saved in the cache have kept the same
3379 # value.
3380 ac_cache_corrupted=false
3381 for ac_var in $ac_precious_vars; do
3382   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3383   eval ac_new_set=\$ac_env_${ac_var}_set
3384   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3385   eval ac_new_val=\$ac_env_${ac_var}_value
3386   case $ac_old_set,$ac_new_set in
3387     set,)
3388       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3389 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3390       ac_cache_corrupted=: ;;
3391     ,set)
3392       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3393 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3394       ac_cache_corrupted=: ;;
3395     ,);;
3396     *)
3397       if test "x$ac_old_val" != "x$ac_new_val"; then
3398         # differences in whitespace do not lead to failure.
3399         ac_old_val_w=`echo x $ac_old_val`
3400         ac_new_val_w=`echo x $ac_new_val`
3401         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3402           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3403 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3404           ac_cache_corrupted=:
3405         else
3406           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3407 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3408           eval $ac_var=\$ac_old_val
3409         fi
3410         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3411 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3412         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3413 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3414       fi;;
3415   esac
3416   # Pass precious variables to config.status.
3417   if test "$ac_new_set" = set; then
3418     case $ac_new_val in
3419     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3420     *) ac_arg=$ac_var=$ac_new_val ;;
3421     esac
3422     case " $ac_configure_args " in
3423       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3424       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3425     esac
3426   fi
3427 done
3428 if $ac_cache_corrupted; then
3429   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3431   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3432 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3433   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3434 fi
3435 ## -------------------- ##
3436 ## Main body of script. ##
3437 ## -------------------- ##
3438
3439 ac_ext=c
3440 ac_cpp='$CPP $CPPFLAGS'
3441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3444
3445
3446
3447
3448 ac_aux_dir=
3449 for ac_dir in build-aux "$srcdir"/build-aux
3450 do
3451   if test -f "$ac_dir/install-sh"; then
3452     ac_aux_dir=$ac_dir
3453     ac_install_sh="$ac_aux_dir/install-sh -c"
3454     break
3455   elif test -f "$ac_dir/install.sh"; then
3456     ac_aux_dir=$ac_dir
3457     ac_install_sh="$ac_aux_dir/install.sh -c"
3458     break
3459   elif test -f "$ac_dir/shtool"; then
3460     ac_aux_dir=$ac_dir
3461     ac_install_sh="$ac_aux_dir/shtool install -c"
3462     break
3463   fi
3464 done
3465 if test -z "$ac_aux_dir"; then
3466   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3467 fi
3468
3469 # These three variables are undocumented and unsupported,
3470 # and are intended to be withdrawn in a future Autoconf release.
3471 # They can cause serious problems if a builder's source tree is in a directory
3472 # whose full name contains unusual characters.
3473 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3474 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3475 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3476
3477
3478
3479 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3480
3481 am__api_version='1.99a'
3482
3483 # Find a good install program.  We prefer a C program (faster),
3484 # so one script is as good as another.  But avoid the broken or
3485 # incompatible versions:
3486 # SysV /etc/install, /usr/sbin/install
3487 # SunOS /usr/etc/install
3488 # IRIX /sbin/install
3489 # AIX /bin/install
3490 # AmigaOS /C/install, which installs bootblocks on floppy discs
3491 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3492 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3493 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3494 # OS/2's system install, which has a completely different semantic
3495 # ./install, which can be erroneously created by make from ./install.sh.
3496 # Reject install programs that cannot install multiple files.
3497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3498 printf %s "checking for a BSD-compatible install... " >&6; }
3499 if test -z "$INSTALL"; then
3500 if test ${ac_cv_path_install+y}
3501 then :
3502   printf %s "(cached) " >&6
3503 else
3504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3505 for as_dir in $PATH
3506 do
3507   IFS=$as_save_IFS
3508   case $as_dir in #(((
3509     '') as_dir=./ ;;
3510     */) ;;
3511     *) as_dir=$as_dir/ ;;
3512   esac
3513     # Account for fact that we put trailing slashes in our PATH walk.
3514 case $as_dir in #((
3515   ./ | /[cC]/* | \
3516   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3517   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3518   /usr/ucb/* ) ;;
3519   *)
3520     # OSF1 and SCO ODT 3.0 have their own names for install.
3521     # Don't use installbsd from OSF since it installs stuff as root
3522     # by default.
3523     for ac_prog in ginstall scoinst install; do
3524       for ac_exec_ext in '' $ac_executable_extensions; do
3525         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3526           if test $ac_prog = install &&
3527             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3528             # AIX install.  It has an incompatible calling convention.
3529             :
3530           elif test $ac_prog = install &&
3531             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3532             # program-specific install script used by HP pwplus--don't use.
3533             :
3534           else
3535             rm -rf conftest.one conftest.two conftest.dir
3536             echo one > conftest.one
3537             echo two > conftest.two
3538             mkdir conftest.dir
3539             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3540               test -s conftest.one && test -s conftest.two &&
3541               test -s conftest.dir/conftest.one &&
3542               test -s conftest.dir/conftest.two
3543             then
3544               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3545               break 3
3546             fi
3547           fi
3548         fi
3549       done
3550     done
3551     ;;
3552 esac
3553
3554   done
3555 IFS=$as_save_IFS
3556
3557 rm -rf conftest.one conftest.two conftest.dir
3558
3559 fi
3560   if test ${ac_cv_path_install+y}; then
3561     INSTALL=$ac_cv_path_install
3562   else
3563     # As a last resort, use the slow shell script.  Don't cache a
3564     # value for INSTALL within a source directory, because that will
3565     # break other packages using the cache if that directory is
3566     # removed, or if the value is a relative name.
3567     INSTALL=$ac_install_sh
3568   fi
3569 fi
3570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3571 printf "%s\n" "$INSTALL" >&6; }
3572
3573 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3574 # It thinks the first close brace ends the variable substitution.
3575 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3576
3577 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3578
3579 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3580
3581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3582 printf %s "checking whether build environment is sane... " >&6; }
3583 # Reject unsafe characters in $srcdir or the absolute working directory
3584 # name.  Accept space and tab only in the latter.
3585 am_lf='
3586 '
3587 case `pwd` in
3588   *[\\\"\#\$\&\'\`$am_lf]*)
3589     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3590 esac
3591 case $srcdir in
3592   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3593     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3594 esac
3595
3596 # Do 'set' in a subshell so we don't clobber the current shell's
3597 # arguments.  Must try -L first in case configure is actually a
3598 # symlink; some systems play weird games with the mod time of symlinks
3599 # (eg FreeBSD returns the mod time of the symlink's containing
3600 # directory).
3601 if (
3602    am_has_slept=no
3603    for am_try in 1 2; do
3604      echo "timestamp, slept: $am_has_slept" > conftest.file
3605      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3606      if test "$*" = "X"; then
3607         # -L didn't work.
3608         set X `ls -t "$srcdir/configure" conftest.file`
3609      fi
3610      if test "$*" != "X $srcdir/configure conftest.file" \
3611         && test "$*" != "X conftest.file $srcdir/configure"; then
3612
3613         # If neither matched, then we have a broken ls.  This can happen
3614         # if, for instance, CONFIG_SHELL is bash and it inherits a
3615         # broken ls alias from the environment.  This has actually
3616         # happened.  Such a system could not be considered "sane".
3617         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3618   alias in your environment" "$LINENO" 5
3619      fi
3620      if test "$2" = conftest.file || test $am_try -eq 2; then
3621        break
3622      fi
3623      # Just in case.
3624      sleep 1
3625      am_has_slept=yes
3626    done
3627    test "$2" = conftest.file
3628    )
3629 then
3630    # Ok.
3631    :
3632 else
3633    as_fn_error $? "newly created file is older than distributed files!
3634 Check your system clock" "$LINENO" 5
3635 fi
3636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3637 printf "%s\n" "yes" >&6; }
3638 # If we didn't sleep, we still need to ensure time stamps of config.status and
3639 # generated files are strictly newer.
3640 am_sleep_pid=
3641 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3642   ( sleep 1 ) &
3643   am_sleep_pid=$!
3644 fi
3645
3646 rm -f conftest.file
3647
3648 test "$program_prefix" != NONE &&
3649   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3650 # Use a double $ so make ignores it.
3651 test "$program_suffix" != NONE &&
3652   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3653 # Double any \ or $.
3654 # By default was `s,x,x', remove it if useless.
3655 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3656 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3657
3658 # Expand $ac_aux_dir to an absolute path.
3659 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3660
3661 if test x"${MISSING+set}" != xset; then
3662   case $am_aux_dir in
3663   *\ * | *\     *)
3664     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3665   *)
3666     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3667   esac
3668 fi
3669 # Use eval to expand $SHELL
3670 if eval "$MISSING --is-lightweight"; then
3671   am_missing_run="$MISSING "
3672 else
3673   am_missing_run=
3674   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3675 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3676 fi
3677
3678 if test x"${install_sh+set}" != xset; then
3679   case $am_aux_dir in
3680   *\ * | *\     *)
3681     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3682   *)
3683     install_sh="\${SHELL} $am_aux_dir/install-sh"
3684   esac
3685 fi
3686
3687 # Installed binaries are usually stripped using 'strip' when the user
3688 # run "make install-strip".  However 'strip' might not be the right
3689 # tool to use in cross-compilation environments, therefore Automake
3690 # will honor the 'STRIP' environment variable to overrule this program.
3691 if test "$cross_compiling" != no; then
3692   if test -n "$ac_tool_prefix"; then
3693   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3694 set dummy ${ac_tool_prefix}strip; ac_word=$2
3695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3696 printf %s "checking for $ac_word... " >&6; }
3697 if test ${ac_cv_prog_STRIP+y}
3698 then :
3699   printf %s "(cached) " >&6
3700 else
3701   if test -n "$STRIP"; then
3702   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3703 else
3704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705 for as_dir in $PATH
3706 do
3707   IFS=$as_save_IFS
3708   case $as_dir in #(((
3709     '') as_dir=./ ;;
3710     */) ;;
3711     *) as_dir=$as_dir/ ;;
3712   esac
3713     for ac_exec_ext in '' $ac_executable_extensions; do
3714   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3715     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3716     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3717     break 2
3718   fi
3719 done
3720   done
3721 IFS=$as_save_IFS
3722
3723 fi
3724 fi
3725 STRIP=$ac_cv_prog_STRIP
3726 if test -n "$STRIP"; then
3727   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3728 printf "%s\n" "$STRIP" >&6; }
3729 else
3730   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3731 printf "%s\n" "no" >&6; }
3732 fi
3733
3734
3735 fi
3736 if test -z "$ac_cv_prog_STRIP"; then
3737   ac_ct_STRIP=$STRIP
3738   # Extract the first word of "strip", so it can be a program name with args.
3739 set dummy strip; ac_word=$2
3740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3741 printf %s "checking for $ac_word... " >&6; }
3742 if test ${ac_cv_prog_ac_ct_STRIP+y}
3743 then :
3744   printf %s "(cached) " >&6
3745 else
3746   if test -n "$ac_ct_STRIP"; then
3747   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3748 else
3749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750 for as_dir in $PATH
3751 do
3752   IFS=$as_save_IFS
3753   case $as_dir in #(((
3754     '') as_dir=./ ;;
3755     */) ;;
3756     *) as_dir=$as_dir/ ;;
3757   esac
3758     for ac_exec_ext in '' $ac_executable_extensions; do
3759   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3760     ac_cv_prog_ac_ct_STRIP="strip"
3761     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3762     break 2
3763   fi
3764 done
3765   done
3766 IFS=$as_save_IFS
3767
3768 fi
3769 fi
3770 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3771 if test -n "$ac_ct_STRIP"; then
3772   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3773 printf "%s\n" "$ac_ct_STRIP" >&6; }
3774 else
3775   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3776 printf "%s\n" "no" >&6; }
3777 fi
3778
3779   if test "x$ac_ct_STRIP" = x; then
3780     STRIP=":"
3781   else
3782     case $cross_compiling:$ac_tool_warned in
3783 yes:)
3784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3785 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3786 ac_tool_warned=yes ;;
3787 esac
3788     STRIP=$ac_ct_STRIP
3789   fi
3790 else
3791   STRIP="$ac_cv_prog_STRIP"
3792 fi
3793
3794 fi
3795 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3796
3797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3798 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3799 if test -z "$MKDIR_P"; then
3800   if test ${ac_cv_path_mkdir+y}
3801 then :
3802   printf %s "(cached) " >&6
3803 else
3804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3805 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3806 do
3807   IFS=$as_save_IFS
3808   case $as_dir in #(((
3809     '') as_dir=./ ;;
3810     */) ;;
3811     *) as_dir=$as_dir/ ;;
3812   esac
3813     for ac_prog in mkdir gmkdir; do
3814          for ac_exec_ext in '' $ac_executable_extensions; do
3815            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3816            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3817              'mkdir ('*'coreutils) '* | \
3818              'BusyBox '* | \
3819              'mkdir (fileutils) '4.1*)
3820                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3821                break 3;;
3822            esac
3823          done
3824        done
3825   done
3826 IFS=$as_save_IFS
3827
3828 fi
3829
3830   test -d ./--version && rmdir ./--version
3831   if test ${ac_cv_path_mkdir+y}; then
3832     MKDIR_P="$ac_cv_path_mkdir -p"
3833   else
3834     # As a last resort, use the slow shell script.  Don't cache a
3835     # value for MKDIR_P within a source directory, because that will
3836     # break other packages using the cache if that directory is
3837     # removed, or if the value is a relative name.
3838     MKDIR_P="$ac_install_sh -d"
3839   fi
3840 fi
3841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3842 printf "%s\n" "$MKDIR_P" >&6; }
3843
3844 for ac_prog in gawk mawk nawk awk
3845 do
3846   # Extract the first word of "$ac_prog", so it can be a program name with args.
3847 set dummy $ac_prog; ac_word=$2
3848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3849 printf %s "checking for $ac_word... " >&6; }
3850 if test ${ac_cv_prog_AWK+y}
3851 then :
3852   printf %s "(cached) " >&6
3853 else
3854   if test -n "$AWK"; then
3855   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3856 else
3857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3858 for as_dir in $PATH
3859 do
3860   IFS=$as_save_IFS
3861   case $as_dir in #(((
3862     '') as_dir=./ ;;
3863     */) ;;
3864     *) as_dir=$as_dir/ ;;
3865   esac
3866     for ac_exec_ext in '' $ac_executable_extensions; do
3867   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3868     ac_cv_prog_AWK="$ac_prog"
3869     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3870     break 2
3871   fi
3872 done
3873   done
3874 IFS=$as_save_IFS
3875
3876 fi
3877 fi
3878 AWK=$ac_cv_prog_AWK
3879 if test -n "$AWK"; then
3880   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3881 printf "%s\n" "$AWK" >&6; }
3882 else
3883   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3884 printf "%s\n" "no" >&6; }
3885 fi
3886
3887
3888   test -n "$AWK" && break
3889 done
3890
3891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3892 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3893 set x ${MAKE-make}
3894 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3895 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3896 then :
3897   printf %s "(cached) " >&6
3898 else
3899   cat >conftest.make <<\_ACEOF
3900 SHELL = /bin/sh
3901 all:
3902         @echo '@@@%%%=$(MAKE)=@@@%%%'
3903 _ACEOF
3904 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3905 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3906   *@@@%%%=?*=@@@%%%*)
3907     eval ac_cv_prog_make_${ac_make}_set=yes;;
3908   *)
3909     eval ac_cv_prog_make_${ac_make}_set=no;;
3910 esac
3911 rm -f conftest.make
3912 fi
3913 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3914   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3915 printf "%s\n" "yes" >&6; }
3916   SET_MAKE=
3917 else
3918   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919 printf "%s\n" "no" >&6; }
3920   SET_MAKE="MAKE=${MAKE-make}"
3921 fi
3922
3923 # Check whether --enable-silent-rules was given.
3924 if test ${enable_silent_rules+y}
3925 then :
3926   enableval=$enable_silent_rules;
3927 fi
3928
3929 case $enable_silent_rules in # (((
3930   yes) AM_DEFAULT_VERBOSITY=0;;
3931    no) AM_DEFAULT_VERBOSITY=1;;
3932     *) AM_DEFAULT_VERBOSITY=1;;
3933 esac
3934 am_make=${MAKE-make}
3935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3936 printf %s "checking whether $am_make supports nested variables... " >&6; }
3937 if test ${am_cv_make_support_nested_variables+y}
3938 then :
3939   printf %s "(cached) " >&6
3940 else
3941   if printf "%s\n" 'TRUE=$(BAR$(V))
3942 BAR0=false
3943 BAR1=true
3944 V=1
3945 am__doit:
3946         @$(TRUE)
3947 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3948   am_cv_make_support_nested_variables=yes
3949 else
3950   am_cv_make_support_nested_variables=no
3951 fi
3952 fi
3953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3954 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3955 if test $am_cv_make_support_nested_variables = yes; then
3956     AM_V='$(V)'
3957   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3958 else
3959   AM_V=$AM_DEFAULT_VERBOSITY
3960   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3961 fi
3962 AM_BACKSLASH='\'
3963
3964 mkdir_p='$(MKDIR_P)'
3965 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3966   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3967   # is not polluted with repeated "-I."
3968   am__isrc=' -I$(srcdir)'
3969   # test to see if srcdir already configured
3970   if test -f $srcdir/config.status; then
3971     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3972   fi
3973 fi
3974
3975 # test whether we have cygpath
3976 if test -z "$CYGPATH_W"; then
3977   if (cygpath --version) >/dev/null 2>/dev/null; then
3978     CYGPATH_W='cygpath -w'
3979   else
3980     CYGPATH_W=echo
3981   fi
3982 fi
3983
3984
3985 # Define the identity of the package.
3986  PACKAGE='gzip'
3987  VERSION='1.8'
3988
3989
3990 cat >>confdefs.h <<_ACEOF
3991 #define PACKAGE "$PACKAGE"
3992 _ACEOF
3993
3994
3995 cat >>confdefs.h <<_ACEOF
3996 #define VERSION "$VERSION"
3997 _ACEOF
3998
3999 # Some tools Automake needs.
4000
4001 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4002
4003
4004 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4005
4006
4007 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4008
4009
4010 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4011
4012
4013 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4014
4015 # We need awk for the "check" target (and possibly the TAP driver).  The
4016 # system "awk" is bad on some platforms.
4017 # Always define AMTAR for backward compatibility.  Yes, it's still used
4018 # in the wild :-(  We should find a proper way to deprecate it ...
4019 AMTAR='$${TAR-tar}'
4020
4021
4022 # We'll loop over all known methods to create a tar archive until one works.
4023 _am_tools='gnutar  pax cpio none'
4024
4025 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4026
4027
4028
4029
4030
4031
4032 # POSIX will say in a future version that running "rm -f" with no argument
4033 # is OK; and we want to be able to make that assumption in our Makefile
4034 # recipes.  So use an aggressive probe to check that the usage we want is
4035 # actually supported "in the wild" to an acceptable degree.
4036 # See automake bug#10828.
4037 # To make any issue more visible, cause the running configure to be aborted
4038 # by default if the 'rm' program in use doesn't match our expectations; the
4039 # user can still override this though.
4040 if rm -f && rm -fr && rm -rf; then : OK; else
4041   cat >&2 <<'END'
4042 Oops!
4043
4044 Your 'rm' program seems unable to run without file operands specified
4045 on the command line, even when the '-f' option is present.  This is contrary
4046 to the behaviour of most rm programs out there, and not conforming with
4047 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4048
4049 Please tell bug-automake@gnu.org about your system, including the value
4050 of your $PATH and any error possibly output before this message.  This
4051 can help us improve future automake versions.
4052
4053 END
4054   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4055     echo 'Configuration will proceed anyway, since you have set the' >&2
4056     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4057     echo >&2
4058   else
4059     cat >&2 <<'END'
4060 Aborting the configuration process, to ensure you take notice of the issue.
4061
4062 You can download and install GNU coreutils to get an 'rm' implementation
4063 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4064
4065 If you want to complete the configuration process using your problematic
4066 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4067 to "yes", and re-run configure.
4068
4069 END
4070     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4071   fi
4072 fi
4073
4074 # Check whether --enable-silent-rules was given.
4075 if test ${enable_silent_rules+y}
4076 then :
4077   enableval=$enable_silent_rules;
4078 fi
4079
4080 case $enable_silent_rules in # (((
4081   yes) AM_DEFAULT_VERBOSITY=0;;
4082    no) AM_DEFAULT_VERBOSITY=1;;
4083     *) AM_DEFAULT_VERBOSITY=0;;
4084 esac
4085 am_make=${MAKE-make}
4086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4087 printf %s "checking whether $am_make supports nested variables... " >&6; }
4088 if test ${am_cv_make_support_nested_variables+y}
4089 then :
4090   printf %s "(cached) " >&6
4091 else
4092   if printf "%s\n" 'TRUE=$(BAR$(V))
4093 BAR0=false
4094 BAR1=true
4095 V=1
4096 am__doit:
4097         @$(TRUE)
4098 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4099   am_cv_make_support_nested_variables=yes
4100 else
4101   am_cv_make_support_nested_variables=no
4102 fi
4103 fi
4104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4105 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4106 if test $am_cv_make_support_nested_variables = yes; then
4107     AM_V='$(V)'
4108   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4109 else
4110   AM_V=$AM_DEFAULT_VERBOSITY
4111   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4112 fi
4113 AM_BACKSLASH='\'
4114  # make --enable-silent-rules the default.
4115
4116
4117
4118
4119
4120
4121 DEPDIR=.deps
4122
4123 ac_config_commands="$ac_config_commands depfiles"
4124
4125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4126 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4127 cat > confinc.mk << 'END'
4128 am__doit:
4129         @echo this is the am__doit target >confinc.out
4130 .PHONY: am__doit
4131 END
4132 am__include="#"
4133 am__quote=
4134 # BSD make does it like this.
4135 echo '.include "confinc.mk" # ignored' > confmf.BSD
4136 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4137 echo 'include confinc.mk # ignored' > confmf.GNU
4138 _am_result=no
4139 for s in GNU BSD; do
4140   { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4141    (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4142    ac_status=$?
4143    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144    (exit $ac_status); }
4145   case $?:`cat confinc.out 2>/dev/null` in #(
4146   '0:this is the am__doit target') :
4147     case $s in #(
4148   BSD) :
4149     am__include='.include' am__quote='"' ;; #(
4150   *) :
4151     am__include='include' am__quote='' ;;
4152 esac ;; #(
4153   *) :
4154      ;;
4155 esac
4156   if test "$am__include" != "#"; then
4157     _am_result="yes ($s style)"
4158     break
4159   fi
4160 done
4161 rm -f confinc.* confmf.*
4162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4163 printf "%s\n" "${_am_result}" >&6; }
4164
4165 # Check whether --enable-dependency-tracking was given.
4166 if test ${enable_dependency_tracking+y}
4167 then :
4168   enableval=$enable_dependency_tracking;
4169 fi
4170
4171 if test "x$enable_dependency_tracking" != xno; then
4172   am_depcomp="$ac_aux_dir/depcomp"
4173   AMDEPBACKSLASH='\'
4174   am__nodep='_no'
4175 fi
4176  if test "x$enable_dependency_tracking" != xno; then
4177   AMDEP_TRUE=
4178   AMDEP_FALSE='#'
4179 else
4180   AMDEP_TRUE='#'
4181   AMDEP_FALSE=
4182 fi
4183
4184
4185 ac_ext=c
4186 ac_cpp='$CPP $CPPFLAGS'
4187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4190 if test -n "$ac_tool_prefix"; then
4191   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4192 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4194 printf %s "checking for $ac_word... " >&6; }
4195 if test ${ac_cv_prog_CC+y}
4196 then :
4197   printf %s "(cached) " >&6
4198 else
4199   if test -n "$CC"; then
4200   ac_cv_prog_CC="$CC" # Let the user override the test.
4201 else
4202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4203 for as_dir in $PATH
4204 do
4205   IFS=$as_save_IFS
4206   case $as_dir in #(((
4207     '') as_dir=./ ;;
4208     */) ;;
4209     *) as_dir=$as_dir/ ;;
4210   esac
4211     for ac_exec_ext in '' $ac_executable_extensions; do
4212   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4213     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4214     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4215     break 2
4216   fi
4217 done
4218   done
4219 IFS=$as_save_IFS
4220
4221 fi
4222 fi
4223 CC=$ac_cv_prog_CC
4224 if test -n "$CC"; then
4225   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4226 printf "%s\n" "$CC" >&6; }
4227 else
4228   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4229 printf "%s\n" "no" >&6; }
4230 fi
4231
4232
4233 fi
4234 if test -z "$ac_cv_prog_CC"; then
4235   ac_ct_CC=$CC
4236   # Extract the first word of "gcc", so it can be a program name with args.
4237 set dummy gcc; ac_word=$2
4238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4239 printf %s "checking for $ac_word... " >&6; }
4240 if test ${ac_cv_prog_ac_ct_CC+y}
4241 then :
4242   printf %s "(cached) " >&6
4243 else
4244   if test -n "$ac_ct_CC"; then
4245   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4246 else
4247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4248 for as_dir in $PATH
4249 do
4250   IFS=$as_save_IFS
4251   case $as_dir in #(((
4252     '') as_dir=./ ;;
4253     */) ;;
4254     *) as_dir=$as_dir/ ;;
4255   esac
4256     for ac_exec_ext in '' $ac_executable_extensions; do
4257   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4258     ac_cv_prog_ac_ct_CC="gcc"
4259     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4260     break 2
4261   fi
4262 done
4263   done
4264 IFS=$as_save_IFS
4265
4266 fi
4267 fi
4268 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4269 if test -n "$ac_ct_CC"; then
4270   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4271 printf "%s\n" "$ac_ct_CC" >&6; }
4272 else
4273   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274 printf "%s\n" "no" >&6; }
4275 fi
4276
4277   if test "x$ac_ct_CC" = x; then
4278     CC=""
4279   else
4280     case $cross_compiling:$ac_tool_warned in
4281 yes:)
4282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4283 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4284 ac_tool_warned=yes ;;
4285 esac
4286     CC=$ac_ct_CC
4287   fi
4288 else
4289   CC="$ac_cv_prog_CC"
4290 fi
4291
4292 if test -z "$CC"; then
4293           if test -n "$ac_tool_prefix"; then
4294     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}cc; ac_word=$2
4296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4297 printf %s "checking for $ac_word... " >&6; }
4298 if test ${ac_cv_prog_CC+y}
4299 then :
4300   printf %s "(cached) " >&6
4301 else
4302   if test -n "$CC"; then
4303   ac_cv_prog_CC="$CC" # Let the user override the test.
4304 else
4305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4306 for as_dir in $PATH
4307 do
4308   IFS=$as_save_IFS
4309   case $as_dir in #(((
4310     '') as_dir=./ ;;
4311     */) ;;
4312     *) as_dir=$as_dir/ ;;
4313   esac
4314     for ac_exec_ext in '' $ac_executable_extensions; do
4315   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4316     ac_cv_prog_CC="${ac_tool_prefix}cc"
4317     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4318     break 2
4319   fi
4320 done
4321   done
4322 IFS=$as_save_IFS
4323
4324 fi
4325 fi
4326 CC=$ac_cv_prog_CC
4327 if test -n "$CC"; then
4328   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4329 printf "%s\n" "$CC" >&6; }
4330 else
4331   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4332 printf "%s\n" "no" >&6; }
4333 fi
4334
4335
4336   fi
4337 fi
4338 if test -z "$CC"; then
4339   # Extract the first word of "cc", so it can be a program name with args.
4340 set dummy cc; ac_word=$2
4341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4342 printf %s "checking for $ac_word... " >&6; }
4343 if test ${ac_cv_prog_CC+y}
4344 then :
4345   printf %s "(cached) " >&6
4346 else
4347   if test -n "$CC"; then
4348   ac_cv_prog_CC="$CC" # Let the user override the test.
4349 else
4350   ac_prog_rejected=no
4351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4352 for as_dir in $PATH
4353 do
4354   IFS=$as_save_IFS
4355   case $as_dir in #(((
4356     '') as_dir=./ ;;
4357     */) ;;
4358     *) as_dir=$as_dir/ ;;
4359   esac
4360     for ac_exec_ext in '' $ac_executable_extensions; do
4361   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4362     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4363        ac_prog_rejected=yes
4364        continue
4365      fi
4366     ac_cv_prog_CC="cc"
4367     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4368     break 2
4369   fi
4370 done
4371   done
4372 IFS=$as_save_IFS
4373
4374 if test $ac_prog_rejected = yes; then
4375   # We found a bogon in the path, so make sure we never use it.
4376   set dummy $ac_cv_prog_CC
4377   shift
4378   if test $# != 0; then
4379     # We chose a different compiler from the bogus one.
4380     # However, it has the same basename, so the bogon will be chosen
4381     # first if we set CC to just the basename; use the full file name.
4382     shift
4383     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4384   fi
4385 fi
4386 fi
4387 fi
4388 CC=$ac_cv_prog_CC
4389 if test -n "$CC"; then
4390   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4391 printf "%s\n" "$CC" >&6; }
4392 else
4393   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394 printf "%s\n" "no" >&6; }
4395 fi
4396
4397
4398 fi
4399 if test -z "$CC"; then
4400   if test -n "$ac_tool_prefix"; then
4401   for ac_prog in cl.exe
4402   do
4403     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4404 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4406 printf %s "checking for $ac_word... " >&6; }
4407 if test ${ac_cv_prog_CC+y}
4408 then :
4409   printf %s "(cached) " >&6
4410 else
4411   if test -n "$CC"; then
4412   ac_cv_prog_CC="$CC" # Let the user override the test.
4413 else
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415 for as_dir in $PATH
4416 do
4417   IFS=$as_save_IFS
4418   case $as_dir in #(((
4419     '') as_dir=./ ;;
4420     */) ;;
4421     *) as_dir=$as_dir/ ;;
4422   esac
4423     for ac_exec_ext in '' $ac_executable_extensions; do
4424   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4425     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4426     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4427     break 2
4428   fi
4429 done
4430   done
4431 IFS=$as_save_IFS
4432
4433 fi
4434 fi
4435 CC=$ac_cv_prog_CC
4436 if test -n "$CC"; then
4437   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4438 printf "%s\n" "$CC" >&6; }
4439 else
4440   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4441 printf "%s\n" "no" >&6; }
4442 fi
4443
4444
4445     test -n "$CC" && break
4446   done
4447 fi
4448 if test -z "$CC"; then
4449   ac_ct_CC=$CC
4450   for ac_prog in cl.exe
4451 do
4452   # Extract the first word of "$ac_prog", so it can be a program name with args.
4453 set dummy $ac_prog; ac_word=$2
4454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455 printf %s "checking for $ac_word... " >&6; }
4456 if test ${ac_cv_prog_ac_ct_CC+y}
4457 then :
4458   printf %s "(cached) " >&6
4459 else
4460   if test -n "$ac_ct_CC"; then
4461   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4462 else
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464 for as_dir in $PATH
4465 do
4466   IFS=$as_save_IFS
4467   case $as_dir in #(((
4468     '') as_dir=./ ;;
4469     */) ;;
4470     *) as_dir=$as_dir/ ;;
4471   esac
4472     for ac_exec_ext in '' $ac_executable_extensions; do
4473   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4474     ac_cv_prog_ac_ct_CC="$ac_prog"
4475     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4476     break 2
4477   fi
4478 done
4479   done
4480 IFS=$as_save_IFS
4481
4482 fi
4483 fi
4484 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4485 if test -n "$ac_ct_CC"; then
4486   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4487 printf "%s\n" "$ac_ct_CC" >&6; }
4488 else
4489   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4490 printf "%s\n" "no" >&6; }
4491 fi
4492
4493
4494   test -n "$ac_ct_CC" && break
4495 done
4496
4497   if test "x$ac_ct_CC" = x; then
4498     CC=""
4499   else
4500     case $cross_compiling:$ac_tool_warned in
4501 yes:)
4502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4503 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4504 ac_tool_warned=yes ;;
4505 esac
4506     CC=$ac_ct_CC
4507   fi
4508 fi
4509
4510 fi
4511
4512
4513 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4514 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4515 as_fn_error $? "no acceptable C compiler found in \$PATH
4516 See \`config.log' for more details" "$LINENO" 5; }
4517
4518 # Provide some information about the compiler.
4519 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4520 set X $ac_compile
4521 ac_compiler=$2
4522 for ac_option in --version -v -V -qversion -version; do
4523   { { ac_try="$ac_compiler $ac_option >&5"
4524 case "(($ac_try" in
4525   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4526   *) ac_try_echo=$ac_try;;
4527 esac
4528 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4529 printf "%s\n" "$ac_try_echo"; } >&5
4530   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4531   ac_status=$?
4532   if test -s conftest.err; then
4533     sed '10a\
4534 ... rest of stderr output deleted ...
4535          10q' conftest.err >conftest.er1
4536     cat conftest.er1 >&5
4537   fi
4538   rm -f conftest.er1 conftest.err
4539   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4540   test $ac_status = 0; }
4541 done
4542
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544 /* end confdefs.h.  */
4545
4546 int
4547 main (void)
4548 {
4549
4550   ;
4551   return 0;
4552 }
4553 _ACEOF
4554 ac_clean_files_save=$ac_clean_files
4555 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4556 # Try to create an executable without -o first, disregard a.out.
4557 # It will help us diagnose broken compilers, and finding out an intuition
4558 # of exeext.
4559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4560 printf %s "checking whether the C compiler works... " >&6; }
4561 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4562
4563 # The possible output files:
4564 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4565
4566 ac_rmfiles=
4567 for ac_file in $ac_files
4568 do
4569   case $ac_file in
4570     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4571     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4572   esac
4573 done
4574 rm -f $ac_rmfiles
4575
4576 if { { ac_try="$ac_link_default"
4577 case "(($ac_try" in
4578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4579   *) ac_try_echo=$ac_try;;
4580 esac
4581 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4582 printf "%s\n" "$ac_try_echo"; } >&5
4583   (eval "$ac_link_default") 2>&5
4584   ac_status=$?
4585   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4586   test $ac_status = 0; }
4587 then :
4588   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4589 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4590 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4591 # so that the user can short-circuit this test for compilers unknown to
4592 # Autoconf.
4593 for ac_file in $ac_files ''
4594 do
4595   test -f "$ac_file" || continue
4596   case $ac_file in
4597     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4598         ;;
4599     [ab].out )
4600         # We found the default executable, but exeext='' is most
4601         # certainly right.
4602         break;;
4603     *.* )
4604         if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4605         then :; else
4606            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4607         fi
4608         # We set ac_cv_exeext here because the later test for it is not
4609         # safe: cross compilers may not add the suffix if given an `-o'
4610         # argument, so we may need to know it at that point already.
4611         # Even if this section looks crufty: it has the advantage of
4612         # actually working.
4613         break;;
4614     * )
4615         break;;
4616   esac
4617 done
4618 test "$ac_cv_exeext" = no && ac_cv_exeext=
4619
4620 else
4621   ac_file=''
4622 fi
4623 if test -z "$ac_file"
4624 then :
4625   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4626 printf "%s\n" "no" >&6; }
4627 printf "%s\n" "$as_me: failed program was:" >&5
4628 sed 's/^/| /' conftest.$ac_ext >&5
4629
4630 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4631 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4632 as_fn_error 77 "C compiler cannot create executables
4633 See \`config.log' for more details" "$LINENO" 5; }
4634 else
4635   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4636 printf "%s\n" "yes" >&6; }
4637 fi
4638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4639 printf %s "checking for C compiler default output file name... " >&6; }
4640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4641 printf "%s\n" "$ac_file" >&6; }
4642 ac_exeext=$ac_cv_exeext
4643
4644 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4645 ac_clean_files=$ac_clean_files_save
4646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4647 printf %s "checking for suffix of executables... " >&6; }
4648 if { { ac_try="$ac_link"
4649 case "(($ac_try" in
4650   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4651   *) ac_try_echo=$ac_try;;
4652 esac
4653 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4654 printf "%s\n" "$ac_try_echo"; } >&5
4655   (eval "$ac_link") 2>&5
4656   ac_status=$?
4657   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4658   test $ac_status = 0; }
4659 then :
4660   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4661 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4662 # work properly (i.e., refer to `conftest.exe'), while it won't with
4663 # `rm'.
4664 for ac_file in conftest.exe conftest conftest.*; do
4665   test -f "$ac_file" || continue
4666   case $ac_file in
4667     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4668     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4669           break;;
4670     * ) break;;
4671   esac
4672 done
4673 else
4674   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4675 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4676 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4677 See \`config.log' for more details" "$LINENO" 5; }
4678 fi
4679 rm -f conftest conftest$ac_cv_exeext
4680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4681 printf "%s\n" "$ac_cv_exeext" >&6; }
4682
4683 rm -f conftest.$ac_ext
4684 EXEEXT=$ac_cv_exeext
4685 ac_exeext=$EXEEXT
4686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687 /* end confdefs.h.  */
4688 #include <stdio.h>
4689 int
4690 main (void)
4691 {
4692 FILE *f = fopen ("conftest.out", "w");
4693  return ferror (f) || fclose (f) != 0;
4694
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 ac_clean_files="$ac_clean_files conftest.out"
4700 # Check that the compiler produces executables we can run.  If not, either
4701 # the compiler is broken, or we cross compile.
4702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4703 printf %s "checking whether we are cross compiling... " >&6; }
4704 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4705   cross_compiling=yes
4706 elif test "$cross_compiling" != yes; then
4707   { { ac_try="$ac_link"
4708 case "(($ac_try" in
4709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4710   *) ac_try_echo=$ac_try;;
4711 esac
4712 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4713 printf "%s\n" "$ac_try_echo"; } >&5
4714   (eval "$ac_link") 2>&5
4715   ac_status=$?
4716   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4717   test $ac_status = 0; }
4718   if { ac_try='./conftest$ac_cv_exeext'
4719   { { case "(($ac_try" in
4720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4721   *) ac_try_echo=$ac_try;;
4722 esac
4723 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4724 printf "%s\n" "$ac_try_echo"; } >&5
4725   (eval "$ac_try") 2>&5
4726   ac_status=$?
4727   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4728   test $ac_status = 0; }; }; then
4729     cross_compiling=no
4730   else
4731     if test "$cross_compiling" = maybe; then
4732         cross_compiling=yes
4733     else
4734         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4735 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4736 as_fn_error $? "cannot run C compiled programs.
4737 If you meant to cross compile, use \`--host'.
4738 See \`config.log' for more details" "$LINENO" 5; }
4739     fi
4740   fi
4741 fi
4742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4743 printf "%s\n" "$cross_compiling" >&6; }
4744
4745 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4746 ac_clean_files=$ac_clean_files_save
4747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4748 printf %s "checking for suffix of object files... " >&6; }
4749 if test ${ac_cv_objext+y}
4750 then :
4751   printf %s "(cached) " >&6
4752 else
4753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h.  */
4755
4756 int
4757 main (void)
4758 {
4759
4760   ;
4761   return 0;
4762 }
4763 _ACEOF
4764 rm -f conftest.o conftest.obj
4765 if { { ac_try="$ac_compile"
4766 case "(($ac_try" in
4767   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4768   *) ac_try_echo=$ac_try;;
4769 esac
4770 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4771 printf "%s\n" "$ac_try_echo"; } >&5
4772   (eval "$ac_compile") 2>&5
4773   ac_status=$?
4774   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4775   test $ac_status = 0; }
4776 then :
4777   for ac_file in conftest.o conftest.obj conftest.*; do
4778   test -f "$ac_file" || continue;
4779   case $ac_file in
4780     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4781     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4782        break;;
4783   esac
4784 done
4785 else
4786   printf "%s\n" "$as_me: failed program was:" >&5
4787 sed 's/^/| /' conftest.$ac_ext >&5
4788
4789 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4790 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4791 as_fn_error $? "cannot compute suffix of object files: cannot compile
4792 See \`config.log' for more details" "$LINENO" 5; }
4793 fi
4794 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4795 fi
4796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4797 printf "%s\n" "$ac_cv_objext" >&6; }
4798 OBJEXT=$ac_cv_objext
4799 ac_objext=$OBJEXT
4800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4801 printf %s "checking whether the compiler supports GNU C... " >&6; }
4802 if test ${ac_cv_c_compiler_gnu+y}
4803 then :
4804   printf %s "(cached) " >&6
4805 else
4806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807 /* end confdefs.h.  */
4808
4809 int
4810 main (void)
4811 {
4812 #ifndef __GNUC__
4813        choke me
4814 #endif
4815
4816   ;
4817   return 0;
4818 }
4819 _ACEOF
4820 if ac_fn_c_try_compile "$LINENO"
4821 then :
4822   ac_compiler_gnu=yes
4823 else
4824   ac_compiler_gnu=no
4825 fi
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4828
4829 fi
4830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4831 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4832 if test $ac_compiler_gnu = yes; then
4833   GCC=yes
4834 else
4835   GCC=
4836 fi
4837 ac_test_CFLAGS=${CFLAGS+y}
4838 ac_save_CFLAGS=$CFLAGS
4839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4840 printf %s "checking whether $CC accepts -g... " >&6; }
4841 if test ${ac_cv_prog_cc_g+y}
4842 then :
4843   printf %s "(cached) " >&6
4844 else
4845   ac_save_c_werror_flag=$ac_c_werror_flag
4846    ac_c_werror_flag=yes
4847    ac_cv_prog_cc_g=no
4848    CFLAGS="-g"
4849    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4850 /* end confdefs.h.  */
4851
4852 int
4853 main (void)
4854 {
4855
4856   ;
4857   return 0;
4858 }
4859 _ACEOF
4860 if ac_fn_c_try_compile "$LINENO"
4861 then :
4862   ac_cv_prog_cc_g=yes
4863 else
4864   CFLAGS=""
4865       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866 /* end confdefs.h.  */
4867
4868 int
4869 main (void)
4870 {
4871
4872   ;
4873   return 0;
4874 }
4875 _ACEOF
4876 if ac_fn_c_try_compile "$LINENO"
4877 then :
4878
4879 else
4880   ac_c_werror_flag=$ac_save_c_werror_flag
4881          CFLAGS="-g"
4882          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883 /* end confdefs.h.  */
4884
4885 int
4886 main (void)
4887 {
4888
4889   ;
4890   return 0;
4891 }
4892 _ACEOF
4893 if ac_fn_c_try_compile "$LINENO"
4894 then :
4895   ac_cv_prog_cc_g=yes
4896 fi
4897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4898 fi
4899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4900 fi
4901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4902    ac_c_werror_flag=$ac_save_c_werror_flag
4903 fi
4904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4905 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4906 if test $ac_test_CFLAGS; then
4907   CFLAGS=$ac_save_CFLAGS
4908 elif test $ac_cv_prog_cc_g = yes; then
4909   if test "$GCC" = yes; then
4910     CFLAGS="-g -O2"
4911   else
4912     CFLAGS="-g"
4913   fi
4914 else
4915   if test "$GCC" = yes; then
4916     CFLAGS="-O2"
4917   else
4918     CFLAGS=
4919   fi
4920 fi
4921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4922 printf %s "checking for $CC option to enable C11 features... " >&6; }
4923 if test ${ac_cv_prog_cc_c11+y}
4924 then :
4925   printf %s "(cached) " >&6
4926 else
4927   ac_cv_prog_cc_c11=no
4928 ac_save_CC=$CC
4929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4930 /* end confdefs.h.  */
4931 #include <stdarg.h>
4932 #include <stdbool.h>
4933 #include <stdlib.h>
4934 #include <wchar.h>
4935 #include <stdio.h>
4936
4937 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
4938 #define debug(...) fprintf (stderr, __VA_ARGS__)
4939 #define showlist(...) puts (#__VA_ARGS__)
4940 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4941 static void
4942 test_varargs_macros (void)
4943 {
4944   int x = 1234;
4945   int y = 5678;
4946   debug ("Flag");
4947   debug ("X = %d\n", x);
4948   showlist (The first, second, and third items.);
4949   report (x>y, "x is %d but y is %d", x, y);
4950 }
4951
4952 // Check long long types.
4953 #define BIG64 18446744073709551615ull
4954 #define BIG32 4294967295ul
4955 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4956 #if !BIG_OK
4957   your preprocessor is broken;
4958 #endif
4959 #if BIG_OK
4960 #else
4961   your preprocessor is broken;
4962 #endif
4963 static long long int bignum = -9223372036854775807LL;
4964 static unsigned long long int ubignum = BIG64;
4965
4966 struct incomplete_array
4967 {
4968   int datasize;
4969   double data[];
4970 };
4971
4972 struct named_init {
4973   int number;
4974   const wchar_t *name;
4975   double average;
4976 };
4977
4978 typedef const char *ccp;
4979
4980 static inline int
4981 test_restrict (ccp restrict text)
4982 {
4983   // See if C++-style comments work.
4984   // Iterate through items via the restricted pointer.
4985   // Also check for declarations in for loops.
4986   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4987     continue;
4988   return 0;
4989 }
4990
4991 // Check varargs and va_copy.
4992 static bool
4993 test_varargs (const char *format, ...)
4994 {
4995   va_list args;
4996   va_start (args, format);
4997   va_list args_copy;
4998   va_copy (args_copy, args);
4999
5000   const char *str = "";
5001   int number = 0;
5002   float fnumber = 0;
5003
5004   while (*format)
5005     {
5006       switch (*format++)
5007         {
5008         case 's': // string
5009           str = va_arg (args_copy, const char *);
5010           break;
5011         case 'd': // int
5012           number = va_arg (args_copy, int);
5013           break;
5014         case 'f': // float
5015           fnumber = va_arg (args_copy, double);
5016           break;
5017         default:
5018           break;
5019         }
5020     }
5021   va_end (args_copy);
5022   va_end (args);
5023
5024   return *str && number && fnumber;
5025 }
5026 // Check _Alignas.
5027 char _Alignas (double) aligned_as_double;
5028 char _Alignas (0) no_special_alignment;
5029 extern char aligned_as_int;
5030 char _Alignas (0) _Alignas (int) aligned_as_int;
5031
5032 // Check _Alignof.
5033 enum
5034 {
5035   int_alignment = _Alignof (int),
5036   int_array_alignment = _Alignof (int[100]),
5037   char_alignment = _Alignof (char)
5038 };
5039 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5040
5041 // Check _Noreturn.
5042 int _Noreturn does_not_return (void) { for (;;) continue; }
5043
5044 // Check _Static_assert.
5045 struct test_static_assert
5046 {
5047   int x;
5048   _Static_assert (sizeof (int) <= sizeof (long int),
5049                   "_Static_assert does not work in struct");
5050   long int y;
5051 };
5052
5053 // Check UTF-8 literals.
5054 #define u8 syntax error!
5055 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5056
5057 // Check duplicate typedefs.
5058 typedef long *long_ptr;
5059 typedef long int *long_ptr;
5060 typedef long_ptr long_ptr;
5061
5062 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5063 struct anonymous
5064 {
5065   union {
5066     struct { int i; int j; };
5067     struct { int k; long int l; } w;
5068   };
5069   int m;
5070 } v1;
5071
5072 int
5073 main (void)
5074 {
5075
5076   // Check bool.
5077   _Bool success = false;
5078
5079   // Check restrict.
5080   if (test_restrict ("String literal") == 0)
5081     success = true;
5082   char *restrict newvar = "Another string";
5083
5084   // Check varargs.
5085   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5086   test_varargs_macros ();
5087
5088   // Check flexible array members.
5089   struct incomplete_array *ia =
5090     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5091   ia->datasize = 10;
5092   for (int i = 0; i < ia->datasize; ++i)
5093     ia->data[i] = i * 1.234;
5094
5095   // Check named initializers.
5096   struct named_init ni = {
5097     .number = 34,
5098     .name = L"Test wide string",
5099     .average = 543.34343,
5100   };
5101
5102   ni.number = 58;
5103
5104   int dynamic_array[ni.number];
5105   dynamic_array[ni.number - 1] = 543;
5106
5107   // work around unused variable warnings
5108   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5109           || dynamic_array[ni.number - 1] != 543);
5110
5111   v1.i = 2;
5112   v1.w.k = 5;
5113   _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch");
5114
5115   ;
5116   return 0;
5117 }
5118 _ACEOF
5119 for ac_arg in '' -std=gnu11
5120 do
5121   CC="$ac_save_CC $ac_arg"
5122   if ac_fn_c_try_compile "$LINENO"
5123 then :
5124   ac_cv_prog_cc_c11=$ac_arg
5125 fi
5126 rm -f core conftest.err conftest.$ac_objext
5127   test "x$ac_cv_prog_cc_c11" != "xno" && break
5128 done
5129 rm -f conftest.$ac_ext
5130 CC=$ac_save_CC
5131
5132 fi
5133 # AC_CACHE_VAL
5134 ac_prog_cc_stdc_options=
5135 case "x$ac_cv_prog_cc_c11" in
5136   x)
5137     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5138 printf "%s\n" "none needed" >&6; } ;;
5139   xno)
5140     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5141 printf "%s\n" "unsupported" >&6; } ;;
5142   *)
5143     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5144     CC=$CC$ac_prog_cc_stdc_options
5145     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5146 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5147 esac
5148 if test "x$ac_cv_prog_cc_c11" != xno
5149 then :
5150   ac_prog_cc_stdc=c11
5151                  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5152 else
5153   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5154 printf %s "checking for $CC option to enable C99 features... " >&6; }
5155 if test ${ac_cv_prog_cc_c99+y}
5156 then :
5157   printf %s "(cached) " >&6
5158 else
5159   ac_cv_prog_cc_c99=no
5160 ac_save_CC=$CC
5161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5162 /* end confdefs.h.  */
5163 #include <stdarg.h>
5164 #include <stdbool.h>
5165 #include <stdlib.h>
5166 #include <wchar.h>
5167 #include <stdio.h>
5168
5169 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5170 #define debug(...) fprintf (stderr, __VA_ARGS__)
5171 #define showlist(...) puts (#__VA_ARGS__)
5172 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5173 static void
5174 test_varargs_macros (void)
5175 {
5176   int x = 1234;
5177   int y = 5678;
5178   debug ("Flag");
5179   debug ("X = %d\n", x);
5180   showlist (The first, second, and third items.);
5181   report (x>y, "x is %d but y is %d", x, y);
5182 }
5183
5184 // Check long long types.
5185 #define BIG64 18446744073709551615ull
5186 #define BIG32 4294967295ul
5187 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5188 #if !BIG_OK
5189   your preprocessor is broken;
5190 #endif
5191 #if BIG_OK
5192 #else
5193   your preprocessor is broken;
5194 #endif
5195 static long long int bignum = -9223372036854775807LL;
5196 static unsigned long long int ubignum = BIG64;
5197
5198 struct incomplete_array
5199 {
5200   int datasize;
5201   double data[];
5202 };
5203
5204 struct named_init {
5205   int number;
5206   const wchar_t *name;
5207   double average;
5208 };
5209
5210 typedef const char *ccp;
5211
5212 static inline int
5213 test_restrict (ccp restrict text)
5214 {
5215   // See if C++-style comments work.
5216   // Iterate through items via the restricted pointer.
5217   // Also check for declarations in for loops.
5218   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5219     continue;
5220   return 0;
5221 }
5222
5223 // Check varargs and va_copy.
5224 static bool
5225 test_varargs (const char *format, ...)
5226 {
5227   va_list args;
5228   va_start (args, format);
5229   va_list args_copy;
5230   va_copy (args_copy, args);
5231
5232   const char *str = "";
5233   int number = 0;
5234   float fnumber = 0;
5235
5236   while (*format)
5237     {
5238       switch (*format++)
5239         {
5240         case 's': // string
5241           str = va_arg (args_copy, const char *);
5242           break;
5243         case 'd': // int
5244           number = va_arg (args_copy, int);
5245           break;
5246         case 'f': // float
5247           fnumber = va_arg (args_copy, double);
5248           break;
5249         default:
5250           break;
5251         }
5252     }
5253   va_end (args_copy);
5254   va_end (args);
5255
5256   return *str && number && fnumber;
5257 }
5258 int
5259 main (void)
5260 {
5261
5262   // Check bool.
5263   _Bool success = false;
5264
5265   // Check restrict.
5266   if (test_restrict ("String literal") == 0)
5267     success = true;
5268   char *restrict newvar = "Another string";
5269
5270   // Check varargs.
5271   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5272   test_varargs_macros ();
5273
5274   // Check flexible array members.
5275   struct incomplete_array *ia =
5276     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5277   ia->datasize = 10;
5278   for (int i = 0; i < ia->datasize; ++i)
5279     ia->data[i] = i * 1.234;
5280
5281   // Check named initializers.
5282   struct named_init ni = {
5283     .number = 34,
5284     .name = L"Test wide string",
5285     .average = 543.34343,
5286   };
5287
5288   ni.number = 58;
5289
5290   int dynamic_array[ni.number];
5291   dynamic_array[ni.number - 1] = 543;
5292
5293   // work around unused variable warnings
5294   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5295           || dynamic_array[ni.number - 1] != 543);
5296
5297   ;
5298   return 0;
5299 }
5300 _ACEOF
5301 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5302 do
5303   CC="$ac_save_CC $ac_arg"
5304   if ac_fn_c_try_compile "$LINENO"
5305 then :
5306   ac_cv_prog_cc_c99=$ac_arg
5307 fi
5308 rm -f core conftest.err conftest.$ac_objext
5309   test "x$ac_cv_prog_cc_c99" != "xno" && break
5310 done
5311 rm -f conftest.$ac_ext
5312 CC=$ac_save_CC
5313
5314 fi
5315 # AC_CACHE_VAL
5316 ac_prog_cc_stdc_options=
5317 case "x$ac_cv_prog_cc_c99" in
5318   x)
5319     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5320 printf "%s\n" "none needed" >&6; } ;;
5321   xno)
5322     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5323 printf "%s\n" "unsupported" >&6; } ;;
5324   *)
5325     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5326     CC=$CC$ac_prog_cc_stdc_options
5327     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5328 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5329 esac
5330 if test "x$ac_cv_prog_cc_c99" != xno
5331 then :
5332   ac_prog_cc_stdc=c99
5333                     ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5334 else
5335   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5336 printf %s "checking for $CC option to enable C89 features... " >&6; }
5337 if test ${ac_cv_prog_cc_c89+y}
5338 then :
5339   printf %s "(cached) " >&6
5340 else
5341   ac_cv_prog_cc_c89=no
5342 ac_save_CC=$CC
5343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5344 /* end confdefs.h.  */
5345 #include <stdarg.h>
5346 #include <stdio.h>
5347 struct stat;
5348 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5349 struct buf { int x; };
5350 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5351 static char *e (p, i)
5352      char **p;
5353      int i;
5354 {
5355   return p[i];
5356 }
5357 static char *f (char * (*g) (char **, int), char **p, ...)
5358 {
5359   char *s;
5360   va_list v;
5361   va_start (v,p);
5362   s = g (p, va_arg (v,int));
5363   va_end (v);
5364   return s;
5365 }
5366
5367 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5368    function prototypes and stuff, but not '\xHH' hex character constants.
5369    These don't provoke an error unfortunately, instead are silently treated
5370    as 'x'.  The following induces an error, until -std is added to get
5371    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5372    array size at least.  It's necessary to write '\x00'==0 to get something
5373    that's true only with -std.  */
5374 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5375
5376 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5377    inside strings and character constants.  */
5378 #define FOO(x) 'x'
5379 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5380
5381 int test (int i, double x);
5382 struct s1 {int (*f) (int a);};
5383 struct s2 {int (*f) (double a);};
5384 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5385 int argc;
5386 char **argv;
5387 int
5388 main (void)
5389 {
5390 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5391   ;
5392   return 0;
5393 }
5394 _ACEOF
5395 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5396         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5397 do
5398   CC="$ac_save_CC $ac_arg"
5399   if ac_fn_c_try_compile "$LINENO"
5400 then :
5401   ac_cv_prog_cc_c89=$ac_arg
5402 fi
5403 rm -f core conftest.err conftest.$ac_objext
5404   test "x$ac_cv_prog_cc_c89" != "xno" && break
5405 done
5406 rm -f conftest.$ac_ext
5407 CC=$ac_save_CC
5408
5409 fi
5410 # AC_CACHE_VAL
5411 ac_prog_cc_stdc_options=
5412 case "x$ac_cv_prog_cc_c89" in
5413   x)
5414     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5415 printf "%s\n" "none needed" >&6; } ;;
5416   xno)
5417     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5418 printf "%s\n" "unsupported" >&6; } ;;
5419   *)
5420     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5421     CC=$CC$ac_prog_cc_stdc_options
5422     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5423 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5424 esac
5425 if test "x$ac_cv_prog_cc_c89" != xno
5426 then :
5427   ac_prog_cc_stdc=c89
5428                        ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5429 else
5430   ac_prog_cc_stdc=no
5431                        ac_cv_prog_cc_stdc=no
5432 fi
5433
5434 fi
5435
5436 fi
5437
5438 ac_ext=c
5439 ac_cpp='$CPP $CPPFLAGS'
5440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5443
5444 ac_ext=c
5445 ac_cpp='$CPP $CPPFLAGS'
5446 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5447 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5448 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5450 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5451 if test ${am_cv_prog_cc_c_o+y}
5452 then :
5453   printf %s "(cached) " >&6
5454 else
5455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456 /* end confdefs.h.  */
5457
5458 int
5459 main (void)
5460 {
5461
5462   ;
5463   return 0;
5464 }
5465 _ACEOF
5466   # Make sure it works both with $CC and with simple cc.
5467   # Following AC_PROG_CC_C_O, we do the test twice because some
5468   # compilers refuse to overwrite an existing .o file with -o,
5469   # though they will create one.
5470   am_cv_prog_cc_c_o=yes
5471   for am_i in 1 2; do
5472     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5473    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5474    ac_status=$?
5475    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5476    (exit $ac_status); } \
5477          && test -f conftest2.$ac_objext; then
5478       : OK
5479     else
5480       am_cv_prog_cc_c_o=no
5481       break
5482     fi
5483   done
5484   rm -f core conftest*
5485   unset am_i
5486 fi
5487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5488 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5489 if test "$am_cv_prog_cc_c_o" != yes; then
5490    # Losing compiler, so override with the script.
5491    # FIXME: It is wrong to rewrite CC.
5492    # But if we don't then we get into trouble of one sort or another.
5493    # A longer-term fix would be to have automake use am__CC in this case,
5494    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5495    CC="$am_aux_dir/compile $CC"
5496 fi
5497 ac_ext=c
5498 ac_cpp='$CPP $CPPFLAGS'
5499 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5500 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5502
5503
5504 depcc="$CC"   am_compiler_list=
5505
5506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5507 printf %s "checking dependency style of $depcc... " >&6; }
5508 if test ${am_cv_CC_dependencies_compiler_type+y}
5509 then :
5510   printf %s "(cached) " >&6
5511 else
5512   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5513   # We make a subdir and do the tests there.  Otherwise we can end up
5514   # making bogus files that we don't know about and never remove.  For
5515   # instance it was reported that on HP-UX the gcc test will end up
5516   # making a dummy file named 'D' -- because '-MD' means "put the output
5517   # in D".
5518   rm -rf conftest.dir
5519   mkdir conftest.dir
5520   # Copy depcomp to subdir because otherwise we won't find it if we're
5521   # using a relative directory.
5522   cp "$am_depcomp" conftest.dir
5523   cd conftest.dir
5524   # We will build objects and dependencies in a subdirectory because
5525   # it helps to detect inapplicable dependency modes.  For instance
5526   # both Tru64's cc and ICC support -MD to output dependencies as a
5527   # side effect of compilation, but ICC will put the dependencies in
5528   # the current directory while Tru64 will put them in the object
5529   # directory.
5530   mkdir sub
5531
5532   am_cv_CC_dependencies_compiler_type=none
5533   if test "$am_compiler_list" = ""; then
5534      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5535   fi
5536   am__universal=false
5537   case " $depcc " in #(
5538      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5539      esac
5540
5541   for depmode in $am_compiler_list; do
5542     # Setup a source with many dependencies, because some compilers
5543     # like to wrap large dependency lists on column 80 (with \), and
5544     # we should not choose a depcomp mode which is confused by this.
5545     #
5546     # We need to recreate these files for each test, as the compiler may
5547     # overwrite some of them when testing with obscure command lines.
5548     # This happens at least with the AIX C compiler.
5549     : > sub/conftest.c
5550     for i in 1 2 3 4 5 6; do
5551       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5552       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5553       # Solaris 10 /bin/sh.
5554       echo '/* dummy */' > sub/conftst$i.h
5555     done
5556     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5557
5558     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5559     # mode.  It turns out that the SunPro C++ compiler does not properly
5560     # handle '-M -o', and we need to detect this.  Also, some Intel
5561     # versions had trouble with output in subdirs.
5562     am__obj=sub/conftest.${OBJEXT-o}
5563     am__minus_obj="-o $am__obj"
5564     case $depmode in
5565     gcc)
5566       # This depmode causes a compiler race in universal mode.
5567       test "$am__universal" = false || continue
5568       ;;
5569     nosideeffect)
5570       # After this tag, mechanisms are not by side-effect, so they'll
5571       # only be used when explicitly requested.
5572       if test "x$enable_dependency_tracking" = xyes; then
5573         continue
5574       else
5575         break
5576       fi
5577       ;;
5578     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5579       # This compiler won't grok '-c -o', but also, the minuso test has
5580       # not run yet.  These depmodes are late enough in the game, and
5581       # so weak that their functioning should not be impacted.
5582       am__obj=conftest.${OBJEXT-o}
5583       am__minus_obj=
5584       ;;
5585     none) break ;;
5586     esac
5587     if depmode=$depmode \
5588        source=sub/conftest.c object=$am__obj \
5589        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5590        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5591          >/dev/null 2>conftest.err &&
5592        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5593        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5594        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5595        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5596       # icc doesn't choke on unknown options, it will just issue warnings
5597       # or remarks (even with -Werror).  So we grep stderr for any message
5598       # that says an option was ignored or not supported.
5599       # When given -MP, icc 7.0 and 7.1 complain thusly:
5600       #   icc: Command line warning: ignoring option '-M'; no argument required
5601       # The diagnosis changed in icc 8.0:
5602       #   icc: Command line remark: option '-MP' not supported
5603       if (grep 'ignoring option' conftest.err ||
5604           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5605         am_cv_CC_dependencies_compiler_type=$depmode
5606         break
5607       fi
5608     fi
5609   done
5610
5611   cd ..
5612   rm -rf conftest.dir
5613 else
5614   am_cv_CC_dependencies_compiler_type=none
5615 fi
5616
5617 fi
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5619 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5620 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5621
5622  if
5623   test "x$enable_dependency_tracking" != xno \
5624   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5625   am__fastdepCC_TRUE=
5626   am__fastdepCC_FALSE='#'
5627 else
5628   am__fastdepCC_TRUE='#'
5629   am__fastdepCC_FALSE=
5630 fi
5631
5632
5633
5634
5635 ac_ext=c
5636 ac_cpp='$CPP $CPPFLAGS'
5637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5641 printf %s "checking how to run the C preprocessor... " >&6; }
5642 # On Suns, sometimes $CPP names a directory.
5643 if test -n "$CPP" && test -d "$CPP"; then
5644   CPP=
5645 fi
5646 if test -z "$CPP"; then
5647   if test ${ac_cv_prog_CPP+y}
5648 then :
5649   printf %s "(cached) " >&6
5650 else
5651       # Double quotes because CPP needs to be expanded
5652     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5653     do
5654       ac_preproc_ok=false
5655 for ac_c_preproc_warn_flag in '' yes
5656 do
5657   # Use a header file that comes with gcc, so configuring glibc
5658   # with a fresh cross-compiler works.
5659   # On the NeXT, cc -E runs the code through the compiler's parser,
5660   # not just through cpp. "Syntax error" is here to catch this case.
5661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5662 /* end confdefs.h.  */
5663 #include <limits.h>
5664                      Syntax error
5665 _ACEOF
5666 if ac_fn_c_try_cpp "$LINENO"
5667 then :
5668
5669 else
5670   # Broken: fails on valid input.
5671 continue
5672 fi
5673 rm -f conftest.err conftest.i conftest.$ac_ext
5674
5675   # OK, works on sane cases.  Now check whether nonexistent headers
5676   # can be detected and how.
5677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5678 /* end confdefs.h.  */
5679 #include <ac_nonexistent.h>
5680 _ACEOF
5681 if ac_fn_c_try_cpp "$LINENO"
5682 then :
5683   # Broken: success on invalid input.
5684 continue
5685 else
5686   # Passes both tests.
5687 ac_preproc_ok=:
5688 break
5689 fi
5690 rm -f conftest.err conftest.i conftest.$ac_ext
5691
5692 done
5693 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5694 rm -f conftest.i conftest.err conftest.$ac_ext
5695 if $ac_preproc_ok
5696 then :
5697   break
5698 fi
5699
5700     done
5701     ac_cv_prog_CPP=$CPP
5702
5703 fi
5704   CPP=$ac_cv_prog_CPP
5705 else
5706   ac_cv_prog_CPP=$CPP
5707 fi
5708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5709 printf "%s\n" "$CPP" >&6; }
5710 ac_preproc_ok=false
5711 for ac_c_preproc_warn_flag in '' yes
5712 do
5713   # Use a header file that comes with gcc, so configuring glibc
5714   # with a fresh cross-compiler works.
5715   # On the NeXT, cc -E runs the code through the compiler's parser,
5716   # not just through cpp. "Syntax error" is here to catch this case.
5717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5718 /* end confdefs.h.  */
5719 #include <limits.h>
5720                      Syntax error
5721 _ACEOF
5722 if ac_fn_c_try_cpp "$LINENO"
5723 then :
5724
5725 else
5726   # Broken: fails on valid input.
5727 continue
5728 fi
5729 rm -f conftest.err conftest.i conftest.$ac_ext
5730
5731   # OK, works on sane cases.  Now check whether nonexistent headers
5732   # can be detected and how.
5733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5734 /* end confdefs.h.  */
5735 #include <ac_nonexistent.h>
5736 _ACEOF
5737 if ac_fn_c_try_cpp "$LINENO"
5738 then :
5739   # Broken: success on invalid input.
5740 continue
5741 else
5742   # Passes both tests.
5743 ac_preproc_ok=:
5744 break
5745 fi
5746 rm -f conftest.err conftest.i conftest.$ac_ext
5747
5748 done
5749 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5750 rm -f conftest.i conftest.err conftest.$ac_ext
5751 if $ac_preproc_ok
5752 then :
5753
5754 else
5755   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5756 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5757 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5758 See \`config.log' for more details" "$LINENO" 5; }
5759 fi
5760
5761 ac_ext=c
5762 ac_cpp='$CPP $CPPFLAGS'
5763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5766
5767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5768 printf %s "checking for grep that handles long lines and -e... " >&6; }
5769 if test ${ac_cv_path_GREP+y}
5770 then :
5771   printf %s "(cached) " >&6
5772 else
5773   if test -z "$GREP"; then
5774   ac_path_GREP_found=false
5775   # Loop through the user's path and test for each of PROGNAME-LIST
5776   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5777 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5778 do
5779   IFS=$as_save_IFS
5780   case $as_dir in #(((
5781     '') as_dir=./ ;;
5782     */) ;;
5783     *) as_dir=$as_dir/ ;;
5784   esac
5785     for ac_prog in grep ggrep
5786    do
5787     for ac_exec_ext in '' $ac_executable_extensions; do
5788       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5789       as_fn_executable_p "$ac_path_GREP" || continue
5790 # Check for GNU ac_path_GREP and select it if it is found.
5791   # Check for GNU $ac_path_GREP
5792 case `"$ac_path_GREP" --version 2>&1` in
5793 *GNU*)
5794   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5795 *)
5796   ac_count=0
5797   printf %s 0123456789 >"conftest.in"
5798   while :
5799   do
5800     cat "conftest.in" "conftest.in" >"conftest.tmp"
5801     mv "conftest.tmp" "conftest.in"
5802     cp "conftest.in" "conftest.nl"
5803     printf "%s\n" 'GREP' >> "conftest.nl"
5804     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5805     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5806     as_fn_arith $ac_count + 1 && ac_count=$as_val
5807     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5808       # Best one so far, save it but keep looking for a better one
5809       ac_cv_path_GREP="$ac_path_GREP"
5810       ac_path_GREP_max=$ac_count
5811     fi
5812     # 10*(2^10) chars as input seems more than enough
5813     test $ac_count -gt 10 && break
5814   done
5815   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5816 esac
5817
5818       $ac_path_GREP_found && break 3
5819     done
5820   done
5821   done
5822 IFS=$as_save_IFS
5823   if test -z "$ac_cv_path_GREP"; then
5824     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5825   fi
5826 else
5827   ac_cv_path_GREP=$GREP
5828 fi
5829
5830 fi
5831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5832 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5833  GREP="$ac_cv_path_GREP"
5834
5835
5836 if test -n "$ac_tool_prefix"; then
5837   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5838 set dummy ${ac_tool_prefix}nm; ac_word=$2
5839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840 printf %s "checking for $ac_word... " >&6; }
5841 if test ${ac_cv_prog_NM+y}
5842 then :
5843   printf %s "(cached) " >&6
5844 else
5845   if test -n "$NM"; then
5846   ac_cv_prog_NM="$NM" # Let the user override the test.
5847 else
5848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849 for as_dir in $PATH
5850 do
5851   IFS=$as_save_IFS
5852   case $as_dir in #(((
5853     '') as_dir=./ ;;
5854     */) ;;
5855     *) as_dir=$as_dir/ ;;
5856   esac
5857     for ac_exec_ext in '' $ac_executable_extensions; do
5858   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5859     ac_cv_prog_NM="${ac_tool_prefix}nm"
5860     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5861     break 2
5862   fi
5863 done
5864   done
5865 IFS=$as_save_IFS
5866
5867 fi
5868 fi
5869 NM=$ac_cv_prog_NM
5870 if test -n "$NM"; then
5871   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
5872 printf "%s\n" "$NM" >&6; }
5873 else
5874   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875 printf "%s\n" "no" >&6; }
5876 fi
5877
5878
5879 fi
5880 if test -z "$ac_cv_prog_NM"; then
5881   ac_ct_NM=$NM
5882   # Extract the first word of "nm", so it can be a program name with args.
5883 set dummy nm; ac_word=$2
5884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5885 printf %s "checking for $ac_word... " >&6; }
5886 if test ${ac_cv_prog_ac_ct_NM+y}
5887 then :
5888   printf %s "(cached) " >&6
5889 else
5890   if test -n "$ac_ct_NM"; then
5891   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5892 else
5893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5894 for as_dir in $PATH
5895 do
5896   IFS=$as_save_IFS
5897   case $as_dir in #(((
5898     '') as_dir=./ ;;
5899     */) ;;
5900     *) as_dir=$as_dir/ ;;
5901   esac
5902     for ac_exec_ext in '' $ac_executable_extensions; do
5903   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5904     ac_cv_prog_ac_ct_NM="nm"
5905     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5906     break 2
5907   fi
5908 done
5909   done
5910 IFS=$as_save_IFS
5911
5912 fi
5913 fi
5914 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5915 if test -n "$ac_ct_NM"; then
5916   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
5917 printf "%s\n" "$ac_ct_NM" >&6; }
5918 else
5919   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920 printf "%s\n" "no" >&6; }
5921 fi
5922
5923   if test "x$ac_ct_NM" = x; then
5924     NM="nm"
5925   else
5926     case $cross_compiling:$ac_tool_warned in
5927 yes:)
5928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5929 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5930 ac_tool_warned=yes ;;
5931 esac
5932     NM=$ac_ct_NM
5933   fi
5934 else
5935   NM="$ac_cv_prog_NM"
5936 fi
5937
5938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5939 printf %s "checking whether ln -s works... " >&6; }
5940 LN_S=$as_ln_s
5941 if test "$LN_S" = "ln -s"; then
5942   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943 printf "%s\n" "yes" >&6; }
5944 else
5945   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5946 printf "%s\n" "no, using $LN_S" >&6; }
5947 fi
5948
5949 if test -n "$ac_tool_prefix"; then
5950   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5951 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953 printf %s "checking for $ac_word... " >&6; }
5954 if test ${ac_cv_prog_RANLIB+y}
5955 then :
5956   printf %s "(cached) " >&6
5957 else
5958   if test -n "$RANLIB"; then
5959   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5960 else
5961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5962 for as_dir in $PATH
5963 do
5964   IFS=$as_save_IFS
5965   case $as_dir in #(((
5966     '') as_dir=./ ;;
5967     */) ;;
5968     *) as_dir=$as_dir/ ;;
5969   esac
5970     for ac_exec_ext in '' $ac_executable_extensions; do
5971   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5972     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5973     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5974     break 2
5975   fi
5976 done
5977   done
5978 IFS=$as_save_IFS
5979
5980 fi
5981 fi
5982 RANLIB=$ac_cv_prog_RANLIB
5983 if test -n "$RANLIB"; then
5984   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5985 printf "%s\n" "$RANLIB" >&6; }
5986 else
5987   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988 printf "%s\n" "no" >&6; }
5989 fi
5990
5991
5992 fi
5993 if test -z "$ac_cv_prog_RANLIB"; then
5994   ac_ct_RANLIB=$RANLIB
5995   # Extract the first word of "ranlib", so it can be a program name with args.
5996 set dummy ranlib; ac_word=$2
5997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998 printf %s "checking for $ac_word... " >&6; }
5999 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6000 then :
6001   printf %s "(cached) " >&6
6002 else
6003   if test -n "$ac_ct_RANLIB"; then
6004   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6005 else
6006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007 for as_dir in $PATH
6008 do
6009   IFS=$as_save_IFS
6010   case $as_dir in #(((
6011     '') as_dir=./ ;;
6012     */) ;;
6013     *) as_dir=$as_dir/ ;;
6014   esac
6015     for ac_exec_ext in '' $ac_executable_extensions; do
6016   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6017     ac_cv_prog_ac_ct_RANLIB="ranlib"
6018     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6019     break 2
6020   fi
6021 done
6022   done
6023 IFS=$as_save_IFS
6024
6025 fi
6026 fi
6027 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6028 if test -n "$ac_ct_RANLIB"; then
6029   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6030 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6031 else
6032   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033 printf "%s\n" "no" >&6; }
6034 fi
6035
6036   if test "x$ac_ct_RANLIB" = x; then
6037     RANLIB=":"
6038   else
6039     case $cross_compiling:$ac_tool_warned in
6040 yes:)
6041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6042 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6043 ac_tool_warned=yes ;;
6044 esac
6045     RANLIB=$ac_ct_RANLIB
6046   fi
6047 else
6048   RANLIB="$ac_cv_prog_RANLIB"
6049 fi
6050
6051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6052 printf %s "checking for a POSIX-compliant shell... " >&6; }
6053    if test ${ac_cv_path_shell+y}
6054 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       # Solaris 11 /bin/sh (AT&T Research) 93u 2011-02-08 has a file
6068       # descriptor bug that breaks zgrep and is hard to test for
6069       # directly.  At some point $(...) is reading a pipe from the
6070       # subshell, but the pipe is also open in the parent shell, so
6071       # the read deadlocks.  Prefer some other shell if available.
6072       ac_maybe_solaris_sh_bug='test "${.sh.version}"'
6073
6074       ac_cv_path_shell=no
6075
6076       case $SHELL in
6077       /*)
6078         rm -f conftest.c
6079         if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6080           "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null ||
6081             ac_cv_path_shell=$SHELL
6082         fi
6083       esac
6084
6085       case $ac_cv_path_shell in
6086       no)
6087         # Prefer shells that are more likely to be installed in the
6088         # same place on all hosts of this platform.  Therefore, prefer
6089         # shells in /bin and /usr/bin to shells in the installer's
6090         # PATH.  Also, loop through PATH first and then through
6091         # shells, since less-"nice" shells in /bin and /usr/bin are
6092         # more likely to be installed than "nicer" shells elsewhere.
6093         ac_break_if_good_shell=:
6094         as_save_IFS=$IFS; IFS=:
6095         for as_dir in /bin /usr/bin $PATH
6096         do
6097           IFS=$as_save_IFS
6098           case $as_dir in
6099           /*)
6100             for ac_base in sh bash ksh sh5; do
6101               rm -f conftest.c
6102               if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6103                 if "$as_dir/$ac_base" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null
6104                 then
6105                   test "$ac_cv_path_shell" = no
6106                 else
6107                   ac_break_if_good_shell=break
6108                   :
6109                 fi && ac_cv_path_shell=$as_dir/$ac_base
6110                 $ac_break_if_good_shell
6111               fi
6112             done
6113             $ac_break_if_good_shell
6114           esac
6115         done
6116         rm -f conftest.c
6117       esac
6118 fi
6119
6120    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6121 printf "%s\n" "$ac_cv_path_shell" >&6; }
6122    SHELL=$ac_cv_path_shell
6123    if test "$SHELL" = no; then
6124      SHELL=/bin/sh
6125      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6126 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6127    fi
6128    if "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null; then
6129      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it may have file descriptor bugs" >&5
6130 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it may have file descriptor bugs" >&2;}
6131    fi
6132
6133
6134
6135
6136   for ac_header in $ac_header_list
6137 do :
6138   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
6139 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6140 "
6141 if eval test \"x\$"$as_ac_Header"\" = x"yes"
6142 then :
6143   cat >>confdefs.h <<_ACEOF
6144 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
6145 _ACEOF
6146
6147 fi
6148 done
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
6162
6163 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
6164
6165 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6166
6167
6168   ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6169 if test "x$ac_cv_header_minix_config_h" = xyes
6170 then :
6171   MINIX=yes
6172 else
6173   MINIX=
6174 fi
6175
6176   if test "$MINIX" = yes; then
6177
6178 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6179
6180
6181 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6182
6183
6184 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6185
6186
6187 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6188
6189   fi
6190
6191
6192   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6193 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6194 if test ${ac_cv_safe_to_define___extensions__+y}
6195 then :
6196   printf %s "(cached) " >&6
6197 else
6198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6199 /* end confdefs.h.  */
6200
6201 #         define __EXTENSIONS__ 1
6202           $ac_includes_default
6203 int
6204 main (void)
6205 {
6206
6207   ;
6208   return 0;
6209 }
6210 _ACEOF
6211 if ac_fn_c_try_compile "$LINENO"
6212 then :
6213   ac_cv_safe_to_define___extensions__=yes
6214 else
6215   ac_cv_safe_to_define___extensions__=no
6216 fi
6217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6218 fi
6219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6220 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6221   test $ac_cv_safe_to_define___extensions__ = yes &&
6222     printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6223
6224   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6225
6226   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6227
6228   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6229
6230   printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
6231
6232   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6233
6234   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6235
6236   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6237 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6238 if test ${ac_cv_should_define__xopen_source+y}
6239 then :
6240   printf %s "(cached) " >&6
6241 else
6242   ac_cv_should_define__xopen_source=no
6243      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6244 /* end confdefs.h.  */
6245
6246           #include <wchar.h>
6247           mbstate_t x;
6248 int
6249 main (void)
6250 {
6251
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 if ac_fn_c_try_compile "$LINENO"
6257 then :
6258
6259 else
6260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6261 /* end confdefs.h.  */
6262
6263              #define _XOPEN_SOURCE 500
6264              #include <wchar.h>
6265              mbstate_t x;
6266 int
6267 main (void)
6268 {
6269
6270   ;
6271   return 0;
6272 }
6273 _ACEOF
6274 if ac_fn_c_try_compile "$LINENO"
6275 then :
6276   ac_cv_should_define__xopen_source=yes
6277 fi
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6279 fi
6280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6281 fi
6282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6283 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6284   test $ac_cv_should_define__xopen_source = yes &&
6285     printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6296 printf %s "checking for egrep... " >&6; }
6297 if test ${ac_cv_path_EGREP+y}
6298 then :
6299   printf %s "(cached) " >&6
6300 else
6301   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6302    then ac_cv_path_EGREP="$GREP -E"
6303    else
6304      if test -z "$EGREP"; then
6305   ac_path_EGREP_found=false
6306   # Loop through the user's path and test for each of PROGNAME-LIST
6307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6309 do
6310   IFS=$as_save_IFS
6311   case $as_dir in #(((
6312     '') as_dir=./ ;;
6313     */) ;;
6314     *) as_dir=$as_dir/ ;;
6315   esac
6316     for ac_prog in egrep
6317    do
6318     for ac_exec_ext in '' $ac_executable_extensions; do
6319       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6320       as_fn_executable_p "$ac_path_EGREP" || continue
6321 # Check for GNU ac_path_EGREP and select it if it is found.
6322   # Check for GNU $ac_path_EGREP
6323 case `"$ac_path_EGREP" --version 2>&1` in
6324 *GNU*)
6325   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6326 *)
6327   ac_count=0
6328   printf %s 0123456789 >"conftest.in"
6329   while :
6330   do
6331     cat "conftest.in" "conftest.in" >"conftest.tmp"
6332     mv "conftest.tmp" "conftest.in"
6333     cp "conftest.in" "conftest.nl"
6334     printf "%s\n" 'EGREP' >> "conftest.nl"
6335     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6336     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6337     as_fn_arith $ac_count + 1 && ac_count=$as_val
6338     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6339       # Best one so far, save it but keep looking for a better one
6340       ac_cv_path_EGREP="$ac_path_EGREP"
6341       ac_path_EGREP_max=$ac_count
6342     fi
6343     # 10*(2^10) chars as input seems more than enough
6344     test $ac_count -gt 10 && break
6345   done
6346   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6347 esac
6348
6349       $ac_path_EGREP_found && break 3
6350     done
6351   done
6352   done
6353 IFS=$as_save_IFS
6354   if test -z "$ac_cv_path_EGREP"; then
6355     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6356   fi
6357 else
6358   ac_cv_path_EGREP=$EGREP
6359 fi
6360
6361    fi
6362 fi
6363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6364 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6365  EGREP="$ac_cv_path_EGREP"
6366
6367
6368
6369
6370
6371   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6372 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6373 if test ${gl_cv_c_amsterdam_compiler+y}
6374 then :
6375   printf %s "(cached) " >&6
6376 else
6377
6378       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6379 /* end confdefs.h.  */
6380
6381 #ifdef __ACK__
6382 Amsterdam
6383 #endif
6384
6385 _ACEOF
6386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6387   $EGREP "Amsterdam" >/dev/null 2>&1
6388 then :
6389   gl_cv_c_amsterdam_compiler=yes
6390 else
6391   gl_cv_c_amsterdam_compiler=no
6392 fi
6393 rm -rf conftest*
6394
6395
6396 fi
6397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6398 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6399
6400       if test $gl_cv_c_amsterdam_compiler = yes; then
6401     if test -z "$AR"; then
6402       AR='cc -c.a'
6403     fi
6404     if test -z "$ARFLAGS"; then
6405       ARFLAGS='-o'
6406     fi
6407   else
6408                                         if test -n "$ac_tool_prefix"; then
6409   for ac_prog in ar lib "link -lib"
6410   do
6411     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6412 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414 printf %s "checking for $ac_word... " >&6; }
6415 if test ${ac_cv_prog_AR+y}
6416 then :
6417   printf %s "(cached) " >&6
6418 else
6419   if test -n "$AR"; then
6420   ac_cv_prog_AR="$AR" # Let the user override the test.
6421 else
6422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6423 for as_dir in $PATH
6424 do
6425   IFS=$as_save_IFS
6426   case $as_dir in #(((
6427     '') as_dir=./ ;;
6428     */) ;;
6429     *) as_dir=$as_dir/ ;;
6430   esac
6431     for ac_exec_ext in '' $ac_executable_extensions; do
6432   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6433     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6434     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6435     break 2
6436   fi
6437 done
6438   done
6439 IFS=$as_save_IFS
6440
6441 fi
6442 fi
6443 AR=$ac_cv_prog_AR
6444 if test -n "$AR"; then
6445   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6446 printf "%s\n" "$AR" >&6; }
6447 else
6448   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449 printf "%s\n" "no" >&6; }
6450 fi
6451
6452
6453     test -n "$AR" && break
6454   done
6455 fi
6456 if test -z "$AR"; then
6457   ac_ct_AR=$AR
6458   for ac_prog in ar lib "link -lib"
6459 do
6460   # Extract the first word of "$ac_prog", so it can be a program name with args.
6461 set dummy $ac_prog; ac_word=$2
6462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463 printf %s "checking for $ac_word... " >&6; }
6464 if test ${ac_cv_prog_ac_ct_AR+y}
6465 then :
6466   printf %s "(cached) " >&6
6467 else
6468   if test -n "$ac_ct_AR"; then
6469   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6470 else
6471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6472 for as_dir in $PATH
6473 do
6474   IFS=$as_save_IFS
6475   case $as_dir in #(((
6476     '') as_dir=./ ;;
6477     */) ;;
6478     *) as_dir=$as_dir/ ;;
6479   esac
6480     for ac_exec_ext in '' $ac_executable_extensions; do
6481   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6482     ac_cv_prog_ac_ct_AR="$ac_prog"
6483     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6484     break 2
6485   fi
6486 done
6487   done
6488 IFS=$as_save_IFS
6489
6490 fi
6491 fi
6492 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6493 if test -n "$ac_ct_AR"; then
6494   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6495 printf "%s\n" "$ac_ct_AR" >&6; }
6496 else
6497   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498 printf "%s\n" "no" >&6; }
6499 fi
6500
6501
6502   test -n "$ac_ct_AR" && break
6503 done
6504
6505   if test "x$ac_ct_AR" = x; then
6506     AR="false"
6507   else
6508     case $cross_compiling:$ac_tool_warned in
6509 yes:)
6510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6511 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6512 ac_tool_warned=yes ;;
6513 esac
6514     AR=$ac_ct_AR
6515   fi
6516 fi
6517
6518 : ${AR=ar}
6519
6520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6521 printf %s "checking the archiver ($AR) interface... " >&6; }
6522 if test ${am_cv_ar_interface+y}
6523 then :
6524   printf %s "(cached) " >&6
6525 else
6526   ac_ext=c
6527 ac_cpp='$CPP $CPPFLAGS'
6528 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6529 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6530 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6531
6532    am_cv_ar_interface=ar
6533    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h.  */
6535 int some_variable = 0;
6536 _ACEOF
6537 if ac_fn_c_try_compile "$LINENO"
6538 then :
6539   am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6540       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6541   (eval $am_ar_try) 2>&5
6542   ac_status=$?
6543   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6544   test $ac_status = 0; }
6545       if test "$ac_status" -eq 0; then
6546         am_cv_ar_interface=ar
6547       else
6548         am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6549         { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6550   (eval $am_ar_try) 2>&5
6551   ac_status=$?
6552   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6553   test $ac_status = 0; }
6554         if test "$ac_status" -eq 0; then
6555           am_cv_ar_interface=lib
6556         else
6557           am_cv_ar_interface=unknown
6558         fi
6559       fi
6560       rm -f conftest.lib libconftest.a
6561
6562 fi
6563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6564    ac_ext=c
6565 ac_cpp='$CPP $CPPFLAGS'
6566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6569
6570 fi
6571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6572 printf "%s\n" "$am_cv_ar_interface" >&6; }
6573
6574 case $am_cv_ar_interface in
6575 ar)
6576   ;;
6577 lib)
6578   # Microsoft lib, so override with the ar-lib wrapper script.
6579   # FIXME: It is wrong to rewrite AR.
6580   # But if we don't then we get into trouble of one sort or another.
6581   # A longer-term fix would be to have automake use am__AR in this case,
6582   # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6583   # similar.
6584   AR="$am_aux_dir/ar-lib $AR"
6585   ;;
6586 unknown)
6587   as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6588   ;;
6589 esac
6590
6591   fi
6592
6593         if test -n "$ac_tool_prefix"; then
6594   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6595 set dummy ${ac_tool_prefix}ar; ac_word=$2
6596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597 printf %s "checking for $ac_word... " >&6; }
6598 if test ${ac_cv_prog_AR+y}
6599 then :
6600   printf %s "(cached) " >&6
6601 else
6602   if test -n "$AR"; then
6603   ac_cv_prog_AR="$AR" # Let the user override the test.
6604 else
6605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606 for as_dir in $PATH
6607 do
6608   IFS=$as_save_IFS
6609   case $as_dir in #(((
6610     '') as_dir=./ ;;
6611     */) ;;
6612     *) as_dir=$as_dir/ ;;
6613   esac
6614     for ac_exec_ext in '' $ac_executable_extensions; do
6615   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6616     ac_cv_prog_AR="${ac_tool_prefix}ar"
6617     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6618     break 2
6619   fi
6620 done
6621   done
6622 IFS=$as_save_IFS
6623
6624 fi
6625 fi
6626 AR=$ac_cv_prog_AR
6627 if test -n "$AR"; then
6628   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6629 printf "%s\n" "$AR" >&6; }
6630 else
6631   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632 printf "%s\n" "no" >&6; }
6633 fi
6634
6635
6636 fi
6637 if test -z "$ac_cv_prog_AR"; then
6638   ac_ct_AR=$AR
6639   # Extract the first word of "ar", so it can be a program name with args.
6640 set dummy ar; ac_word=$2
6641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642 printf %s "checking for $ac_word... " >&6; }
6643 if test ${ac_cv_prog_ac_ct_AR+y}
6644 then :
6645   printf %s "(cached) " >&6
6646 else
6647   if test -n "$ac_ct_AR"; then
6648   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6649 else
6650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653   IFS=$as_save_IFS
6654   case $as_dir in #(((
6655     '') as_dir=./ ;;
6656     */) ;;
6657     *) as_dir=$as_dir/ ;;
6658   esac
6659     for ac_exec_ext in '' $ac_executable_extensions; do
6660   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6661     ac_cv_prog_ac_ct_AR="ar"
6662     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6663     break 2
6664   fi
6665 done
6666   done
6667 IFS=$as_save_IFS
6668
6669 fi
6670 fi
6671 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6672 if test -n "$ac_ct_AR"; then
6673   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6674 printf "%s\n" "$ac_ct_AR" >&6; }
6675 else
6676   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677 printf "%s\n" "no" >&6; }
6678 fi
6679
6680   if test "x$ac_ct_AR" = x; then
6681     AR="ar"
6682   else
6683     case $cross_compiling:$ac_tool_warned in
6684 yes:)
6685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6686 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6687 ac_tool_warned=yes ;;
6688 esac
6689     AR=$ac_ct_AR
6690   fi
6691 else
6692   AR="$ac_cv_prog_AR"
6693 fi
6694
6695   if test -z "$ARFLAGS"; then
6696     ARFLAGS='cr'
6697   fi
6698
6699
6700
6701   if test -z "$RANLIB"; then
6702     if test $gl_cv_c_amsterdam_compiler = yes; then
6703       RANLIB=':'
6704     else
6705             if test -n "$ac_tool_prefix"; then
6706   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6707 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709 printf %s "checking for $ac_word... " >&6; }
6710 if test ${ac_cv_prog_RANLIB+y}
6711 then :
6712   printf %s "(cached) " >&6
6713 else
6714   if test -n "$RANLIB"; then
6715   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6716 else
6717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718 for as_dir in $PATH
6719 do
6720   IFS=$as_save_IFS
6721   case $as_dir in #(((
6722     '') as_dir=./ ;;
6723     */) ;;
6724     *) as_dir=$as_dir/ ;;
6725   esac
6726     for ac_exec_ext in '' $ac_executable_extensions; do
6727   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6728     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6729     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6730     break 2
6731   fi
6732 done
6733   done
6734 IFS=$as_save_IFS
6735
6736 fi
6737 fi
6738 RANLIB=$ac_cv_prog_RANLIB
6739 if test -n "$RANLIB"; then
6740   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6741 printf "%s\n" "$RANLIB" >&6; }
6742 else
6743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744 printf "%s\n" "no" >&6; }
6745 fi
6746
6747
6748 fi
6749 if test -z "$ac_cv_prog_RANLIB"; then
6750   ac_ct_RANLIB=$RANLIB
6751   # Extract the first word of "ranlib", so it can be a program name with args.
6752 set dummy ranlib; ac_word=$2
6753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754 printf %s "checking for $ac_word... " >&6; }
6755 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6756 then :
6757   printf %s "(cached) " >&6
6758 else
6759   if test -n "$ac_ct_RANLIB"; then
6760   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6761 else
6762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6763 for as_dir in $PATH
6764 do
6765   IFS=$as_save_IFS
6766   case $as_dir in #(((
6767     '') as_dir=./ ;;
6768     */) ;;
6769     *) as_dir=$as_dir/ ;;
6770   esac
6771     for ac_exec_ext in '' $ac_executable_extensions; do
6772   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6773     ac_cv_prog_ac_ct_RANLIB="ranlib"
6774     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6775     break 2
6776   fi
6777 done
6778   done
6779 IFS=$as_save_IFS
6780
6781 fi
6782 fi
6783 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6784 if test -n "$ac_ct_RANLIB"; then
6785   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6786 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6787 else
6788   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789 printf "%s\n" "no" >&6; }
6790 fi
6791
6792   if test "x$ac_ct_RANLIB" = x; then
6793     RANLIB=":"
6794   else
6795     case $cross_compiling:$ac_tool_warned in
6796 yes:)
6797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6798 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6799 ac_tool_warned=yes ;;
6800 esac
6801     RANLIB=$ac_ct_RANLIB
6802   fi
6803 else
6804   RANLIB="$ac_cv_prog_RANLIB"
6805 fi
6806
6807     fi
6808   fi
6809
6810
6811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6812 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6813 if test ${ac_cv_sys_largefile_source+y}
6814 then :
6815   printf %s "(cached) " >&6
6816 else
6817   while :; do
6818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819 /* end confdefs.h.  */
6820 #include <sys/types.h> /* for off_t */
6821      #include <stdio.h>
6822 int
6823 main (void)
6824 {
6825 int (*fp) (FILE *, off_t, int) = fseeko;
6826      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6827   ;
6828   return 0;
6829 }
6830 _ACEOF
6831 if ac_fn_c_try_link "$LINENO"
6832 then :
6833   ac_cv_sys_largefile_source=no; break
6834 fi
6835 rm -f core conftest.err conftest.$ac_objext \
6836     conftest$ac_exeext conftest.$ac_ext
6837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h.  */
6839 #define _LARGEFILE_SOURCE 1
6840 #include <sys/types.h> /* for off_t */
6841      #include <stdio.h>
6842 int
6843 main (void)
6844 {
6845 int (*fp) (FILE *, off_t, int) = fseeko;
6846      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6847   ;
6848   return 0;
6849 }
6850 _ACEOF
6851 if ac_fn_c_try_link "$LINENO"
6852 then :
6853   ac_cv_sys_largefile_source=1; break
6854 fi
6855 rm -f core conftest.err conftest.$ac_objext \
6856     conftest$ac_exeext conftest.$ac_ext
6857   ac_cv_sys_largefile_source=unknown
6858   break
6859 done
6860 fi
6861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6862 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6863 case $ac_cv_sys_largefile_source in #(
6864   no | unknown) ;;
6865   *)
6866 cat >>confdefs.h <<_ACEOF
6867 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6868 _ACEOF
6869 ;;
6870 esac
6871 rm -rf conftest*
6872
6873 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6874 # in glibc 2.1.3, but that breaks too many other things.
6875 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6876 if test $ac_cv_sys_largefile_source != unknown; then
6877
6878 printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
6879
6880 fi
6881
6882 # Make sure we can run config.sub.
6883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6884   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6885
6886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6887 printf %s "checking build system type... " >&6; }
6888 if test ${ac_cv_build+y}
6889 then :
6890   printf %s "(cached) " >&6
6891 else
6892   ac_build_alias=$build_alias
6893 test "x$ac_build_alias" = x &&
6894   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6895 test "x$ac_build_alias" = x &&
6896   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6897 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6898   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6899
6900 fi
6901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6902 printf "%s\n" "$ac_cv_build" >&6; }
6903 case $ac_cv_build in
6904 *-*-*) ;;
6905 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6906 esac
6907 build=$ac_cv_build
6908 ac_save_IFS=$IFS; IFS='-'
6909 set x $ac_cv_build
6910 shift
6911 build_cpu=$1
6912 build_vendor=$2
6913 shift; shift
6914 # Remember, the first character of IFS is used to create $*,
6915 # except with old shells:
6916 build_os=$*
6917 IFS=$ac_save_IFS
6918 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6919
6920
6921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6922 printf %s "checking host system type... " >&6; }
6923 if test ${ac_cv_host+y}
6924 then :
6925   printf %s "(cached) " >&6
6926 else
6927   if test "x$host_alias" = x; then
6928   ac_cv_host=$ac_cv_build
6929 else
6930   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6931     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6932 fi
6933
6934 fi
6935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6936 printf "%s\n" "$ac_cv_host" >&6; }
6937 case $ac_cv_host in
6938 *-*-*) ;;
6939 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6940 esac
6941 host=$ac_cv_host
6942 ac_save_IFS=$IFS; IFS='-'
6943 set x $ac_cv_host
6944 shift
6945 host_cpu=$1
6946 host_vendor=$2
6947 shift; shift
6948 # Remember, the first character of IFS is used to create $*,
6949 # except with old shells:
6950 host_os=$*
6951 IFS=$ac_save_IFS
6952 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6953
6954
6955
6956
6957
6958   # IEEE behaviour is the default on all CPUs except Alpha and SH
6959   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6960   # and the GCC 4.1.2 manual).
6961   case "$host_cpu" in
6962     alpha*)
6963       # On Alpha systems, a compiler option provides the behaviour.
6964       # See the ieee(3) manual page, also available at
6965       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6966       if test -n "$GCC"; then
6967         # GCC has the option -mieee.
6968         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6969         CPPFLAGS="$CPPFLAGS -mieee"
6970       else
6971         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6972         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6973         CPPFLAGS="$CPPFLAGS -ieee"
6974       fi
6975       ;;
6976     sh*)
6977       if test -n "$GCC"; then
6978         # GCC has the option -mieee.
6979         CPPFLAGS="$CPPFLAGS -mieee"
6980       fi
6981       ;;
6982   esac
6983
6984 # Check whether --enable-largefile was given.
6985 if test ${enable_largefile+y}
6986 then :
6987   enableval=$enable_largefile;
6988 fi
6989
6990 if test "$enable_largefile" != no; then
6991
6992   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6993 printf %s "checking for special C compiler options needed for large files... " >&6; }
6994 if test ${ac_cv_sys_largefile_CC+y}
6995 then :
6996   printf %s "(cached) " >&6
6997 else
6998   ac_cv_sys_largefile_CC=no
6999      if test "$GCC" != yes; then
7000        ac_save_CC=$CC
7001        while :; do
7002          # IRIX 6.2 and later do not support large files by default,
7003          # so use the C compiler's -n32 option if that helps.
7004          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7005 /* end confdefs.h.  */
7006 #include <sys/types.h>
7007  /* Check that off_t can represent 2**63 - 1 correctly.
7008     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7009     since some C++ compilers masquerading as C compilers
7010     incorrectly reject 9223372036854775807.  */
7011 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7012   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7013                        && LARGE_OFF_T % 2147483647 == 1)
7014                       ? 1 : -1];
7015 int
7016 main (void)
7017 {
7018
7019   ;
7020   return 0;
7021 }
7022 _ACEOF
7023          if ac_fn_c_try_compile "$LINENO"
7024 then :
7025   break
7026 fi
7027 rm -f core conftest.err conftest.$ac_objext
7028          CC="$CC -n32"
7029          if ac_fn_c_try_compile "$LINENO"
7030 then :
7031   ac_cv_sys_largefile_CC=' -n32'; break
7032 fi
7033 rm -f core conftest.err conftest.$ac_objext
7034          break
7035        done
7036        CC=$ac_save_CC
7037        rm -f conftest.$ac_ext
7038     fi
7039 fi
7040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7041 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
7042   if test "$ac_cv_sys_largefile_CC" != no; then
7043     CC=$CC$ac_cv_sys_largefile_CC
7044   fi
7045
7046   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7047 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7048 if test ${ac_cv_sys_file_offset_bits+y}
7049 then :
7050   printf %s "(cached) " >&6
7051 else
7052   while :; do
7053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7054 /* end confdefs.h.  */
7055 #include <sys/types.h>
7056  /* Check that off_t can represent 2**63 - 1 correctly.
7057     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7058     since some C++ compilers masquerading as C compilers
7059     incorrectly reject 9223372036854775807.  */
7060 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7061   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7062                        && LARGE_OFF_T % 2147483647 == 1)
7063                       ? 1 : -1];
7064 int
7065 main (void)
7066 {
7067
7068   ;
7069   return 0;
7070 }
7071 _ACEOF
7072 if ac_fn_c_try_compile "$LINENO"
7073 then :
7074   ac_cv_sys_file_offset_bits=no; break
7075 fi
7076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078 /* end confdefs.h.  */
7079 #define _FILE_OFFSET_BITS 64
7080 #include <sys/types.h>
7081  /* Check that off_t can represent 2**63 - 1 correctly.
7082     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7083     since some C++ compilers masquerading as C compilers
7084     incorrectly reject 9223372036854775807.  */
7085 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7086   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7087                        && LARGE_OFF_T % 2147483647 == 1)
7088                       ? 1 : -1];
7089 int
7090 main (void)
7091 {
7092
7093   ;
7094   return 0;
7095 }
7096 _ACEOF
7097 if ac_fn_c_try_compile "$LINENO"
7098 then :
7099   ac_cv_sys_file_offset_bits=64; break
7100 fi
7101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102   ac_cv_sys_file_offset_bits=unknown
7103   break
7104 done
7105 fi
7106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7107 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
7108 case $ac_cv_sys_file_offset_bits in #(
7109   no | unknown) ;;
7110   *)
7111 cat >>confdefs.h <<_ACEOF
7112 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7113 _ACEOF
7114 ;;
7115 esac
7116 rm -rf conftest*
7117   if test $ac_cv_sys_file_offset_bits = unknown; then
7118     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7119 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7120 if test ${ac_cv_sys_large_files+y}
7121 then :
7122   printf %s "(cached) " >&6
7123 else
7124   while :; do
7125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126 /* end confdefs.h.  */
7127 #include <sys/types.h>
7128  /* Check that off_t can represent 2**63 - 1 correctly.
7129     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7130     since some C++ compilers masquerading as C compilers
7131     incorrectly reject 9223372036854775807.  */
7132 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7133   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7134                        && LARGE_OFF_T % 2147483647 == 1)
7135                       ? 1 : -1];
7136 int
7137 main (void)
7138 {
7139
7140   ;
7141   return 0;
7142 }
7143 _ACEOF
7144 if ac_fn_c_try_compile "$LINENO"
7145 then :
7146   ac_cv_sys_large_files=no; break
7147 fi
7148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150 /* end confdefs.h.  */
7151 #define _LARGE_FILES 1
7152 #include <sys/types.h>
7153  /* Check that off_t can represent 2**63 - 1 correctly.
7154     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7155     since some C++ compilers masquerading as C compilers
7156     incorrectly reject 9223372036854775807.  */
7157 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7158   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7159                        && LARGE_OFF_T % 2147483647 == 1)
7160                       ? 1 : -1];
7161 int
7162 main (void)
7163 {
7164
7165   ;
7166   return 0;
7167 }
7168 _ACEOF
7169 if ac_fn_c_try_compile "$LINENO"
7170 then :
7171   ac_cv_sys_large_files=1; break
7172 fi
7173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7174   ac_cv_sys_large_files=unknown
7175   break
7176 done
7177 fi
7178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7179 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7180 case $ac_cv_sys_large_files in #(
7181   no | unknown) ;;
7182   *)
7183 cat >>confdefs.h <<_ACEOF
7184 #define _LARGE_FILES $ac_cv_sys_large_files
7185 _ACEOF
7186 ;;
7187 esac
7188 rm -rf conftest*
7189   fi
7190
7191
7192 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7193
7194 fi
7195
7196
7197
7198
7199
7200
7201   # Check whether --enable-threads was given.
7202 if test ${enable_threads+y}
7203 then :
7204   enableval=$enable_threads; gl_use_threads=$enableval
7205 else
7206   if test -n "$gl_use_threads_default"; then
7207        gl_use_threads="$gl_use_threads_default"
7208      else
7209        case "$host_os" in
7210                                                                osf*) gl_use_threads=no ;;
7211          cygwin*)
7212                case `uname -r` in
7213                  1.[0-5].*) gl_use_threads=no ;;
7214                  *)         gl_use_threads=yes ;;
7215                esac
7216                ;;
7217          *)    gl_use_threads=yes ;;
7218        esac
7219      fi
7220
7221 fi
7222
7223   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7224     # For using <pthread.h>:
7225     case "$host_os" in
7226       osf*)
7227         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7228         # groks <pthread.h>. cc also understands the flag -pthread, but
7229         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7230         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7231         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7232         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7233         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7234         ;;
7235     esac
7236     # Some systems optimize for single-threaded programs by default, and
7237     # need special flags to disable these optimizations. For example, the
7238     # definition of 'errno' in <errno.h>.
7239     case "$host_os" in
7240       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7241       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7242     esac
7243   fi
7244
7245
7246
7247   # Pre-early section.
7248
7249
7250
7251
7252   # Code from module absolute-header:
7253   # Code from module alloca-opt:
7254   # Code from module announce-gen:
7255   # Code from module assure:
7256   # Code from module at-internal:
7257   # Code from module calloc:
7258   # Code from module calloc-gnu:
7259   # Code from module calloc-posix:
7260   # Code from module chdir:
7261   # Code from module chdir-long:
7262   # Code from module clock-time:
7263   # Code from module cloexec:
7264   # Code from module close:
7265   # Code from module closedir:
7266   # Code from module dirent:
7267   # Code from module dirent-safer:
7268   # Code from module dirfd:
7269   # Code from module dirname-lgpl:
7270   # Code from module do-release-commit-and-tag:
7271   # Code from module dosname:
7272   # Code from module double-slash-root:
7273   # Code from module dup:
7274   # Code from module dup2:
7275   # Code from module errno:
7276   # Code from module error:
7277   # Code from module exitfail:
7278   # Code from module extensions:
7279   # Code from module extern-inline:
7280   # Code from module fchdir:
7281   # Code from module fclose:
7282   # Code from module fcntl:
7283   # Code from module fcntl-h:
7284   # Code from module fcntl-safer:
7285   # Code from module fd-hook:
7286   # Code from module fdatasync:
7287   # Code from module fdl:
7288   # Code from module fdopendir:
7289   # Code from module fflush:
7290
7291   # Code from module filename:
7292   # Code from module filenamecat-lgpl:
7293   # Code from module float:
7294   # Code from module fpieee:
7295
7296   # Code from module fprintf-posix:
7297   # Code from module fpucw:
7298   # Code from module fpurge:
7299   # Code from module freading:
7300   # Code from module frexp-nolibm:
7301   # Code from module frexpl-nolibm:
7302   # Code from module fseek:
7303   # Code from module fseeko:
7304
7305   # Code from module fseterr:
7306   # Code from module fstat:
7307   # Code from module fstatat:
7308   # Code from module fsync:
7309   # Code from module ftell:
7310   # Code from module ftello:
7311
7312   # Code from module gendocs:
7313   # Code from module getcwd-lgpl:
7314   # Code from module getdtablesize:
7315   # Code from module getopt-gnu:
7316   # Code from module getopt-posix:
7317   # Code from module gettext-h:
7318   # Code from module gettime:
7319   # Code from module gettimeofday:
7320   # Code from module git-version-gen:
7321   # Code from module gitlog-to-changelog:
7322   # Code from module gnu-make:
7323   # Code from module gnu-web-doc-update:
7324   # Code from module gnumakefile:
7325   # Code from module gnupload:
7326   # Code from module havelib:
7327   # Code from module ignore-value:
7328   # Code from module include_next:
7329   # Code from module intprops:
7330   # Code from module isnand-nolibm:
7331   # Code from module isnanf-nolibm:
7332   # Code from module isnanl-nolibm:
7333   # Code from module largefile:
7334
7335   # Code from module lib-ignore:
7336   # Code from module lock:
7337   # Code from module lseek:
7338   # Code from module lstat:
7339   # Code from module maintainer-makefile:
7340   # Code from module malloc-gnu:
7341   # Code from module malloc-posix:
7342   # Code from module manywarnings:
7343   # Code from module math:
7344   # Code from module memchr:
7345   # Code from module mempcpy:
7346   # Code from module memrchr:
7347   # Code from module msvc-inval:
7348   # Code from module msvc-nothrow:
7349   # Code from module multiarch:
7350   # Code from module nocrash:
7351   # Code from module open:
7352   # Code from module openat:
7353   # Code from module openat-die:
7354   # Code from module openat-h:
7355   # Code from module openat-safer:
7356   # Code from module opendir:
7357   # Code from module pathmax:
7358   # Code from module perror:
7359   # Code from module printf-frexp:
7360   # Code from module printf-frexpl:
7361   # Code from module printf-posix:
7362   # Code from module printf-safe:
7363   # Code from module readdir:
7364   # Code from module readme-release:
7365   # Code from module realloc-gnu:
7366   # Code from module realloc-posix:
7367   # Code from module rmdir:
7368   # Code from module save-cwd:
7369   # Code from module savedir:
7370   # Code from module signbit:
7371   # Code from module size_max:
7372   # Code from module snippet/_Noreturn:
7373   # Code from module snippet/arg-nonnull:
7374   # Code from module snippet/c++defs:
7375   # Code from module snippet/unused-parameter:
7376   # Code from module snippet/warn-on-use:
7377   # Code from module ssize_t:
7378   # Code from module stat:
7379   # Code from module stat-time:
7380   # Code from module statat:
7381   # Code from module stdbool:
7382   # Code from module stddef:
7383   # Code from module stdint:
7384   # Code from module stdio:
7385   # Code from module stdlib:
7386   # Code from module stpcpy:
7387   # Code from module strdup-posix:
7388   # Code from module strerror:
7389   # Code from module strerror-override:
7390   # Code from module strerror_r-posix:
7391   # Code from module string:
7392   # Code from module sys_stat:
7393   # Code from module sys_time:
7394   # Code from module sys_types:
7395   # Code from module threadlib:
7396
7397
7398
7399   # Code from module time:
7400   # Code from module timespec:
7401   # Code from module unistd:
7402   # Code from module unistd-safer:
7403   # Code from module unlink:
7404   # Code from module unlinkat:
7405   # Code from module update-copyright:
7406   # Code from module useless-if-before-free:
7407   # Code from module utimens:
7408   # Code from module vasnprintf:
7409   # Code from module vc-list-files:
7410   # Code from module verify:
7411   # Code from module vfprintf-posix:
7412   # Code from module warnings:
7413   # Code from module wchar:
7414   # Code from module xalloc:
7415   # Code from module xalloc-die:
7416   # Code from module xalloc-oversized:
7417   # Code from module xsize:
7418   # Code from module yesno:
7419
7420
7421
7422
7423
7424
7425
7426           LIBC_FATAL_STDERR_=1
7427   export LIBC_FATAL_STDERR_
7428
7429 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7430 if test "x$ac_cv_type_size_t" = xyes
7431 then :
7432
7433 else
7434
7435 cat >>confdefs.h <<_ACEOF
7436 #define size_t unsigned int
7437 _ACEOF
7438
7439 fi
7440
7441 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7442 # for constant arguments.  Useless!
7443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7444 printf %s "checking for working alloca.h... " >&6; }
7445 if test ${ac_cv_working_alloca_h+y}
7446 then :
7447   printf %s "(cached) " >&6
7448 else
7449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7450 /* end confdefs.h.  */
7451 #include <alloca.h>
7452 int
7453 main (void)
7454 {
7455 char *p = (char *) alloca (2 * sizeof (int));
7456                           if (p) return 0;
7457   ;
7458   return 0;
7459 }
7460 _ACEOF
7461 if ac_fn_c_try_link "$LINENO"
7462 then :
7463   ac_cv_working_alloca_h=yes
7464 else
7465   ac_cv_working_alloca_h=no
7466 fi
7467 rm -f core conftest.err conftest.$ac_objext \
7468     conftest$ac_exeext conftest.$ac_ext
7469 fi
7470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7471 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7472 if test $ac_cv_working_alloca_h = yes; then
7473
7474 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7475
7476 fi
7477
7478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7479 printf %s "checking for alloca... " >&6; }
7480 if test ${ac_cv_func_alloca_works+y}
7481 then :
7482   printf %s "(cached) " >&6
7483 else
7484   if test $ac_cv_working_alloca_h = yes; then
7485   ac_cv_func_alloca_works=yes
7486 else
7487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h.  */
7489 #include <stdlib.h>
7490 #include <stddef.h>
7491 #ifndef alloca
7492 # ifdef __GNUC__
7493 #  define alloca __builtin_alloca
7494 # elif defined _MSC_VER
7495 #  include <malloc.h>
7496 #  define alloca _alloca
7497 # else
7498 #  ifdef  __cplusplus
7499 extern "C"
7500 #  endif
7501 void *alloca (size_t);
7502 # endif
7503 #endif
7504
7505 int
7506 main (void)
7507 {
7508 char *p = (char *) alloca (1);
7509                                     if (p) return 0;
7510   ;
7511   return 0;
7512 }
7513 _ACEOF
7514 if ac_fn_c_try_link "$LINENO"
7515 then :
7516   ac_cv_func_alloca_works=yes
7517 else
7518   ac_cv_func_alloca_works=no
7519 fi
7520 rm -f core conftest.err conftest.$ac_objext \
7521     conftest$ac_exeext conftest.$ac_ext
7522 fi
7523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7524 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7525 fi
7526
7527 if test $ac_cv_func_alloca_works = yes; then
7528
7529 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7530
7531 else
7532   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7533 # that cause trouble.  Some versions do not even contain alloca or
7534 # contain a buggy version.  If you still want to use their alloca,
7535 # use ar to extract alloca.o from them instead of compiling alloca.c.
7536
7537
7538
7539
7540
7541 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7542
7543 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7544
7545
7546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7547 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7548 if test ${ac_cv_os_cray+y}
7549 then :
7550   printf %s "(cached) " >&6
7551 else
7552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7553 /* end confdefs.h.  */
7554 #if defined CRAY && ! defined CRAY2
7555 webecray
7556 #else
7557 wenotbecray
7558 #endif
7559
7560 _ACEOF
7561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7562   $EGREP "webecray" >/dev/null 2>&1
7563 then :
7564   ac_cv_os_cray=yes
7565 else
7566   ac_cv_os_cray=no
7567 fi
7568 rm -rf conftest*
7569
7570 fi
7571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7572 printf "%s\n" "$ac_cv_os_cray" >&6; }
7573 if test $ac_cv_os_cray = yes; then
7574   for ac_func in _getb67 GETB67 getb67; do
7575     as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7576 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7577 if eval test \"x\$"$as_ac_var"\" = x"yes"
7578 then :
7579
7580 cat >>confdefs.h <<_ACEOF
7581 #define CRAY_STACKSEG_END $ac_func
7582 _ACEOF
7583
7584     break
7585 fi
7586
7587   done
7588 fi
7589
7590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7591 printf %s "checking stack direction for C alloca... " >&6; }
7592 if test ${ac_cv_c_stack_direction+y}
7593 then :
7594   printf %s "(cached) " >&6
7595 else
7596   if test "$cross_compiling" = yes
7597 then :
7598   ac_cv_c_stack_direction=0
7599 else
7600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7601 /* end confdefs.h.  */
7602 $ac_includes_default
7603 int
7604 find_stack_direction (int *addr, int depth)
7605 {
7606   int dir, dummy = 0;
7607   if (! addr)
7608     addr = &dummy;
7609   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7610   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7611   return dir + dummy;
7612 }
7613
7614 int
7615 main (int argc, char **argv)
7616 {
7617   return find_stack_direction (0, argc + !argv + 20) < 0;
7618 }
7619 _ACEOF
7620 if ac_fn_c_try_run "$LINENO"
7621 then :
7622   ac_cv_c_stack_direction=1
7623 else
7624   ac_cv_c_stack_direction=-1
7625 fi
7626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7627   conftest.$ac_objext conftest.beam conftest.$ac_ext
7628 fi
7629
7630 fi
7631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7632 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7633 cat >>confdefs.h <<_ACEOF
7634 #define STACK_DIRECTION $ac_cv_c_stack_direction
7635 _ACEOF
7636
7637
7638 fi
7639
7640
7641   GNULIB__EXIT=0;
7642   GNULIB_ATOLL=0;
7643   GNULIB_CALLOC_POSIX=0;
7644   GNULIB_CANONICALIZE_FILE_NAME=0;
7645   GNULIB_GETLOADAVG=0;
7646   GNULIB_GETSUBOPT=0;
7647   GNULIB_GRANTPT=0;
7648   GNULIB_MALLOC_POSIX=0;
7649   GNULIB_MBTOWC=0;
7650   GNULIB_MKDTEMP=0;
7651   GNULIB_MKOSTEMP=0;
7652   GNULIB_MKOSTEMPS=0;
7653   GNULIB_MKSTEMP=0;
7654   GNULIB_MKSTEMPS=0;
7655   GNULIB_POSIX_OPENPT=0;
7656   GNULIB_PTSNAME=0;
7657   GNULIB_PTSNAME_R=0;
7658   GNULIB_PUTENV=0;
7659   GNULIB_QSORT_R=0;
7660   GNULIB_RANDOM=0;
7661   GNULIB_RANDOM_R=0;
7662   GNULIB_REALLOC_POSIX=0;
7663   GNULIB_REALPATH=0;
7664   GNULIB_RPMATCH=0;
7665   GNULIB_SECURE_GETENV=0;
7666   GNULIB_SETENV=0;
7667   GNULIB_STRTOD=0;
7668   GNULIB_STRTOLL=0;
7669   GNULIB_STRTOULL=0;
7670   GNULIB_SYSTEM_POSIX=0;
7671   GNULIB_UNLOCKPT=0;
7672   GNULIB_UNSETENV=0;
7673   GNULIB_WCTOMB=0;
7674     HAVE__EXIT=1;
7675   HAVE_ATOLL=1;
7676   HAVE_CANONICALIZE_FILE_NAME=1;
7677   HAVE_DECL_GETLOADAVG=1;
7678   HAVE_GETSUBOPT=1;
7679   HAVE_GRANTPT=1;
7680   HAVE_MKDTEMP=1;
7681   HAVE_MKOSTEMP=1;
7682   HAVE_MKOSTEMPS=1;
7683   HAVE_MKSTEMP=1;
7684   HAVE_MKSTEMPS=1;
7685   HAVE_POSIX_OPENPT=1;
7686   HAVE_PTSNAME=1;
7687   HAVE_PTSNAME_R=1;
7688   HAVE_RANDOM=1;
7689   HAVE_RANDOM_H=1;
7690   HAVE_RANDOM_R=1;
7691   HAVE_REALPATH=1;
7692   HAVE_RPMATCH=1;
7693   HAVE_SECURE_GETENV=1;
7694   HAVE_SETENV=1;
7695   HAVE_DECL_SETENV=1;
7696   HAVE_STRTOD=1;
7697   HAVE_STRTOLL=1;
7698   HAVE_STRTOULL=1;
7699   HAVE_STRUCT_RANDOM_DATA=1;
7700   HAVE_SYS_LOADAVG_H=0;
7701   HAVE_UNLOCKPT=1;
7702   HAVE_DECL_UNSETENV=1;
7703   REPLACE_CALLOC=0;
7704   REPLACE_CANONICALIZE_FILE_NAME=0;
7705   REPLACE_MALLOC=0;
7706   REPLACE_MBTOWC=0;
7707   REPLACE_MKSTEMP=0;
7708   REPLACE_PTSNAME=0;
7709   REPLACE_PTSNAME_R=0;
7710   REPLACE_PUTENV=0;
7711   REPLACE_QSORT_R=0;
7712   REPLACE_RANDOM_R=0;
7713   REPLACE_REALLOC=0;
7714   REPLACE_REALPATH=0;
7715   REPLACE_SETENV=0;
7716   REPLACE_STRTOD=0;
7717   REPLACE_UNSETENV=0;
7718   REPLACE_WCTOMB=0;
7719
7720
7721   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7722 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7723 if test ${gl_cv_func_malloc_posix+y}
7724 then :
7725   printf %s "(cached) " >&6
7726 else
7727
7728                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7729 /* end confdefs.h.  */
7730
7731 int
7732 main (void)
7733 {
7734 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7735              choke me
7736              #endif
7737
7738   ;
7739   return 0;
7740 }
7741 _ACEOF
7742 if ac_fn_c_try_compile "$LINENO"
7743 then :
7744   gl_cv_func_malloc_posix=yes
7745 else
7746   gl_cv_func_malloc_posix=no
7747 fi
7748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7749
7750 fi
7751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7752 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7753
7754
7755   GNULIB_CHDIR=0;
7756   GNULIB_CHOWN=0;
7757   GNULIB_CLOSE=0;
7758   GNULIB_DUP=0;
7759   GNULIB_DUP2=0;
7760   GNULIB_DUP3=0;
7761   GNULIB_ENVIRON=0;
7762   GNULIB_EUIDACCESS=0;
7763   GNULIB_FACCESSAT=0;
7764   GNULIB_FCHDIR=0;
7765   GNULIB_FCHOWNAT=0;
7766   GNULIB_FDATASYNC=0;
7767   GNULIB_FSYNC=0;
7768   GNULIB_FTRUNCATE=0;
7769   GNULIB_GETCWD=0;
7770   GNULIB_GETDOMAINNAME=0;
7771   GNULIB_GETDTABLESIZE=0;
7772   GNULIB_GETGROUPS=0;
7773   GNULIB_GETHOSTNAME=0;
7774   GNULIB_GETLOGIN=0;
7775   GNULIB_GETLOGIN_R=0;
7776   GNULIB_GETPAGESIZE=0;
7777   GNULIB_GETUSERSHELL=0;
7778   GNULIB_GROUP_MEMBER=0;
7779   GNULIB_ISATTY=0;
7780   GNULIB_LCHOWN=0;
7781   GNULIB_LINK=0;
7782   GNULIB_LINKAT=0;
7783   GNULIB_LSEEK=0;
7784   GNULIB_PIPE=0;
7785   GNULIB_PIPE2=0;
7786   GNULIB_PREAD=0;
7787   GNULIB_PWRITE=0;
7788   GNULIB_READ=0;
7789   GNULIB_READLINK=0;
7790   GNULIB_READLINKAT=0;
7791   GNULIB_RMDIR=0;
7792   GNULIB_SETHOSTNAME=0;
7793   GNULIB_SLEEP=0;
7794   GNULIB_SYMLINK=0;
7795   GNULIB_SYMLINKAT=0;
7796   GNULIB_TTYNAME_R=0;
7797   GNULIB_UNISTD_H_NONBLOCKING=0;
7798   GNULIB_UNISTD_H_SIGPIPE=0;
7799   GNULIB_UNLINK=0;
7800   GNULIB_UNLINKAT=0;
7801   GNULIB_USLEEP=0;
7802   GNULIB_WRITE=0;
7803     HAVE_CHOWN=1;
7804   HAVE_DUP2=1;
7805   HAVE_DUP3=1;
7806   HAVE_EUIDACCESS=1;
7807   HAVE_FACCESSAT=1;
7808   HAVE_FCHDIR=1;
7809   HAVE_FCHOWNAT=1;
7810   HAVE_FDATASYNC=1;
7811   HAVE_FSYNC=1;
7812   HAVE_FTRUNCATE=1;
7813   HAVE_GETDTABLESIZE=1;
7814   HAVE_GETGROUPS=1;
7815   HAVE_GETHOSTNAME=1;
7816   HAVE_GETLOGIN=1;
7817   HAVE_GETPAGESIZE=1;
7818   HAVE_GROUP_MEMBER=1;
7819   HAVE_LCHOWN=1;
7820   HAVE_LINK=1;
7821   HAVE_LINKAT=1;
7822   HAVE_PIPE=1;
7823   HAVE_PIPE2=1;
7824   HAVE_PREAD=1;
7825   HAVE_PWRITE=1;
7826   HAVE_READLINK=1;
7827   HAVE_READLINKAT=1;
7828   HAVE_SETHOSTNAME=1;
7829   HAVE_SLEEP=1;
7830   HAVE_SYMLINK=1;
7831   HAVE_SYMLINKAT=1;
7832   HAVE_UNLINKAT=1;
7833   HAVE_USLEEP=1;
7834   HAVE_DECL_ENVIRON=1;
7835   HAVE_DECL_FCHDIR=1;
7836   HAVE_DECL_FDATASYNC=1;
7837   HAVE_DECL_GETDOMAINNAME=1;
7838   HAVE_DECL_GETLOGIN_R=1;
7839   HAVE_DECL_GETPAGESIZE=1;
7840   HAVE_DECL_GETUSERSHELL=1;
7841   HAVE_DECL_SETHOSTNAME=1;
7842   HAVE_DECL_TTYNAME_R=1;
7843   HAVE_OS_H=0;
7844   HAVE_SYS_PARAM_H=0;
7845   REPLACE_CHOWN=0;
7846   REPLACE_CLOSE=0;
7847   REPLACE_DUP=0;
7848   REPLACE_DUP2=0;
7849   REPLACE_FCHOWNAT=0;
7850   REPLACE_FTRUNCATE=0;
7851   REPLACE_GETCWD=0;
7852   REPLACE_GETDOMAINNAME=0;
7853   REPLACE_GETDTABLESIZE=0;
7854   REPLACE_GETLOGIN_R=0;
7855   REPLACE_GETGROUPS=0;
7856   REPLACE_GETPAGESIZE=0;
7857   REPLACE_ISATTY=0;
7858   REPLACE_LCHOWN=0;
7859   REPLACE_LINK=0;
7860   REPLACE_LINKAT=0;
7861   REPLACE_LSEEK=0;
7862   REPLACE_PREAD=0;
7863   REPLACE_PWRITE=0;
7864   REPLACE_READ=0;
7865   REPLACE_READLINK=0;
7866   REPLACE_READLINKAT=0;
7867   REPLACE_RMDIR=0;
7868   REPLACE_SLEEP=0;
7869   REPLACE_SYMLINK=0;
7870   REPLACE_SYMLINKAT=0;
7871   REPLACE_TTYNAME_R=0;
7872   REPLACE_UNLINK=0;
7873   REPLACE_UNLINKAT=0;
7874   REPLACE_USLEEP=0;
7875   REPLACE_WRITE=0;
7876   UNISTD_H_HAVE_WINSOCK2_H=0;
7877   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888   for ac_func in $ac_func_list
7889 do :
7890   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7891 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7892 if eval test \"x\$"$as_ac_var"\" = x"yes"
7893 then :
7894   cat >>confdefs.h <<_ACEOF
7895 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
7896 _ACEOF
7897
7898 fi
7899 done
7900
7901
7902
7903
7904
7905   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7906     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7907
7908 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7909
7910   else
7911     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7912   fi
7913
7914
7915
7916
7917
7918
7919
7920      GNULIB_OPENDIR=0;
7921   GNULIB_READDIR=0;
7922   GNULIB_REWINDDIR=0;
7923   GNULIB_CLOSEDIR=0;
7924   GNULIB_DIRFD=0;
7925   GNULIB_FDOPENDIR=0;
7926   GNULIB_SCANDIR=0;
7927   GNULIB_ALPHASORT=0;
7928     HAVE_OPENDIR=1;
7929   HAVE_READDIR=1;
7930   HAVE_REWINDDIR=1;
7931   HAVE_CLOSEDIR=1;
7932   HAVE_DECL_DIRFD=1;
7933   HAVE_DECL_FDOPENDIR=1;
7934   HAVE_FDOPENDIR=1;
7935   HAVE_SCANDIR=1;
7936   HAVE_ALPHASORT=1;
7937   REPLACE_OPENDIR=0;
7938   REPLACE_CLOSEDIR=0;
7939   REPLACE_DIRFD=0;
7940   REPLACE_FDOPENDIR=0;
7941
7942
7943
7944   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7945 printf %s "checking whether the preprocessor supports include_next... " >&6; }
7946 if test ${gl_cv_have_include_next+y}
7947 then :
7948   printf %s "(cached) " >&6
7949 else
7950   rm -rf conftestd1a conftestd1b conftestd2
7951      mkdir conftestd1a conftestd1b conftestd2
7952                                                   cat <<EOF > conftestd1a/conftest.h
7953 #define DEFINED_IN_CONFTESTD1
7954 #include_next <conftest.h>
7955 #ifdef DEFINED_IN_CONFTESTD2
7956 int foo;
7957 #else
7958 #error "include_next doesn't work"
7959 #endif
7960 EOF
7961      cat <<EOF > conftestd1b/conftest.h
7962 #define DEFINED_IN_CONFTESTD1
7963 #include <stdio.h>
7964 #include_next <conftest.h>
7965 #ifdef DEFINED_IN_CONFTESTD2
7966 int foo;
7967 #else
7968 #error "include_next doesn't work"
7969 #endif
7970 EOF
7971      cat <<EOF > conftestd2/conftest.h
7972 #ifndef DEFINED_IN_CONFTESTD1
7973 #error "include_next test doesn't work"
7974 #endif
7975 #define DEFINED_IN_CONFTESTD2
7976 EOF
7977      gl_save_CPPFLAGS="$CPPFLAGS"
7978      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7979      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7980 /* end confdefs.h.  */
7981 #include <conftest.h>
7982 _ACEOF
7983 if ac_fn_c_try_compile "$LINENO"
7984 then :
7985   gl_cv_have_include_next=yes
7986 else
7987   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7988         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7989 /* end confdefs.h.  */
7990 #include <conftest.h>
7991 _ACEOF
7992 if ac_fn_c_try_compile "$LINENO"
7993 then :
7994   gl_cv_have_include_next=buggy
7995 else
7996   gl_cv_have_include_next=no
7997 fi
7998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7999
8000 fi
8001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8002      CPPFLAGS="$gl_save_CPPFLAGS"
8003      rm -rf conftestd1a conftestd1b conftestd2
8004
8005 fi
8006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8007 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8008   PRAGMA_SYSTEM_HEADER=
8009   if test $gl_cv_have_include_next = yes; then
8010     INCLUDE_NEXT=include_next
8011     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8012     if test -n "$GCC"; then
8013       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8014     fi
8015   else
8016     if test $gl_cv_have_include_next = buggy; then
8017       INCLUDE_NEXT=include
8018       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8019     else
8020       INCLUDE_NEXT=include
8021       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8022     fi
8023   fi
8024
8025
8026
8027   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
8028 printf %s "checking whether system header files limit the line length... " >&6; }
8029 if test ${gl_cv_pragma_columns+y}
8030 then :
8031   printf %s "(cached) " >&6
8032 else
8033        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8034 /* end confdefs.h.  */
8035
8036 #ifdef __TANDEM
8037 choke me
8038 #endif
8039
8040 _ACEOF
8041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8042   $EGREP "choke me" >/dev/null 2>&1
8043 then :
8044   gl_cv_pragma_columns=yes
8045 else
8046   gl_cv_pragma_columns=no
8047 fi
8048 rm -rf conftest*
8049
8050
8051 fi
8052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
8053 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
8054   if test $gl_cv_pragma_columns = yes; then
8055     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8056   else
8057     PRAGMA_COLUMNS=
8058   fi
8059
8060
8061
8062
8063
8064
8065 # The Clang compiler raises a warning for an undeclared identifier that matches
8066 # a compiler builtin function.  All extant Clang versions are affected, as of
8067 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
8068 # C and Objective C languages, but Clang does report an error under C++ and
8069 # Objective C++.
8070 #
8071 # Passing -fno-builtin to the compiler would suppress this problem.  That
8072 # strategy would have the advantage of being insensitive to stray warnings, but
8073 # it would make tests less realistic.
8074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
8075 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
8076 if test ${ac_cv_c_decl_report+y}
8077 then :
8078   printf %s "(cached) " >&6
8079 else
8080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8081 /* end confdefs.h.  */
8082
8083 int
8084 main (void)
8085 {
8086 (void) strchr;
8087   ;
8088   return 0;
8089 }
8090 _ACEOF
8091 if ac_fn_c_try_compile "$LINENO"
8092 then :
8093   if test -s conftest.err
8094 then :
8095       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
8096     # valid AC_CHECK_DECL input.  No library function is consistently available
8097     # on freestanding implementations, so test against a dummy declaration.
8098     # Include always-available headers on the off chance that they somehow
8099     # elicit warnings.
8100     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8101 /* end confdefs.h.  */
8102 #include <float.h>
8103 #include <limits.h>
8104 #include <stdarg.h>
8105 #include <stddef.h>
8106 extern void ac_decl (int, char *);
8107 int
8108 main (void)
8109 {
8110 #ifdef __cplusplus
8111   (void) ac_decl ((int) 0, (char *) 0);
8112   (void) ac_decl;
8113 #else
8114   (void) ac_decl;
8115 #endif
8116
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 if ac_fn_c_try_compile "$LINENO"
8122 then :
8123   if test -s conftest.err
8124 then :
8125   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8126 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8127 as_fn_error $? "cannot detect from compiler exit status or warnings
8128 See \`config.log' for more details" "$LINENO" 5; }
8129 else
8130   ac_cv_c_decl_report=warning
8131 fi
8132 else
8133   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8134 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8135 as_fn_error $? "cannot compile a simple declaration test
8136 See \`config.log' for more details" "$LINENO" 5; }
8137 fi
8138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8139 else
8140   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8141 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8142 as_fn_error $? "compiler does not report undeclared identifiers
8143 See \`config.log' for more details" "$LINENO" 5; }
8144 fi
8145 else
8146   ac_cv_c_decl_report=error
8147 fi
8148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8149 fi
8150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
8151 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
8152
8153 case $ac_cv_c_decl_report in
8154   warning) ac_c_decl_warn_flag=yes ;;
8155   *) ac_c_decl_warn_flag= ;;
8156 esac
8157
8158
8159
8160   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8161 printf %s "checking whether // is distinct from /... " >&6; }
8162 if test ${gl_cv_double_slash_root+y}
8163 then :
8164   printf %s "(cached) " >&6
8165 else
8166    if test x"$cross_compiling" = xyes ; then
8167         # When cross-compiling, there is no way to tell whether // is special
8168         # short of a list of hosts.  However, the only known hosts to date
8169         # that have a distinct // are Apollo DomainOS (too old to port to),
8170         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8171         # special semantics and is distinct from /, please report it to
8172         # <bug-gnulib@gnu.org>.
8173         case $host in
8174           *-cygwin | i370-ibm-openedition)
8175             gl_cv_double_slash_root=yes ;;
8176           *)
8177             # Be optimistic and assume that / and // are the same when we
8178             # don't know.
8179             gl_cv_double_slash_root='unknown, assuming no' ;;
8180         esac
8181       else
8182         set x `ls -di / // 2>/dev/null`
8183         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8184           gl_cv_double_slash_root=no
8185         else
8186           gl_cv_double_slash_root=yes
8187         fi
8188       fi
8189 fi
8190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8191 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
8192   if test "$gl_cv_double_slash_root" = yes; then
8193
8194 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8195
8196   fi
8197
8198
8199
8200   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8201 printf %s "checking for complete errno.h... " >&6; }
8202 if test ${gl_cv_header_errno_h_complete+y}
8203 then :
8204   printf %s "(cached) " >&6
8205 else
8206
8207     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8208 /* end confdefs.h.  */
8209
8210 #include <errno.h>
8211 #if !defined ETXTBSY
8212 booboo
8213 #endif
8214 #if !defined ENOMSG
8215 booboo
8216 #endif
8217 #if !defined EIDRM
8218 booboo
8219 #endif
8220 #if !defined ENOLINK
8221 booboo
8222 #endif
8223 #if !defined EPROTO
8224 booboo
8225 #endif
8226 #if !defined EMULTIHOP
8227 booboo
8228 #endif
8229 #if !defined EBADMSG
8230 booboo
8231 #endif
8232 #if !defined EOVERFLOW
8233 booboo
8234 #endif
8235 #if !defined ENOTSUP
8236 booboo
8237 #endif
8238 #if !defined ENETRESET
8239 booboo
8240 #endif
8241 #if !defined ECONNABORTED
8242 booboo
8243 #endif
8244 #if !defined ESTALE
8245 booboo
8246 #endif
8247 #if !defined EDQUOT
8248 booboo
8249 #endif
8250 #if !defined ECANCELED
8251 booboo
8252 #endif
8253 #if !defined EOWNERDEAD
8254 booboo
8255 #endif
8256 #if !defined ENOTRECOVERABLE
8257 booboo
8258 #endif
8259 #if !defined EILSEQ
8260 booboo
8261 #endif
8262
8263 _ACEOF
8264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8265   $EGREP "booboo" >/dev/null 2>&1
8266 then :
8267   gl_cv_header_errno_h_complete=no
8268 else
8269   gl_cv_header_errno_h_complete=yes
8270 fi
8271 rm -rf conftest*
8272
8273
8274 fi
8275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8276 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8277   if test $gl_cv_header_errno_h_complete = yes; then
8278     ERRNO_H=''
8279   else
8280
8281
8282
8283
8284
8285
8286
8287
8288      if test $gl_cv_have_include_next = yes; then
8289        gl_cv_next_errno_h='<'errno.h'>'
8290      else
8291        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8292 printf %s "checking absolute name of <errno.h>... " >&6; }
8293 if test ${gl_cv_next_errno_h+y}
8294 then :
8295   printf %s "(cached) " >&6
8296 else
8297
8298
8299
8300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8301 /* end confdefs.h.  */
8302 #include <errno.h>
8303 _ACEOF
8304                 case "$host_os" in
8305     aix*) gl_absname_cpp="$ac_cpp -C" ;;
8306     *)    gl_absname_cpp="$ac_cpp" ;;
8307   esac
8308
8309   case "$host_os" in
8310     mingw*)
8311                                           gl_dirsep_regex='[/\\]'
8312       ;;
8313     *)
8314       gl_dirsep_regex='\/'
8315       ;;
8316   esac
8317       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8318   gl_header_literal_regex=`echo 'errno.h' \
8319                            | sed -e "$gl_make_literal_regex_sed"`
8320   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8321       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8322       s|^/[^/]|//&|
8323       p
8324       q
8325     }'
8326
8327         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8328   sed -n "$gl_absolute_header_sed"`
8329
8330            gl_header=$gl_cv_absolute_errno_h
8331            gl_cv_next_errno_h='"'$gl_header'"'
8332
8333
8334 fi
8335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8336 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8337      fi
8338      NEXT_ERRNO_H=$gl_cv_next_errno_h
8339
8340      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8341        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8342        gl_next_as_first_directive='<'errno.h'>'
8343      else
8344        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8345        gl_next_as_first_directive=$gl_cv_next_errno_h
8346      fi
8347      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8348
8349
8350
8351
8352     ERRNO_H='errno.h'
8353   fi
8354
8355    if test -n "$ERRNO_H"; then
8356   GL_GENERATE_ERRNO_H_TRUE=
8357   GL_GENERATE_ERRNO_H_FALSE='#'
8358 else
8359   GL_GENERATE_ERRNO_H_TRUE='#'
8360   GL_GENERATE_ERRNO_H_FALSE=
8361 fi
8362
8363
8364   if test -n "$ERRNO_H"; then
8365     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8366 printf %s "checking for EMULTIHOP value... " >&6; }
8367 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
8368 then :
8369   printf %s "(cached) " >&6
8370 else
8371
8372       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8373 /* end confdefs.h.  */
8374
8375 #include <errno.h>
8376 #ifdef EMULTIHOP
8377 yes
8378 #endif
8379
8380 _ACEOF
8381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8382   $EGREP "yes" >/dev/null 2>&1
8383 then :
8384   gl_cv_header_errno_h_EMULTIHOP=yes
8385 else
8386   gl_cv_header_errno_h_EMULTIHOP=no
8387 fi
8388 rm -rf conftest*
8389
8390       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8391         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8392 /* end confdefs.h.  */
8393
8394 #define _XOPEN_SOURCE_EXTENDED 1
8395 #include <errno.h>
8396 #ifdef EMULTIHOP
8397 yes
8398 #endif
8399
8400 _ACEOF
8401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8402   $EGREP "yes" >/dev/null 2>&1
8403 then :
8404   gl_cv_header_errno_h_EMULTIHOP=hidden
8405 fi
8406 rm -rf conftest*
8407
8408         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8409                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
8410 #define _XOPEN_SOURCE_EXTENDED 1
8411 #include <errno.h>
8412 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8413 #include <stdio.h>
8414 #include <stdlib.h>
8415 "
8416 then :
8417
8418 fi
8419
8420         fi
8421       fi
8422
8423 fi
8424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8425 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8426     case $gl_cv_header_errno_h_EMULTIHOP in
8427       yes | no)
8428         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8429         ;;
8430       *)
8431         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8432         ;;
8433     esac
8434
8435
8436   fi
8437
8438
8439   if test -n "$ERRNO_H"; then
8440     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8441 printf %s "checking for ENOLINK value... " >&6; }
8442 if test ${gl_cv_header_errno_h_ENOLINK+y}
8443 then :
8444   printf %s "(cached) " >&6
8445 else
8446
8447       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8448 /* end confdefs.h.  */
8449
8450 #include <errno.h>
8451 #ifdef ENOLINK
8452 yes
8453 #endif
8454
8455 _ACEOF
8456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8457   $EGREP "yes" >/dev/null 2>&1
8458 then :
8459   gl_cv_header_errno_h_ENOLINK=yes
8460 else
8461   gl_cv_header_errno_h_ENOLINK=no
8462 fi
8463 rm -rf conftest*
8464
8465       if test $gl_cv_header_errno_h_ENOLINK = no; then
8466         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8467 /* end confdefs.h.  */
8468
8469 #define _XOPEN_SOURCE_EXTENDED 1
8470 #include <errno.h>
8471 #ifdef ENOLINK
8472 yes
8473 #endif
8474
8475 _ACEOF
8476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8477   $EGREP "yes" >/dev/null 2>&1
8478 then :
8479   gl_cv_header_errno_h_ENOLINK=hidden
8480 fi
8481 rm -rf conftest*
8482
8483         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8484                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
8485 #define _XOPEN_SOURCE_EXTENDED 1
8486 #include <errno.h>
8487 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8488 #include <stdio.h>
8489 #include <stdlib.h>
8490 "
8491 then :
8492
8493 fi
8494
8495         fi
8496       fi
8497
8498 fi
8499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8500 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8501     case $gl_cv_header_errno_h_ENOLINK in
8502       yes | no)
8503         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8504         ;;
8505       *)
8506         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8507         ;;
8508     esac
8509
8510
8511   fi
8512
8513
8514   if test -n "$ERRNO_H"; then
8515     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8516 printf %s "checking for EOVERFLOW value... " >&6; }
8517 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
8518 then :
8519   printf %s "(cached) " >&6
8520 else
8521
8522       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8523 /* end confdefs.h.  */
8524
8525 #include <errno.h>
8526 #ifdef EOVERFLOW
8527 yes
8528 #endif
8529
8530 _ACEOF
8531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8532   $EGREP "yes" >/dev/null 2>&1
8533 then :
8534   gl_cv_header_errno_h_EOVERFLOW=yes
8535 else
8536   gl_cv_header_errno_h_EOVERFLOW=no
8537 fi
8538 rm -rf conftest*
8539
8540       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8541         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542 /* end confdefs.h.  */
8543
8544 #define _XOPEN_SOURCE_EXTENDED 1
8545 #include <errno.h>
8546 #ifdef EOVERFLOW
8547 yes
8548 #endif
8549
8550 _ACEOF
8551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8552   $EGREP "yes" >/dev/null 2>&1
8553 then :
8554   gl_cv_header_errno_h_EOVERFLOW=hidden
8555 fi
8556 rm -rf conftest*
8557
8558         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8559                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
8560 #define _XOPEN_SOURCE_EXTENDED 1
8561 #include <errno.h>
8562 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8563 #include <stdio.h>
8564 #include <stdlib.h>
8565 "
8566 then :
8567
8568 fi
8569
8570         fi
8571       fi
8572
8573 fi
8574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8575 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8576     case $gl_cv_header_errno_h_EOVERFLOW in
8577       yes | no)
8578         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8579         ;;
8580       *)
8581         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8582         ;;
8583     esac
8584
8585
8586   fi
8587
8588
8589 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8590 if test "x$ac_cv_have_decl_strerror_r" = xyes
8591 then :
8592   ac_have_decl=1
8593 else
8594   ac_have_decl=0
8595 fi
8596
8597 cat >>confdefs.h <<_ACEOF
8598 #define HAVE_DECL_STRERROR_R $ac_have_decl
8599 _ACEOF
8600
8601
8602
8603
8604
8605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8606 printf %s "checking whether strerror_r returns char *... " >&6; }
8607 if test ${ac_cv_func_strerror_r_char_p+y}
8608 then :
8609   printf %s "(cached) " >&6
8610 else
8611
8612     ac_cv_func_strerror_r_char_p=no
8613     if test $ac_cv_have_decl_strerror_r = yes; then
8614       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8615 /* end confdefs.h.  */
8616 $ac_includes_default
8617 int
8618 main (void)
8619 {
8620
8621           char buf[100];
8622           char x = *strerror_r (0, buf, sizeof buf);
8623           char *p = strerror_r (0, buf, sizeof buf);
8624           return !p || x;
8625
8626   ;
8627   return 0;
8628 }
8629 _ACEOF
8630 if ac_fn_c_try_compile "$LINENO"
8631 then :
8632   ac_cv_func_strerror_r_char_p=yes
8633 fi
8634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8635     else
8636       # strerror_r is not declared.  Choose between
8637       # systems that have relatively inaccessible declarations for the
8638       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8639       # former has a strerror_r that returns char*, while the latter
8640       # has a strerror_r that returns `int'.
8641       # This test should segfault on the DEC system.
8642       if test "$cross_compiling" = yes
8643 then :
8644   :
8645 else
8646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8647 /* end confdefs.h.  */
8648 $ac_includes_default
8649         extern char *strerror_r ();
8650 int
8651 main (void)
8652 {
8653 char buf[100];
8654           char x = *strerror_r (0, buf, sizeof buf);
8655           return ! isalpha (x);
8656   ;
8657   return 0;
8658 }
8659 _ACEOF
8660 if ac_fn_c_try_run "$LINENO"
8661 then :
8662   ac_cv_func_strerror_r_char_p=yes
8663 fi
8664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8665   conftest.$ac_objext conftest.beam conftest.$ac_ext
8666 fi
8667
8668     fi
8669
8670 fi
8671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8672 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8673 if test $ac_cv_func_strerror_r_char_p = yes; then
8674
8675 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8676
8677 fi
8678
8679
8680
8681
8682 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8683 if test "x$ac_cv_have_decl_fchdir" = xyes
8684 then :
8685   ac_have_decl=1
8686 else
8687   ac_have_decl=0
8688 fi
8689
8690 cat >>confdefs.h <<_ACEOF
8691 #define HAVE_DECL_FCHDIR $ac_have_decl
8692 _ACEOF
8693
8694
8695   GNULIB_DPRINTF=0;
8696   GNULIB_FCLOSE=0;
8697   GNULIB_FDOPEN=0;
8698   GNULIB_FFLUSH=0;
8699   GNULIB_FGETC=0;
8700   GNULIB_FGETS=0;
8701   GNULIB_FOPEN=0;
8702   GNULIB_FPRINTF=0;
8703   GNULIB_FPRINTF_POSIX=0;
8704   GNULIB_FPURGE=0;
8705   GNULIB_FPUTC=0;
8706   GNULIB_FPUTS=0;
8707   GNULIB_FREAD=0;
8708   GNULIB_FREOPEN=0;
8709   GNULIB_FSCANF=0;
8710   GNULIB_FSEEK=0;
8711   GNULIB_FSEEKO=0;
8712   GNULIB_FTELL=0;
8713   GNULIB_FTELLO=0;
8714   GNULIB_FWRITE=0;
8715   GNULIB_GETC=0;
8716   GNULIB_GETCHAR=0;
8717   GNULIB_GETDELIM=0;
8718   GNULIB_GETLINE=0;
8719   GNULIB_OBSTACK_PRINTF=0;
8720   GNULIB_OBSTACK_PRINTF_POSIX=0;
8721   GNULIB_PCLOSE=0;
8722   GNULIB_PERROR=0;
8723   GNULIB_POPEN=0;
8724   GNULIB_PRINTF=0;
8725   GNULIB_PRINTF_POSIX=0;
8726   GNULIB_PUTC=0;
8727   GNULIB_PUTCHAR=0;
8728   GNULIB_PUTS=0;
8729   GNULIB_REMOVE=0;
8730   GNULIB_RENAME=0;
8731   GNULIB_RENAMEAT=0;
8732   GNULIB_SCANF=0;
8733   GNULIB_SNPRINTF=0;
8734   GNULIB_SPRINTF_POSIX=0;
8735   GNULIB_STDIO_H_NONBLOCKING=0;
8736   GNULIB_STDIO_H_SIGPIPE=0;
8737   GNULIB_TMPFILE=0;
8738   GNULIB_VASPRINTF=0;
8739   GNULIB_VFSCANF=0;
8740   GNULIB_VSCANF=0;
8741   GNULIB_VDPRINTF=0;
8742   GNULIB_VFPRINTF=0;
8743   GNULIB_VFPRINTF_POSIX=0;
8744   GNULIB_VPRINTF=0;
8745   GNULIB_VPRINTF_POSIX=0;
8746   GNULIB_VSNPRINTF=0;
8747   GNULIB_VSPRINTF_POSIX=0;
8748     HAVE_DECL_FPURGE=1;
8749   HAVE_DECL_FSEEKO=1;
8750   HAVE_DECL_FTELLO=1;
8751   HAVE_DECL_GETDELIM=1;
8752   HAVE_DECL_GETLINE=1;
8753   HAVE_DECL_OBSTACK_PRINTF=1;
8754   HAVE_DECL_SNPRINTF=1;
8755   HAVE_DECL_VSNPRINTF=1;
8756   HAVE_DPRINTF=1;
8757   HAVE_FSEEKO=1;
8758   HAVE_FTELLO=1;
8759   HAVE_PCLOSE=1;
8760   HAVE_POPEN=1;
8761   HAVE_RENAMEAT=1;
8762   HAVE_VASPRINTF=1;
8763   HAVE_VDPRINTF=1;
8764   REPLACE_DPRINTF=0;
8765   REPLACE_FCLOSE=0;
8766   REPLACE_FDOPEN=0;
8767   REPLACE_FFLUSH=0;
8768   REPLACE_FOPEN=0;
8769   REPLACE_FPRINTF=0;
8770   REPLACE_FPURGE=0;
8771   REPLACE_FREOPEN=0;
8772   REPLACE_FSEEK=0;
8773   REPLACE_FSEEKO=0;
8774   REPLACE_FTELL=0;
8775   REPLACE_FTELLO=0;
8776   REPLACE_GETDELIM=0;
8777   REPLACE_GETLINE=0;
8778   REPLACE_OBSTACK_PRINTF=0;
8779   REPLACE_PERROR=0;
8780   REPLACE_POPEN=0;
8781   REPLACE_PRINTF=0;
8782   REPLACE_REMOVE=0;
8783   REPLACE_RENAME=0;
8784   REPLACE_RENAMEAT=0;
8785   REPLACE_SNPRINTF=0;
8786   REPLACE_SPRINTF=0;
8787   REPLACE_STDIO_READ_FUNCS=0;
8788   REPLACE_STDIO_WRITE_FUNCS=0;
8789   REPLACE_TMPFILE=0;
8790   REPLACE_VASPRINTF=0;
8791   REPLACE_VDPRINTF=0;
8792   REPLACE_VFPRINTF=0;
8793   REPLACE_VPRINTF=0;
8794   REPLACE_VSNPRINTF=0;
8795   REPLACE_VSPRINTF=0;
8796
8797
8798   GNULIB_FCNTL=0;
8799   GNULIB_NONBLOCKING=0;
8800   GNULIB_OPEN=0;
8801   GNULIB_OPENAT=0;
8802     HAVE_FCNTL=1;
8803   HAVE_OPENAT=1;
8804   REPLACE_FCNTL=0;
8805   REPLACE_OPEN=0;
8806   REPLACE_OPENAT=0;
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8818 printf %s "checking for working fcntl.h... " >&6; }
8819 if test ${gl_cv_header_working_fcntl_h+y}
8820 then :
8821   printf %s "(cached) " >&6
8822 else
8823   if test "$cross_compiling" = yes
8824 then :
8825   gl_cv_header_working_fcntl_h=cross-compiling
8826 else
8827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8828 /* end confdefs.h.  */
8829 #include <sys/types.h>
8830            #include <sys/stat.h>
8831            #if HAVE_UNISTD_H
8832            # include <unistd.h>
8833            #else /* on Windows with MSVC */
8834            # include <io.h>
8835            # include <stdlib.h>
8836            # defined sleep(n) _sleep ((n) * 1000)
8837            #endif
8838            #include <fcntl.h>
8839            #ifndef O_NOATIME
8840             #define O_NOATIME 0
8841            #endif
8842            #ifndef O_NOFOLLOW
8843             #define O_NOFOLLOW 0
8844            #endif
8845            static int const constants[] =
8846             {
8847               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8848               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8849             };
8850
8851 int
8852 main (void)
8853 {
8854
8855             int result = !constants;
8856             #if HAVE_SYMLINK
8857             {
8858               static char const sym[] = "conftest.sym";
8859               if (symlink ("/dev/null", sym) != 0)
8860                 result |= 2;
8861               else
8862                 {
8863                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8864                   if (fd >= 0)
8865                     {
8866                       close (fd);
8867                       result |= 4;
8868                     }
8869                 }
8870               if (unlink (sym) != 0 || symlink (".", sym) != 0)
8871                 result |= 2;
8872               else
8873                 {
8874                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8875                   if (fd >= 0)
8876                     {
8877                       close (fd);
8878                       result |= 4;
8879                     }
8880                 }
8881               unlink (sym);
8882             }
8883             #endif
8884             {
8885               static char const file[] = "confdefs.h";
8886               int fd = open (file, O_RDONLY | O_NOATIME);
8887               if (fd < 0)
8888                 result |= 8;
8889               else
8890                 {
8891                   struct stat st0;
8892                   if (fstat (fd, &st0) != 0)
8893                     result |= 16;
8894                   else
8895                     {
8896                       char c;
8897                       sleep (1);
8898                       if (read (fd, &c, 1) != 1)
8899                         result |= 24;
8900                       else
8901                         {
8902                           if (close (fd) != 0)
8903                             result |= 32;
8904                           else
8905                             {
8906                               struct stat st1;
8907                               if (stat (file, &st1) != 0)
8908                                 result |= 40;
8909                               else
8910                                 if (st0.st_atime != st1.st_atime)
8911                                   result |= 64;
8912                             }
8913                         }
8914                     }
8915                 }
8916             }
8917             return result;
8918   ;
8919   return 0;
8920 }
8921 _ACEOF
8922 if ac_fn_c_try_run "$LINENO"
8923 then :
8924   gl_cv_header_working_fcntl_h=yes
8925 else
8926   case $? in #(
8927         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8928         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8929         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8930          *) gl_cv_header_working_fcntl_h='no';;
8931         esac
8932 fi
8933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8934   conftest.$ac_objext conftest.beam conftest.$ac_ext
8935 fi
8936
8937 fi
8938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8939 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
8940
8941   case $gl_cv_header_working_fcntl_h in #(
8942   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8943   *) ac_val=1;;
8944   esac
8945
8946 cat >>confdefs.h <<_ACEOF
8947 #define HAVE_WORKING_O_NOATIME $ac_val
8948 _ACEOF
8949
8950
8951   case $gl_cv_header_working_fcntl_h in #(
8952   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8953   *) ac_val=1;;
8954   esac
8955
8956 cat >>confdefs.h <<_ACEOF
8957 #define HAVE_WORKING_O_NOFOLLOW $ac_val
8958 _ACEOF
8959
8960
8961 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8962 if test "x$ac_cv_type_pid_t" = xyes
8963 then :
8964
8965 else
8966
8967 cat >>confdefs.h <<_ACEOF
8968 #define pid_t int
8969 _ACEOF
8970
8971 fi
8972
8973 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8974 if test "x$ac_cv_type_mode_t" = xyes
8975 then :
8976
8977 else
8978
8979 cat >>confdefs.h <<_ACEOF
8980 #define mode_t int
8981 _ACEOF
8982
8983 fi
8984
8985
8986
8987   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8988 printf %s "checking for promoted mode_t type... " >&6; }
8989 if test ${gl_cv_promoted_mode_t+y}
8990 then :
8991   printf %s "(cached) " >&6
8992 else
8993
8994                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8995 /* end confdefs.h.  */
8996 #include <sys/types.h>
8997 int
8998 main (void)
8999 {
9000 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
9001   ;
9002   return 0;
9003 }
9004 _ACEOF
9005 if ac_fn_c_try_compile "$LINENO"
9006 then :
9007   gl_cv_promoted_mode_t='int'
9008 else
9009   gl_cv_promoted_mode_t='mode_t'
9010 fi
9011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9012
9013 fi
9014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
9015 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
9016
9017 cat >>confdefs.h <<_ACEOF
9018 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
9019 _ACEOF
9020
9021
9022 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
9023 if test "x$ac_cv_have_decl_fdatasync" = xyes
9024 then :
9025   ac_have_decl=1
9026 else
9027   ac_have_decl=0
9028 fi
9029
9030 cat >>confdefs.h <<_ACEOF
9031 #define HAVE_DECL_FDATASYNC $ac_have_decl
9032 _ACEOF
9033
9034
9035
9036
9037   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
9038 printf %s "checking for stdint.h... " >&6; }
9039 if test ${gl_cv_header_stdint_h+y}
9040 then :
9041   printf %s "(cached) " >&6
9042 else
9043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044 /* end confdefs.h.  */
9045 #include <sys/types.h>
9046             #include <stdint.h>
9047 int
9048 main (void)
9049 {
9050 uintmax_t i = (uintmax_t) -1; return !i;
9051   ;
9052   return 0;
9053 }
9054 _ACEOF
9055 if ac_fn_c_try_compile "$LINENO"
9056 then :
9057   gl_cv_header_stdint_h=yes
9058 else
9059   gl_cv_header_stdint_h=no
9060 fi
9061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9062 fi
9063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
9064 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
9065   if test $gl_cv_header_stdint_h = yes; then
9066
9067 cat >>confdefs.h <<_ACEOF
9068 #define HAVE_STDINT_H_WITH_UINTMAX 1
9069 _ACEOF
9070
9071   fi
9072
9073
9074   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
9075 printf %s "checking for inttypes.h... " >&6; }
9076 if test ${gl_cv_header_inttypes_h+y}
9077 then :
9078   printf %s "(cached) " >&6
9079 else
9080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9081 /* end confdefs.h.  */
9082
9083 #include <sys/types.h>
9084 #include <inttypes.h>
9085
9086 int
9087 main (void)
9088 {
9089 uintmax_t i = (uintmax_t) -1; return !i;
9090   ;
9091   return 0;
9092 }
9093 _ACEOF
9094 if ac_fn_c_try_compile "$LINENO"
9095 then :
9096   gl_cv_header_inttypes_h=yes
9097 else
9098   gl_cv_header_inttypes_h=no
9099 fi
9100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9101 fi
9102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
9103 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
9104   if test $gl_cv_header_inttypes_h = yes; then
9105
9106 cat >>confdefs.h <<_ACEOF
9107 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
9108 _ACEOF
9109
9110   fi
9111
9112
9113
9114
9115
9116      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
9117 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
9118 if test ${gl_cv_func_printf_sizes_c99+y}
9119 then :
9120   printf %s "(cached) " >&6
9121 else
9122
9123       if test "$cross_compiling" = yes
9124 then :
9125
9126          case "$host_os" in
9127                                  # Guess yes on glibc systems.
9128            *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
9129                                  # Guess yes on FreeBSD >= 5.
9130            freebsd[1-4].*)       gl_cv_func_printf_sizes_c99="guessing no";;
9131            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9132                                  # Guess yes on Mac OS X >= 10.3.
9133            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
9134            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
9135                                  # Guess yes on OpenBSD >= 3.9.
9136            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
9137                                  gl_cv_func_printf_sizes_c99="guessing no";;
9138            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
9139                                  # Guess yes on Solaris >= 2.10.
9140            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9141            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
9142                                  # Guess yes on NetBSD >= 3.
9143            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9144                                  gl_cv_func_printf_sizes_c99="guessing no";;
9145            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
9146                                  # If we don't know, assume the worst.
9147            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
9148          esac
9149
9150 else
9151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9152 /* end confdefs.h.  */
9153
9154 #include <stddef.h>
9155 #include <stdio.h>
9156 #include <string.h>
9157 #include <sys/types.h>
9158 #if HAVE_STDINT_H_WITH_UINTMAX
9159 # include <stdint.h>
9160 #endif
9161 #if HAVE_INTTYPES_H_WITH_UINTMAX
9162 # include <inttypes.h>
9163 #endif
9164 static char buf[100];
9165 int main ()
9166 {
9167   int result = 0;
9168 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
9169   buf[0] = '\0';
9170   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
9171       || strcmp (buf, "12345671 33") != 0)
9172     result |= 1;
9173 #endif
9174   buf[0] = '\0';
9175   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
9176       || strcmp (buf, "12345672 33") != 0)
9177     result |= 2;
9178   buf[0] = '\0';
9179   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
9180       || strcmp (buf, "12345673 33") != 0)
9181     result |= 4;
9182   buf[0] = '\0';
9183   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
9184       || strcmp (buf, "1.5 33") != 0)
9185     result |= 8;
9186   return result;
9187 }
9188 _ACEOF
9189 if ac_fn_c_try_run "$LINENO"
9190 then :
9191   gl_cv_func_printf_sizes_c99=yes
9192 else
9193   gl_cv_func_printf_sizes_c99=no
9194 fi
9195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9196   conftest.$ac_objext conftest.beam conftest.$ac_ext
9197 fi
9198
9199
9200 fi
9201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
9202 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
9203
9204
9205
9206      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
9207 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
9208 if test ${gl_cv_func_printf_long_double+y}
9209 then :
9210   printf %s "(cached) " >&6
9211 else
9212
9213       if test "$cross_compiling" = yes
9214 then :
9215
9216          case "$host_os" in
9217            beos*)        gl_cv_func_printf_long_double="guessing no";;
9218            mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
9219            *)            gl_cv_func_printf_long_double="guessing yes";;
9220          esac
9221
9222 else
9223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224 /* end confdefs.h.  */
9225
9226 #include <stdio.h>
9227 #include <string.h>
9228 static char buf[10000];
9229 int main ()
9230 {
9231   int result = 0;
9232   buf[0] = '\0';
9233   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
9234       || strcmp (buf, "1.750000 33") != 0)
9235     result |= 1;
9236   buf[0] = '\0';
9237   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
9238       || strcmp (buf, "1.750000e+00 33") != 0)
9239     result |= 2;
9240   buf[0] = '\0';
9241   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
9242       || strcmp (buf, "1.75 33") != 0)
9243     result |= 4;
9244   return result;
9245 }
9246 _ACEOF
9247 if ac_fn_c_try_run "$LINENO"
9248 then :
9249   gl_cv_func_printf_long_double=yes
9250 else
9251   gl_cv_func_printf_long_double=no
9252 fi
9253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9254   conftest.$ac_objext conftest.beam conftest.$ac_ext
9255 fi
9256
9257
9258 fi
9259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
9260 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
9261
9262
9263
9264      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
9265 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
9266 if test ${gl_cv_func_printf_infinite+y}
9267 then :
9268   printf %s "(cached) " >&6
9269 else
9270
9271       if test "$cross_compiling" = yes
9272 then :
9273
9274          case "$host_os" in
9275                                  # Guess yes on glibc systems.
9276            *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
9277                                  # Guess yes on FreeBSD >= 6.
9278            freebsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
9279            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9280                                  # Guess yes on Mac OS X >= 10.3.
9281            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
9282            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
9283                                  # Guess yes on HP-UX >= 11.
9284            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9285            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
9286                                  # Guess yes on NetBSD >= 3.
9287            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9288                                  gl_cv_func_printf_infinite="guessing no";;
9289            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
9290                                  # Guess yes on BeOS.
9291            beos*)                gl_cv_func_printf_infinite="guessing yes";;
9292                                  # If we don't know, assume the worst.
9293            *)                    gl_cv_func_printf_infinite="guessing no";;
9294          esac
9295
9296 else
9297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9298 /* end confdefs.h.  */
9299
9300 #include <stdio.h>
9301 #include <string.h>
9302 static int
9303 strisnan (const char *string, size_t start_index, size_t end_index)
9304 {
9305   if (start_index < end_index)
9306     {
9307       if (string[start_index] == '-')
9308         start_index++;
9309       if (start_index + 3 <= end_index
9310           && memcmp (string + start_index, "nan", 3) == 0)
9311         {
9312           start_index += 3;
9313           if (start_index == end_index
9314               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9315             return 1;
9316         }
9317     }
9318   return 0;
9319 }
9320 static int
9321 have_minus_zero ()
9322 {
9323   static double plus_zero = 0.0;
9324   double minus_zero = - plus_zero;
9325   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9326 }
9327 static char buf[10000];
9328 static double zero = 0.0;
9329 int main ()
9330 {
9331   int result = 0;
9332   if (sprintf (buf, "%f", 1.0 / zero) < 0
9333       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9334     result |= 1;
9335   if (sprintf (buf, "%f", -1.0 / zero) < 0
9336       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9337     result |= 1;
9338   if (sprintf (buf, "%f", zero / zero) < 0
9339       || !strisnan (buf, 0, strlen (buf)))
9340     result |= 2;
9341   if (sprintf (buf, "%e", 1.0 / zero) < 0
9342       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9343     result |= 4;
9344   if (sprintf (buf, "%e", -1.0 / zero) < 0
9345       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9346     result |= 4;
9347   if (sprintf (buf, "%e", zero / zero) < 0
9348       || !strisnan (buf, 0, strlen (buf)))
9349     result |= 8;
9350   if (sprintf (buf, "%g", 1.0 / zero) < 0
9351       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9352     result |= 16;
9353   if (sprintf (buf, "%g", -1.0 / zero) < 0
9354       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9355     result |= 16;
9356   if (sprintf (buf, "%g", zero / zero) < 0
9357       || !strisnan (buf, 0, strlen (buf)))
9358     result |= 32;
9359   /* This test fails on HP-UX 10.20.  */
9360   if (have_minus_zero ())
9361     if (sprintf (buf, "%g", - zero) < 0
9362         || strcmp (buf, "-0") != 0)
9363     result |= 64;
9364   return result;
9365 }
9366 _ACEOF
9367 if ac_fn_c_try_run "$LINENO"
9368 then :
9369   gl_cv_func_printf_infinite=yes
9370 else
9371   gl_cv_func_printf_infinite=no
9372 fi
9373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9374   conftest.$ac_objext conftest.beam conftest.$ac_ext
9375 fi
9376
9377
9378 fi
9379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9380 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9381
9382
9383    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9384 printf %s "checking whether byte ordering is bigendian... " >&6; }
9385 if test ${ac_cv_c_bigendian+y}
9386 then :
9387   printf %s "(cached) " >&6
9388 else
9389   ac_cv_c_bigendian=unknown
9390     # See if we're dealing with a universal compiler.
9391     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392 /* end confdefs.h.  */
9393 #ifndef __APPLE_CC__
9394                not a universal capable compiler
9395              #endif
9396              typedef int dummy;
9397
9398 _ACEOF
9399 if ac_fn_c_try_compile "$LINENO"
9400 then :
9401
9402         # Check for potential -arch flags.  It is not universal unless
9403         # there are at least two -arch flags with different values.
9404         ac_arch=
9405         ac_prev=
9406         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9407          if test -n "$ac_prev"; then
9408            case $ac_word in
9409              i?86 | x86_64 | ppc | ppc64)
9410                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9411                  ac_arch=$ac_word
9412                else
9413                  ac_cv_c_bigendian=universal
9414                  break
9415                fi
9416                ;;
9417            esac
9418            ac_prev=
9419          elif test "x$ac_word" = "x-arch"; then
9420            ac_prev=arch
9421          fi
9422        done
9423 fi
9424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9425     if test $ac_cv_c_bigendian = unknown; then
9426       # See if sys/param.h defines the BYTE_ORDER macro.
9427       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9428 /* end confdefs.h.  */
9429 #include <sys/types.h>
9430              #include <sys/param.h>
9431
9432 int
9433 main (void)
9434 {
9435 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9436                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9437                      && LITTLE_ENDIAN)
9438               bogus endian macros
9439              #endif
9440
9441   ;
9442   return 0;
9443 }
9444 _ACEOF
9445 if ac_fn_c_try_compile "$LINENO"
9446 then :
9447   # It does; now see whether it defined to BIG_ENDIAN or not.
9448          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9449 /* end confdefs.h.  */
9450 #include <sys/types.h>
9451                 #include <sys/param.h>
9452
9453 int
9454 main (void)
9455 {
9456 #if BYTE_ORDER != BIG_ENDIAN
9457                  not big endian
9458                 #endif
9459
9460   ;
9461   return 0;
9462 }
9463 _ACEOF
9464 if ac_fn_c_try_compile "$LINENO"
9465 then :
9466   ac_cv_c_bigendian=yes
9467 else
9468   ac_cv_c_bigendian=no
9469 fi
9470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9471 fi
9472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9473     fi
9474     if test $ac_cv_c_bigendian = unknown; then
9475       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9476       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9477 /* end confdefs.h.  */
9478 #include <limits.h>
9479
9480 int
9481 main (void)
9482 {
9483 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9484               bogus endian macros
9485              #endif
9486
9487   ;
9488   return 0;
9489 }
9490 _ACEOF
9491 if ac_fn_c_try_compile "$LINENO"
9492 then :
9493   # It does; now see whether it defined to _BIG_ENDIAN or not.
9494          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9495 /* end confdefs.h.  */
9496 #include <limits.h>
9497
9498 int
9499 main (void)
9500 {
9501 #ifndef _BIG_ENDIAN
9502                  not big endian
9503                 #endif
9504
9505   ;
9506   return 0;
9507 }
9508 _ACEOF
9509 if ac_fn_c_try_compile "$LINENO"
9510 then :
9511   ac_cv_c_bigendian=yes
9512 else
9513   ac_cv_c_bigendian=no
9514 fi
9515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9516 fi
9517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9518     fi
9519     if test $ac_cv_c_bigendian = unknown; then
9520       # Compile a test program.
9521       if test "$cross_compiling" = yes
9522 then :
9523   # Try to guess by grepping values from an object file.
9524          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h.  */
9526 short int ascii_mm[] =
9527                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9528                 short int ascii_ii[] =
9529                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9530                 int use_ascii (int i) {
9531                   return ascii_mm[i] + ascii_ii[i];
9532                 }
9533                 short int ebcdic_ii[] =
9534                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9535                 short int ebcdic_mm[] =
9536                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9537                 int use_ebcdic (int i) {
9538                   return ebcdic_mm[i] + ebcdic_ii[i];
9539                 }
9540                 extern int foo;
9541
9542 int
9543 main (void)
9544 {
9545 return use_ascii (foo) == use_ebcdic (foo);
9546   ;
9547   return 0;
9548 }
9549 _ACEOF
9550 if ac_fn_c_try_compile "$LINENO"
9551 then :
9552   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9553               ac_cv_c_bigendian=yes
9554             fi
9555             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9556               if test "$ac_cv_c_bigendian" = unknown; then
9557                 ac_cv_c_bigendian=no
9558               else
9559                 # finding both strings is unlikely to happen, but who knows?
9560                 ac_cv_c_bigendian=unknown
9561               fi
9562             fi
9563 fi
9564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9565 else
9566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9567 /* end confdefs.h.  */
9568 $ac_includes_default
9569 int
9570 main (void)
9571 {
9572
9573              /* Are we little or big endian?  From Harbison&Steele.  */
9574              union
9575              {
9576                long int l;
9577                char c[sizeof (long int)];
9578              } u;
9579              u.l = 1;
9580              return u.c[sizeof (long int) - 1] == 1;
9581
9582   ;
9583   return 0;
9584 }
9585 _ACEOF
9586 if ac_fn_c_try_run "$LINENO"
9587 then :
9588   ac_cv_c_bigendian=no
9589 else
9590   ac_cv_c_bigendian=yes
9591 fi
9592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9593   conftest.$ac_objext conftest.beam conftest.$ac_ext
9594 fi
9595
9596     fi
9597 fi
9598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9599 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9600  case $ac_cv_c_bigendian in #(
9601    yes)
9602      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9603 ;; #(
9604    no)
9605       ;; #(
9606    universal)
9607
9608 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9609
9610      ;; #(
9611    *)
9612      as_fn_error $? "unknown endianness
9613  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9614  esac
9615
9616
9617
9618   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9619 printf %s "checking whether long double and double are the same... " >&6; }
9620 if test ${gl_cv_long_double_equals_double+y}
9621 then :
9622   printf %s "(cached) " >&6
9623 else
9624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625 /* end confdefs.h.  */
9626 #include <float.h>
9627 int
9628 main (void)
9629 {
9630 typedef int check[sizeof (long double) == sizeof (double)
9631                               && LDBL_MANT_DIG == DBL_MANT_DIG
9632                               && LDBL_MAX_EXP == DBL_MAX_EXP
9633                               && LDBL_MIN_EXP == DBL_MIN_EXP
9634                               ? 1 : -1];
9635
9636   ;
9637   return 0;
9638 }
9639 _ACEOF
9640 if ac_fn_c_try_compile "$LINENO"
9641 then :
9642   gl_cv_long_double_equals_double=yes
9643 else
9644   gl_cv_long_double_equals_double=no
9645 fi
9646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9647
9648 fi
9649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9650 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9651   if test $gl_cv_long_double_equals_double = yes; then
9652
9653 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9654
9655     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9656   else
9657     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9658   fi
9659
9660
9661
9662
9663
9664
9665
9666          if test -n "$gl_printf_safe"; then
9667
9668 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9669
9670   fi
9671   case "$gl_cv_func_printf_long_double" in
9672     *yes)
9673       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9674 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9675 if test ${gl_cv_func_printf_infinite_long_double+y}
9676 then :
9677   printf %s "(cached) " >&6
9678 else
9679
9680           if test "$cross_compiling" = yes
9681 then :
9682
9683              case "$host_cpu" in
9684                                      # Guess no on ia64, x86_64, i386.
9685                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9686                *)
9687                  case "$host_os" in
9688                                          # Guess yes on glibc systems.
9689                    *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
9690                                          # Guess yes on FreeBSD >= 6.
9691                    freebsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
9692                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9693                                          # Guess yes on HP-UX >= 11.
9694                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9695                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
9696                                          # If we don't know, assume the worst.
9697                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
9698                  esac
9699                  ;;
9700              esac
9701
9702 else
9703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704 /* end confdefs.h.  */
9705
9706
9707 #include <stdlib.h>
9708 #if defined __MACH__ && defined __APPLE__
9709 /* Avoid a crash on Mac OS X.  */
9710 #include <mach/mach.h>
9711 #include <mach/mach_error.h>
9712 #include <mach/thread_status.h>
9713 #include <mach/exception.h>
9714 #include <mach/task.h>
9715 #include <pthread.h>
9716 /* The exception port on which our thread listens.  */
9717 static mach_port_t our_exception_port;
9718 /* The main function of the thread listening for exceptions of type
9719    EXC_BAD_ACCESS.  */
9720 static void *
9721 mach_exception_thread (void *arg)
9722 {
9723   /* Buffer for a message to be received.  */
9724   struct {
9725     mach_msg_header_t head;
9726     mach_msg_body_t msgh_body;
9727     char data[1024];
9728   } msg;
9729   mach_msg_return_t retval;
9730   /* Wait for a message on the exception port.  */
9731   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9732                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9733   if (retval != MACH_MSG_SUCCESS)
9734     abort ();
9735   exit (1);
9736 }
9737 static void
9738 nocrash_init (void)
9739 {
9740   mach_port_t self = mach_task_self ();
9741   /* Allocate a port on which the thread shall listen for exceptions.  */
9742   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9743       == KERN_SUCCESS) {
9744     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9745     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9746                                 MACH_MSG_TYPE_MAKE_SEND)
9747         == KERN_SUCCESS) {
9748       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9749          for us.  */
9750       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9751       /* Create the thread listening on the exception port.  */
9752       pthread_attr_t attr;
9753       pthread_t thread;
9754       if (pthread_attr_init (&attr) == 0
9755           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9756           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9757         pthread_attr_destroy (&attr);
9758         /* Replace the exception port info for these exceptions with our own.
9759            Note that we replace the exception port for the entire task, not only
9760            for a particular thread.  This has the effect that when our exception
9761            port gets the message, the thread specific exception port has already
9762            been asked, and we don't need to bother about it.
9763            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9764         task_set_exception_ports (self, mask, our_exception_port,
9765                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9766       }
9767     }
9768   }
9769 }
9770 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9771 /* Avoid a crash on native Windows.  */
9772 #define WIN32_LEAN_AND_MEAN
9773 #include <windows.h>
9774 #include <winerror.h>
9775 static LONG WINAPI
9776 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9777 {
9778   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9779     {
9780     case EXCEPTION_ACCESS_VIOLATION:
9781     case EXCEPTION_IN_PAGE_ERROR:
9782     case EXCEPTION_STACK_OVERFLOW:
9783     case EXCEPTION_GUARD_PAGE:
9784     case EXCEPTION_PRIV_INSTRUCTION:
9785     case EXCEPTION_ILLEGAL_INSTRUCTION:
9786     case EXCEPTION_DATATYPE_MISALIGNMENT:
9787     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9788     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9789       exit (1);
9790     }
9791   return EXCEPTION_CONTINUE_SEARCH;
9792 }
9793 static void
9794 nocrash_init (void)
9795 {
9796   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9797 }
9798 #else
9799 /* Avoid a crash on POSIX systems.  */
9800 #include <signal.h>
9801 /* A POSIX signal handler.  */
9802 static void
9803 exception_handler (int sig)
9804 {
9805   exit (1);
9806 }
9807 static void
9808 nocrash_init (void)
9809 {
9810 #ifdef SIGSEGV
9811   signal (SIGSEGV, exception_handler);
9812 #endif
9813 #ifdef SIGBUS
9814   signal (SIGBUS, exception_handler);
9815 #endif
9816 }
9817 #endif
9818
9819 #include <float.h>
9820 #include <stdio.h>
9821 #include <string.h>
9822 static int
9823 strisnan (const char *string, size_t start_index, size_t end_index)
9824 {
9825   if (start_index < end_index)
9826     {
9827       if (string[start_index] == '-')
9828         start_index++;
9829       if (start_index + 3 <= end_index
9830           && memcmp (string + start_index, "nan", 3) == 0)
9831         {
9832           start_index += 3;
9833           if (start_index == end_index
9834               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9835             return 1;
9836         }
9837     }
9838   return 0;
9839 }
9840 static char buf[10000];
9841 static long double zeroL = 0.0L;
9842 int main ()
9843 {
9844   int result = 0;
9845   nocrash_init();
9846   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9847       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9848     result |= 1;
9849   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9850       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9851     result |= 1;
9852   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9853       || !strisnan (buf, 0, strlen (buf)))
9854     result |= 1;
9855   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9856       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9857     result |= 1;
9858   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9859       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9860     result |= 1;
9861   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9862       || !strisnan (buf, 0, strlen (buf)))
9863     result |= 1;
9864   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9865       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9866     result |= 1;
9867   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9868       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9869     result |= 1;
9870   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9871       || !strisnan (buf, 0, strlen (buf)))
9872     result |= 1;
9873 #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
9874 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9875    of 'unsigned int' words.  */
9876 # ifdef WORDS_BIGENDIAN
9877 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9878      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9879        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
9880        (unsigned int) (mantlo) << 16                                        \
9881      }
9882 # else
9883 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9884      { mantlo, manthi, exponent }
9885 # endif
9886   { /* Quiet NaN.  */
9887     static union { unsigned int word[4]; long double value; } x =
9888       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9889     if (sprintf (buf, "%Lf", x.value) < 0
9890         || !strisnan (buf, 0, strlen (buf)))
9891       result |= 2;
9892     if (sprintf (buf, "%Le", x.value) < 0
9893         || !strisnan (buf, 0, strlen (buf)))
9894       result |= 2;
9895     if (sprintf (buf, "%Lg", x.value) < 0
9896         || !strisnan (buf, 0, strlen (buf)))
9897       result |= 2;
9898   }
9899   {
9900     /* Signalling NaN.  */
9901     static union { unsigned int word[4]; long double value; } x =
9902       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9903     if (sprintf (buf, "%Lf", x.value) < 0
9904         || !strisnan (buf, 0, strlen (buf)))
9905       result |= 2;
9906     if (sprintf (buf, "%Le", x.value) < 0
9907         || !strisnan (buf, 0, strlen (buf)))
9908       result |= 2;
9909     if (sprintf (buf, "%Lg", x.value) < 0
9910         || !strisnan (buf, 0, strlen (buf)))
9911       result |= 2;
9912   }
9913   { /* Pseudo-NaN.  */
9914     static union { unsigned int word[4]; long double value; } x =
9915       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9916     if (sprintf (buf, "%Lf", x.value) <= 0)
9917       result |= 4;
9918     if (sprintf (buf, "%Le", x.value) <= 0)
9919       result |= 4;
9920     if (sprintf (buf, "%Lg", x.value) <= 0)
9921       result |= 4;
9922   }
9923   { /* Pseudo-Infinity.  */
9924     static union { unsigned int word[4]; long double value; } x =
9925       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9926     if (sprintf (buf, "%Lf", x.value) <= 0)
9927       result |= 8;
9928     if (sprintf (buf, "%Le", x.value) <= 0)
9929       result |= 8;
9930     if (sprintf (buf, "%Lg", x.value) <= 0)
9931       result |= 8;
9932   }
9933   { /* Pseudo-Zero.  */
9934     static union { unsigned int word[4]; long double value; } x =
9935       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
9936     if (sprintf (buf, "%Lf", x.value) <= 0)
9937       result |= 16;
9938     if (sprintf (buf, "%Le", x.value) <= 0)
9939       result |= 16;
9940     if (sprintf (buf, "%Lg", x.value) <= 0)
9941       result |= 16;
9942   }
9943   { /* Unnormalized number.  */
9944     static union { unsigned int word[4]; long double value; } x =
9945       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
9946     if (sprintf (buf, "%Lf", x.value) <= 0)
9947       result |= 32;
9948     if (sprintf (buf, "%Le", x.value) <= 0)
9949       result |= 32;
9950     if (sprintf (buf, "%Lg", x.value) <= 0)
9951       result |= 32;
9952   }
9953   { /* Pseudo-Denormal.  */
9954     static union { unsigned int word[4]; long double value; } x =
9955       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
9956     if (sprintf (buf, "%Lf", x.value) <= 0)
9957       result |= 64;
9958     if (sprintf (buf, "%Le", x.value) <= 0)
9959       result |= 64;
9960     if (sprintf (buf, "%Lg", x.value) <= 0)
9961       result |= 64;
9962   }
9963 #endif
9964   return result;
9965 }
9966 _ACEOF
9967 if ac_fn_c_try_run "$LINENO"
9968 then :
9969   gl_cv_func_printf_infinite_long_double=yes
9970 else
9971   gl_cv_func_printf_infinite_long_double=no
9972 fi
9973 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9974   conftest.$ac_objext conftest.beam conftest.$ac_ext
9975 fi
9976
9977
9978 fi
9979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
9980 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
9981       ;;
9982     *)
9983       gl_cv_func_printf_infinite_long_double="irrelevant"
9984       ;;
9985   esac
9986
9987
9988
9989      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
9990 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
9991 if test ${gl_cv_func_printf_directive_a+y}
9992 then :
9993   printf %s "(cached) " >&6
9994 else
9995
9996       if test "$cross_compiling" = yes
9997 then :
9998
9999          case "$host_os" in
10000                                  # Guess yes on glibc >= 2.5 systems.
10001            *-gnu*)
10002              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10003 /* end confdefs.h.  */
10004
10005                #include <features.h>
10006                #ifdef __GNU_LIBRARY__
10007                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
10008                  BZ2908
10009                 #endif
10010                #endif
10011
10012 _ACEOF
10013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10014   $EGREP "BZ2908" >/dev/null 2>&1
10015 then :
10016   gl_cv_func_printf_directive_a="guessing yes"
10017 else
10018   gl_cv_func_printf_directive_a="guessing no"
10019 fi
10020 rm -rf conftest*
10021
10022              ;;
10023                                  # If we don't know, assume the worst.
10024            *)                    gl_cv_func_printf_directive_a="guessing no";;
10025          esac
10026
10027 else
10028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10029 /* end confdefs.h.  */
10030
10031 #include <stdio.h>
10032 #include <string.h>
10033 static char buf[100];
10034 static double zero = 0.0;
10035 int main ()
10036 {
10037   int result = 0;
10038   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
10039       || (strcmp (buf, "0x1.922p+1 33") != 0
10040           && strcmp (buf, "0x3.244p+0 33") != 0
10041           && strcmp (buf, "0x6.488p-1 33") != 0
10042           && strcmp (buf, "0xc.91p-2 33") != 0))
10043     result |= 1;
10044   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
10045       || (strcmp (buf, "-0X1.922P+1 33") != 0
10046           && strcmp (buf, "-0X3.244P+0 33") != 0
10047           && strcmp (buf, "-0X6.488P-1 33") != 0
10048           && strcmp (buf, "-0XC.91P-2 33") != 0))
10049     result |= 2;
10050   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
10051   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
10052       || (strcmp (buf, "0x1.83p+0 33") != 0
10053           && strcmp (buf, "0x3.05p-1 33") != 0
10054           && strcmp (buf, "0x6.0ap-2 33") != 0
10055           && strcmp (buf, "0xc.14p-3 33") != 0))
10056     result |= 4;
10057   /* This catches a FreeBSD 6.1 bug.  See
10058      <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
10059   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
10060       || buf[0] == '0')
10061     result |= 8;
10062   /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
10063   if (sprintf (buf, "%.1a", 1.999) < 0
10064       || (strcmp (buf, "0x1.0p+1") != 0
10065           && strcmp (buf, "0x2.0p+0") != 0
10066           && strcmp (buf, "0x4.0p-1") != 0
10067           && strcmp (buf, "0x8.0p-2") != 0))
10068     result |= 16;
10069   /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
10070      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
10071   if (sprintf (buf, "%.1La", 1.999L) < 0
10072       || (strcmp (buf, "0x1.0p+1") != 0
10073           && strcmp (buf, "0x2.0p+0") != 0
10074           && strcmp (buf, "0x4.0p-1") != 0
10075           && strcmp (buf, "0x8.0p-2") != 0))
10076     result |= 32;
10077   return result;
10078 }
10079 _ACEOF
10080 if ac_fn_c_try_run "$LINENO"
10081 then :
10082   gl_cv_func_printf_directive_a=yes
10083 else
10084   gl_cv_func_printf_directive_a=no
10085 fi
10086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10087   conftest.$ac_objext conftest.beam conftest.$ac_ext
10088 fi
10089
10090
10091 fi
10092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
10093 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
10094
10095
10096
10097      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
10098 printf %s "checking whether printf supports the 'F' directive... " >&6; }
10099 if test ${gl_cv_func_printf_directive_f+y}
10100 then :
10101   printf %s "(cached) " >&6
10102 else
10103
10104       if test "$cross_compiling" = yes
10105 then :
10106
10107          case "$host_os" in
10108                                  # Guess yes on glibc systems.
10109            *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
10110                                  # Guess yes on FreeBSD >= 6.
10111            freebsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
10112            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
10113                                  # Guess yes on Mac OS X >= 10.3.
10114            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
10115            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
10116                                  # Guess yes on Solaris >= 2.10.
10117            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
10118            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
10119                                  # If we don't know, assume the worst.
10120            *)                    gl_cv_func_printf_directive_f="guessing no";;
10121          esac
10122
10123 else
10124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h.  */
10126
10127 #include <stdio.h>
10128 #include <string.h>
10129 static char buf[100];
10130 static double zero = 0.0;
10131 int main ()
10132 {
10133   int result = 0;
10134   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
10135       || strcmp (buf, "1234567.000000 33") != 0)
10136     result |= 1;
10137   if (sprintf (buf, "%F", 1.0 / zero) < 0
10138       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
10139     result |= 2;
10140   /* This catches a Cygwin 1.5.x bug.  */
10141   if (sprintf (buf, "%.F", 1234.0) < 0
10142       || strcmp (buf, "1234") != 0)
10143     result |= 4;
10144   return result;
10145 }
10146 _ACEOF
10147 if ac_fn_c_try_run "$LINENO"
10148 then :
10149   gl_cv_func_printf_directive_f=yes
10150 else
10151   gl_cv_func_printf_directive_f=no
10152 fi
10153 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10154   conftest.$ac_objext conftest.beam conftest.$ac_ext
10155 fi
10156
10157
10158 fi
10159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
10160 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
10161
10162
10163
10164      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
10165 printf %s "checking whether printf supports the 'n' directive... " >&6; }
10166 if test ${gl_cv_func_printf_directive_n+y}
10167 then :
10168   printf %s "(cached) " >&6
10169 else
10170
10171       if test "$cross_compiling" = yes
10172 then :
10173
10174          case "$host_os" in
10175            mingw*) gl_cv_func_printf_directive_n="guessing no";;
10176            *)      gl_cv_func_printf_directive_n="guessing yes";;
10177          esac
10178
10179 else
10180   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181 /* end confdefs.h.  */
10182
10183 #include <stdio.h>
10184 #include <stdlib.h>
10185 #include <string.h>
10186 #ifdef _MSC_VER
10187 /* See page about "Parameter Validation" on msdn.microsoft.com.  */
10188 static void cdecl
10189 invalid_parameter_handler (const wchar_t *expression,
10190                            const wchar_t *function,
10191                            const wchar_t *file, unsigned int line,
10192                            uintptr_t dummy)
10193 {
10194   exit (1);
10195 }
10196 #endif
10197 static char fmtstring[10];
10198 static char buf[100];
10199 int main ()
10200 {
10201   int count = -1;
10202 #ifdef _MSC_VER
10203   _set_invalid_parameter_handler (invalid_parameter_handler);
10204 #endif
10205   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
10206      support %n in format strings in read-only memory but not in writable
10207      memory.  */
10208   strcpy (fmtstring, "%d %n");
10209   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
10210       || strcmp (buf, "123 ") != 0
10211       || count != 4)
10212     return 1;
10213   return 0;
10214 }
10215 _ACEOF
10216 if ac_fn_c_try_run "$LINENO"
10217 then :
10218   gl_cv_func_printf_directive_n=yes
10219 else
10220   gl_cv_func_printf_directive_n=no
10221 fi
10222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10223   conftest.$ac_objext conftest.beam conftest.$ac_ext
10224 fi
10225
10226
10227 fi
10228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
10229 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
10230
10231
10232
10233      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
10234 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
10235 if test ${gl_cv_func_printf_directive_ls+y}
10236 then :
10237   printf %s "(cached) " >&6
10238 else
10239
10240       if test "$cross_compiling" = yes
10241 then :
10242
10243          case "$host_os" in
10244            openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
10245            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
10246            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
10247            cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
10248            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
10249            *)               gl_cv_func_printf_directive_ls="guessing yes";;
10250          esac
10251
10252 else
10253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254 /* end confdefs.h.  */
10255
10256 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10257    <wchar.h>.
10258    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10259    included before <wchar.h>.  */
10260 #include <stddef.h>
10261 #include <stdio.h>
10262 #include <time.h>
10263 #include <wchar.h>
10264 #include <string.h>
10265 int main ()
10266 {
10267   int result = 0;
10268   char buf[100];
10269   /* Test whether %ls works at all.
10270      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
10271      Cygwin 1.5.  */
10272   {
10273     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
10274     buf[0] = '\0';
10275     if (sprintf (buf, "%ls", wstring) < 0
10276         || strcmp (buf, "abc") != 0)
10277       result |= 1;
10278   }
10279   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
10280      assertion failure inside libc), but not on OpenBSD 4.0.  */
10281   {
10282     static const wchar_t wstring[] = { 'a', 0 };
10283     buf[0] = '\0';
10284     if (sprintf (buf, "%ls", wstring) < 0
10285         || strcmp (buf, "a") != 0)
10286       result |= 2;
10287   }
10288   /* Test whether precisions in %ls are supported as specified in ISO C 99
10289      section 7.19.6.1:
10290        "If a precision is specified, no more than that many bytes are written
10291         (including shift sequences, if any), and the array shall contain a
10292         null wide character if, to equal the multibyte character sequence
10293         length given by the precision, the function would need to access a
10294         wide character one past the end of the array."
10295      This test fails on Solaris 10.  */
10296   {
10297     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10298     buf[0] = '\0';
10299     if (sprintf (buf, "%.2ls", wstring) < 0
10300         || strcmp (buf, "ab") != 0)
10301       result |= 8;
10302   }
10303   return result;
10304 }
10305 _ACEOF
10306 if ac_fn_c_try_run "$LINENO"
10307 then :
10308   gl_cv_func_printf_directive_ls=yes
10309 else
10310   gl_cv_func_printf_directive_ls=no
10311 fi
10312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10313   conftest.$ac_objext conftest.beam conftest.$ac_ext
10314 fi
10315
10316
10317 fi
10318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10319 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10320
10321
10322
10323      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10324 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10325 if test ${gl_cv_func_printf_positions+y}
10326 then :
10327   printf %s "(cached) " >&6
10328 else
10329
10330       if test "$cross_compiling" = yes
10331 then :
10332
10333          case "$host_os" in
10334            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10335                          gl_cv_func_printf_positions="guessing no";;
10336            beos*)        gl_cv_func_printf_positions="guessing no";;
10337            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10338            *)            gl_cv_func_printf_positions="guessing yes";;
10339          esac
10340
10341 else
10342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10343 /* end confdefs.h.  */
10344
10345 #include <stdio.h>
10346 #include <string.h>
10347 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10348    dollar expansion (possibly an autoconf bug).  */
10349 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10350 static char buf[100];
10351 int main ()
10352 {
10353   sprintf (buf, format, 33, 55);
10354   return (strcmp (buf, "55 33") != 0);
10355 }
10356 _ACEOF
10357 if ac_fn_c_try_run "$LINENO"
10358 then :
10359   gl_cv_func_printf_positions=yes
10360 else
10361   gl_cv_func_printf_positions=no
10362 fi
10363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10364   conftest.$ac_objext conftest.beam conftest.$ac_ext
10365 fi
10366
10367
10368 fi
10369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10370 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10371
10372
10373
10374      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10375 printf %s "checking whether printf supports the grouping flag... " >&6; }
10376 if test ${gl_cv_func_printf_flag_grouping+y}
10377 then :
10378   printf %s "(cached) " >&6
10379 else
10380
10381       if test "$cross_compiling" = yes
10382 then :
10383
10384          case "$host_os" in
10385            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
10386            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
10387            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10388            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
10389          esac
10390
10391 else
10392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10393 /* end confdefs.h.  */
10394
10395 #include <stdio.h>
10396 #include <string.h>
10397 static char buf[100];
10398 int main ()
10399 {
10400   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10401       || buf[strlen (buf) - 1] != '9')
10402     return 1;
10403   return 0;
10404 }
10405 _ACEOF
10406 if ac_fn_c_try_run "$LINENO"
10407 then :
10408   gl_cv_func_printf_flag_grouping=yes
10409 else
10410   gl_cv_func_printf_flag_grouping=no
10411 fi
10412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10413   conftest.$ac_objext conftest.beam conftest.$ac_ext
10414 fi
10415
10416
10417 fi
10418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10419 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10420
10421
10422
10423      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10424 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10425 if test ${gl_cv_func_printf_flag_leftadjust+y}
10426 then :
10427   printf %s "(cached) " >&6
10428 else
10429
10430       if test "$cross_compiling" = yes
10431 then :
10432
10433          case "$host_os" in
10434                     # Guess yes on HP-UX 11.
10435            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10436                     # Guess no on HP-UX 10 and older.
10437            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
10438                     # Guess yes otherwise.
10439            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
10440          esac
10441
10442 else
10443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10444 /* end confdefs.h.  */
10445
10446 #include <stdio.h>
10447 #include <string.h>
10448 static char buf[100];
10449 int main ()
10450 {
10451   /* Check that a '-' flag is not annihilated by a negative width.  */
10452   if (sprintf (buf, "a%-*sc", -3, "b") < 0
10453       || strcmp (buf, "ab  c") != 0)
10454     return 1;
10455   return 0;
10456 }
10457 _ACEOF
10458 if ac_fn_c_try_run "$LINENO"
10459 then :
10460   gl_cv_func_printf_flag_leftadjust=yes
10461 else
10462   gl_cv_func_printf_flag_leftadjust=no
10463 fi
10464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10465   conftest.$ac_objext conftest.beam conftest.$ac_ext
10466 fi
10467
10468
10469 fi
10470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10471 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10472
10473
10474
10475      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10476 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10477 if test ${gl_cv_func_printf_flag_zero+y}
10478 then :
10479   printf %s "(cached) " >&6
10480 else
10481
10482       if test "$cross_compiling" = yes
10483 then :
10484
10485          case "$host_os" in
10486                    # Guess yes on glibc systems.
10487            *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10488                    # Guess yes on BeOS.
10489            beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
10490                    # If we don't know, assume the worst.
10491            *)      gl_cv_func_printf_flag_zero="guessing no";;
10492          esac
10493
10494 else
10495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h.  */
10497
10498 #include <stdio.h>
10499 #include <string.h>
10500 static char buf[100];
10501 static double zero = 0.0;
10502 int main ()
10503 {
10504   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10505       || (strcmp (buf, "       inf") != 0
10506           && strcmp (buf, "  infinity") != 0))
10507     return 1;
10508   return 0;
10509 }
10510 _ACEOF
10511 if ac_fn_c_try_run "$LINENO"
10512 then :
10513   gl_cv_func_printf_flag_zero=yes
10514 else
10515   gl_cv_func_printf_flag_zero=no
10516 fi
10517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10518   conftest.$ac_objext conftest.beam conftest.$ac_ext
10519 fi
10520
10521
10522 fi
10523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10524 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10525
10526
10527
10528      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10529 printf %s "checking whether printf supports large precisions... " >&6; }
10530 if test ${gl_cv_func_printf_precision+y}
10531 then :
10532   printf %s "(cached) " >&6
10533 else
10534
10535       if test "$cross_compiling" = yes
10536 then :
10537
10538          case "$host_os" in
10539            # Guess no only on Solaris, native Windows, and BeOS systems.
10540            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
10541            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10542            beos*)        gl_cv_func_printf_precision="guessing no" ;;
10543            *)            gl_cv_func_printf_precision="guessing yes" ;;
10544          esac
10545
10546 else
10547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10548 /* end confdefs.h.  */
10549
10550 #include <stdio.h>
10551 #include <string.h>
10552 static char buf[5000];
10553 int main ()
10554 {
10555   int result = 0;
10556 #ifdef __BEOS__
10557   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
10558   return 1;
10559 #endif
10560   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10561     result |= 1;
10562   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10563     result |= 2;
10564   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10565       || buf[0] != '1')
10566     result |= 4;
10567   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10568       || buf[0] != '1')
10569     result |= 4;
10570   return result;
10571 }
10572 _ACEOF
10573 if ac_fn_c_try_run "$LINENO"
10574 then :
10575   gl_cv_func_printf_precision=yes
10576 else
10577   gl_cv_func_printf_precision=no
10578 fi
10579 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10580   conftest.$ac_objext conftest.beam conftest.$ac_ext
10581 fi
10582
10583
10584 fi
10585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10586 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10587
10588
10589     gl_cv_c_multiarch=no
10590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10591 /* end confdefs.h.  */
10592 #ifndef __APPLE_CC__
10593          not a universal capable compiler
10594         #endif
10595         typedef int dummy;
10596
10597 _ACEOF
10598 if ac_fn_c_try_compile "$LINENO"
10599 then :
10600
10601                arch=
10602      prev=
10603      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10604        if test -n "$prev"; then
10605          case $word in
10606            i?86 | x86_64 | ppc | ppc64)
10607              if test -z "$arch" || test "$arch" = "$word"; then
10608                arch="$word"
10609              else
10610                gl_cv_c_multiarch=yes
10611              fi
10612              ;;
10613          esac
10614          prev=
10615        else
10616          if test "x$word" = "x-arch"; then
10617            prev=arch
10618          fi
10619        fi
10620      done
10621
10622 fi
10623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10624   if test $gl_cv_c_multiarch = yes; then
10625     APPLE_UNIVERSAL_BUILD=1
10626   else
10627     APPLE_UNIVERSAL_BUILD=0
10628   fi
10629
10630
10631
10632
10633
10634      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10635 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10636 if test ${gl_cv_func_printf_enomem+y}
10637 then :
10638   printf %s "(cached) " >&6
10639 else
10640
10641       gl_cv_func_printf_enomem="guessing no"
10642       if test "$cross_compiling" = no; then
10643         if test $APPLE_UNIVERSAL_BUILD = 0; then
10644           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10645 /* end confdefs.h.  */
10646
10647
10648 #include <stdlib.h>
10649 #if defined __MACH__ && defined __APPLE__
10650 /* Avoid a crash on Mac OS X.  */
10651 #include <mach/mach.h>
10652 #include <mach/mach_error.h>
10653 #include <mach/thread_status.h>
10654 #include <mach/exception.h>
10655 #include <mach/task.h>
10656 #include <pthread.h>
10657 /* The exception port on which our thread listens.  */
10658 static mach_port_t our_exception_port;
10659 /* The main function of the thread listening for exceptions of type
10660    EXC_BAD_ACCESS.  */
10661 static void *
10662 mach_exception_thread (void *arg)
10663 {
10664   /* Buffer for a message to be received.  */
10665   struct {
10666     mach_msg_header_t head;
10667     mach_msg_body_t msgh_body;
10668     char data1024;
10669   } msg;
10670   mach_msg_return_t retval;
10671   /* Wait for a message on the exception port.  */
10672   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10673                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10674   if (retval != MACH_MSG_SUCCESS)
10675     abort ();
10676   exit (1);
10677 }
10678 static void
10679 nocrash_init (void)
10680 {
10681   mach_port_t self = mach_task_self ();
10682   /* Allocate a port on which the thread shall listen for exceptions.  */
10683   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10684       == KERN_SUCCESS) {
10685     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10686     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10687                                 MACH_MSG_TYPE_MAKE_SEND)
10688         == KERN_SUCCESS) {
10689       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10690          for us.  */
10691       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10692       /* Create the thread listening on the exception port.  */
10693       pthread_attr_t attr;
10694       pthread_t thread;
10695       if (pthread_attr_init (&attr) == 0
10696           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10697           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10698         pthread_attr_destroy (&attr);
10699         /* Replace the exception port info for these exceptions with our own.
10700            Note that we replace the exception port for the entire task, not only
10701            for a particular thread.  This has the effect that when our exception
10702            port gets the message, the thread specific exception port has already
10703            been asked, and we don't need to bother about it.
10704            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10705         task_set_exception_ports (self, mask, our_exception_port,
10706                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10707       }
10708     }
10709   }
10710 }
10711 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10712 /* Avoid a crash on native Windows.  */
10713 #define WIN32_LEAN_AND_MEAN
10714 #include <windows.h>
10715 #include <winerror.h>
10716 static LONG WINAPI
10717 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10718 {
10719   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10720     {
10721     case EXCEPTION_ACCESS_VIOLATION:
10722     case EXCEPTION_IN_PAGE_ERROR:
10723     case EXCEPTION_STACK_OVERFLOW:
10724     case EXCEPTION_GUARD_PAGE:
10725     case EXCEPTION_PRIV_INSTRUCTION:
10726     case EXCEPTION_ILLEGAL_INSTRUCTION:
10727     case EXCEPTION_DATATYPE_MISALIGNMENT:
10728     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10729     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10730       exit (1);
10731     }
10732   return EXCEPTION_CONTINUE_SEARCH;
10733 }
10734 static void
10735 nocrash_init (void)
10736 {
10737   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10738 }
10739 #else
10740 /* Avoid a crash on POSIX systems.  */
10741 #include <signal.h>
10742 /* A POSIX signal handler.  */
10743 static void
10744 exception_handler (int sig)
10745 {
10746   exit (1);
10747 }
10748 static void
10749 nocrash_init (void)
10750 {
10751 #ifdef SIGSEGV
10752   signal (SIGSEGV, exception_handler);
10753 #endif
10754 #ifdef SIGBUS
10755   signal (SIGBUS, exception_handler);
10756 #endif
10757 }
10758 #endif
10759
10760 #include <stdio.h>
10761 #include <sys/types.h>
10762 #include <sys/time.h>
10763 #include <sys/resource.h>
10764 #include <errno.h>
10765 int main()
10766 {
10767   struct rlimit limit;
10768   int ret;
10769   nocrash_init ();
10770   /* Some printf implementations allocate temporary space with malloc.  */
10771   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
10772 #ifdef RLIMIT_DATA
10773   if (getrlimit (RLIMIT_DATA, &limit) < 0)
10774     return 77;
10775   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10776     limit.rlim_max = 5000000;
10777   limit.rlim_cur = limit.rlim_max;
10778   if (setrlimit (RLIMIT_DATA, &limit) < 0)
10779     return 77;
10780 #endif
10781   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
10782 #ifdef RLIMIT_AS
10783   if (getrlimit (RLIMIT_AS, &limit) < 0)
10784     return 77;
10785   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10786     limit.rlim_max = 5000000;
10787   limit.rlim_cur = limit.rlim_max;
10788   if (setrlimit (RLIMIT_AS, &limit) < 0)
10789     return 77;
10790 #endif
10791   /* Some printf implementations allocate temporary space on the stack.  */
10792 #ifdef RLIMIT_STACK
10793   if (getrlimit (RLIMIT_STACK, &limit) < 0)
10794     return 77;
10795   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10796     limit.rlim_max = 5000000;
10797   limit.rlim_cur = limit.rlim_max;
10798   if (setrlimit (RLIMIT_STACK, &limit) < 0)
10799     return 77;
10800 #endif
10801   ret = printf ("%.5000000f", 1.0);
10802   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10803 }
10804
10805 _ACEOF
10806           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10807   (eval $ac_link) 2>&5
10808   ac_status=$?
10809   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10810   test $ac_status = 0; } && test -s conftest$ac_exeext; then
10811             (./conftest 2>&5
10812              result=$?
10813              printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10814              if test $result != 0 && test $result != 77; then result=1; fi
10815              exit $result
10816             ) >/dev/null 2>/dev/null
10817             case $? in
10818               0) gl_cv_func_printf_enomem="yes" ;;
10819               77) gl_cv_func_printf_enomem="guessing no" ;;
10820               *) gl_cv_func_printf_enomem="no" ;;
10821             esac
10822           else
10823             gl_cv_func_printf_enomem="guessing no"
10824           fi
10825           rm -fr conftest*
10826         else
10827                                         gl_cv_func_printf_enomem="guessing no"
10828         fi
10829       fi
10830       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10831         case "$host_os" in
10832                     # Guess yes on glibc systems.
10833           *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
10834                     # Guess yes on Solaris.
10835           solaris*) gl_cv_func_printf_enomem="guessing yes";;
10836                     # Guess yes on AIX.
10837           aix*)     gl_cv_func_printf_enomem="guessing yes";;
10838                     # Guess yes on HP-UX/hppa.
10839           hpux*)    case "$host_cpu" in
10840                       hppa*) gl_cv_func_printf_enomem="guessing yes";;
10841                       *)     gl_cv_func_printf_enomem="guessing no";;
10842                     esac
10843                     ;;
10844                     # Guess yes on IRIX.
10845           irix*)    gl_cv_func_printf_enomem="guessing yes";;
10846                     # Guess yes on OSF/1.
10847           osf*)     gl_cv_func_printf_enomem="guessing yes";;
10848                     # Guess yes on BeOS.
10849           beos*)    gl_cv_func_printf_enomem="guessing yes";;
10850                     # Guess yes on Haiku.
10851           haiku*)   gl_cv_func_printf_enomem="guessing yes";;
10852                     # If we don't know, assume the worst.
10853           *)        gl_cv_func_printf_enomem="guessing no";;
10854         esac
10855       fi
10856
10857 fi
10858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10859 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
10860
10861
10862
10863   case "$gl_cv_func_printf_long_double" in
10864     *yes)
10865       ;;
10866     *)
10867
10868 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10869
10870       ;;
10871   esac
10872
10873
10874
10875
10876   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10877 printf %s "checking for unsigned long long int... " >&6; }
10878 if test ${ac_cv_type_unsigned_long_long_int+y}
10879 then :
10880   printf %s "(cached) " >&6
10881 else
10882   ac_cv_type_unsigned_long_long_int=yes
10883      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10884        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885 /* end confdefs.h.  */
10886
10887   /* For now, do not test the preprocessor; as of 2007 there are too many
10888          implementations with broken preprocessors.  Perhaps this can
10889          be revisited in 2012.  In the meantime, code should not expect
10890          #if to work with literals wider than 32 bits.  */
10891       /* Test literals.  */
10892       long long int ll = 9223372036854775807ll;
10893       long long int nll = -9223372036854775807LL;
10894       unsigned long long int ull = 18446744073709551615ULL;
10895       /* Test constant expressions.   */
10896       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10897                      ? 1 : -1)];
10898       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10899                      ? 1 : -1)];
10900       int i = 63;
10901 int
10902 main (void)
10903 {
10904 /* Test availability of runtime routines for shift and division.  */
10905       long long int llmax = 9223372036854775807ll;
10906       unsigned long long int ullmax = 18446744073709551615ull;
10907       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10908               | (llmax / ll) | (llmax % ll)
10909               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10910               | (ullmax / ull) | (ullmax % ull));
10911   ;
10912   return 0;
10913 }
10914
10915 _ACEOF
10916 if ac_fn_c_try_link "$LINENO"
10917 then :
10918
10919 else
10920   ac_cv_type_unsigned_long_long_int=no
10921 fi
10922 rm -f core conftest.err conftest.$ac_objext \
10923     conftest$ac_exeext conftest.$ac_ext
10924      fi
10925 fi
10926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10927 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
10928   if test $ac_cv_type_unsigned_long_long_int = yes; then
10929
10930 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
10931
10932   fi
10933
10934
10935
10936   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10937 printf %s "checking for long long int... " >&6; }
10938 if test ${ac_cv_type_long_long_int+y}
10939 then :
10940   printf %s "(cached) " >&6
10941 else
10942   ac_cv_type_long_long_int=yes
10943       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10944         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10945         if test $ac_cv_type_long_long_int = yes; then
10946                                         if test "$cross_compiling" = yes
10947 then :
10948   :
10949 else
10950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951 /* end confdefs.h.  */
10952 #include <limits.h>
10953                  #ifndef LLONG_MAX
10954                  # define HALF \
10955                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10956                  # define LLONG_MAX (HALF - 1 + HALF)
10957                  #endif
10958 int
10959 main (void)
10960 {
10961 long long int n = 1;
10962                  int i;
10963                  for (i = 0; ; i++)
10964                    {
10965                      long long int m = n << i;
10966                      if (m >> i != n)
10967                        return 1;
10968                      if (LLONG_MAX / 2 < m)
10969                        break;
10970                    }
10971                  return 0;
10972   ;
10973   return 0;
10974 }
10975 _ACEOF
10976 if ac_fn_c_try_run "$LINENO"
10977 then :
10978
10979 else
10980   ac_cv_type_long_long_int=no
10981 fi
10982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10983   conftest.$ac_objext conftest.beam conftest.$ac_ext
10984 fi
10985
10986         fi
10987       fi
10988 fi
10989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10990 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
10991   if test $ac_cv_type_long_long_int = yes; then
10992
10993 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10994
10995   fi
10996
10997
10998   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10999 printf %s "checking for wchar_t... " >&6; }
11000 if test ${gt_cv_c_wchar_t+y}
11001 then :
11002   printf %s "(cached) " >&6
11003 else
11004   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11005 /* end confdefs.h.  */
11006 #include <stddef.h>
11007             wchar_t foo = (wchar_t)'\0';
11008 int
11009 main (void)
11010 {
11011
11012   ;
11013   return 0;
11014 }
11015 _ACEOF
11016 if ac_fn_c_try_compile "$LINENO"
11017 then :
11018   gt_cv_c_wchar_t=yes
11019 else
11020   gt_cv_c_wchar_t=no
11021 fi
11022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11023 fi
11024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11025 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
11026   if test $gt_cv_c_wchar_t = yes; then
11027
11028 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
11029
11030   fi
11031
11032
11033   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11034 printf %s "checking for wint_t... " >&6; }
11035 if test ${gt_cv_c_wint_t+y}
11036 then :
11037   printf %s "(cached) " >&6
11038 else
11039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11040 /* end confdefs.h.  */
11041
11042 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11043    <wchar.h>.
11044    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11045    before <wchar.h>.  */
11046 #include <stddef.h>
11047 #include <stdio.h>
11048 #include <time.h>
11049 #include <wchar.h>
11050             wint_t foo = (wchar_t)'\0';
11051 int
11052 main (void)
11053 {
11054
11055   ;
11056   return 0;
11057 }
11058 _ACEOF
11059 if ac_fn_c_try_compile "$LINENO"
11060 then :
11061   gt_cv_c_wint_t=yes
11062 else
11063   gt_cv_c_wint_t=no
11064 fi
11065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11066 fi
11067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11068 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
11069   if test $gt_cv_c_wint_t = yes; then
11070
11071 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
11072
11073   fi
11074
11075
11076
11077
11078
11079   if test $ac_cv_header_features_h = yes; then
11080     HAVE_FEATURES_H=1
11081   else
11082     HAVE_FEATURES_H=0
11083   fi
11084
11085
11086
11087
11088
11089   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
11090 printf %s "checking for intmax_t... " >&6; }
11091 if test ${gt_cv_c_intmax_t+y}
11092 then :
11093   printf %s "(cached) " >&6
11094 else
11095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11096 /* end confdefs.h.  */
11097
11098 #include <stddef.h>
11099 #include <stdlib.h>
11100 #if HAVE_STDINT_H_WITH_UINTMAX
11101 #include <stdint.h>
11102 #endif
11103 #if HAVE_INTTYPES_H_WITH_UINTMAX
11104 #include <inttypes.h>
11105 #endif
11106
11107 int
11108 main (void)
11109 {
11110 intmax_t x = -1; return !x;
11111   ;
11112   return 0;
11113 }
11114 _ACEOF
11115 if ac_fn_c_try_compile "$LINENO"
11116 then :
11117   gt_cv_c_intmax_t=yes
11118 else
11119   gt_cv_c_intmax_t=no
11120 fi
11121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11122 fi
11123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
11124 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
11125   if test $gt_cv_c_intmax_t = yes; then
11126
11127 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
11128
11129   else
11130
11131     test $ac_cv_type_long_long_int = yes \
11132       && ac_type='long long' \
11133       || ac_type='long'
11134
11135 cat >>confdefs.h <<_ACEOF
11136 #define intmax_t $ac_type
11137 _ACEOF
11138
11139   fi
11140
11141
11142   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11143 printf %s "checking where to find the exponent in a 'double'... " >&6; }
11144 if test ${gl_cv_cc_double_expbit0+y}
11145 then :
11146   printf %s "(cached) " >&6
11147 else
11148
11149       if test "$cross_compiling" = yes
11150 then :
11151
11152                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11153 /* end confdefs.h.  */
11154
11155 #if defined arm || defined __arm || defined __arm__
11156   mixed_endianness
11157 #endif
11158
11159 _ACEOF
11160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11161   $EGREP "mixed_endianness" >/dev/null 2>&1
11162 then :
11163   gl_cv_cc_double_expbit0="unknown"
11164 else
11165
11166                                                          :
11167 if test ${ac_cv_c_bigendian+y}
11168 then :
11169   printf %s "(cached) " >&6
11170 else
11171   ac_cv_c_bigendian=unknown
11172     # See if we're dealing with a universal compiler.
11173     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h.  */
11175 #ifndef __APPLE_CC__
11176                not a universal capable compiler
11177              #endif
11178              typedef int dummy;
11179
11180 _ACEOF
11181 if ac_fn_c_try_compile "$LINENO"
11182 then :
11183
11184         # Check for potential -arch flags.  It is not universal unless
11185         # there are at least two -arch flags with different values.
11186         ac_arch=
11187         ac_prev=
11188         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11189          if test -n "$ac_prev"; then
11190            case $ac_word in
11191              i?86 | x86_64 | ppc | ppc64)
11192                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11193                  ac_arch=$ac_word
11194                else
11195                  ac_cv_c_bigendian=universal
11196                  break
11197                fi
11198                ;;
11199            esac
11200            ac_prev=
11201          elif test "x$ac_word" = "x-arch"; then
11202            ac_prev=arch
11203          fi
11204        done
11205 fi
11206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11207     if test $ac_cv_c_bigendian = unknown; then
11208       # See if sys/param.h defines the BYTE_ORDER macro.
11209       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11210 /* end confdefs.h.  */
11211 #include <sys/types.h>
11212              #include <sys/param.h>
11213
11214 int
11215 main (void)
11216 {
11217 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11218                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11219                      && LITTLE_ENDIAN)
11220               bogus endian macros
11221              #endif
11222
11223   ;
11224   return 0;
11225 }
11226 _ACEOF
11227 if ac_fn_c_try_compile "$LINENO"
11228 then :
11229   # It does; now see whether it defined to BIG_ENDIAN or not.
11230          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11231 /* end confdefs.h.  */
11232 #include <sys/types.h>
11233                 #include <sys/param.h>
11234
11235 int
11236 main (void)
11237 {
11238 #if BYTE_ORDER != BIG_ENDIAN
11239                  not big endian
11240                 #endif
11241
11242   ;
11243   return 0;
11244 }
11245 _ACEOF
11246 if ac_fn_c_try_compile "$LINENO"
11247 then :
11248   ac_cv_c_bigendian=yes
11249 else
11250   ac_cv_c_bigendian=no
11251 fi
11252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11253 fi
11254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11255     fi
11256     if test $ac_cv_c_bigendian = unknown; then
11257       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11258       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11259 /* end confdefs.h.  */
11260 #include <limits.h>
11261
11262 int
11263 main (void)
11264 {
11265 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11266               bogus endian macros
11267              #endif
11268
11269   ;
11270   return 0;
11271 }
11272 _ACEOF
11273 if ac_fn_c_try_compile "$LINENO"
11274 then :
11275   # It does; now see whether it defined to _BIG_ENDIAN or not.
11276          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11277 /* end confdefs.h.  */
11278 #include <limits.h>
11279
11280 int
11281 main (void)
11282 {
11283 #ifndef _BIG_ENDIAN
11284                  not big endian
11285                 #endif
11286
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 if ac_fn_c_try_compile "$LINENO"
11292 then :
11293   ac_cv_c_bigendian=yes
11294 else
11295   ac_cv_c_bigendian=no
11296 fi
11297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11298 fi
11299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11300     fi
11301     if test $ac_cv_c_bigendian = unknown; then
11302       # Compile a test program.
11303       if test "$cross_compiling" = yes
11304 then :
11305   # Try to guess by grepping values from an object file.
11306          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307 /* end confdefs.h.  */
11308 short int ascii_mm[] =
11309                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11310                 short int ascii_ii[] =
11311                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11312                 int use_ascii (int i) {
11313                   return ascii_mm[i] + ascii_ii[i];
11314                 }
11315                 short int ebcdic_ii[] =
11316                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11317                 short int ebcdic_mm[] =
11318                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11319                 int use_ebcdic (int i) {
11320                   return ebcdic_mm[i] + ebcdic_ii[i];
11321                 }
11322                 extern int foo;
11323
11324 int
11325 main (void)
11326 {
11327 return use_ascii (foo) == use_ebcdic (foo);
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 if ac_fn_c_try_compile "$LINENO"
11333 then :
11334   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11335               ac_cv_c_bigendian=yes
11336             fi
11337             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11338               if test "$ac_cv_c_bigendian" = unknown; then
11339                 ac_cv_c_bigendian=no
11340               else
11341                 # finding both strings is unlikely to happen, but who knows?
11342                 ac_cv_c_bigendian=unknown
11343               fi
11344             fi
11345 fi
11346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11347 else
11348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11349 /* end confdefs.h.  */
11350 $ac_includes_default
11351 int
11352 main (void)
11353 {
11354
11355              /* Are we little or big endian?  From Harbison&Steele.  */
11356              union
11357              {
11358                long int l;
11359                char c[sizeof (long int)];
11360              } u;
11361              u.l = 1;
11362              return u.c[sizeof (long int) - 1] == 1;
11363
11364   ;
11365   return 0;
11366 }
11367 _ACEOF
11368 if ac_fn_c_try_run "$LINENO"
11369 then :
11370   ac_cv_c_bigendian=no
11371 else
11372   ac_cv_c_bigendian=yes
11373 fi
11374 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11375   conftest.$ac_objext conftest.beam conftest.$ac_ext
11376 fi
11377
11378     fi
11379 fi
11380 :
11381  case $ac_cv_c_bigendian in #(
11382    yes)
11383      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11384    no)
11385      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11386    universal)
11387
11388 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11389
11390      ;; #(
11391    *)
11392      gl_cv_cc_double_expbit0="unknown" ;;
11393  esac
11394
11395
11396 fi
11397 rm -rf conftest*
11398
11399
11400 else
11401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11402 /* end confdefs.h.  */
11403
11404 #include <float.h>
11405 #include <stddef.h>
11406 #include <stdio.h>
11407 #include <string.h>
11408 #define NWORDS \
11409   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11410 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11411 static unsigned int ored_words[NWORDS];
11412 static unsigned int anded_words[NWORDS];
11413 static void add_to_ored_words (double x)
11414 {
11415   memory_double m;
11416   size_t i;
11417   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
11418   memset (&m, 0, sizeof (memory_double));
11419   m.value = x;
11420   for (i = 0; i < NWORDS; i++)
11421     {
11422       ored_words[i] |= m.word[i];
11423       anded_words[i] &= m.word[i];
11424     }
11425 }
11426 int main ()
11427 {
11428   size_t j;
11429   FILE *fp = fopen ("conftest.out", "w");
11430   if (fp == NULL)
11431     return 1;
11432   for (j = 0; j < NWORDS; j++)
11433     anded_words[j] = ~ (unsigned int) 0;
11434   add_to_ored_words (0.25);
11435   add_to_ored_words (0.5);
11436   add_to_ored_words (1.0);
11437   add_to_ored_words (2.0);
11438   add_to_ored_words (4.0);
11439   /* Remove bits that are common (e.g. if representation of the first mantissa
11440      bit is explicit).  */
11441   for (j = 0; j < NWORDS; j++)
11442     ored_words[j] &= ~anded_words[j];
11443   /* Now find the nonzero word.  */
11444   for (j = 0; j < NWORDS; j++)
11445     if (ored_words[j] != 0)
11446       break;
11447   if (j < NWORDS)
11448     {
11449       size_t i;
11450       for (i = j + 1; i < NWORDS; i++)
11451         if (ored_words[i] != 0)
11452           {
11453             fprintf (fp, "unknown");
11454             return (fclose (fp) != 0);
11455           }
11456       for (i = 0; ; i++)
11457         if ((ored_words[j] >> i) & 1)
11458           {
11459             fprintf (fp, "word %d bit %d", (int) j, (int) i);
11460             return (fclose (fp) != 0);
11461           }
11462     }
11463   fprintf (fp, "unknown");
11464   return (fclose (fp) != 0);
11465 }
11466
11467 _ACEOF
11468 if ac_fn_c_try_run "$LINENO"
11469 then :
11470   gl_cv_cc_double_expbit0=`cat conftest.out`
11471 else
11472   gl_cv_cc_double_expbit0="unknown"
11473 fi
11474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11475   conftest.$ac_objext conftest.beam conftest.$ac_ext
11476 fi
11477
11478       rm -f conftest.out
11479
11480 fi
11481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11482 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11483   case "$gl_cv_cc_double_expbit0" in
11484     word*bit*)
11485       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11486       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11487
11488 cat >>confdefs.h <<_ACEOF
11489 #define DBL_EXPBIT0_WORD $word
11490 _ACEOF
11491
11492
11493 cat >>confdefs.h <<_ACEOF
11494 #define DBL_EXPBIT0_BIT $bit
11495 _ACEOF
11496
11497       ;;
11498   esac
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11509 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11510 if test ${gl_cv_func_snprintf_retval_c99+y}
11511 then :
11512   printf %s "(cached) " >&6
11513 else
11514
11515       if test "$cross_compiling" = yes
11516 then :
11517
11518          case "$host_os" in
11519                                  # Guess yes on glibc systems.
11520            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
11521                                  # Guess yes on FreeBSD >= 5.
11522            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
11523            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11524                                  # Guess yes on Mac OS X >= 10.3.
11525            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
11526            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11527                                  # Guess yes on OpenBSD >= 3.9.
11528            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11529                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11530            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
11531                                  # Guess yes on Solaris >= 2.10.
11532            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11533            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
11534                                  # Guess yes on AIX >= 4.
11535            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
11536            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
11537                                  # Guess yes on NetBSD >= 3.
11538            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11539                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11540            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11541                                  # Guess yes on BeOS.
11542            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
11543                                  # If we don't know, assume the worst.
11544            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
11545          esac
11546
11547 else
11548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11549 /* end confdefs.h.  */
11550
11551 #include <stdio.h>
11552 #include <string.h>
11553 #if HAVE_SNPRINTF
11554 # define my_snprintf snprintf
11555 #else
11556 # include <stdarg.h>
11557 static int my_snprintf (char *buf, int size, const char *format, ...)
11558 {
11559   va_list args;
11560   int ret;
11561   va_start (args, format);
11562   ret = vsnprintf (buf, size, format, args);
11563   va_end (args);
11564   return ret;
11565 }
11566 #endif
11567 static char buf[100];
11568 int main ()
11569 {
11570   strcpy (buf, "ABCDEF");
11571   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11572     return 1;
11573   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11574     return 2;
11575   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11576     return 3;
11577   return 0;
11578 }
11579 _ACEOF
11580 if ac_fn_c_try_run "$LINENO"
11581 then :
11582   gl_cv_func_snprintf_retval_c99=yes
11583 else
11584   gl_cv_func_snprintf_retval_c99=no
11585 fi
11586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11587   conftest.$ac_objext conftest.beam conftest.$ac_ext
11588 fi
11589
11590
11591 fi
11592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11593 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11594
11595
11596
11597
11598
11599
11600   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
11601 do :
11602   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
11603 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11604 if eval test \"x\$"$as_ac_var"\" = x"yes"
11605 then :
11606   cat >>confdefs.h <<_ACEOF
11607 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
11608 _ACEOF
11609
11610 fi
11611 done
11612
11613       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11614 "
11615 if test "x$ac_cv_have_decl__snprintf" = xyes
11616 then :
11617   ac_have_decl=1
11618 else
11619   ac_have_decl=0
11620 fi
11621
11622 cat >>confdefs.h <<_ACEOF
11623 #define HAVE_DECL__SNPRINTF $ac_have_decl
11624 _ACEOF
11625
11626
11627
11628   case "$gl_cv_func_snprintf_retval_c99" in
11629     *yes)
11630
11631 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11632
11633       ;;
11634   esac
11635
11636
11637
11638
11639
11640
11641
11642
11643   GNULIB_ACOSF=0;
11644   GNULIB_ACOSL=0;
11645   GNULIB_ASINF=0;
11646   GNULIB_ASINL=0;
11647   GNULIB_ATANF=0;
11648   GNULIB_ATANL=0;
11649   GNULIB_ATAN2F=0;
11650   GNULIB_CBRT=0;
11651   GNULIB_CBRTF=0;
11652   GNULIB_CBRTL=0;
11653   GNULIB_CEIL=0;
11654   GNULIB_CEILF=0;
11655   GNULIB_CEILL=0;
11656   GNULIB_COPYSIGN=0;
11657   GNULIB_COPYSIGNF=0;
11658   GNULIB_COPYSIGNL=0;
11659   GNULIB_COSF=0;
11660   GNULIB_COSL=0;
11661   GNULIB_COSHF=0;
11662   GNULIB_EXPF=0;
11663   GNULIB_EXPL=0;
11664   GNULIB_EXP2=0;
11665   GNULIB_EXP2F=0;
11666   GNULIB_EXP2L=0;
11667   GNULIB_EXPM1=0;
11668   GNULIB_EXPM1F=0;
11669   GNULIB_EXPM1L=0;
11670   GNULIB_FABSF=0;
11671   GNULIB_FABSL=0;
11672   GNULIB_FLOOR=0;
11673   GNULIB_FLOORF=0;
11674   GNULIB_FLOORL=0;
11675   GNULIB_FMA=0;
11676   GNULIB_FMAF=0;
11677   GNULIB_FMAL=0;
11678   GNULIB_FMOD=0;
11679   GNULIB_FMODF=0;
11680   GNULIB_FMODL=0;
11681   GNULIB_FREXPF=0;
11682   GNULIB_FREXP=0;
11683   GNULIB_FREXPL=0;
11684   GNULIB_HYPOT=0;
11685   GNULIB_HYPOTF=0;
11686   GNULIB_HYPOTL=0;
11687   GNULIB_ILOGB=0;
11688   GNULIB_ILOGBF=0;
11689   GNULIB_ILOGBL=0;
11690   GNULIB_ISFINITE=0;
11691   GNULIB_ISINF=0;
11692   GNULIB_ISNAN=0;
11693   GNULIB_ISNANF=0;
11694   GNULIB_ISNAND=0;
11695   GNULIB_ISNANL=0;
11696   GNULIB_LDEXPF=0;
11697   GNULIB_LDEXPL=0;
11698   GNULIB_LOG=0;
11699   GNULIB_LOGF=0;
11700   GNULIB_LOGL=0;
11701   GNULIB_LOG10=0;
11702   GNULIB_LOG10F=0;
11703   GNULIB_LOG10L=0;
11704   GNULIB_LOG1P=0;
11705   GNULIB_LOG1PF=0;
11706   GNULIB_LOG1PL=0;
11707   GNULIB_LOG2=0;
11708   GNULIB_LOG2F=0;
11709   GNULIB_LOG2L=0;
11710   GNULIB_LOGB=0;
11711   GNULIB_LOGBF=0;
11712   GNULIB_LOGBL=0;
11713   GNULIB_MODF=0;
11714   GNULIB_MODFF=0;
11715   GNULIB_MODFL=0;
11716   GNULIB_POWF=0;
11717   GNULIB_REMAINDER=0;
11718   GNULIB_REMAINDERF=0;
11719   GNULIB_REMAINDERL=0;
11720   GNULIB_RINT=0;
11721   GNULIB_RINTF=0;
11722   GNULIB_RINTL=0;
11723   GNULIB_ROUND=0;
11724   GNULIB_ROUNDF=0;
11725   GNULIB_ROUNDL=0;
11726   GNULIB_SIGNBIT=0;
11727   GNULIB_SINF=0;
11728   GNULIB_SINL=0;
11729   GNULIB_SINHF=0;
11730   GNULIB_SQRTF=0;
11731   GNULIB_SQRTL=0;
11732   GNULIB_TANF=0;
11733   GNULIB_TANL=0;
11734   GNULIB_TANHF=0;
11735   GNULIB_TRUNC=0;
11736   GNULIB_TRUNCF=0;
11737   GNULIB_TRUNCL=0;
11738     HAVE_ACOSF=1;
11739   HAVE_ACOSL=1;
11740   HAVE_ASINF=1;
11741   HAVE_ASINL=1;
11742   HAVE_ATANF=1;
11743   HAVE_ATANL=1;
11744   HAVE_ATAN2F=1;
11745   HAVE_CBRT=1;
11746   HAVE_CBRTF=1;
11747   HAVE_CBRTL=1;
11748   HAVE_COPYSIGN=1;
11749   HAVE_COPYSIGNL=1;
11750   HAVE_COSF=1;
11751   HAVE_COSL=1;
11752   HAVE_COSHF=1;
11753   HAVE_EXPF=1;
11754   HAVE_EXPL=1;
11755   HAVE_EXPM1=1;
11756   HAVE_EXPM1F=1;
11757   HAVE_FABSF=1;
11758   HAVE_FABSL=1;
11759   HAVE_FMA=1;
11760   HAVE_FMAF=1;
11761   HAVE_FMAL=1;
11762   HAVE_FMODF=1;
11763   HAVE_FMODL=1;
11764   HAVE_FREXPF=1;
11765   HAVE_HYPOTF=1;
11766   HAVE_HYPOTL=1;
11767   HAVE_ILOGB=1;
11768   HAVE_ILOGBF=1;
11769   HAVE_ILOGBL=1;
11770   HAVE_ISNANF=1;
11771   HAVE_ISNAND=1;
11772   HAVE_ISNANL=1;
11773   HAVE_LDEXPF=1;
11774   HAVE_LOGF=1;
11775   HAVE_LOGL=1;
11776   HAVE_LOG10F=1;
11777   HAVE_LOG10L=1;
11778   HAVE_LOG1P=1;
11779   HAVE_LOG1PF=1;
11780   HAVE_LOG1PL=1;
11781   HAVE_LOGBF=1;
11782   HAVE_LOGBL=1;
11783   HAVE_MODFF=1;
11784   HAVE_MODFL=1;
11785   HAVE_POWF=1;
11786   HAVE_REMAINDER=1;
11787   HAVE_REMAINDERF=1;
11788   HAVE_RINT=1;
11789   HAVE_RINTL=1;
11790   HAVE_SINF=1;
11791   HAVE_SINL=1;
11792   HAVE_SINHF=1;
11793   HAVE_SQRTF=1;
11794   HAVE_SQRTL=1;
11795   HAVE_TANF=1;
11796   HAVE_TANL=1;
11797   HAVE_TANHF=1;
11798   HAVE_DECL_ACOSL=1;
11799   HAVE_DECL_ASINL=1;
11800   HAVE_DECL_ATANL=1;
11801   HAVE_DECL_CBRTF=1;
11802   HAVE_DECL_CBRTL=1;
11803   HAVE_DECL_CEILF=1;
11804   HAVE_DECL_CEILL=1;
11805   HAVE_DECL_COPYSIGNF=1;
11806   HAVE_DECL_COSL=1;
11807   HAVE_DECL_EXPL=1;
11808   HAVE_DECL_EXP2=1;
11809   HAVE_DECL_EXP2F=1;
11810   HAVE_DECL_EXP2L=1;
11811   HAVE_DECL_EXPM1L=1;
11812   HAVE_DECL_FLOORF=1;
11813   HAVE_DECL_FLOORL=1;
11814   HAVE_DECL_FREXPL=1;
11815   HAVE_DECL_LDEXPL=1;
11816   HAVE_DECL_LOGL=1;
11817   HAVE_DECL_LOG10L=1;
11818   HAVE_DECL_LOG2=1;
11819   HAVE_DECL_LOG2F=1;
11820   HAVE_DECL_LOG2L=1;
11821   HAVE_DECL_LOGB=1;
11822   HAVE_DECL_REMAINDER=1;
11823   HAVE_DECL_REMAINDERL=1;
11824   HAVE_DECL_RINTF=1;
11825   HAVE_DECL_ROUND=1;
11826   HAVE_DECL_ROUNDF=1;
11827   HAVE_DECL_ROUNDL=1;
11828   HAVE_DECL_SINL=1;
11829   HAVE_DECL_SQRTL=1;
11830   HAVE_DECL_TANL=1;
11831   HAVE_DECL_TRUNC=1;
11832   HAVE_DECL_TRUNCF=1;
11833   HAVE_DECL_TRUNCL=1;
11834   REPLACE_CBRTF=0;
11835   REPLACE_CBRTL=0;
11836   REPLACE_CEIL=0;
11837   REPLACE_CEILF=0;
11838   REPLACE_CEILL=0;
11839   REPLACE_EXPM1=0;
11840   REPLACE_EXPM1F=0;
11841   REPLACE_EXP2=0;
11842   REPLACE_EXP2L=0;
11843   REPLACE_FABSL=0;
11844   REPLACE_FLOOR=0;
11845   REPLACE_FLOORF=0;
11846   REPLACE_FLOORL=0;
11847   REPLACE_FMA=0;
11848   REPLACE_FMAF=0;
11849   REPLACE_FMAL=0;
11850   REPLACE_FMOD=0;
11851   REPLACE_FMODF=0;
11852   REPLACE_FMODL=0;
11853   REPLACE_FREXPF=0;
11854   REPLACE_FREXP=0;
11855   REPLACE_FREXPL=0;
11856   REPLACE_HUGE_VAL=0;
11857   REPLACE_HYPOT=0;
11858   REPLACE_HYPOTF=0;
11859   REPLACE_HYPOTL=0;
11860   REPLACE_ILOGB=0;
11861   REPLACE_ILOGBF=0;
11862   REPLACE_ISFINITE=0;
11863   REPLACE_ISINF=0;
11864   REPLACE_ISNAN=0;
11865   REPLACE_LDEXPL=0;
11866   REPLACE_LOG=0;
11867   REPLACE_LOGF=0;
11868   REPLACE_LOGL=0;
11869   REPLACE_LOG10=0;
11870   REPLACE_LOG10F=0;
11871   REPLACE_LOG10L=0;
11872   REPLACE_LOG1P=0;
11873   REPLACE_LOG1PF=0;
11874   REPLACE_LOG1PL=0;
11875   REPLACE_LOG2=0;
11876   REPLACE_LOG2F=0;
11877   REPLACE_LOG2L=0;
11878   REPLACE_LOGB=0;
11879   REPLACE_LOGBF=0;
11880   REPLACE_LOGBL=0;
11881   REPLACE_MODF=0;
11882   REPLACE_MODFF=0;
11883   REPLACE_MODFL=0;
11884   REPLACE_NAN=0;
11885   REPLACE_REMAINDER=0;
11886   REPLACE_REMAINDERF=0;
11887   REPLACE_REMAINDERL=0;
11888   REPLACE_ROUND=0;
11889   REPLACE_ROUNDF=0;
11890   REPLACE_ROUNDL=0;
11891   REPLACE_SIGNBIT=0;
11892   REPLACE_SIGNBIT_USING_GCC=0;
11893   REPLACE_SQRTL=0;
11894   REPLACE_TRUNC=0;
11895   REPLACE_TRUNCF=0;
11896   REPLACE_TRUNCL=0;
11897
11898
11899   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11900 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
11901 if test ${gl_cv_func_frexp_no_libm+y}
11902 then :
11903   printf %s "(cached) " >&6
11904 else
11905
11906       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11907 /* end confdefs.h.  */
11908 #include <math.h>
11909              double x;
11910 int
11911 main (void)
11912 {
11913 int e; return frexp (x, &e) > 0;
11914   ;
11915   return 0;
11916 }
11917 _ACEOF
11918 if ac_fn_c_try_link "$LINENO"
11919 then :
11920   gl_cv_func_frexp_no_libm=yes
11921 else
11922   gl_cv_func_frexp_no_libm=no
11923 fi
11924 rm -f core conftest.err conftest.$ac_objext \
11925     conftest$ac_exeext conftest.$ac_ext
11926
11927 fi
11928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11929 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
11930
11931 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11932 if test "x$ac_cv_have_decl_alarm" = xyes
11933 then :
11934   ac_have_decl=1
11935 else
11936   ac_have_decl=0
11937 fi
11938
11939 cat >>confdefs.h <<_ACEOF
11940 #define HAVE_DECL_ALARM $ac_have_decl
11941 _ACEOF
11942
11943
11944     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11945 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
11946 if test ${gl_cv_var_stdin_large_offset+y}
11947 then :
11948   printf %s "(cached) " >&6
11949 else
11950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11951 /* end confdefs.h.  */
11952 #include <stdio.h>
11953 int
11954 main (void)
11955 {
11956 #if defined __SL64 && defined __SCLE /* cygwin */
11957   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11958      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
11959      it is easier to do a version check than building a runtime test.  */
11960 # include <cygwin/version.h>
11961 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11962   choke me
11963 # endif
11964 #endif
11965   ;
11966   return 0;
11967 }
11968 _ACEOF
11969 if ac_fn_c_try_link "$LINENO"
11970 then :
11971   gl_cv_var_stdin_large_offset=yes
11972 else
11973   gl_cv_var_stdin_large_offset=no
11974 fi
11975 rm -f core conftest.err conftest.$ac_objext \
11976     conftest$ac_exeext conftest.$ac_ext
11977 fi
11978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11979 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
11980
11981
11982
11983
11984
11985   case "$host_os" in
11986     mingw*)
11987                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11988 printf %s "checking for 64-bit off_t... " >&6; }
11989 if test ${gl_cv_type_off_t_64+y}
11990 then :
11991   printf %s "(cached) " >&6
11992 else
11993   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994 /* end confdefs.h.  */
11995 #include <sys/types.h>
11996                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11997
11998 int
11999 main (void)
12000 {
12001
12002   ;
12003   return 0;
12004 }
12005 _ACEOF
12006 if ac_fn_c_try_compile "$LINENO"
12007 then :
12008   gl_cv_type_off_t_64=yes
12009 else
12010   gl_cv_type_off_t_64=no
12011 fi
12012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12013
12014 fi
12015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
12016 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
12017       if test $gl_cv_type_off_t_64 = no; then
12018         WINDOWS_64_BIT_OFF_T=1
12019       else
12020         WINDOWS_64_BIT_OFF_T=0
12021       fi
12022                   WINDOWS_64_BIT_ST_SIZE=1
12023       ;;
12024     *)
12025                                                       WINDOWS_64_BIT_OFF_T=0
12026       WINDOWS_64_BIT_ST_SIZE=0
12027       ;;
12028   esac
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046      if test $gl_cv_have_include_next = yes; then
12047        gl_cv_next_sys_types_h='<'sys/types.h'>'
12048      else
12049        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12050 printf %s "checking absolute name of <sys/types.h>... " >&6; }
12051 if test ${gl_cv_next_sys_types_h+y}
12052 then :
12053   printf %s "(cached) " >&6
12054 else
12055
12056
12057
12058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12059 /* end confdefs.h.  */
12060 #include <sys/types.h>
12061 _ACEOF
12062                 case "$host_os" in
12063     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12064     *)    gl_absname_cpp="$ac_cpp" ;;
12065   esac
12066
12067   case "$host_os" in
12068     mingw*)
12069                                           gl_dirsep_regex='[/\\]'
12070       ;;
12071     *)
12072       gl_dirsep_regex='\/'
12073       ;;
12074   esac
12075       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12076   gl_header_literal_regex=`echo 'sys/types.h' \
12077                            | sed -e "$gl_make_literal_regex_sed"`
12078   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12079       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12080       s|^/[^/]|//&|
12081       p
12082       q
12083     }'
12084
12085         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12086   sed -n "$gl_absolute_header_sed"`
12087
12088            gl_header=$gl_cv_absolute_sys_types_h
12089            gl_cv_next_sys_types_h='"'$gl_header'"'
12090
12091
12092 fi
12093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12094 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
12095      fi
12096      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12097
12098      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12099        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12100        gl_next_as_first_directive='<'sys/types.h'>'
12101      else
12102        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12103        gl_next_as_first_directive=$gl_cv_next_sys_types_h
12104      fi
12105      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
12118 if test "x$ac_cv_have_decl_fseeko" = xyes
12119 then :
12120   ac_have_decl=1
12121 else
12122   ac_have_decl=0
12123 fi
12124
12125 cat >>confdefs.h <<_ACEOF
12126 #define HAVE_DECL_FSEEKO $ac_have_decl
12127 _ACEOF
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
12138 printf %s "checking for fseeko... " >&6; }
12139 if test ${gl_cv_func_fseeko+y}
12140 then :
12141   printf %s "(cached) " >&6
12142 else
12143
12144       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12145 /* end confdefs.h.  */
12146 #include <stdio.h>
12147
12148 int
12149 main (void)
12150 {
12151 fseeko (stdin, 0, 0);
12152   ;
12153   return 0;
12154 }
12155 _ACEOF
12156 if ac_fn_c_try_link "$LINENO"
12157 then :
12158   gl_cv_func_fseeko=yes
12159 else
12160   gl_cv_func_fseeko=no
12161 fi
12162 rm -f core conftest.err conftest.$ac_objext \
12163     conftest$ac_exeext conftest.$ac_ext
12164
12165 fi
12166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
12167 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
12168
12169
12170   if test $ac_cv_have_decl_fseeko = no; then
12171     HAVE_DECL_FSEEKO=0
12172   fi
12173
12174   if test $gl_cv_func_fseeko = no; then
12175     HAVE_FSEEKO=0
12176   else
12177     if test $WINDOWS_64_BIT_OFF_T = 1; then
12178       REPLACE_FSEEKO=1
12179     fi
12180     if test $gl_cv_var_stdin_large_offset = no; then
12181       REPLACE_FSEEKO=1
12182     fi
12183
12184
12185
12186   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
12187 printf %s "checking whether fflush works on input streams... " >&6; }
12188 if test ${gl_cv_func_fflush_stdin+y}
12189 then :
12190   printf %s "(cached) " >&6
12191 else
12192   echo hello world > conftest.txt
12193      if test "$cross_compiling" = yes
12194 then :
12195   gl_cv_func_fflush_stdin=cross
12196 else
12197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12198 /* end confdefs.h.  */
12199
12200 #include <stdio.h>
12201 #if HAVE_UNISTD_H
12202 # include <unistd.h>
12203 #else /* on Windows with MSVC */
12204 # include <io.h>
12205 #endif
12206
12207 int
12208 main (void)
12209 {
12210 FILE *f = fopen ("conftest.txt", "r");
12211          char buffer[10];
12212          int fd;
12213          int c;
12214          if (f == NULL)
12215            return 1;
12216          fd = fileno (f);
12217          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
12218            return 2;
12219          /* For deterministic results, ensure f read a bigger buffer.  */
12220          if (lseek (fd, 0, SEEK_CUR) == 5)
12221            return 3;
12222          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
12223             on BSD systems and on mingw.  */
12224          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
12225            return 4;
12226          if (lseek (fd, 0, SEEK_CUR) != 5)
12227            return 5;
12228          /* Verify behaviour of fflush after ungetc. See
12229             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
12230          /* Verify behaviour of fflush after a backup ungetc.  This fails on
12231             mingw.  */
12232          c = fgetc (f);
12233          ungetc (c, f);
12234          fflush (f);
12235          if (fgetc (f) != c)
12236            return 6;
12237          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
12238             on glibc 2.8 and on BSD systems.  */
12239          c = fgetc (f);
12240          ungetc ('@', f);
12241          fflush (f);
12242          if (fgetc (f) != c)
12243            return 7;
12244          return 0;
12245
12246   ;
12247   return 0;
12248 }
12249 _ACEOF
12250 if ac_fn_c_try_run "$LINENO"
12251 then :
12252   gl_cv_func_fflush_stdin=yes
12253 else
12254   gl_cv_func_fflush_stdin=no
12255 fi
12256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12257   conftest.$ac_objext conftest.beam conftest.$ac_ext
12258 fi
12259
12260      rm conftest.txt
12261
12262 fi
12263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
12264 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
12265   case $gl_cv_func_fflush_stdin in
12266     yes) gl_func_fflush_stdin=1 ;;
12267     no)  gl_func_fflush_stdin=0 ;;
12268     *)   gl_func_fflush_stdin='(-1)' ;;
12269   esac
12270
12271 cat >>confdefs.h <<_ACEOF
12272 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
12273 _ACEOF
12274
12275
12276       if test $gl_cv_func_fflush_stdin != yes; then
12277         REPLACE_FSEEKO=1
12278       fi
12279
12280   fi
12281
12282
12283
12284
12285      GNULIB_FCHMODAT=0;
12286   GNULIB_FSTAT=0;
12287   GNULIB_FSTATAT=0;
12288   GNULIB_FUTIMENS=0;
12289   GNULIB_LCHMOD=0;
12290   GNULIB_LSTAT=0;
12291   GNULIB_MKDIRAT=0;
12292   GNULIB_MKFIFO=0;
12293   GNULIB_MKFIFOAT=0;
12294   GNULIB_MKNOD=0;
12295   GNULIB_MKNODAT=0;
12296   GNULIB_STAT=0;
12297   GNULIB_UTIMENSAT=0;
12298     HAVE_FCHMODAT=1;
12299   HAVE_FSTATAT=1;
12300   HAVE_FUTIMENS=1;
12301   HAVE_LCHMOD=1;
12302   HAVE_LSTAT=1;
12303   HAVE_MKDIRAT=1;
12304   HAVE_MKFIFO=1;
12305   HAVE_MKFIFOAT=1;
12306   HAVE_MKNOD=1;
12307   HAVE_MKNODAT=1;
12308   HAVE_UTIMENSAT=1;
12309   REPLACE_FSTAT=0;
12310   REPLACE_FSTATAT=0;
12311   REPLACE_FUTIMENS=0;
12312   REPLACE_LSTAT=0;
12313   REPLACE_MKDIR=0;
12314   REPLACE_MKFIFO=0;
12315   REPLACE_MKNOD=0;
12316   REPLACE_STAT=0;
12317   REPLACE_UTIMENSAT=0;
12318
12319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12320 printf %s "checking whether stat file-mode macros are broken... " >&6; }
12321 if test ${ac_cv_header_stat_broken+y}
12322 then :
12323   printf %s "(cached) " >&6
12324 else
12325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12326 /* end confdefs.h.  */
12327 #include <sys/types.h>
12328 #include <sys/stat.h>
12329
12330 #if defined S_ISBLK && defined S_IFDIR
12331 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12332 #endif
12333
12334 #if defined S_ISBLK && defined S_IFCHR
12335 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12336 #endif
12337
12338 #if defined S_ISLNK && defined S_IFREG
12339 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12340 #endif
12341
12342 #if defined S_ISSOCK && defined S_IFREG
12343 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12344 #endif
12345
12346 _ACEOF
12347 if ac_fn_c_try_compile "$LINENO"
12348 then :
12349   ac_cv_header_stat_broken=no
12350 else
12351   ac_cv_header_stat_broken=yes
12352 fi
12353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12354 fi
12355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12356 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
12357 if test $ac_cv_header_stat_broken = yes; then
12358
12359 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12360
12361 fi
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377      if test $gl_cv_have_include_next = yes; then
12378        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12379      else
12380        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12381 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12382 if test ${gl_cv_next_sys_stat_h+y}
12383 then :
12384   printf %s "(cached) " >&6
12385 else
12386
12387              if test $ac_cv_header_sys_stat_h = yes; then
12388
12389
12390
12391
12392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12393 /* end confdefs.h.  */
12394 #include <sys/stat.h>
12395 _ACEOF
12396                 case "$host_os" in
12397     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12398     *)    gl_absname_cpp="$ac_cpp" ;;
12399   esac
12400
12401   case "$host_os" in
12402     mingw*)
12403                                           gl_dirsep_regex='[/\\]'
12404       ;;
12405     *)
12406       gl_dirsep_regex='\/'
12407       ;;
12408   esac
12409       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12410   gl_header_literal_regex=`echo 'sys/stat.h' \
12411                            | sed -e "$gl_make_literal_regex_sed"`
12412   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12413       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12414       s|^/[^/]|//&|
12415       p
12416       q
12417     }'
12418
12419         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12420   sed -n "$gl_absolute_header_sed"`
12421
12422            gl_header=$gl_cv_absolute_sys_stat_h
12423            gl_cv_next_sys_stat_h='"'$gl_header'"'
12424           else
12425                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12426              fi
12427
12428
12429 fi
12430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12431 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12432      fi
12433      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12434
12435      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12436        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12437        gl_next_as_first_directive='<'sys/stat.h'>'
12438      else
12439        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12440        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12441      fi
12442      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12455
12456 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12457
12458   fi
12459
12460       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12461      #include <sys/stat.h>
12462 "
12463 if test "x$ac_cv_type_nlink_t" = xyes
12464 then :
12465
12466 else
12467
12468 printf "%s\n" "#define nlink_t int" >>confdefs.h
12469
12470 fi
12471
12472
12473
12474
12475
12476       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12477 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
12478 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
12479 then :
12480   printf %s "(cached) " >&6
12481 else
12482   rm -f conftest.sym conftest.file
12483      echo >conftest.file
12484      if test "$cross_compiling" = yes
12485 then :
12486   case "$host_os" in
12487           *-gnu*)
12488             # Guess yes on glibc systems.
12489             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
12490           *)
12491             # If we don't know, assume the worst.
12492             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12493         esac
12494
12495 else
12496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497 /* end confdefs.h.  */
12498 $ac_includes_default
12499 int
12500 main (void)
12501 {
12502 struct stat sbuf;
12503             if (symlink ("conftest.file", "conftest.sym") != 0)
12504               return 1;
12505             /* Linux will dereference the symlink and fail, as required by
12506                POSIX.  That is better in the sense that it means we will not
12507                have to compile and use the lstat wrapper.  */
12508             return lstat ("conftest.sym/", &sbuf) == 0;
12509
12510   ;
12511   return 0;
12512 }
12513 _ACEOF
12514 if ac_fn_c_try_run "$LINENO"
12515 then :
12516   gl_cv_func_lstat_dereferences_slashed_symlink=yes
12517 else
12518   gl_cv_func_lstat_dereferences_slashed_symlink=no
12519 fi
12520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12521   conftest.$ac_objext conftest.beam conftest.$ac_ext
12522 fi
12523
12524      rm -f conftest.sym conftest.file
12525
12526 fi
12527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
12528 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12529   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
12530     *yes)
12531
12532 cat >>confdefs.h <<_ACEOF
12533 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
12534 _ACEOF
12535
12536       ;;
12537   esac
12538
12539
12540
12541
12542
12543 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12544 if test "x$ac_cv_have_decl_ftello" = xyes
12545 then :
12546   ac_have_decl=1
12547 else
12548   ac_have_decl=0
12549 fi
12550
12551 cat >>confdefs.h <<_ACEOF
12552 #define HAVE_DECL_FTELLO $ac_have_decl
12553 _ACEOF
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564   if test $ac_cv_have_decl_ftello = no; then
12565     HAVE_DECL_FTELLO=0
12566   fi
12567
12568   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12569 printf %s "checking for ftello... " >&6; }
12570 if test ${gl_cv_func_ftello+y}
12571 then :
12572   printf %s "(cached) " >&6
12573 else
12574
12575       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576 /* end confdefs.h.  */
12577 #include <stdio.h>
12578 int
12579 main (void)
12580 {
12581 ftello (stdin);
12582   ;
12583   return 0;
12584 }
12585 _ACEOF
12586 if ac_fn_c_try_link "$LINENO"
12587 then :
12588   gl_cv_func_ftello=yes
12589 else
12590   gl_cv_func_ftello=no
12591 fi
12592 rm -f core conftest.err conftest.$ac_objext \
12593     conftest$ac_exeext conftest.$ac_ext
12594
12595 fi
12596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12597 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12598   if test $gl_cv_func_ftello = no; then
12599     HAVE_FTELLO=0
12600   else
12601     if test $WINDOWS_64_BIT_OFF_T = 1; then
12602       REPLACE_FTELLO=1
12603     fi
12604     if test $gl_cv_var_stdin_large_offset = no; then
12605       REPLACE_FTELLO=1
12606     fi
12607     if test $REPLACE_FTELLO = 0; then
12608
12609       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12610 printf %s "checking whether ftello works... " >&6; }
12611 if test ${gl_cv_func_ftello_works+y}
12612 then :
12613   printf %s "(cached) " >&6
12614 else
12615
12616                               case "$host_os" in
12617                       # Guess no on Solaris.
12618             solaris*) gl_cv_func_ftello_works="guessing no" ;;
12619                       # Guess yes otherwise.
12620             *)        gl_cv_func_ftello_works="guessing yes" ;;
12621           esac
12622           if test "$cross_compiling" = yes
12623 then :
12624   :
12625 else
12626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627 /* end confdefs.h.  */
12628
12629 #include <stdio.h>
12630 #include <stdlib.h>
12631 #include <string.h>
12632 #define TESTFILE "conftest.tmp"
12633 int
12634 main (void)
12635 {
12636   FILE *fp;
12637
12638   /* Create a file with some contents.  */
12639   fp = fopen (TESTFILE, "w");
12640   if (fp == NULL)
12641     return 70;
12642   if (fwrite ("foogarsh", 1, 8, fp) < 8)
12643     return 71;
12644   if (fclose (fp))
12645     return 72;
12646
12647   /* The file's contents is now "foogarsh".  */
12648
12649   /* Try writing after reading to EOF.  */
12650   fp = fopen (TESTFILE, "r+");
12651   if (fp == NULL)
12652     return 73;
12653   if (fseek (fp, -1, SEEK_END))
12654     return 74;
12655   if (!(getc (fp) == 'h'))
12656     return 1;
12657   if (!(getc (fp) == EOF))
12658     return 2;
12659   if (!(ftell (fp) == 8))
12660     return 3;
12661   if (!(ftell (fp) == 8))
12662     return 4;
12663   if (!(putc ('!', fp) == '!'))
12664     return 5;
12665   if (!(ftell (fp) == 9))
12666     return 6;
12667   if (!(fclose (fp) == 0))
12668     return 7;
12669   fp = fopen (TESTFILE, "r");
12670   if (fp == NULL)
12671     return 75;
12672   {
12673     char buf[10];
12674     if (!(fread (buf, 1, 10, fp) == 9))
12675       return 10;
12676     if (!(memcmp (buf, "foogarsh!", 9) == 0))
12677       return 11;
12678   }
12679   if (!(fclose (fp) == 0))
12680     return 12;
12681
12682   /* The file's contents is now "foogarsh!".  */
12683
12684   return 0;
12685 }
12686 _ACEOF
12687 if ac_fn_c_try_run "$LINENO"
12688 then :
12689   gl_cv_func_ftello_works=yes
12690 else
12691   gl_cv_func_ftello_works=no
12692 fi
12693 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12694   conftest.$ac_objext conftest.beam conftest.$ac_ext
12695 fi
12696
12697
12698 fi
12699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12700 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12701       case "$gl_cv_func_ftello_works" in
12702         *yes) ;;
12703         *)
12704           REPLACE_FTELLO=1
12705
12706 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12707
12708           ;;
12709       esac
12710     fi
12711   fi
12712
12713
12714
12715    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12716 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12717 if test ${gl_cv_func_getcwd_null+y}
12718 then :
12719   printf %s "(cached) " >&6
12720 else
12721   if test "$cross_compiling" = yes
12722 then :
12723   case "$host_os" in
12724                      # Guess yes on glibc systems.
12725             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
12726                      # Guess yes on Cygwin.
12727             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
12728                      # If we don't know, assume the worst.
12729             *)       gl_cv_func_getcwd_null="guessing no";;
12730           esac
12731
12732 else
12733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12734 /* end confdefs.h.  */
12735
12736 #        include <stdlib.h>
12737 #        if HAVE_UNISTD_H
12738 #         include <unistd.h>
12739 #        else /* on Windows with MSVC */
12740 #         include <direct.h>
12741 #        endif
12742 #        ifndef getcwd
12743          char *getcwd ();
12744 #        endif
12745
12746 int
12747 main (void)
12748 {
12749
12750 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12751 /* mingw cwd does not start with '/', but getcwd does allocate.
12752    However, mingw fails to honor non-zero size.  */
12753 #else
12754            if (chdir ("/") != 0)
12755              return 1;
12756            else
12757              {
12758                char *f = getcwd (NULL, 0);
12759                if (! f)
12760                  return 2;
12761                if (f[0] != '/')
12762                  return 3;
12763                if (f[1] != '\0')
12764                  return 4;
12765                free (f);
12766                return 0;
12767              }
12768 #endif
12769
12770   ;
12771   return 0;
12772 }
12773 _ACEOF
12774 if ac_fn_c_try_run "$LINENO"
12775 then :
12776   gl_cv_func_getcwd_null=yes
12777 else
12778   gl_cv_func_getcwd_null=no
12779 fi
12780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12781   conftest.$ac_objext conftest.beam conftest.$ac_ext
12782 fi
12783
12784 fi
12785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
12786 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
12787
12788
12789   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
12790 printf %s "checking for getcwd with POSIX signature... " >&6; }
12791 if test ${gl_cv_func_getcwd_posix_signature+y}
12792 then :
12793   printf %s "(cached) " >&6
12794 else
12795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12796 /* end confdefs.h.  */
12797 #include <unistd.h>
12798 int
12799 main (void)
12800 {
12801 extern
12802            #ifdef __cplusplus
12803            "C"
12804            #endif
12805            char *getcwd (char *, size_t);
12806
12807   ;
12808   return 0;
12809 }
12810
12811 _ACEOF
12812 if ac_fn_c_try_compile "$LINENO"
12813 then :
12814   gl_cv_func_getcwd_posix_signature=yes
12815 else
12816   gl_cv_func_getcwd_posix_signature=no
12817 fi
12818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12819
12820 fi
12821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
12822 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
12823
12824
12825
12826 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
12827 if test "x$ac_cv_have_decl_getdtablesize" = xyes
12828 then :
12829   ac_have_decl=1
12830 else
12831   ac_have_decl=0
12832 fi
12833
12834 cat >>confdefs.h <<_ACEOF
12835 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
12836 _ACEOF
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853      if test $gl_cv_have_include_next = yes; then
12854        gl_cv_next_getopt_h='<'getopt.h'>'
12855      else
12856        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12857 printf %s "checking absolute name of <getopt.h>... " >&6; }
12858 if test ${gl_cv_next_getopt_h+y}
12859 then :
12860   printf %s "(cached) " >&6
12861 else
12862
12863              if test $ac_cv_header_getopt_h = yes; then
12864
12865
12866
12867
12868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869 /* end confdefs.h.  */
12870 #include <getopt.h>
12871 _ACEOF
12872                 case "$host_os" in
12873     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12874     *)    gl_absname_cpp="$ac_cpp" ;;
12875   esac
12876
12877   case "$host_os" in
12878     mingw*)
12879                                           gl_dirsep_regex='[/\\]'
12880       ;;
12881     *)
12882       gl_dirsep_regex='\/'
12883       ;;
12884   esac
12885       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12886   gl_header_literal_regex=`echo 'getopt.h' \
12887                            | sed -e "$gl_make_literal_regex_sed"`
12888   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12889       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12890       s|^/[^/]|//&|
12891       p
12892       q
12893     }'
12894
12895         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12896   sed -n "$gl_absolute_header_sed"`
12897
12898            gl_header=$gl_cv_absolute_getopt_h
12899            gl_cv_next_getopt_h='"'$gl_header'"'
12900           else
12901                gl_cv_next_getopt_h='<'getopt.h'>'
12902              fi
12903
12904
12905 fi
12906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12907 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
12908      fi
12909      NEXT_GETOPT_H=$gl_cv_next_getopt_h
12910
12911      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12912        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12913        gl_next_as_first_directive='<'getopt.h'>'
12914      else
12915        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12916        gl_next_as_first_directive=$gl_cv_next_getopt_h
12917      fi
12918      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12919
12920
12921
12922
12923   if test $ac_cv_header_getopt_h = yes; then
12924     HAVE_GETOPT_H=1
12925   else
12926     HAVE_GETOPT_H=0
12927   fi
12928
12929
12930   gl_replace_getopt=
12931
12932     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12933     for ac_header in getopt.h
12934 do :
12935   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12936 if test "x$ac_cv_header_getopt_h" = xyes
12937 then :
12938   cat >>confdefs.h <<_ACEOF
12939 #define HAVE_GETOPT_H 1
12940 _ACEOF
12941
12942 else
12943   gl_replace_getopt=yes
12944 fi
12945 done
12946
12947   fi
12948
12949     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12950     for ac_func in getopt_long_only
12951 do :
12952   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12953 if test "x$ac_cv_func_getopt_long_only" = xyes
12954 then :
12955   cat >>confdefs.h <<_ACEOF
12956 #define HAVE_GETOPT_LONG_ONLY 1
12957 _ACEOF
12958
12959 else
12960   gl_replace_getopt=yes
12961 fi
12962 done
12963
12964   fi
12965
12966           if test -z "$gl_replace_getopt"; then
12967     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12968 printf %s "checking whether getopt is POSIX compatible... " >&6; }
12969 if test ${gl_cv_func_getopt_posix+y}
12970 then :
12971   printf %s "(cached) " >&6
12972 else
12973
12974                                                 if test $cross_compiling = no; then
12975                               if test "$cross_compiling" = yes
12976 then :
12977   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12978 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12979 as_fn_error $? "cannot run test program while cross compiling
12980 See \`config.log' for more details" "$LINENO" 5; }
12981 else
12982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h.  */
12984
12985 #include <unistd.h>
12986 #include <stdlib.h>
12987 #include <string.h>
12988
12989 int
12990 main ()
12991 {
12992   static char program[] = "program";
12993   static char a[] = "-a";
12994   static char foo[] = "foo";
12995   static char bar[] = "bar";
12996   char *argv[] = { program, a, foo, bar, NULL };
12997   int c;
12998
12999   c = getopt (4, argv, "ab");
13000   if (!(c == 'a'))
13001     return 1;
13002   c = getopt (4, argv, "ab");
13003   if (!(c == -1))
13004     return 2;
13005   if (!(optind == 2))
13006     return 3;
13007   return 0;
13008 }
13009
13010 _ACEOF
13011 if ac_fn_c_try_run "$LINENO"
13012 then :
13013   gl_cv_func_getopt_posix=maybe
13014 else
13015   gl_cv_func_getopt_posix=no
13016 fi
13017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13018   conftest.$ac_objext conftest.beam conftest.$ac_ext
13019 fi
13020
13021           if test $gl_cv_func_getopt_posix = maybe; then
13022                                     if test "$cross_compiling" = yes
13023 then :
13024   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13025 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13026 as_fn_error $? "cannot run test program while cross compiling
13027 See \`config.log' for more details" "$LINENO" 5; }
13028 else
13029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13030 /* end confdefs.h.  */
13031
13032 #include <unistd.h>
13033 #include <stdlib.h>
13034 #include <string.h>
13035
13036 int
13037 main ()
13038 {
13039   static char program[] = "program";
13040   static char donald[] = "donald";
13041   static char p[] = "-p";
13042   static char billy[] = "billy";
13043   static char duck[] = "duck";
13044   static char a[] = "-a";
13045   static char bar[] = "bar";
13046   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13047   int c;
13048
13049   c = getopt (7, argv, "+abp:q:");
13050   if (!(c == -1))
13051     return 4;
13052   if (!(strcmp (argv[0], "program") == 0))
13053     return 5;
13054   if (!(strcmp (argv[1], "donald") == 0))
13055     return 6;
13056   if (!(strcmp (argv[2], "-p") == 0))
13057     return 7;
13058   if (!(strcmp (argv[3], "billy") == 0))
13059     return 8;
13060   if (!(strcmp (argv[4], "duck") == 0))
13061     return 9;
13062   if (!(strcmp (argv[5], "-a") == 0))
13063     return 10;
13064   if (!(strcmp (argv[6], "bar") == 0))
13065     return 11;
13066   if (!(optind == 1))
13067     return 12;
13068   return 0;
13069 }
13070
13071 _ACEOF
13072 if ac_fn_c_try_run "$LINENO"
13073 then :
13074   gl_cv_func_getopt_posix=maybe
13075 else
13076   gl_cv_func_getopt_posix=no
13077 fi
13078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13079   conftest.$ac_objext conftest.beam conftest.$ac_ext
13080 fi
13081
13082           fi
13083           if test $gl_cv_func_getopt_posix = maybe; then
13084                         if test "$cross_compiling" = yes
13085 then :
13086   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13087 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13088 as_fn_error $? "cannot run test program while cross compiling
13089 See \`config.log' for more details" "$LINENO" 5; }
13090 else
13091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13092 /* end confdefs.h.  */
13093
13094 #include <unistd.h>
13095 #include <stdlib.h>
13096 #include <string.h>
13097
13098 int
13099 main ()
13100 {
13101   static char program[] = "program";
13102   static char ab[] = "-ab";
13103   char *argv[3] = { program, ab, NULL };
13104   if (getopt (2, argv, "ab:") != 'a')
13105     return 13;
13106   if (getopt (2, argv, "ab:") != '?')
13107     return 14;
13108   if (optopt != 'b')
13109     return 15;
13110   if (optind != 2)
13111     return 16;
13112   return 0;
13113 }
13114
13115 _ACEOF
13116 if ac_fn_c_try_run "$LINENO"
13117 then :
13118   gl_cv_func_getopt_posix=yes
13119 else
13120   gl_cv_func_getopt_posix=no
13121 fi
13122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13123   conftest.$ac_objext conftest.beam conftest.$ac_ext
13124 fi
13125
13126           fi
13127         else
13128           case "$host_os" in
13129             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
13130             *)                       gl_cv_func_getopt_posix="guessing yes";;
13131           esac
13132         fi
13133
13134 fi
13135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13136 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
13137     case "$gl_cv_func_getopt_posix" in
13138       *no) gl_replace_getopt=yes ;;
13139     esac
13140   fi
13141
13142   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13143     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
13144 printf %s "checking for working GNU getopt function... " >&6; }
13145 if test ${gl_cv_func_getopt_gnu+y}
13146 then :
13147   printf %s "(cached) " >&6
13148 else
13149   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
13150        # optstring is necessary for programs like m4 that have POSIX-mandated
13151        # semantics for supporting options interspersed with files.
13152        # Also, since getopt_long is a GNU extension, we require optind=0.
13153        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
13154        # so take care to revert to the correct (non-)export state.
13155        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
13156        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
13157          xx) gl_had_POSIXLY_CORRECT=exported ;;
13158          x)  gl_had_POSIXLY_CORRECT=yes      ;;
13159          *)  gl_had_POSIXLY_CORRECT=         ;;
13160        esac
13161        POSIXLY_CORRECT=1
13162        export POSIXLY_CORRECT
13163        if test "$cross_compiling" = yes
13164 then :
13165            gl_cv_func_getopt_gnu="guessing no"
13166
13167 else
13168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13169 /* end confdefs.h.  */
13170 #include <getopt.h>
13171                            #include <stddef.h>
13172                            #include <string.h>
13173
13174 #include <stdlib.h>
13175 #if defined __MACH__ && defined __APPLE__
13176 /* Avoid a crash on Mac OS X.  */
13177 #include <mach/mach.h>
13178 #include <mach/mach_error.h>
13179 #include <mach/thread_status.h>
13180 #include <mach/exception.h>
13181 #include <mach/task.h>
13182 #include <pthread.h>
13183 /* The exception port on which our thread listens.  */
13184 static mach_port_t our_exception_port;
13185 /* The main function of the thread listening for exceptions of type
13186    EXC_BAD_ACCESS.  */
13187 static void *
13188 mach_exception_thread (void *arg)
13189 {
13190   /* Buffer for a message to be received.  */
13191   struct {
13192     mach_msg_header_t head;
13193     mach_msg_body_t msgh_body;
13194     char data[1024];
13195   } msg;
13196   mach_msg_return_t retval;
13197   /* Wait for a message on the exception port.  */
13198   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
13199                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
13200   if (retval != MACH_MSG_SUCCESS)
13201     abort ();
13202   exit (1);
13203 }
13204 static void
13205 nocrash_init (void)
13206 {
13207   mach_port_t self = mach_task_self ();
13208   /* Allocate a port on which the thread shall listen for exceptions.  */
13209   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
13210       == KERN_SUCCESS) {
13211     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
13212     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
13213                                 MACH_MSG_TYPE_MAKE_SEND)
13214         == KERN_SUCCESS) {
13215       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
13216          for us.  */
13217       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
13218       /* Create the thread listening on the exception port.  */
13219       pthread_attr_t attr;
13220       pthread_t thread;
13221       if (pthread_attr_init (&attr) == 0
13222           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
13223           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
13224         pthread_attr_destroy (&attr);
13225         /* Replace the exception port info for these exceptions with our own.
13226            Note that we replace the exception port for the entire task, not only
13227            for a particular thread.  This has the effect that when our exception
13228            port gets the message, the thread specific exception port has already
13229            been asked, and we don't need to bother about it.
13230            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
13231         task_set_exception_ports (self, mask, our_exception_port,
13232                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
13233       }
13234     }
13235   }
13236 }
13237 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13238 /* Avoid a crash on native Windows.  */
13239 #define WIN32_LEAN_AND_MEAN
13240 #include <windows.h>
13241 #include <winerror.h>
13242 static LONG WINAPI
13243 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
13244 {
13245   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
13246     {
13247     case EXCEPTION_ACCESS_VIOLATION:
13248     case EXCEPTION_IN_PAGE_ERROR:
13249     case EXCEPTION_STACK_OVERFLOW:
13250     case EXCEPTION_GUARD_PAGE:
13251     case EXCEPTION_PRIV_INSTRUCTION:
13252     case EXCEPTION_ILLEGAL_INSTRUCTION:
13253     case EXCEPTION_DATATYPE_MISALIGNMENT:
13254     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
13255     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
13256       exit (1);
13257     }
13258   return EXCEPTION_CONTINUE_SEARCH;
13259 }
13260 static void
13261 nocrash_init (void)
13262 {
13263   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
13264 }
13265 #else
13266 /* Avoid a crash on POSIX systems.  */
13267 #include <signal.h>
13268 /* A POSIX signal handler.  */
13269 static void
13270 exception_handler (int sig)
13271 {
13272   exit (1);
13273 }
13274 static void
13275 nocrash_init (void)
13276 {
13277 #ifdef SIGSEGV
13278   signal (SIGSEGV, exception_handler);
13279 #endif
13280 #ifdef SIGBUS
13281   signal (SIGBUS, exception_handler);
13282 #endif
13283 }
13284 #endif
13285
13286
13287 int
13288 main (void)
13289 {
13290
13291              int result = 0;
13292
13293              nocrash_init();
13294
13295              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13296                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13297                 OSF/1 5.1, Solaris 10.  */
13298              {
13299                static char conftest[] = "conftest";
13300                static char plus[] = "-+";
13301                char *argv[3] = { conftest, plus, NULL };
13302                opterr = 0;
13303                if (getopt (2, argv, "+a") != '?')
13304                  result |= 1;
13305              }
13306              /* This code succeeds on glibc 2.8, mingw,
13307                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13308                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
13309              {
13310                static char program[] = "program";
13311                static char p[] = "-p";
13312                static char foo[] = "foo";
13313                static char bar[] = "bar";
13314                char *argv[] = { program, p, foo, bar, NULL };
13315
13316                optind = 1;
13317                if (getopt (4, argv, "p::") != 'p')
13318                  result |= 2;
13319                else if (optarg != NULL)
13320                  result |= 4;
13321                else if (getopt (4, argv, "p::") != -1)
13322                  result |= 6;
13323                else if (optind != 2)
13324                  result |= 8;
13325              }
13326              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
13327              {
13328                static char program[] = "program";
13329                static char foo[] = "foo";
13330                static char p[] = "-p";
13331                char *argv[] = { program, foo, p, NULL };
13332                optind = 0;
13333                if (getopt (3, argv, "-p") != 1)
13334                  result |= 16;
13335                else if (getopt (3, argv, "-p") != 'p')
13336                  result |= 16;
13337              }
13338              /* This code fails on glibc 2.11.  */
13339              {
13340                static char program[] = "program";
13341                static char b[] = "-b";
13342                static char a[] = "-a";
13343                char *argv[] = { program, b, a, NULL };
13344                optind = opterr = 0;
13345                if (getopt (3, argv, "+:a:b") != 'b')
13346                  result |= 32;
13347                else if (getopt (3, argv, "+:a:b") != ':')
13348                  result |= 32;
13349              }
13350              /* This code dumps core on glibc 2.14.  */
13351              {
13352                static char program[] = "program";
13353                static char w[] = "-W";
13354                static char dummy[] = "dummy";
13355                char *argv[] = { program, w, dummy, NULL };
13356                optind = opterr = 1;
13357                if (getopt (3, argv, "W;") != 'W')
13358                  result |= 64;
13359              }
13360              return result;
13361
13362   ;
13363   return 0;
13364 }
13365 _ACEOF
13366 if ac_fn_c_try_run "$LINENO"
13367 then :
13368   gl_cv_func_getopt_gnu=yes
13369 else
13370   gl_cv_func_getopt_gnu=no
13371 fi
13372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13373   conftest.$ac_objext conftest.beam conftest.$ac_ext
13374 fi
13375
13376        case $gl_had_POSIXLY_CORRECT in
13377          exported) ;;
13378          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
13379          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
13380        esac
13381
13382 fi
13383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13384 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
13385     if test "$gl_cv_func_getopt_gnu" != yes; then
13386       gl_replace_getopt=yes
13387     else
13388       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
13389 printf %s "checking for working GNU getopt_long function... " >&6; }
13390 if test ${gl_cv_func_getopt_long_gnu+y}
13391 then :
13392   printf %s "(cached) " >&6
13393 else
13394   if test "$cross_compiling" = yes
13395 then :
13396               case "$host_os" in
13397               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
13398               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
13399             esac
13400
13401 else
13402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403 /* end confdefs.h.  */
13404 #include <getopt.h>
13405                 #include <stddef.h>
13406                 #include <string.h>
13407
13408 int
13409 main (void)
13410 {
13411 static const struct option long_options[] =
13412                   {
13413                     { "xtremely-",no_argument,       NULL, 1003 },
13414                     { "xtra",     no_argument,       NULL, 1001 },
13415                     { "xtreme",   no_argument,       NULL, 1002 },
13416                     { "xtremely", no_argument,       NULL, 1003 },
13417                     { NULL,       0,                 NULL, 0 }
13418                   };
13419                 /* This code fails on OpenBSD 5.0.  */
13420                 {
13421                   static char program[] = "program";
13422                   static char xtremel[] = "--xtremel";
13423                   char *argv[] = { program, xtremel, NULL };
13424                   int option_index;
13425                   optind = 1; opterr = 0;
13426                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
13427                     return 1;
13428                 }
13429                 return 0;
13430
13431   ;
13432   return 0;
13433 }
13434 _ACEOF
13435 if ac_fn_c_try_run "$LINENO"
13436 then :
13437   gl_cv_func_getopt_long_gnu=yes
13438 else
13439   gl_cv_func_getopt_long_gnu=no
13440 fi
13441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13442   conftest.$ac_objext conftest.beam conftest.$ac_ext
13443 fi
13444
13445
13446 fi
13447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
13448 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
13449       case "$gl_cv_func_getopt_long_gnu" in
13450         *yes) ;;
13451         *) gl_replace_getopt=yes ;;
13452       esac
13453     fi
13454   fi
13455
13456
13457
13458
13459
13460
13461     REPLACE_GETOPT=0
13462     if test -n "$gl_replace_getopt"; then
13463       REPLACE_GETOPT=1
13464     fi
13465
13466   if test $REPLACE_GETOPT = 1; then
13467
13468   GETOPT_H=getopt.h
13469
13470 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
13471
13472
13473
13474   fi
13475
13476 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
13477 if test "x$ac_cv_have_decl_getenv" = xyes
13478 then :
13479   ac_have_decl=1
13480 else
13481   ac_have_decl=0
13482 fi
13483
13484 cat >>confdefs.h <<_ACEOF
13485 #define HAVE_DECL_GETENV $ac_have_decl
13486 _ACEOF
13487
13488 :
13489
13490
13491
13492
13493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13494 printf %s "checking for C/C++ restrict keyword... " >&6; }
13495 if test ${ac_cv_c_restrict+y}
13496 then :
13497   printf %s "(cached) " >&6
13498 else
13499   ac_cv_c_restrict=no
13500    # The order here caters to the fact that C++ does not require restrict.
13501    for ac_kw in __restrict __restrict__ _Restrict restrict; do
13502      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13503 /* end confdefs.h.  */
13504 typedef int *int_ptr;
13505            int foo (int_ptr $ac_kw ip) { return ip[0]; }
13506            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
13507            int bar (int ip[$ac_kw]) { return ip[0]; }
13508
13509 int
13510 main (void)
13511 {
13512 int s[1];
13513            int *$ac_kw t = s;
13514            t[0] = 0;
13515            return foo (t) + bar (t);
13516
13517   ;
13518   return 0;
13519 }
13520 _ACEOF
13521 if ac_fn_c_try_compile "$LINENO"
13522 then :
13523   ac_cv_c_restrict=$ac_kw
13524 fi
13525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13526      test "$ac_cv_c_restrict" != no && break
13527    done
13528
13529 fi
13530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13531 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13532
13533  case $ac_cv_c_restrict in
13534    restrict) ;;
13535    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13536  ;;
13537    *)  cat >>confdefs.h <<_ACEOF
13538 #define restrict $ac_cv_c_restrict
13539 _ACEOF
13540  ;;
13541  esac
13542
13543
13544   GNULIB_GETTIMEOFDAY=0;
13545     HAVE_GETTIMEOFDAY=1;
13546   HAVE_STRUCT_TIMEVAL=1;
13547   HAVE_SYS_TIME_H=1;
13548   HAVE_TIMEZONE_T=0;
13549   REPLACE_GETTIMEOFDAY=0;
13550   REPLACE_STRUCT_TIMEVAL=0;
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567      if test $gl_cv_have_include_next = yes; then
13568        gl_cv_next_sys_time_h='<'sys/time.h'>'
13569      else
13570        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13571 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13572 if test ${gl_cv_next_sys_time_h+y}
13573 then :
13574   printf %s "(cached) " >&6
13575 else
13576
13577              if test $ac_cv_header_sys_time_h = yes; then
13578
13579
13580
13581
13582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13583 /* end confdefs.h.  */
13584 #include <sys/time.h>
13585 _ACEOF
13586                 case "$host_os" in
13587     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13588     *)    gl_absname_cpp="$ac_cpp" ;;
13589   esac
13590
13591   case "$host_os" in
13592     mingw*)
13593                                           gl_dirsep_regex='[/\\]'
13594       ;;
13595     *)
13596       gl_dirsep_regex='\/'
13597       ;;
13598   esac
13599       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13600   gl_header_literal_regex=`echo 'sys/time.h' \
13601                            | sed -e "$gl_make_literal_regex_sed"`
13602   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13603       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13604       s|^/[^/]|//&|
13605       p
13606       q
13607     }'
13608
13609         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13610   sed -n "$gl_absolute_header_sed"`
13611
13612            gl_header=$gl_cv_absolute_sys_time_h
13613            gl_cv_next_sys_time_h='"'$gl_header'"'
13614           else
13615                gl_cv_next_sys_time_h='<'sys/time.h'>'
13616              fi
13617
13618
13619 fi
13620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13621 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13622      fi
13623      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13624
13625      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13626        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13627        gl_next_as_first_directive='<'sys/time.h'>'
13628      else
13629        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13630        gl_next_as_first_directive=$gl_cv_next_sys_time_h
13631      fi
13632      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13633
13634
13635
13636
13637
13638   if test $ac_cv_header_sys_time_h != yes; then
13639     HAVE_SYS_TIME_H=0
13640   fi
13641
13642
13643
13644
13645
13646   if test $ac_cv_header_sys_socket_h != yes; then
13647                     for ac_header in winsock2.h
13648 do :
13649   ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13650 if test "x$ac_cv_header_winsock2_h" = xyes
13651 then :
13652   cat >>confdefs.h <<_ACEOF
13653 #define HAVE_WINSOCK2_H 1
13654 _ACEOF
13655
13656 fi
13657 done
13658
13659   fi
13660   if test "$ac_cv_header_winsock2_h" = yes; then
13661     HAVE_WINSOCK2_H=1
13662     UNISTD_H_HAVE_WINSOCK2_H=1
13663     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13664   else
13665     HAVE_WINSOCK2_H=0
13666   fi
13667
13668
13669   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13670 printf %s "checking for struct timeval... " >&6; }
13671 if test ${gl_cv_sys_struct_timeval+y}
13672 then :
13673   printf %s "(cached) " >&6
13674 else
13675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676 /* end confdefs.h.  */
13677 #if HAVE_SYS_TIME_H
13678              #include <sys/time.h>
13679             #endif
13680             #include <time.h>
13681             #if HAVE_WINSOCK2_H
13682             # include <winsock2.h>
13683             #endif
13684
13685 int
13686 main (void)
13687 {
13688 static struct timeval x; x.tv_sec = x.tv_usec;
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 if ac_fn_c_try_compile "$LINENO"
13694 then :
13695   gl_cv_sys_struct_timeval=yes
13696 else
13697   gl_cv_sys_struct_timeval=no
13698 fi
13699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700
13701 fi
13702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13703 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13704   if test $gl_cv_sys_struct_timeval != yes; then
13705     HAVE_STRUCT_TIMEVAL=0
13706   else
13707                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13708 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13709 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
13710 then :
13711   printf %s "(cached) " >&6
13712 else
13713   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714 /* end confdefs.h.  */
13715 #if HAVE_SYS_TIME_H
13716                #include <sys/time.h>
13717               #endif
13718               #include <time.h>
13719               #if HAVE_WINSOCK2_H
13720               # include <winsock2.h>
13721               #endif
13722
13723 int
13724 main (void)
13725 {
13726 static struct timeval x;
13727               typedef int verify_tv_sec_type[
13728                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13729               ];
13730
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 if ac_fn_c_try_compile "$LINENO"
13736 then :
13737   gl_cv_sys_struct_timeval_tv_sec=yes
13738 else
13739   gl_cv_sys_struct_timeval_tv_sec=no
13740 fi
13741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13742
13743 fi
13744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13745 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13746     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13747       REPLACE_STRUCT_TIMEVAL=1
13748     fi
13749   fi
13750
13751
13752
13753
13754
13755
13756
13757   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13758 printf %s "checking where to find the exponent in a 'float'... " >&6; }
13759 if test ${gl_cv_cc_float_expbit0+y}
13760 then :
13761   printf %s "(cached) " >&6
13762 else
13763
13764       if test "$cross_compiling" = yes
13765 then :
13766   gl_cv_cc_float_expbit0="word 0 bit 23"
13767 else
13768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13769 /* end confdefs.h.  */
13770
13771 #include <float.h>
13772 #include <stddef.h>
13773 #include <stdio.h>
13774 #include <string.h>
13775 #define NWORDS \
13776   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13777 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13778 static unsigned int ored_words[NWORDS];
13779 static unsigned int anded_words[NWORDS];
13780 static void add_to_ored_words (float x)
13781 {
13782   memory_float m;
13783   size_t i;
13784   /* Clear it first, in case
13785      sizeof (float) < sizeof (memory_float).  */
13786   memset (&m, 0, sizeof (memory_float));
13787   m.value = x;
13788   for (i = 0; i < NWORDS; i++)
13789     {
13790       ored_words[i] |= m.word[i];
13791       anded_words[i] &= m.word[i];
13792     }
13793 }
13794 int main ()
13795 {
13796   size_t j;
13797   FILE *fp = fopen ("conftest.out", "w");
13798   if (fp == NULL)
13799     return 1;
13800   for (j = 0; j < NWORDS; j++)
13801     anded_words[j] = ~ (unsigned int) 0;
13802   add_to_ored_words (0.25f);
13803   add_to_ored_words (0.5f);
13804   add_to_ored_words (1.0f);
13805   add_to_ored_words (2.0f);
13806   add_to_ored_words (4.0f);
13807   /* Remove bits that are common (e.g. if representation of the first mantissa
13808      bit is explicit).  */
13809   for (j = 0; j < NWORDS; j++)
13810     ored_words[j] &= ~anded_words[j];
13811   /* Now find the nonzero word.  */
13812   for (j = 0; j < NWORDS; j++)
13813     if (ored_words[j] != 0)
13814       break;
13815   if (j < NWORDS)
13816     {
13817       size_t i;
13818       for (i = j + 1; i < NWORDS; i++)
13819         if (ored_words[i] != 0)
13820           {
13821             fprintf (fp, "unknown");
13822             return (fclose (fp) != 0);
13823           }
13824       for (i = 0; ; i++)
13825         if ((ored_words[j] >> i) & 1)
13826           {
13827             fprintf (fp, "word %d bit %d", (int) j, (int) i);
13828             return (fclose (fp) != 0);
13829           }
13830     }
13831   fprintf (fp, "unknown");
13832   return (fclose (fp) != 0);
13833 }
13834
13835 _ACEOF
13836 if ac_fn_c_try_run "$LINENO"
13837 then :
13838   gl_cv_cc_float_expbit0=`cat conftest.out`
13839 else
13840   gl_cv_cc_float_expbit0="unknown"
13841 fi
13842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13843   conftest.$ac_objext conftest.beam conftest.$ac_ext
13844 fi
13845
13846       rm -f conftest.out
13847
13848 fi
13849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13850 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
13851   case "$gl_cv_cc_float_expbit0" in
13852     word*bit*)
13853       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13854       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13855
13856 cat >>confdefs.h <<_ACEOF
13857 #define FLT_EXPBIT0_WORD $word
13858 _ACEOF
13859
13860
13861 cat >>confdefs.h <<_ACEOF
13862 #define FLT_EXPBIT0_BIT $bit
13863 _ACEOF
13864
13865       ;;
13866   esac
13867
13868
13869       if test "X$prefix" = "XNONE"; then
13870     acl_final_prefix="$ac_default_prefix"
13871   else
13872     acl_final_prefix="$prefix"
13873   fi
13874   if test "X$exec_prefix" = "XNONE"; then
13875     acl_final_exec_prefix='${prefix}'
13876   else
13877     acl_final_exec_prefix="$exec_prefix"
13878   fi
13879   acl_save_prefix="$prefix"
13880   prefix="$acl_final_prefix"
13881   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
13882   prefix="$acl_save_prefix"
13883
13884
13885
13886 # Check whether --with-gnu-ld was given.
13887 if test ${with_gnu_ld+y}
13888 then :
13889   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
13890 else
13891   with_gnu_ld=no
13892 fi
13893
13894 # Prepare PATH_SEPARATOR.
13895 # The user is always right.
13896 if test "${PATH_SEPARATOR+set}" != set; then
13897   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
13898   # contains only /bin. Note that ksh looks also at the FPATH variable,
13899   # so we have to set that as well for the test.
13900   PATH_SEPARATOR=:
13901   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13902     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
13903            || PATH_SEPARATOR=';'
13904        }
13905 fi
13906
13907 ac_prog=ld
13908 if test "$GCC" = yes; then
13909   # Check if gcc -print-prog-name=ld gives a path.
13910   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13911 printf %s "checking for ld used by $CC... " >&6; }
13912   case $host in
13913   *-*-mingw*)
13914     # gcc leaves a trailing carriage return which upsets mingw
13915     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13916   *)
13917     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13918   esac
13919   case $ac_prog in
13920     # Accept absolute paths.
13921     [\\/]* | ?:[\\/]*)
13922       re_direlt='/[^/][^/]*/\.\./'
13923       # Canonicalize the pathname of ld
13924       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
13925       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
13926         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
13927       done
13928       test -z "$LD" && LD="$ac_prog"
13929       ;;
13930   "")
13931     # If it fails, then pretend we aren't using GCC.
13932     ac_prog=ld
13933     ;;
13934   *)
13935     # If it is relative, then search for the first ld in PATH.
13936     with_gnu_ld=unknown
13937     ;;
13938   esac
13939 elif test "$with_gnu_ld" = yes; then
13940   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13941 printf %s "checking for GNU ld... " >&6; }
13942 else
13943   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13944 printf %s "checking for non-GNU ld... " >&6; }
13945 fi
13946 if test ${acl_cv_path_LD+y}
13947 then :
13948   printf %s "(cached) " >&6
13949 else
13950   if test -z "$LD"; then
13951   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13952   for ac_dir in $PATH; do
13953     IFS="$acl_save_ifs"
13954     test -z "$ac_dir" && ac_dir=.
13955     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13956       acl_cv_path_LD="$ac_dir/$ac_prog"
13957       # Check to see if the program is GNU ld.  I'd rather use --version,
13958       # but apparently some variants of GNU ld only accept -v.
13959       # Break only if it was the GNU/non-GNU ld that we prefer.
13960       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
13961       *GNU* | *'with BFD'*)
13962         test "$with_gnu_ld" != no && break
13963         ;;
13964       *)
13965         test "$with_gnu_ld" != yes && break
13966         ;;
13967       esac
13968     fi
13969   done
13970   IFS="$acl_save_ifs"
13971 else
13972   acl_cv_path_LD="$LD" # Let the user override the test with a path.
13973 fi
13974 fi
13975
13976 LD="$acl_cv_path_LD"
13977 if test -n "$LD"; then
13978   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13979 printf "%s\n" "$LD" >&6; }
13980 else
13981   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13982 printf "%s\n" "no" >&6; }
13983 fi
13984 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13986 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
13987 if test ${acl_cv_prog_gnu_ld+y}
13988 then :
13989   printf %s "(cached) " >&6
13990 else
13991   # I'd rather use --version here, but apparently some GNU lds only accept -v.
13992 case `$LD -v 2>&1 </dev/null` in
13993 *GNU* | *'with BFD'*)
13994   acl_cv_prog_gnu_ld=yes
13995   ;;
13996 *)
13997   acl_cv_prog_gnu_ld=no
13998   ;;
13999 esac
14000 fi
14001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
14002 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
14003 with_gnu_ld=$acl_cv_prog_gnu_ld
14004
14005
14006
14007
14008                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
14009 printf %s "checking for shared library run path origin... " >&6; }
14010 if test ${acl_cv_rpath+y}
14011 then :
14012   printf %s "(cached) " >&6
14013 else
14014
14015     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
14016     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
14017     . ./conftest.sh
14018     rm -f ./conftest.sh
14019     acl_cv_rpath=done
14020
14021 fi
14022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
14023 printf "%s\n" "$acl_cv_rpath" >&6; }
14024   wl="$acl_cv_wl"
14025   acl_libext="$acl_cv_libext"
14026   acl_shlibext="$acl_cv_shlibext"
14027   acl_libname_spec="$acl_cv_libname_spec"
14028   acl_library_names_spec="$acl_cv_library_names_spec"
14029   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
14030   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
14031   acl_hardcode_direct="$acl_cv_hardcode_direct"
14032   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
14033     # Check whether --enable-rpath was given.
14034 if test ${enable_rpath+y}
14035 then :
14036   enableval=$enable_rpath; :
14037 else
14038   enable_rpath=yes
14039 fi
14040
14041
14042
14043
14044   acl_libdirstem=lib
14045   acl_libdirstem2=
14046   case "$host_os" in
14047     solaris*)
14048                                     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
14049 printf %s "checking for 64-bit host... " >&6; }
14050 if test ${gl_cv_solaris_64bit+y}
14051 then :
14052   printf %s "(cached) " >&6
14053 else
14054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055 /* end confdefs.h.  */
14056
14057 #ifdef _LP64
14058 sixtyfour bits
14059 #endif
14060
14061 _ACEOF
14062 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14063   $EGREP "sixtyfour bits" >/dev/null 2>&1
14064 then :
14065   gl_cv_solaris_64bit=yes
14066 else
14067   gl_cv_solaris_64bit=no
14068 fi
14069 rm -rf conftest*
14070
14071
14072 fi
14073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
14074 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
14075       if test $gl_cv_solaris_64bit = yes; then
14076         acl_libdirstem=lib/64
14077         case "$host_cpu" in
14078           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
14079           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
14080         esac
14081       fi
14082       ;;
14083     *)
14084       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14085       if test -n "$searchpath"; then
14086         acl_save_IFS="${IFS=    }"; IFS=":"
14087         for searchdir in $searchpath; do
14088           if test -d "$searchdir"; then
14089             case "$searchdir" in
14090               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
14091               */../ | */.. )
14092                 # Better ignore directories of this form. They are misleading.
14093                 ;;
14094               *) searchdir=`cd "$searchdir" && pwd`
14095                  case "$searchdir" in
14096                    */lib64 ) acl_libdirstem=lib64 ;;
14097                  esac ;;
14098             esac
14099           fi
14100         done
14101         IFS="$acl_save_IFS"
14102       fi
14103       ;;
14104   esac
14105   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14106
14107
14108
14109   gl_threads_api=none
14110   LIBTHREAD=
14111   LTLIBTHREAD=
14112   LIBMULTITHREAD=
14113   LTLIBMULTITHREAD=
14114   if test "$gl_use_threads" != no; then
14115         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14116 printf %s "checking whether imported symbols can be declared weak... " >&6; }
14117 if test ${gl_cv_have_weak+y}
14118 then :
14119   printf %s "(cached) " >&6
14120 else
14121   gl_cv_have_weak=no
14122               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123 /* end confdefs.h.  */
14124 extern void xyzzy ();
14125 #pragma weak xyzzy
14126 int
14127 main (void)
14128 {
14129 xyzzy();
14130   ;
14131   return 0;
14132 }
14133 _ACEOF
14134 if ac_fn_c_try_link "$LINENO"
14135 then :
14136   gl_cv_have_weak=maybe
14137 fi
14138 rm -f core conftest.err conftest.$ac_objext \
14139     conftest$ac_exeext conftest.$ac_ext
14140        if test $gl_cv_have_weak = maybe; then
14141                            if test "$cross_compiling" = yes
14142 then :
14143                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14144 /* end confdefs.h.  */
14145 #ifdef __ELF__
14146                Extensible Linking Format
14147                #endif
14148
14149 _ACEOF
14150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14151   $EGREP "Extensible Linking Format" >/dev/null 2>&1
14152 then :
14153   gl_cv_have_weak="guessing yes"
14154 else
14155   gl_cv_have_weak="guessing no"
14156 fi
14157 rm -rf conftest*
14158
14159
14160 else
14161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162 /* end confdefs.h.  */
14163
14164 #include <stdio.h>
14165 #pragma weak fputs
14166 int main ()
14167 {
14168   return (fputs == NULL);
14169 }
14170 _ACEOF
14171 if ac_fn_c_try_run "$LINENO"
14172 then :
14173   gl_cv_have_weak=yes
14174 else
14175   gl_cv_have_weak=no
14176 fi
14177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14178   conftest.$ac_objext conftest.beam conftest.$ac_ext
14179 fi
14180
14181        fi
14182
14183 fi
14184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14185 printf "%s\n" "$gl_cv_have_weak" >&6; }
14186     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14187       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14188       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14189       ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14190 if test "x$ac_cv_header_pthread_h" = xyes
14191 then :
14192   gl_have_pthread_h=yes
14193 else
14194   gl_have_pthread_h=no
14195 fi
14196
14197       if test "$gl_have_pthread_h" = yes; then
14198         # Other possible tests:
14199         #   -lpthreads (FSU threads, PCthreads)
14200         #   -lgthreads
14201         gl_have_pthread=
14202         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14203         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14204         # the second one only in libpthread, and lock.c needs it.
14205         #
14206         # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14207         # needs -pthread for some reason.  See:
14208         # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
14209         save_LIBS=$LIBS
14210         for gl_pthread in '' '-pthread'; do
14211           LIBS="$LIBS $gl_pthread"
14212           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213 /* end confdefs.h.  */
14214 #include <pthread.h>
14215                  pthread_mutex_t m;
14216                  pthread_mutexattr_t ma;
14217
14218 int
14219 main (void)
14220 {
14221 pthread_mutex_lock (&m);
14222                  pthread_mutexattr_init (&ma);
14223   ;
14224   return 0;
14225 }
14226 _ACEOF
14227 if ac_fn_c_try_link "$LINENO"
14228 then :
14229   gl_have_pthread=yes
14230              LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
14231              LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
14232 fi
14233 rm -f core conftest.err conftest.$ac_objext \
14234     conftest$ac_exeext conftest.$ac_ext
14235           LIBS=$save_LIBS
14236           test -n "$gl_have_pthread" && break
14237         done
14238
14239         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14240         # since it is defined as a macro on OSF/1.)
14241         if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
14242           # The program links fine without libpthread. But it may actually
14243           # need to link with libpthread in order to create multiple threads.
14244           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14245 printf %s "checking for pthread_kill in -lpthread... " >&6; }
14246 if test ${ac_cv_lib_pthread_pthread_kill+y}
14247 then :
14248   printf %s "(cached) " >&6
14249 else
14250   ac_check_lib_save_LIBS=$LIBS
14251 LIBS="-lpthread  $LIBS"
14252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14253 /* end confdefs.h.  */
14254
14255 /* Override any GCC internal prototype to avoid an error.
14256    Use char because int might match the return type of a GCC
14257    builtin and then its argument prototype would still apply.  */
14258 #ifdef __cplusplus
14259 extern "C"
14260 #endif
14261 char pthread_kill ();
14262 int
14263 main (void)
14264 {
14265 return pthread_kill ();
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 if ac_fn_c_try_link "$LINENO"
14271 then :
14272   ac_cv_lib_pthread_pthread_kill=yes
14273 else
14274   ac_cv_lib_pthread_pthread_kill=no
14275 fi
14276 rm -f core conftest.err conftest.$ac_objext \
14277     conftest$ac_exeext conftest.$ac_ext
14278 LIBS=$ac_check_lib_save_LIBS
14279 fi
14280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14281 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
14282 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
14283 then :
14284   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14285              # On Solaris and HP-UX, most pthread functions exist also in libc.
14286              # Therefore pthread_in_use() needs to actually try to create a
14287              # thread: pthread_create from libc will fail, whereas
14288              # pthread_create will actually create a thread.
14289              case "$host_os" in
14290                solaris* | hpux*)
14291
14292 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14293
14294              esac
14295
14296 fi
14297
14298         elif test -z "$gl_have_pthread"; then
14299           # Some library is needed. Try libpthread and libc_r.
14300           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14301 printf %s "checking for pthread_kill in -lpthread... " >&6; }
14302 if test ${ac_cv_lib_pthread_pthread_kill+y}
14303 then :
14304   printf %s "(cached) " >&6
14305 else
14306   ac_check_lib_save_LIBS=$LIBS
14307 LIBS="-lpthread  $LIBS"
14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309 /* end confdefs.h.  */
14310
14311 /* Override any GCC internal prototype to avoid an error.
14312    Use char because int might match the return type of a GCC
14313    builtin and then its argument prototype would still apply.  */
14314 #ifdef __cplusplus
14315 extern "C"
14316 #endif
14317 char pthread_kill ();
14318 int
14319 main (void)
14320 {
14321 return pthread_kill ();
14322   ;
14323   return 0;
14324 }
14325 _ACEOF
14326 if ac_fn_c_try_link "$LINENO"
14327 then :
14328   ac_cv_lib_pthread_pthread_kill=yes
14329 else
14330   ac_cv_lib_pthread_pthread_kill=no
14331 fi
14332 rm -f core conftest.err conftest.$ac_objext \
14333     conftest$ac_exeext conftest.$ac_ext
14334 LIBS=$ac_check_lib_save_LIBS
14335 fi
14336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14337 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
14338 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
14339 then :
14340   gl_have_pthread=yes
14341              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
14342              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14343 fi
14344
14345           if test -z "$gl_have_pthread"; then
14346             # For FreeBSD 4.
14347             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14348 printf %s "checking for pthread_kill in -lc_r... " >&6; }
14349 if test ${ac_cv_lib_c_r_pthread_kill+y}
14350 then :
14351   printf %s "(cached) " >&6
14352 else
14353   ac_check_lib_save_LIBS=$LIBS
14354 LIBS="-lc_r  $LIBS"
14355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14356 /* end confdefs.h.  */
14357
14358 /* Override any GCC internal prototype to avoid an error.
14359    Use char because int might match the return type of a GCC
14360    builtin and then its argument prototype would still apply.  */
14361 #ifdef __cplusplus
14362 extern "C"
14363 #endif
14364 char pthread_kill ();
14365 int
14366 main (void)
14367 {
14368 return pthread_kill ();
14369   ;
14370   return 0;
14371 }
14372 _ACEOF
14373 if ac_fn_c_try_link "$LINENO"
14374 then :
14375   ac_cv_lib_c_r_pthread_kill=yes
14376 else
14377   ac_cv_lib_c_r_pthread_kill=no
14378 fi
14379 rm -f core conftest.err conftest.$ac_objext \
14380     conftest$ac_exeext conftest.$ac_ext
14381 LIBS=$ac_check_lib_save_LIBS
14382 fi
14383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14384 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
14385 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
14386 then :
14387   gl_have_pthread=yes
14388                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
14389                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
14390 fi
14391
14392           fi
14393         fi
14394         if test -n "$gl_have_pthread"; then
14395           gl_threads_api=posix
14396
14397 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
14398
14399           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14400             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14401
14402 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14403
14404               LIBTHREAD=
14405               LTLIBTHREAD=
14406             fi
14407           fi
14408         fi
14409       fi
14410     fi
14411     if test -z "$gl_have_pthread"; then
14412       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
14413         gl_have_solaristhread=
14414         gl_save_LIBS="$LIBS"
14415         LIBS="$LIBS -lthread"
14416         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14417 /* end confdefs.h.  */
14418
14419 #include <thread.h>
14420 #include <synch.h>
14421
14422 int
14423 main (void)
14424 {
14425 thr_self();
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 if ac_fn_c_try_link "$LINENO"
14431 then :
14432   gl_have_solaristhread=yes
14433 fi
14434 rm -f core conftest.err conftest.$ac_objext \
14435     conftest$ac_exeext conftest.$ac_ext
14436         LIBS="$gl_save_LIBS"
14437         if test -n "$gl_have_solaristhread"; then
14438           gl_threads_api=solaris
14439           LIBTHREAD=-lthread
14440           LTLIBTHREAD=-lthread
14441           LIBMULTITHREAD="$LIBTHREAD"
14442           LTLIBMULTITHREAD="$LTLIBTHREAD"
14443
14444 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
14445
14446           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14447
14448 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14449
14450             LIBTHREAD=
14451             LTLIBTHREAD=
14452           fi
14453         fi
14454       fi
14455     fi
14456     if test "$gl_use_threads" = pth; then
14457       gl_save_CPPFLAGS="$CPPFLAGS"
14458
14459
14460
14461
14462
14463   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
14464 printf %s "checking how to link with libpth... " >&6; }
14465 if test ${ac_cv_libpth_libs+y}
14466 then :
14467   printf %s "(cached) " >&6
14468 else
14469
14470
14471
14472
14473
14474
14475
14476
14477     use_additional=yes
14478
14479   acl_save_prefix="$prefix"
14480   prefix="$acl_final_prefix"
14481   acl_save_exec_prefix="$exec_prefix"
14482   exec_prefix="$acl_final_exec_prefix"
14483
14484     eval additional_includedir=\"$includedir\"
14485     eval additional_libdir=\"$libdir\"
14486
14487   exec_prefix="$acl_save_exec_prefix"
14488   prefix="$acl_save_prefix"
14489
14490
14491 # Check whether --with-libpth-prefix was given.
14492 if test ${with_libpth_prefix+y}
14493 then :
14494   withval=$with_libpth_prefix;
14495     if test "X$withval" = "Xno"; then
14496       use_additional=no
14497     else
14498       if test "X$withval" = "X"; then
14499
14500   acl_save_prefix="$prefix"
14501   prefix="$acl_final_prefix"
14502   acl_save_exec_prefix="$exec_prefix"
14503   exec_prefix="$acl_final_exec_prefix"
14504
14505           eval additional_includedir=\"$includedir\"
14506           eval additional_libdir=\"$libdir\"
14507
14508   exec_prefix="$acl_save_exec_prefix"
14509   prefix="$acl_save_prefix"
14510
14511       else
14512         additional_includedir="$withval/include"
14513         additional_libdir="$withval/$acl_libdirstem"
14514         if test "$acl_libdirstem2" != "$acl_libdirstem" \
14515            && ! test -d "$withval/$acl_libdirstem"; then
14516           additional_libdir="$withval/$acl_libdirstem2"
14517         fi
14518       fi
14519     fi
14520
14521 fi
14522
14523       LIBPTH=
14524   LTLIBPTH=
14525   INCPTH=
14526   LIBPTH_PREFIX=
14527       HAVE_LIBPTH=
14528   rpathdirs=
14529   ltrpathdirs=
14530   names_already_handled=
14531   names_next_round='pth '
14532   while test -n "$names_next_round"; do
14533     names_this_round="$names_next_round"
14534     names_next_round=
14535     for name in $names_this_round; do
14536       already_handled=
14537       for n in $names_already_handled; do
14538         if test "$n" = "$name"; then
14539           already_handled=yes
14540           break
14541         fi
14542       done
14543       if test -z "$already_handled"; then
14544         names_already_handled="$names_already_handled $name"
14545                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14546         eval value=\"\$HAVE_LIB$uppername\"
14547         if test -n "$value"; then
14548           if test "$value" = yes; then
14549             eval value=\"\$LIB$uppername\"
14550             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
14551             eval value=\"\$LTLIB$uppername\"
14552             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
14553           else
14554                                     :
14555           fi
14556         else
14557                               found_dir=
14558           found_la=
14559           found_so=
14560           found_a=
14561           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
14562           if test -n "$acl_shlibext"; then
14563             shrext=".$acl_shlibext"             # typically: shrext=.so
14564           else
14565             shrext=
14566           fi
14567           if test $use_additional = yes; then
14568             dir="$additional_libdir"
14569                                     if test -n "$acl_shlibext"; then
14570               if test -f "$dir/$libname$shrext"; then
14571                 found_dir="$dir"
14572                 found_so="$dir/$libname$shrext"
14573               else
14574                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14575                   ver=`(cd "$dir" && \
14576                         for f in "$libname$shrext".*; do echo "$f"; done \
14577                         | sed -e "s,^$libname$shrext\\\\.,," \
14578                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14579                         | sed 1q ) 2>/dev/null`
14580                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14581                     found_dir="$dir"
14582                     found_so="$dir/$libname$shrext.$ver"
14583                   fi
14584                 else
14585                   eval library_names=\"$acl_library_names_spec\"
14586                   for f in $library_names; do
14587                     if test -f "$dir/$f"; then
14588                       found_dir="$dir"
14589                       found_so="$dir/$f"
14590                       break
14591                     fi
14592                   done
14593                 fi
14594               fi
14595             fi
14596                         if test "X$found_dir" = "X"; then
14597               if test -f "$dir/$libname.$acl_libext"; then
14598                 found_dir="$dir"
14599                 found_a="$dir/$libname.$acl_libext"
14600               fi
14601             fi
14602             if test "X$found_dir" != "X"; then
14603               if test -f "$dir/$libname.la"; then
14604                 found_la="$dir/$libname.la"
14605               fi
14606             fi
14607           fi
14608           if test "X$found_dir" = "X"; then
14609             for x in $LDFLAGS $LTLIBPTH; do
14610
14611   acl_save_prefix="$prefix"
14612   prefix="$acl_final_prefix"
14613   acl_save_exec_prefix="$exec_prefix"
14614   exec_prefix="$acl_final_exec_prefix"
14615   eval x=\"$x\"
14616   exec_prefix="$acl_save_exec_prefix"
14617   prefix="$acl_save_prefix"
14618
14619               case "$x" in
14620                 -L*)
14621                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14622                                     if test -n "$acl_shlibext"; then
14623                     if test -f "$dir/$libname$shrext"; then
14624                       found_dir="$dir"
14625                       found_so="$dir/$libname$shrext"
14626                     else
14627                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14628                         ver=`(cd "$dir" && \
14629                               for f in "$libname$shrext".*; do echo "$f"; done \
14630                               | sed -e "s,^$libname$shrext\\\\.,," \
14631                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14632                               | sed 1q ) 2>/dev/null`
14633                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14634                           found_dir="$dir"
14635                           found_so="$dir/$libname$shrext.$ver"
14636                         fi
14637                       else
14638                         eval library_names=\"$acl_library_names_spec\"
14639                         for f in $library_names; do
14640                           if test -f "$dir/$f"; then
14641                             found_dir="$dir"
14642                             found_so="$dir/$f"
14643                             break
14644                           fi
14645                         done
14646                       fi
14647                     fi
14648                   fi
14649                                     if test "X$found_dir" = "X"; then
14650                     if test -f "$dir/$libname.$acl_libext"; then
14651                       found_dir="$dir"
14652                       found_a="$dir/$libname.$acl_libext"
14653                     fi
14654                   fi
14655                   if test "X$found_dir" != "X"; then
14656                     if test -f "$dir/$libname.la"; then
14657                       found_la="$dir/$libname.la"
14658                     fi
14659                   fi
14660                   ;;
14661               esac
14662               if test "X$found_dir" != "X"; then
14663                 break
14664               fi
14665             done
14666           fi
14667           if test "X$found_dir" != "X"; then
14668                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14669             if test "X$found_so" != "X"; then
14670                                                         if test "$enable_rpath" = no \
14671                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14672                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14673                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14674               else
14675                                                                                 haveit=
14676                 for x in $ltrpathdirs; do
14677                   if test "X$x" = "X$found_dir"; then
14678                     haveit=yes
14679                     break
14680                   fi
14681                 done
14682                 if test -z "$haveit"; then
14683                   ltrpathdirs="$ltrpathdirs $found_dir"
14684                 fi
14685                                 if test "$acl_hardcode_direct" = yes; then
14686                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14687                 else
14688                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14689                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14690                                                             haveit=
14691                     for x in $rpathdirs; do
14692                       if test "X$x" = "X$found_dir"; then
14693                         haveit=yes
14694                         break
14695                       fi
14696                     done
14697                     if test -z "$haveit"; then
14698                       rpathdirs="$rpathdirs $found_dir"
14699                     fi
14700                   else
14701                                                                                 haveit=
14702                     for x in $LDFLAGS $LIBPTH; do
14703
14704   acl_save_prefix="$prefix"
14705   prefix="$acl_final_prefix"
14706   acl_save_exec_prefix="$exec_prefix"
14707   exec_prefix="$acl_final_exec_prefix"
14708   eval x=\"$x\"
14709   exec_prefix="$acl_save_exec_prefix"
14710   prefix="$acl_save_prefix"
14711
14712                       if test "X$x" = "X-L$found_dir"; then
14713                         haveit=yes
14714                         break
14715                       fi
14716                     done
14717                     if test -z "$haveit"; then
14718                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14719                     fi
14720                     if test "$acl_hardcode_minus_L" != no; then
14721                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14722                     else
14723                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14724                     fi
14725                   fi
14726                 fi
14727               fi
14728             else
14729               if test "X$found_a" != "X"; then
14730                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14731               else
14732                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14733               fi
14734             fi
14735                         additional_includedir=
14736             case "$found_dir" in
14737               */$acl_libdirstem | */$acl_libdirstem/)
14738                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14739                 if test "$name" = 'pth'; then
14740                   LIBPTH_PREFIX="$basedir"
14741                 fi
14742                 additional_includedir="$basedir/include"
14743                 ;;
14744               */$acl_libdirstem2 | */$acl_libdirstem2/)
14745                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14746                 if test "$name" = 'pth'; then
14747                   LIBPTH_PREFIX="$basedir"
14748                 fi
14749                 additional_includedir="$basedir/include"
14750                 ;;
14751             esac
14752             if test "X$additional_includedir" != "X"; then
14753                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14754                 haveit=
14755                 if test "X$additional_includedir" = "X/usr/local/include"; then
14756                   if test -n "$GCC"; then
14757                     case $host_os in
14758                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14759                     esac
14760                   fi
14761                 fi
14762                 if test -z "$haveit"; then
14763                   for x in $CPPFLAGS $INCPTH; do
14764
14765   acl_save_prefix="$prefix"
14766   prefix="$acl_final_prefix"
14767   acl_save_exec_prefix="$exec_prefix"
14768   exec_prefix="$acl_final_exec_prefix"
14769   eval x=\"$x\"
14770   exec_prefix="$acl_save_exec_prefix"
14771   prefix="$acl_save_prefix"
14772
14773                     if test "X$x" = "X-I$additional_includedir"; then
14774                       haveit=yes
14775                       break
14776                     fi
14777                   done
14778                   if test -z "$haveit"; then
14779                     if test -d "$additional_includedir"; then
14780                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14781                     fi
14782                   fi
14783                 fi
14784               fi
14785             fi
14786                         if test -n "$found_la"; then
14787                                                         save_libdir="$libdir"
14788               case "$found_la" in
14789                 */* | *\\*) . "$found_la" ;;
14790                 *) . "./$found_la" ;;
14791               esac
14792               libdir="$save_libdir"
14793                             for dep in $dependency_libs; do
14794                 case "$dep" in
14795                   -L*)
14796                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14797                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14798                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14799                       haveit=
14800                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14801                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14802                         if test -n "$GCC"; then
14803                           case $host_os in
14804                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14805                           esac
14806                         fi
14807                       fi
14808                       if test -z "$haveit"; then
14809                         haveit=
14810                         for x in $LDFLAGS $LIBPTH; do
14811
14812   acl_save_prefix="$prefix"
14813   prefix="$acl_final_prefix"
14814   acl_save_exec_prefix="$exec_prefix"
14815   exec_prefix="$acl_final_exec_prefix"
14816   eval x=\"$x\"
14817   exec_prefix="$acl_save_exec_prefix"
14818   prefix="$acl_save_prefix"
14819
14820                           if test "X$x" = "X-L$additional_libdir"; then
14821                             haveit=yes
14822                             break
14823                           fi
14824                         done
14825                         if test -z "$haveit"; then
14826                           if test -d "$additional_libdir"; then
14827                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14828                           fi
14829                         fi
14830                         haveit=
14831                         for x in $LDFLAGS $LTLIBPTH; do
14832
14833   acl_save_prefix="$prefix"
14834   prefix="$acl_final_prefix"
14835   acl_save_exec_prefix="$exec_prefix"
14836   exec_prefix="$acl_final_exec_prefix"
14837   eval x=\"$x\"
14838   exec_prefix="$acl_save_exec_prefix"
14839   prefix="$acl_save_prefix"
14840
14841                           if test "X$x" = "X-L$additional_libdir"; then
14842                             haveit=yes
14843                             break
14844                           fi
14845                         done
14846                         if test -z "$haveit"; then
14847                           if test -d "$additional_libdir"; then
14848                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14849                           fi
14850                         fi
14851                       fi
14852                     fi
14853                     ;;
14854                   -R*)
14855                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14856                     if test "$enable_rpath" != no; then
14857                                                                   haveit=
14858                       for x in $rpathdirs; do
14859                         if test "X$x" = "X$dir"; then
14860                           haveit=yes
14861                           break
14862                         fi
14863                       done
14864                       if test -z "$haveit"; then
14865                         rpathdirs="$rpathdirs $dir"
14866                       fi
14867                                                                   haveit=
14868                       for x in $ltrpathdirs; do
14869                         if test "X$x" = "X$dir"; then
14870                           haveit=yes
14871                           break
14872                         fi
14873                       done
14874                       if test -z "$haveit"; then
14875                         ltrpathdirs="$ltrpathdirs $dir"
14876                       fi
14877                     fi
14878                     ;;
14879                   -l*)
14880                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14881                     ;;
14882                   *.la)
14883                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14884                     ;;
14885                   *)
14886                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14887                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14888                     ;;
14889                 esac
14890               done
14891             fi
14892           else
14893                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14894             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14895           fi
14896         fi
14897       fi
14898     done
14899   done
14900   if test "X$rpathdirs" != "X"; then
14901     if test -n "$acl_hardcode_libdir_separator"; then
14902                         alldirs=
14903       for found_dir in $rpathdirs; do
14904         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14905       done
14906             acl_save_libdir="$libdir"
14907       libdir="$alldirs"
14908       eval flag=\"$acl_hardcode_libdir_flag_spec\"
14909       libdir="$acl_save_libdir"
14910       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14911     else
14912             for found_dir in $rpathdirs; do
14913         acl_save_libdir="$libdir"
14914         libdir="$found_dir"
14915         eval flag=\"$acl_hardcode_libdir_flag_spec\"
14916         libdir="$acl_save_libdir"
14917         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14918       done
14919     fi
14920   fi
14921   if test "X$ltrpathdirs" != "X"; then
14922             for found_dir in $ltrpathdirs; do
14923       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14924     done
14925   fi
14926
14927
14928
14929
14930
14931
14932     ac_cv_libpth_libs="$LIBPTH"
14933     ac_cv_libpth_ltlibs="$LTLIBPTH"
14934     ac_cv_libpth_cppflags="$INCPTH"
14935     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14936
14937 fi
14938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14939 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
14940   LIBPTH="$ac_cv_libpth_libs"
14941   LTLIBPTH="$ac_cv_libpth_ltlibs"
14942   INCPTH="$ac_cv_libpth_cppflags"
14943   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14944
14945   for element in $INCPTH; do
14946     haveit=
14947     for x in $CPPFLAGS; do
14948
14949   acl_save_prefix="$prefix"
14950   prefix="$acl_final_prefix"
14951   acl_save_exec_prefix="$exec_prefix"
14952   exec_prefix="$acl_final_exec_prefix"
14953   eval x=\"$x\"
14954   exec_prefix="$acl_save_exec_prefix"
14955   prefix="$acl_save_prefix"
14956
14957       if test "X$x" = "X$element"; then
14958         haveit=yes
14959         break
14960       fi
14961     done
14962     if test -z "$haveit"; then
14963       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14964     fi
14965   done
14966
14967
14968
14969
14970       HAVE_LIBPTH=yes
14971
14972
14973
14974       gl_have_pth=
14975       gl_save_LIBS="$LIBS"
14976       LIBS="$LIBS $LIBPTH"
14977       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978 /* end confdefs.h.  */
14979 #include <pth.h>
14980 int
14981 main (void)
14982 {
14983 pth_self();
14984   ;
14985   return 0;
14986 }
14987 _ACEOF
14988 if ac_fn_c_try_link "$LINENO"
14989 then :
14990   gl_have_pth=yes
14991 fi
14992 rm -f core conftest.err conftest.$ac_objext \
14993     conftest$ac_exeext conftest.$ac_ext
14994       LIBS="$gl_save_LIBS"
14995       if test -n "$gl_have_pth"; then
14996         gl_threads_api=pth
14997         LIBTHREAD="$LIBPTH"
14998         LTLIBTHREAD="$LTLIBPTH"
14999         LIBMULTITHREAD="$LIBTHREAD"
15000         LTLIBMULTITHREAD="$LTLIBTHREAD"
15001
15002 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
15003
15004         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15005           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15006
15007 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
15008
15009             LIBTHREAD=
15010             LTLIBTHREAD=
15011           fi
15012         fi
15013       else
15014         CPPFLAGS="$gl_save_CPPFLAGS"
15015       fi
15016     fi
15017     if test -z "$gl_have_pthread"; then
15018       case "$gl_use_threads" in
15019         yes | windows | win32) # The 'win32' is for backward compatibility.
15020           if { case "$host_os" in
15021                  mingw*) true;;
15022                  *) false;;
15023                esac
15024              }; then
15025             gl_threads_api=windows
15026
15027 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15028
15029           fi
15030           ;;
15031       esac
15032     fi
15033   fi
15034   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15035 printf %s "checking for multithread API to use... " >&6; }
15036   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15037 printf "%s\n" "$gl_threads_api" >&6; }
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15050 printf %s "checking for a sed that does not truncate output... " >&6; }
15051 if test ${ac_cv_path_SED+y}
15052 then :
15053   printf %s "(cached) " >&6
15054 else
15055             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15056      for ac_i in 1 2 3 4 5 6 7; do
15057        ac_script="$ac_script$as_nl$ac_script"
15058      done
15059      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15060      { ac_script=; unset ac_script;}
15061      if test -z "$SED"; then
15062   ac_path_SED_found=false
15063   # Loop through the user's path and test for each of PROGNAME-LIST
15064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15065 for as_dir in $PATH
15066 do
15067   IFS=$as_save_IFS
15068   case $as_dir in #(((
15069     '') as_dir=./ ;;
15070     */) ;;
15071     *) as_dir=$as_dir/ ;;
15072   esac
15073     for ac_prog in sed gsed
15074    do
15075     for ac_exec_ext in '' $ac_executable_extensions; do
15076       ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15077       as_fn_executable_p "$ac_path_SED" || continue
15078 # Check for GNU ac_path_SED and select it if it is found.
15079   # Check for GNU $ac_path_SED
15080 case `"$ac_path_SED" --version 2>&1` in
15081 *GNU*)
15082   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15083 *)
15084   ac_count=0
15085   printf %s 0123456789 >"conftest.in"
15086   while :
15087   do
15088     cat "conftest.in" "conftest.in" >"conftest.tmp"
15089     mv "conftest.tmp" "conftest.in"
15090     cp "conftest.in" "conftest.nl"
15091     printf "%s\n" '' >> "conftest.nl"
15092     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15093     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15094     as_fn_arith $ac_count + 1 && ac_count=$as_val
15095     if test $ac_count -gt ${ac_path_SED_max-0}; then
15096       # Best one so far, save it but keep looking for a better one
15097       ac_cv_path_SED="$ac_path_SED"
15098       ac_path_SED_max=$ac_count
15099     fi
15100     # 10*(2^10) chars as input seems more than enough
15101     test $ac_count -gt 10 && break
15102   done
15103   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15104 esac
15105
15106       $ac_path_SED_found && break 3
15107     done
15108   done
15109   done
15110 IFS=$as_save_IFS
15111   if test -z "$ac_cv_path_SED"; then
15112     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15113   fi
15114 else
15115   ac_cv_path_SED=$SED
15116 fi
15117
15118 fi
15119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15120 printf "%s\n" "$ac_cv_path_SED" >&6; }
15121  SED="$ac_cv_path_SED"
15122   rm -f conftest.sed
15123
15124 # Autoupdate added the following line to ensure that your configure
15125 # script's behavior did not change.  It is probably safe to remove.
15126
15127
15128
15129
15130
15131
15132
15133
15134   GNULIB_FFSL=0;
15135   GNULIB_FFSLL=0;
15136   GNULIB_MEMCHR=0;
15137   GNULIB_MEMMEM=0;
15138   GNULIB_MEMPCPY=0;
15139   GNULIB_MEMRCHR=0;
15140   GNULIB_RAWMEMCHR=0;
15141   GNULIB_STPCPY=0;
15142   GNULIB_STPNCPY=0;
15143   GNULIB_STRCHRNUL=0;
15144   GNULIB_STRDUP=0;
15145   GNULIB_STRNCAT=0;
15146   GNULIB_STRNDUP=0;
15147   GNULIB_STRNLEN=0;
15148   GNULIB_STRPBRK=0;
15149   GNULIB_STRSEP=0;
15150   GNULIB_STRSTR=0;
15151   GNULIB_STRCASESTR=0;
15152   GNULIB_STRTOK_R=0;
15153   GNULIB_MBSLEN=0;
15154   GNULIB_MBSNLEN=0;
15155   GNULIB_MBSCHR=0;
15156   GNULIB_MBSRCHR=0;
15157   GNULIB_MBSSTR=0;
15158   GNULIB_MBSCASECMP=0;
15159   GNULIB_MBSNCASECMP=0;
15160   GNULIB_MBSPCASECMP=0;
15161   GNULIB_MBSCASESTR=0;
15162   GNULIB_MBSCSPN=0;
15163   GNULIB_MBSPBRK=0;
15164   GNULIB_MBSSPN=0;
15165   GNULIB_MBSSEP=0;
15166   GNULIB_MBSTOK_R=0;
15167   GNULIB_STRERROR=0;
15168   GNULIB_STRERROR_R=0;
15169   GNULIB_STRSIGNAL=0;
15170   GNULIB_STRVERSCMP=0;
15171   HAVE_MBSLEN=0;
15172     HAVE_FFSL=1;
15173   HAVE_FFSLL=1;
15174   HAVE_MEMCHR=1;
15175   HAVE_DECL_MEMMEM=1;
15176   HAVE_MEMPCPY=1;
15177   HAVE_DECL_MEMRCHR=1;
15178   HAVE_RAWMEMCHR=1;
15179   HAVE_STPCPY=1;
15180   HAVE_STPNCPY=1;
15181   HAVE_STRCHRNUL=1;
15182   HAVE_DECL_STRDUP=1;
15183   HAVE_DECL_STRNDUP=1;
15184   HAVE_DECL_STRNLEN=1;
15185   HAVE_STRPBRK=1;
15186   HAVE_STRSEP=1;
15187   HAVE_STRCASESTR=1;
15188   HAVE_DECL_STRTOK_R=1;
15189   HAVE_DECL_STRERROR_R=1;
15190   HAVE_DECL_STRSIGNAL=1;
15191   HAVE_STRVERSCMP=1;
15192   REPLACE_MEMCHR=0;
15193   REPLACE_MEMMEM=0;
15194   REPLACE_STPNCPY=0;
15195   REPLACE_STRDUP=0;
15196   REPLACE_STRSTR=0;
15197   REPLACE_STRCASESTR=0;
15198   REPLACE_STRCHRNUL=0;
15199   REPLACE_STRERROR=0;
15200   REPLACE_STRERROR_R=0;
15201   REPLACE_STRNCAT=0;
15202   REPLACE_STRNDUP=0;
15203   REPLACE_STRNLEN=0;
15204   REPLACE_STRSIGNAL=0;
15205   REPLACE_STRTOK_R=0;
15206   UNDEFINE_STRTOK_R=0;
15207
15208
15209
15210
15211
15212   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15213   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15214   # irrelevant for anonymous mappings.
15215   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15216 if test "x$ac_cv_func_mmap" = xyes
15217 then :
15218   gl_have_mmap=yes
15219 else
15220   gl_have_mmap=no
15221 fi
15222
15223
15224   # Try to allow MAP_ANONYMOUS.
15225   gl_have_mmap_anonymous=no
15226   if test $gl_have_mmap = yes; then
15227     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15228 printf %s "checking for MAP_ANONYMOUS... " >&6; }
15229     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15230 /* end confdefs.h.  */
15231
15232 #include <sys/mman.h>
15233 #ifdef MAP_ANONYMOUS
15234     I cannot identify this map
15235 #endif
15236
15237 _ACEOF
15238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15239   $EGREP "I cannot identify this map" >/dev/null 2>&1
15240 then :
15241   gl_have_mmap_anonymous=yes
15242 fi
15243 rm -rf conftest*
15244
15245     if test $gl_have_mmap_anonymous != yes; then
15246       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15247 /* end confdefs.h.  */
15248
15249 #include <sys/mman.h>
15250 #ifdef MAP_ANON
15251     I cannot identify this map
15252 #endif
15253
15254 _ACEOF
15255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15256   $EGREP "I cannot identify this map" >/dev/null 2>&1
15257 then :
15258
15259 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15260
15261          gl_have_mmap_anonymous=yes
15262 fi
15263 rm -rf conftest*
15264
15265     fi
15266     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15267 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
15268     if test $gl_have_mmap_anonymous = yes; then
15269
15270 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15271
15272     fi
15273   fi
15274
15275
15276
15277
15278
15279
15280   if test $HAVE_MEMCHR = 1; then
15281     # Detect platform-specific bugs in some versions of glibc:
15282     # memchr should not dereference anything with length 0
15283     #   http://bugzilla.redhat.com/499689
15284     # memchr should not dereference overestimated length after a match
15285     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15286     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15287     # Assume that memchr works on platforms that lack mprotect.
15288     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15289 printf %s "checking whether memchr works... " >&6; }
15290 if test ${gl_cv_func_memchr_works+y}
15291 then :
15292   printf %s "(cached) " >&6
15293 else
15294   if test "$cross_compiling" = yes
15295 then :
15296          gl_cv_func_memchr_works="guessing no"
15297 else
15298   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299 /* end confdefs.h.  */
15300
15301 #include <string.h>
15302 #if HAVE_SYS_MMAN_H
15303 # include <fcntl.h>
15304 # include <unistd.h>
15305 # include <sys/types.h>
15306 # include <sys/mman.h>
15307 # ifndef MAP_FILE
15308 #  define MAP_FILE 0
15309 # endif
15310 #endif
15311
15312 int
15313 main (void)
15314 {
15315
15316   int result = 0;
15317   char *fence = NULL;
15318 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15319 # if HAVE_MAP_ANONYMOUS
15320   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15321   const int fd = -1;
15322 # else /* !HAVE_MAP_ANONYMOUS */
15323   const int flags = MAP_FILE | MAP_PRIVATE;
15324   int fd = open ("/dev/zero", O_RDONLY, 0666);
15325   if (fd >= 0)
15326 # endif
15327     {
15328       int pagesize = getpagesize ();
15329       char *two_pages =
15330         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15331                        flags, fd, 0);
15332       if (two_pages != (char *)(-1)
15333           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15334         fence = two_pages + pagesize;
15335     }
15336 #endif
15337   if (fence)
15338     {
15339       if (memchr (fence, 0, 0))
15340         result |= 1;
15341       strcpy (fence - 9, "12345678");
15342       if (memchr (fence - 9, 0, 79) != fence - 1)
15343         result |= 2;
15344       if (memchr (fence - 1, 0, 3) != fence - 1)
15345         result |= 4;
15346     }
15347   return result;
15348
15349   ;
15350   return 0;
15351 }
15352 _ACEOF
15353 if ac_fn_c_try_run "$LINENO"
15354 then :
15355   gl_cv_func_memchr_works=yes
15356 else
15357   gl_cv_func_memchr_works=no
15358 fi
15359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15360   conftest.$ac_objext conftest.beam conftest.$ac_ext
15361 fi
15362
15363 fi
15364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15365 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
15366     if test "$gl_cv_func_memchr_works" != yes; then
15367       REPLACE_MEMCHR=1
15368     fi
15369   fi
15370
15371 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15372 if test "x$ac_cv_have_decl_memrchr" = xyes
15373 then :
15374   ac_have_decl=1
15375 else
15376   ac_have_decl=0
15377 fi
15378
15379 cat >>confdefs.h <<_ACEOF
15380 #define HAVE_DECL_MEMRCHR $ac_have_decl
15381 _ACEOF
15382
15383
15384
15385
15386
15387
15388
15389      REPLACE_STRERROR_0=0
15390   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15391 printf %s "checking whether strerror(0) succeeds... " >&6; }
15392 if test ${gl_cv_func_strerror_0_works+y}
15393 then :
15394   printf %s "(cached) " >&6
15395 else
15396   if test "$cross_compiling" = yes
15397 then :
15398   case "$host_os" in
15399                  # Guess yes on glibc systems.
15400          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15401                  # If we don't know, assume the worst.
15402          *)      gl_cv_func_strerror_0_works="guessing no" ;;
15403        esac
15404
15405 else
15406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15407 /* end confdefs.h.  */
15408 #include <string.h>
15409            #include <errno.h>
15410
15411 int
15412 main (void)
15413 {
15414 int result = 0;
15415            char *str;
15416            errno = 0;
15417            str = strerror (0);
15418            if (!*str) result |= 1;
15419            if (errno) result |= 2;
15420            if (strstr (str, "nknown") || strstr (str, "ndefined"))
15421              result |= 4;
15422            return result;
15423   ;
15424   return 0;
15425 }
15426 _ACEOF
15427 if ac_fn_c_try_run "$LINENO"
15428 then :
15429   gl_cv_func_strerror_0_works=yes
15430 else
15431   gl_cv_func_strerror_0_works=no
15432 fi
15433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15434   conftest.$ac_objext conftest.beam conftest.$ac_ext
15435 fi
15436
15437
15438 fi
15439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15440 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
15441   case "$gl_cv_func_strerror_0_works" in
15442     *yes) ;;
15443     *)
15444       REPLACE_STRERROR_0=1
15445
15446 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
15447
15448       ;;
15449   esac
15450
15451
15452
15453
15454
15455
15456
15457
15458   if test $ac_cv_func_strerror_r = yes; then
15459     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15460                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15461 printf %s "checking for strerror_r with POSIX signature... " >&6; }
15462 if test ${gl_cv_func_strerror_r_posix_signature+y}
15463 then :
15464   printf %s "(cached) " >&6
15465 else
15466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15467 /* end confdefs.h.  */
15468 #include <string.h>
15469                 int strerror_r (int, char *, size_t);
15470
15471 int
15472 main (void)
15473 {
15474
15475   ;
15476   return 0;
15477 }
15478 _ACEOF
15479 if ac_fn_c_try_compile "$LINENO"
15480 then :
15481   gl_cv_func_strerror_r_posix_signature=yes
15482 else
15483   gl_cv_func_strerror_r_posix_signature=no
15484 fi
15485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15486
15487 fi
15488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15489 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
15490       if test $gl_cv_func_strerror_r_posix_signature = yes; then
15491                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15492 printf %s "checking whether strerror_r works... " >&6; }
15493 if test ${gl_cv_func_strerror_r_works+y}
15494 then :
15495   printf %s "(cached) " >&6
15496 else
15497   if test "$cross_compiling" = yes
15498 then :
15499
15500               case "$host_os" in
15501                        # Guess no on AIX.
15502                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
15503                        # Guess no on HP-UX.
15504                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15505                        # Guess no on BSD variants.
15506                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
15507                        # Guess yes otherwise.
15508                 *)     gl_cv_func_strerror_r_works="guessing yes";;
15509               esac
15510
15511 else
15512   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15513 /* end confdefs.h.  */
15514 #include <errno.h>
15515                   #include <string.h>
15516
15517 int
15518 main (void)
15519 {
15520 int result = 0;
15521                   char buf[79];
15522                   if (strerror_r (EACCES, buf, 0) < 0)
15523                     result |= 1;
15524                   errno = 0;
15525                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
15526                     result |= 2;
15527                   strcpy (buf, "Unknown");
15528                   if (strerror_r (0, buf, sizeof buf) != 0)
15529                     result |= 4;
15530                   if (errno)
15531                     result |= 8;
15532                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15533                     result |= 0x10;
15534                   errno = 0;
15535                   *buf = 0;
15536                   if (strerror_r (-3, buf, sizeof buf) < 0)
15537                     result |= 0x20;
15538                   if (errno)
15539                     result |= 0x40;
15540                   if (!*buf)
15541                     result |= 0x80;
15542                   return result;
15543
15544   ;
15545   return 0;
15546 }
15547 _ACEOF
15548 if ac_fn_c_try_run "$LINENO"
15549 then :
15550   gl_cv_func_strerror_r_works=yes
15551 else
15552   gl_cv_func_strerror_r_works=no
15553 fi
15554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15555   conftest.$ac_objext conftest.beam conftest.$ac_ext
15556 fi
15557
15558
15559 fi
15560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15561 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
15562       else
15563
15564                         if test $ac_cv_func___xpg_strerror_r = yes; then
15565           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15566 printf %s "checking whether __xpg_strerror_r works... " >&6; }
15567 if test ${gl_cv_func_strerror_r_works+y}
15568 then :
15569   printf %s "(cached) " >&6
15570 else
15571   if test "$cross_compiling" = yes
15572 then :
15573                                   gl_cv_func_strerror_r_works="guessing no"
15574
15575 else
15576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15577 /* end confdefs.h.  */
15578 #include <errno.h>
15579                     #include <string.h>
15580                     extern
15581                     #ifdef __cplusplus
15582                     "C"
15583                     #endif
15584                     int __xpg_strerror_r(int, char *, size_t);
15585
15586 int
15587 main (void)
15588 {
15589 int result = 0;
15590                     char buf[256] = "^";
15591                     char copy[256];
15592                     char *str = strerror (-1);
15593                     strcpy (copy, str);
15594                     if (__xpg_strerror_r (-2, buf, 1) == 0)
15595                       result |= 1;
15596                     if (*buf)
15597                       result |= 2;
15598                     __xpg_strerror_r (-2, buf, 256);
15599                     if (strcmp (str, copy))
15600                       result |= 4;
15601                     return result;
15602
15603   ;
15604   return 0;
15605 }
15606 _ACEOF
15607 if ac_fn_c_try_run "$LINENO"
15608 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         fi
15622       fi
15623     fi
15624   fi
15625
15626
15627
15628
15629
15630
15631
15632
15633   if test $ac_cv_have_decl_strerror_r = no; then
15634     HAVE_DECL_STRERROR_R=0
15635   fi
15636
15637   if test $ac_cv_func_strerror_r = yes; then
15638     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15639       if test $gl_cv_func_strerror_r_posix_signature = yes; then
15640         case "$gl_cv_func_strerror_r_works" in
15641                     *no) REPLACE_STRERROR_R=1 ;;
15642         esac
15643       else
15644                 REPLACE_STRERROR_R=1
15645       fi
15646     else
15647                   REPLACE_STRERROR_R=1
15648     fi
15649   fi
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666   gl_cv_func_vfprintf_posix=no
15667   case "$gl_cv_func_printf_sizes_c99" in
15668     *yes)
15669       case "$gl_cv_func_printf_long_double" in
15670         *yes)
15671           case "$gl_cv_func_printf_infinite" in
15672             *yes)
15673               case "$gl_cv_func_printf_infinite_long_double" in
15674                 *yes)
15675                   case "$gl_cv_func_printf_directive_a" in
15676                     *yes)
15677                       case "$gl_cv_func_printf_directive_f" in
15678                         *yes)
15679                           case "$gl_cv_func_printf_directive_n" in
15680                             *yes)
15681                               case "$gl_cv_func_printf_directive_ls" in
15682                                 *yes)
15683                                   case "$gl_cv_func_printf_positions" in
15684                                     *yes)
15685                                       case "$gl_cv_func_printf_flag_grouping" in
15686                                         *yes)
15687                                           case "$gl_cv_func_printf_flag_leftadjust" in
15688                                             *yes)
15689                                               case "$gl_cv_func_printf_flag_zero" in
15690                                                 *yes)
15691                                                   case "$gl_cv_func_printf_precision" in
15692                                                     *yes)
15693                                                       case "$gl_cv_func_printf_enomem" in
15694                                                         *yes)
15695                                                           # vfprintf exists and is
15696                                                           # already POSIX compliant.
15697                                                           gl_cv_func_vfprintf_posix=yes
15698                                                           ;;
15699                                                       esac
15700                                                       ;;
15701                                                   esac
15702                                                   ;;
15703                                               esac
15704                                               ;;
15705                                           esac
15706                                           ;;
15707                                       esac
15708                                       ;;
15709                                   esac
15710                                   ;;
15711                               esac
15712                               ;;
15713                           esac
15714                           ;;
15715                       esac
15716                       ;;
15717                   esac
15718                   ;;
15719               esac
15720               ;;
15721           esac
15722           ;;
15723       esac
15724       ;;
15725   esac
15726   if test $gl_cv_func_vfprintf_posix = no; then
15727
15728
15729
15730   case "$gl_cv_func_printf_infinite" in
15731     *yes)
15732       ;;
15733     *)
15734
15735 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
15736
15737       ;;
15738   esac
15739
15740
15741
15742
15743   case "$gl_cv_func_printf_long_double" in
15744     *yes)
15745       case "$gl_cv_func_printf_infinite_long_double" in
15746         *yes)
15747           ;;
15748         *)
15749
15750 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
15751
15752           ;;
15753       esac
15754       ;;
15755   esac
15756
15757
15758
15759   case "$gl_cv_func_printf_directive_a" in
15760     *yes)
15761       ;;
15762     *)
15763
15764 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
15765
15766       for ac_func in nl_langinfo
15767 do :
15768   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
15769 if test "x$ac_cv_func_nl_langinfo" = xyes
15770 then :
15771   cat >>confdefs.h <<_ACEOF
15772 #define HAVE_NL_LANGINFO 1
15773 _ACEOF
15774
15775 fi
15776 done
15777
15778       ;;
15779   esac
15780
15781
15782
15783   case "$gl_cv_func_printf_directive_f" in
15784     *yes)
15785       ;;
15786     *)
15787
15788 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
15789
15790       ;;
15791   esac
15792
15793
15794
15795   case "$gl_cv_func_printf_directive_ls" in
15796     *yes)
15797       ;;
15798     *)
15799
15800 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
15801
15802       ;;
15803   esac
15804
15805
15806
15807   case "$gl_cv_func_printf_flag_grouping" in
15808     *yes)
15809       ;;
15810     *)
15811
15812 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
15813
15814       ;;
15815   esac
15816
15817
15818
15819   case "$gl_cv_func_printf_flag_leftadjust" in
15820     *yes)
15821       ;;
15822     *)
15823
15824 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
15825
15826       ;;
15827   esac
15828
15829
15830
15831   case "$gl_cv_func_printf_flag_zero" in
15832     *yes)
15833       ;;
15834     *)
15835
15836 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
15837
15838       ;;
15839   esac
15840
15841
15842
15843   case "$gl_cv_func_printf_precision" in
15844     *yes)
15845       ;;
15846     *)
15847
15848 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
15849
15850
15851 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15852
15853
15854 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15855
15856       ;;
15857   esac
15858
15859
15860
15861   case "$gl_cv_func_printf_enomem" in
15862     *yes)
15863       ;;
15864     *)
15865
15866 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
15867
15868
15869 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
15870
15871
15872 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
15873
15874       ;;
15875   esac
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
15918
15919   if test $ac_cv_func_vasnprintf = yes; then
15920
15921 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
15922
15923   fi
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15936 if test "x$ac_cv_type_ptrdiff_t" = xyes
15937 then :
15938
15939 else
15940
15941 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
15942
15943
15944 fi
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
15963
15964   REPLACE_VFPRINTF=1
15965
15966 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
15967
15968   :
15969
15970   fi
15971
15972
15973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15974 /* end confdefs.h.  */
15975
15976 #ifdef _MSC_VER
15977 MicrosoftCompiler
15978 #endif
15979
15980 _ACEOF
15981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15982   $EGREP "MicrosoftCompiler" >/dev/null 2>&1
15983 then :
15984   gl_asmext='asm'
15985      gl_c_asm_opt='-c -Fa'
15986
15987 else
15988   gl_asmext='s'
15989      gl_c_asm_opt='-S'
15990
15991 fi
15992 rm -rf conftest*
15993
15994
15995
15996
15997   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
15998 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
15999 if test ${gl_cv_prog_as_underscore+y}
16000 then :
16001   printf %s "(cached) " >&6
16002 else
16003   cat > conftest.c <<EOF
16004 #ifdef __cplusplus
16005 extern "C" int foo (void);
16006 #endif
16007 int foo(void) { return 0; }
16008 EOF
16009      # Look for the assembly language name in the .s file.
16010      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16011   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16012   (eval $ac_try) 2>&5
16013   ac_status=$?
16014   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16015   test $ac_status = 0; }; } >/dev/null 2>&1
16016      if LC_ALL=C grep -E '(^|^a-zA-Z0-9_)_foo(^a-zA-Z0-9_|$)' conftest.$gl_asmext >/dev/null; then
16017        gl_cv_prog_as_underscore=yes
16018      else
16019        gl_cv_prog_as_underscore=no
16020      fi
16021      rm -f conftest*
16022
16023 fi
16024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16025 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16026   if test $gl_cv_prog_as_underscore = yes; then
16027     USER_LABEL_PREFIX=_
16028   else
16029     USER_LABEL_PREFIX=
16030   fi
16031
16032 cat >>confdefs.h <<_ACEOF
16033 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
16034 _ACEOF
16035
16036   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16037
16038
16039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16040 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16041 if test ${ac_cv_header_stdbool_h+y}
16042 then :
16043   printf %s "(cached) " >&6
16044 else
16045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h.  */
16047
16048              #include <stdbool.h>
16049              #ifndef bool
16050               "error: bool is not defined"
16051              #endif
16052              #ifndef false
16053               "error: false is not defined"
16054              #endif
16055              #if false
16056               "error: false is not 0"
16057              #endif
16058              #ifndef true
16059               "error: true is not defined"
16060              #endif
16061              #if true != 1
16062               "error: true is not 1"
16063              #endif
16064              #ifndef __bool_true_false_are_defined
16065               "error: __bool_true_false_are_defined is not defined"
16066              #endif
16067
16068              struct s { _Bool s: 1; _Bool t; } s;
16069
16070              char a[true == 1 ? 1 : -1];
16071              char b[false == 0 ? 1 : -1];
16072              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16073              char d[(bool) 0.5 == true ? 1 : -1];
16074              /* See body of main program for 'e'.  */
16075              char f[(_Bool) 0.0 == false ? 1 : -1];
16076              char g[true];
16077              char h[sizeof (_Bool)];
16078              char i[sizeof s.t];
16079              enum { j = false, k = true, l = false * true, m = true * 256 };
16080              /* The following fails for
16081                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16082              _Bool n[m];
16083              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16084              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16085              /* Catch a bug in an HP-UX C compiler.  See
16086                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16087                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
16088               */
16089              _Bool q = true;
16090              _Bool *pq = &q;
16091
16092 int
16093 main (void)
16094 {
16095
16096              bool e = &s;
16097              *pq |= q;
16098              *pq |= ! q;
16099              /* Refer to every declared value, to avoid compiler optimizations.  */
16100              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16101                      + !m + !n + !o + !p + !q + !pq);
16102
16103   ;
16104   return 0;
16105 }
16106 _ACEOF
16107 if ac_fn_c_try_compile "$LINENO"
16108 then :
16109   ac_cv_header_stdbool_h=yes
16110 else
16111   ac_cv_header_stdbool_h=no
16112 fi
16113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16114 fi
16115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16116 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16117    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16118 if test "x$ac_cv_type__Bool" = xyes
16119 then :
16120
16121 cat >>confdefs.h <<_ACEOF
16122 #define HAVE__BOOL 1
16123 _ACEOF
16124
16125
16126 fi
16127
16128
16129
16130     REPLACE_NULL=0;
16131   HAVE_MAX_ALIGN_T=1;
16132   HAVE_WCHAR_T=1;
16133
16134
16135
16136
16137
16138
16139   if test $ac_cv_type_long_long_int = yes; then
16140     HAVE_LONG_LONG_INT=1
16141   else
16142     HAVE_LONG_LONG_INT=0
16143   fi
16144
16145
16146   if test $ac_cv_type_unsigned_long_long_int = yes; then
16147     HAVE_UNSIGNED_LONG_LONG_INT=1
16148   else
16149     HAVE_UNSIGNED_LONG_LONG_INT=0
16150   fi
16151
16152
16153
16154   if test $ac_cv_header_wchar_h = yes; then
16155     HAVE_WCHAR_H=1
16156   else
16157     HAVE_WCHAR_H=0
16158   fi
16159
16160
16161       if test $ac_cv_header_inttypes_h = yes; then
16162     HAVE_INTTYPES_H=1
16163   else
16164     HAVE_INTTYPES_H=0
16165   fi
16166
16167
16168       if test $ac_cv_header_sys_types_h = yes; then
16169     HAVE_SYS_TYPES_H=1
16170   else
16171     HAVE_SYS_TYPES_H=0
16172   fi
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184      if test $gl_cv_have_include_next = yes; then
16185        gl_cv_next_stdint_h='<'stdint.h'>'
16186      else
16187        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16188 printf %s "checking absolute name of <stdint.h>... " >&6; }
16189 if test ${gl_cv_next_stdint_h+y}
16190 then :
16191   printf %s "(cached) " >&6
16192 else
16193
16194              if test $ac_cv_header_stdint_h = yes; then
16195
16196
16197
16198
16199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200 /* end confdefs.h.  */
16201 #include <stdint.h>
16202 _ACEOF
16203                 case "$host_os" in
16204     aix*) gl_absname_cpp="$ac_cpp -C" ;;
16205     *)    gl_absname_cpp="$ac_cpp" ;;
16206   esac
16207
16208   case "$host_os" in
16209     mingw*)
16210                                           gl_dirsep_regex='[/\\]'
16211       ;;
16212     *)
16213       gl_dirsep_regex='\/'
16214       ;;
16215   esac
16216       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16217   gl_header_literal_regex=`echo 'stdint.h' \
16218                            | sed -e "$gl_make_literal_regex_sed"`
16219   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16220       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16221       s|^/[^/]|//&|
16222       p
16223       q
16224     }'
16225
16226         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16227   sed -n "$gl_absolute_header_sed"`
16228
16229            gl_header=$gl_cv_absolute_stdint_h
16230            gl_cv_next_stdint_h='"'$gl_header'"'
16231           else
16232                gl_cv_next_stdint_h='<'stdint.h'>'
16233              fi
16234
16235
16236 fi
16237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16238 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
16239      fi
16240      NEXT_STDINT_H=$gl_cv_next_stdint_h
16241
16242      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16243        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16244        gl_next_as_first_directive='<'stdint.h'>'
16245      else
16246        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16247        gl_next_as_first_directive=$gl_cv_next_stdint_h
16248      fi
16249      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16250
16251
16252
16253
16254   if test $ac_cv_header_stdint_h = yes; then
16255     HAVE_STDINT_H=1
16256   else
16257     HAVE_STDINT_H=0
16258   fi
16259
16260
16261     if test $ac_cv_header_stdint_h = yes; then
16262     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16263 printf %s "checking whether stdint.h conforms to C99... " >&6; }
16264 if test ${gl_cv_header_working_stdint_h+y}
16265 then :
16266   printf %s "(cached) " >&6
16267 else
16268   gl_cv_header_working_stdint_h=no
16269        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16270 /* end confdefs.h.  */
16271
16272
16273 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16274 #define __STDC_CONSTANT_MACROS 1
16275 #define __STDC_LIMIT_MACROS 1
16276 #include <stdint.h>
16277 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
16278 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16279 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16280 #endif
16281
16282
16283   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16284      included before <wchar.h>.  */
16285   #include <stddef.h>
16286   #include <signal.h>
16287   #if HAVE_WCHAR_H
16288   # include <stdio.h>
16289   # include <time.h>
16290   # include <wchar.h>
16291   #endif
16292
16293
16294 #ifdef INT8_MAX
16295 int8_t a1 = INT8_MAX;
16296 int8_t a1min = INT8_MIN;
16297 #endif
16298 #ifdef INT16_MAX
16299 int16_t a2 = INT16_MAX;
16300 int16_t a2min = INT16_MIN;
16301 #endif
16302 #ifdef INT32_MAX
16303 int32_t a3 = INT32_MAX;
16304 int32_t a3min = INT32_MIN;
16305 #endif
16306 #ifdef INT64_MAX
16307 int64_t a4 = INT64_MAX;
16308 int64_t a4min = INT64_MIN;
16309 #endif
16310 #ifdef UINT8_MAX
16311 uint8_t b1 = UINT8_MAX;
16312 #else
16313 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16314 #endif
16315 #ifdef UINT16_MAX
16316 uint16_t b2 = UINT16_MAX;
16317 #endif
16318 #ifdef UINT32_MAX
16319 uint32_t b3 = UINT32_MAX;
16320 #endif
16321 #ifdef UINT64_MAX
16322 uint64_t b4 = UINT64_MAX;
16323 #endif
16324 int_least8_t c1 = INT8_C (0x7f);
16325 int_least8_t c1max = INT_LEAST8_MAX;
16326 int_least8_t c1min = INT_LEAST8_MIN;
16327 int_least16_t c2 = INT16_C (0x7fff);
16328 int_least16_t c2max = INT_LEAST16_MAX;
16329 int_least16_t c2min = INT_LEAST16_MIN;
16330 int_least32_t c3 = INT32_C (0x7fffffff);
16331 int_least32_t c3max = INT_LEAST32_MAX;
16332 int_least32_t c3min = INT_LEAST32_MIN;
16333 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16334 int_least64_t c4max = INT_LEAST64_MAX;
16335 int_least64_t c4min = INT_LEAST64_MIN;
16336 uint_least8_t d1 = UINT8_C (0xff);
16337 uint_least8_t d1max = UINT_LEAST8_MAX;
16338 uint_least16_t d2 = UINT16_C (0xffff);
16339 uint_least16_t d2max = UINT_LEAST16_MAX;
16340 uint_least32_t d3 = UINT32_C (0xffffffff);
16341 uint_least32_t d3max = UINT_LEAST32_MAX;
16342 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16343 uint_least64_t d4max = UINT_LEAST64_MAX;
16344 int_fast8_t e1 = INT_FAST8_MAX;
16345 int_fast8_t e1min = INT_FAST8_MIN;
16346 int_fast16_t e2 = INT_FAST16_MAX;
16347 int_fast16_t e2min = INT_FAST16_MIN;
16348 int_fast32_t e3 = INT_FAST32_MAX;
16349 int_fast32_t e3min = INT_FAST32_MIN;
16350 int_fast64_t e4 = INT_FAST64_MAX;
16351 int_fast64_t e4min = INT_FAST64_MIN;
16352 uint_fast8_t f1 = UINT_FAST8_MAX;
16353 uint_fast16_t f2 = UINT_FAST16_MAX;
16354 uint_fast32_t f3 = UINT_FAST32_MAX;
16355 uint_fast64_t f4 = UINT_FAST64_MAX;
16356 #ifdef INTPTR_MAX
16357 intptr_t g = INTPTR_MAX;
16358 intptr_t gmin = INTPTR_MIN;
16359 #endif
16360 #ifdef UINTPTR_MAX
16361 uintptr_t h = UINTPTR_MAX;
16362 #endif
16363 intmax_t i = INTMAX_MAX;
16364 uintmax_t j = UINTMAX_MAX;
16365
16366 #include <limits.h> /* for CHAR_BIT */
16367 #define TYPE_MINIMUM(t) \
16368   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16369 #define TYPE_MAXIMUM(t) \
16370   ((t) ((t) 0 < (t) -1 \
16371         ? (t) -1 \
16372         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16373 struct s {
16374   int check_PTRDIFF:
16375       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16376       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16377       ? 1 : -1;
16378   /* Detect bug in FreeBSD 6.0 / ia64.  */
16379   int check_SIG_ATOMIC:
16380       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16381       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16382       ? 1 : -1;
16383   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16384   int check_WCHAR:
16385       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16386       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16387       ? 1 : -1;
16388   /* Detect bug in mingw.  */
16389   int check_WINT:
16390       WINT_MIN == TYPE_MINIMUM (wint_t)
16391       && WINT_MAX == TYPE_MAXIMUM (wint_t)
16392       ? 1 : -1;
16393
16394   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
16395   int check_UINT8_C:
16396         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16397   int check_UINT16_C:
16398         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16399
16400   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
16401 #ifdef UINT8_MAX
16402   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16403 #endif
16404 #ifdef UINT16_MAX
16405   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16406 #endif
16407 #ifdef UINT32_MAX
16408   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16409 #endif
16410 #ifdef UINT64_MAX
16411   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16412 #endif
16413   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16414   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16415   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16416   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16417   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16418   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16419   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16420   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16421   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16422   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16423   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16424 };
16425
16426 int
16427 main (void)
16428 {
16429
16430   ;
16431   return 0;
16432 }
16433 _ACEOF
16434 if ac_fn_c_try_compile "$LINENO"
16435 then :
16436                                                     if test "$cross_compiling" = yes
16437 then :
16438                  gl_cv_header_working_stdint_h=yes
16439
16440 else
16441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442 /* end confdefs.h.  */
16443
16444
16445 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16446 #define __STDC_CONSTANT_MACROS 1
16447 #define __STDC_LIMIT_MACROS 1
16448 #include <stdint.h>
16449
16450
16451   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16452      included before <wchar.h>.  */
16453   #include <stddef.h>
16454   #include <signal.h>
16455   #if HAVE_WCHAR_H
16456   # include <stdio.h>
16457   # include <time.h>
16458   # include <wchar.h>
16459   #endif
16460
16461
16462 #include <stdio.h>
16463 #include <string.h>
16464 #define MVAL(macro) MVAL1(macro)
16465 #define MVAL1(expression) #expression
16466 static const char *macro_values[] =
16467   {
16468 #ifdef INT8_MAX
16469     MVAL (INT8_MAX),
16470 #endif
16471 #ifdef INT16_MAX
16472     MVAL (INT16_MAX),
16473 #endif
16474 #ifdef INT32_MAX
16475     MVAL (INT32_MAX),
16476 #endif
16477 #ifdef INT64_MAX
16478     MVAL (INT64_MAX),
16479 #endif
16480 #ifdef UINT8_MAX
16481     MVAL (UINT8_MAX),
16482 #endif
16483 #ifdef UINT16_MAX
16484     MVAL (UINT16_MAX),
16485 #endif
16486 #ifdef UINT32_MAX
16487     MVAL (UINT32_MAX),
16488 #endif
16489 #ifdef UINT64_MAX
16490     MVAL (UINT64_MAX),
16491 #endif
16492     NULL
16493   };
16494
16495 int
16496 main (void)
16497 {
16498
16499   const char **mv;
16500   for (mv = macro_values; *mv != NULL; mv++)
16501     {
16502       const char *value = *mv;
16503       /* Test whether it looks like a cast expression.  */
16504       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
16505           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
16506           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
16507           || strncmp (value, "((int)"/*)*/, 6) == 0
16508           || strncmp (value, "((signed short)"/*)*/, 15) == 0
16509           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
16510         return mv - macro_values + 1;
16511     }
16512   return 0;
16513
16514   ;
16515   return 0;
16516 }
16517 _ACEOF
16518 if ac_fn_c_try_run "$LINENO"
16519 then :
16520   gl_cv_header_working_stdint_h=yes
16521 fi
16522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16523   conftest.$ac_objext conftest.beam conftest.$ac_ext
16524 fi
16525
16526
16527 fi
16528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16529
16530 fi
16531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
16532 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
16533   fi
16534   if test "$gl_cv_header_working_stdint_h" = yes; then
16535             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
16536 printf %s "checking whether stdint.h predates C++11... " >&6; }
16537 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
16538 then :
16539   printf %s "(cached) " >&6
16540 else
16541   gl_cv_header_stdint_predates_cxx11_h=yes
16542        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543 /* end confdefs.h.  */
16544
16545
16546 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16547 #include <stdint.h>
16548
16549
16550   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16551      included before <wchar.h>.  */
16552   #include <stddef.h>
16553   #include <signal.h>
16554   #if HAVE_WCHAR_H
16555   # include <stdio.h>
16556   # include <time.h>
16557   # include <wchar.h>
16558   #endif
16559
16560
16561 intmax_t im = INTMAX_MAX;
16562 int32_t i32 = INT32_C (0x7fffffff);
16563
16564 int
16565 main (void)
16566 {
16567
16568   ;
16569   return 0;
16570 }
16571 _ACEOF
16572 if ac_fn_c_try_compile "$LINENO"
16573 then :
16574   gl_cv_header_stdint_predates_cxx11_h=no
16575 fi
16576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16577 fi
16578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
16579 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
16580
16581     if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
16582
16583 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
16584
16585
16586 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
16587
16588     fi
16589     STDINT_H=
16590   else
16591             for ac_header in sys/inttypes.h sys/bitypes.h
16592 do :
16593   as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
16594 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16595 if eval test \"x\$"$as_ac_Header"\" = x"yes"
16596 then :
16597   cat >>confdefs.h <<_ACEOF
16598 #define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
16599 _ACEOF
16600
16601 fi
16602 done
16603
16604     if test $ac_cv_header_sys_inttypes_h = yes; then
16605       HAVE_SYS_INTTYPES_H=1
16606     else
16607       HAVE_SYS_INTTYPES_H=0
16608     fi
16609
16610     if test $ac_cv_header_sys_bitypes_h = yes; then
16611       HAVE_SYS_BITYPES_H=1
16612     else
16613       HAVE_SYS_BITYPES_H=0
16614     fi
16615
16616
16617
16618
16619   if test $APPLE_UNIVERSAL_BUILD = 0; then
16620
16621
16622   for gltype in ptrdiff_t size_t ; do
16623     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16624 printf %s "checking for bit size of $gltype... " >&6; }
16625 if eval test \${gl_cv_bitsizeof_${gltype}+y}
16626 then :
16627   printf %s "(cached) " >&6
16628 else
16629   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
16630   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16631      included before <wchar.h>.  */
16632   #include <stddef.h>
16633   #include <signal.h>
16634   #if HAVE_WCHAR_H
16635   # include <stdio.h>
16636   # include <time.h>
16637   # include <wchar.h>
16638   #endif
16639
16640 #include <limits.h>"
16641 then :
16642
16643 else
16644   result=unknown
16645 fi
16646
16647        eval gl_cv_bitsizeof_${gltype}=\$result
16648
16649 fi
16650 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16651                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16652 printf "%s\n" "$ac_res" >&6; }
16653     eval result=\$gl_cv_bitsizeof_${gltype}
16654     if test $result = unknown; then
16655                                                 result=0
16656     fi
16657     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16658     cat >>confdefs.h <<_ACEOF
16659 #define BITSIZEOF_${GLTYPE} $result
16660 _ACEOF
16661
16662     eval BITSIZEOF_${GLTYPE}=\$result
16663   done
16664
16665
16666   fi
16667
16668
16669   for gltype in sig_atomic_t wchar_t wint_t ; do
16670     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16671 printf %s "checking for bit size of $gltype... " >&6; }
16672 if eval test \${gl_cv_bitsizeof_${gltype}+y}
16673 then :
16674   printf %s "(cached) " >&6
16675 else
16676   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
16677   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16678      included before <wchar.h>.  */
16679   #include <stddef.h>
16680   #include <signal.h>
16681   #if HAVE_WCHAR_H
16682   # include <stdio.h>
16683   # include <time.h>
16684   # include <wchar.h>
16685   #endif
16686
16687 #include <limits.h>"
16688 then :
16689
16690 else
16691   result=unknown
16692 fi
16693
16694        eval gl_cv_bitsizeof_${gltype}=\$result
16695
16696 fi
16697 eval ac_res=\$gl_cv_bitsizeof_${gltype}
16698                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16699 printf "%s\n" "$ac_res" >&6; }
16700     eval result=\$gl_cv_bitsizeof_${gltype}
16701     if test $result = unknown; then
16702                                                 result=0
16703     fi
16704     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16705     cat >>confdefs.h <<_ACEOF
16706 #define BITSIZEOF_${GLTYPE} $result
16707 _ACEOF
16708
16709     eval BITSIZEOF_${GLTYPE}=\$result
16710   done
16711
16712
16713
16714
16715   for gltype in sig_atomic_t wchar_t wint_t ; do
16716     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
16717 printf %s "checking whether $gltype is signed... " >&6; }
16718 if eval test \${gl_cv_type_${gltype}_signed+y}
16719 then :
16720   printf %s "(cached) " >&6
16721 else
16722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16723 /* end confdefs.h.  */
16724
16725   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16726      included before <wchar.h>.  */
16727   #include <stddef.h>
16728   #include <signal.h>
16729   #if HAVE_WCHAR_H
16730   # include <stdio.h>
16731   # include <time.h>
16732   # include <wchar.h>
16733   #endif
16734
16735             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
16736 int
16737 main (void)
16738 {
16739
16740   ;
16741   return 0;
16742 }
16743 _ACEOF
16744 if ac_fn_c_try_compile "$LINENO"
16745 then :
16746   result=yes
16747 else
16748   result=no
16749 fi
16750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16751        eval gl_cv_type_${gltype}_signed=\$result
16752
16753 fi
16754 eval ac_res=\$gl_cv_type_${gltype}_signed
16755                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16756 printf "%s\n" "$ac_res" >&6; }
16757     eval result=\$gl_cv_type_${gltype}_signed
16758     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16759     if test "$result" = yes; then
16760       cat >>confdefs.h <<_ACEOF
16761 #define HAVE_SIGNED_${GLTYPE} 1
16762 _ACEOF
16763
16764       eval HAVE_SIGNED_${GLTYPE}=1
16765     else
16766       eval HAVE_SIGNED_${GLTYPE}=0
16767     fi
16768   done
16769
16770
16771   gl_cv_type_ptrdiff_t_signed=yes
16772   gl_cv_type_size_t_signed=no
16773   if test $APPLE_UNIVERSAL_BUILD = 0; then
16774
16775
16776   for gltype in ptrdiff_t size_t ; do
16777     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16778 printf %s "checking for $gltype integer literal suffix... " >&6; }
16779 if eval test \${gl_cv_type_${gltype}_suffix+y}
16780 then :
16781   printf %s "(cached) " >&6
16782 else
16783   eval gl_cv_type_${gltype}_suffix=no
16784        eval result=\$gl_cv_type_${gltype}_signed
16785        if test "$result" = yes; then
16786          glsufu=
16787        else
16788          glsufu=u
16789        fi
16790        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16791          case $glsuf in
16792            '')  gltype1='int';;
16793            l)   gltype1='long int';;
16794            ll)  gltype1='long long int';;
16795            i64) gltype1='__int64';;
16796            u)   gltype1='unsigned int';;
16797            ul)  gltype1='unsigned long int';;
16798            ull) gltype1='unsigned long long int';;
16799            ui64)gltype1='unsigned __int64';;
16800          esac
16801          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16802 /* end confdefs.h.  */
16803
16804   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16805      included before <wchar.h>.  */
16806   #include <stddef.h>
16807   #include <signal.h>
16808   #if HAVE_WCHAR_H
16809   # include <stdio.h>
16810   # include <time.h>
16811   # include <wchar.h>
16812   #endif
16813
16814               extern $gltype foo;
16815               extern $gltype1 foo;
16816 int
16817 main (void)
16818 {
16819
16820   ;
16821   return 0;
16822 }
16823 _ACEOF
16824 if ac_fn_c_try_compile "$LINENO"
16825 then :
16826   eval gl_cv_type_${gltype}_suffix=\$glsuf
16827 fi
16828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16829          eval result=\$gl_cv_type_${gltype}_suffix
16830          test "$result" != no && break
16831        done
16832 fi
16833 eval ac_res=\$gl_cv_type_${gltype}_suffix
16834                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16835 printf "%s\n" "$ac_res" >&6; }
16836     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16837     eval result=\$gl_cv_type_${gltype}_suffix
16838     test "$result" = no && result=
16839     eval ${GLTYPE}_SUFFIX=\$result
16840     cat >>confdefs.h <<_ACEOF
16841 #define ${GLTYPE}_SUFFIX $result
16842 _ACEOF
16843
16844   done
16845
16846
16847   fi
16848
16849
16850   for gltype in sig_atomic_t wchar_t wint_t ; do
16851     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
16852 printf %s "checking for $gltype integer literal suffix... " >&6; }
16853 if eval test \${gl_cv_type_${gltype}_suffix+y}
16854 then :
16855   printf %s "(cached) " >&6
16856 else
16857   eval gl_cv_type_${gltype}_suffix=no
16858        eval result=\$gl_cv_type_${gltype}_signed
16859        if test "$result" = yes; then
16860          glsufu=
16861        else
16862          glsufu=u
16863        fi
16864        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
16865          case $glsuf in
16866            '')  gltype1='int';;
16867            l)   gltype1='long int';;
16868            ll)  gltype1='long long int';;
16869            i64) gltype1='__int64';;
16870            u)   gltype1='unsigned int';;
16871            ul)  gltype1='unsigned long int';;
16872            ull) gltype1='unsigned long long int';;
16873            ui64)gltype1='unsigned __int64';;
16874          esac
16875          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16876 /* end confdefs.h.  */
16877
16878   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16879      included before <wchar.h>.  */
16880   #include <stddef.h>
16881   #include <signal.h>
16882   #if HAVE_WCHAR_H
16883   # include <stdio.h>
16884   # include <time.h>
16885   # include <wchar.h>
16886   #endif
16887
16888               extern $gltype foo;
16889               extern $gltype1 foo;
16890 int
16891 main (void)
16892 {
16893
16894   ;
16895   return 0;
16896 }
16897 _ACEOF
16898 if ac_fn_c_try_compile "$LINENO"
16899 then :
16900   eval gl_cv_type_${gltype}_suffix=\$glsuf
16901 fi
16902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16903          eval result=\$gl_cv_type_${gltype}_suffix
16904          test "$result" != no && break
16905        done
16906 fi
16907 eval ac_res=\$gl_cv_type_${gltype}_suffix
16908                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16909 printf "%s\n" "$ac_res" >&6; }
16910     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
16911     eval result=\$gl_cv_type_${gltype}_suffix
16912     test "$result" = no && result=
16913     eval ${GLTYPE}_SUFFIX=\$result
16914     cat >>confdefs.h <<_ACEOF
16915 #define ${GLTYPE}_SUFFIX $result
16916 _ACEOF
16917
16918   done
16919
16920
16921
16922           if test $BITSIZEOF_WINT_T -lt 32; then
16923     BITSIZEOF_WINT_T=32
16924   fi
16925
16926     STDINT_H=stdint.h
16927   fi
16928
16929    if test -n "$STDINT_H"; then
16930   GL_GENERATE_STDINT_H_TRUE=
16931   GL_GENERATE_STDINT_H_FALSE='#'
16932 else
16933   GL_GENERATE_STDINT_H_TRUE='#'
16934   GL_GENERATE_STDINT_H_FALSE=
16935 fi
16936
16937
16938
16939
16940 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16941 if test "x$ac_cv_have_decl_strdup" = xyes
16942 then :
16943   ac_have_decl=1
16944 else
16945   ac_have_decl=0
16946 fi
16947
16948 cat >>confdefs.h <<_ACEOF
16949 #define HAVE_DECL_STRDUP $ac_have_decl
16950 _ACEOF
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965      if test $gl_cv_have_include_next = yes; then
16966        gl_cv_next_string_h='<'string.h'>'
16967      else
16968        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16969 printf %s "checking absolute name of <string.h>... " >&6; }
16970 if test ${gl_cv_next_string_h+y}
16971 then :
16972   printf %s "(cached) " >&6
16973 else
16974
16975
16976
16977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978 /* end confdefs.h.  */
16979 #include <string.h>
16980 _ACEOF
16981                 case "$host_os" in
16982     aix*) gl_absname_cpp="$ac_cpp -C" ;;
16983     *)    gl_absname_cpp="$ac_cpp" ;;
16984   esac
16985
16986   case "$host_os" in
16987     mingw*)
16988                                           gl_dirsep_regex='[/\\]'
16989       ;;
16990     *)
16991       gl_dirsep_regex='\/'
16992       ;;
16993   esac
16994       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16995   gl_header_literal_regex=`echo 'string.h' \
16996                            | sed -e "$gl_make_literal_regex_sed"`
16997   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16998       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16999       s|^/[^/]|//&|
17000       p
17001       q
17002     }'
17003
17004         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17005   sed -n "$gl_absolute_header_sed"`
17006
17007            gl_header=$gl_cv_absolute_string_h
17008            gl_cv_next_string_h='"'$gl_header'"'
17009
17010
17011 fi
17012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17013 printf "%s\n" "$gl_cv_next_string_h" >&6; }
17014      fi
17015      NEXT_STRING_H=$gl_cv_next_string_h
17016
17017      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17018        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17019        gl_next_as_first_directive='<'string.h'>'
17020      else
17021        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17022        gl_next_as_first_directive=$gl_cv_next_string_h
17023      fi
17024      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17025
17026
17027
17028
17029
17030
17031
17032
17033   GNULIB_MKTIME=0;
17034   GNULIB_NANOSLEEP=0;
17035   GNULIB_STRPTIME=0;
17036   GNULIB_TIMEGM=0;
17037   GNULIB_TIME_R=0;
17038   GNULIB_TIME_RZ=0;
17039     HAVE_DECL_LOCALTIME_R=1;
17040   HAVE_NANOSLEEP=1;
17041   HAVE_STRPTIME=1;
17042   HAVE_TIMEGM=1;
17043         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17044   REPLACE_MKTIME=GNULIB_PORTCHECK;
17045   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17046   REPLACE_TIMEGM=GNULIB_PORTCHECK;
17047
17048       : ${GNULIB_GETTIMEOFDAY=0};
17049         REPLACE_GMTIME=0;
17050   REPLACE_LOCALTIME=0;
17051
17052
17053
17054   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17055 printf %s "checking for struct timespec in <time.h>... " >&6; }
17056 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
17057 then :
17058   printf %s "(cached) " >&6
17059 else
17060   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17061 /* end confdefs.h.  */
17062 #include <time.h>
17063
17064 int
17065 main (void)
17066 {
17067 static struct timespec x; x.tv_sec = x.tv_nsec;
17068   ;
17069   return 0;
17070 }
17071 _ACEOF
17072 if ac_fn_c_try_compile "$LINENO"
17073 then :
17074   gl_cv_sys_struct_timespec_in_time_h=yes
17075 else
17076   gl_cv_sys_struct_timespec_in_time_h=no
17077 fi
17078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17079 fi
17080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17081 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17082
17083   TIME_H_DEFINES_STRUCT_TIMESPEC=0
17084   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17085   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17086   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17087   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17088     TIME_H_DEFINES_STRUCT_TIMESPEC=1
17089   else
17090     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17091 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
17092 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
17093 then :
17094   printf %s "(cached) " >&6
17095 else
17096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097 /* end confdefs.h.  */
17098 #include <sys/time.h>
17099
17100 int
17101 main (void)
17102 {
17103 static struct timespec x; x.tv_sec = x.tv_nsec;
17104   ;
17105   return 0;
17106 }
17107 _ACEOF
17108 if ac_fn_c_try_compile "$LINENO"
17109 then :
17110   gl_cv_sys_struct_timespec_in_sys_time_h=yes
17111 else
17112   gl_cv_sys_struct_timespec_in_sys_time_h=no
17113 fi
17114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17115 fi
17116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17117 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17118     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17119       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17120     else
17121       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17122 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
17123 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
17124 then :
17125   printf %s "(cached) " >&6
17126 else
17127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17128 /* end confdefs.h.  */
17129 #include <pthread.h>
17130
17131 int
17132 main (void)
17133 {
17134 static struct timespec x; x.tv_sec = x.tv_nsec;
17135   ;
17136   return 0;
17137 }
17138 _ACEOF
17139 if ac_fn_c_try_compile "$LINENO"
17140 then :
17141   gl_cv_sys_struct_timespec_in_pthread_h=yes
17142 else
17143   gl_cv_sys_struct_timespec_in_pthread_h=no
17144 fi
17145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17146 fi
17147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17148 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17149       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17150         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17151       else
17152         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17153 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
17154 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
17155 then :
17156   printf %s "(cached) " >&6
17157 else
17158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17159 /* end confdefs.h.  */
17160 #include <unistd.h>
17161
17162 int
17163 main (void)
17164 {
17165 static struct timespec x; x.tv_sec = x.tv_nsec;
17166   ;
17167   return 0;
17168 }
17169 _ACEOF
17170 if ac_fn_c_try_compile "$LINENO"
17171 then :
17172   gl_cv_sys_struct_timespec_in_unistd_h=yes
17173 else
17174   gl_cv_sys_struct_timespec_in_unistd_h=no
17175 fi
17176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17177 fi
17178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17179 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17180         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17181           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17182         fi
17183       fi
17184     fi
17185   fi
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202      if test $gl_cv_have_include_next = yes; then
17203        gl_cv_next_time_h='<'time.h'>'
17204      else
17205        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17206 printf %s "checking absolute name of <time.h>... " >&6; }
17207 if test ${gl_cv_next_time_h+y}
17208 then :
17209   printf %s "(cached) " >&6
17210 else
17211
17212
17213
17214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17215 /* end confdefs.h.  */
17216 #include <time.h>
17217 _ACEOF
17218                 case "$host_os" in
17219     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17220     *)    gl_absname_cpp="$ac_cpp" ;;
17221   esac
17222
17223   case "$host_os" in
17224     mingw*)
17225                                           gl_dirsep_regex='[/\\]'
17226       ;;
17227     *)
17228       gl_dirsep_regex='\/'
17229       ;;
17230   esac
17231       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17232   gl_header_literal_regex=`echo 'time.h' \
17233                            | sed -e "$gl_make_literal_regex_sed"`
17234   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17235       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17236       s|^/[^/]|//&|
17237       p
17238       q
17239     }'
17240
17241         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17242   sed -n "$gl_absolute_header_sed"`
17243
17244            gl_header=$gl_cv_absolute_time_h
17245            gl_cv_next_time_h='"'$gl_header'"'
17246
17247
17248 fi
17249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17250 printf "%s\n" "$gl_cv_next_time_h" >&6; }
17251      fi
17252      NEXT_TIME_H=$gl_cv_next_time_h
17253
17254      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17255        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17256        gl_next_as_first_directive='<'time.h'>'
17257      else
17258        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17259        gl_next_as_first_directive=$gl_cv_next_time_h
17260      fi
17261      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
17274 printf %s "checking whether the utimes function works... " >&6; }
17275 if test ${gl_cv_func_working_utimes+y}
17276 then :
17277   printf %s "(cached) " >&6
17278 else
17279
17280   if test "$cross_compiling" = yes
17281 then :
17282   gl_cv_func_working_utimes=no
17283 else
17284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17285 /* end confdefs.h.  */
17286
17287 #include <sys/types.h>
17288 #include <sys/stat.h>
17289 #include <fcntl.h>
17290 #include <sys/time.h>
17291 #include <time.h>
17292 #include <unistd.h>
17293 #include <stdlib.h>
17294 #include <stdio.h>
17295 #include <utime.h>
17296 #include <errno.h>
17297
17298 static int
17299 inorder (time_t a, time_t b, time_t c)
17300 {
17301   return a <= b && b <= c;
17302 }
17303
17304 int
17305 main ()
17306 {
17307   int result = 0;
17308   char const *file = "conftest.utimes";
17309   /* On OS/2, file timestamps must be on or after 1980 in local time,
17310      with an even number of seconds.  */
17311   static struct timeval timeval[2] = {{315620000 + 10, 10},
17312                                       {315620000 + 1000000, 999998}};
17313
17314   /* Test whether utimes() essentially works.  */
17315   {
17316     struct stat sbuf;
17317     FILE *f = fopen (file, "w");
17318     if (f == NULL)
17319       result |= 1;
17320     else if (fclose (f) != 0)
17321       result |= 1;
17322     else if (utimes (file, timeval) != 0)
17323       result |= 2;
17324     else if (lstat (file, &sbuf) != 0)
17325       result |= 1;
17326     else if (!(sbuf.st_atime == timeval[0].tv_sec
17327                && sbuf.st_mtime == timeval[1].tv_sec))
17328       result |= 4;
17329     if (unlink (file) != 0)
17330       result |= 1;
17331   }
17332
17333   /* Test whether utimes() with a NULL argument sets the file's timestamp
17334      to the current time.  Use 'fstat' as well as 'time' to
17335      determine the "current" time, to accommodate NFS file systems
17336      if there is a time skew between the host and the NFS server.  */
17337   {
17338     int fd = open (file, O_WRONLY|O_CREAT, 0644);
17339     if (fd < 0)
17340       result |= 1;
17341     else
17342       {
17343         time_t t0, t2;
17344         struct stat st0, st1, st2;
17345         if (time (&t0) == (time_t) -1)
17346           result |= 1;
17347         else if (fstat (fd, &st0) != 0)
17348           result |= 1;
17349         else if (utimes (file, timeval) != 0
17350                  && (errno != EACCES
17351                      /* OS/2 kLIBC utimes fails on opened files.  */
17352                      || close (fd) != 0
17353                      || utimes (file, timeval) != 0
17354                      || (fd = open (file, O_WRONLY)) < 0))
17355           result |= 2;
17356         else if (utimes (file, NULL) != 0
17357                  && (errno != EACCES
17358                      /* OS/2 kLIBC utimes fails on opened files.  */
17359                      || close (fd) != 0
17360                      || utimes (file, NULL) != 0
17361                      || (fd = open (file, O_WRONLY)) < 0))
17362           result |= 8;
17363         else if (fstat (fd, &st1) != 0)
17364           result |= 1;
17365         else if (write (fd, "\n", 1) != 1)
17366           result |= 1;
17367         else if (fstat (fd, &st2) != 0)
17368           result |= 1;
17369         else if (time (&t2) == (time_t) -1)
17370           result |= 1;
17371         else
17372           {
17373             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
17374             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
17375             if (! (st1.st_atime == st1.st_mtime))
17376               result |= 16;
17377             if (! (m_ok_POSIX || m_ok_NFS))
17378               result |= 32;
17379           }
17380         if (close (fd) != 0)
17381           result |= 1;
17382       }
17383     if (unlink (file) != 0)
17384       result |= 1;
17385   }
17386
17387   /* Test whether utimes() with a NULL argument works on read-only files.  */
17388   {
17389     int fd = open (file, O_WRONLY|O_CREAT, 0444);
17390     if (fd < 0)
17391       result |= 1;
17392     else if (close (fd) != 0)
17393       result |= 1;
17394     else if (utimes (file, NULL) != 0)
17395       result |= 64;
17396     if (unlink (file) != 0)
17397       result |= 1;
17398   }
17399
17400   return result;
17401 }
17402
17403 _ACEOF
17404 if ac_fn_c_try_run "$LINENO"
17405 then :
17406   gl_cv_func_working_utimes=yes
17407 else
17408   gl_cv_func_working_utimes=no
17409 fi
17410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17411   conftest.$ac_objext conftest.beam conftest.$ac_ext
17412 fi
17413
17414 fi
17415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
17416 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
17417
17418   if test $gl_cv_func_working_utimes = yes; then
17419
17420 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
17421
17422   fi
17423
17424
17425
17426
17427
17428   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
17429 printf %s "checking for struct utimbuf... " >&6; }
17430 if test ${gl_cv_sys_struct_utimbuf+y}
17431 then :
17432   printf %s "(cached) " >&6
17433 else
17434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17435 /* end confdefs.h.  */
17436 #if HAVE_SYS_TIME_H
17437              #include <sys/time.h>
17438             #endif
17439             #include <time.h>
17440             #ifdef HAVE_UTIME_H
17441              #include <utime.h>
17442             #endif
17443
17444 int
17445 main (void)
17446 {
17447 static struct utimbuf x; x.actime = x.modtime;
17448   ;
17449   return 0;
17450 }
17451 _ACEOF
17452 if ac_fn_c_try_compile "$LINENO"
17453 then :
17454   gl_cv_sys_struct_utimbuf=yes
17455 else
17456   gl_cv_sys_struct_utimbuf=no
17457 fi
17458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17459 fi
17460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
17461 printf "%s\n" "$gl_cv_sys_struct_utimbuf" >&6; }
17462
17463   if test $gl_cv_sys_struct_utimbuf = yes; then
17464
17465 printf "%s\n" "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
17466
17467   fi
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480   GNULIB_BTOWC=0;
17481   GNULIB_WCTOB=0;
17482   GNULIB_MBSINIT=0;
17483   GNULIB_MBRTOWC=0;
17484   GNULIB_MBRLEN=0;
17485   GNULIB_MBSRTOWCS=0;
17486   GNULIB_MBSNRTOWCS=0;
17487   GNULIB_WCRTOMB=0;
17488   GNULIB_WCSRTOMBS=0;
17489   GNULIB_WCSNRTOMBS=0;
17490   GNULIB_WCWIDTH=0;
17491   GNULIB_WMEMCHR=0;
17492   GNULIB_WMEMCMP=0;
17493   GNULIB_WMEMCPY=0;
17494   GNULIB_WMEMMOVE=0;
17495   GNULIB_WMEMSET=0;
17496   GNULIB_WCSLEN=0;
17497   GNULIB_WCSNLEN=0;
17498   GNULIB_WCSCPY=0;
17499   GNULIB_WCPCPY=0;
17500   GNULIB_WCSNCPY=0;
17501   GNULIB_WCPNCPY=0;
17502   GNULIB_WCSCAT=0;
17503   GNULIB_WCSNCAT=0;
17504   GNULIB_WCSCMP=0;
17505   GNULIB_WCSNCMP=0;
17506   GNULIB_WCSCASECMP=0;
17507   GNULIB_WCSNCASECMP=0;
17508   GNULIB_WCSCOLL=0;
17509   GNULIB_WCSXFRM=0;
17510   GNULIB_WCSDUP=0;
17511   GNULIB_WCSCHR=0;
17512   GNULIB_WCSRCHR=0;
17513   GNULIB_WCSCSPN=0;
17514   GNULIB_WCSSPN=0;
17515   GNULIB_WCSPBRK=0;
17516   GNULIB_WCSSTR=0;
17517   GNULIB_WCSTOK=0;
17518   GNULIB_WCSWIDTH=0;
17519     HAVE_BTOWC=1;
17520   HAVE_MBSINIT=1;
17521   HAVE_MBRTOWC=1;
17522   HAVE_MBRLEN=1;
17523   HAVE_MBSRTOWCS=1;
17524   HAVE_MBSNRTOWCS=1;
17525   HAVE_WCRTOMB=1;
17526   HAVE_WCSRTOMBS=1;
17527   HAVE_WCSNRTOMBS=1;
17528   HAVE_WMEMCHR=1;
17529   HAVE_WMEMCMP=1;
17530   HAVE_WMEMCPY=1;
17531   HAVE_WMEMMOVE=1;
17532   HAVE_WMEMSET=1;
17533   HAVE_WCSLEN=1;
17534   HAVE_WCSNLEN=1;
17535   HAVE_WCSCPY=1;
17536   HAVE_WCPCPY=1;
17537   HAVE_WCSNCPY=1;
17538   HAVE_WCPNCPY=1;
17539   HAVE_WCSCAT=1;
17540   HAVE_WCSNCAT=1;
17541   HAVE_WCSCMP=1;
17542   HAVE_WCSNCMP=1;
17543   HAVE_WCSCASECMP=1;
17544   HAVE_WCSNCASECMP=1;
17545   HAVE_WCSCOLL=1;
17546   HAVE_WCSXFRM=1;
17547   HAVE_WCSDUP=1;
17548   HAVE_WCSCHR=1;
17549   HAVE_WCSRCHR=1;
17550   HAVE_WCSCSPN=1;
17551   HAVE_WCSSPN=1;
17552   HAVE_WCSPBRK=1;
17553   HAVE_WCSSTR=1;
17554   HAVE_WCSTOK=1;
17555   HAVE_WCSWIDTH=1;
17556   HAVE_DECL_WCTOB=1;
17557   HAVE_DECL_WCWIDTH=1;
17558   REPLACE_MBSTATE_T=0;
17559   REPLACE_BTOWC=0;
17560   REPLACE_WCTOB=0;
17561   REPLACE_MBSINIT=0;
17562   REPLACE_MBRTOWC=0;
17563   REPLACE_MBRLEN=0;
17564   REPLACE_MBSRTOWCS=0;
17565   REPLACE_MBSNRTOWCS=0;
17566   REPLACE_WCRTOMB=0;
17567   REPLACE_WCSRTOMBS=0;
17568   REPLACE_WCSNRTOMBS=0;
17569   REPLACE_WCWIDTH=0;
17570   REPLACE_WCSWIDTH=0;
17571
17572
17573             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
17574 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
17575 if test ${gl_cv_header_wchar_h_correct_inline+y}
17576 then :
17577   printf %s "(cached) " >&6
17578 else
17579   gl_cv_header_wchar_h_correct_inline=yes
17580      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h.  */
17582
17583        #define wcstod renamed_wcstod
17584 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17585    <wchar.h>.
17586    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17587    included before <wchar.h>.  */
17588 #include <stddef.h>
17589 #include <stdio.h>
17590 #include <time.h>
17591 #include <wchar.h>
17592 extern int zero (void);
17593 int main () { return zero(); }
17594
17595 _ACEOF
17596      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17597   (eval $ac_compile) 2>&5
17598   ac_status=$?
17599   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17600   test $ac_status = 0; }; then
17601        mv conftest.$ac_objext conftest1.$ac_objext
17602        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17603 /* end confdefs.h.  */
17604
17605          #define wcstod renamed_wcstod
17606 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17607    <wchar.h>.
17608    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17609    included before <wchar.h>.  */
17610 #include <stddef.h>
17611 #include <stdio.h>
17612 #include <time.h>
17613 #include <wchar.h>
17614 int zero (void) { return 0; }
17615
17616 _ACEOF
17617        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17618   (eval $ac_compile) 2>&5
17619   ac_status=$?
17620   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17621   test $ac_status = 0; }; then
17622          mv conftest.$ac_objext conftest2.$ac_objext
17623          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
17624            :
17625          else
17626            gl_cv_header_wchar_h_correct_inline=no
17627          fi
17628        fi
17629      fi
17630      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
17631
17632 fi
17633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
17634 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
17635   if test $gl_cv_header_wchar_h_correct_inline = no; then
17636     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
17637 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
17638 C99 mode. You have four options:
17639   - Add the flag -fgnu89-inline to CC and reconfigure, or
17640   - Fix your include files, using parts of
17641     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
17642   - Use a gcc version older than 4.3, or
17643   - Don't use the flags -std=c99 or -std=gnu99.
17644 Configuration aborted." "$LINENO" 5
17645   fi
17646
17647
17648    if false; then
17649   GL_COND_LIBTOOL_TRUE=
17650   GL_COND_LIBTOOL_FALSE='#'
17651 else
17652   GL_COND_LIBTOOL_TRUE='#'
17653   GL_COND_LIBTOOL_FALSE=
17654 fi
17655
17656   gl_cond_libtool=false
17657   gl_libdeps=
17658   gl_ltlibdeps=
17659   gl_m4_base='m4'
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669   gl_source_base='lib'
17670
17671
17672   if test $ac_cv_func_alloca_works = no; then
17673     :
17674   fi
17675
17676   # Define an additional variable used in the Makefile substitution.
17677   if test $ac_cv_working_alloca_h = yes; then
17678     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17679 printf %s "checking for alloca as a compiler built-in... " >&6; }
17680 if test ${gl_cv_rpl_alloca+y}
17681 then :
17682   printf %s "(cached) " >&6
17683 else
17684
17685       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17686 /* end confdefs.h.  */
17687
17688 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17689         Need own alloca
17690 #endif
17691
17692 _ACEOF
17693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17694   $EGREP "Need own alloca" >/dev/null 2>&1
17695 then :
17696   gl_cv_rpl_alloca=yes
17697 else
17698   gl_cv_rpl_alloca=no
17699 fi
17700 rm -rf conftest*
17701
17702
17703 fi
17704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17705 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
17706     if test $gl_cv_rpl_alloca = yes; then
17707
17708 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
17709
17710       ALLOCA_H=alloca.h
17711     else
17712                   ALLOCA_H=
17713     fi
17714   else
17715     ALLOCA_H=alloca.h
17716   fi
17717
17718    if test -n "$ALLOCA_H"; then
17719   GL_GENERATE_ALLOCA_H_TRUE=
17720   GL_GENERATE_ALLOCA_H_FALSE='#'
17721 else
17722   GL_GENERATE_ALLOCA_H_TRUE='#'
17723   GL_GENERATE_ALLOCA_H_FALSE=
17724 fi
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
17736
17737
17738
17739
17740        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
17741 printf %s "checking for GNU libc compatible calloc... " >&6; }
17742 if test ${ac_cv_func_calloc_0_nonnull+y}
17743 then :
17744   printf %s "(cached) " >&6
17745 else
17746   if test "$cross_compiling" = yes
17747 then :
17748   case "$host_os" in
17749                   # Guess yes on glibc systems.
17750           *-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
17751                   # If we don't know, assume the worst.
17752           *)      ac_cv_func_calloc_0_nonnull="guessing no" ;;
17753         esac
17754
17755 else
17756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17757 /* end confdefs.h.  */
17758 $ac_includes_default
17759 int
17760 main (void)
17761 {
17762 int result = 0;
17763             char *p = calloc (0, 0);
17764             if (!p)
17765               result |= 1;
17766             free (p);
17767             p = calloc ((size_t) -1 / 8 + 1, 8);
17768             if (p)
17769               result |= 2;
17770             free (p);
17771             return result;
17772
17773   ;
17774   return 0;
17775 }
17776 _ACEOF
17777 if ac_fn_c_try_run "$LINENO"
17778 then :
17779   ac_cv_func_calloc_0_nonnull=yes
17780 else
17781   ac_cv_func_calloc_0_nonnull=no
17782 fi
17783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17784   conftest.$ac_objext conftest.beam conftest.$ac_ext
17785 fi
17786
17787 fi
17788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
17789 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
17790   case "$ac_cv_func_calloc_0_nonnull" in
17791     *yes)
17792
17793 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
17794
17795       ;;
17796     *)
17797       printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
17798
17799      REPLACE_CALLOC=1
17800
17801       ;;
17802   esac
17803
17804
17805   if test $REPLACE_CALLOC = 1; then
17806
17807
17808
17809
17810
17811
17812
17813
17814   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17815
17816   fi
17817
17818
17819 cat >>confdefs.h <<_ACEOF
17820 #define GNULIB_CALLOC_GNU 1
17821 _ACEOF
17822
17823
17824
17825
17826
17827   if test $gl_cv_func_malloc_posix = yes; then
17828
17829 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
17830
17831   else
17832     REPLACE_CALLOC=1
17833   fi
17834
17835   if test $REPLACE_CALLOC = 1; then
17836
17837
17838
17839
17840
17841
17842
17843
17844   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
17845
17846   fi
17847
17848
17849
17850
17851
17852           GNULIB_CALLOC_POSIX=1
17853
17854
17855
17856
17857
17858 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
17859
17860
17861
17862
17863
17864
17865
17866
17867           GNULIB_CHDIR=1
17868
17869
17870
17871
17872
17873 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17874
17875
17876
17877
17878
17879   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17880 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
17881 if test ${gl_cv_have_arbitrary_file_name_length_limit+y}
17882 then :
17883   printf %s "(cached) " >&6
17884 else
17885   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17886 /* end confdefs.h.  */
17887
17888 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17889 #if HAVE_UNISTD_H
17890 # include <unistd.h>
17891 #endif
17892 #include <limits.h>
17893 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17894 # include <sys/param.h>
17895 #endif
17896 #if !defined PATH_MAX && defined MAXPATHLEN
17897 # define PATH_MAX MAXPATHLEN
17898 #endif
17899 #ifdef __hpux
17900 # undef PATH_MAX
17901 # define PATH_MAX 1024
17902 #endif
17903 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17904 # undef PATH_MAX
17905 # define PATH_MAX 260
17906 #endif
17907
17908 #ifdef PATH_MAX
17909 have_arbitrary_file_name_length_limit
17910 #endif
17911 _ACEOF
17912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17913   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
17914 then :
17915   gl_cv_have_arbitrary_file_name_length_limit=yes
17916 else
17917   gl_cv_have_arbitrary_file_name_length_limit=no
17918 fi
17919 rm -rf conftest*
17920
17921 fi
17922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17923 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17924
17925   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17926
17927
17928
17929
17930
17931
17932
17933
17934   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17935
17936     :
17937   fi
17938
17939
17940
17941   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17942   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17943
17944   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
17945   # programs in the package would end up linked with that potentially-shared
17946   # library, inducing unnecessary run-time overhead.
17947   LIB_CLOCK_GETTIME=
17948
17949   gl_saved_libs=$LIBS
17950     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17951 printf %s "checking for library containing clock_gettime... " >&6; }
17952 if test ${ac_cv_search_clock_gettime+y}
17953 then :
17954   printf %s "(cached) " >&6
17955 else
17956   ac_func_search_save_LIBS=$LIBS
17957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17958 /* end confdefs.h.  */
17959
17960 /* Override any GCC internal prototype to avoid an error.
17961    Use char because int might match the return type of a GCC
17962    builtin and then its argument prototype would still apply.  */
17963 #ifdef __cplusplus
17964 extern "C"
17965 #endif
17966 char clock_gettime ();
17967 int
17968 main (void)
17969 {
17970 return clock_gettime ();
17971   ;
17972   return 0;
17973 }
17974 _ACEOF
17975 for ac_lib in '' rt posix4
17976 do
17977   if test -z "$ac_lib"; then
17978     ac_res="none required"
17979   else
17980     ac_res=-l$ac_lib
17981     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17982   fi
17983   if ac_fn_c_try_link "$LINENO"
17984 then :
17985   ac_cv_search_clock_gettime=$ac_res
17986 fi
17987 rm -f core conftest.err conftest.$ac_objext \
17988     conftest$ac_exeext
17989   if test ${ac_cv_search_clock_gettime+y}
17990 then :
17991   break
17992 fi
17993 done
17994 if test ${ac_cv_search_clock_gettime+y}
17995 then :
17996
17997 else
17998   ac_cv_search_clock_gettime=no
17999 fi
18000 rm conftest.$ac_ext
18001 LIBS=$ac_func_search_save_LIBS
18002 fi
18003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18004 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
18005 ac_res=$ac_cv_search_clock_gettime
18006 if test "$ac_res" != no
18007 then :
18008   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18009   test "$ac_cv_search_clock_gettime" = "none required" ||
18010                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18011 fi
18012
18013     for ac_func in clock_gettime clock_settime
18014 do :
18015   as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
18016 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18017 if eval test \"x\$"$as_ac_var"\" = x"yes"
18018 then :
18019   cat >>confdefs.h <<_ACEOF
18020 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
18021 _ACEOF
18022
18023 fi
18024 done
18025
18026   LIBS=$gl_saved_libs
18027
18028
18029
18030 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18031
18032
18033
18034
18035
18036   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18037     REPLACE_CLOSE=1
18038   fi
18039
18040
18041
18042
18043
18044   if test $ac_cv_header_sys_socket_h != yes; then
18045                     for ac_header in winsock2.h
18046 do :
18047   ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18048 if test "x$ac_cv_header_winsock2_h" = xyes
18049 then :
18050   cat >>confdefs.h <<_ACEOF
18051 #define HAVE_WINSOCK2_H 1
18052 _ACEOF
18053
18054 fi
18055 done
18056
18057   fi
18058   if test "$ac_cv_header_winsock2_h" = yes; then
18059     HAVE_WINSOCK2_H=1
18060     UNISTD_H_HAVE_WINSOCK2_H=1
18061     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18062   else
18063     HAVE_WINSOCK2_H=0
18064   fi
18065
18066
18067     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18068                         REPLACE_CLOSE=1
18069     fi
18070
18071
18072     if test $REPLACE_CLOSE = 0; then
18073
18074
18075
18076   if test $ac_cv_func_fchdir = no; then
18077     HAVE_FCHDIR=0
18078   fi
18079
18080       if test $HAVE_FCHDIR = 0; then
18081         REPLACE_CLOSE=1
18082       fi
18083     fi
18084
18085
18086   if test $REPLACE_CLOSE = 1; then
18087
18088
18089
18090
18091
18092
18093
18094
18095   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
18096
18097   fi
18098
18099
18100
18101
18102
18103           GNULIB_CLOSE=1
18104
18105
18106
18107
18108
18109 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18110
18111
18112
18113
18114
18115
18116   for ac_func in closedir
18117 do :
18118   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
18119 if test "x$ac_cv_func_closedir" = xyes
18120 then :
18121   cat >>confdefs.h <<_ACEOF
18122 #define HAVE_CLOSEDIR 1
18123 _ACEOF
18124
18125 fi
18126 done
18127
18128   if test $ac_cv_func_closedir = no; then
18129     HAVE_CLOSEDIR=0
18130   fi
18131
18132
18133
18134
18135   if test $ac_cv_func_fchdir = no; then
18136     HAVE_FCHDIR=0
18137   fi
18138
18139     if test $HAVE_FCHDIR = 0; then
18140       if test $HAVE_CLOSEDIR = 1; then
18141         REPLACE_CLOSEDIR=1
18142       fi
18143     fi
18144
18145     case $host_os,$HAVE_CLOSEDIR in
18146     os2*,1)
18147       REPLACE_CLOSEDIR=1;;
18148   esac
18149
18150   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
18151
18152
18153
18154
18155
18156
18157
18158
18159   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
18160
18161   fi
18162
18163
18164
18165
18166
18167           GNULIB_CLOSEDIR=1
18168
18169
18170
18171
18172
18173 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189      if test $gl_cv_have_include_next = yes; then
18190        gl_cv_next_dirent_h='<'dirent.h'>'
18191      else
18192        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18193 printf %s "checking absolute name of <dirent.h>... " >&6; }
18194 if test ${gl_cv_next_dirent_h+y}
18195 then :
18196   printf %s "(cached) " >&6
18197 else
18198
18199              if test $ac_cv_header_dirent_h = yes; then
18200
18201
18202
18203
18204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18205 /* end confdefs.h.  */
18206 #include <dirent.h>
18207 _ACEOF
18208                 case "$host_os" in
18209     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18210     *)    gl_absname_cpp="$ac_cpp" ;;
18211   esac
18212
18213   case "$host_os" in
18214     mingw*)
18215                                           gl_dirsep_regex='[/\\]'
18216       ;;
18217     *)
18218       gl_dirsep_regex='\/'
18219       ;;
18220   esac
18221       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18222   gl_header_literal_regex=`echo 'dirent.h' \
18223                            | sed -e "$gl_make_literal_regex_sed"`
18224   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18225       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18226       s|^/[^/]|//&|
18227       p
18228       q
18229     }'
18230
18231         gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18232   sed -n "$gl_absolute_header_sed"`
18233
18234            gl_header=$gl_cv_absolute_dirent_h
18235            gl_cv_next_dirent_h='"'$gl_header'"'
18236           else
18237                gl_cv_next_dirent_h='<'dirent.h'>'
18238              fi
18239
18240
18241 fi
18242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18243 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
18244      fi
18245      NEXT_DIRENT_H=$gl_cv_next_dirent_h
18246
18247      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18248        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18249        gl_next_as_first_directive='<'dirent.h'>'
18250      else
18251        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18252        gl_next_as_first_directive=$gl_cv_next_dirent_h
18253      fi
18254      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18255
18256
18257
18258
18259   if test $ac_cv_header_dirent_h = yes; then
18260     HAVE_DIRENT_H=1
18261   else
18262     HAVE_DIRENT_H=0
18263   fi
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273 cat >>confdefs.h <<_ACEOF
18274 #define GNULIB_DIRENT_SAFER 1
18275 _ACEOF
18276
18277
18278
18279
18280
18281
18282
18283   for ac_func in dirfd
18284 do :
18285   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18286 if test "x$ac_cv_func_dirfd" = xyes
18287 then :
18288   cat >>confdefs.h <<_ACEOF
18289 #define HAVE_DIRFD 1
18290 _ACEOF
18291
18292 fi
18293 done
18294
18295   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18296       #include <dirent.h>
18297 "
18298 if test "x$ac_cv_have_decl_dirfd" = xyes
18299 then :
18300   ac_have_decl=1
18301 else
18302   ac_have_decl=0
18303 fi
18304
18305 cat >>confdefs.h <<_ACEOF
18306 #define HAVE_DECL_DIRFD $ac_have_decl
18307 _ACEOF
18308
18309   if test $ac_cv_have_decl_dirfd = no; then
18310     HAVE_DECL_DIRFD=0
18311   fi
18312
18313   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18314 printf %s "checking whether dirfd is a macro... " >&6; }
18315 if test ${gl_cv_func_dirfd_macro+y}
18316 then :
18317   printf %s "(cached) " >&6
18318 else
18319   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18320 /* end confdefs.h.  */
18321
18322 #include <sys/types.h>
18323 #include <dirent.h>
18324 #ifdef dirfd
18325  dirent_header_defines_dirfd
18326 #endif
18327 _ACEOF
18328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18329   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
18330 then :
18331   gl_cv_func_dirfd_macro=yes
18332 else
18333   gl_cv_func_dirfd_macro=no
18334 fi
18335 rm -rf conftest*
18336
18337 fi
18338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18339 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
18340
18341   # Use the replacement if we have no function or macro with that name,
18342   # or if OS/2 kLIBC whose dirfd() does not work.
18343   # Replace only if the system declares dirfd already.
18344   case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
18345     no,no,*,yes | *,*,os2*,yes)
18346       REPLACE_DIRFD=1
18347
18348 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
18349 ;;
18350   esac
18351
18352   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
18353      || test $REPLACE_DIRFD = 1; then
18354
18355
18356
18357
18358
18359
18360
18361
18362   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18363
18364
18365   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18366 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18367 if test ${gl_cv_sys_dir_fd_member_name+y}
18368 then :
18369   printf %s "(cached) " >&6
18370 else
18371
18372       dirfd_save_CFLAGS=$CFLAGS
18373       for ac_expr in d_fd dd_fd; do
18374
18375         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18376         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18377 /* end confdefs.h.  */
18378
18379            #include <sys/types.h>
18380            #include <dirent.h>
18381 int
18382 main (void)
18383 {
18384 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18385   ;
18386   return 0;
18387 }
18388 _ACEOF
18389 if ac_fn_c_try_compile "$LINENO"
18390 then :
18391   dir_fd_found=yes
18392
18393 fi
18394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18395         CFLAGS=$dirfd_save_CFLAGS
18396         test "$dir_fd_found" = yes && break
18397       done
18398       test "$dir_fd_found" = yes || ac_expr=no_such_member
18399
18400       gl_cv_sys_dir_fd_member_name=$ac_expr
18401
18402
18403 fi
18404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18405 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
18406   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18407
18408 cat >>confdefs.h <<_ACEOF
18409 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18410 _ACEOF
18411
18412   fi
18413
18414
18415   fi
18416
18417
18418
18419
18420
18421           GNULIB_DIRFD=1
18422
18423
18424
18425
18426
18427 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18438 printf %s "checking whether // is distinct from /... " >&6; }
18439 if test ${gl_cv_double_slash_root+y}
18440 then :
18441   printf %s "(cached) " >&6
18442 else
18443    if test x"$cross_compiling" = xyes ; then
18444         # When cross-compiling, there is no way to tell whether // is special
18445         # short of a list of hosts.  However, the only known hosts to date
18446         # that have a distinct // are Apollo DomainOS (too old to port to),
18447         # Cygwin, and z/OS.  If anyone knows of another system for which // has
18448         # special semantics and is distinct from /, please report it to
18449         # <bug-gnulib@gnu.org>.
18450         case $host in
18451           *-cygwin | i370-ibm-openedition)
18452             gl_cv_double_slash_root=yes ;;
18453           *)
18454             # Be optimistic and assume that / and // are the same when we
18455             # don't know.
18456             gl_cv_double_slash_root='unknown, assuming no' ;;
18457         esac
18458       else
18459         set x `ls -di / // 2>/dev/null`
18460         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18461           gl_cv_double_slash_root=no
18462         else
18463           gl_cv_double_slash_root=yes
18464         fi
18465       fi
18466 fi
18467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18468 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
18469   if test "$gl_cv_double_slash_root" = yes; then
18470
18471 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18472
18473   fi
18474
18475
18476
18477
18478   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18479     REPLACE_DUP=1
18480   fi
18481
18482
18483
18484
18485   if test $ac_cv_func_fchdir = no; then
18486     HAVE_FCHDIR=0
18487   fi
18488
18489     if test $HAVE_FCHDIR = 0; then
18490       REPLACE_DUP=1
18491     fi
18492
18493   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
18494 printf %s "checking whether dup works... " >&6; }
18495 if test ${gl_cv_func_dup_works+y}
18496 then :
18497   printf %s "(cached) " >&6
18498 else
18499   if test "$cross_compiling" = yes
18500 then :
18501   gl_cv_func_dup_works='guessing yes'
18502 else
18503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18504 /* end confdefs.h.  */
18505 #include <unistd.h>
18506                          #include <fcntl.h>
18507                          #include <errno.h>
18508 int
18509 main (void)
18510 {
18511 /* On OS/2 kLIBC, dup does not work on a directory fd.  */
18512            int fd = open (".", O_RDONLY);
18513            return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
18514
18515   ;
18516   return 0;
18517 }
18518
18519 _ACEOF
18520 if ac_fn_c_try_run "$LINENO"
18521 then :
18522   gl_cv_func_dup_works=yes
18523 else
18524   gl_cv_func_dup_works=no
18525 fi
18526 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18527   conftest.$ac_objext conftest.beam conftest.$ac_ext
18528 fi
18529
18530
18531 fi
18532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
18533 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
18534   case "$gl_cv_func_dup_works" in
18535     *yes) ;;
18536     *)
18537       REPLACE_DUP=1
18538       ;;
18539   esac
18540
18541   if test $REPLACE_DUP = 1; then
18542
18543
18544
18545
18546
18547
18548
18549
18550   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18551
18552     :
18553   fi
18554
18555
18556
18557
18558
18559           GNULIB_DUP=1
18560
18561
18562
18563
18564
18565 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
18566
18567
18568
18569
18570
18571
18572
18573
18574 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
18575
18576
18577   if test $HAVE_DUP2 = 1; then
18578     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18579 printf %s "checking whether dup2 works... " >&6; }
18580 if test ${gl_cv_func_dup2_works+y}
18581 then :
18582   printf %s "(cached) " >&6
18583 else
18584   if test "$cross_compiling" = yes
18585 then :
18586   case "$host_os" in
18587            mingw*) # on this platform, dup2 always returns 0 for success
18588              gl_cv_func_dup2_works="guessing no" ;;
18589            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18590              gl_cv_func_dup2_works="guessing no" ;;
18591            aix* | freebsd*)
18592                    # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
18593                    # not EBADF.
18594              gl_cv_func_dup2_works="guessing no" ;;
18595            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18596              gl_cv_func_dup2_works="guessing no" ;;
18597            *-android*) # implemented using dup3(), which fails if oldfd == newfd
18598              gl_cv_func_dup2_works="guessing no" ;;
18599            os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
18600              gl_cv_func_dup2_works="guessing no" ;;
18601            *) gl_cv_func_dup2_works="guessing yes" ;;
18602          esac
18603 else
18604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18605 /* end confdefs.h.  */
18606
18607          #include <errno.h>
18608              #include <fcntl.h>
18609              #include <limits.h>
18610              #include <sys/resource.h>
18611              #include <unistd.h>
18612              #ifndef RLIM_SAVED_CUR
18613              # define RLIM_SAVED_CUR RLIM_INFINITY
18614              #endif
18615              #ifndef RLIM_SAVED_MAX
18616              # define RLIM_SAVED_MAX RLIM_INFINITY
18617              #endif
18618
18619 int
18620 main (void)
18621 {
18622 int result = 0;
18623              int bad_fd = INT_MAX;
18624              struct rlimit rlim;
18625              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18626                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18627                  && rlim.rlim_cur != RLIM_INFINITY
18628                  && rlim.rlim_cur != RLIM_SAVED_MAX
18629                  && rlim.rlim_cur != RLIM_SAVED_CUR)
18630                bad_fd = rlim.rlim_cur;
18631              #ifdef FD_CLOEXEC
18632                if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18633                  result |= 1;
18634              #endif
18635              if (dup2 (1, 1) != 1)
18636                result |= 2;
18637              #ifdef FD_CLOEXEC
18638                if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18639                  result |= 4;
18640              #endif
18641              close (0);
18642              if (dup2 (0, 0) != -1)
18643                result |= 8;
18644              /* Many gnulib modules require POSIX conformance of EBADF.  */
18645              if (dup2 (2, bad_fd) == -1 && errno != EBADF)
18646                result |= 16;
18647              /* Flush out some cygwin core dumps.  */
18648              if (dup2 (2, -1) != -1 || errno != EBADF)
18649                result |= 32;
18650              dup2 (2, 255);
18651              dup2 (2, 256);
18652              /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
18653              {
18654                int fd = open (".", O_RDONLY);
18655                if (fd == -1)
18656                  result |= 64;
18657                else if (dup2 (fd, fd + 1) == -1)
18658                  result |= 128;
18659
18660                close (fd);
18661              }
18662              return result;
18663   ;
18664   return 0;
18665 }
18666
18667 _ACEOF
18668 if ac_fn_c_try_run "$LINENO"
18669 then :
18670   gl_cv_func_dup2_works=yes
18671 else
18672   gl_cv_func_dup2_works=no
18673 fi
18674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18675   conftest.$ac_objext conftest.beam conftest.$ac_ext
18676 fi
18677
18678
18679 fi
18680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18681 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
18682     case "$gl_cv_func_dup2_works" in
18683       *yes) ;;
18684       *)
18685         REPLACE_DUP2=1
18686         for ac_func in setdtablesize
18687 do :
18688   ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
18689 if test "x$ac_cv_func_setdtablesize" = xyes
18690 then :
18691   cat >>confdefs.h <<_ACEOF
18692 #define HAVE_SETDTABLESIZE 1
18693 _ACEOF
18694
18695 fi
18696 done
18697
18698         ;;
18699     esac
18700   fi
18701
18702
18703
18704
18705   if test $ac_cv_func_fchdir = no; then
18706     HAVE_FCHDIR=0
18707   fi
18708
18709     if test $HAVE_FCHDIR = 0; then
18710       if test $HAVE_DUP2 = 1; then
18711         REPLACE_DUP2=1
18712       fi
18713     fi
18714
18715
18716   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18717
18718
18719
18720
18721
18722
18723
18724
18725   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18726
18727
18728   fi
18729
18730
18731
18732
18733
18734           GNULIB_DUP2=1
18735
18736
18737
18738
18739
18740 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18741
18742
18743
18744
18745
18746       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18747 printf %s "checking for error_at_line... " >&6; }
18748 if test ${ac_cv_lib_error_at_line+y}
18749 then :
18750   printf %s "(cached) " >&6
18751 else
18752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18753 /* end confdefs.h.  */
18754 #include <error.h>
18755 int
18756 main (void)
18757 {
18758 error_at_line (0, 0, "", 0, "an error occurred");
18759   ;
18760   return 0;
18761 }
18762 _ACEOF
18763 if ac_fn_c_try_link "$LINENO"
18764 then :
18765   ac_cv_lib_error_at_line=yes
18766 else
18767   ac_cv_lib_error_at_line=no
18768 fi
18769 rm -f core conftest.err conftest.$ac_objext \
18770     conftest$ac_exeext conftest.$ac_ext
18771 fi
18772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18773 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
18774
18775   if test $ac_cv_lib_error_at_line = no; then
18776
18777
18778
18779
18780
18781
18782
18783
18784   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18785
18786
18787
18788   :
18789
18790   fi
18791
18792
18793
18794
18795
18796
18797
18798   if test $ac_cv_have_decl_fchdir = no; then
18799     HAVE_DECL_FCHDIR=0
18800   fi
18801
18802
18803   if test $HAVE_FCHDIR = 0; then
18804
18805
18806
18807
18808
18809
18810
18811
18812   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18813
18814     :
18815
18816 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
18817
18818                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18819 printf %s "checking whether open can visit directories... " >&6; }
18820 if test ${gl_cv_func_open_directory_works+y}
18821 then :
18822   printf %s "(cached) " >&6
18823 else
18824   if test "$cross_compiling" = yes
18825 then :
18826   case "$host_os" in
18827                    # Guess yes on glibc systems.
18828            *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18829                    # If we don't know, assume the worst.
18830            *)      gl_cv_func_open_directory_works="guessing no" ;;
18831          esac
18832
18833 else
18834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18835 /* end confdefs.h.  */
18836 #include <fcntl.h>
18837
18838 int
18839 main (void)
18840 {
18841 return open(".", O_RDONLY) < 0;
18842   ;
18843   return 0;
18844 }
18845 _ACEOF
18846 if ac_fn_c_try_run "$LINENO"
18847 then :
18848   gl_cv_func_open_directory_works=yes
18849 else
18850   gl_cv_func_open_directory_works=no
18851 fi
18852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18853   conftest.$ac_objext conftest.beam conftest.$ac_ext
18854 fi
18855
18856 fi
18857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18858 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
18859     case "$gl_cv_func_open_directory_works" in
18860       *yes) ;;
18861       *)
18862
18863 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18864
18865         ;;
18866     esac
18867   fi
18868
18869
18870
18871
18872
18873
18874           GNULIB_FCHDIR=1
18875
18876
18877
18878
18879
18880 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18881
18882
18883
18884
18885
18886
18887
18888
18889   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
18890 printf %s "checking whether fflush works on input streams... " >&6; }
18891 if test ${gl_cv_func_fflush_stdin+y}
18892 then :
18893   printf %s "(cached) " >&6
18894 else
18895   echo hello world > conftest.txt
18896      if test "$cross_compiling" = yes
18897 then :
18898   gl_cv_func_fflush_stdin=cross
18899 else
18900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18901 /* end confdefs.h.  */
18902
18903 #include <stdio.h>
18904 #if HAVE_UNISTD_H
18905 # include <unistd.h>
18906 #else /* on Windows with MSVC */
18907 # include <io.h>
18908 #endif
18909
18910 int
18911 main (void)
18912 {
18913 FILE *f = fopen ("conftest.txt", "r");
18914          char buffer[10];
18915          int fd;
18916          int c;
18917          if (f == NULL)
18918            return 1;
18919          fd = fileno (f);
18920          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
18921            return 2;
18922          /* For deterministic results, ensure f read a bigger buffer.  */
18923          if (lseek (fd, 0, SEEK_CUR) == 5)
18924            return 3;
18925          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
18926             on BSD systems and on mingw.  */
18927          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
18928            return 4;
18929          if (lseek (fd, 0, SEEK_CUR) != 5)
18930            return 5;
18931          /* Verify behaviour of fflush after ungetc. See
18932             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
18933          /* Verify behaviour of fflush after a backup ungetc.  This fails on
18934             mingw.  */
18935          c = fgetc (f);
18936          ungetc (c, f);
18937          fflush (f);
18938          if (fgetc (f) != c)
18939            return 6;
18940          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
18941             on glibc 2.8 and on BSD systems.  */
18942          c = fgetc (f);
18943          ungetc ('@', f);
18944          fflush (f);
18945          if (fgetc (f) != c)
18946            return 7;
18947          return 0;
18948
18949   ;
18950   return 0;
18951 }
18952 _ACEOF
18953 if ac_fn_c_try_run "$LINENO"
18954 then :
18955   gl_cv_func_fflush_stdin=yes
18956 else
18957   gl_cv_func_fflush_stdin=no
18958 fi
18959 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18960   conftest.$ac_objext conftest.beam conftest.$ac_ext
18961 fi
18962
18963      rm conftest.txt
18964
18965 fi
18966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
18967 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
18968   case $gl_cv_func_fflush_stdin in
18969     yes) gl_func_fflush_stdin=1 ;;
18970     no)  gl_func_fflush_stdin=0 ;;
18971     *)   gl_func_fflush_stdin='(-1)' ;;
18972   esac
18973
18974 cat >>confdefs.h <<_ACEOF
18975 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
18976 _ACEOF
18977
18978
18979   if test $gl_cv_func_fflush_stdin != yes; then
18980     REPLACE_FCLOSE=1
18981   fi
18982
18983
18984   if test $REPLACE_CLOSE = 1; then
18985     REPLACE_FCLOSE=1
18986   fi
18987
18988   if test $REPLACE_FCLOSE = 1; then
18989
18990
18991
18992
18993
18994
18995
18996
18997   gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
18998
18999   fi
19000
19001
19002
19003
19004
19005           GNULIB_FCLOSE=1
19006
19007
19008
19009
19010
19011 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
19012
19013
19014
19015
19016
19017
19018
19019
19020   if test $ac_cv_func_fcntl = no; then
19021
19022
19023
19024   if test $ac_cv_func_fcntl = no; then
19025     HAVE_FCNTL=0
19026   else
19027     REPLACE_FCNTL=1
19028   fi
19029
19030   else
19031             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19032 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19033 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
19034 then :
19035   printf %s "(cached) " >&6
19036 else
19037   if test "$cross_compiling" = yes
19038 then :
19039   case $host_os in
19040             aix* | cygwin* | haiku*)
19041                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19042             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19043           esac
19044 else
19045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19046 /* end confdefs.h.  */
19047 #include <errno.h>
19048               #include <fcntl.h>
19049               #include <limits.h>
19050               #include <sys/resource.h>
19051               #include <unistd.h>
19052               #ifndef RLIM_SAVED_CUR
19053               # define RLIM_SAVED_CUR RLIM_INFINITY
19054               #endif
19055               #ifndef RLIM_SAVED_MAX
19056               # define RLIM_SAVED_MAX RLIM_INFINITY
19057               #endif
19058
19059 int
19060 main (void)
19061 {
19062 int result = 0;
19063               int bad_fd = INT_MAX;
19064               struct rlimit rlim;
19065               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19066                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19067                   && rlim.rlim_cur != RLIM_INFINITY
19068                   && rlim.rlim_cur != RLIM_SAVED_MAX
19069                   && rlim.rlim_cur != RLIM_SAVED_CUR)
19070                 bad_fd = rlim.rlim_cur;
19071               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19072               if (errno != EINVAL) result |= 2;
19073               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19074               if (errno != EINVAL) result |= 8;
19075               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19076               {
19077                 int fd;
19078                 fd = open (".", O_RDONLY);
19079                 if (fd == -1)
19080                   result |= 16;
19081                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19082                   result |= 32;
19083
19084                 close (fd);
19085               }
19086               return result;
19087   ;
19088   return 0;
19089 }
19090 _ACEOF
19091 if ac_fn_c_try_run "$LINENO"
19092 then :
19093   gl_cv_func_fcntl_f_dupfd_works=yes
19094 else
19095   gl_cv_func_fcntl_f_dupfd_works=no
19096 fi
19097 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19098   conftest.$ac_objext conftest.beam conftest.$ac_ext
19099 fi
19100
19101 fi
19102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19103 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19104     case $gl_cv_func_fcntl_f_dupfd_works in
19105       *yes) ;;
19106       *)
19107
19108
19109   if test $ac_cv_func_fcntl = no; then
19110     HAVE_FCNTL=0
19111   else
19112     REPLACE_FCNTL=1
19113   fi
19114
19115
19116 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19117  ;;
19118     esac
19119
19120         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19121 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19122 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
19123 then :
19124   printf %s "(cached) " >&6
19125 else
19126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19127 /* end confdefs.h.  */
19128
19129 #include <fcntl.h>
19130 #ifndef F_DUPFD_CLOEXEC
19131 choke me
19132 #endif
19133
19134 int
19135 main (void)
19136 {
19137
19138   ;
19139   return 0;
19140 }
19141 _ACEOF
19142 if ac_fn_c_try_compile "$LINENO"
19143 then :
19144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19145 /* end confdefs.h.  */
19146
19147 #ifdef __linux__
19148 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19149    it to support the semantics on older kernels that failed with EINVAL.  */
19150 choke me
19151 #endif
19152
19153 int
19154 main (void)
19155 {
19156
19157   ;
19158   return 0;
19159 }
19160 _ACEOF
19161 if ac_fn_c_try_compile "$LINENO"
19162 then :
19163   gl_cv_func_fcntl_f_dupfd_cloexec=yes
19164 else
19165   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19166 fi
19167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19168 else
19169   gl_cv_func_fcntl_f_dupfd_cloexec=no
19170 fi
19171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19172 fi
19173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19174 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19175     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
19176
19177
19178
19179   if test $ac_cv_func_fcntl = no; then
19180     HAVE_FCNTL=0
19181   else
19182     REPLACE_FCNTL=1
19183   fi
19184
19185           fi
19186   fi
19187
19188
19189
19190
19191   if test $ac_cv_func_fchdir = no; then
19192     HAVE_FCHDIR=0
19193   fi
19194
19195     if test $HAVE_FCHDIR = 0; then
19196
19197
19198
19199   if test $ac_cv_func_fcntl = no; then
19200     HAVE_FCNTL=0
19201   else
19202     REPLACE_FCNTL=1
19203   fi
19204
19205     fi
19206
19207
19208   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
19209
19210
19211
19212
19213
19214
19215
19216
19217   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
19218
19219   fi
19220
19221
19222
19223
19224
19225           GNULIB_FCNTL=1
19226
19227
19228
19229
19230
19231 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246      if test $gl_cv_have_include_next = yes; then
19247        gl_cv_next_fcntl_h='<'fcntl.h'>'
19248      else
19249        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19250 printf %s "checking absolute name of <fcntl.h>... " >&6; }
19251 if test ${gl_cv_next_fcntl_h+y}
19252 then :
19253   printf %s "(cached) " >&6
19254 else
19255
19256
19257
19258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19259 /* end confdefs.h.  */
19260 #include <fcntl.h>
19261 _ACEOF
19262                 case "$host_os" in
19263     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19264     *)    gl_absname_cpp="$ac_cpp" ;;
19265   esac
19266
19267   case "$host_os" in
19268     mingw*)
19269                                           gl_dirsep_regex='[/\\]'
19270       ;;
19271     *)
19272       gl_dirsep_regex='\/'
19273       ;;
19274   esac
19275       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19276   gl_header_literal_regex=`echo 'fcntl.h' \
19277                            | sed -e "$gl_make_literal_regex_sed"`
19278   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19279       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19280       s|^/[^/]|//&|
19281       p
19282       q
19283     }'
19284
19285         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19286   sed -n "$gl_absolute_header_sed"`
19287
19288            gl_header=$gl_cv_absolute_fcntl_h
19289            gl_cv_next_fcntl_h='"'$gl_header'"'
19290
19291
19292 fi
19293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19294 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
19295      fi
19296      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
19297
19298      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19299        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19300        gl_next_as_first_directive='<'fcntl.h'>'
19301      else
19302        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19303        gl_next_as_first_directive=$gl_cv_next_fcntl_h
19304      fi
19305      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322 cat >>confdefs.h <<_ACEOF
19323 #define GNULIB_FCNTL_SAFER 1
19324 _ACEOF
19325
19326
19327
19328
19329
19330
19331   LIB_FDATASYNC=
19332
19333
19334   if test $ac_cv_have_decl_fdatasync = no; then
19335     HAVE_DECL_FDATASYNC=0
19336         for ac_func in fdatasync
19337 do :
19338   ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
19339 if test "x$ac_cv_func_fdatasync" = xyes
19340 then :
19341   cat >>confdefs.h <<_ACEOF
19342 #define HAVE_FDATASYNC 1
19343 _ACEOF
19344
19345 fi
19346 done
19347
19348     if test $ac_cv_func_fdatasync = no; then
19349       HAVE_FDATASYNC=0
19350     fi
19351   else
19352             gl_saved_libs=$LIBS
19353     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
19354 printf %s "checking for library containing fdatasync... " >&6; }
19355 if test ${ac_cv_search_fdatasync+y}
19356 then :
19357   printf %s "(cached) " >&6
19358 else
19359   ac_func_search_save_LIBS=$LIBS
19360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19361 /* end confdefs.h.  */
19362
19363 /* Override any GCC internal prototype to avoid an error.
19364    Use char because int might match the return type of a GCC
19365    builtin and then its argument prototype would still apply.  */
19366 #ifdef __cplusplus
19367 extern "C"
19368 #endif
19369 char fdatasync ();
19370 int
19371 main (void)
19372 {
19373 return fdatasync ();
19374   ;
19375   return 0;
19376 }
19377 _ACEOF
19378 for ac_lib in '' rt posix4
19379 do
19380   if test -z "$ac_lib"; then
19381     ac_res="none required"
19382   else
19383     ac_res=-l$ac_lib
19384     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19385   fi
19386   if ac_fn_c_try_link "$LINENO"
19387 then :
19388   ac_cv_search_fdatasync=$ac_res
19389 fi
19390 rm -f core conftest.err conftest.$ac_objext \
19391     conftest$ac_exeext
19392   if test ${ac_cv_search_fdatasync+y}
19393 then :
19394   break
19395 fi
19396 done
19397 if test ${ac_cv_search_fdatasync+y}
19398 then :
19399
19400 else
19401   ac_cv_search_fdatasync=no
19402 fi
19403 rm conftest.$ac_ext
19404 LIBS=$ac_func_search_save_LIBS
19405 fi
19406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
19407 printf "%s\n" "$ac_cv_search_fdatasync" >&6; }
19408 ac_res=$ac_cv_search_fdatasync
19409 if test "$ac_res" != no
19410 then :
19411   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19412   test "$ac_cv_search_fdatasync" = "none required" ||
19413                     LIB_FDATASYNC=$ac_cv_search_fdatasync
19414 fi
19415
19416     LIBS=$gl_saved_libs
19417   fi
19418
19419   if test $HAVE_FDATASYNC = 0; then
19420
19421
19422
19423
19424
19425
19426
19427
19428   gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
19429
19430   fi
19431
19432
19433
19434
19435
19436           GNULIB_FDATASYNC=1
19437
19438
19439
19440
19441
19442 printf "%s\n" "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
19443
19444
19445
19446
19447
19448
19449
19450
19451     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19452 #include <dirent.h>
19453
19454 "
19455 if test "x$ac_cv_have_decl_fdopendir" = xyes
19456 then :
19457   ac_have_decl=1
19458 else
19459   ac_have_decl=0
19460 fi
19461
19462 cat >>confdefs.h <<_ACEOF
19463 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19464 _ACEOF
19465 if test $ac_have_decl = 1
19466 then :
19467
19468 else
19469   HAVE_DECL_FDOPENDIR=0
19470 fi
19471
19472
19473   if test $ac_cv_func_fdopendir = no; then
19474     HAVE_FDOPENDIR=0
19475   else
19476     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19477 printf %s "checking whether fdopendir works... " >&6; }
19478 if test ${gl_cv_func_fdopendir_works+y}
19479 then :
19480   printf %s "(cached) " >&6
19481 else
19482   if test "$cross_compiling" = yes
19483 then :
19484   case "$host_os" in
19485                     # Guess yes on glibc systems.
19486             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19487                     # If we don't know, assume the worst.
19488             *)      gl_cv_func_fdopendir_works="guessing no" ;;
19489           esac
19490
19491 else
19492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19493 /* end confdefs.h.  */
19494
19495 #include <dirent.h>
19496 #include <fcntl.h>
19497 #include <unistd.h>
19498 #if !HAVE_DECL_FDOPENDIR
19499 extern
19500 # ifdef __cplusplus
19501 "C"
19502 # endif
19503 DIR *fdopendir (int);
19504 #endif
19505
19506 int
19507 main (void)
19508 {
19509 int result = 0;
19510      int fd = open ("conftest.c", O_RDONLY);
19511      if (fd < 0) result |= 1;
19512      if (fdopendir (fd)) result |= 2;
19513      if (close (fd)) result |= 4;
19514      return result;
19515   ;
19516   return 0;
19517 }
19518 _ACEOF
19519 if ac_fn_c_try_run "$LINENO"
19520 then :
19521   gl_cv_func_fdopendir_works=yes
19522 else
19523   gl_cv_func_fdopendir_works=no
19524 fi
19525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19526   conftest.$ac_objext conftest.beam conftest.$ac_ext
19527 fi
19528
19529 fi
19530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19531 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
19532     case "$gl_cv_func_fdopendir_works" in
19533       *yes) ;;
19534       *)
19535         REPLACE_FDOPENDIR=1
19536         ;;
19537     esac
19538   fi
19539
19540   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19541
19542
19543
19544
19545
19546
19547
19548
19549   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19550
19551   fi
19552
19553
19554
19555
19556
19557           GNULIB_FDOPENDIR=1
19558
19559
19560
19561
19562
19563 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19564
19565
19566
19567
19568
19569 cat >>confdefs.h <<_ACEOF
19570 #define GNULIB_FDOPENDIR 1
19571 _ACEOF
19572
19573
19574
19575
19576
19577
19578   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19579 printf %s "checking whether fflush works on input streams... " >&6; }
19580 if test ${gl_cv_func_fflush_stdin+y}
19581 then :
19582   printf %s "(cached) " >&6
19583 else
19584   echo hello world > conftest.txt
19585      if test "$cross_compiling" = yes
19586 then :
19587   gl_cv_func_fflush_stdin=cross
19588 else
19589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19590 /* end confdefs.h.  */
19591
19592 #include <stdio.h>
19593 #if HAVE_UNISTD_H
19594 # include <unistd.h>
19595 #else /* on Windows with MSVC */
19596 # include <io.h>
19597 #endif
19598
19599 int
19600 main (void)
19601 {
19602 FILE *f = fopen ("conftest.txt", "r");
19603          char buffer[10];
19604          int fd;
19605          int c;
19606          if (f == NULL)
19607            return 1;
19608          fd = fileno (f);
19609          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19610            return 2;
19611          /* For deterministic results, ensure f read a bigger buffer.  */
19612          if (lseek (fd, 0, SEEK_CUR) == 5)
19613            return 3;
19614          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
19615             on BSD systems and on mingw.  */
19616          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19617            return 4;
19618          if (lseek (fd, 0, SEEK_CUR) != 5)
19619            return 5;
19620          /* Verify behaviour of fflush after ungetc. See
19621             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
19622          /* Verify behaviour of fflush after a backup ungetc.  This fails on
19623             mingw.  */
19624          c = fgetc (f);
19625          ungetc (c, f);
19626          fflush (f);
19627          if (fgetc (f) != c)
19628            return 6;
19629          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
19630             on glibc 2.8 and on BSD systems.  */
19631          c = fgetc (f);
19632          ungetc ('@', f);
19633          fflush (f);
19634          if (fgetc (f) != c)
19635            return 7;
19636          return 0;
19637
19638   ;
19639   return 0;
19640 }
19641 _ACEOF
19642 if ac_fn_c_try_run "$LINENO"
19643 then :
19644   gl_cv_func_fflush_stdin=yes
19645 else
19646   gl_cv_func_fflush_stdin=no
19647 fi
19648 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19649   conftest.$ac_objext conftest.beam conftest.$ac_ext
19650 fi
19651
19652      rm conftest.txt
19653
19654 fi
19655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19656 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19657   case $gl_cv_func_fflush_stdin in
19658     yes) gl_func_fflush_stdin=1 ;;
19659     no)  gl_func_fflush_stdin=0 ;;
19660     *)   gl_func_fflush_stdin='(-1)' ;;
19661   esac
19662
19663 cat >>confdefs.h <<_ACEOF
19664 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
19665 _ACEOF
19666
19667
19668   if test $gl_cv_func_fflush_stdin != yes; then
19669     REPLACE_FFLUSH=1
19670   fi
19671
19672   if test $REPLACE_FFLUSH = 1; then
19673
19674
19675
19676
19677
19678
19679
19680
19681   gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
19682
19683     :
19684   fi
19685
19686
19687 cat >>confdefs.h <<_ACEOF
19688 #define GNULIB_FFLUSH 1
19689 _ACEOF
19690
19691
19692
19693
19694
19695
19696
19697           GNULIB_FFLUSH=1
19698
19699
19700
19701
19702
19703 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713   FLOAT_H=
19714   REPLACE_FLOAT_LDBL=0
19715   case "$host_os" in
19716     aix* | beos* | openbsd* | mirbsd* | irix*)
19717       FLOAT_H=float.h
19718       ;;
19719     freebsd*)
19720       case "$host_cpu" in
19721         i[34567]86 )
19722           FLOAT_H=float.h
19723           ;;
19724         x86_64 )
19725           # On x86_64 systems, the C compiler may still be generating
19726           # 32-bit code.
19727           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19728 /* end confdefs.h.  */
19729 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19730              yes
19731              #endif
19732 _ACEOF
19733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19734   $EGREP "yes" >/dev/null 2>&1
19735 then :
19736
19737 else
19738   FLOAT_H=float.h
19739 fi
19740 rm -rf conftest*
19741
19742           ;;
19743       esac
19744       ;;
19745     linux*)
19746       case "$host_cpu" in
19747         powerpc*)
19748           FLOAT_H=float.h
19749           ;;
19750       esac
19751       ;;
19752   esac
19753   case "$host_os" in
19754     aix* | freebsd* | linux*)
19755       if test -n "$FLOAT_H"; then
19756         REPLACE_FLOAT_LDBL=1
19757       fi
19758       ;;
19759   esac
19760
19761     REPLACE_ITOLD=0
19762   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19763 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
19764 if test ${gl_cv_func_itold_works+y}
19765 then :
19766   printf %s "(cached) " >&6
19767 else
19768
19769       if test "$cross_compiling" = yes
19770 then :
19771   case "$host" in
19772            sparc*-*-linux*)
19773              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19774 /* end confdefs.h.  */
19775 #if defined __LP64__ || defined __arch64__
19776                 yes
19777                 #endif
19778 _ACEOF
19779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19780   $EGREP "yes" >/dev/null 2>&1
19781 then :
19782   gl_cv_func_itold_works="guessing no"
19783 else
19784   gl_cv_func_itold_works="guessing yes"
19785 fi
19786 rm -rf conftest*
19787
19788              ;;
19789            *) gl_cv_func_itold_works="guessing yes" ;;
19790          esac
19791
19792 else
19793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19794 /* end confdefs.h.  */
19795
19796 int i = -1;
19797 volatile long double ld;
19798 int main ()
19799 {
19800   ld += i * 1.0L;
19801   if (ld > 0)
19802     return 1;
19803   return 0;
19804 }
19805 _ACEOF
19806 if ac_fn_c_try_run "$LINENO"
19807 then :
19808   gl_cv_func_itold_works=yes
19809 else
19810   gl_cv_func_itold_works=no
19811 fi
19812 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19813   conftest.$ac_objext conftest.beam conftest.$ac_ext
19814 fi
19815
19816
19817 fi
19818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19819 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
19820   case "$gl_cv_func_itold_works" in
19821     *no)
19822       REPLACE_ITOLD=1
19823                   FLOAT_H=float.h
19824       ;;
19825   esac
19826
19827   if test -n "$FLOAT_H"; then
19828
19829
19830
19831
19832
19833
19834
19835
19836      if test $gl_cv_have_include_next = yes; then
19837        gl_cv_next_float_h='<'float.h'>'
19838      else
19839        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19840 printf %s "checking absolute name of <float.h>... " >&6; }
19841 if test ${gl_cv_next_float_h+y}
19842 then :
19843   printf %s "(cached) " >&6
19844 else
19845
19846
19847
19848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19849 /* end confdefs.h.  */
19850 #include <float.h>
19851 _ACEOF
19852                 case "$host_os" in
19853     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19854     *)    gl_absname_cpp="$ac_cpp" ;;
19855   esac
19856
19857   case "$host_os" in
19858     mingw*)
19859                                           gl_dirsep_regex='[/\\]'
19860       ;;
19861     *)
19862       gl_dirsep_regex='\/'
19863       ;;
19864   esac
19865       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19866   gl_header_literal_regex=`echo 'float.h' \
19867                            | sed -e "$gl_make_literal_regex_sed"`
19868   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19869       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19870       s|^/[^/]|//&|
19871       p
19872       q
19873     }'
19874
19875         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19876   sed -n "$gl_absolute_header_sed"`
19877
19878            gl_header=$gl_cv_absolute_float_h
19879            gl_cv_next_float_h='"'$gl_header'"'
19880
19881
19882 fi
19883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19884 printf "%s\n" "$gl_cv_next_float_h" >&6; }
19885      fi
19886      NEXT_FLOAT_H=$gl_cv_next_float_h
19887
19888      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19889        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19890        gl_next_as_first_directive='<'float.h'>'
19891      else
19892        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19893        gl_next_as_first_directive=$gl_cv_next_float_h
19894      fi
19895      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19896
19897
19898
19899
19900   fi
19901
19902    if test -n "$FLOAT_H"; then
19903   GL_GENERATE_FLOAT_H_TRUE=
19904   GL_GENERATE_FLOAT_H_FALSE='#'
19905 else
19906   GL_GENERATE_FLOAT_H_TRUE='#'
19907   GL_GENERATE_FLOAT_H_FALSE=
19908 fi
19909
19910
19911
19912   if test $REPLACE_FLOAT_LDBL = 1; then
19913
19914
19915
19916
19917
19918
19919
19920
19921   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19922
19923   fi
19924   if test $REPLACE_ITOLD = 1; then
19925
19926
19927
19928
19929
19930
19931
19932
19933   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19934
19935   fi
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951   gl_cv_func_fprintf_posix=no
19952   case "$gl_cv_func_printf_sizes_c99" in
19953     *yes)
19954       case "$gl_cv_func_printf_long_double" in
19955         *yes)
19956           case "$gl_cv_func_printf_infinite" in
19957             *yes)
19958               case "$gl_cv_func_printf_infinite_long_double" in
19959                 *yes)
19960                   case "$gl_cv_func_printf_directive_a" in
19961                     *yes)
19962                       case "$gl_cv_func_printf_directive_f" in
19963                         *yes)
19964                           case "$gl_cv_func_printf_directive_n" in
19965                             *yes)
19966                               case "$gl_cv_func_printf_directive_ls" in
19967                                 *yes)
19968                                   case "$gl_cv_func_printf_positions" in
19969                                     *yes)
19970                                       case "$gl_cv_func_printf_flag_grouping" in
19971                                         *yes)
19972                                           case "$gl_cv_func_printf_flag_leftadjust" in
19973                                             *yes)
19974                                               case "$gl_cv_func_printf_flag_zero" in
19975                                                 *yes)
19976                                                   case "$gl_cv_func_printf_precision" in
19977                                                     *yes)
19978                                                       case "$gl_cv_func_printf_enomem" in
19979                                                         *yes)
19980                                                           # fprintf exists and is
19981                                                           # already POSIX compliant.
19982                                                           gl_cv_func_fprintf_posix=yes
19983                                                           ;;
19984                                                       esac
19985                                                       ;;
19986                                                   esac
19987                                                   ;;
19988                                               esac
19989                                               ;;
19990                                           esac
19991                                           ;;
19992                                       esac
19993                                       ;;
19994                                   esac
19995                                   ;;
19996                               esac
19997                               ;;
19998                           esac
19999                           ;;
20000                       esac
20001                       ;;
20002                   esac
20003                   ;;
20004               esac
20005               ;;
20006           esac
20007           ;;
20008       esac
20009       ;;
20010   esac
20011   if test $gl_cv_func_fprintf_posix = no; then
20012
20013
20014
20015   case "$gl_cv_func_printf_infinite" in
20016     *yes)
20017       ;;
20018     *)
20019
20020 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
20021
20022       ;;
20023   esac
20024
20025
20026
20027
20028   case "$gl_cv_func_printf_long_double" in
20029     *yes)
20030       case "$gl_cv_func_printf_infinite_long_double" in
20031         *yes)
20032           ;;
20033         *)
20034
20035 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
20036
20037           ;;
20038       esac
20039       ;;
20040   esac
20041
20042
20043
20044   case "$gl_cv_func_printf_directive_a" in
20045     *yes)
20046       ;;
20047     *)
20048
20049 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
20050
20051       for ac_func in nl_langinfo
20052 do :
20053   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
20054 if test "x$ac_cv_func_nl_langinfo" = xyes
20055 then :
20056   cat >>confdefs.h <<_ACEOF
20057 #define HAVE_NL_LANGINFO 1
20058 _ACEOF
20059
20060 fi
20061 done
20062
20063       ;;
20064   esac
20065
20066
20067
20068   case "$gl_cv_func_printf_directive_f" in
20069     *yes)
20070       ;;
20071     *)
20072
20073 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
20074
20075       ;;
20076   esac
20077
20078
20079
20080   case "$gl_cv_func_printf_directive_ls" in
20081     *yes)
20082       ;;
20083     *)
20084
20085 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
20086
20087       ;;
20088   esac
20089
20090
20091
20092   case "$gl_cv_func_printf_flag_grouping" in
20093     *yes)
20094       ;;
20095     *)
20096
20097 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
20098
20099       ;;
20100   esac
20101
20102
20103
20104   case "$gl_cv_func_printf_flag_leftadjust" in
20105     *yes)
20106       ;;
20107     *)
20108
20109 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
20110
20111       ;;
20112   esac
20113
20114
20115
20116   case "$gl_cv_func_printf_flag_zero" in
20117     *yes)
20118       ;;
20119     *)
20120
20121 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
20122
20123       ;;
20124   esac
20125
20126
20127
20128   case "$gl_cv_func_printf_precision" in
20129     *yes)
20130       ;;
20131     *)
20132
20133 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
20134
20135
20136 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20137
20138
20139 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20140
20141       ;;
20142   esac
20143
20144
20145
20146   case "$gl_cv_func_printf_enomem" in
20147     *yes)
20148       ;;
20149     *)
20150
20151 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
20152
20153
20154 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20155
20156
20157 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20158
20159       ;;
20160   esac
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
20203
20204   if test $ac_cv_func_vasnprintf = yes; then
20205
20206 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
20207
20208   fi
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
20221 if test "x$ac_cv_type_ptrdiff_t" = xyes
20222 then :
20223
20224 else
20225
20226 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
20227
20228
20229 fi
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247   gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
20248
20249   REPLACE_FPRINTF=1
20250
20251 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
20252
20253   :
20254
20255   fi
20256
20257
20258
20259
20260
20261
20262           GNULIB_FPRINTF_POSIX=1
20263
20264
20265
20266
20267
20268 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
20269
20270
20271
20272
20273
20274
20275
20276   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
20277 "
20278 if test "x$ac_cv_have_decl_fpurge" = xyes
20279 then :
20280   ac_have_decl=1
20281 else
20282   ac_have_decl=0
20283 fi
20284
20285 cat >>confdefs.h <<_ACEOF
20286 #define HAVE_DECL_FPURGE $ac_have_decl
20287 _ACEOF
20288
20289   if test "x$ac_cv_func_fpurge" = xyes; then
20290     HAVE_FPURGE=1
20291     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
20292     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
20293 printf %s "checking whether fpurge works... " >&6; }
20294 if test ${gl_cv_func_fpurge_works+y}
20295 then :
20296   printf %s "(cached) " >&6
20297 else
20298   if test "$cross_compiling" = yes
20299 then :
20300   gl_cv_func_fpurge_works='guessing no'
20301 else
20302   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20303 /* end confdefs.h.  */
20304 #include <stdio.h>
20305
20306 int
20307 main (void)
20308 {
20309 FILE *f = fopen ("conftest.txt", "w+");
20310         if (!f) return 1;
20311         if (fputc ('a', f) != 'a') return 2;
20312         rewind (f);
20313         if (fgetc (f) != 'a') return 3;
20314         if (fgetc (f) != EOF) return 4;
20315         if (fpurge (f) != 0) return 5;
20316         if (putc ('b', f) != 'b') return 6;
20317         if (fclose (f) != 0) return 7;
20318         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
20319         if (fgetc (f) != 'a') return 9;
20320         if (fgetc (f) != 'b') return 10;
20321         if (fgetc (f) != EOF) return 11;
20322         if (fclose (f) != 0) return 12;
20323         if (remove ("conftest.txt") != 0) return 13;
20324         return 0;
20325   ;
20326   return 0;
20327 }
20328 _ACEOF
20329 if ac_fn_c_try_run "$LINENO"
20330 then :
20331   gl_cv_func_fpurge_works=yes
20332 else
20333   gl_cv_func_fpurge_works=no
20334 fi
20335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20336   conftest.$ac_objext conftest.beam conftest.$ac_ext
20337 fi
20338
20339 fi
20340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
20341 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
20342     if test "x$gl_cv_func_fpurge_works" != xyes; then
20343       REPLACE_FPURGE=1
20344     fi
20345   else
20346     HAVE_FPURGE=0
20347   fi
20348   if test "x$ac_cv_have_decl_fpurge" = xno; then
20349     HAVE_DECL_FPURGE=0
20350   fi
20351
20352   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
20353
20354
20355
20356
20357
20358
20359
20360
20361   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
20362
20363   fi
20364
20365
20366
20367
20368
20369           GNULIB_FPURGE=1
20370
20371
20372
20373
20374
20375 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385   if test $gl_cv_func_frexp_no_libm = yes; then
20386
20387
20388
20389   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
20390 printf %s "checking whether frexp works... " >&6; }
20391 if test ${gl_cv_func_frexp_works+y}
20392 then :
20393   printf %s "(cached) " >&6
20394 else
20395
20396       if test "$cross_compiling" = yes
20397 then :
20398   case "$host_os" in
20399            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
20400            *)                        gl_cv_func_frexp_works="guessing yes";;
20401          esac
20402
20403 else
20404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20405 /* end confdefs.h.  */
20406
20407 #include <float.h>
20408 #include <math.h>
20409 #include <string.h>
20410 #if HAVE_DECL_ALARM
20411 # include <signal.h>
20412 # include <unistd.h>
20413 #endif
20414 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
20415    ICC 10.0 has a bug when optimizing the expression -zero.
20416    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
20417    to PowerPC on Mac OS X 10.5.  */
20418 #if defined __hpux || defined __sgi || defined __ICC
20419 static double
20420 compute_minus_zero (void)
20421 {
20422   return -DBL_MIN * DBL_MIN;
20423 }
20424 # define minus_zero compute_minus_zero ()
20425 #else
20426 double minus_zero = -0.0;
20427 #endif
20428 int main()
20429 {
20430   int result = 0;
20431   int i;
20432   volatile double x;
20433   double zero = 0.0;
20434 #if HAVE_DECL_ALARM
20435   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
20436      number.  Let the test fail in this case.  */
20437   signal (SIGALRM, SIG_DFL);
20438   alarm (5);
20439 #endif
20440   /* Test on denormalized numbers.  */
20441   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
20442     ;
20443   if (x > 0.0)
20444     {
20445       int exp;
20446       double y = frexp (x, &exp);
20447       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
20448          On NetBSD: y = 0.75. Correct: y = 0.5.  */
20449       if (y != 0.5)
20450         result |= 1;
20451     }
20452   /* Test on infinite numbers.  */
20453   x = 1.0 / zero;
20454   {
20455     int exp;
20456     double y = frexp (x, &exp);
20457     if (y != x)
20458       result |= 2;
20459   }
20460   /* Test on negative zero.  */
20461   x = minus_zero;
20462   {
20463     int exp;
20464     double y = frexp (x, &exp);
20465     if (memcmp (&y, &x, sizeof x))
20466       result |= 4;
20467   }
20468   return result;
20469 }
20470 _ACEOF
20471 if ac_fn_c_try_run "$LINENO"
20472 then :
20473   gl_cv_func_frexp_works=yes
20474 else
20475   gl_cv_func_frexp_works=no
20476 fi
20477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20478   conftest.$ac_objext conftest.beam conftest.$ac_ext
20479 fi
20480
20481
20482 fi
20483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
20484 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
20485
20486     case "$gl_cv_func_frexp_works" in
20487       *yes) gl_func_frexp_no_libm=yes ;;
20488       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
20489     esac
20490   else
20491     gl_func_frexp_no_libm=no
20492         REPLACE_FREXP=1
20493   fi
20494   if test $gl_func_frexp_no_libm = yes; then
20495
20496 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
20497
20498   fi
20499
20500   if test $gl_func_frexp_no_libm != yes; then
20501
20502
20503
20504
20505
20506
20507
20508
20509   gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20510
20511   fi
20512
20513
20514
20515
20516
20517           GNULIB_FREXP=1
20518
20519
20520
20521
20522
20523 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20524
20525
20526
20527
20528
20529
20530       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
20531 "
20532 if test "x$ac_cv_have_decl_frexpl" = xyes
20533 then :
20534
20535 else
20536   HAVE_DECL_FREXPL=0
20537 fi
20538
20539   if test $HAVE_DECL_FREXPL = 1; then
20540
20541   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
20542 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
20543 if test ${gl_cv_func_frexpl_no_libm+y}
20544 then :
20545   printf %s "(cached) " >&6
20546 else
20547
20548       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20549 /* end confdefs.h.  */
20550 #include <math.h>
20551              long double x;
20552 int
20553 main (void)
20554 {
20555 int e; return frexpl (x, &e) > 0;
20556   ;
20557   return 0;
20558 }
20559 _ACEOF
20560 if ac_fn_c_try_link "$LINENO"
20561 then :
20562   gl_cv_func_frexpl_no_libm=yes
20563 else
20564   gl_cv_func_frexpl_no_libm=no
20565 fi
20566 rm -f core conftest.err conftest.$ac_objext \
20567     conftest$ac_exeext conftest.$ac_ext
20568
20569 fi
20570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
20571 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
20572
20573     if test $gl_cv_func_frexpl_no_libm = yes; then
20574
20575
20576      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
20577 printf %s "checking whether frexpl works... " >&6; }
20578 if test ${gl_cv_func_frexpl_works+y}
20579 then :
20580   printf %s "(cached) " >&6
20581 else
20582
20583       if test "$cross_compiling" = yes
20584 then :
20585
20586          case "$host_os" in
20587            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
20588               gl_cv_func_frexpl_works="guessing no";;
20589            *) gl_cv_func_frexpl_works="guessing yes";;
20590          esac
20591
20592 else
20593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20594 /* end confdefs.h.  */
20595
20596 #include <float.h>
20597 #include <math.h>
20598 /* Override the values of <float.h>, like done in float.in.h.  */
20599 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
20600 # undef LDBL_MIN_EXP
20601 # define LDBL_MIN_EXP    (-16381)
20602 #endif
20603 #if defined __i386__ && defined __FreeBSD__
20604 # undef LDBL_MIN_EXP
20605 # define LDBL_MIN_EXP    (-16381)
20606 #endif
20607 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
20608 # undef LDBL_MIN_EXP
20609 # define LDBL_MIN_EXP DBL_MIN_EXP
20610 #endif
20611 #if defined __sgi && (LDBL_MANT_DIG >= 106)
20612 # if defined __GNUC__
20613 #  undef LDBL_MIN_EXP
20614 #  define LDBL_MIN_EXP DBL_MIN_EXP
20615 # endif
20616 #endif
20617 extern
20618 #ifdef __cplusplus
20619 "C"
20620 #endif
20621 long double frexpl (long double, int *);
20622 int main()
20623 {
20624   int result = 0;
20625   volatile long double x;
20626   /* Test on finite numbers that fails on AIX 5.1.  */
20627   x = 16.0L;
20628   {
20629     int exp = -9999;
20630     frexpl (x, &exp);
20631     if (exp != 5)
20632       result |= 1;
20633   }
20634   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
20635      function returns an invalid (incorrectly normalized) value: it returns
20636                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
20637      but the correct result is
20638           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
20639   x = 1.01L;
20640   {
20641     int exp = -9999;
20642     long double y = frexpl (x, &exp);
20643     if (!(exp == 1 && y == 0.505L))
20644       result |= 2;
20645   }
20646   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
20647      LDBL_MAX_EXP = 16384.
20648      In the loop end test, we test x against Infinity, rather than comparing
20649      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
20650   {
20651     int i;
20652     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
20653       {
20654         int exp = -9999;
20655         frexpl (x, &exp);
20656         if (exp != i)
20657           {
20658             result |= 4;
20659             break;
20660           }
20661       }
20662   }
20663   /* Test on denormalized numbers.  */
20664   {
20665     int i;
20666     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
20667       ;
20668     if (x > 0.0L)
20669       {
20670         int exp;
20671         long double y = frexpl (x, &exp);
20672         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
20673            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
20674         if (exp != LDBL_MIN_EXP - 1)
20675           result |= 8;
20676       }
20677   }
20678   /* Test on infinite numbers.  */
20679   x = 1.0L / 0.0L;
20680   {
20681     int exp;
20682     long double y = frexpl (x, &exp);
20683     if (y != x)
20684       result |= 16;
20685   }
20686   return result;
20687 }
20688 _ACEOF
20689 if ac_fn_c_try_run "$LINENO"
20690 then :
20691   gl_cv_func_frexpl_works=yes
20692 else
20693   gl_cv_func_frexpl_works=no
20694 fi
20695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20696   conftest.$ac_objext conftest.beam conftest.$ac_ext
20697 fi
20698
20699
20700 fi
20701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
20702 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
20703
20704       case "$gl_cv_func_frexpl_works" in
20705         *yes) gl_func_frexpl_no_libm=yes ;;
20706         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
20707       esac
20708     else
20709       gl_func_frexpl_no_libm=no
20710             REPLACE_FREXPL=1
20711     fi
20712     if test $gl_func_frexpl_no_libm = yes; then
20713
20714 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
20715
20716     fi
20717   fi
20718
20719   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
20720
20721
20722
20723
20724
20725
20726
20727
20728   gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20729
20730   fi
20731
20732
20733
20734
20735
20736           GNULIB_FREXPL=1
20737
20738
20739
20740
20741
20742 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20743
20744
20745
20746
20747
20748
20749     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20750     REPLACE_FSEEK=1
20751   fi
20752
20753   if test $REPLACE_FSEEK = 1; then
20754
20755
20756
20757
20758
20759
20760
20761
20762   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
20763
20764   fi
20765
20766
20767
20768
20769
20770           GNULIB_FSEEK=1
20771
20772
20773
20774
20775
20776 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
20789 printf %s "checking for fseeko... " >&6; }
20790 if test ${gl_cv_func_fseeko+y}
20791 then :
20792   printf %s "(cached) " >&6
20793 else
20794
20795       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20796 /* end confdefs.h.  */
20797 #include <stdio.h>
20798
20799 int
20800 main (void)
20801 {
20802 fseeko (stdin, 0, 0);
20803   ;
20804   return 0;
20805 }
20806 _ACEOF
20807 if ac_fn_c_try_link "$LINENO"
20808 then :
20809   gl_cv_func_fseeko=yes
20810 else
20811   gl_cv_func_fseeko=no
20812 fi
20813 rm -f core conftest.err conftest.$ac_objext \
20814     conftest$ac_exeext conftest.$ac_ext
20815
20816 fi
20817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
20818 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
20819
20820
20821   if test $ac_cv_have_decl_fseeko = no; then
20822     HAVE_DECL_FSEEKO=0
20823   fi
20824
20825   if test $gl_cv_func_fseeko = no; then
20826     HAVE_FSEEKO=0
20827   else
20828     if test $WINDOWS_64_BIT_OFF_T = 1; then
20829       REPLACE_FSEEKO=1
20830     fi
20831     if test $gl_cv_var_stdin_large_offset = no; then
20832       REPLACE_FSEEKO=1
20833     fi
20834
20835
20836
20837   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20838 printf %s "checking whether fflush works on input streams... " >&6; }
20839 if test ${gl_cv_func_fflush_stdin+y}
20840 then :
20841   printf %s "(cached) " >&6
20842 else
20843   echo hello world > conftest.txt
20844      if test "$cross_compiling" = yes
20845 then :
20846   gl_cv_func_fflush_stdin=cross
20847 else
20848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20849 /* end confdefs.h.  */
20850
20851 #include <stdio.h>
20852 #if HAVE_UNISTD_H
20853 # include <unistd.h>
20854 #else /* on Windows with MSVC */
20855 # include <io.h>
20856 #endif
20857
20858 int
20859 main (void)
20860 {
20861 FILE *f = fopen ("conftest.txt", "r");
20862          char buffer[10];
20863          int fd;
20864          int c;
20865          if (f == NULL)
20866            return 1;
20867          fd = fileno (f);
20868          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20869            return 2;
20870          /* For deterministic results, ensure f read a bigger buffer.  */
20871          if (lseek (fd, 0, SEEK_CUR) == 5)
20872            return 3;
20873          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
20874             on BSD systems and on mingw.  */
20875          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20876            return 4;
20877          if (lseek (fd, 0, SEEK_CUR) != 5)
20878            return 5;
20879          /* Verify behaviour of fflush after ungetc. See
20880             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
20881          /* Verify behaviour of fflush after a backup ungetc.  This fails on
20882             mingw.  */
20883          c = fgetc (f);
20884          ungetc (c, f);
20885          fflush (f);
20886          if (fgetc (f) != c)
20887            return 6;
20888          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
20889             on glibc 2.8 and on BSD systems.  */
20890          c = fgetc (f);
20891          ungetc ('@', f);
20892          fflush (f);
20893          if (fgetc (f) != c)
20894            return 7;
20895          return 0;
20896
20897   ;
20898   return 0;
20899 }
20900 _ACEOF
20901 if ac_fn_c_try_run "$LINENO"
20902 then :
20903   gl_cv_func_fflush_stdin=yes
20904 else
20905   gl_cv_func_fflush_stdin=no
20906 fi
20907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20908   conftest.$ac_objext conftest.beam conftest.$ac_ext
20909 fi
20910
20911      rm conftest.txt
20912
20913 fi
20914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20915 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20916   case $gl_cv_func_fflush_stdin in
20917     yes) gl_func_fflush_stdin=1 ;;
20918     no)  gl_func_fflush_stdin=0 ;;
20919     *)   gl_func_fflush_stdin='(-1)' ;;
20920   esac
20921
20922 cat >>confdefs.h <<_ACEOF
20923 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
20924 _ACEOF
20925
20926
20927       if test $gl_cv_func_fflush_stdin != yes; then
20928         REPLACE_FSEEKO=1
20929       fi
20930
20931   fi
20932
20933   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
20934
20935
20936
20937
20938
20939
20940
20941
20942   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
20943
20944
20945       for ac_func in _fseeki64
20946 do :
20947   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
20948 if test "x$ac_cv_func__fseeki64" = xyes
20949 then :
20950   cat >>confdefs.h <<_ACEOF
20951 #define HAVE__FSEEKI64 1
20952 _ACEOF
20953
20954 fi
20955 done
20956
20957
20958   fi
20959
20960
20961
20962
20963
20964           GNULIB_FSEEKO=1
20965
20966
20967
20968
20969
20970 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
20971
20972
20973
20974
20975
20976
20977   if test $ac_cv_func___fseterr = no; then
20978
20979
20980
20981
20982
20983
20984
20985
20986   gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
20987
20988   fi
20989
20990
20991
20992
20993   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20994     REPLACE_FSTAT=1
20995   fi
20996
20997
20998   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
20999     REPLACE_FSTAT=1
21000   fi
21001
21002
21003
21004
21005
21006   if test $ac_cv_func_fchdir = no; then
21007     HAVE_FCHDIR=0
21008   fi
21009
21010     if test $HAVE_FCHDIR = 0; then
21011       case "$gl_cv_func_open_directory_works" in
21012         *yes) ;;
21013         *)
21014           REPLACE_FSTAT=1
21015           ;;
21016       esac
21017     fi
21018
21019
21020   if test $REPLACE_FSTAT = 1; then
21021
21022
21023
21024
21025
21026
21027
21028
21029   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
21030
21031     :
21032   fi
21033
21034
21035
21036
21037
21038           GNULIB_FSTAT=1
21039
21040
21041
21042
21043
21044 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054   if test $ac_cv_func_fstatat = no; then
21055     HAVE_FSTATAT=0
21056   else
21057             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21058 printf %s "checking whether fstatat (..., 0) works... " >&6; }
21059 if test ${gl_cv_func_fstatat_zero_flag+y}
21060 then :
21061   printf %s "(cached) " >&6
21062 else
21063   if test "$cross_compiling" = yes
21064 then :
21065   case "$host_os" in
21066             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21067             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
21068           esac
21069
21070 else
21071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21072 /* end confdefs.h.  */
21073
21074               #include <fcntl.h>
21075               #include <sys/stat.h>
21076               int
21077               main (void)
21078               {
21079                 struct stat a;
21080                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21081               }
21082
21083 _ACEOF
21084 if ac_fn_c_try_run "$LINENO"
21085 then :
21086   gl_cv_func_fstatat_zero_flag=yes
21087 else
21088   gl_cv_func_fstatat_zero_flag=no
21089 fi
21090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21091   conftest.$ac_objext conftest.beam conftest.$ac_ext
21092 fi
21093
21094
21095 fi
21096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21097 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
21098
21099     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21100     *yes+*yes) ;;
21101     *) REPLACE_FSTATAT=1
21102        case $gl_cv_func_fstatat_zero_flag in
21103        *yes)
21104
21105 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21106
21107          ;;
21108        esac
21109        ;;
21110     esac
21111   fi
21112
21113   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21114
21115
21116
21117
21118
21119
21120
21121
21122   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21123
21124   fi
21125
21126
21127
21128
21129
21130           GNULIB_FSTATAT=1
21131
21132
21133
21134
21135
21136 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
21137
21138
21139
21140
21141
21142
21143   if test $ac_cv_func_fsync = no; then
21144     HAVE_FSYNC=0
21145   fi
21146
21147   if test $HAVE_FSYNC = 0; then
21148
21149
21150
21151
21152
21153
21154
21155
21156   gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
21157
21158     :
21159   fi
21160
21161
21162
21163
21164
21165           GNULIB_FSYNC=1
21166
21167
21168
21169
21170
21171 printf "%s\n" "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
21172
21173
21174
21175
21176
21177
21178     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
21179     REPLACE_FTELL=1
21180   fi
21181
21182   if test $REPLACE_FTELL = 1; then
21183
21184
21185
21186
21187
21188
21189
21190
21191   gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
21192
21193   fi
21194
21195
21196
21197
21198
21199           GNULIB_FTELL=1
21200
21201
21202
21203
21204
21205 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218   if test $ac_cv_have_decl_ftello = no; then
21219     HAVE_DECL_FTELLO=0
21220   fi
21221
21222   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
21223 printf %s "checking for ftello... " >&6; }
21224 if test ${gl_cv_func_ftello+y}
21225 then :
21226   printf %s "(cached) " >&6
21227 else
21228
21229       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21230 /* end confdefs.h.  */
21231 #include <stdio.h>
21232 int
21233 main (void)
21234 {
21235 ftello (stdin);
21236   ;
21237   return 0;
21238 }
21239 _ACEOF
21240 if ac_fn_c_try_link "$LINENO"
21241 then :
21242   gl_cv_func_ftello=yes
21243 else
21244   gl_cv_func_ftello=no
21245 fi
21246 rm -f core conftest.err conftest.$ac_objext \
21247     conftest$ac_exeext conftest.$ac_ext
21248
21249 fi
21250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
21251 printf "%s\n" "$gl_cv_func_ftello" >&6; }
21252   if test $gl_cv_func_ftello = no; then
21253     HAVE_FTELLO=0
21254   else
21255     if test $WINDOWS_64_BIT_OFF_T = 1; then
21256       REPLACE_FTELLO=1
21257     fi
21258     if test $gl_cv_var_stdin_large_offset = no; then
21259       REPLACE_FTELLO=1
21260     fi
21261     if test $REPLACE_FTELLO = 0; then
21262
21263       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
21264 printf %s "checking whether ftello works... " >&6; }
21265 if test ${gl_cv_func_ftello_works+y}
21266 then :
21267   printf %s "(cached) " >&6
21268 else
21269
21270                               case "$host_os" in
21271                       # Guess no on Solaris.
21272             solaris*) gl_cv_func_ftello_works="guessing no" ;;
21273                       # Guess yes otherwise.
21274             *)        gl_cv_func_ftello_works="guessing yes" ;;
21275           esac
21276           if test "$cross_compiling" = yes
21277 then :
21278   :
21279 else
21280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21281 /* end confdefs.h.  */
21282
21283 #include <stdio.h>
21284 #include <stdlib.h>
21285 #include <string.h>
21286 #define TESTFILE "conftest.tmp"
21287 int
21288 main (void)
21289 {
21290   FILE *fp;
21291
21292   /* Create a file with some contents.  */
21293   fp = fopen (TESTFILE, "w");
21294   if (fp == NULL)
21295     return 70;
21296   if (fwrite ("foogarsh", 1, 8, fp) < 8)
21297     return 71;
21298   if (fclose (fp))
21299     return 72;
21300
21301   /* The file's contents is now "foogarsh".  */
21302
21303   /* Try writing after reading to EOF.  */
21304   fp = fopen (TESTFILE, "r+");
21305   if (fp == NULL)
21306     return 73;
21307   if (fseek (fp, -1, SEEK_END))
21308     return 74;
21309   if (!(getc (fp) == 'h'))
21310     return 1;
21311   if (!(getc (fp) == EOF))
21312     return 2;
21313   if (!(ftell (fp) == 8))
21314     return 3;
21315   if (!(ftell (fp) == 8))
21316     return 4;
21317   if (!(putc ('!', fp) == '!'))
21318     return 5;
21319   if (!(ftell (fp) == 9))
21320     return 6;
21321   if (!(fclose (fp) == 0))
21322     return 7;
21323   fp = fopen (TESTFILE, "r");
21324   if (fp == NULL)
21325     return 75;
21326   {
21327     char buf[10];
21328     if (!(fread (buf, 1, 10, fp) == 9))
21329       return 10;
21330     if (!(memcmp (buf, "foogarsh!", 9) == 0))
21331       return 11;
21332   }
21333   if (!(fclose (fp) == 0))
21334     return 12;
21335
21336   /* The file's contents is now "foogarsh!".  */
21337
21338   return 0;
21339 }
21340 _ACEOF
21341 if ac_fn_c_try_run "$LINENO"
21342 then :
21343   gl_cv_func_ftello_works=yes
21344 else
21345   gl_cv_func_ftello_works=no
21346 fi
21347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21348   conftest.$ac_objext conftest.beam conftest.$ac_ext
21349 fi
21350
21351
21352 fi
21353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
21354 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
21355       case "$gl_cv_func_ftello_works" in
21356         *yes) ;;
21357         *)
21358           REPLACE_FTELLO=1
21359
21360 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
21361
21362           ;;
21363       esac
21364     fi
21365   fi
21366
21367   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
21368
21369
21370
21371
21372
21373
21374
21375
21376   gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
21377
21378
21379       for ac_func in _ftelli64
21380 do :
21381   ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
21382 if test "x$ac_cv_func__ftelli64" = xyes
21383 then :
21384   cat >>confdefs.h <<_ACEOF
21385 #define HAVE__FTELLI64 1
21386 _ACEOF
21387
21388 fi
21389 done
21390
21391
21392   fi
21393
21394
21395
21396
21397
21398           GNULIB_FTELLO=1
21399
21400
21401
21402
21403
21404 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
21405
21406
21407
21408
21409
21410
21411
21412
21413   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21414   *yes,yes) ;;
21415   *)
21416         REPLACE_GETCWD=1
21417     ;;
21418   esac
21419
21420   if test $REPLACE_GETCWD = 1; then
21421
21422
21423
21424
21425
21426
21427
21428
21429   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21430
21431   fi
21432
21433
21434
21435
21436
21437           GNULIB_GETCWD=1
21438
21439
21440
21441
21442
21443 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21444
21445
21446
21447
21448
21449
21450
21451
21452   if test $ac_cv_func_getdtablesize = yes &&
21453      test $ac_cv_have_decl_getdtablesize = yes; then
21454     # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
21455     # up to an unchangeable hard limit; all other platforms correctly
21456     # require setrlimit before getdtablesize() can report a larger value.
21457     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21458 printf %s "checking whether getdtablesize works... " >&6; }
21459 if test ${gl_cv_func_getdtablesize_works+y}
21460 then :
21461   printf %s "(cached) " >&6
21462 else
21463   if test "$cross_compiling" = yes
21464 then :
21465   case "$host_os" in
21466           cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21467             gl_cv_func_getdtablesize_works="guessing no" ;;
21468           *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21469          esac
21470 else
21471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21472 /* end confdefs.h.  */
21473
21474         #include <unistd.h>
21475 int
21476 main (void)
21477 {
21478 int size = getdtablesize();
21479            if (dup2 (0, getdtablesize()) != -1)
21480              return 1;
21481            if (size != getdtablesize())
21482              return 2;
21483
21484   ;
21485   return 0;
21486 }
21487 _ACEOF
21488 if ac_fn_c_try_run "$LINENO"
21489 then :
21490   gl_cv_func_getdtablesize_works=yes
21491 else
21492   gl_cv_func_getdtablesize_works=no
21493 fi
21494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21495   conftest.$ac_objext conftest.beam conftest.$ac_ext
21496 fi
21497
21498
21499 fi
21500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21501 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
21502     case "$gl_cv_func_getdtablesize_works" in
21503       *yes) ;;
21504       *) REPLACE_GETDTABLESIZE=1 ;;
21505     esac
21506   else
21507     HAVE_GETDTABLESIZE=0
21508   fi
21509
21510   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21511
21512
21513
21514
21515
21516
21517
21518
21519   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21520
21521     :
21522   fi
21523
21524
21525
21526
21527
21528           GNULIB_GETDTABLESIZE=1
21529
21530
21531
21532
21533
21534 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21535
21536
21537
21538
21539
21540
21541
21542
21543   if test $REPLACE_GETOPT = 1; then
21544
21545
21546
21547
21548
21549
21550
21551
21552   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21563
21564
21565
21566
21567         GNULIB_GL_UNISTD_H_GETOPT=1
21568   fi
21569
21570
21571
21572 printf "%s\n" "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21573
21574
21575
21576
21577
21578
21579
21580     REPLACE_GETOPT=0
21581     if test -n "$gl_replace_getopt"; then
21582       REPLACE_GETOPT=1
21583     fi
21584
21585   if test $REPLACE_GETOPT = 1; then
21586
21587   GETOPT_H=getopt.h
21588
21589 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21590
21591
21592
21593   fi
21594
21595   if test $REPLACE_GETOPT = 1; then
21596
21597
21598
21599
21600
21601
21602
21603
21604   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21615
21616
21617
21618
21619         GNULIB_GL_UNISTD_H_GETOPT=1
21620   fi
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635   gl_gettimeofday_timezone=void
21636   if test $ac_cv_func_gettimeofday != yes; then
21637     HAVE_GETTIMEOFDAY=0
21638   else
21639
21640
21641
21642  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21643 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21644 if test ${gl_cv_func_gettimeofday_clobber+y}
21645 then :
21646   printf %s "(cached) " >&6
21647 else
21648   if test "$cross_compiling" = yes
21649 then :
21650   # When cross-compiling:
21651       case "$host_os" in
21652                 # Guess all is fine on glibc systems.
21653         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21654                 # If we don't know, assume the worst.
21655         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21656       esac
21657
21658 else
21659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21660 /* end confdefs.h.  */
21661 #include <string.h>
21662           #include <sys/time.h>
21663           #include <time.h>
21664           #include <stdlib.h>
21665
21666 int
21667 main (void)
21668 {
21669
21670           time_t t = 0;
21671           struct tm *lt;
21672           struct tm saved_lt;
21673           struct timeval tv;
21674           lt = localtime (&t);
21675           saved_lt = *lt;
21676           gettimeofday (&tv, NULL);
21677           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21678
21679   ;
21680   return 0;
21681 }
21682 _ACEOF
21683 if ac_fn_c_try_run "$LINENO"
21684 then :
21685   gl_cv_func_gettimeofday_clobber=no
21686 else
21687   gl_cv_func_gettimeofday_clobber=yes
21688 fi
21689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21690   conftest.$ac_objext conftest.beam conftest.$ac_ext
21691 fi
21692
21693 fi
21694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21695 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
21696
21697  case "$gl_cv_func_gettimeofday_clobber" in
21698    *yes)
21699      REPLACE_GETTIMEOFDAY=1
21700
21701   REPLACE_GMTIME=1
21702   REPLACE_LOCALTIME=1
21703
21704
21705 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21706
21707      ;;
21708  esac
21709
21710     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21711 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
21712 if test ${gl_cv_func_gettimeofday_posix_signature+y}
21713 then :
21714   printf %s "(cached) " >&6
21715 else
21716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21717 /* end confdefs.h.  */
21718 #include <sys/time.h>
21719               struct timeval c;
21720               int gettimeofday (struct timeval *restrict, void *restrict);
21721
21722 int
21723 main (void)
21724 {
21725 /* glibc uses struct timezone * rather than the POSIX void *
21726                  if _GNU_SOURCE is defined.  However, since the only portable
21727                  use of gettimeofday uses NULL as the second parameter, and
21728                  since the glibc definition is actually more typesafe, it is
21729                  not worth wrapping this to get a compliant signature.  */
21730               int (*f) (struct timeval *restrict, void *restrict)
21731                 = gettimeofday;
21732               int x = f (&c, 0);
21733               return !(x | c.tv_sec | c.tv_usec);
21734
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 if ac_fn_c_try_compile "$LINENO"
21740 then :
21741   gl_cv_func_gettimeofday_posix_signature=yes
21742 else
21743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21744 /* end confdefs.h.  */
21745 #include <sys/time.h>
21746 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21747
21748 int
21749 main (void)
21750 {
21751
21752   ;
21753   return 0;
21754 }
21755 _ACEOF
21756 if ac_fn_c_try_compile "$LINENO"
21757 then :
21758   gl_cv_func_gettimeofday_posix_signature=almost
21759 else
21760   gl_cv_func_gettimeofday_posix_signature=no
21761 fi
21762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21763 fi
21764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21765 fi
21766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21767 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21768     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21769       gl_gettimeofday_timezone='struct timezone'
21770     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21771       REPLACE_GETTIMEOFDAY=1
21772     fi
21773         if test $REPLACE_STRUCT_TIMEVAL = 1; then
21774       REPLACE_GETTIMEOFDAY=1
21775     fi
21776
21777   fi
21778
21779 cat >>confdefs.h <<_ACEOF
21780 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21781 _ACEOF
21782
21783
21784   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21785
21786
21787
21788
21789
21790
21791
21792
21793   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21794
21795
21796   for ac_header in sys/timeb.h
21797 do :
21798   ac_fn_c_check_header_compile "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21799 if test "x$ac_cv_header_sys_timeb_h" = xyes
21800 then :
21801   cat >>confdefs.h <<_ACEOF
21802 #define HAVE_SYS_TIMEB_H 1
21803 _ACEOF
21804
21805 fi
21806 done
21807
21808   for ac_func in _ftime
21809 do :
21810   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21811 if test "x$ac_cv_func__ftime" = xyes
21812 then :
21813   cat >>confdefs.h <<_ACEOF
21814 #define HAVE__FTIME 1
21815 _ACEOF
21816
21817 fi
21818 done
21819
21820
21821   fi
21822
21823
21824
21825
21826
21827           GNULIB_GETTIMEOFDAY=1
21828
21829
21830
21831
21832
21833 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21834
21835
21836
21837
21838    if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
21839   GNU_MAKE_TRUE=
21840   GNU_MAKE_FALSE='#'
21841 else
21842   GNU_MAKE_TRUE='#'
21843   GNU_MAKE_FALSE=
21844 fi
21845
21846
21847   # Autoconf 2.61a.99 and earlier don't support linking a file only
21848   # in VPATH builds.  But since GNUmakefile is for maintainer use
21849   # only, it does not matter if we skip the link with older autoconf.
21850   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21851   # builds, so use a shell variable to bypass this.
21852   GNUmakefile=GNUmakefile
21853   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21854
21855
21856
21857   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21858 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
21859 if test ${gl_cv_func_isnand_no_libm+y}
21860 then :
21861   printf %s "(cached) " >&6
21862 else
21863
21864       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21865 /* end confdefs.h.  */
21866 #include <math.h>
21867              #if __GNUC__ >= 4
21868              # undef isnand
21869              # define isnand(x) __builtin_isnan ((double)(x))
21870              #else
21871              # undef isnand
21872              # define isnand(x) isnan ((double)(x))
21873              #endif
21874              double x;
21875 int
21876 main (void)
21877 {
21878 return isnand (x);
21879   ;
21880   return 0;
21881 }
21882 _ACEOF
21883 if ac_fn_c_try_link "$LINENO"
21884 then :
21885   gl_cv_func_isnand_no_libm=yes
21886 else
21887   gl_cv_func_isnand_no_libm=no
21888 fi
21889 rm -f core conftest.err conftest.$ac_objext \
21890     conftest$ac_exeext conftest.$ac_ext
21891
21892 fi
21893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21894 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
21895
21896   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21897   if test $gl_cv_func_isnand_no_libm = yes; then
21898
21899 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21900
21901   fi
21902
21903   if test $gl_func_isnand_no_libm != yes; then
21904
21905
21906
21907
21908
21909
21910
21911
21912   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21913
21914
21915
21916
21917   fi
21918
21919
21920   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
21921 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
21922 if test ${gl_cv_func_isnanf_no_libm+y}
21923 then :
21924   printf %s "(cached) " >&6
21925 else
21926
21927       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21928 /* end confdefs.h.  */
21929 #include <math.h>
21930              #if __GNUC__ >= 4
21931              # undef isnanf
21932              # define isnanf(x) __builtin_isnanf ((float)(x))
21933              #elif defined isnan
21934              # undef isnanf
21935              # define isnanf(x) isnan ((float)(x))
21936              #endif
21937              float x;
21938 int
21939 main (void)
21940 {
21941 return isnanf (x);
21942   ;
21943   return 0;
21944 }
21945 _ACEOF
21946 if ac_fn_c_try_link "$LINENO"
21947 then :
21948   gl_cv_func_isnanf_no_libm=yes
21949 else
21950   gl_cv_func_isnanf_no_libm=no
21951 fi
21952 rm -f core conftest.err conftest.$ac_objext \
21953     conftest$ac_exeext conftest.$ac_ext
21954
21955 fi
21956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
21957 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
21958
21959   if test $gl_cv_func_isnanf_no_libm = yes; then
21960
21961
21962
21963   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
21964 printf %s "checking whether isnan(float) works... " >&6; }
21965 if test ${gl_cv_func_isnanf_works+y}
21966 then :
21967   printf %s "(cached) " >&6
21968 else
21969
21970       if test "$cross_compiling" = yes
21971 then :
21972   case "$host_os" in
21973            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
21974            *)                gl_cv_func_isnanf_works="guessing yes";;
21975          esac
21976
21977 else
21978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21979 /* end confdefs.h.  */
21980
21981 #include <math.h>
21982 #if __GNUC__ >= 4
21983 # undef isnanf
21984 # define isnanf(x) __builtin_isnanf ((float)(x))
21985 #elif defined isnan
21986 # undef isnanf
21987 # define isnanf(x) isnan ((float)(x))
21988 #endif
21989 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
21990 #ifdef __DECC
21991 static float
21992 NaN ()
21993 {
21994   static float zero = 0.0f;
21995   return zero / zero;
21996 }
21997 #else
21998 # define NaN() (0.0f / 0.0f)
21999 #endif
22000 #define NWORDS \
22001   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22002 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
22003 int main()
22004 {
22005   int result = 0;
22006
22007   if (isnanf (1.0f / 0.0f))
22008     result |= 1;
22009
22010   if (!isnanf (NaN ()))
22011     result |= 2;
22012
22013 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
22014   /* The isnanf function should be immune against changes in the sign bit and
22015      in the mantissa bits.  The xor operation twiddles a bit that can only be
22016      a sign bit or a mantissa bit.  */
22017   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
22018     {
22019       memory_float m;
22020
22021       m.value = NaN ();
22022       /* Set the bits below the exponent to 01111...111.  */
22023       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
22024       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
22025       if (!isnanf (m.value))
22026         result |= 4;
22027     }
22028 #endif
22029
22030   return result;
22031 }
22032 _ACEOF
22033 if ac_fn_c_try_run "$LINENO"
22034 then :
22035   gl_cv_func_isnanf_works=yes
22036 else
22037   gl_cv_func_isnanf_works=no
22038 fi
22039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22040   conftest.$ac_objext conftest.beam conftest.$ac_ext
22041 fi
22042
22043
22044 fi
22045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
22046 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
22047
22048   fi
22049   if test $gl_cv_func_isnanf_no_libm = yes \
22050      && { case "$gl_cv_func_isnanf_works" in
22051             *yes) true;;
22052             *) false;;
22053           esac
22054         }; then
22055     gl_func_isnanf_no_libm=yes
22056
22057 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
22058
22059   else
22060     gl_func_isnanf_no_libm=no
22061   fi
22062
22063   if test $gl_func_isnanf_no_libm != yes; then
22064
22065
22066
22067
22068
22069
22070
22071
22072   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
22073
22074
22075
22076   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
22077 printf %s "checking where to find the exponent in a 'float'... " >&6; }
22078 if test ${gl_cv_cc_float_expbit0+y}
22079 then :
22080   printf %s "(cached) " >&6
22081 else
22082
22083       if test "$cross_compiling" = yes
22084 then :
22085   gl_cv_cc_float_expbit0="word 0 bit 23"
22086 else
22087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22088 /* end confdefs.h.  */
22089
22090 #include <float.h>
22091 #include <stddef.h>
22092 #include <stdio.h>
22093 #include <string.h>
22094 #define NWORDS \
22095   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22096 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
22097 static unsigned int ored_words[NWORDS];
22098 static unsigned int anded_words[NWORDS];
22099 static void add_to_ored_words (float x)
22100 {
22101   memory_float m;
22102   size_t i;
22103   /* Clear it first, in case
22104      sizeof (float) < sizeof (memory_float).  */
22105   memset (&m, 0, sizeof (memory_float));
22106   m.value = x;
22107   for (i = 0; i < NWORDS; i++)
22108     {
22109       ored_words[i] |= m.word[i];
22110       anded_words[i] &= m.word[i];
22111     }
22112 }
22113 int main ()
22114 {
22115   size_t j;
22116   FILE *fp = fopen ("conftest.out", "w");
22117   if (fp == NULL)
22118     return 1;
22119   for (j = 0; j < NWORDS; j++)
22120     anded_words[j] = ~ (unsigned int) 0;
22121   add_to_ored_words (0.25f);
22122   add_to_ored_words (0.5f);
22123   add_to_ored_words (1.0f);
22124   add_to_ored_words (2.0f);
22125   add_to_ored_words (4.0f);
22126   /* Remove bits that are common (e.g. if representation of the first mantissa
22127      bit is explicit).  */
22128   for (j = 0; j < NWORDS; j++)
22129     ored_words[j] &= ~anded_words[j];
22130   /* Now find the nonzero word.  */
22131   for (j = 0; j < NWORDS; j++)
22132     if (ored_words[j] != 0)
22133       break;
22134   if (j < NWORDS)
22135     {
22136       size_t i;
22137       for (i = j + 1; i < NWORDS; i++)
22138         if (ored_words[i] != 0)
22139           {
22140             fprintf (fp, "unknown");
22141             return (fclose (fp) != 0);
22142           }
22143       for (i = 0; ; i++)
22144         if ((ored_words[j] >> i) & 1)
22145           {
22146             fprintf (fp, "word %d bit %d", (int) j, (int) i);
22147             return (fclose (fp) != 0);
22148           }
22149     }
22150   fprintf (fp, "unknown");
22151   return (fclose (fp) != 0);
22152 }
22153
22154 _ACEOF
22155 if ac_fn_c_try_run "$LINENO"
22156 then :
22157   gl_cv_cc_float_expbit0=`cat conftest.out`
22158 else
22159   gl_cv_cc_float_expbit0="unknown"
22160 fi
22161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22162   conftest.$ac_objext conftest.beam conftest.$ac_ext
22163 fi
22164
22165       rm -f conftest.out
22166
22167 fi
22168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
22169 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
22170   case "$gl_cv_cc_float_expbit0" in
22171     word*bit*)
22172       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22173       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
22174
22175 cat >>confdefs.h <<_ACEOF
22176 #define FLT_EXPBIT0_WORD $word
22177 _ACEOF
22178
22179
22180 cat >>confdefs.h <<_ACEOF
22181 #define FLT_EXPBIT0_BIT $bit
22182 _ACEOF
22183
22184       ;;
22185   esac
22186
22187
22188   fi
22189
22190
22191   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
22192 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
22193 if test ${gl_cv_func_isnanl_no_libm+y}
22194 then :
22195   printf %s "(cached) " >&6
22196 else
22197
22198       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199 /* end confdefs.h.  */
22200 #include <math.h>
22201              #if __GNUC__ >= 4
22202              # undef isnanl
22203              # define isnanl(x) __builtin_isnanl ((long double)(x))
22204              #elif defined isnan
22205              # undef isnanl
22206              # define isnanl(x) isnan ((long double)(x))
22207              #endif
22208              long double x;
22209 int
22210 main (void)
22211 {
22212 return isnanl (x);
22213   ;
22214   return 0;
22215 }
22216 _ACEOF
22217 if ac_fn_c_try_link "$LINENO"
22218 then :
22219   gl_cv_func_isnanl_no_libm=yes
22220 else
22221   gl_cv_func_isnanl_no_libm=no
22222 fi
22223 rm -f core conftest.err conftest.$ac_objext \
22224     conftest$ac_exeext conftest.$ac_ext
22225
22226 fi
22227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
22228 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
22229
22230   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
22231   if test $gl_func_isnanl_no_libm = yes; then
22232
22233
22234
22235
22236      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
22237 printf %s "checking whether isnanl works... " >&6; }
22238 if test ${gl_cv_func_isnanl_works+y}
22239 then :
22240   printf %s "(cached) " >&6
22241 else
22242
22243       if test "$cross_compiling" = yes
22244 then :
22245   gl_cv_func_isnanl_works="guessing yes"
22246 else
22247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22248 /* end confdefs.h.  */
22249
22250 #include <float.h>
22251 #include <limits.h>
22252 #include <math.h>
22253 #if __GNUC__ >= 4
22254 # undef isnanl
22255 # define isnanl(x) __builtin_isnanl ((long double)(x))
22256 #elif defined isnan
22257 # undef isnanl
22258 # define isnanl(x) isnan ((long double)(x))
22259 #endif
22260 #define NWORDS \
22261   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22262 typedef union { unsigned int word[NWORDS]; long double value; }
22263         memory_long_double;
22264 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
22265    runtime type conversion.  */
22266 #ifdef __sgi
22267 static long double NaNl ()
22268 {
22269   double zero = 0.0;
22270   return zero / zero;
22271 }
22272 #else
22273 # define NaNl() (0.0L / 0.0L)
22274 #endif
22275 int main ()
22276 {
22277   int result = 0;
22278
22279   if (!isnanl (NaNl ()))
22280     result |= 1;
22281
22282   {
22283     memory_long_double m;
22284     unsigned int i;
22285
22286     /* The isnanl function should be immune against changes in the sign bit and
22287        in the mantissa bits.  The xor operation twiddles a bit that can only be
22288        a sign bit or a mantissa bit (since the exponent never extends to
22289        bit 31).  */
22290     m.value = NaNl ();
22291     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
22292     for (i = 0; i < NWORDS; i++)
22293       m.word[i] |= 1;
22294     if (!isnanl (m.value))
22295       result |= 1;
22296   }
22297
22298 #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
22299 /* Representation of an 80-bit 'long double' as an initializer for a sequence
22300    of 'unsigned int' words.  */
22301 # ifdef WORDS_BIGENDIAN
22302 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
22303      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
22304        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
22305        (unsigned int) (mantlo) << 16                                        \
22306      }
22307 # else
22308 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
22309      { mantlo, manthi, exponent }
22310 # endif
22311   { /* Quiet NaN.  */
22312     static memory_long_double x =
22313       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
22314     if (!isnanl (x.value))
22315       result |= 2;
22316   }
22317   {
22318     /* Signalling NaN.  */
22319     static memory_long_double x =
22320       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
22321     if (!isnanl (x.value))
22322       result |= 2;
22323   }
22324   /* isnanl should return something even for noncanonical values.  */
22325   { /* Pseudo-NaN.  */
22326     static memory_long_double x =
22327       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
22328     if (isnanl (x.value) && !isnanl (x.value))
22329       result |= 4;
22330   }
22331   { /* Pseudo-Infinity.  */
22332     static memory_long_double x =
22333       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
22334     if (isnanl (x.value) && !isnanl (x.value))
22335       result |= 8;
22336   }
22337   { /* Pseudo-Zero.  */
22338     static memory_long_double x =
22339       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
22340     if (isnanl (x.value) && !isnanl (x.value))
22341       result |= 16;
22342   }
22343   { /* Unnormalized number.  */
22344     static memory_long_double x =
22345       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
22346     if (isnanl (x.value) && !isnanl (x.value))
22347       result |= 32;
22348   }
22349   { /* Pseudo-Denormal.  */
22350     static memory_long_double x =
22351       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
22352     if (isnanl (x.value) && !isnanl (x.value))
22353       result |= 64;
22354   }
22355 #endif
22356
22357   return result;
22358 }
22359 _ACEOF
22360 if ac_fn_c_try_run "$LINENO"
22361 then :
22362   gl_cv_func_isnanl_works=yes
22363 else
22364   gl_cv_func_isnanl_works=no
22365 fi
22366 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22367   conftest.$ac_objext conftest.beam conftest.$ac_ext
22368 fi
22369
22370
22371 fi
22372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
22373 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
22374
22375     case "$gl_cv_func_isnanl_works" in
22376       *yes) ;;
22377       *)    gl_func_isnanl_no_libm=no ;;
22378     esac
22379   fi
22380   if test $gl_func_isnanl_no_libm = yes; then
22381
22382 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
22383
22384   fi
22385
22386   if test $gl_func_isnanl_no_libm != yes; then
22387
22388
22389
22390
22391
22392
22393
22394
22395   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
22396
22397
22398
22399
22400   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
22401 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
22402 if test ${gl_cv_cc_long_double_expbit0+y}
22403 then :
22404   printf %s "(cached) " >&6
22405 else
22406
22407       if test "$cross_compiling" = yes
22408 then :
22409
22410                               gl_cv_cc_long_double_expbit0="unknown"
22411
22412 else
22413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22414 /* end confdefs.h.  */
22415
22416 #include <float.h>
22417 #include <stddef.h>
22418 #include <stdio.h>
22419 #include <string.h>
22420 #define NWORDS \
22421   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22422 typedef union { long double value; unsigned int word[NWORDS]; }
22423         memory_long_double;
22424 static unsigned int ored_words[NWORDS];
22425 static unsigned int anded_words[NWORDS];
22426 static void add_to_ored_words (long double x)
22427 {
22428   memory_long_double m;
22429   size_t i;
22430   /* Clear it first, in case
22431      sizeof (long double) < sizeof (memory_long_double).  */
22432   memset (&m, 0, sizeof (memory_long_double));
22433   m.value = x;
22434   for (i = 0; i < NWORDS; i++)
22435     {
22436       ored_words[i] |= m.word[i];
22437       anded_words[i] &= m.word[i];
22438     }
22439 }
22440 int main ()
22441 {
22442   size_t j;
22443   FILE *fp = fopen ("conftest.out", "w");
22444   if (fp == NULL)
22445     return 1;
22446   for (j = 0; j < NWORDS; j++)
22447     anded_words[j] = ~ (unsigned int) 0;
22448   add_to_ored_words (0.25L);
22449   add_to_ored_words (0.5L);
22450   add_to_ored_words (1.0L);
22451   add_to_ored_words (2.0L);
22452   add_to_ored_words (4.0L);
22453   /* Remove bits that are common (e.g. if representation of the first mantissa
22454      bit is explicit).  */
22455   for (j = 0; j < NWORDS; j++)
22456     ored_words[j] &= ~anded_words[j];
22457   /* Now find the nonzero word.  */
22458   for (j = 0; j < NWORDS; j++)
22459     if (ored_words[j] != 0)
22460       break;
22461   if (j < NWORDS)
22462     {
22463       size_t i;
22464       for (i = j + 1; i < NWORDS; i++)
22465         if (ored_words[i] != 0)
22466           {
22467             fprintf (fp, "unknown");
22468             return (fclose (fp) != 0);
22469           }
22470       for (i = 0; ; i++)
22471         if ((ored_words[j] >> i) & 1)
22472           {
22473             fprintf (fp, "word %d bit %d", (int) j, (int) i);
22474             return (fclose (fp) != 0);
22475           }
22476     }
22477   fprintf (fp, "unknown");
22478   return (fclose (fp) != 0);
22479 }
22480
22481 _ACEOF
22482 if ac_fn_c_try_run "$LINENO"
22483 then :
22484   gl_cv_cc_long_double_expbit0=`cat conftest.out`
22485 else
22486   gl_cv_cc_long_double_expbit0="unknown"
22487 fi
22488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22489   conftest.$ac_objext conftest.beam conftest.$ac_ext
22490 fi
22491
22492       rm -f conftest.out
22493
22494 fi
22495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
22496 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
22497   case "$gl_cv_cc_long_double_expbit0" in
22498     word*bit*)
22499       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22500       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
22501
22502 cat >>confdefs.h <<_ACEOF
22503 #define LDBL_EXPBIT0_WORD $word
22504 _ACEOF
22505
22506
22507 cat >>confdefs.h <<_ACEOF
22508 #define LDBL_EXPBIT0_BIT $bit
22509 _ACEOF
22510
22511       ;;
22512   esac
22513
22514
22515
22516   fi
22517
22518
22519   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
22520 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
22521 if test ${gl_cv_prog_c_ignore_unused_libraries+y}
22522 then :
22523   printf %s "(cached) " >&6
22524 else
22525   gl_cv_prog_c_ignore_unused_libraries=none
22526      gl_saved_ldflags=$LDFLAGS
22527      gl_saved_libs=$LIBS
22528      # Link with -lm to detect binutils 2.16 bug with --as-needed; see
22529      # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
22530      LIBS="$LIBS -lm"
22531      # Use long option sequences like '-z ignore' to test for the feature,
22532      # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
22533      # GCC + binutils likes '-Wl,--as-needed'.
22534      # GCC + Solaris ld likes '-Wl,-z,ignore'.
22535      # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
22536      # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
22537      # native cc issues annoying warnings and then ignores it,
22538      # which would cause us to incorrectly conclude that it worked.
22539      for gl_flags in  '-Wl,--as-needed' \
22540   '-Wl,-z,ignore' \
22541   '-z ignore'
22542
22543      do
22544        LDFLAGS="$gl_flags $LDFLAGS"
22545        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22546 /* end confdefs.h.  */
22547
22548 int
22549 main (void)
22550 {
22551
22552   ;
22553   return 0;
22554 }
22555 _ACEOF
22556 if ac_fn_c_try_link "$LINENO"
22557 then :
22558   gl_cv_prog_c_ignore_unused_libraries=$gl_flags
22559 fi
22560 rm -f core conftest.err conftest.$ac_objext \
22561     conftest$ac_exeext conftest.$ac_ext
22562        LDFLAGS=$gl_saved_ldflags
22563        test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
22564          break
22565      done
22566      LIBS=$gl_saved_libs
22567
22568 fi
22569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
22570 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
22571   IGNORE_UNUSED_LIBRARIES_CFLAGS=
22572   if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
22573     IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
22574   fi
22575
22576
22577
22578
22579   if test "$gl_threads_api" = posix; then
22580     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
22581     # pthread_rwlock_* functions.
22582     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22583 "
22584 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
22585 then :
22586
22587 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22588
22589 fi
22590
22591     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22592     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22593 /* end confdefs.h.  */
22594
22595       #include <pthread.h>
22596 int
22597 main (void)
22598 {
22599
22600 #if __FreeBSD__ == 4
22601 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22602 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
22603        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
22604 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
22605 #else
22606 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22607 return !x;
22608 #endif
22609
22610   ;
22611   return 0;
22612 }
22613 _ACEOF
22614 if ac_fn_c_try_compile "$LINENO"
22615 then :
22616
22617 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22618
22619 fi
22620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22621   fi
22622   :
22623
22624
22625
22626 cat >>confdefs.h <<_ACEOF
22627 #define GNULIB_LOCK 1
22628 _ACEOF
22629
22630
22631
22632
22633
22634
22635
22636
22637   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22638 printf %s "checking whether lseek detects pipes... " >&6; }
22639 if test ${gl_cv_func_lseek_pipe+y}
22640 then :
22641   printf %s "(cached) " >&6
22642 else
22643   case "$host_os" in
22644        mingw*)
22645                                                                gl_cv_func_lseek_pipe=no
22646          ;;
22647        *)
22648          if test $cross_compiling = no; then
22649            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22650 /* end confdefs.h.  */
22651
22652 #include <sys/types.h> /* for off_t */
22653 #include <stdio.h> /* for SEEK_CUR */
22654 #if HAVE_UNISTD_H
22655 # include <unistd.h>
22656 #else /* on Windows with MSVC */
22657 # include <io.h>
22658 #endif
22659
22660 int
22661 main (void)
22662 {
22663
22664   /* Exit with success only if stdin is seekable.  */
22665   return lseek (0, (off_t)0, SEEK_CUR) < 0;
22666
22667   ;
22668   return 0;
22669 }
22670 _ACEOF
22671 if ac_fn_c_try_link "$LINENO"
22672 then :
22673   if test -s conftest$ac_exeext \
22674                  && ./conftest$ac_exeext < conftest.$ac_ext \
22675                  && test 1 = "`echo hi \
22676                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22677                 gl_cv_func_lseek_pipe=yes
22678               else
22679                 gl_cv_func_lseek_pipe=no
22680               fi
22681
22682 else
22683   gl_cv_func_lseek_pipe=no
22684 fi
22685 rm -f core conftest.err conftest.$ac_objext \
22686     conftest$ac_exeext conftest.$ac_ext
22687          else
22688            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22689 /* end confdefs.h.  */
22690
22691 #if defined __BEOS__
22692 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
22693   Choke me.
22694 #endif
22695 _ACEOF
22696 if ac_fn_c_try_compile "$LINENO"
22697 then :
22698   gl_cv_func_lseek_pipe=yes
22699 else
22700   gl_cv_func_lseek_pipe=no
22701 fi
22702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22703          fi
22704          ;;
22705      esac
22706
22707 fi
22708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22709 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
22710   if test $gl_cv_func_lseek_pipe = no; then
22711     REPLACE_LSEEK=1
22712
22713 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22714
22715   fi
22716
22717
22718   if test $WINDOWS_64_BIT_OFF_T = 1; then
22719     REPLACE_LSEEK=1
22720   fi
22721
22722   if test $REPLACE_LSEEK = 1; then
22723
22724
22725
22726
22727
22728
22729
22730
22731   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22732
22733   fi
22734
22735
22736
22737
22738
22739           GNULIB_LSEEK=1
22740
22741
22742
22743
22744
22745 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22746
22747
22748
22749
22750
22751
22752   if test $ac_cv_func_lstat = yes; then
22753
22754     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22755       *no)
22756         REPLACE_LSTAT=1
22757         ;;
22758     esac
22759   else
22760     HAVE_LSTAT=0
22761   fi
22762
22763   if test $REPLACE_LSTAT = 1; then
22764
22765
22766
22767
22768
22769
22770
22771
22772   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22773
22774     :
22775   fi
22776
22777
22778
22779
22780
22781           GNULIB_LSTAT=1
22782
22783
22784
22785
22786
22787 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22788
22789
22790
22791
22792
22793
22794
22795
22796       for ac_header in stdlib.h
22797 do :
22798   ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22799 if test "x$ac_cv_header_stdlib_h" = xyes
22800 then :
22801   cat >>confdefs.h <<_ACEOF
22802 #define HAVE_STDLIB_H 1
22803 _ACEOF
22804
22805 fi
22806 done
22807
22808   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22809 printf %s "checking for GNU libc compatible malloc... " >&6; }
22810 if test ${ac_cv_func_malloc_0_nonnull+y}
22811 then :
22812   printf %s "(cached) " >&6
22813 else
22814   if test "$cross_compiling" = yes
22815 then :
22816   case "$host_os" in
22817           # Guess yes on platforms where we know the result.
22818           *-gnu* | freebsd* | netbsd* | openbsd* \
22819           | hpux* | solaris* | cygwin* | mingw*)
22820             ac_cv_func_malloc_0_nonnull=yes ;;
22821           # If we don't know, assume the worst.
22822           *) ac_cv_func_malloc_0_nonnull=no ;;
22823         esac
22824
22825 else
22826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22827 /* end confdefs.h.  */
22828 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22829             # include <stdlib.h>
22830             #else
22831             char *malloc ();
22832             #endif
22833
22834 int
22835 main (void)
22836 {
22837 char *p = malloc (0);
22838             int result = !p;
22839             free (p);
22840             return result;
22841   ;
22842   return 0;
22843 }
22844
22845 _ACEOF
22846 if ac_fn_c_try_run "$LINENO"
22847 then :
22848   ac_cv_func_malloc_0_nonnull=yes
22849 else
22850   ac_cv_func_malloc_0_nonnull=no
22851 fi
22852 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22853   conftest.$ac_objext conftest.beam conftest.$ac_ext
22854 fi
22855
22856
22857 fi
22858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22859 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
22860   if test $ac_cv_func_malloc_0_nonnull = yes
22861 then :
22862
22863 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22864
22865 else
22866   printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22867
22868      REPLACE_MALLOC=1
22869
22870 fi
22871
22872
22873   if test $REPLACE_MALLOC = 1; then
22874
22875
22876
22877
22878
22879
22880
22881
22882   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22883
22884   fi
22885
22886
22887 cat >>confdefs.h <<_ACEOF
22888 #define GNULIB_MALLOC_GNU 1
22889 _ACEOF
22890
22891
22892
22893
22894
22895   if test $gl_cv_func_malloc_posix = yes; then
22896
22897 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22898
22899   else
22900     REPLACE_MALLOC=1
22901   fi
22902
22903   if test $REPLACE_MALLOC = 1; then
22904
22905
22906
22907
22908
22909
22910
22911
22912   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22913
22914   fi
22915
22916
22917
22918
22919
22920           GNULIB_MALLOC_POSIX=1
22921
22922
22923
22924
22925
22926 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941      if test $gl_cv_have_include_next = yes; then
22942        gl_cv_next_math_h='<'math.h'>'
22943      else
22944        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22945 printf %s "checking absolute name of <math.h>... " >&6; }
22946 if test ${gl_cv_next_math_h+y}
22947 then :
22948   printf %s "(cached) " >&6
22949 else
22950
22951              if test $ac_cv_header_math_h = yes; then
22952
22953
22954
22955
22956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22957 /* end confdefs.h.  */
22958 #include <math.h>
22959 _ACEOF
22960                 case "$host_os" in
22961     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22962     *)    gl_absname_cpp="$ac_cpp" ;;
22963   esac
22964
22965   case "$host_os" in
22966     mingw*)
22967                                           gl_dirsep_regex='[/\\]'
22968       ;;
22969     *)
22970       gl_dirsep_regex='\/'
22971       ;;
22972   esac
22973       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22974   gl_header_literal_regex=`echo 'math.h' \
22975                            | sed -e "$gl_make_literal_regex_sed"`
22976   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22977       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22978       s|^/[^/]|//&|
22979       p
22980       q
22981     }'
22982
22983         gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22984   sed -n "$gl_absolute_header_sed"`
22985
22986            gl_header=$gl_cv_absolute_math_h
22987            gl_cv_next_math_h='"'$gl_header'"'
22988           else
22989                gl_cv_next_math_h='<'math.h'>'
22990              fi
22991
22992
22993 fi
22994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22995 printf "%s\n" "$gl_cv_next_math_h" >&6; }
22996      fi
22997      NEXT_MATH_H=$gl_cv_next_math_h
22998
22999      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23000        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23001        gl_next_as_first_directive='<'math.h'>'
23002      else
23003        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23004        gl_next_as_first_directive=$gl_cv_next_math_h
23005      fi
23006      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
23007
23008
23009
23010
23011
23012   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23013 printf %s "checking whether NAN macro works... " >&6; }
23014 if test ${gl_cv_header_math_nan_works+y}
23015 then :
23016   printf %s "(cached) " >&6
23017 else
23018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23019 /* end confdefs.h.  */
23020 #include <math.h>
23021 int
23022 main (void)
23023 {
23024 /* Solaris 10 has a broken definition of NAN.  Other platforms
23025         fail to provide NAN, or provide it only in C99 mode; this
23026         test only needs to fail when NAN is provided but wrong.  */
23027          float f = 1.0f;
23028 #ifdef NAN
23029          f = NAN;
23030 #endif
23031          return f == 0;
23032   ;
23033   return 0;
23034 }
23035 _ACEOF
23036 if ac_fn_c_try_compile "$LINENO"
23037 then :
23038   gl_cv_header_math_nan_works=yes
23039 else
23040   gl_cv_header_math_nan_works=no
23041 fi
23042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23043 fi
23044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23045 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
23046   if test $gl_cv_header_math_nan_works = no; then
23047     REPLACE_NAN=1
23048   fi
23049   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23050 printf %s "checking whether HUGE_VAL works... " >&6; }
23051 if test ${gl_cv_header_math_huge_val_works+y}
23052 then :
23053   printf %s "(cached) " >&6
23054 else
23055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23056 /* end confdefs.h.  */
23057 #include <math.h>
23058 int
23059 main (void)
23060 {
23061 /* Solaris 10 has a broken definition of HUGE_VAL.  */
23062          double d = HUGE_VAL;
23063          return d == 0;
23064   ;
23065   return 0;
23066 }
23067 _ACEOF
23068 if ac_fn_c_try_compile "$LINENO"
23069 then :
23070   gl_cv_header_math_huge_val_works=yes
23071 else
23072   gl_cv_header_math_huge_val_works=no
23073 fi
23074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23075 fi
23076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23077 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
23078   if test $gl_cv_header_math_huge_val_works = no; then
23079     REPLACE_HUGE_VAL=1
23080   fi
23081
23082
23083
23084
23085   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23086
23087
23088
23089
23090
23091
23092
23093
23094   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23095
23096
23097   for ac_header in bp-sym.h
23098 do :
23099   ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23100 if test "x$ac_cv_header_bp_sym_h" = xyes
23101 then :
23102   cat >>confdefs.h <<_ACEOF
23103 #define HAVE_BP_SYM_H 1
23104 _ACEOF
23105
23106 fi
23107 done
23108
23109
23110   fi
23111
23112
23113
23114
23115
23116           GNULIB_MEMCHR=1
23117
23118
23119
23120
23121
23122 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132   for ac_func in mempcpy
23133 do :
23134   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23135 if test "x$ac_cv_func_mempcpy" = xyes
23136 then :
23137   cat >>confdefs.h <<_ACEOF
23138 #define HAVE_MEMPCPY 1
23139 _ACEOF
23140
23141 fi
23142 done
23143
23144   if test $ac_cv_func_mempcpy = no; then
23145     HAVE_MEMPCPY=0
23146   fi
23147
23148   if test $HAVE_MEMPCPY = 0; then
23149
23150
23151
23152
23153
23154
23155
23156
23157   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23158
23159
23160   :
23161
23162   fi
23163
23164
23165
23166
23167
23168           GNULIB_MEMPCPY=1
23169
23170
23171
23172
23173
23174 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23175
23176
23177
23178
23179
23180
23181
23182
23183   if test $ac_cv_have_decl_memrchr = no; then
23184     HAVE_DECL_MEMRCHR=0
23185   fi
23186
23187   for ac_func in memrchr
23188 do :
23189   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23190 if test "x$ac_cv_func_memrchr" = xyes
23191 then :
23192   cat >>confdefs.h <<_ACEOF
23193 #define HAVE_MEMRCHR 1
23194 _ACEOF
23195
23196 fi
23197 done
23198
23199
23200   if test $ac_cv_func_memrchr = no; then
23201
23202
23203
23204
23205
23206
23207
23208
23209   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23210
23211     :
23212   fi
23213
23214
23215
23216
23217
23218           GNULIB_MEMRCHR=1
23219
23220
23221
23222
23223
23224 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23225
23226
23227
23228
23229   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23230
23231
23232
23233
23234
23235
23236
23237
23238   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
23239
23240   fi
23241
23242   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23243
23244
23245
23246
23247
23248
23249
23250
23251   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
23252
23253   fi
23254
23255
23256
23257   case "$host_os" in
23258     mingw* | pw*)
23259       REPLACE_OPEN=1
23260       ;;
23261     *)
23262
23263       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23264 printf %s "checking whether open recognizes a trailing slash... " >&6; }
23265 if test ${gl_cv_func_open_slash+y}
23266 then :
23267   printf %s "(cached) " >&6
23268 else
23269   # Assume that if we have lstat, we can also check symlinks.
23270           if test $ac_cv_func_lstat = yes; then
23271             touch conftest.tmp
23272             ln -s conftest.tmp conftest.lnk
23273           fi
23274           if test "$cross_compiling" = yes
23275 then :
23276
23277              case "$host_os" in
23278                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23279                  gl_cv_func_open_slash="guessing no" ;;
23280                *)
23281                  gl_cv_func_open_slash="guessing yes" ;;
23282              esac
23283
23284 else
23285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23286 /* end confdefs.h.  */
23287
23288 #include <fcntl.h>
23289 #if HAVE_UNISTD_H
23290 # include <unistd.h>
23291 #endif
23292 int main ()
23293 {
23294   int result = 0;
23295 #if HAVE_LSTAT
23296   if (open ("conftest.lnk/", O_RDONLY) != -1)
23297     result |= 1;
23298 #endif
23299   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23300     result |= 2;
23301   return result;
23302 }
23303 _ACEOF
23304 if ac_fn_c_try_run "$LINENO"
23305 then :
23306   gl_cv_func_open_slash=yes
23307 else
23308   gl_cv_func_open_slash=no
23309 fi
23310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23311   conftest.$ac_objext conftest.beam conftest.$ac_ext
23312 fi
23313
23314           rm -f conftest.sl conftest.tmp conftest.lnk
23315
23316 fi
23317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23318 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
23319       case "$gl_cv_func_open_slash" in
23320         *no)
23321
23322 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23323
23324           REPLACE_OPEN=1
23325           ;;
23326       esac
23327       ;;
23328   esac
23329
23330     if test $REPLACE_OPEN = 0; then
23331
23332
23333
23334   if test $ac_cv_func_fchdir = no; then
23335     HAVE_FCHDIR=0
23336   fi
23337
23338       if test $HAVE_FCHDIR = 0; then
23339         REPLACE_OPEN=1
23340       fi
23341     fi
23342
23343
23344
23345   if test $REPLACE_OPEN = 1; then
23346
23347
23348
23349
23350
23351
23352
23353
23354   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
23355
23356
23357
23358   :
23359
23360   fi
23361
23362
23363
23364
23365
23366           GNULIB_OPEN=1
23367
23368
23369
23370
23371
23372 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
23373
23374
23375
23376
23377
23378
23379
23380
23381   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
23382   yes+*yes)
23383     ;;
23384   yes+*)
23385     # Solaris 9 has *at functions, but uniformly mishandles trailing
23386     # slash in all of them.
23387     REPLACE_OPENAT=1
23388     ;;
23389   *)
23390     HAVE_OPENAT=0
23391     ;;
23392   esac
23393
23394   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
23395
23396
23397
23398
23399
23400
23401
23402
23403   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23404
23405
23406
23407   :
23408
23409   fi
23410
23411
23412 cat >>confdefs.h <<_ACEOF
23413 #define GNULIB_OPENAT 1
23414 _ACEOF
23415
23416
23417
23418
23419
23420
23421           GNULIB_OPENAT=1
23422
23423
23424
23425
23426
23427 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
23428
23429
23430
23431
23432
23433
23434
23435
23436 cat >>confdefs.h <<_ACEOF
23437 #define GNULIB_OPENAT_SAFER 1
23438 _ACEOF
23439
23440
23441
23442
23443
23444   for ac_func in opendir
23445 do :
23446   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
23447 if test "x$ac_cv_func_opendir" = xyes
23448 then :
23449   cat >>confdefs.h <<_ACEOF
23450 #define HAVE_OPENDIR 1
23451 _ACEOF
23452
23453 fi
23454 done
23455
23456   if test $ac_cv_func_opendir = no; then
23457     HAVE_OPENDIR=0
23458   fi
23459
23460
23461
23462
23463   if test $ac_cv_func_fchdir = no; then
23464     HAVE_FCHDIR=0
23465   fi
23466
23467     if test $HAVE_FCHDIR = 0; then
23468       if test $HAVE_OPENDIR = 1; then
23469         REPLACE_OPENDIR=1
23470       fi
23471     fi
23472
23473       case $host_os,$HAVE_OPENDIR in
23474     os2*,1)
23475       REPLACE_OPENDIR=1;;
23476   esac
23477
23478   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
23479
23480
23481
23482
23483
23484
23485
23486
23487   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
23488
23489   fi
23490
23491
23492
23493
23494
23495           GNULIB_OPENDIR=1
23496
23497
23498
23499
23500
23501 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513           if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
23514             REPLACE_PERROR=1
23515   fi
23516   case ${gl_cv_func_strerror_r_works-unset} in
23517     unset|*yes)
23518       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
23519 printf %s "checking whether perror matches strerror... " >&6; }
23520 if test ${gl_cv_func_perror_works+y}
23521 then :
23522   printf %s "(cached) " >&6
23523 else
23524   if test "$cross_compiling" = yes
23525 then :
23526               gl_cv_func_perror_works="guessing no"
23527
23528 else
23529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23530 /* end confdefs.h.  */
23531 #include <errno.h>
23532                 #include <stdio.h>
23533                 #include <stdlib.h>
23534                 #include <string.h>
23535
23536 int
23537 main (void)
23538 {
23539 char *str = strerror (-1);
23540                 if (!getenv("CONFTEST_OUTPUT")) return 0;
23541                 if (!str) str = "";
23542                 puts (str);
23543                 errno = -1;
23544                 perror ("");
23545                 return 0;
23546
23547   ;
23548   return 0;
23549 }
23550 _ACEOF
23551 if ac_fn_c_try_run "$LINENO"
23552 then :
23553   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
23554                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
23555               gl_cv_func_perror_works=yes
23556             else
23557               gl_cv_func_perror_works=no
23558             fi
23559             rm -rf conftest.txt1 conftest.txt2
23560 else
23561   gl_cv_func_perror_works=no
23562 fi
23563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23564   conftest.$ac_objext conftest.beam conftest.$ac_ext
23565 fi
23566
23567
23568 fi
23569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
23570 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
23571       if test "$gl_cv_func_perror_works" != yes; then
23572         REPLACE_PERROR=1
23573       fi
23574       ;;
23575     *)
23576                   REPLACE_PERROR=1
23577       ;;
23578   esac
23579
23580   if test $REPLACE_PERROR = 1; then
23581
23582
23583
23584
23585
23586
23587
23588
23589   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
23590
23591   fi
23592
23593
23594
23595
23596
23597           GNULIB_PERROR=1
23598
23599
23600
23601
23602
23603 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
23604
23605
23606
23607
23608
23609   if test $gl_cv_func_frexp_no_libm = yes; then
23610
23611
23612
23613   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23614 printf %s "checking whether frexp works... " >&6; }
23615 if test ${gl_cv_func_frexp_works+y}
23616 then :
23617   printf %s "(cached) " >&6
23618 else
23619
23620       if test "$cross_compiling" = yes
23621 then :
23622   case "$host_os" in
23623            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
23624            *)                        gl_cv_func_frexp_works="guessing yes";;
23625          esac
23626
23627 else
23628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23629 /* end confdefs.h.  */
23630
23631 #include <float.h>
23632 #include <math.h>
23633 #include <string.h>
23634 #if HAVE_DECL_ALARM
23635 # include <signal.h>
23636 # include <unistd.h>
23637 #endif
23638 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23639    ICC 10.0 has a bug when optimizing the expression -zero.
23640    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23641    to PowerPC on Mac OS X 10.5.  */
23642 #if defined __hpux || defined __sgi || defined __ICC
23643 static double
23644 compute_minus_zero (void)
23645 {
23646   return -DBL_MIN * DBL_MIN;
23647 }
23648 # define minus_zero compute_minus_zero ()
23649 #else
23650 double minus_zero = -0.0;
23651 #endif
23652 int main()
23653 {
23654   int result = 0;
23655   int i;
23656   volatile double x;
23657   double zero = 0.0;
23658 #if HAVE_DECL_ALARM
23659   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23660      number.  Let the test fail in this case.  */
23661   signal (SIGALRM, SIG_DFL);
23662   alarm (5);
23663 #endif
23664   /* Test on denormalized numbers.  */
23665   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
23666     ;
23667   if (x > 0.0)
23668     {
23669       int exp;
23670       double y = frexp (x, &exp);
23671       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
23672          On NetBSD: y = 0.75. Correct: y = 0.5.  */
23673       if (y != 0.5)
23674         result |= 1;
23675     }
23676   /* Test on infinite numbers.  */
23677   x = 1.0 / zero;
23678   {
23679     int exp;
23680     double y = frexp (x, &exp);
23681     if (y != x)
23682       result |= 2;
23683   }
23684   /* Test on negative zero.  */
23685   x = minus_zero;
23686   {
23687     int exp;
23688     double y = frexp (x, &exp);
23689     if (memcmp (&y, &x, sizeof x))
23690       result |= 4;
23691   }
23692   return result;
23693 }
23694 _ACEOF
23695 if ac_fn_c_try_run "$LINENO"
23696 then :
23697   gl_cv_func_frexp_works=yes
23698 else
23699   gl_cv_func_frexp_works=no
23700 fi
23701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23702   conftest.$ac_objext conftest.beam conftest.$ac_ext
23703 fi
23704
23705
23706 fi
23707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23708 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
23709
23710     case "$gl_cv_func_frexp_works" in
23711       *yes)
23712
23713 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23714
23715         ;;
23716     esac
23717   fi
23718
23719   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23720 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
23721 if test ${gl_cv_func_ldexp_no_libm+y}
23722 then :
23723   printf %s "(cached) " >&6
23724 else
23725
23726       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23727 /* end confdefs.h.  */
23728 #include <math.h>
23729              double x;
23730              int y;
23731 int
23732 main (void)
23733 {
23734 return ldexp (x, y) < 1;
23735   ;
23736   return 0;
23737 }
23738 _ACEOF
23739 if ac_fn_c_try_link "$LINENO"
23740 then :
23741   gl_cv_func_ldexp_no_libm=yes
23742 else
23743   gl_cv_func_ldexp_no_libm=no
23744 fi
23745 rm -f core conftest.err conftest.$ac_objext \
23746     conftest$ac_exeext conftest.$ac_ext
23747
23748 fi
23749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23750 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
23751   if test $gl_cv_func_ldexp_no_libm = yes; then
23752
23753 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
23754
23755   fi
23756
23757
23758
23759
23760
23761
23762   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
23763 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
23764 if test ${gl_cv_func_frexpl_no_libm+y}
23765 then :
23766   printf %s "(cached) " >&6
23767 else
23768
23769       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23770 /* end confdefs.h.  */
23771 #include <math.h>
23772              long double x;
23773 int
23774 main (void)
23775 {
23776 int e; return frexpl (x, &e) > 0;
23777   ;
23778   return 0;
23779 }
23780 _ACEOF
23781 if ac_fn_c_try_link "$LINENO"
23782 then :
23783   gl_cv_func_frexpl_no_libm=yes
23784 else
23785   gl_cv_func_frexpl_no_libm=no
23786 fi
23787 rm -f core conftest.err conftest.$ac_objext \
23788     conftest$ac_exeext conftest.$ac_ext
23789
23790 fi
23791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
23792 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
23793
23794   if test $gl_cv_func_frexpl_no_libm = yes; then
23795
23796
23797      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
23798 printf %s "checking whether frexpl works... " >&6; }
23799 if test ${gl_cv_func_frexpl_works+y}
23800 then :
23801   printf %s "(cached) " >&6
23802 else
23803
23804       if test "$cross_compiling" = yes
23805 then :
23806
23807          case "$host_os" in
23808            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
23809               gl_cv_func_frexpl_works="guessing no";;
23810            *) gl_cv_func_frexpl_works="guessing yes";;
23811          esac
23812
23813 else
23814   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23815 /* end confdefs.h.  */
23816
23817 #include <float.h>
23818 #include <math.h>
23819 /* Override the values of <float.h>, like done in float.in.h.  */
23820 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
23821 # undef LDBL_MIN_EXP
23822 # define LDBL_MIN_EXP    (-16381)
23823 #endif
23824 #if defined __i386__ && defined __FreeBSD__
23825 # undef LDBL_MIN_EXP
23826 # define LDBL_MIN_EXP    (-16381)
23827 #endif
23828 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
23829 # undef LDBL_MIN_EXP
23830 # define LDBL_MIN_EXP DBL_MIN_EXP
23831 #endif
23832 #if defined __sgi && (LDBL_MANT_DIG >= 106)
23833 # if defined __GNUC__
23834 #  undef LDBL_MIN_EXP
23835 #  define LDBL_MIN_EXP DBL_MIN_EXP
23836 # endif
23837 #endif
23838 extern
23839 #ifdef __cplusplus
23840 "C"
23841 #endif
23842 long double frexpl (long double, int *);
23843 int main()
23844 {
23845   int result = 0;
23846   volatile long double x;
23847   /* Test on finite numbers that fails on AIX 5.1.  */
23848   x = 16.0L;
23849   {
23850     int exp = -9999;
23851     frexpl (x, &exp);
23852     if (exp != 5)
23853       result |= 1;
23854   }
23855   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
23856      function returns an invalid (incorrectly normalized) value: it returns
23857                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
23858      but the correct result is
23859           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
23860   x = 1.01L;
23861   {
23862     int exp = -9999;
23863     long double y = frexpl (x, &exp);
23864     if (!(exp == 1 && y == 0.505L))
23865       result |= 2;
23866   }
23867   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
23868      LDBL_MAX_EXP = 16384.
23869      In the loop end test, we test x against Infinity, rather than comparing
23870      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
23871   {
23872     int i;
23873     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
23874       {
23875         int exp = -9999;
23876         frexpl (x, &exp);
23877         if (exp != i)
23878           {
23879             result |= 4;
23880             break;
23881           }
23882       }
23883   }
23884   /* Test on denormalized numbers.  */
23885   {
23886     int i;
23887     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
23888       ;
23889     if (x > 0.0L)
23890       {
23891         int exp;
23892         long double y = frexpl (x, &exp);
23893         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
23894            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
23895         if (exp != LDBL_MIN_EXP - 1)
23896           result |= 8;
23897       }
23898   }
23899   /* Test on infinite numbers.  */
23900   x = 1.0L / 0.0L;
23901   {
23902     int exp;
23903     long double y = frexpl (x, &exp);
23904     if (y != x)
23905       result |= 16;
23906   }
23907   return result;
23908 }
23909 _ACEOF
23910 if ac_fn_c_try_run "$LINENO"
23911 then :
23912   gl_cv_func_frexpl_works=yes
23913 else
23914   gl_cv_func_frexpl_works=no
23915 fi
23916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23917   conftest.$ac_objext conftest.beam conftest.$ac_ext
23918 fi
23919
23920
23921 fi
23922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
23923 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
23924
23925     case "$gl_cv_func_frexpl_works" in
23926       *yes) gl_func_frexpl_no_libm=yes ;;
23927       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
23928     esac
23929   else
23930     gl_func_frexpl_no_libm=no
23931         REPLACE_FREXPL=1
23932   fi
23933   if test $gl_func_frexpl_no_libm = yes; then
23934
23935 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
23936
23937             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
23938 "
23939 if test "x$ac_cv_have_decl_frexpl" = xyes
23940 then :
23941
23942 else
23943   HAVE_DECL_FREXPL=0
23944 fi
23945
23946   fi
23947
23948
23949   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
23950 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
23951 if test ${gl_cv_func_ldexpl_no_libm+y}
23952 then :
23953   printf %s "(cached) " >&6
23954 else
23955
23956       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23957 /* end confdefs.h.  */
23958 #include <math.h>
23959              long double x;
23960 int
23961 main (void)
23962 {
23963 return ldexpl (x, -1) > 0;
23964   ;
23965   return 0;
23966 }
23967 _ACEOF
23968 if ac_fn_c_try_link "$LINENO"
23969 then :
23970   gl_cv_func_ldexpl_no_libm=yes
23971 else
23972   gl_cv_func_ldexpl_no_libm=no
23973 fi
23974 rm -f core conftest.err conftest.$ac_objext \
23975     conftest$ac_exeext conftest.$ac_ext
23976
23977 fi
23978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
23979 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
23980
23981   if test $gl_cv_func_ldexpl_no_libm = yes; then
23982
23983
23984      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
23985 printf %s "checking whether ldexpl works... " >&6; }
23986 if test ${gl_cv_func_ldexpl_works+y}
23987 then :
23988   printf %s "(cached) " >&6
23989 else
23990
23991       if test "$cross_compiling" = yes
23992 then :
23993
23994          case "$host_os" in
23995            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
23996            *)               gl_cv_func_ldexpl_works="guessing yes";;
23997          esac
23998
23999 else
24000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24001 /* end confdefs.h.  */
24002
24003 #include <math.h>
24004 extern
24005 #ifdef __cplusplus
24006 "C"
24007 #endif
24008 long double ldexpl (long double, int);
24009 int main()
24010 {
24011   int result = 0;
24012   {
24013     volatile long double x = 1.0;
24014     volatile long double y = ldexpl (x, -1);
24015     if (y != 0.5L)
24016       result |= 1;
24017   }
24018   {
24019     volatile long double x = 1.73205L;
24020     volatile long double y = ldexpl (x, 0);
24021     if (y != x)
24022       result |= 2;
24023   }
24024   return result;
24025 }
24026 _ACEOF
24027 if ac_fn_c_try_run "$LINENO"
24028 then :
24029   gl_cv_func_ldexpl_works=yes
24030 else
24031   gl_cv_func_ldexpl_works=no
24032 fi
24033 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24034   conftest.$ac_objext conftest.beam conftest.$ac_ext
24035 fi
24036
24037
24038 fi
24039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
24040 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
24041
24042     case "$gl_cv_func_ldexpl_works" in
24043       *yes)
24044
24045 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
24046
24047                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
24048 "
24049 if test "x$ac_cv_have_decl_ldexpl" = xyes
24050 then :
24051
24052 else
24053   HAVE_DECL_LDEXPL=0
24054 fi
24055
24056         ;;
24057     esac
24058   fi
24059
24060
24061
24062   if test $gl_cv_func_vfprintf_posix = no; then
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074   gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
24075
24076   REPLACE_PRINTF=1
24077
24078 printf "%s\n" "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
24079
24080   :
24081
24082   fi
24083
24084
24085
24086
24087
24088
24089           GNULIB_PRINTF_POSIX=1
24090
24091
24092
24093
24094
24095 printf "%s\n" "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
24096
24097
24098
24099
24100
24101
24102
24103   for ac_func in readdir
24104 do :
24105   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
24106 if test "x$ac_cv_func_readdir" = xyes
24107 then :
24108   cat >>confdefs.h <<_ACEOF
24109 #define HAVE_READDIR 1
24110 _ACEOF
24111
24112 fi
24113 done
24114
24115   if test $ac_cv_func_readdir = no; then
24116     HAVE_READDIR=0
24117   fi
24118
24119   if test $HAVE_READDIR = 0; then
24120
24121
24122
24123
24124
24125
24126
24127
24128   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24129
24130   fi
24131
24132
24133
24134
24135
24136           GNULIB_READDIR=1
24137
24138
24139
24140
24141
24142 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24143
24144
24145
24146
24147
24148
24149       for ac_header in stdlib.h
24150 do :
24151   ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24152 if test "x$ac_cv_header_stdlib_h" = xyes
24153 then :
24154   cat >>confdefs.h <<_ACEOF
24155 #define HAVE_STDLIB_H 1
24156 _ACEOF
24157
24158 fi
24159 done
24160
24161   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
24162 printf %s "checking for GNU libc compatible realloc... " >&6; }
24163 if test ${ac_cv_func_realloc_0_nonnull+y}
24164 then :
24165   printf %s "(cached) " >&6
24166 else
24167   if test "$cross_compiling" = yes
24168 then :
24169   case "$host_os" in
24170           # Guess yes on platforms where we know the result.
24171           *-gnu* | freebsd* | netbsd* | openbsd* \
24172           | hpux* | solaris* | cygwin* | mingw*)
24173             ac_cv_func_realloc_0_nonnull=yes ;;
24174           # If we don't know, assume the worst.
24175           *) ac_cv_func_realloc_0_nonnull=no ;;
24176         esac
24177
24178 else
24179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24180 /* end confdefs.h.  */
24181 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24182             # include <stdlib.h>
24183             #else
24184             char *realloc ();
24185             #endif
24186
24187 int
24188 main (void)
24189 {
24190 char *p = realloc (0, 0);
24191             int result = !p;
24192             free (p);
24193             return result;
24194   ;
24195   return 0;
24196 }
24197
24198 _ACEOF
24199 if ac_fn_c_try_run "$LINENO"
24200 then :
24201   ac_cv_func_realloc_0_nonnull=yes
24202 else
24203   ac_cv_func_realloc_0_nonnull=no
24204 fi
24205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24206   conftest.$ac_objext conftest.beam conftest.$ac_ext
24207 fi
24208
24209
24210 fi
24211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
24212 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
24213   if test $ac_cv_func_realloc_0_nonnull = yes
24214 then :
24215
24216 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
24217
24218 else
24219   printf "%s\n" "#define HAVE_REALLOC_GNU 0" >>confdefs.h
24220
24221      REPLACE_REALLOC=1
24222
24223 fi
24224
24225
24226   if test $REPLACE_REALLOC = 1; then
24227
24228
24229
24230
24231
24232
24233
24234
24235   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24236
24237   fi
24238
24239
24240 cat >>confdefs.h <<_ACEOF
24241 #define GNULIB_REALLOC_GNU 1
24242 _ACEOF
24243
24244
24245
24246
24247
24248   if test $gl_cv_func_malloc_posix = yes; then
24249
24250 printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24251
24252   else
24253     REPLACE_REALLOC=1
24254   fi
24255
24256   if test $REPLACE_REALLOC = 1; then
24257
24258
24259
24260
24261
24262
24263
24264
24265   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24266
24267   fi
24268
24269
24270
24271
24272
24273           GNULIB_REALLOC_POSIX=1
24274
24275
24276
24277
24278
24279 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24280
24281
24282
24283
24284
24285
24286   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24287 printf %s "checking whether rmdir works... " >&6; }
24288 if test ${gl_cv_func_rmdir_works+y}
24289 then :
24290   printf %s "(cached) " >&6
24291 else
24292   mkdir conftest.dir
24293      touch conftest.file
24294      if test "$cross_compiling" = yes
24295 then :
24296   case "$host_os" in
24297                   # Guess yes on glibc systems.
24298           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24299                   # If we don't know, assume the worst.
24300           *)      gl_cv_func_rmdir_works="guessing no" ;;
24301         esac
24302
24303 else
24304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24305 /* end confdefs.h.  */
24306 #include <stdio.h>
24307            #include <errno.h>
24308            #if HAVE_UNISTD_H
24309            # include <unistd.h>
24310            #else /* on Windows with MSVC */
24311            # include <direct.h>
24312            #endif
24313
24314 int
24315 main (void)
24316 {
24317 int result = 0;
24318       if (!rmdir ("conftest.file/"))
24319         result |= 1;
24320       else if (errno != ENOTDIR)
24321         result |= 2;
24322       if (!rmdir ("conftest.dir/./"))
24323         result |= 4;
24324       return result;
24325
24326   ;
24327   return 0;
24328 }
24329 _ACEOF
24330 if ac_fn_c_try_run "$LINENO"
24331 then :
24332   gl_cv_func_rmdir_works=yes
24333 else
24334   gl_cv_func_rmdir_works=no
24335 fi
24336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24337   conftest.$ac_objext conftest.beam conftest.$ac_ext
24338 fi
24339
24340      rm -rf conftest.dir conftest.file
24341 fi
24342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24343 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
24344   case "$gl_cv_func_rmdir_works" in
24345     *yes) ;;
24346     *)
24347       REPLACE_RMDIR=1
24348       ;;
24349   esac
24350
24351   if test $REPLACE_RMDIR = 1; then
24352
24353
24354
24355
24356
24357
24358
24359
24360   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24361
24362   fi
24363
24364
24365
24366
24367
24368           GNULIB_RMDIR=1
24369
24370
24371
24372
24373
24374 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24375
24376
24377
24378
24379
24380
24381
24382   :
24383
24384
24385
24386      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24387 printf %s "checking for signbit macro... " >&6; }
24388 if test ${gl_cv_func_signbit+y}
24389 then :
24390   printf %s "(cached) " >&6
24391 else
24392
24393       if test "$cross_compiling" = yes
24394 then :
24395   case "$host_os" in
24396                    # Guess yes on glibc systems.
24397            *-gnu*) gl_cv_func_signbit="guessing yes" ;;
24398                    # If we don't know, assume the worst.
24399            *)      gl_cv_func_signbit="guessing no" ;;
24400          esac
24401
24402 else
24403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24404 /* end confdefs.h.  */
24405
24406 #include <math.h>
24407 /* If signbit is defined as a function, don't use it, since calling it for
24408    'float' or 'long double' arguments would involve conversions.
24409    If signbit is not declared at all but exists as a library function, don't
24410    use it, since the prototype may not match.
24411    If signbit is not declared at all but exists as a compiler built-in, don't
24412    use it, since it's preferable to use __builtin_signbit* (no warnings,
24413    no conversions).  */
24414 #ifndef signbit
24415 # error "signbit should be a macro"
24416 #endif
24417 #include <string.h>
24418
24419 /* Global variables.
24420    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24421    but cannot constant-fold            __builtin_signbitl (variable).  */
24422 float vf;
24423 double vd;
24424 long double vl;
24425 int main ()
24426 {
24427 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24428    So we use -p0f and -p0d instead.  */
24429 float p0f = 0.0f;
24430 float m0f = -p0f;
24431 double p0d = 0.0;
24432 double m0d = -p0d;
24433 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24434    So we use another constant expression instead.
24435    But that expression does not work on other platforms, such as when
24436    cross-compiling to PowerPC on Mac OS X 10.5.  */
24437 long double p0l = 0.0L;
24438 #if defined __hpux || defined __sgi
24439 long double m0l = -LDBL_MIN * LDBL_MIN;
24440 #else
24441 long double m0l = -p0l;
24442 #endif
24443   int result = 0;
24444   if (signbit (vf)) /* link check */
24445     vf++;
24446   {
24447     float plus_inf = 1.0f / p0f;
24448     float minus_inf = -1.0f / p0f;
24449     if (!(!signbit (255.0f)
24450           && signbit (-255.0f)
24451           && !signbit (p0f)
24452           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24453           && !signbit (plus_inf)
24454           && signbit (minus_inf)))
24455       result |= 1;
24456   }
24457   if (signbit (vd)) /* link check */
24458     vd++;
24459   {
24460     double plus_inf = 1.0 / p0d;
24461     double minus_inf = -1.0 / p0d;
24462     if (!(!signbit (255.0)
24463           && signbit (-255.0)
24464           && !signbit (p0d)
24465           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24466           && !signbit (plus_inf)
24467           && signbit (minus_inf)))
24468       result |= 2;
24469   }
24470   if (signbit (vl)) /* link check */
24471     vl++;
24472   {
24473     long double plus_inf = 1.0L / p0l;
24474     long double minus_inf = -1.0L / p0l;
24475     if (signbit (255.0L))
24476       result |= 4;
24477     if (!signbit (-255.0L))
24478       result |= 4;
24479     if (signbit (p0l))
24480       result |= 8;
24481     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24482       result |= 16;
24483     if (signbit (plus_inf))
24484       result |= 32;
24485     if (!signbit (minus_inf))
24486       result |= 64;
24487   }
24488   return result;
24489 }
24490
24491
24492 _ACEOF
24493 if ac_fn_c_try_run "$LINENO"
24494 then :
24495   gl_cv_func_signbit=yes
24496 else
24497   gl_cv_func_signbit=no
24498 fi
24499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24500   conftest.$ac_objext conftest.beam conftest.$ac_ext
24501 fi
24502
24503
24504 fi
24505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24506 printf "%s\n" "$gl_cv_func_signbit" >&6; }
24507           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24508 printf %s "checking for signbit compiler built-ins... " >&6; }
24509 if test ${gl_cv_func_signbit_gcc+y}
24510 then :
24511   printf %s "(cached) " >&6
24512 else
24513
24514       if test "$cross_compiling" = yes
24515 then :
24516   case "$host_os" in
24517                    # Guess yes on glibc systems.
24518            *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
24519                    # If we don't know, assume the worst.
24520            *)      gl_cv_func_signbit_gcc="guessing no" ;;
24521          esac
24522
24523 else
24524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24525 /* end confdefs.h.  */
24526
24527 #if __GNUC__ >= 4
24528 # define signbit(x) \
24529    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
24530     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
24531     __builtin_signbitf (x))
24532 #else
24533 # error "signbit should be three compiler built-ins"
24534 #endif
24535 #include <string.h>
24536
24537 /* Global variables.
24538    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24539    but cannot constant-fold            __builtin_signbitl (variable).  */
24540 float vf;
24541 double vd;
24542 long double vl;
24543 int main ()
24544 {
24545 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24546    So we use -p0f and -p0d instead.  */
24547 float p0f = 0.0f;
24548 float m0f = -p0f;
24549 double p0d = 0.0;
24550 double m0d = -p0d;
24551 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24552    So we use another constant expression instead.
24553    But that expression does not work on other platforms, such as when
24554    cross-compiling to PowerPC on Mac OS X 10.5.  */
24555 long double p0l = 0.0L;
24556 #if defined __hpux || defined __sgi
24557 long double m0l = -LDBL_MIN * LDBL_MIN;
24558 #else
24559 long double m0l = -p0l;
24560 #endif
24561   int result = 0;
24562   if (signbit (vf)) /* link check */
24563     vf++;
24564   {
24565     float plus_inf = 1.0f / p0f;
24566     float minus_inf = -1.0f / p0f;
24567     if (!(!signbit (255.0f)
24568           && signbit (-255.0f)
24569           && !signbit (p0f)
24570           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24571           && !signbit (plus_inf)
24572           && signbit (minus_inf)))
24573       result |= 1;
24574   }
24575   if (signbit (vd)) /* link check */
24576     vd++;
24577   {
24578     double plus_inf = 1.0 / p0d;
24579     double minus_inf = -1.0 / p0d;
24580     if (!(!signbit (255.0)
24581           && signbit (-255.0)
24582           && !signbit (p0d)
24583           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24584           && !signbit (plus_inf)
24585           && signbit (minus_inf)))
24586       result |= 2;
24587   }
24588   if (signbit (vl)) /* link check */
24589     vl++;
24590   {
24591     long double plus_inf = 1.0L / p0l;
24592     long double minus_inf = -1.0L / p0l;
24593     if (signbit (255.0L))
24594       result |= 4;
24595     if (!signbit (-255.0L))
24596       result |= 4;
24597     if (signbit (p0l))
24598       result |= 8;
24599     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24600       result |= 16;
24601     if (signbit (plus_inf))
24602       result |= 32;
24603     if (!signbit (minus_inf))
24604       result |= 64;
24605   }
24606   return result;
24607 }
24608
24609
24610 _ACEOF
24611 if ac_fn_c_try_run "$LINENO"
24612 then :
24613   gl_cv_func_signbit_gcc=yes
24614 else
24615   gl_cv_func_signbit_gcc=no
24616 fi
24617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24618   conftest.$ac_objext conftest.beam conftest.$ac_ext
24619 fi
24620
24621
24622 fi
24623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24624 printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; }
24625       case "$gl_cv_func_signbit_gcc" in
24626     *yes)
24627       REPLACE_SIGNBIT_USING_GCC=1
24628       ;;
24629     *)
24630       case "$gl_cv_func_signbit" in
24631         *yes) ;;
24632         *)
24633                     REPLACE_SIGNBIT=1
24634
24635
24636   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24637 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
24638 if test ${gl_cv_cc_float_signbit+y}
24639 then :
24640   printf %s "(cached) " >&6
24641 else
24642
24643       if test "$cross_compiling" = yes
24644 then :
24645
24646                               gl_cv_cc_float_signbit="unknown"
24647
24648 else
24649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24650 /* end confdefs.h.  */
24651
24652 #include <stddef.h>
24653 #include <stdio.h>
24654 #define NWORDS \
24655   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24656 typedef union { float value; unsigned int word[NWORDS]; }
24657         memory_float;
24658 static memory_float plus = { 1.0f };
24659 static memory_float minus = { -1.0f };
24660 int main ()
24661 {
24662   size_t j, k, i;
24663   unsigned int m;
24664   FILE *fp = fopen ("conftest.out", "w");
24665   if (fp == NULL)
24666     return 1;
24667   /* Find the different bit.  */
24668   k = 0; m = 0;
24669   for (j = 0; j < NWORDS; j++)
24670     {
24671       unsigned int x = plus.word[j] ^ minus.word[j];
24672       if ((x & (x - 1)) || (x && m))
24673         {
24674           /* More than one bit difference.  */
24675           fprintf (fp, "unknown");
24676           return 2;
24677         }
24678       if (x)
24679         {
24680           k = j;
24681           m = x;
24682         }
24683     }
24684   if (m == 0)
24685     {
24686       /* No difference.  */
24687       fprintf (fp, "unknown");
24688       return 3;
24689     }
24690   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24691   if (plus.word[k] & ~minus.word[k])
24692     {
24693       /* Oh? The sign bit is set in the positive and cleared in the negative
24694          numbers?  */
24695       fprintf (fp, "unknown");
24696       return 4;
24697     }
24698   for (i = 0; ; i++)
24699     if ((m >> i) & 1)
24700       break;
24701   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24702   if (fclose (fp) != 0)
24703     return 5;
24704   return 0;
24705 }
24706
24707 _ACEOF
24708 if ac_fn_c_try_run "$LINENO"
24709 then :
24710   gl_cv_cc_float_signbit=`cat conftest.out`
24711 else
24712   gl_cv_cc_float_signbit="unknown"
24713 fi
24714 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24715   conftest.$ac_objext conftest.beam conftest.$ac_ext
24716 fi
24717
24718       rm -f conftest.out
24719
24720 fi
24721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24722 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
24723   case "$gl_cv_cc_float_signbit" in
24724     word*bit*)
24725       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24726       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
24727
24728 cat >>confdefs.h <<_ACEOF
24729 #define FLT_SIGNBIT_WORD $word
24730 _ACEOF
24731
24732
24733 cat >>confdefs.h <<_ACEOF
24734 #define FLT_SIGNBIT_BIT $bit
24735 _ACEOF
24736
24737       ;;
24738   esac
24739
24740
24741
24742
24743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24744 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
24745 if test ${gl_cv_cc_double_signbit+y}
24746 then :
24747   printf %s "(cached) " >&6
24748 else
24749
24750       if test "$cross_compiling" = yes
24751 then :
24752
24753                               gl_cv_cc_double_signbit="unknown"
24754
24755 else
24756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24757 /* end confdefs.h.  */
24758
24759 #include <stddef.h>
24760 #include <stdio.h>
24761 #define NWORDS \
24762   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24763 typedef union { double value; unsigned int word[NWORDS]; }
24764         memory_float;
24765 static memory_float plus = { 1.0 };
24766 static memory_float minus = { -1.0 };
24767 int main ()
24768 {
24769   size_t j, k, i;
24770   unsigned int m;
24771   FILE *fp = fopen ("conftest.out", "w");
24772   if (fp == NULL)
24773     return 1;
24774   /* Find the different bit.  */
24775   k = 0; m = 0;
24776   for (j = 0; j < NWORDS; j++)
24777     {
24778       unsigned int x = plus.word[j] ^ minus.word[j];
24779       if ((x & (x - 1)) || (x && m))
24780         {
24781           /* More than one bit difference.  */
24782           fprintf (fp, "unknown");
24783           return 2;
24784         }
24785       if (x)
24786         {
24787           k = j;
24788           m = x;
24789         }
24790     }
24791   if (m == 0)
24792     {
24793       /* No difference.  */
24794       fprintf (fp, "unknown");
24795       return 3;
24796     }
24797   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24798   if (plus.word[k] & ~minus.word[k])
24799     {
24800       /* Oh? The sign bit is set in the positive and cleared in the negative
24801          numbers?  */
24802       fprintf (fp, "unknown");
24803       return 4;
24804     }
24805   for (i = 0; ; i++)
24806     if ((m >> i) & 1)
24807       break;
24808   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24809   if (fclose (fp) != 0)
24810     return 5;
24811   return 0;
24812 }
24813
24814 _ACEOF
24815 if ac_fn_c_try_run "$LINENO"
24816 then :
24817   gl_cv_cc_double_signbit=`cat conftest.out`
24818 else
24819   gl_cv_cc_double_signbit="unknown"
24820 fi
24821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24822   conftest.$ac_objext conftest.beam conftest.$ac_ext
24823 fi
24824
24825       rm -f conftest.out
24826
24827 fi
24828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24829 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
24830   case "$gl_cv_cc_double_signbit" in
24831     word*bit*)
24832       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24833       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
24834
24835 cat >>confdefs.h <<_ACEOF
24836 #define DBL_SIGNBIT_WORD $word
24837 _ACEOF
24838
24839
24840 cat >>confdefs.h <<_ACEOF
24841 #define DBL_SIGNBIT_BIT $bit
24842 _ACEOF
24843
24844       ;;
24845   esac
24846
24847
24848
24849
24850   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24851 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
24852 if test ${gl_cv_cc_long_double_signbit+y}
24853 then :
24854   printf %s "(cached) " >&6
24855 else
24856
24857       if test "$cross_compiling" = yes
24858 then :
24859
24860                               gl_cv_cc_long_double_signbit="unknown"
24861
24862 else
24863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24864 /* end confdefs.h.  */
24865
24866 #include <stddef.h>
24867 #include <stdio.h>
24868 #define NWORDS \
24869   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24870 typedef union { long double value; unsigned int word[NWORDS]; }
24871         memory_float;
24872 static memory_float plus = { 1.0L };
24873 static memory_float minus = { -1.0L };
24874 int main ()
24875 {
24876   size_t j, k, i;
24877   unsigned int m;
24878   FILE *fp = fopen ("conftest.out", "w");
24879   if (fp == NULL)
24880     return 1;
24881   /* Find the different bit.  */
24882   k = 0; m = 0;
24883   for (j = 0; j < NWORDS; j++)
24884     {
24885       unsigned int x = plus.word[j] ^ minus.word[j];
24886       if ((x & (x - 1)) || (x && m))
24887         {
24888           /* More than one bit difference.  */
24889           fprintf (fp, "unknown");
24890           return 2;
24891         }
24892       if (x)
24893         {
24894           k = j;
24895           m = x;
24896         }
24897     }
24898   if (m == 0)
24899     {
24900       /* No difference.  */
24901       fprintf (fp, "unknown");
24902       return 3;
24903     }
24904   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24905   if (plus.word[k] & ~minus.word[k])
24906     {
24907       /* Oh? The sign bit is set in the positive and cleared in the negative
24908          numbers?  */
24909       fprintf (fp, "unknown");
24910       return 4;
24911     }
24912   for (i = 0; ; i++)
24913     if ((m >> i) & 1)
24914       break;
24915   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24916   if (fclose (fp) != 0)
24917     return 5;
24918   return 0;
24919 }
24920
24921 _ACEOF
24922 if ac_fn_c_try_run "$LINENO"
24923 then :
24924   gl_cv_cc_long_double_signbit=`cat conftest.out`
24925 else
24926   gl_cv_cc_long_double_signbit="unknown"
24927 fi
24928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24929   conftest.$ac_objext conftest.beam conftest.$ac_ext
24930 fi
24931
24932       rm -f conftest.out
24933
24934 fi
24935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
24936 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
24937   case "$gl_cv_cc_long_double_signbit" in
24938     word*bit*)
24939       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24940       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
24941
24942 cat >>confdefs.h <<_ACEOF
24943 #define LDBL_SIGNBIT_WORD $word
24944 _ACEOF
24945
24946
24947 cat >>confdefs.h <<_ACEOF
24948 #define LDBL_SIGNBIT_BIT $bit
24949 _ACEOF
24950
24951       ;;
24952   esac
24953
24954
24955           if test "$gl_cv_cc_float_signbit" = unknown; then
24956                         ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
24957 "
24958 if test "x$ac_cv_have_decl_copysignf" = xyes
24959 then :
24960   ac_have_decl=1
24961 else
24962   ac_have_decl=0
24963 fi
24964
24965 cat >>confdefs.h <<_ACEOF
24966 #define HAVE_DECL_COPYSIGNF $ac_have_decl
24967 _ACEOF
24968
24969             if test "$ac_cv_have_decl_copysignf" = yes; then
24970                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
24971 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
24972 if test ${gl_cv_func_copysignf_no_libm+y}
24973 then :
24974   printf %s "(cached) " >&6
24975 else
24976
24977                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24978 /* end confdefs.h.  */
24979 #include <math.h>
24980                          float x, y;
24981 int
24982 main (void)
24983 {
24984 return copysignf (x, y) < 0;
24985   ;
24986   return 0;
24987 }
24988 _ACEOF
24989 if ac_fn_c_try_link "$LINENO"
24990 then :
24991   gl_cv_func_copysignf_no_libm=yes
24992 else
24993   gl_cv_func_copysignf_no_libm=no
24994 fi
24995 rm -f core conftest.err conftest.$ac_objext \
24996     conftest$ac_exeext conftest.$ac_ext
24997
24998 fi
24999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25000 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
25001               if test $gl_cv_func_copysignf_no_libm = yes; then
25002
25003 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
25004
25005               fi
25006             fi
25007           fi
25008           if test "$gl_cv_cc_double_signbit" = unknown; then
25009                         ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
25010 "
25011 if test "x$ac_cv_have_decl_copysign" = xyes
25012 then :
25013   ac_have_decl=1
25014 else
25015   ac_have_decl=0
25016 fi
25017
25018 cat >>confdefs.h <<_ACEOF
25019 #define HAVE_DECL_COPYSIGN $ac_have_decl
25020 _ACEOF
25021
25022             if test "$ac_cv_have_decl_copysign" = yes; then
25023                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25024 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
25025 if test ${gl_cv_func_copysign_no_libm+y}
25026 then :
25027   printf %s "(cached) " >&6
25028 else
25029
25030                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25031 /* end confdefs.h.  */
25032 #include <math.h>
25033                          double x, y;
25034 int
25035 main (void)
25036 {
25037 return copysign (x, y) < 0;
25038   ;
25039   return 0;
25040 }
25041 _ACEOF
25042 if ac_fn_c_try_link "$LINENO"
25043 then :
25044   gl_cv_func_copysign_no_libm=yes
25045 else
25046   gl_cv_func_copysign_no_libm=no
25047 fi
25048 rm -f core conftest.err conftest.$ac_objext \
25049     conftest$ac_exeext conftest.$ac_ext
25050
25051 fi
25052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25053 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
25054               if test $gl_cv_func_copysign_no_libm = yes; then
25055
25056 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
25057
25058               fi
25059             fi
25060           fi
25061           if test "$gl_cv_cc_long_double_signbit" = unknown; then
25062                         ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
25063 "
25064 if test "x$ac_cv_have_decl_copysignl" = xyes
25065 then :
25066   ac_have_decl=1
25067 else
25068   ac_have_decl=0
25069 fi
25070
25071 cat >>confdefs.h <<_ACEOF
25072 #define HAVE_DECL_COPYSIGNL $ac_have_decl
25073 _ACEOF
25074
25075             if test "$ac_cv_have_decl_copysignl" = yes; then
25076                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25077 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
25078 if test ${gl_cv_func_copysignl_no_libm+y}
25079 then :
25080   printf %s "(cached) " >&6
25081 else
25082
25083                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25084 /* end confdefs.h.  */
25085 #include <math.h>
25086                          long double x, y;
25087 int
25088 main (void)
25089 {
25090 return copysignl (x, y) < 0;
25091   ;
25092   return 0;
25093 }
25094 _ACEOF
25095 if ac_fn_c_try_link "$LINENO"
25096 then :
25097   gl_cv_func_copysignl_no_libm=yes
25098 else
25099   gl_cv_func_copysignl_no_libm=no
25100 fi
25101 rm -f core conftest.err conftest.$ac_objext \
25102     conftest$ac_exeext conftest.$ac_ext
25103
25104 fi
25105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25106 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
25107               if test $gl_cv_func_copysignl_no_libm = yes; then
25108
25109 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
25110
25111               fi
25112             fi
25113           fi
25114           ;;
25115       esac
25116       ;;
25117   esac
25118
25119   if test $REPLACE_SIGNBIT = 1; then
25120
25121
25122
25123
25124
25125
25126
25127
25128   gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138   gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148   gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
25149
25150   fi
25151
25152
25153
25154
25155
25156           GNULIB_SIGNBIT=1
25157
25158
25159
25160
25161
25162 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
25163
25164
25165
25166
25167   for ac_header in stdint.h
25168 do :
25169   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
25170 if test "x$ac_cv_header_stdint_h" = xyes
25171 then :
25172   cat >>confdefs.h <<_ACEOF
25173 #define HAVE_STDINT_H 1
25174 _ACEOF
25175
25176 fi
25177 done
25178
25179     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25180 printf %s "checking for SIZE_MAX... " >&6; }
25181 if test ${gl_cv_size_max+y}
25182 then :
25183   printf %s "(cached) " >&6
25184 else
25185
25186     gl_cv_size_max=
25187     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25188 /* end confdefs.h.  */
25189
25190 #include <limits.h>
25191 #if HAVE_STDINT_H
25192 #include <stdint.h>
25193 #endif
25194 #ifdef SIZE_MAX
25195 Found it
25196 #endif
25197
25198 _ACEOF
25199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25200   $EGREP "Found it" >/dev/null 2>&1
25201 then :
25202   gl_cv_size_max=yes
25203 fi
25204 rm -rf conftest*
25205
25206     if test -z "$gl_cv_size_max"; then
25207                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
25208 #include <limits.h>"
25209 then :
25210
25211 else
25212   size_t_bits_minus_1=
25213 fi
25214
25215       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
25216 then :
25217
25218 else
25219   fits_in_uint=
25220 fi
25221
25222       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
25223         if test $fits_in_uint = 1; then
25224                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25225 /* end confdefs.h.  */
25226 #include <stddef.h>
25227                  extern size_t foo;
25228                  extern unsigned long foo;
25229
25230 int
25231 main (void)
25232 {
25233
25234   ;
25235   return 0;
25236 }
25237 _ACEOF
25238 if ac_fn_c_try_compile "$LINENO"
25239 then :
25240   fits_in_uint=0
25241 fi
25242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25243         fi
25244                                 if test $fits_in_uint = 1; then
25245           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
25246         else
25247           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
25248         fi
25249       else
25250                 gl_cv_size_max='((size_t)~(size_t)0)'
25251       fi
25252     fi
25253
25254 fi
25255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25256 printf "%s\n" "$gl_cv_size_max" >&6; }
25257   if test "$gl_cv_size_max" != yes; then
25258
25259 cat >>confdefs.h <<_ACEOF
25260 #define SIZE_MAX $gl_cv_size_max
25261 _ACEOF
25262
25263   fi
25264
25265
25266
25267   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25268 printf %s "checking for ssize_t... " >&6; }
25269 if test ${gt_cv_ssize_t+y}
25270 then :
25271   printf %s "(cached) " >&6
25272 else
25273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25274 /* end confdefs.h.  */
25275 #include <sys/types.h>
25276 int
25277 main (void)
25278 {
25279 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25280             return !x;
25281   ;
25282   return 0;
25283 }
25284 _ACEOF
25285 if ac_fn_c_try_compile "$LINENO"
25286 then :
25287   gt_cv_ssize_t=yes
25288 else
25289   gt_cv_ssize_t=no
25290 fi
25291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25292 fi
25293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25294 printf "%s\n" "$gt_cv_ssize_t" >&6; }
25295   if test $gt_cv_ssize_t = no; then
25296
25297 printf "%s\n" "#define ssize_t int" >>confdefs.h
25298
25299   fi
25300
25301
25302
25303
25304     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25305 printf %s "checking whether stat handles trailing slashes on directories... " >&6; }
25306 if test ${gl_cv_func_stat_dir_slash+y}
25307 then :
25308   printf %s "(cached) " >&6
25309 else
25310   if test "$cross_compiling" = yes
25311 then :
25312   case $host_os in
25313             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25314             *) gl_cv_func_stat_dir_slash="guessing yes";;
25315           esac
25316 else
25317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25318 /* end confdefs.h.  */
25319 #include <sys/stat.h>
25320
25321 int
25322 main (void)
25323 {
25324 struct stat st; return stat (".", &st) != stat ("./", &st);
25325   ;
25326   return 0;
25327 }
25328 _ACEOF
25329 if ac_fn_c_try_run "$LINENO"
25330 then :
25331   gl_cv_func_stat_dir_slash=yes
25332 else
25333   gl_cv_func_stat_dir_slash=no
25334 fi
25335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25336   conftest.$ac_objext conftest.beam conftest.$ac_ext
25337 fi
25338
25339 fi
25340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25341 printf "%s\n" "$gl_cv_func_stat_dir_slash" >&6; }
25342         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25343 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
25344 if test ${gl_cv_func_stat_file_slash+y}
25345 then :
25346   printf %s "(cached) " >&6
25347 else
25348   touch conftest.tmp
25349        # Assume that if we have lstat, we can also check symlinks.
25350        if test $ac_cv_func_lstat = yes; then
25351          ln -s conftest.tmp conftest.lnk
25352        fi
25353        if test "$cross_compiling" = yes
25354 then :
25355   case "$host_os" in
25356                     # Guess yes on glibc systems.
25357             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25358                     # If we don't know, assume the worst.
25359             *)      gl_cv_func_stat_file_slash="guessing no" ;;
25360           esac
25361
25362 else
25363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25364 /* end confdefs.h.  */
25365 #include <sys/stat.h>
25366
25367 int
25368 main (void)
25369 {
25370 int result = 0;
25371       struct stat st;
25372       if (!stat ("conftest.tmp/", &st))
25373         result |= 1;
25374 #if HAVE_LSTAT
25375       if (!stat ("conftest.lnk/", &st))
25376         result |= 2;
25377 #endif
25378       return result;
25379
25380   ;
25381   return 0;
25382 }
25383 _ACEOF
25384 if ac_fn_c_try_run "$LINENO"
25385 then :
25386   gl_cv_func_stat_file_slash=yes
25387 else
25388   gl_cv_func_stat_file_slash=no
25389 fi
25390 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25391   conftest.$ac_objext conftest.beam conftest.$ac_ext
25392 fi
25393
25394        rm -f conftest.tmp conftest.lnk
25395 fi
25396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25397 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
25398   case $gl_cv_func_stat_dir_slash in
25399     *no) REPLACE_STAT=1
25400
25401 printf "%s\n" "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25402 ;;
25403   esac
25404   case $gl_cv_func_stat_file_slash in
25405     *no) REPLACE_STAT=1
25406
25407 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25408 ;;
25409   esac
25410
25411   if test $REPLACE_STAT = 1; then
25412
25413
25414
25415
25416
25417
25418
25419
25420   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
25421
25422     :
25423   fi
25424
25425
25426
25427
25428
25429           GNULIB_STAT=1
25430
25431
25432
25433
25434
25435 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
25436
25437
25438
25439
25440
25441
25442
25443   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>
25444      #include <sys/stat.h>
25445 "
25446 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
25447 then :
25448
25449 cat >>confdefs.h <<_ACEOF
25450 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25451 _ACEOF
25452
25453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25454 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25455 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
25456 then :
25457   printf %s "(cached) " >&6
25458 else
25459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25460 /* end confdefs.h.  */
25461
25462             #include <sys/types.h>
25463             #include <sys/stat.h>
25464             #if HAVE_SYS_TIME_H
25465             # include <sys/time.h>
25466             #endif
25467             #include <time.h>
25468             struct timespec ts;
25469             struct stat st;
25470
25471 int
25472 main (void)
25473 {
25474
25475             st.st_atim = ts;
25476
25477   ;
25478   return 0;
25479 }
25480 _ACEOF
25481 if ac_fn_c_try_compile "$LINENO"
25482 then :
25483   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
25484 else
25485   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
25486 fi
25487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25488 fi
25489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25490 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25491      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
25492
25493 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
25494
25495      fi
25496 else
25497   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>
25498         #include <sys/stat.h>
25499 "
25500 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
25501 then :
25502
25503 cat >>confdefs.h <<_ACEOF
25504 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25505 _ACEOF
25506
25507
25508 else
25509   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25510            #include <sys/stat.h>
25511 "
25512 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
25513 then :
25514
25515 cat >>confdefs.h <<_ACEOF
25516 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
25517 _ACEOF
25518
25519
25520 else
25521   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>
25522               #include <sys/stat.h>
25523 "
25524 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
25525 then :
25526
25527 cat >>confdefs.h <<_ACEOF
25528 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25529 _ACEOF
25530
25531
25532 fi
25533
25534 fi
25535
25536 fi
25537
25538 fi
25539
25540
25541
25542
25543
25544   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>
25545      #include <sys/stat.h>
25546 "
25547 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
25548 then :
25549
25550 cat >>confdefs.h <<_ACEOF
25551 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25552 _ACEOF
25553
25554
25555 else
25556   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25557         #include <sys/stat.h>
25558 "
25559 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
25560 then :
25561
25562 cat >>confdefs.h <<_ACEOF
25563 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25564 _ACEOF
25565
25566
25567 else
25568   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>
25569           #include <sys/stat.h>
25570 "
25571 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
25572 then :
25573
25574 cat >>confdefs.h <<_ACEOF
25575 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
25576 _ACEOF
25577
25578
25579 fi
25580
25581 fi
25582
25583 fi
25584
25585
25586
25587
25588 cat >>confdefs.h <<_ACEOF
25589 #define GNULIB_STATAT 1
25590 _ACEOF
25591
25592
25593
25594
25595   # Define two additional variables used in the Makefile substitution.
25596
25597   if test "$ac_cv_header_stdbool_h" = yes; then
25598     STDBOOL_H=''
25599   else
25600     STDBOOL_H='stdbool.h'
25601   fi
25602
25603    if test -n "$STDBOOL_H"; then
25604   GL_GENERATE_STDBOOL_H_TRUE=
25605   GL_GENERATE_STDBOOL_H_FALSE='#'
25606 else
25607   GL_GENERATE_STDBOOL_H_TRUE='#'
25608   GL_GENERATE_STDBOOL_H_FALSE=
25609 fi
25610
25611
25612   if test "$ac_cv_type__Bool" = yes; then
25613     HAVE__BOOL=1
25614   else
25615     HAVE__BOOL=0
25616   fi
25617
25618
25619
25620
25621
25622   STDDEF_H=
25623   ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25624
25625 "
25626 if test "x$ac_cv_type_max_align_t" = xyes
25627 then :
25628
25629 else
25630   HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25631 fi
25632
25633   if test $gt_cv_c_wchar_t = no; then
25634     HAVE_WCHAR_T=0
25635     STDDEF_H=stddef.h
25636   fi
25637   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25638 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
25639 if test ${gl_cv_decl_null_works+y}
25640 then :
25641   printf %s "(cached) " >&6
25642 else
25643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25644 /* end confdefs.h.  */
25645 #include <stddef.h>
25646       int test[2 * (sizeof NULL == sizeof (void *)) -1];
25647
25648 int
25649 main (void)
25650 {
25651
25652   ;
25653   return 0;
25654 }
25655 _ACEOF
25656 if ac_fn_c_try_compile "$LINENO"
25657 then :
25658   gl_cv_decl_null_works=yes
25659 else
25660   gl_cv_decl_null_works=no
25661 fi
25662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25663 fi
25664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25665 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
25666   if test $gl_cv_decl_null_works = no; then
25667     REPLACE_NULL=1
25668     STDDEF_H=stddef.h
25669   fi
25670
25671    if test -n "$STDDEF_H"; then
25672   GL_GENERATE_STDDEF_H_TRUE=
25673   GL_GENERATE_STDDEF_H_FALSE='#'
25674 else
25675   GL_GENERATE_STDDEF_H_TRUE='#'
25676   GL_GENERATE_STDDEF_H_FALSE=
25677 fi
25678
25679   if test -n "$STDDEF_H"; then
25680
25681
25682
25683
25684
25685
25686
25687
25688      if test $gl_cv_have_include_next = yes; then
25689        gl_cv_next_stddef_h='<'stddef.h'>'
25690      else
25691        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25692 printf %s "checking absolute name of <stddef.h>... " >&6; }
25693 if test ${gl_cv_next_stddef_h+y}
25694 then :
25695   printf %s "(cached) " >&6
25696 else
25697
25698
25699
25700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25701 /* end confdefs.h.  */
25702 #include <stddef.h>
25703 _ACEOF
25704                 case "$host_os" in
25705     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25706     *)    gl_absname_cpp="$ac_cpp" ;;
25707   esac
25708
25709   case "$host_os" in
25710     mingw*)
25711                                           gl_dirsep_regex='[/\\]'
25712       ;;
25713     *)
25714       gl_dirsep_regex='\/'
25715       ;;
25716   esac
25717       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25718   gl_header_literal_regex=`echo 'stddef.h' \
25719                            | sed -e "$gl_make_literal_regex_sed"`
25720   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25721       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25722       s|^/[^/]|//&|
25723       p
25724       q
25725     }'
25726
25727         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25728   sed -n "$gl_absolute_header_sed"`
25729
25730            gl_header=$gl_cv_absolute_stddef_h
25731            gl_cv_next_stddef_h='"'$gl_header'"'
25732
25733
25734 fi
25735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25736 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
25737      fi
25738      NEXT_STDDEF_H=$gl_cv_next_stddef_h
25739
25740      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25741        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25742        gl_next_as_first_directive='<'stddef.h'>'
25743      else
25744        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25745        gl_next_as_first_directive=$gl_cv_next_stddef_h
25746      fi
25747      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25748
25749
25750
25751
25752   fi
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767      if test $gl_cv_have_include_next = yes; then
25768        gl_cv_next_stdio_h='<'stdio.h'>'
25769      else
25770        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25771 printf %s "checking absolute name of <stdio.h>... " >&6; }
25772 if test ${gl_cv_next_stdio_h+y}
25773 then :
25774   printf %s "(cached) " >&6
25775 else
25776
25777
25778
25779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25780 /* end confdefs.h.  */
25781 #include <stdio.h>
25782 _ACEOF
25783                 case "$host_os" in
25784     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25785     *)    gl_absname_cpp="$ac_cpp" ;;
25786   esac
25787
25788   case "$host_os" in
25789     mingw*)
25790                                           gl_dirsep_regex='[/\\]'
25791       ;;
25792     *)
25793       gl_dirsep_regex='\/'
25794       ;;
25795   esac
25796       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25797   gl_header_literal_regex=`echo 'stdio.h' \
25798                            | sed -e "$gl_make_literal_regex_sed"`
25799   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25800       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25801       s|^/[^/]|//&|
25802       p
25803       q
25804     }'
25805
25806         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25807   sed -n "$gl_absolute_header_sed"`
25808
25809            gl_header=$gl_cv_absolute_stdio_h
25810            gl_cv_next_stdio_h='"'$gl_header'"'
25811
25812
25813 fi
25814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25815 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
25816      fi
25817      NEXT_STDIO_H=$gl_cv_next_stdio_h
25818
25819      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25820        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25821        gl_next_as_first_directive='<'stdio.h'>'
25822      else
25823        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25824        gl_next_as_first_directive=$gl_cv_next_stdio_h
25825      fi
25826      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25827
25828
25829
25830
25831
25832         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25833 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
25834 if test ${gl_cv_func_printf_attribute_flavor+y}
25835 then :
25836   printf %s "(cached) " >&6
25837 else
25838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25839 /* end confdefs.h.  */
25840
25841        #define __STDC_FORMAT_MACROS 1
25842        #include <stdio.h>
25843        #include <inttypes.h>
25844        /* For non-mingw systems, compilation will trivially succeed.
25845           For mingw, compilation will succeed for older mingw (system
25846           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
25847        #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
25848          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25849        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25850        #endif
25851
25852 int
25853 main (void)
25854 {
25855
25856   ;
25857   return 0;
25858 }
25859 _ACEOF
25860 if ac_fn_c_try_compile "$LINENO"
25861 then :
25862   gl_cv_func_printf_attribute_flavor=system
25863 else
25864   gl_cv_func_printf_attribute_flavor=gnu
25865 fi
25866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25867 fi
25868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25869 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
25870   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25871
25872 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25873
25874   fi
25875
25876       GNULIB_FSCANF=1
25877
25878
25879 cat >>confdefs.h <<_ACEOF
25880 #define GNULIB_FSCANF 1
25881 _ACEOF
25882
25883
25884   GNULIB_SCANF=1
25885
25886
25887 cat >>confdefs.h <<_ACEOF
25888 #define GNULIB_SCANF 1
25889 _ACEOF
25890
25891
25892   GNULIB_FGETC=1
25893   GNULIB_GETC=1
25894   GNULIB_GETCHAR=1
25895   GNULIB_FGETS=1
25896   GNULIB_FREAD=1
25897
25898
25899       GNULIB_FPRINTF=1
25900   GNULIB_PRINTF=1
25901   GNULIB_VFPRINTF=1
25902   GNULIB_VPRINTF=1
25903   GNULIB_FPUTC=1
25904   GNULIB_PUTC=1
25905   GNULIB_PUTCHAR=1
25906   GNULIB_FPUTS=1
25907   GNULIB_PUTS=1
25908   GNULIB_FWRITE=1
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924      if test $gl_cv_have_include_next = yes; then
25925        gl_cv_next_stdlib_h='<'stdlib.h'>'
25926      else
25927        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25928 printf %s "checking absolute name of <stdlib.h>... " >&6; }
25929 if test ${gl_cv_next_stdlib_h+y}
25930 then :
25931   printf %s "(cached) " >&6
25932 else
25933
25934
25935
25936   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25937 /* end confdefs.h.  */
25938 #include <stdlib.h>
25939 _ACEOF
25940                 case "$host_os" in
25941     aix*) gl_absname_cpp="$ac_cpp -C" ;;
25942     *)    gl_absname_cpp="$ac_cpp" ;;
25943   esac
25944
25945   case "$host_os" in
25946     mingw*)
25947                                           gl_dirsep_regex='[/\\]'
25948       ;;
25949     *)
25950       gl_dirsep_regex='\/'
25951       ;;
25952   esac
25953       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25954   gl_header_literal_regex=`echo 'stdlib.h' \
25955                            | sed -e "$gl_make_literal_regex_sed"`
25956   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25957       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25958       s|^/[^/]|//&|
25959       p
25960       q
25961     }'
25962
25963         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25964   sed -n "$gl_absolute_header_sed"`
25965
25966            gl_header=$gl_cv_absolute_stdlib_h
25967            gl_cv_next_stdlib_h='"'$gl_header'"'
25968
25969
25970 fi
25971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25972 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
25973      fi
25974      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25975
25976      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25977        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25978        gl_next_as_first_directive='<'stdlib.h'>'
25979      else
25980        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25981        gl_next_as_first_directive=$gl_cv_next_stdlib_h
25982      fi
25983      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997   for ac_func in stpcpy
25998 do :
25999   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
26000 if test "x$ac_cv_func_stpcpy" = xyes
26001 then :
26002   cat >>confdefs.h <<_ACEOF
26003 #define HAVE_STPCPY 1
26004 _ACEOF
26005
26006 fi
26007 done
26008
26009   if test $ac_cv_func_stpcpy = no; then
26010     HAVE_STPCPY=0
26011   fi
26012
26013   if test $HAVE_STPCPY = 0; then
26014
26015
26016
26017
26018
26019
26020
26021
26022   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
26023
26024
26025   :
26026
26027   fi
26028
26029
26030
26031
26032
26033           GNULIB_STPCPY=1
26034
26035
26036
26037
26038
26039 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
26040
26041
26042
26043
26044
26045
26046
26047   if test $ac_cv_func_strdup = yes; then
26048     if test $gl_cv_func_malloc_posix != yes; then
26049       REPLACE_STRDUP=1
26050     fi
26051   fi
26052
26053   if test $ac_cv_have_decl_strdup = no; then
26054     HAVE_DECL_STRDUP=0
26055   fi
26056
26057   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26058
26059
26060
26061
26062
26063
26064
26065
26066   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26067
26068     :
26069   fi
26070
26071
26072
26073
26074
26075           GNULIB_STRDUP=1
26076
26077
26078
26079
26080
26081 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26093     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26094 printf %s "checking for working strerror function... " >&6; }
26095 if test ${gl_cv_func_working_strerror+y}
26096 then :
26097   printf %s "(cached) " >&6
26098 else
26099   if test "$cross_compiling" = yes
26100 then :
26101   case "$host_os" in
26102                    # Guess yes on glibc systems.
26103            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26104                    # If we don't know, assume the worst.
26105            *)      gl_cv_func_working_strerror="guessing no" ;;
26106          esac
26107
26108 else
26109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26110 /* end confdefs.h.  */
26111 #include <string.h>
26112
26113 int
26114 main (void)
26115 {
26116 if (!*strerror (-2)) return 1;
26117   ;
26118   return 0;
26119 }
26120 _ACEOF
26121 if ac_fn_c_try_run "$LINENO"
26122 then :
26123   gl_cv_func_working_strerror=yes
26124 else
26125   gl_cv_func_working_strerror=no
26126 fi
26127 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26128   conftest.$ac_objext conftest.beam conftest.$ac_ext
26129 fi
26130
26131
26132 fi
26133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26134 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
26135     case "$gl_cv_func_working_strerror" in
26136       *yes) ;;
26137       *)
26138                         REPLACE_STRERROR=1
26139         ;;
26140     esac
26141
26142                   case "$gl_cv_func_strerror_r_works" in
26143         *no) REPLACE_STRERROR=1 ;;
26144       esac
26145
26146   else
26147             REPLACE_STRERROR=1
26148   fi
26149
26150   if test $REPLACE_STRERROR = 1; then
26151
26152
26153
26154
26155
26156
26157
26158
26159   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26160
26161   fi
26162
26163
26164 cat >>confdefs.h <<_ACEOF
26165 #define GNULIB_STRERROR 1
26166 _ACEOF
26167
26168
26169
26170
26171
26172
26173
26174           GNULIB_STRERROR=1
26175
26176
26177
26178
26179
26180 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26181
26182
26183
26184
26185
26186   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26187
26188
26189
26190
26191
26192
26193
26194
26195   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26196
26197
26198
26199
26200
26201   if test $ac_cv_header_sys_socket_h != yes; then
26202                     for ac_header in winsock2.h
26203 do :
26204   ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26205 if test "x$ac_cv_header_winsock2_h" = xyes
26206 then :
26207   cat >>confdefs.h <<_ACEOF
26208 #define HAVE_WINSOCK2_H 1
26209 _ACEOF
26210
26211 fi
26212 done
26213
26214   fi
26215   if test "$ac_cv_header_winsock2_h" = yes; then
26216     HAVE_WINSOCK2_H=1
26217     UNISTD_H_HAVE_WINSOCK2_H=1
26218     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26219   else
26220     HAVE_WINSOCK2_H=0
26221   fi
26222
26223
26224   fi
26225
26226
26227
26228
26229
26230
26231
26232   if test $ac_cv_have_decl_strerror_r = no; then
26233     HAVE_DECL_STRERROR_R=0
26234   fi
26235
26236   if test $ac_cv_func_strerror_r = yes; then
26237     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26238       if test $gl_cv_func_strerror_r_posix_signature = yes; then
26239         case "$gl_cv_func_strerror_r_works" in
26240                     *no) REPLACE_STRERROR_R=1 ;;
26241         esac
26242       else
26243                 REPLACE_STRERROR_R=1
26244       fi
26245     else
26246                   REPLACE_STRERROR_R=1
26247     fi
26248   fi
26249
26250   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26251
26252
26253
26254
26255
26256
26257
26258
26259   gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26260
26261
26262
26263
26264
26265
26266   fi
26267
26268
26269
26270
26271
26272           GNULIB_STRERROR_R=1
26273
26274
26275
26276
26277
26278 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299      if test $gl_cv_have_include_next = yes; then
26300        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26301      else
26302        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26303 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
26304 if test ${gl_cv_next_sys_stat_h+y}
26305 then :
26306   printf %s "(cached) " >&6
26307 else
26308
26309              if test $ac_cv_header_sys_stat_h = yes; then
26310
26311
26312
26313
26314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26315 /* end confdefs.h.  */
26316 #include <sys/stat.h>
26317 _ACEOF
26318                 case "$host_os" in
26319     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26320     *)    gl_absname_cpp="$ac_cpp" ;;
26321   esac
26322
26323   case "$host_os" in
26324     mingw*)
26325                                           gl_dirsep_regex='[/\\]'
26326       ;;
26327     *)
26328       gl_dirsep_regex='\/'
26329       ;;
26330   esac
26331       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26332   gl_header_literal_regex=`echo 'sys/stat.h' \
26333                            | sed -e "$gl_make_literal_regex_sed"`
26334   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26335       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26336       s|^/[^/]|//&|
26337       p
26338       q
26339     }'
26340
26341         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26342   sed -n "$gl_absolute_header_sed"`
26343
26344            gl_header=$gl_cv_absolute_sys_stat_h
26345            gl_cv_next_sys_stat_h='"'$gl_header'"'
26346           else
26347                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26348              fi
26349
26350
26351 fi
26352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26353 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
26354      fi
26355      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26356
26357      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26358        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26359        gl_next_as_first_directive='<'sys/stat.h'>'
26360      else
26361        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26362        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26363      fi
26364      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
26377
26378 printf "%s\n" "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
26379
26380   fi
26381
26382       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26383      #include <sys/stat.h>
26384 "
26385 if test "x$ac_cv_type_nlink_t" = xyes
26386 then :
26387
26388 else
26389
26390 printf "%s\n" "#define nlink_t int" >>confdefs.h
26391
26392 fi
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411   :
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424      if test $gl_cv_have_include_next = yes; then
26425        gl_cv_next_unistd_h='<'unistd.h'>'
26426      else
26427        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26428 printf %s "checking absolute name of <unistd.h>... " >&6; }
26429 if test ${gl_cv_next_unistd_h+y}
26430 then :
26431   printf %s "(cached) " >&6
26432 else
26433
26434              if test $ac_cv_header_unistd_h = yes; then
26435
26436
26437
26438
26439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26440 /* end confdefs.h.  */
26441 #include <unistd.h>
26442 _ACEOF
26443                 case "$host_os" in
26444     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26445     *)    gl_absname_cpp="$ac_cpp" ;;
26446   esac
26447
26448   case "$host_os" in
26449     mingw*)
26450                                           gl_dirsep_regex='[/\\]'
26451       ;;
26452     *)
26453       gl_dirsep_regex='\/'
26454       ;;
26455   esac
26456       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26457   gl_header_literal_regex=`echo 'unistd.h' \
26458                            | sed -e "$gl_make_literal_regex_sed"`
26459   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26460       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26461       s|^/[^/]|//&|
26462       p
26463       q
26464     }'
26465
26466         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26467   sed -n "$gl_absolute_header_sed"`
26468
26469            gl_header=$gl_cv_absolute_unistd_h
26470            gl_cv_next_unistd_h='"'$gl_header'"'
26471           else
26472                gl_cv_next_unistd_h='<'unistd.h'>'
26473              fi
26474
26475
26476 fi
26477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26478 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
26479      fi
26480      NEXT_UNISTD_H=$gl_cv_next_unistd_h
26481
26482      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26483        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26484        gl_next_as_first_directive='<'unistd.h'>'
26485      else
26486        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26487        gl_next_as_first_directive=$gl_cv_next_unistd_h
26488      fi
26489      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
26490
26491
26492
26493
26494   if test $ac_cv_header_unistd_h = yes; then
26495     HAVE_UNISTD_H=1
26496   else
26497     HAVE_UNISTD_H=0
26498   fi
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
26516 printf %s "checking whether unlink honors trailing slashes... " >&6; }
26517 if test ${gl_cv_func_unlink_honors_slashes+y}
26518 then :
26519   printf %s "(cached) " >&6
26520 else
26521   touch conftest.file
26522      # Assume that if we have lstat, we can also check symlinks.
26523      if test $ac_cv_func_lstat = yes; then
26524        ln -s conftest.file conftest.lnk
26525      fi
26526      if test "$cross_compiling" = yes
26527 then :
26528   case "$host_os" in
26529                  # Guess yes on glibc systems.
26530          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
26531                  # If we don't know, assume the worst.
26532          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
26533        esac
26534
26535 else
26536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26537 /* end confdefs.h.  */
26538 #if HAVE_UNISTD_H
26539            # include <unistd.h>
26540            #else /* on Windows with MSVC */
26541            # include <io.h>
26542            #endif
26543            #include <errno.h>
26544
26545 int
26546 main (void)
26547 {
26548 int result = 0;
26549            if (!unlink ("conftest.file/"))
26550              result |= 1;
26551            else if (errno != ENOTDIR)
26552              result |= 2;
26553 #if HAVE_LSTAT
26554            if (!unlink ("conftest.lnk/"))
26555              result |= 4;
26556            else if (errno != ENOTDIR)
26557              result |= 8;
26558 #endif
26559            return result;
26560
26561   ;
26562   return 0;
26563 }
26564 _ACEOF
26565 if ac_fn_c_try_run "$LINENO"
26566 then :
26567   gl_cv_func_unlink_honors_slashes=yes
26568 else
26569   gl_cv_func_unlink_honors_slashes=no
26570 fi
26571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26572   conftest.$ac_objext conftest.beam conftest.$ac_ext
26573 fi
26574
26575      rm -f conftest.file conftest.lnk
26576 fi
26577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
26578 printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
26579   case "$gl_cv_func_unlink_honors_slashes" in
26580     *no)
26581       REPLACE_UNLINK=1
26582       ;;
26583   esac
26584
26585       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
26586 printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
26587 if test ${gl_cv_func_unlink_parent_fails+y}
26588 then :
26589   printf %s "(cached) " >&6
26590 else
26591   case "$host_os" in
26592        darwin*)
26593                                                       if {
26594               # Use the mktemp program if available. If not available, hide the error
26595               # message.
26596               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
26597               test -n "$tmp" && test -d "$tmp"
26598             } ||
26599             {
26600               # Use a simple mkdir command. It is guaranteed to fail if the directory
26601               # already exists.  $RANDOM is bash specific and expands to empty in shells
26602               # other than bash, ksh and zsh.  Its use does not increase security;
26603               # rather, it minimizes the probability of failure in a very cluttered /tmp
26604               # directory.
26605               tmp=/tmp/gt$$-$RANDOM
26606               (umask 077 && mkdir "$tmp")
26607             }; then
26608            mkdir "$tmp/subdir"
26609            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
26610            export GL_SUBDIR_FOR_UNLINK
26611            if test "$cross_compiling" = yes
26612 then :
26613   # If we don't know, assume the worst.
26614               gl_cv_func_unlink_parent_fails="guessing no"
26615
26616 else
26617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26618 /* end confdefs.h.  */
26619
26620                 #include <stdlib.h>
26621                 #if HAVE_UNISTD_H
26622                 # include <unistd.h>
26623                 #else /* on Windows with MSVC */
26624                 # include <direct.h>
26625                 # include <io.h>
26626                 #endif
26627                 int main ()
26628                 {
26629                   int result = 0;
26630                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
26631                     result |= 1;
26632                   else if (unlink ("..") == 0)
26633                     result |= 2;
26634                   return result;
26635                 }
26636
26637 _ACEOF
26638 if ac_fn_c_try_run "$LINENO"
26639 then :
26640   gl_cv_func_unlink_parent_fails=yes
26641 else
26642   gl_cv_func_unlink_parent_fails=no
26643 fi
26644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26645   conftest.$ac_objext conftest.beam conftest.$ac_ext
26646 fi
26647
26648            unset GL_SUBDIR_FOR_UNLINK
26649            rm -rf "$tmp"
26650          else
26651            gl_cv_func_unlink_parent_fails="guessing no"
26652          fi
26653          ;;
26654        *)
26655          gl_cv_func_unlink_parent_fails="guessing yes"
26656          ;;
26657      esac
26658
26659 fi
26660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
26661 printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
26662   case "$gl_cv_func_unlink_parent_fails" in
26663     *no)
26664       REPLACE_UNLINK=1
26665
26666 printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
26667
26668       ;;
26669   esac
26670
26671   if test $REPLACE_UNLINK = 1; then
26672
26673
26674
26675
26676
26677
26678
26679
26680   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
26681
26682   fi
26683
26684
26685
26686
26687
26688           GNULIB_UNLINK=1
26689
26690
26691
26692
26693
26694 printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704   if test $ac_cv_func_unlinkat = no; then
26705     HAVE_UNLINKAT=0
26706   else
26707     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
26708       *no)
26709         # Solaris 9 has *at functions, but uniformly mishandles trailing
26710         # slash in all of them.
26711         REPLACE_UNLINKAT=1
26712         ;;
26713       *)
26714         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
26715         # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
26716         if test $REPLACE_UNLINK = 1; then
26717           REPLACE_UNLINKAT=1
26718         fi
26719         ;;
26720     esac
26721   fi
26722
26723   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
26724
26725
26726
26727
26728
26729
26730
26731
26732   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
26733
26734   fi
26735
26736
26737
26738
26739
26740           GNULIB_UNLINKAT=1
26741
26742
26743
26744
26745
26746 printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26757                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26758 printf %s "checking whether futimesat handles NULL file... " >&6; }
26759 if test ${gl_cv_func_futimesat_works+y}
26760 then :
26761   printf %s "(cached) " >&6
26762 else
26763   touch conftest.file
26764        if test "$cross_compiling" = yes
26765 then :
26766   case "$host_os" in
26767                    # Guess yes on glibc systems.
26768            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26769                    # If we don't know, assume the worst.
26770            *)      gl_cv_func_futimesat_works="guessing no" ;;
26771          esac
26772
26773 else
26774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26775 /* end confdefs.h.  */
26776
26777 #include <stddef.h>
26778 #include <sys/times.h>
26779 #include <fcntl.h>
26780
26781 int
26782 main (void)
26783 {
26784     int fd = open ("conftest.file", O_RDWR);
26785           if (fd < 0) return 1;
26786           if (futimesat (fd, NULL, NULL)) return 2;
26787
26788   ;
26789   return 0;
26790 }
26791 _ACEOF
26792 if ac_fn_c_try_run "$LINENO"
26793 then :
26794   gl_cv_func_futimesat_works=yes
26795 else
26796   gl_cv_func_futimesat_works=no
26797 fi
26798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26799   conftest.$ac_objext conftest.beam conftest.$ac_ext
26800 fi
26801
26802       rm -f conftest.file
26803 fi
26804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26805 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
26806     case "$gl_cv_func_futimesat_works" in
26807       *yes) ;;
26808       *)
26809
26810 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26811
26812         ;;
26813     esac
26814   fi
26815
26816
26817
26818   if test $ac_cv_func_vasnprintf = no; then
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26860
26861   if test $ac_cv_func_vasnprintf = yes; then
26862
26863 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26864
26865   fi
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26878 if test "x$ac_cv_type_ptrdiff_t" = xyes
26879 then :
26880
26881 else
26882
26883 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
26884
26885
26886 fi
26887
26888
26889
26890
26891
26892
26893
26894   fi
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911   gl_cv_func_vfprintf_posix=no
26912   case "$gl_cv_func_printf_sizes_c99" in
26913     *yes)
26914       case "$gl_cv_func_printf_long_double" in
26915         *yes)
26916           case "$gl_cv_func_printf_infinite" in
26917             *yes)
26918               case "$gl_cv_func_printf_infinite_long_double" in
26919                 *yes)
26920                   case "$gl_cv_func_printf_directive_a" in
26921                     *yes)
26922                       case "$gl_cv_func_printf_directive_f" in
26923                         *yes)
26924                           case "$gl_cv_func_printf_directive_n" in
26925                             *yes)
26926                               case "$gl_cv_func_printf_directive_ls" in
26927                                 *yes)
26928                                   case "$gl_cv_func_printf_positions" in
26929                                     *yes)
26930                                       case "$gl_cv_func_printf_flag_grouping" in
26931                                         *yes)
26932                                           case "$gl_cv_func_printf_flag_leftadjust" in
26933                                             *yes)
26934                                               case "$gl_cv_func_printf_flag_zero" in
26935                                                 *yes)
26936                                                   case "$gl_cv_func_printf_precision" in
26937                                                     *yes)
26938                                                       case "$gl_cv_func_printf_enomem" in
26939                                                         *yes)
26940                                                           # vfprintf exists and is
26941                                                           # already POSIX compliant.
26942                                                           gl_cv_func_vfprintf_posix=yes
26943                                                           ;;
26944                                                       esac
26945                                                       ;;
26946                                                   esac
26947                                                   ;;
26948                                               esac
26949                                               ;;
26950                                           esac
26951                                           ;;
26952                                       esac
26953                                       ;;
26954                                   esac
26955                                   ;;
26956                               esac
26957                               ;;
26958                           esac
26959                           ;;
26960                       esac
26961                       ;;
26962                   esac
26963                   ;;
26964               esac
26965               ;;
26966           esac
26967           ;;
26968       esac
26969       ;;
26970   esac
26971   if test $gl_cv_func_vfprintf_posix = no; then
26972
26973
26974
26975   case "$gl_cv_func_printf_infinite" in
26976     *yes)
26977       ;;
26978     *)
26979
26980 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
26981
26982       ;;
26983   esac
26984
26985
26986
26987
26988   case "$gl_cv_func_printf_long_double" in
26989     *yes)
26990       case "$gl_cv_func_printf_infinite_long_double" in
26991         *yes)
26992           ;;
26993         *)
26994
26995 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
26996
26997           ;;
26998       esac
26999       ;;
27000   esac
27001
27002
27003
27004   case "$gl_cv_func_printf_directive_a" in
27005     *yes)
27006       ;;
27007     *)
27008
27009 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
27010
27011       for ac_func in nl_langinfo
27012 do :
27013   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
27014 if test "x$ac_cv_func_nl_langinfo" = xyes
27015 then :
27016   cat >>confdefs.h <<_ACEOF
27017 #define HAVE_NL_LANGINFO 1
27018 _ACEOF
27019
27020 fi
27021 done
27022
27023       ;;
27024   esac
27025
27026
27027
27028   case "$gl_cv_func_printf_directive_f" in
27029     *yes)
27030       ;;
27031     *)
27032
27033 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
27034
27035       ;;
27036   esac
27037
27038
27039
27040   case "$gl_cv_func_printf_directive_ls" in
27041     *yes)
27042       ;;
27043     *)
27044
27045 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
27046
27047       ;;
27048   esac
27049
27050
27051
27052   case "$gl_cv_func_printf_flag_grouping" in
27053     *yes)
27054       ;;
27055     *)
27056
27057 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
27058
27059       ;;
27060   esac
27061
27062
27063
27064   case "$gl_cv_func_printf_flag_leftadjust" in
27065     *yes)
27066       ;;
27067     *)
27068
27069 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
27070
27071       ;;
27072   esac
27073
27074
27075
27076   case "$gl_cv_func_printf_flag_zero" in
27077     *yes)
27078       ;;
27079     *)
27080
27081 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
27082
27083       ;;
27084   esac
27085
27086
27087
27088   case "$gl_cv_func_printf_precision" in
27089     *yes)
27090       ;;
27091     *)
27092
27093 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
27094
27095
27096 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27097
27098
27099 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27100
27101       ;;
27102   esac
27103
27104
27105
27106   case "$gl_cv_func_printf_enomem" in
27107     *yes)
27108       ;;
27109     *)
27110
27111 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
27112
27113
27114 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
27115
27116
27117 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
27118
27119       ;;
27120   esac
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
27163
27164   if test $ac_cv_func_vasnprintf = yes; then
27165
27166 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
27167
27168   fi
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
27181 if test "x$ac_cv_type_ptrdiff_t" = xyes
27182 then :
27183
27184 else
27185
27186 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
27187
27188
27189 fi
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
27208
27209   REPLACE_VFPRINTF=1
27210
27211 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
27212
27213   :
27214
27215   fi
27216
27217
27218
27219
27220
27221
27222           GNULIB_VFPRINTF_POSIX=1
27223
27224
27225
27226
27227
27228 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244      if test $gl_cv_have_include_next = yes; then
27245        gl_cv_next_wchar_h='<'wchar.h'>'
27246      else
27247        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27248 printf %s "checking absolute name of <wchar.h>... " >&6; }
27249 if test ${gl_cv_next_wchar_h+y}
27250 then :
27251   printf %s "(cached) " >&6
27252 else
27253
27254              if test $ac_cv_header_wchar_h = yes; then
27255
27256
27257
27258
27259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27260 /* end confdefs.h.  */
27261 #include <wchar.h>
27262 _ACEOF
27263                 case "$host_os" in
27264     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27265     *)    gl_absname_cpp="$ac_cpp" ;;
27266   esac
27267
27268   case "$host_os" in
27269     mingw*)
27270                                           gl_dirsep_regex='[/\\]'
27271       ;;
27272     *)
27273       gl_dirsep_regex='\/'
27274       ;;
27275   esac
27276       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27277   gl_header_literal_regex=`echo 'wchar.h' \
27278                            | sed -e "$gl_make_literal_regex_sed"`
27279   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27280       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27281       s|^/[^/]|//&|
27282       p
27283       q
27284     }'
27285
27286         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27287   sed -n "$gl_absolute_header_sed"`
27288
27289            gl_header=$gl_cv_absolute_wchar_h
27290            gl_cv_next_wchar_h='"'$gl_header'"'
27291           else
27292                gl_cv_next_wchar_h='<'wchar.h'>'
27293              fi
27294
27295
27296 fi
27297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27298 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
27299      fi
27300      NEXT_WCHAR_H=$gl_cv_next_wchar_h
27301
27302      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27303        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27304        gl_next_as_first_directive='<'wchar.h'>'
27305      else
27306        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27307        gl_next_as_first_directive=$gl_cv_next_wchar_h
27308      fi
27309      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27310
27311
27312
27313
27314   if test $ac_cv_header_wchar_h = yes; then
27315     HAVE_WCHAR_H=1
27316   else
27317     HAVE_WCHAR_H=0
27318   fi
27319
27320
27321
27322
27323
27324   if test $gt_cv_c_wint_t = yes; then
27325     HAVE_WINT_T=1
27326   else
27327     HAVE_WINT_T=0
27328   fi
27329
27330
27331
27332
27333   :
27334
27335
27336   for ac_header in stdint.h
27337 do :
27338   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27339 if test "x$ac_cv_header_stdint_h" = xyes
27340 then :
27341   cat >>confdefs.h <<_ACEOF
27342 #define HAVE_STDINT_H 1
27343 _ACEOF
27344
27345 fi
27346 done
27347
27348
27349
27350     :
27351
27352   # End of code from modules
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362   gltests_libdeps=
27363   gltests_ltlibdeps=
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373   gl_source_base='tests'
27374   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
27375
27376   gl_module_indicator_condition=$gltests_WITNESS
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386   LIBGZIP_LIBDEPS="$gl_libdeps"
27387
27388   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
27389
27390
27391
27392 # Check whether --enable-gcc-warnings was given.
27393 if test ${enable_gcc_warnings+y}
27394 then :
27395   enableval=$enable_gcc_warnings; case $enableval in
27396      yes|no) ;;
27397      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
27398    esac
27399    gl_gcc_warnings=$enableval
27400 else
27401   if test -d "$srcdir"/.git; then
27402      gl_gcc_warnings=yes
27403    else
27404      gl_gcc_warnings=no
27405    fi
27406
27407 fi
27408
27409
27410 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
27411 # ------------------------------------------------
27412 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
27413 # Otherwise, run RUN-IF-NOT-FOUND.
27414
27415
27416 if test "$gl_gcc_warnings" = yes; then
27417   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
27418 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
27419 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
27420 then :
27421   printf %s "(cached) " >&6
27422 else
27423
27424   gl_save_compiler_FLAGS="$CFLAGS"
27425   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
27426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27427 /* end confdefs.h.  */
27428
27429 int
27430 main (void)
27431 {
27432
27433   ;
27434   return 0;
27435 }
27436 _ACEOF
27437 if ac_fn_c_try_link "$LINENO"
27438 then :
27439   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
27440 else
27441   gl_cv_warn_c__Werror__Wunknown_warning_option=no
27442 fi
27443 rm -f core conftest.err conftest.$ac_objext \
27444     conftest$ac_exeext conftest.$ac_ext
27445   CFLAGS="$gl_save_compiler_FLAGS"
27446
27447 fi
27448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
27449 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
27450 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
27451 then :
27452   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
27453 else
27454   gl_unknown_warnings_are_errors=
27455 fi
27456
27457
27458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
27459 printf %s "checking whether C compiler handles -Werror... " >&6; }
27460 if test ${gl_cv_warn_c__Werror+y}
27461 then :
27462   printf %s "(cached) " >&6
27463 else
27464
27465   gl_save_compiler_FLAGS="$CFLAGS"
27466   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
27467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27468 /* end confdefs.h.  */
27469
27470 int
27471 main (void)
27472 {
27473
27474   ;
27475   return 0;
27476 }
27477 _ACEOF
27478 if ac_fn_c_try_link "$LINENO"
27479 then :
27480   gl_cv_warn_c__Werror=yes
27481 else
27482   gl_cv_warn_c__Werror=no
27483 fi
27484 rm -f core conftest.err conftest.$ac_objext \
27485     conftest$ac_exeext conftest.$ac_ext
27486   CFLAGS="$gl_save_compiler_FLAGS"
27487
27488 fi
27489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
27490 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
27491 if test "x$gl_cv_warn_c__Werror" = xyes
27492 then :
27493   as_fn_append WERROR_CFLAGS " -Werror"
27494 fi
27495
27496
27497
27498
27499   nw=
27500   # This, $nw, is the list of warnings we disable.
27501   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
27502   nw="$nw -Waggregate-return"       # anachronistic
27503   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
27504   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
27505   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
27506   nw="$nw -Wtraditional"            # Warns on #elif which we use often
27507   nw="$nw -Wcast-qual"              # Too many warnings for now
27508   nw="$nw -Wconversion"             # Too many warnings for now
27509   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
27510   nw="$nw -Wsign-conversion"        # Too many warnings for now
27511   nw="$nw -Wtraditional-conversion" # Too many warnings for now
27512   nw="$nw -Wunreachable-code"       # Too many warnings for now
27513   nw="$nw -Wpadded"                 # Our structs are not padded
27514   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
27515   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
27516   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
27517   nw="$nw -Wvla"                    # warnings in gettext.h
27518   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
27519   nw="$nw -Wswitch-enum"            # Too many warnings for now
27520   nw="$nw -Wswitch-default"         # Too many warnings for now
27521   nw="$nw -Wstack-protector"        # not worth working around
27522   # things I might fix soon:
27523   nw="$nw -Wfloat-equal"            # sort.c, seq.c
27524   nw="$nw -Wmissing-format-attribute" # copy.c
27525   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
27526   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
27527
27528   # Warnings that gzip runs afoul of but coreutils does not.
27529   nw="$nw -Wold-style-definition"
27530   nw="$nw -Wshadow"
27531   nw="$nw -Wstrict-overflow"
27532
27533   # Using -Wstrict-overflow is a pain, but the alternative is worse.
27534   # For an example, see the code that provoked this report:
27535   # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
27536   # Code like that still infloops with gcc-4.6.0 and -O2.  Scary indeed.
27537
27538
27539
27540   if test -n "$GCC"; then
27541
27542             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
27543 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
27544     if test ${gl_cv_cc_nomfi_supported+y}
27545 then :
27546   printf %s "(cached) " >&6
27547 else
27548
27549       gl_save_CFLAGS="$CFLAGS"
27550       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
27551       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27552 /* end confdefs.h.  */
27553
27554 int
27555 main (void)
27556 {
27557
27558   ;
27559   return 0;
27560 }
27561 _ACEOF
27562 if ac_fn_c_try_compile "$LINENO"
27563 then :
27564   gl_cv_cc_nomfi_supported=yes
27565 else
27566   gl_cv_cc_nomfi_supported=no
27567 fi
27568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27569       CFLAGS="$gl_save_CFLAGS"
27570 fi
27571
27572     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
27573 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
27574
27575     if test "$gl_cv_cc_nomfi_supported" = yes; then
27576                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
27577 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
27578       if test ${gl_cv_cc_nomfi_needed+y}
27579 then :
27580   printf %s "(cached) " >&6
27581 else
27582
27583         gl_save_CFLAGS="$CFLAGS"
27584         CFLAGS="$CFLAGS -W -Werror"
27585         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27586 /* end confdefs.h.  */
27587 void f (void)
27588                {
27589                  typedef struct { int a; int b; } s_t;
27590                  s_t s1 = { 0, };
27591                }
27592
27593 int
27594 main (void)
27595 {
27596
27597   ;
27598   return 0;
27599 }
27600 _ACEOF
27601 if ac_fn_c_try_compile "$LINENO"
27602 then :
27603   gl_cv_cc_nomfi_needed=no
27604 else
27605   gl_cv_cc_nomfi_needed=yes
27606 fi
27607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27608         CFLAGS="$gl_save_CFLAGS"
27609
27610 fi
27611
27612       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
27613 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
27614     fi
27615
27616                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
27617 printf %s "checking whether -Wuninitialized is supported... " >&6; }
27618     if test ${gl_cv_cc_uninitialized_supported+y}
27619 then :
27620   printf %s "(cached) " >&6
27621 else
27622
27623       gl_save_CFLAGS="$CFLAGS"
27624       CFLAGS="$CFLAGS -Werror -Wuninitialized"
27625       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27626 /* end confdefs.h.  */
27627
27628 int
27629 main (void)
27630 {
27631
27632   ;
27633   return 0;
27634 }
27635 _ACEOF
27636 if ac_fn_c_try_compile "$LINENO"
27637 then :
27638   gl_cv_cc_uninitialized_supported=yes
27639 else
27640   gl_cv_cc_uninitialized_supported=no
27641 fi
27642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27643       CFLAGS="$gl_save_CFLAGS"
27644 fi
27645
27646     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
27647 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
27648
27649   fi
27650
27651   # List all gcc warning categories.
27652   # To compare this list to your installed GCC's, run this Bash command:
27653   #
27654   # comm -3 \
27655   #  <(sed -n 's/^  *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
27656   #  <(gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort |
27657   #      grep -v -x -f <(
27658   #         awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
27659
27660   gl_manywarn_set=
27661   for gl_manywarn_item in \
27662     -W \
27663     -Wabi \
27664     -Waddress \
27665     -Waggressive-loop-optimizations \
27666     -Wall \
27667     -Wattributes \
27668     -Wbad-function-cast \
27669     -Wbool-compare \
27670     -Wbuiltin-macro-redefined \
27671     -Wcast-align \
27672     -Wchar-subscripts \
27673     -Wchkp \
27674     -Wclobbered \
27675     -Wcomment \
27676     -Wcomments \
27677     -Wcoverage-mismatch \
27678     -Wcpp \
27679     -Wdate-time \
27680     -Wdeprecated \
27681     -Wdeprecated-declarations \
27682     -Wdesignated-init \
27683     -Wdisabled-optimization \
27684     -Wdiscarded-array-qualifiers \
27685     -Wdiscarded-qualifiers \
27686     -Wdiv-by-zero \
27687     -Wdouble-promotion \
27688     -Wempty-body \
27689     -Wendif-labels \
27690     -Wenum-compare \
27691     -Wextra \
27692     -Wformat-contains-nul \
27693     -Wformat-extra-args \
27694     -Wformat-nonliteral \
27695     -Wformat-security \
27696     -Wformat-signedness \
27697     -Wformat-y2k \
27698     -Wformat-zero-length \
27699     -Wfree-nonheap-object \
27700     -Wignored-qualifiers \
27701     -Wimplicit \
27702     -Wimplicit-function-declaration \
27703     -Wimplicit-int \
27704     -Wincompatible-pointer-types \
27705     -Winit-self \
27706     -Winline \
27707     -Wint-conversion \
27708     -Wint-to-pointer-cast \
27709     -Winvalid-memory-model \
27710     -Winvalid-pch \
27711     -Wjump-misses-init \
27712     -Wlogical-not-parentheses \
27713     -Wlogical-op \
27714     -Wmain \
27715     -Wmaybe-uninitialized \
27716     -Wmemset-transposed-args \
27717     -Wmissing-braces \
27718     -Wmissing-declarations \
27719     -Wmissing-field-initializers \
27720     -Wmissing-include-dirs \
27721     -Wmissing-parameter-type \
27722     -Wmissing-prototypes \
27723     -Wmultichar \
27724     -Wnarrowing \
27725     -Wnested-externs \
27726     -Wnonnull \
27727     -Wodr \
27728     -Wold-style-declaration \
27729     -Wold-style-definition \
27730     -Wopenmp-simd \
27731     -Woverflow \
27732     -Woverlength-strings \
27733     -Woverride-init \
27734     -Wpacked \
27735     -Wpacked-bitfield-compat \
27736     -Wparentheses \
27737     -Wpointer-arith \
27738     -Wpointer-sign \
27739     -Wpointer-to-int-cast \
27740     -Wpragmas \
27741     -Wreturn-local-addr \
27742     -Wreturn-type \
27743     -Wsequence-point \
27744     -Wshadow \
27745     -Wshift-count-negative \
27746     -Wshift-count-overflow \
27747     -Wsizeof-array-argument \
27748     -Wsizeof-pointer-memaccess \
27749     -Wstack-protector \
27750     -Wstrict-aliasing \
27751     -Wstrict-overflow \
27752     -Wstrict-prototypes \
27753     -Wsuggest-attribute=const \
27754     -Wsuggest-attribute=format \
27755     -Wsuggest-attribute=noreturn \
27756     -Wsuggest-attribute=pure \
27757     -Wsuggest-final-methods \
27758     -Wsuggest-final-types \
27759     -Wswitch \
27760     -Wswitch-bool \
27761     -Wswitch-default \
27762     -Wsync-nand \
27763     -Wsystem-headers \
27764     -Wtrampolines \
27765     -Wtrigraphs \
27766     -Wtype-limits \
27767     -Wuninitialized \
27768     -Wunknown-pragmas \
27769     -Wunsafe-loop-optimizations \
27770     -Wunused \
27771     -Wunused-but-set-parameter \
27772     -Wunused-but-set-variable \
27773     -Wunused-function \
27774     -Wunused-label \
27775     -Wunused-local-typedefs \
27776     -Wunused-macros \
27777     -Wunused-parameter \
27778     -Wunused-result \
27779     -Wunused-value \
27780     -Wunused-variable \
27781     -Wvarargs \
27782     -Wvariadic-macros \
27783     -Wvector-operation-performance \
27784     -Wvla \
27785     -Wvolatile-register-var \
27786     -Wwrite-strings \
27787     \
27788     ; do
27789     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
27790   done
27791
27792   # gcc --help=warnings outputs an unusual form for these options; list
27793   # them here so that the above 'comm' command doesn't report a false match.
27794   gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
27795   gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
27796
27797   # These are needed for older GCC versions.
27798   if test -n "$GCC"; then
27799     case `($CC --version) 2>/dev/null` in
27800       'gcc (GCC) '[0-3].* | \
27801       'gcc (GCC) '4.[0-7].*)
27802         gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
27803         gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
27804           ;;
27805     esac
27806   fi
27807
27808   # Disable specific options as needed.
27809   if test "$gl_cv_cc_nomfi_needed" = yes; then
27810     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
27811   fi
27812
27813   if test "$gl_cv_cc_uninitialized_supported" = no; then
27814     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
27815   fi
27816
27817   ws=$gl_manywarn_set
27818
27819
27820   gl_warn_set=
27821   set x $ws; shift
27822   for gl_warn_item
27823   do
27824     case " $nw " in
27825       *" $gl_warn_item "*)
27826         ;;
27827       *)
27828         gl_warn_set="$gl_warn_set $gl_warn_item"
27829         ;;
27830     esac
27831   done
27832   ws=$gl_warn_set
27833
27834   for w in $ws; do
27835
27836 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
27837 gl_positive="$w"
27838 case $gl_positive in
27839   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
27840 esac
27841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
27842 printf %s "checking whether C compiler handles $w... " >&6; }
27843 if eval test \${$as_gl_Warn+y}
27844 then :
27845   printf %s "(cached) " >&6
27846 else
27847
27848   gl_save_compiler_FLAGS="$CFLAGS"
27849   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
27850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27851 /* end confdefs.h.  */
27852
27853 int
27854 main (void)
27855 {
27856
27857   ;
27858   return 0;
27859 }
27860 _ACEOF
27861 if ac_fn_c_try_link "$LINENO"
27862 then :
27863   eval "$as_gl_Warn=yes"
27864 else
27865   eval "$as_gl_Warn=no"
27866 fi
27867 rm -f core conftest.err conftest.$ac_objext \
27868     conftest$ac_exeext conftest.$ac_ext
27869   CFLAGS="$gl_save_compiler_FLAGS"
27870
27871 fi
27872 eval ac_res=\$$as_gl_Warn
27873                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27874 printf "%s\n" "$ac_res" >&6; }
27875 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
27876 then :
27877   as_fn_append WARN_CFLAGS " $w"
27878 fi
27879
27880
27881   done
27882
27883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
27884 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
27885 if test ${gl_cv_warn_c__Wno_sign_compare+y}
27886 then :
27887   printf %s "(cached) " >&6
27888 else
27889
27890   gl_save_compiler_FLAGS="$CFLAGS"
27891   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
27892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27893 /* end confdefs.h.  */
27894
27895 int
27896 main (void)
27897 {
27898
27899   ;
27900   return 0;
27901 }
27902 _ACEOF
27903 if ac_fn_c_try_link "$LINENO"
27904 then :
27905   gl_cv_warn_c__Wno_sign_compare=yes
27906 else
27907   gl_cv_warn_c__Wno_sign_compare=no
27908 fi
27909 rm -f core conftest.err conftest.$ac_objext \
27910     conftest$ac_exeext conftest.$ac_ext
27911   CFLAGS="$gl_save_compiler_FLAGS"
27912
27913 fi
27914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
27915 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
27916 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
27917 then :
27918   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
27919 fi
27920
27921      # Too many warnings for now
27922
27923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
27924 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
27925 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
27926 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 -Wunused-parameter"
27932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27933 /* end confdefs.h.  */
27934
27935 int
27936 main (void)
27937 {
27938
27939   ;
27940   return 0;
27941 }
27942 _ACEOF
27943 if ac_fn_c_try_link "$LINENO"
27944 then :
27945   gl_cv_warn_c__Wno_unused_parameter=yes
27946 else
27947   gl_cv_warn_c__Wno_unused_parameter=no
27948 fi
27949 rm -f core conftest.err conftest.$ac_objext \
27950     conftest$ac_exeext conftest.$ac_ext
27951   CFLAGS="$gl_save_compiler_FLAGS"
27952
27953 fi
27954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
27955 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
27956 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
27957 then :
27958   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
27959 fi
27960
27961  # Too many warnings for now
27962
27963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
27964 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
27965 if test ${gl_cv_warn_c__Wsuggest_attribute_const+y}
27966 then :
27967   printf %s "(cached) " >&6
27968 else
27969
27970   gl_save_compiler_FLAGS="$CFLAGS"
27971   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
27972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27973 /* end confdefs.h.  */
27974
27975 int
27976 main (void)
27977 {
27978
27979   ;
27980   return 0;
27981 }
27982 _ACEOF
27983 if ac_fn_c_try_link "$LINENO"
27984 then :
27985   gl_cv_warn_c__Wsuggest_attribute_const=yes
27986 else
27987   gl_cv_warn_c__Wsuggest_attribute_const=no
27988 fi
27989 rm -f core conftest.err conftest.$ac_objext \
27990     conftest$ac_exeext conftest.$ac_ext
27991   CFLAGS="$gl_save_compiler_FLAGS"
27992
27993 fi
27994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
27995 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
27996 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes
27997 then :
27998   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
27999 fi
28000
28001
28002
28003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
28004 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
28005 if test ${gl_cv_warn_c__Wsuggest_attribute_noreturn+y}
28006 then :
28007   printf %s "(cached) " >&6
28008 else
28009
28010   gl_save_compiler_FLAGS="$CFLAGS"
28011   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
28012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28013 /* end confdefs.h.  */
28014
28015 int
28016 main (void)
28017 {
28018
28019   ;
28020   return 0;
28021 }
28022 _ACEOF
28023 if ac_fn_c_try_link "$LINENO"
28024 then :
28025   gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
28026 else
28027   gl_cv_warn_c__Wsuggest_attribute_noreturn=no
28028 fi
28029 rm -f core conftest.err conftest.$ac_objext \
28030     conftest$ac_exeext conftest.$ac_ext
28031   CFLAGS="$gl_save_compiler_FLAGS"
28032
28033 fi
28034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
28035 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
28036 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes
28037 then :
28038   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
28039 fi
28040
28041
28042
28043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
28044 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
28045 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
28046 then :
28047   printf %s "(cached) " >&6
28048 else
28049
28050   gl_save_compiler_FLAGS="$CFLAGS"
28051   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
28052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28053 /* end confdefs.h.  */
28054
28055 int
28056 main (void)
28057 {
28058
28059   ;
28060   return 0;
28061 }
28062 _ACEOF
28063 if ac_fn_c_try_link "$LINENO"
28064 then :
28065   gl_cv_warn_c__Wno_format_nonliteral=yes
28066 else
28067   gl_cv_warn_c__Wno_format_nonliteral=no
28068 fi
28069 rm -f core conftest.err conftest.$ac_objext \
28070     conftest$ac_exeext conftest.$ac_ext
28071   CFLAGS="$gl_save_compiler_FLAGS"
28072
28073 fi
28074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
28075 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
28076 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
28077 then :
28078   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
28079 fi
28080
28081
28082
28083   # Enable this warning only with gcc-4.7 and newer.  With 4.6.2 20111027,
28084   # it suggests test.c's advance function may be pure, even though it
28085   # increments a global variable.  Oops.
28086   # Normally we'd write code to test for the precise failure, but that
28087   # requires a relatively large input to make gcc exhibit the failure.
28088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28089 /* end confdefs.h.  */
28090
28091 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
28092 /* ok */
28093 #else
28094 # error "your version of gcc is older than 4.7"
28095 #endif
28096
28097 int
28098 main (void)
28099 {
28100
28101   ;
28102   return 0;
28103 },
28104
28105 _ACEOF
28106 if ac_fn_c_try_cpp "$LINENO"
28107 then :
28108
28109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
28110 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
28111 if test ${gl_cv_warn_c__Wsuggest_attribute_pure+y}
28112 then :
28113   printf %s "(cached) " >&6
28114 else
28115
28116   gl_save_compiler_FLAGS="$CFLAGS"
28117   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
28118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28119 /* end confdefs.h.  */
28120
28121 int
28122 main (void)
28123 {
28124
28125   ;
28126   return 0;
28127 }
28128 _ACEOF
28129 if ac_fn_c_try_link "$LINENO"
28130 then :
28131   gl_cv_warn_c__Wsuggest_attribute_pure=yes
28132 else
28133   gl_cv_warn_c__Wsuggest_attribute_pure=no
28134 fi
28135 rm -f core conftest.err conftest.$ac_objext \
28136     conftest$ac_exeext conftest.$ac_ext
28137   CFLAGS="$gl_save_compiler_FLAGS"
28138
28139 fi
28140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
28141 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
28142 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes
28143 then :
28144   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
28145 fi
28146
28147
28148 fi
28149 rm -f conftest.err conftest.i conftest.$ac_ext
28150
28151
28152
28153   # In spite of excluding -Wlogical-op above, it is enabled, as of
28154   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
28155
28156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
28157 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
28158 if test ${gl_cv_warn_c__Wno_logical_op+y}
28159 then :
28160   printf %s "(cached) " >&6
28161 else
28162
28163   gl_save_compiler_FLAGS="$CFLAGS"
28164   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
28165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28166 /* end confdefs.h.  */
28167
28168 int
28169 main (void)
28170 {
28171
28172   ;
28173   return 0;
28174 }
28175 _ACEOF
28176 if ac_fn_c_try_link "$LINENO"
28177 then :
28178   gl_cv_warn_c__Wno_logical_op=yes
28179 else
28180   gl_cv_warn_c__Wno_logical_op=no
28181 fi
28182 rm -f core conftest.err conftest.$ac_objext \
28183     conftest$ac_exeext conftest.$ac_ext
28184   CFLAGS="$gl_save_compiler_FLAGS"
28185
28186 fi
28187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
28188 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
28189 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
28190 then :
28191   as_fn_append WARN_CFLAGS " -Wno-logical-op"
28192 fi
28193
28194
28195
28196
28197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
28198 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
28199 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
28200 then :
28201   printf %s "(cached) " >&6
28202 else
28203
28204   gl_save_compiler_FLAGS="$CFLAGS"
28205   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
28206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28207 /* end confdefs.h.  */
28208
28209 int
28210 main (void)
28211 {
28212
28213   ;
28214   return 0;
28215 }
28216 _ACEOF
28217 if ac_fn_c_try_link "$LINENO"
28218 then :
28219   gl_cv_warn_c__fdiagnostics_show_option=yes
28220 else
28221   gl_cv_warn_c__fdiagnostics_show_option=no
28222 fi
28223 rm -f core conftest.err conftest.$ac_objext \
28224     conftest$ac_exeext conftest.$ac_ext
28225   CFLAGS="$gl_save_compiler_FLAGS"
28226
28227 fi
28228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
28229 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
28230 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
28231 then :
28232   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
28233 fi
28234
28235
28236
28237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
28238 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
28239 if test ${gl_cv_warn_c__funit_at_a_time+y}
28240 then :
28241   printf %s "(cached) " >&6
28242 else
28243
28244   gl_save_compiler_FLAGS="$CFLAGS"
28245   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
28246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28247 /* end confdefs.h.  */
28248
28249 int
28250 main (void)
28251 {
28252
28253   ;
28254   return 0;
28255 }
28256 _ACEOF
28257 if ac_fn_c_try_link "$LINENO"
28258 then :
28259   gl_cv_warn_c__funit_at_a_time=yes
28260 else
28261   gl_cv_warn_c__funit_at_a_time=no
28262 fi
28263 rm -f core conftest.err conftest.$ac_objext \
28264     conftest$ac_exeext conftest.$ac_ext
28265   CFLAGS="$gl_save_compiler_FLAGS"
28266
28267 fi
28268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
28269 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
28270 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
28271 then :
28272   as_fn_append WARN_CFLAGS " -funit-at-a-time"
28273 fi
28274
28275
28276
28277
28278
28279
28280 printf "%s\n" "#define lint 1" >>confdefs.h
28281
28282
28283
28284 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
28285
28286
28287   # We use a slightly smaller set of warning options for lib/.
28288   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
28289   nw=
28290   nw="$nw -Wstrict-overflow"
28291   nw="$nw -Wuninitialized"
28292   nw="$nw -Wunused-macros"
28293   nw="$nw -Wmissing-prototypes"
28294   nw="$nw -Wold-style-definition"
28295
28296   gl_warn_set=
28297   set x $WARN_CFLAGS; shift
28298   for gl_warn_item
28299   do
28300     case " $nw " in
28301       *" $gl_warn_item "*)
28302         ;;
28303       *)
28304         gl_warn_set="$gl_warn_set $gl_warn_item"
28305         ;;
28306     esac
28307   done
28308   GNULIB_WARN_CFLAGS=$gl_warn_set
28309
28310
28311 fi
28312
28313 # cc -E produces incorrect asm files on SVR4, so postprocess it.
28314 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
28315
28316
28317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
28318 printf %s "checking for underline in external names... " >&6; }
28319 if test ${gzip_cv_underline+y}
28320 then :
28321   printf %s "(cached) " >&6
28322 else
28323   gzip_cv_underline=yes
28324    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28325 /* end confdefs.h.  */
28326 int foo() {return 0;}
28327 int
28328 main (void)
28329 {
28330
28331   ;
28332   return 0;
28333 }
28334 _ACEOF
28335 if ac_fn_c_try_compile "$LINENO"
28336 then :
28337   $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
28338         gzip_cv_underline=no
28339 fi
28340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28341 fi
28342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
28343 printf "%s\n" "$gzip_cv_underline" >&6; }
28344 ASCPPFLAGS=
28345 if test $gzip_cv_underline = no; then
28346   ASCPPFLAGS='-DNO_UNDERLINE'
28347 fi
28348
28349
28350
28351 # Try to assemble match.S.
28352 # "gcc -E match.s" ignores -E, so we must use _match.S.
28353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
28354 printf %s "checking for an assembler syntax supported by this package... " >&6; }
28355 if test ${gzip_cv_assembler+y}
28356 then :
28357   printf %s "(cached) " >&6
28358 else
28359   gzip_cv_assembler=no
28360    case $DEFS in
28361    *NO_ASM*) ;;
28362    *)
28363      if cp $srcdir/lib/match.c _match.S &&
28364         eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
28365         eval "$ASCPPPOST < _match.i > match_.s"; then
28366        if test ! -s match_.s || grep error < match_.s > /dev/null; then
28367          :
28368        elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
28369             test -f match_.$OBJEXT; then
28370          rm -f match_.$OBJEXT
28371          gzip_cv_assembler=yes
28372          if echo 'void foo (void) {}' > conftest.c &&
28373             eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
28374             grep '\.note\.GNU-stack' conftest.s >/dev/null &&
28375             eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
28376             test -f match_.$OBJEXT; then
28377            gzip_cv_assembler='yes, with -Wa,--noexecstack'
28378          fi
28379        fi
28380      fi
28381      rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
28382    esac
28383 fi
28384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
28385 printf "%s\n" "$gzip_cv_assembler" >&6; }
28386 if test "$gzip_cv_assembler" != no; then
28387
28388 printf "%s\n" "#define ASMV /**/" >>confdefs.h
28389
28390   case " $LIBOBJS " in
28391   *" match.$ac_objext "* ) ;;
28392   *) LIBOBJS="$LIBOBJS match.$ac_objext"
28393  ;;
28394 esac
28395
28396 fi
28397 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
28398   ASFLAGS_config='-Wa,--noexecstack'
28399 else
28400   ASFLAGS_config=
28401 fi
28402
28403
28404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
28405 printf %s "checking for library containing strerror... " >&6; }
28406 if test ${ac_cv_search_strerror+y}
28407 then :
28408   printf %s "(cached) " >&6
28409 else
28410   ac_func_search_save_LIBS=$LIBS
28411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28412 /* end confdefs.h.  */
28413
28414 /* Override any GCC internal prototype to avoid an error.
28415    Use char because int might match the return type of a GCC
28416    builtin and then its argument prototype would still apply.  */
28417 #ifdef __cplusplus
28418 extern "C"
28419 #endif
28420 char strerror ();
28421 int
28422 main (void)
28423 {
28424 return strerror ();
28425   ;
28426   return 0;
28427 }
28428 _ACEOF
28429 for ac_lib in '' cposix
28430 do
28431   if test -z "$ac_lib"; then
28432     ac_res="none required"
28433   else
28434     ac_res=-l$ac_lib
28435     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28436   fi
28437   if ac_fn_c_try_link "$LINENO"
28438 then :
28439   ac_cv_search_strerror=$ac_res
28440 fi
28441 rm -f core conftest.err conftest.$ac_objext \
28442     conftest$ac_exeext
28443   if test ${ac_cv_search_strerror+y}
28444 then :
28445   break
28446 fi
28447 done
28448 if test ${ac_cv_search_strerror+y}
28449 then :
28450
28451 else
28452   ac_cv_search_strerror=no
28453 fi
28454 rm conftest.$ac_ext
28455 LIBS=$ac_func_search_save_LIBS
28456 fi
28457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
28458 printf "%s\n" "$ac_cv_search_strerror" >&6; }
28459 ac_res=$ac_cv_search_strerror
28460 if test "$ac_res" != no
28461 then :
28462   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28463
28464 fi
28465
28466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
28467 printf %s "checking for an ANSI C-conforming const... " >&6; }
28468 if test ${ac_cv_c_const+y}
28469 then :
28470   printf %s "(cached) " >&6
28471 else
28472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28473 /* end confdefs.h.  */
28474
28475 int
28476 main (void)
28477 {
28478
28479 #ifndef __cplusplus
28480   /* Ultrix mips cc rejects this sort of thing.  */
28481   typedef int charset[2];
28482   const charset cs = { 0, 0 };
28483   /* SunOS 4.1.1 cc rejects this.  */
28484   char const *const *pcpcc;
28485   char **ppc;
28486   /* NEC SVR4.0.2 mips cc rejects this.  */
28487   struct point {int x, y;};
28488   static struct point const zero = {0,0};
28489   /* IBM XL C 1.02.0.0 rejects this.
28490      It does not let you subtract one const X* pointer from another in
28491      an arm of an if-expression whose if-part is not a constant
28492      expression */
28493   const char *g = "string";
28494   pcpcc = &g + (g ? g-g : 0);
28495   /* HPUX 7.0 cc rejects these. */
28496   ++pcpcc;
28497   ppc = (char**) pcpcc;
28498   pcpcc = (char const *const *) ppc;
28499   { /* SCO 3.2v4 cc rejects this sort of thing.  */
28500     char tx;
28501     char *t = &tx;
28502     char const *s = 0 ? (char *) 0 : (char const *) 0;
28503
28504     *t++ = 0;
28505     if (s) return 0;
28506   }
28507   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
28508     int x[] = {25, 17};
28509     const int *foo = &x[0];
28510     ++foo;
28511   }
28512   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
28513     typedef const int *iptr;
28514     iptr p = 0;
28515     ++p;
28516   }
28517   { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
28518        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
28519     struct s { int j; const int *ap[3]; } bx;
28520     struct s *b = &bx; b->j = 5;
28521   }
28522   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
28523     const int foo = 10;
28524     if (!foo) return 0;
28525   }
28526   return !cs[0] && !zero.x;
28527 #endif
28528
28529   ;
28530   return 0;
28531 }
28532 _ACEOF
28533 if ac_fn_c_try_compile "$LINENO"
28534 then :
28535   ac_cv_c_const=yes
28536 else
28537   ac_cv_c_const=no
28538 fi
28539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28540 fi
28541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
28542 printf "%s\n" "$ac_cv_c_const" >&6; }
28543 if test $ac_cv_c_const = no; then
28544
28545 printf "%s\n" "#define const /**/" >>confdefs.h
28546
28547 fi
28548
28549 # Autoupdate added the following line to ensure that your configure
28550 # script's behavior did not change.  It is probably safe to remove.
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570 ac_header_dirent=no
28571 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28572   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
28574 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
28575 if eval test \${$as_ac_Header+y}
28576 then :
28577   printf %s "(cached) " >&6
28578 else
28579   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28580 /* end confdefs.h.  */
28581 #include <sys/types.h>
28582 #include <$ac_hdr>
28583
28584 int
28585 main (void)
28586 {
28587 if ((DIR *) 0)
28588 return 0;
28589   ;
28590   return 0;
28591 }
28592 _ACEOF
28593 if ac_fn_c_try_compile "$LINENO"
28594 then :
28595   eval "$as_ac_Header=yes"
28596 else
28597   eval "$as_ac_Header=no"
28598 fi
28599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28600 fi
28601 eval ac_res=\$$as_ac_Header
28602                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28603 printf "%s\n" "$ac_res" >&6; }
28604 if eval test \"x\$"$as_ac_Header"\" = x"yes"
28605 then :
28606   cat >>confdefs.h <<_ACEOF
28607 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
28608 _ACEOF
28609
28610 ac_header_dirent=$ac_hdr; break
28611 fi
28612
28613 done
28614 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28615 if test $ac_header_dirent = dirent.h; then
28616   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28617 printf %s "checking for library containing opendir... " >&6; }
28618 if test ${ac_cv_search_opendir+y}
28619 then :
28620   printf %s "(cached) " >&6
28621 else
28622   ac_func_search_save_LIBS=$LIBS
28623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28624 /* end confdefs.h.  */
28625
28626 /* Override any GCC internal prototype to avoid an error.
28627    Use char because int might match the return type of a GCC
28628    builtin and then its argument prototype would still apply.  */
28629 #ifdef __cplusplus
28630 extern "C"
28631 #endif
28632 char opendir ();
28633 int
28634 main (void)
28635 {
28636 return opendir ();
28637   ;
28638   return 0;
28639 }
28640 _ACEOF
28641 for ac_lib in '' dir
28642 do
28643   if test -z "$ac_lib"; then
28644     ac_res="none required"
28645   else
28646     ac_res=-l$ac_lib
28647     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28648   fi
28649   if ac_fn_c_try_link "$LINENO"
28650 then :
28651   ac_cv_search_opendir=$ac_res
28652 fi
28653 rm -f core conftest.err conftest.$ac_objext \
28654     conftest$ac_exeext
28655   if test ${ac_cv_search_opendir+y}
28656 then :
28657   break
28658 fi
28659 done
28660 if test ${ac_cv_search_opendir+y}
28661 then :
28662
28663 else
28664   ac_cv_search_opendir=no
28665 fi
28666 rm conftest.$ac_ext
28667 LIBS=$ac_func_search_save_LIBS
28668 fi
28669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28670 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28671 ac_res=$ac_cv_search_opendir
28672 if test "$ac_res" != no
28673 then :
28674   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28675
28676 fi
28677
28678 else
28679   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
28680 printf %s "checking for library containing opendir... " >&6; }
28681 if test ${ac_cv_search_opendir+y}
28682 then :
28683   printf %s "(cached) " >&6
28684 else
28685   ac_func_search_save_LIBS=$LIBS
28686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28687 /* end confdefs.h.  */
28688
28689 /* Override any GCC internal prototype to avoid an error.
28690    Use char because int might match the return type of a GCC
28691    builtin and then its argument prototype would still apply.  */
28692 #ifdef __cplusplus
28693 extern "C"
28694 #endif
28695 char opendir ();
28696 int
28697 main (void)
28698 {
28699 return opendir ();
28700   ;
28701   return 0;
28702 }
28703 _ACEOF
28704 for ac_lib in '' x
28705 do
28706   if test -z "$ac_lib"; then
28707     ac_res="none required"
28708   else
28709     ac_res=-l$ac_lib
28710     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28711   fi
28712   if ac_fn_c_try_link "$LINENO"
28713 then :
28714   ac_cv_search_opendir=$ac_res
28715 fi
28716 rm -f core conftest.err conftest.$ac_objext \
28717     conftest$ac_exeext
28718   if test ${ac_cv_search_opendir+y}
28719 then :
28720   break
28721 fi
28722 done
28723 if test ${ac_cv_search_opendir+y}
28724 then :
28725
28726 else
28727   ac_cv_search_opendir=no
28728 fi
28729 rm conftest.$ac_ext
28730 LIBS=$ac_func_search_save_LIBS
28731 fi
28732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
28733 printf "%s\n" "$ac_cv_search_opendir" >&6; }
28734 ac_res=$ac_cv_search_opendir
28735 if test "$ac_res" != no
28736 then :
28737   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28738
28739 fi
28740
28741 fi
28742
28743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
28744 printf %s "checking return type of signal handlers... " >&6; }
28745 if test ${ac_cv_type_signal+y}
28746 then :
28747   printf %s "(cached) " >&6
28748 else
28749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28750 /* end confdefs.h.  */
28751 #include <sys/types.h>
28752 #include <signal.h>
28753
28754 int
28755 main (void)
28756 {
28757 return *(signal (0, 0)) (0) == 1;
28758   ;
28759   return 0;
28760 }
28761 _ACEOF
28762 if ac_fn_c_try_compile "$LINENO"
28763 then :
28764   ac_cv_type_signal=int
28765 else
28766   ac_cv_type_signal=void
28767 fi
28768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28769 fi
28770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
28771 printf "%s\n" "$ac_cv_type_signal" >&6; }
28772
28773 cat >>confdefs.h <<_ACEOF
28774 #define RETSIGTYPE $ac_cv_type_signal
28775 _ACEOF
28776
28777
28778 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
28779 if test "x$ac_cv_type_size_t" = xyes
28780 then :
28781
28782 else
28783
28784 cat >>confdefs.h <<_ACEOF
28785 #define size_t unsigned int
28786 _ACEOF
28787
28788 fi
28789
28790 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
28791 if test "x$ac_cv_type_off_t" = xyes
28792 then :
28793
28794 else
28795
28796 cat >>confdefs.h <<_ACEOF
28797 #define off_t long int
28798 _ACEOF
28799
28800 fi
28801
28802
28803 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
28804
28805 cat >confcache <<\_ACEOF
28806 # This file is a shell script that caches the results of configure
28807 # tests run on this system so they can be shared between configure
28808 # scripts and configure runs, see configure's option --config-cache.
28809 # It is not useful on other systems.  If it contains results you don't
28810 # want to keep, you may remove or edit it.
28811 #
28812 # config.status only pays attention to the cache file if you give it
28813 # the --recheck option to rerun configure.
28814 #
28815 # `ac_cv_env_foo' variables (set or unset) will be overridden when
28816 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28817 # following values.
28818
28819 _ACEOF
28820
28821 # The following way of writing the cache mishandles newlines in values,
28822 # but we know of no workaround that is simple, portable, and efficient.
28823 # So, we kill variables containing newlines.
28824 # Ultrix sh set writes to stderr and can't be redirected directly,
28825 # and sets the high bit in the cache file unless we assign to the vars.
28826 (
28827   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28828     eval ac_val=\$$ac_var
28829     case $ac_val in #(
28830     *${as_nl}*)
28831       case $ac_var in #(
28832       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28833 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28834       esac
28835       case $ac_var in #(
28836       _ | IFS | as_nl) ;; #(
28837       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28838       *) { eval $ac_var=; unset $ac_var;} ;;
28839       esac ;;
28840     esac
28841   done
28842
28843   (set) 2>&1 |
28844     case $as_nl`(ac_space=' '; set) 2>&1` in #(
28845     *${as_nl}ac_space=\ *)
28846       # `set' does not quote correctly, so add quotes: double-quote
28847       # substitution turns \\\\ into \\, and sed turns \\ into \.
28848       sed -n \
28849         "s/'/'\\\\''/g;
28850           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28851       ;; #(
28852     *)
28853       # `set' quotes correctly as required by POSIX, so do not add quotes.
28854       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28855       ;;
28856     esac |
28857     sort
28858 ) |
28859   sed '
28860      /^ac_cv_env_/b end
28861      t clear
28862      :clear
28863      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
28864      t end
28865      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28866      :end' >>confcache
28867 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28868   if test -w "$cache_file"; then
28869     if test "x$cache_file" != "x/dev/null"; then
28870       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28871 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
28872       if test ! -f "$cache_file" || test -h "$cache_file"; then
28873         cat confcache >"$cache_file"
28874       else
28875         case $cache_file in #(
28876         */* | ?:*)
28877           mv -f confcache "$cache_file"$$ &&
28878           mv -f "$cache_file"$$ "$cache_file" ;; #(
28879         *)
28880           mv -f confcache "$cache_file" ;;
28881         esac
28882       fi
28883     fi
28884   else
28885     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28886 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
28887   fi
28888 fi
28889 rm -f confcache
28890
28891 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28892 # Let make expand exec_prefix.
28893 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28894
28895 DEFS=-DHAVE_CONFIG_H
28896
28897 ac_libobjs=
28898 ac_ltlibobjs=
28899 U=
28900 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28901   # 1. Remove the extension, and $U if already installed.
28902   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28903   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
28904   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
28905   #    will be set to the directory where LIBOBJS objects are built.
28906   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28907   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28908 done
28909 LIBOBJS=$ac_libobjs
28910
28911 LTLIBOBJS=$ac_ltlibobjs
28912
28913
28914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
28915 printf %s "checking that generated files are newer than configure... " >&6; }
28916    if test -n "$am_sleep_pid"; then
28917      # Hide warnings about reused PIDs.
28918      wait $am_sleep_pid 2>/dev/null
28919    fi
28920    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
28921 printf "%s\n" "done" >&6; }
28922  if test -n "$EXEEXT"; then
28923   am__EXEEXT_TRUE=
28924   am__EXEEXT_FALSE='#'
28925 else
28926   am__EXEEXT_TRUE='#'
28927   am__EXEEXT_FALSE=
28928 fi
28929
28930 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
28931   as_fn_error $? "conditional \"AMDEP\" was never defined.
28932 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28933 fi
28934 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
28935   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
28936 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28937 fi
28938 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
28939   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
28940 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28941 fi
28942 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
28943   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
28944 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28945 fi
28946 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28947   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28948 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28949 fi
28950 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
28951   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
28952 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28953 fi
28954
28955
28956 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
28957   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
28958 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28959 fi
28960 CONFIG_INCLUDE=lib/config.h
28961
28962 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
28963   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
28964 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28965 fi
28966 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
28967   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
28968 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28969 fi
28970 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
28971   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
28972 Usually this means the macro was only invoked conditionally." "$LINENO" 5
28973 fi
28974
28975     gl_libobjs=
28976     gl_ltlibobjs=
28977     if test -n "$gl_LIBOBJS"; then
28978       # Remove the extension.
28979       sed_drop_objext='s/\.o$//;s/\.obj$//'
28980       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28981         gl_libobjs="$gl_libobjs $i.$ac_objext"
28982         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28983       done
28984     fi
28985     gl_LIBOBJS=$gl_libobjs
28986
28987     gl_LTLIBOBJS=$gl_ltlibobjs
28988
28989
28990
28991     gltests_libobjs=
28992     gltests_ltlibobjs=
28993     if test -n "$gltests_LIBOBJS"; then
28994       # Remove the extension.
28995       sed_drop_objext='s/\.o$//;s/\.obj$//'
28996       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28997         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28998         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28999       done
29000     fi
29001     gltests_LIBOBJS=$gltests_libobjs
29002
29003     gltests_LTLIBOBJS=$gltests_ltlibobjs
29004
29005
29006
29007 : "${CONFIG_STATUS=./config.status}"
29008 ac_write_fail=0
29009 ac_clean_files_save=$ac_clean_files
29010 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29012 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
29013 as_write_fail=0
29014 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29015 #! $SHELL
29016 # Generated by $as_me.
29017 # Run this file to recreate the current configuration.
29018 # Compiler output produced by configure, useful for debugging
29019 # configure, is in config.log if it exists.
29020
29021 debug=false
29022 ac_cs_recheck=false
29023 ac_cs_silent=false
29024
29025 SHELL=\${CONFIG_SHELL-$SHELL}
29026 export SHELL
29027 _ASEOF
29028 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29029 ## -------------------- ##
29030 ## M4sh Initialization. ##
29031 ## -------------------- ##
29032
29033 # Be more Bourne compatible
29034 DUALCASE=1; export DUALCASE # for MKS sh
29035 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
29036 then :
29037   emulate sh
29038   NULLCMD=:
29039   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29040   # is contrary to our usage.  Disable this feature.
29041   alias -g '${1+"$@"}'='"$@"'
29042   setopt NO_GLOB_SUBST
29043 else
29044   case `(set -o) 2>/dev/null` in #(
29045   *posix*) :
29046     set -o posix ;; #(
29047   *) :
29048      ;;
29049 esac
29050 fi
29051
29052
29053 # The user is always right.
29054 if ${PATH_SEPARATOR+false} :; then
29055   PATH_SEPARATOR=:
29056   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29057     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29058       PATH_SEPARATOR=';'
29059   }
29060 fi
29061
29062
29063 # IFS
29064 # We need space, tab and new line, in precisely that order.  Quoting is
29065 # there to prevent editors from complaining about space-tab.
29066 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29067 # splitting by setting IFS to empty value.)
29068 as_nl='
29069 '
29070 export as_nl
29071 IFS=" ""        $as_nl"
29072
29073 # Find who we are.  Look in the path if we contain no directory separator.
29074 as_myself=
29075 case $0 in #((
29076   *[\\/]* ) as_myself=$0 ;;
29077   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29078 for as_dir in $PATH
29079 do
29080   IFS=$as_save_IFS
29081   case $as_dir in #(((
29082     '') as_dir=./ ;;
29083     */) ;;
29084     *) as_dir=$as_dir/ ;;
29085   esac
29086     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
29087   done
29088 IFS=$as_save_IFS
29089
29090      ;;
29091 esac
29092 # We did not find ourselves, most probably we were run as `sh COMMAND'
29093 # in which case we are not to be found in the path.
29094 if test "x$as_myself" = x; then
29095   as_myself=$0
29096 fi
29097 if test ! -f "$as_myself"; then
29098   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29099   exit 1
29100 fi
29101
29102 # Unset variables that we do not need and which cause bugs (e.g. in
29103 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
29104 # suppresses any "Segmentation fault" message there.  '((' could
29105 # trigger a bug in pdksh 5.2.14.
29106 for as_var in BASH_ENV ENV MAIL MAILPATH
29107 do eval test \${$as_var+y} \
29108   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29109 done
29110 PS1='$ '
29111 PS2='> '
29112 PS4='+ '
29113
29114 # NLS nuisances.
29115 LC_ALL=C
29116 export LC_ALL
29117 LANGUAGE=C
29118 export LANGUAGE
29119
29120 # CDPATH.
29121 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29122
29123
29124 # as_fn_error STATUS ERROR [LINENO LOG_FD]
29125 # ----------------------------------------
29126 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29127 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
29128 # script with STATUS, using 1 if that was 0.
29129 as_fn_error ()
29130 {
29131   as_status=$1; test $as_status -eq 0 && as_status=1
29132   if test "$4"; then
29133     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29134     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
29135   fi
29136   printf "%s\n" "$as_me: error: $2" >&2
29137   as_fn_exit $as_status
29138 } # as_fn_error
29139
29140
29141 # as_fn_set_status STATUS
29142 # -----------------------
29143 # Set $? to STATUS, without forking.
29144 as_fn_set_status ()
29145 {
29146   return $1
29147 } # as_fn_set_status
29148
29149 # as_fn_exit STATUS
29150 # -----------------
29151 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29152 as_fn_exit ()
29153 {
29154   set +e
29155   as_fn_set_status $1
29156   exit $1
29157 } # as_fn_exit
29158
29159 # as_fn_unset VAR
29160 # ---------------
29161 # Portably unset VAR.
29162 as_fn_unset ()
29163 {
29164   { eval $1=; unset $1;}
29165 }
29166 as_unset=as_fn_unset
29167 # as_fn_append VAR VALUE
29168 # ----------------------
29169 # Append the text in VALUE to the end of the definition contained in VAR. Take
29170 # advantage of any shell optimizations that allow amortized linear growth over
29171 # repeated appends, instead of the typical quadratic growth present in naive
29172 # implementations.
29173 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
29174 then :
29175   eval 'as_fn_append ()
29176   {
29177     eval $1+=\$2
29178   }'
29179 else
29180   as_fn_append ()
29181   {
29182     eval $1=\$$1\$2
29183   }
29184 fi # as_fn_append
29185
29186 # as_fn_arith ARG...
29187 # ------------------
29188 # Perform arithmetic evaluation on the ARGs, and store the result in the
29189 # global $as_val. Take advantage of shells that can avoid forks. The arguments
29190 # must be portable across $(()) and expr.
29191 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
29192 then :
29193   eval 'as_fn_arith ()
29194   {
29195     as_val=$(( $* ))
29196   }'
29197 else
29198   as_fn_arith ()
29199   {
29200     as_val=`expr "$@" || test $? -eq 1`
29201   }
29202 fi # as_fn_arith
29203
29204
29205 if expr a : '\(a\)' >/dev/null 2>&1 &&
29206    test "X`expr 00001 : '.*\(...\)'`" = X001; then
29207   as_expr=expr
29208 else
29209   as_expr=false
29210 fi
29211
29212 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29213   as_basename=basename
29214 else
29215   as_basename=false
29216 fi
29217
29218 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29219   as_dirname=dirname
29220 else
29221   as_dirname=false
29222 fi
29223
29224 as_me=`$as_basename -- "$0" ||
29225 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29226          X"$0" : 'X\(//\)$' \| \
29227          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29228 printf "%s\n" X/"$0" |
29229     sed '/^.*\/\([^/][^/]*\)\/*$/{
29230             s//\1/
29231             q
29232           }
29233           /^X\/\(\/\/\)$/{
29234             s//\1/
29235             q
29236           }
29237           /^X\/\(\/\).*/{
29238             s//\1/
29239             q
29240           }
29241           s/.*/./; q'`
29242
29243 # Avoid depending upon Character Ranges.
29244 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29245 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29246 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29247 as_cr_digits='0123456789'
29248 as_cr_alnum=$as_cr_Letters$as_cr_digits
29249
29250 ECHO_C= ECHO_N= ECHO_T=
29251 case `echo -n x` in #(((((
29252 -n*)
29253   case `echo 'xy\c'` in
29254   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
29255   xy)  ECHO_C='\c';;
29256   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
29257        ECHO_T=' ';;
29258   esac;;
29259 *)
29260   ECHO_N='-n';;
29261 esac
29262
29263 rm -f conf$$ conf$$.exe conf$$.file
29264 if test -d conf$$.dir; then
29265   rm -f conf$$.dir/conf$$.file
29266 else
29267   rm -f conf$$.dir
29268   mkdir conf$$.dir 2>/dev/null
29269 fi
29270 if (echo >conf$$.file) 2>/dev/null; then
29271   if ln -s conf$$.file conf$$ 2>/dev/null; then
29272     as_ln_s='ln -s'
29273     # ... but there are two gotchas:
29274     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29275     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29276     # In both cases, we have to default to `cp -pR'.
29277     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29278       as_ln_s='cp -pR'
29279   elif ln conf$$.file conf$$ 2>/dev/null; then
29280     as_ln_s=ln
29281   else
29282     as_ln_s='cp -pR'
29283   fi
29284 else
29285   as_ln_s='cp -pR'
29286 fi
29287 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29288 rmdir conf$$.dir 2>/dev/null
29289
29290
29291 # as_fn_mkdir_p
29292 # -------------
29293 # Create "$as_dir" as a directory, including parents if necessary.
29294 as_fn_mkdir_p ()
29295 {
29296
29297   case $as_dir in #(
29298   -*) as_dir=./$as_dir;;
29299   esac
29300   test -d "$as_dir" || eval $as_mkdir_p || {
29301     as_dirs=
29302     while :; do
29303       case $as_dir in #(
29304       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29305       *) as_qdir=$as_dir;;
29306       esac
29307       as_dirs="'$as_qdir' $as_dirs"
29308       as_dir=`$as_dirname -- "$as_dir" ||
29309 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29310          X"$as_dir" : 'X\(//\)[^/]' \| \
29311          X"$as_dir" : 'X\(//\)$' \| \
29312          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29313 printf "%s\n" X"$as_dir" |
29314     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29315             s//\1/
29316             q
29317           }
29318           /^X\(\/\/\)[^/].*/{
29319             s//\1/
29320             q
29321           }
29322           /^X\(\/\/\)$/{
29323             s//\1/
29324             q
29325           }
29326           /^X\(\/\).*/{
29327             s//\1/
29328             q
29329           }
29330           s/.*/./; q'`
29331       test -d "$as_dir" && break
29332     done
29333     test -z "$as_dirs" || eval "mkdir $as_dirs"
29334   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
29335
29336
29337 } # as_fn_mkdir_p
29338 if mkdir -p . 2>/dev/null; then
29339   as_mkdir_p='mkdir -p "$as_dir"'
29340 else
29341   test -d ./-p && rmdir ./-p
29342   as_mkdir_p=false
29343 fi
29344
29345
29346 # as_fn_executable_p FILE
29347 # -----------------------
29348 # Test if FILE is an executable regular file.
29349 as_fn_executable_p ()
29350 {
29351   test -f "$1" && test -x "$1"
29352 } # as_fn_executable_p
29353 as_test_x='test -x'
29354 as_executable_p=as_fn_executable_p
29355
29356 # Sed expression to map a string onto a valid CPP name.
29357 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29358
29359 # Sed expression to map a string onto a valid variable name.
29360 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29361
29362
29363 exec 6>&1
29364 ## ----------------------------------- ##
29365 ## Main body of $CONFIG_STATUS script. ##
29366 ## ----------------------------------- ##
29367 _ASEOF
29368 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29369
29370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29371 # Save the log message, to keep $0 and so on meaningful, and to
29372 # report actual input values of CONFIG_FILES etc. instead of their
29373 # values after options handling.
29374 ac_log="
29375 This file was extended by gzip $as_me 1.8, which was
29376 generated by GNU Autoconf 2.69.147-5ad35.  Invocation command line was
29377
29378   CONFIG_FILES    = $CONFIG_FILES
29379   CONFIG_HEADERS  = $CONFIG_HEADERS
29380   CONFIG_LINKS    = $CONFIG_LINKS
29381   CONFIG_COMMANDS = $CONFIG_COMMANDS
29382   $ $0 $@
29383
29384 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29385 "
29386
29387 _ACEOF
29388
29389 case $ac_config_files in *"
29390 "*) set x $ac_config_files; shift; ac_config_files=$*;;
29391 esac
29392
29393 case $ac_config_headers in *"
29394 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29395 esac
29396
29397
29398 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29399 # Files that config.status was made for.
29400 config_files="$ac_config_files"
29401 config_headers="$ac_config_headers"
29402 config_links="$ac_config_links"
29403 config_commands="$ac_config_commands"
29404
29405 _ACEOF
29406
29407 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29408 ac_cs_usage="\
29409 \`$as_me' instantiates files and other configuration actions
29410 from templates according to the current configuration.  Unless the files
29411 and actions are specified as TAGs, all are instantiated by default.
29412
29413 Usage: $0 [OPTION]... [TAG]...
29414
29415   -h, --help       print this help, then exit
29416   -V, --version    print version number and configuration settings, then exit
29417       --config     print configuration, then exit
29418   -q, --quiet, --silent
29419                    do not print progress messages
29420   -d, --debug      don't remove temporary files
29421       --recheck    update $as_me by reconfiguring in the same conditions
29422       --file=FILE[:TEMPLATE]
29423                    instantiate the configuration file FILE
29424       --header=FILE[:TEMPLATE]
29425                    instantiate the configuration header FILE
29426
29427 Configuration files:
29428 $config_files
29429
29430 Configuration headers:
29431 $config_headers
29432
29433 Configuration links:
29434 $config_links
29435
29436 Configuration commands:
29437 $config_commands
29438
29439 Report bugs to <bug-gzip@gnu.org>."
29440
29441 _ACEOF
29442 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29443 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29444 ac_cs_version="\\
29445 gzip config.status 1.8
29446 configured by $0, generated by GNU Autoconf 2.69.147-5ad35,
29447   with options \\"\$ac_cs_config\\"
29448
29449 Copyright (C) 2015 Free Software Foundation, Inc.
29450 This config.status script is free software; the Free Software Foundation
29451 gives unlimited permission to copy, distribute and modify it."
29452
29453 ac_pwd='$ac_pwd'
29454 srcdir='$srcdir'
29455 INSTALL='$INSTALL'
29456 MKDIR_P='$MKDIR_P'
29457 AWK='$AWK'
29458 test -n "\$AWK" || AWK=awk
29459 _ACEOF
29460
29461 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29462 # The default lists apply if the user does not specify any file.
29463 ac_need_defaults=:
29464 while test $# != 0
29465 do
29466   case $1 in
29467   --*=?*)
29468     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29469     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29470     ac_shift=:
29471     ;;
29472   --*=)
29473     ac_option=`expr "X$1" : 'X\([^=]*\)='`
29474     ac_optarg=
29475     ac_shift=:
29476     ;;
29477   *)
29478     ac_option=$1
29479     ac_optarg=$2
29480     ac_shift=shift
29481     ;;
29482   esac
29483
29484   case $ac_option in
29485   # Handling of the options.
29486   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29487     ac_cs_recheck=: ;;
29488   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29489     printf "%s\n" "$ac_cs_version"; exit ;;
29490   --config | --confi | --conf | --con | --co | --c )
29491     printf "%s\n" "$ac_cs_config"; exit ;;
29492   --debug | --debu | --deb | --de | --d | -d )
29493     debug=: ;;
29494   --file | --fil | --fi | --f )
29495     $ac_shift
29496     case $ac_optarg in
29497     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29498     '') as_fn_error $? "missing file argument" ;;
29499     esac
29500     as_fn_append CONFIG_FILES " '$ac_optarg'"
29501     ac_need_defaults=false;;
29502   --header | --heade | --head | --hea )
29503     $ac_shift
29504     case $ac_optarg in
29505     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29506     esac
29507     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29508     ac_need_defaults=false;;
29509   --he | --h)
29510     # Conflict between --help and --header
29511     as_fn_error $? "ambiguous option: \`$1'
29512 Try \`$0 --help' for more information.";;
29513   --help | --hel | -h )
29514     printf "%s\n" "$ac_cs_usage"; exit ;;
29515   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29516   | -silent | --silent | --silen | --sile | --sil | --si | --s)
29517     ac_cs_silent=: ;;
29518
29519   # This is an error.
29520   -*) as_fn_error $? "unrecognized option: \`$1'
29521 Try \`$0 --help' for more information." ;;
29522
29523   *) as_fn_append ac_config_targets " $1"
29524      ac_need_defaults=false ;;
29525
29526   esac
29527   shift
29528 done
29529
29530 ac_configure_extra_args=
29531
29532 if $ac_cs_silent; then
29533   exec 6>/dev/null
29534   ac_configure_extra_args="$ac_configure_extra_args --silent"
29535 fi
29536
29537 _ACEOF
29538 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29539 if \$ac_cs_recheck; then
29540   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29541   shift
29542   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
29543   CONFIG_SHELL='$SHELL'
29544   export CONFIG_SHELL
29545   exec "\$@"
29546 fi
29547
29548 _ACEOF
29549 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29550 exec 5>>config.log
29551 {
29552   echo
29553   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29554 ## Running $as_me. ##
29555 _ASBOX
29556   printf "%s\n" "$ac_log"
29557 } >&5
29558
29559 _ACEOF
29560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29561 #
29562 # INIT-COMMANDS
29563 #
29564 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
29565 GNUmakefile=$GNUmakefile
29566
29567 _ACEOF
29568
29569 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29570
29571 # Handling of arguments.
29572 for ac_config_target in $ac_config_targets
29573 do
29574   case $ac_config_target in
29575     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
29576     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29577     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
29578     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29579     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29580     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
29581     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29582
29583   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29584   esac
29585 done
29586
29587
29588 # If the user did not use the arguments to specify the items to instantiate,
29589 # then the envvar interface is used.  Set only those that are not.
29590 # We use the long form for the default assignment because of an extremely
29591 # bizarre bug on SunOS 4.1.3.
29592 if $ac_need_defaults; then
29593   test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
29594   test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
29595   test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
29596   test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
29597 fi
29598
29599 # Have a temporary directory for convenience.  Make it in the build tree
29600 # simply because there is no reason against having it here, and in addition,
29601 # creating and moving files from /tmp can sometimes cause problems.
29602 # Hook for its removal unless debugging.
29603 # Note that there is a small window in which the directory will not be cleaned:
29604 # after its creation but before its name has been assigned to `$tmp'.
29605 $debug ||
29606 {
29607   tmp= ac_tmp=
29608   trap 'exit_status=$?
29609   : "${ac_tmp:=$tmp}"
29610   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29611 ' 0
29612   trap 'as_fn_exit 1' 1 2 13 15
29613 }
29614 # Create a (secure) tmp directory for tmp files.
29615
29616 {
29617   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29618   test -d "$tmp"
29619 }  ||
29620 {
29621   tmp=./conf$$-$RANDOM
29622   (umask 077 && mkdir "$tmp")
29623 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29624 ac_tmp=$tmp
29625
29626 # Set up the scripts for CONFIG_FILES section.
29627 # No need to generate them if there are no CONFIG_FILES.
29628 # This happens for instance with `./config.status config.h'.
29629 if test -n "$CONFIG_FILES"; then
29630
29631
29632 ac_cr=`echo X | tr X '\015'`
29633 # On cygwin, bash can eat \r inside `` if the user requested igncr.
29634 # But we know of no other shell where ac_cr would be empty at this
29635 # point, so we can use a bashism as a fallback.
29636 if test "x$ac_cr" = x; then
29637   eval ac_cr=\$\'\\r\'
29638 fi
29639 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29640 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29641   ac_cs_awk_cr='\\r'
29642 else
29643   ac_cs_awk_cr=$ac_cr
29644 fi
29645
29646 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29647 _ACEOF
29648
29649
29650 {
29651   echo "cat >conf$$subs.awk <<_ACEOF" &&
29652   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29653   echo "_ACEOF"
29654 } >conf$$subs.sh ||
29655   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29656 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29657 ac_delim='%!_!# '
29658 for ac_last_try in false false false false false :; do
29659   . ./conf$$subs.sh ||
29660     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29661
29662   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29663   if test $ac_delim_n = $ac_delim_num; then
29664     break
29665   elif $ac_last_try; then
29666     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29667   else
29668     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29669   fi
29670 done
29671 rm -f conf$$subs.sh
29672
29673 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29674 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29675 _ACEOF
29676 sed -n '
29677 h
29678 s/^/S["/; s/!.*/"]=/
29679 p
29680 g
29681 s/^[^!]*!//
29682 :repl
29683 t repl
29684 s/'"$ac_delim"'$//
29685 t delim
29686 :nl
29687 h
29688 s/\(.\{148\}\)..*/\1/
29689 t more1
29690 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29691 p
29692 n
29693 b repl
29694 :more1
29695 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29696 p
29697 g
29698 s/.\{148\}//
29699 t nl
29700 :delim
29701 h
29702 s/\(.\{148\}\)..*/\1/
29703 t more2
29704 s/["\\]/\\&/g; s/^/"/; s/$/"/
29705 p
29706 b
29707 :more2
29708 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29709 p
29710 g
29711 s/.\{148\}//
29712 t delim
29713 ' <conf$$subs.awk | sed '
29714 /^[^""]/{
29715   N
29716   s/\n//
29717 }
29718 ' >>$CONFIG_STATUS || ac_write_fail=1
29719 rm -f conf$$subs.awk
29720 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29721 _ACAWK
29722 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29723   for (key in S) S_is_set[key] = 1
29724   FS = "\a"
29725
29726 }
29727 {
29728   line = $ 0
29729   nfields = split(line, field, "@")
29730   substed = 0
29731   len = length(field[1])
29732   for (i = 2; i < nfields; i++) {
29733     key = field[i]
29734     keylen = length(key)
29735     if (S_is_set[key]) {
29736       value = S[key]
29737       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29738       len += length(value) + length(field[++i])
29739       substed = 1
29740     } else
29741       len += 1 + keylen
29742   }
29743
29744   print line
29745 }
29746
29747 _ACAWK
29748 _ACEOF
29749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29750 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29751   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29752 else
29753   cat
29754 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29755   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29756 _ACEOF
29757
29758 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29759 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29760 # trailing colons and then remove the whole line if VPATH becomes empty
29761 # (actually we leave an empty line to preserve line numbers).
29762 if test "x$srcdir" = x.; then
29763   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
29764 h
29765 s///
29766 s/^/:/
29767 s/[      ]*$/:/
29768 s/:\$(srcdir):/:/g
29769 s/:\${srcdir}:/:/g
29770 s/:@srcdir@:/:/g
29771 s/^:*//
29772 s/:*$//
29773 x
29774 s/\(=[   ]*\).*/\1/
29775 G
29776 s/\n//
29777 s/^[^=]*=[       ]*$//
29778 }'
29779 fi
29780
29781 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29782 fi # test -n "$CONFIG_FILES"
29783
29784 # Set up the scripts for CONFIG_HEADERS section.
29785 # No need to generate them if there are no CONFIG_HEADERS.
29786 # This happens for instance with `./config.status Makefile'.
29787 if test -n "$CONFIG_HEADERS"; then
29788 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29789 BEGIN {
29790 _ACEOF
29791
29792 # Transform confdefs.h into an awk script `defines.awk', embedded as
29793 # here-document in config.status, that substitutes the proper values into
29794 # config.h.in to produce config.h.
29795
29796 # Create a delimiter string that does not exist in confdefs.h, to ease
29797 # handling of long lines.
29798 ac_delim='%!_!# '
29799 for ac_last_try in false false :; do
29800   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29801   if test -z "$ac_tt"; then
29802     break
29803   elif $ac_last_try; then
29804     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29805   else
29806     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29807   fi
29808 done
29809
29810 # For the awk script, D is an array of macro values keyed by name,
29811 # likewise P contains macro parameters if any.  Preserve backslash
29812 # newline sequences.
29813
29814 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29815 sed -n '
29816 s/.\{148\}/&'"$ac_delim"'/g
29817 t rset
29818 :rset
29819 s/^[     ]*#[    ]*define[       ][      ]*/ /
29820 t def
29821 d
29822 :def
29823 s/\\$//
29824 t bsnl
29825 s/["\\]/\\&/g
29826 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
29827 D["\1"]=" \3"/p
29828 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
29829 d
29830 :bsnl
29831 s/["\\]/\\&/g
29832 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
29833 D["\1"]=" \3\\\\\\n"\\/p
29834 t cont
29835 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29836 t cont
29837 d
29838 :cont
29839 n
29840 s/.\{148\}/&'"$ac_delim"'/g
29841 t clear
29842 :clear
29843 s/\\$//
29844 t bsnlc
29845 s/["\\]/\\&/g; s/^/"/; s/$/"/p
29846 d
29847 :bsnlc
29848 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29849 b cont
29850 ' <confdefs.h | sed '
29851 s/'"$ac_delim"'/"\\\
29852 "/g' >>$CONFIG_STATUS || ac_write_fail=1
29853
29854 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29855   for (key in D) D_is_set[key] = 1
29856   FS = "\a"
29857 }
29858 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29859   line = \$ 0
29860   split(line, arg, " ")
29861   if (arg[1] == "#") {
29862     defundef = arg[2]
29863     mac1 = arg[3]
29864   } else {
29865     defundef = substr(arg[1], 2)
29866     mac1 = arg[2]
29867   }
29868   split(mac1, mac2, "(") #)
29869   macro = mac2[1]
29870   prefix = substr(line, 1, index(line, defundef) - 1)
29871   if (D_is_set[macro]) {
29872     # Preserve the white space surrounding the "#".
29873     print prefix "define", macro P[macro] D[macro]
29874     next
29875   } else {
29876     # Replace #undef with comments.  This is necessary, for example,
29877     # in the case of _POSIX_SOURCE, which is predefined and required
29878     # on some systems where configure will not decide to define it.
29879     if (defundef == "undef") {
29880       print "/*", prefix defundef, macro, "*/"
29881       next
29882     }
29883   }
29884 }
29885 { print }
29886 _ACAWK
29887 _ACEOF
29888 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29889   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
29890 fi # test -n "$CONFIG_HEADERS"
29891
29892
29893 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
29894 shift
29895 for ac_tag
29896 do
29897   case $ac_tag in
29898   :[FHLC]) ac_mode=$ac_tag; continue;;
29899   esac
29900   case $ac_mode$ac_tag in
29901   :[FHL]*:*);;
29902   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
29903   :[FH]-) ac_tag=-:-;;
29904   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29905   esac
29906   ac_save_IFS=$IFS
29907   IFS=:
29908   set x $ac_tag
29909   IFS=$ac_save_IFS
29910   shift
29911   ac_file=$1
29912   shift
29913
29914   case $ac_mode in
29915   :L) ac_source=$1;;
29916   :[FH])
29917     ac_file_inputs=
29918     for ac_f
29919     do
29920       case $ac_f in
29921       -) ac_f="$ac_tmp/stdin";;
29922       *) # Look for the file first in the build tree, then in the source tree
29923          # (if the path is not absolute).  The absolute path cannot be DOS-style,
29924          # because $ac_f cannot contain `:'.
29925          test -f "$ac_f" ||
29926            case $ac_f in
29927            [\\/$]*) false;;
29928            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29929            esac ||
29930            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29931       esac
29932       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29933       as_fn_append ac_file_inputs " '$ac_f'"
29934     done
29935
29936     # Let's still pretend it is `configure' which instantiates (i.e., don't
29937     # use $as_me), people would be surprised to read:
29938     #    /* config.h.  Generated by config.status.  */
29939     configure_input='Generated from '`
29940           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29941         `' by configure.'
29942     if test x"$ac_file" != x-; then
29943       configure_input="$ac_file.  $configure_input"
29944       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29945 printf "%s\n" "$as_me: creating $ac_file" >&6;}
29946     fi
29947     # Neutralize special characters interpreted by sed in replacement strings.
29948     case $configure_input in #(
29949     *\&* | *\|* | *\\* )
29950        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
29951        sed 's/[\\\\&|]/\\\\&/g'`;; #(
29952     *) ac_sed_conf_input=$configure_input;;
29953     esac
29954
29955     case $ac_tag in
29956     *:-:* | *:-) cat >"$ac_tmp/stdin" \
29957       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
29958     esac
29959     ;;
29960   esac
29961
29962   ac_dir=`$as_dirname -- "$ac_file" ||
29963 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29964          X"$ac_file" : 'X\(//\)[^/]' \| \
29965          X"$ac_file" : 'X\(//\)$' \| \
29966          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29967 printf "%s\n" X"$ac_file" |
29968     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29969             s//\1/
29970             q
29971           }
29972           /^X\(\/\/\)[^/].*/{
29973             s//\1/
29974             q
29975           }
29976           /^X\(\/\/\)$/{
29977             s//\1/
29978             q
29979           }
29980           /^X\(\/\).*/{
29981             s//\1/
29982             q
29983           }
29984           s/.*/./; q'`
29985   as_dir="$ac_dir"; as_fn_mkdir_p
29986   ac_builddir=.
29987
29988 case "$ac_dir" in
29989 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29990 *)
29991   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
29992   # A ".." for each directory in $ac_dir_suffix.
29993   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29994   case $ac_top_builddir_sub in
29995   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29996   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29997   esac ;;
29998 esac
29999 ac_abs_top_builddir=$ac_pwd
30000 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30001 # for backward compatibility:
30002 ac_top_builddir=$ac_top_build_prefix
30003
30004 case $srcdir in
30005   .)  # We are building in place.
30006     ac_srcdir=.
30007     ac_top_srcdir=$ac_top_builddir_sub
30008     ac_abs_top_srcdir=$ac_pwd ;;
30009   [\\/]* | ?:[\\/]* )  # Absolute name.
30010     ac_srcdir=$srcdir$ac_dir_suffix;
30011     ac_top_srcdir=$srcdir
30012     ac_abs_top_srcdir=$srcdir ;;
30013   *) # Relative name.
30014     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30015     ac_top_srcdir=$ac_top_build_prefix$srcdir
30016     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30017 esac
30018 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30019
30020
30021   case $ac_mode in
30022   :F)
30023   #
30024   # CONFIG_FILE
30025   #
30026
30027   case $INSTALL in
30028   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30029   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30030   esac
30031   ac_MKDIR_P=$MKDIR_P
30032   case $MKDIR_P in
30033   [\\/$]* | ?:[\\/]* ) ;;
30034   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30035   esac
30036 _ACEOF
30037
30038 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30039 # If the template does not know about datarootdir, expand it.
30040 # FIXME: This hack should be removed a few years after 2.60.
30041 ac_datarootdir_hack=; ac_datarootdir_seen=
30042 ac_sed_dataroot='
30043 /datarootdir/ {
30044   p
30045   q
30046 }
30047 /@datadir@/p
30048 /@docdir@/p
30049 /@infodir@/p
30050 /@localedir@/p
30051 /@mandir@/p'
30052 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30053 *datarootdir*) ac_datarootdir_seen=yes;;
30054 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30055   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30056 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30057 _ACEOF
30058 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30059   ac_datarootdir_hack='
30060   s&@datadir@&$datadir&g
30061   s&@docdir@&$docdir&g
30062   s&@infodir@&$infodir&g
30063   s&@localedir@&$localedir&g
30064   s&@mandir@&$mandir&g
30065   s&\\\${datarootdir}&$datarootdir&g' ;;
30066 esac
30067 _ACEOF
30068
30069 # Neutralize VPATH when `$srcdir' = `.'.
30070 # Shell code in configure.ac might set extrasub.
30071 # FIXME: do we really want to maintain this feature?
30072 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30073 ac_sed_extra="$ac_vpsub
30074 $extrasub
30075 _ACEOF
30076 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30077 :t
30078 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30079 s|@configure_input@|$ac_sed_conf_input|;t t
30080 s&@top_builddir@&$ac_top_builddir_sub&;t t
30081 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30082 s&@srcdir@&$ac_srcdir&;t t
30083 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30084 s&@top_srcdir@&$ac_top_srcdir&;t t
30085 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30086 s&@builddir@&$ac_builddir&;t t
30087 s&@abs_builddir@&$ac_abs_builddir&;t t
30088 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30089 s&@INSTALL@&$ac_INSTALL&;t t
30090 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30091 $ac_datarootdir_hack
30092 "
30093 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30094   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30095
30096 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30097   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30098   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
30099       "$ac_tmp/out"`; test -z "$ac_out"; } &&
30100   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30101 which seems to be undefined.  Please make sure it is defined" >&5
30102 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30103 which seems to be undefined.  Please make sure it is defined" >&2;}
30104
30105   rm -f "$ac_tmp/stdin"
30106   case $ac_file in
30107   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30108   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
30109   esac \
30110   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30111  ;;
30112   :H)
30113   #
30114   # CONFIG_HEADER
30115   #
30116   if test x"$ac_file" != x-; then
30117     {
30118       printf "%s\n" "/* $configure_input  */" \
30119       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30120     } >"$ac_tmp/config.h" \
30121       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30122     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
30123       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30124 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
30125     else
30126       rm -f "$ac_file"
30127       mv "$ac_tmp/config.h" "$ac_file" \
30128         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30129     fi
30130   else
30131     printf "%s\n" "/* $configure_input  */" \
30132       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30133       || as_fn_error $? "could not create -" "$LINENO" 5
30134   fi
30135 # Compute "$ac_file"'s index in $config_headers.
30136 _am_arg="$ac_file"
30137 _am_stamp_count=1
30138 for _am_header in $config_headers :; do
30139   case $_am_header in
30140     $_am_arg | $_am_arg:* )
30141       break ;;
30142     * )
30143       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30144   esac
30145 done
30146 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30147 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30148          X"$_am_arg" : 'X\(//\)[^/]' \| \
30149          X"$_am_arg" : 'X\(//\)$' \| \
30150          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30151 printf "%s\n" X"$_am_arg" |
30152     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30153             s//\1/
30154             q
30155           }
30156           /^X\(\/\/\)[^/].*/{
30157             s//\1/
30158             q
30159           }
30160           /^X\(\/\/\)$/{
30161             s//\1/
30162             q
30163           }
30164           /^X\(\/\).*/{
30165             s//\1/
30166             q
30167           }
30168           s/.*/./; q'`/stamp-h$_am_stamp_count
30169  ;;
30170   :L)
30171   #
30172   # CONFIG_LINK
30173   #
30174
30175   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
30176     :
30177   else
30178     # Prefer the file from the source tree if names are identical.
30179     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
30180       ac_source=$srcdir/$ac_source
30181     fi
30182
30183     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
30184 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
30185
30186     if test ! -r "$ac_source"; then
30187       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
30188     fi
30189     rm -f "$ac_file"
30190
30191     # Try a relative symlink, then a hard link, then a copy.
30192     case $ac_source in
30193     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
30194         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
30195     esac
30196     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
30197       ln "$ac_source" "$ac_file" 2>/dev/null ||
30198       cp -p "$ac_source" "$ac_file" ||
30199       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
30200   fi
30201  ;;
30202   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30203 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
30204  ;;
30205   esac
30206
30207
30208   case $ac_file$ac_mode in
30209     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30210   # Older Autoconf quotes --file arguments for eval, but not when files
30211   # are listed without --file.  Let's play safe and only enable the eval
30212   # if we detect the quoting.
30213   # TODO: see whether this extra hack can be removed once we start
30214   # requiring Autoconf 2.70 or later.
30215   case $CONFIG_FILES in #(
30216   *\'*) :
30217     eval set x "$CONFIG_FILES" ;; #(
30218   *) :
30219     set x $CONFIG_FILES ;; #(
30220   *) :
30221      ;;
30222 esac
30223   shift
30224   # Used to flag and report bootstrapping failures.
30225   am_rc=0
30226   for am_mf
30227   do
30228     # Strip MF so we end up with the name of the file.
30229     am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
30230     # Check whether this is an Automake generated Makefile which includes
30231     # dependency-tracking related rules and includes.
30232     # Grep'ing the whole file directly is not great: AIX grep has a line
30233     # limit of 2048, but all sed's we know have understand at least 4000.
30234     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
30235       || continue
30236     am_dirpart=`$as_dirname -- "$am_mf" ||
30237 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30238          X"$am_mf" : 'X\(//\)[^/]' \| \
30239          X"$am_mf" : 'X\(//\)$' \| \
30240          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
30241 printf "%s\n" X"$am_mf" |
30242     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30243             s//\1/
30244             q
30245           }
30246           /^X\(\/\/\)[^/].*/{
30247             s//\1/
30248             q
30249           }
30250           /^X\(\/\/\)$/{
30251             s//\1/
30252             q
30253           }
30254           /^X\(\/\).*/{
30255             s//\1/
30256             q
30257           }
30258           s/.*/./; q'`
30259     am_filepart=`$as_basename -- "$am_mf" ||
30260 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
30261          X"$am_mf" : 'X\(//\)$' \| \
30262          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
30263 printf "%s\n" X/"$am_mf" |
30264     sed '/^.*\/\([^/][^/]*\)\/*$/{
30265             s//\1/
30266             q
30267           }
30268           /^X\/\(\/\/\)$/{
30269             s//\1/
30270             q
30271           }
30272           /^X\/\(\/\).*/{
30273             s//\1/
30274             q
30275           }
30276           s/.*/./; q'`
30277     { echo "$as_me:$LINENO: cd "$am_dirpart" \
30278       && sed -e '/# am--include-marker/d' "$am_filepart" \
30279         | $MAKE -f - am--depfiles" >&5
30280    (cd "$am_dirpart" \
30281       && sed -e '/# am--include-marker/d' "$am_filepart" \
30282         | $MAKE -f - am--depfiles) >&5 2>&5
30283    ac_status=$?
30284    echo "$as_me:$LINENO: \$? = $ac_status" >&5
30285    (exit $ac_status); } || am_rc=$?
30286   done
30287   if test $am_rc -ne 0; then
30288     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30289 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
30290 as_fn_error $? "Something went wrong bootstrapping makefile fragments
30291     for automatic dependency tracking.  Try re-running configure with the
30292     '--disable-dependency-tracking' option to at least be able to build
30293     the package (albeit without support for automatic dependency tracking).
30294 See \`config.log' for more details" "$LINENO" 5; }
30295   fi
30296   { am_dirpart=; unset am_dirpart;}
30297   { am_filepart=; unset am_filepart;}
30298   { am_mf=; unset am_mf;}
30299   { am_rc=; unset am_rc;}
30300   rm -f conftest-deps.mk
30301 }
30302  ;;
30303
30304   esac
30305 done # for ac_tag
30306
30307
30308 as_fn_exit 0
30309 _ACEOF
30310 ac_clean_files=$ac_clean_files_save
30311
30312 test $ac_write_fail = 0 ||
30313   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30314
30315
30316 # configure is writing to config.log, and then calls config.status.
30317 # config.status does its own redirection, appending to config.log.
30318 # Unfortunately, on DOS this fails, as config.log is still kept open
30319 # by configure, so config.status won't be able to write to it; its
30320 # output is simply discarded.  So we exec the FD to /dev/null,
30321 # effectively closing config.log, so it can be properly (re)opened and
30322 # appended to by config.status.  When coming back to configure, we
30323 # need to make the FD available again.
30324 if test "$no_create" != yes; then
30325   ac_cs_success=:
30326   ac_config_status_args=
30327   test "$silent" = yes &&
30328     ac_config_status_args="$ac_config_status_args --quiet"
30329   exec 5>/dev/null
30330   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30331   exec 5>>config.log
30332   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30333   # would make configure fail if this is the last instruction.
30334   $ac_cs_success || as_fn_exit 1
30335 fi
30336 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30337   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30338 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30339 fi
30340