New upstream version 1.9
[debian/gzip] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.193-8974 for gzip 1.9.
4 #
5 # Report bugs to <bug-gzip@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2017 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.9'
569 PACKAGE_STRING='gzip 1.9'
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_c_list=
600 gl_use_threads_default=
601 ac_func_c_list=
602 gl_getopt_required=POSIX
603 ac_subst_vars='gltests_LTLIBOBJS
604 gltests_LIBOBJS
605 gl_LTLIBOBJS
606 gl_LIBOBJS
607 CONFIG_INCLUDE
608 am__EXEEXT_FALSE
609 am__EXEEXT_TRUE
610 LTLIBOBJS
611 ASFLAGS_config
612 LIBOBJS
613 ASCPPFLAGS
614 ASCPPPOST
615 GNULIB_WARN_CFLAGS
616 WARN_CFLAGS
617 WERROR_CFLAGS
618 LIBGZIP_LTLIBDEPS
619 LIBGZIP_LIBDEPS
620 gltests_WITNESS
621 HAVE_CRTDEFS_H
622 HAVE_WINT_T
623 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
624 NEXT_WCHAR_H
625 REPLACE_WCSFTIME
626 REPLACE_WCSWIDTH
627 REPLACE_WCWIDTH
628 REPLACE_WCSNRTOMBS
629 REPLACE_WCSRTOMBS
630 REPLACE_WCRTOMB
631 REPLACE_MBSNRTOWCS
632 REPLACE_MBSRTOWCS
633 REPLACE_MBRLEN
634 REPLACE_MBRTOWC
635 REPLACE_MBSINIT
636 REPLACE_WCTOB
637 REPLACE_BTOWC
638 REPLACE_MBSTATE_T
639 HAVE_DECL_WCWIDTH
640 HAVE_DECL_WCTOB
641 HAVE_WCSFTIME
642 HAVE_WCSWIDTH
643 HAVE_WCSTOK
644 HAVE_WCSSTR
645 HAVE_WCSPBRK
646 HAVE_WCSSPN
647 HAVE_WCSCSPN
648 HAVE_WCSRCHR
649 HAVE_WCSCHR
650 HAVE_WCSDUP
651 HAVE_WCSXFRM
652 HAVE_WCSCOLL
653 HAVE_WCSNCASECMP
654 HAVE_WCSCASECMP
655 HAVE_WCSNCMP
656 HAVE_WCSCMP
657 HAVE_WCSNCAT
658 HAVE_WCSCAT
659 HAVE_WCPNCPY
660 HAVE_WCSNCPY
661 HAVE_WCPCPY
662 HAVE_WCSCPY
663 HAVE_WCSNLEN
664 HAVE_WCSLEN
665 HAVE_WMEMSET
666 HAVE_WMEMMOVE
667 HAVE_WMEMCPY
668 HAVE_WMEMCMP
669 HAVE_WMEMCHR
670 HAVE_WCSNRTOMBS
671 HAVE_WCSRTOMBS
672 HAVE_WCRTOMB
673 HAVE_MBSNRTOWCS
674 HAVE_MBSRTOWCS
675 HAVE_MBRLEN
676 HAVE_MBRTOWC
677 HAVE_MBSINIT
678 HAVE_BTOWC
679 GNULIB_WCSFTIME
680 GNULIB_WCSWIDTH
681 GNULIB_WCSTOK
682 GNULIB_WCSSTR
683 GNULIB_WCSPBRK
684 GNULIB_WCSSPN
685 GNULIB_WCSCSPN
686 GNULIB_WCSRCHR
687 GNULIB_WCSCHR
688 GNULIB_WCSDUP
689 GNULIB_WCSXFRM
690 GNULIB_WCSCOLL
691 GNULIB_WCSNCASECMP
692 GNULIB_WCSCASECMP
693 GNULIB_WCSNCMP
694 GNULIB_WCSCMP
695 GNULIB_WCSNCAT
696 GNULIB_WCSCAT
697 GNULIB_WCPNCPY
698 GNULIB_WCSNCPY
699 GNULIB_WCPCPY
700 GNULIB_WCSCPY
701 GNULIB_WCSNLEN
702 GNULIB_WCSLEN
703 GNULIB_WMEMSET
704 GNULIB_WMEMMOVE
705 GNULIB_WMEMCPY
706 GNULIB_WMEMCMP
707 GNULIB_WMEMCHR
708 GNULIB_WCWIDTH
709 GNULIB_WCSNRTOMBS
710 GNULIB_WCSRTOMBS
711 GNULIB_WCRTOMB
712 GNULIB_MBSNRTOWCS
713 GNULIB_MBSRTOWCS
714 GNULIB_MBRLEN
715 GNULIB_MBRTOWC
716 GNULIB_MBSINIT
717 GNULIB_WCTOB
718 GNULIB_BTOWC
719 GL_GENERATE_UTIME_H_FALSE
720 GL_GENERATE_UTIME_H_TRUE
721 UTIME_H
722 HAVE_UTIME_H
723 NEXT_AS_FIRST_DIRECTIVE_UTIME_H
724 NEXT_UTIME_H
725 REPLACE_UTIME
726 HAVE_UTIME
727 GNULIB_UTIME
728 HAVE_UNISTD_H
729 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
730 NEXT_UNISTD_H
731 UNISTD_H_DEFINES_STRUCT_TIMESPEC
732 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
733 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
734 TIME_H_DEFINES_STRUCT_TIMESPEC
735 NEXT_AS_FIRST_DIRECTIVE_TIME_H
736 NEXT_TIME_H
737 NEXT_AS_FIRST_DIRECTIVE_STRING_H
738 NEXT_STRING_H
739 GL_GENERATE_STDNORETURN_H_FALSE
740 GL_GENERATE_STDNORETURN_H_TRUE
741 STDNORETURN_H
742 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
743 NEXT_STDLIB_H
744 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
745 NEXT_STDIO_H
746 GL_GENERATE_STDINT_H_FALSE
747 GL_GENERATE_STDINT_H_TRUE
748 STDINT_H
749 HAVE_SYS_INTTYPES_H
750 HAVE_SYS_BITYPES_H
751 HAVE_C99_STDINT_H
752 WINT_T_SUFFIX
753 WCHAR_T_SUFFIX
754 SIG_ATOMIC_T_SUFFIX
755 SIZE_T_SUFFIX
756 PTRDIFF_T_SUFFIX
757 HAVE_SIGNED_WINT_T
758 HAVE_SIGNED_WCHAR_T
759 HAVE_SIGNED_SIG_ATOMIC_T
760 BITSIZEOF_WINT_T
761 BITSIZEOF_WCHAR_T
762 BITSIZEOF_SIG_ATOMIC_T
763 BITSIZEOF_SIZE_T
764 BITSIZEOF_PTRDIFF_T
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_STRSIGNAL
788 REPLACE_STRERROR_R
789 REPLACE_STRERROR
790 REPLACE_STRTOK_R
791 REPLACE_STRCASESTR
792 REPLACE_STRSTR
793 REPLACE_STRNLEN
794 REPLACE_STRNDUP
795 REPLACE_STRNCAT
796 REPLACE_STRDUP
797 REPLACE_STRCHRNUL
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_EXPLICIT_BZERO
822 HAVE_MBSLEN
823 GNULIB_STRVERSCMP
824 GNULIB_STRSIGNAL
825 GNULIB_STRERROR_R
826 GNULIB_STRERROR
827 GNULIB_MBSTOK_R
828 GNULIB_MBSSEP
829 GNULIB_MBSSPN
830 GNULIB_MBSPBRK
831 GNULIB_MBSCSPN
832 GNULIB_MBSCASESTR
833 GNULIB_MBSPCASECMP
834 GNULIB_MBSNCASECMP
835 GNULIB_MBSCASECMP
836 GNULIB_MBSSTR
837 GNULIB_MBSRCHR
838 GNULIB_MBSCHR
839 GNULIB_MBSNLEN
840 GNULIB_MBSLEN
841 GNULIB_STRTOK_R
842 GNULIB_STRCASESTR
843 GNULIB_STRSTR
844 GNULIB_STRSEP
845 GNULIB_STRPBRK
846 GNULIB_STRNLEN
847 GNULIB_STRNDUP
848 GNULIB_STRNCAT
849 GNULIB_STRDUP
850 GNULIB_STRCHRNUL
851 GNULIB_STPNCPY
852 GNULIB_STPCPY
853 GNULIB_RAWMEMCHR
854 GNULIB_MEMRCHR
855 GNULIB_MEMPCPY
856 GNULIB_MEMMEM
857 GNULIB_MEMCHR
858 GNULIB_FFSLL
859 GNULIB_FFSL
860 GNULIB_EXPLICIT_BZERO
861 NEXT_AS_FIRST_DIRECTIVE_MATH_H
862 NEXT_MATH_H
863 SED
864 LTLIBMULTITHREAD
865 LIBMULTITHREAD
866 LTLIBTHREAD
867 LIBTHREAD
868 LIBPTH_PREFIX
869 LTLIBPTH
870 LIBPTH
871 GL_GENERATE_LIMITS_H_FALSE
872 GL_GENERATE_LIMITS_H_TRUE
873 LIMITS_H
874 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
875 NEXT_LIMITS_H
876 IGNORE_UNUSED_LIBRARIES_CFLAGS
877 HOST_CPU_C_ABI
878 HOST_CPU
879 GNU_MAKE_FALSE
880 GNU_MAKE_TRUE
881 REPLACE_LOCALTIME
882 REPLACE_GMTIME
883 REPLACE_TZSET
884 REPLACE_TIMEGM
885 REPLACE_STRFTIME
886 REPLACE_NANOSLEEP
887 REPLACE_MKTIME
888 REPLACE_LOCALTIME_R
889 REPLACE_CTIME
890 HAVE_TIMEZONE_T
891 HAVE_TZSET
892 HAVE_TIMEGM
893 HAVE_STRPTIME
894 HAVE_NANOSLEEP
895 HAVE_DECL_LOCALTIME_R
896 GNULIB_TZSET
897 GNULIB_TIME_RZ
898 GNULIB_TIME_R
899 GNULIB_TIMEGM
900 GNULIB_STRPTIME
901 GNULIB_STRFTIME
902 GNULIB_NANOSLEEP
903 GNULIB_LOCALTIME
904 GNULIB_MKTIME
905 GNULIB_CTIME
906 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
907 NEXT_SYS_TIME_H
908 REPLACE_STRUCT_TIMEVAL
909 REPLACE_GETTIMEOFDAY
910 HAVE_SYS_TIME_H
911 HAVE_STRUCT_TIMEVAL
912 HAVE_GETTIMEOFDAY
913 GNULIB_GETTIMEOFDAY
914 LTLIBINTL
915 LIBINTL
916 GNULIB_GL_UNISTD_H_GETOPT
917 GETOPT_CDEFS_H
918 GETOPT_H
919 HAVE_SYS_CDEFS_H
920 HAVE_GETOPT_H
921 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
922 NEXT_GETOPT_H
923 WINDOWS_64_BIT_ST_SIZE
924 WINDOWS_STAT_TIMESPEC
925 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
926 NEXT_SYS_STAT_H
927 REPLACE_UTIMENSAT
928 REPLACE_STAT
929 REPLACE_MKNOD
930 REPLACE_MKFIFO
931 REPLACE_MKDIR
932 REPLACE_LSTAT
933 REPLACE_FUTIMENS
934 REPLACE_FSTATAT
935 REPLACE_FSTAT
936 HAVE_UTIMENSAT
937 HAVE_MKNODAT
938 HAVE_MKNOD
939 HAVE_MKFIFOAT
940 HAVE_MKFIFO
941 HAVE_MKDIRAT
942 HAVE_LSTAT
943 HAVE_LCHMOD
944 HAVE_FUTIMENS
945 HAVE_FSTATAT
946 HAVE_FCHMODAT
947 GNULIB_OVERRIDES_STRUCT_STAT
948 GNULIB_UTIMENSAT
949 GNULIB_STAT
950 GNULIB_MKNODAT
951 GNULIB_MKNOD
952 GNULIB_MKFIFOAT
953 GNULIB_MKFIFO
954 GNULIB_MKDIRAT
955 GNULIB_LSTAT
956 GNULIB_LCHMOD
957 GNULIB_FUTIMENS
958 GNULIB_FSTATAT
959 GNULIB_FSTAT
960 GNULIB_FCHMODAT
961 WINDOWS_STAT_INODES
962 WINDOWS_64_BIT_OFF_T
963 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
964 NEXT_SYS_TYPES_H
965 REPLACE_TRUNCL
966 REPLACE_TRUNCF
967 REPLACE_TRUNC
968 REPLACE_TANHF
969 REPLACE_TANF
970 REPLACE_SQRTL
971 REPLACE_SQRTF
972 REPLACE_SINHF
973 REPLACE_SINF
974 REPLACE_SIGNBIT_USING_GCC
975 REPLACE_SIGNBIT
976 REPLACE_ROUNDL
977 REPLACE_ROUNDF
978 REPLACE_ROUND
979 REPLACE_REMAINDERL
980 REPLACE_REMAINDERF
981 REPLACE_REMAINDER
982 REPLACE_NAN
983 REPLACE_MODFL
984 REPLACE_MODFF
985 REPLACE_MODF
986 REPLACE_LOGBL
987 REPLACE_LOGBF
988 REPLACE_LOGB
989 REPLACE_LOG2L
990 REPLACE_LOG2F
991 REPLACE_LOG2
992 REPLACE_LOG1PL
993 REPLACE_LOG1PF
994 REPLACE_LOG1P
995 REPLACE_LOG10L
996 REPLACE_LOG10F
997 REPLACE_LOG10
998 REPLACE_LOGL
999 REPLACE_LOGF
1000 REPLACE_LOG
1001 REPLACE_LDEXPL
1002 REPLACE_ISNAN
1003 REPLACE_ISINF
1004 REPLACE_ISFINITE
1005 REPLACE_ILOGBL
1006 REPLACE_ILOGBF
1007 REPLACE_ILOGB
1008 REPLACE_HYPOTL
1009 REPLACE_HYPOTF
1010 REPLACE_HYPOT
1011 REPLACE_HUGE_VAL
1012 REPLACE_FREXPL
1013 REPLACE_FREXP
1014 REPLACE_FREXPF
1015 REPLACE_FMODL
1016 REPLACE_FMODF
1017 REPLACE_FMOD
1018 REPLACE_FMAL
1019 REPLACE_FMAF
1020 REPLACE_FMA
1021 REPLACE_FLOORL
1022 REPLACE_FLOORF
1023 REPLACE_FLOOR
1024 REPLACE_FABSL
1025 REPLACE_EXP2L
1026 REPLACE_EXP2
1027 REPLACE_EXPM1F
1028 REPLACE_EXPM1
1029 REPLACE_EXPF
1030 REPLACE_COSHF
1031 REPLACE_COSF
1032 REPLACE_CEILL
1033 REPLACE_CEILF
1034 REPLACE_CEIL
1035 REPLACE_CBRTL
1036 REPLACE_CBRTF
1037 REPLACE_ATAN2F
1038 REPLACE_ATANF
1039 REPLACE_ASINF
1040 REPLACE_ACOSF
1041 HAVE_DECL_TRUNCL
1042 HAVE_DECL_TRUNCF
1043 HAVE_DECL_TRUNC
1044 HAVE_DECL_TANL
1045 HAVE_DECL_SQRTL
1046 HAVE_DECL_SINL
1047 HAVE_DECL_ROUNDL
1048 HAVE_DECL_ROUNDF
1049 HAVE_DECL_ROUND
1050 HAVE_DECL_RINTF
1051 HAVE_DECL_REMAINDERL
1052 HAVE_DECL_REMAINDER
1053 HAVE_DECL_LOGB
1054 HAVE_DECL_LOG2L
1055 HAVE_DECL_LOG2F
1056 HAVE_DECL_LOG2
1057 HAVE_DECL_LOG10L
1058 HAVE_DECL_LOGL
1059 HAVE_DECL_LDEXPL
1060 HAVE_DECL_FREXPL
1061 HAVE_DECL_FLOORL
1062 HAVE_DECL_FLOORF
1063 HAVE_DECL_EXPM1L
1064 HAVE_DECL_EXP2L
1065 HAVE_DECL_EXP2F
1066 HAVE_DECL_EXP2
1067 HAVE_DECL_EXPL
1068 HAVE_DECL_COSL
1069 HAVE_DECL_COPYSIGNF
1070 HAVE_DECL_CEILL
1071 HAVE_DECL_CEILF
1072 HAVE_DECL_CBRTL
1073 HAVE_DECL_CBRTF
1074 HAVE_DECL_ATANL
1075 HAVE_DECL_ASINL
1076 HAVE_DECL_ACOSL
1077 HAVE_TANHF
1078 HAVE_TANL
1079 HAVE_TANF
1080 HAVE_SQRTL
1081 HAVE_SQRTF
1082 HAVE_SINHF
1083 HAVE_SINL
1084 HAVE_SINF
1085 HAVE_RINTL
1086 HAVE_RINT
1087 HAVE_REMAINDERF
1088 HAVE_REMAINDER
1089 HAVE_POWF
1090 HAVE_MODFL
1091 HAVE_MODFF
1092 HAVE_LOGBL
1093 HAVE_LOGBF
1094 HAVE_LOG1PL
1095 HAVE_LOG1PF
1096 HAVE_LOG1P
1097 HAVE_LOG10L
1098 HAVE_LOG10F
1099 HAVE_LOGL
1100 HAVE_LOGF
1101 HAVE_LDEXPF
1102 HAVE_ISNANL
1103 HAVE_ISNAND
1104 HAVE_ISNANF
1105 HAVE_ILOGBL
1106 HAVE_ILOGBF
1107 HAVE_ILOGB
1108 HAVE_HYPOTL
1109 HAVE_HYPOTF
1110 HAVE_FREXPF
1111 HAVE_FMODL
1112 HAVE_FMODF
1113 HAVE_FMAL
1114 HAVE_FMAF
1115 HAVE_FMA
1116 HAVE_FABSL
1117 HAVE_FABSF
1118 HAVE_EXPM1F
1119 HAVE_EXPM1
1120 HAVE_EXPL
1121 HAVE_EXPF
1122 HAVE_COSHF
1123 HAVE_COSL
1124 HAVE_COSF
1125 HAVE_COPYSIGNL
1126 HAVE_COPYSIGN
1127 HAVE_CBRTL
1128 HAVE_CBRTF
1129 HAVE_CBRT
1130 HAVE_ATAN2F
1131 HAVE_ATANL
1132 HAVE_ATANF
1133 HAVE_ASINL
1134 HAVE_ASINF
1135 HAVE_ACOSL
1136 HAVE_ACOSF
1137 GNULIB_TRUNCL
1138 GNULIB_TRUNCF
1139 GNULIB_TRUNC
1140 GNULIB_TANHF
1141 GNULIB_TANL
1142 GNULIB_TANF
1143 GNULIB_SQRTL
1144 GNULIB_SQRTF
1145 GNULIB_SINHF
1146 GNULIB_SINL
1147 GNULIB_SINF
1148 GNULIB_SIGNBIT
1149 GNULIB_ROUNDL
1150 GNULIB_ROUNDF
1151 GNULIB_ROUND
1152 GNULIB_RINTL
1153 GNULIB_RINTF
1154 GNULIB_RINT
1155 GNULIB_REMAINDERL
1156 GNULIB_REMAINDERF
1157 GNULIB_REMAINDER
1158 GNULIB_POWF
1159 GNULIB_MODFL
1160 GNULIB_MODFF
1161 GNULIB_MODF
1162 GNULIB_LOGBL
1163 GNULIB_LOGBF
1164 GNULIB_LOGB
1165 GNULIB_LOG2L
1166 GNULIB_LOG2F
1167 GNULIB_LOG2
1168 GNULIB_LOG1PL
1169 GNULIB_LOG1PF
1170 GNULIB_LOG1P
1171 GNULIB_LOG10L
1172 GNULIB_LOG10F
1173 GNULIB_LOG10
1174 GNULIB_LOGL
1175 GNULIB_LOGF
1176 GNULIB_LOG
1177 GNULIB_LDEXPL
1178 GNULIB_LDEXPF
1179 GNULIB_ISNANL
1180 GNULIB_ISNAND
1181 GNULIB_ISNANF
1182 GNULIB_ISNAN
1183 GNULIB_ISINF
1184 GNULIB_ISFINITE
1185 GNULIB_ILOGBL
1186 GNULIB_ILOGBF
1187 GNULIB_ILOGB
1188 GNULIB_HYPOTL
1189 GNULIB_HYPOTF
1190 GNULIB_HYPOT
1191 GNULIB_FREXPL
1192 GNULIB_FREXP
1193 GNULIB_FREXPF
1194 GNULIB_FMODL
1195 GNULIB_FMODF
1196 GNULIB_FMOD
1197 GNULIB_FMAL
1198 GNULIB_FMAF
1199 GNULIB_FMA
1200 GNULIB_FLOORL
1201 GNULIB_FLOORF
1202 GNULIB_FLOOR
1203 GNULIB_FABSL
1204 GNULIB_FABSF
1205 GNULIB_EXPM1L
1206 GNULIB_EXPM1F
1207 GNULIB_EXPM1
1208 GNULIB_EXP2L
1209 GNULIB_EXP2F
1210 GNULIB_EXP2
1211 GNULIB_EXPL
1212 GNULIB_EXPF
1213 GNULIB_COSHF
1214 GNULIB_COSL
1215 GNULIB_COSF
1216 GNULIB_COPYSIGNL
1217 GNULIB_COPYSIGNF
1218 GNULIB_COPYSIGN
1219 GNULIB_CEILL
1220 GNULIB_CEILF
1221 GNULIB_CEIL
1222 GNULIB_CBRTL
1223 GNULIB_CBRTF
1224 GNULIB_CBRT
1225 GNULIB_ATAN2F
1226 GNULIB_ATANL
1227 GNULIB_ATANF
1228 GNULIB_ASINL
1229 GNULIB_ASINF
1230 GNULIB_ACOSL
1231 GNULIB_ACOSF
1232 HAVE_FEATURES_H
1233 GNULIB_OVERRIDES_WINT_T
1234 APPLE_UNIVERSAL_BUILD
1235 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1236 REPLACE_ITOLD
1237 GL_GENERATE_FLOAT_H_FALSE
1238 GL_GENERATE_FLOAT_H_TRUE
1239 FLOAT_H
1240 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1241 NEXT_FLOAT_H
1242 LIB_FDATASYNC
1243 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1244 NEXT_FCNTL_H
1245 REPLACE_OPENAT
1246 REPLACE_OPEN
1247 REPLACE_FCNTL
1248 HAVE_OPENAT
1249 HAVE_FCNTL
1250 GNULIB_OPENAT
1251 GNULIB_OPEN
1252 GNULIB_NONBLOCKING
1253 GNULIB_FCNTL
1254 REPLACE_VSPRINTF
1255 REPLACE_VSNPRINTF
1256 REPLACE_VPRINTF
1257 REPLACE_VFPRINTF
1258 REPLACE_VDPRINTF
1259 REPLACE_VASPRINTF
1260 REPLACE_TMPFILE
1261 REPLACE_STDIO_WRITE_FUNCS
1262 REPLACE_STDIO_READ_FUNCS
1263 REPLACE_SPRINTF
1264 REPLACE_SNPRINTF
1265 REPLACE_RENAMEAT
1266 REPLACE_RENAME
1267 REPLACE_REMOVE
1268 REPLACE_PRINTF
1269 REPLACE_POPEN
1270 REPLACE_PERROR
1271 REPLACE_OBSTACK_PRINTF
1272 REPLACE_GETLINE
1273 REPLACE_GETDELIM
1274 REPLACE_FTELLO
1275 REPLACE_FTELL
1276 REPLACE_FSEEKO
1277 REPLACE_FSEEK
1278 REPLACE_FREOPEN
1279 REPLACE_FPURGE
1280 REPLACE_FPRINTF
1281 REPLACE_FOPEN
1282 REPLACE_FFLUSH
1283 REPLACE_FDOPEN
1284 REPLACE_FCLOSE
1285 REPLACE_DPRINTF
1286 HAVE_VDPRINTF
1287 HAVE_VASPRINTF
1288 HAVE_RENAMEAT
1289 HAVE_POPEN
1290 HAVE_PCLOSE
1291 HAVE_FTELLO
1292 HAVE_FSEEKO
1293 HAVE_DPRINTF
1294 HAVE_DECL_VSNPRINTF
1295 HAVE_DECL_SNPRINTF
1296 HAVE_DECL_OBSTACK_PRINTF
1297 HAVE_DECL_GETLINE
1298 HAVE_DECL_GETDELIM
1299 HAVE_DECL_FTELLO
1300 HAVE_DECL_FSEEKO
1301 HAVE_DECL_FPURGE
1302 GNULIB_VSPRINTF_POSIX
1303 GNULIB_VSNPRINTF
1304 GNULIB_VPRINTF_POSIX
1305 GNULIB_VPRINTF
1306 GNULIB_VFPRINTF_POSIX
1307 GNULIB_VFPRINTF
1308 GNULIB_VDPRINTF
1309 GNULIB_VSCANF
1310 GNULIB_VFSCANF
1311 GNULIB_VASPRINTF
1312 GNULIB_TMPFILE
1313 GNULIB_STDIO_H_SIGPIPE
1314 GNULIB_STDIO_H_NONBLOCKING
1315 GNULIB_SPRINTF_POSIX
1316 GNULIB_SNPRINTF
1317 GNULIB_SCANF
1318 GNULIB_RENAMEAT
1319 GNULIB_RENAME
1320 GNULIB_REMOVE
1321 GNULIB_PUTS
1322 GNULIB_PUTCHAR
1323 GNULIB_PUTC
1324 GNULIB_PRINTF_POSIX
1325 GNULIB_PRINTF
1326 GNULIB_POPEN
1327 GNULIB_PERROR
1328 GNULIB_PCLOSE
1329 GNULIB_OBSTACK_PRINTF_POSIX
1330 GNULIB_OBSTACK_PRINTF
1331 GNULIB_GETLINE
1332 GNULIB_GETDELIM
1333 GNULIB_GETCHAR
1334 GNULIB_GETC
1335 GNULIB_FWRITE
1336 GNULIB_FTELLO
1337 GNULIB_FTELL
1338 GNULIB_FSEEKO
1339 GNULIB_FSEEK
1340 GNULIB_FSCANF
1341 GNULIB_FREOPEN
1342 GNULIB_FREAD
1343 GNULIB_FPUTS
1344 GNULIB_FPUTC
1345 GNULIB_FPURGE
1346 GNULIB_FPRINTF_POSIX
1347 GNULIB_FPRINTF
1348 GNULIB_FOPEN
1349 GNULIB_FGETS
1350 GNULIB_FGETC
1351 GNULIB_FFLUSH
1352 GNULIB_FDOPEN
1353 GNULIB_FCLOSE
1354 GNULIB_DPRINTF
1355 EOVERFLOW_VALUE
1356 EOVERFLOW_HIDDEN
1357 ENOLINK_VALUE
1358 ENOLINK_HIDDEN
1359 EMULTIHOP_VALUE
1360 EMULTIHOP_HIDDEN
1361 GL_GENERATE_ERRNO_H_FALSE
1362 GL_GENERATE_ERRNO_H_TRUE
1363 ERRNO_H
1364 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1365 NEXT_ERRNO_H
1366 HAVE_DIRENT_H
1367 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1368 NEXT_DIRENT_H
1369 PRAGMA_COLUMNS
1370 PRAGMA_SYSTEM_HEADER
1371 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1372 INCLUDE_NEXT
1373 REPLACE_FDOPENDIR
1374 REPLACE_DIRFD
1375 REPLACE_CLOSEDIR
1376 REPLACE_OPENDIR
1377 HAVE_ALPHASORT
1378 HAVE_SCANDIR
1379 HAVE_FDOPENDIR
1380 HAVE_DECL_FDOPENDIR
1381 HAVE_DECL_DIRFD
1382 HAVE_CLOSEDIR
1383 HAVE_REWINDDIR
1384 HAVE_READDIR
1385 HAVE_OPENDIR
1386 GNULIB_ALPHASORT
1387 GNULIB_SCANDIR
1388 GNULIB_FDOPENDIR
1389 GNULIB_DIRFD
1390 GNULIB_CLOSEDIR
1391 GNULIB_REWINDDIR
1392 GNULIB_READDIR
1393 GNULIB_OPENDIR
1394 HAVE_WINSOCK2_H
1395 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1396 LIB_CLOCK_GETTIME
1397 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1398 UNISTD_H_HAVE_WINSOCK2_H
1399 REPLACE_WRITE
1400 REPLACE_USLEEP
1401 REPLACE_UNLINKAT
1402 REPLACE_UNLINK
1403 REPLACE_TTYNAME_R
1404 REPLACE_TRUNCATE
1405 REPLACE_SYMLINKAT
1406 REPLACE_SYMLINK
1407 REPLACE_SLEEP
1408 REPLACE_RMDIR
1409 REPLACE_READLINKAT
1410 REPLACE_READLINK
1411 REPLACE_READ
1412 REPLACE_PWRITE
1413 REPLACE_PREAD
1414 REPLACE_LSEEK
1415 REPLACE_LINKAT
1416 REPLACE_LINK
1417 REPLACE_LCHOWN
1418 REPLACE_ISATTY
1419 REPLACE_GETPAGESIZE
1420 REPLACE_GETGROUPS
1421 REPLACE_GETLOGIN_R
1422 REPLACE_GETDTABLESIZE
1423 REPLACE_GETDOMAINNAME
1424 REPLACE_GETCWD
1425 REPLACE_FTRUNCATE
1426 REPLACE_FCHOWNAT
1427 REPLACE_FACCESSAT
1428 REPLACE_DUP2
1429 REPLACE_DUP
1430 REPLACE_CLOSE
1431 REPLACE_CHOWN
1432 HAVE_SYS_PARAM_H
1433 HAVE_OS_H
1434 HAVE_DECL_TTYNAME_R
1435 HAVE_DECL_SETHOSTNAME
1436 HAVE_DECL_GETUSERSHELL
1437 HAVE_DECL_GETPAGESIZE
1438 HAVE_DECL_GETLOGIN_R
1439 HAVE_DECL_GETLOGIN
1440 HAVE_DECL_GETDOMAINNAME
1441 HAVE_DECL_FDATASYNC
1442 HAVE_DECL_FCHDIR
1443 HAVE_DECL_ENVIRON
1444 HAVE_USLEEP
1445 HAVE_UNLINKAT
1446 HAVE_TRUNCATE
1447 HAVE_SYMLINKAT
1448 HAVE_SYMLINK
1449 HAVE_SLEEP
1450 HAVE_SETHOSTNAME
1451 HAVE_READLINKAT
1452 HAVE_READLINK
1453 HAVE_PWRITE
1454 HAVE_PREAD
1455 HAVE_PIPE2
1456 HAVE_PIPE
1457 HAVE_LINKAT
1458 HAVE_LINK
1459 HAVE_LCHOWN
1460 HAVE_GROUP_MEMBER
1461 HAVE_GETPAGESIZE
1462 HAVE_GETLOGIN
1463 HAVE_GETHOSTNAME
1464 HAVE_GETGROUPS
1465 HAVE_GETDTABLESIZE
1466 HAVE_FTRUNCATE
1467 HAVE_FSYNC
1468 HAVE_FDATASYNC
1469 HAVE_FCHOWNAT
1470 HAVE_FCHDIR
1471 HAVE_FACCESSAT
1472 HAVE_EUIDACCESS
1473 HAVE_DUP3
1474 HAVE_DUP2
1475 HAVE_CHOWN
1476 GNULIB_WRITE
1477 GNULIB_USLEEP
1478 GNULIB_UNLINKAT
1479 GNULIB_UNLINK
1480 GNULIB_UNISTD_H_SIGPIPE
1481 GNULIB_UNISTD_H_NONBLOCKING
1482 GNULIB_TTYNAME_R
1483 GNULIB_TRUNCATE
1484 GNULIB_SYMLINKAT
1485 GNULIB_SYMLINK
1486 GNULIB_SLEEP
1487 GNULIB_SETHOSTNAME
1488 GNULIB_RMDIR
1489 GNULIB_READLINKAT
1490 GNULIB_READLINK
1491 GNULIB_READ
1492 GNULIB_PWRITE
1493 GNULIB_PREAD
1494 GNULIB_PIPE2
1495 GNULIB_PIPE
1496 GNULIB_LSEEK
1497 GNULIB_LINKAT
1498 GNULIB_LINK
1499 GNULIB_LCHOWN
1500 GNULIB_ISATTY
1501 GNULIB_GROUP_MEMBER
1502 GNULIB_GETUSERSHELL
1503 GNULIB_GETPAGESIZE
1504 GNULIB_GETLOGIN_R
1505 GNULIB_GETLOGIN
1506 GNULIB_GETHOSTNAME
1507 GNULIB_GETGROUPS
1508 GNULIB_GETDTABLESIZE
1509 GNULIB_GETDOMAINNAME
1510 GNULIB_GETCWD
1511 GNULIB_FTRUNCATE
1512 GNULIB_FSYNC
1513 GNULIB_FDATASYNC
1514 GNULIB_FCHOWNAT
1515 GNULIB_FCHDIR
1516 GNULIB_FACCESSAT
1517 GNULIB_EUIDACCESS
1518 GNULIB_ENVIRON
1519 GNULIB_DUP3
1520 GNULIB_DUP2
1521 GNULIB_DUP
1522 GNULIB_CLOSE
1523 GNULIB_CHOWN
1524 GNULIB_CHDIR
1525 REPLACE_WCTOMB
1526 REPLACE_UNSETENV
1527 REPLACE_STRTOD
1528 REPLACE_SETENV
1529 REPLACE_REALPATH
1530 REPLACE_REALLOC
1531 REPLACE_RANDOM_R
1532 REPLACE_QSORT_R
1533 REPLACE_PUTENV
1534 REPLACE_PTSNAME_R
1535 REPLACE_PTSNAME
1536 REPLACE_MKSTEMP
1537 REPLACE_MBTOWC
1538 REPLACE_MALLOC
1539 REPLACE_CANONICALIZE_FILE_NAME
1540 REPLACE_CALLOC
1541 HAVE_DECL_UNSETENV
1542 HAVE_UNLOCKPT
1543 HAVE_SYS_LOADAVG_H
1544 HAVE_STRUCT_RANDOM_DATA
1545 HAVE_STRTOULL
1546 HAVE_STRTOLL
1547 HAVE_STRTOD
1548 HAVE_DECL_SETSTATE
1549 HAVE_DECL_SETENV
1550 HAVE_SETENV
1551 HAVE_SECURE_GETENV
1552 HAVE_RPMATCH
1553 HAVE_REALPATH
1554 HAVE_REALLOCARRAY
1555 HAVE_RANDOM_R
1556 HAVE_RANDOM_H
1557 HAVE_RANDOM
1558 HAVE_QSORT_R
1559 HAVE_PTSNAME_R
1560 HAVE_PTSNAME
1561 HAVE_POSIX_OPENPT
1562 HAVE_MKSTEMPS
1563 HAVE_MKSTEMP
1564 HAVE_MKOSTEMPS
1565 HAVE_MKOSTEMP
1566 HAVE_MKDTEMP
1567 HAVE_DECL_INITSTATE
1568 HAVE_GRANTPT
1569 HAVE_GETSUBOPT
1570 HAVE_DECL_GETLOADAVG
1571 HAVE_CANONICALIZE_FILE_NAME
1572 HAVE_ATOLL
1573 HAVE__EXIT
1574 GNULIB_WCTOMB
1575 GNULIB_UNSETENV
1576 GNULIB_UNLOCKPT
1577 GNULIB_SYSTEM_POSIX
1578 GNULIB_STRTOULL
1579 GNULIB_STRTOLL
1580 GNULIB_STRTOD
1581 GNULIB_SETENV
1582 GNULIB_SECURE_GETENV
1583 GNULIB_RPMATCH
1584 GNULIB_REALPATH
1585 GNULIB_REALLOC_POSIX
1586 GNULIB_REALLOCARRAY
1587 GNULIB_RANDOM_R
1588 GNULIB_RANDOM
1589 GNULIB_QSORT_R
1590 GNULIB_PUTENV
1591 GNULIB_PTSNAME_R
1592 GNULIB_PTSNAME
1593 GNULIB_POSIX_OPENPT
1594 GNULIB_MKSTEMPS
1595 GNULIB_MKSTEMP
1596 GNULIB_MKOSTEMPS
1597 GNULIB_MKOSTEMP
1598 GNULIB_MKDTEMP
1599 GNULIB_MBTOWC
1600 GNULIB_MALLOC_POSIX
1601 GNULIB_GRANTPT
1602 GNULIB_GETSUBOPT
1603 GNULIB_GETLOADAVG
1604 GNULIB_CANONICALIZE_FILE_NAME
1605 GNULIB_CALLOC_POSIX
1606 GNULIB_ATOLL
1607 GNULIB__EXIT
1608 GL_GENERATE_ALLOCA_H_FALSE
1609 GL_GENERATE_ALLOCA_H_TRUE
1610 ALLOCA_H
1611 ALLOCA
1612 GL_COND_LIBTOOL_FALSE
1613 GL_COND_LIBTOOL_TRUE
1614 host_os
1615 host_vendor
1616 host_cpu
1617 host
1618 build_os
1619 build_vendor
1620 build_cpu
1621 build
1622 ARFLAGS
1623 AR
1624 EGREP
1625 RANLIB
1626 LN_S
1627 NM
1628 GREP
1629 CPP
1630 am__fastdepCC_FALSE
1631 am__fastdepCC_TRUE
1632 CCDEPMODE
1633 am__nodep
1634 AMDEPBACKSLASH
1635 AMDEP_FALSE
1636 AMDEP_TRUE
1637 am__include
1638 DEPDIR
1639 OBJEXT
1640 EXEEXT
1641 ac_ct_CC
1642 CPPFLAGS
1643 LDFLAGS
1644 CFLAGS
1645 CC
1646 AM_BACKSLASH
1647 AM_DEFAULT_VERBOSITY
1648 AM_DEFAULT_V
1649 AM_V
1650 am__untar
1651 am__tar
1652 AMTAR
1653 am__leading_dot
1654 SET_MAKE
1655 AWK
1656 mkdir_p
1657 MKDIR_P
1658 INSTALL_STRIP_PROGRAM
1659 STRIP
1660 install_sh
1661 MAKEINFO
1662 AUTOHEADER
1663 AUTOMAKE
1664 AUTOCONF
1665 ACLOCAL
1666 VERSION
1667 PACKAGE
1668 CYGPATH_W
1669 am__isrc
1670 INSTALL_DATA
1671 INSTALL_SCRIPT
1672 INSTALL_PROGRAM
1673 target_alias
1674 host_alias
1675 build_alias
1676 LIBS
1677 ECHO_T
1678 ECHO_N
1679 ECHO_C
1680 DEFS
1681 mandir
1682 localedir
1683 libdir
1684 psdir
1685 pdfdir
1686 dvidir
1687 htmldir
1688 infodir
1689 docdir
1690 oldincludedir
1691 includedir
1692 runstatedir
1693 localstatedir
1694 sharedstatedir
1695 sysconfdir
1696 datadir
1697 datarootdir
1698 libexecdir
1699 sbindir
1700 bindir
1701 program_transform_name
1702 prefix
1703 exec_prefix
1704 PACKAGE_URL
1705 PACKAGE_BUGREPORT
1706 PACKAGE_STRING
1707 PACKAGE_VERSION
1708 PACKAGE_TARNAME
1709 PACKAGE_NAME
1710 PATH_SEPARATOR
1711 SHELL
1712 am__quote'
1713 ac_subst_files=''
1714 ac_user_opts='
1715 enable_option_checking
1716 enable_silent_rules
1717 enable_dependency_tracking
1718 enable_largefile
1719 enable_threads
1720 with_gnu_ld
1721 enable_rpath
1722 with_libpth_prefix
1723 enable_gcc_warnings
1724 '
1725       ac_precious_vars='build_alias
1726 host_alias
1727 target_alias
1728 CC
1729 CFLAGS
1730 LDFLAGS
1731 LIBS
1732 CPPFLAGS
1733 CPP'
1734
1735
1736 # Initialize some variables set by options.
1737 ac_init_help=
1738 ac_init_version=false
1739 ac_unrecognized_opts=
1740 ac_unrecognized_sep=
1741 # The variables have the same names as the options, with
1742 # dashes changed to underlines.
1743 cache_file=/dev/null
1744 exec_prefix=NONE
1745 no_create=
1746 no_recursion=
1747 prefix=NONE
1748 program_prefix=NONE
1749 program_suffix=NONE
1750 program_transform_name=s,x,x,
1751 silent=
1752 site=
1753 srcdir=
1754 verbose=
1755 x_includes=NONE
1756 x_libraries=NONE
1757
1758 # Installation directory options.
1759 # These are left unexpanded so users can "make install exec_prefix=/foo"
1760 # and all the variables that are supposed to be based on exec_prefix
1761 # by default will actually change.
1762 # Use braces instead of parens because sh, perl, etc. also accept them.
1763 # (The list follows the same order as the GNU Coding Standards.)
1764 bindir='${exec_prefix}/bin'
1765 sbindir='${exec_prefix}/sbin'
1766 libexecdir='${exec_prefix}/libexec'
1767 datarootdir='${prefix}/share'
1768 datadir='${datarootdir}'
1769 sysconfdir='${prefix}/etc'
1770 sharedstatedir='${prefix}/com'
1771 localstatedir='${prefix}/var'
1772 runstatedir='${localstatedir}/run'
1773 includedir='${prefix}/include'
1774 oldincludedir='/usr/include'
1775 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1776 infodir='${datarootdir}/info'
1777 htmldir='${docdir}'
1778 dvidir='${docdir}'
1779 pdfdir='${docdir}'
1780 psdir='${docdir}'
1781 libdir='${exec_prefix}/lib'
1782 localedir='${datarootdir}/locale'
1783 mandir='${datarootdir}/man'
1784
1785 ac_prev=
1786 ac_dashdash=
1787 for ac_option
1788 do
1789   # If the previous option needs an argument, assign it.
1790   if test -n "$ac_prev"; then
1791     eval $ac_prev=\$ac_option
1792     ac_prev=
1793     continue
1794   fi
1795
1796   case $ac_option in
1797   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1798   *=)   ac_optarg= ;;
1799   *)    ac_optarg=yes ;;
1800   esac
1801
1802   # Accept the important Cygnus configure options, so we can diagnose typos.
1803
1804   case $ac_dashdash$ac_option in
1805   --)
1806     ac_dashdash=yes ;;
1807
1808   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1809     ac_prev=bindir ;;
1810   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1811     bindir=$ac_optarg ;;
1812
1813   -build | --build | --buil | --bui | --bu)
1814     ac_prev=build_alias ;;
1815   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1816     build_alias=$ac_optarg ;;
1817
1818   -cache-file | --cache-file | --cache-fil | --cache-fi \
1819   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1820     ac_prev=cache_file ;;
1821   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1822   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1823     cache_file=$ac_optarg ;;
1824
1825   --config-cache | -C)
1826     cache_file=config.cache ;;
1827
1828   -datadir | --datadir | --datadi | --datad)
1829     ac_prev=datadir ;;
1830   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1831     datadir=$ac_optarg ;;
1832
1833   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1834   | --dataroo | --dataro | --datar)
1835     ac_prev=datarootdir ;;
1836   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1837   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1838     datarootdir=$ac_optarg ;;
1839
1840   -disable-* | --disable-*)
1841     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1842     # Reject names that are not valid shell variable names.
1843     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1844       as_fn_error $? "invalid feature name: \`$ac_useropt'"
1845     ac_useropt_orig=$ac_useropt
1846     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1847     case $ac_user_opts in
1848       *"
1849 "enable_$ac_useropt"
1850 "*) ;;
1851       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1852          ac_unrecognized_sep=', ';;
1853     esac
1854     eval enable_$ac_useropt=no ;;
1855
1856   -docdir | --docdir | --docdi | --doc | --do)
1857     ac_prev=docdir ;;
1858   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1859     docdir=$ac_optarg ;;
1860
1861   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1862     ac_prev=dvidir ;;
1863   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1864     dvidir=$ac_optarg ;;
1865
1866   -enable-* | --enable-*)
1867     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1868     # Reject names that are not valid shell variable names.
1869     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1870       as_fn_error $? "invalid feature name: \`$ac_useropt'"
1871     ac_useropt_orig=$ac_useropt
1872     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1873     case $ac_user_opts in
1874       *"
1875 "enable_$ac_useropt"
1876 "*) ;;
1877       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1878          ac_unrecognized_sep=', ';;
1879     esac
1880     eval enable_$ac_useropt=\$ac_optarg ;;
1881
1882   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1883   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1884   | --exec | --exe | --ex)
1885     ac_prev=exec_prefix ;;
1886   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1887   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1888   | --exec=* | --exe=* | --ex=*)
1889     exec_prefix=$ac_optarg ;;
1890
1891   -gas | --gas | --ga | --g)
1892     # Obsolete; use --with-gas.
1893     with_gas=yes ;;
1894
1895   -help | --help | --hel | --he | -h)
1896     ac_init_help=long ;;
1897   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1898     ac_init_help=recursive ;;
1899   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1900     ac_init_help=short ;;
1901
1902   -host | --host | --hos | --ho)
1903     ac_prev=host_alias ;;
1904   -host=* | --host=* | --hos=* | --ho=*)
1905     host_alias=$ac_optarg ;;
1906
1907   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1908     ac_prev=htmldir ;;
1909   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1910   | --ht=*)
1911     htmldir=$ac_optarg ;;
1912
1913   -includedir | --includedir | --includedi | --included | --include \
1914   | --includ | --inclu | --incl | --inc)
1915     ac_prev=includedir ;;
1916   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1917   | --includ=* | --inclu=* | --incl=* | --inc=*)
1918     includedir=$ac_optarg ;;
1919
1920   -infodir | --infodir | --infodi | --infod | --info | --inf)
1921     ac_prev=infodir ;;
1922   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1923     infodir=$ac_optarg ;;
1924
1925   -libdir | --libdir | --libdi | --libd)
1926     ac_prev=libdir ;;
1927   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1928     libdir=$ac_optarg ;;
1929
1930   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1931   | --libexe | --libex | --libe)
1932     ac_prev=libexecdir ;;
1933   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1934   | --libexe=* | --libex=* | --libe=*)
1935     libexecdir=$ac_optarg ;;
1936
1937   -localedir | --localedir | --localedi | --localed | --locale)
1938     ac_prev=localedir ;;
1939   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1940     localedir=$ac_optarg ;;
1941
1942   -localstatedir | --localstatedir | --localstatedi | --localstated \
1943   | --localstate | --localstat | --localsta | --localst | --locals)
1944     ac_prev=localstatedir ;;
1945   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1946   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1947     localstatedir=$ac_optarg ;;
1948
1949   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1950     ac_prev=mandir ;;
1951   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1952     mandir=$ac_optarg ;;
1953
1954   -nfp | --nfp | --nf)
1955     # Obsolete; use --without-fp.
1956     with_fp=no ;;
1957
1958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1959   | --no-cr | --no-c | -n)
1960     no_create=yes ;;
1961
1962   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1963   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1964     no_recursion=yes ;;
1965
1966   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1967   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1968   | --oldin | --oldi | --old | --ol | --o)
1969     ac_prev=oldincludedir ;;
1970   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1971   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1972   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1973     oldincludedir=$ac_optarg ;;
1974
1975   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1976     ac_prev=prefix ;;
1977   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1978     prefix=$ac_optarg ;;
1979
1980   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1981   | --program-pre | --program-pr | --program-p)
1982     ac_prev=program_prefix ;;
1983   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1984   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1985     program_prefix=$ac_optarg ;;
1986
1987   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1988   | --program-suf | --program-su | --program-s)
1989     ac_prev=program_suffix ;;
1990   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1991   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1992     program_suffix=$ac_optarg ;;
1993
1994   -program-transform-name | --program-transform-name \
1995   | --program-transform-nam | --program-transform-na \
1996   | --program-transform-n | --program-transform- \
1997   | --program-transform | --program-transfor \
1998   | --program-transfo | --program-transf \
1999   | --program-trans | --program-tran \
2000   | --progr-tra | --program-tr | --program-t)
2001     ac_prev=program_transform_name ;;
2002   -program-transform-name=* | --program-transform-name=* \
2003   | --program-transform-nam=* | --program-transform-na=* \
2004   | --program-transform-n=* | --program-transform-=* \
2005   | --program-transform=* | --program-transfor=* \
2006   | --program-transfo=* | --program-transf=* \
2007   | --program-trans=* | --program-tran=* \
2008   | --progr-tra=* | --program-tr=* | --program-t=*)
2009     program_transform_name=$ac_optarg ;;
2010
2011   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2012     ac_prev=pdfdir ;;
2013   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2014     pdfdir=$ac_optarg ;;
2015
2016   -psdir | --psdir | --psdi | --psd | --ps)
2017     ac_prev=psdir ;;
2018   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2019     psdir=$ac_optarg ;;
2020
2021   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2022   | -silent | --silent | --silen | --sile | --sil)
2023     silent=yes ;;
2024
2025   -runstatedir | --runstatedir | --runstatedi | --runstated \
2026   | --runstate | --runstat | --runsta | --runst | --runs \
2027   | --run | --ru | --r)
2028     ac_prev=runstatedir ;;
2029   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2030   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2031   | --run=* | --ru=* | --r=*)
2032     runstatedir=$ac_optarg ;;
2033
2034   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2035     ac_prev=sbindir ;;
2036   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2037   | --sbi=* | --sb=*)
2038     sbindir=$ac_optarg ;;
2039
2040   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2041   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2042   | --sharedst | --shareds | --shared | --share | --shar \
2043   | --sha | --sh)
2044     ac_prev=sharedstatedir ;;
2045   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2046   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2047   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2048   | --sha=* | --sh=*)
2049     sharedstatedir=$ac_optarg ;;
2050
2051   -site | --site | --sit)
2052     ac_prev=site ;;
2053   -site=* | --site=* | --sit=*)
2054     site=$ac_optarg ;;
2055
2056   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2057     ac_prev=srcdir ;;
2058   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2059     srcdir=$ac_optarg ;;
2060
2061   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2062   | --syscon | --sysco | --sysc | --sys | --sy)
2063     ac_prev=sysconfdir ;;
2064   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2065   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2066     sysconfdir=$ac_optarg ;;
2067
2068   -target | --target | --targe | --targ | --tar | --ta | --t)
2069     ac_prev=target_alias ;;
2070   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2071     target_alias=$ac_optarg ;;
2072
2073   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2074     verbose=yes ;;
2075
2076   -version | --version | --versio | --versi | --vers | -V)
2077     ac_init_version=: ;;
2078
2079   -with-* | --with-*)
2080     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2081     # Reject names that are not valid shell variable names.
2082     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2083       as_fn_error $? "invalid package name: \`$ac_useropt'"
2084     ac_useropt_orig=$ac_useropt
2085     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2086     case $ac_user_opts in
2087       *"
2088 "with_$ac_useropt"
2089 "*) ;;
2090       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2091          ac_unrecognized_sep=', ';;
2092     esac
2093     eval with_$ac_useropt=\$ac_optarg ;;
2094
2095   -without-* | --without-*)
2096     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2097     # Reject names that are not valid shell variable names.
2098     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2099       as_fn_error $? "invalid package name: \`$ac_useropt'"
2100     ac_useropt_orig=$ac_useropt
2101     ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2102     case $ac_user_opts in
2103       *"
2104 "with_$ac_useropt"
2105 "*) ;;
2106       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2107          ac_unrecognized_sep=', ';;
2108     esac
2109     eval with_$ac_useropt=no ;;
2110
2111   --x)
2112     # Obsolete; use --with-x.
2113     with_x=yes ;;
2114
2115   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2116   | --x-incl | --x-inc | --x-in | --x-i)
2117     ac_prev=x_includes ;;
2118   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2119   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2120     x_includes=$ac_optarg ;;
2121
2122   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2123   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2124     ac_prev=x_libraries ;;
2125   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2126   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2127     x_libraries=$ac_optarg ;;
2128
2129   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2130 Try \`$0 --help' for more information"
2131     ;;
2132
2133   *=*)
2134     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2135     # Reject names that are not valid shell variable names.
2136     case $ac_envvar in #(
2137       '' | [0-9]* | *[!_$as_cr_alnum]* )
2138       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2139     esac
2140     eval $ac_envvar=\$ac_optarg
2141     export $ac_envvar ;;
2142
2143   *)
2144     # FIXME: should be removed in autoconf 3.0.
2145     printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2146     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2147       printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2148     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2149     ;;
2150
2151   esac
2152 done
2153
2154 if test -n "$ac_prev"; then
2155   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2156   as_fn_error $? "missing argument to $ac_option"
2157 fi
2158
2159 if test -n "$ac_unrecognized_opts"; then
2160   case $enable_option_checking in
2161     no) ;;
2162     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2163     *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2164   esac
2165 fi
2166
2167 # Check all directory arguments for consistency.
2168 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2169                 datadir sysconfdir sharedstatedir localstatedir includedir \
2170                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2171                 libdir localedir mandir runstatedir
2172 do
2173   eval ac_val=\$$ac_var
2174   # Remove trailing slashes.
2175   case $ac_val in
2176     */ )
2177       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2178       eval $ac_var=\$ac_val;;
2179   esac
2180   # Be sure to have absolute directory names.
2181   case $ac_val in
2182     [\\/$]* | ?:[\\/]* )  continue;;
2183     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2184   esac
2185   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2186 done
2187
2188 # There might be people who depend on the old broken behavior: `$host'
2189 # used to hold the argument of --host etc.
2190 # FIXME: To remove some day.
2191 build=$build_alias
2192 host=$host_alias
2193 target=$target_alias
2194
2195 # FIXME: To remove some day.
2196 if test "x$host_alias" != x; then
2197   if test "x$build_alias" = x; then
2198     cross_compiling=maybe
2199   elif test "x$build_alias" != "x$host_alias"; then
2200     cross_compiling=yes
2201   fi
2202 fi
2203
2204 ac_tool_prefix=
2205 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2206
2207 test "$silent" = yes && exec 6>/dev/null
2208
2209
2210 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2211 ac_ls_di=`ls -di .` &&
2212 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2213   as_fn_error $? "working directory cannot be determined"
2214 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2215   as_fn_error $? "pwd does not report name of working directory"
2216
2217
2218 # Find the source files, if location was not specified.
2219 if test -z "$srcdir"; then
2220   ac_srcdir_defaulted=yes
2221   # Try the directory containing this script, then the parent directory.
2222   ac_confdir=`$as_dirname -- "$as_myself" ||
2223 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2224          X"$as_myself" : 'X\(//\)[^/]' \| \
2225          X"$as_myself" : 'X\(//\)$' \| \
2226          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2227 printf "%s\n" X"$as_myself" |
2228     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2229             s//\1/
2230             q
2231           }
2232           /^X\(\/\/\)[^/].*/{
2233             s//\1/
2234             q
2235           }
2236           /^X\(\/\/\)$/{
2237             s//\1/
2238             q
2239           }
2240           /^X\(\/\).*/{
2241             s//\1/
2242             q
2243           }
2244           s/.*/./; q'`
2245   srcdir=$ac_confdir
2246   if test ! -r "$srcdir/$ac_unique_file"; then
2247     srcdir=..
2248   fi
2249 else
2250   ac_srcdir_defaulted=no
2251 fi
2252 if test ! -r "$srcdir/$ac_unique_file"; then
2253   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2254   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2255 fi
2256 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2257 ac_abs_confdir=`(
2258         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2259         pwd)`
2260 # When building in place, set srcdir=.
2261 if test "$ac_abs_confdir" = "$ac_pwd"; then
2262   srcdir=.
2263 fi
2264 # Remove unnecessary trailing slashes from srcdir.
2265 # Double slashes in file names in object file debugging info
2266 # mess up M-x gdb in Emacs.
2267 case $srcdir in
2268 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2269 esac
2270 for ac_var in $ac_precious_vars; do
2271   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2272   eval ac_env_${ac_var}_value=\$${ac_var}
2273   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2274   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2275 done
2276
2277 #
2278 # Report the --help message.
2279 #
2280 if test "$ac_init_help" = "long"; then
2281   # Omit some internal or obsolete options to make the list less imposing.
2282   # This message is too long to be a string in the A/UX 3.1 sh.
2283   cat <<_ACEOF
2284 \`configure' configures gzip 1.9 to adapt to many kinds of systems.
2285
2286 Usage: $0 [OPTION]... [VAR=VALUE]...
2287
2288 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2289 VAR=VALUE.  See below for descriptions of some of the useful variables.
2290
2291 Defaults for the options are specified in brackets.
2292
2293 Configuration:
2294   -h, --help              display this help and exit
2295       --help=short        display options specific to this package
2296       --help=recursive    display the short help of all the included packages
2297   -V, --version           display version information and exit
2298   -q, --quiet, --silent   do not print \`checking ...' messages
2299       --cache-file=FILE   cache test results in FILE [disabled]
2300   -C, --config-cache      alias for \`--cache-file=config.cache'
2301   -n, --no-create         do not create output files
2302       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2303
2304 Installation directories:
2305   --prefix=PREFIX         install architecture-independent files in PREFIX
2306                           [$ac_default_prefix]
2307   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2308                           [PREFIX]
2309
2310 By default, \`make install' will install all the files in
2311 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2312 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2313 for instance \`--prefix=\$HOME'.
2314
2315 For better control, use the options below.
2316
2317 Fine tuning of the installation directories:
2318   --bindir=DIR            user executables [EPREFIX/bin]
2319   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2320   --libexecdir=DIR        program executables [EPREFIX/libexec]
2321   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2322   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2323   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2324   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2325   --libdir=DIR            object code libraries [EPREFIX/lib]
2326   --includedir=DIR        C header files [PREFIX/include]
2327   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2328   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2329   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2330   --infodir=DIR           info documentation [DATAROOTDIR/info]
2331   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2332   --mandir=DIR            man documentation [DATAROOTDIR/man]
2333   --docdir=DIR            documentation root [DATAROOTDIR/doc/gzip]
2334   --htmldir=DIR           html documentation [DOCDIR]
2335   --dvidir=DIR            dvi documentation [DOCDIR]
2336   --pdfdir=DIR            pdf documentation [DOCDIR]
2337   --psdir=DIR             ps documentation [DOCDIR]
2338 _ACEOF
2339
2340   cat <<\_ACEOF
2341
2342 Program names:
2343   --program-prefix=PREFIX            prepend PREFIX to installed program names
2344   --program-suffix=SUFFIX            append SUFFIX to installed program names
2345   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2346
2347 System types:
2348   --build=BUILD     configure for building on BUILD [guessed]
2349   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2350 _ACEOF
2351 fi
2352
2353 if test -n "$ac_init_help"; then
2354   case $ac_init_help in
2355      short | recursive ) echo "Configuration of gzip 1.9:";;
2356    esac
2357   cat <<\_ACEOF
2358
2359 Optional Features:
2360   --disable-option-checking  ignore unrecognized --enable/--with options
2361   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2362   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2363   --enable-silent-rules   less verbose build output (undo: "make V=1")
2364   --disable-silent-rules  verbose build output (undo: "make V=0")
2365   --enable-dependency-tracking
2366                           do not reject slow dependency extractors
2367   --disable-dependency-tracking
2368                           speeds up one-time build
2369   --disable-largefile     omit support for large files
2370   --enable-threads={posix|solaris|pth|windows}
2371                           specify multithreading API
2372   --disable-threads       build without multithread safety
2373   --disable-rpath         do not hardcode runtime library paths
2374   --enable-gcc-warnings   turn on many GCC warnings (for developers; best with
2375                           GNU make)
2376
2377 Optional Packages:
2378   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2379   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2380   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2381   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2382   --without-libpth-prefix     don't search for libpth in includedir and libdir
2383
2384 Some influential environment variables:
2385   CC          C compiler command
2386   CFLAGS      C compiler flags
2387   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2388               nonstandard directory <lib dir>
2389   LIBS        libraries to pass to the linker, e.g. -l<library>
2390   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2391               you have headers in a nonstandard directory <include dir>
2392   CPP         C preprocessor
2393
2394 Use these variables to override the choices made by `configure' or to help
2395 it to find libraries and programs with nonstandard names/locations.
2396
2397 Report bugs to <bug-gzip@gnu.org>.
2398 _ACEOF
2399 ac_status=$?
2400 fi
2401
2402 if test "$ac_init_help" = "recursive"; then
2403   # If there are subdirs, report their specific --help.
2404   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2405     test -d "$ac_dir" ||
2406       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2407       continue
2408     ac_builddir=.
2409
2410 case "$ac_dir" in
2411 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2412 *)
2413   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2414   # A ".." for each directory in $ac_dir_suffix.
2415   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2416   case $ac_top_builddir_sub in
2417   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2418   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2419   esac ;;
2420 esac
2421 ac_abs_top_builddir=$ac_pwd
2422 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2423 # for backward compatibility:
2424 ac_top_builddir=$ac_top_build_prefix
2425
2426 case $srcdir in
2427   .)  # We are building in place.
2428     ac_srcdir=.
2429     ac_top_srcdir=$ac_top_builddir_sub
2430     ac_abs_top_srcdir=$ac_pwd ;;
2431   [\\/]* | ?:[\\/]* )  # Absolute name.
2432     ac_srcdir=$srcdir$ac_dir_suffix;
2433     ac_top_srcdir=$srcdir
2434     ac_abs_top_srcdir=$srcdir ;;
2435   *) # Relative name.
2436     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2437     ac_top_srcdir=$ac_top_build_prefix$srcdir
2438     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2439 esac
2440 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2441
2442     cd "$ac_dir" || { ac_status=$?; continue; }
2443     # Check for guested configure.
2444     if test -f "$ac_srcdir/configure.gnu"; then
2445       echo &&
2446       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2447     elif test -f "$ac_srcdir/configure"; then
2448       echo &&
2449       $SHELL "$ac_srcdir/configure" --help=recursive
2450     else
2451       printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2452     fi || ac_status=$?
2453     cd "$ac_pwd" || { ac_status=$?; break; }
2454   done
2455 fi
2456
2457 test -n "$ac_init_help" && exit $ac_status
2458 if $ac_init_version; then
2459   cat <<\_ACEOF
2460 gzip configure 1.9
2461 generated by GNU Autoconf 2.69.193-8974
2462
2463 Copyright (C) 2017 Free Software Foundation, Inc.
2464 This configure script is free software; the Free Software Foundation
2465 gives unlimited permission to copy, distribute and modify it.
2466 _ACEOF
2467   exit
2468 fi
2469
2470 ## ------------------------ ##
2471 ## Autoconf initialization. ##
2472 ## ------------------------ ##
2473
2474 # ac_fn_c_try_compile LINENO
2475 # --------------------------
2476 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2477 ac_fn_c_try_compile ()
2478 {
2479   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480   rm -f conftest.$ac_objext
2481   if { { ac_try="$ac_compile"
2482 case "(($ac_try" in
2483   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484   *) ac_try_echo=$ac_try;;
2485 esac
2486 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487 printf "%s\n" "$ac_try_echo"; } >&5
2488   (eval "$ac_compile") 2>conftest.err
2489   ac_status=$?
2490   if test -s conftest.err; then
2491     grep -v '^ *+' conftest.err >conftest.er1
2492     cat conftest.er1 >&5
2493     mv -f conftest.er1 conftest.err
2494   fi
2495   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496   test $ac_status = 0; } && {
2497          test -z "$ac_c_werror_flag" ||
2498          test ! -s conftest.err
2499        } && test -s conftest.$ac_objext
2500 then :
2501   ac_retval=0
2502 else
2503   printf "%s\n" "$as_me: failed program was:" >&5
2504 sed 's/^/| /' conftest.$ac_ext >&5
2505
2506         ac_retval=1
2507 fi
2508   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509   as_fn_set_status $ac_retval
2510
2511 } # ac_fn_c_try_compile
2512
2513 # ac_fn_c_try_cpp LINENO
2514 # ----------------------
2515 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2516 ac_fn_c_try_cpp ()
2517 {
2518   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519   if { { ac_try="$ac_cpp conftest.$ac_ext"
2520 case "(($ac_try" in
2521   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522   *) ac_try_echo=$ac_try;;
2523 esac
2524 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525 printf "%s\n" "$ac_try_echo"; } >&5
2526   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2527   ac_status=$?
2528   if test -s conftest.err; then
2529     grep -v '^ *+' conftest.err >conftest.er1
2530     cat conftest.er1 >&5
2531     mv -f conftest.er1 conftest.err
2532   fi
2533   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534   test $ac_status = 0; } > conftest.i && {
2535          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2536          test ! -s conftest.err
2537        }
2538 then :
2539   ac_retval=0
2540 else
2541   printf "%s\n" "$as_me: failed program was:" >&5
2542 sed 's/^/| /' conftest.$ac_ext >&5
2543
2544     ac_retval=1
2545 fi
2546   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2547   as_fn_set_status $ac_retval
2548
2549 } # ac_fn_c_try_cpp
2550
2551 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2552 # -------------------------------------------------------
2553 # Tests whether HEADER exists and can be compiled using the include files in
2554 # INCLUDES, setting the cache variable VAR accordingly.
2555 ac_fn_c_check_header_compile ()
2556 {
2557   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2559 printf %s "checking for $2... " >&6; }
2560 if eval test \${$3+y}
2561 then :
2562   printf %s "(cached) " >&6
2563 else
2564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2565 /* end confdefs.h.  */
2566 $4
2567 #include <$2>
2568 _ACEOF
2569 if ac_fn_c_try_compile "$LINENO"
2570 then :
2571   eval "$3=yes"
2572 else
2573   eval "$3=no"
2574 fi
2575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2576 fi
2577 eval ac_res=\$$3
2578                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2579 printf "%s\n" "$ac_res" >&6; }
2580   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2581
2582 } # ac_fn_c_check_header_compile
2583
2584 # ac_fn_c_try_link LINENO
2585 # -----------------------
2586 # Try to link conftest.$ac_ext, and return whether this succeeded.
2587 ac_fn_c_try_link ()
2588 {
2589   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590   rm -f conftest.$ac_objext conftest$ac_exeext
2591   if { { ac_try="$ac_link"
2592 case "(($ac_try" in
2593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2594   *) ac_try_echo=$ac_try;;
2595 esac
2596 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2597 printf "%s\n" "$ac_try_echo"; } >&5
2598   (eval "$ac_link") 2>conftest.err
2599   ac_status=$?
2600   if test -s conftest.err; then
2601     grep -v '^ *+' conftest.err >conftest.er1
2602     cat conftest.er1 >&5
2603     mv -f conftest.er1 conftest.err
2604   fi
2605   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2606   test $ac_status = 0; } && {
2607          test -z "$ac_c_werror_flag" ||
2608          test ! -s conftest.err
2609        } && test -s conftest$ac_exeext && {
2610          test "$cross_compiling" = yes ||
2611          test -x conftest$ac_exeext
2612        }
2613 then :
2614   ac_retval=0
2615 else
2616   printf "%s\n" "$as_me: failed program was:" >&5
2617 sed 's/^/| /' conftest.$ac_ext >&5
2618
2619         ac_retval=1
2620 fi
2621   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2622   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2623   # interfere with the next link command; also delete a directory that is
2624   # left behind by Apple's compiler.  We do this before executing the actions.
2625   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2626   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2627   as_fn_set_status $ac_retval
2628
2629 } # ac_fn_c_try_link
2630
2631 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2632 # -------------------------------------------
2633 # Tests whether TYPE exists after having included INCLUDES, setting cache
2634 # variable VAR accordingly.
2635 ac_fn_c_check_type ()
2636 {
2637   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2638   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2639 printf %s "checking for $2... " >&6; }
2640 if eval test \${$3+y}
2641 then :
2642   printf %s "(cached) " >&6
2643 else
2644   eval "$3=no"
2645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646 /* end confdefs.h.  */
2647 $4
2648 int
2649 main (void)
2650 {
2651 if (sizeof ($2))
2652          return 0;
2653   ;
2654   return 0;
2655 }
2656 _ACEOF
2657 if ac_fn_c_try_compile "$LINENO"
2658 then :
2659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660 /* end confdefs.h.  */
2661 $4
2662 int
2663 main (void)
2664 {
2665 if (sizeof (($2)))
2666             return 0;
2667   ;
2668   return 0;
2669 }
2670 _ACEOF
2671 if ac_fn_c_try_compile "$LINENO"
2672 then :
2673
2674 else
2675   eval "$3=yes"
2676 fi
2677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2678 fi
2679 rm -f core conftest.err conftest.$ac_objext 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_type
2687
2688 # ac_fn_c_check_func LINENO FUNC VAR
2689 # ----------------------------------
2690 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2691 ac_fn_c_check_func ()
2692 {
2693   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2694   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2695 printf %s "checking for $2... " >&6; }
2696 if eval test \${$3+y}
2697 then :
2698   printf %s "(cached) " >&6
2699 else
2700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2701 /* end confdefs.h.  */
2702 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2703    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2704 #define $2 innocuous_$2
2705
2706 /* System header to define __stub macros and hopefully few prototypes,
2707    which can conflict with char $2 (); below.  */
2708
2709 #include <limits.h>
2710 #undef $2
2711
2712 /* Override any GCC internal prototype to avoid an error.
2713    Use char because int might match the return type of a GCC
2714    builtin and then its argument prototype would still apply.  */
2715 #ifdef __cplusplus
2716 extern "C"
2717 #endif
2718 char $2 ();
2719 /* The GNU C library defines this for functions which it implements
2720     to always fail with ENOSYS.  Some functions are actually named
2721     something starting with __ and the normal name is an alias.  */
2722 #if defined __stub_$2 || defined __stub___$2
2723 choke me
2724 #endif
2725
2726 int
2727 main (void)
2728 {
2729 return $2 ();
2730   ;
2731   return 0;
2732 }
2733 _ACEOF
2734 if ac_fn_c_try_link "$LINENO"
2735 then :
2736   eval "$3=yes"
2737 else
2738   eval "$3=no"
2739 fi
2740 rm -f core conftest.err conftest.$ac_objext \
2741     conftest$ac_exeext conftest.$ac_ext
2742 fi
2743 eval ac_res=\$$3
2744                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2745 printf "%s\n" "$ac_res" >&6; }
2746   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2747
2748 } # ac_fn_c_check_func
2749
2750 # ac_fn_c_try_run LINENO
2751 # ----------------------
2752 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2753 # executables *can* be run.
2754 ac_fn_c_try_run ()
2755 {
2756   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757   if { { ac_try="$ac_link"
2758 case "(($ac_try" in
2759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2760   *) ac_try_echo=$ac_try;;
2761 esac
2762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2763 printf "%s\n" "$ac_try_echo"; } >&5
2764   (eval "$ac_link") 2>&5
2765   ac_status=$?
2766   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2767   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2768   { { case "(($ac_try" in
2769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2770   *) ac_try_echo=$ac_try;;
2771 esac
2772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2773 printf "%s\n" "$ac_try_echo"; } >&5
2774   (eval "$ac_try") 2>&5
2775   ac_status=$?
2776   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2777   test $ac_status = 0; }; }
2778 then :
2779   ac_retval=0
2780 else
2781   printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2782        printf "%s\n" "$as_me: failed program was:" >&5
2783 sed 's/^/| /' conftest.$ac_ext >&5
2784
2785        ac_retval=$ac_status
2786 fi
2787   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2788   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2789   as_fn_set_status $ac_retval
2790
2791 } # ac_fn_c_try_run
2792
2793 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2794 # ---------------------------------------------
2795 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2796 # accordingly.
2797 ac_fn_c_check_decl ()
2798 {
2799   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2800   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2801       as_decl_name=`echo $2|sed 's/ *(.*//'`
2802   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2803   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2804 printf %s "checking whether $as_decl_name is declared... " >&6; }
2805 if eval test \${$3+y}
2806 then :
2807   printf %s "(cached) " >&6
2808 else
2809   ac_save_werror_flag=$ac_c_werror_flag
2810   ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812 /* end confdefs.h.  */
2813 $4
2814 int
2815 main (void)
2816 {
2817 #ifndef $as_decl_name
2818 #ifdef __cplusplus
2819   (void) $as_decl_use;
2820 #else
2821   (void) $as_decl_name;
2822 #endif
2823 #endif
2824
2825   ;
2826   return 0;
2827 }
2828 _ACEOF
2829 if ac_fn_c_try_compile "$LINENO"
2830 then :
2831   eval "$3=yes"
2832 else
2833   eval "$3=no"
2834 fi
2835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2836 fi
2837 eval ac_res=\$$3
2838                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2839 printf "%s\n" "$ac_res" >&6; }
2840   ac_c_werror_flag=$ac_save_werror_flag
2841   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2842
2843 } # ac_fn_c_check_decl
2844
2845 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2846 # --------------------------------------------
2847 # Tries to find the compile-time value of EXPR in a program that includes
2848 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2849 # computed
2850 ac_fn_c_compute_int ()
2851 {
2852   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2853   if test "$cross_compiling" = yes; then
2854     # Depending upon the size, compute the lo and hi bounds.
2855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2856 /* end confdefs.h.  */
2857 $4
2858 int
2859 main (void)
2860 {
2861 static int test_array [1 - 2 * !(($2) >= 0)];
2862 test_array [0] = 0;
2863 return test_array [0];
2864
2865   ;
2866   return 0;
2867 }
2868 _ACEOF
2869 if ac_fn_c_try_compile "$LINENO"
2870 then :
2871   ac_lo=0 ac_mid=0
2872   while :; do
2873     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2874 /* end confdefs.h.  */
2875 $4
2876 int
2877 main (void)
2878 {
2879 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2880 test_array [0] = 0;
2881 return test_array [0];
2882
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 if ac_fn_c_try_compile "$LINENO"
2888 then :
2889   ac_hi=$ac_mid; break
2890 else
2891   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2892                         if test $ac_lo -le $ac_mid; then
2893                           ac_lo= ac_hi=
2894                           break
2895                         fi
2896                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2897 fi
2898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899   done
2900 else
2901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902 /* end confdefs.h.  */
2903 $4
2904 int
2905 main (void)
2906 {
2907 static int test_array [1 - 2 * !(($2) < 0)];
2908 test_array [0] = 0;
2909 return test_array [0];
2910
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 if ac_fn_c_try_compile "$LINENO"
2916 then :
2917   ac_hi=-1 ac_mid=-1
2918   while :; do
2919     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2920 /* end confdefs.h.  */
2921 $4
2922 int
2923 main (void)
2924 {
2925 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2926 test_array [0] = 0;
2927 return test_array [0];
2928
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 if ac_fn_c_try_compile "$LINENO"
2934 then :
2935   ac_lo=$ac_mid; break
2936 else
2937   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2938                         if test $ac_mid -le $ac_hi; then
2939                           ac_lo= ac_hi=
2940                           break
2941                         fi
2942                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2943 fi
2944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2945   done
2946 else
2947   ac_lo= ac_hi=
2948 fi
2949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2950 fi
2951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2952 # Binary search between lo and hi bounds.
2953 while test "x$ac_lo" != "x$ac_hi"; do
2954   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2956 /* end confdefs.h.  */
2957 $4
2958 int
2959 main (void)
2960 {
2961 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2962 test_array [0] = 0;
2963 return test_array [0];
2964
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 if ac_fn_c_try_compile "$LINENO"
2970 then :
2971   ac_hi=$ac_mid
2972 else
2973   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2974 fi
2975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2976 done
2977 case $ac_lo in #((
2978 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2979 '') ac_retval=1 ;;
2980 esac
2981   else
2982     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983 /* end confdefs.h.  */
2984 $4
2985 static long int longval () { return $2; }
2986 static unsigned long int ulongval () { return $2; }
2987 #include <stdio.h>
2988 #include <stdlib.h>
2989 int
2990 main (void)
2991 {
2992
2993   FILE *f = fopen ("conftest.val", "w");
2994   if (! f)
2995     return 1;
2996   if (($2) < 0)
2997     {
2998       long int i = longval ();
2999       if (i != ($2))
3000         return 1;
3001       fprintf (f, "%ld", i);
3002     }
3003   else
3004     {
3005       unsigned long int i = ulongval ();
3006       if (i != ($2))
3007         return 1;
3008       fprintf (f, "%lu", i);
3009     }
3010   /* Do not output a trailing newline, as this causes \r\n confusion
3011      on some platforms.  */
3012   return ferror (f) || fclose (f) != 0;
3013
3014   ;
3015   return 0;
3016 }
3017 _ACEOF
3018 if ac_fn_c_try_run "$LINENO"
3019 then :
3020   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3021 else
3022   ac_retval=1
3023 fi
3024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3025   conftest.$ac_objext conftest.beam conftest.$ac_ext
3026 rm -f conftest.val
3027
3028   fi
3029   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3030   as_fn_set_status $ac_retval
3031
3032 } # ac_fn_c_compute_int
3033
3034 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3035 # ----------------------------------------------------
3036 # Tries to find if the field MEMBER exists in type AGGR, after including
3037 # INCLUDES, setting cache variable VAR accordingly.
3038 ac_fn_c_check_member ()
3039 {
3040   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3041   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3042 printf %s "checking for $2.$3... " >&6; }
3043 if eval test \${$4+y}
3044 then :
3045   printf %s "(cached) " >&6
3046 else
3047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3048 /* end confdefs.h.  */
3049 $5
3050 int
3051 main (void)
3052 {
3053 static $2 ac_aggr;
3054 if (ac_aggr.$3)
3055 return 0;
3056   ;
3057   return 0;
3058 }
3059 _ACEOF
3060 if ac_fn_c_try_compile "$LINENO"
3061 then :
3062   eval "$4=yes"
3063 else
3064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3065 /* end confdefs.h.  */
3066 $5
3067 int
3068 main (void)
3069 {
3070 static $2 ac_aggr;
3071 if (sizeof ac_aggr.$3)
3072 return 0;
3073   ;
3074   return 0;
3075 }
3076 _ACEOF
3077 if ac_fn_c_try_compile "$LINENO"
3078 then :
3079   eval "$4=yes"
3080 else
3081   eval "$4=no"
3082 fi
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084 fi
3085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086 fi
3087 eval ac_res=\$$4
3088                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3089 printf "%s\n" "$ac_res" >&6; }
3090   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3091
3092 } # ac_fn_c_check_member
3093 cat >config.log <<_ACEOF
3094 This file contains any messages produced by compilers while
3095 running configure, to aid debugging if configure makes a mistake.
3096
3097 It was created by gzip $as_me 1.9, which was
3098 generated by GNU Autoconf 2.69.193-8974.  Invocation command line was
3099
3100   $ $0 $@
3101
3102 _ACEOF
3103 exec 5>>config.log
3104 {
3105 cat <<_ASUNAME
3106 ## --------- ##
3107 ## Platform. ##
3108 ## --------- ##
3109
3110 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3111 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3112 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3113 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3114 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3115
3116 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3117 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3118
3119 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3120 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3121 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3122 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3123 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3124 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3125 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3126
3127 _ASUNAME
3128
3129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3130 for as_dir in $PATH
3131 do
3132   IFS=$as_save_IFS
3133   case $as_dir in #(((
3134     '') as_dir=./ ;;
3135     */) ;;
3136     *) as_dir=$as_dir/ ;;
3137   esac
3138     printf "%s\n" "PATH: $as_dir"
3139   done
3140 IFS=$as_save_IFS
3141
3142 } >&5
3143
3144 cat >&5 <<_ACEOF
3145
3146
3147 ## ----------- ##
3148 ## Core tests. ##
3149 ## ----------- ##
3150
3151 _ACEOF
3152
3153
3154 # Keep a trace of the command line.
3155 # Strip out --no-create and --no-recursion so they do not pile up.
3156 # Strip out --silent because we don't want to record it for future runs.
3157 # Also quote any args containing shell meta-characters.
3158 # Make two passes to allow for proper duplicate-argument suppression.
3159 ac_configure_args=
3160 ac_configure_args0=
3161 ac_configure_args1=
3162 ac_must_keep_next=false
3163 for ac_pass in 1 2
3164 do
3165   for ac_arg
3166   do
3167     case $ac_arg in
3168     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3169     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3170     | -silent | --silent | --silen | --sile | --sil)
3171       continue ;;
3172     *\'*)
3173       ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3174     esac
3175     case $ac_pass in
3176     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3177     2)
3178       as_fn_append ac_configure_args1 " '$ac_arg'"
3179       if test $ac_must_keep_next = true; then
3180         ac_must_keep_next=false # Got value, back to normal.
3181       else
3182         case $ac_arg in
3183           *=* | --config-cache | -C | -disable-* | --disable-* \
3184           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3185           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3186           | -with-* | --with-* | -without-* | --without-* | --x)
3187             case "$ac_configure_args0 " in
3188               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3189             esac
3190             ;;
3191           -* ) ac_must_keep_next=true ;;
3192         esac
3193       fi
3194       as_fn_append ac_configure_args " '$ac_arg'"
3195       ;;
3196     esac
3197   done
3198 done
3199 { ac_configure_args0=; unset ac_configure_args0;}
3200 { ac_configure_args1=; unset ac_configure_args1;}
3201
3202 # When interrupted or exit'd, cleanup temporary files, and complete
3203 # config.log.  We remove comments because anyway the quotes in there
3204 # would cause problems or look ugly.
3205 # WARNING: Use '\'' to represent an apostrophe within the trap.
3206 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3207 trap 'exit_status=$?
3208   # Sanitize IFS.
3209   IFS=" ""      $as_nl"
3210   # Save into config.log some information that might help in debugging.
3211   {
3212     echo
3213
3214     printf "%s\n" "## ---------------- ##
3215 ## Cache variables. ##
3216 ## ---------------- ##"
3217     echo
3218     # The following way of writing the cache mishandles newlines in values,
3219 (
3220   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3221     eval ac_val=\$$ac_var
3222     case $ac_val in #(
3223     *${as_nl}*)
3224       case $ac_var in #(
3225       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3226 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3227       esac
3228       case $ac_var in #(
3229       _ | IFS | as_nl) ;; #(
3230       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3231       *) { eval $ac_var=; unset $ac_var;} ;;
3232       esac ;;
3233     esac
3234   done
3235   (set) 2>&1 |
3236     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3237     *${as_nl}ac_space=\ *)
3238       sed -n \
3239         "s/'\''/'\''\\\\'\'''\''/g;
3240           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3241       ;; #(
3242     *)
3243       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3244       ;;
3245     esac |
3246     sort
3247 )
3248     echo
3249
3250     printf "%s\n" "## ----------------- ##
3251 ## Output variables. ##
3252 ## ----------------- ##"
3253     echo
3254     for ac_var in $ac_subst_vars
3255     do
3256       eval ac_val=\$$ac_var
3257       case $ac_val in
3258       *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3259       esac
3260       printf "%s\n" "$ac_var='\''$ac_val'\''"
3261     done | sort
3262     echo
3263
3264     if test -n "$ac_subst_files"; then
3265       printf "%s\n" "## ------------------- ##
3266 ## File substitutions. ##
3267 ## ------------------- ##"
3268       echo
3269       for ac_var in $ac_subst_files
3270       do
3271         eval ac_val=\$$ac_var
3272         case $ac_val in
3273         *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3274         esac
3275         printf "%s\n" "$ac_var='\''$ac_val'\''"
3276       done | sort
3277       echo
3278     fi
3279
3280     if test -s confdefs.h; then
3281       printf "%s\n" "## ----------- ##
3282 ## confdefs.h. ##
3283 ## ----------- ##"
3284       echo
3285       cat confdefs.h
3286       echo
3287     fi
3288     test "$ac_signal" != 0 &&
3289       printf "%s\n" "$as_me: caught signal $ac_signal"
3290     printf "%s\n" "$as_me: exit $exit_status"
3291   } >&5
3292   rm -f core *.core core.conftest.* &&
3293     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3294     exit $exit_status
3295 ' 0
3296 for ac_signal in 1 2 13 15; do
3297   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3298 done
3299 ac_signal=0
3300
3301 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3302 rm -f -r conftest* confdefs.h
3303
3304 printf "%s\n" "/* confdefs.h */" > confdefs.h
3305
3306 # Predefined preprocessor variables.
3307
3308 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3309
3310 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3311
3312 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3313
3314 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3315
3316 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3317
3318 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3319
3320
3321 # Let the site file select an alternate cache file if it wants to.
3322 # Prefer an explicitly selected file to automatically selected ones.
3323 ac_site_file1=NONE
3324 ac_site_file2=NONE
3325 if test -n "$CONFIG_SITE"; then
3326   # We do not want a PATH search for config.site.
3327   case $CONFIG_SITE in #((
3328     -*)  ac_site_file1=./$CONFIG_SITE;;
3329     */*) ac_site_file1=$CONFIG_SITE;;
3330     *)   ac_site_file1=./$CONFIG_SITE;;
3331   esac
3332 elif test "x$prefix" != xNONE; then
3333   ac_site_file1=$prefix/share/config.site
3334   ac_site_file2=$prefix/etc/config.site
3335 else
3336   ac_site_file1=$ac_default_prefix/share/config.site
3337   ac_site_file2=$ac_default_prefix/etc/config.site
3338 fi
3339 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3340 do
3341   test "x$ac_site_file" = xNONE && continue
3342   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3343     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3344 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3345     sed 's/^/| /' "$ac_site_file" >&5
3346     . "$ac_site_file" \
3347       || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3348 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3349 as_fn_error $? "failed to load site script $ac_site_file
3350 See \`config.log' for more details" "$LINENO" 5; }
3351   fi
3352 done
3353
3354 if test -r "$cache_file"; then
3355   # Some versions of bash will fail to source /dev/null (special files
3356   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3357   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3358     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3359 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3360     case $cache_file in
3361       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3362       *)                      . "./$cache_file";;
3363     esac
3364   fi
3365 else
3366   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3367 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3368   >$cache_file
3369 fi
3370
3371 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3372 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3373 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3374 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3375 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3376 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3377 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
3378 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3379 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3380 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
3381 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
3382 as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
3383 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
3384 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3385 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3386 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3387 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
3388 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
3389 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
3390 as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
3391 as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
3392 as_fn_append ac_func_c_list " __freading HAVE___FREADING"
3393 as_fn_append ac_func_c_list " __fseterr HAVE___FSETERR"
3394 as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
3395 as_fn_append ac_func_c_list " fsync HAVE_FSYNC"
3396 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3397 gl_getopt_required=GNU
3398 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3399 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3400 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3401 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3402 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3403 as_fn_append ac_func_c_list " nanotime HAVE_NANOTIME"
3404 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3405 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3406 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
3407 as_fn_append ac_header_c_list " math.h math_h HAVE_MATH_H"
3408 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
3409 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
3410 as_fn_append ac_func_c_list " openat HAVE_OPENAT"
3411 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
3412 gl_printf_safe=yes
3413 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3414 as_fn_append ac_func_c_list " strdup HAVE_STRDUP"
3415 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
3416 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
3417 as_fn_append ac_func_c_list " unlinkat HAVE_UNLINKAT"
3418 as_fn_append ac_func_c_list " utime HAVE_UTIME"
3419 as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H"
3420 as_fn_append ac_func_c_list " futimes HAVE_FUTIMES"
3421 as_fn_append ac_func_c_list " futimesat HAVE_FUTIMESAT"
3422 as_fn_append ac_func_c_list " futimens HAVE_FUTIMENS"
3423 as_fn_append ac_func_c_list " utimensat HAVE_UTIMENSAT"
3424 as_fn_append ac_func_c_list " lutimes HAVE_LUTIMES"
3425 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
3426 as_fn_append ac_header_c_list " fcntl.h fcntl_h HAVE_FCNTL_H"
3427 as_fn_append ac_header_c_list " memory.h memory_h HAVE_MEMORY_H"
3428 as_fn_append ac_header_c_list " time.h time_h HAVE_TIME_H"
3429 as_fn_append ac_func_c_list " chown HAVE_CHOWN"
3430 as_fn_append ac_func_c_list " fchmod HAVE_FCHMOD"
3431 as_fn_append ac_func_c_list " fchown HAVE_FCHOWN"
3432 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
3433 # Check that the precious variables saved in the cache have kept the same
3434 # value.
3435 ac_cache_corrupted=false
3436 for ac_var in $ac_precious_vars; do
3437   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3438   eval ac_new_set=\$ac_env_${ac_var}_set
3439   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3440   eval ac_new_val=\$ac_env_${ac_var}_value
3441   case $ac_old_set,$ac_new_set in
3442     set,)
3443       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3444 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3445       ac_cache_corrupted=: ;;
3446     ,set)
3447       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3448 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3449       ac_cache_corrupted=: ;;
3450     ,);;
3451     *)
3452       if test "x$ac_old_val" != "x$ac_new_val"; then
3453         # differences in whitespace do not lead to failure.
3454         ac_old_val_w=`echo x $ac_old_val`
3455         ac_new_val_w=`echo x $ac_new_val`
3456         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3457           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3458 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3459           ac_cache_corrupted=:
3460         else
3461           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3462 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3463           eval $ac_var=\$ac_old_val
3464         fi
3465         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3466 printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3467         { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3468 printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3469       fi;;
3470   esac
3471   # Pass precious variables to config.status.
3472   if test "$ac_new_set" = set; then
3473     case $ac_new_val in
3474     *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3475     *) ac_arg=$ac_var=$ac_new_val ;;
3476     esac
3477     case " $ac_configure_args " in
3478       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3479       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3480     esac
3481   fi
3482 done
3483 if $ac_cache_corrupted; then
3484   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3485 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3486   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3487 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3488   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3489 fi
3490 ## -------------------- ##
3491 ## Main body of script. ##
3492 ## -------------------- ##
3493
3494 ac_ext=c
3495 ac_cpp='$CPP $CPPFLAGS'
3496 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3497 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499
3500
3501
3502
3503 ac_aux_dir=
3504 for ac_dir in build-aux "$srcdir"/build-aux
3505 do
3506   if test -f "$ac_dir/install-sh"; then
3507     ac_aux_dir=$ac_dir
3508     ac_install_sh="$ac_aux_dir/install-sh -c"
3509     break
3510   elif test -f "$ac_dir/install.sh"; then
3511     ac_aux_dir=$ac_dir
3512     ac_install_sh="$ac_aux_dir/install.sh -c"
3513     break
3514   elif test -f "$ac_dir/shtool"; then
3515     ac_aux_dir=$ac_dir
3516     ac_install_sh="$ac_aux_dir/shtool install -c"
3517     break
3518   fi
3519 done
3520 if test -z "$ac_aux_dir"; then
3521   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3522 fi
3523
3524 # These three variables are undocumented and unsupported,
3525 # and are intended to be withdrawn in a future Autoconf release.
3526 # They can cause serious problems if a builder's source tree is in a directory
3527 # whose full name contains unusual characters.
3528 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3529 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3530 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3531
3532
3533
3534 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3535
3536 am__api_version='1.15a'
3537
3538 # Find a good install program.  We prefer a C program (faster),
3539 # so one script is as good as another.  But avoid the broken or
3540 # incompatible versions:
3541 # SysV /etc/install, /usr/sbin/install
3542 # SunOS /usr/etc/install
3543 # IRIX /sbin/install
3544 # AIX /bin/install
3545 # AmigaOS /C/install, which installs bootblocks on floppy discs
3546 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3547 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3548 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3549 # OS/2's system install, which has a completely different semantic
3550 # ./install, which can be erroneously created by make from ./install.sh.
3551 # Reject install programs that cannot install multiple files.
3552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3553 printf %s "checking for a BSD-compatible install... " >&6; }
3554 if test -z "$INSTALL"; then
3555 if test ${ac_cv_path_install+y}
3556 then :
3557   printf %s "(cached) " >&6
3558 else
3559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3560 for as_dir in $PATH
3561 do
3562   IFS=$as_save_IFS
3563   case $as_dir in #(((
3564     '') as_dir=./ ;;
3565     */) ;;
3566     *) as_dir=$as_dir/ ;;
3567   esac
3568     # Account for fact that we put trailing slashes in our PATH walk.
3569 case $as_dir in #((
3570   ./ | /[cC]/* | \
3571   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3572   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3573   /usr/ucb/* ) ;;
3574   *)
3575     # OSF1 and SCO ODT 3.0 have their own names for install.
3576     # Don't use installbsd from OSF since it installs stuff as root
3577     # by default.
3578     for ac_prog in ginstall scoinst install; do
3579       for ac_exec_ext in '' $ac_executable_extensions; do
3580         if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3581           if test $ac_prog = install &&
3582             grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3583             # AIX install.  It has an incompatible calling convention.
3584             :
3585           elif test $ac_prog = install &&
3586             grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3587             # program-specific install script used by HP pwplus--don't use.
3588             :
3589           else
3590             rm -rf conftest.one conftest.two conftest.dir
3591             echo one > conftest.one
3592             echo two > conftest.two
3593             mkdir conftest.dir
3594             if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3595               test -s conftest.one && test -s conftest.two &&
3596               test -s conftest.dir/conftest.one &&
3597               test -s conftest.dir/conftest.two
3598             then
3599               ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3600               break 3
3601             fi
3602           fi
3603         fi
3604       done
3605     done
3606     ;;
3607 esac
3608
3609   done
3610 IFS=$as_save_IFS
3611
3612 rm -rf conftest.one conftest.two conftest.dir
3613
3614 fi
3615   if test ${ac_cv_path_install+y}; then
3616     INSTALL=$ac_cv_path_install
3617   else
3618     # As a last resort, use the slow shell script.  Don't cache a
3619     # value for INSTALL within a source directory, because that will
3620     # break other packages using the cache if that directory is
3621     # removed, or if the value is a relative name.
3622     INSTALL=$ac_install_sh
3623   fi
3624 fi
3625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3626 printf "%s\n" "$INSTALL" >&6; }
3627
3628 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3629 # It thinks the first close brace ends the variable substitution.
3630 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3631
3632 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3633
3634 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3635
3636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3637 printf %s "checking whether build environment is sane... " >&6; }
3638 # Reject unsafe characters in $srcdir or the absolute working directory
3639 # name.  Accept space and tab only in the latter.
3640 am_lf='
3641 '
3642 case `pwd` in
3643   *[\\\"\#\$\&\'\`$am_lf]*)
3644     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3645 esac
3646 case $srcdir in
3647   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3648     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3649 esac
3650
3651 # Do 'set' in a subshell so we don't clobber the current shell's
3652 # arguments.  Must try -L first in case configure is actually a
3653 # symlink; some systems play weird games with the mod time of symlinks
3654 # (eg FreeBSD returns the mod time of the symlink's containing
3655 # directory).
3656 if (
3657    am_has_slept=no
3658    for am_try in 1 2; do
3659      echo "timestamp, slept: $am_has_slept" > conftest.file
3660      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3661      if test "$*" = "X"; then
3662         # -L didn't work.
3663         set X `ls -t "$srcdir/configure" conftest.file`
3664      fi
3665      if test "$*" != "X $srcdir/configure conftest.file" \
3666         && test "$*" != "X conftest.file $srcdir/configure"; then
3667
3668         # If neither matched, then we have a broken ls.  This can happen
3669         # if, for instance, CONFIG_SHELL is bash and it inherits a
3670         # broken ls alias from the environment.  This has actually
3671         # happened.  Such a system could not be considered "sane".
3672         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3673   alias in your environment" "$LINENO" 5
3674      fi
3675      if test "$2" = conftest.file || test $am_try -eq 2; then
3676        break
3677      fi
3678      # Just in case.
3679      sleep 1
3680      am_has_slept=yes
3681    done
3682    test "$2" = conftest.file
3683    )
3684 then
3685    # Ok.
3686    :
3687 else
3688    as_fn_error $? "newly created file is older than distributed files!
3689 Check your system clock" "$LINENO" 5
3690 fi
3691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3692 printf "%s\n" "yes" >&6; }
3693 # If we didn't sleep, we still need to ensure time stamps of config.status and
3694 # generated files are strictly newer.
3695 am_sleep_pid=
3696 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3697   ( sleep 1 ) &
3698   am_sleep_pid=$!
3699 fi
3700
3701 rm -f conftest.file
3702
3703 test "$program_prefix" != NONE &&
3704   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3705 # Use a double $ so make ignores it.
3706 test "$program_suffix" != NONE &&
3707   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3708 # Double any \ or $.
3709 # By default was `s,x,x', remove it if useless.
3710 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3711 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3712
3713 # Expand $ac_aux_dir to an absolute path.
3714 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3715
3716 if test x"${MISSING+set}" != xset; then
3717   case $am_aux_dir in
3718   *\ * | *\     *)
3719     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3720   *)
3721     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3722   esac
3723 fi
3724 # Use eval to expand $SHELL
3725 if eval "$MISSING --is-lightweight"; then
3726   am_missing_run="$MISSING "
3727 else
3728   am_missing_run=
3729   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3730 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3731 fi
3732
3733 if test x"${install_sh+set}" != xset; then
3734   case $am_aux_dir in
3735   *\ * | *\     *)
3736     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3737   *)
3738     install_sh="\${SHELL} $am_aux_dir/install-sh"
3739   esac
3740 fi
3741
3742 # Installed binaries are usually stripped using 'strip' when the user
3743 # run "make install-strip".  However 'strip' might not be the right
3744 # tool to use in cross-compilation environments, therefore Automake
3745 # will honor the 'STRIP' environment variable to overrule this program.
3746 if test "$cross_compiling" != no; then
3747   if test -n "$ac_tool_prefix"; then
3748   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3749 set dummy ${ac_tool_prefix}strip; ac_word=$2
3750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3751 printf %s "checking for $ac_word... " >&6; }
3752 if test ${ac_cv_prog_STRIP+y}
3753 then :
3754   printf %s "(cached) " >&6
3755 else
3756   if test -n "$STRIP"; then
3757   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3758 else
3759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760 for as_dir in $PATH
3761 do
3762   IFS=$as_save_IFS
3763   case $as_dir in #(((
3764     '') as_dir=./ ;;
3765     */) ;;
3766     *) as_dir=$as_dir/ ;;
3767   esac
3768     for ac_exec_ext in '' $ac_executable_extensions; do
3769   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3770     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3771     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3772     break 2
3773   fi
3774 done
3775   done
3776 IFS=$as_save_IFS
3777
3778 fi
3779 fi
3780 STRIP=$ac_cv_prog_STRIP
3781 if test -n "$STRIP"; then
3782   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3783 printf "%s\n" "$STRIP" >&6; }
3784 else
3785   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786 printf "%s\n" "no" >&6; }
3787 fi
3788
3789
3790 fi
3791 if test -z "$ac_cv_prog_STRIP"; then
3792   ac_ct_STRIP=$STRIP
3793   # Extract the first word of "strip", so it can be a program name with args.
3794 set dummy strip; ac_word=$2
3795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796 printf %s "checking for $ac_word... " >&6; }
3797 if test ${ac_cv_prog_ac_ct_STRIP+y}
3798 then :
3799   printf %s "(cached) " >&6
3800 else
3801   if test -n "$ac_ct_STRIP"; then
3802   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3803 else
3804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3805 for as_dir in $PATH
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_exec_ext in '' $ac_executable_extensions; do
3814   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3815     ac_cv_prog_ac_ct_STRIP="strip"
3816     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3817     break 2
3818   fi
3819 done
3820   done
3821 IFS=$as_save_IFS
3822
3823 fi
3824 fi
3825 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3826 if test -n "$ac_ct_STRIP"; then
3827   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3828 printf "%s\n" "$ac_ct_STRIP" >&6; }
3829 else
3830   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831 printf "%s\n" "no" >&6; }
3832 fi
3833
3834   if test "x$ac_ct_STRIP" = x; then
3835     STRIP=":"
3836   else
3837     case $cross_compiling:$ac_tool_warned in
3838 yes:)
3839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3840 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3841 ac_tool_warned=yes ;;
3842 esac
3843     STRIP=$ac_ct_STRIP
3844   fi
3845 else
3846   STRIP="$ac_cv_prog_STRIP"
3847 fi
3848
3849 fi
3850 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3851
3852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3853 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3854 if test -z "$MKDIR_P"; then
3855   if test ${ac_cv_path_mkdir+y}
3856 then :
3857   printf %s "(cached) " >&6
3858 else
3859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3861 do
3862   IFS=$as_save_IFS
3863   case $as_dir in #(((
3864     '') as_dir=./ ;;
3865     */) ;;
3866     *) as_dir=$as_dir/ ;;
3867   esac
3868     for ac_prog in mkdir gmkdir; do
3869          for ac_exec_ext in '' $ac_executable_extensions; do
3870            as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3871            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3872              'mkdir ('*'coreutils) '* | \
3873              'BusyBox '* | \
3874              'mkdir (fileutils) '4.1*)
3875                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3876                break 3;;
3877            esac
3878          done
3879        done
3880   done
3881 IFS=$as_save_IFS
3882
3883 fi
3884
3885   test -d ./--version && rmdir ./--version
3886   if test ${ac_cv_path_mkdir+y}; then
3887     MKDIR_P="$ac_cv_path_mkdir -p"
3888   else
3889     # As a last resort, use the slow shell script.  Don't cache a
3890     # value for MKDIR_P within a source directory, because that will
3891     # break other packages using the cache if that directory is
3892     # removed, or if the value is a relative name.
3893     MKDIR_P="$ac_install_sh -d"
3894   fi
3895 fi
3896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3897 printf "%s\n" "$MKDIR_P" >&6; }
3898
3899 for ac_prog in gawk mawk nawk awk
3900 do
3901   # Extract the first word of "$ac_prog", so it can be a program name with args.
3902 set dummy $ac_prog; ac_word=$2
3903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3904 printf %s "checking for $ac_word... " >&6; }
3905 if test ${ac_cv_prog_AWK+y}
3906 then :
3907   printf %s "(cached) " >&6
3908 else
3909   if test -n "$AWK"; then
3910   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3911 else
3912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913 for as_dir in $PATH
3914 do
3915   IFS=$as_save_IFS
3916   case $as_dir in #(((
3917     '') as_dir=./ ;;
3918     */) ;;
3919     *) as_dir=$as_dir/ ;;
3920   esac
3921     for ac_exec_ext in '' $ac_executable_extensions; do
3922   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3923     ac_cv_prog_AWK="$ac_prog"
3924     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3925     break 2
3926   fi
3927 done
3928   done
3929 IFS=$as_save_IFS
3930
3931 fi
3932 fi
3933 AWK=$ac_cv_prog_AWK
3934 if test -n "$AWK"; then
3935   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3936 printf "%s\n" "$AWK" >&6; }
3937 else
3938   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3939 printf "%s\n" "no" >&6; }
3940 fi
3941
3942
3943   test -n "$AWK" && break
3944 done
3945
3946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3947 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3948 set x ${MAKE-make}
3949 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3950 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3951 then :
3952   printf %s "(cached) " >&6
3953 else
3954   cat >conftest.make <<\_ACEOF
3955 SHELL = /bin/sh
3956 all:
3957         @echo '@@@%%%=$(MAKE)=@@@%%%'
3958 _ACEOF
3959 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3960 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3961   *@@@%%%=?*=@@@%%%*)
3962     eval ac_cv_prog_make_${ac_make}_set=yes;;
3963   *)
3964     eval ac_cv_prog_make_${ac_make}_set=no;;
3965 esac
3966 rm -f conftest.make
3967 fi
3968 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3969   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3970 printf "%s\n" "yes" >&6; }
3971   SET_MAKE=
3972 else
3973   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974 printf "%s\n" "no" >&6; }
3975   SET_MAKE="MAKE=${MAKE-make}"
3976 fi
3977
3978 rm -rf .tst 2>/dev/null
3979 mkdir .tst 2>/dev/null
3980 if test -d .tst; then
3981   am__leading_dot=.
3982 else
3983   am__leading_dot=_
3984 fi
3985 rmdir .tst 2>/dev/null
3986
3987 # Check whether --enable-silent-rules was given.
3988 if test ${enable_silent_rules+y}
3989 then :
3990   enableval=$enable_silent_rules;
3991 fi
3992
3993 case $enable_silent_rules in # (((
3994   yes) AM_DEFAULT_VERBOSITY=0;;
3995    no) AM_DEFAULT_VERBOSITY=1;;
3996     *) AM_DEFAULT_VERBOSITY=1;;
3997 esac
3998 am_make=${MAKE-make}
3999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4000 printf %s "checking whether $am_make supports nested variables... " >&6; }
4001 if test ${am_cv_make_support_nested_variables+y}
4002 then :
4003   printf %s "(cached) " >&6
4004 else
4005   if printf "%s\n" 'TRUE=$(BAR$(V))
4006 BAR0=false
4007 BAR1=true
4008 V=1
4009 am__doit:
4010         @$(TRUE)
4011 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4012   am_cv_make_support_nested_variables=yes
4013 else
4014   am_cv_make_support_nested_variables=no
4015 fi
4016 fi
4017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4018 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4019 if test $am_cv_make_support_nested_variables = yes; then
4020     AM_V='$(V)'
4021   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4022 else
4023   AM_V=$AM_DEFAULT_VERBOSITY
4024   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4025 fi
4026 AM_BACKSLASH='\'
4027
4028 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4029   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4030   # is not polluted with repeated "-I."
4031   am__isrc=' -I$(srcdir)'
4032   # test to see if srcdir already configured
4033   if test -f $srcdir/config.status; then
4034     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4035   fi
4036 fi
4037
4038 # test whether we have cygpath
4039 if test -z "$CYGPATH_W"; then
4040   if (cygpath --version) >/dev/null 2>/dev/null; then
4041     CYGPATH_W='cygpath -w'
4042   else
4043     CYGPATH_W=echo
4044   fi
4045 fi
4046
4047
4048 # Define the identity of the package.
4049  PACKAGE='gzip'
4050  VERSION='1.9'
4051
4052
4053 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4054
4055
4056 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4057
4058 # Some tools Automake needs.
4059
4060 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4061
4062
4063 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4064
4065
4066 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4067
4068
4069 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4070
4071
4072 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4073
4074 # For better backward compatibility.  To be removed once Automake 1.9.x
4075 # dies out for good.  For more background, see:
4076 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4077 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4078 mkdir_p='$(MKDIR_P)'
4079
4080 # We need awk for the "check" target (and possibly the TAP driver).  The
4081 # system "awk" is bad on some platforms.
4082 # Always define AMTAR for backward compatibility.  Yes, it's still used
4083 # in the wild :-(  We should find a proper way to deprecate it ...
4084 AMTAR='$${TAR-tar}'
4085
4086
4087 # We'll loop over all known methods to create a tar archive until one works.
4088 _am_tools='gnutar  pax cpio none'
4089
4090 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4091
4092
4093
4094
4095
4096
4097 # POSIX will say in a future version that running "rm -f" with no argument
4098 # is OK; and we want to be able to make that assumption in our Makefile
4099 # recipes.  So use an aggressive probe to check that the usage we want is
4100 # actually supported "in the wild" to an acceptable degree.
4101 # See automake bug#10828.
4102 # To make any issue more visible, cause the running configure to be aborted
4103 # by default if the 'rm' program in use doesn't match our expectations; the
4104 # user can still override this though.
4105 if rm -f && rm -fr && rm -rf; then : OK; else
4106   cat >&2 <<'END'
4107 Oops!
4108
4109 Your 'rm' program seems unable to run without file operands specified
4110 on the command line, even when the '-f' option is present.  This is contrary
4111 to the behaviour of most rm programs out there, and not conforming with
4112 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4113
4114 Please tell bug-automake@gnu.org about your system, including the value
4115 of your $PATH and any error possibly output before this message.  This
4116 can help us improve future automake versions.
4117
4118 END
4119   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4120     echo 'Configuration will proceed anyway, since you have set the' >&2
4121     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4122     echo >&2
4123   else
4124     cat >&2 <<'END'
4125 Aborting the configuration process, to ensure you take notice of the issue.
4126
4127 You can download and install GNU coreutils to get an 'rm' implementation
4128 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4129
4130 If you want to complete the configuration process using your problematic
4131 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4132 to "yes", and re-run configure.
4133
4134 END
4135     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4136   fi
4137 fi
4138
4139 # Check whether --enable-silent-rules was given.
4140 if test ${enable_silent_rules+y}
4141 then :
4142   enableval=$enable_silent_rules;
4143 fi
4144
4145 case $enable_silent_rules in # (((
4146   yes) AM_DEFAULT_VERBOSITY=0;;
4147    no) AM_DEFAULT_VERBOSITY=1;;
4148     *) AM_DEFAULT_VERBOSITY=0;;
4149 esac
4150 am_make=${MAKE-make}
4151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4152 printf %s "checking whether $am_make supports nested variables... " >&6; }
4153 if test ${am_cv_make_support_nested_variables+y}
4154 then :
4155   printf %s "(cached) " >&6
4156 else
4157   if printf "%s\n" 'TRUE=$(BAR$(V))
4158 BAR0=false
4159 BAR1=true
4160 V=1
4161 am__doit:
4162         @$(TRUE)
4163 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4164   am_cv_make_support_nested_variables=yes
4165 else
4166   am_cv_make_support_nested_variables=no
4167 fi
4168 fi
4169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4170 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4171 if test $am_cv_make_support_nested_variables = yes; then
4172     AM_V='$(V)'
4173   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4174 else
4175   AM_V=$AM_DEFAULT_VERBOSITY
4176   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4177 fi
4178 AM_BACKSLASH='\'
4179  # make --enable-silent-rules the default.
4180
4181
4182
4183
4184
4185
4186 DEPDIR="${am__leading_dot}deps"
4187
4188 ac_config_commands="$ac_config_commands depfiles"
4189
4190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4191 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4192 cat > confinc.mk << 'END'
4193 am__doit:
4194         @echo this is the am__doit target >confinc.out
4195 .PHONY: am__doit
4196 END
4197 am__include="#"
4198 am__quote=
4199 # BSD make does it like this.
4200 echo '.include "confinc.mk" # ignored' > confmf.BSD
4201 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
4202 echo 'include confinc.mk # ignored' > confmf.GNU
4203 _am_result=no
4204 for s in GNU BSD; do
4205   { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4206    (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4207    ac_status=$?
4208    echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209    (exit $ac_status); }
4210   case $?:`cat confinc.out 2>/dev/null` in #(
4211   '0:this is the am__doit target') :
4212     case $s in #(
4213   BSD) :
4214     am__include='.include' am__quote='"' ;; #(
4215   *) :
4216     am__include='include' am__quote='' ;;
4217 esac ;; #(
4218   *) :
4219      ;;
4220 esac
4221   if test "$am__include" != "#"; then
4222     _am_result="yes ($s style)"
4223     break
4224   fi
4225 done
4226 rm -f confinc.* confmf.*
4227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4228 printf "%s\n" "${_am_result}" >&6; }
4229
4230 # Check whether --enable-dependency-tracking was given.
4231 if test ${enable_dependency_tracking+y}
4232 then :
4233   enableval=$enable_dependency_tracking;
4234 fi
4235
4236 if test "x$enable_dependency_tracking" != xno; then
4237   am_depcomp="$ac_aux_dir/depcomp"
4238   AMDEPBACKSLASH='\'
4239   am__nodep='_no'
4240 fi
4241  if test "x$enable_dependency_tracking" != xno; then
4242   AMDEP_TRUE=
4243   AMDEP_FALSE='#'
4244 else
4245   AMDEP_TRUE='#'
4246   AMDEP_FALSE=
4247 fi
4248
4249
4250 ac_ext=c
4251 ac_cpp='$CPP $CPPFLAGS'
4252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4255 if test -n "$ac_tool_prefix"; then
4256   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4257 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4259 printf %s "checking for $ac_word... " >&6; }
4260 if test ${ac_cv_prog_CC+y}
4261 then :
4262   printf %s "(cached) " >&6
4263 else
4264   if test -n "$CC"; then
4265   ac_cv_prog_CC="$CC" # Let the user override the test.
4266 else
4267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4268 for as_dir in $PATH
4269 do
4270   IFS=$as_save_IFS
4271   case $as_dir in #(((
4272     '') as_dir=./ ;;
4273     */) ;;
4274     *) as_dir=$as_dir/ ;;
4275   esac
4276     for ac_exec_ext in '' $ac_executable_extensions; do
4277   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4278     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4279     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4280     break 2
4281   fi
4282 done
4283   done
4284 IFS=$as_save_IFS
4285
4286 fi
4287 fi
4288 CC=$ac_cv_prog_CC
4289 if test -n "$CC"; then
4290   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4291 printf "%s\n" "$CC" >&6; }
4292 else
4293   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4294 printf "%s\n" "no" >&6; }
4295 fi
4296
4297
4298 fi
4299 if test -z "$ac_cv_prog_CC"; then
4300   ac_ct_CC=$CC
4301   # Extract the first word of "gcc", so it can be a program name with args.
4302 set dummy gcc; ac_word=$2
4303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4304 printf %s "checking for $ac_word... " >&6; }
4305 if test ${ac_cv_prog_ac_ct_CC+y}
4306 then :
4307   printf %s "(cached) " >&6
4308 else
4309   if test -n "$ac_ct_CC"; then
4310   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4311 else
4312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313 for as_dir in $PATH
4314 do
4315   IFS=$as_save_IFS
4316   case $as_dir in #(((
4317     '') as_dir=./ ;;
4318     */) ;;
4319     *) as_dir=$as_dir/ ;;
4320   esac
4321     for ac_exec_ext in '' $ac_executable_extensions; do
4322   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4323     ac_cv_prog_ac_ct_CC="gcc"
4324     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4325     break 2
4326   fi
4327 done
4328   done
4329 IFS=$as_save_IFS
4330
4331 fi
4332 fi
4333 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4334 if test -n "$ac_ct_CC"; then
4335   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4336 printf "%s\n" "$ac_ct_CC" >&6; }
4337 else
4338   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4339 printf "%s\n" "no" >&6; }
4340 fi
4341
4342   if test "x$ac_ct_CC" = x; then
4343     CC=""
4344   else
4345     case $cross_compiling:$ac_tool_warned in
4346 yes:)
4347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4348 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4349 ac_tool_warned=yes ;;
4350 esac
4351     CC=$ac_ct_CC
4352   fi
4353 else
4354   CC="$ac_cv_prog_CC"
4355 fi
4356
4357 if test -z "$CC"; then
4358           if test -n "$ac_tool_prefix"; then
4359     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4360 set dummy ${ac_tool_prefix}cc; ac_word=$2
4361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4362 printf %s "checking for $ac_word... " >&6; }
4363 if test ${ac_cv_prog_CC+y}
4364 then :
4365   printf %s "(cached) " >&6
4366 else
4367   if test -n "$CC"; then
4368   ac_cv_prog_CC="$CC" # Let the user override the test.
4369 else
4370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371 for as_dir in $PATH
4372 do
4373   IFS=$as_save_IFS
4374   case $as_dir in #(((
4375     '') as_dir=./ ;;
4376     */) ;;
4377     *) as_dir=$as_dir/ ;;
4378   esac
4379     for ac_exec_ext in '' $ac_executable_extensions; do
4380   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4381     ac_cv_prog_CC="${ac_tool_prefix}cc"
4382     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4383     break 2
4384   fi
4385 done
4386   done
4387 IFS=$as_save_IFS
4388
4389 fi
4390 fi
4391 CC=$ac_cv_prog_CC
4392 if test -n "$CC"; then
4393   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4394 printf "%s\n" "$CC" >&6; }
4395 else
4396   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4397 printf "%s\n" "no" >&6; }
4398 fi
4399
4400
4401   fi
4402 fi
4403 if test -z "$CC"; then
4404   # Extract the first word of "cc", so it can be a program name with args.
4405 set dummy cc; ac_word=$2
4406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4407 printf %s "checking for $ac_word... " >&6; }
4408 if test ${ac_cv_prog_CC+y}
4409 then :
4410   printf %s "(cached) " >&6
4411 else
4412   if test -n "$CC"; then
4413   ac_cv_prog_CC="$CC" # Let the user override the test.
4414 else
4415   ac_prog_rejected=no
4416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4417 for as_dir in $PATH
4418 do
4419   IFS=$as_save_IFS
4420   case $as_dir in #(((
4421     '') as_dir=./ ;;
4422     */) ;;
4423     *) as_dir=$as_dir/ ;;
4424   esac
4425     for ac_exec_ext in '' $ac_executable_extensions; do
4426   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4427     if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4428        ac_prog_rejected=yes
4429        continue
4430      fi
4431     ac_cv_prog_CC="cc"
4432     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4433     break 2
4434   fi
4435 done
4436   done
4437 IFS=$as_save_IFS
4438
4439 if test $ac_prog_rejected = yes; then
4440   # We found a bogon in the path, so make sure we never use it.
4441   set dummy $ac_cv_prog_CC
4442   shift
4443   if test $# != 0; then
4444     # We chose a different compiler from the bogus one.
4445     # However, it has the same basename, so the bogon will be chosen
4446     # first if we set CC to just the basename; use the full file name.
4447     shift
4448     ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4449   fi
4450 fi
4451 fi
4452 fi
4453 CC=$ac_cv_prog_CC
4454 if test -n "$CC"; then
4455   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4456 printf "%s\n" "$CC" >&6; }
4457 else
4458   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4459 printf "%s\n" "no" >&6; }
4460 fi
4461
4462
4463 fi
4464 if test -z "$CC"; then
4465   if test -n "$ac_tool_prefix"; then
4466   for ac_prog in cl.exe
4467   do
4468     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4469 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471 printf %s "checking for $ac_word... " >&6; }
4472 if test ${ac_cv_prog_CC+y}
4473 then :
4474   printf %s "(cached) " >&6
4475 else
4476   if test -n "$CC"; then
4477   ac_cv_prog_CC="$CC" # Let the user override the test.
4478 else
4479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4480 for as_dir in $PATH
4481 do
4482   IFS=$as_save_IFS
4483   case $as_dir in #(((
4484     '') as_dir=./ ;;
4485     */) ;;
4486     *) as_dir=$as_dir/ ;;
4487   esac
4488     for ac_exec_ext in '' $ac_executable_extensions; do
4489   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4490     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4491     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4492     break 2
4493   fi
4494 done
4495   done
4496 IFS=$as_save_IFS
4497
4498 fi
4499 fi
4500 CC=$ac_cv_prog_CC
4501 if test -n "$CC"; then
4502   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4503 printf "%s\n" "$CC" >&6; }
4504 else
4505   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4506 printf "%s\n" "no" >&6; }
4507 fi
4508
4509
4510     test -n "$CC" && break
4511   done
4512 fi
4513 if test -z "$CC"; then
4514   ac_ct_CC=$CC
4515   for ac_prog in cl.exe
4516 do
4517   # Extract the first word of "$ac_prog", so it can be a program name with args.
4518 set dummy $ac_prog; ac_word=$2
4519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4520 printf %s "checking for $ac_word... " >&6; }
4521 if test ${ac_cv_prog_ac_ct_CC+y}
4522 then :
4523   printf %s "(cached) " >&6
4524 else
4525   if test -n "$ac_ct_CC"; then
4526   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4527 else
4528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4529 for as_dir in $PATH
4530 do
4531   IFS=$as_save_IFS
4532   case $as_dir in #(((
4533     '') as_dir=./ ;;
4534     */) ;;
4535     *) as_dir=$as_dir/ ;;
4536   esac
4537     for ac_exec_ext in '' $ac_executable_extensions; do
4538   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4539     ac_cv_prog_ac_ct_CC="$ac_prog"
4540     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4541     break 2
4542   fi
4543 done
4544   done
4545 IFS=$as_save_IFS
4546
4547 fi
4548 fi
4549 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4550 if test -n "$ac_ct_CC"; then
4551   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4552 printf "%s\n" "$ac_ct_CC" >&6; }
4553 else
4554   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555 printf "%s\n" "no" >&6; }
4556 fi
4557
4558
4559   test -n "$ac_ct_CC" && break
4560 done
4561
4562   if test "x$ac_ct_CC" = x; then
4563     CC=""
4564   else
4565     case $cross_compiling:$ac_tool_warned in
4566 yes:)
4567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4568 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4569 ac_tool_warned=yes ;;
4570 esac
4571     CC=$ac_ct_CC
4572   fi
4573 fi
4574
4575 fi
4576 if test -z "$CC"; then
4577   if test -n "$ac_tool_prefix"; then
4578   # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4579 set dummy ${ac_tool_prefix}clang; ac_word=$2
4580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4581 printf %s "checking for $ac_word... " >&6; }
4582 if test ${ac_cv_prog_CC+y}
4583 then :
4584   printf %s "(cached) " >&6
4585 else
4586   if test -n "$CC"; then
4587   ac_cv_prog_CC="$CC" # Let the user override the test.
4588 else
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590 for as_dir in $PATH
4591 do
4592   IFS=$as_save_IFS
4593   case $as_dir in #(((
4594     '') as_dir=./ ;;
4595     */) ;;
4596     *) as_dir=$as_dir/ ;;
4597   esac
4598     for ac_exec_ext in '' $ac_executable_extensions; do
4599   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4600     ac_cv_prog_CC="${ac_tool_prefix}clang"
4601     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4602     break 2
4603   fi
4604 done
4605   done
4606 IFS=$as_save_IFS
4607
4608 fi
4609 fi
4610 CC=$ac_cv_prog_CC
4611 if test -n "$CC"; then
4612   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4613 printf "%s\n" "$CC" >&6; }
4614 else
4615   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616 printf "%s\n" "no" >&6; }
4617 fi
4618
4619
4620 fi
4621 if test -z "$ac_cv_prog_CC"; then
4622   ac_ct_CC=$CC
4623   # Extract the first word of "clang", so it can be a program name with args.
4624 set dummy clang; ac_word=$2
4625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626 printf %s "checking for $ac_word... " >&6; }
4627 if test ${ac_cv_prog_ac_ct_CC+y}
4628 then :
4629   printf %s "(cached) " >&6
4630 else
4631   if test -n "$ac_ct_CC"; then
4632   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4633 else
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635 for as_dir in $PATH
4636 do
4637   IFS=$as_save_IFS
4638   case $as_dir in #(((
4639     '') as_dir=./ ;;
4640     */) ;;
4641     *) as_dir=$as_dir/ ;;
4642   esac
4643     for ac_exec_ext in '' $ac_executable_extensions; do
4644   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4645     ac_cv_prog_ac_ct_CC="clang"
4646     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4647     break 2
4648   fi
4649 done
4650   done
4651 IFS=$as_save_IFS
4652
4653 fi
4654 fi
4655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4656 if test -n "$ac_ct_CC"; then
4657   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4658 printf "%s\n" "$ac_ct_CC" >&6; }
4659 else
4660   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661 printf "%s\n" "no" >&6; }
4662 fi
4663
4664   if test "x$ac_ct_CC" = x; then
4665     CC=""
4666   else
4667     case $cross_compiling:$ac_tool_warned in
4668 yes:)
4669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4670 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4671 ac_tool_warned=yes ;;
4672 esac
4673     CC=$ac_ct_CC
4674   fi
4675 else
4676   CC="$ac_cv_prog_CC"
4677 fi
4678
4679 fi
4680
4681
4682 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4683 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4684 as_fn_error $? "no acceptable C compiler found in \$PATH
4685 See \`config.log' for more details" "$LINENO" 5; }
4686
4687 # Provide some information about the compiler.
4688 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4689 set X $ac_compile
4690 ac_compiler=$2
4691 for ac_option in --version -v -V -qversion -version; do
4692   { { ac_try="$ac_compiler $ac_option >&5"
4693 case "(($ac_try" in
4694   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4695   *) ac_try_echo=$ac_try;;
4696 esac
4697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4698 printf "%s\n" "$ac_try_echo"; } >&5
4699   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4700   ac_status=$?
4701   if test -s conftest.err; then
4702     sed '10a\
4703 ... rest of stderr output deleted ...
4704          10q' conftest.err >conftest.er1
4705     cat conftest.er1 >&5
4706   fi
4707   rm -f conftest.er1 conftest.err
4708   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4709   test $ac_status = 0; }
4710 done
4711
4712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713 /* end confdefs.h.  */
4714
4715 int
4716 main (void)
4717 {
4718
4719   ;
4720   return 0;
4721 }
4722 _ACEOF
4723 ac_clean_files_save=$ac_clean_files
4724 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4725 # Try to create an executable without -o first, disregard a.out.
4726 # It will help us diagnose broken compilers, and finding out an intuition
4727 # of exeext.
4728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4729 printf %s "checking whether the C compiler works... " >&6; }
4730 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4731
4732 # The possible output files:
4733 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4734
4735 ac_rmfiles=
4736 for ac_file in $ac_files
4737 do
4738   case $ac_file in
4739     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4740     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4741   esac
4742 done
4743 rm -f $ac_rmfiles
4744
4745 if { { ac_try="$ac_link_default"
4746 case "(($ac_try" in
4747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4748   *) ac_try_echo=$ac_try;;
4749 esac
4750 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4751 printf "%s\n" "$ac_try_echo"; } >&5
4752   (eval "$ac_link_default") 2>&5
4753   ac_status=$?
4754   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4755   test $ac_status = 0; }
4756 then :
4757   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4758 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4759 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4760 # so that the user can short-circuit this test for compilers unknown to
4761 # Autoconf.
4762 for ac_file in $ac_files ''
4763 do
4764   test -f "$ac_file" || continue
4765   case $ac_file in
4766     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4767         ;;
4768     [ab].out )
4769         # We found the default executable, but exeext='' is most
4770         # certainly right.
4771         break;;
4772     *.* )
4773         if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4774         then :; else
4775            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4776         fi
4777         # We set ac_cv_exeext here because the later test for it is not
4778         # safe: cross compilers may not add the suffix if given an `-o'
4779         # argument, so we may need to know it at that point already.
4780         # Even if this section looks crufty: it has the advantage of
4781         # actually working.
4782         break;;
4783     * )
4784         break;;
4785   esac
4786 done
4787 test "$ac_cv_exeext" = no && ac_cv_exeext=
4788
4789 else
4790   ac_file=''
4791 fi
4792 if test -z "$ac_file"
4793 then :
4794   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795 printf "%s\n" "no" >&6; }
4796 printf "%s\n" "$as_me: failed program was:" >&5
4797 sed 's/^/| /' conftest.$ac_ext >&5
4798
4799 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4800 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4801 as_fn_error 77 "C compiler cannot create executables
4802 See \`config.log' for more details" "$LINENO" 5; }
4803 else
4804   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4805 printf "%s\n" "yes" >&6; }
4806 fi
4807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4808 printf %s "checking for C compiler default output file name... " >&6; }
4809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4810 printf "%s\n" "$ac_file" >&6; }
4811 ac_exeext=$ac_cv_exeext
4812
4813 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4814 ac_clean_files=$ac_clean_files_save
4815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4816 printf %s "checking for suffix of executables... " >&6; }
4817 if { { ac_try="$ac_link"
4818 case "(($ac_try" in
4819   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4820   *) ac_try_echo=$ac_try;;
4821 esac
4822 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4823 printf "%s\n" "$ac_try_echo"; } >&5
4824   (eval "$ac_link") 2>&5
4825   ac_status=$?
4826   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4827   test $ac_status = 0; }
4828 then :
4829   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4830 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4831 # work properly (i.e., refer to `conftest.exe'), while it won't with
4832 # `rm'.
4833 for ac_file in conftest.exe conftest conftest.*; do
4834   test -f "$ac_file" || continue
4835   case $ac_file in
4836     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4837     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4838           break;;
4839     * ) break;;
4840   esac
4841 done
4842 else
4843   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4844 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4845 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4846 See \`config.log' for more details" "$LINENO" 5; }
4847 fi
4848 rm -f conftest conftest$ac_cv_exeext
4849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4850 printf "%s\n" "$ac_cv_exeext" >&6; }
4851
4852 rm -f conftest.$ac_ext
4853 EXEEXT=$ac_cv_exeext
4854 ac_exeext=$EXEEXT
4855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4856 /* end confdefs.h.  */
4857 #include <stdio.h>
4858 int
4859 main (void)
4860 {
4861 FILE *f = fopen ("conftest.out", "w");
4862  return ferror (f) || fclose (f) != 0;
4863
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 ac_clean_files="$ac_clean_files conftest.out"
4869 # Check that the compiler produces executables we can run.  If not, either
4870 # the compiler is broken, or we cross compile.
4871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4872 printf %s "checking whether we are cross compiling... " >&6; }
4873 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4874   cross_compiling=yes
4875 elif test "$cross_compiling" != yes; then
4876   { { ac_try="$ac_link"
4877 case "(($ac_try" in
4878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4879   *) ac_try_echo=$ac_try;;
4880 esac
4881 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4882 printf "%s\n" "$ac_try_echo"; } >&5
4883   (eval "$ac_link") 2>&5
4884   ac_status=$?
4885   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4886   test $ac_status = 0; }
4887   if { ac_try='./conftest$ac_cv_exeext'
4888   { { case "(($ac_try" in
4889   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890   *) ac_try_echo=$ac_try;;
4891 esac
4892 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4893 printf "%s\n" "$ac_try_echo"; } >&5
4894   (eval "$ac_try") 2>&5
4895   ac_status=$?
4896   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4897   test $ac_status = 0; }; }; then
4898     cross_compiling=no
4899   else
4900     if test "$cross_compiling" = maybe; then
4901         cross_compiling=yes
4902     else
4903         { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4904 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4905 as_fn_error $? "cannot run C compiled programs.
4906 If you meant to cross compile, use \`--host'.
4907 See \`config.log' for more details" "$LINENO" 5; }
4908     fi
4909   fi
4910 fi
4911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4912 printf "%s\n" "$cross_compiling" >&6; }
4913
4914 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4915 ac_clean_files=$ac_clean_files_save
4916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4917 printf %s "checking for suffix of object files... " >&6; }
4918 if test ${ac_cv_objext+y}
4919 then :
4920   printf %s "(cached) " >&6
4921 else
4922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h.  */
4924
4925 int
4926 main (void)
4927 {
4928
4929   ;
4930   return 0;
4931 }
4932 _ACEOF
4933 rm -f conftest.o conftest.obj
4934 if { { ac_try="$ac_compile"
4935 case "(($ac_try" in
4936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4937   *) ac_try_echo=$ac_try;;
4938 esac
4939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4940 printf "%s\n" "$ac_try_echo"; } >&5
4941   (eval "$ac_compile") 2>&5
4942   ac_status=$?
4943   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4944   test $ac_status = 0; }
4945 then :
4946   for ac_file in conftest.o conftest.obj conftest.*; do
4947   test -f "$ac_file" || continue;
4948   case $ac_file in
4949     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4950     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4951        break;;
4952   esac
4953 done
4954 else
4955   printf "%s\n" "$as_me: failed program was:" >&5
4956 sed 's/^/| /' conftest.$ac_ext >&5
4957
4958 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4959 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4960 as_fn_error $? "cannot compute suffix of object files: cannot compile
4961 See \`config.log' for more details" "$LINENO" 5; }
4962 fi
4963 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4964 fi
4965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4966 printf "%s\n" "$ac_cv_objext" >&6; }
4967 OBJEXT=$ac_cv_objext
4968 ac_objext=$OBJEXT
4969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4970 printf %s "checking whether the compiler supports GNU C... " >&6; }
4971 if test ${ac_cv_c_compiler_gnu+y}
4972 then :
4973   printf %s "(cached) " >&6
4974 else
4975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4976 /* end confdefs.h.  */
4977
4978 int
4979 main (void)
4980 {
4981 #ifndef __GNUC__
4982        choke me
4983 #endif
4984
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 if ac_fn_c_try_compile "$LINENO"
4990 then :
4991   ac_compiler_gnu=yes
4992 else
4993   ac_compiler_gnu=no
4994 fi
4995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4996 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4997
4998 fi
4999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5000 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5001 if test $ac_compiler_gnu = yes; then
5002   GCC=yes
5003 else
5004   GCC=
5005 fi
5006 ac_test_CFLAGS=${CFLAGS+y}
5007 ac_save_CFLAGS=$CFLAGS
5008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5009 printf %s "checking whether $CC accepts -g... " >&6; }
5010 if test ${ac_cv_prog_cc_g+y}
5011 then :
5012   printf %s "(cached) " >&6
5013 else
5014   ac_save_c_werror_flag=$ac_c_werror_flag
5015    ac_c_werror_flag=yes
5016    ac_cv_prog_cc_g=no
5017    CFLAGS="-g"
5018    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5019 /* end confdefs.h.  */
5020
5021 int
5022 main (void)
5023 {
5024
5025   ;
5026   return 0;
5027 }
5028 _ACEOF
5029 if ac_fn_c_try_compile "$LINENO"
5030 then :
5031   ac_cv_prog_cc_g=yes
5032 else
5033   CFLAGS=""
5034       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5035 /* end confdefs.h.  */
5036
5037 int
5038 main (void)
5039 {
5040
5041   ;
5042   return 0;
5043 }
5044 _ACEOF
5045 if ac_fn_c_try_compile "$LINENO"
5046 then :
5047
5048 else
5049   ac_c_werror_flag=$ac_save_c_werror_flag
5050          CFLAGS="-g"
5051          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052 /* end confdefs.h.  */
5053
5054 int
5055 main (void)
5056 {
5057
5058   ;
5059   return 0;
5060 }
5061 _ACEOF
5062 if ac_fn_c_try_compile "$LINENO"
5063 then :
5064   ac_cv_prog_cc_g=yes
5065 fi
5066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5067 fi
5068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5069 fi
5070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5071    ac_c_werror_flag=$ac_save_c_werror_flag
5072 fi
5073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5074 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5075 if test $ac_test_CFLAGS; then
5076   CFLAGS=$ac_save_CFLAGS
5077 elif test $ac_cv_prog_cc_g = yes; then
5078   if test "$GCC" = yes; then
5079     CFLAGS="-g -O2"
5080   else
5081     CFLAGS="-g"
5082   fi
5083 else
5084   if test "$GCC" = yes; then
5085     CFLAGS="-O2"
5086   else
5087     CFLAGS=
5088   fi
5089 fi
5090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5091 printf %s "checking for $CC option to enable C11 features... " >&6; }
5092 if test ${ac_cv_prog_cc_c11+y}
5093 then :
5094   printf %s "(cached) " >&6
5095 else
5096   ac_cv_prog_cc_c11=no
5097 ac_save_CC=$CC
5098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5099 /* end confdefs.h.  */
5100 #include <stdarg.h>
5101 #include <stdbool.h>
5102 #include <stddef.h>
5103 #include <stdlib.h>
5104 #include <wchar.h>
5105 #include <stdio.h>
5106
5107 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5108 #define debug(...) fprintf (stderr, __VA_ARGS__)
5109 #define showlist(...) puts (#__VA_ARGS__)
5110 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5111 static void
5112 test_varargs_macros (void)
5113 {
5114   int x = 1234;
5115   int y = 5678;
5116   debug ("Flag");
5117   debug ("X = %d\n", x);
5118   showlist (The first, second, and third items.);
5119   report (x>y, "x is %d but y is %d", x, y);
5120 }
5121
5122 // Check long long types.
5123 #define BIG64 18446744073709551615ull
5124 #define BIG32 4294967295ul
5125 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5126 #if !BIG_OK
5127   your preprocessor is broken;
5128 #endif
5129 #if BIG_OK
5130 #else
5131   your preprocessor is broken;
5132 #endif
5133 static long long int bignum = -9223372036854775807LL;
5134 static unsigned long long int ubignum = BIG64;
5135
5136 struct incomplete_array
5137 {
5138   int datasize;
5139   double data[];
5140 };
5141
5142 struct named_init {
5143   int number;
5144   const wchar_t *name;
5145   double average;
5146 };
5147
5148 typedef const char *ccp;
5149
5150 static inline int
5151 test_restrict (ccp restrict text)
5152 {
5153   // See if C++-style comments work.
5154   // Iterate through items via the restricted pointer.
5155   // Also check for declarations in for loops.
5156   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5157     continue;
5158   return 0;
5159 }
5160
5161 // Check varargs and va_copy.
5162 static bool
5163 test_varargs (const char *format, ...)
5164 {
5165   va_list args;
5166   va_start (args, format);
5167   va_list args_copy;
5168   va_copy (args_copy, args);
5169
5170   const char *str = "";
5171   int number = 0;
5172   float fnumber = 0;
5173
5174   while (*format)
5175     {
5176       switch (*format++)
5177         {
5178         case 's': // string
5179           str = va_arg (args_copy, const char *);
5180           break;
5181         case 'd': // int
5182           number = va_arg (args_copy, int);
5183           break;
5184         case 'f': // float
5185           fnumber = va_arg (args_copy, double);
5186           break;
5187         default:
5188           break;
5189         }
5190     }
5191   va_end (args_copy);
5192   va_end (args);
5193
5194   return *str && number && fnumber;
5195 }
5196 // Check _Alignas.
5197 char _Alignas (double) aligned_as_double;
5198 char _Alignas (0) no_special_alignment;
5199 extern char aligned_as_int;
5200 char _Alignas (0) _Alignas (int) aligned_as_int;
5201
5202 // Check _Alignof.
5203 enum
5204 {
5205   int_alignment = _Alignof (int),
5206   int_array_alignment = _Alignof (int[100]),
5207   char_alignment = _Alignof (char)
5208 };
5209 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5210
5211 // Check _Noreturn.
5212 int _Noreturn does_not_return (void) { for (;;) continue; }
5213
5214 // Check _Static_assert.
5215 struct test_static_assert
5216 {
5217   int x;
5218   _Static_assert (sizeof (int) <= sizeof (long int),
5219                   "_Static_assert does not work in struct");
5220   long int y;
5221 };
5222
5223 // Check UTF-8 literals.
5224 #define u8 syntax error!
5225 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5226
5227 // Check duplicate typedefs.
5228 typedef long *long_ptr;
5229 typedef long int *long_ptr;
5230 typedef long_ptr long_ptr;
5231
5232 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5233 struct anonymous
5234 {
5235   union {
5236     struct { int i; int j; };
5237     struct { int k; long int l; } w;
5238   };
5239   int m;
5240 } v1;
5241
5242 int
5243 main (void)
5244 {
5245
5246   // Check bool.
5247   _Bool success = false;
5248
5249   // Check restrict.
5250   if (test_restrict ("String literal") == 0)
5251     success = true;
5252   char *restrict newvar = "Another string";
5253
5254   // Check varargs.
5255   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5256   test_varargs_macros ();
5257
5258   // Check flexible array members.
5259   struct incomplete_array *ia =
5260     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5261   ia->datasize = 10;
5262   for (int i = 0; i < ia->datasize; ++i)
5263     ia->data[i] = i * 1.234;
5264
5265   // Check named initializers.
5266   struct named_init ni = {
5267     .number = 34,
5268     .name = L"Test wide string",
5269     .average = 543.34343,
5270   };
5271
5272   ni.number = 58;
5273
5274   int dynamic_array[ni.number];
5275   dynamic_array[ni.number - 1] = 543;
5276
5277   // work around unused variable warnings
5278   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5279           || dynamic_array[ni.number - 1] != 543);
5280
5281   v1.i = 2;
5282   v1.w.k = 5;
5283   _Static_assert ((offsetof (struct anonymous, i)
5284                    == offsetof (struct anonymous, w.k)),
5285                   "Anonymous union alignment botch");
5286
5287   ;
5288   return 0;
5289 }
5290 _ACEOF
5291 for ac_arg in '' -std=gnu11
5292 do
5293   CC="$ac_save_CC $ac_arg"
5294   if ac_fn_c_try_compile "$LINENO"
5295 then :
5296   ac_cv_prog_cc_c11=$ac_arg
5297 fi
5298 rm -f core conftest.err conftest.$ac_objext
5299   test "x$ac_cv_prog_cc_c11" != "xno" && break
5300 done
5301 rm -f conftest.$ac_ext
5302 CC=$ac_save_CC
5303
5304 fi
5305 # AC_CACHE_VAL
5306 ac_prog_cc_stdc_options=
5307 case "x$ac_cv_prog_cc_c11" in
5308   x)
5309     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5310 printf "%s\n" "none needed" >&6; } ;;
5311   xno)
5312     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5313 printf "%s\n" "unsupported" >&6; } ;;
5314   *)
5315     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5316     CC=$CC$ac_prog_cc_stdc_options
5317     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5318 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5319 esac
5320 if test "x$ac_cv_prog_cc_c11" != xno
5321 then :
5322   ac_prog_cc_stdc=c11
5323                  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5324 else
5325   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5326 printf %s "checking for $CC option to enable C99 features... " >&6; }
5327 if test ${ac_cv_prog_cc_c99+y}
5328 then :
5329   printf %s "(cached) " >&6
5330 else
5331   ac_cv_prog_cc_c99=no
5332 ac_save_CC=$CC
5333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5334 /* end confdefs.h.  */
5335 #include <stdarg.h>
5336 #include <stdbool.h>
5337 #include <stddef.h>
5338 #include <stdlib.h>
5339 #include <wchar.h>
5340 #include <stdio.h>
5341
5342 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5343 #define debug(...) fprintf (stderr, __VA_ARGS__)
5344 #define showlist(...) puts (#__VA_ARGS__)
5345 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5346 static void
5347 test_varargs_macros (void)
5348 {
5349   int x = 1234;
5350   int y = 5678;
5351   debug ("Flag");
5352   debug ("X = %d\n", x);
5353   showlist (The first, second, and third items.);
5354   report (x>y, "x is %d but y is %d", x, y);
5355 }
5356
5357 // Check long long types.
5358 #define BIG64 18446744073709551615ull
5359 #define BIG32 4294967295ul
5360 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5361 #if !BIG_OK
5362   your preprocessor is broken;
5363 #endif
5364 #if BIG_OK
5365 #else
5366   your preprocessor is broken;
5367 #endif
5368 static long long int bignum = -9223372036854775807LL;
5369 static unsigned long long int ubignum = BIG64;
5370
5371 struct incomplete_array
5372 {
5373   int datasize;
5374   double data[];
5375 };
5376
5377 struct named_init {
5378   int number;
5379   const wchar_t *name;
5380   double average;
5381 };
5382
5383 typedef const char *ccp;
5384
5385 static inline int
5386 test_restrict (ccp restrict text)
5387 {
5388   // See if C++-style comments work.
5389   // Iterate through items via the restricted pointer.
5390   // Also check for declarations in for loops.
5391   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5392     continue;
5393   return 0;
5394 }
5395
5396 // Check varargs and va_copy.
5397 static bool
5398 test_varargs (const char *format, ...)
5399 {
5400   va_list args;
5401   va_start (args, format);
5402   va_list args_copy;
5403   va_copy (args_copy, args);
5404
5405   const char *str = "";
5406   int number = 0;
5407   float fnumber = 0;
5408
5409   while (*format)
5410     {
5411       switch (*format++)
5412         {
5413         case 's': // string
5414           str = va_arg (args_copy, const char *);
5415           break;
5416         case 'd': // int
5417           number = va_arg (args_copy, int);
5418           break;
5419         case 'f': // float
5420           fnumber = va_arg (args_copy, double);
5421           break;
5422         default:
5423           break;
5424         }
5425     }
5426   va_end (args_copy);
5427   va_end (args);
5428
5429   return *str && number && fnumber;
5430 }
5431 int
5432 main (void)
5433 {
5434
5435   // Check bool.
5436   _Bool success = false;
5437
5438   // Check restrict.
5439   if (test_restrict ("String literal") == 0)
5440     success = true;
5441   char *restrict newvar = "Another string";
5442
5443   // Check varargs.
5444   success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5445   test_varargs_macros ();
5446
5447   // Check flexible array members.
5448   struct incomplete_array *ia =
5449     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5450   ia->datasize = 10;
5451   for (int i = 0; i < ia->datasize; ++i)
5452     ia->data[i] = i * 1.234;
5453
5454   // Check named initializers.
5455   struct named_init ni = {
5456     .number = 34,
5457     .name = L"Test wide string",
5458     .average = 543.34343,
5459   };
5460
5461   ni.number = 58;
5462
5463   int dynamic_array[ni.number];
5464   dynamic_array[ni.number - 1] = 543;
5465
5466   // work around unused variable warnings
5467   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5468           || dynamic_array[ni.number - 1] != 543);
5469
5470   ;
5471   return 0;
5472 }
5473 _ACEOF
5474 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5475 do
5476   CC="$ac_save_CC $ac_arg"
5477   if ac_fn_c_try_compile "$LINENO"
5478 then :
5479   ac_cv_prog_cc_c99=$ac_arg
5480 fi
5481 rm -f core conftest.err conftest.$ac_objext
5482   test "x$ac_cv_prog_cc_c99" != "xno" && break
5483 done
5484 rm -f conftest.$ac_ext
5485 CC=$ac_save_CC
5486
5487 fi
5488 # AC_CACHE_VAL
5489 ac_prog_cc_stdc_options=
5490 case "x$ac_cv_prog_cc_c99" in
5491   x)
5492     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5493 printf "%s\n" "none needed" >&6; } ;;
5494   xno)
5495     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5496 printf "%s\n" "unsupported" >&6; } ;;
5497   *)
5498     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5499     CC=$CC$ac_prog_cc_stdc_options
5500     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5501 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5502 esac
5503 if test "x$ac_cv_prog_cc_c99" != xno
5504 then :
5505   ac_prog_cc_stdc=c99
5506                     ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5507 else
5508   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5509 printf %s "checking for $CC option to enable C89 features... " >&6; }
5510 if test ${ac_cv_prog_cc_c89+y}
5511 then :
5512   printf %s "(cached) " >&6
5513 else
5514   ac_cv_prog_cc_c89=no
5515 ac_save_CC=$CC
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517 /* end confdefs.h.  */
5518 #include <stdarg.h>
5519 #include <stdio.h>
5520 struct stat;
5521 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5522 struct buf { int x; };
5523 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5524 static char *e (p, i)
5525      char **p;
5526      int i;
5527 {
5528   return p[i];
5529 }
5530 static char *f (char * (*g) (char **, int), char **p, ...)
5531 {
5532   char *s;
5533   va_list v;
5534   va_start (v,p);
5535   s = g (p, va_arg (v,int));
5536   va_end (v);
5537   return s;
5538 }
5539
5540 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5541    function prototypes and stuff, but not '\xHH' hex character constants.
5542    These don't provoke an error unfortunately, instead are silently treated
5543    as 'x'.  The following induces an error, until -std is added to get
5544    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5545    array size at least.  It's necessary to write '\x00'==0 to get something
5546    that's true only with -std.  */
5547 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5548
5549 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5550    inside strings and character constants.  */
5551 #define FOO(x) 'x'
5552 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5553
5554 int test (int i, double x);
5555 struct s1 {int (*f) (int a);};
5556 struct s2 {int (*f) (double a);};
5557 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5558 int argc;
5559 char **argv;
5560 int
5561 main (void)
5562 {
5563 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5564   ;
5565   return 0;
5566 }
5567 _ACEOF
5568 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5569         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5570 do
5571   CC="$ac_save_CC $ac_arg"
5572   if ac_fn_c_try_compile "$LINENO"
5573 then :
5574   ac_cv_prog_cc_c89=$ac_arg
5575 fi
5576 rm -f core conftest.err conftest.$ac_objext
5577   test "x$ac_cv_prog_cc_c89" != "xno" && break
5578 done
5579 rm -f conftest.$ac_ext
5580 CC=$ac_save_CC
5581
5582 fi
5583 # AC_CACHE_VAL
5584 ac_prog_cc_stdc_options=
5585 case "x$ac_cv_prog_cc_c89" in
5586   x)
5587     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5588 printf "%s\n" "none needed" >&6; } ;;
5589   xno)
5590     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5591 printf "%s\n" "unsupported" >&6; } ;;
5592   *)
5593     ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5594     CC=$CC$ac_prog_cc_stdc_options
5595     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5596 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5597 esac
5598 if test "x$ac_cv_prog_cc_c89" != xno
5599 then :
5600   ac_prog_cc_stdc=c89
5601                        ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5602 else
5603   ac_prog_cc_stdc=no
5604                        ac_cv_prog_cc_stdc=no
5605 fi
5606
5607 fi
5608
5609 fi
5610
5611 ac_ext=c
5612 ac_cpp='$CPP $CPPFLAGS'
5613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5616
5617 ac_ext=c
5618 ac_cpp='$CPP $CPPFLAGS'
5619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5623 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5624 if test ${am_cv_prog_cc_c_o+y}
5625 then :
5626   printf %s "(cached) " >&6
5627 else
5628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5629 /* end confdefs.h.  */
5630
5631 int
5632 main (void)
5633 {
5634
5635   ;
5636   return 0;
5637 }
5638 _ACEOF
5639   # Make sure it works both with $CC and with simple cc.
5640   # Following AC_PROG_CC_C_O, we do the test twice because some
5641   # compilers refuse to overwrite an existing .o file with -o,
5642   # though they will create one.
5643   am_cv_prog_cc_c_o=yes
5644   for am_i in 1 2; do
5645     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5646    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5647    ac_status=$?
5648    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649    (exit $ac_status); } \
5650          && test -f conftest2.$ac_objext; then
5651       : OK
5652     else
5653       am_cv_prog_cc_c_o=no
5654       break
5655     fi
5656   done
5657   rm -f core conftest*
5658   unset am_i
5659 fi
5660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5661 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5662 if test "$am_cv_prog_cc_c_o" != yes; then
5663    # Losing compiler, so override with the script.
5664    # FIXME: It is wrong to rewrite CC.
5665    # But if we don't then we get into trouble of one sort or another.
5666    # A longer-term fix would be to have automake use am__CC in this case,
5667    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5668    CC="$am_aux_dir/compile $CC"
5669 fi
5670 ac_ext=c
5671 ac_cpp='$CPP $CPPFLAGS'
5672 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5673 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5674 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5675
5676
5677 depcc="$CC"   am_compiler_list=
5678
5679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5680 printf %s "checking dependency style of $depcc... " >&6; }
5681 if test ${am_cv_CC_dependencies_compiler_type+y}
5682 then :
5683   printf %s "(cached) " >&6
5684 else
5685   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5686   # We make a subdir and do the tests there.  Otherwise we can end up
5687   # making bogus files that we don't know about and never remove.  For
5688   # instance it was reported that on HP-UX the gcc test will end up
5689   # making a dummy file named 'D' -- because '-MD' means "put the output
5690   # in D".
5691   rm -rf conftest.dir
5692   mkdir conftest.dir
5693   # Copy depcomp to subdir because otherwise we won't find it if we're
5694   # using a relative directory.
5695   cp "$am_depcomp" conftest.dir
5696   cd conftest.dir
5697   # We will build objects and dependencies in a subdirectory because
5698   # it helps to detect inapplicable dependency modes.  For instance
5699   # both Tru64's cc and ICC support -MD to output dependencies as a
5700   # side effect of compilation, but ICC will put the dependencies in
5701   # the current directory while Tru64 will put them in the object
5702   # directory.
5703   mkdir sub
5704
5705   am_cv_CC_dependencies_compiler_type=none
5706   if test "$am_compiler_list" = ""; then
5707      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5708   fi
5709   am__universal=false
5710   case " $depcc " in #(
5711      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5712      esac
5713
5714   for depmode in $am_compiler_list; do
5715     # Setup a source with many dependencies, because some compilers
5716     # like to wrap large dependency lists on column 80 (with \), and
5717     # we should not choose a depcomp mode which is confused by this.
5718     #
5719     # We need to recreate these files for each test, as the compiler may
5720     # overwrite some of them when testing with obscure command lines.
5721     # This happens at least with the AIX C compiler.
5722     : > sub/conftest.c
5723     for i in 1 2 3 4 5 6; do
5724       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5725       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5726       # Solaris 10 /bin/sh.
5727       echo '/* dummy */' > sub/conftst$i.h
5728     done
5729     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5730
5731     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5732     # mode.  It turns out that the SunPro C++ compiler does not properly
5733     # handle '-M -o', and we need to detect this.  Also, some Intel
5734     # versions had trouble with output in subdirs.
5735     am__obj=sub/conftest.${OBJEXT-o}
5736     am__minus_obj="-o $am__obj"
5737     case $depmode in
5738     gcc)
5739       # This depmode causes a compiler race in universal mode.
5740       test "$am__universal" = false || continue
5741       ;;
5742     nosideeffect)
5743       # After this tag, mechanisms are not by side-effect, so they'll
5744       # only be used when explicitly requested.
5745       if test "x$enable_dependency_tracking" = xyes; then
5746         continue
5747       else
5748         break
5749       fi
5750       ;;
5751     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5752       # This compiler won't grok '-c -o', but also, the minuso test has
5753       # not run yet.  These depmodes are late enough in the game, and
5754       # so weak that their functioning should not be impacted.
5755       am__obj=conftest.${OBJEXT-o}
5756       am__minus_obj=
5757       ;;
5758     none) break ;;
5759     esac
5760     if depmode=$depmode \
5761        source=sub/conftest.c object=$am__obj \
5762        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5763        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5764          >/dev/null 2>conftest.err &&
5765        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5766        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5767        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5768        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5769       # icc doesn't choke on unknown options, it will just issue warnings
5770       # or remarks (even with -Werror).  So we grep stderr for any message
5771       # that says an option was ignored or not supported.
5772       # When given -MP, icc 7.0 and 7.1 complain thusly:
5773       #   icc: Command line warning: ignoring option '-M'; no argument required
5774       # The diagnosis changed in icc 8.0:
5775       #   icc: Command line remark: option '-MP' not supported
5776       if (grep 'ignoring option' conftest.err ||
5777           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5778         am_cv_CC_dependencies_compiler_type=$depmode
5779         break
5780       fi
5781     fi
5782   done
5783
5784   cd ..
5785   rm -rf conftest.dir
5786 else
5787   am_cv_CC_dependencies_compiler_type=none
5788 fi
5789
5790 fi
5791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5792 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5793 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5794
5795  if
5796   test "x$enable_dependency_tracking" != xno \
5797   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5798   am__fastdepCC_TRUE=
5799   am__fastdepCC_FALSE='#'
5800 else
5801   am__fastdepCC_TRUE='#'
5802   am__fastdepCC_FALSE=
5803 fi
5804
5805
5806
5807
5808 ac_ext=c
5809 ac_cpp='$CPP $CPPFLAGS'
5810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5814 printf %s "checking how to run the C preprocessor... " >&6; }
5815 # On Suns, sometimes $CPP names a directory.
5816 if test -n "$CPP" && test -d "$CPP"; then
5817   CPP=
5818 fi
5819 if test -z "$CPP"; then
5820   if test ${ac_cv_prog_CPP+y}
5821 then :
5822   printf %s "(cached) " >&6
5823 else
5824       # Double quotes because CPP needs to be expanded
5825     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5826     do
5827       ac_preproc_ok=false
5828 for ac_c_preproc_warn_flag in '' yes
5829 do
5830   # Use a header file that comes with gcc, so configuring glibc
5831   # with a fresh cross-compiler works.
5832   # On the NeXT, cc -E runs the code through the compiler's parser,
5833   # not just through cpp. "Syntax error" is here to catch this case.
5834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5835 /* end confdefs.h.  */
5836 #include <limits.h>
5837                      Syntax error
5838 _ACEOF
5839 if ac_fn_c_try_cpp "$LINENO"
5840 then :
5841
5842 else
5843   # Broken: fails on valid input.
5844 continue
5845 fi
5846 rm -f conftest.err conftest.i conftest.$ac_ext
5847
5848   # OK, works on sane cases.  Now check whether nonexistent headers
5849   # can be detected and how.
5850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5851 /* end confdefs.h.  */
5852 #include <ac_nonexistent.h>
5853 _ACEOF
5854 if ac_fn_c_try_cpp "$LINENO"
5855 then :
5856   # Broken: success on invalid input.
5857 continue
5858 else
5859   # Passes both tests.
5860 ac_preproc_ok=:
5861 break
5862 fi
5863 rm -f conftest.err conftest.i conftest.$ac_ext
5864
5865 done
5866 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5867 rm -f conftest.i conftest.err conftest.$ac_ext
5868 if $ac_preproc_ok
5869 then :
5870   break
5871 fi
5872
5873     done
5874     ac_cv_prog_CPP=$CPP
5875
5876 fi
5877   CPP=$ac_cv_prog_CPP
5878 else
5879   ac_cv_prog_CPP=$CPP
5880 fi
5881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5882 printf "%s\n" "$CPP" >&6; }
5883 ac_preproc_ok=false
5884 for ac_c_preproc_warn_flag in '' yes
5885 do
5886   # Use a header file that comes with gcc, so configuring glibc
5887   # with a fresh cross-compiler works.
5888   # On the NeXT, cc -E runs the code through the compiler's parser,
5889   # not just through cpp. "Syntax error" is here to catch this case.
5890   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5891 /* end confdefs.h.  */
5892 #include <limits.h>
5893                      Syntax error
5894 _ACEOF
5895 if ac_fn_c_try_cpp "$LINENO"
5896 then :
5897
5898 else
5899   # Broken: fails on valid input.
5900 continue
5901 fi
5902 rm -f conftest.err conftest.i conftest.$ac_ext
5903
5904   # OK, works on sane cases.  Now check whether nonexistent headers
5905   # can be detected and how.
5906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5907 /* end confdefs.h.  */
5908 #include <ac_nonexistent.h>
5909 _ACEOF
5910 if ac_fn_c_try_cpp "$LINENO"
5911 then :
5912   # Broken: success on invalid input.
5913 continue
5914 else
5915   # Passes both tests.
5916 ac_preproc_ok=:
5917 break
5918 fi
5919 rm -f conftest.err conftest.i conftest.$ac_ext
5920
5921 done
5922 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5923 rm -f conftest.i conftest.err conftest.$ac_ext
5924 if $ac_preproc_ok
5925 then :
5926
5927 else
5928   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5929 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5930 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5931 See \`config.log' for more details" "$LINENO" 5; }
5932 fi
5933
5934 ac_ext=c
5935 ac_cpp='$CPP $CPPFLAGS'
5936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5939
5940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5941 printf %s "checking for grep that handles long lines and -e... " >&6; }
5942 if test ${ac_cv_path_GREP+y}
5943 then :
5944   printf %s "(cached) " >&6
5945 else
5946   if test -z "$GREP"; then
5947   ac_path_GREP_found=false
5948   # Loop through the user's path and test for each of PROGNAME-LIST
5949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5951 do
5952   IFS=$as_save_IFS
5953   case $as_dir in #(((
5954     '') as_dir=./ ;;
5955     */) ;;
5956     *) as_dir=$as_dir/ ;;
5957   esac
5958     for ac_prog in grep ggrep
5959    do
5960     for ac_exec_ext in '' $ac_executable_extensions; do
5961       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5962       as_fn_executable_p "$ac_path_GREP" || continue
5963 # Check for GNU ac_path_GREP and select it if it is found.
5964   # Check for GNU $ac_path_GREP
5965 case `"$ac_path_GREP" --version 2>&1` in
5966 *GNU*)
5967   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5968 *)
5969   ac_count=0
5970   printf %s 0123456789 >"conftest.in"
5971   while :
5972   do
5973     cat "conftest.in" "conftest.in" >"conftest.tmp"
5974     mv "conftest.tmp" "conftest.in"
5975     cp "conftest.in" "conftest.nl"
5976     printf "%s\n" 'GREP' >> "conftest.nl"
5977     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5978     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5979     as_fn_arith $ac_count + 1 && ac_count=$as_val
5980     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5981       # Best one so far, save it but keep looking for a better one
5982       ac_cv_path_GREP="$ac_path_GREP"
5983       ac_path_GREP_max=$ac_count
5984     fi
5985     # 10*(2^10) chars as input seems more than enough
5986     test $ac_count -gt 10 && break
5987   done
5988   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5989 esac
5990
5991       $ac_path_GREP_found && break 3
5992     done
5993   done
5994   done
5995 IFS=$as_save_IFS
5996   if test -z "$ac_cv_path_GREP"; then
5997     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5998   fi
5999 else
6000   ac_cv_path_GREP=$GREP
6001 fi
6002
6003 fi
6004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6005 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6006  GREP="$ac_cv_path_GREP"
6007
6008
6009 if test -n "$ac_tool_prefix"; then
6010   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
6011 set dummy ${ac_tool_prefix}nm; ac_word=$2
6012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013 printf %s "checking for $ac_word... " >&6; }
6014 if test ${ac_cv_prog_NM+y}
6015 then :
6016   printf %s "(cached) " >&6
6017 else
6018   if test -n "$NM"; then
6019   ac_cv_prog_NM="$NM" # Let the user override the test.
6020 else
6021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022 for as_dir in $PATH
6023 do
6024   IFS=$as_save_IFS
6025   case $as_dir in #(((
6026     '') as_dir=./ ;;
6027     */) ;;
6028     *) as_dir=$as_dir/ ;;
6029   esac
6030     for ac_exec_ext in '' $ac_executable_extensions; do
6031   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6032     ac_cv_prog_NM="${ac_tool_prefix}nm"
6033     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6034     break 2
6035   fi
6036 done
6037   done
6038 IFS=$as_save_IFS
6039
6040 fi
6041 fi
6042 NM=$ac_cv_prog_NM
6043 if test -n "$NM"; then
6044   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
6045 printf "%s\n" "$NM" >&6; }
6046 else
6047   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048 printf "%s\n" "no" >&6; }
6049 fi
6050
6051
6052 fi
6053 if test -z "$ac_cv_prog_NM"; then
6054   ac_ct_NM=$NM
6055   # Extract the first word of "nm", so it can be a program name with args.
6056 set dummy nm; ac_word=$2
6057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6058 printf %s "checking for $ac_word... " >&6; }
6059 if test ${ac_cv_prog_ac_ct_NM+y}
6060 then :
6061   printf %s "(cached) " >&6
6062 else
6063   if test -n "$ac_ct_NM"; then
6064   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
6065 else
6066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067 for as_dir in $PATH
6068 do
6069   IFS=$as_save_IFS
6070   case $as_dir in #(((
6071     '') as_dir=./ ;;
6072     */) ;;
6073     *) as_dir=$as_dir/ ;;
6074   esac
6075     for ac_exec_ext in '' $ac_executable_extensions; do
6076   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6077     ac_cv_prog_ac_ct_NM="nm"
6078     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6079     break 2
6080   fi
6081 done
6082   done
6083 IFS=$as_save_IFS
6084
6085 fi
6086 fi
6087 ac_ct_NM=$ac_cv_prog_ac_ct_NM
6088 if test -n "$ac_ct_NM"; then
6089   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
6090 printf "%s\n" "$ac_ct_NM" >&6; }
6091 else
6092   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093 printf "%s\n" "no" >&6; }
6094 fi
6095
6096   if test "x$ac_ct_NM" = x; then
6097     NM="nm"
6098   else
6099     case $cross_compiling:$ac_tool_warned in
6100 yes:)
6101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6102 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6103 ac_tool_warned=yes ;;
6104 esac
6105     NM=$ac_ct_NM
6106   fi
6107 else
6108   NM="$ac_cv_prog_NM"
6109 fi
6110
6111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6112 printf %s "checking whether ln -s works... " >&6; }
6113 LN_S=$as_ln_s
6114 if test "$LN_S" = "ln -s"; then
6115   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6116 printf "%s\n" "yes" >&6; }
6117 else
6118   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6119 printf "%s\n" "no, using $LN_S" >&6; }
6120 fi
6121
6122 if test -n "$ac_tool_prefix"; then
6123   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6124 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126 printf %s "checking for $ac_word... " >&6; }
6127 if test ${ac_cv_prog_RANLIB+y}
6128 then :
6129   printf %s "(cached) " >&6
6130 else
6131   if test -n "$RANLIB"; then
6132   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6133 else
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135 for as_dir in $PATH
6136 do
6137   IFS=$as_save_IFS
6138   case $as_dir in #(((
6139     '') as_dir=./ ;;
6140     */) ;;
6141     *) as_dir=$as_dir/ ;;
6142   esac
6143     for ac_exec_ext in '' $ac_executable_extensions; do
6144   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6145     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6146     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6147     break 2
6148   fi
6149 done
6150   done
6151 IFS=$as_save_IFS
6152
6153 fi
6154 fi
6155 RANLIB=$ac_cv_prog_RANLIB
6156 if test -n "$RANLIB"; then
6157   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6158 printf "%s\n" "$RANLIB" >&6; }
6159 else
6160   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161 printf "%s\n" "no" >&6; }
6162 fi
6163
6164
6165 fi
6166 if test -z "$ac_cv_prog_RANLIB"; then
6167   ac_ct_RANLIB=$RANLIB
6168   # Extract the first word of "ranlib", so it can be a program name with args.
6169 set dummy ranlib; ac_word=$2
6170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6171 printf %s "checking for $ac_word... " >&6; }
6172 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6173 then :
6174   printf %s "(cached) " >&6
6175 else
6176   if test -n "$ac_ct_RANLIB"; then
6177   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6178 else
6179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180 for as_dir in $PATH
6181 do
6182   IFS=$as_save_IFS
6183   case $as_dir in #(((
6184     '') as_dir=./ ;;
6185     */) ;;
6186     *) as_dir=$as_dir/ ;;
6187   esac
6188     for ac_exec_ext in '' $ac_executable_extensions; do
6189   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6190     ac_cv_prog_ac_ct_RANLIB="ranlib"
6191     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6192     break 2
6193   fi
6194 done
6195   done
6196 IFS=$as_save_IFS
6197
6198 fi
6199 fi
6200 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6201 if test -n "$ac_ct_RANLIB"; then
6202   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6203 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6204 else
6205   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206 printf "%s\n" "no" >&6; }
6207 fi
6208
6209   if test "x$ac_ct_RANLIB" = x; then
6210     RANLIB=":"
6211   else
6212     case $cross_compiling:$ac_tool_warned in
6213 yes:)
6214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6215 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6216 ac_tool_warned=yes ;;
6217 esac
6218     RANLIB=$ac_ct_RANLIB
6219   fi
6220 else
6221   RANLIB="$ac_cv_prog_RANLIB"
6222 fi
6223
6224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-compliant shell" >&5
6225 printf %s "checking for a POSIX-compliant shell... " >&6; }
6226    if test ${ac_cv_path_shell+y}
6227 then :
6228   printf %s "(cached) " >&6
6229 else
6230   ac_command='
6231         # Test the noclobber option, using the portable POSIX.2 syntax.
6232         set -C
6233         rm -f conftest.c
6234         >conftest.c || exit
6235         >|conftest.c || exit
6236         !>conftest.c || exit
6237         # Test that $(...) works.
6238         test "$(expr 3 + 4)" -eq 7 || exit
6239       '
6240       # Solaris 11 /bin/sh (AT&T Research) 93u 2011-02-08 has a file
6241       # descriptor bug that breaks zgrep and is hard to test for
6242       # directly.  At some point $(...) is reading a pipe from the
6243       # subshell, but the pipe is also open in the parent shell, so
6244       # the read deadlocks.  Prefer some other shell if available.
6245       ac_maybe_solaris_sh_bug='test "${.sh.version}"'
6246
6247       ac_cv_path_shell=no
6248
6249       case $SHELL in
6250       /*)
6251         rm -f conftest.c
6252         if ("$SHELL" -c "$ac_command") 2>/dev/null; then
6253           "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null ||
6254             ac_cv_path_shell=$SHELL
6255         fi
6256       esac
6257
6258       case $ac_cv_path_shell in
6259       no)
6260         # Prefer shells that are more likely to be installed in the
6261         # same place on all hosts of this platform.  Therefore, prefer
6262         # shells in /bin and /usr/bin to shells in the installer's
6263         # PATH.  Also, loop through PATH first and then through
6264         # shells, since less-"nice" shells in /bin and /usr/bin are
6265         # more likely to be installed than "nicer" shells elsewhere.
6266         ac_break_if_good_shell=:
6267         as_save_IFS=$IFS; IFS=:
6268         for as_dir in /bin /usr/bin $PATH
6269         do
6270           IFS=$as_save_IFS
6271           case $as_dir in
6272           /*)
6273             for ac_base in sh bash ksh sh5; do
6274               rm -f conftest.c
6275               if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then
6276                 if "$as_dir/$ac_base" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null
6277                 then
6278                   test "$ac_cv_path_shell" = no
6279                 else
6280                   ac_break_if_good_shell=break
6281                   :
6282                 fi && ac_cv_path_shell=$as_dir/$ac_base
6283                 $ac_break_if_good_shell
6284               fi
6285             done
6286             $ac_break_if_good_shell
6287           esac
6288         done
6289         rm -f conftest.c
6290       esac
6291 fi
6292
6293    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_shell" >&5
6294 printf "%s\n" "$ac_cv_path_shell" >&6; }
6295    SHELL=$ac_cv_path_shell
6296    if test "$SHELL" = no; then
6297      SHELL=/bin/sh
6298      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it does not conform to POSIX" >&5
6299 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it does not conform to POSIX" >&2;}
6300    fi
6301    if "$SHELL" -c "$ac_maybe_solaris_sh_bug" 2>/dev/null; then
6302      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using $SHELL, even though it may have file descriptor bugs" >&5
6303 printf "%s\n" "$as_me: WARNING: using $SHELL, even though it may have file descriptor bugs" >&2;}
6304    fi
6305
6306
6307
6308 ac_header= ac_cache=
6309 for ac_item in $ac_header_c_list
6310 do
6311   if test $ac_cache; then
6312     ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6313     if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6314       printf "%s\n" "#define $ac_item 1" >> confdefs.h
6315     fi
6316     ac_header= ac_cache=
6317   elif test $ac_header; then
6318     ac_cache=$ac_item
6319   else
6320     ac_header=$ac_item
6321   fi
6322 done
6323
6324
6325
6326
6327
6328
6329 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
6330
6331 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
6332
6333 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6334
6335
6336   ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6337 if test "x$ac_cv_header_minix_config_h" = xyes
6338 then :
6339   MINIX=yes
6340 else
6341   MINIX=
6342 fi
6343
6344   if test "$MINIX" = yes; then
6345
6346 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6347
6348
6349 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6350
6351
6352 printf "%s\n" "#define _MINIX 1" >>confdefs.h
6353
6354
6355 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6356
6357   fi
6358
6359
6360   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6361 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6362 if test ${ac_cv_safe_to_define___extensions__+y}
6363 then :
6364   printf %s "(cached) " >&6
6365 else
6366   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367 /* end confdefs.h.  */
6368
6369 #         define __EXTENSIONS__ 1
6370           $ac_includes_default
6371 int
6372 main (void)
6373 {
6374
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 if ac_fn_c_try_compile "$LINENO"
6380 then :
6381   ac_cv_safe_to_define___extensions__=yes
6382 else
6383   ac_cv_safe_to_define___extensions__=no
6384 fi
6385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6386 fi
6387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6388 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6389   test $ac_cv_safe_to_define___extensions__ = yes &&
6390     printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6391
6392   printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6393
6394   printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6395
6396   printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6397
6398   printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6399
6400   printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6401
6402   printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6403
6404   printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6405
6406   printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6407
6408   printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6409
6410   printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6411
6412   printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6413
6414   printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6415
6416   printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6417
6418   printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6419
6420   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6421 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6422 if test ${ac_cv_should_define__xopen_source+y}
6423 then :
6424   printf %s "(cached) " >&6
6425 else
6426   ac_cv_should_define__xopen_source=no
6427      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6428 /* end confdefs.h.  */
6429
6430           #include <wchar.h>
6431           mbstate_t x;
6432 int
6433 main (void)
6434 {
6435
6436   ;
6437   return 0;
6438 }
6439 _ACEOF
6440 if ac_fn_c_try_compile "$LINENO"
6441 then :
6442
6443 else
6444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6445 /* end confdefs.h.  */
6446
6447              #define _XOPEN_SOURCE 500
6448              #include <wchar.h>
6449              mbstate_t x;
6450 int
6451 main (void)
6452 {
6453
6454   ;
6455   return 0;
6456 }
6457 _ACEOF
6458 if ac_fn_c_try_compile "$LINENO"
6459 then :
6460   ac_cv_should_define__xopen_source=yes
6461 fi
6462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6463 fi
6464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6465 fi
6466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6467 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6468   test $ac_cv_should_define__xopen_source = yes &&
6469     printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6480 printf %s "checking for egrep... " >&6; }
6481 if test ${ac_cv_path_EGREP+y}
6482 then :
6483   printf %s "(cached) " >&6
6484 else
6485   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6486    then ac_cv_path_EGREP="$GREP -E"
6487    else
6488      if test -z "$EGREP"; then
6489   ac_path_EGREP_found=false
6490   # Loop through the user's path and test for each of PROGNAME-LIST
6491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6493 do
6494   IFS=$as_save_IFS
6495   case $as_dir in #(((
6496     '') as_dir=./ ;;
6497     */) ;;
6498     *) as_dir=$as_dir/ ;;
6499   esac
6500     for ac_prog in egrep
6501    do
6502     for ac_exec_ext in '' $ac_executable_extensions; do
6503       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6504       as_fn_executable_p "$ac_path_EGREP" || continue
6505 # Check for GNU ac_path_EGREP and select it if it is found.
6506   # Check for GNU $ac_path_EGREP
6507 case `"$ac_path_EGREP" --version 2>&1` in
6508 *GNU*)
6509   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6510 *)
6511   ac_count=0
6512   printf %s 0123456789 >"conftest.in"
6513   while :
6514   do
6515     cat "conftest.in" "conftest.in" >"conftest.tmp"
6516     mv "conftest.tmp" "conftest.in"
6517     cp "conftest.in" "conftest.nl"
6518     printf "%s\n" 'EGREP' >> "conftest.nl"
6519     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6520     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6521     as_fn_arith $ac_count + 1 && ac_count=$as_val
6522     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6523       # Best one so far, save it but keep looking for a better one
6524       ac_cv_path_EGREP="$ac_path_EGREP"
6525       ac_path_EGREP_max=$ac_count
6526     fi
6527     # 10*(2^10) chars as input seems more than enough
6528     test $ac_count -gt 10 && break
6529   done
6530   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6531 esac
6532
6533       $ac_path_EGREP_found && break 3
6534     done
6535   done
6536   done
6537 IFS=$as_save_IFS
6538   if test -z "$ac_cv_path_EGREP"; then
6539     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6540   fi
6541 else
6542   ac_cv_path_EGREP=$EGREP
6543 fi
6544
6545    fi
6546 fi
6547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6548 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6549  EGREP="$ac_cv_path_EGREP"
6550
6551
6552
6553
6554
6555   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6556 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6557 if test ${gl_cv_c_amsterdam_compiler+y}
6558 then :
6559   printf %s "(cached) " >&6
6560 else
6561
6562       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6563 /* end confdefs.h.  */
6564
6565 #ifdef __ACK__
6566 Amsterdam
6567 #endif
6568
6569 _ACEOF
6570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6571   $EGREP "Amsterdam" >/dev/null 2>&1
6572 then :
6573   gl_cv_c_amsterdam_compiler=yes
6574 else
6575   gl_cv_c_amsterdam_compiler=no
6576 fi
6577 rm -rf conftest*
6578
6579
6580 fi
6581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6582 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6583
6584       if test $gl_cv_c_amsterdam_compiler = yes; then
6585     if test -z "$AR"; then
6586       AR='cc -c.a'
6587     fi
6588     if test -z "$ARFLAGS"; then
6589       ARFLAGS='-o'
6590     fi
6591   else
6592                                                 :
6593   fi
6594
6595         if test -n "$ac_tool_prefix"; then
6596   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6597 set dummy ${ac_tool_prefix}ar; ac_word=$2
6598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599 printf %s "checking for $ac_word... " >&6; }
6600 if test ${ac_cv_prog_AR+y}
6601 then :
6602   printf %s "(cached) " >&6
6603 else
6604   if test -n "$AR"; then
6605   ac_cv_prog_AR="$AR" # Let the user override the test.
6606 else
6607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6608 for as_dir in $PATH
6609 do
6610   IFS=$as_save_IFS
6611   case $as_dir in #(((
6612     '') as_dir=./ ;;
6613     */) ;;
6614     *) as_dir=$as_dir/ ;;
6615   esac
6616     for ac_exec_ext in '' $ac_executable_extensions; do
6617   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6618     ac_cv_prog_AR="${ac_tool_prefix}ar"
6619     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6620     break 2
6621   fi
6622 done
6623   done
6624 IFS=$as_save_IFS
6625
6626 fi
6627 fi
6628 AR=$ac_cv_prog_AR
6629 if test -n "$AR"; then
6630   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6631 printf "%s\n" "$AR" >&6; }
6632 else
6633   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6634 printf "%s\n" "no" >&6; }
6635 fi
6636
6637
6638 fi
6639 if test -z "$ac_cv_prog_AR"; then
6640   ac_ct_AR=$AR
6641   # Extract the first word of "ar", so it can be a program name with args.
6642 set dummy ar; ac_word=$2
6643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644 printf %s "checking for $ac_word... " >&6; }
6645 if test ${ac_cv_prog_ac_ct_AR+y}
6646 then :
6647   printf %s "(cached) " >&6
6648 else
6649   if test -n "$ac_ct_AR"; then
6650   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6651 else
6652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6653 for as_dir in $PATH
6654 do
6655   IFS=$as_save_IFS
6656   case $as_dir in #(((
6657     '') as_dir=./ ;;
6658     */) ;;
6659     *) as_dir=$as_dir/ ;;
6660   esac
6661     for ac_exec_ext in '' $ac_executable_extensions; do
6662   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6663     ac_cv_prog_ac_ct_AR="ar"
6664     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6665     break 2
6666   fi
6667 done
6668   done
6669 IFS=$as_save_IFS
6670
6671 fi
6672 fi
6673 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6674 if test -n "$ac_ct_AR"; then
6675   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6676 printf "%s\n" "$ac_ct_AR" >&6; }
6677 else
6678   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679 printf "%s\n" "no" >&6; }
6680 fi
6681
6682   if test "x$ac_ct_AR" = x; then
6683     AR="ar"
6684   else
6685     case $cross_compiling:$ac_tool_warned in
6686 yes:)
6687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6688 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6689 ac_tool_warned=yes ;;
6690 esac
6691     AR=$ac_ct_AR
6692   fi
6693 else
6694   AR="$ac_cv_prog_AR"
6695 fi
6696
6697   if test -z "$ARFLAGS"; then
6698     ARFLAGS='cr'
6699   fi
6700
6701
6702
6703   if test -z "$RANLIB"; then
6704     if test $gl_cv_c_amsterdam_compiler = yes; then
6705       RANLIB=':'
6706     else
6707             if test -n "$ac_tool_prefix"; then
6708   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6709 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711 printf %s "checking for $ac_word... " >&6; }
6712 if test ${ac_cv_prog_RANLIB+y}
6713 then :
6714   printf %s "(cached) " >&6
6715 else
6716   if test -n "$RANLIB"; then
6717   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6718 else
6719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6720 for as_dir in $PATH
6721 do
6722   IFS=$as_save_IFS
6723   case $as_dir in #(((
6724     '') as_dir=./ ;;
6725     */) ;;
6726     *) as_dir=$as_dir/ ;;
6727   esac
6728     for ac_exec_ext in '' $ac_executable_extensions; do
6729   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6730     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6731     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6732     break 2
6733   fi
6734 done
6735   done
6736 IFS=$as_save_IFS
6737
6738 fi
6739 fi
6740 RANLIB=$ac_cv_prog_RANLIB
6741 if test -n "$RANLIB"; then
6742   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6743 printf "%s\n" "$RANLIB" >&6; }
6744 else
6745   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746 printf "%s\n" "no" >&6; }
6747 fi
6748
6749
6750 fi
6751 if test -z "$ac_cv_prog_RANLIB"; then
6752   ac_ct_RANLIB=$RANLIB
6753   # Extract the first word of "ranlib", so it can be a program name with args.
6754 set dummy ranlib; ac_word=$2
6755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6756 printf %s "checking for $ac_word... " >&6; }
6757 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6758 then :
6759   printf %s "(cached) " >&6
6760 else
6761   if test -n "$ac_ct_RANLIB"; then
6762   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6763 else
6764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6765 for as_dir in $PATH
6766 do
6767   IFS=$as_save_IFS
6768   case $as_dir in #(((
6769     '') as_dir=./ ;;
6770     */) ;;
6771     *) as_dir=$as_dir/ ;;
6772   esac
6773     for ac_exec_ext in '' $ac_executable_extensions; do
6774   if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6775     ac_cv_prog_ac_ct_RANLIB="ranlib"
6776     printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6777     break 2
6778   fi
6779 done
6780   done
6781 IFS=$as_save_IFS
6782
6783 fi
6784 fi
6785 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6786 if test -n "$ac_ct_RANLIB"; then
6787   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6788 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6789 else
6790   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6791 printf "%s\n" "no" >&6; }
6792 fi
6793
6794   if test "x$ac_ct_RANLIB" = x; then
6795     RANLIB=":"
6796   else
6797     case $cross_compiling:$ac_tool_warned in
6798 yes:)
6799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6800 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6801 ac_tool_warned=yes ;;
6802 esac
6803     RANLIB=$ac_ct_RANLIB
6804   fi
6805 else
6806   RANLIB="$ac_cv_prog_RANLIB"
6807 fi
6808
6809     fi
6810   fi
6811
6812
6813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6814 printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6815 if test ${ac_cv_sys_largefile_source+y}
6816 then :
6817   printf %s "(cached) " >&6
6818 else
6819   while :; do
6820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6821 /* end confdefs.h.  */
6822 #include <sys/types.h> /* for off_t */
6823      #include <stdio.h>
6824 int
6825 main (void)
6826 {
6827 int (*fp) (FILE *, off_t, int) = fseeko;
6828      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6829   ;
6830   return 0;
6831 }
6832 _ACEOF
6833 if ac_fn_c_try_link "$LINENO"
6834 then :
6835   ac_cv_sys_largefile_source=no; break
6836 fi
6837 rm -f core conftest.err conftest.$ac_objext \
6838     conftest$ac_exeext conftest.$ac_ext
6839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6840 /* end confdefs.h.  */
6841 #define _LARGEFILE_SOURCE 1
6842 #include <sys/types.h> /* for off_t */
6843      #include <stdio.h>
6844 int
6845 main (void)
6846 {
6847 int (*fp) (FILE *, off_t, int) = fseeko;
6848      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6849   ;
6850   return 0;
6851 }
6852 _ACEOF
6853 if ac_fn_c_try_link "$LINENO"
6854 then :
6855   ac_cv_sys_largefile_source=1; break
6856 fi
6857 rm -f core conftest.err conftest.$ac_objext \
6858     conftest$ac_exeext conftest.$ac_ext
6859   ac_cv_sys_largefile_source=unknown
6860   break
6861 done
6862 fi
6863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6864 printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
6865 case $ac_cv_sys_largefile_source in #(
6866   no | unknown) ;;
6867   *)
6868 printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
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       # <https://backdrift.org/man/tru64/man3/ieee.3.html>
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 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
7112 ;;
7113 esac
7114 rm -rf conftest*
7115   if test $ac_cv_sys_file_offset_bits = unknown; then
7116     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7117 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
7118 if test ${ac_cv_sys_large_files+y}
7119 then :
7120   printf %s "(cached) " >&6
7121 else
7122   while :; do
7123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7124 /* end confdefs.h.  */
7125 #include <sys/types.h>
7126  /* Check that off_t can represent 2**63 - 1 correctly.
7127     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7128     since some C++ compilers masquerading as C compilers
7129     incorrectly reject 9223372036854775807.  */
7130 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7131   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7132                        && LARGE_OFF_T % 2147483647 == 1)
7133                       ? 1 : -1];
7134 int
7135 main (void)
7136 {
7137
7138   ;
7139   return 0;
7140 }
7141 _ACEOF
7142 if ac_fn_c_try_compile "$LINENO"
7143 then :
7144   ac_cv_sys_large_files=no; break
7145 fi
7146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148 /* end confdefs.h.  */
7149 #define _LARGE_FILES 1
7150 #include <sys/types.h>
7151  /* Check that off_t can represent 2**63 - 1 correctly.
7152     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7153     since some C++ compilers masquerading as C compilers
7154     incorrectly reject 9223372036854775807.  */
7155 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7156   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7157                        && LARGE_OFF_T % 2147483647 == 1)
7158                       ? 1 : -1];
7159 int
7160 main (void)
7161 {
7162
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 if ac_fn_c_try_compile "$LINENO"
7168 then :
7169   ac_cv_sys_large_files=1; break
7170 fi
7171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7172   ac_cv_sys_large_files=unknown
7173   break
7174 done
7175 fi
7176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7177 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
7178 case $ac_cv_sys_large_files in #(
7179   no | unknown) ;;
7180   *)
7181 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
7182 ;;
7183 esac
7184 rm -rf conftest*
7185   fi
7186
7187
7188 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7189
7190 fi
7191
7192
7193
7194
7195
7196
7197   # Check whether --enable-threads was given.
7198 if test ${enable_threads+y}
7199 then :
7200   enableval=$enable_threads; gl_use_threads=$enableval
7201 else
7202   if test -n "$gl_use_threads_default"; then
7203        gl_use_threads="$gl_use_threads_default"
7204      else
7205        case "$host_os" in
7206                                                                osf*) gl_use_threads=no ;;
7207          cygwin*)
7208                case `uname -r` in
7209                  1.[0-5].*) gl_use_threads=no ;;
7210                  *)         gl_use_threads=yes ;;
7211                esac
7212                ;;
7213          *)    gl_use_threads=yes ;;
7214        esac
7215      fi
7216
7217 fi
7218
7219   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7220     # For using <pthread.h>:
7221     case "$host_os" in
7222       osf*)
7223         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7224         # groks <pthread.h>. cc also understands the flag -pthread, but
7225         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7226         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7227         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7228         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7229         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7230         ;;
7231     esac
7232     # Some systems optimize for single-threaded programs by default, and
7233     # need special flags to disable these optimizations. For example, the
7234     # definition of 'errno' in <errno.h>.
7235     case "$host_os" in
7236       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7237       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7238     esac
7239   fi
7240
7241
7242
7243   case "$host_os" in
7244     mingw*)
7245
7246 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
7247
7248       ;;
7249   esac
7250
7251
7252
7253   # Pre-early section.
7254
7255
7256
7257
7258   # Code from module absolute-header:
7259   # Code from module alloca-opt:
7260   # Code from module announce-gen:
7261   # Code from module assure:
7262   # Code from module at-internal:
7263   # Code from module calloc:
7264   # Code from module calloc-gnu:
7265   # Code from module calloc-posix:
7266   # Code from module chdir:
7267   # Code from module chdir-long:
7268   # Code from module clock-time:
7269   # Code from module cloexec:
7270   # Code from module close:
7271   # Code from module closedir:
7272   # Code from module dirent:
7273   # Code from module dirent-safer:
7274   # Code from module dirfd:
7275   # Code from module dirname-lgpl:
7276   # Code from module do-release-commit-and-tag:
7277   # Code from module dosname:
7278   # Code from module double-slash-root:
7279   # Code from module dup:
7280   # Code from module dup2:
7281   # Code from module errno:
7282   # Code from module error:
7283   # Code from module exitfail:
7284   # Code from module extensions:
7285   # Code from module extern-inline:
7286   # Code from module fchdir:
7287   # Code from module fclose:
7288   # Code from module fcntl:
7289   # Code from module fcntl-h:
7290   # Code from module fcntl-safer:
7291   # Code from module fd-hook:
7292   # Code from module fd-safer-flag:
7293   # Code from module fdatasync:
7294   # Code from module fdl:
7295   # Code from module fdopendir:
7296   # Code from module fflush:
7297
7298   # Code from module filename:
7299   # Code from module filenamecat-lgpl:
7300   # Code from module float:
7301   # Code from module fpieee:
7302
7303   # Code from module fprintf-posix:
7304   # Code from module fpucw:
7305   # Code from module fpurge:
7306   # Code from module freading:
7307   # Code from module frexp-nolibm:
7308   # Code from module frexpl-nolibm:
7309   # Code from module fseek:
7310   # Code from module fseeko:
7311
7312   # Code from module fseterr:
7313   # Code from module fstat:
7314   # Code from module fstatat:
7315   # Code from module fsync:
7316   # Code from module ftell:
7317   # Code from module ftello:
7318
7319   # Code from module gendocs:
7320   # Code from module getcwd-lgpl:
7321   # Code from module getdtablesize:
7322   # Code from module getopt-gnu:
7323   # Code from module getopt-posix:
7324   # Code from module getprogname:
7325   # Code from module gettext-h:
7326   # Code from module gettime:
7327   # Code from module gettimeofday:
7328   # Code from module git-version-gen:
7329   # Code from module gitlog-to-changelog:
7330   # Code from module gnu-make:
7331   # Code from module gnu-web-doc-update:
7332   # Code from module gnumakefile:
7333   # Code from module gnupload:
7334   # Code from module havelib:
7335   # Code from module host-cpu-c-abi:
7336   # Code from module ignore-value:
7337   # Code from module include_next:
7338   # Code from module intprops:
7339   # Code from module isnand-nolibm:
7340   # Code from module isnanf-nolibm:
7341   # Code from module isnanl-nolibm:
7342   # Code from module largefile:
7343
7344   # Code from module lib-ignore:
7345   # Code from module limits-h:
7346   # Code from module localtime-buffer:
7347   # Code from module lock:
7348   # Code from module lseek:
7349   # Code from module lstat:
7350   # Code from module maintainer-makefile:
7351   # Code from module malloc-gnu:
7352   # Code from module malloc-posix:
7353   # Code from module malloca:
7354   # Code from module manywarnings:
7355   # Code from module math:
7356   # Code from module memchr:
7357   # Code from module mempcpy:
7358   # Code from module memrchr:
7359   # Code from module msvc-inval:
7360   # Code from module msvc-nothrow:
7361   # Code from module multiarch:
7362   # Code from module nocrash:
7363   # Code from module open:
7364   # Code from module openat:
7365   # Code from module openat-die:
7366   # Code from module openat-h:
7367   # Code from module openat-safer:
7368   # Code from module opendir:
7369   # Code from module pathmax:
7370   # Code from module perror:
7371   # Code from module printf-frexp:
7372   # Code from module printf-frexpl:
7373   # Code from module printf-posix:
7374   # Code from module printf-safe:
7375   # Code from module readdir:
7376   # Code from module readme-release:
7377   # Code from module realloc-gnu:
7378   # Code from module realloc-posix:
7379   # Code from module rmdir:
7380   # Code from module save-cwd:
7381   # Code from module savedir:
7382   # Code from module signbit:
7383   # Code from module size_max:
7384   # Code from module snippet/_Noreturn:
7385   # Code from module snippet/arg-nonnull:
7386   # Code from module snippet/c++defs:
7387   # Code from module snippet/unused-parameter:
7388   # Code from module snippet/warn-on-use:
7389   # Code from module ssize_t:
7390   # Code from module stat:
7391   # Code from module stat-time:
7392   # Code from module statat:
7393   # Code from module stdbool:
7394   # Code from module stddef:
7395   # Code from module stdint:
7396   # Code from module stdio:
7397   # Code from module stdlib:
7398   # Code from module stdnoreturn:
7399   # Code from module stpcpy:
7400   # Code from module strdup-posix:
7401   # Code from module strerror:
7402   # Code from module strerror-override:
7403   # Code from module strerror_r-posix:
7404   # Code from module string:
7405   # Code from module sys_stat:
7406   # Code from module sys_time:
7407   # Code from module sys_types:
7408   # Code from module threadlib:
7409
7410
7411
7412   # Code from module time:
7413   # Code from module timespec:
7414   # Code from module unistd:
7415   # Code from module unistd-safer:
7416   # Code from module unlink:
7417   # Code from module unlinkat:
7418   # Code from module update-copyright:
7419   # Code from module useless-if-before-free:
7420   # Code from module utime:
7421   # Code from module utime-h:
7422   # Code from module utimens:
7423   # Code from module vasnprintf:
7424   # Code from module vc-list-files:
7425   # Code from module verify:
7426   # Code from module vfprintf-posix:
7427   # Code from module warnings:
7428   # Code from module wchar:
7429   # Code from module xalloc:
7430   # Code from module xalloc-die:
7431   # Code from module xalloc-oversized:
7432   # Code from module xsize:
7433   # Code from module year2038:
7434
7435   # Code from module yesno:
7436
7437
7438
7439
7440
7441
7442
7443           LIBC_FATAL_STDERR_=1
7444   export LIBC_FATAL_STDERR_
7445
7446 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7447 if test "x$ac_cv_type_size_t" = xyes
7448 then :
7449
7450 else
7451
7452 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
7453
7454 fi
7455
7456 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7457 # for constant arguments.  Useless!
7458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7459 printf %s "checking for working alloca.h... " >&6; }
7460 if test ${ac_cv_working_alloca_h+y}
7461 then :
7462   printf %s "(cached) " >&6
7463 else
7464   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7465 /* end confdefs.h.  */
7466 #include <alloca.h>
7467 int
7468 main (void)
7469 {
7470 char *p = (char *) alloca (2 * sizeof (int));
7471                           if (p) return 0;
7472   ;
7473   return 0;
7474 }
7475 _ACEOF
7476 if ac_fn_c_try_link "$LINENO"
7477 then :
7478   ac_cv_working_alloca_h=yes
7479 else
7480   ac_cv_working_alloca_h=no
7481 fi
7482 rm -f core conftest.err conftest.$ac_objext \
7483     conftest$ac_exeext conftest.$ac_ext
7484 fi
7485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7486 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7487 if test $ac_cv_working_alloca_h = yes; then
7488
7489 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7490
7491 fi
7492
7493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7494 printf %s "checking for alloca... " >&6; }
7495 if test ${ac_cv_func_alloca_works+y}
7496 then :
7497   printf %s "(cached) " >&6
7498 else
7499   if test $ac_cv_working_alloca_h = yes; then
7500   ac_cv_func_alloca_works=yes
7501 else
7502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503 /* end confdefs.h.  */
7504 #include <stdlib.h>
7505 #include <stddef.h>
7506 #ifndef alloca
7507 # ifdef __GNUC__
7508 #  define alloca __builtin_alloca
7509 # elif defined _MSC_VER
7510 #  include <malloc.h>
7511 #  define alloca _alloca
7512 # else
7513 #  ifdef  __cplusplus
7514 extern "C"
7515 #  endif
7516 void *alloca (size_t);
7517 # endif
7518 #endif
7519
7520 int
7521 main (void)
7522 {
7523 char *p = (char *) alloca (1);
7524                                     if (p) return 0;
7525   ;
7526   return 0;
7527 }
7528 _ACEOF
7529 if ac_fn_c_try_link "$LINENO"
7530 then :
7531   ac_cv_func_alloca_works=yes
7532 else
7533   ac_cv_func_alloca_works=no
7534 fi
7535 rm -f core conftest.err conftest.$ac_objext \
7536     conftest$ac_exeext conftest.$ac_ext
7537 fi
7538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7539 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7540 fi
7541
7542 if test $ac_cv_func_alloca_works = yes; then
7543
7544 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7545
7546 else
7547   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7548 # that cause trouble.  Some versions do not even contain alloca or
7549 # contain a buggy version.  If you still want to use their alloca,
7550 # use ar to extract alloca.o from them instead of compiling alloca.c.
7551
7552
7553
7554
7555
7556 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7557
7558 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7559
7560
7561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7562 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7563 if test ${ac_cv_os_cray+y}
7564 then :
7565   printf %s "(cached) " >&6
7566 else
7567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7568 /* end confdefs.h.  */
7569 #if defined CRAY && ! defined CRAY2
7570 webecray
7571 #else
7572 wenotbecray
7573 #endif
7574
7575 _ACEOF
7576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7577   $EGREP "webecray" >/dev/null 2>&1
7578 then :
7579   ac_cv_os_cray=yes
7580 else
7581   ac_cv_os_cray=no
7582 fi
7583 rm -rf conftest*
7584
7585 fi
7586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7587 printf "%s\n" "$ac_cv_os_cray" >&6; }
7588 if test $ac_cv_os_cray = yes; then
7589   for ac_func in _getb67 GETB67 getb67; do
7590     as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7591 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7592 if eval test \"x\$"$as_ac_var"\" = x"yes"
7593 then :
7594
7595 printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
7596
7597     break
7598 fi
7599
7600   done
7601 fi
7602
7603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7604 printf %s "checking stack direction for C alloca... " >&6; }
7605 if test ${ac_cv_c_stack_direction+y}
7606 then :
7607   printf %s "(cached) " >&6
7608 else
7609   if test "$cross_compiling" = yes
7610 then :
7611   ac_cv_c_stack_direction=0
7612 else
7613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614 /* end confdefs.h.  */
7615 $ac_includes_default
7616 int
7617 find_stack_direction (int *addr, int depth)
7618 {
7619   int dir, dummy = 0;
7620   if (! addr)
7621     addr = &dummy;
7622   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7623   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7624   return dir + dummy;
7625 }
7626
7627 int
7628 main (int argc, char **argv)
7629 {
7630   return find_stack_direction (0, argc + !argv + 20) < 0;
7631 }
7632 _ACEOF
7633 if ac_fn_c_try_run "$LINENO"
7634 then :
7635   ac_cv_c_stack_direction=1
7636 else
7637   ac_cv_c_stack_direction=-1
7638 fi
7639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7640   conftest.$ac_objext conftest.beam conftest.$ac_ext
7641 fi
7642
7643 fi
7644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7645 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7646 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
7647
7648
7649 fi
7650
7651
7652   GNULIB__EXIT=0;
7653   GNULIB_ATOLL=0;
7654   GNULIB_CALLOC_POSIX=0;
7655   GNULIB_CANONICALIZE_FILE_NAME=0;
7656   GNULIB_GETLOADAVG=0;
7657   GNULIB_GETSUBOPT=0;
7658   GNULIB_GRANTPT=0;
7659   GNULIB_MALLOC_POSIX=0;
7660   GNULIB_MBTOWC=0;
7661   GNULIB_MKDTEMP=0;
7662   GNULIB_MKOSTEMP=0;
7663   GNULIB_MKOSTEMPS=0;
7664   GNULIB_MKSTEMP=0;
7665   GNULIB_MKSTEMPS=0;
7666   GNULIB_POSIX_OPENPT=0;
7667   GNULIB_PTSNAME=0;
7668   GNULIB_PTSNAME_R=0;
7669   GNULIB_PUTENV=0;
7670   GNULIB_QSORT_R=0;
7671   GNULIB_RANDOM=0;
7672   GNULIB_RANDOM_R=0;
7673   GNULIB_REALLOCARRAY=0;
7674   GNULIB_REALLOC_POSIX=0;
7675   GNULIB_REALPATH=0;
7676   GNULIB_RPMATCH=0;
7677   GNULIB_SECURE_GETENV=0;
7678   GNULIB_SETENV=0;
7679   GNULIB_STRTOD=0;
7680   GNULIB_STRTOLL=0;
7681   GNULIB_STRTOULL=0;
7682   GNULIB_SYSTEM_POSIX=0;
7683   GNULIB_UNLOCKPT=0;
7684   GNULIB_UNSETENV=0;
7685   GNULIB_WCTOMB=0;
7686     HAVE__EXIT=1;
7687   HAVE_ATOLL=1;
7688   HAVE_CANONICALIZE_FILE_NAME=1;
7689   HAVE_DECL_GETLOADAVG=1;
7690   HAVE_GETSUBOPT=1;
7691   HAVE_GRANTPT=1;
7692   HAVE_DECL_INITSTATE=1;
7693   HAVE_MKDTEMP=1;
7694   HAVE_MKOSTEMP=1;
7695   HAVE_MKOSTEMPS=1;
7696   HAVE_MKSTEMP=1;
7697   HAVE_MKSTEMPS=1;
7698   HAVE_POSIX_OPENPT=1;
7699   HAVE_PTSNAME=1;
7700   HAVE_PTSNAME_R=1;
7701   HAVE_QSORT_R=1;
7702   HAVE_RANDOM=1;
7703   HAVE_RANDOM_H=1;
7704   HAVE_RANDOM_R=1;
7705   HAVE_REALLOCARRAY=1;
7706   HAVE_REALPATH=1;
7707   HAVE_RPMATCH=1;
7708   HAVE_SECURE_GETENV=1;
7709   HAVE_SETENV=1;
7710   HAVE_DECL_SETENV=1;
7711   HAVE_DECL_SETSTATE=1;
7712   HAVE_STRTOD=1;
7713   HAVE_STRTOLL=1;
7714   HAVE_STRTOULL=1;
7715   HAVE_STRUCT_RANDOM_DATA=1;
7716   HAVE_SYS_LOADAVG_H=0;
7717   HAVE_UNLOCKPT=1;
7718   HAVE_DECL_UNSETENV=1;
7719   REPLACE_CALLOC=0;
7720   REPLACE_CANONICALIZE_FILE_NAME=0;
7721   REPLACE_MALLOC=0;
7722   REPLACE_MBTOWC=0;
7723   REPLACE_MKSTEMP=0;
7724   REPLACE_PTSNAME=0;
7725   REPLACE_PTSNAME_R=0;
7726   REPLACE_PUTENV=0;
7727   REPLACE_QSORT_R=0;
7728   REPLACE_RANDOM_R=0;
7729   REPLACE_REALLOC=0;
7730   REPLACE_REALPATH=0;
7731   REPLACE_SETENV=0;
7732   REPLACE_STRTOD=0;
7733   REPLACE_UNSETENV=0;
7734   REPLACE_WCTOMB=0;
7735
7736
7737   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7738 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7739 if test ${gl_cv_func_malloc_posix+y}
7740 then :
7741   printf %s "(cached) " >&6
7742 else
7743
7744                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7745 /* end confdefs.h.  */
7746
7747 int
7748 main (void)
7749 {
7750 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7751              choke me
7752              #endif
7753
7754   ;
7755   return 0;
7756 }
7757 _ACEOF
7758 if ac_fn_c_try_compile "$LINENO"
7759 then :
7760   gl_cv_func_malloc_posix=yes
7761 else
7762   gl_cv_func_malloc_posix=no
7763 fi
7764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7765
7766 fi
7767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7768 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
7769
7770
7771   GNULIB_CHDIR=0;
7772   GNULIB_CHOWN=0;
7773   GNULIB_CLOSE=0;
7774   GNULIB_DUP=0;
7775   GNULIB_DUP2=0;
7776   GNULIB_DUP3=0;
7777   GNULIB_ENVIRON=0;
7778   GNULIB_EUIDACCESS=0;
7779   GNULIB_FACCESSAT=0;
7780   GNULIB_FCHDIR=0;
7781   GNULIB_FCHOWNAT=0;
7782   GNULIB_FDATASYNC=0;
7783   GNULIB_FSYNC=0;
7784   GNULIB_FTRUNCATE=0;
7785   GNULIB_GETCWD=0;
7786   GNULIB_GETDOMAINNAME=0;
7787   GNULIB_GETDTABLESIZE=0;
7788   GNULIB_GETGROUPS=0;
7789   GNULIB_GETHOSTNAME=0;
7790   GNULIB_GETLOGIN=0;
7791   GNULIB_GETLOGIN_R=0;
7792   GNULIB_GETPAGESIZE=0;
7793   GNULIB_GETUSERSHELL=0;
7794   GNULIB_GROUP_MEMBER=0;
7795   GNULIB_ISATTY=0;
7796   GNULIB_LCHOWN=0;
7797   GNULIB_LINK=0;
7798   GNULIB_LINKAT=0;
7799   GNULIB_LSEEK=0;
7800   GNULIB_PIPE=0;
7801   GNULIB_PIPE2=0;
7802   GNULIB_PREAD=0;
7803   GNULIB_PWRITE=0;
7804   GNULIB_READ=0;
7805   GNULIB_READLINK=0;
7806   GNULIB_READLINKAT=0;
7807   GNULIB_RMDIR=0;
7808   GNULIB_SETHOSTNAME=0;
7809   GNULIB_SLEEP=0;
7810   GNULIB_SYMLINK=0;
7811   GNULIB_SYMLINKAT=0;
7812   GNULIB_TRUNCATE=0;
7813   GNULIB_TTYNAME_R=0;
7814   GNULIB_UNISTD_H_NONBLOCKING=0;
7815   GNULIB_UNISTD_H_SIGPIPE=0;
7816   GNULIB_UNLINK=0;
7817   GNULIB_UNLINKAT=0;
7818   GNULIB_USLEEP=0;
7819   GNULIB_WRITE=0;
7820     HAVE_CHOWN=1;
7821   HAVE_DUP2=1;
7822   HAVE_DUP3=1;
7823   HAVE_EUIDACCESS=1;
7824   HAVE_FACCESSAT=1;
7825   HAVE_FCHDIR=1;
7826   HAVE_FCHOWNAT=1;
7827   HAVE_FDATASYNC=1;
7828   HAVE_FSYNC=1;
7829   HAVE_FTRUNCATE=1;
7830   HAVE_GETDTABLESIZE=1;
7831   HAVE_GETGROUPS=1;
7832   HAVE_GETHOSTNAME=1;
7833   HAVE_GETLOGIN=1;
7834   HAVE_GETPAGESIZE=1;
7835   HAVE_GROUP_MEMBER=1;
7836   HAVE_LCHOWN=1;
7837   HAVE_LINK=1;
7838   HAVE_LINKAT=1;
7839   HAVE_PIPE=1;
7840   HAVE_PIPE2=1;
7841   HAVE_PREAD=1;
7842   HAVE_PWRITE=1;
7843   HAVE_READLINK=1;
7844   HAVE_READLINKAT=1;
7845   HAVE_SETHOSTNAME=1;
7846   HAVE_SLEEP=1;
7847   HAVE_SYMLINK=1;
7848   HAVE_SYMLINKAT=1;
7849   HAVE_TRUNCATE=1;
7850   HAVE_UNLINKAT=1;
7851   HAVE_USLEEP=1;
7852   HAVE_DECL_ENVIRON=1;
7853   HAVE_DECL_FCHDIR=1;
7854   HAVE_DECL_FDATASYNC=1;
7855   HAVE_DECL_GETDOMAINNAME=1;
7856   HAVE_DECL_GETLOGIN=1;
7857   HAVE_DECL_GETLOGIN_R=1;
7858   HAVE_DECL_GETPAGESIZE=1;
7859   HAVE_DECL_GETUSERSHELL=1;
7860   HAVE_DECL_SETHOSTNAME=1;
7861   HAVE_DECL_TTYNAME_R=1;
7862   HAVE_OS_H=0;
7863   HAVE_SYS_PARAM_H=0;
7864   REPLACE_CHOWN=0;
7865   REPLACE_CLOSE=0;
7866   REPLACE_DUP=0;
7867   REPLACE_DUP2=0;
7868   REPLACE_FACCESSAT=0;
7869   REPLACE_FCHOWNAT=0;
7870   REPLACE_FTRUNCATE=0;
7871   REPLACE_GETCWD=0;
7872   REPLACE_GETDOMAINNAME=0;
7873   REPLACE_GETDTABLESIZE=0;
7874   REPLACE_GETLOGIN_R=0;
7875   REPLACE_GETGROUPS=0;
7876   REPLACE_GETPAGESIZE=0;
7877   REPLACE_ISATTY=0;
7878   REPLACE_LCHOWN=0;
7879   REPLACE_LINK=0;
7880   REPLACE_LINKAT=0;
7881   REPLACE_LSEEK=0;
7882   REPLACE_PREAD=0;
7883   REPLACE_PWRITE=0;
7884   REPLACE_READ=0;
7885   REPLACE_READLINK=0;
7886   REPLACE_READLINKAT=0;
7887   REPLACE_RMDIR=0;
7888   REPLACE_SLEEP=0;
7889   REPLACE_SYMLINK=0;
7890   REPLACE_SYMLINKAT=0;
7891   REPLACE_TRUNCATE=0;
7892   REPLACE_TTYNAME_R=0;
7893   REPLACE_UNLINK=0;
7894   REPLACE_UNLINKAT=0;
7895   REPLACE_USLEEP=0;
7896   REPLACE_WRITE=0;
7897   UNISTD_H_HAVE_WINSOCK2_H=0;
7898   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7899
7900
7901
7902
7903
7904
7905 ac_func=
7906 for ac_item in $ac_func_c_list
7907 do
7908   if test $ac_func; then
7909     ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
7910     if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
7911       echo "#define $ac_item 1" >> confdefs.h
7912     fi
7913     ac_func=
7914   else
7915     ac_func=$ac_item
7916   fi
7917 done
7918
7919
7920   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7921     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7922
7923 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7924
7925   else
7926     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7927   fi
7928
7929
7930
7931
7932
7933      GNULIB_OPENDIR=0;
7934   GNULIB_READDIR=0;
7935   GNULIB_REWINDDIR=0;
7936   GNULIB_CLOSEDIR=0;
7937   GNULIB_DIRFD=0;
7938   GNULIB_FDOPENDIR=0;
7939   GNULIB_SCANDIR=0;
7940   GNULIB_ALPHASORT=0;
7941     HAVE_OPENDIR=1;
7942   HAVE_READDIR=1;
7943   HAVE_REWINDDIR=1;
7944   HAVE_CLOSEDIR=1;
7945   HAVE_DECL_DIRFD=1;
7946   HAVE_DECL_FDOPENDIR=1;
7947   HAVE_FDOPENDIR=1;
7948   HAVE_SCANDIR=1;
7949   HAVE_ALPHASORT=1;
7950   REPLACE_OPENDIR=0;
7951   REPLACE_CLOSEDIR=0;
7952   REPLACE_DIRFD=0;
7953   REPLACE_FDOPENDIR=0;
7954
7955
7956
7957   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7958 printf %s "checking whether the preprocessor supports include_next... " >&6; }
7959 if test ${gl_cv_have_include_next+y}
7960 then :
7961   printf %s "(cached) " >&6
7962 else
7963   rm -rf conftestd1a conftestd1b conftestd2
7964      mkdir conftestd1a conftestd1b conftestd2
7965                                                   cat <<EOF > conftestd1a/conftest.h
7966 #define DEFINED_IN_CONFTESTD1
7967 #include_next <conftest.h>
7968 #ifdef DEFINED_IN_CONFTESTD2
7969 int foo;
7970 #else
7971 #error "include_next doesn't work"
7972 #endif
7973 EOF
7974      cat <<EOF > conftestd1b/conftest.h
7975 #define DEFINED_IN_CONFTESTD1
7976 #include <stdio.h>
7977 #include_next <conftest.h>
7978 #ifdef DEFINED_IN_CONFTESTD2
7979 int foo;
7980 #else
7981 #error "include_next doesn't work"
7982 #endif
7983 EOF
7984      cat <<EOF > conftestd2/conftest.h
7985 #ifndef DEFINED_IN_CONFTESTD1
7986 #error "include_next test doesn't work"
7987 #endif
7988 #define DEFINED_IN_CONFTESTD2
7989 EOF
7990      gl_save_CPPFLAGS="$CPPFLAGS"
7991      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7992      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993 /* end confdefs.h.  */
7994 #include <conftest.h>
7995 _ACEOF
7996 if ac_fn_c_try_compile "$LINENO"
7997 then :
7998   gl_cv_have_include_next=yes
7999 else
8000   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8001         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8002 /* end confdefs.h.  */
8003 #include <conftest.h>
8004 _ACEOF
8005 if ac_fn_c_try_compile "$LINENO"
8006 then :
8007   gl_cv_have_include_next=buggy
8008 else
8009   gl_cv_have_include_next=no
8010 fi
8011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8012
8013 fi
8014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8015      CPPFLAGS="$gl_save_CPPFLAGS"
8016      rm -rf conftestd1a conftestd1b conftestd2
8017
8018 fi
8019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8020 printf "%s\n" "$gl_cv_have_include_next" >&6; }
8021   PRAGMA_SYSTEM_HEADER=
8022   if test $gl_cv_have_include_next = yes; then
8023     INCLUDE_NEXT=include_next
8024     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8025     if test -n "$GCC"; then
8026       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8027     fi
8028   else
8029     if test $gl_cv_have_include_next = buggy; then
8030       INCLUDE_NEXT=include
8031       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8032     else
8033       INCLUDE_NEXT=include
8034       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8035     fi
8036   fi
8037
8038
8039
8040   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
8041 printf %s "checking whether system header files limit the line length... " >&6; }
8042 if test ${gl_cv_pragma_columns+y}
8043 then :
8044   printf %s "(cached) " >&6
8045 else
8046        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8047 /* end confdefs.h.  */
8048
8049 #ifdef __TANDEM
8050 choke me
8051 #endif
8052
8053 _ACEOF
8054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8055   $EGREP "choke me" >/dev/null 2>&1
8056 then :
8057   gl_cv_pragma_columns=yes
8058 else
8059   gl_cv_pragma_columns=no
8060 fi
8061 rm -rf conftest*
8062
8063
8064 fi
8065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
8066 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
8067   if test $gl_cv_pragma_columns = yes; then
8068     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
8069   else
8070     PRAGMA_COLUMNS=
8071   fi
8072
8073
8074
8075
8076 # The Clang compiler raises a warning for an undeclared identifier that matches
8077 # a compiler builtin function.  All extant Clang versions are affected, as of
8078 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
8079 # C and Objective C languages, but Clang does report an error under C++ and
8080 # Objective C++.
8081 #
8082 # Passing -fno-builtin to the compiler would suppress this problem.  That
8083 # strategy would have the advantage of being insensitive to stray warnings, but
8084 # it would make tests less realistic.
8085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
8086 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
8087 if test ${ac_cv_c_decl_report+y}
8088 then :
8089   printf %s "(cached) " >&6
8090 else
8091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8092 /* end confdefs.h.  */
8093
8094 int
8095 main (void)
8096 {
8097 (void) strchr;
8098   ;
8099   return 0;
8100 }
8101 _ACEOF
8102 if ac_fn_c_try_compile "$LINENO"
8103 then :
8104   if test -s conftest.err
8105 then :
8106       # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
8107     # valid AC_CHECK_DECL input.  No library function is consistently available
8108     # on freestanding implementations, so test against a dummy declaration.
8109     # Include always-available headers on the off chance that they somehow
8110     # elicit warnings.
8111     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8112 /* end confdefs.h.  */
8113 #include <float.h>
8114 #include <limits.h>
8115 #include <stdarg.h>
8116 #include <stddef.h>
8117 extern void ac_decl (int, char *);
8118 int
8119 main (void)
8120 {
8121 #ifdef __cplusplus
8122   (void) ac_decl ((int) 0, (char *) 0);
8123   (void) ac_decl;
8124 #else
8125   (void) ac_decl;
8126 #endif
8127
8128   ;
8129   return 0;
8130 }
8131 _ACEOF
8132 if ac_fn_c_try_compile "$LINENO"
8133 then :
8134   if test -s conftest.err
8135 then :
8136   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8137 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8138 as_fn_error $? "cannot detect from compiler exit status or warnings
8139 See \`config.log' for more details" "$LINENO" 5; }
8140 else
8141   ac_cv_c_decl_report=warning
8142 fi
8143 else
8144   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8145 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8146 as_fn_error $? "cannot compile a simple declaration test
8147 See \`config.log' for more details" "$LINENO" 5; }
8148 fi
8149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8150 else
8151   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8152 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8153 as_fn_error $? "compiler does not report undeclared identifiers
8154 See \`config.log' for more details" "$LINENO" 5; }
8155 fi
8156 else
8157   ac_cv_c_decl_report=error
8158 fi
8159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8160 fi
8161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
8162 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
8163
8164 case $ac_cv_c_decl_report in
8165   warning) ac_c_decl_warn_flag=yes ;;
8166   *) ac_c_decl_warn_flag= ;;
8167 esac
8168
8169
8170
8171   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8172 printf %s "checking whether // is distinct from /... " >&6; }
8173 if test ${gl_cv_double_slash_root+y}
8174 then :
8175   printf %s "(cached) " >&6
8176 else
8177    if test x"$cross_compiling" = xyes ; then
8178         # When cross-compiling, there is no way to tell whether // is special
8179         # short of a list of hosts.  However, the only known hosts to date
8180         # that have a distinct // are Apollo DomainOS (too old to port to),
8181         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8182         # special semantics and is distinct from /, please report it to
8183         # <bug-gnulib@gnu.org>.
8184         case $host in
8185           *-cygwin | i370-ibm-openedition)
8186             gl_cv_double_slash_root=yes ;;
8187           *)
8188             # Be optimistic and assume that / and // are the same when we
8189             # don't know.
8190             gl_cv_double_slash_root='unknown, assuming no' ;;
8191         esac
8192       else
8193         set x `ls -di / // 2>/dev/null`
8194         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8195           gl_cv_double_slash_root=no
8196         else
8197           gl_cv_double_slash_root=yes
8198         fi
8199       fi
8200 fi
8201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8202 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
8203   if test "$gl_cv_double_slash_root" = yes; then
8204
8205 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8206
8207   fi
8208
8209
8210
8211   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8212 printf %s "checking for complete errno.h... " >&6; }
8213 if test ${gl_cv_header_errno_h_complete+y}
8214 then :
8215   printf %s "(cached) " >&6
8216 else
8217
8218     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8219 /* end confdefs.h.  */
8220
8221 #include <errno.h>
8222 #if !defined ETXTBSY
8223 booboo
8224 #endif
8225 #if !defined ENOMSG
8226 booboo
8227 #endif
8228 #if !defined EIDRM
8229 booboo
8230 #endif
8231 #if !defined ENOLINK
8232 booboo
8233 #endif
8234 #if !defined EPROTO
8235 booboo
8236 #endif
8237 #if !defined EMULTIHOP
8238 booboo
8239 #endif
8240 #if !defined EBADMSG
8241 booboo
8242 #endif
8243 #if !defined EOVERFLOW
8244 booboo
8245 #endif
8246 #if !defined ENOTSUP
8247 booboo
8248 #endif
8249 #if !defined ENETRESET
8250 booboo
8251 #endif
8252 #if !defined ECONNABORTED
8253 booboo
8254 #endif
8255 #if !defined ESTALE
8256 booboo
8257 #endif
8258 #if !defined EDQUOT
8259 booboo
8260 #endif
8261 #if !defined ECANCELED
8262 booboo
8263 #endif
8264 #if !defined EOWNERDEAD
8265 booboo
8266 #endif
8267 #if !defined ENOTRECOVERABLE
8268 booboo
8269 #endif
8270 #if !defined EILSEQ
8271 booboo
8272 #endif
8273
8274 _ACEOF
8275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8276   $EGREP "booboo" >/dev/null 2>&1
8277 then :
8278   gl_cv_header_errno_h_complete=no
8279 else
8280   gl_cv_header_errno_h_complete=yes
8281 fi
8282 rm -rf conftest*
8283
8284
8285 fi
8286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8287 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
8288   if test $gl_cv_header_errno_h_complete = yes; then
8289     ERRNO_H=''
8290   else
8291
8292
8293
8294
8295
8296
8297
8298
8299      if test $gl_cv_have_include_next = yes; then
8300        gl_cv_next_errno_h='<'errno.h'>'
8301      else
8302        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8303 printf %s "checking absolute name of <errno.h>... " >&6; }
8304 if test ${gl_cv_next_errno_h+y}
8305 then :
8306   printf %s "(cached) " >&6
8307 else
8308
8309
8310
8311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8312 /* end confdefs.h.  */
8313 #include <errno.h>
8314 _ACEOF
8315                 case "$host_os" in
8316     aix*) gl_absname_cpp="$ac_cpp -C" ;;
8317     *)    gl_absname_cpp="$ac_cpp" ;;
8318   esac
8319
8320   case "$host_os" in
8321     mingw*)
8322                                           gl_dirsep_regex='[/\\]'
8323       ;;
8324     *)
8325       gl_dirsep_regex='\/'
8326       ;;
8327   esac
8328       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8329   gl_header_literal_regex=`echo 'errno.h' \
8330                            | sed -e "$gl_make_literal_regex_sed"`
8331   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8332       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8333       s|^/[^/]|//&|
8334       p
8335       q
8336     }'
8337
8338         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8339   sed -n "$gl_absolute_header_sed"`
8340
8341            gl_header=$gl_cv_absolute_errno_h
8342            gl_cv_next_errno_h='"'$gl_header'"'
8343
8344
8345 fi
8346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8347 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
8348      fi
8349      NEXT_ERRNO_H=$gl_cv_next_errno_h
8350
8351      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8352        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8353        gl_next_as_first_directive='<'errno.h'>'
8354      else
8355        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8356        gl_next_as_first_directive=$gl_cv_next_errno_h
8357      fi
8358      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8359
8360
8361
8362
8363     ERRNO_H='errno.h'
8364   fi
8365
8366    if test -n "$ERRNO_H"; then
8367   GL_GENERATE_ERRNO_H_TRUE=
8368   GL_GENERATE_ERRNO_H_FALSE='#'
8369 else
8370   GL_GENERATE_ERRNO_H_TRUE='#'
8371   GL_GENERATE_ERRNO_H_FALSE=
8372 fi
8373
8374
8375   if test -n "$ERRNO_H"; then
8376     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8377 printf %s "checking for EMULTIHOP value... " >&6; }
8378 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
8379 then :
8380   printf %s "(cached) " >&6
8381 else
8382
8383       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8384 /* end confdefs.h.  */
8385
8386 #include <errno.h>
8387 #ifdef EMULTIHOP
8388 yes
8389 #endif
8390
8391 _ACEOF
8392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8393   $EGREP "yes" >/dev/null 2>&1
8394 then :
8395   gl_cv_header_errno_h_EMULTIHOP=yes
8396 else
8397   gl_cv_header_errno_h_EMULTIHOP=no
8398 fi
8399 rm -rf conftest*
8400
8401       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8402         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8403 /* end confdefs.h.  */
8404
8405 #define _XOPEN_SOURCE_EXTENDED 1
8406 #include <errno.h>
8407 #ifdef EMULTIHOP
8408 yes
8409 #endif
8410
8411 _ACEOF
8412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8413   $EGREP "yes" >/dev/null 2>&1
8414 then :
8415   gl_cv_header_errno_h_EMULTIHOP=hidden
8416 fi
8417 rm -rf conftest*
8418
8419         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8420                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
8421 #define _XOPEN_SOURCE_EXTENDED 1
8422 #include <errno.h>
8423 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8424 #include <stdio.h>
8425 #include <stdlib.h>
8426 "
8427 then :
8428
8429 fi
8430
8431         fi
8432       fi
8433
8434 fi
8435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8436 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8437     case $gl_cv_header_errno_h_EMULTIHOP in
8438       yes | no)
8439         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8440         ;;
8441       *)
8442         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8443         ;;
8444     esac
8445
8446
8447   fi
8448
8449
8450   if test -n "$ERRNO_H"; then
8451     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8452 printf %s "checking for ENOLINK value... " >&6; }
8453 if test ${gl_cv_header_errno_h_ENOLINK+y}
8454 then :
8455   printf %s "(cached) " >&6
8456 else
8457
8458       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459 /* end confdefs.h.  */
8460
8461 #include <errno.h>
8462 #ifdef ENOLINK
8463 yes
8464 #endif
8465
8466 _ACEOF
8467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8468   $EGREP "yes" >/dev/null 2>&1
8469 then :
8470   gl_cv_header_errno_h_ENOLINK=yes
8471 else
8472   gl_cv_header_errno_h_ENOLINK=no
8473 fi
8474 rm -rf conftest*
8475
8476       if test $gl_cv_header_errno_h_ENOLINK = no; then
8477         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478 /* end confdefs.h.  */
8479
8480 #define _XOPEN_SOURCE_EXTENDED 1
8481 #include <errno.h>
8482 #ifdef ENOLINK
8483 yes
8484 #endif
8485
8486 _ACEOF
8487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8488   $EGREP "yes" >/dev/null 2>&1
8489 then :
8490   gl_cv_header_errno_h_ENOLINK=hidden
8491 fi
8492 rm -rf conftest*
8493
8494         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8495                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
8496 #define _XOPEN_SOURCE_EXTENDED 1
8497 #include <errno.h>
8498 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8499 #include <stdio.h>
8500 #include <stdlib.h>
8501 "
8502 then :
8503
8504 fi
8505
8506         fi
8507       fi
8508
8509 fi
8510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8511 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
8512     case $gl_cv_header_errno_h_ENOLINK in
8513       yes | no)
8514         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8515         ;;
8516       *)
8517         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8518         ;;
8519     esac
8520
8521
8522   fi
8523
8524
8525   if test -n "$ERRNO_H"; then
8526     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8527 printf %s "checking for EOVERFLOW value... " >&6; }
8528 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
8529 then :
8530   printf %s "(cached) " >&6
8531 else
8532
8533       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8534 /* end confdefs.h.  */
8535
8536 #include <errno.h>
8537 #ifdef EOVERFLOW
8538 yes
8539 #endif
8540
8541 _ACEOF
8542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8543   $EGREP "yes" >/dev/null 2>&1
8544 then :
8545   gl_cv_header_errno_h_EOVERFLOW=yes
8546 else
8547   gl_cv_header_errno_h_EOVERFLOW=no
8548 fi
8549 rm -rf conftest*
8550
8551       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8552         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8553 /* end confdefs.h.  */
8554
8555 #define _XOPEN_SOURCE_EXTENDED 1
8556 #include <errno.h>
8557 #ifdef EOVERFLOW
8558 yes
8559 #endif
8560
8561 _ACEOF
8562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8563   $EGREP "yes" >/dev/null 2>&1
8564 then :
8565   gl_cv_header_errno_h_EOVERFLOW=hidden
8566 fi
8567 rm -rf conftest*
8568
8569         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8570                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
8571 #define _XOPEN_SOURCE_EXTENDED 1
8572 #include <errno.h>
8573 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
8574 #include <stdio.h>
8575 #include <stdlib.h>
8576 "
8577 then :
8578
8579 fi
8580
8581         fi
8582       fi
8583
8584 fi
8585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8586 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8587     case $gl_cv_header_errno_h_EOVERFLOW in
8588       yes | no)
8589         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8590         ;;
8591       *)
8592         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8593         ;;
8594     esac
8595
8596
8597   fi
8598
8599
8600 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8601 if test "x$ac_cv_have_decl_strerror_r" = xyes
8602 then :
8603   ac_have_decl=1
8604 else
8605   ac_have_decl=0
8606 fi
8607
8608 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
8609
8610
8611
8612
8613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8614 printf %s "checking whether strerror_r returns char *... " >&6; }
8615 if test ${ac_cv_func_strerror_r_char_p+y}
8616 then :
8617   printf %s "(cached) " >&6
8618 else
8619
8620     ac_cv_func_strerror_r_char_p=no
8621     if test $ac_cv_have_decl_strerror_r = yes; then
8622       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8623 /* end confdefs.h.  */
8624 $ac_includes_default
8625 int
8626 main (void)
8627 {
8628
8629           char buf[100];
8630           char x = *strerror_r (0, buf, sizeof buf);
8631           char *p = strerror_r (0, buf, sizeof buf);
8632           return !p || x;
8633
8634   ;
8635   return 0;
8636 }
8637 _ACEOF
8638 if ac_fn_c_try_compile "$LINENO"
8639 then :
8640   ac_cv_func_strerror_r_char_p=yes
8641 fi
8642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8643     else
8644       # strerror_r is not declared.  Choose between
8645       # systems that have relatively inaccessible declarations for the
8646       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8647       # former has a strerror_r that returns char*, while the latter
8648       # has a strerror_r that returns `int'.
8649       # This test should segfault on the DEC system.
8650       if test "$cross_compiling" = yes
8651 then :
8652   :
8653 else
8654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8655 /* end confdefs.h.  */
8656 $ac_includes_default
8657         extern char *strerror_r ();
8658 int
8659 main (void)
8660 {
8661 char buf[100];
8662           char x = *strerror_r (0, buf, sizeof buf);
8663           return ! isalpha (x);
8664   ;
8665   return 0;
8666 }
8667 _ACEOF
8668 if ac_fn_c_try_run "$LINENO"
8669 then :
8670   ac_cv_func_strerror_r_char_p=yes
8671 fi
8672 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8673   conftest.$ac_objext conftest.beam conftest.$ac_ext
8674 fi
8675
8676     fi
8677
8678 fi
8679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8680 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
8681 if test $ac_cv_func_strerror_r_char_p = yes; then
8682
8683 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8684
8685 fi
8686
8687
8688   XGETTEXT_EXTRA_OPTIONS=
8689
8690
8691
8692
8693 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8694 if test "x$ac_cv_have_decl_fchdir" = xyes
8695 then :
8696   ac_have_decl=1
8697 else
8698   ac_have_decl=0
8699 fi
8700
8701 printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
8702
8703
8704   GNULIB_DPRINTF=0;
8705   GNULIB_FCLOSE=0;
8706   GNULIB_FDOPEN=0;
8707   GNULIB_FFLUSH=0;
8708   GNULIB_FGETC=0;
8709   GNULIB_FGETS=0;
8710   GNULIB_FOPEN=0;
8711   GNULIB_FPRINTF=0;
8712   GNULIB_FPRINTF_POSIX=0;
8713   GNULIB_FPURGE=0;
8714   GNULIB_FPUTC=0;
8715   GNULIB_FPUTS=0;
8716   GNULIB_FREAD=0;
8717   GNULIB_FREOPEN=0;
8718   GNULIB_FSCANF=0;
8719   GNULIB_FSEEK=0;
8720   GNULIB_FSEEKO=0;
8721   GNULIB_FTELL=0;
8722   GNULIB_FTELLO=0;
8723   GNULIB_FWRITE=0;
8724   GNULIB_GETC=0;
8725   GNULIB_GETCHAR=0;
8726   GNULIB_GETDELIM=0;
8727   GNULIB_GETLINE=0;
8728   GNULIB_OBSTACK_PRINTF=0;
8729   GNULIB_OBSTACK_PRINTF_POSIX=0;
8730   GNULIB_PCLOSE=0;
8731   GNULIB_PERROR=0;
8732   GNULIB_POPEN=0;
8733   GNULIB_PRINTF=0;
8734   GNULIB_PRINTF_POSIX=0;
8735   GNULIB_PUTC=0;
8736   GNULIB_PUTCHAR=0;
8737   GNULIB_PUTS=0;
8738   GNULIB_REMOVE=0;
8739   GNULIB_RENAME=0;
8740   GNULIB_RENAMEAT=0;
8741   GNULIB_SCANF=0;
8742   GNULIB_SNPRINTF=0;
8743   GNULIB_SPRINTF_POSIX=0;
8744   GNULIB_STDIO_H_NONBLOCKING=0;
8745   GNULIB_STDIO_H_SIGPIPE=0;
8746   GNULIB_TMPFILE=0;
8747   GNULIB_VASPRINTF=0;
8748   GNULIB_VFSCANF=0;
8749   GNULIB_VSCANF=0;
8750   GNULIB_VDPRINTF=0;
8751   GNULIB_VFPRINTF=0;
8752   GNULIB_VFPRINTF_POSIX=0;
8753   GNULIB_VPRINTF=0;
8754   GNULIB_VPRINTF_POSIX=0;
8755   GNULIB_VSNPRINTF=0;
8756   GNULIB_VSPRINTF_POSIX=0;
8757     HAVE_DECL_FPURGE=1;
8758   HAVE_DECL_FSEEKO=1;
8759   HAVE_DECL_FTELLO=1;
8760   HAVE_DECL_GETDELIM=1;
8761   HAVE_DECL_GETLINE=1;
8762   HAVE_DECL_OBSTACK_PRINTF=1;
8763   HAVE_DECL_SNPRINTF=1;
8764   HAVE_DECL_VSNPRINTF=1;
8765   HAVE_DPRINTF=1;
8766   HAVE_FSEEKO=1;
8767   HAVE_FTELLO=1;
8768   HAVE_PCLOSE=1;
8769   HAVE_POPEN=1;
8770   HAVE_RENAMEAT=1;
8771   HAVE_VASPRINTF=1;
8772   HAVE_VDPRINTF=1;
8773   REPLACE_DPRINTF=0;
8774   REPLACE_FCLOSE=0;
8775   REPLACE_FDOPEN=0;
8776   REPLACE_FFLUSH=0;
8777   REPLACE_FOPEN=0;
8778   REPLACE_FPRINTF=0;
8779   REPLACE_FPURGE=0;
8780   REPLACE_FREOPEN=0;
8781   REPLACE_FSEEK=0;
8782   REPLACE_FSEEKO=0;
8783   REPLACE_FTELL=0;
8784   REPLACE_FTELLO=0;
8785   REPLACE_GETDELIM=0;
8786   REPLACE_GETLINE=0;
8787   REPLACE_OBSTACK_PRINTF=0;
8788   REPLACE_PERROR=0;
8789   REPLACE_POPEN=0;
8790   REPLACE_PRINTF=0;
8791   REPLACE_REMOVE=0;
8792   REPLACE_RENAME=0;
8793   REPLACE_RENAMEAT=0;
8794   REPLACE_SNPRINTF=0;
8795   REPLACE_SPRINTF=0;
8796   REPLACE_STDIO_READ_FUNCS=0;
8797   REPLACE_STDIO_WRITE_FUNCS=0;
8798   REPLACE_TMPFILE=0;
8799   REPLACE_VASPRINTF=0;
8800   REPLACE_VDPRINTF=0;
8801   REPLACE_VFPRINTF=0;
8802   REPLACE_VPRINTF=0;
8803   REPLACE_VSNPRINTF=0;
8804   REPLACE_VSPRINTF=0;
8805
8806
8807   GNULIB_FCNTL=0;
8808   GNULIB_NONBLOCKING=0;
8809   GNULIB_OPEN=0;
8810   GNULIB_OPENAT=0;
8811     HAVE_FCNTL=1;
8812   HAVE_OPENAT=1;
8813   REPLACE_FCNTL=0;
8814   REPLACE_OPEN=0;
8815   REPLACE_OPENAT=0;
8816
8817
8818
8819
8820
8821
8822
8823
8824   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8825 printf %s "checking for working fcntl.h... " >&6; }
8826 if test ${gl_cv_header_working_fcntl_h+y}
8827 then :
8828   printf %s "(cached) " >&6
8829 else
8830   if test "$cross_compiling" = yes
8831 then :
8832   case "$host_os" in
8833                   # Guess 'no' on native Windows.
8834           mingw*) gl_cv_header_working_fcntl_h='no' ;;
8835           *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
8836         esac
8837
8838 else
8839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8840 /* end confdefs.h.  */
8841 #include <sys/types.h>
8842            #include <sys/stat.h>
8843            #if HAVE_UNISTD_H
8844            # include <unistd.h>
8845            #else /* on Windows with MSVC */
8846            # include <io.h>
8847            # include <stdlib.h>
8848            # defined sleep(n) _sleep ((n) * 1000)
8849            #endif
8850            #include <fcntl.h>
8851            #ifndef O_NOATIME
8852             #define O_NOATIME 0
8853            #endif
8854            #ifndef O_NOFOLLOW
8855             #define O_NOFOLLOW 0
8856            #endif
8857            static int const constants[] =
8858             {
8859               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8860               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8861             };
8862
8863 int
8864 main (void)
8865 {
8866
8867             int result = !constants;
8868             #if HAVE_SYMLINK
8869             {
8870               static char const sym[] = "conftest.sym";
8871               if (symlink ("/dev/null", sym) != 0)
8872                 result |= 2;
8873               else
8874                 {
8875                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8876                   if (fd >= 0)
8877                     {
8878                       close (fd);
8879                       result |= 4;
8880                     }
8881                 }
8882               if (unlink (sym) != 0 || symlink (".", sym) != 0)
8883                 result |= 2;
8884               else
8885                 {
8886                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8887                   if (fd >= 0)
8888                     {
8889                       close (fd);
8890                       result |= 4;
8891                     }
8892                 }
8893               unlink (sym);
8894             }
8895             #endif
8896             {
8897               static char const file[] = "confdefs.h";
8898               int fd = open (file, O_RDONLY | O_NOATIME);
8899               if (fd < 0)
8900                 result |= 8;
8901               else
8902                 {
8903                   struct stat st0;
8904                   if (fstat (fd, &st0) != 0)
8905                     result |= 16;
8906                   else
8907                     {
8908                       char c;
8909                       sleep (1);
8910                       if (read (fd, &c, 1) != 1)
8911                         result |= 24;
8912                       else
8913                         {
8914                           if (close (fd) != 0)
8915                             result |= 32;
8916                           else
8917                             {
8918                               struct stat st1;
8919                               if (stat (file, &st1) != 0)
8920                                 result |= 40;
8921                               else
8922                                 if (st0.st_atime != st1.st_atime)
8923                                   result |= 64;
8924                             }
8925                         }
8926                     }
8927                 }
8928             }
8929             return result;
8930   ;
8931   return 0;
8932 }
8933 _ACEOF
8934 if ac_fn_c_try_run "$LINENO"
8935 then :
8936   gl_cv_header_working_fcntl_h=yes
8937 else
8938   case $? in #(
8939         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8940         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8941         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8942          *) gl_cv_header_working_fcntl_h='no';;
8943         esac
8944 fi
8945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8946   conftest.$ac_objext conftest.beam conftest.$ac_ext
8947 fi
8948
8949
8950 fi
8951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8952 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
8953
8954   case $gl_cv_header_working_fcntl_h in #(
8955   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8956   *) ac_val=1;;
8957   esac
8958
8959 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
8960
8961
8962   case $gl_cv_header_working_fcntl_h in #(
8963   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8964   *) ac_val=1;;
8965   esac
8966
8967 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
8968
8969
8970 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8971 if test "x$ac_cv_type_pid_t" = xyes
8972 then :
8973
8974 else
8975
8976 printf "%s\n" "#define pid_t int" >>confdefs.h
8977
8978 fi
8979
8980 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8981 if test "x$ac_cv_type_mode_t" = xyes
8982 then :
8983
8984 else
8985
8986 printf "%s\n" "#define mode_t int" >>confdefs.h
8987
8988 fi
8989
8990
8991
8992   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8993 printf %s "checking for promoted mode_t type... " >&6; }
8994 if test ${gl_cv_promoted_mode_t+y}
8995 then :
8996   printf %s "(cached) " >&6
8997 else
8998
8999                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9000 /* end confdefs.h.  */
9001 #include <sys/types.h>
9002 int
9003 main (void)
9004 {
9005 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
9006   ;
9007   return 0;
9008 }
9009 _ACEOF
9010 if ac_fn_c_try_compile "$LINENO"
9011 then :
9012   gl_cv_promoted_mode_t='int'
9013 else
9014   gl_cv_promoted_mode_t='mode_t'
9015 fi
9016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9017
9018 fi
9019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
9020 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
9021
9022 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
9023
9024
9025 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
9026 if test "x$ac_cv_have_decl_fdatasync" = xyes
9027 then :
9028   ac_have_decl=1
9029 else
9030   ac_have_decl=0
9031 fi
9032
9033 printf "%s\n" "#define HAVE_DECL_FDATASYNC $ac_have_decl" >>confdefs.h
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 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
9068
9069   fi
9070
9071
9072   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
9073 printf %s "checking for inttypes.h... " >&6; }
9074 if test ${gl_cv_header_inttypes_h+y}
9075 then :
9076   printf %s "(cached) " >&6
9077 else
9078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9079 /* end confdefs.h.  */
9080
9081 #include <sys/types.h>
9082 #include <inttypes.h>
9083
9084 int
9085 main (void)
9086 {
9087 uintmax_t i = (uintmax_t) -1; return !i;
9088   ;
9089   return 0;
9090 }
9091 _ACEOF
9092 if ac_fn_c_try_compile "$LINENO"
9093 then :
9094   gl_cv_header_inttypes_h=yes
9095 else
9096   gl_cv_header_inttypes_h=no
9097 fi
9098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9099 fi
9100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
9101 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
9102   if test $gl_cv_header_inttypes_h = yes; then
9103
9104 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
9105
9106   fi
9107
9108
9109
9110
9111
9112      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
9113 printf %s "checking whether printf supports size specifiers as in C99... " >&6; }
9114 if test ${gl_cv_func_printf_sizes_c99+y}
9115 then :
9116   printf %s "(cached) " >&6
9117 else
9118
9119       if test "$cross_compiling" = yes
9120 then :
9121
9122          case "$host_os" in
9123                                  # Guess yes on glibc systems.
9124            *-gnu* | gnu*)        gl_cv_func_printf_sizes_c99="guessing yes";;
9125                                  # Guess yes on FreeBSD >= 5.
9126            freebsd[1-4].*)       gl_cv_func_printf_sizes_c99="guessing no";;
9127            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
9128                                  # Guess yes on Mac OS X >= 10.3.
9129            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
9130            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
9131                                  # Guess yes on OpenBSD >= 3.9.
9132            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
9133                                  gl_cv_func_printf_sizes_c99="guessing no";;
9134            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
9135                                  # Guess yes on Solaris >= 2.10.
9136            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
9137            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
9138                                  # Guess yes on NetBSD >= 3.
9139            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9140                                  gl_cv_func_printf_sizes_c99="guessing no";;
9141            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
9142                                  # Guess yes on MSVC, no on mingw.
9143            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9144 /* end confdefs.h.  */
9145
9146 #ifdef _MSC_VER
9147  Known
9148 #endif
9149
9150 _ACEOF
9151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9152   $EGREP "Known" >/dev/null 2>&1
9153 then :
9154   gl_cv_func_printf_sizes_c99="guessing yes"
9155 else
9156   gl_cv_func_printf_sizes_c99="guessing no"
9157 fi
9158 rm -rf conftest*
9159
9160                                  ;;
9161                                  # If we don't know, assume the worst.
9162            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
9163          esac
9164
9165 else
9166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9167 /* end confdefs.h.  */
9168
9169 #include <stddef.h>
9170 #include <stdio.h>
9171 #include <string.h>
9172 #include <sys/types.h>
9173 #if HAVE_STDINT_H_WITH_UINTMAX
9174 # include <stdint.h>
9175 #endif
9176 #if HAVE_INTTYPES_H_WITH_UINTMAX
9177 # include <inttypes.h>
9178 #endif
9179 static char buf[100];
9180 int main ()
9181 {
9182   int result = 0;
9183 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
9184   buf[0] = '\0';
9185   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
9186       || strcmp (buf, "12345671 33") != 0)
9187     result |= 1;
9188 #else
9189   result |= 1;
9190 #endif
9191   buf[0] = '\0';
9192   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
9193       || strcmp (buf, "12345672 33") != 0)
9194     result |= 2;
9195   buf[0] = '\0';
9196   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
9197       || strcmp (buf, "12345673 33") != 0)
9198     result |= 4;
9199   buf[0] = '\0';
9200   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
9201       || strcmp (buf, "1.5 33") != 0)
9202     result |= 8;
9203   return result;
9204 }
9205 _ACEOF
9206 if ac_fn_c_try_run "$LINENO"
9207 then :
9208   gl_cv_func_printf_sizes_c99=yes
9209 else
9210   gl_cv_func_printf_sizes_c99=no
9211 fi
9212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9213   conftest.$ac_objext conftest.beam conftest.$ac_ext
9214 fi
9215
9216
9217 fi
9218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
9219 printf "%s\n" "$gl_cv_func_printf_sizes_c99" >&6; }
9220
9221
9222
9223      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
9224 printf %s "checking whether printf supports 'long double' arguments... " >&6; }
9225 if test ${gl_cv_func_printf_long_double+y}
9226 then :
9227   printf %s "(cached) " >&6
9228 else
9229
9230       if test "$cross_compiling" = yes
9231 then :
9232   case "$host_os" in
9233            beos*)  gl_cv_func_printf_long_double="guessing no";;
9234                    # Guess yes on MSVC, no on mingw.
9235            mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9236 /* end confdefs.h.  */
9237
9238 #ifdef _MSC_VER
9239  Known
9240 #endif
9241
9242 _ACEOF
9243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9244   $EGREP "Known" >/dev/null 2>&1
9245 then :
9246   gl_cv_func_printf_long_double="guessing yes"
9247 else
9248   gl_cv_func_printf_long_double="guessing no"
9249 fi
9250 rm -rf conftest*
9251
9252                    ;;
9253            *)      gl_cv_func_printf_long_double="guessing yes";;
9254          esac
9255
9256 else
9257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9258 /* end confdefs.h.  */
9259
9260 #include <stdio.h>
9261 #include <string.h>
9262 static char buf[10000];
9263 int main ()
9264 {
9265   int result = 0;
9266   buf[0] = '\0';
9267   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
9268       || strcmp (buf, "1.750000 33") != 0)
9269     result |= 1;
9270   buf[0] = '\0';
9271   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
9272       || strcmp (buf, "1.750000e+00 33") != 0)
9273     result |= 2;
9274   buf[0] = '\0';
9275   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
9276       || strcmp (buf, "1.75 33") != 0)
9277     result |= 4;
9278   return result;
9279 }
9280 _ACEOF
9281 if ac_fn_c_try_run "$LINENO"
9282 then :
9283   gl_cv_func_printf_long_double=yes
9284 else
9285   gl_cv_func_printf_long_double=no
9286 fi
9287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9288   conftest.$ac_objext conftest.beam conftest.$ac_ext
9289 fi
9290
9291
9292 fi
9293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
9294 printf "%s\n" "$gl_cv_func_printf_long_double" >&6; }
9295
9296
9297
9298      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
9299 printf %s "checking whether printf supports infinite 'double' arguments... " >&6; }
9300 if test ${gl_cv_func_printf_infinite+y}
9301 then :
9302   printf %s "(cached) " >&6
9303 else
9304
9305       if test "$cross_compiling" = yes
9306 then :
9307
9308          case "$host_os" in
9309                                  # Guess yes on glibc systems.
9310            *-gnu* | gnu*)        gl_cv_func_printf_infinite="guessing yes";;
9311                                  # Guess yes on FreeBSD >= 6.
9312            freebsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
9313            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
9314                                  # Guess yes on Mac OS X >= 10.3.
9315            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
9316            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
9317                                  # Guess yes on HP-UX >= 11.
9318            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
9319            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
9320                                  # Guess yes on NetBSD >= 3.
9321            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
9322                                  gl_cv_func_printf_infinite="guessing no";;
9323            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
9324                                  # Guess yes on BeOS.
9325            beos*)                gl_cv_func_printf_infinite="guessing yes";;
9326                                  # Guess yes on MSVC, no on mingw.
9327            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328 /* end confdefs.h.  */
9329
9330 #ifdef _MSC_VER
9331  Known
9332 #endif
9333
9334 _ACEOF
9335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9336   $EGREP "Known" >/dev/null 2>&1
9337 then :
9338   gl_cv_func_printf_infinite="guessing yes"
9339 else
9340   gl_cv_func_printf_infinite="guessing no"
9341 fi
9342 rm -rf conftest*
9343
9344                                  ;;
9345                                  # If we don't know, assume the worst.
9346            *)                    gl_cv_func_printf_infinite="guessing no";;
9347          esac
9348
9349 else
9350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9351 /* end confdefs.h.  */
9352
9353 #include <stdio.h>
9354 #include <string.h>
9355 static int
9356 strisnan (const char *string, size_t start_index, size_t end_index)
9357 {
9358   if (start_index < end_index)
9359     {
9360       if (string[start_index] == '-')
9361         start_index++;
9362       if (start_index + 3 <= end_index
9363           && memcmp (string + start_index, "nan", 3) == 0)
9364         {
9365           start_index += 3;
9366           if (start_index == end_index
9367               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9368             return 1;
9369         }
9370     }
9371   return 0;
9372 }
9373 static int
9374 have_minus_zero ()
9375 {
9376   static double plus_zero = 0.0;
9377   double minus_zero = - plus_zero;
9378   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
9379 }
9380 static char buf[10000];
9381 static double zero = 0.0;
9382 int main ()
9383 {
9384   int result = 0;
9385   if (sprintf (buf, "%f", 1.0 / zero) < 0
9386       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9387     result |= 1;
9388   if (sprintf (buf, "%f", -1.0 / zero) < 0
9389       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9390     result |= 1;
9391   if (sprintf (buf, "%f", zero / zero) < 0
9392       || !strisnan (buf, 0, strlen (buf)))
9393     result |= 2;
9394   if (sprintf (buf, "%e", 1.0 / zero) < 0
9395       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9396     result |= 4;
9397   if (sprintf (buf, "%e", -1.0 / zero) < 0
9398       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9399     result |= 4;
9400   if (sprintf (buf, "%e", zero / zero) < 0
9401       || !strisnan (buf, 0, strlen (buf)))
9402     result |= 8;
9403   if (sprintf (buf, "%g", 1.0 / zero) < 0
9404       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9405     result |= 16;
9406   if (sprintf (buf, "%g", -1.0 / zero) < 0
9407       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9408     result |= 16;
9409   if (sprintf (buf, "%g", zero / zero) < 0
9410       || !strisnan (buf, 0, strlen (buf)))
9411     result |= 32;
9412   /* This test fails on HP-UX 10.20.  */
9413   if (have_minus_zero ())
9414     if (sprintf (buf, "%g", - zero) < 0
9415         || strcmp (buf, "-0") != 0)
9416     result |= 64;
9417   return result;
9418 }
9419 _ACEOF
9420 if ac_fn_c_try_run "$LINENO"
9421 then :
9422   gl_cv_func_printf_infinite=yes
9423 else
9424   gl_cv_func_printf_infinite=no
9425 fi
9426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9427   conftest.$ac_objext conftest.beam conftest.$ac_ext
9428 fi
9429
9430
9431 fi
9432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
9433 printf "%s\n" "$gl_cv_func_printf_infinite" >&6; }
9434
9435
9436    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9437 printf %s "checking whether byte ordering is bigendian... " >&6; }
9438 if test ${ac_cv_c_bigendian+y}
9439 then :
9440   printf %s "(cached) " >&6
9441 else
9442   ac_cv_c_bigendian=unknown
9443     # See if we're dealing with a universal compiler.
9444     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h.  */
9446 #ifndef __APPLE_CC__
9447                not a universal capable compiler
9448              #endif
9449              typedef int dummy;
9450
9451 _ACEOF
9452 if ac_fn_c_try_compile "$LINENO"
9453 then :
9454
9455         # Check for potential -arch flags.  It is not universal unless
9456         # there are at least two -arch flags with different values.
9457         ac_arch=
9458         ac_prev=
9459         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9460          if test -n "$ac_prev"; then
9461            case $ac_word in
9462              i?86 | x86_64 | ppc | ppc64)
9463                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9464                  ac_arch=$ac_word
9465                else
9466                  ac_cv_c_bigendian=universal
9467                  break
9468                fi
9469                ;;
9470            esac
9471            ac_prev=
9472          elif test "x$ac_word" = "x-arch"; then
9473            ac_prev=arch
9474          fi
9475        done
9476 fi
9477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9478     if test $ac_cv_c_bigendian = unknown; then
9479       # See if sys/param.h defines the BYTE_ORDER macro.
9480       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481 /* end confdefs.h.  */
9482 #include <sys/types.h>
9483              #include <sys/param.h>
9484
9485 int
9486 main (void)
9487 {
9488 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9489                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9490                      && LITTLE_ENDIAN)
9491               bogus endian macros
9492              #endif
9493
9494   ;
9495   return 0;
9496 }
9497 _ACEOF
9498 if ac_fn_c_try_compile "$LINENO"
9499 then :
9500   # It does; now see whether it defined to BIG_ENDIAN or not.
9501          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9502 /* end confdefs.h.  */
9503 #include <sys/types.h>
9504                 #include <sys/param.h>
9505
9506 int
9507 main (void)
9508 {
9509 #if BYTE_ORDER != BIG_ENDIAN
9510                  not big endian
9511                 #endif
9512
9513   ;
9514   return 0;
9515 }
9516 _ACEOF
9517 if ac_fn_c_try_compile "$LINENO"
9518 then :
9519   ac_cv_c_bigendian=yes
9520 else
9521   ac_cv_c_bigendian=no
9522 fi
9523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9524 fi
9525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526     fi
9527     if test $ac_cv_c_bigendian = unknown; then
9528       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9529       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530 /* end confdefs.h.  */
9531 #include <limits.h>
9532
9533 int
9534 main (void)
9535 {
9536 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9537               bogus endian macros
9538              #endif
9539
9540   ;
9541   return 0;
9542 }
9543 _ACEOF
9544 if ac_fn_c_try_compile "$LINENO"
9545 then :
9546   # It does; now see whether it defined to _BIG_ENDIAN or not.
9547          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9548 /* end confdefs.h.  */
9549 #include <limits.h>
9550
9551 int
9552 main (void)
9553 {
9554 #ifndef _BIG_ENDIAN
9555                  not big endian
9556                 #endif
9557
9558   ;
9559   return 0;
9560 }
9561 _ACEOF
9562 if ac_fn_c_try_compile "$LINENO"
9563 then :
9564   ac_cv_c_bigendian=yes
9565 else
9566   ac_cv_c_bigendian=no
9567 fi
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9569 fi
9570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9571     fi
9572     if test $ac_cv_c_bigendian = unknown; then
9573       # Compile a test program.
9574       if test "$cross_compiling" = yes
9575 then :
9576   # Try to guess by grepping values from an object file.
9577          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9578 /* end confdefs.h.  */
9579 short int ascii_mm[] =
9580                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9581                 short int ascii_ii[] =
9582                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9583                 int use_ascii (int i) {
9584                   return ascii_mm[i] + ascii_ii[i];
9585                 }
9586                 short int ebcdic_ii[] =
9587                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9588                 short int ebcdic_mm[] =
9589                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9590                 int use_ebcdic (int i) {
9591                   return ebcdic_mm[i] + ebcdic_ii[i];
9592                 }
9593                 extern int foo;
9594
9595 int
9596 main (void)
9597 {
9598 return use_ascii (foo) == use_ebcdic (foo);
9599   ;
9600   return 0;
9601 }
9602 _ACEOF
9603 if ac_fn_c_try_compile "$LINENO"
9604 then :
9605   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9606               ac_cv_c_bigendian=yes
9607             fi
9608             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9609               if test "$ac_cv_c_bigendian" = unknown; then
9610                 ac_cv_c_bigendian=no
9611               else
9612                 # finding both strings is unlikely to happen, but who knows?
9613                 ac_cv_c_bigendian=unknown
9614               fi
9615             fi
9616 fi
9617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9618 else
9619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9620 /* end confdefs.h.  */
9621 $ac_includes_default
9622 int
9623 main (void)
9624 {
9625
9626              /* Are we little or big endian?  From Harbison&Steele.  */
9627              union
9628              {
9629                long int l;
9630                char c[sizeof (long int)];
9631              } u;
9632              u.l = 1;
9633              return u.c[sizeof (long int) - 1] == 1;
9634
9635   ;
9636   return 0;
9637 }
9638 _ACEOF
9639 if ac_fn_c_try_run "$LINENO"
9640 then :
9641   ac_cv_c_bigendian=no
9642 else
9643   ac_cv_c_bigendian=yes
9644 fi
9645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9646   conftest.$ac_objext conftest.beam conftest.$ac_ext
9647 fi
9648
9649     fi
9650 fi
9651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9652 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
9653  case $ac_cv_c_bigendian in #(
9654    yes)
9655      printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
9656 ;; #(
9657    no)
9658       ;; #(
9659    universal)
9660
9661 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9662
9663      ;; #(
9664    *)
9665      as_fn_error $? "unknown endianness
9666  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9667  esac
9668
9669
9670
9671   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9672 printf %s "checking whether long double and double are the same... " >&6; }
9673 if test ${gl_cv_long_double_equals_double+y}
9674 then :
9675   printf %s "(cached) " >&6
9676 else
9677   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h.  */
9679 #include <float.h>
9680 int
9681 main (void)
9682 {
9683 typedef int check[sizeof (long double) == sizeof (double)
9684                               && LDBL_MANT_DIG == DBL_MANT_DIG
9685                               && LDBL_MAX_EXP == DBL_MAX_EXP
9686                               && LDBL_MIN_EXP == DBL_MIN_EXP
9687                               ? 1 : -1];
9688
9689   ;
9690   return 0;
9691 }
9692 _ACEOF
9693 if ac_fn_c_try_compile "$LINENO"
9694 then :
9695   gl_cv_long_double_equals_double=yes
9696 else
9697   gl_cv_long_double_equals_double=no
9698 fi
9699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9700
9701 fi
9702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9703 printf "%s\n" "$gl_cv_long_double_equals_double" >&6; }
9704   if test $gl_cv_long_double_equals_double = yes; then
9705
9706 printf "%s\n" "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9707
9708     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9709   else
9710     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9711   fi
9712
9713
9714
9715
9716
9717
9718
9719          if test -n "$gl_printf_safe"; then
9720
9721 printf "%s\n" "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
9722
9723   fi
9724   case "$gl_cv_func_printf_long_double" in
9725     *yes)
9726       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
9727 printf %s "checking whether printf supports infinite 'long double' arguments... " >&6; }
9728 if test ${gl_cv_func_printf_infinite_long_double+y}
9729 then :
9730   printf %s "(cached) " >&6
9731 else
9732
9733           if test "$cross_compiling" = yes
9734 then :
9735   case "$host_cpu" in
9736                                      # Guess no on ia64, x86_64, i386.
9737                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
9738                *)
9739                  case "$host_os" in
9740                                          # Guess yes on glibc systems.
9741                    *-gnu* | gnu*)        gl_cv_func_printf_infinite_long_double="guessing yes";;
9742                                          # Guess yes on FreeBSD >= 6.
9743                    freebsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
9744                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
9745                                          # Guess yes on HP-UX >= 11.
9746                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
9747                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
9748                                          # Guess yes on MSVC, no on mingw.
9749                    mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9750 /* end confdefs.h.  */
9751
9752 #ifdef _MSC_VER
9753  Known
9754 #endif
9755
9756 _ACEOF
9757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9758   $EGREP "Known" >/dev/null 2>&1
9759 then :
9760   gl_cv_func_printf_infinite_long_double="guessing yes"
9761 else
9762   gl_cv_func_printf_infinite_long_double="guessing no"
9763 fi
9764 rm -rf conftest*
9765
9766                                          ;;
9767                                          # If we don't know, assume the worst.
9768                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
9769                  esac
9770                  ;;
9771              esac
9772
9773 else
9774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775 /* end confdefs.h.  */
9776
9777
9778 #include <stdlib.h>
9779 #if defined __MACH__ && defined __APPLE__
9780 /* Avoid a crash on Mac OS X.  */
9781 #include <mach/mach.h>
9782 #include <mach/mach_error.h>
9783 #include <mach/thread_status.h>
9784 #include <mach/exception.h>
9785 #include <mach/task.h>
9786 #include <pthread.h>
9787 /* The exception port on which our thread listens.  */
9788 static mach_port_t our_exception_port;
9789 /* The main function of the thread listening for exceptions of type
9790    EXC_BAD_ACCESS.  */
9791 static void *
9792 mach_exception_thread (void *arg)
9793 {
9794   /* Buffer for a message to be received.  */
9795   struct {
9796     mach_msg_header_t head;
9797     mach_msg_body_t msgh_body;
9798     char data[1024];
9799   } msg;
9800   mach_msg_return_t retval;
9801   /* Wait for a message on the exception port.  */
9802   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9803                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9804   if (retval != MACH_MSG_SUCCESS)
9805     abort ();
9806   exit (1);
9807 }
9808 static void
9809 nocrash_init (void)
9810 {
9811   mach_port_t self = mach_task_self ();
9812   /* Allocate a port on which the thread shall listen for exceptions.  */
9813   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9814       == KERN_SUCCESS) {
9815     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9816     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9817                                 MACH_MSG_TYPE_MAKE_SEND)
9818         == KERN_SUCCESS) {
9819       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9820          for us.  */
9821       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9822       /* Create the thread listening on the exception port.  */
9823       pthread_attr_t attr;
9824       pthread_t thread;
9825       if (pthread_attr_init (&attr) == 0
9826           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9827           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9828         pthread_attr_destroy (&attr);
9829         /* Replace the exception port info for these exceptions with our own.
9830            Note that we replace the exception port for the entire task, not only
9831            for a particular thread.  This has the effect that when our exception
9832            port gets the message, the thread specific exception port has already
9833            been asked, and we don't need to bother about it.
9834            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9835         task_set_exception_ports (self, mask, our_exception_port,
9836                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9837       }
9838     }
9839   }
9840 }
9841 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9842 /* Avoid a crash on native Windows.  */
9843 #define WIN32_LEAN_AND_MEAN
9844 #include <windows.h>
9845 #include <winerror.h>
9846 static LONG WINAPI
9847 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9848 {
9849   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9850     {
9851     case EXCEPTION_ACCESS_VIOLATION:
9852     case EXCEPTION_IN_PAGE_ERROR:
9853     case EXCEPTION_STACK_OVERFLOW:
9854     case EXCEPTION_GUARD_PAGE:
9855     case EXCEPTION_PRIV_INSTRUCTION:
9856     case EXCEPTION_ILLEGAL_INSTRUCTION:
9857     case EXCEPTION_DATATYPE_MISALIGNMENT:
9858     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9859     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9860       exit (1);
9861     }
9862   return EXCEPTION_CONTINUE_SEARCH;
9863 }
9864 static void
9865 nocrash_init (void)
9866 {
9867   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9868 }
9869 #else
9870 /* Avoid a crash on POSIX systems.  */
9871 #include <signal.h>
9872 #include <unistd.h>
9873 /* A POSIX signal handler.  */
9874 static void
9875 exception_handler (int sig)
9876 {
9877   _exit (1);
9878 }
9879 static void
9880 nocrash_init (void)
9881 {
9882 #ifdef SIGSEGV
9883   signal (SIGSEGV, exception_handler);
9884 #endif
9885 #ifdef SIGBUS
9886   signal (SIGBUS, exception_handler);
9887 #endif
9888 }
9889 #endif
9890
9891 #include <float.h>
9892 #include <stdio.h>
9893 #include <string.h>
9894 static int
9895 strisnan (const char *string, size_t start_index, size_t end_index)
9896 {
9897   if (start_index < end_index)
9898     {
9899       if (string[start_index] == '-')
9900         start_index++;
9901       if (start_index + 3 <= end_index
9902           && memcmp (string + start_index, "nan", 3) == 0)
9903         {
9904           start_index += 3;
9905           if (start_index == end_index
9906               || (string[start_index] == '(' && string[end_index - 1] == ')'))
9907             return 1;
9908         }
9909     }
9910   return 0;
9911 }
9912 static char buf[10000];
9913 static long double zeroL = 0.0L;
9914 int main ()
9915 {
9916   int result = 0;
9917   nocrash_init();
9918   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
9919       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9920     result |= 1;
9921   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
9922       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9923     result |= 1;
9924   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
9925       || !strisnan (buf, 0, strlen (buf)))
9926     result |= 1;
9927   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
9928       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9929     result |= 1;
9930   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
9931       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9932     result |= 1;
9933   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
9934       || !strisnan (buf, 0, strlen (buf)))
9935     result |= 1;
9936   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
9937       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
9938     result |= 1;
9939   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
9940       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
9941     result |= 1;
9942   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
9943       || !strisnan (buf, 0, strlen (buf)))
9944     result |= 1;
9945 #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
9946 /* Representation of an 80-bit 'long double' as an initializer for a sequence
9947    of 'unsigned int' words.  */
9948 # ifdef WORDS_BIGENDIAN
9949 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9950      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
9951        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
9952        (unsigned int) (mantlo) << 16                                        \
9953      }
9954 # else
9955 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
9956      { mantlo, manthi, exponent }
9957 # endif
9958   { /* Quiet NaN.  */
9959     static union { unsigned int word[4]; long double value; } x =
9960       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
9961     if (sprintf (buf, "%Lf", x.value) < 0
9962         || !strisnan (buf, 0, strlen (buf)))
9963       result |= 2;
9964     if (sprintf (buf, "%Le", x.value) < 0
9965         || !strisnan (buf, 0, strlen (buf)))
9966       result |= 2;
9967     if (sprintf (buf, "%Lg", x.value) < 0
9968         || !strisnan (buf, 0, strlen (buf)))
9969       result |= 2;
9970   }
9971   {
9972     /* Signalling NaN.  */
9973     static union { unsigned int word[4]; long double value; } x =
9974       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
9975     if (sprintf (buf, "%Lf", x.value) < 0
9976         || !strisnan (buf, 0, strlen (buf)))
9977       result |= 2;
9978     if (sprintf (buf, "%Le", x.value) < 0
9979         || !strisnan (buf, 0, strlen (buf)))
9980       result |= 2;
9981     if (sprintf (buf, "%Lg", x.value) < 0
9982         || !strisnan (buf, 0, strlen (buf)))
9983       result |= 2;
9984   }
9985   { /* Pseudo-NaN.  */
9986     static union { unsigned int word[4]; long double value; } x =
9987       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
9988     if (sprintf (buf, "%Lf", x.value) <= 0)
9989       result |= 4;
9990     if (sprintf (buf, "%Le", x.value) <= 0)
9991       result |= 4;
9992     if (sprintf (buf, "%Lg", x.value) <= 0)
9993       result |= 4;
9994   }
9995   { /* Pseudo-Infinity.  */
9996     static union { unsigned int word[4]; long double value; } x =
9997       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
9998     if (sprintf (buf, "%Lf", x.value) <= 0)
9999       result |= 8;
10000     if (sprintf (buf, "%Le", x.value) <= 0)
10001       result |= 8;
10002     if (sprintf (buf, "%Lg", x.value) <= 0)
10003       result |= 8;
10004   }
10005   { /* Pseudo-Zero.  */
10006     static union { unsigned int word[4]; long double value; } x =
10007       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
10008     if (sprintf (buf, "%Lf", x.value) <= 0)
10009       result |= 16;
10010     if (sprintf (buf, "%Le", x.value) <= 0)
10011       result |= 16;
10012     if (sprintf (buf, "%Lg", x.value) <= 0)
10013       result |= 16;
10014   }
10015   { /* Unnormalized number.  */
10016     static union { unsigned int word[4]; long double value; } x =
10017       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
10018     if (sprintf (buf, "%Lf", x.value) <= 0)
10019       result |= 32;
10020     if (sprintf (buf, "%Le", x.value) <= 0)
10021       result |= 32;
10022     if (sprintf (buf, "%Lg", x.value) <= 0)
10023       result |= 32;
10024   }
10025   { /* Pseudo-Denormal.  */
10026     static union { unsigned int word[4]; long double value; } x =
10027       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
10028     if (sprintf (buf, "%Lf", x.value) <= 0)
10029       result |= 64;
10030     if (sprintf (buf, "%Le", x.value) <= 0)
10031       result |= 64;
10032     if (sprintf (buf, "%Lg", x.value) <= 0)
10033       result |= 64;
10034   }
10035 #endif
10036   return result;
10037 }
10038 _ACEOF
10039 if ac_fn_c_try_run "$LINENO"
10040 then :
10041   gl_cv_func_printf_infinite_long_double=yes
10042 else
10043   gl_cv_func_printf_infinite_long_double=no
10044 fi
10045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10046   conftest.$ac_objext conftest.beam conftest.$ac_ext
10047 fi
10048
10049
10050 fi
10051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
10052 printf "%s\n" "$gl_cv_func_printf_infinite_long_double" >&6; }
10053       ;;
10054     *)
10055       gl_cv_func_printf_infinite_long_double="irrelevant"
10056       ;;
10057   esac
10058
10059
10060
10061      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
10062 printf %s "checking whether printf supports the 'a' and 'A' directives... " >&6; }
10063 if test ${gl_cv_func_printf_directive_a+y}
10064 then :
10065   printf %s "(cached) " >&6
10066 else
10067
10068       if test "$cross_compiling" = yes
10069 then :
10070
10071          case "$host_os" in
10072                                  # Guess yes on glibc >= 2.5 systems.
10073            *-gnu* | gnu*)
10074              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10075 /* end confdefs.h.  */
10076
10077                #include <features.h>
10078                #ifdef __GNU_LIBRARY__
10079                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
10080                  BZ2908
10081                 #endif
10082                #endif
10083
10084 _ACEOF
10085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10086   $EGREP "BZ2908" >/dev/null 2>&1
10087 then :
10088   gl_cv_func_printf_directive_a="guessing yes"
10089 else
10090   gl_cv_func_printf_directive_a="guessing no"
10091 fi
10092 rm -rf conftest*
10093
10094              ;;
10095                                  # Guess no on native Windows.
10096            mingw*)               gl_cv_func_printf_directive_a="guessing no";;
10097                                  # If we don't know, assume the worst.
10098            *)                    gl_cv_func_printf_directive_a="guessing no";;
10099          esac
10100
10101 else
10102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10103 /* end confdefs.h.  */
10104
10105 #include <stdio.h>
10106 #include <string.h>
10107 static char buf[100];
10108 static double zero = 0.0;
10109 int main ()
10110 {
10111   int result = 0;
10112   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
10113       || (strcmp (buf, "0x1.922p+1 33") != 0
10114           && strcmp (buf, "0x3.244p+0 33") != 0
10115           && strcmp (buf, "0x6.488p-1 33") != 0
10116           && strcmp (buf, "0xc.91p-2 33") != 0))
10117     result |= 1;
10118   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
10119       || (strcmp (buf, "-0X1.922P+1 33") != 0
10120           && strcmp (buf, "-0X3.244P+0 33") != 0
10121           && strcmp (buf, "-0X6.488P-1 33") != 0
10122           && strcmp (buf, "-0XC.91P-2 33") != 0))
10123     result |= 2;
10124   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
10125   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
10126       || (strcmp (buf, "0x1.83p+0 33") != 0
10127           && strcmp (buf, "0x3.05p-1 33") != 0
10128           && strcmp (buf, "0x6.0ap-2 33") != 0
10129           && strcmp (buf, "0xc.14p-3 33") != 0))
10130     result |= 4;
10131   /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round.  */
10132   if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
10133       || (strcmp (buf, "0x2p+0 33") != 0
10134           && strcmp (buf, "0x3p-1 33") != 0
10135           && strcmp (buf, "0x6p-2 33") != 0
10136           && strcmp (buf, "0xcp-3 33") != 0))
10137     result |= 4;
10138   /* This catches a FreeBSD 6.1 bug.  See
10139      <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
10140   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
10141       || buf[0] == '0')
10142     result |= 8;
10143   /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
10144   if (sprintf (buf, "%.1a", 1.999) < 0
10145       || (strcmp (buf, "0x1.0p+1") != 0
10146           && strcmp (buf, "0x2.0p+0") != 0
10147           && strcmp (buf, "0x4.0p-1") != 0
10148           && strcmp (buf, "0x8.0p-2") != 0))
10149     result |= 16;
10150   /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
10151      glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
10152   if (sprintf (buf, "%.1La", 1.999L) < 0
10153       || (strcmp (buf, "0x1.0p+1") != 0
10154           && strcmp (buf, "0x2.0p+0") != 0
10155           && strcmp (buf, "0x4.0p-1") != 0
10156           && strcmp (buf, "0x8.0p-2") != 0))
10157     result |= 32;
10158   return result;
10159 }
10160 _ACEOF
10161 if ac_fn_c_try_run "$LINENO"
10162 then :
10163   gl_cv_func_printf_directive_a=yes
10164 else
10165   gl_cv_func_printf_directive_a=no
10166 fi
10167 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10168   conftest.$ac_objext conftest.beam conftest.$ac_ext
10169 fi
10170
10171
10172 fi
10173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
10174 printf "%s\n" "$gl_cv_func_printf_directive_a" >&6; }
10175
10176
10177
10178      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
10179 printf %s "checking whether printf supports the 'F' directive... " >&6; }
10180 if test ${gl_cv_func_printf_directive_f+y}
10181 then :
10182   printf %s "(cached) " >&6
10183 else
10184
10185       if test "$cross_compiling" = yes
10186 then :
10187
10188          case "$host_os" in
10189                                  # Guess yes on glibc systems.
10190            *-gnu* | gnu*)        gl_cv_func_printf_directive_f="guessing yes";;
10191                                  # Guess yes on FreeBSD >= 6.
10192            freebsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
10193            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
10194                                  # Guess yes on Mac OS X >= 10.3.
10195            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
10196            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
10197                                  # Guess yes on Solaris >= 2.10.
10198            solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
10199            solaris*)             gl_cv_func_printf_directive_f="guessing no";;
10200                                  # Guess yes on MSVC, no on mingw.
10201            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202 /* end confdefs.h.  */
10203
10204 #ifdef _MSC_VER
10205  Known
10206 #endif
10207
10208 _ACEOF
10209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10210   $EGREP "Known" >/dev/null 2>&1
10211 then :
10212   gl_cv_func_printf_directive_f="guessing yes"
10213 else
10214   gl_cv_func_printf_directive_f="guessing no"
10215 fi
10216 rm -rf conftest*
10217
10218                                  ;;
10219                                  # If we don't know, assume the worst.
10220            *)                    gl_cv_func_printf_directive_f="guessing no";;
10221          esac
10222
10223 else
10224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225 /* end confdefs.h.  */
10226
10227 #include <stdio.h>
10228 #include <string.h>
10229 static char buf[100];
10230 static double zero = 0.0;
10231 int main ()
10232 {
10233   int result = 0;
10234   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
10235       || strcmp (buf, "1234567.000000 33") != 0)
10236     result |= 1;
10237   if (sprintf (buf, "%F", 1.0 / zero) < 0
10238       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
10239     result |= 2;
10240   /* This catches a Cygwin 1.5.x bug.  */
10241   if (sprintf (buf, "%.F", 1234.0) < 0
10242       || strcmp (buf, "1234") != 0)
10243     result |= 4;
10244   return result;
10245 }
10246 _ACEOF
10247 if ac_fn_c_try_run "$LINENO"
10248 then :
10249   gl_cv_func_printf_directive_f=yes
10250 else
10251   gl_cv_func_printf_directive_f=no
10252 fi
10253 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10254   conftest.$ac_objext conftest.beam conftest.$ac_ext
10255 fi
10256
10257
10258 fi
10259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
10260 printf "%s\n" "$gl_cv_func_printf_directive_f" >&6; }
10261
10262
10263
10264      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
10265 printf %s "checking whether printf supports the 'n' directive... " >&6; }
10266 if test ${gl_cv_func_printf_directive_n+y}
10267 then :
10268   printf %s "(cached) " >&6
10269 else
10270
10271       if test "$cross_compiling" = yes
10272 then :
10273   case "$host_os" in
10274                    # Guess no on native Windows.
10275            mingw*) gl_cv_func_printf_directive_n="guessing no";;
10276            *)      gl_cv_func_printf_directive_n="guessing yes";;
10277          esac
10278
10279 else
10280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10281 /* end confdefs.h.  */
10282
10283 #include <stdio.h>
10284 #include <stdlib.h>
10285 #include <string.h>
10286 #ifdef _MSC_VER
10287 /* See page about "Parameter Validation" on msdn.microsoft.com.  */
10288 static void cdecl
10289 invalid_parameter_handler (const wchar_t *expression,
10290                            const wchar_t *function,
10291                            const wchar_t *file, unsigned int line,
10292                            uintptr_t dummy)
10293 {
10294   exit (1);
10295 }
10296 #endif
10297 static char fmtstring[10];
10298 static char buf[100];
10299 int main ()
10300 {
10301   int count = -1;
10302 #ifdef _MSC_VER
10303   _set_invalid_parameter_handler (invalid_parameter_handler);
10304 #endif
10305   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
10306      support %n in format strings in read-only memory but not in writable
10307      memory.  */
10308   strcpy (fmtstring, "%d %n");
10309   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
10310       || strcmp (buf, "123 ") != 0
10311       || count != 4)
10312     return 1;
10313   return 0;
10314 }
10315 _ACEOF
10316 if ac_fn_c_try_run "$LINENO"
10317 then :
10318   gl_cv_func_printf_directive_n=yes
10319 else
10320   gl_cv_func_printf_directive_n=no
10321 fi
10322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10323   conftest.$ac_objext conftest.beam conftest.$ac_ext
10324 fi
10325
10326
10327 fi
10328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
10329 printf "%s\n" "$gl_cv_func_printf_directive_n" >&6; }
10330
10331
10332
10333      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
10334 printf %s "checking whether printf supports the 'ls' directive... " >&6; }
10335 if test ${gl_cv_func_printf_directive_ls+y}
10336 then :
10337   printf %s "(cached) " >&6
10338 else
10339
10340       if test "$cross_compiling" = yes
10341 then :
10342
10343          case "$host_os" in
10344            openbsd*)       gl_cv_func_printf_directive_ls="guessing no";;
10345            irix*)          gl_cv_func_printf_directive_ls="guessing no";;
10346            solaris*)       gl_cv_func_printf_directive_ls="guessing no";;
10347            cygwin*)        gl_cv_func_printf_directive_ls="guessing no";;
10348            beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
10349                            # Guess yes on native Windows.
10350            mingw*)         gl_cv_func_printf_directive_ls="guessing yes";;
10351            *)              gl_cv_func_printf_directive_ls="guessing yes";;
10352          esac
10353
10354 else
10355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10356 /* end confdefs.h.  */
10357
10358 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10359    <wchar.h>.
10360    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10361    included before <wchar.h>.  */
10362 #include <stddef.h>
10363 #include <stdio.h>
10364 #include <time.h>
10365 #include <wchar.h>
10366 #include <string.h>
10367 int main ()
10368 {
10369   int result = 0;
10370   char buf[100];
10371   /* Test whether %ls works at all.
10372      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
10373      Cygwin 1.5.  */
10374   {
10375     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
10376     buf[0] = '\0';
10377     if (sprintf (buf, "%ls", wstring) < 0
10378         || strcmp (buf, "abc") != 0)
10379       result |= 1;
10380   }
10381   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
10382      assertion failure inside libc), but not on OpenBSD 4.0.  */
10383   {
10384     static const wchar_t wstring[] = { 'a', 0 };
10385     buf[0] = '\0';
10386     if (sprintf (buf, "%ls", wstring) < 0
10387         || strcmp (buf, "a") != 0)
10388       result |= 2;
10389   }
10390   /* Test whether precisions in %ls are supported as specified in ISO C 99
10391      section 7.19.6.1:
10392        "If a precision is specified, no more than that many bytes are written
10393         (including shift sequences, if any), and the array shall contain a
10394         null wide character if, to equal the multibyte character sequence
10395         length given by the precision, the function would need to access a
10396         wide character one past the end of the array."
10397      This test fails on Solaris 10.  */
10398   {
10399     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
10400     buf[0] = '\0';
10401     if (sprintf (buf, "%.2ls", wstring) < 0
10402         || strcmp (buf, "ab") != 0)
10403       result |= 8;
10404   }
10405   return result;
10406 }
10407 _ACEOF
10408 if ac_fn_c_try_run "$LINENO"
10409 then :
10410   gl_cv_func_printf_directive_ls=yes
10411 else
10412   gl_cv_func_printf_directive_ls=no
10413 fi
10414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10415   conftest.$ac_objext conftest.beam conftest.$ac_ext
10416 fi
10417
10418
10419 fi
10420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
10421 printf "%s\n" "$gl_cv_func_printf_directive_ls" >&6; }
10422
10423
10424
10425      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
10426 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
10427 if test ${gl_cv_func_printf_positions+y}
10428 then :
10429   printf %s "(cached) " >&6
10430 else
10431
10432       if test "$cross_compiling" = yes
10433 then :
10434
10435          case "$host_os" in
10436            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
10437                          gl_cv_func_printf_positions="guessing no";;
10438            beos*)        gl_cv_func_printf_positions="guessing no";;
10439                          # Guess no on native Windows.
10440            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
10441            *)            gl_cv_func_printf_positions="guessing yes";;
10442          esac
10443
10444 else
10445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10446 /* end confdefs.h.  */
10447
10448 #include <stdio.h>
10449 #include <string.h>
10450 /* The string "%2$d %1$d", with dollar characters protected from the shell's
10451    dollar expansion (possibly an autoconf bug).  */
10452 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
10453 static char buf[100];
10454 int main ()
10455 {
10456   sprintf (buf, format, 33, 55);
10457   return (strcmp (buf, "55 33") != 0);
10458 }
10459 _ACEOF
10460 if ac_fn_c_try_run "$LINENO"
10461 then :
10462   gl_cv_func_printf_positions=yes
10463 else
10464   gl_cv_func_printf_positions=no
10465 fi
10466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10467   conftest.$ac_objext conftest.beam conftest.$ac_ext
10468 fi
10469
10470
10471 fi
10472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
10473 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
10474
10475
10476
10477      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
10478 printf %s "checking whether printf supports the grouping flag... " >&6; }
10479 if test ${gl_cv_func_printf_flag_grouping+y}
10480 then :
10481   printf %s "(cached) " >&6
10482 else
10483
10484       if test "$cross_compiling" = yes
10485 then :
10486
10487          case "$host_os" in
10488            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
10489            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
10490                          # Guess no on native Windows.
10491            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
10492            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
10493          esac
10494
10495 else
10496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10497 /* end confdefs.h.  */
10498
10499 #include <stdio.h>
10500 #include <string.h>
10501 static char buf[100];
10502 int main ()
10503 {
10504   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
10505       || buf[strlen (buf) - 1] != '9')
10506     return 1;
10507   return 0;
10508 }
10509 _ACEOF
10510 if ac_fn_c_try_run "$LINENO"
10511 then :
10512   gl_cv_func_printf_flag_grouping=yes
10513 else
10514   gl_cv_func_printf_flag_grouping=no
10515 fi
10516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10517   conftest.$ac_objext conftest.beam conftest.$ac_ext
10518 fi
10519
10520
10521 fi
10522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
10523 printf "%s\n" "$gl_cv_func_printf_flag_grouping" >&6; }
10524
10525
10526
10527      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
10528 printf %s "checking whether printf supports the left-adjust flag correctly... " >&6; }
10529 if test ${gl_cv_func_printf_flag_leftadjust+y}
10530 then :
10531   printf %s "(cached) " >&6
10532 else
10533
10534       if test "$cross_compiling" = yes
10535 then :
10536
10537          case "$host_os" in
10538                     # Guess yes on HP-UX 11.
10539            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
10540                     # Guess no on HP-UX 10 and older.
10541            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
10542                     # Guess yes on native Windows.
10543            mingw*)  gl_cv_func_printf_flag_leftadjust="guessing yes";;
10544                     # Guess yes otherwise.
10545            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
10546          esac
10547
10548 else
10549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10550 /* end confdefs.h.  */
10551
10552 #include <stdio.h>
10553 #include <string.h>
10554 static char buf[100];
10555 int main ()
10556 {
10557   /* Check that a '-' flag is not annihilated by a negative width.  */
10558   if (sprintf (buf, "a%-*sc", -3, "b") < 0
10559       || strcmp (buf, "ab  c") != 0)
10560     return 1;
10561   return 0;
10562 }
10563 _ACEOF
10564 if ac_fn_c_try_run "$LINENO"
10565 then :
10566   gl_cv_func_printf_flag_leftadjust=yes
10567 else
10568   gl_cv_func_printf_flag_leftadjust=no
10569 fi
10570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10571   conftest.$ac_objext conftest.beam conftest.$ac_ext
10572 fi
10573
10574
10575 fi
10576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
10577 printf "%s\n" "$gl_cv_func_printf_flag_leftadjust" >&6; }
10578
10579
10580
10581      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
10582 printf %s "checking whether printf supports the zero flag correctly... " >&6; }
10583 if test ${gl_cv_func_printf_flag_zero+y}
10584 then :
10585   printf %s "(cached) " >&6
10586 else
10587
10588       if test "$cross_compiling" = yes
10589 then :
10590
10591          case "$host_os" in
10592                           # Guess yes on glibc systems.
10593            *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
10594                           # Guess yes on BeOS.
10595            beos*)         gl_cv_func_printf_flag_zero="guessing yes";;
10596                           # Guess no on native Windows.
10597            mingw*)        gl_cv_func_printf_flag_zero="guessing no";;
10598                           # If we don't know, assume the worst.
10599            *)             gl_cv_func_printf_flag_zero="guessing no";;
10600          esac
10601
10602 else
10603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10604 /* end confdefs.h.  */
10605
10606 #include <stdio.h>
10607 #include <string.h>
10608 static char buf[100];
10609 static double zero = 0.0;
10610 int main ()
10611 {
10612   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
10613       || (strcmp (buf, "       inf") != 0
10614           && strcmp (buf, "  infinity") != 0))
10615     return 1;
10616   return 0;
10617 }
10618 _ACEOF
10619 if ac_fn_c_try_run "$LINENO"
10620 then :
10621   gl_cv_func_printf_flag_zero=yes
10622 else
10623   gl_cv_func_printf_flag_zero=no
10624 fi
10625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10626   conftest.$ac_objext conftest.beam conftest.$ac_ext
10627 fi
10628
10629
10630 fi
10631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
10632 printf "%s\n" "$gl_cv_func_printf_flag_zero" >&6; }
10633
10634
10635
10636      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
10637 printf %s "checking whether printf supports large precisions... " >&6; }
10638 if test ${gl_cv_func_printf_precision+y}
10639 then :
10640   printf %s "(cached) " >&6
10641 else
10642
10643       if test "$cross_compiling" = yes
10644 then :
10645
10646          case "$host_os" in
10647            # Guess no only on Solaris, native Windows, and BeOS systems.
10648            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
10649            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
10650            beos*)        gl_cv_func_printf_precision="guessing no" ;;
10651            *)            gl_cv_func_printf_precision="guessing yes" ;;
10652          esac
10653
10654 else
10655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10656 /* end confdefs.h.  */
10657
10658 #include <stdio.h>
10659 #include <string.h>
10660 static char buf[5000];
10661 int main ()
10662 {
10663   int result = 0;
10664 #ifdef __BEOS__
10665   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
10666   return 1;
10667 #endif
10668   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
10669     result |= 1;
10670   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
10671     result |= 2;
10672   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
10673       || buf[0] != '1')
10674     result |= 4;
10675   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
10676       || buf[0] != '1')
10677     result |= 4;
10678   return result;
10679 }
10680 _ACEOF
10681 if ac_fn_c_try_run "$LINENO"
10682 then :
10683   gl_cv_func_printf_precision=yes
10684 else
10685   gl_cv_func_printf_precision=no
10686 fi
10687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10688   conftest.$ac_objext conftest.beam conftest.$ac_ext
10689 fi
10690
10691
10692 fi
10693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
10694 printf "%s\n" "$gl_cv_func_printf_precision" >&6; }
10695
10696
10697     gl_cv_c_multiarch=no
10698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h.  */
10700 #ifndef __APPLE_CC__
10701          not a universal capable compiler
10702         #endif
10703         typedef int dummy;
10704
10705 _ACEOF
10706 if ac_fn_c_try_compile "$LINENO"
10707 then :
10708
10709                arch=
10710      prev=
10711      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10712        if test -n "$prev"; then
10713          case $word in
10714            i?86 | x86_64 | ppc | ppc64)
10715              if test -z "$arch" || test "$arch" = "$word"; then
10716                arch="$word"
10717              else
10718                gl_cv_c_multiarch=yes
10719              fi
10720              ;;
10721          esac
10722          prev=
10723        else
10724          if test "x$word" = "x-arch"; then
10725            prev=arch
10726          fi
10727        fi
10728      done
10729
10730 fi
10731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10732   if test $gl_cv_c_multiarch = yes; then
10733     APPLE_UNIVERSAL_BUILD=1
10734   else
10735     APPLE_UNIVERSAL_BUILD=0
10736   fi
10737
10738
10739
10740
10741
10742      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
10743 printf %s "checking whether printf survives out-of-memory conditions... " >&6; }
10744 if test ${gl_cv_func_printf_enomem+y}
10745 then :
10746   printf %s "(cached) " >&6
10747 else
10748
10749       gl_cv_func_printf_enomem="guessing no"
10750       if test "$cross_compiling" = no; then
10751         if test $APPLE_UNIVERSAL_BUILD = 0; then
10752           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10753 /* end confdefs.h.  */
10754
10755
10756 #include <stdlib.h>
10757 #if defined __MACH__ && defined __APPLE__
10758 /* Avoid a crash on Mac OS X.  */
10759 #include <mach/mach.h>
10760 #include <mach/mach_error.h>
10761 #include <mach/thread_status.h>
10762 #include <mach/exception.h>
10763 #include <mach/task.h>
10764 #include <pthread.h>
10765 /* The exception port on which our thread listens.  */
10766 static mach_port_t our_exception_port;
10767 /* The main function of the thread listening for exceptions of type
10768    EXC_BAD_ACCESS.  */
10769 static void *
10770 mach_exception_thread (void *arg)
10771 {
10772   /* Buffer for a message to be received.  */
10773   struct {
10774     mach_msg_header_t head;
10775     mach_msg_body_t msgh_body;
10776     char data1024;
10777   } msg;
10778   mach_msg_return_t retval;
10779   /* Wait for a message on the exception port.  */
10780   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10781                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10782   if (retval != MACH_MSG_SUCCESS)
10783     abort ();
10784   exit (1);
10785 }
10786 static void
10787 nocrash_init (void)
10788 {
10789   mach_port_t self = mach_task_self ();
10790   /* Allocate a port on which the thread shall listen for exceptions.  */
10791   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10792       == KERN_SUCCESS) {
10793     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10794     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10795                                 MACH_MSG_TYPE_MAKE_SEND)
10796         == KERN_SUCCESS) {
10797       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10798          for us.  */
10799       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10800       /* Create the thread listening on the exception port.  */
10801       pthread_attr_t attr;
10802       pthread_t thread;
10803       if (pthread_attr_init (&attr) == 0
10804           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10805           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10806         pthread_attr_destroy (&attr);
10807         /* Replace the exception port info for these exceptions with our own.
10808            Note that we replace the exception port for the entire task, not only
10809            for a particular thread.  This has the effect that when our exception
10810            port gets the message, the thread specific exception port has already
10811            been asked, and we don't need to bother about it.
10812            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10813         task_set_exception_ports (self, mask, our_exception_port,
10814                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10815       }
10816     }
10817   }
10818 }
10819 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10820 /* Avoid a crash on native Windows.  */
10821 #define WIN32_LEAN_AND_MEAN
10822 #include <windows.h>
10823 #include <winerror.h>
10824 static LONG WINAPI
10825 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10826 {
10827   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10828     {
10829     case EXCEPTION_ACCESS_VIOLATION:
10830     case EXCEPTION_IN_PAGE_ERROR:
10831     case EXCEPTION_STACK_OVERFLOW:
10832     case EXCEPTION_GUARD_PAGE:
10833     case EXCEPTION_PRIV_INSTRUCTION:
10834     case EXCEPTION_ILLEGAL_INSTRUCTION:
10835     case EXCEPTION_DATATYPE_MISALIGNMENT:
10836     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10837     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10838       exit (1);
10839     }
10840   return EXCEPTION_CONTINUE_SEARCH;
10841 }
10842 static void
10843 nocrash_init (void)
10844 {
10845   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10846 }
10847 #else
10848 /* Avoid a crash on POSIX systems.  */
10849 #include <signal.h>
10850 #include <unistd.h>
10851 /* A POSIX signal handler.  */
10852 static void
10853 exception_handler (int sig)
10854 {
10855   _exit (1);
10856 }
10857 static void
10858 nocrash_init (void)
10859 {
10860 #ifdef SIGSEGV
10861   signal (SIGSEGV, exception_handler);
10862 #endif
10863 #ifdef SIGBUS
10864   signal (SIGBUS, exception_handler);
10865 #endif
10866 }
10867 #endif
10868
10869 #include <stdio.h>
10870 #include <sys/types.h>
10871 #include <sys/time.h>
10872 #include <sys/resource.h>
10873 #include <errno.h>
10874 int main()
10875 {
10876   struct rlimit limit;
10877   int ret;
10878   nocrash_init ();
10879   /* Some printf implementations allocate temporary space with malloc.  */
10880   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
10881 #ifdef RLIMIT_DATA
10882   if (getrlimit (RLIMIT_DATA, &limit) < 0)
10883     return 77;
10884   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10885     limit.rlim_max = 5000000;
10886   limit.rlim_cur = limit.rlim_max;
10887   if (setrlimit (RLIMIT_DATA, &limit) < 0)
10888     return 77;
10889 #endif
10890   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
10891 #ifdef RLIMIT_AS
10892   if (getrlimit (RLIMIT_AS, &limit) < 0)
10893     return 77;
10894   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10895     limit.rlim_max = 5000000;
10896   limit.rlim_cur = limit.rlim_max;
10897   if (setrlimit (RLIMIT_AS, &limit) < 0)
10898     return 77;
10899 #endif
10900   /* Some printf implementations allocate temporary space on the stack.  */
10901 #ifdef RLIMIT_STACK
10902   if (getrlimit (RLIMIT_STACK, &limit) < 0)
10903     return 77;
10904   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
10905     limit.rlim_max = 5000000;
10906   limit.rlim_cur = limit.rlim_max;
10907   if (setrlimit (RLIMIT_STACK, &limit) < 0)
10908     return 77;
10909 #endif
10910   ret = printf ("%.5000000f", 1.0);
10911   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
10912 }
10913
10914 _ACEOF
10915           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10916   (eval $ac_link) 2>&5
10917   ac_status=$?
10918   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10919   test $ac_status = 0; } && test -s conftest$ac_exeext; then
10920             (./conftest 2>&5
10921              result=$?
10922              printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
10923              if test $result != 0 && test $result != 77; then result=1; fi
10924              exit $result
10925             ) >/dev/null 2>/dev/null
10926             case $? in
10927               0) gl_cv_func_printf_enomem="yes" ;;
10928               77) gl_cv_func_printf_enomem="guessing no" ;;
10929               *) gl_cv_func_printf_enomem="no" ;;
10930             esac
10931           else
10932             gl_cv_func_printf_enomem="guessing no"
10933           fi
10934           rm -fr conftest*
10935         else
10936                                         gl_cv_func_printf_enomem="guessing no"
10937         fi
10938       fi
10939       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
10940         case "$host_os" in
10941                          # Guess yes on glibc systems.
10942           *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
10943                          # Guess yes on Solaris.
10944           solaris*)      gl_cv_func_printf_enomem="guessing yes";;
10945                          # Guess yes on AIX.
10946           aix*)          gl_cv_func_printf_enomem="guessing yes";;
10947                          # Guess yes on HP-UX/hppa.
10948           hpux*)         case "$host_cpu" in
10949                            hppa*) gl_cv_func_printf_enomem="guessing yes";;
10950                            *)     gl_cv_func_printf_enomem="guessing no";;
10951                          esac
10952                          ;;
10953                          # Guess yes on IRIX.
10954           irix*)         gl_cv_func_printf_enomem="guessing yes";;
10955                          # Guess yes on OSF/1.
10956           osf*)          gl_cv_func_printf_enomem="guessing yes";;
10957                          # Guess yes on BeOS.
10958           beos*)         gl_cv_func_printf_enomem="guessing yes";;
10959                          # Guess yes on Haiku.
10960           haiku*)        gl_cv_func_printf_enomem="guessing yes";;
10961                          # If we don't know, assume the worst.
10962           *)             gl_cv_func_printf_enomem="guessing no";;
10963         esac
10964       fi
10965
10966 fi
10967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
10968 printf "%s\n" "$gl_cv_func_printf_enomem" >&6; }
10969
10970
10971
10972   case "$gl_cv_func_printf_long_double" in
10973     *yes)
10974       ;;
10975     *)
10976
10977 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
10978
10979       ;;
10980   esac
10981
10982
10983
10984   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10985 printf %s "checking for unsigned long long int... " >&6; }
10986 if test ${ac_cv_type_unsigned_long_long_int+y}
10987 then :
10988   printf %s "(cached) " >&6
10989 else
10990   ac_cv_type_unsigned_long_long_int=yes
10991      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10992        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10993 /* end confdefs.h.  */
10994
10995   /* For now, do not test the preprocessor; as of 2007 there are too many
10996          implementations with broken preprocessors.  Perhaps this can
10997          be revisited in 2012.  In the meantime, code should not expect
10998          #if to work with literals wider than 32 bits.  */
10999       /* Test literals.  */
11000       long long int ll = 9223372036854775807ll;
11001       long long int nll = -9223372036854775807LL;
11002       unsigned long long int ull = 18446744073709551615ULL;
11003       /* Test constant expressions.   */
11004       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11005                      ? 1 : -1)];
11006       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11007                      ? 1 : -1)];
11008       int i = 63;
11009 int
11010 main (void)
11011 {
11012 /* Test availability of runtime routines for shift and division.  */
11013       long long int llmax = 9223372036854775807ll;
11014       unsigned long long int ullmax = 18446744073709551615ull;
11015       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11016               | (llmax / ll) | (llmax % ll)
11017               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11018               | (ullmax / ull) | (ullmax % ull));
11019   ;
11020   return 0;
11021 }
11022
11023 _ACEOF
11024 if ac_fn_c_try_link "$LINENO"
11025 then :
11026
11027 else
11028   ac_cv_type_unsigned_long_long_int=no
11029 fi
11030 rm -f core conftest.err conftest.$ac_objext \
11031     conftest$ac_exeext conftest.$ac_ext
11032      fi
11033 fi
11034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11035 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
11036   if test $ac_cv_type_unsigned_long_long_int = yes; then
11037
11038 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11039
11040   fi
11041
11042
11043
11044   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11045 printf %s "checking for long long int... " >&6; }
11046 if test ${ac_cv_type_long_long_int+y}
11047 then :
11048   printf %s "(cached) " >&6
11049 else
11050   ac_cv_type_long_long_int=yes
11051       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11052         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11053         if test $ac_cv_type_long_long_int = yes; then
11054                                         if test "$cross_compiling" = yes
11055 then :
11056   :
11057 else
11058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11059 /* end confdefs.h.  */
11060 #include <limits.h>
11061                  #ifndef LLONG_MAX
11062                  # define HALF \
11063                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11064                  # define LLONG_MAX (HALF - 1 + HALF)
11065                  #endif
11066 int
11067 main (void)
11068 {
11069 long long int n = 1;
11070                  int i;
11071                  for (i = 0; ; i++)
11072                    {
11073                      long long int m = n << i;
11074                      if (m >> i != n)
11075                        return 1;
11076                      if (LLONG_MAX / 2 < m)
11077                        break;
11078                    }
11079                  return 0;
11080   ;
11081   return 0;
11082 }
11083 _ACEOF
11084 if ac_fn_c_try_run "$LINENO"
11085 then :
11086
11087 else
11088   ac_cv_type_long_long_int=no
11089 fi
11090 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11091   conftest.$ac_objext conftest.beam conftest.$ac_ext
11092 fi
11093
11094         fi
11095       fi
11096 fi
11097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11098 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
11099   if test $ac_cv_type_long_long_int = yes; then
11100
11101 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11102
11103   fi
11104
11105
11106   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
11107 printf %s "checking for wchar_t... " >&6; }
11108 if test ${gt_cv_c_wchar_t+y}
11109 then :
11110   printf %s "(cached) " >&6
11111 else
11112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11113 /* end confdefs.h.  */
11114 #include <stddef.h>
11115             wchar_t foo = (wchar_t)'\0';
11116 int
11117 main (void)
11118 {
11119
11120   ;
11121   return 0;
11122 }
11123 _ACEOF
11124 if ac_fn_c_try_compile "$LINENO"
11125 then :
11126   gt_cv_c_wchar_t=yes
11127 else
11128   gt_cv_c_wchar_t=no
11129 fi
11130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11131 fi
11132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11133 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
11134   if test $gt_cv_c_wchar_t = yes; then
11135
11136 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
11137
11138   fi
11139
11140
11141   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11142 printf %s "checking for wint_t... " >&6; }
11143 if test ${gt_cv_c_wint_t+y}
11144 then :
11145   printf %s "(cached) " >&6
11146 else
11147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11148 /* end confdefs.h.  */
11149
11150 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11151    <wchar.h>.
11152    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11153    before <wchar.h>.  */
11154 #include <stddef.h>
11155 #include <stdio.h>
11156 #include <time.h>
11157 #include <wchar.h>
11158             wint_t foo = (wchar_t)'\0';
11159 int
11160 main (void)
11161 {
11162
11163   ;
11164   return 0;
11165 }
11166 _ACEOF
11167 if ac_fn_c_try_compile "$LINENO"
11168 then :
11169   gt_cv_c_wint_t=yes
11170 else
11171   gt_cv_c_wint_t=no
11172 fi
11173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11174 fi
11175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11176 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
11177   if test $gt_cv_c_wint_t = yes; then
11178
11179 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
11180
11181
11182             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
11183 printf %s "checking whether wint_t is too small... " >&6; }
11184 if test ${gl_cv_type_wint_t_too_small+y}
11185 then :
11186   printf %s "(cached) " >&6
11187 else
11188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189 /* end confdefs.h.  */
11190
11191 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11192    <wchar.h>.
11193    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11194    included before <wchar.h>.  */
11195 #if !(defined __GLIBC__ && !defined __UCLIBC__)
11196 # include <stddef.h>
11197 # include <stdio.h>
11198 # include <time.h>
11199 #endif
11200 #include <wchar.h>
11201               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
11202
11203 int
11204 main (void)
11205 {
11206
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 if ac_fn_c_try_compile "$LINENO"
11212 then :
11213   gl_cv_type_wint_t_too_small=no
11214 else
11215   gl_cv_type_wint_t_too_small=yes
11216 fi
11217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11218 fi
11219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
11220 printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
11221     if test $gl_cv_type_wint_t_too_small = yes; then
11222       GNULIB_OVERRIDES_WINT_T=1
11223     else
11224       GNULIB_OVERRIDES_WINT_T=0
11225     fi
11226   else
11227     GNULIB_OVERRIDES_WINT_T=0
11228   fi
11229
11230
11231
11232
11233
11234   if test $ac_cv_header_features_h = yes; then
11235     HAVE_FEATURES_H=1
11236   else
11237     HAVE_FEATURES_H=0
11238   fi
11239
11240
11241
11242
11243
11244   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
11245 printf %s "checking for intmax_t... " >&6; }
11246 if test ${gt_cv_c_intmax_t+y}
11247 then :
11248   printf %s "(cached) " >&6
11249 else
11250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11251 /* end confdefs.h.  */
11252
11253 #include <stddef.h>
11254 #include <stdlib.h>
11255 #if HAVE_STDINT_H_WITH_UINTMAX
11256 #include <stdint.h>
11257 #endif
11258 #if HAVE_INTTYPES_H_WITH_UINTMAX
11259 #include <inttypes.h>
11260 #endif
11261
11262 int
11263 main (void)
11264 {
11265 intmax_t x = -1; return !x;
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 if ac_fn_c_try_compile "$LINENO"
11271 then :
11272   gt_cv_c_intmax_t=yes
11273 else
11274   gt_cv_c_intmax_t=no
11275 fi
11276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277 fi
11278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
11279 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
11280   if test $gt_cv_c_intmax_t = yes; then
11281
11282 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
11283
11284   else
11285
11286     test $ac_cv_type_long_long_int = yes \
11287       && ac_type='long long' \
11288       || ac_type='long'
11289
11290 printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
11291
11292   fi
11293
11294
11295   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11296 printf %s "checking where to find the exponent in a 'double'... " >&6; }
11297 if test ${gl_cv_cc_double_expbit0+y}
11298 then :
11299   printf %s "(cached) " >&6
11300 else
11301
11302       if test "$cross_compiling" = yes
11303 then :
11304
11305                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306 /* end confdefs.h.  */
11307
11308 #if defined arm || defined __arm || defined __arm__
11309   mixed_endianness
11310 #endif
11311
11312 _ACEOF
11313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11314   $EGREP "mixed_endianness" >/dev/null 2>&1
11315 then :
11316   gl_cv_cc_double_expbit0="unknown"
11317 else
11318
11319                                                          :
11320 if test ${ac_cv_c_bigendian+y}
11321 then :
11322   printf %s "(cached) " >&6
11323 else
11324   ac_cv_c_bigendian=unknown
11325     # See if we're dealing with a universal compiler.
11326     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327 /* end confdefs.h.  */
11328 #ifndef __APPLE_CC__
11329                not a universal capable compiler
11330              #endif
11331              typedef int dummy;
11332
11333 _ACEOF
11334 if ac_fn_c_try_compile "$LINENO"
11335 then :
11336
11337         # Check for potential -arch flags.  It is not universal unless
11338         # there are at least two -arch flags with different values.
11339         ac_arch=
11340         ac_prev=
11341         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11342          if test -n "$ac_prev"; then
11343            case $ac_word in
11344              i?86 | x86_64 | ppc | ppc64)
11345                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11346                  ac_arch=$ac_word
11347                else
11348                  ac_cv_c_bigendian=universal
11349                  break
11350                fi
11351                ;;
11352            esac
11353            ac_prev=
11354          elif test "x$ac_word" = "x-arch"; then
11355            ac_prev=arch
11356          fi
11357        done
11358 fi
11359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11360     if test $ac_cv_c_bigendian = unknown; then
11361       # See if sys/param.h defines the BYTE_ORDER macro.
11362       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11363 /* end confdefs.h.  */
11364 #include <sys/types.h>
11365              #include <sys/param.h>
11366
11367 int
11368 main (void)
11369 {
11370 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11371                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11372                      && LITTLE_ENDIAN)
11373               bogus endian macros
11374              #endif
11375
11376   ;
11377   return 0;
11378 }
11379 _ACEOF
11380 if ac_fn_c_try_compile "$LINENO"
11381 then :
11382   # It does; now see whether it defined to BIG_ENDIAN or not.
11383          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11384 /* end confdefs.h.  */
11385 #include <sys/types.h>
11386                 #include <sys/param.h>
11387
11388 int
11389 main (void)
11390 {
11391 #if BYTE_ORDER != BIG_ENDIAN
11392                  not big endian
11393                 #endif
11394
11395   ;
11396   return 0;
11397 }
11398 _ACEOF
11399 if ac_fn_c_try_compile "$LINENO"
11400 then :
11401   ac_cv_c_bigendian=yes
11402 else
11403   ac_cv_c_bigendian=no
11404 fi
11405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11406 fi
11407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11408     fi
11409     if test $ac_cv_c_bigendian = unknown; then
11410       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11411       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412 /* end confdefs.h.  */
11413 #include <limits.h>
11414
11415 int
11416 main (void)
11417 {
11418 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11419               bogus endian macros
11420              #endif
11421
11422   ;
11423   return 0;
11424 }
11425 _ACEOF
11426 if ac_fn_c_try_compile "$LINENO"
11427 then :
11428   # It does; now see whether it defined to _BIG_ENDIAN or not.
11429          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11430 /* end confdefs.h.  */
11431 #include <limits.h>
11432
11433 int
11434 main (void)
11435 {
11436 #ifndef _BIG_ENDIAN
11437                  not big endian
11438                 #endif
11439
11440   ;
11441   return 0;
11442 }
11443 _ACEOF
11444 if ac_fn_c_try_compile "$LINENO"
11445 then :
11446   ac_cv_c_bigendian=yes
11447 else
11448   ac_cv_c_bigendian=no
11449 fi
11450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11451 fi
11452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11453     fi
11454     if test $ac_cv_c_bigendian = unknown; then
11455       # Compile a test program.
11456       if test "$cross_compiling" = yes
11457 then :
11458   # Try to guess by grepping values from an object file.
11459          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460 /* end confdefs.h.  */
11461 short int ascii_mm[] =
11462                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11463                 short int ascii_ii[] =
11464                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11465                 int use_ascii (int i) {
11466                   return ascii_mm[i] + ascii_ii[i];
11467                 }
11468                 short int ebcdic_ii[] =
11469                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11470                 short int ebcdic_mm[] =
11471                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11472                 int use_ebcdic (int i) {
11473                   return ebcdic_mm[i] + ebcdic_ii[i];
11474                 }
11475                 extern int foo;
11476
11477 int
11478 main (void)
11479 {
11480 return use_ascii (foo) == use_ebcdic (foo);
11481   ;
11482   return 0;
11483 }
11484 _ACEOF
11485 if ac_fn_c_try_compile "$LINENO"
11486 then :
11487   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11488               ac_cv_c_bigendian=yes
11489             fi
11490             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11491               if test "$ac_cv_c_bigendian" = unknown; then
11492                 ac_cv_c_bigendian=no
11493               else
11494                 # finding both strings is unlikely to happen, but who knows?
11495                 ac_cv_c_bigendian=unknown
11496               fi
11497             fi
11498 fi
11499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11500 else
11501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502 /* end confdefs.h.  */
11503 $ac_includes_default
11504 int
11505 main (void)
11506 {
11507
11508              /* Are we little or big endian?  From Harbison&Steele.  */
11509              union
11510              {
11511                long int l;
11512                char c[sizeof (long int)];
11513              } u;
11514              u.l = 1;
11515              return u.c[sizeof (long int) - 1] == 1;
11516
11517   ;
11518   return 0;
11519 }
11520 _ACEOF
11521 if ac_fn_c_try_run "$LINENO"
11522 then :
11523   ac_cv_c_bigendian=no
11524 else
11525   ac_cv_c_bigendian=yes
11526 fi
11527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11528   conftest.$ac_objext conftest.beam conftest.$ac_ext
11529 fi
11530
11531     fi
11532 fi
11533 :
11534  case $ac_cv_c_bigendian in #(
11535    yes)
11536      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
11537    no)
11538      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
11539    universal)
11540
11541 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11542
11543      ;; #(
11544    *)
11545      gl_cv_cc_double_expbit0="unknown" ;;
11546  esac
11547
11548
11549 fi
11550 rm -rf conftest*
11551
11552
11553 else
11554   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555 /* end confdefs.h.  */
11556
11557 #include <float.h>
11558 #include <stddef.h>
11559 #include <stdio.h>
11560 #include <string.h>
11561 #define NWORDS \
11562   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11563 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11564 static unsigned int ored_words[NWORDS];
11565 static unsigned int anded_words[NWORDS];
11566 static void add_to_ored_words (double x)
11567 {
11568   memory_double m;
11569   size_t i;
11570   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
11571   memset (&m, 0, sizeof (memory_double));
11572   m.value = x;
11573   for (i = 0; i < NWORDS; i++)
11574     {
11575       ored_words[i] |= m.word[i];
11576       anded_words[i] &= m.word[i];
11577     }
11578 }
11579 int main ()
11580 {
11581   size_t j;
11582   FILE *fp = fopen ("conftest.out", "w");
11583   if (fp == NULL)
11584     return 1;
11585   for (j = 0; j < NWORDS; j++)
11586     anded_words[j] = ~ (unsigned int) 0;
11587   add_to_ored_words (0.25);
11588   add_to_ored_words (0.5);
11589   add_to_ored_words (1.0);
11590   add_to_ored_words (2.0);
11591   add_to_ored_words (4.0);
11592   /* Remove bits that are common (e.g. if representation of the first mantissa
11593      bit is explicit).  */
11594   for (j = 0; j < NWORDS; j++)
11595     ored_words[j] &= ~anded_words[j];
11596   /* Now find the nonzero word.  */
11597   for (j = 0; j < NWORDS; j++)
11598     if (ored_words[j] != 0)
11599       break;
11600   if (j < NWORDS)
11601     {
11602       size_t i;
11603       for (i = j + 1; i < NWORDS; i++)
11604         if (ored_words[i] != 0)
11605           {
11606             fprintf (fp, "unknown");
11607             return (fclose (fp) != 0);
11608           }
11609       for (i = 0; ; i++)
11610         if ((ored_words[j] >> i) & 1)
11611           {
11612             fprintf (fp, "word %d bit %d", (int) j, (int) i);
11613             return (fclose (fp) != 0);
11614           }
11615     }
11616   fprintf (fp, "unknown");
11617   return (fclose (fp) != 0);
11618 }
11619
11620 _ACEOF
11621 if ac_fn_c_try_run "$LINENO"
11622 then :
11623   gl_cv_cc_double_expbit0=`cat conftest.out`
11624 else
11625   gl_cv_cc_double_expbit0="unknown"
11626 fi
11627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11628   conftest.$ac_objext conftest.beam conftest.$ac_ext
11629 fi
11630
11631       rm -f conftest.out
11632
11633 fi
11634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11635 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
11636   case "$gl_cv_cc_double_expbit0" in
11637     word*bit*)
11638       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11639       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
11640
11641 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
11642
11643
11644 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
11645
11646       ;;
11647   esac
11648
11649
11650
11651
11652
11653
11654
11655
11656   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
11657 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
11658 if test ${gl_cv_func_snprintf_retval_c99+y}
11659 then :
11660   printf %s "(cached) " >&6
11661 else
11662
11663       if test "$cross_compiling" = yes
11664 then :
11665   case "$host_os" in
11666                                  # Guess yes on glibc systems.
11667            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
11668                                  # Guess yes on FreeBSD >= 5.
11669            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
11670            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
11671                                  # Guess yes on Mac OS X >= 10.3.
11672            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
11673            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11674                                  # Guess yes on OpenBSD >= 3.9.
11675            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
11676                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11677            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
11678                                  # Guess yes on Solaris >= 2.10.
11679            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
11680            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
11681                                  # Guess yes on AIX >= 4.
11682            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
11683            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
11684                                  # Guess yes on NetBSD >= 3.
11685            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
11686                                  gl_cv_func_snprintf_retval_c99="guessing no";;
11687            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
11688                                  # Guess yes on BeOS.
11689            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
11690                                  # Guess yes on MSVC, no on mingw.
11691            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h.  */
11693
11694 #ifdef _MSC_VER
11695  Known
11696 #endif
11697
11698 _ACEOF
11699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11700   $EGREP "Known" >/dev/null 2>&1
11701 then :
11702   gl_cv_func_snprintf_retval_c99="guessing yes"
11703 else
11704   gl_cv_func_snprintf_retval_c99="guessing no"
11705 fi
11706 rm -rf conftest*
11707
11708                                  ;;
11709                                  # If we don't know, assume the worst.
11710            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
11711          esac
11712
11713 else
11714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11715 /* end confdefs.h.  */
11716
11717 #include <stdio.h>
11718 #include <string.h>
11719 #if HAVE_SNPRINTF
11720 # define my_snprintf snprintf
11721 #else
11722 # include <stdarg.h>
11723 static int my_snprintf (char *buf, int size, const char *format, ...)
11724 {
11725   va_list args;
11726   int ret;
11727   va_start (args, format);
11728   ret = vsnprintf (buf, size, format, args);
11729   va_end (args);
11730   return ret;
11731 }
11732 #endif
11733 static char buf[100];
11734 int main ()
11735 {
11736   strcpy (buf, "ABCDEF");
11737   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
11738     return 1;
11739   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
11740     return 2;
11741   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
11742     return 3;
11743   return 0;
11744 }
11745 _ACEOF
11746 if ac_fn_c_try_run "$LINENO"
11747 then :
11748   gl_cv_func_snprintf_retval_c99=yes
11749 else
11750   gl_cv_func_snprintf_retval_c99=no
11751 fi
11752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11753   conftest.$ac_objext conftest.beam conftest.$ac_ext
11754 fi
11755
11756
11757 fi
11758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
11759 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
11760
11761
11762
11763
11764
11765
11766   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
11767 if test "x$ac_cv_func_snprintf" = xyes
11768 then :
11769   printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
11770
11771 fi
11772 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
11773 if test "x$ac_cv_func_strnlen" = xyes
11774 then :
11775   printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
11776
11777 fi
11778 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
11779 if test "x$ac_cv_func_wcslen" = xyes
11780 then :
11781   printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
11782
11783 fi
11784 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
11785 if test "x$ac_cv_func_wcsnlen" = xyes
11786 then :
11787   printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
11788
11789 fi
11790 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
11791 if test "x$ac_cv_func_mbrtowc" = xyes
11792 then :
11793   printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
11794
11795 fi
11796 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
11797 if test "x$ac_cv_func_wcrtomb" = xyes
11798 then :
11799   printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
11800
11801 fi
11802
11803       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11804 "
11805 if test "x$ac_cv_have_decl__snprintf" = xyes
11806 then :
11807   ac_have_decl=1
11808 else
11809   ac_have_decl=0
11810 fi
11811
11812 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
11813
11814
11815
11816   case "$gl_cv_func_snprintf_retval_c99" in
11817     *yes)
11818
11819 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
11820
11821       ;;
11822   esac
11823
11824
11825
11826
11827
11828   GNULIB_ACOSF=0;
11829   GNULIB_ACOSL=0;
11830   GNULIB_ASINF=0;
11831   GNULIB_ASINL=0;
11832   GNULIB_ATANF=0;
11833   GNULIB_ATANL=0;
11834   GNULIB_ATAN2F=0;
11835   GNULIB_CBRT=0;
11836   GNULIB_CBRTF=0;
11837   GNULIB_CBRTL=0;
11838   GNULIB_CEIL=0;
11839   GNULIB_CEILF=0;
11840   GNULIB_CEILL=0;
11841   GNULIB_COPYSIGN=0;
11842   GNULIB_COPYSIGNF=0;
11843   GNULIB_COPYSIGNL=0;
11844   GNULIB_COSF=0;
11845   GNULIB_COSL=0;
11846   GNULIB_COSHF=0;
11847   GNULIB_EXPF=0;
11848   GNULIB_EXPL=0;
11849   GNULIB_EXP2=0;
11850   GNULIB_EXP2F=0;
11851   GNULIB_EXP2L=0;
11852   GNULIB_EXPM1=0;
11853   GNULIB_EXPM1F=0;
11854   GNULIB_EXPM1L=0;
11855   GNULIB_FABSF=0;
11856   GNULIB_FABSL=0;
11857   GNULIB_FLOOR=0;
11858   GNULIB_FLOORF=0;
11859   GNULIB_FLOORL=0;
11860   GNULIB_FMA=0;
11861   GNULIB_FMAF=0;
11862   GNULIB_FMAL=0;
11863   GNULIB_FMOD=0;
11864   GNULIB_FMODF=0;
11865   GNULIB_FMODL=0;
11866   GNULIB_FREXPF=0;
11867   GNULIB_FREXP=0;
11868   GNULIB_FREXPL=0;
11869   GNULIB_HYPOT=0;
11870   GNULIB_HYPOTF=0;
11871   GNULIB_HYPOTL=0;
11872   GNULIB_ILOGB=0;
11873   GNULIB_ILOGBF=0;
11874   GNULIB_ILOGBL=0;
11875   GNULIB_ISFINITE=0;
11876   GNULIB_ISINF=0;
11877   GNULIB_ISNAN=0;
11878   GNULIB_ISNANF=0;
11879   GNULIB_ISNAND=0;
11880   GNULIB_ISNANL=0;
11881   GNULIB_LDEXPF=0;
11882   GNULIB_LDEXPL=0;
11883   GNULIB_LOG=0;
11884   GNULIB_LOGF=0;
11885   GNULIB_LOGL=0;
11886   GNULIB_LOG10=0;
11887   GNULIB_LOG10F=0;
11888   GNULIB_LOG10L=0;
11889   GNULIB_LOG1P=0;
11890   GNULIB_LOG1PF=0;
11891   GNULIB_LOG1PL=0;
11892   GNULIB_LOG2=0;
11893   GNULIB_LOG2F=0;
11894   GNULIB_LOG2L=0;
11895   GNULIB_LOGB=0;
11896   GNULIB_LOGBF=0;
11897   GNULIB_LOGBL=0;
11898   GNULIB_MODF=0;
11899   GNULIB_MODFF=0;
11900   GNULIB_MODFL=0;
11901   GNULIB_POWF=0;
11902   GNULIB_REMAINDER=0;
11903   GNULIB_REMAINDERF=0;
11904   GNULIB_REMAINDERL=0;
11905   GNULIB_RINT=0;
11906   GNULIB_RINTF=0;
11907   GNULIB_RINTL=0;
11908   GNULIB_ROUND=0;
11909   GNULIB_ROUNDF=0;
11910   GNULIB_ROUNDL=0;
11911   GNULIB_SIGNBIT=0;
11912   GNULIB_SINF=0;
11913   GNULIB_SINL=0;
11914   GNULIB_SINHF=0;
11915   GNULIB_SQRTF=0;
11916   GNULIB_SQRTL=0;
11917   GNULIB_TANF=0;
11918   GNULIB_TANL=0;
11919   GNULIB_TANHF=0;
11920   GNULIB_TRUNC=0;
11921   GNULIB_TRUNCF=0;
11922   GNULIB_TRUNCL=0;
11923     HAVE_ACOSF=1;
11924   HAVE_ACOSL=1;
11925   HAVE_ASINF=1;
11926   HAVE_ASINL=1;
11927   HAVE_ATANF=1;
11928   HAVE_ATANL=1;
11929   HAVE_ATAN2F=1;
11930   HAVE_CBRT=1;
11931   HAVE_CBRTF=1;
11932   HAVE_CBRTL=1;
11933   HAVE_COPYSIGN=1;
11934   HAVE_COPYSIGNL=1;
11935   HAVE_COSF=1;
11936   HAVE_COSL=1;
11937   HAVE_COSHF=1;
11938   HAVE_EXPF=1;
11939   HAVE_EXPL=1;
11940   HAVE_EXPM1=1;
11941   HAVE_EXPM1F=1;
11942   HAVE_FABSF=1;
11943   HAVE_FABSL=1;
11944   HAVE_FMA=1;
11945   HAVE_FMAF=1;
11946   HAVE_FMAL=1;
11947   HAVE_FMODF=1;
11948   HAVE_FMODL=1;
11949   HAVE_FREXPF=1;
11950   HAVE_HYPOTF=1;
11951   HAVE_HYPOTL=1;
11952   HAVE_ILOGB=1;
11953   HAVE_ILOGBF=1;
11954   HAVE_ILOGBL=1;
11955   HAVE_ISNANF=1;
11956   HAVE_ISNAND=1;
11957   HAVE_ISNANL=1;
11958   HAVE_LDEXPF=1;
11959   HAVE_LOGF=1;
11960   HAVE_LOGL=1;
11961   HAVE_LOG10F=1;
11962   HAVE_LOG10L=1;
11963   HAVE_LOG1P=1;
11964   HAVE_LOG1PF=1;
11965   HAVE_LOG1PL=1;
11966   HAVE_LOGBF=1;
11967   HAVE_LOGBL=1;
11968   HAVE_MODFF=1;
11969   HAVE_MODFL=1;
11970   HAVE_POWF=1;
11971   HAVE_REMAINDER=1;
11972   HAVE_REMAINDERF=1;
11973   HAVE_RINT=1;
11974   HAVE_RINTL=1;
11975   HAVE_SINF=1;
11976   HAVE_SINL=1;
11977   HAVE_SINHF=1;
11978   HAVE_SQRTF=1;
11979   HAVE_SQRTL=1;
11980   HAVE_TANF=1;
11981   HAVE_TANL=1;
11982   HAVE_TANHF=1;
11983   HAVE_DECL_ACOSL=1;
11984   HAVE_DECL_ASINL=1;
11985   HAVE_DECL_ATANL=1;
11986   HAVE_DECL_CBRTF=1;
11987   HAVE_DECL_CBRTL=1;
11988   HAVE_DECL_CEILF=1;
11989   HAVE_DECL_CEILL=1;
11990   HAVE_DECL_COPYSIGNF=1;
11991   HAVE_DECL_COSL=1;
11992   HAVE_DECL_EXPL=1;
11993   HAVE_DECL_EXP2=1;
11994   HAVE_DECL_EXP2F=1;
11995   HAVE_DECL_EXP2L=1;
11996   HAVE_DECL_EXPM1L=1;
11997   HAVE_DECL_FLOORF=1;
11998   HAVE_DECL_FLOORL=1;
11999   HAVE_DECL_FREXPL=1;
12000   HAVE_DECL_LDEXPL=1;
12001   HAVE_DECL_LOGL=1;
12002   HAVE_DECL_LOG10L=1;
12003   HAVE_DECL_LOG2=1;
12004   HAVE_DECL_LOG2F=1;
12005   HAVE_DECL_LOG2L=1;
12006   HAVE_DECL_LOGB=1;
12007   HAVE_DECL_REMAINDER=1;
12008   HAVE_DECL_REMAINDERL=1;
12009   HAVE_DECL_RINTF=1;
12010   HAVE_DECL_ROUND=1;
12011   HAVE_DECL_ROUNDF=1;
12012   HAVE_DECL_ROUNDL=1;
12013   HAVE_DECL_SINL=1;
12014   HAVE_DECL_SQRTL=1;
12015   HAVE_DECL_TANL=1;
12016   HAVE_DECL_TRUNC=1;
12017   HAVE_DECL_TRUNCF=1;
12018   HAVE_DECL_TRUNCL=1;
12019   REPLACE_ACOSF=0;
12020   REPLACE_ASINF=0;
12021   REPLACE_ATANF=0;
12022   REPLACE_ATAN2F=0;
12023   REPLACE_CBRTF=0;
12024   REPLACE_CBRTL=0;
12025   REPLACE_CEIL=0;
12026   REPLACE_CEILF=0;
12027   REPLACE_CEILL=0;
12028   REPLACE_COSF=0;
12029   REPLACE_COSHF=0;
12030   REPLACE_EXPF=0;
12031   REPLACE_EXPM1=0;
12032   REPLACE_EXPM1F=0;
12033   REPLACE_EXP2=0;
12034   REPLACE_EXP2L=0;
12035   REPLACE_FABSL=0;
12036   REPLACE_FLOOR=0;
12037   REPLACE_FLOORF=0;
12038   REPLACE_FLOORL=0;
12039   REPLACE_FMA=0;
12040   REPLACE_FMAF=0;
12041   REPLACE_FMAL=0;
12042   REPLACE_FMOD=0;
12043   REPLACE_FMODF=0;
12044   REPLACE_FMODL=0;
12045   REPLACE_FREXPF=0;
12046   REPLACE_FREXP=0;
12047   REPLACE_FREXPL=0;
12048   REPLACE_HUGE_VAL=0;
12049   REPLACE_HYPOT=0;
12050   REPLACE_HYPOTF=0;
12051   REPLACE_HYPOTL=0;
12052   REPLACE_ILOGB=0;
12053   REPLACE_ILOGBF=0;
12054   REPLACE_ILOGBL=0;
12055   REPLACE_ISFINITE=0;
12056   REPLACE_ISINF=0;
12057   REPLACE_ISNAN=0;
12058   REPLACE_LDEXPL=0;
12059   REPLACE_LOG=0;
12060   REPLACE_LOGF=0;
12061   REPLACE_LOGL=0;
12062   REPLACE_LOG10=0;
12063   REPLACE_LOG10F=0;
12064   REPLACE_LOG10L=0;
12065   REPLACE_LOG1P=0;
12066   REPLACE_LOG1PF=0;
12067   REPLACE_LOG1PL=0;
12068   REPLACE_LOG2=0;
12069   REPLACE_LOG2F=0;
12070   REPLACE_LOG2L=0;
12071   REPLACE_LOGB=0;
12072   REPLACE_LOGBF=0;
12073   REPLACE_LOGBL=0;
12074   REPLACE_MODF=0;
12075   REPLACE_MODFF=0;
12076   REPLACE_MODFL=0;
12077   REPLACE_NAN=0;
12078   REPLACE_REMAINDER=0;
12079   REPLACE_REMAINDERF=0;
12080   REPLACE_REMAINDERL=0;
12081   REPLACE_ROUND=0;
12082   REPLACE_ROUNDF=0;
12083   REPLACE_ROUNDL=0;
12084   REPLACE_SIGNBIT=0;
12085   REPLACE_SIGNBIT_USING_GCC=0;
12086   REPLACE_SINF=0;
12087   REPLACE_SINHF=0;
12088   REPLACE_SQRTF=0;
12089   REPLACE_SQRTL=0;
12090   REPLACE_TANF=0;
12091   REPLACE_TANHF=0;
12092   REPLACE_TRUNC=0;
12093   REPLACE_TRUNCF=0;
12094   REPLACE_TRUNCL=0;
12095
12096
12097   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
12098 printf %s "checking whether frexp() can be used without linking with libm... " >&6; }
12099 if test ${gl_cv_func_frexp_no_libm+y}
12100 then :
12101   printf %s "(cached) " >&6
12102 else
12103
12104       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h.  */
12106 #include <math.h>
12107              double x;
12108 int
12109 main (void)
12110 {
12111 int e; return frexp (x, &e) > 0;
12112   ;
12113   return 0;
12114 }
12115 _ACEOF
12116 if ac_fn_c_try_link "$LINENO"
12117 then :
12118   gl_cv_func_frexp_no_libm=yes
12119 else
12120   gl_cv_func_frexp_no_libm=no
12121 fi
12122 rm -f core conftest.err conftest.$ac_objext \
12123     conftest$ac_exeext conftest.$ac_ext
12124
12125 fi
12126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
12127 printf "%s\n" "$gl_cv_func_frexp_no_libm" >&6; }
12128
12129 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
12130 if test "x$ac_cv_have_decl_alarm" = xyes
12131 then :
12132   ac_have_decl=1
12133 else
12134   ac_have_decl=0
12135 fi
12136
12137 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
12138
12139
12140     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
12141 printf %s "checking whether stdin defaults to large file offsets... " >&6; }
12142 if test ${gl_cv_var_stdin_large_offset+y}
12143 then :
12144   printf %s "(cached) " >&6
12145 else
12146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12147 /* end confdefs.h.  */
12148 #include <stdio.h>
12149 int
12150 main (void)
12151 {
12152 #if defined __SL64 && defined __SCLE /* cygwin */
12153   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
12154      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
12155      it is easier to do a version check than building a runtime test.  */
12156 # include <cygwin/version.h>
12157 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
12158   choke me
12159 # endif
12160 #endif
12161   ;
12162   return 0;
12163 }
12164 _ACEOF
12165 if ac_fn_c_try_link "$LINENO"
12166 then :
12167   gl_cv_var_stdin_large_offset=yes
12168 else
12169   gl_cv_var_stdin_large_offset=no
12170 fi
12171 rm -f core conftest.err conftest.$ac_objext \
12172     conftest$ac_exeext conftest.$ac_ext
12173 fi
12174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
12175 printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
12176
12177
12178
12179
12180
12181   case "$host_os" in
12182     mingw*)
12183                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
12184 printf %s "checking for 64-bit off_t... " >&6; }
12185 if test ${gl_cv_type_off_t_64+y}
12186 then :
12187   printf %s "(cached) " >&6
12188 else
12189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190 /* end confdefs.h.  */
12191 #include <sys/types.h>
12192                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
12193
12194 int
12195 main (void)
12196 {
12197
12198   ;
12199   return 0;
12200 }
12201 _ACEOF
12202 if ac_fn_c_try_compile "$LINENO"
12203 then :
12204   gl_cv_type_off_t_64=yes
12205 else
12206   gl_cv_type_off_t_64=no
12207 fi
12208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12209
12210 fi
12211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
12212 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
12213       if test $gl_cv_type_off_t_64 = no; then
12214         WINDOWS_64_BIT_OFF_T=1
12215       else
12216         WINDOWS_64_BIT_OFF_T=0
12217       fi
12218                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
12219 printf %s "checking for 64-bit st_size... " >&6; }
12220 if test ${gl_cv_member_st_size_64+y}
12221 then :
12222   printf %s "(cached) " >&6
12223 else
12224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12225 /* end confdefs.h.  */
12226 #include <sys/types.h>
12227                 struct stat buf;
12228                 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
12229
12230 int
12231 main (void)
12232 {
12233
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 if ac_fn_c_try_compile "$LINENO"
12239 then :
12240   gl_cv_member_st_size_64=yes
12241 else
12242   gl_cv_member_st_size_64=no
12243 fi
12244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12245
12246 fi
12247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
12248 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
12249       if test $gl_cv_member_st_size_64 = no; then
12250         WINDOWS_64_BIT_ST_SIZE=1
12251       else
12252         WINDOWS_64_BIT_ST_SIZE=0
12253       fi
12254       ;;
12255     *)
12256                                                       WINDOWS_64_BIT_OFF_T=0
12257       WINDOWS_64_BIT_ST_SIZE=0
12258       ;;
12259   esac
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281      if test $gl_cv_have_include_next = yes; then
12282        gl_cv_next_sys_types_h='<'sys/types.h'>'
12283      else
12284        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12285 printf %s "checking absolute name of <sys/types.h>... " >&6; }
12286 if test ${gl_cv_next_sys_types_h+y}
12287 then :
12288   printf %s "(cached) " >&6
12289 else
12290
12291
12292
12293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12294 /* end confdefs.h.  */
12295 #include <sys/types.h>
12296 _ACEOF
12297                 case "$host_os" in
12298     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12299     *)    gl_absname_cpp="$ac_cpp" ;;
12300   esac
12301
12302   case "$host_os" in
12303     mingw*)
12304                                           gl_dirsep_regex='[/\\]'
12305       ;;
12306     *)
12307       gl_dirsep_regex='\/'
12308       ;;
12309   esac
12310       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12311   gl_header_literal_regex=`echo 'sys/types.h' \
12312                            | sed -e "$gl_make_literal_regex_sed"`
12313   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12314       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12315       s|^/[^/]|//&|
12316       p
12317       q
12318     }'
12319
12320         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12321   sed -n "$gl_absolute_header_sed"`
12322
12323            gl_header=$gl_cv_absolute_sys_types_h
12324            gl_cv_next_sys_types_h='"'$gl_header'"'
12325
12326
12327 fi
12328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12329 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
12330      fi
12331      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12332
12333      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12334        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12335        gl_next_as_first_directive='<'sys/types.h'>'
12336      else
12337        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12338        gl_next_as_first_directive=$gl_cv_next_sys_types_h
12339      fi
12340      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353     WINDOWS_STAT_INODES=0
12354
12355
12356
12357 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
12358 if test "x$ac_cv_have_decl_fseeko" = xyes
12359 then :
12360   ac_have_decl=1
12361 else
12362   ac_have_decl=0
12363 fi
12364
12365 printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
12376 printf %s "checking for fseeko... " >&6; }
12377 if test ${gl_cv_func_fseeko+y}
12378 then :
12379   printf %s "(cached) " >&6
12380 else
12381
12382       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12383 /* end confdefs.h.  */
12384 #include <stdio.h>
12385
12386 int
12387 main (void)
12388 {
12389 fseeko (stdin, 0, 0);
12390   ;
12391   return 0;
12392 }
12393 _ACEOF
12394 if ac_fn_c_try_link "$LINENO"
12395 then :
12396   gl_cv_func_fseeko=yes
12397 else
12398   gl_cv_func_fseeko=no
12399 fi
12400 rm -f core conftest.err conftest.$ac_objext \
12401     conftest$ac_exeext conftest.$ac_ext
12402
12403 fi
12404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
12405 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
12406
12407
12408   if test $ac_cv_have_decl_fseeko = no; then
12409     HAVE_DECL_FSEEKO=0
12410   fi
12411
12412   if test $gl_cv_func_fseeko = no; then
12413     HAVE_FSEEKO=0
12414   else
12415     if test $WINDOWS_64_BIT_OFF_T = 1; then
12416       REPLACE_FSEEKO=1
12417     fi
12418     if test $gl_cv_var_stdin_large_offset = no; then
12419       REPLACE_FSEEKO=1
12420     fi
12421
12422
12423
12424   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
12425 printf %s "checking whether fflush works on input streams... " >&6; }
12426 if test ${gl_cv_func_fflush_stdin+y}
12427 then :
12428   printf %s "(cached) " >&6
12429 else
12430   echo hello world > conftest.txt
12431      if test "$cross_compiling" = yes
12432 then :
12433   case "$host_os" in
12434                   # Guess no on native Windows.
12435           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
12436           *)      gl_cv_func_fflush_stdin=cross ;;
12437         esac
12438
12439 else
12440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12441 /* end confdefs.h.  */
12442
12443 #include <stdio.h>
12444 #if HAVE_UNISTD_H
12445 # include <unistd.h>
12446 #else /* on Windows with MSVC */
12447 # include <io.h>
12448 #endif
12449
12450 int
12451 main (void)
12452 {
12453 FILE *f = fopen ("conftest.txt", "r");
12454          char buffer[10];
12455          int fd;
12456          int c;
12457          if (f == NULL)
12458            return 1;
12459          fd = fileno (f);
12460          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
12461            { fclose (f); return 2; }
12462          /* For deterministic results, ensure f read a bigger buffer.  */
12463          if (lseek (fd, 0, SEEK_CUR) == 5)
12464            { fclose (f); return 3; }
12465          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
12466             on BSD systems and on mingw.  */
12467          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
12468            { fclose (f); return 4; }
12469          if (lseek (fd, 0, SEEK_CUR) != 5)
12470            { fclose (f); return 5; }
12471          /* Verify behaviour of fflush after ungetc. See
12472             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
12473          /* Verify behaviour of fflush after a backup ungetc.  This fails on
12474             mingw.  */
12475          c = fgetc (f);
12476          ungetc (c, f);
12477          fflush (f);
12478          if (fgetc (f) != c)
12479            { fclose (f); return 6; }
12480          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
12481             on glibc 2.8 and on BSD systems.  */
12482          c = fgetc (f);
12483          ungetc ('@', f);
12484          fflush (f);
12485          if (fgetc (f) != c)
12486            { fclose (f); return 7; }
12487          fclose (f);
12488          return 0;
12489
12490   ;
12491   return 0;
12492 }
12493 _ACEOF
12494 if ac_fn_c_try_run "$LINENO"
12495 then :
12496   gl_cv_func_fflush_stdin=yes
12497 else
12498   gl_cv_func_fflush_stdin=no
12499 fi
12500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501   conftest.$ac_objext conftest.beam conftest.$ac_ext
12502 fi
12503
12504      rm conftest.txt
12505
12506 fi
12507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
12508 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
12509   case "$gl_cv_func_fflush_stdin" in
12510     *yes) gl_func_fflush_stdin=1 ;;
12511     *no)  gl_func_fflush_stdin=0 ;;
12512     *)    gl_func_fflush_stdin='(-1)' ;;
12513   esac
12514
12515 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
12516
12517
12518       case "$gl_cv_func_fflush_stdin" in
12519         *yes) ;;
12520         *) REPLACE_FSEEKO=1 ;;
12521       esac
12522
12523   fi
12524
12525
12526
12527      GNULIB_FCHMODAT=0;
12528   GNULIB_FSTAT=0;
12529   GNULIB_FSTATAT=0;
12530   GNULIB_FUTIMENS=0;
12531   GNULIB_LCHMOD=0;
12532   GNULIB_LSTAT=0;
12533   GNULIB_MKDIRAT=0;
12534   GNULIB_MKFIFO=0;
12535   GNULIB_MKFIFOAT=0;
12536   GNULIB_MKNOD=0;
12537   GNULIB_MKNODAT=0;
12538   GNULIB_STAT=0;
12539   GNULIB_UTIMENSAT=0;
12540   GNULIB_OVERRIDES_STRUCT_STAT=0;
12541     HAVE_FCHMODAT=1;
12542   HAVE_FSTATAT=1;
12543   HAVE_FUTIMENS=1;
12544   HAVE_LCHMOD=1;
12545   HAVE_LSTAT=1;
12546   HAVE_MKDIRAT=1;
12547   HAVE_MKFIFO=1;
12548   HAVE_MKFIFOAT=1;
12549   HAVE_MKNOD=1;
12550   HAVE_MKNODAT=1;
12551   HAVE_UTIMENSAT=1;
12552   REPLACE_FSTAT=0;
12553   REPLACE_FSTATAT=0;
12554   REPLACE_FUTIMENS=0;
12555   REPLACE_LSTAT=0;
12556   REPLACE_MKDIR=0;
12557   REPLACE_MKFIFO=0;
12558   REPLACE_MKNOD=0;
12559   REPLACE_STAT=0;
12560   REPLACE_UTIMENSAT=0;
12561
12562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12563 printf %s "checking whether stat file-mode macros are broken... " >&6; }
12564 if test ${ac_cv_header_stat_broken+y}
12565 then :
12566   printf %s "(cached) " >&6
12567 else
12568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12569 /* end confdefs.h.  */
12570 #include <sys/types.h>
12571 #include <sys/stat.h>
12572
12573 #if defined S_ISBLK && defined S_IFDIR
12574 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12575 #endif
12576
12577 #if defined S_ISBLK && defined S_IFCHR
12578 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12579 #endif
12580
12581 #if defined S_ISLNK && defined S_IFREG
12582 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12583 #endif
12584
12585 #if defined S_ISSOCK && defined S_IFREG
12586 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12587 #endif
12588
12589 _ACEOF
12590 if ac_fn_c_try_compile "$LINENO"
12591 then :
12592   ac_cv_header_stat_broken=no
12593 else
12594   ac_cv_header_stat_broken=yes
12595 fi
12596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12597 fi
12598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12599 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
12600 if test $ac_cv_header_stat_broken = yes; then
12601
12602 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12603
12604 fi
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620      if test $gl_cv_have_include_next = yes; then
12621        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12622      else
12623        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12624 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
12625 if test ${gl_cv_next_sys_stat_h+y}
12626 then :
12627   printf %s "(cached) " >&6
12628 else
12629
12630              if test $ac_cv_header_sys_stat_h = yes; then
12631
12632
12633
12634
12635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12636 /* end confdefs.h.  */
12637 #include <sys/stat.h>
12638 _ACEOF
12639                 case "$host_os" in
12640     aix*) gl_absname_cpp="$ac_cpp -C" ;;
12641     *)    gl_absname_cpp="$ac_cpp" ;;
12642   esac
12643
12644   case "$host_os" in
12645     mingw*)
12646                                           gl_dirsep_regex='[/\\]'
12647       ;;
12648     *)
12649       gl_dirsep_regex='\/'
12650       ;;
12651   esac
12652       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12653   gl_header_literal_regex=`echo 'sys/stat.h' \
12654                            | sed -e "$gl_make_literal_regex_sed"`
12655   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12656       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12657       s|^/[^/]|//&|
12658       p
12659       q
12660     }'
12661
12662         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12663   sed -n "$gl_absolute_header_sed"`
12664
12665            gl_header=$gl_cv_absolute_sys_stat_h
12666            gl_cv_next_sys_stat_h='"'$gl_header'"'
12667           else
12668                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12669              fi
12670
12671
12672 fi
12673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12674 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
12675      fi
12676      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12677
12678      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12679        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12680        gl_next_as_first_directive='<'sys/stat.h'>'
12681      else
12682        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12683        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12684      fi
12685      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12686
12687
12688
12689
12690
12691
12692
12693
12694     WINDOWS_STAT_TIMESPEC=0
12695
12696
12697
12698
12699
12700
12701
12702
12703       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12704      #include <sys/stat.h>
12705 "
12706 if test "x$ac_cv_type_nlink_t" = xyes
12707 then :
12708
12709 else
12710
12711 printf "%s\n" "#define nlink_t int" >>confdefs.h
12712
12713 fi
12714
12715
12716
12717
12718
12719          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12720 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
12721 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
12722 then :
12723   printf %s "(cached) " >&6
12724 else
12725   rm -f conftest.sym conftest.file
12726      echo >conftest.file
12727      if test "$cross_compiling" = yes
12728 then :
12729   case "$host_os" in
12730           *-gnu* | gnu*)
12731             # Guess yes on glibc systems.
12732             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
12733           mingw*)
12734             # Guess no on native Windows.
12735             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12736           *)
12737             # If we don't know, assume the worst.
12738             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
12739         esac
12740
12741 else
12742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743 /* end confdefs.h.  */
12744 $ac_includes_default
12745 int
12746 main (void)
12747 {
12748 struct stat sbuf;
12749             if (symlink ("conftest.file", "conftest.sym") != 0)
12750               return 1;
12751             /* Linux will dereference the symlink and fail, as required by
12752                POSIX.  That is better in the sense that it means we will not
12753                have to compile and use the lstat wrapper.  */
12754             return lstat ("conftest.sym/", &sbuf) == 0;
12755
12756   ;
12757   return 0;
12758 }
12759 _ACEOF
12760 if ac_fn_c_try_run "$LINENO"
12761 then :
12762   gl_cv_func_lstat_dereferences_slashed_symlink=yes
12763 else
12764   gl_cv_func_lstat_dereferences_slashed_symlink=no
12765 fi
12766 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12767   conftest.$ac_objext conftest.beam conftest.$ac_ext
12768 fi
12769
12770      rm -f conftest.sym conftest.file
12771
12772 fi
12773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
12774 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12775   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
12776     *yes)
12777
12778 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
12779
12780       ;;
12781   esac
12782
12783
12784
12785 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12786 if test "x$ac_cv_have_decl_ftello" = xyes
12787 then :
12788   ac_have_decl=1
12789 else
12790   ac_have_decl=0
12791 fi
12792
12793 printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804   if test $ac_cv_have_decl_ftello = no; then
12805     HAVE_DECL_FTELLO=0
12806   fi
12807
12808   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12809 printf %s "checking for ftello... " >&6; }
12810 if test ${gl_cv_func_ftello+y}
12811 then :
12812   printf %s "(cached) " >&6
12813 else
12814
12815       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816 /* end confdefs.h.  */
12817 #include <stdio.h>
12818 int
12819 main (void)
12820 {
12821 ftello (stdin);
12822   ;
12823   return 0;
12824 }
12825 _ACEOF
12826 if ac_fn_c_try_link "$LINENO"
12827 then :
12828   gl_cv_func_ftello=yes
12829 else
12830   gl_cv_func_ftello=no
12831 fi
12832 rm -f core conftest.err conftest.$ac_objext \
12833     conftest$ac_exeext conftest.$ac_ext
12834
12835 fi
12836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12837 printf "%s\n" "$gl_cv_func_ftello" >&6; }
12838   if test $gl_cv_func_ftello = no; then
12839     HAVE_FTELLO=0
12840   else
12841     if test $WINDOWS_64_BIT_OFF_T = 1; then
12842       REPLACE_FTELLO=1
12843     fi
12844     if test $gl_cv_var_stdin_large_offset = no; then
12845       REPLACE_FTELLO=1
12846     fi
12847     if test $REPLACE_FTELLO = 0; then
12848
12849       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12850 printf %s "checking whether ftello works... " >&6; }
12851 if test ${gl_cv_func_ftello_works+y}
12852 then :
12853   printf %s "(cached) " >&6
12854 else
12855
12856                               case "$host_os" in
12857                       # Guess no on Solaris.
12858             solaris*) gl_cv_func_ftello_works="guessing no" ;;
12859                       # Guess yes on native Windows.
12860             mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
12861                       # Guess yes otherwise.
12862             *)        gl_cv_func_ftello_works="guessing yes" ;;
12863           esac
12864           if test "$cross_compiling" = yes
12865 then :
12866   :
12867 else
12868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869 /* end confdefs.h.  */
12870
12871 #include <stdio.h>
12872 #include <stdlib.h>
12873 #include <string.h>
12874 #define TESTFILE "conftest.tmp"
12875 int
12876 main (void)
12877 {
12878   FILE *fp;
12879
12880   /* Create a file with some contents.  */
12881   fp = fopen (TESTFILE, "w");
12882   if (fp == NULL)
12883     return 70;
12884   if (fwrite ("foogarsh", 1, 8, fp) < 8)
12885     { fclose (fp); return 71; }
12886   if (fclose (fp))
12887     return 72;
12888
12889   /* The file's contents is now "foogarsh".  */
12890
12891   /* Try writing after reading to EOF.  */
12892   fp = fopen (TESTFILE, "r+");
12893   if (fp == NULL)
12894     return 73;
12895   if (fseek (fp, -1, SEEK_END))
12896     { fclose (fp); return 74; }
12897   if (!(getc (fp) == 'h'))
12898     { fclose (fp); return 1; }
12899   if (!(getc (fp) == EOF))
12900     { fclose (fp); return 2; }
12901   if (!(ftell (fp) == 8))
12902     { fclose (fp); return 3; }
12903   if (!(ftell (fp) == 8))
12904     { fclose (fp); return 4; }
12905   if (!(putc ('!', fp) == '!'))
12906     { fclose (fp); return 5; }
12907   if (!(ftell (fp) == 9))
12908     { fclose (fp); return 6; }
12909   if (!(fclose (fp) == 0))
12910     return 7;
12911   fp = fopen (TESTFILE, "r");
12912   if (fp == NULL)
12913     return 75;
12914   {
12915     char buf[10];
12916     if (!(fread (buf, 1, 10, fp) == 9))
12917       { fclose (fp); return 10; }
12918     if (!(memcmp (buf, "foogarsh!", 9) == 0))
12919       { fclose (fp); return 11; }
12920   }
12921   if (!(fclose (fp) == 0))
12922     return 12;
12923
12924   /* The file's contents is now "foogarsh!".  */
12925
12926   return 0;
12927 }
12928 _ACEOF
12929 if ac_fn_c_try_run "$LINENO"
12930 then :
12931   gl_cv_func_ftello_works=yes
12932 else
12933   gl_cv_func_ftello_works=no
12934 fi
12935 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12936   conftest.$ac_objext conftest.beam conftest.$ac_ext
12937 fi
12938
12939
12940 fi
12941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12942 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
12943       case "$gl_cv_func_ftello_works" in
12944         *yes) ;;
12945         *)
12946           REPLACE_FTELLO=1
12947
12948 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12949
12950           ;;
12951       esac
12952     fi
12953   fi
12954
12955
12956
12957    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
12958 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
12959 if test ${gl_cv_func_getcwd_null+y}
12960 then :
12961   printf %s "(cached) " >&6
12962 else
12963   if test "$cross_compiling" = yes
12964 then :
12965   case "$host_os" in
12966                            # Guess yes on glibc systems.
12967             *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
12968                            # Guess yes on Cygwin.
12969             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
12970                            # If we don't know, assume the worst.
12971             *)             gl_cv_func_getcwd_null="guessing no";;
12972           esac
12973
12974 else
12975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12976 /* end confdefs.h.  */
12977
12978 #        include <stdlib.h>
12979 #        if HAVE_UNISTD_H
12980 #         include <unistd.h>
12981 #        else /* on Windows with MSVC */
12982 #         include <direct.h>
12983 #        endif
12984 #        ifndef getcwd
12985          char *getcwd ();
12986 #        endif
12987
12988 int
12989 main (void)
12990 {
12991
12992 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12993 /* mingw cwd does not start with '/', but getcwd does allocate.
12994    However, mingw fails to honor non-zero size.  */
12995 #else
12996            if (chdir ("/") != 0)
12997              return 1;
12998            else
12999              {
13000                char *f = getcwd (NULL, 0);
13001                if (! f)
13002                  return 2;
13003                if (f[0] != '/')
13004                  { free (f); return 3; }
13005                if (f[1] != '\0')
13006                  { free (f); return 4; }
13007                free (f);
13008                return 0;
13009              }
13010 #endif
13011
13012   ;
13013   return 0;
13014 }
13015 _ACEOF
13016 if ac_fn_c_try_run "$LINENO"
13017 then :
13018   gl_cv_func_getcwd_null=yes
13019 else
13020   gl_cv_func_getcwd_null=no
13021 fi
13022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023   conftest.$ac_objext conftest.beam conftest.$ac_ext
13024 fi
13025
13026 fi
13027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
13028 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
13029
13030
13031   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
13032 printf %s "checking for getcwd with POSIX signature... " >&6; }
13033 if test ${gl_cv_func_getcwd_posix_signature+y}
13034 then :
13035   printf %s "(cached) " >&6
13036 else
13037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h.  */
13039 #include <unistd.h>
13040 int
13041 main (void)
13042 {
13043 extern
13044            #ifdef __cplusplus
13045            "C"
13046            #endif
13047            char *getcwd (char *, size_t);
13048
13049   ;
13050   return 0;
13051 }
13052
13053 _ACEOF
13054 if ac_fn_c_try_compile "$LINENO"
13055 then :
13056   gl_cv_func_getcwd_posix_signature=yes
13057 else
13058   gl_cv_func_getcwd_posix_signature=no
13059 fi
13060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13061
13062 fi
13063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
13064 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
13065
13066
13067 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
13068 if test "x$ac_cv_have_decl_getdtablesize" = xyes
13069 then :
13070   ac_have_decl=1
13071 else
13072   ac_have_decl=0
13073 fi
13074
13075 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091      if test $gl_cv_have_include_next = yes; then
13092        gl_cv_next_getopt_h='<'getopt.h'>'
13093      else
13094        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
13095 printf %s "checking absolute name of <getopt.h>... " >&6; }
13096 if test ${gl_cv_next_getopt_h+y}
13097 then :
13098   printf %s "(cached) " >&6
13099 else
13100
13101              if test $ac_cv_header_getopt_h = yes; then
13102
13103
13104
13105
13106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h.  */
13108 #include <getopt.h>
13109 _ACEOF
13110                 case "$host_os" in
13111     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13112     *)    gl_absname_cpp="$ac_cpp" ;;
13113   esac
13114
13115   case "$host_os" in
13116     mingw*)
13117                                           gl_dirsep_regex='[/\\]'
13118       ;;
13119     *)
13120       gl_dirsep_regex='\/'
13121       ;;
13122   esac
13123       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13124   gl_header_literal_regex=`echo 'getopt.h' \
13125                            | sed -e "$gl_make_literal_regex_sed"`
13126   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13127       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13128       s|^/[^/]|//&|
13129       p
13130       q
13131     }'
13132
13133         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13134   sed -n "$gl_absolute_header_sed"`
13135
13136            gl_header=$gl_cv_absolute_getopt_h
13137            gl_cv_next_getopt_h='"'$gl_header'"'
13138           else
13139                gl_cv_next_getopt_h='<'getopt.h'>'
13140              fi
13141
13142
13143 fi
13144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
13145 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
13146      fi
13147      NEXT_GETOPT_H=$gl_cv_next_getopt_h
13148
13149      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13150        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13151        gl_next_as_first_directive='<'getopt.h'>'
13152      else
13153        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13154        gl_next_as_first_directive=$gl_cv_next_getopt_h
13155      fi
13156      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
13157
13158
13159
13160
13161   if test $ac_cv_header_getopt_h = yes; then
13162     HAVE_GETOPT_H=1
13163   else
13164     HAVE_GETOPT_H=0
13165   fi
13166
13167
13168   gl_replace_getopt=
13169
13170     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13171     for ac_header in getopt.h
13172 do :
13173   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
13174 if test "x$ac_cv_header_getopt_h" = xyes
13175 then :
13176   printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
13177
13178 else
13179   gl_replace_getopt=yes
13180 fi
13181
13182 done
13183   fi
13184
13185     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13186     for ac_func in getopt_long_only
13187 do :
13188   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
13189 if test "x$ac_cv_func_getopt_long_only" = xyes
13190 then :
13191   printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
13192
13193 else
13194   gl_replace_getopt=yes
13195 fi
13196
13197 done
13198   fi
13199
13200           if test -z "$gl_replace_getopt"; then
13201     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
13202 printf %s "checking whether getopt is POSIX compatible... " >&6; }
13203 if test ${gl_cv_func_getopt_posix+y}
13204 then :
13205   printf %s "(cached) " >&6
13206 else
13207
13208                                                 if test $cross_compiling = no; then
13209                               if test "$cross_compiling" = yes
13210 then :
13211   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13212 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13213 as_fn_error $? "cannot run test program while cross compiling
13214 See \`config.log' for more details" "$LINENO" 5; }
13215 else
13216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h.  */
13218
13219 #include <unistd.h>
13220 #include <stdlib.h>
13221 #include <string.h>
13222
13223 int
13224 main ()
13225 {
13226   static char program[] = "program";
13227   static char a[] = "-a";
13228   static char foo[] = "foo";
13229   static char bar[] = "bar";
13230   char *argv[] = { program, a, foo, bar, NULL };
13231   int c;
13232
13233   c = getopt (4, argv, "ab");
13234   if (!(c == 'a'))
13235     return 1;
13236   c = getopt (4, argv, "ab");
13237   if (!(c == -1))
13238     return 2;
13239   if (!(optind == 2))
13240     return 3;
13241   return 0;
13242 }
13243
13244 _ACEOF
13245 if ac_fn_c_try_run "$LINENO"
13246 then :
13247   gl_cv_func_getopt_posix=maybe
13248 else
13249   gl_cv_func_getopt_posix=no
13250 fi
13251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13252   conftest.$ac_objext conftest.beam conftest.$ac_ext
13253 fi
13254
13255           if test $gl_cv_func_getopt_posix = maybe; then
13256                                     if test "$cross_compiling" = yes
13257 then :
13258   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13259 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13260 as_fn_error $? "cannot run test program while cross compiling
13261 See \`config.log' for more details" "$LINENO" 5; }
13262 else
13263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13264 /* end confdefs.h.  */
13265
13266 #include <unistd.h>
13267 #include <stdlib.h>
13268 #include <string.h>
13269
13270 int
13271 main ()
13272 {
13273   static char program[] = "program";
13274   static char donald[] = "donald";
13275   static char p[] = "-p";
13276   static char billy[] = "billy";
13277   static char duck[] = "duck";
13278   static char a[] = "-a";
13279   static char bar[] = "bar";
13280   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13281   int c;
13282
13283   c = getopt (7, argv, "+abp:q:");
13284   if (!(c == -1))
13285     return 4;
13286   if (!(strcmp (argv[0], "program") == 0))
13287     return 5;
13288   if (!(strcmp (argv[1], "donald") == 0))
13289     return 6;
13290   if (!(strcmp (argv[2], "-p") == 0))
13291     return 7;
13292   if (!(strcmp (argv[3], "billy") == 0))
13293     return 8;
13294   if (!(strcmp (argv[4], "duck") == 0))
13295     return 9;
13296   if (!(strcmp (argv[5], "-a") == 0))
13297     return 10;
13298   if (!(strcmp (argv[6], "bar") == 0))
13299     return 11;
13300   if (!(optind == 1))
13301     return 12;
13302   return 0;
13303 }
13304
13305 _ACEOF
13306 if ac_fn_c_try_run "$LINENO"
13307 then :
13308   gl_cv_func_getopt_posix=maybe
13309 else
13310   gl_cv_func_getopt_posix=no
13311 fi
13312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13313   conftest.$ac_objext conftest.beam conftest.$ac_ext
13314 fi
13315
13316           fi
13317           if test $gl_cv_func_getopt_posix = maybe; then
13318                         if test "$cross_compiling" = yes
13319 then :
13320   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13321 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13322 as_fn_error $? "cannot run test program while cross compiling
13323 See \`config.log' for more details" "$LINENO" 5; }
13324 else
13325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13326 /* end confdefs.h.  */
13327
13328 #include <unistd.h>
13329 #include <stdlib.h>
13330 #include <string.h>
13331
13332 int
13333 main ()
13334 {
13335   static char program[] = "program";
13336   static char ab[] = "-ab";
13337   char *argv[3] = { program, ab, NULL };
13338   if (getopt (2, argv, "ab:") != 'a')
13339     return 13;
13340   if (getopt (2, argv, "ab:") != '?')
13341     return 14;
13342   if (optopt != 'b')
13343     return 15;
13344   if (optind != 2)
13345     return 16;
13346   return 0;
13347 }
13348
13349 _ACEOF
13350 if ac_fn_c_try_run "$LINENO"
13351 then :
13352   gl_cv_func_getopt_posix=yes
13353 else
13354   gl_cv_func_getopt_posix=no
13355 fi
13356 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13357   conftest.$ac_objext conftest.beam conftest.$ac_ext
13358 fi
13359
13360           fi
13361         else
13362           case "$host_os" in
13363             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
13364             *)                       gl_cv_func_getopt_posix="guessing yes";;
13365           esac
13366         fi
13367
13368 fi
13369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13370 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
13371     case "$gl_cv_func_getopt_posix" in
13372       *no) gl_replace_getopt=yes ;;
13373     esac
13374   fi
13375
13376   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13377     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
13378 printf %s "checking for working GNU getopt function... " >&6; }
13379 if test ${gl_cv_func_getopt_gnu+y}
13380 then :
13381   printf %s "(cached) " >&6
13382 else
13383   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
13384        # optstring is necessary for programs like m4 that have POSIX-mandated
13385        # semantics for supporting options interspersed with files.
13386        # Also, since getopt_long is a GNU extension, we require optind=0.
13387        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
13388        # so take care to revert to the correct (non-)export state.
13389        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
13390        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
13391          xx) gl_had_POSIXLY_CORRECT=exported ;;
13392          x)  gl_had_POSIXLY_CORRECT=yes      ;;
13393          *)  gl_had_POSIXLY_CORRECT=         ;;
13394        esac
13395        POSIXLY_CORRECT=1
13396        export POSIXLY_CORRECT
13397        if test "$cross_compiling" = yes
13398 then :
13399            gl_cv_func_getopt_gnu="guessing no"
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 #include <stdlib.h>
13409 #if defined __MACH__ && defined __APPLE__
13410 /* Avoid a crash on Mac OS X.  */
13411 #include <mach/mach.h>
13412 #include <mach/mach_error.h>
13413 #include <mach/thread_status.h>
13414 #include <mach/exception.h>
13415 #include <mach/task.h>
13416 #include <pthread.h>
13417 /* The exception port on which our thread listens.  */
13418 static mach_port_t our_exception_port;
13419 /* The main function of the thread listening for exceptions of type
13420    EXC_BAD_ACCESS.  */
13421 static void *
13422 mach_exception_thread (void *arg)
13423 {
13424   /* Buffer for a message to be received.  */
13425   struct {
13426     mach_msg_header_t head;
13427     mach_msg_body_t msgh_body;
13428     char data[1024];
13429   } msg;
13430   mach_msg_return_t retval;
13431   /* Wait for a message on the exception port.  */
13432   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
13433                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
13434   if (retval != MACH_MSG_SUCCESS)
13435     abort ();
13436   exit (1);
13437 }
13438 static void
13439 nocrash_init (void)
13440 {
13441   mach_port_t self = mach_task_self ();
13442   /* Allocate a port on which the thread shall listen for exceptions.  */
13443   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
13444       == KERN_SUCCESS) {
13445     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
13446     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
13447                                 MACH_MSG_TYPE_MAKE_SEND)
13448         == KERN_SUCCESS) {
13449       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
13450          for us.  */
13451       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
13452       /* Create the thread listening on the exception port.  */
13453       pthread_attr_t attr;
13454       pthread_t thread;
13455       if (pthread_attr_init (&attr) == 0
13456           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
13457           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
13458         pthread_attr_destroy (&attr);
13459         /* Replace the exception port info for these exceptions with our own.
13460            Note that we replace the exception port for the entire task, not only
13461            for a particular thread.  This has the effect that when our exception
13462            port gets the message, the thread specific exception port has already
13463            been asked, and we don't need to bother about it.
13464            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
13465         task_set_exception_ports (self, mask, our_exception_port,
13466                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
13467       }
13468     }
13469   }
13470 }
13471 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13472 /* Avoid a crash on native Windows.  */
13473 #define WIN32_LEAN_AND_MEAN
13474 #include <windows.h>
13475 #include <winerror.h>
13476 static LONG WINAPI
13477 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
13478 {
13479   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
13480     {
13481     case EXCEPTION_ACCESS_VIOLATION:
13482     case EXCEPTION_IN_PAGE_ERROR:
13483     case EXCEPTION_STACK_OVERFLOW:
13484     case EXCEPTION_GUARD_PAGE:
13485     case EXCEPTION_PRIV_INSTRUCTION:
13486     case EXCEPTION_ILLEGAL_INSTRUCTION:
13487     case EXCEPTION_DATATYPE_MISALIGNMENT:
13488     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
13489     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
13490       exit (1);
13491     }
13492   return EXCEPTION_CONTINUE_SEARCH;
13493 }
13494 static void
13495 nocrash_init (void)
13496 {
13497   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
13498 }
13499 #else
13500 /* Avoid a crash on POSIX systems.  */
13501 #include <signal.h>
13502 #include <unistd.h>
13503 /* A POSIX signal handler.  */
13504 static void
13505 exception_handler (int sig)
13506 {
13507   _exit (1);
13508 }
13509 static void
13510 nocrash_init (void)
13511 {
13512 #ifdef SIGSEGV
13513   signal (SIGSEGV, exception_handler);
13514 #endif
13515 #ifdef SIGBUS
13516   signal (SIGBUS, exception_handler);
13517 #endif
13518 }
13519 #endif
13520
13521
13522 int
13523 main (void)
13524 {
13525
13526              int result = 0;
13527
13528              nocrash_init();
13529
13530              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13531                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13532                 OSF/1 5.1, Solaris 10.  */
13533              {
13534                static char conftest[] = "conftest";
13535                static char plus[] = "-+";
13536                char *argv[3] = { conftest, plus, NULL };
13537                opterr = 0;
13538                if (getopt (2, argv, "+a") != '?')
13539                  result |= 1;
13540              }
13541              /* This code succeeds on glibc 2.8, mingw,
13542                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13543                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
13544              {
13545                static char program[] = "program";
13546                static char p[] = "-p";
13547                static char foo[] = "foo";
13548                static char bar[] = "bar";
13549                char *argv[] = { program, p, foo, bar, NULL };
13550
13551                optind = 1;
13552                if (getopt (4, argv, "p::") != 'p')
13553                  result |= 2;
13554                else if (optarg != NULL)
13555                  result |= 4;
13556                else if (getopt (4, argv, "p::") != -1)
13557                  result |= 6;
13558                else if (optind != 2)
13559                  result |= 8;
13560              }
13561              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
13562              {
13563                static char program[] = "program";
13564                static char foo[] = "foo";
13565                static char p[] = "-p";
13566                char *argv[] = { program, foo, p, NULL };
13567                optind = 0;
13568                if (getopt (3, argv, "-p") != 1)
13569                  result |= 16;
13570                else if (getopt (3, argv, "-p") != 'p')
13571                  result |= 16;
13572              }
13573              /* This code fails on glibc 2.11.  */
13574              {
13575                static char program[] = "program";
13576                static char b[] = "-b";
13577                static char a[] = "-a";
13578                char *argv[] = { program, b, a, NULL };
13579                optind = opterr = 0;
13580                if (getopt (3, argv, "+:a:b") != 'b')
13581                  result |= 32;
13582                else if (getopt (3, argv, "+:a:b") != ':')
13583                  result |= 32;
13584              }
13585              /* This code dumps core on glibc 2.14.  */
13586              {
13587                static char program[] = "program";
13588                static char w[] = "-W";
13589                static char dummy[] = "dummy";
13590                char *argv[] = { program, w, dummy, NULL };
13591                optind = opterr = 1;
13592                if (getopt (3, argv, "W;") != 'W')
13593                  result |= 64;
13594              }
13595              return result;
13596
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 if ac_fn_c_try_run "$LINENO"
13602 then :
13603   gl_cv_func_getopt_gnu=yes
13604 else
13605   gl_cv_func_getopt_gnu=no
13606 fi
13607 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13608   conftest.$ac_objext conftest.beam conftest.$ac_ext
13609 fi
13610
13611        case $gl_had_POSIXLY_CORRECT in
13612          exported) ;;
13613          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
13614          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
13615        esac
13616
13617 fi
13618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13619 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
13620     if test "$gl_cv_func_getopt_gnu" != yes; then
13621       gl_replace_getopt=yes
13622     else
13623       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
13624 printf %s "checking for working GNU getopt_long function... " >&6; }
13625 if test ${gl_cv_func_getopt_long_gnu+y}
13626 then :
13627   printf %s "(cached) " >&6
13628 else
13629   if test "$cross_compiling" = yes
13630 then :
13631               case "$host_os" in
13632               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
13633               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
13634             esac
13635
13636 else
13637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13638 /* end confdefs.h.  */
13639 #include <getopt.h>
13640                 #include <stddef.h>
13641                 #include <string.h>
13642
13643 int
13644 main (void)
13645 {
13646 static const struct option long_options[] =
13647                   {
13648                     { "xtremely-",no_argument,       NULL, 1003 },
13649                     { "xtra",     no_argument,       NULL, 1001 },
13650                     { "xtreme",   no_argument,       NULL, 1002 },
13651                     { "xtremely", no_argument,       NULL, 1003 },
13652                     { NULL,       0,                 NULL, 0 }
13653                   };
13654                 /* This code fails on OpenBSD 5.0.  */
13655                 {
13656                   static char program[] = "program";
13657                   static char xtremel[] = "--xtremel";
13658                   char *argv[] = { program, xtremel, NULL };
13659                   int option_index;
13660                   optind = 1; opterr = 0;
13661                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
13662                     return 1;
13663                 }
13664                 return 0;
13665
13666   ;
13667   return 0;
13668 }
13669 _ACEOF
13670 if ac_fn_c_try_run "$LINENO"
13671 then :
13672   gl_cv_func_getopt_long_gnu=yes
13673 else
13674   gl_cv_func_getopt_long_gnu=no
13675 fi
13676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13677   conftest.$ac_objext conftest.beam conftest.$ac_ext
13678 fi
13679
13680
13681 fi
13682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
13683 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
13684       case "$gl_cv_func_getopt_long_gnu" in
13685         *yes) ;;
13686         *) gl_replace_getopt=yes ;;
13687       esac
13688     fi
13689   fi
13690
13691
13692
13693
13694 :
13695
13696
13697
13698   GNULIB_GETTIMEOFDAY=0;
13699     HAVE_GETTIMEOFDAY=1;
13700   HAVE_STRUCT_TIMEVAL=1;
13701   HAVE_SYS_TIME_H=1;
13702   REPLACE_GETTIMEOFDAY=0;
13703   REPLACE_STRUCT_TIMEVAL=0;
13704
13705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13706 printf %s "checking for C/C++ restrict keyword... " >&6; }
13707 if test ${ac_cv_c_restrict+y}
13708 then :
13709   printf %s "(cached) " >&6
13710 else
13711   ac_cv_c_restrict=no
13712    # The order here caters to the fact that C++ does not require restrict.
13713    for ac_kw in __restrict __restrict__ _Restrict restrict; do
13714      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715 /* end confdefs.h.  */
13716 typedef int *int_ptr;
13717            int foo (int_ptr $ac_kw ip) { return ip[0]; }
13718            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
13719            int bar (int ip[$ac_kw]) { return ip[0]; }
13720
13721 int
13722 main (void)
13723 {
13724 int s[1];
13725            int *$ac_kw t = s;
13726            t[0] = 0;
13727            return foo (t) + bar (t);
13728
13729   ;
13730   return 0;
13731 }
13732 _ACEOF
13733 if ac_fn_c_try_compile "$LINENO"
13734 then :
13735   ac_cv_c_restrict=$ac_kw
13736 fi
13737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13738      test "$ac_cv_c_restrict" != no && break
13739    done
13740
13741 fi
13742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
13743 printf "%s\n" "$ac_cv_c_restrict" >&6; }
13744
13745  case $ac_cv_c_restrict in
13746    restrict) ;;
13747    no) printf "%s\n" "#define restrict /**/" >>confdefs.h
13748  ;;
13749    *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
13750  ;;
13751  esac
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767      if test $gl_cv_have_include_next = yes; then
13768        gl_cv_next_sys_time_h='<'sys/time.h'>'
13769      else
13770        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13771 printf %s "checking absolute name of <sys/time.h>... " >&6; }
13772 if test ${gl_cv_next_sys_time_h+y}
13773 then :
13774   printf %s "(cached) " >&6
13775 else
13776
13777              if test $ac_cv_header_sys_time_h = yes; then
13778
13779
13780
13781
13782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783 /* end confdefs.h.  */
13784 #include <sys/time.h>
13785 _ACEOF
13786                 case "$host_os" in
13787     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13788     *)    gl_absname_cpp="$ac_cpp" ;;
13789   esac
13790
13791   case "$host_os" in
13792     mingw*)
13793                                           gl_dirsep_regex='[/\\]'
13794       ;;
13795     *)
13796       gl_dirsep_regex='\/'
13797       ;;
13798   esac
13799       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13800   gl_header_literal_regex=`echo 'sys/time.h' \
13801                            | sed -e "$gl_make_literal_regex_sed"`
13802   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13803       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13804       s|^/[^/]|//&|
13805       p
13806       q
13807     }'
13808
13809         gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13810   sed -n "$gl_absolute_header_sed"`
13811
13812            gl_header=$gl_cv_absolute_sys_time_h
13813            gl_cv_next_sys_time_h='"'$gl_header'"'
13814           else
13815                gl_cv_next_sys_time_h='<'sys/time.h'>'
13816              fi
13817
13818
13819 fi
13820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13821 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
13822      fi
13823      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13824
13825      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13826        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13827        gl_next_as_first_directive='<'sys/time.h'>'
13828      else
13829        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13830        gl_next_as_first_directive=$gl_cv_next_sys_time_h
13831      fi
13832      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13833
13834
13835
13836
13837
13838   if test $ac_cv_header_sys_time_h != yes; then
13839     HAVE_SYS_TIME_H=0
13840   fi
13841
13842
13843
13844
13845
13846   if test $ac_cv_header_sys_socket_h != yes; then
13847                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13848 if test "x$ac_cv_header_winsock2_h" = xyes
13849 then :
13850   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
13851
13852 fi
13853
13854   fi
13855   if test "$ac_cv_header_winsock2_h" = yes; then
13856     HAVE_WINSOCK2_H=1
13857     UNISTD_H_HAVE_WINSOCK2_H=1
13858     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13859   else
13860     HAVE_WINSOCK2_H=0
13861   fi
13862
13863
13864   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13865 printf %s "checking for struct timeval... " >&6; }
13866 if test ${gl_cv_sys_struct_timeval+y}
13867 then :
13868   printf %s "(cached) " >&6
13869 else
13870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13871 /* end confdefs.h.  */
13872 #if HAVE_SYS_TIME_H
13873              #include <sys/time.h>
13874             #endif
13875             #include <time.h>
13876             #if HAVE_WINSOCK2_H
13877             # include <winsock2.h>
13878             #endif
13879
13880 int
13881 main (void)
13882 {
13883 static struct timeval x; x.tv_sec = x.tv_usec;
13884   ;
13885   return 0;
13886 }
13887 _ACEOF
13888 if ac_fn_c_try_compile "$LINENO"
13889 then :
13890   gl_cv_sys_struct_timeval=yes
13891 else
13892   gl_cv_sys_struct_timeval=no
13893 fi
13894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13895
13896 fi
13897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13898 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
13899   if test $gl_cv_sys_struct_timeval != yes; then
13900     HAVE_STRUCT_TIMEVAL=0
13901   else
13902                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13903 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13904 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
13905 then :
13906   printf %s "(cached) " >&6
13907 else
13908   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13909 /* end confdefs.h.  */
13910 #if HAVE_SYS_TIME_H
13911                #include <sys/time.h>
13912               #endif
13913               #include <time.h>
13914               #if HAVE_WINSOCK2_H
13915               # include <winsock2.h>
13916               #endif
13917
13918 int
13919 main (void)
13920 {
13921 static struct timeval x;
13922               typedef int verify_tv_sec_type[
13923                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13924               ];
13925
13926   ;
13927   return 0;
13928 }
13929 _ACEOF
13930 if ac_fn_c_try_compile "$LINENO"
13931 then :
13932   gl_cv_sys_struct_timeval_tv_sec=yes
13933 else
13934   gl_cv_sys_struct_timeval_tv_sec=no
13935 fi
13936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13937
13938 fi
13939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13940 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13941     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13942       REPLACE_STRUCT_TIMEVAL=1
13943     fi
13944   fi
13945
13946
13947
13948
13949
13950
13951
13952   NEED_LOCALTIME_BUFFER=0
13953
13954
13955   GNULIB_CTIME=0;
13956   GNULIB_MKTIME=0;
13957   GNULIB_LOCALTIME=0;
13958   GNULIB_NANOSLEEP=0;
13959   GNULIB_STRFTIME=0;
13960   GNULIB_STRPTIME=0;
13961   GNULIB_TIMEGM=0;
13962   GNULIB_TIME_R=0;
13963   GNULIB_TIME_RZ=0;
13964   GNULIB_TZSET=0;
13965     HAVE_DECL_LOCALTIME_R=1;
13966   HAVE_NANOSLEEP=1;
13967   HAVE_STRPTIME=1;
13968   HAVE_TIMEGM=1;
13969   HAVE_TZSET=1;
13970     HAVE_TIMEZONE_T=0;
13971         REPLACE_CTIME=GNULIB_PORTCHECK;
13972   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
13973   REPLACE_MKTIME=GNULIB_PORTCHECK;
13974   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
13975   REPLACE_STRFTIME=GNULIB_PORTCHECK;
13976   REPLACE_TIMEGM=GNULIB_PORTCHECK;
13977   REPLACE_TZSET=GNULIB_PORTCHECK;
13978
13979       : ${GNULIB_GETTIMEOFDAY=0};
13980         REPLACE_GMTIME=0;
13981   REPLACE_LOCALTIME=0;
13982
13983
13984   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13985 /* end confdefs.h.  */
13986
13987 #ifdef _MSC_VER
13988 MicrosoftCompiler
13989 #endif
13990
13991 _ACEOF
13992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13993   $EGREP "MicrosoftCompiler" >/dev/null 2>&1
13994 then :
13995   gl_asmext='asm'
13996      gl_c_asm_opt='-c -Fa'
13997
13998 else
13999   gl_asmext='s'
14000      gl_c_asm_opt='-S'
14001
14002 fi
14003 rm -rf conftest*
14004
14005
14006
14007
14008
14009   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
14010 printf %s "checking host CPU and C ABI... " >&6; }
14011 if test ${gl_cv_host_cpu_c_abi+y}
14012 then :
14013   printf %s "(cached) " >&6
14014 else
14015   case "$host_cpu" in
14016
14017        i[4567]86 )
14018          gl_cv_host_cpu_c_abi=i386
14019          ;;
14020
14021        x86_64 )
14022          # On x86_64 systems, the C compiler may be generating code in one of
14023          # these ABIs:
14024          # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
14025          # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
14026          #   with native Windows (mingw, MSVC).
14027          # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
14028          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
14029          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030 /* end confdefs.h.  */
14031 #if (defined __x86_64__ || defined __amd64__ \
14032                      || defined _M_X64 || defined _M_AMD64)
14033                  int ok;
14034                 #else
14035                  error fail
14036                 #endif
14037
14038 _ACEOF
14039 if ac_fn_c_try_compile "$LINENO"
14040 then :
14041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h.  */
14043 #if defined __ILP32__ || defined _ILP32
14044                     int ok;
14045                    #else
14046                     error fail
14047                    #endif
14048
14049 _ACEOF
14050 if ac_fn_c_try_compile "$LINENO"
14051 then :
14052   gl_cv_host_cpu_c_abi=x86_64-x32
14053 else
14054   gl_cv_host_cpu_c_abi=x86_64
14055 fi
14056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057 else
14058   gl_cv_host_cpu_c_abi=i386
14059 fi
14060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14061          ;;
14062
14063        alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
14064          gl_cv_host_cpu_c_abi=alpha
14065          ;;
14066
14067        arm* | aarch64 )
14068          # Assume arm with EABI.
14069          # On arm64 systems, the C compiler may be generating code in one of
14070          # these ABIs:
14071          # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
14072          # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
14073          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
14074          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14075 /* end confdefs.h.  */
14076 #ifdef __aarch64__
14077                  int ok;
14078                 #else
14079                  error fail
14080                 #endif
14081
14082 _ACEOF
14083 if ac_fn_c_try_compile "$LINENO"
14084 then :
14085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h.  */
14087 #if defined __ILP32__ || defined _ILP32
14088                    int ok;
14089                   #else
14090                    error fail
14091                   #endif
14092
14093 _ACEOF
14094 if ac_fn_c_try_compile "$LINENO"
14095 then :
14096   gl_cv_host_cpu_c_abi=arm64-ilp32
14097 else
14098   gl_cv_host_cpu_c_abi=arm64
14099 fi
14100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14101 else
14102   # Don't distinguish little-endian and big-endian arm, since they
14103             # don't require different machine code for simple operations and
14104             # since the user can distinguish them through the preprocessor
14105             # defines __ARMEL__ vs. __ARMEB__.
14106             # But distinguish arm which passes floating-point arguments and
14107             # return values in integer registers (r0, r1, ...) - this is
14108             # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
14109             # passes them in float registers (s0, s1, ...) and double registers
14110             # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
14111             # sets the preprocessor defines __ARM_PCS (for the first case) and
14112             # __ARM_PCS_VFP (for the second case), but older GCC does not.
14113             echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
14114             # Look for a reference to the register d0 in the .s file.
14115             { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
14116   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14117   (eval $ac_try) 2>&5
14118   ac_status=$?
14119   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14120   test $ac_status = 0; }; } >/dev/null 2>&1
14121             if LC_ALL=C grep -E 'd0,' conftest.$gl_asmext >/dev/null; then
14122               gl_cv_host_cpu_c_abi=armhf
14123             else
14124               gl_cv_host_cpu_c_abi=arm
14125             fi
14126             rm -f conftest*
14127
14128 fi
14129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14130          ;;
14131
14132        hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
14133          # On hppa, the C compiler may be generating 32-bit code or 64-bit
14134          # code. In the latter case, it defines _LP64 and __LP64__.
14135          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14136 /* end confdefs.h.  */
14137 #ifdef __LP64__
14138                  int ok;
14139                 #else
14140                  error fail
14141                 #endif
14142
14143 _ACEOF
14144 if ac_fn_c_try_compile "$LINENO"
14145 then :
14146   gl_cv_host_cpu_c_abi=hppa64
14147 else
14148   gl_cv_host_cpu_c_abi=hppa
14149 fi
14150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14151          ;;
14152
14153        ia64* )
14154          # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
14155          # 32-bit code. In the latter case, it defines _ILP32.
14156          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157 /* end confdefs.h.  */
14158 #ifdef _ILP32
14159                  int ok;
14160                 #else
14161                  error fail
14162                 #endif
14163
14164 _ACEOF
14165 if ac_fn_c_try_compile "$LINENO"
14166 then :
14167   gl_cv_host_cpu_c_abi=ia64-ilp32
14168 else
14169   gl_cv_host_cpu_c_abi=ia64
14170 fi
14171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14172          ;;
14173
14174        mips* )
14175          # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
14176          # at 32.
14177          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14178 /* end confdefs.h.  */
14179 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
14180                  int ok;
14181                 #else
14182                  error fail
14183                 #endif
14184
14185 _ACEOF
14186 if ac_fn_c_try_compile "$LINENO"
14187 then :
14188   gl_cv_host_cpu_c_abi=mips64
14189 else
14190   # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
14191             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
14192             # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
14193             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
14194             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14195 /* end confdefs.h.  */
14196 #if (_MIPS_SIM == _ABIN32)
14197                     int ok;
14198                    #else
14199                     error fail
14200                    #endif
14201
14202 _ACEOF
14203 if ac_fn_c_try_compile "$LINENO"
14204 then :
14205   gl_cv_host_cpu_c_abi=mipsn32
14206 else
14207   gl_cv_host_cpu_c_abi=mips
14208 fi
14209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14210 fi
14211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14212          ;;
14213
14214        powerpc* )
14215          # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
14216          # No need to distinguish them here; the caller may distinguish
14217          # them based on the OS.
14218          # On powerpc64 systems, the C compiler may still be generating
14219          # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
14220          # be generating 64-bit code.
14221          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14222 /* end confdefs.h.  */
14223 #if defined __powerpc64__ || defined _ARCH_PPC64
14224                  int ok;
14225                 #else
14226                  error fail
14227                 #endif
14228
14229 _ACEOF
14230 if ac_fn_c_try_compile "$LINENO"
14231 then :
14232   # On powerpc64, there are two ABIs on Linux: The AIX compatible
14233             # one and the ELFv2 one. The latter defines _CALL_ELF=2.
14234             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14235 /* end confdefs.h.  */
14236 #if defined _CALL_ELF && _CALL_ELF == 2
14237                     int ok;
14238                    #else
14239                     error fail
14240                    #endif
14241
14242 _ACEOF
14243 if ac_fn_c_try_compile "$LINENO"
14244 then :
14245   gl_cv_host_cpu_c_abi=powerpc64-elfv2
14246 else
14247   gl_cv_host_cpu_c_abi=powerpc64
14248 fi
14249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14250
14251 else
14252   gl_cv_host_cpu_c_abi=powerpc
14253 fi
14254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14255          ;;
14256
14257        rs6000 )
14258          gl_cv_host_cpu_c_abi=powerpc
14259          ;;
14260
14261        s390* )
14262          # On s390x, the C compiler may be generating 64-bit (= s390x) code
14263          # or 31-bit (= s390) code.
14264          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265 /* end confdefs.h.  */
14266 #if defined __LP64__ || defined __s390x__
14267                   int ok;
14268                 #else
14269                   error fail
14270                 #endif
14271
14272 _ACEOF
14273 if ac_fn_c_try_compile "$LINENO"
14274 then :
14275   gl_cv_host_cpu_c_abi=s390x
14276 else
14277   gl_cv_host_cpu_c_abi=s390
14278 fi
14279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280          ;;
14281
14282        sparc | sparc64 )
14283          # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
14284          # C compiler still generates 32-bit code.
14285          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286 /* end confdefs.h.  */
14287 #if defined __sparcv9 || defined __arch64__
14288                  int ok;
14289                 #else
14290                  error fail
14291                 #endif
14292
14293 _ACEOF
14294 if ac_fn_c_try_compile "$LINENO"
14295 then :
14296   gl_cv_host_cpu_c_abi=sparc64
14297 else
14298   gl_cv_host_cpu_c_abi=sparc
14299 fi
14300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14301          ;;
14302
14303        *)
14304          gl_cv_host_cpu_c_abi="$host_cpu"
14305          ;;
14306      esac
14307
14308 fi
14309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
14310 printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
14311
14312     HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
14313   HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
14314
14315
14316
14317   # This was
14318   #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
14319   #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
14320   # earlier, but KAI C++ 3.2d doesn't like this.
14321   sed -e 's/-/_/g' >> confdefs.h <<EOF
14322 #ifndef __${HOST_CPU}__
14323 #define __${HOST_CPU}__ 1
14324 #endif
14325 #ifndef __${HOST_CPU_C_ABI}__
14326 #define __${HOST_CPU_C_ABI}__ 1
14327 #endif
14328 EOF
14329
14330
14331
14332
14333   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
14334 printf %s "checking where to find the exponent in a 'float'... " >&6; }
14335 if test ${gl_cv_cc_float_expbit0+y}
14336 then :
14337   printf %s "(cached) " >&6
14338 else
14339
14340       if test "$cross_compiling" = yes
14341 then :
14342   gl_cv_cc_float_expbit0="word 0 bit 23"
14343 else
14344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14345 /* end confdefs.h.  */
14346
14347 #include <float.h>
14348 #include <stddef.h>
14349 #include <stdio.h>
14350 #include <string.h>
14351 #define NWORDS \
14352   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14353 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
14354 static unsigned int ored_words[NWORDS];
14355 static unsigned int anded_words[NWORDS];
14356 static void add_to_ored_words (float x)
14357 {
14358   memory_float m;
14359   size_t i;
14360   /* Clear it first, in case
14361      sizeof (float) < sizeof (memory_float).  */
14362   memset (&m, 0, sizeof (memory_float));
14363   m.value = x;
14364   for (i = 0; i < NWORDS; i++)
14365     {
14366       ored_words[i] |= m.word[i];
14367       anded_words[i] &= m.word[i];
14368     }
14369 }
14370 int main ()
14371 {
14372   size_t j;
14373   FILE *fp = fopen ("conftest.out", "w");
14374   if (fp == NULL)
14375     return 1;
14376   for (j = 0; j < NWORDS; j++)
14377     anded_words[j] = ~ (unsigned int) 0;
14378   add_to_ored_words (0.25f);
14379   add_to_ored_words (0.5f);
14380   add_to_ored_words (1.0f);
14381   add_to_ored_words (2.0f);
14382   add_to_ored_words (4.0f);
14383   /* Remove bits that are common (e.g. if representation of the first mantissa
14384      bit is explicit).  */
14385   for (j = 0; j < NWORDS; j++)
14386     ored_words[j] &= ~anded_words[j];
14387   /* Now find the nonzero word.  */
14388   for (j = 0; j < NWORDS; j++)
14389     if (ored_words[j] != 0)
14390       break;
14391   if (j < NWORDS)
14392     {
14393       size_t i;
14394       for (i = j + 1; i < NWORDS; i++)
14395         if (ored_words[i] != 0)
14396           {
14397             fprintf (fp, "unknown");
14398             return (fclose (fp) != 0);
14399           }
14400       for (i = 0; ; i++)
14401         if ((ored_words[j] >> i) & 1)
14402           {
14403             fprintf (fp, "word %d bit %d", (int) j, (int) i);
14404             return (fclose (fp) != 0);
14405           }
14406     }
14407   fprintf (fp, "unknown");
14408   return (fclose (fp) != 0);
14409 }
14410
14411 _ACEOF
14412 if ac_fn_c_try_run "$LINENO"
14413 then :
14414   gl_cv_cc_float_expbit0=`cat conftest.out`
14415 else
14416   gl_cv_cc_float_expbit0="unknown"
14417 fi
14418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14419   conftest.$ac_objext conftest.beam conftest.$ac_ext
14420 fi
14421
14422       rm -f conftest.out
14423
14424 fi
14425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
14426 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
14427   case "$gl_cv_cc_float_expbit0" in
14428     word*bit*)
14429       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14430       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
14431
14432 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
14433
14434
14435 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
14436
14437       ;;
14438   esac
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451      if test $gl_cv_have_include_next = yes; then
14452        gl_cv_next_limits_h='<'limits.h'>'
14453      else
14454        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
14455 printf %s "checking absolute name of <limits.h>... " >&6; }
14456 if test ${gl_cv_next_limits_h+y}
14457 then :
14458   printf %s "(cached) " >&6
14459 else
14460
14461              if test $ac_cv_header_limits_h = yes; then
14462
14463
14464
14465
14466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14467 /* end confdefs.h.  */
14468 #include <limits.h>
14469 _ACEOF
14470                 case "$host_os" in
14471     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14472     *)    gl_absname_cpp="$ac_cpp" ;;
14473   esac
14474
14475   case "$host_os" in
14476     mingw*)
14477                                           gl_dirsep_regex='[/\\]'
14478       ;;
14479     *)
14480       gl_dirsep_regex='\/'
14481       ;;
14482   esac
14483       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14484   gl_header_literal_regex=`echo 'limits.h' \
14485                            | sed -e "$gl_make_literal_regex_sed"`
14486   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14487       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14488       s|^/[^/]|//&|
14489       p
14490       q
14491     }'
14492
14493         gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14494   sed -n "$gl_absolute_header_sed"`
14495
14496            gl_header=$gl_cv_absolute_limits_h
14497            gl_cv_next_limits_h='"'$gl_header'"'
14498           else
14499                gl_cv_next_limits_h='<'limits.h'>'
14500              fi
14501
14502
14503 fi
14504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
14505 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
14506      fi
14507      NEXT_LIMITS_H=$gl_cv_next_limits_h
14508
14509      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14510        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14511        gl_next_as_first_directive='<'limits.h'>'
14512      else
14513        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14514        gl_next_as_first_directive=$gl_cv_next_limits_h
14515      fi
14516      NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
14517
14518
14519
14520
14521
14522   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
14523 printf %s "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
14524 if test ${gl_cv_header_limits_width+y}
14525 then :
14526   printf %s "(cached) " >&6
14527 else
14528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529 /* end confdefs.h.  */
14530 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
14531                            #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
14532                           #endif
14533                           #include <limits.h>
14534                           int ullw = ULLONG_WIDTH;
14535 int
14536 main (void)
14537 {
14538
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 if ac_fn_c_try_compile "$LINENO"
14544 then :
14545   gl_cv_header_limits_width=yes
14546 else
14547   gl_cv_header_limits_width=no
14548 fi
14549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14550 fi
14551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
14552 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
14553   if test "$gl_cv_header_limits_width" = yes; then
14554     LIMITS_H=
14555   else
14556     LIMITS_H=limits.h
14557   fi
14558
14559    if test -n "$LIMITS_H"; then
14560   GL_GENERATE_LIMITS_H_TRUE=
14561   GL_GENERATE_LIMITS_H_FALSE='#'
14562 else
14563   GL_GENERATE_LIMITS_H_TRUE='#'
14564   GL_GENERATE_LIMITS_H_FALSE=
14565 fi
14566
14567
14568
14569       if test "X$prefix" = "XNONE"; then
14570     acl_final_prefix="$ac_default_prefix"
14571   else
14572     acl_final_prefix="$prefix"
14573   fi
14574   if test "X$exec_prefix" = "XNONE"; then
14575     acl_final_exec_prefix='${prefix}'
14576   else
14577     acl_final_exec_prefix="$exec_prefix"
14578   fi
14579   acl_save_prefix="$prefix"
14580   prefix="$acl_final_prefix"
14581   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
14582   prefix="$acl_save_prefix"
14583
14584
14585
14586 # Check whether --with-gnu-ld was given.
14587 if test ${with_gnu_ld+y}
14588 then :
14589   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
14590 else
14591   with_gnu_ld=no
14592 fi
14593
14594 # Prepare PATH_SEPARATOR.
14595 # The user is always right.
14596 if test "${PATH_SEPARATOR+set}" != set; then
14597   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
14598   # contains only /bin. Note that ksh looks also at the FPATH variable,
14599   # so we have to set that as well for the test.
14600   PATH_SEPARATOR=:
14601   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
14602     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
14603            || PATH_SEPARATOR=';'
14604        }
14605 fi
14606
14607 if test -n "$LD"; then
14608   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
14609 printf %s "checking for ld... " >&6; }
14610 elif test "$GCC" = yes; then
14611   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
14612 printf %s "checking for ld used by $CC... " >&6; }
14613 elif test "$with_gnu_ld" = yes; then
14614   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
14615 printf %s "checking for GNU ld... " >&6; }
14616 else
14617   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
14618 printf %s "checking for non-GNU ld... " >&6; }
14619 fi
14620 if test -n "$LD"; then
14621   # Let the user override the test with a path.
14622   :
14623 else
14624   if test ${acl_cv_path_LD+y}
14625 then :
14626   printf %s "(cached) " >&6
14627 else
14628
14629     acl_cv_path_LD= # Final result of this test
14630     ac_prog=ld # Program to search in $PATH
14631     if test "$GCC" = yes; then
14632       # Check if gcc -print-prog-name=ld gives a path.
14633       case $host in
14634         *-*-mingw*)
14635           # gcc leaves a trailing carriage return which upsets mingw
14636           acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
14637         *)
14638           acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
14639       esac
14640       case $acl_output in
14641         # Accept absolute paths.
14642         [\\/]* | ?:[\\/]*)
14643           re_direlt='/[^/][^/]*/\.\./'
14644           # Canonicalize the pathname of ld
14645           acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
14646           while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
14647             acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
14648           done
14649           # Got the pathname. No search in PATH is needed.
14650           acl_cv_path_LD="$acl_output"
14651           ac_prog=
14652           ;;
14653         "")
14654           # If it fails, then pretend we aren't using GCC.
14655           ;;
14656         *)
14657           # If it is relative, then search for the first ld in PATH.
14658           with_gnu_ld=unknown
14659           ;;
14660       esac
14661     fi
14662     if test -n "$ac_prog"; then
14663       # Search for $ac_prog in $PATH.
14664       acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
14665       for ac_dir in $PATH; do
14666         IFS="$acl_save_ifs"
14667         test -z "$ac_dir" && ac_dir=.
14668         if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14669           acl_cv_path_LD="$ac_dir/$ac_prog"
14670           # Check to see if the program is GNU ld.  I'd rather use --version,
14671           # but apparently some variants of GNU ld only accept -v.
14672           # Break only if it was the GNU/non-GNU ld that we prefer.
14673           case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
14674             *GNU* | *'with BFD'*)
14675               test "$with_gnu_ld" != no && break
14676               ;;
14677             *)
14678               test "$with_gnu_ld" != yes && break
14679               ;;
14680           esac
14681         fi
14682       done
14683       IFS="$acl_save_ifs"
14684     fi
14685     case $host in
14686       *-*-aix*)
14687         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14688 /* end confdefs.h.  */
14689 #if defined __powerpc64__ || defined _ARCH_PPC64
14690                 int ok;
14691                #else
14692                 error fail
14693                #endif
14694
14695 _ACEOF
14696 if ac_fn_c_try_compile "$LINENO"
14697 then :
14698   # The compiler produces 64-bit code. Add option '-b64' so that the
14699            # linker groks 64-bit object files.
14700            case "$acl_cv_path_LD " in
14701              *" -b64 "*) ;;
14702              *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
14703            esac
14704
14705 fi
14706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14707         ;;
14708       sparc64-*-netbsd*)
14709         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14710 /* end confdefs.h.  */
14711 #if defined __sparcv9 || defined __arch64__
14712                 int ok;
14713                #else
14714                 error fail
14715                #endif
14716
14717 _ACEOF
14718 if ac_fn_c_try_compile "$LINENO"
14719 then :
14720
14721 else
14722   # The compiler produces 32-bit code. Add option '-m elf32_sparc'
14723            # so that the linker groks 32-bit object files.
14724            case "$acl_cv_path_LD " in
14725              *" -m elf32_sparc "*) ;;
14726              *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
14727            esac
14728
14729 fi
14730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731         ;;
14732     esac
14733
14734 fi
14735
14736   LD="$acl_cv_path_LD"
14737 fi
14738 if test -n "$LD"; then
14739   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
14740 printf "%s\n" "$LD" >&6; }
14741 else
14742   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14743 printf "%s\n" "no" >&6; }
14744   as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
14745 fi
14746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
14747 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
14748 if test ${acl_cv_prog_gnu_ld+y}
14749 then :
14750   printf %s "(cached) " >&6
14751 else
14752   # I'd rather use --version here, but apparently some GNU lds only accept -v.
14753 case `$LD -v 2>&1 </dev/null` in
14754 *GNU* | *'with BFD'*)
14755   acl_cv_prog_gnu_ld=yes
14756   ;;
14757 *)
14758   acl_cv_prog_gnu_ld=no
14759   ;;
14760 esac
14761 fi
14762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
14763 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
14764 with_gnu_ld=$acl_cv_prog_gnu_ld
14765
14766
14767
14768
14769                                                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
14770 printf %s "checking for shared library run path origin... " >&6; }
14771 if test ${acl_cv_rpath+y}
14772 then :
14773   printf %s "(cached) " >&6
14774 else
14775
14776     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
14777     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
14778     . ./conftest.sh
14779     rm -f ./conftest.sh
14780     acl_cv_rpath=done
14781
14782 fi
14783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
14784 printf "%s\n" "$acl_cv_rpath" >&6; }
14785   wl="$acl_cv_wl"
14786   acl_libext="$acl_cv_libext"
14787   acl_shlibext="$acl_cv_shlibext"
14788   acl_libname_spec="$acl_cv_libname_spec"
14789   acl_library_names_spec="$acl_cv_library_names_spec"
14790   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
14791   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
14792   acl_hardcode_direct="$acl_cv_hardcode_direct"
14793   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
14794     # Check whether --enable-rpath was given.
14795 if test ${enable_rpath+y}
14796 then :
14797   enableval=$enable_rpath; :
14798 else
14799   enable_rpath=yes
14800 fi
14801
14802
14803
14804
14805
14806     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
14807 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
14808 if test ${acl_cv_libdirstems+y}
14809 then :
14810   printf %s "(cached) " >&6
14811 else
14812   acl_libdirstem=lib
14813      acl_libdirstem2=
14814      case "$host_os" in
14815        solaris*)
14816                                                       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
14817 printf %s "checking for 64-bit host... " >&6; }
14818 if test ${gl_cv_solaris_64bit+y}
14819 then :
14820   printf %s "(cached) " >&6
14821 else
14822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823 /* end confdefs.h.  */
14824 #ifdef _LP64
14825                     int ok;
14826                    #else
14827                     error fail
14828                    #endif
14829
14830 _ACEOF
14831 if ac_fn_c_try_compile "$LINENO"
14832 then :
14833   gl_cv_solaris_64bit=yes
14834 else
14835   gl_cv_solaris_64bit=no
14836 fi
14837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14838
14839 fi
14840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
14841 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
14842          if test $gl_cv_solaris_64bit = yes; then
14843            acl_libdirstem=lib/64
14844            case "$host_cpu" in
14845              sparc*)        acl_libdirstem2=lib/sparcv9 ;;
14846              i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
14847            esac
14848          fi
14849          ;;
14850        *)
14851                            case "$gl_cv_host_cpu_c_abi" in
14852            i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
14853              ;;
14854            *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
14855                                                     searchpath=`(if test -f /usr/bin/gcc \
14856                              && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
14857                             LC_ALL=C /usr/bin/gcc -print-search-dirs; \
14858                           else \
14859                             LC_ALL=C $CC -print-search-dirs; \
14860                           fi) 2>/dev/null \
14861                          | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
14862              if test -n "$searchpath"; then
14863                acl_save_IFS="${IFS=     }"; IFS=":"
14864                for searchdir in $searchpath; do
14865                  if test -d "$searchdir"; then
14866                    case "$searchdir" in
14867                      */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
14868                      */../ | */.. )
14869                        # Better ignore directories of this form. They are misleading.
14870                        ;;
14871                      *) searchdir=`cd "$searchdir" && pwd`
14872                         case "$searchdir" in
14873                           */lib64 ) acl_libdirstem=lib64 ;;
14874                         esac ;;
14875                    esac
14876                  fi
14877                done
14878                IFS="$acl_save_IFS"
14879              fi
14880              ;;
14881          esac
14882          ;;
14883      esac
14884      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
14885      acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
14886
14887 fi
14888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
14889 printf "%s\n" "$acl_cv_libdirstems" >&6; }
14890   # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
14891   acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
14892   acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
14893
14894
14895
14896   gl_threads_api=none
14897   LIBTHREAD=
14898   LTLIBTHREAD=
14899   LIBMULTITHREAD=
14900   LTLIBMULTITHREAD=
14901   if test "$gl_use_threads" != no; then
14902         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14903 printf %s "checking whether imported symbols can be declared weak... " >&6; }
14904 if test ${gl_cv_have_weak+y}
14905 then :
14906   printf %s "(cached) " >&6
14907 else
14908   gl_cv_have_weak=no
14909               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910 /* end confdefs.h.  */
14911 extern void xyzzy ();
14912 #pragma weak xyzzy
14913 int
14914 main (void)
14915 {
14916 xyzzy();
14917   ;
14918   return 0;
14919 }
14920 _ACEOF
14921 if ac_fn_c_try_link "$LINENO"
14922 then :
14923   gl_cv_have_weak=maybe
14924 fi
14925 rm -f core conftest.err conftest.$ac_objext \
14926     conftest$ac_exeext conftest.$ac_ext
14927        if test $gl_cv_have_weak = maybe; then
14928                            if test "$cross_compiling" = yes
14929 then :
14930                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931 /* end confdefs.h.  */
14932 #ifdef __ELF__
14933                Extensible Linking Format
14934                #endif
14935
14936 _ACEOF
14937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14938   $EGREP "Extensible Linking Format" >/dev/null 2>&1
14939 then :
14940   gl_cv_have_weak="guessing yes"
14941 else
14942   gl_cv_have_weak="guessing no"
14943 fi
14944 rm -rf conftest*
14945
14946
14947 else
14948   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949 /* end confdefs.h.  */
14950
14951 #include <stdio.h>
14952 #pragma weak fputs
14953 int main ()
14954 {
14955   return (fputs == NULL);
14956 }
14957 _ACEOF
14958 if ac_fn_c_try_run "$LINENO"
14959 then :
14960   gl_cv_have_weak=yes
14961 else
14962   gl_cv_have_weak=no
14963 fi
14964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14965   conftest.$ac_objext conftest.beam conftest.$ac_ext
14966 fi
14967
14968        fi
14969               case " $LDFLAGS " in
14970          *" -static "*) gl_cv_have_weak=no ;;
14971        esac
14972
14973 fi
14974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14975 printf "%s\n" "$gl_cv_have_weak" >&6; }
14976     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14977       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14978       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14979       ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14980 if test "x$ac_cv_header_pthread_h" = xyes
14981 then :
14982   gl_have_pthread_h=yes
14983 else
14984   gl_have_pthread_h=no
14985 fi
14986
14987       if test "$gl_have_pthread_h" = yes; then
14988         # Other possible tests:
14989         #   -lpthreads (FSU threads, PCthreads)
14990         #   -lgthreads
14991         gl_have_pthread=
14992         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14993         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14994         # the second one only in libpthread, and lock.c needs it.
14995         #
14996         # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14997         # needs -pthread for some reason.  See:
14998         # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14999         save_LIBS=$LIBS
15000         for gl_pthread in '' '-pthread'; do
15001           LIBS="$LIBS $gl_pthread"
15002           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15003 /* end confdefs.h.  */
15004 #include <pthread.h>
15005                  pthread_mutex_t m;
15006                  pthread_mutexattr_t ma;
15007
15008 int
15009 main (void)
15010 {
15011 pthread_mutex_lock (&m);
15012                  pthread_mutexattr_init (&ma);
15013   ;
15014   return 0;
15015 }
15016 _ACEOF
15017 if ac_fn_c_try_link "$LINENO"
15018 then :
15019   gl_have_pthread=yes
15020              LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
15021              LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
15022 fi
15023 rm -f core conftest.err conftest.$ac_objext \
15024     conftest$ac_exeext conftest.$ac_ext
15025           LIBS=$save_LIBS
15026           test -n "$gl_have_pthread" && break
15027         done
15028
15029         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15030         # since it is defined as a macro on OSF/1.)
15031         if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
15032           # The program links fine without libpthread. But it may actually
15033           # need to link with libpthread in order to create multiple threads.
15034           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15035 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15036 if test ${ac_cv_lib_pthread_pthread_kill+y}
15037 then :
15038   printf %s "(cached) " >&6
15039 else
15040   ac_check_lib_save_LIBS=$LIBS
15041 LIBS="-lpthread  $LIBS"
15042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15043 /* end confdefs.h.  */
15044
15045 /* Override any GCC internal prototype to avoid an error.
15046    Use char because int might match the return type of a GCC
15047    builtin and then its argument prototype would still apply.  */
15048 #ifdef __cplusplus
15049 extern "C"
15050 #endif
15051 char pthread_kill ();
15052 int
15053 main (void)
15054 {
15055 return pthread_kill ();
15056   ;
15057   return 0;
15058 }
15059 _ACEOF
15060 if ac_fn_c_try_link "$LINENO"
15061 then :
15062   ac_cv_lib_pthread_pthread_kill=yes
15063 else
15064   ac_cv_lib_pthread_pthread_kill=no
15065 fi
15066 rm -f core conftest.err conftest.$ac_objext \
15067     conftest$ac_exeext conftest.$ac_ext
15068 LIBS=$ac_check_lib_save_LIBS
15069 fi
15070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15071 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15072 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15073 then :
15074   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15075              # On Solaris and HP-UX, most pthread functions exist also in libc.
15076              # Therefore pthread_in_use() needs to actually try to create a
15077              # thread: pthread_create from libc will fail, whereas
15078              # pthread_create will actually create a thread.
15079              # On Solaris 10 or newer, this test is no longer needed, because
15080              # libc contains the fully functional pthread functions.
15081              case "$host_os" in
15082                solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15083
15084 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15085
15086              esac
15087
15088 fi
15089
15090         elif test -z "$gl_have_pthread"; then
15091           # Some library is needed. Try libpthread and libc_r.
15092           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15093 printf %s "checking for pthread_kill in -lpthread... " >&6; }
15094 if test ${ac_cv_lib_pthread_pthread_kill+y}
15095 then :
15096   printf %s "(cached) " >&6
15097 else
15098   ac_check_lib_save_LIBS=$LIBS
15099 LIBS="-lpthread  $LIBS"
15100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15101 /* end confdefs.h.  */
15102
15103 /* Override any GCC internal prototype to avoid an error.
15104    Use char because int might match the return type of a GCC
15105    builtin and then its argument prototype would still apply.  */
15106 #ifdef __cplusplus
15107 extern "C"
15108 #endif
15109 char pthread_kill ();
15110 int
15111 main (void)
15112 {
15113 return pthread_kill ();
15114   ;
15115   return 0;
15116 }
15117 _ACEOF
15118 if ac_fn_c_try_link "$LINENO"
15119 then :
15120   ac_cv_lib_pthread_pthread_kill=yes
15121 else
15122   ac_cv_lib_pthread_pthread_kill=no
15123 fi
15124 rm -f core conftest.err conftest.$ac_objext \
15125     conftest$ac_exeext conftest.$ac_ext
15126 LIBS=$ac_check_lib_save_LIBS
15127 fi
15128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15129 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15130 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15131 then :
15132   gl_have_pthread=yes
15133              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
15134              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15135 fi
15136
15137           if test -z "$gl_have_pthread"; then
15138             # For FreeBSD 4.
15139             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15140 printf %s "checking for pthread_kill in -lc_r... " >&6; }
15141 if test ${ac_cv_lib_c_r_pthread_kill+y}
15142 then :
15143   printf %s "(cached) " >&6
15144 else
15145   ac_check_lib_save_LIBS=$LIBS
15146 LIBS="-lc_r  $LIBS"
15147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15148 /* end confdefs.h.  */
15149
15150 /* Override any GCC internal prototype to avoid an error.
15151    Use char because int might match the return type of a GCC
15152    builtin and then its argument prototype would still apply.  */
15153 #ifdef __cplusplus
15154 extern "C"
15155 #endif
15156 char pthread_kill ();
15157 int
15158 main (void)
15159 {
15160 return pthread_kill ();
15161   ;
15162   return 0;
15163 }
15164 _ACEOF
15165 if ac_fn_c_try_link "$LINENO"
15166 then :
15167   ac_cv_lib_c_r_pthread_kill=yes
15168 else
15169   ac_cv_lib_c_r_pthread_kill=no
15170 fi
15171 rm -f core conftest.err conftest.$ac_objext \
15172     conftest$ac_exeext conftest.$ac_ext
15173 LIBS=$ac_check_lib_save_LIBS
15174 fi
15175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15176 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15177 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15178 then :
15179   gl_have_pthread=yes
15180                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
15181                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
15182 fi
15183
15184           fi
15185         fi
15186         if test -n "$gl_have_pthread"; then
15187           gl_threads_api=posix
15188
15189 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
15190
15191           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15192             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15193
15194 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
15195
15196               LIBTHREAD=
15197               LTLIBTHREAD=
15198             fi
15199           fi
15200         fi
15201       fi
15202     fi
15203     if test -z "$gl_have_pthread"; then
15204       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
15205         gl_have_solaristhread=
15206         gl_save_LIBS="$LIBS"
15207         LIBS="$LIBS -lthread"
15208         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15209 /* end confdefs.h.  */
15210
15211 #include <thread.h>
15212 #include <synch.h>
15213
15214 int
15215 main (void)
15216 {
15217 thr_self();
15218   ;
15219   return 0;
15220 }
15221 _ACEOF
15222 if ac_fn_c_try_link "$LINENO"
15223 then :
15224   gl_have_solaristhread=yes
15225 fi
15226 rm -f core conftest.err conftest.$ac_objext \
15227     conftest$ac_exeext conftest.$ac_ext
15228         LIBS="$gl_save_LIBS"
15229         if test -n "$gl_have_solaristhread"; then
15230           gl_threads_api=solaris
15231           LIBTHREAD=-lthread
15232           LTLIBTHREAD=-lthread
15233           LIBMULTITHREAD="$LIBTHREAD"
15234           LTLIBMULTITHREAD="$LTLIBTHREAD"
15235
15236 printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
15237
15238           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15239
15240 printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
15241
15242             LIBTHREAD=
15243             LTLIBTHREAD=
15244           fi
15245         fi
15246       fi
15247     fi
15248     if test "$gl_use_threads" = pth; then
15249       gl_save_CPPFLAGS="$CPPFLAGS"
15250
15251
15252
15253
15254
15255   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
15256 printf %s "checking how to link with libpth... " >&6; }
15257 if test ${ac_cv_libpth_libs+y}
15258 then :
15259   printf %s "(cached) " >&6
15260 else
15261
15262
15263
15264
15265
15266
15267
15268
15269     use_additional=yes
15270
15271   acl_save_prefix="$prefix"
15272   prefix="$acl_final_prefix"
15273   acl_save_exec_prefix="$exec_prefix"
15274   exec_prefix="$acl_final_exec_prefix"
15275
15276     eval additional_includedir=\"$includedir\"
15277     eval additional_libdir=\"$libdir\"
15278
15279   exec_prefix="$acl_save_exec_prefix"
15280   prefix="$acl_save_prefix"
15281
15282
15283 # Check whether --with-libpth-prefix was given.
15284 if test ${with_libpth_prefix+y}
15285 then :
15286   withval=$with_libpth_prefix;
15287     if test "X$withval" = "Xno"; then
15288       use_additional=no
15289     else
15290       if test "X$withval" = "X"; then
15291
15292   acl_save_prefix="$prefix"
15293   prefix="$acl_final_prefix"
15294   acl_save_exec_prefix="$exec_prefix"
15295   exec_prefix="$acl_final_exec_prefix"
15296
15297           eval additional_includedir=\"$includedir\"
15298           eval additional_libdir=\"$libdir\"
15299
15300   exec_prefix="$acl_save_exec_prefix"
15301   prefix="$acl_save_prefix"
15302
15303       else
15304         additional_includedir="$withval/include"
15305         additional_libdir="$withval/$acl_libdirstem"
15306         if test "$acl_libdirstem2" != "$acl_libdirstem" \
15307            && ! test -d "$withval/$acl_libdirstem"; then
15308           additional_libdir="$withval/$acl_libdirstem2"
15309         fi
15310       fi
15311     fi
15312
15313 fi
15314
15315       LIBPTH=
15316   LTLIBPTH=
15317   INCPTH=
15318   LIBPTH_PREFIX=
15319       HAVE_LIBPTH=
15320   rpathdirs=
15321   ltrpathdirs=
15322   names_already_handled=
15323   names_next_round='pth '
15324   while test -n "$names_next_round"; do
15325     names_this_round="$names_next_round"
15326     names_next_round=
15327     for name in $names_this_round; do
15328       already_handled=
15329       for n in $names_already_handled; do
15330         if test "$n" = "$name"; then
15331           already_handled=yes
15332           break
15333         fi
15334       done
15335       if test -z "$already_handled"; then
15336         names_already_handled="$names_already_handled $name"
15337                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
15338         eval value=\"\$HAVE_LIB$uppername\"
15339         if test -n "$value"; then
15340           if test "$value" = yes; then
15341             eval value=\"\$LIB$uppername\"
15342             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
15343             eval value=\"\$LTLIB$uppername\"
15344             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
15345           else
15346                                     :
15347           fi
15348         else
15349                               found_dir=
15350           found_la=
15351           found_so=
15352           found_a=
15353           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
15354           if test -n "$acl_shlibext"; then
15355             shrext=".$acl_shlibext"             # typically: shrext=.so
15356           else
15357             shrext=
15358           fi
15359           if test $use_additional = yes; then
15360             dir="$additional_libdir"
15361                                     if test -n "$acl_shlibext"; then
15362               if test -f "$dir/$libname$shrext"; then
15363                 found_dir="$dir"
15364                 found_so="$dir/$libname$shrext"
15365               else
15366                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15367                   ver=`(cd "$dir" && \
15368                         for f in "$libname$shrext".*; do echo "$f"; done \
15369                         | sed -e "s,^$libname$shrext\\\\.,," \
15370                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15371                         | sed 1q ) 2>/dev/null`
15372                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15373                     found_dir="$dir"
15374                     found_so="$dir/$libname$shrext.$ver"
15375                   fi
15376                 else
15377                   eval library_names=\"$acl_library_names_spec\"
15378                   for f in $library_names; do
15379                     if test -f "$dir/$f"; then
15380                       found_dir="$dir"
15381                       found_so="$dir/$f"
15382                       break
15383                     fi
15384                   done
15385                 fi
15386               fi
15387             fi
15388                         if test "X$found_dir" = "X"; then
15389               if test -f "$dir/$libname.$acl_libext"; then
15390                 found_dir="$dir"
15391                 found_a="$dir/$libname.$acl_libext"
15392               fi
15393             fi
15394             if test "X$found_dir" != "X"; then
15395               if test -f "$dir/$libname.la"; then
15396                 found_la="$dir/$libname.la"
15397               fi
15398             fi
15399           fi
15400           if test "X$found_dir" = "X"; then
15401             for x in $LDFLAGS $LTLIBPTH; do
15402
15403   acl_save_prefix="$prefix"
15404   prefix="$acl_final_prefix"
15405   acl_save_exec_prefix="$exec_prefix"
15406   exec_prefix="$acl_final_exec_prefix"
15407   eval x=\"$x\"
15408   exec_prefix="$acl_save_exec_prefix"
15409   prefix="$acl_save_prefix"
15410
15411               case "$x" in
15412                 -L*)
15413                   dir=`echo "X$x" | sed -e 's/^X-L//'`
15414                                     if test -n "$acl_shlibext"; then
15415                     if test -f "$dir/$libname$shrext"; then
15416                       found_dir="$dir"
15417                       found_so="$dir/$libname$shrext"
15418                     else
15419                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15420                         ver=`(cd "$dir" && \
15421                               for f in "$libname$shrext".*; do echo "$f"; done \
15422                               | sed -e "s,^$libname$shrext\\\\.,," \
15423                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15424                               | sed 1q ) 2>/dev/null`
15425                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15426                           found_dir="$dir"
15427                           found_so="$dir/$libname$shrext.$ver"
15428                         fi
15429                       else
15430                         eval library_names=\"$acl_library_names_spec\"
15431                         for f in $library_names; do
15432                           if test -f "$dir/$f"; then
15433                             found_dir="$dir"
15434                             found_so="$dir/$f"
15435                             break
15436                           fi
15437                         done
15438                       fi
15439                     fi
15440                   fi
15441                                     if test "X$found_dir" = "X"; then
15442                     if test -f "$dir/$libname.$acl_libext"; then
15443                       found_dir="$dir"
15444                       found_a="$dir/$libname.$acl_libext"
15445                     fi
15446                   fi
15447                   if test "X$found_dir" != "X"; then
15448                     if test -f "$dir/$libname.la"; then
15449                       found_la="$dir/$libname.la"
15450                     fi
15451                   fi
15452                   ;;
15453               esac
15454               if test "X$found_dir" != "X"; then
15455                 break
15456               fi
15457             done
15458           fi
15459           if test "X$found_dir" != "X"; then
15460                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
15461             if test "X$found_so" != "X"; then
15462                                                         if test "$enable_rpath" = no \
15463                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15464                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15465                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15466               else
15467                                                                                 haveit=
15468                 for x in $ltrpathdirs; do
15469                   if test "X$x" = "X$found_dir"; then
15470                     haveit=yes
15471                     break
15472                   fi
15473                 done
15474                 if test -z "$haveit"; then
15475                   ltrpathdirs="$ltrpathdirs $found_dir"
15476                 fi
15477                                 if test "$acl_hardcode_direct" = yes; then
15478                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15479                 else
15480                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15481                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15482                                                             haveit=
15483                     for x in $rpathdirs; do
15484                       if test "X$x" = "X$found_dir"; then
15485                         haveit=yes
15486                         break
15487                       fi
15488                     done
15489                     if test -z "$haveit"; then
15490                       rpathdirs="$rpathdirs $found_dir"
15491                     fi
15492                   else
15493                                                                                 haveit=
15494                     for x in $LDFLAGS $LIBPTH; do
15495
15496   acl_save_prefix="$prefix"
15497   prefix="$acl_final_prefix"
15498   acl_save_exec_prefix="$exec_prefix"
15499   exec_prefix="$acl_final_exec_prefix"
15500   eval x=\"$x\"
15501   exec_prefix="$acl_save_exec_prefix"
15502   prefix="$acl_save_prefix"
15503
15504                       if test "X$x" = "X-L$found_dir"; then
15505                         haveit=yes
15506                         break
15507                       fi
15508                     done
15509                     if test -z "$haveit"; then
15510                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
15511                     fi
15512                     if test "$acl_hardcode_minus_L" != no; then
15513                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15514                     else
15515                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15516                     fi
15517                   fi
15518                 fi
15519               fi
15520             else
15521               if test "X$found_a" != "X"; then
15522                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
15523               else
15524                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
15525               fi
15526             fi
15527                         additional_includedir=
15528             case "$found_dir" in
15529               */$acl_libdirstem | */$acl_libdirstem/)
15530                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
15531                 if test "$name" = 'pth'; then
15532                   LIBPTH_PREFIX="$basedir"
15533                 fi
15534                 additional_includedir="$basedir/include"
15535                 ;;
15536               */$acl_libdirstem2 | */$acl_libdirstem2/)
15537                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
15538                 if test "$name" = 'pth'; then
15539                   LIBPTH_PREFIX="$basedir"
15540                 fi
15541                 additional_includedir="$basedir/include"
15542                 ;;
15543             esac
15544             if test "X$additional_includedir" != "X"; then
15545                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
15546                 haveit=
15547                 if test "X$additional_includedir" = "X/usr/local/include"; then
15548                   if test -n "$GCC"; then
15549                     case $host_os in
15550                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15551                     esac
15552                   fi
15553                 fi
15554                 if test -z "$haveit"; then
15555                   for x in $CPPFLAGS $INCPTH; do
15556
15557   acl_save_prefix="$prefix"
15558   prefix="$acl_final_prefix"
15559   acl_save_exec_prefix="$exec_prefix"
15560   exec_prefix="$acl_final_exec_prefix"
15561   eval x=\"$x\"
15562   exec_prefix="$acl_save_exec_prefix"
15563   prefix="$acl_save_prefix"
15564
15565                     if test "X$x" = "X-I$additional_includedir"; then
15566                       haveit=yes
15567                       break
15568                     fi
15569                   done
15570                   if test -z "$haveit"; then
15571                     if test -d "$additional_includedir"; then
15572                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
15573                     fi
15574                   fi
15575                 fi
15576               fi
15577             fi
15578                         if test -n "$found_la"; then
15579                                                         save_libdir="$libdir"
15580               case "$found_la" in
15581                 */* | *\\*) . "$found_la" ;;
15582                 *) . "./$found_la" ;;
15583               esac
15584               libdir="$save_libdir"
15585                             for dep in $dependency_libs; do
15586                 case "$dep" in
15587                   -L*)
15588                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15589                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
15590                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
15591                       haveit=
15592                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
15593                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
15594                         if test -n "$GCC"; then
15595                           case $host_os in
15596                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15597                           esac
15598                         fi
15599                       fi
15600                       if test -z "$haveit"; then
15601                         haveit=
15602                         for x in $LDFLAGS $LIBPTH; do
15603
15604   acl_save_prefix="$prefix"
15605   prefix="$acl_final_prefix"
15606   acl_save_exec_prefix="$exec_prefix"
15607   exec_prefix="$acl_final_exec_prefix"
15608   eval x=\"$x\"
15609   exec_prefix="$acl_save_exec_prefix"
15610   prefix="$acl_save_prefix"
15611
15612                           if test "X$x" = "X-L$additional_libdir"; then
15613                             haveit=yes
15614                             break
15615                           fi
15616                         done
15617                         if test -z "$haveit"; then
15618                           if test -d "$additional_libdir"; then
15619                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
15620                           fi
15621                         fi
15622                         haveit=
15623                         for x in $LDFLAGS $LTLIBPTH; do
15624
15625   acl_save_prefix="$prefix"
15626   prefix="$acl_final_prefix"
15627   acl_save_exec_prefix="$exec_prefix"
15628   exec_prefix="$acl_final_exec_prefix"
15629   eval x=\"$x\"
15630   exec_prefix="$acl_save_exec_prefix"
15631   prefix="$acl_save_prefix"
15632
15633                           if test "X$x" = "X-L$additional_libdir"; then
15634                             haveit=yes
15635                             break
15636                           fi
15637                         done
15638                         if test -z "$haveit"; then
15639                           if test -d "$additional_libdir"; then
15640                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
15641                           fi
15642                         fi
15643                       fi
15644                     fi
15645                     ;;
15646                   -R*)
15647                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
15648                     if test "$enable_rpath" != no; then
15649                                                                   haveit=
15650                       for x in $rpathdirs; do
15651                         if test "X$x" = "X$dir"; then
15652                           haveit=yes
15653                           break
15654                         fi
15655                       done
15656                       if test -z "$haveit"; then
15657                         rpathdirs="$rpathdirs $dir"
15658                       fi
15659                                                                   haveit=
15660                       for x in $ltrpathdirs; do
15661                         if test "X$x" = "X$dir"; then
15662                           haveit=yes
15663                           break
15664                         fi
15665                       done
15666                       if test -z "$haveit"; then
15667                         ltrpathdirs="$ltrpathdirs $dir"
15668                       fi
15669                     fi
15670                     ;;
15671                   -l*)
15672                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15673                     ;;
15674                   *.la)
15675                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15676                     ;;
15677                   *)
15678                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
15679                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
15680                     ;;
15681                 esac
15682               done
15683             fi
15684           else
15685                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15686             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
15687           fi
15688         fi
15689       fi
15690     done
15691   done
15692   if test "X$rpathdirs" != "X"; then
15693     if test -n "$acl_hardcode_libdir_separator"; then
15694                         alldirs=
15695       for found_dir in $rpathdirs; do
15696         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
15697       done
15698             acl_save_libdir="$libdir"
15699       libdir="$alldirs"
15700       eval flag=\"$acl_hardcode_libdir_flag_spec\"
15701       libdir="$acl_save_libdir"
15702       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15703     else
15704             for found_dir in $rpathdirs; do
15705         acl_save_libdir="$libdir"
15706         libdir="$found_dir"
15707         eval flag=\"$acl_hardcode_libdir_flag_spec\"
15708         libdir="$acl_save_libdir"
15709         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15710       done
15711     fi
15712   fi
15713   if test "X$ltrpathdirs" != "X"; then
15714             for found_dir in $ltrpathdirs; do
15715       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
15716     done
15717   fi
15718
15719
15720
15721
15722
15723
15724     ac_cv_libpth_libs="$LIBPTH"
15725     ac_cv_libpth_ltlibs="$LTLIBPTH"
15726     ac_cv_libpth_cppflags="$INCPTH"
15727     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
15728
15729 fi
15730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
15731 printf "%s\n" "$ac_cv_libpth_libs" >&6; }
15732   LIBPTH="$ac_cv_libpth_libs"
15733   LTLIBPTH="$ac_cv_libpth_ltlibs"
15734   INCPTH="$ac_cv_libpth_cppflags"
15735   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
15736
15737   for element in $INCPTH; do
15738     haveit=
15739     for x in $CPPFLAGS; do
15740
15741   acl_save_prefix="$prefix"
15742   prefix="$acl_final_prefix"
15743   acl_save_exec_prefix="$exec_prefix"
15744   exec_prefix="$acl_final_exec_prefix"
15745   eval x=\"$x\"
15746   exec_prefix="$acl_save_exec_prefix"
15747   prefix="$acl_save_prefix"
15748
15749       if test "X$x" = "X$element"; then
15750         haveit=yes
15751         break
15752       fi
15753     done
15754     if test -z "$haveit"; then
15755       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15756     fi
15757   done
15758
15759
15760
15761
15762       HAVE_LIBPTH=yes
15763
15764
15765
15766       gl_have_pth=
15767       gl_save_LIBS="$LIBS"
15768       LIBS="$LIBS $LIBPTH"
15769       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15770 /* end confdefs.h.  */
15771 #include <pth.h>
15772 int
15773 main (void)
15774 {
15775 pth_self();
15776   ;
15777   return 0;
15778 }
15779 _ACEOF
15780 if ac_fn_c_try_link "$LINENO"
15781 then :
15782   gl_have_pth=yes
15783 fi
15784 rm -f core conftest.err conftest.$ac_objext \
15785     conftest$ac_exeext conftest.$ac_ext
15786       LIBS="$gl_save_LIBS"
15787       if test -n "$gl_have_pth"; then
15788         gl_threads_api=pth
15789         LIBTHREAD="$LIBPTH"
15790         LTLIBTHREAD="$LTLIBPTH"
15791         LIBMULTITHREAD="$LIBTHREAD"
15792         LTLIBMULTITHREAD="$LTLIBTHREAD"
15793
15794 printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
15795
15796         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15797           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15798
15799 printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
15800
15801             LIBTHREAD=
15802             LTLIBTHREAD=
15803           fi
15804         fi
15805       else
15806         CPPFLAGS="$gl_save_CPPFLAGS"
15807       fi
15808     fi
15809     if test -z "$gl_have_pthread"; then
15810       case "$gl_use_threads" in
15811         yes | windows | win32) # The 'win32' is for backward compatibility.
15812           if { case "$host_os" in
15813                  mingw*) true;;
15814                  *) false;;
15815                esac
15816              }; then
15817             gl_threads_api=windows
15818
15819 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15820
15821           fi
15822           ;;
15823       esac
15824     fi
15825   fi
15826   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15827 printf %s "checking for multithread API to use... " >&6; }
15828   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15829 printf "%s\n" "$gl_threads_api" >&6; }
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
15841 printf %s "checking for a sed that does not truncate output... " >&6; }
15842 if test ${ac_cv_path_SED+y}
15843 then :
15844   printf %s "(cached) " >&6
15845 else
15846             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15847      for ac_i in 1 2 3 4 5 6 7; do
15848        ac_script="$ac_script$as_nl$ac_script"
15849      done
15850      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15851      { ac_script=; unset ac_script;}
15852      if test -z "$SED"; then
15853   ac_path_SED_found=false
15854   # Loop through the user's path and test for each of PROGNAME-LIST
15855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15856 for as_dir in $PATH
15857 do
15858   IFS=$as_save_IFS
15859   case $as_dir in #(((
15860     '') as_dir=./ ;;
15861     */) ;;
15862     *) as_dir=$as_dir/ ;;
15863   esac
15864     for ac_prog in sed gsed
15865    do
15866     for ac_exec_ext in '' $ac_executable_extensions; do
15867       ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15868       as_fn_executable_p "$ac_path_SED" || continue
15869 # Check for GNU ac_path_SED and select it if it is found.
15870   # Check for GNU $ac_path_SED
15871 case `"$ac_path_SED" --version 2>&1` in
15872 *GNU*)
15873   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15874 *)
15875   ac_count=0
15876   printf %s 0123456789 >"conftest.in"
15877   while :
15878   do
15879     cat "conftest.in" "conftest.in" >"conftest.tmp"
15880     mv "conftest.tmp" "conftest.in"
15881     cp "conftest.in" "conftest.nl"
15882     printf "%s\n" '' >> "conftest.nl"
15883     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15884     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15885     as_fn_arith $ac_count + 1 && ac_count=$as_val
15886     if test $ac_count -gt ${ac_path_SED_max-0}; then
15887       # Best one so far, save it but keep looking for a better one
15888       ac_cv_path_SED="$ac_path_SED"
15889       ac_path_SED_max=$ac_count
15890     fi
15891     # 10*(2^10) chars as input seems more than enough
15892     test $ac_count -gt 10 && break
15893   done
15894   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15895 esac
15896
15897       $ac_path_SED_found && break 3
15898     done
15899   done
15900   done
15901 IFS=$as_save_IFS
15902   if test -z "$ac_cv_path_SED"; then
15903     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15904   fi
15905 else
15906   ac_cv_path_SED=$SED
15907 fi
15908
15909 fi
15910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15911 printf "%s\n" "$ac_cv_path_SED" >&6; }
15912  SED="$ac_cv_path_SED"
15913   rm -f conftest.sed
15914
15915 # Autoupdate added the following line to ensure that your configure
15916 # script's behavior did not change.  It is probably safe to remove.
15917
15918
15919
15920       ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15921 if test "x$ac_cv_header_stdlib_h" = xyes
15922 then :
15923   printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
15924
15925 fi
15926
15927   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15928 printf %s "checking for GNU libc compatible malloc... " >&6; }
15929 if test ${ac_cv_func_malloc_0_nonnull+y}
15930 then :
15931   printf %s "(cached) " >&6
15932 else
15933   if test "$cross_compiling" = yes
15934 then :
15935   case "$host_os" in
15936           # Guess yes on platforms where we know the result.
15937           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
15938           | hpux* | solaris* | cygwin* | mingw*)
15939             ac_cv_func_malloc_0_nonnull=yes ;;
15940           # If we don't know, assume the worst.
15941           *) ac_cv_func_malloc_0_nonnull=no ;;
15942         esac
15943
15944 else
15945   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h.  */
15947 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15948             # include <stdlib.h>
15949             #else
15950             char *malloc ();
15951             #endif
15952
15953 int
15954 main (void)
15955 {
15956 char *p = malloc (0);
15957             int result = !p;
15958             free (p);
15959             return result;
15960   ;
15961   return 0;
15962 }
15963
15964 _ACEOF
15965 if ac_fn_c_try_run "$LINENO"
15966 then :
15967   ac_cv_func_malloc_0_nonnull=yes
15968 else
15969   ac_cv_func_malloc_0_nonnull=no
15970 fi
15971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15972   conftest.$ac_objext conftest.beam conftest.$ac_ext
15973 fi
15974
15975
15976 fi
15977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15978 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
15979   if test $ac_cv_func_malloc_0_nonnull = yes
15980 then :
15981   gl_cv_func_malloc_0_nonnull=1
15982 else
15983   gl_cv_func_malloc_0_nonnull=0
15984 fi
15985
15986
15987 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
15988
15989
15990
15991
15992
15993
15994   GNULIB_EXPLICIT_BZERO=0;
15995   GNULIB_FFSL=0;
15996   GNULIB_FFSLL=0;
15997   GNULIB_MEMCHR=0;
15998   GNULIB_MEMMEM=0;
15999   GNULIB_MEMPCPY=0;
16000   GNULIB_MEMRCHR=0;
16001   GNULIB_RAWMEMCHR=0;
16002   GNULIB_STPCPY=0;
16003   GNULIB_STPNCPY=0;
16004   GNULIB_STRCHRNUL=0;
16005   GNULIB_STRDUP=0;
16006   GNULIB_STRNCAT=0;
16007   GNULIB_STRNDUP=0;
16008   GNULIB_STRNLEN=0;
16009   GNULIB_STRPBRK=0;
16010   GNULIB_STRSEP=0;
16011   GNULIB_STRSTR=0;
16012   GNULIB_STRCASESTR=0;
16013   GNULIB_STRTOK_R=0;
16014   GNULIB_MBSLEN=0;
16015   GNULIB_MBSNLEN=0;
16016   GNULIB_MBSCHR=0;
16017   GNULIB_MBSRCHR=0;
16018   GNULIB_MBSSTR=0;
16019   GNULIB_MBSCASECMP=0;
16020   GNULIB_MBSNCASECMP=0;
16021   GNULIB_MBSPCASECMP=0;
16022   GNULIB_MBSCASESTR=0;
16023   GNULIB_MBSCSPN=0;
16024   GNULIB_MBSPBRK=0;
16025   GNULIB_MBSSPN=0;
16026   GNULIB_MBSSEP=0;
16027   GNULIB_MBSTOK_R=0;
16028   GNULIB_STRERROR=0;
16029   GNULIB_STRERROR_R=0;
16030   GNULIB_STRSIGNAL=0;
16031   GNULIB_STRVERSCMP=0;
16032   HAVE_MBSLEN=0;
16033     HAVE_EXPLICIT_BZERO=1;
16034   HAVE_FFSL=1;
16035   HAVE_FFSLL=1;
16036   HAVE_MEMCHR=1;
16037   HAVE_DECL_MEMMEM=1;
16038   HAVE_MEMPCPY=1;
16039   HAVE_DECL_MEMRCHR=1;
16040   HAVE_RAWMEMCHR=1;
16041   HAVE_STPCPY=1;
16042   HAVE_STPNCPY=1;
16043   HAVE_STRCHRNUL=1;
16044   HAVE_DECL_STRDUP=1;
16045   HAVE_DECL_STRNDUP=1;
16046   HAVE_DECL_STRNLEN=1;
16047   HAVE_STRPBRK=1;
16048   HAVE_STRSEP=1;
16049   HAVE_STRCASESTR=1;
16050   HAVE_DECL_STRTOK_R=1;
16051   HAVE_DECL_STRERROR_R=1;
16052   HAVE_DECL_STRSIGNAL=1;
16053   HAVE_STRVERSCMP=1;
16054   REPLACE_MEMCHR=0;
16055   REPLACE_MEMMEM=0;
16056   REPLACE_STPNCPY=0;
16057   REPLACE_STRCHRNUL=0;
16058   REPLACE_STRDUP=0;
16059   REPLACE_STRNCAT=0;
16060   REPLACE_STRNDUP=0;
16061   REPLACE_STRNLEN=0;
16062   REPLACE_STRSTR=0;
16063   REPLACE_STRCASESTR=0;
16064   REPLACE_STRTOK_R=0;
16065   REPLACE_STRERROR=0;
16066   REPLACE_STRERROR_R=0;
16067   REPLACE_STRSIGNAL=0;
16068   UNDEFINE_STRTOK_R=0;
16069
16070
16071
16072
16073
16074
16075   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16076   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16077   # irrelevant for anonymous mappings.
16078   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16079 if test "x$ac_cv_func_mmap" = xyes
16080 then :
16081   gl_have_mmap=yes
16082 else
16083   gl_have_mmap=no
16084 fi
16085
16086
16087   # Try to allow MAP_ANONYMOUS.
16088   gl_have_mmap_anonymous=no
16089   if test $gl_have_mmap = yes; then
16090     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16091 printf %s "checking for MAP_ANONYMOUS... " >&6; }
16092     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093 /* end confdefs.h.  */
16094
16095 #include <sys/mman.h>
16096 #ifdef MAP_ANONYMOUS
16097     I cannot identify this map
16098 #endif
16099
16100 _ACEOF
16101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16102   $EGREP "I cannot identify this map" >/dev/null 2>&1
16103 then :
16104   gl_have_mmap_anonymous=yes
16105 fi
16106 rm -rf conftest*
16107
16108     if test $gl_have_mmap_anonymous != yes; then
16109       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110 /* end confdefs.h.  */
16111
16112 #include <sys/mman.h>
16113 #ifdef MAP_ANON
16114     I cannot identify this map
16115 #endif
16116
16117 _ACEOF
16118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16119   $EGREP "I cannot identify this map" >/dev/null 2>&1
16120 then :
16121
16122 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16123
16124          gl_have_mmap_anonymous=yes
16125 fi
16126 rm -rf conftest*
16127
16128     fi
16129     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16130 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
16131     if test $gl_have_mmap_anonymous = yes; then
16132
16133 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16134
16135     fi
16136   fi
16137
16138
16139
16140
16141
16142
16143   if test $HAVE_MEMCHR = 1; then
16144     # Detect platform-specific bugs in some versions of glibc:
16145     # memchr should not dereference anything with length 0
16146     #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
16147     # memchr should not dereference overestimated length after a match
16148     #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16149     #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16150     # Assume that memchr works on platforms that lack mprotect.
16151     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16152 printf %s "checking whether memchr works... " >&6; }
16153 if test ${gl_cv_func_memchr_works+y}
16154 then :
16155   printf %s "(cached) " >&6
16156 else
16157   if test "$cross_compiling" = yes
16158 then :
16159   case "$host_os" in
16160                     # Guess yes on native Windows.
16161             mingw*) gl_cv_func_memchr_works="guessing yes" ;;
16162                     # Be pessimistic for now.
16163             *)      gl_cv_func_memchr_works="guessing no" ;;
16164           esac
16165
16166 else
16167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16168 /* end confdefs.h.  */
16169
16170 #include <string.h>
16171 #if HAVE_SYS_MMAN_H
16172 # include <fcntl.h>
16173 # include <unistd.h>
16174 # include <sys/types.h>
16175 # include <sys/mman.h>
16176 # ifndef MAP_FILE
16177 #  define MAP_FILE 0
16178 # endif
16179 #endif
16180
16181 int
16182 main (void)
16183 {
16184
16185   int result = 0;
16186   char *fence = NULL;
16187 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16188 # if HAVE_MAP_ANONYMOUS
16189   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16190   const int fd = -1;
16191 # else /* !HAVE_MAP_ANONYMOUS */
16192   const int flags = MAP_FILE | MAP_PRIVATE;
16193   int fd = open ("/dev/zero", O_RDONLY, 0666);
16194   if (fd >= 0)
16195 # endif
16196     {
16197       int pagesize = getpagesize ();
16198       char *two_pages =
16199         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16200                        flags, fd, 0);
16201       if (two_pages != (char *)(-1)
16202           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16203         fence = two_pages + pagesize;
16204     }
16205 #endif
16206   if (fence)
16207     {
16208       if (memchr (fence, 0, 0))
16209         result |= 1;
16210       strcpy (fence - 9, "12345678");
16211       if (memchr (fence - 9, 0, 79) != fence - 1)
16212         result |= 2;
16213       if (memchr (fence - 1, 0, 3) != fence - 1)
16214         result |= 4;
16215     }
16216   return result;
16217
16218   ;
16219   return 0;
16220 }
16221 _ACEOF
16222 if ac_fn_c_try_run "$LINENO"
16223 then :
16224   gl_cv_func_memchr_works=yes
16225 else
16226   gl_cv_func_memchr_works=no
16227 fi
16228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16229   conftest.$ac_objext conftest.beam conftest.$ac_ext
16230 fi
16231
16232
16233 fi
16234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16235 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
16236     case "$gl_cv_func_memchr_works" in
16237       *yes) ;;
16238       *) REPLACE_MEMCHR=1 ;;
16239     esac
16240   fi
16241
16242 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16243 if test "x$ac_cv_have_decl_memrchr" = xyes
16244 then :
16245   ac_have_decl=1
16246 else
16247   ac_have_decl=0
16248 fi
16249
16250 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
16251
16252
16253
16254
16255
16256   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16257 printf %s "checking for O_CLOEXEC... " >&6; }
16258 if test ${gl_cv_macro_O_CLOEXEC+y}
16259 then :
16260   printf %s "(cached) " >&6
16261 else
16262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16263 /* end confdefs.h.  */
16264 #include <fcntl.h>
16265                           #ifndef O_CLOEXEC
16266                             choke me;
16267                           #endif
16268
16269 int
16270 main (void)
16271 {
16272 return O_CLOEXEC;
16273   ;
16274   return 0;
16275 }
16276 _ACEOF
16277 if ac_fn_c_try_compile "$LINENO"
16278 then :
16279   gl_cv_macro_O_CLOEXEC=yes
16280 else
16281   gl_cv_macro_O_CLOEXEC=no
16282 fi
16283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16284 fi
16285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16286 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
16287
16288
16289
16290      REPLACE_STRERROR_0=0
16291   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16292 printf %s "checking whether strerror(0) succeeds... " >&6; }
16293 if test ${gl_cv_func_strerror_0_works+y}
16294 then :
16295   printf %s "(cached) " >&6
16296 else
16297   if test "$cross_compiling" = yes
16298 then :
16299   case "$host_os" in
16300                         # Guess yes on glibc systems.
16301          *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16302                         # Guess yes on native Windows.
16303          mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
16304                         # If we don't know, assume the worst.
16305          *)             gl_cv_func_strerror_0_works="guessing no" ;;
16306        esac
16307
16308 else
16309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16310 /* end confdefs.h.  */
16311 #include <string.h>
16312            #include <errno.h>
16313
16314 int
16315 main (void)
16316 {
16317 int result = 0;
16318            char *str;
16319            errno = 0;
16320            str = strerror (0);
16321            if (!*str) result |= 1;
16322            if (errno) result |= 2;
16323            if (strstr (str, "nknown") || strstr (str, "ndefined"))
16324              result |= 4;
16325            return result;
16326   ;
16327   return 0;
16328 }
16329 _ACEOF
16330 if ac_fn_c_try_run "$LINENO"
16331 then :
16332   gl_cv_func_strerror_0_works=yes
16333 else
16334   gl_cv_func_strerror_0_works=no
16335 fi
16336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16337   conftest.$ac_objext conftest.beam conftest.$ac_ext
16338 fi
16339
16340
16341 fi
16342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16343 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
16344   case "$gl_cv_func_strerror_0_works" in
16345     *yes) ;;
16346     *)
16347       REPLACE_STRERROR_0=1
16348
16349 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
16350
16351       ;;
16352   esac
16353
16354
16355
16356
16357
16358
16359
16360   if test $ac_cv_func_strerror_r = yes; then
16361     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16362                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16363 printf %s "checking for strerror_r with POSIX signature... " >&6; }
16364 if test ${gl_cv_func_strerror_r_posix_signature+y}
16365 then :
16366   printf %s "(cached) " >&6
16367 else
16368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16369 /* end confdefs.h.  */
16370 #include <string.h>
16371                 int strerror_r (int, char *, size_t);
16372
16373 int
16374 main (void)
16375 {
16376
16377   ;
16378   return 0;
16379 }
16380 _ACEOF
16381 if ac_fn_c_try_compile "$LINENO"
16382 then :
16383   gl_cv_func_strerror_r_posix_signature=yes
16384 else
16385   gl_cv_func_strerror_r_posix_signature=no
16386 fi
16387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16388
16389 fi
16390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16391 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
16392       if test $gl_cv_func_strerror_r_posix_signature = yes; then
16393                                                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16394 printf %s "checking whether strerror_r works... " >&6; }
16395 if test ${gl_cv_func_strerror_r_works+y}
16396 then :
16397   printf %s "(cached) " >&6
16398 else
16399   if test "$cross_compiling" = yes
16400 then :
16401
16402               case "$host_os" in
16403                        # Guess no on AIX.
16404                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
16405                        # Guess no on HP-UX.
16406                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16407                        # Guess no on BSD variants.
16408                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
16409                        # Guess yes otherwise.
16410                 *)     gl_cv_func_strerror_r_works="guessing yes";;
16411               esac
16412
16413 else
16414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16415 /* end confdefs.h.  */
16416 #include <errno.h>
16417                   #include <string.h>
16418
16419 int
16420 main (void)
16421 {
16422 int result = 0;
16423                   char buf[79];
16424                   if (strerror_r (EACCES, buf, 0) < 0)
16425                     result |= 1;
16426                   errno = 0;
16427                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
16428                     result |= 2;
16429                   strcpy (buf, "Unknown");
16430                   if (strerror_r (0, buf, sizeof buf) != 0)
16431                     result |= 4;
16432                   if (errno)
16433                     result |= 8;
16434                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16435                     result |= 0x10;
16436                   errno = 0;
16437                   *buf = 0;
16438                   if (strerror_r (-3, buf, sizeof buf) < 0)
16439                     result |= 0x20;
16440                   if (errno)
16441                     result |= 0x40;
16442                   if (!*buf)
16443                     result |= 0x80;
16444                   return result;
16445
16446   ;
16447   return 0;
16448 }
16449 _ACEOF
16450 if ac_fn_c_try_run "$LINENO"
16451 then :
16452   gl_cv_func_strerror_r_works=yes
16453 else
16454   gl_cv_func_strerror_r_works=no
16455 fi
16456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16457   conftest.$ac_objext conftest.beam conftest.$ac_ext
16458 fi
16459
16460
16461 fi
16462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16463 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16464       else
16465
16466                         if test $ac_cv_func___xpg_strerror_r = yes; then
16467           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16468 printf %s "checking whether __xpg_strerror_r works... " >&6; }
16469 if test ${gl_cv_func_strerror_r_works+y}
16470 then :
16471   printf %s "(cached) " >&6
16472 else
16473   if test "$cross_compiling" = yes
16474 then :
16475                                   gl_cv_func_strerror_r_works="guessing no"
16476
16477 else
16478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16479 /* end confdefs.h.  */
16480 #include <errno.h>
16481                     #include <string.h>
16482                     extern
16483                     #ifdef __cplusplus
16484                     "C"
16485                     #endif
16486                     int __xpg_strerror_r(int, char *, size_t);
16487
16488 int
16489 main (void)
16490 {
16491 int result = 0;
16492                     char buf[256] = "^";
16493                     char copy[256];
16494                     char *str = strerror (-1);
16495                     strcpy (copy, str);
16496                     if (__xpg_strerror_r (-2, buf, 1) == 0)
16497                       result |= 1;
16498                     if (*buf)
16499                       result |= 2;
16500                     __xpg_strerror_r (-2, buf, 256);
16501                     if (strcmp (str, copy))
16502                       result |= 4;
16503                     return result;
16504
16505   ;
16506   return 0;
16507 }
16508 _ACEOF
16509 if ac_fn_c_try_run "$LINENO"
16510 then :
16511   gl_cv_func_strerror_r_works=yes
16512 else
16513   gl_cv_func_strerror_r_works=no
16514 fi
16515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16516   conftest.$ac_objext conftest.beam conftest.$ac_ext
16517 fi
16518
16519
16520 fi
16521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16522 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16523         fi
16524       fi
16525     fi
16526   fi
16527
16528
16529
16530
16531
16532
16533
16534
16535   if test $ac_cv_have_decl_strerror_r = no; then
16536     HAVE_DECL_STRERROR_R=0
16537   fi
16538
16539   if test $ac_cv_func_strerror_r = yes; then
16540     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16541       if test $gl_cv_func_strerror_r_posix_signature = yes; then
16542         case "$gl_cv_func_strerror_r_works" in
16543                     *no) REPLACE_STRERROR_R=1 ;;
16544         esac
16545       else
16546                 REPLACE_STRERROR_R=1
16547       fi
16548     else
16549                   REPLACE_STRERROR_R=1
16550     fi
16551   fi
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568   gl_cv_func_vfprintf_posix=no
16569   case "$gl_cv_func_printf_sizes_c99" in
16570     *yes)
16571       case "$gl_cv_func_printf_long_double" in
16572         *yes)
16573           case "$gl_cv_func_printf_infinite" in
16574             *yes)
16575               case "$gl_cv_func_printf_infinite_long_double" in
16576                 *yes)
16577                   case "$gl_cv_func_printf_directive_a" in
16578                     *yes)
16579                       case "$gl_cv_func_printf_directive_f" in
16580                         *yes)
16581                           case "$gl_cv_func_printf_directive_n" in
16582                             *yes)
16583                               case "$gl_cv_func_printf_directive_ls" in
16584                                 *yes)
16585                                   case "$gl_cv_func_printf_positions" in
16586                                     *yes)
16587                                       case "$gl_cv_func_printf_flag_grouping" in
16588                                         *yes)
16589                                           case "$gl_cv_func_printf_flag_leftadjust" in
16590                                             *yes)
16591                                               case "$gl_cv_func_printf_flag_zero" in
16592                                                 *yes)
16593                                                   case "$gl_cv_func_printf_precision" in
16594                                                     *yes)
16595                                                       case "$gl_cv_func_printf_enomem" in
16596                                                         *yes)
16597                                                           # vfprintf exists and is
16598                                                           # already POSIX compliant.
16599                                                           gl_cv_func_vfprintf_posix=yes
16600                                                           ;;
16601                                                       esac
16602                                                       ;;
16603                                                   esac
16604                                                   ;;
16605                                               esac
16606                                               ;;
16607                                           esac
16608                                           ;;
16609                                       esac
16610                                       ;;
16611                                   esac
16612                                   ;;
16613                               esac
16614                               ;;
16615                           esac
16616                           ;;
16617                       esac
16618                       ;;
16619                   esac
16620                   ;;
16621               esac
16622               ;;
16623           esac
16624           ;;
16625       esac
16626       ;;
16627   esac
16628   if test $gl_cv_func_vfprintf_posix = no; then
16629
16630
16631
16632   case "$gl_cv_func_printf_infinite" in
16633     *yes)
16634       ;;
16635     *)
16636
16637 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
16638
16639       ;;
16640   esac
16641
16642
16643
16644
16645   case "$gl_cv_func_printf_long_double" in
16646     *yes)
16647       case "$gl_cv_func_printf_infinite_long_double" in
16648         *yes)
16649           ;;
16650         *)
16651
16652 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
16653
16654           ;;
16655       esac
16656       ;;
16657   esac
16658
16659
16660
16661   case "$gl_cv_func_printf_directive_a" in
16662     *yes)
16663       ;;
16664     *)
16665
16666 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
16667
16668       ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
16669 if test "x$ac_cv_func_nl_langinfo" = xyes
16670 then :
16671   printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
16672
16673 fi
16674
16675       ;;
16676   esac
16677
16678
16679
16680   case "$gl_cv_func_printf_directive_f" in
16681     *yes)
16682       ;;
16683     *)
16684
16685 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
16686
16687       ;;
16688   esac
16689
16690
16691
16692   case "$gl_cv_func_printf_directive_ls" in
16693     *yes)
16694       ;;
16695     *)
16696
16697 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
16698
16699       ;;
16700   esac
16701
16702
16703
16704   case "$gl_cv_func_printf_flag_grouping" in
16705     *yes)
16706       ;;
16707     *)
16708
16709 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
16710
16711       ;;
16712   esac
16713
16714
16715
16716   case "$gl_cv_func_printf_flag_leftadjust" in
16717     *yes)
16718       ;;
16719     *)
16720
16721 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
16722
16723       ;;
16724   esac
16725
16726
16727
16728   case "$gl_cv_func_printf_flag_zero" in
16729     *yes)
16730       ;;
16731     *)
16732
16733 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
16734
16735       ;;
16736   esac
16737
16738
16739
16740   case "$gl_cv_func_printf_precision" in
16741     *yes)
16742       ;;
16743     *)
16744
16745 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
16746
16747
16748 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
16749
16750
16751 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16752
16753       ;;
16754   esac
16755
16756
16757
16758   case "$gl_cv_func_printf_enomem" in
16759     *yes)
16760       ;;
16761     *)
16762
16763 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
16764
16765
16766 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
16767
16768
16769 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16770
16771       ;;
16772   esac
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
16815
16816   if test $ac_cv_func_vasnprintf = yes; then
16817
16818 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
16819
16820   fi
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16833 if test "x$ac_cv_type_ptrdiff_t" = xyes
16834 then :
16835
16836 else
16837
16838 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
16839
16840
16841 fi
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
16860
16861   REPLACE_VFPRINTF=1
16862
16863 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
16864
16865   :
16866
16867   fi
16868
16869
16870
16871   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16872 printf %s "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16873 if test ${gl_cv_prog_as_underscore+y}
16874 then :
16875   printf %s "(cached) " >&6
16876 else
16877   cat > conftest.c <<EOF
16878 #ifdef __cplusplus
16879 extern "C" int foo (void);
16880 #endif
16881 int foo(void) { return 0; }
16882 EOF
16883      # Look for the assembly language name in the .s file.
16884      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16885   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16886   (eval $ac_try) 2>&5
16887   ac_status=$?
16888   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16889   test $ac_status = 0; }; } >/dev/null 2>&1
16890      if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
16891        gl_cv_prog_as_underscore=yes
16892      else
16893        gl_cv_prog_as_underscore=no
16894      fi
16895      rm -f conftest*
16896
16897 fi
16898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16899 printf "%s\n" "$gl_cv_prog_as_underscore" >&6; }
16900   if test $gl_cv_prog_as_underscore = yes; then
16901     USER_LABEL_PREFIX=_
16902   else
16903     USER_LABEL_PREFIX=
16904   fi
16905
16906 printf "%s\n" "#define USER_LABEL_PREFIX $USER_LABEL_PREFIX" >>confdefs.h
16907
16908   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16909
16910
16911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16912 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16913 if test ${ac_cv_header_stdbool_h+y}
16914 then :
16915   printf %s "(cached) " >&6
16916 else
16917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16918 /* end confdefs.h.  */
16919
16920              #include <stdbool.h>
16921
16922              #ifdef __cplusplus
16923               typedef bool Bool;
16924              #else
16925               typedef _Bool Bool;
16926               #ifndef bool
16927                "error: bool is not defined"
16928               #endif
16929               #ifndef false
16930                "error: false is not defined"
16931               #endif
16932               #if false
16933                "error: false is not 0"
16934               #endif
16935               #ifndef true
16936                "error: true is not defined"
16937               #endif
16938               #if true != 1
16939                "error: true is not 1"
16940               #endif
16941              #endif
16942
16943              #ifndef __bool_true_false_are_defined
16944               "error: __bool_true_false_are_defined is not defined"
16945              #endif
16946
16947              struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16948
16949              char a[true == 1 ? 1 : -1];
16950              char b[false == 0 ? 1 : -1];
16951              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16952              char d[(bool) 0.5 == true ? 1 : -1];
16953              /* See body of main program for 'e'.  */
16954              char f[(Bool) 0.0 == false ? 1 : -1];
16955              char g[true];
16956              char h[sizeof (Bool)];
16957              char i[sizeof s.t];
16958              enum { j = false, k = true, l = false * true, m = true * 256 };
16959              /* The following fails for
16960                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16961              Bool n[m];
16962              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16963              char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16964              /* Catch a bug in an HP-UX C compiler.  See
16965                 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16966                 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16967               */
16968              Bool q = true;
16969              Bool *pq = &q;
16970              bool *qq = &q;
16971
16972 int
16973 main (void)
16974 {
16975
16976              bool e = &s;
16977              *pq |= q; *pq |= ! q;
16978              *qq |= q; *qq |= ! q;
16979              /* Refer to every declared value, to avoid compiler optimizations.  */
16980              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16981                      + !m + !n + !o + !p + !q + !pq + !qq);
16982
16983   ;
16984   return 0;
16985 }
16986 _ACEOF
16987 if ac_fn_c_try_compile "$LINENO"
16988 then :
16989   ac_cv_header_stdbool_h=yes
16990 else
16991   ac_cv_header_stdbool_h=no
16992 fi
16993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16994 fi
16995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16996 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16997    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16998 if test "x$ac_cv_type__Bool" = xyes
16999 then :
17000
17001 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
17002
17003
17004 fi
17005
17006
17007
17008     REPLACE_NULL=0;
17009   HAVE_MAX_ALIGN_T=1;
17010   HAVE_WCHAR_T=1;
17011
17012
17013
17014
17015
17016
17017
17018
17019   if test $ac_cv_type_long_long_int = yes; then
17020     HAVE_LONG_LONG_INT=1
17021   else
17022     HAVE_LONG_LONG_INT=0
17023   fi
17024
17025
17026   if test $ac_cv_type_unsigned_long_long_int = yes; then
17027     HAVE_UNSIGNED_LONG_LONG_INT=1
17028   else
17029     HAVE_UNSIGNED_LONG_LONG_INT=0
17030   fi
17031
17032
17033
17034   if test $ac_cv_header_wchar_h = yes; then
17035     HAVE_WCHAR_H=1
17036   else
17037     HAVE_WCHAR_H=0
17038   fi
17039
17040
17041       if test $ac_cv_header_inttypes_h = yes; then
17042     HAVE_INTTYPES_H=1
17043   else
17044     HAVE_INTTYPES_H=0
17045   fi
17046
17047
17048       if test $ac_cv_header_sys_types_h = yes; then
17049     HAVE_SYS_TYPES_H=1
17050   else
17051     HAVE_SYS_TYPES_H=0
17052   fi
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064      if test $gl_cv_have_include_next = yes; then
17065        gl_cv_next_stdint_h='<'stdint.h'>'
17066      else
17067        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17068 printf %s "checking absolute name of <stdint.h>... " >&6; }
17069 if test ${gl_cv_next_stdint_h+y}
17070 then :
17071   printf %s "(cached) " >&6
17072 else
17073
17074              if test $ac_cv_header_stdint_h = yes; then
17075
17076
17077
17078
17079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17080 /* end confdefs.h.  */
17081 #include <stdint.h>
17082 _ACEOF
17083                 case "$host_os" in
17084     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17085     *)    gl_absname_cpp="$ac_cpp" ;;
17086   esac
17087
17088   case "$host_os" in
17089     mingw*)
17090                                           gl_dirsep_regex='[/\\]'
17091       ;;
17092     *)
17093       gl_dirsep_regex='\/'
17094       ;;
17095   esac
17096       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17097   gl_header_literal_regex=`echo 'stdint.h' \
17098                            | sed -e "$gl_make_literal_regex_sed"`
17099   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17100       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17101       s|^/[^/]|//&|
17102       p
17103       q
17104     }'
17105
17106         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17107   sed -n "$gl_absolute_header_sed"`
17108
17109            gl_header=$gl_cv_absolute_stdint_h
17110            gl_cv_next_stdint_h='"'$gl_header'"'
17111           else
17112                gl_cv_next_stdint_h='<'stdint.h'>'
17113              fi
17114
17115
17116 fi
17117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17118 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
17119      fi
17120      NEXT_STDINT_H=$gl_cv_next_stdint_h
17121
17122      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17123        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17124        gl_next_as_first_directive='<'stdint.h'>'
17125      else
17126        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17127        gl_next_as_first_directive=$gl_cv_next_stdint_h
17128      fi
17129      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17130
17131
17132
17133
17134   if test $ac_cv_header_stdint_h = yes; then
17135     HAVE_STDINT_H=1
17136   else
17137     HAVE_STDINT_H=0
17138   fi
17139
17140
17141     if test $ac_cv_header_stdint_h = yes; then
17142     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17143 printf %s "checking whether stdint.h conforms to C99... " >&6; }
17144 if test ${gl_cv_header_working_stdint_h+y}
17145 then :
17146   printf %s "(cached) " >&6
17147 else
17148   gl_cv_header_working_stdint_h=no
17149        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17150 /* end confdefs.h.  */
17151
17152
17153 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17154 #define __STDC_CONSTANT_MACROS 1
17155 #define __STDC_LIMIT_MACROS 1
17156 #include <stdint.h>
17157 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
17158 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
17159 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17160 #endif
17161
17162
17163   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17164      included before <wchar.h>.  */
17165   #include <stddef.h>
17166   #include <signal.h>
17167   #if HAVE_WCHAR_H
17168   # include <stdio.h>
17169   # include <time.h>
17170   # include <wchar.h>
17171   #endif
17172
17173
17174 #ifdef INT8_MAX
17175 int8_t a1 = INT8_MAX;
17176 int8_t a1min = INT8_MIN;
17177 #endif
17178 #ifdef INT16_MAX
17179 int16_t a2 = INT16_MAX;
17180 int16_t a2min = INT16_MIN;
17181 #endif
17182 #ifdef INT32_MAX
17183 int32_t a3 = INT32_MAX;
17184 int32_t a3min = INT32_MIN;
17185 #endif
17186 #ifdef INT64_MAX
17187 int64_t a4 = INT64_MAX;
17188 int64_t a4min = INT64_MIN;
17189 #endif
17190 #ifdef UINT8_MAX
17191 uint8_t b1 = UINT8_MAX;
17192 #else
17193 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17194 #endif
17195 #ifdef UINT16_MAX
17196 uint16_t b2 = UINT16_MAX;
17197 #endif
17198 #ifdef UINT32_MAX
17199 uint32_t b3 = UINT32_MAX;
17200 #endif
17201 #ifdef UINT64_MAX
17202 uint64_t b4 = UINT64_MAX;
17203 #endif
17204 int_least8_t c1 = INT8_C (0x7f);
17205 int_least8_t c1max = INT_LEAST8_MAX;
17206 int_least8_t c1min = INT_LEAST8_MIN;
17207 int_least16_t c2 = INT16_C (0x7fff);
17208 int_least16_t c2max = INT_LEAST16_MAX;
17209 int_least16_t c2min = INT_LEAST16_MIN;
17210 int_least32_t c3 = INT32_C (0x7fffffff);
17211 int_least32_t c3max = INT_LEAST32_MAX;
17212 int_least32_t c3min = INT_LEAST32_MIN;
17213 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17214 int_least64_t c4max = INT_LEAST64_MAX;
17215 int_least64_t c4min = INT_LEAST64_MIN;
17216 uint_least8_t d1 = UINT8_C (0xff);
17217 uint_least8_t d1max = UINT_LEAST8_MAX;
17218 uint_least16_t d2 = UINT16_C (0xffff);
17219 uint_least16_t d2max = UINT_LEAST16_MAX;
17220 uint_least32_t d3 = UINT32_C (0xffffffff);
17221 uint_least32_t d3max = UINT_LEAST32_MAX;
17222 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17223 uint_least64_t d4max = UINT_LEAST64_MAX;
17224 int_fast8_t e1 = INT_FAST8_MAX;
17225 int_fast8_t e1min = INT_FAST8_MIN;
17226 int_fast16_t e2 = INT_FAST16_MAX;
17227 int_fast16_t e2min = INT_FAST16_MIN;
17228 int_fast32_t e3 = INT_FAST32_MAX;
17229 int_fast32_t e3min = INT_FAST32_MIN;
17230 int_fast64_t e4 = INT_FAST64_MAX;
17231 int_fast64_t e4min = INT_FAST64_MIN;
17232 uint_fast8_t f1 = UINT_FAST8_MAX;
17233 uint_fast16_t f2 = UINT_FAST16_MAX;
17234 uint_fast32_t f3 = UINT_FAST32_MAX;
17235 uint_fast64_t f4 = UINT_FAST64_MAX;
17236 #ifdef INTPTR_MAX
17237 intptr_t g = INTPTR_MAX;
17238 intptr_t gmin = INTPTR_MIN;
17239 #endif
17240 #ifdef UINTPTR_MAX
17241 uintptr_t h = UINTPTR_MAX;
17242 #endif
17243 intmax_t i = INTMAX_MAX;
17244 uintmax_t j = UINTMAX_MAX;
17245
17246 /* Check that SIZE_MAX has the correct type, if possible.  */
17247 #if 201112 <= __STDC_VERSION__
17248 int k = _Generic (SIZE_MAX, size_t: 0);
17249 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
17250        || (0x5110 <= __SUNPRO_C && !__STDC__))
17251 extern size_t k;
17252 extern __typeof__ (SIZE_MAX) k;
17253 #endif
17254
17255 #include <limits.h> /* for CHAR_BIT */
17256 #define TYPE_MINIMUM(t) \
17257   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17258 #define TYPE_MAXIMUM(t) \
17259   ((t) ((t) 0 < (t) -1 \
17260         ? (t) -1 \
17261         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17262 struct s {
17263   int check_PTRDIFF:
17264       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17265       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17266       ? 1 : -1;
17267   /* Detect bug in FreeBSD 6.0 / ia64.  */
17268   int check_SIG_ATOMIC:
17269       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17270       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17271       ? 1 : -1;
17272   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17273   int check_WCHAR:
17274       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17275       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17276       ? 1 : -1;
17277   /* Detect bug in mingw.  */
17278   int check_WINT:
17279       WINT_MIN == TYPE_MINIMUM (wint_t)
17280       && WINT_MAX == TYPE_MAXIMUM (wint_t)
17281       ? 1 : -1;
17282
17283   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
17284   int check_UINT8_C:
17285         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17286   int check_UINT16_C:
17287         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17288
17289   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
17290 #ifdef UINT8_MAX
17291   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17292 #endif
17293 #ifdef UINT16_MAX
17294   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17295 #endif
17296 #ifdef UINT32_MAX
17297   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17298 #endif
17299 #ifdef UINT64_MAX
17300   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17301 #endif
17302   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17303   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17304   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17305   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17306   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17307   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17308   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17309   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17310   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17311   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17312   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17313 };
17314
17315 int
17316 main (void)
17317 {
17318
17319   ;
17320   return 0;
17321 }
17322 _ACEOF
17323 if ac_fn_c_try_compile "$LINENO"
17324 then :
17325                                                     if test "$cross_compiling" = yes
17326 then :
17327   case "$host_os" in
17328                          # Guess yes on native Windows.
17329                  mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
17330                          # In general, assume it works.
17331                  *)      gl_cv_header_working_stdint_h="guessing yes" ;;
17332                esac
17333
17334 else
17335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h.  */
17337
17338
17339 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17340 #define __STDC_CONSTANT_MACROS 1
17341 #define __STDC_LIMIT_MACROS 1
17342 #include <stdint.h>
17343
17344
17345   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17346      included before <wchar.h>.  */
17347   #include <stddef.h>
17348   #include <signal.h>
17349   #if HAVE_WCHAR_H
17350   # include <stdio.h>
17351   # include <time.h>
17352   # include <wchar.h>
17353   #endif
17354
17355
17356 #include <stdio.h>
17357 #include <string.h>
17358 #define MVAL(macro) MVAL1(macro)
17359 #define MVAL1(expression) #expression
17360 static const char *macro_values[] =
17361   {
17362 #ifdef INT8_MAX
17363     MVAL (INT8_MAX),
17364 #endif
17365 #ifdef INT16_MAX
17366     MVAL (INT16_MAX),
17367 #endif
17368 #ifdef INT32_MAX
17369     MVAL (INT32_MAX),
17370 #endif
17371 #ifdef INT64_MAX
17372     MVAL (INT64_MAX),
17373 #endif
17374 #ifdef UINT8_MAX
17375     MVAL (UINT8_MAX),
17376 #endif
17377 #ifdef UINT16_MAX
17378     MVAL (UINT16_MAX),
17379 #endif
17380 #ifdef UINT32_MAX
17381     MVAL (UINT32_MAX),
17382 #endif
17383 #ifdef UINT64_MAX
17384     MVAL (UINT64_MAX),
17385 #endif
17386     NULL
17387   };
17388
17389 int
17390 main (void)
17391 {
17392
17393   const char **mv;
17394   for (mv = macro_values; *mv != NULL; mv++)
17395     {
17396       const char *value = *mv;
17397       /* Test whether it looks like a cast expression.  */
17398       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17399           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17400           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17401           || strncmp (value, "((int)"/*)*/, 6) == 0
17402           || strncmp (value, "((signed short)"/*)*/, 15) == 0
17403           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17404         return mv - macro_values + 1;
17405     }
17406   return 0;
17407
17408   ;
17409   return 0;
17410 }
17411 _ACEOF
17412 if ac_fn_c_try_run "$LINENO"
17413 then :
17414   gl_cv_header_working_stdint_h=yes
17415 fi
17416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17417   conftest.$ac_objext conftest.beam conftest.$ac_ext
17418 fi
17419
17420
17421 fi
17422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17423
17424 fi
17425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17426 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
17427   fi
17428
17429   HAVE_C99_STDINT_H=0
17430   HAVE_SYS_BITYPES_H=0
17431   HAVE_SYS_INTTYPES_H=0
17432   STDINT_H=stdint.h
17433   case "$gl_cv_header_working_stdint_h" in
17434     *yes)
17435       HAVE_C99_STDINT_H=1
17436                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
17437 printf %s "checking whether stdint.h predates C++11... " >&6; }
17438 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
17439 then :
17440   printf %s "(cached) " >&6
17441 else
17442   gl_cv_header_stdint_predates_cxx11_h=yes
17443          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17444 /* end confdefs.h.  */
17445
17446
17447 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17448 #include <stdint.h>
17449
17450
17451   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17452      included before <wchar.h>.  */
17453   #include <stddef.h>
17454   #include <signal.h>
17455   #if HAVE_WCHAR_H
17456   # include <stdio.h>
17457   # include <time.h>
17458   # include <wchar.h>
17459   #endif
17460
17461
17462 intmax_t im = INTMAX_MAX;
17463 int32_t i32 = INT32_C (0x7fffffff);
17464
17465 int
17466 main (void)
17467 {
17468
17469   ;
17470   return 0;
17471 }
17472 _ACEOF
17473 if ac_fn_c_try_compile "$LINENO"
17474 then :
17475   gl_cv_header_stdint_predates_cxx11_h=no
17476 fi
17477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17478 fi
17479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
17480 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
17481
17482       if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
17483
17484 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
17485
17486
17487 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
17488
17489       fi
17490       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
17491 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
17492 if test ${gl_cv_header_stdint_width+y}
17493 then :
17494   printf %s "(cached) " >&6
17495 else
17496   gl_cv_header_stdint_width=no
17497          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17498 /* end confdefs.h.  */
17499
17500               /* Work if build is not clean.  */
17501               #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
17502               #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17503                #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17504               #endif
17505               #include <stdint.h>
17506
17507   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17508      included before <wchar.h>.  */
17509   #include <stddef.h>
17510   #include <signal.h>
17511   #if HAVE_WCHAR_H
17512   # include <stdio.h>
17513   # include <time.h>
17514   # include <wchar.h>
17515   #endif
17516
17517               int iw = UINTMAX_WIDTH;
17518
17519 int
17520 main (void)
17521 {
17522
17523   ;
17524   return 0;
17525 }
17526 _ACEOF
17527 if ac_fn_c_try_compile "$LINENO"
17528 then :
17529   gl_cv_header_stdint_width=yes
17530 fi
17531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17532 fi
17533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
17534 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
17535       if test "$gl_cv_header_stdint_width" = yes; then
17536         STDINT_H=
17537       fi
17538       ;;
17539     *)
17540                   ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
17541 if test "x$ac_cv_header_sys_inttypes_h" = xyes
17542 then :
17543   printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
17544
17545 fi
17546 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
17547 if test "x$ac_cv_header_sys_bitypes_h" = xyes
17548 then :
17549   printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
17550
17551 fi
17552
17553       if test $ac_cv_header_sys_inttypes_h = yes; then
17554         HAVE_SYS_INTTYPES_H=1
17555       fi
17556       if test $ac_cv_header_sys_bitypes_h = yes; then
17557         HAVE_SYS_BITYPES_H=1
17558       fi
17559
17560
17561   if test $APPLE_UNIVERSAL_BUILD = 0; then
17562
17563
17564   for gltype in ptrdiff_t size_t ; do
17565     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17566 printf %s "checking for bit size of $gltype... " >&6; }
17567 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17568 then :
17569   printf %s "(cached) " >&6
17570 else
17571   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
17572   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17573      included before <wchar.h>.  */
17574   #include <stddef.h>
17575   #include <signal.h>
17576   #if HAVE_WCHAR_H
17577   # include <stdio.h>
17578   # include <time.h>
17579   # include <wchar.h>
17580   #endif
17581
17582 #include <limits.h>"
17583 then :
17584
17585 else
17586   result=unknown
17587 fi
17588
17589        eval gl_cv_bitsizeof_${gltype}=\$result
17590
17591 fi
17592 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17593                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17594 printf "%s\n" "$ac_res" >&6; }
17595     eval result=\$gl_cv_bitsizeof_${gltype}
17596     if test $result = unknown; then
17597                                                 result=0
17598     fi
17599     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17600     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17601
17602     eval BITSIZEOF_${GLTYPE}=\$result
17603   done
17604
17605
17606   fi
17607
17608
17609   for gltype in sig_atomic_t wchar_t wint_t ; do
17610     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17611 printf %s "checking for bit size of $gltype... " >&6; }
17612 if eval test \${gl_cv_bitsizeof_${gltype}+y}
17613 then :
17614   printf %s "(cached) " >&6
17615 else
17616   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
17617   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17618      included before <wchar.h>.  */
17619   #include <stddef.h>
17620   #include <signal.h>
17621   #if HAVE_WCHAR_H
17622   # include <stdio.h>
17623   # include <time.h>
17624   # include <wchar.h>
17625   #endif
17626
17627 #include <limits.h>"
17628 then :
17629
17630 else
17631   result=unknown
17632 fi
17633
17634        eval gl_cv_bitsizeof_${gltype}=\$result
17635
17636 fi
17637 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17638                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17639 printf "%s\n" "$ac_res" >&6; }
17640     eval result=\$gl_cv_bitsizeof_${gltype}
17641     if test $result = unknown; then
17642                                                 result=0
17643     fi
17644     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17645     printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
17646
17647     eval BITSIZEOF_${GLTYPE}=\$result
17648   done
17649
17650
17651
17652
17653   for gltype in sig_atomic_t wchar_t wint_t ; do
17654     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17655 printf %s "checking whether $gltype is signed... " >&6; }
17656 if eval test \${gl_cv_type_${gltype}_signed+y}
17657 then :
17658   printf %s "(cached) " >&6
17659 else
17660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17661 /* end confdefs.h.  */
17662
17663   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17664      included before <wchar.h>.  */
17665   #include <stddef.h>
17666   #include <signal.h>
17667   #if HAVE_WCHAR_H
17668   # include <stdio.h>
17669   # include <time.h>
17670   # include <wchar.h>
17671   #endif
17672
17673             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17674 int
17675 main (void)
17676 {
17677
17678   ;
17679   return 0;
17680 }
17681 _ACEOF
17682 if ac_fn_c_try_compile "$LINENO"
17683 then :
17684   result=yes
17685 else
17686   result=no
17687 fi
17688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17689        eval gl_cv_type_${gltype}_signed=\$result
17690
17691 fi
17692 eval ac_res=\$gl_cv_type_${gltype}_signed
17693                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17694 printf "%s\n" "$ac_res" >&6; }
17695     eval result=\$gl_cv_type_${gltype}_signed
17696     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17697     if test "$result" = yes; then
17698       printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
17699
17700       eval HAVE_SIGNED_${GLTYPE}=1
17701     else
17702       eval HAVE_SIGNED_${GLTYPE}=0
17703     fi
17704   done
17705
17706
17707   gl_cv_type_ptrdiff_t_signed=yes
17708   gl_cv_type_size_t_signed=no
17709   if test $APPLE_UNIVERSAL_BUILD = 0; then
17710
17711
17712   for gltype in ptrdiff_t size_t ; do
17713     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17714 printf %s "checking for $gltype integer literal suffix... " >&6; }
17715 if eval test \${gl_cv_type_${gltype}_suffix+y}
17716 then :
17717   printf %s "(cached) " >&6
17718 else
17719   eval gl_cv_type_${gltype}_suffix=no
17720        eval result=\$gl_cv_type_${gltype}_signed
17721        if test "$result" = yes; then
17722          glsufu=
17723        else
17724          glsufu=u
17725        fi
17726        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17727          case $glsuf in
17728            '')  gltype1='int';;
17729            l)   gltype1='long int';;
17730            ll)  gltype1='long long int';;
17731            i64) gltype1='__int64';;
17732            u)   gltype1='unsigned int';;
17733            ul)  gltype1='unsigned long int';;
17734            ull) gltype1='unsigned long long int';;
17735            ui64)gltype1='unsigned __int64';;
17736          esac
17737          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738 /* end confdefs.h.  */
17739
17740   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17741      included before <wchar.h>.  */
17742   #include <stddef.h>
17743   #include <signal.h>
17744   #if HAVE_WCHAR_H
17745   # include <stdio.h>
17746   # include <time.h>
17747   # include <wchar.h>
17748   #endif
17749
17750               extern $gltype foo;
17751               extern $gltype1 foo;
17752 int
17753 main (void)
17754 {
17755
17756   ;
17757   return 0;
17758 }
17759 _ACEOF
17760 if ac_fn_c_try_compile "$LINENO"
17761 then :
17762   eval gl_cv_type_${gltype}_suffix=\$glsuf
17763 fi
17764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17765          eval result=\$gl_cv_type_${gltype}_suffix
17766          test "$result" != no && break
17767        done
17768 fi
17769 eval ac_res=\$gl_cv_type_${gltype}_suffix
17770                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17771 printf "%s\n" "$ac_res" >&6; }
17772     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17773     eval result=\$gl_cv_type_${gltype}_suffix
17774     test "$result" = no && result=
17775     eval ${GLTYPE}_SUFFIX=\$result
17776     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
17777
17778   done
17779
17780
17781   fi
17782
17783
17784   for gltype in sig_atomic_t wchar_t wint_t ; do
17785     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17786 printf %s "checking for $gltype integer literal suffix... " >&6; }
17787 if eval test \${gl_cv_type_${gltype}_suffix+y}
17788 then :
17789   printf %s "(cached) " >&6
17790 else
17791   eval gl_cv_type_${gltype}_suffix=no
17792        eval result=\$gl_cv_type_${gltype}_signed
17793        if test "$result" = yes; then
17794          glsufu=
17795        else
17796          glsufu=u
17797        fi
17798        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17799          case $glsuf in
17800            '')  gltype1='int';;
17801            l)   gltype1='long int';;
17802            ll)  gltype1='long long int';;
17803            i64) gltype1='__int64';;
17804            u)   gltype1='unsigned int';;
17805            ul)  gltype1='unsigned long int';;
17806            ull) gltype1='unsigned long long int';;
17807            ui64)gltype1='unsigned __int64';;
17808          esac
17809          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17810 /* end confdefs.h.  */
17811
17812   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17813      included before <wchar.h>.  */
17814   #include <stddef.h>
17815   #include <signal.h>
17816   #if HAVE_WCHAR_H
17817   # include <stdio.h>
17818   # include <time.h>
17819   # include <wchar.h>
17820   #endif
17821
17822               extern $gltype foo;
17823               extern $gltype1 foo;
17824 int
17825 main (void)
17826 {
17827
17828   ;
17829   return 0;
17830 }
17831 _ACEOF
17832 if ac_fn_c_try_compile "$LINENO"
17833 then :
17834   eval gl_cv_type_${gltype}_suffix=\$glsuf
17835 fi
17836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17837          eval result=\$gl_cv_type_${gltype}_suffix
17838          test "$result" != no && break
17839        done
17840 fi
17841 eval ac_res=\$gl_cv_type_${gltype}_suffix
17842                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17843 printf "%s\n" "$ac_res" >&6; }
17844     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17845     eval result=\$gl_cv_type_${gltype}_suffix
17846     test "$result" = no && result=
17847     eval ${GLTYPE}_SUFFIX=\$result
17848     printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
17849
17850   done
17851
17852
17853
17854           if test $GNULIB_OVERRIDES_WINT_T = 1; then
17855     BITSIZEOF_WINT_T=32
17856   fi
17857
17858       ;;
17859   esac
17860
17861     LIMITS_H=limits.h
17862    if test -n "$LIMITS_H"; then
17863   GL_GENERATE_LIMITS_H_TRUE=
17864   GL_GENERATE_LIMITS_H_FALSE='#'
17865 else
17866   GL_GENERATE_LIMITS_H_TRUE='#'
17867   GL_GENERATE_LIMITS_H_FALSE=
17868 fi
17869
17870
17871
17872
17873
17874
17875    if test -n "$STDINT_H"; then
17876   GL_GENERATE_STDINT_H_TRUE=
17877   GL_GENERATE_STDINT_H_FALSE='#'
17878 else
17879   GL_GENERATE_STDINT_H_TRUE='#'
17880   GL_GENERATE_STDINT_H_FALSE=
17881 fi
17882
17883
17884
17885 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
17886 if test "x$ac_cv_have_decl_strdup" = xyes
17887 then :
17888   ac_have_decl=1
17889 else
17890   ac_have_decl=0
17891 fi
17892
17893 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907      if test $gl_cv_have_include_next = yes; then
17908        gl_cv_next_string_h='<'string.h'>'
17909      else
17910        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17911 printf %s "checking absolute name of <string.h>... " >&6; }
17912 if test ${gl_cv_next_string_h+y}
17913 then :
17914   printf %s "(cached) " >&6
17915 else
17916
17917
17918
17919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17920 /* end confdefs.h.  */
17921 #include <string.h>
17922 _ACEOF
17923                 case "$host_os" in
17924     aix*) gl_absname_cpp="$ac_cpp -C" ;;
17925     *)    gl_absname_cpp="$ac_cpp" ;;
17926   esac
17927
17928   case "$host_os" in
17929     mingw*)
17930                                           gl_dirsep_regex='[/\\]'
17931       ;;
17932     *)
17933       gl_dirsep_regex='\/'
17934       ;;
17935   esac
17936       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17937   gl_header_literal_regex=`echo 'string.h' \
17938                            | sed -e "$gl_make_literal_regex_sed"`
17939   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17940       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17941       s|^/[^/]|//&|
17942       p
17943       q
17944     }'
17945
17946         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17947   sed -n "$gl_absolute_header_sed"`
17948
17949            gl_header=$gl_cv_absolute_string_h
17950            gl_cv_next_string_h='"'$gl_header'"'
17951
17952
17953 fi
17954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17955 printf "%s\n" "$gl_cv_next_string_h" >&6; }
17956      fi
17957      NEXT_STRING_H=$gl_cv_next_string_h
17958
17959      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17960        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17961        gl_next_as_first_directive='<'string.h'>'
17962      else
17963        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17964        gl_next_as_first_directive=$gl_cv_next_string_h
17965      fi
17966      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17977 printf %s "checking for struct timespec in <time.h>... " >&6; }
17978 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
17979 then :
17980   printf %s "(cached) " >&6
17981 else
17982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17983 /* end confdefs.h.  */
17984 #include <time.h>
17985
17986 int
17987 main (void)
17988 {
17989 static struct timespec x; x.tv_sec = x.tv_nsec;
17990   ;
17991   return 0;
17992 }
17993 _ACEOF
17994 if ac_fn_c_try_compile "$LINENO"
17995 then :
17996   gl_cv_sys_struct_timespec_in_time_h=yes
17997 else
17998   gl_cv_sys_struct_timespec_in_time_h=no
17999 fi
18000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18001 fi
18002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
18003 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
18004
18005   TIME_H_DEFINES_STRUCT_TIMESPEC=0
18006   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18007   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18008   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
18009   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
18010     TIME_H_DEFINES_STRUCT_TIMESPEC=1
18011   else
18012     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18013 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
18014 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
18015 then :
18016   printf %s "(cached) " >&6
18017 else
18018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18019 /* end confdefs.h.  */
18020 #include <sys/time.h>
18021
18022 int
18023 main (void)
18024 {
18025 static struct timespec x; x.tv_sec = x.tv_nsec;
18026   ;
18027   return 0;
18028 }
18029 _ACEOF
18030 if ac_fn_c_try_compile "$LINENO"
18031 then :
18032   gl_cv_sys_struct_timespec_in_sys_time_h=yes
18033 else
18034   gl_cv_sys_struct_timespec_in_sys_time_h=no
18035 fi
18036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18037 fi
18038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
18039 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18040     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
18041       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18042     else
18043       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18044 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
18045 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
18046 then :
18047   printf %s "(cached) " >&6
18048 else
18049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h.  */
18051 #include <pthread.h>
18052
18053 int
18054 main (void)
18055 {
18056 static struct timespec x; x.tv_sec = x.tv_nsec;
18057   ;
18058   return 0;
18059 }
18060 _ACEOF
18061 if ac_fn_c_try_compile "$LINENO"
18062 then :
18063   gl_cv_sys_struct_timespec_in_pthread_h=yes
18064 else
18065   gl_cv_sys_struct_timespec_in_pthread_h=no
18066 fi
18067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18068 fi
18069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
18070 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
18071       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
18072         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18073       else
18074         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
18075 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
18076 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
18077 then :
18078   printf %s "(cached) " >&6
18079 else
18080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18081 /* end confdefs.h.  */
18082 #include <unistd.h>
18083
18084 int
18085 main (void)
18086 {
18087 static struct timespec x; x.tv_sec = x.tv_nsec;
18088   ;
18089   return 0;
18090 }
18091 _ACEOF
18092 if ac_fn_c_try_compile "$LINENO"
18093 then :
18094   gl_cv_sys_struct_timespec_in_unistd_h=yes
18095 else
18096   gl_cv_sys_struct_timespec_in_unistd_h=no
18097 fi
18098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18099 fi
18100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
18101 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
18102         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
18103           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
18104         fi
18105       fi
18106     fi
18107   fi
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124      if test $gl_cv_have_include_next = yes; then
18125        gl_cv_next_time_h='<'time.h'>'
18126      else
18127        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
18128 printf %s "checking absolute name of <time.h>... " >&6; }
18129 if test ${gl_cv_next_time_h+y}
18130 then :
18131   printf %s "(cached) " >&6
18132 else
18133
18134
18135
18136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18137 /* end confdefs.h.  */
18138 #include <time.h>
18139 _ACEOF
18140                 case "$host_os" in
18141     aix*) gl_absname_cpp="$ac_cpp -C" ;;
18142     *)    gl_absname_cpp="$ac_cpp" ;;
18143   esac
18144
18145   case "$host_os" in
18146     mingw*)
18147                                           gl_dirsep_regex='[/\\]'
18148       ;;
18149     *)
18150       gl_dirsep_regex='\/'
18151       ;;
18152   esac
18153       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18154   gl_header_literal_regex=`echo 'time.h' \
18155                            | sed -e "$gl_make_literal_regex_sed"`
18156   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18157       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18158       s|^/[^/]|//&|
18159       p
18160       q
18161     }'
18162
18163         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18164   sed -n "$gl_absolute_header_sed"`
18165
18166            gl_header=$gl_cv_absolute_time_h
18167            gl_cv_next_time_h='"'$gl_header'"'
18168
18169
18170 fi
18171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18172 printf "%s\n" "$gl_cv_next_time_h" >&6; }
18173      fi
18174      NEXT_TIME_H=$gl_cv_next_time_h
18175
18176      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18177        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18178        gl_next_as_first_directive='<'time.h'>'
18179      else
18180        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18181        gl_next_as_first_directive=$gl_cv_next_time_h
18182      fi
18183      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193   GNULIB_UTIME=0;
18194     HAVE_UTIME=1;
18195   REPLACE_UTIME=0;
18196
18197
18198
18199
18200      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
18201 printf %s "checking whether the utimes function works... " >&6; }
18202 if test ${gl_cv_func_working_utimes+y}
18203 then :
18204   printf %s "(cached) " >&6
18205 else
18206   if test "$cross_compiling" = yes
18207 then :
18208   case "$host_os" in
18209                   # Guess no on native Windows.
18210           mingw*) gl_cv_func_working_utimes="guessing no" ;;
18211           *)      gl_cv_func_working_utimes="guessing no" ;;
18212         esac
18213
18214 else
18215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18216 /* end confdefs.h.  */
18217
18218 #include <sys/types.h>
18219 #include <sys/stat.h>
18220 #include <fcntl.h>
18221 #include <sys/time.h>
18222 #include <time.h>
18223 #include <unistd.h>
18224 #include <stdlib.h>
18225 #include <stdio.h>
18226 #include <utime.h>
18227 #include <errno.h>
18228
18229 static int
18230 inorder (time_t a, time_t b, time_t c)
18231 {
18232   return a <= b && b <= c;
18233 }
18234
18235 int
18236 main ()
18237 {
18238   int result = 0;
18239   char const *file = "conftest.utimes";
18240   /* On OS/2, file timestamps must be on or after 1980 in local time,
18241      with an even number of seconds.  */
18242   static struct timeval timeval[2] = {{315620000 + 10, 10},
18243                                       {315620000 + 1000000, 999998}};
18244
18245   /* Test whether utimes() essentially works.  */
18246   {
18247     struct stat sbuf;
18248     FILE *f = fopen (file, "w");
18249     if (f == NULL)
18250       result |= 1;
18251     else if (fclose (f) != 0)
18252       result |= 1;
18253     else if (utimes (file, timeval) != 0)
18254       result |= 2;
18255     else if (lstat (file, &sbuf) != 0)
18256       result |= 1;
18257     else if (!(sbuf.st_atime == timeval[0].tv_sec
18258                && sbuf.st_mtime == timeval[1].tv_sec))
18259       result |= 4;
18260     if (unlink (file) != 0)
18261       result |= 1;
18262   }
18263
18264   /* Test whether utimes() with a NULL argument sets the file's timestamp
18265      to the current time.  Use 'fstat' as well as 'time' to
18266      determine the "current" time, to accommodate NFS file systems
18267      if there is a time skew between the host and the NFS server.  */
18268   {
18269     int fd = open (file, O_WRONLY|O_CREAT, 0644);
18270     if (fd < 0)
18271       result |= 1;
18272     else
18273       {
18274         time_t t0, t2;
18275         struct stat st0, st1, st2;
18276         if (time (&t0) == (time_t) -1)
18277           result |= 1;
18278         else if (fstat (fd, &st0) != 0)
18279           result |= 1;
18280         else if (utimes (file, timeval) != 0
18281                  && (errno != EACCES
18282                      /* OS/2 kLIBC utimes fails on opened files.  */
18283                      || close (fd) != 0
18284                      || utimes (file, timeval) != 0
18285                      || (fd = open (file, O_WRONLY)) < 0))
18286           result |= 2;
18287         else if (utimes (file, NULL) != 0
18288                  && (errno != EACCES
18289                      /* OS/2 kLIBC utimes fails on opened files.  */
18290                      || close (fd) != 0
18291                      || utimes (file, NULL) != 0
18292                      || (fd = open (file, O_WRONLY)) < 0))
18293           result |= 8;
18294         else if (fstat (fd, &st1) != 0)
18295           result |= 1;
18296         else if (write (fd, "\n", 1) != 1)
18297           result |= 1;
18298         else if (fstat (fd, &st2) != 0)
18299           result |= 1;
18300         else if (time (&t2) == (time_t) -1)
18301           result |= 1;
18302         else
18303           {
18304             int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
18305             int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
18306             if (! (st1.st_atime == st1.st_mtime))
18307               result |= 16;
18308             if (! (m_ok_POSIX || m_ok_NFS))
18309               result |= 32;
18310           }
18311         if (close (fd) != 0)
18312           result |= 1;
18313       }
18314     if (unlink (file) != 0)
18315       result |= 1;
18316   }
18317
18318   /* Test whether utimes() with a NULL argument works on read-only files.  */
18319   {
18320     int fd = open (file, O_WRONLY|O_CREAT, 0444);
18321     if (fd < 0)
18322       result |= 1;
18323     else if (close (fd) != 0)
18324       result |= 1;
18325     else if (utimes (file, NULL) != 0)
18326       result |= 64;
18327     if (unlink (file) != 0)
18328       result |= 1;
18329   }
18330
18331   return result;
18332 }
18333
18334 _ACEOF
18335 if ac_fn_c_try_run "$LINENO"
18336 then :
18337   gl_cv_func_working_utimes=yes
18338 else
18339   gl_cv_func_working_utimes=no
18340 fi
18341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18342   conftest.$ac_objext conftest.beam conftest.$ac_ext
18343 fi
18344
18345
18346 fi
18347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
18348 printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
18349
18350   case "$gl_cv_func_working_utimes" in
18351     *yes)
18352
18353 printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
18354
18355       ;;
18356   esac
18357
18358
18359
18360
18361
18362
18363
18364   GNULIB_BTOWC=0;
18365   GNULIB_WCTOB=0;
18366   GNULIB_MBSINIT=0;
18367   GNULIB_MBRTOWC=0;
18368   GNULIB_MBRLEN=0;
18369   GNULIB_MBSRTOWCS=0;
18370   GNULIB_MBSNRTOWCS=0;
18371   GNULIB_WCRTOMB=0;
18372   GNULIB_WCSRTOMBS=0;
18373   GNULIB_WCSNRTOMBS=0;
18374   GNULIB_WCWIDTH=0;
18375   GNULIB_WMEMCHR=0;
18376   GNULIB_WMEMCMP=0;
18377   GNULIB_WMEMCPY=0;
18378   GNULIB_WMEMMOVE=0;
18379   GNULIB_WMEMSET=0;
18380   GNULIB_WCSLEN=0;
18381   GNULIB_WCSNLEN=0;
18382   GNULIB_WCSCPY=0;
18383   GNULIB_WCPCPY=0;
18384   GNULIB_WCSNCPY=0;
18385   GNULIB_WCPNCPY=0;
18386   GNULIB_WCSCAT=0;
18387   GNULIB_WCSNCAT=0;
18388   GNULIB_WCSCMP=0;
18389   GNULIB_WCSNCMP=0;
18390   GNULIB_WCSCASECMP=0;
18391   GNULIB_WCSNCASECMP=0;
18392   GNULIB_WCSCOLL=0;
18393   GNULIB_WCSXFRM=0;
18394   GNULIB_WCSDUP=0;
18395   GNULIB_WCSCHR=0;
18396   GNULIB_WCSRCHR=0;
18397   GNULIB_WCSCSPN=0;
18398   GNULIB_WCSSPN=0;
18399   GNULIB_WCSPBRK=0;
18400   GNULIB_WCSSTR=0;
18401   GNULIB_WCSTOK=0;
18402   GNULIB_WCSWIDTH=0;
18403   GNULIB_WCSFTIME=0;
18404     HAVE_BTOWC=1;
18405   HAVE_MBSINIT=1;
18406   HAVE_MBRTOWC=1;
18407   HAVE_MBRLEN=1;
18408   HAVE_MBSRTOWCS=1;
18409   HAVE_MBSNRTOWCS=1;
18410   HAVE_WCRTOMB=1;
18411   HAVE_WCSRTOMBS=1;
18412   HAVE_WCSNRTOMBS=1;
18413   HAVE_WMEMCHR=1;
18414   HAVE_WMEMCMP=1;
18415   HAVE_WMEMCPY=1;
18416   HAVE_WMEMMOVE=1;
18417   HAVE_WMEMSET=1;
18418   HAVE_WCSLEN=1;
18419   HAVE_WCSNLEN=1;
18420   HAVE_WCSCPY=1;
18421   HAVE_WCPCPY=1;
18422   HAVE_WCSNCPY=1;
18423   HAVE_WCPNCPY=1;
18424   HAVE_WCSCAT=1;
18425   HAVE_WCSNCAT=1;
18426   HAVE_WCSCMP=1;
18427   HAVE_WCSNCMP=1;
18428   HAVE_WCSCASECMP=1;
18429   HAVE_WCSNCASECMP=1;
18430   HAVE_WCSCOLL=1;
18431   HAVE_WCSXFRM=1;
18432   HAVE_WCSDUP=1;
18433   HAVE_WCSCHR=1;
18434   HAVE_WCSRCHR=1;
18435   HAVE_WCSCSPN=1;
18436   HAVE_WCSSPN=1;
18437   HAVE_WCSPBRK=1;
18438   HAVE_WCSSTR=1;
18439   HAVE_WCSTOK=1;
18440   HAVE_WCSWIDTH=1;
18441   HAVE_WCSFTIME=1;
18442   HAVE_DECL_WCTOB=1;
18443   HAVE_DECL_WCWIDTH=1;
18444   REPLACE_MBSTATE_T=0;
18445   REPLACE_BTOWC=0;
18446   REPLACE_WCTOB=0;
18447   REPLACE_MBSINIT=0;
18448   REPLACE_MBRTOWC=0;
18449   REPLACE_MBRLEN=0;
18450   REPLACE_MBSRTOWCS=0;
18451   REPLACE_MBSNRTOWCS=0;
18452   REPLACE_WCRTOMB=0;
18453   REPLACE_WCSRTOMBS=0;
18454   REPLACE_WCSNRTOMBS=0;
18455   REPLACE_WCWIDTH=0;
18456   REPLACE_WCSWIDTH=0;
18457   REPLACE_WCSFTIME=0;
18458
18459
18460             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
18461 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
18462 if test ${gl_cv_header_wchar_h_correct_inline+y}
18463 then :
18464   printf %s "(cached) " >&6
18465 else
18466   gl_cv_header_wchar_h_correct_inline=yes
18467      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18468 /* end confdefs.h.  */
18469
18470        #define wcstod renamed_wcstod
18471 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18472    <wchar.h>.
18473    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18474    included before <wchar.h>.  */
18475 #include <stddef.h>
18476 #include <stdio.h>
18477 #include <time.h>
18478 #include <wchar.h>
18479 extern int zero (void);
18480 int main () { return zero(); }
18481
18482 _ACEOF
18483                               save_ac_compile="$ac_compile"
18484      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
18485      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18486   (eval $ac_compile) 2>&5
18487   ac_status=$?
18488   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18489   test $ac_status = 0; }; then
18490        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18491 /* end confdefs.h.  */
18492
18493          #define wcstod renamed_wcstod
18494 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18495    <wchar.h>.
18496    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18497    included before <wchar.h>.  */
18498 #include <stddef.h>
18499 #include <stdio.h>
18500 #include <time.h>
18501 #include <wchar.h>
18502 int zero (void) { return 0; }
18503
18504 _ACEOF
18505               ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
18506        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
18507   (eval $ac_compile) 2>&5
18508   ac_status=$?
18509   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18510   test $ac_status = 0; }; then
18511          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
18512            :
18513          else
18514            gl_cv_header_wchar_h_correct_inline=no
18515          fi
18516        fi
18517      fi
18518      ac_compile="$save_ac_compile"
18519      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
18520
18521 fi
18522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
18523 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
18524   if test $gl_cv_header_wchar_h_correct_inline = no; then
18525     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
18526 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
18527 C99 mode. You have four options:
18528   - Add the flag -fgnu89-inline to CC and reconfigure, or
18529   - Fix your include files, using parts of
18530     <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
18531   - Use a gcc version older than 4.3, or
18532   - Don't use the flags -std=c99 or -std=gnu99.
18533 Configuration aborted." "$LINENO" 5
18534   fi
18535
18536
18537
18538
18539   if test $ac_cv_header_crtdefs_h = yes; then
18540     HAVE_CRTDEFS_H=1
18541   else
18542     HAVE_CRTDEFS_H=0
18543   fi
18544
18545
18546
18547                               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
18548 printf %s "checking for 64-bit time_t... " >&6; }
18549 if test ${gl_cv_type_time_t_64+y}
18550 then :
18551   printf %s "(cached) " >&6
18552 else
18553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18554 /* end confdefs.h.  */
18555 #include <time.h>
18556             int verify_time_t_size[sizeof (time_t) >= 8 ? 1 : -1];
18557
18558 int
18559 main (void)
18560 {
18561
18562   ;
18563   return 0;
18564 }
18565 _ACEOF
18566 if ac_fn_c_try_compile "$LINENO"
18567 then :
18568   gl_cv_type_time_t_64=yes
18569 else
18570   gl_cv_type_time_t_64=no
18571 fi
18572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18573
18574 fi
18575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_64" >&5
18576 printf "%s\n" "$gl_cv_type_time_t_64" >&6; }
18577   if test $gl_cv_type_time_t_64 = no; then
18578     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h.  */
18580 #ifdef _USE_32BIT_TIME_T
18581              int ok;
18582            #else
18583              error fail
18584            #endif
18585
18586 _ACEOF
18587 if ac_fn_c_try_compile "$LINENO"
18588 then :
18589   { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18590 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18591 as_fn_error $? "This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.
18592 See \`config.log' for more details" "$LINENO" 5; }
18593 else
18594   # If TIME_T_32_BIT_OK is "no" (the default) and not cross-compiling
18595        # and 'touch' works with a large timestamp, then evidently 64-bit time_t
18596        # is desired and supported, so fail and ask the builder to fix the
18597        # problem.  Otherwise, just warn the builder.
18598        if test "${TIME_T_32_BIT_OK-no}" = no \
18599           && test $cross_compiling = no \
18600           && TZ=UTC0 touch -t 210602070628.16 conftest.time 2>/dev/null; then
18601          rm -f conftest.time
18602          { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18603 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18604 as_fn_error $? "This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'. To build with a 32-bit time_t anyway (not recommended), configure with 'TIME_T_32_BIT_OK=yes'.
18605 See \`config.log' for more details" "$LINENO" 5; }
18606        else
18607          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&5
18608 printf "%s\n" "$as_me: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&2;}
18609        fi
18610
18611 fi
18612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18613   fi
18614
18615
18616    if false; then
18617   GL_COND_LIBTOOL_TRUE=
18618   GL_COND_LIBTOOL_FALSE='#'
18619 else
18620   GL_COND_LIBTOOL_TRUE='#'
18621   GL_COND_LIBTOOL_FALSE=
18622 fi
18623
18624   gl_cond_libtool=false
18625   gl_libdeps=
18626   gl_ltlibdeps=
18627   gl_m4_base='m4'
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637   gl_source_base='lib'
18638
18639
18640   if test $ac_cv_func_alloca_works = no; then
18641     :
18642   fi
18643
18644   # Define an additional variable used in the Makefile substitution.
18645   if test $ac_cv_working_alloca_h = yes; then
18646     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18647 printf %s "checking for alloca as a compiler built-in... " >&6; }
18648 if test ${gl_cv_rpl_alloca+y}
18649 then :
18650   printf %s "(cached) " >&6
18651 else
18652
18653       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18654 /* end confdefs.h.  */
18655
18656 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
18657         Need own alloca
18658 #endif
18659
18660 _ACEOF
18661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18662   $EGREP "Need own alloca" >/dev/null 2>&1
18663 then :
18664   gl_cv_rpl_alloca=yes
18665 else
18666   gl_cv_rpl_alloca=no
18667 fi
18668 rm -rf conftest*
18669
18670
18671 fi
18672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18673 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
18674     if test $gl_cv_rpl_alloca = yes; then
18675
18676 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
18677
18678       ALLOCA_H=alloca.h
18679     else
18680                   ALLOCA_H=
18681     fi
18682   else
18683     ALLOCA_H=alloca.h
18684   fi
18685
18686    if test -n "$ALLOCA_H"; then
18687   GL_GENERATE_ALLOCA_H_TRUE=
18688   GL_GENERATE_ALLOCA_H_FALSE='#'
18689 else
18690   GL_GENERATE_ALLOCA_H_TRUE='#'
18691   GL_GENERATE_ALLOCA_H_FALSE=
18692 fi
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703   gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
18704
18705
18706
18707
18708        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
18709 printf %s "checking for GNU libc compatible calloc... " >&6; }
18710 if test ${ac_cv_func_calloc_0_nonnull+y}
18711 then :
18712   printf %s "(cached) " >&6
18713 else
18714   if test "$cross_compiling" = yes
18715 then :
18716   case "$host_os" in
18717                          # Guess yes on glibc systems.
18718           *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
18719                          # Guess yes on native Windows.
18720           mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
18721                          # If we don't know, assume the worst.
18722           *)             ac_cv_func_calloc_0_nonnull="guessing no" ;;
18723         esac
18724
18725 else
18726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18727 /* end confdefs.h.  */
18728 $ac_includes_default
18729 int
18730 main (void)
18731 {
18732 int result = 0;
18733             char *p = calloc (0, 0);
18734             if (!p)
18735               result |= 1;
18736             free (p);
18737             p = calloc ((size_t) -1 / 8 + 1, 8);
18738             if (p)
18739               result |= 2;
18740             free (p);
18741             return result;
18742
18743   ;
18744   return 0;
18745 }
18746 _ACEOF
18747 if ac_fn_c_try_run "$LINENO"
18748 then :
18749   ac_cv_func_calloc_0_nonnull=yes
18750 else
18751   ac_cv_func_calloc_0_nonnull=no
18752 fi
18753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18754   conftest.$ac_objext conftest.beam conftest.$ac_ext
18755 fi
18756
18757 fi
18758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
18759 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
18760   case "$ac_cv_func_calloc_0_nonnull" in
18761     *yes)
18762
18763 printf "%s\n" "#define HAVE_CALLOC_GNU 1" >>confdefs.h
18764
18765       ;;
18766     *)
18767       printf "%s\n" "#define HAVE_CALLOC_GNU 0" >>confdefs.h
18768
18769      REPLACE_CALLOC=1
18770
18771       ;;
18772   esac
18773
18774
18775   if test $REPLACE_CALLOC = 1; then
18776
18777
18778
18779
18780
18781
18782
18783
18784   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
18785
18786   fi
18787
18788
18789 printf "%s\n" "#define GNULIB_CALLOC_GNU 1" >>confdefs.h
18790
18791
18792
18793
18794
18795   if test $gl_cv_func_malloc_posix = yes; then
18796
18797 printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
18798
18799   else
18800     REPLACE_CALLOC=1
18801   fi
18802
18803   if test $REPLACE_CALLOC = 1; then
18804
18805
18806
18807
18808
18809
18810
18811
18812   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
18813
18814   fi
18815
18816
18817
18818
18819
18820           GNULIB_CALLOC_POSIX=1
18821
18822
18823
18824
18825
18826 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
18827
18828
18829
18830
18831
18832
18833
18834
18835           GNULIB_CHDIR=1
18836
18837
18838
18839
18840
18841 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18842
18843
18844
18845
18846
18847   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
18848 printf %s "checking whether this system has an arbitrary file name length limit... " >&6; }
18849 if test ${gl_cv_have_arbitrary_file_name_length_limit+y}
18850 then :
18851   printf %s "(cached) " >&6
18852 else
18853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18854 /* end confdefs.h.  */
18855
18856 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
18857 #if HAVE_UNISTD_H
18858 # include <unistd.h>
18859 #endif
18860 #include <limits.h>
18861 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18862 # include <sys/param.h>
18863 #endif
18864 #if !defined PATH_MAX && defined MAXPATHLEN
18865 # define PATH_MAX MAXPATHLEN
18866 #endif
18867 #ifdef __hpux
18868 # undef PATH_MAX
18869 # define PATH_MAX 1024
18870 #endif
18871 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18872 # undef PATH_MAX
18873 # define PATH_MAX 260
18874 #endif
18875
18876 #ifdef PATH_MAX
18877 have_arbitrary_file_name_length_limit
18878 #endif
18879 _ACEOF
18880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18881   $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
18882 then :
18883   gl_cv_have_arbitrary_file_name_length_limit=yes
18884 else
18885   gl_cv_have_arbitrary_file_name_length_limit=no
18886 fi
18887 rm -rf conftest*
18888
18889 fi
18890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
18891 printf "%s\n" "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
18892
18893   if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
18894
18895
18896
18897
18898
18899
18900
18901
18902   gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
18903
18904     :
18905   fi
18906
18907
18908
18909   # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18910   # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18911
18912   # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
18913   # programs in the package would end up linked with that potentially-shared
18914   # library, inducing unnecessary run-time overhead.
18915   LIB_CLOCK_GETTIME=
18916
18917   gl_saved_libs=$LIBS
18918     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18919 printf %s "checking for library containing clock_gettime... " >&6; }
18920 if test ${ac_cv_search_clock_gettime+y}
18921 then :
18922   printf %s "(cached) " >&6
18923 else
18924   ac_func_search_save_LIBS=$LIBS
18925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18926 /* end confdefs.h.  */
18927
18928 /* Override any GCC internal prototype to avoid an error.
18929    Use char because int might match the return type of a GCC
18930    builtin and then its argument prototype would still apply.  */
18931 #ifdef __cplusplus
18932 extern "C"
18933 #endif
18934 char clock_gettime ();
18935 int
18936 main (void)
18937 {
18938 return clock_gettime ();
18939   ;
18940   return 0;
18941 }
18942 _ACEOF
18943 for ac_lib in '' rt posix4
18944 do
18945   if test -z "$ac_lib"; then
18946     ac_res="none required"
18947   else
18948     ac_res=-l$ac_lib
18949     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18950   fi
18951   if ac_fn_c_try_link "$LINENO"
18952 then :
18953   ac_cv_search_clock_gettime=$ac_res
18954 fi
18955 rm -f core conftest.err conftest.$ac_objext \
18956     conftest$ac_exeext
18957   if test ${ac_cv_search_clock_gettime+y}
18958 then :
18959   break
18960 fi
18961 done
18962 if test ${ac_cv_search_clock_gettime+y}
18963 then :
18964
18965 else
18966   ac_cv_search_clock_gettime=no
18967 fi
18968 rm conftest.$ac_ext
18969 LIBS=$ac_func_search_save_LIBS
18970 fi
18971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18972 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
18973 ac_res=$ac_cv_search_clock_gettime
18974 if test "$ac_res" != no
18975 then :
18976   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18977   test "$ac_cv_search_clock_gettime" = "none required" ||
18978                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18979 fi
18980
18981     ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
18982 if test "x$ac_cv_func_clock_gettime" = xyes
18983 then :
18984   printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
18985
18986 fi
18987 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
18988 if test "x$ac_cv_func_clock_settime" = xyes
18989 then :
18990   printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
18991
18992 fi
18993
18994   LIBS=$gl_saved_libs
18995
18996
18997
18998 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18999
19000
19001
19002
19003
19004
19005     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19006       REPLACE_CLOSE=1
19007     fi
19008
19009
19010
19011
19012
19013
19014   if test $ac_cv_header_sys_socket_h != yes; then
19015                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19016 if test "x$ac_cv_header_winsock2_h" = xyes
19017 then :
19018   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19019
19020 fi
19021
19022   fi
19023   if test "$ac_cv_header_winsock2_h" = yes; then
19024     HAVE_WINSOCK2_H=1
19025     UNISTD_H_HAVE_WINSOCK2_H=1
19026     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19027   else
19028     HAVE_WINSOCK2_H=0
19029   fi
19030
19031
19032     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19033                         REPLACE_CLOSE=1
19034     fi
19035
19036
19037     if test $REPLACE_CLOSE = 0; then
19038
19039
19040
19041   if test $ac_cv_func_fchdir = no; then
19042     HAVE_FCHDIR=0
19043   fi
19044
19045       if test $HAVE_FCHDIR = 0; then
19046         REPLACE_CLOSE=1
19047       fi
19048     fi
19049
19050
19051   if test $REPLACE_CLOSE = 1; then
19052
19053
19054
19055
19056
19057
19058
19059
19060   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19061
19062   fi
19063
19064
19065
19066
19067
19068           GNULIB_CLOSE=1
19069
19070
19071
19072
19073
19074 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
19075
19076
19077
19078
19079
19080
19081   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
19082 if test "x$ac_cv_func_closedir" = xyes
19083 then :
19084   printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
19085
19086 fi
19087
19088   if test $ac_cv_func_closedir = no; then
19089     HAVE_CLOSEDIR=0
19090   fi
19091
19092
19093
19094
19095   if test $ac_cv_func_fchdir = no; then
19096     HAVE_FCHDIR=0
19097   fi
19098
19099     if test $HAVE_FCHDIR = 0; then
19100       if test $HAVE_CLOSEDIR = 1; then
19101         REPLACE_CLOSEDIR=1
19102       fi
19103     fi
19104
19105     case $host_os,$HAVE_CLOSEDIR in
19106     os2*,1)
19107       REPLACE_CLOSEDIR=1;;
19108   esac
19109
19110   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
19111
19112
19113
19114
19115
19116
19117
19118
19119   gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
19120
19121   fi
19122
19123
19124
19125
19126
19127           GNULIB_CLOSEDIR=1
19128
19129
19130
19131
19132
19133 printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149      if test $gl_cv_have_include_next = yes; then
19150        gl_cv_next_dirent_h='<'dirent.h'>'
19151      else
19152        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
19153 printf %s "checking absolute name of <dirent.h>... " >&6; }
19154 if test ${gl_cv_next_dirent_h+y}
19155 then :
19156   printf %s "(cached) " >&6
19157 else
19158
19159              if test $ac_cv_header_dirent_h = yes; then
19160
19161
19162
19163
19164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165 /* end confdefs.h.  */
19166 #include <dirent.h>
19167 _ACEOF
19168                 case "$host_os" in
19169     aix*) gl_absname_cpp="$ac_cpp -C" ;;
19170     *)    gl_absname_cpp="$ac_cpp" ;;
19171   esac
19172
19173   case "$host_os" in
19174     mingw*)
19175                                           gl_dirsep_regex='[/\\]'
19176       ;;
19177     *)
19178       gl_dirsep_regex='\/'
19179       ;;
19180   esac
19181       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19182   gl_header_literal_regex=`echo 'dirent.h' \
19183                            | sed -e "$gl_make_literal_regex_sed"`
19184   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19185       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19186       s|^/[^/]|//&|
19187       p
19188       q
19189     }'
19190
19191         gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19192   sed -n "$gl_absolute_header_sed"`
19193
19194            gl_header=$gl_cv_absolute_dirent_h
19195            gl_cv_next_dirent_h='"'$gl_header'"'
19196           else
19197                gl_cv_next_dirent_h='<'dirent.h'>'
19198              fi
19199
19200
19201 fi
19202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
19203 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
19204      fi
19205      NEXT_DIRENT_H=$gl_cv_next_dirent_h
19206
19207      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19208        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19209        gl_next_as_first_directive='<'dirent.h'>'
19210      else
19211        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19212        gl_next_as_first_directive=$gl_cv_next_dirent_h
19213      fi
19214      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
19215
19216
19217
19218
19219   if test $ac_cv_header_dirent_h = yes; then
19220     HAVE_DIRENT_H=1
19221   else
19222     HAVE_DIRENT_H=0
19223   fi
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233 printf "%s\n" "#define GNULIB_DIRENT_SAFER 1" >>confdefs.h
19234
19235
19236
19237
19238
19239
19240
19241   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
19242 if test "x$ac_cv_func_dirfd" = xyes
19243 then :
19244   printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
19245
19246 fi
19247
19248   ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
19249       #include <dirent.h>
19250 "
19251 if test "x$ac_cv_have_decl_dirfd" = xyes
19252 then :
19253   ac_have_decl=1
19254 else
19255   ac_have_decl=0
19256 fi
19257
19258 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
19259
19260   if test $ac_cv_have_decl_dirfd = no; then
19261     HAVE_DECL_DIRFD=0
19262   fi
19263
19264   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
19265 printf %s "checking whether dirfd is a macro... " >&6; }
19266 if test ${gl_cv_func_dirfd_macro+y}
19267 then :
19268   printf %s "(cached) " >&6
19269 else
19270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19271 /* end confdefs.h.  */
19272
19273 #include <sys/types.h>
19274 #include <dirent.h>
19275 #ifdef dirfd
19276  dirent_header_defines_dirfd
19277 #endif
19278 _ACEOF
19279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19280   $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
19281 then :
19282   gl_cv_func_dirfd_macro=yes
19283 else
19284   gl_cv_func_dirfd_macro=no
19285 fi
19286 rm -rf conftest*
19287
19288 fi
19289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
19290 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
19291
19292   # Use the replacement if we have no function or macro with that name,
19293   # or if OS/2 kLIBC whose dirfd() does not work.
19294   # Replace only if the system declares dirfd already.
19295   case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
19296     no,no,*,yes | *,*,os2*,yes)
19297       REPLACE_DIRFD=1
19298
19299 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
19300 ;;
19301   esac
19302
19303   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
19304      || test $REPLACE_DIRFD = 1; then
19305
19306
19307
19308
19309
19310
19311
19312
19313   gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
19314
19315
19316   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
19317 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
19318 if test ${gl_cv_sys_dir_fd_member_name+y}
19319 then :
19320   printf %s "(cached) " >&6
19321 else
19322
19323       dirfd_save_CFLAGS=$CFLAGS
19324       for ac_expr in d_fd dd_fd; do
19325
19326         CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
19327         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19328 /* end confdefs.h.  */
19329
19330            #include <sys/types.h>
19331            #include <dirent.h>
19332 int
19333 main (void)
19334 {
19335 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
19336   ;
19337   return 0;
19338 }
19339 _ACEOF
19340 if ac_fn_c_try_compile "$LINENO"
19341 then :
19342   dir_fd_found=yes
19343
19344 fi
19345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19346         CFLAGS=$dirfd_save_CFLAGS
19347         test "$dir_fd_found" = yes && break
19348       done
19349       test "$dir_fd_found" = yes || ac_expr=no_such_member
19350
19351       gl_cv_sys_dir_fd_member_name=$ac_expr
19352
19353
19354 fi
19355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
19356 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
19357   if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
19358
19359 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
19360
19361   fi
19362
19363
19364   fi
19365
19366
19367
19368
19369
19370           GNULIB_DIRFD=1
19371
19372
19373
19374
19375
19376 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
19387 printf %s "checking whether // is distinct from /... " >&6; }
19388 if test ${gl_cv_double_slash_root+y}
19389 then :
19390   printf %s "(cached) " >&6
19391 else
19392    if test x"$cross_compiling" = xyes ; then
19393         # When cross-compiling, there is no way to tell whether // is special
19394         # short of a list of hosts.  However, the only known hosts to date
19395         # that have a distinct // are Apollo DomainOS (too old to port to),
19396         # Cygwin, and z/OS.  If anyone knows of another system for which // has
19397         # special semantics and is distinct from /, please report it to
19398         # <bug-gnulib@gnu.org>.
19399         case $host in
19400           *-cygwin | i370-ibm-openedition)
19401             gl_cv_double_slash_root=yes ;;
19402           *)
19403             # Be optimistic and assume that / and // are the same when we
19404             # don't know.
19405             gl_cv_double_slash_root='unknown, assuming no' ;;
19406         esac
19407       else
19408         set x `ls -di / // 2>/dev/null`
19409         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
19410           gl_cv_double_slash_root=no
19411         else
19412           gl_cv_double_slash_root=yes
19413         fi
19414       fi
19415 fi
19416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
19417 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
19418   if test "$gl_cv_double_slash_root" = yes; then
19419
19420 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
19421
19422   fi
19423
19424
19425
19426
19427
19428     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19429       REPLACE_DUP=1
19430     fi
19431
19432
19433
19434
19435
19436   if test $ac_cv_func_fchdir = no; then
19437     HAVE_FCHDIR=0
19438   fi
19439
19440     if test $HAVE_FCHDIR = 0; then
19441       REPLACE_DUP=1
19442     fi
19443
19444   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
19445 printf %s "checking whether dup works... " >&6; }
19446 if test ${gl_cv_func_dup_works+y}
19447 then :
19448   printf %s "(cached) " >&6
19449 else
19450   if test "$cross_compiling" = yes
19451 then :
19452   case "$host_os" in
19453                  # Guess no on native Windows.
19454          mingw*) gl_cv_func_dup_works="guessing no" ;;
19455          *)      gl_cv_func_dup_works="guessing yes" ;;
19456        esac
19457
19458 else
19459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19460 /* end confdefs.h.  */
19461 #include <unistd.h>
19462                          #include <fcntl.h>
19463                          #include <errno.h>
19464 int
19465 main (void)
19466 {
19467 /* On OS/2 kLIBC, dup does not work on a directory fd.  */
19468            int fd = open (".", O_RDONLY);
19469            return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19470
19471   ;
19472   return 0;
19473 }
19474
19475 _ACEOF
19476 if ac_fn_c_try_run "$LINENO"
19477 then :
19478   gl_cv_func_dup_works=yes
19479 else
19480   gl_cv_func_dup_works=no
19481 fi
19482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19483   conftest.$ac_objext conftest.beam conftest.$ac_ext
19484 fi
19485
19486
19487 fi
19488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19489 printf "%s\n" "$gl_cv_func_dup_works" >&6; }
19490   case "$gl_cv_func_dup_works" in
19491     *yes) ;;
19492     *)
19493       REPLACE_DUP=1
19494       ;;
19495   esac
19496
19497   if test $REPLACE_DUP = 1; then
19498
19499
19500
19501
19502
19503
19504
19505
19506   gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19507
19508     :
19509   fi
19510
19511
19512
19513
19514
19515           GNULIB_DUP=1
19516
19517
19518
19519
19520
19521 printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
19522
19523
19524
19525
19526
19527
19528
19529
19530 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
19531
19532
19533   if test $HAVE_DUP2 = 1; then
19534     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19535 printf %s "checking whether dup2 works... " >&6; }
19536 if test ${gl_cv_func_dup2_works+y}
19537 then :
19538   printf %s "(cached) " >&6
19539 else
19540   if test "$cross_compiling" = yes
19541 then :
19542   case "$host_os" in
19543            mingw*) # on this platform, dup2 always returns 0 for success
19544              gl_cv_func_dup2_works="guessing no" ;;
19545            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19546              gl_cv_func_dup2_works="guessing no" ;;
19547            aix* | freebsd*)
19548                    # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19549                    # not EBADF.
19550              gl_cv_func_dup2_works="guessing no" ;;
19551            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19552              gl_cv_func_dup2_works="guessing no" ;;
19553            *-android*) # implemented using dup3(), which fails if oldfd == newfd
19554              gl_cv_func_dup2_works="guessing no" ;;
19555            os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19556              gl_cv_func_dup2_works="guessing no" ;;
19557            *) gl_cv_func_dup2_works="guessing yes" ;;
19558          esac
19559 else
19560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19561 /* end confdefs.h.  */
19562
19563          #include <errno.h>
19564              #include <fcntl.h>
19565              #include <limits.h>
19566              #include <sys/resource.h>
19567              #include <unistd.h>
19568              #ifndef RLIM_SAVED_CUR
19569              # define RLIM_SAVED_CUR RLIM_INFINITY
19570              #endif
19571              #ifndef RLIM_SAVED_MAX
19572              # define RLIM_SAVED_MAX RLIM_INFINITY
19573              #endif
19574
19575 int
19576 main (void)
19577 {
19578 int result = 0;
19579              int bad_fd = INT_MAX;
19580              struct rlimit rlim;
19581              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19582                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19583                  && rlim.rlim_cur != RLIM_INFINITY
19584                  && rlim.rlim_cur != RLIM_SAVED_MAX
19585                  && rlim.rlim_cur != RLIM_SAVED_CUR)
19586                bad_fd = rlim.rlim_cur;
19587              #ifdef FD_CLOEXEC
19588                if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19589                  result |= 1;
19590              #endif
19591              if (dup2 (1, 1) != 1)
19592                result |= 2;
19593              #ifdef FD_CLOEXEC
19594                if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19595                  result |= 4;
19596              #endif
19597              close (0);
19598              if (dup2 (0, 0) != -1)
19599                result |= 8;
19600              /* Many gnulib modules require POSIX conformance of EBADF.  */
19601              if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19602                result |= 16;
19603              /* Flush out some cygwin core dumps.  */
19604              if (dup2 (2, -1) != -1 || errno != EBADF)
19605                result |= 32;
19606              dup2 (2, 255);
19607              dup2 (2, 256);
19608              /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
19609              {
19610                int fd = open (".", O_RDONLY);
19611                if (fd == -1)
19612                  result |= 64;
19613                else if (dup2 (fd, fd + 1) == -1)
19614                  result |= 128;
19615
19616                close (fd);
19617              }
19618              return result;
19619   ;
19620   return 0;
19621 }
19622
19623 _ACEOF
19624 if ac_fn_c_try_run "$LINENO"
19625 then :
19626   gl_cv_func_dup2_works=yes
19627 else
19628   gl_cv_func_dup2_works=no
19629 fi
19630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19631   conftest.$ac_objext conftest.beam conftest.$ac_ext
19632 fi
19633
19634
19635 fi
19636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19637 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
19638     case "$gl_cv_func_dup2_works" in
19639       *yes) ;;
19640       *)
19641         REPLACE_DUP2=1
19642         ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19643 if test "x$ac_cv_func_setdtablesize" = xyes
19644 then :
19645   printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
19646
19647 fi
19648
19649         ;;
19650     esac
19651   fi
19652
19653
19654
19655
19656   if test $ac_cv_func_fchdir = no; then
19657     HAVE_FCHDIR=0
19658   fi
19659
19660     if test $HAVE_FCHDIR = 0; then
19661       if test $HAVE_DUP2 = 1; then
19662         REPLACE_DUP2=1
19663       fi
19664     fi
19665
19666
19667   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
19668
19669
19670
19671
19672
19673
19674
19675
19676   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19677
19678
19679   fi
19680
19681
19682
19683
19684
19685           GNULIB_DUP2=1
19686
19687
19688
19689
19690
19691 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19692
19693
19694
19695
19696
19697       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19698 printf %s "checking for error_at_line... " >&6; }
19699 if test ${ac_cv_lib_error_at_line+y}
19700 then :
19701   printf %s "(cached) " >&6
19702 else
19703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19704 /* end confdefs.h.  */
19705 #include <error.h>
19706 int
19707 main (void)
19708 {
19709 error_at_line (0, 0, "", 0, "an error occurred");
19710   ;
19711   return 0;
19712 }
19713 _ACEOF
19714 if ac_fn_c_try_link "$LINENO"
19715 then :
19716   ac_cv_lib_error_at_line=yes
19717 else
19718   ac_cv_lib_error_at_line=no
19719 fi
19720 rm -f core conftest.err conftest.$ac_objext \
19721     conftest$ac_exeext conftest.$ac_ext
19722 fi
19723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19724 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
19725
19726   if test $ac_cv_lib_error_at_line = no; then
19727
19728
19729
19730
19731
19732
19733
19734
19735   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19736
19737
19738
19739   :
19740
19741   fi
19742
19743
19744   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
19745
19746
19747
19748   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
19749
19750
19751
19752
19753
19754
19755
19756   if test $ac_cv_have_decl_fchdir = no; then
19757     HAVE_DECL_FCHDIR=0
19758   fi
19759
19760
19761   if test $HAVE_FCHDIR = 0; then
19762
19763
19764
19765
19766
19767
19768
19769
19770   gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19771
19772     :
19773
19774 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
19775
19776                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19777 printf %s "checking whether open can visit directories... " >&6; }
19778 if test ${gl_cv_func_open_directory_works+y}
19779 then :
19780   printf %s "(cached) " >&6
19781 else
19782   if test "$cross_compiling" = yes
19783 then :
19784   case "$host_os" in
19785                           # Guess yes on glibc systems.
19786            *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
19787                           # Guess no on native Windows.
19788            mingw*)        gl_cv_func_open_directory_works="guessing no" ;;
19789                           # If we don't know, assume the worst.
19790            *)             gl_cv_func_open_directory_works="guessing no" ;;
19791          esac
19792
19793 else
19794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19795 /* end confdefs.h.  */
19796 #include <fcntl.h>
19797
19798 int
19799 main (void)
19800 {
19801 return open(".", O_RDONLY) < 0;
19802   ;
19803   return 0;
19804 }
19805 _ACEOF
19806 if ac_fn_c_try_run "$LINENO"
19807 then :
19808   gl_cv_func_open_directory_works=yes
19809 else
19810   gl_cv_func_open_directory_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 fi
19817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19818 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
19819     case "$gl_cv_func_open_directory_works" in
19820       *yes) ;;
19821       *)
19822
19823 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19824
19825         ;;
19826     esac
19827   fi
19828
19829
19830
19831
19832
19833
19834           GNULIB_FCHDIR=1
19835
19836
19837
19838
19839
19840 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
19851 printf %s "checking whether fflush works on input streams... " >&6; }
19852 if test ${gl_cv_func_fflush_stdin+y}
19853 then :
19854   printf %s "(cached) " >&6
19855 else
19856   echo hello world > conftest.txt
19857      if test "$cross_compiling" = yes
19858 then :
19859   case "$host_os" in
19860                   # Guess no on native Windows.
19861           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
19862           *)      gl_cv_func_fflush_stdin=cross ;;
19863         esac
19864
19865 else
19866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19867 /* end confdefs.h.  */
19868
19869 #include <stdio.h>
19870 #if HAVE_UNISTD_H
19871 # include <unistd.h>
19872 #else /* on Windows with MSVC */
19873 # include <io.h>
19874 #endif
19875
19876 int
19877 main (void)
19878 {
19879 FILE *f = fopen ("conftest.txt", "r");
19880          char buffer[10];
19881          int fd;
19882          int c;
19883          if (f == NULL)
19884            return 1;
19885          fd = fileno (f);
19886          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
19887            { fclose (f); return 2; }
19888          /* For deterministic results, ensure f read a bigger buffer.  */
19889          if (lseek (fd, 0, SEEK_CUR) == 5)
19890            { fclose (f); return 3; }
19891          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
19892             on BSD systems and on mingw.  */
19893          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
19894            { fclose (f); return 4; }
19895          if (lseek (fd, 0, SEEK_CUR) != 5)
19896            { fclose (f); return 5; }
19897          /* Verify behaviour of fflush after ungetc. See
19898             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
19899          /* Verify behaviour of fflush after a backup ungetc.  This fails on
19900             mingw.  */
19901          c = fgetc (f);
19902          ungetc (c, f);
19903          fflush (f);
19904          if (fgetc (f) != c)
19905            { fclose (f); return 6; }
19906          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
19907             on glibc 2.8 and on BSD systems.  */
19908          c = fgetc (f);
19909          ungetc ('@', f);
19910          fflush (f);
19911          if (fgetc (f) != c)
19912            { fclose (f); return 7; }
19913          fclose (f);
19914          return 0;
19915
19916   ;
19917   return 0;
19918 }
19919 _ACEOF
19920 if ac_fn_c_try_run "$LINENO"
19921 then :
19922   gl_cv_func_fflush_stdin=yes
19923 else
19924   gl_cv_func_fflush_stdin=no
19925 fi
19926 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19927   conftest.$ac_objext conftest.beam conftest.$ac_ext
19928 fi
19929
19930      rm conftest.txt
19931
19932 fi
19933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
19934 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
19935   case "$gl_cv_func_fflush_stdin" in
19936     *yes) gl_func_fflush_stdin=1 ;;
19937     *no)  gl_func_fflush_stdin=0 ;;
19938     *)    gl_func_fflush_stdin='(-1)' ;;
19939   esac
19940
19941 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
19942
19943
19944   case "$gl_cv_func_fflush_stdin" in
19945     *yes) ;;
19946     *) REPLACE_FCLOSE=1 ;;
19947   esac
19948
19949
19950   if test $REPLACE_CLOSE = 1; then
19951     REPLACE_FCLOSE=1
19952   fi
19953
19954   case "$host_os" in
19955     openedition) REPLACE_FCLOSE=1 ;;
19956   esac
19957
19958   if test $REPLACE_FCLOSE = 1; then
19959
19960
19961
19962
19963
19964
19965
19966
19967   gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
19968
19969   fi
19970
19971
19972
19973
19974
19975           GNULIB_FCLOSE=1
19976
19977
19978
19979
19980
19981 printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
19982
19983
19984
19985
19986
19987
19988
19989
19990   if test $ac_cv_func_fcntl = no; then
19991
19992
19993
19994   if test $ac_cv_func_fcntl = no; then
19995     HAVE_FCNTL=0
19996   else
19997     REPLACE_FCNTL=1
19998   fi
19999
20000   else
20001             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
20002 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
20003 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
20004 then :
20005   printf %s "(cached) " >&6
20006 else
20007   if test "$cross_compiling" = yes
20008 then :
20009   case $host_os in
20010             aix* | cygwin* | haiku*)
20011                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
20012             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
20013           esac
20014 else
20015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20016 /* end confdefs.h.  */
20017 #include <errno.h>
20018               #include <fcntl.h>
20019               #include <limits.h>
20020               #include <sys/resource.h>
20021               #include <unistd.h>
20022               #ifndef RLIM_SAVED_CUR
20023               # define RLIM_SAVED_CUR RLIM_INFINITY
20024               #endif
20025               #ifndef RLIM_SAVED_MAX
20026               # define RLIM_SAVED_MAX RLIM_INFINITY
20027               #endif
20028
20029 int
20030 main (void)
20031 {
20032 int result = 0;
20033               int bad_fd = INT_MAX;
20034               struct rlimit rlim;
20035               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20036                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20037                   && rlim.rlim_cur != RLIM_INFINITY
20038                   && rlim.rlim_cur != RLIM_SAVED_MAX
20039                   && rlim.rlim_cur != RLIM_SAVED_CUR)
20040                 bad_fd = rlim.rlim_cur;
20041               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
20042               if (errno != EINVAL) result |= 2;
20043               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
20044               if (errno != EINVAL) result |= 8;
20045               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
20046               {
20047                 int fd;
20048                 fd = open (".", O_RDONLY);
20049                 if (fd == -1)
20050                   result |= 16;
20051                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
20052                   result |= 32;
20053
20054                 close (fd);
20055               }
20056               return result;
20057   ;
20058   return 0;
20059 }
20060 _ACEOF
20061 if ac_fn_c_try_run "$LINENO"
20062 then :
20063   gl_cv_func_fcntl_f_dupfd_works=yes
20064 else
20065   gl_cv_func_fcntl_f_dupfd_works=no
20066 fi
20067 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20068   conftest.$ac_objext conftest.beam conftest.$ac_ext
20069 fi
20070
20071 fi
20072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
20073 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
20074     case $gl_cv_func_fcntl_f_dupfd_works in
20075       *yes) ;;
20076       *)
20077
20078
20079   if test $ac_cv_func_fcntl = no; then
20080     HAVE_FCNTL=0
20081   else
20082     REPLACE_FCNTL=1
20083   fi
20084
20085
20086 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20087  ;;
20088     esac
20089
20090         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20091 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20092 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
20093 then :
20094   printf %s "(cached) " >&6
20095 else
20096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20097 /* end confdefs.h.  */
20098
20099 #include <fcntl.h>
20100 #ifndef F_DUPFD_CLOEXEC
20101 choke me
20102 #endif
20103
20104 int
20105 main (void)
20106 {
20107
20108   ;
20109   return 0;
20110 }
20111 _ACEOF
20112 if ac_fn_c_try_compile "$LINENO"
20113 then :
20114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20115 /* end confdefs.h.  */
20116
20117 #ifdef __linux__
20118 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20119    it to support the semantics on older kernels that failed with EINVAL.  */
20120 choke me
20121 #endif
20122
20123 int
20124 main (void)
20125 {
20126
20127   ;
20128   return 0;
20129 }
20130 _ACEOF
20131 if ac_fn_c_try_compile "$LINENO"
20132 then :
20133   gl_cv_func_fcntl_f_dupfd_cloexec=yes
20134 else
20135   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20136 fi
20137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20138 else
20139   gl_cv_func_fcntl_f_dupfd_cloexec=no
20140 fi
20141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20142 fi
20143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20144 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20145     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
20146
20147
20148
20149   if test $ac_cv_func_fcntl = no; then
20150     HAVE_FCNTL=0
20151   else
20152     REPLACE_FCNTL=1
20153   fi
20154
20155           fi
20156   fi
20157
20158
20159
20160
20161   if test $ac_cv_func_fchdir = no; then
20162     HAVE_FCHDIR=0
20163   fi
20164
20165     if test $HAVE_FCHDIR = 0; then
20166
20167
20168
20169   if test $ac_cv_func_fcntl = no; then
20170     HAVE_FCNTL=0
20171   else
20172     REPLACE_FCNTL=1
20173   fi
20174
20175     fi
20176
20177
20178   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20179
20180
20181
20182
20183
20184
20185
20186
20187   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20188
20189   fi
20190
20191
20192
20193
20194
20195           GNULIB_FCNTL=1
20196
20197
20198
20199
20200
20201 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216      if test $gl_cv_have_include_next = yes; then
20217        gl_cv_next_fcntl_h='<'fcntl.h'>'
20218      else
20219        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20220 printf %s "checking absolute name of <fcntl.h>... " >&6; }
20221 if test ${gl_cv_next_fcntl_h+y}
20222 then :
20223   printf %s "(cached) " >&6
20224 else
20225
20226
20227
20228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20229 /* end confdefs.h.  */
20230 #include <fcntl.h>
20231 _ACEOF
20232                 case "$host_os" in
20233     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20234     *)    gl_absname_cpp="$ac_cpp" ;;
20235   esac
20236
20237   case "$host_os" in
20238     mingw*)
20239                                           gl_dirsep_regex='[/\\]'
20240       ;;
20241     *)
20242       gl_dirsep_regex='\/'
20243       ;;
20244   esac
20245       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20246   gl_header_literal_regex=`echo 'fcntl.h' \
20247                            | sed -e "$gl_make_literal_regex_sed"`
20248   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20249       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20250       s|^/[^/]|//&|
20251       p
20252       q
20253     }'
20254
20255         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20256   sed -n "$gl_absolute_header_sed"`
20257
20258            gl_header=$gl_cv_absolute_fcntl_h
20259            gl_cv_next_fcntl_h='"'$gl_header'"'
20260
20261
20262 fi
20263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20264 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
20265      fi
20266      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20267
20268      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20269        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20270        gl_next_as_first_directive='<'fcntl.h'>'
20271      else
20272        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20273        gl_next_as_first_directive=$gl_cv_next_fcntl_h
20274      fi
20275      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292 printf "%s\n" "#define GNULIB_FCNTL_SAFER 1" >>confdefs.h
20293
20294
20295
20296
20297 printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
20298
20299
20300
20301
20302
20303
20304   LIB_FDATASYNC=
20305
20306
20307   if test $ac_cv_have_decl_fdatasync = no; then
20308     HAVE_DECL_FDATASYNC=0
20309         ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
20310 if test "x$ac_cv_func_fdatasync" = xyes
20311 then :
20312   printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h
20313
20314 fi
20315
20316     if test $ac_cv_func_fdatasync = no; then
20317       HAVE_FDATASYNC=0
20318     fi
20319   else
20320             gl_saved_libs=$LIBS
20321     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
20322 printf %s "checking for library containing fdatasync... " >&6; }
20323 if test ${ac_cv_search_fdatasync+y}
20324 then :
20325   printf %s "(cached) " >&6
20326 else
20327   ac_func_search_save_LIBS=$LIBS
20328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20329 /* end confdefs.h.  */
20330
20331 /* Override any GCC internal prototype to avoid an error.
20332    Use char because int might match the return type of a GCC
20333    builtin and then its argument prototype would still apply.  */
20334 #ifdef __cplusplus
20335 extern "C"
20336 #endif
20337 char fdatasync ();
20338 int
20339 main (void)
20340 {
20341 return fdatasync ();
20342   ;
20343   return 0;
20344 }
20345 _ACEOF
20346 for ac_lib in '' rt posix4
20347 do
20348   if test -z "$ac_lib"; then
20349     ac_res="none required"
20350   else
20351     ac_res=-l$ac_lib
20352     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20353   fi
20354   if ac_fn_c_try_link "$LINENO"
20355 then :
20356   ac_cv_search_fdatasync=$ac_res
20357 fi
20358 rm -f core conftest.err conftest.$ac_objext \
20359     conftest$ac_exeext
20360   if test ${ac_cv_search_fdatasync+y}
20361 then :
20362   break
20363 fi
20364 done
20365 if test ${ac_cv_search_fdatasync+y}
20366 then :
20367
20368 else
20369   ac_cv_search_fdatasync=no
20370 fi
20371 rm conftest.$ac_ext
20372 LIBS=$ac_func_search_save_LIBS
20373 fi
20374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
20375 printf "%s\n" "$ac_cv_search_fdatasync" >&6; }
20376 ac_res=$ac_cv_search_fdatasync
20377 if test "$ac_res" != no
20378 then :
20379   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20380   test "$ac_cv_search_fdatasync" = "none required" ||
20381                     LIB_FDATASYNC=$ac_cv_search_fdatasync
20382 fi
20383
20384     LIBS=$gl_saved_libs
20385   fi
20386
20387   if test $HAVE_FDATASYNC = 0; then
20388
20389
20390
20391
20392
20393
20394
20395
20396   gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
20397
20398   fi
20399
20400
20401
20402
20403
20404           GNULIB_FDATASYNC=1
20405
20406
20407
20408
20409
20410 printf "%s\n" "#define GNULIB_TEST_FDATASYNC 1" >>confdefs.h
20411
20412
20413
20414
20415
20416
20417
20418
20419     ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
20420 #include <dirent.h>
20421
20422 "
20423 if test "x$ac_cv_have_decl_fdopendir" = xyes
20424 then :
20425   ac_have_decl=1
20426 else
20427   ac_have_decl=0
20428 fi
20429
20430 printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
20431 if test $ac_have_decl = 1
20432 then :
20433
20434 else
20435   HAVE_DECL_FDOPENDIR=0
20436 fi
20437
20438
20439   if test $ac_cv_func_fdopendir = no; then
20440     HAVE_FDOPENDIR=0
20441   else
20442     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
20443 printf %s "checking whether fdopendir works... " >&6; }
20444 if test ${gl_cv_func_fdopendir_works+y}
20445 then :
20446   printf %s "(cached) " >&6
20447 else
20448   if test "$cross_compiling" = yes
20449 then :
20450   case "$host_os" in
20451                     # Guess yes on glibc systems.
20452             *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
20453                     # If we don't know, assume the worst.
20454             *)      gl_cv_func_fdopendir_works="guessing no" ;;
20455           esac
20456
20457 else
20458   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20459 /* end confdefs.h.  */
20460
20461 #include <dirent.h>
20462 #include <fcntl.h>
20463 #include <unistd.h>
20464 #if !HAVE_DECL_FDOPENDIR
20465 extern
20466 # ifdef __cplusplus
20467 "C"
20468 # endif
20469 DIR *fdopendir (int);
20470 #endif
20471
20472 int
20473 main (void)
20474 {
20475 int result = 0;
20476      int fd = open ("conftest.c", O_RDONLY);
20477      if (fd < 0) result |= 1;
20478      if (fdopendir (fd)) result |= 2;
20479      if (close (fd)) result |= 4;
20480      return result;
20481   ;
20482   return 0;
20483 }
20484 _ACEOF
20485 if ac_fn_c_try_run "$LINENO"
20486 then :
20487   gl_cv_func_fdopendir_works=yes
20488 else
20489   gl_cv_func_fdopendir_works=no
20490 fi
20491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20492   conftest.$ac_objext conftest.beam conftest.$ac_ext
20493 fi
20494
20495 fi
20496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
20497 printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
20498     case "$gl_cv_func_fdopendir_works" in
20499       *yes) ;;
20500       *)
20501         REPLACE_FDOPENDIR=1
20502         ;;
20503     esac
20504   fi
20505
20506   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
20507
20508
20509
20510
20511
20512
20513
20514
20515   gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
20516
20517   fi
20518
20519
20520
20521
20522
20523           GNULIB_FDOPENDIR=1
20524
20525
20526
20527
20528
20529 printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
20530
20531
20532
20533
20534
20535 printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
20536
20537
20538
20539
20540
20541
20542   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20543 printf %s "checking whether fflush works on input streams... " >&6; }
20544 if test ${gl_cv_func_fflush_stdin+y}
20545 then :
20546   printf %s "(cached) " >&6
20547 else
20548   echo hello world > conftest.txt
20549      if test "$cross_compiling" = yes
20550 then :
20551   case "$host_os" in
20552                   # Guess no on native Windows.
20553           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
20554           *)      gl_cv_func_fflush_stdin=cross ;;
20555         esac
20556
20557 else
20558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20559 /* end confdefs.h.  */
20560
20561 #include <stdio.h>
20562 #if HAVE_UNISTD_H
20563 # include <unistd.h>
20564 #else /* on Windows with MSVC */
20565 # include <io.h>
20566 #endif
20567
20568 int
20569 main (void)
20570 {
20571 FILE *f = fopen ("conftest.txt", "r");
20572          char buffer[10];
20573          int fd;
20574          int c;
20575          if (f == NULL)
20576            return 1;
20577          fd = fileno (f);
20578          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
20579            { fclose (f); return 2; }
20580          /* For deterministic results, ensure f read a bigger buffer.  */
20581          if (lseek (fd, 0, SEEK_CUR) == 5)
20582            { fclose (f); return 3; }
20583          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
20584             on BSD systems and on mingw.  */
20585          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
20586            { fclose (f); return 4; }
20587          if (lseek (fd, 0, SEEK_CUR) != 5)
20588            { fclose (f); return 5; }
20589          /* Verify behaviour of fflush after ungetc. See
20590             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
20591          /* Verify behaviour of fflush after a backup ungetc.  This fails on
20592             mingw.  */
20593          c = fgetc (f);
20594          ungetc (c, f);
20595          fflush (f);
20596          if (fgetc (f) != c)
20597            { fclose (f); return 6; }
20598          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
20599             on glibc 2.8 and on BSD systems.  */
20600          c = fgetc (f);
20601          ungetc ('@', f);
20602          fflush (f);
20603          if (fgetc (f) != c)
20604            { fclose (f); return 7; }
20605          fclose (f);
20606          return 0;
20607
20608   ;
20609   return 0;
20610 }
20611 _ACEOF
20612 if ac_fn_c_try_run "$LINENO"
20613 then :
20614   gl_cv_func_fflush_stdin=yes
20615 else
20616   gl_cv_func_fflush_stdin=no
20617 fi
20618 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20619   conftest.$ac_objext conftest.beam conftest.$ac_ext
20620 fi
20621
20622      rm conftest.txt
20623
20624 fi
20625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
20626 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
20627   case "$gl_cv_func_fflush_stdin" in
20628     *yes) gl_func_fflush_stdin=1 ;;
20629     *no)  gl_func_fflush_stdin=0 ;;
20630     *)    gl_func_fflush_stdin='(-1)' ;;
20631   esac
20632
20633 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
20634
20635
20636   case "$gl_cv_func_fflush_stdin" in
20637     *yes) ;;
20638     *) REPLACE_FFLUSH=1 ;;
20639   esac
20640
20641   if test $REPLACE_FFLUSH = 1; then
20642
20643
20644
20645
20646
20647
20648
20649
20650   gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
20651
20652     :
20653   fi
20654
20655
20656 printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
20657
20658
20659
20660
20661
20662
20663
20664           GNULIB_FFLUSH=1
20665
20666
20667
20668
20669
20670 printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680   FLOAT_H=
20681   REPLACE_FLOAT_LDBL=0
20682   case "$host_os" in
20683     aix* | beos* | openbsd* | mirbsd* | irix*)
20684       FLOAT_H=float.h
20685       ;;
20686     freebsd* | dragonfly*)
20687       case "$host_cpu" in
20688         i[34567]86 )
20689           FLOAT_H=float.h
20690           ;;
20691         x86_64 )
20692           # On x86_64 systems, the C compiler may still be generating
20693           # 32-bit code.
20694           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20695 /* end confdefs.h.  */
20696 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20697                   int ok;
20698                  #else
20699                   error fail
20700                  #endif
20701
20702 _ACEOF
20703 if ac_fn_c_try_compile "$LINENO"
20704 then :
20705
20706 else
20707   FLOAT_H=float.h
20708 fi
20709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20710           ;;
20711       esac
20712       ;;
20713     linux*)
20714       case "$host_cpu" in
20715         powerpc*)
20716           FLOAT_H=float.h
20717           ;;
20718       esac
20719       ;;
20720   esac
20721   case "$host_os" in
20722     aix* | freebsd* | dragonfly* | linux*)
20723       if test -n "$FLOAT_H"; then
20724         REPLACE_FLOAT_LDBL=1
20725       fi
20726       ;;
20727   esac
20728
20729     REPLACE_ITOLD=0
20730   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20731 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
20732 if test ${gl_cv_func_itold_works+y}
20733 then :
20734   printf %s "(cached) " >&6
20735 else
20736
20737       if test "$cross_compiling" = yes
20738 then :
20739   case "$host" in
20740            sparc*-*-linux*)
20741              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20742 /* end confdefs.h.  */
20743 #if defined __LP64__ || defined __arch64__
20744                     int ok;
20745                    #else
20746                     error fail
20747                    #endif
20748
20749 _ACEOF
20750 if ac_fn_c_try_compile "$LINENO"
20751 then :
20752   gl_cv_func_itold_works="guessing no"
20753 else
20754   gl_cv_func_itold_works="guessing yes"
20755 fi
20756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20757              ;;
20758                    # Guess yes on native Windows.
20759            mingw*) gl_cv_func_itold_works="guessing yes" ;;
20760            *)      gl_cv_func_itold_works="guessing yes" ;;
20761          esac
20762
20763 else
20764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20765 /* end confdefs.h.  */
20766
20767 int i = -1;
20768 volatile long double ld;
20769 int main ()
20770 {
20771   ld += i * 1.0L;
20772   if (ld > 0)
20773     return 1;
20774   return 0;
20775 }
20776 _ACEOF
20777 if ac_fn_c_try_run "$LINENO"
20778 then :
20779   gl_cv_func_itold_works=yes
20780 else
20781   gl_cv_func_itold_works=no
20782 fi
20783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20784   conftest.$ac_objext conftest.beam conftest.$ac_ext
20785 fi
20786
20787
20788 fi
20789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20790 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
20791   case "$gl_cv_func_itold_works" in
20792     *no)
20793       REPLACE_ITOLD=1
20794                   FLOAT_H=float.h
20795       ;;
20796   esac
20797
20798   if test -n "$FLOAT_H"; then
20799
20800
20801
20802
20803
20804
20805
20806
20807      if test $gl_cv_have_include_next = yes; then
20808        gl_cv_next_float_h='<'float.h'>'
20809      else
20810        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20811 printf %s "checking absolute name of <float.h>... " >&6; }
20812 if test ${gl_cv_next_float_h+y}
20813 then :
20814   printf %s "(cached) " >&6
20815 else
20816
20817
20818
20819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20820 /* end confdefs.h.  */
20821 #include <float.h>
20822 _ACEOF
20823                 case "$host_os" in
20824     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20825     *)    gl_absname_cpp="$ac_cpp" ;;
20826   esac
20827
20828   case "$host_os" in
20829     mingw*)
20830                                           gl_dirsep_regex='[/\\]'
20831       ;;
20832     *)
20833       gl_dirsep_regex='\/'
20834       ;;
20835   esac
20836       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20837   gl_header_literal_regex=`echo 'float.h' \
20838                            | sed -e "$gl_make_literal_regex_sed"`
20839   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20840       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20841       s|^/[^/]|//&|
20842       p
20843       q
20844     }'
20845
20846         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20847   sed -n "$gl_absolute_header_sed"`
20848
20849            gl_header=$gl_cv_absolute_float_h
20850            gl_cv_next_float_h='"'$gl_header'"'
20851
20852
20853 fi
20854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20855 printf "%s\n" "$gl_cv_next_float_h" >&6; }
20856      fi
20857      NEXT_FLOAT_H=$gl_cv_next_float_h
20858
20859      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20860        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20861        gl_next_as_first_directive='<'float.h'>'
20862      else
20863        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20864        gl_next_as_first_directive=$gl_cv_next_float_h
20865      fi
20866      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20867
20868
20869
20870
20871   fi
20872
20873    if test -n "$FLOAT_H"; then
20874   GL_GENERATE_FLOAT_H_TRUE=
20875   GL_GENERATE_FLOAT_H_FALSE='#'
20876 else
20877   GL_GENERATE_FLOAT_H_TRUE='#'
20878   GL_GENERATE_FLOAT_H_FALSE=
20879 fi
20880
20881
20882
20883   if test $REPLACE_FLOAT_LDBL = 1; then
20884
20885
20886
20887
20888
20889
20890
20891
20892   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20893
20894   fi
20895   if test $REPLACE_ITOLD = 1; then
20896
20897
20898
20899
20900
20901
20902
20903
20904   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20905
20906   fi
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922   gl_cv_func_fprintf_posix=no
20923   case "$gl_cv_func_printf_sizes_c99" in
20924     *yes)
20925       case "$gl_cv_func_printf_long_double" in
20926         *yes)
20927           case "$gl_cv_func_printf_infinite" in
20928             *yes)
20929               case "$gl_cv_func_printf_infinite_long_double" in
20930                 *yes)
20931                   case "$gl_cv_func_printf_directive_a" in
20932                     *yes)
20933                       case "$gl_cv_func_printf_directive_f" in
20934                         *yes)
20935                           case "$gl_cv_func_printf_directive_n" in
20936                             *yes)
20937                               case "$gl_cv_func_printf_directive_ls" in
20938                                 *yes)
20939                                   case "$gl_cv_func_printf_positions" in
20940                                     *yes)
20941                                       case "$gl_cv_func_printf_flag_grouping" in
20942                                         *yes)
20943                                           case "$gl_cv_func_printf_flag_leftadjust" in
20944                                             *yes)
20945                                               case "$gl_cv_func_printf_flag_zero" in
20946                                                 *yes)
20947                                                   case "$gl_cv_func_printf_precision" in
20948                                                     *yes)
20949                                                       case "$gl_cv_func_printf_enomem" in
20950                                                         *yes)
20951                                                           # fprintf exists and is
20952                                                           # already POSIX compliant.
20953                                                           gl_cv_func_fprintf_posix=yes
20954                                                           ;;
20955                                                       esac
20956                                                       ;;
20957                                                   esac
20958                                                   ;;
20959                                               esac
20960                                               ;;
20961                                           esac
20962                                           ;;
20963                                       esac
20964                                       ;;
20965                                   esac
20966                                   ;;
20967                               esac
20968                               ;;
20969                           esac
20970                           ;;
20971                       esac
20972                       ;;
20973                   esac
20974                   ;;
20975               esac
20976               ;;
20977           esac
20978           ;;
20979       esac
20980       ;;
20981   esac
20982   if test $gl_cv_func_fprintf_posix = no; then
20983
20984
20985
20986   case "$gl_cv_func_printf_infinite" in
20987     *yes)
20988       ;;
20989     *)
20990
20991 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
20992
20993       ;;
20994   esac
20995
20996
20997
20998
20999   case "$gl_cv_func_printf_long_double" in
21000     *yes)
21001       case "$gl_cv_func_printf_infinite_long_double" in
21002         *yes)
21003           ;;
21004         *)
21005
21006 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
21007
21008           ;;
21009       esac
21010       ;;
21011   esac
21012
21013
21014
21015   case "$gl_cv_func_printf_directive_a" in
21016     *yes)
21017       ;;
21018     *)
21019
21020 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
21021
21022       ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
21023 if test "x$ac_cv_func_nl_langinfo" = xyes
21024 then :
21025   printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
21026
21027 fi
21028
21029       ;;
21030   esac
21031
21032
21033
21034   case "$gl_cv_func_printf_directive_f" in
21035     *yes)
21036       ;;
21037     *)
21038
21039 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
21040
21041       ;;
21042   esac
21043
21044
21045
21046   case "$gl_cv_func_printf_directive_ls" in
21047     *yes)
21048       ;;
21049     *)
21050
21051 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
21052
21053       ;;
21054   esac
21055
21056
21057
21058   case "$gl_cv_func_printf_flag_grouping" in
21059     *yes)
21060       ;;
21061     *)
21062
21063 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
21064
21065       ;;
21066   esac
21067
21068
21069
21070   case "$gl_cv_func_printf_flag_leftadjust" in
21071     *yes)
21072       ;;
21073     *)
21074
21075 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
21076
21077       ;;
21078   esac
21079
21080
21081
21082   case "$gl_cv_func_printf_flag_zero" in
21083     *yes)
21084       ;;
21085     *)
21086
21087 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
21088
21089       ;;
21090   esac
21091
21092
21093
21094   case "$gl_cv_func_printf_precision" in
21095     *yes)
21096       ;;
21097     *)
21098
21099 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
21100
21101
21102 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21103
21104
21105 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21106
21107       ;;
21108   esac
21109
21110
21111
21112   case "$gl_cv_func_printf_enomem" in
21113     *yes)
21114       ;;
21115     *)
21116
21117 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
21118
21119
21120 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
21121
21122
21123 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
21124
21125       ;;
21126   esac
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
21169
21170   if test $ac_cv_func_vasnprintf = yes; then
21171
21172 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
21173
21174   fi
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
21187 if test "x$ac_cv_type_ptrdiff_t" = xyes
21188 then :
21189
21190 else
21191
21192 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
21193
21194
21195 fi
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213   gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
21214
21215   REPLACE_FPRINTF=1
21216
21217 printf "%s\n" "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
21218
21219   :
21220
21221   fi
21222
21223
21224
21225
21226
21227
21228           GNULIB_FPRINTF_POSIX=1
21229
21230
21231
21232
21233
21234 printf "%s\n" "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
21235
21236
21237
21238
21239
21240
21241
21242   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
21243 "
21244 if test "x$ac_cv_have_decl_fpurge" = xyes
21245 then :
21246   ac_have_decl=1
21247 else
21248   ac_have_decl=0
21249 fi
21250
21251 printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
21252
21253   if test "x$ac_cv_func_fpurge" = xyes; then
21254     HAVE_FPURGE=1
21255     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
21256     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
21257 printf %s "checking whether fpurge works... " >&6; }
21258 if test ${gl_cv_func_fpurge_works+y}
21259 then :
21260   printf %s "(cached) " >&6
21261 else
21262   if test "$cross_compiling" = yes
21263 then :
21264   gl_cv_func_fpurge_works='guessing no'
21265 else
21266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21267 /* end confdefs.h.  */
21268 #include <stdio.h>
21269
21270 int
21271 main (void)
21272 {
21273 FILE *f = fopen ("conftest.txt", "w+");
21274              if (!f)
21275                return 1;
21276              if (fputc ('a', f) != 'a')
21277                { fclose (f); return 2; }
21278              rewind (f);
21279              if (fgetc (f) != 'a')
21280                { fclose (f); return 3; }
21281              if (fgetc (f) != EOF)
21282                { fclose (f); return 4; }
21283              if (fpurge (f) != 0)
21284                { fclose (f); return 5; }
21285              if (putc ('b', f) != 'b')
21286                { fclose (f); return 6; }
21287              if (fclose (f) != 0)
21288                return 7;
21289              if ((f = fopen ("conftest.txt", "r")) == NULL)
21290                return 8;
21291              if (fgetc (f) != 'a')
21292                { fclose (f); return 9; }
21293              if (fgetc (f) != 'b')
21294                { fclose (f); return 10; }
21295              if (fgetc (f) != EOF)
21296                { fclose (f); return 11; }
21297              if (fclose (f) != 0)
21298                return 12;
21299              if (remove ("conftest.txt") != 0)
21300                return 13;
21301              return 0;
21302
21303   ;
21304   return 0;
21305 }
21306 _ACEOF
21307 if ac_fn_c_try_run "$LINENO"
21308 then :
21309   gl_cv_func_fpurge_works=yes
21310 else
21311   gl_cv_func_fpurge_works=no
21312 fi
21313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21314   conftest.$ac_objext conftest.beam conftest.$ac_ext
21315 fi
21316
21317 fi
21318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
21319 printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
21320     if test "x$gl_cv_func_fpurge_works" != xyes; then
21321       REPLACE_FPURGE=1
21322     fi
21323   else
21324     HAVE_FPURGE=0
21325   fi
21326   if test "x$ac_cv_have_decl_fpurge" = xno; then
21327     HAVE_DECL_FPURGE=0
21328   fi
21329
21330   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
21331
21332
21333
21334
21335
21336
21337
21338
21339   gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
21340
21341   fi
21342
21343
21344
21345
21346
21347           GNULIB_FPURGE=1
21348
21349
21350
21351
21352
21353 printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363   if test $gl_cv_func_frexp_no_libm = yes; then
21364
21365
21366
21367   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
21368 printf %s "checking whether frexp works... " >&6; }
21369 if test ${gl_cv_func_frexp_works+y}
21370 then :
21371   printf %s "(cached) " >&6
21372 else
21373
21374       if test "$cross_compiling" = yes
21375 then :
21376   case "$host_os" in
21377            netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
21378            mingw*) # Guess yes with MSVC, no with mingw.
21379              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21380 /* end confdefs.h.  */
21381
21382 #ifdef _MSC_VER
21383  Good
21384 #endif
21385
21386 _ACEOF
21387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21388   $EGREP "Good" >/dev/null 2>&1
21389 then :
21390   gl_cv_func_frexp_works="guessing yes"
21391 else
21392   gl_cv_func_frexp_works="guessing no"
21393 fi
21394 rm -rf conftest*
21395
21396              ;;
21397            *) gl_cv_func_frexp_works="guessing yes" ;;
21398          esac
21399
21400 else
21401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21402 /* end confdefs.h.  */
21403
21404 #include <float.h>
21405 #include <math.h>
21406 #include <string.h>
21407 #if HAVE_DECL_ALARM
21408 # include <signal.h>
21409 # include <unistd.h>
21410 #endif
21411 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
21412    ICC 10.0 has a bug when optimizing the expression -zero.
21413    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
21414    to PowerPC on Mac OS X 10.5.  */
21415 #if defined __hpux || defined __sgi || defined __ICC
21416 static double
21417 compute_minus_zero (void)
21418 {
21419   return -DBL_MIN * DBL_MIN;
21420 }
21421 # define minus_zero compute_minus_zero ()
21422 #else
21423 double minus_zero = -0.0;
21424 #endif
21425 int main()
21426 {
21427   int result = 0;
21428   int i;
21429   volatile double x;
21430   double zero = 0.0;
21431 #if HAVE_DECL_ALARM
21432   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
21433      number.  Let the test fail in this case.  */
21434   signal (SIGALRM, SIG_DFL);
21435   alarm (5);
21436 #endif
21437   /* Test on denormalized numbers.  */
21438   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
21439     ;
21440   if (x > 0.0)
21441     {
21442       int exp;
21443       double y = frexp (x, &exp);
21444       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
21445          On NetBSD: y = 0.75. Correct: y = 0.5.  */
21446       if (y != 0.5)
21447         result |= 1;
21448     }
21449   /* Test on infinite numbers.  */
21450   x = 1.0 / zero;
21451   {
21452     int exp;
21453     double y = frexp (x, &exp);
21454     if (y != x)
21455       result |= 2;
21456   }
21457   /* Test on negative zero.  */
21458   x = minus_zero;
21459   {
21460     int exp;
21461     double y = frexp (x, &exp);
21462     if (memcmp (&y, &x, sizeof x))
21463       result |= 4;
21464   }
21465   return result;
21466 }
21467 _ACEOF
21468 if ac_fn_c_try_run "$LINENO"
21469 then :
21470   gl_cv_func_frexp_works=yes
21471 else
21472   gl_cv_func_frexp_works=no
21473 fi
21474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21475   conftest.$ac_objext conftest.beam conftest.$ac_ext
21476 fi
21477
21478
21479 fi
21480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
21481 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
21482
21483     case "$gl_cv_func_frexp_works" in
21484       *yes) gl_func_frexp_no_libm=yes ;;
21485       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
21486     esac
21487   else
21488     gl_func_frexp_no_libm=no
21489         REPLACE_FREXP=1
21490   fi
21491   if test $gl_func_frexp_no_libm = yes; then
21492
21493 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
21494
21495   fi
21496
21497   if test $gl_func_frexp_no_libm != yes; then
21498
21499
21500
21501
21502
21503
21504
21505
21506   gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
21507
21508   fi
21509
21510
21511
21512
21513
21514           GNULIB_FREXP=1
21515
21516
21517
21518
21519
21520 printf "%s\n" "#define GNULIB_TEST_FREXP 1" >>confdefs.h
21521
21522
21523
21524
21525
21526
21527       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
21528 "
21529 if test "x$ac_cv_have_decl_frexpl" = xyes
21530 then :
21531
21532 else
21533   HAVE_DECL_FREXPL=0
21534 fi
21535
21536   if test $HAVE_DECL_FREXPL = 1; then
21537
21538   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
21539 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
21540 if test ${gl_cv_func_frexpl_no_libm+y}
21541 then :
21542   printf %s "(cached) " >&6
21543 else
21544
21545       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21546 /* end confdefs.h.  */
21547 #include <math.h>
21548              long double x;
21549 int
21550 main (void)
21551 {
21552 int e; return frexpl (x, &e) > 0;
21553   ;
21554   return 0;
21555 }
21556 _ACEOF
21557 if ac_fn_c_try_link "$LINENO"
21558 then :
21559   gl_cv_func_frexpl_no_libm=yes
21560 else
21561   gl_cv_func_frexpl_no_libm=no
21562 fi
21563 rm -f core conftest.err conftest.$ac_objext \
21564     conftest$ac_exeext conftest.$ac_ext
21565
21566 fi
21567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
21568 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
21569
21570     if test $gl_cv_func_frexpl_no_libm = yes; then
21571
21572
21573      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
21574 printf %s "checking whether frexpl works... " >&6; }
21575 if test ${gl_cv_func_frexpl_works+y}
21576 then :
21577   printf %s "(cached) " >&6
21578 else
21579
21580       if test "$cross_compiling" = yes
21581 then :
21582
21583          case "$host_os" in
21584            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
21585               gl_cv_func_frexpl_works="guessing no";;
21586            *) gl_cv_func_frexpl_works="guessing yes";;
21587          esac
21588
21589 else
21590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21591 /* end confdefs.h.  */
21592
21593 #include <float.h>
21594 #include <math.h>
21595 /* Override the values of <float.h>, like done in float.in.h.  */
21596 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
21597 # undef LDBL_MIN_EXP
21598 # define LDBL_MIN_EXP    (-16381)
21599 #endif
21600 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
21601 # undef LDBL_MIN_EXP
21602 # define LDBL_MIN_EXP    (-16381)
21603 #endif
21604 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
21605 # undef LDBL_MIN_EXP
21606 # define LDBL_MIN_EXP DBL_MIN_EXP
21607 #endif
21608 #if defined __sgi && (LDBL_MANT_DIG >= 106)
21609 # if defined __GNUC__
21610 #  undef LDBL_MIN_EXP
21611 #  define LDBL_MIN_EXP DBL_MIN_EXP
21612 # endif
21613 #endif
21614 extern
21615 #ifdef __cplusplus
21616 "C"
21617 #endif
21618 long double frexpl (long double, int *);
21619 int main()
21620 {
21621   int result = 0;
21622   volatile long double x;
21623   /* Test on finite numbers that fails on AIX 5.1.  */
21624   x = 16.0L;
21625   {
21626     int exp = -9999;
21627     frexpl (x, &exp);
21628     if (exp != 5)
21629       result |= 1;
21630   }
21631   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
21632      function returns an invalid (incorrectly normalized) value: it returns
21633                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
21634      but the correct result is
21635           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
21636   x = 1.01L;
21637   {
21638     int exp = -9999;
21639     long double y = frexpl (x, &exp);
21640     if (!(exp == 1 && y == 0.505L))
21641       result |= 2;
21642   }
21643   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
21644      LDBL_MAX_EXP = 16384.
21645      In the loop end test, we test x against Infinity, rather than comparing
21646      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
21647   {
21648     int i;
21649     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
21650       {
21651         int exp = -9999;
21652         frexpl (x, &exp);
21653         if (exp != i)
21654           {
21655             result |= 4;
21656             break;
21657           }
21658       }
21659   }
21660   /* Test on denormalized numbers.  */
21661   {
21662     int i;
21663     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
21664       ;
21665     if (x > 0.0L)
21666       {
21667         int exp;
21668         long double y = frexpl (x, &exp);
21669         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
21670            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
21671         if (exp != LDBL_MIN_EXP - 1)
21672           result |= 8;
21673       }
21674   }
21675   /* Test on infinite numbers.  */
21676   x = 1.0L / 0.0L;
21677   {
21678     int exp;
21679     long double y = frexpl (x, &exp);
21680     if (y != x)
21681       result |= 16;
21682   }
21683   return result;
21684 }
21685 _ACEOF
21686 if ac_fn_c_try_run "$LINENO"
21687 then :
21688   gl_cv_func_frexpl_works=yes
21689 else
21690   gl_cv_func_frexpl_works=no
21691 fi
21692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21693   conftest.$ac_objext conftest.beam conftest.$ac_ext
21694 fi
21695
21696
21697 fi
21698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
21699 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
21700
21701       case "$gl_cv_func_frexpl_works" in
21702         *yes) gl_func_frexpl_no_libm=yes ;;
21703         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
21704       esac
21705     else
21706       gl_func_frexpl_no_libm=no
21707             REPLACE_FREXPL=1
21708     fi
21709     if test $gl_func_frexpl_no_libm = yes; then
21710
21711 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
21712
21713     fi
21714   fi
21715
21716   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
21717
21718
21719
21720
21721
21722
21723
21724
21725   gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
21726
21727   fi
21728
21729
21730
21731
21732
21733           GNULIB_FREXPL=1
21734
21735
21736
21737
21738
21739 printf "%s\n" "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
21740
21741
21742
21743
21744
21745
21746     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21747     REPLACE_FSEEK=1
21748   fi
21749
21750   if test $REPLACE_FSEEK = 1; then
21751
21752
21753
21754
21755
21756
21757
21758
21759   gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
21760
21761   fi
21762
21763
21764
21765
21766
21767           GNULIB_FSEEK=1
21768
21769
21770
21771
21772
21773 printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
21786 printf %s "checking for fseeko... " >&6; }
21787 if test ${gl_cv_func_fseeko+y}
21788 then :
21789   printf %s "(cached) " >&6
21790 else
21791
21792       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21793 /* end confdefs.h.  */
21794 #include <stdio.h>
21795
21796 int
21797 main (void)
21798 {
21799 fseeko (stdin, 0, 0);
21800   ;
21801   return 0;
21802 }
21803 _ACEOF
21804 if ac_fn_c_try_link "$LINENO"
21805 then :
21806   gl_cv_func_fseeko=yes
21807 else
21808   gl_cv_func_fseeko=no
21809 fi
21810 rm -f core conftest.err conftest.$ac_objext \
21811     conftest$ac_exeext conftest.$ac_ext
21812
21813 fi
21814 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
21815 printf "%s\n" "$gl_cv_func_fseeko" >&6; }
21816
21817
21818   if test $ac_cv_have_decl_fseeko = no; then
21819     HAVE_DECL_FSEEKO=0
21820   fi
21821
21822   if test $gl_cv_func_fseeko = no; then
21823     HAVE_FSEEKO=0
21824   else
21825     if test $WINDOWS_64_BIT_OFF_T = 1; then
21826       REPLACE_FSEEKO=1
21827     fi
21828     if test $gl_cv_var_stdin_large_offset = no; then
21829       REPLACE_FSEEKO=1
21830     fi
21831
21832
21833
21834   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21835 printf %s "checking whether fflush works on input streams... " >&6; }
21836 if test ${gl_cv_func_fflush_stdin+y}
21837 then :
21838   printf %s "(cached) " >&6
21839 else
21840   echo hello world > conftest.txt
21841      if test "$cross_compiling" = yes
21842 then :
21843   case "$host_os" in
21844                   # Guess no on native Windows.
21845           mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
21846           *)      gl_cv_func_fflush_stdin=cross ;;
21847         esac
21848
21849 else
21850   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21851 /* end confdefs.h.  */
21852
21853 #include <stdio.h>
21854 #if HAVE_UNISTD_H
21855 # include <unistd.h>
21856 #else /* on Windows with MSVC */
21857 # include <io.h>
21858 #endif
21859
21860 int
21861 main (void)
21862 {
21863 FILE *f = fopen ("conftest.txt", "r");
21864          char buffer[10];
21865          int fd;
21866          int c;
21867          if (f == NULL)
21868            return 1;
21869          fd = fileno (f);
21870          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21871            { fclose (f); return 2; }
21872          /* For deterministic results, ensure f read a bigger buffer.  */
21873          if (lseek (fd, 0, SEEK_CUR) == 5)
21874            { fclose (f); return 3; }
21875          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
21876             on BSD systems and on mingw.  */
21877          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21878            { fclose (f); return 4; }
21879          if (lseek (fd, 0, SEEK_CUR) != 5)
21880            { fclose (f); return 5; }
21881          /* Verify behaviour of fflush after ungetc. See
21882             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
21883          /* Verify behaviour of fflush after a backup ungetc.  This fails on
21884             mingw.  */
21885          c = fgetc (f);
21886          ungetc (c, f);
21887          fflush (f);
21888          if (fgetc (f) != c)
21889            { fclose (f); return 6; }
21890          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
21891             on glibc 2.8 and on BSD systems.  */
21892          c = fgetc (f);
21893          ungetc ('@', f);
21894          fflush (f);
21895          if (fgetc (f) != c)
21896            { fclose (f); return 7; }
21897          fclose (f);
21898          return 0;
21899
21900   ;
21901   return 0;
21902 }
21903 _ACEOF
21904 if ac_fn_c_try_run "$LINENO"
21905 then :
21906   gl_cv_func_fflush_stdin=yes
21907 else
21908   gl_cv_func_fflush_stdin=no
21909 fi
21910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21911   conftest.$ac_objext conftest.beam conftest.$ac_ext
21912 fi
21913
21914      rm conftest.txt
21915
21916 fi
21917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21918 printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
21919   case "$gl_cv_func_fflush_stdin" in
21920     *yes) gl_func_fflush_stdin=1 ;;
21921     *no)  gl_func_fflush_stdin=0 ;;
21922     *)    gl_func_fflush_stdin='(-1)' ;;
21923   esac
21924
21925 printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
21926
21927
21928       case "$gl_cv_func_fflush_stdin" in
21929         *yes) ;;
21930         *) REPLACE_FSEEKO=1 ;;
21931       esac
21932
21933   fi
21934
21935   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21936
21937
21938
21939
21940
21941
21942
21943
21944   gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
21945
21946
21947       ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
21948 if test "x$ac_cv_func__fseeki64" = xyes
21949 then :
21950   printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
21951
21952 fi
21953
21954
21955   fi
21956
21957
21958
21959
21960
21961           GNULIB_FSEEKO=1
21962
21963
21964
21965
21966
21967 printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
21968
21969
21970
21971
21972
21973
21974   if test $ac_cv_func___fseterr = no; then
21975
21976
21977
21978
21979
21980
21981
21982
21983   gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
21984
21985   fi
21986
21987
21988
21989
21990   case "$host_os" in
21991     mingw* | solaris*)
21992                         REPLACE_FSTAT=1
21993       ;;
21994   esac
21995
21996
21997
21998
21999
22000   if test $ac_cv_func_fchdir = no; then
22001     HAVE_FCHDIR=0
22002   fi
22003
22004     if test $HAVE_FCHDIR = 0; then
22005       case "$gl_cv_func_open_directory_works" in
22006         *yes) ;;
22007         *)
22008           REPLACE_FSTAT=1
22009           ;;
22010       esac
22011     fi
22012
22013
22014   if test $REPLACE_FSTAT = 1; then
22015
22016
22017
22018
22019
22020
22021
22022
22023   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
22024
22025     case "$host_os" in
22026       mingw*)
22027
22028
22029
22030
22031
22032
22033
22034
22035   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
22036
22037         ;;
22038     esac
22039
22040
22041   :
22042
22043   fi
22044
22045
22046
22047
22048
22049           GNULIB_FSTAT=1
22050
22051
22052
22053
22054
22055 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066   if test $ac_cv_func_fstatat = no; then
22067     HAVE_FSTATAT=0
22068   else
22069             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
22070 printf %s "checking whether fstatat (..., 0) works... " >&6; }
22071 if test ${gl_cv_func_fstatat_zero_flag+y}
22072 then :
22073   printf %s "(cached) " >&6
22074 else
22075   if test "$cross_compiling" = yes
22076 then :
22077   case "$host_os" in
22078             aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
22079             *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
22080           esac
22081
22082 else
22083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22084 /* end confdefs.h.  */
22085
22086               #include <fcntl.h>
22087               #include <sys/stat.h>
22088               int
22089               main (void)
22090               {
22091                 struct stat a;
22092                 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
22093               }
22094
22095 _ACEOF
22096 if ac_fn_c_try_run "$LINENO"
22097 then :
22098   gl_cv_func_fstatat_zero_flag=yes
22099 else
22100   gl_cv_func_fstatat_zero_flag=no
22101 fi
22102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22103   conftest.$ac_objext conftest.beam conftest.$ac_ext
22104 fi
22105
22106
22107 fi
22108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
22109 printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
22110
22111     case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
22112     *yes+*yes) ;;
22113     *) REPLACE_FSTATAT=1 ;;
22114     esac
22115
22116     case $host_os in
22117       solaris*)
22118         REPLACE_FSTATAT=1 ;;
22119     esac
22120
22121     case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
22122       1,*yes)
22123
22124 printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
22125
22126          ;;
22127     esac
22128   fi
22129
22130   if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
22131
22132
22133
22134
22135
22136
22137
22138
22139   gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
22140
22141   fi
22142
22143
22144
22145
22146
22147           GNULIB_FSTATAT=1
22148
22149
22150
22151
22152
22153 printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
22154
22155
22156
22157
22158
22159
22160   if test $ac_cv_func_fsync = no; then
22161     HAVE_FSYNC=0
22162   fi
22163
22164   if test $HAVE_FSYNC = 0; then
22165
22166
22167
22168
22169
22170
22171
22172
22173   gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22174
22175     :
22176   fi
22177
22178
22179
22180
22181
22182           GNULIB_FSYNC=1
22183
22184
22185
22186
22187
22188 printf "%s\n" "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
22189
22190
22191
22192
22193
22194
22195     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22196     REPLACE_FTELL=1
22197   fi
22198
22199   if test $REPLACE_FTELL = 1; then
22200
22201
22202
22203
22204
22205
22206
22207
22208   gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
22209
22210   fi
22211
22212
22213
22214
22215
22216           GNULIB_FTELL=1
22217
22218
22219
22220
22221
22222 printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235   if test $ac_cv_have_decl_ftello = no; then
22236     HAVE_DECL_FTELLO=0
22237   fi
22238
22239   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
22240 printf %s "checking for ftello... " >&6; }
22241 if test ${gl_cv_func_ftello+y}
22242 then :
22243   printf %s "(cached) " >&6
22244 else
22245
22246       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22247 /* end confdefs.h.  */
22248 #include <stdio.h>
22249 int
22250 main (void)
22251 {
22252 ftello (stdin);
22253   ;
22254   return 0;
22255 }
22256 _ACEOF
22257 if ac_fn_c_try_link "$LINENO"
22258 then :
22259   gl_cv_func_ftello=yes
22260 else
22261   gl_cv_func_ftello=no
22262 fi
22263 rm -f core conftest.err conftest.$ac_objext \
22264     conftest$ac_exeext conftest.$ac_ext
22265
22266 fi
22267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
22268 printf "%s\n" "$gl_cv_func_ftello" >&6; }
22269   if test $gl_cv_func_ftello = no; then
22270     HAVE_FTELLO=0
22271   else
22272     if test $WINDOWS_64_BIT_OFF_T = 1; then
22273       REPLACE_FTELLO=1
22274     fi
22275     if test $gl_cv_var_stdin_large_offset = no; then
22276       REPLACE_FTELLO=1
22277     fi
22278     if test $REPLACE_FTELLO = 0; then
22279
22280       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
22281 printf %s "checking whether ftello works... " >&6; }
22282 if test ${gl_cv_func_ftello_works+y}
22283 then :
22284   printf %s "(cached) " >&6
22285 else
22286
22287                               case "$host_os" in
22288                       # Guess no on Solaris.
22289             solaris*) gl_cv_func_ftello_works="guessing no" ;;
22290                       # Guess yes on native Windows.
22291             mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
22292                       # Guess yes otherwise.
22293             *)        gl_cv_func_ftello_works="guessing yes" ;;
22294           esac
22295           if test "$cross_compiling" = yes
22296 then :
22297   :
22298 else
22299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22300 /* end confdefs.h.  */
22301
22302 #include <stdio.h>
22303 #include <stdlib.h>
22304 #include <string.h>
22305 #define TESTFILE "conftest.tmp"
22306 int
22307 main (void)
22308 {
22309   FILE *fp;
22310
22311   /* Create a file with some contents.  */
22312   fp = fopen (TESTFILE, "w");
22313   if (fp == NULL)
22314     return 70;
22315   if (fwrite ("foogarsh", 1, 8, fp) < 8)
22316     { fclose (fp); return 71; }
22317   if (fclose (fp))
22318     return 72;
22319
22320   /* The file's contents is now "foogarsh".  */
22321
22322   /* Try writing after reading to EOF.  */
22323   fp = fopen (TESTFILE, "r+");
22324   if (fp == NULL)
22325     return 73;
22326   if (fseek (fp, -1, SEEK_END))
22327     { fclose (fp); return 74; }
22328   if (!(getc (fp) == 'h'))
22329     { fclose (fp); return 1; }
22330   if (!(getc (fp) == EOF))
22331     { fclose (fp); return 2; }
22332   if (!(ftell (fp) == 8))
22333     { fclose (fp); return 3; }
22334   if (!(ftell (fp) == 8))
22335     { fclose (fp); return 4; }
22336   if (!(putc ('!', fp) == '!'))
22337     { fclose (fp); return 5; }
22338   if (!(ftell (fp) == 9))
22339     { fclose (fp); return 6; }
22340   if (!(fclose (fp) == 0))
22341     return 7;
22342   fp = fopen (TESTFILE, "r");
22343   if (fp == NULL)
22344     return 75;
22345   {
22346     char buf[10];
22347     if (!(fread (buf, 1, 10, fp) == 9))
22348       { fclose (fp); return 10; }
22349     if (!(memcmp (buf, "foogarsh!", 9) == 0))
22350       { fclose (fp); return 11; }
22351   }
22352   if (!(fclose (fp) == 0))
22353     return 12;
22354
22355   /* The file's contents is now "foogarsh!".  */
22356
22357   return 0;
22358 }
22359 _ACEOF
22360 if ac_fn_c_try_run "$LINENO"
22361 then :
22362   gl_cv_func_ftello_works=yes
22363 else
22364   gl_cv_func_ftello_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_ftello_works" >&5
22373 printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
22374       case "$gl_cv_func_ftello_works" in
22375         *yes) ;;
22376         *)
22377           REPLACE_FTELLO=1
22378
22379 printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
22380
22381           ;;
22382       esac
22383     fi
22384   fi
22385
22386   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22387
22388
22389
22390
22391
22392
22393
22394
22395   gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
22396
22397
22398       ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
22399 if test "x$ac_cv_func__ftelli64" = xyes
22400 then :
22401   printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
22402
22403 fi
22404
22405
22406   fi
22407
22408
22409
22410
22411
22412           GNULIB_FTELLO=1
22413
22414
22415
22416
22417
22418 printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
22419
22420
22421
22422
22423
22424
22425
22426
22427   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
22428   *yes,yes) ;;
22429   *)
22430         REPLACE_GETCWD=1
22431     ;;
22432   esac
22433
22434   if test $REPLACE_GETCWD = 1; then
22435
22436
22437
22438
22439
22440
22441
22442
22443   gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
22444
22445   fi
22446
22447
22448
22449
22450
22451           GNULIB_GETCWD=1
22452
22453
22454
22455
22456
22457 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
22458
22459
22460
22461
22462
22463
22464
22465
22466   if test $ac_cv_func_getdtablesize = yes &&
22467      test $ac_cv_have_decl_getdtablesize = yes; then
22468     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
22469 printf %s "checking whether getdtablesize works... " >&6; }
22470 if test ${gl_cv_func_getdtablesize_works+y}
22471 then :
22472   printf %s "(cached) " >&6
22473 else
22474                                                    case "$host_os" in
22475          vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
22476          *)
22477                                                        if test "$cross_compiling" = yes
22478 then :
22479   case "$host_os" in
22480                 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
22481                   gl_cv_func_getdtablesize_works="guessing no" ;;
22482                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
22483               esac
22484
22485 else
22486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22487 /* end confdefs.h.  */
22488
22489              #include <unistd.h>
22490 int
22491 main (void)
22492 {
22493 int size = getdtablesize();
22494                 if (dup2 (0, getdtablesize()) != -1)
22495                   return 1;
22496                 if (size != getdtablesize())
22497                   return 2;
22498
22499   ;
22500   return 0;
22501 }
22502 _ACEOF
22503 if ac_fn_c_try_run "$LINENO"
22504 then :
22505   gl_cv_func_getdtablesize_works=yes
22506 else
22507   gl_cv_func_getdtablesize_works=no
22508 fi
22509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22510   conftest.$ac_objext conftest.beam conftest.$ac_ext
22511 fi
22512
22513            ;;
22514        esac
22515
22516 fi
22517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
22518 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
22519     case "$gl_cv_func_getdtablesize_works" in
22520       *yes | "no (limitation)") ;;
22521       *) REPLACE_GETDTABLESIZE=1 ;;
22522     esac
22523   else
22524     HAVE_GETDTABLESIZE=0
22525   fi
22526
22527   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
22528
22529
22530
22531
22532
22533
22534
22535
22536   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
22537
22538     :
22539   fi
22540
22541
22542
22543
22544
22545           GNULIB_GETDTABLESIZE=1
22546
22547
22548
22549
22550
22551 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564     REPLACE_GETOPT=0
22565     if test -n "$gl_replace_getopt"; then
22566       REPLACE_GETOPT=1
22567     fi
22568
22569   if test $REPLACE_GETOPT = 1; then
22570
22571
22572   if test $ac_cv_header_sys_cdefs_h = yes; then
22573     HAVE_SYS_CDEFS_H=1
22574   else
22575     HAVE_SYS_CDEFS_H=0
22576   fi
22577
22578
22579
22580 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22581
22582   GETOPT_H=getopt.h
22583   GETOPT_CDEFS_H=getopt-cdefs.h
22584
22585
22586
22587   fi
22588
22589   if test $REPLACE_GETOPT = 1; then
22590
22591
22592
22593
22594
22595
22596
22597
22598   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22609
22610         GNULIB_GL_UNISTD_H_GETOPT=1
22611   fi
22612
22613
22614
22615
22616   ac_found=0
22617   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22618 "
22619 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
22620 then :
22621   ac_have_decl=1
22622 else
22623   ac_have_decl=0
22624 fi
22625
22626 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
22627 if test $ac_have_decl = 1
22628 then :
22629   ac_found=1
22630 fi
22631
22632   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22633 "
22634 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
22635 then :
22636   ac_have_decl=1
22637 else
22638   ac_have_decl=0
22639 fi
22640
22641 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
22642 if test $ac_have_decl = 1
22643 then :
22644   ac_found=1
22645 fi
22646
22647   ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
22648 "
22649 if test "x$ac_cv_have_decl___argv" = xyes
22650 then :
22651   ac_have_decl=1
22652 else
22653   ac_have_decl=0
22654 fi
22655
22656 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
22657 if test $ac_have_decl = 1
22658 then :
22659   ac_found=1
22660 fi
22661
22662
22663   # Incur the cost of this test only if none of the above worked.
22664   if test $ac_found = 0; then
22665     # On OpenBSD 5.1, using the global __progname variable appears to be
22666     # the only way to implement getprogname.
22667     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
22668 printf %s "checking whether __progname is defined in default libraries... " >&6; }
22669 if test ${gl_cv_var___progname+y}
22670 then :
22671   printf %s "(cached) " >&6
22672 else
22673
22674         gl_cv_var___progname=
22675         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22676 /* end confdefs.h.  */
22677 extern char *__progname;
22678 int
22679 main (void)
22680 {
22681 return *__progname;
22682
22683   ;
22684   return 0;
22685 }
22686 _ACEOF
22687 if ac_fn_c_try_link "$LINENO"
22688 then :
22689   gl_cv_var___progname=yes
22690
22691 fi
22692 rm -f core conftest.err conftest.$ac_objext \
22693     conftest$ac_exeext conftest.$ac_ext
22694
22695
22696 fi
22697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
22698 printf "%s\n" "$gl_cv_var___progname" >&6; }
22699     if test "$gl_cv_var___progname" = yes; then
22700
22701 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
22702
22703     fi
22704   fi
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720   gl_gettimeofday_timezone=void
22721   if test $ac_cv_func_gettimeofday != yes; then
22722     HAVE_GETTIMEOFDAY=0
22723   else
22724
22725
22726
22727
22728  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
22729 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
22730 if test ${gl_cv_func_gettimeofday_clobber+y}
22731 then :
22732   printf %s "(cached) " >&6
22733 else
22734   if test "$cross_compiling" = yes
22735 then :
22736   # When cross-compiling:
22737       case "$host_os" in
22738                        # Guess all is fine on glibc systems.
22739         *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22740                        # Guess no on native Windows.
22741         mingw*)        gl_cv_func_gettimeofday_clobber="guessing no" ;;
22742                        # If we don't know, assume the worst.
22743         *)             gl_cv_func_gettimeofday_clobber="guessing yes" ;;
22744       esac
22745
22746 else
22747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22748 /* end confdefs.h.  */
22749 #include <string.h>
22750           #include <sys/time.h>
22751           #include <time.h>
22752           #include <stdlib.h>
22753
22754 int
22755 main (void)
22756 {
22757
22758           time_t t = 0;
22759           struct tm *lt;
22760           struct tm saved_lt;
22761           struct timeval tv;
22762           lt = localtime (&t);
22763           saved_lt = *lt;
22764           gettimeofday (&tv, NULL);
22765           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
22766
22767   ;
22768   return 0;
22769 }
22770 _ACEOF
22771 if ac_fn_c_try_run "$LINENO"
22772 then :
22773   gl_cv_func_gettimeofday_clobber=no
22774 else
22775   gl_cv_func_gettimeofday_clobber=yes
22776 fi
22777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22778   conftest.$ac_objext conftest.beam conftest.$ac_ext
22779 fi
22780
22781 fi
22782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22783 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
22784
22785  case "$gl_cv_func_gettimeofday_clobber" in
22786    *yes)
22787      REPLACE_GETTIMEOFDAY=1
22788
22789 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22790
22791
22792
22793
22794   NEED_LOCALTIME_BUFFER=1
22795   REPLACE_GMTIME=1
22796   REPLACE_LOCALTIME=1
22797
22798      ;;
22799  esac
22800
22801     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22802 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
22803 if test ${gl_cv_func_gettimeofday_posix_signature+y}
22804 then :
22805   printf %s "(cached) " >&6
22806 else
22807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22808 /* end confdefs.h.  */
22809 #include <sys/time.h>
22810               struct timeval c;
22811               int gettimeofday (struct timeval *restrict, void *restrict);
22812
22813 int
22814 main (void)
22815 {
22816 /* glibc uses struct timezone * rather than the POSIX void *
22817                  if _GNU_SOURCE is defined.  However, since the only portable
22818                  use of gettimeofday uses NULL as the second parameter, and
22819                  since the glibc definition is actually more typesafe, it is
22820                  not worth wrapping this to get a compliant signature.  */
22821               int (*f) (struct timeval *restrict, void *restrict)
22822                 = gettimeofday;
22823               int x = f (&c, 0);
22824               return !(x | c.tv_sec | c.tv_usec);
22825
22826   ;
22827   return 0;
22828 }
22829 _ACEOF
22830 if ac_fn_c_try_compile "$LINENO"
22831 then :
22832   gl_cv_func_gettimeofday_posix_signature=yes
22833 else
22834   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22835 /* end confdefs.h.  */
22836 #include <sys/time.h>
22837 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22838
22839 int
22840 main (void)
22841 {
22842
22843   ;
22844   return 0;
22845 }
22846 _ACEOF
22847 if ac_fn_c_try_compile "$LINENO"
22848 then :
22849   gl_cv_func_gettimeofday_posix_signature=almost
22850 else
22851   gl_cv_func_gettimeofday_posix_signature=no
22852 fi
22853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22854 fi
22855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22856 fi
22857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22858 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22859     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22860       gl_gettimeofday_timezone='struct timezone'
22861     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22862       REPLACE_GETTIMEOFDAY=1
22863     fi
22864         if test $REPLACE_STRUCT_TIMEVAL = 1; then
22865       REPLACE_GETTIMEOFDAY=1
22866     fi
22867             case "$host_os" in
22868       mingw*) REPLACE_GETTIMEOFDAY=1 ;;
22869     esac
22870   fi
22871
22872 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
22873
22874
22875   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22876
22877
22878
22879
22880
22881
22882
22883
22884   gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22885
22886     :
22887   fi
22888
22889
22890
22891
22892
22893           GNULIB_GETTIMEOFDAY=1
22894
22895
22896
22897
22898
22899 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22900
22901
22902
22903
22904    if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
22905   GNU_MAKE_TRUE=
22906   GNU_MAKE_FALSE='#'
22907 else
22908   GNU_MAKE_TRUE='#'
22909   GNU_MAKE_FALSE=
22910 fi
22911
22912
22913   # Autoconf 2.61a.99 and earlier don't support linking a file only
22914   # in VPATH builds.  But since GNUmakefile is for maintainer use
22915   # only, it does not matter if we skip the link with older autoconf.
22916   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
22917   # builds, so use a shell variable to bypass this.
22918   GNUmakefile=GNUmakefile
22919   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
22920
22921
22922
22923
22924   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
22925 printf %s "checking whether isnan(double) can be used without linking with libm... " >&6; }
22926 if test ${gl_cv_func_isnand_no_libm+y}
22927 then :
22928   printf %s "(cached) " >&6
22929 else
22930
22931       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22932 /* end confdefs.h.  */
22933 #include <math.h>
22934              #if __GNUC__ >= 4
22935              # undef isnand
22936              # define isnand(x) __builtin_isnan ((double)(x))
22937              #else
22938              # undef isnand
22939              # define isnand(x) isnan ((double)(x))
22940              #endif
22941              double x;
22942 int
22943 main (void)
22944 {
22945 return isnand (x);
22946   ;
22947   return 0;
22948 }
22949 _ACEOF
22950 if ac_fn_c_try_link "$LINENO"
22951 then :
22952   gl_cv_func_isnand_no_libm=yes
22953 else
22954   gl_cv_func_isnand_no_libm=no
22955 fi
22956 rm -f core conftest.err conftest.$ac_objext \
22957     conftest$ac_exeext conftest.$ac_ext
22958
22959 fi
22960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
22961 printf "%s\n" "$gl_cv_func_isnand_no_libm" >&6; }
22962
22963   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
22964   if test $gl_cv_func_isnand_no_libm = yes; then
22965
22966 printf "%s\n" "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
22967
22968   fi
22969
22970   if test $gl_func_isnand_no_libm != yes; then
22971
22972
22973
22974
22975
22976
22977
22978
22979   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
22980
22981
22982
22983
22984   fi
22985
22986
22987   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
22988 printf %s "checking whether isnan(float) can be used without linking with libm... " >&6; }
22989 if test ${gl_cv_func_isnanf_no_libm+y}
22990 then :
22991   printf %s "(cached) " >&6
22992 else
22993
22994       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22995 /* end confdefs.h.  */
22996 #include <math.h>
22997              #if __GNUC__ >= 4
22998              # undef isnanf
22999              # define isnanf(x) __builtin_isnanf ((float)(x))
23000              #elif defined isnan
23001              # undef isnanf
23002              # define isnanf(x) isnan ((float)(x))
23003              #endif
23004              float x;
23005 int
23006 main (void)
23007 {
23008 return isnanf (x);
23009   ;
23010   return 0;
23011 }
23012 _ACEOF
23013 if ac_fn_c_try_link "$LINENO"
23014 then :
23015   gl_cv_func_isnanf_no_libm=yes
23016 else
23017   gl_cv_func_isnanf_no_libm=no
23018 fi
23019 rm -f core conftest.err conftest.$ac_objext \
23020     conftest$ac_exeext conftest.$ac_ext
23021
23022 fi
23023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
23024 printf "%s\n" "$gl_cv_func_isnanf_no_libm" >&6; }
23025
23026   if test $gl_cv_func_isnanf_no_libm = yes; then
23027
23028
23029
23030   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
23031 printf %s "checking whether isnan(float) works... " >&6; }
23032 if test ${gl_cv_func_isnanf_works+y}
23033 then :
23034   printf %s "(cached) " >&6
23035 else
23036
23037       if test "$cross_compiling" = yes
23038 then :
23039   case "$host_os" in
23040            irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
23041            mingw*) # Guess yes on mingw, no on MSVC.
23042              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23043 /* end confdefs.h.  */
23044
23045 #ifdef __MINGW32__
23046  Known
23047 #endif
23048
23049 _ACEOF
23050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23051   $EGREP "Known" >/dev/null 2>&1
23052 then :
23053   gl_cv_func_isnanf_works="guessing yes"
23054 else
23055   gl_cv_func_isnanf_works="guessing no"
23056 fi
23057 rm -rf conftest*
23058
23059              ;;
23060            *) gl_cv_func_isnanf_works="guessing yes" ;;
23061          esac
23062
23063 else
23064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23065 /* end confdefs.h.  */
23066
23067 #include <math.h>
23068 #if __GNUC__ >= 4
23069 # undef isnanf
23070 # define isnanf(x) __builtin_isnanf ((float)(x))
23071 #elif defined isnan
23072 # undef isnanf
23073 # define isnanf(x) isnan ((float)(x))
23074 #endif
23075 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
23076 #ifdef __DECC
23077 static float
23078 NaN ()
23079 {
23080   static float zero = 0.0f;
23081   return zero / zero;
23082 }
23083 #else
23084 # define NaN() (0.0f / 0.0f)
23085 #endif
23086 #define NWORDS \
23087   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23088 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
23089 int main()
23090 {
23091   int result = 0;
23092
23093   if (isnanf (1.0f / 0.0f))
23094     result |= 1;
23095
23096   if (!isnanf (NaN ()))
23097     result |= 2;
23098
23099 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
23100   /* The isnanf function should be immune against changes in the sign bit and
23101      in the mantissa bits.  The xor operation twiddles a bit that can only be
23102      a sign bit or a mantissa bit.  */
23103   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
23104     {
23105       memory_float m;
23106
23107       m.value = NaN ();
23108       /* Set the bits below the exponent to 01111...111.  */
23109       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
23110       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
23111       if (!isnanf (m.value))
23112         result |= 4;
23113     }
23114 #endif
23115
23116   return result;
23117 }
23118 _ACEOF
23119 if ac_fn_c_try_run "$LINENO"
23120 then :
23121   gl_cv_func_isnanf_works=yes
23122 else
23123   gl_cv_func_isnanf_works=no
23124 fi
23125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23126   conftest.$ac_objext conftest.beam conftest.$ac_ext
23127 fi
23128
23129
23130 fi
23131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
23132 printf "%s\n" "$gl_cv_func_isnanf_works" >&6; }
23133
23134   fi
23135   if test $gl_cv_func_isnanf_no_libm = yes \
23136      && { case "$gl_cv_func_isnanf_works" in
23137             *yes) true;;
23138             *) false;;
23139           esac
23140         }; then
23141     gl_func_isnanf_no_libm=yes
23142
23143 printf "%s\n" "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
23144
23145   else
23146     gl_func_isnanf_no_libm=no
23147   fi
23148
23149   if test $gl_func_isnanf_no_libm != yes; then
23150
23151
23152
23153
23154
23155
23156
23157
23158   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
23159
23160
23161
23162   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
23163 printf %s "checking where to find the exponent in a 'float'... " >&6; }
23164 if test ${gl_cv_cc_float_expbit0+y}
23165 then :
23166   printf %s "(cached) " >&6
23167 else
23168
23169       if test "$cross_compiling" = yes
23170 then :
23171   gl_cv_cc_float_expbit0="word 0 bit 23"
23172 else
23173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23174 /* end confdefs.h.  */
23175
23176 #include <float.h>
23177 #include <stddef.h>
23178 #include <stdio.h>
23179 #include <string.h>
23180 #define NWORDS \
23181   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23182 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
23183 static unsigned int ored_words[NWORDS];
23184 static unsigned int anded_words[NWORDS];
23185 static void add_to_ored_words (float x)
23186 {
23187   memory_float m;
23188   size_t i;
23189   /* Clear it first, in case
23190      sizeof (float) < sizeof (memory_float).  */
23191   memset (&m, 0, sizeof (memory_float));
23192   m.value = x;
23193   for (i = 0; i < NWORDS; i++)
23194     {
23195       ored_words[i] |= m.word[i];
23196       anded_words[i] &= m.word[i];
23197     }
23198 }
23199 int main ()
23200 {
23201   size_t j;
23202   FILE *fp = fopen ("conftest.out", "w");
23203   if (fp == NULL)
23204     return 1;
23205   for (j = 0; j < NWORDS; j++)
23206     anded_words[j] = ~ (unsigned int) 0;
23207   add_to_ored_words (0.25f);
23208   add_to_ored_words (0.5f);
23209   add_to_ored_words (1.0f);
23210   add_to_ored_words (2.0f);
23211   add_to_ored_words (4.0f);
23212   /* Remove bits that are common (e.g. if representation of the first mantissa
23213      bit is explicit).  */
23214   for (j = 0; j < NWORDS; j++)
23215     ored_words[j] &= ~anded_words[j];
23216   /* Now find the nonzero word.  */
23217   for (j = 0; j < NWORDS; j++)
23218     if (ored_words[j] != 0)
23219       break;
23220   if (j < NWORDS)
23221     {
23222       size_t i;
23223       for (i = j + 1; i < NWORDS; i++)
23224         if (ored_words[i] != 0)
23225           {
23226             fprintf (fp, "unknown");
23227             return (fclose (fp) != 0);
23228           }
23229       for (i = 0; ; i++)
23230         if ((ored_words[j] >> i) & 1)
23231           {
23232             fprintf (fp, "word %d bit %d", (int) j, (int) i);
23233             return (fclose (fp) != 0);
23234           }
23235     }
23236   fprintf (fp, "unknown");
23237   return (fclose (fp) != 0);
23238 }
23239
23240 _ACEOF
23241 if ac_fn_c_try_run "$LINENO"
23242 then :
23243   gl_cv_cc_float_expbit0=`cat conftest.out`
23244 else
23245   gl_cv_cc_float_expbit0="unknown"
23246 fi
23247 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23248   conftest.$ac_objext conftest.beam conftest.$ac_ext
23249 fi
23250
23251       rm -f conftest.out
23252
23253 fi
23254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
23255 printf "%s\n" "$gl_cv_cc_float_expbit0" >&6; }
23256   case "$gl_cv_cc_float_expbit0" in
23257     word*bit*)
23258       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23259       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
23260
23261 printf "%s\n" "#define FLT_EXPBIT0_WORD $word" >>confdefs.h
23262
23263
23264 printf "%s\n" "#define FLT_EXPBIT0_BIT $bit" >>confdefs.h
23265
23266       ;;
23267   esac
23268
23269
23270   fi
23271
23272
23273   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23274 printf %s "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23275 if test ${gl_cv_func_isnanl_no_libm+y}
23276 then :
23277   printf %s "(cached) " >&6
23278 else
23279
23280       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23281 /* end confdefs.h.  */
23282 #include <math.h>
23283              #if __GNUC__ >= 4
23284              # undef isnanl
23285              # define isnanl(x) __builtin_isnanl ((long double)(x))
23286              #elif defined isnan
23287              # undef isnanl
23288              # define isnanl(x) isnan ((long double)(x))
23289              #endif
23290              long double x;
23291 int
23292 main (void)
23293 {
23294 return isnanl (x);
23295   ;
23296   return 0;
23297 }
23298 _ACEOF
23299 if ac_fn_c_try_link "$LINENO"
23300 then :
23301   gl_cv_func_isnanl_no_libm=yes
23302 else
23303   gl_cv_func_isnanl_no_libm=no
23304 fi
23305 rm -f core conftest.err conftest.$ac_objext \
23306     conftest$ac_exeext conftest.$ac_ext
23307
23308 fi
23309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23310 printf "%s\n" "$gl_cv_func_isnanl_no_libm" >&6; }
23311
23312   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23313   if test $gl_func_isnanl_no_libm = yes; then
23314
23315
23316
23317
23318      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23319 printf %s "checking whether isnanl works... " >&6; }
23320 if test ${gl_cv_func_isnanl_works+y}
23321 then :
23322   printf %s "(cached) " >&6
23323 else
23324
23325       if test "$cross_compiling" = yes
23326 then :
23327   case "$host_os" in
23328            mingw*) # Guess yes on mingw, no on MSVC.
23329              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23330 /* end confdefs.h.  */
23331
23332 #ifdef __MINGW32__
23333  Known
23334 #endif
23335
23336 _ACEOF
23337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23338   $EGREP "Known" >/dev/null 2>&1
23339 then :
23340   gl_cv_func_isnanl_works="guessing yes"
23341 else
23342   gl_cv_func_isnanl_works="guessing no"
23343 fi
23344 rm -rf conftest*
23345
23346              ;;
23347            *) gl_cv_func_isnanl_works="guessing yes" ;;
23348          esac
23349
23350 else
23351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23352 /* end confdefs.h.  */
23353
23354 #include <float.h>
23355 #include <limits.h>
23356 #include <math.h>
23357 #if __GNUC__ >= 4
23358 # undef isnanl
23359 # define isnanl(x) __builtin_isnanl ((long double)(x))
23360 #elif defined isnan
23361 # undef isnanl
23362 # define isnanl(x) isnan ((long double)(x))
23363 #endif
23364 #define NWORDS \
23365   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23366 typedef union { unsigned int word[NWORDS]; long double value; }
23367         memory_long_double;
23368 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23369    runtime type conversion.  */
23370 #ifdef __sgi
23371 static long double NaNl ()
23372 {
23373   double zero = 0.0;
23374   return zero / zero;
23375 }
23376 #else
23377 # define NaNl() (0.0L / 0.0L)
23378 #endif
23379 int main ()
23380 {
23381   int result = 0;
23382
23383   if (!isnanl (NaNl ()))
23384     result |= 1;
23385
23386   {
23387     memory_long_double m;
23388     unsigned int i;
23389
23390     /* The isnanl function should be immune against changes in the sign bit and
23391        in the mantissa bits.  The xor operation twiddles a bit that can only be
23392        a sign bit or a mantissa bit (since the exponent never extends to
23393        bit 31).  */
23394     m.value = NaNl ();
23395     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23396     for (i = 0; i < NWORDS; i++)
23397       m.word[i] |= 1;
23398     if (!isnanl (m.value))
23399       result |= 1;
23400   }
23401
23402 #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
23403 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23404    of 'unsigned int' words.  */
23405 # ifdef WORDS_BIGENDIAN
23406 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
23407      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23408        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
23409        (unsigned int) (mantlo) << 16                                        \
23410      }
23411 # else
23412 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
23413      { mantlo, manthi, exponent }
23414 # endif
23415   { /* Quiet NaN.  */
23416     static memory_long_double x =
23417       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23418     if (!isnanl (x.value))
23419       result |= 2;
23420   }
23421   {
23422     /* Signalling NaN.  */
23423     static memory_long_double x =
23424       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23425     if (!isnanl (x.value))
23426       result |= 2;
23427   }
23428   /* isnanl should return something even for noncanonical values.  */
23429   { /* Pseudo-NaN.  */
23430     static memory_long_double x =
23431       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23432     if (isnanl (x.value) && !isnanl (x.value))
23433       result |= 4;
23434   }
23435   { /* Pseudo-Infinity.  */
23436     static memory_long_double x =
23437       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23438     if (isnanl (x.value) && !isnanl (x.value))
23439       result |= 8;
23440   }
23441   { /* Pseudo-Zero.  */
23442     static memory_long_double x =
23443       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23444     if (isnanl (x.value) && !isnanl (x.value))
23445       result |= 16;
23446   }
23447   { /* Unnormalized number.  */
23448     static memory_long_double x =
23449       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23450     if (isnanl (x.value) && !isnanl (x.value))
23451       result |= 32;
23452   }
23453   { /* Pseudo-Denormal.  */
23454     static memory_long_double x =
23455       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23456     if (isnanl (x.value) && !isnanl (x.value))
23457       result |= 64;
23458   }
23459 #endif
23460
23461   return result;
23462 }
23463 _ACEOF
23464 if ac_fn_c_try_run "$LINENO"
23465 then :
23466   gl_cv_func_isnanl_works=yes
23467 else
23468   gl_cv_func_isnanl_works=no
23469 fi
23470 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23471   conftest.$ac_objext conftest.beam conftest.$ac_ext
23472 fi
23473
23474
23475 fi
23476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23477 printf "%s\n" "$gl_cv_func_isnanl_works" >&6; }
23478
23479     case "$gl_cv_func_isnanl_works" in
23480       *yes) ;;
23481       *)    gl_func_isnanl_no_libm=no ;;
23482     esac
23483   fi
23484   if test $gl_func_isnanl_no_libm = yes; then
23485
23486 printf "%s\n" "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23487
23488   fi
23489
23490   if test $gl_func_isnanl_no_libm != yes; then
23491
23492
23493
23494
23495
23496
23497
23498
23499   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23500
23501
23502
23503
23504      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23505 printf %s "checking where to find the exponent in a 'long double'... " >&6; }
23506 if test ${gl_cv_cc_long_double_expbit0+y}
23507 then :
23508   printf %s "(cached) " >&6
23509 else
23510
23511       if test "$cross_compiling" = yes
23512 then :
23513
23514                               gl_cv_cc_long_double_expbit0="unknown"
23515           case "$host_os" in
23516             mingw*) # On native Windows (little-endian), we know the result
23517                     # in two cases: mingw, MSVC.
23518               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23519 /* end confdefs.h.  */
23520
23521 #ifdef __MINGW32__
23522  Known
23523 #endif
23524
23525 _ACEOF
23526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23527   $EGREP "Known" >/dev/null 2>&1
23528 then :
23529   gl_cv_cc_long_double_expbit0="word 2 bit 0"
23530 fi
23531 rm -rf conftest*
23532
23533               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23534 /* end confdefs.h.  */
23535
23536 #ifdef _MSC_VER
23537  Known
23538 #endif
23539
23540 _ACEOF
23541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23542   $EGREP "Known" >/dev/null 2>&1
23543 then :
23544   gl_cv_cc_long_double_expbit0="word 1 bit 20"
23545 fi
23546 rm -rf conftest*
23547
23548               ;;
23549           esac
23550
23551 else
23552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23553 /* end confdefs.h.  */
23554
23555 #include <float.h>
23556 #include <stddef.h>
23557 #include <stdio.h>
23558 #include <string.h>
23559 #define NWORDS \
23560   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23561 typedef union { long double value; unsigned int word[NWORDS]; }
23562         memory_long_double;
23563 static unsigned int ored_words[NWORDS];
23564 static unsigned int anded_words[NWORDS];
23565 static void add_to_ored_words (long double x)
23566 {
23567   memory_long_double m;
23568   size_t i;
23569   /* Clear it first, in case
23570      sizeof (long double) < sizeof (memory_long_double).  */
23571   memset (&m, 0, sizeof (memory_long_double));
23572   m.value = x;
23573   for (i = 0; i < NWORDS; i++)
23574     {
23575       ored_words[i] |= m.word[i];
23576       anded_words[i] &= m.word[i];
23577     }
23578 }
23579 int main ()
23580 {
23581   size_t j;
23582   FILE *fp = fopen ("conftest.out", "w");
23583   if (fp == NULL)
23584     return 1;
23585   for (j = 0; j < NWORDS; j++)
23586     anded_words[j] = ~ (unsigned int) 0;
23587   add_to_ored_words (0.25L);
23588   add_to_ored_words (0.5L);
23589   add_to_ored_words (1.0L);
23590   add_to_ored_words (2.0L);
23591   add_to_ored_words (4.0L);
23592   /* Remove bits that are common (e.g. if representation of the first mantissa
23593      bit is explicit).  */
23594   for (j = 0; j < NWORDS; j++)
23595     ored_words[j] &= ~anded_words[j];
23596   /* Now find the nonzero word.  */
23597   for (j = 0; j < NWORDS; j++)
23598     if (ored_words[j] != 0)
23599       break;
23600   if (j < NWORDS)
23601     {
23602       size_t i;
23603       for (i = j + 1; i < NWORDS; i++)
23604         if (ored_words[i] != 0)
23605           {
23606             fprintf (fp, "unknown");
23607             return (fclose (fp) != 0);
23608           }
23609       for (i = 0; ; i++)
23610         if ((ored_words[j] >> i) & 1)
23611           {
23612             fprintf (fp, "word %d bit %d", (int) j, (int) i);
23613             return (fclose (fp) != 0);
23614           }
23615     }
23616   fprintf (fp, "unknown");
23617   return (fclose (fp) != 0);
23618 }
23619
23620 _ACEOF
23621 if ac_fn_c_try_run "$LINENO"
23622 then :
23623   gl_cv_cc_long_double_expbit0=`cat conftest.out`
23624 else
23625   gl_cv_cc_long_double_expbit0="unknown"
23626 fi
23627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23628   conftest.$ac_objext conftest.beam conftest.$ac_ext
23629 fi
23630
23631       rm -f conftest.out
23632
23633 fi
23634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23635 printf "%s\n" "$gl_cv_cc_long_double_expbit0" >&6; }
23636   case "$gl_cv_cc_long_double_expbit0" in
23637     word*bit*)
23638       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23639       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23640
23641 printf "%s\n" "#define LDBL_EXPBIT0_WORD $word" >>confdefs.h
23642
23643
23644 printf "%s\n" "#define LDBL_EXPBIT0_BIT $bit" >>confdefs.h
23645
23646       ;;
23647   esac
23648
23649
23650
23651   fi
23652
23653
23654   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler flag to ignore unused libraries" >&5
23655 printf %s "checking for C compiler flag to ignore unused libraries... " >&6; }
23656 if test ${gl_cv_prog_c_ignore_unused_libraries+y}
23657 then :
23658   printf %s "(cached) " >&6
23659 else
23660   gl_cv_prog_c_ignore_unused_libraries=none
23661      gl_saved_ldflags=$LDFLAGS
23662      gl_saved_libs=$LIBS
23663      # Link with -lm to detect binutils 2.16 bug with --as-needed; see
23664      # <https://lists.gnu.org/r/bug-gnulib/2006-06/msg00131.html>.
23665      LIBS="$LIBS -lm"
23666      # Use long option sequences like '-z ignore' to test for the feature,
23667      # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
23668      # GCC + binutils likes '-Wl,--as-needed'.
23669      # GCC + Solaris ld likes '-Wl,-z,ignore'.
23670      # Sun C likes '-Wl,-z,ignore'. '-z ignore' is accepted but has no effect.
23671      # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
23672      # native cc issues annoying warnings and then ignores it,
23673      # which would cause us to incorrectly conclude that it worked.
23674      for gl_flags in  '-Wl,--as-needed' \
23675   '-Wl,-z,ignore' \
23676   '-z ignore'
23677
23678      do
23679        LDFLAGS="$gl_flags $LDFLAGS"
23680        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23681 /* end confdefs.h.  */
23682
23683 int
23684 main (void)
23685 {
23686
23687   ;
23688   return 0;
23689 }
23690 _ACEOF
23691 if ac_fn_c_try_link "$LINENO"
23692 then :
23693   gl_cv_prog_c_ignore_unused_libraries=$gl_flags
23694 fi
23695 rm -f core conftest.err conftest.$ac_objext \
23696     conftest$ac_exeext conftest.$ac_ext
23697        LDFLAGS=$gl_saved_ldflags
23698        test "$gl_cv_prog_c_ignore_unused_libraries" != none &&
23699          break
23700      done
23701      LIBS=$gl_saved_libs
23702
23703 fi
23704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_c_ignore_unused_libraries" >&5
23705 printf "%s\n" "$gl_cv_prog_c_ignore_unused_libraries" >&6; }
23706   IGNORE_UNUSED_LIBRARIES_CFLAGS=
23707   if test "$gl_cv_prog_c_ignore_unused_libraries" != none; then
23708     IGNORE_UNUSED_LIBRARIES_CFLAGS="$gl_cv_prog_c_ignore_unused_libraries"
23709   fi
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722   gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
23723
23724
23725
23726   if test "$gl_threads_api" = posix; then
23727     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23728     # pthread_rwlock_* functions.
23729     has_rwlock=false
23730     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23731 "
23732 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
23733 then :
23734   has_rwlock=true
23735
23736 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23737
23738 fi
23739
23740     if $has_rwlock; then
23741
23742
23743   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23744 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23745 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
23746 then :
23747   printf %s "(cached) " >&6
23748 else
23749   save_LIBS="$LIBS"
23750      LIBS="$LIBS $LIBMULTITHREAD"
23751      if test "$cross_compiling" = yes
23752 then :
23753   gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23754 else
23755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23756 /* end confdefs.h.  */
23757
23758 #include <errno.h>
23759 #include <pthread.h>
23760 #include <stdlib.h>
23761 #include <unistd.h>
23762
23763 #define SUCCEED() exit (0)
23764 #define FAILURE() exit (1)
23765 #define UNEXPECTED(n) (exit (10 + (n)))
23766
23767 /* The main thread creates the waiting writer and the requesting reader threads
23768    in the default way; this guarantees that they have the same priority.
23769    We can reuse the main thread as first reader thread.  */
23770
23771 static pthread_rwlock_t lock;
23772 static pthread_t reader1;
23773 static pthread_t writer;
23774 static pthread_t reader2;
23775 static pthread_t timer;
23776 /* Used to pass control from writer to reader2 and from reader2 to timer,
23777    as in a relay race.
23778    Passing control from one running thread to another running thread
23779    is most likely faster than to create the second thread.  */
23780 static pthread_mutex_t baton;
23781
23782 static void *
23783 timer_func (void *ignored)
23784 {
23785   /* Step 13 (can be before or after step 12):
23786      The timer thread takes the baton, then waits a moment to make sure
23787      it can tell whether the second reader thread is blocked at step 12.  */
23788   if (pthread_mutex_lock (&baton))
23789     UNEXPECTED (13);
23790   usleep (100000);
23791   /* By the time we get here, it's clear that the second reader thread is
23792      blocked at step 12.  This is the desired behaviour.  */
23793   SUCCEED ();
23794 }
23795
23796 static void *
23797 reader2_func (void *ignored)
23798 {
23799   int err;
23800
23801   /* Step 8 (can be before or after step 7):
23802      The second reader thread takes the baton, then waits a moment to make sure
23803      the writer thread has reached step 7.  */
23804   if (pthread_mutex_lock (&baton))
23805     UNEXPECTED (8);
23806   usleep (100000);
23807   /* Step 9: The second reader thread requests the lock.  */
23808   err = pthread_rwlock_tryrdlock (&lock);
23809   if (err == 0)
23810     FAILURE ();
23811   else if (err != EBUSY)
23812     UNEXPECTED (9);
23813   /* Step 10: Launch a timer, to test whether the next call blocks.  */
23814   if (pthread_create (&timer, NULL, timer_func, NULL))
23815     UNEXPECTED (10);
23816   /* Step 11: Release the baton.  */
23817   if (pthread_mutex_unlock (&baton))
23818     UNEXPECTED (11);
23819   /* Step 12: The second reader thread requests the lock.  */
23820   err = pthread_rwlock_rdlock (&lock);
23821   if (err == 0)
23822     FAILURE ();
23823   else
23824     UNEXPECTED (12);
23825 }
23826
23827 static void *
23828 writer_func (void *ignored)
23829 {
23830   /* Step 4: Take the baton, so that the second reader thread does not go ahead
23831      too early.  */
23832   if (pthread_mutex_lock (&baton))
23833     UNEXPECTED (4);
23834   /* Step 5: Create the second reader thread.  */
23835   if (pthread_create (&reader2, NULL, reader2_func, NULL))
23836     UNEXPECTED (5);
23837   /* Step 6: Release the baton.  */
23838   if (pthread_mutex_unlock (&baton))
23839     UNEXPECTED (6);
23840   /* Step 7: The writer thread requests the lock.  */
23841   if (pthread_rwlock_wrlock (&lock))
23842     UNEXPECTED (7);
23843   return NULL;
23844 }
23845
23846 int
23847 main ()
23848 {
23849   reader1 = pthread_self ();
23850
23851   /* Step 1: The main thread initializes the lock and the baton.  */
23852   if (pthread_rwlock_init (&lock, NULL))
23853     UNEXPECTED (1);
23854   if (pthread_mutex_init (&baton, NULL))
23855     UNEXPECTED (1);
23856   /* Step 2: The main thread acquires the lock as a reader.  */
23857   if (pthread_rwlock_rdlock (&lock))
23858     UNEXPECTED (2);
23859   /* Step 3: Create the writer thread.  */
23860   if (pthread_create (&writer, NULL, writer_func, NULL))
23861     UNEXPECTED (3);
23862   /* Job done.  Go to sleep.  */
23863   for (;;)
23864     {
23865       sleep (1);
23866     }
23867 }
23868
23869 _ACEOF
23870 if ac_fn_c_try_run "$LINENO"
23871 then :
23872   gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
23873 else
23874   gl_cv_pthread_rwlock_rdlock_prefer_writer=no
23875 fi
23876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23877   conftest.$ac_objext conftest.beam conftest.$ac_ext
23878 fi
23879
23880      LIBS="$save_LIBS"
23881
23882 fi
23883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
23884 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
23885   case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
23886     *yes)
23887
23888 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
23889
23890       ;;
23891   esac
23892
23893     fi
23894     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
23895     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23896 /* end confdefs.h.  */
23897
23898       #include <pthread.h>
23899 int
23900 main (void)
23901 {
23902
23903 #if __FreeBSD__ == 4
23904 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
23905 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
23906        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
23907 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
23908 #else
23909 int x = (int)PTHREAD_MUTEX_RECURSIVE;
23910 return !x;
23911 #endif
23912
23913   ;
23914   return 0;
23915 }
23916 _ACEOF
23917 if ac_fn_c_try_compile "$LINENO"
23918 then :
23919
23920 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
23921
23922 fi
23923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23924   fi
23925   :
23926
23927
23928
23929 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
23930
23931
23932
23933
23934
23935
23936
23937
23938   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
23939 printf %s "checking whether lseek detects pipes... " >&6; }
23940 if test ${gl_cv_func_lseek_pipe+y}
23941 then :
23942   printf %s "(cached) " >&6
23943 else
23944   case "$host_os" in
23945        mingw*)
23946                                                                gl_cv_func_lseek_pipe=no
23947          ;;
23948        *)
23949          if test $cross_compiling = no; then
23950            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23951 /* end confdefs.h.  */
23952
23953 #include <sys/types.h> /* for off_t */
23954 #include <stdio.h> /* for SEEK_CUR */
23955 #if HAVE_UNISTD_H
23956 # include <unistd.h>
23957 #else /* on Windows with MSVC */
23958 # include <io.h>
23959 #endif
23960
23961 int
23962 main (void)
23963 {
23964
23965   /* Exit with success only if stdin is seekable.  */
23966   return lseek (0, (off_t)0, SEEK_CUR) < 0;
23967
23968   ;
23969   return 0;
23970 }
23971 _ACEOF
23972 if ac_fn_c_try_link "$LINENO"
23973 then :
23974   if test -s conftest$ac_exeext \
23975                  && ./conftest$ac_exeext < conftest.$ac_ext \
23976                  && test 1 = "`echo hi \
23977                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
23978                 gl_cv_func_lseek_pipe=yes
23979               else
23980                 gl_cv_func_lseek_pipe=no
23981               fi
23982
23983 else
23984   gl_cv_func_lseek_pipe=no
23985 fi
23986 rm -f core conftest.err conftest.$ac_objext \
23987     conftest$ac_exeext conftest.$ac_ext
23988          else
23989            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23990 /* end confdefs.h.  */
23991
23992 #if defined __BEOS__
23993 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
23994   Choke me.
23995 #endif
23996 _ACEOF
23997 if ac_fn_c_try_compile "$LINENO"
23998 then :
23999   gl_cv_func_lseek_pipe=yes
24000 else
24001   gl_cv_func_lseek_pipe=no
24002 fi
24003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24004          fi
24005          ;;
24006      esac
24007
24008 fi
24009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
24010 printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
24011   if test $gl_cv_func_lseek_pipe = no; then
24012     REPLACE_LSEEK=1
24013
24014 printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
24015
24016   fi
24017
24018
24019   if test $WINDOWS_64_BIT_OFF_T = 1; then
24020     REPLACE_LSEEK=1
24021   fi
24022
24023   if test $REPLACE_LSEEK = 1; then
24024
24025
24026
24027
24028
24029
24030
24031
24032   gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
24033
24034   fi
24035
24036
24037
24038
24039
24040           GNULIB_LSEEK=1
24041
24042
24043
24044
24045
24046 printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
24047
24048
24049
24050
24051
24052
24053
24054   if test $ac_cv_func_lstat = yes; then
24055
24056     case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
24057       solaris* | *no)
24058         REPLACE_LSTAT=1
24059         ;;
24060     esac
24061   else
24062     HAVE_LSTAT=0
24063   fi
24064
24065   if test $REPLACE_LSTAT = 1; then
24066
24067
24068
24069
24070
24071
24072
24073
24074   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24075
24076     :
24077   fi
24078
24079
24080
24081
24082
24083           GNULIB_LSTAT=1
24084
24085
24086
24087
24088
24089 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24090
24091
24092
24093
24094
24095
24096
24097
24098       ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24099 if test "x$ac_cv_header_stdlib_h" = xyes
24100 then :
24101   printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
24102
24103 fi
24104
24105   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
24106 printf %s "checking for GNU libc compatible malloc... " >&6; }
24107 if test ${ac_cv_func_malloc_0_nonnull+y}
24108 then :
24109   printf %s "(cached) " >&6
24110 else
24111   if test "$cross_compiling" = yes
24112 then :
24113   case "$host_os" in
24114           # Guess yes on platforms where we know the result.
24115           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
24116           | hpux* | solaris* | cygwin* | mingw*)
24117             ac_cv_func_malloc_0_nonnull=yes ;;
24118           # If we don't know, assume the worst.
24119           *) ac_cv_func_malloc_0_nonnull=no ;;
24120         esac
24121
24122 else
24123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24124 /* end confdefs.h.  */
24125 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
24126             # include <stdlib.h>
24127             #else
24128             char *malloc ();
24129             #endif
24130
24131 int
24132 main (void)
24133 {
24134 char *p = malloc (0);
24135             int result = !p;
24136             free (p);
24137             return result;
24138   ;
24139   return 0;
24140 }
24141
24142 _ACEOF
24143 if ac_fn_c_try_run "$LINENO"
24144 then :
24145   ac_cv_func_malloc_0_nonnull=yes
24146 else
24147   ac_cv_func_malloc_0_nonnull=no
24148 fi
24149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24150   conftest.$ac_objext conftest.beam conftest.$ac_ext
24151 fi
24152
24153
24154 fi
24155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
24156 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
24157   if test $ac_cv_func_malloc_0_nonnull = yes
24158 then :
24159
24160 printf "%s\n" "#define HAVE_MALLOC_GNU 1" >>confdefs.h
24161
24162 else
24163   printf "%s\n" "#define HAVE_MALLOC_GNU 0" >>confdefs.h
24164
24165      REPLACE_MALLOC=1
24166
24167 fi
24168
24169
24170   if test $REPLACE_MALLOC = 1; then
24171
24172
24173
24174
24175
24176
24177
24178
24179   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24180
24181   fi
24182
24183
24184 printf "%s\n" "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
24185
24186
24187
24188
24189
24190   if test $gl_cv_func_malloc_posix = yes; then
24191
24192 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24193
24194   else
24195     REPLACE_MALLOC=1
24196   fi
24197
24198   if test $REPLACE_MALLOC = 1; then
24199
24200
24201
24202
24203
24204
24205
24206
24207   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24208
24209   fi
24210
24211
24212
24213
24214
24215           GNULIB_MALLOC_POSIX=1
24216
24217
24218
24219
24220
24221 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240      if test $gl_cv_have_include_next = yes; then
24241        gl_cv_next_math_h='<'math.h'>'
24242      else
24243        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
24244 printf %s "checking absolute name of <math.h>... " >&6; }
24245 if test ${gl_cv_next_math_h+y}
24246 then :
24247   printf %s "(cached) " >&6
24248 else
24249
24250              if test $ac_cv_header_math_h = yes; then
24251
24252
24253
24254
24255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24256 /* end confdefs.h.  */
24257 #include <math.h>
24258 _ACEOF
24259                 case "$host_os" in
24260     aix*) gl_absname_cpp="$ac_cpp -C" ;;
24261     *)    gl_absname_cpp="$ac_cpp" ;;
24262   esac
24263
24264   case "$host_os" in
24265     mingw*)
24266                                           gl_dirsep_regex='[/\\]'
24267       ;;
24268     *)
24269       gl_dirsep_regex='\/'
24270       ;;
24271   esac
24272       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24273   gl_header_literal_regex=`echo 'math.h' \
24274                            | sed -e "$gl_make_literal_regex_sed"`
24275   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24276       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24277       s|^/[^/]|//&|
24278       p
24279       q
24280     }'
24281
24282         gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24283   sed -n "$gl_absolute_header_sed"`
24284
24285            gl_header=$gl_cv_absolute_math_h
24286            gl_cv_next_math_h='"'$gl_header'"'
24287           else
24288                gl_cv_next_math_h='<'math.h'>'
24289              fi
24290
24291
24292 fi
24293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
24294 printf "%s\n" "$gl_cv_next_math_h" >&6; }
24295      fi
24296      NEXT_MATH_H=$gl_cv_next_math_h
24297
24298      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24299        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24300        gl_next_as_first_directive='<'math.h'>'
24301      else
24302        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24303        gl_next_as_first_directive=$gl_cv_next_math_h
24304      fi
24305      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
24306
24307
24308
24309
24310
24311   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
24312 printf %s "checking whether NAN macro works... " >&6; }
24313 if test ${gl_cv_header_math_nan_works+y}
24314 then :
24315   printf %s "(cached) " >&6
24316 else
24317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24318 /* end confdefs.h.  */
24319 #include <math.h>
24320 int
24321 main (void)
24322 {
24323 /* Solaris 10 has a broken definition of NAN.  Other platforms
24324         fail to provide NAN, or provide it only in C99 mode; this
24325         test only needs to fail when NAN is provided but wrong.  */
24326          float f = 1.0f;
24327 #ifdef NAN
24328          f = NAN;
24329 #endif
24330          return f == 0;
24331   ;
24332   return 0;
24333 }
24334 _ACEOF
24335 if ac_fn_c_try_compile "$LINENO"
24336 then :
24337   gl_cv_header_math_nan_works=yes
24338 else
24339   gl_cv_header_math_nan_works=no
24340 fi
24341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24342 fi
24343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
24344 printf "%s\n" "$gl_cv_header_math_nan_works" >&6; }
24345   if test $gl_cv_header_math_nan_works = no; then
24346     REPLACE_NAN=1
24347   fi
24348   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
24349 printf %s "checking whether HUGE_VAL works... " >&6; }
24350 if test ${gl_cv_header_math_huge_val_works+y}
24351 then :
24352   printf %s "(cached) " >&6
24353 else
24354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24355 /* end confdefs.h.  */
24356 #include <math.h>
24357 int
24358 main (void)
24359 {
24360 /* Solaris 10 has a broken definition of HUGE_VAL.  */
24361          double d = HUGE_VAL;
24362          return d == 0;
24363   ;
24364   return 0;
24365 }
24366 _ACEOF
24367 if ac_fn_c_try_compile "$LINENO"
24368 then :
24369   gl_cv_header_math_huge_val_works=yes
24370 else
24371   gl_cv_header_math_huge_val_works=no
24372 fi
24373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24374 fi
24375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
24376 printf "%s\n" "$gl_cv_header_math_huge_val_works" >&6; }
24377   if test $gl_cv_header_math_huge_val_works = no; then
24378     REPLACE_HUGE_VAL=1
24379   fi
24380
24381
24382
24383
24384   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
24385
24386
24387
24388
24389
24390
24391
24392
24393   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24394
24395
24396   ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24397 if test "x$ac_cv_header_bp_sym_h" = xyes
24398 then :
24399   printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
24400
24401 fi
24402
24403
24404   fi
24405
24406
24407
24408
24409
24410           GNULIB_MEMCHR=1
24411
24412
24413
24414
24415
24416 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
24427 if test "x$ac_cv_func_mempcpy" = xyes
24428 then :
24429   printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
24430
24431 fi
24432
24433   if test $ac_cv_func_mempcpy = no; then
24434     HAVE_MEMPCPY=0
24435   fi
24436
24437   if test $HAVE_MEMPCPY = 0; then
24438
24439
24440
24441
24442
24443
24444
24445
24446   gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
24447
24448
24449   :
24450
24451   fi
24452
24453
24454
24455
24456
24457           GNULIB_MEMPCPY=1
24458
24459
24460
24461
24462
24463 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
24464
24465
24466
24467
24468
24469
24470
24471
24472   if test $ac_cv_have_decl_memrchr = no; then
24473     HAVE_DECL_MEMRCHR=0
24474   fi
24475
24476   ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24477 if test "x$ac_cv_func_memrchr" = xyes
24478 then :
24479   printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
24480
24481 fi
24482
24483
24484   if test $ac_cv_func_memrchr = no; then
24485
24486
24487
24488
24489
24490
24491
24492
24493   gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24494
24495     :
24496   fi
24497
24498
24499
24500
24501
24502           GNULIB_MEMRCHR=1
24503
24504
24505
24506
24507
24508 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24509
24510
24511
24512
24513   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24514
24515
24516
24517
24518
24519
24520
24521
24522   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24523
24524   fi
24525
24526   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24527
24528
24529
24530
24531
24532
24533
24534
24535   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24536
24537   fi
24538
24539
24540 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
24541
24542
24543
24544
24545
24546
24547   case "$host_os" in
24548     mingw* | pw*)
24549       REPLACE_OPEN=1
24550       ;;
24551     *)
24552
24553       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
24554         REPLACE_OPEN=1
24555       fi
24556       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24557 printf %s "checking whether open recognizes a trailing slash... " >&6; }
24558 if test ${gl_cv_func_open_slash+y}
24559 then :
24560   printf %s "(cached) " >&6
24561 else
24562   # Assume that if we have lstat, we can also check symlinks.
24563           if test $ac_cv_func_lstat = yes; then
24564             touch conftest.tmp
24565             ln -s conftest.tmp conftest.lnk
24566           fi
24567           if test "$cross_compiling" = yes
24568 then :
24569
24570              case "$host_os" in
24571                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24572                  gl_cv_func_open_slash="guessing no" ;;
24573                *)
24574                  gl_cv_func_open_slash="guessing yes" ;;
24575              esac
24576
24577 else
24578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24579 /* end confdefs.h.  */
24580
24581 #include <fcntl.h>
24582 #if HAVE_UNISTD_H
24583 # include <unistd.h>
24584 #endif
24585 int main ()
24586 {
24587   int result = 0;
24588 #if HAVE_LSTAT
24589   if (open ("conftest.lnk/", O_RDONLY) != -1)
24590     result |= 1;
24591 #endif
24592   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24593     result |= 2;
24594   return result;
24595 }
24596 _ACEOF
24597 if ac_fn_c_try_run "$LINENO"
24598 then :
24599   gl_cv_func_open_slash=yes
24600 else
24601   gl_cv_func_open_slash=no
24602 fi
24603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24604   conftest.$ac_objext conftest.beam conftest.$ac_ext
24605 fi
24606
24607           rm -f conftest.sl conftest.tmp conftest.lnk
24608
24609 fi
24610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
24611 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
24612       case "$gl_cv_func_open_slash" in
24613         *no)
24614
24615 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
24616
24617           REPLACE_OPEN=1
24618           ;;
24619       esac
24620       ;;
24621   esac
24622
24623     if test $REPLACE_OPEN = 0; then
24624
24625
24626
24627   if test $ac_cv_func_fchdir = no; then
24628     HAVE_FCHDIR=0
24629   fi
24630
24631       if test $HAVE_FCHDIR = 0; then
24632         REPLACE_OPEN=1
24633       fi
24634     fi
24635
24636
24637
24638   if test $REPLACE_OPEN = 1; then
24639
24640
24641
24642
24643
24644
24645
24646
24647   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
24648
24649
24650
24651   :
24652
24653   fi
24654
24655
24656
24657
24658
24659           GNULIB_OPEN=1
24660
24661
24662
24663
24664
24665 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675   case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
24676   yes+*yes+yes)
24677     ;;
24678   yes+*)
24679     # Solaris 10 lacks O_CLOEXEC.
24680     # Solaris 9 has *at functions, but uniformly mishandles trailing
24681     # slash in all of them.
24682     REPLACE_OPENAT=1
24683     ;;
24684   *)
24685     HAVE_OPENAT=0
24686     ;;
24687   esac
24688
24689   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
24690
24691
24692
24693
24694
24695
24696
24697
24698   gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
24699
24700
24701
24702   :
24703
24704   fi
24705
24706
24707 printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
24708
24709
24710
24711
24712
24713
24714           GNULIB_OPENAT=1
24715
24716
24717
24718
24719
24720 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
24721
24722
24723
24724
24725
24726
24727
24728
24729 printf "%s\n" "#define GNULIB_OPENAT_SAFER 1" >>confdefs.h
24730
24731
24732
24733
24734
24735   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
24736 if test "x$ac_cv_func_opendir" = xyes
24737 then :
24738   printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
24739
24740 fi
24741
24742   if test $ac_cv_func_opendir = no; then
24743     HAVE_OPENDIR=0
24744   fi
24745
24746
24747
24748
24749   if test $ac_cv_func_fchdir = no; then
24750     HAVE_FCHDIR=0
24751   fi
24752
24753     if test $HAVE_FCHDIR = 0; then
24754       if test $HAVE_OPENDIR = 1; then
24755         REPLACE_OPENDIR=1
24756       fi
24757     fi
24758
24759       case $host_os,$HAVE_OPENDIR in
24760     os2*,1)
24761       REPLACE_OPENDIR=1;;
24762   esac
24763
24764   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
24765
24766
24767
24768
24769
24770
24771
24772
24773   gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
24774
24775   fi
24776
24777
24778
24779
24780
24781           GNULIB_OPENDIR=1
24782
24783
24784
24785
24786
24787 printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799              if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
24800             REPLACE_PERROR=1
24801   fi
24802   case ${gl_cv_func_strerror_r_works-unset} in
24803     unset|*yes)
24804       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
24805 printf %s "checking whether perror matches strerror... " >&6; }
24806 if test ${gl_cv_func_perror_works+y}
24807 then :
24808   printf %s "(cached) " >&6
24809 else
24810   if test "$cross_compiling" = yes
24811 then :
24812   case "$host_os" in
24813                       # Guess yes on native Windows.
24814               mingw*) gl_cv_func_perror_works="guessing yes" ;;
24815                       # Otherwise guess no.
24816               *)      gl_cv_func_perror_works="guessing no" ;;
24817             esac
24818
24819 else
24820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24821 /* end confdefs.h.  */
24822 #include <errno.h>
24823                 #include <stdio.h>
24824                 #include <stdlib.h>
24825                 #include <string.h>
24826
24827 int
24828 main (void)
24829 {
24830 char *str = strerror (-1);
24831                 if (!getenv("CONFTEST_OUTPUT")) return 0;
24832                 if (!str) str = "";
24833                 puts (str);
24834                 errno = -1;
24835                 perror ("");
24836                 return 0;
24837
24838   ;
24839   return 0;
24840 }
24841 _ACEOF
24842 if ac_fn_c_try_run "$LINENO"
24843 then :
24844   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
24845                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
24846               gl_cv_func_perror_works=yes
24847             else
24848               gl_cv_func_perror_works=no
24849             fi
24850             rm -rf conftest.txt1 conftest.txt2
24851 else
24852   gl_cv_func_perror_works=no
24853 fi
24854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24855   conftest.$ac_objext conftest.beam conftest.$ac_ext
24856 fi
24857
24858
24859 fi
24860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
24861 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
24862       case "$gl_cv_func_perror_works" in
24863         *yes) ;;
24864         *) REPLACE_PERROR=1 ;;
24865       esac
24866       ;;
24867     *)
24868                   REPLACE_PERROR=1
24869       ;;
24870   esac
24871
24872   if test $REPLACE_PERROR = 1; then
24873
24874
24875
24876
24877
24878
24879
24880
24881   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
24882
24883   fi
24884
24885
24886
24887
24888
24889           GNULIB_PERROR=1
24890
24891
24892
24893
24894
24895 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
24896
24897
24898
24899
24900
24901   if test $gl_cv_func_frexp_no_libm = yes; then
24902
24903
24904
24905   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
24906 printf %s "checking whether frexp works... " >&6; }
24907 if test ${gl_cv_func_frexp_works+y}
24908 then :
24909   printf %s "(cached) " >&6
24910 else
24911
24912       if test "$cross_compiling" = yes
24913 then :
24914   case "$host_os" in
24915            netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
24916            mingw*) # Guess yes with MSVC, no with mingw.
24917              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24918 /* end confdefs.h.  */
24919
24920 #ifdef _MSC_VER
24921  Good
24922 #endif
24923
24924 _ACEOF
24925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24926   $EGREP "Good" >/dev/null 2>&1
24927 then :
24928   gl_cv_func_frexp_works="guessing yes"
24929 else
24930   gl_cv_func_frexp_works="guessing no"
24931 fi
24932 rm -rf conftest*
24933
24934              ;;
24935            *) gl_cv_func_frexp_works="guessing yes" ;;
24936          esac
24937
24938 else
24939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24940 /* end confdefs.h.  */
24941
24942 #include <float.h>
24943 #include <math.h>
24944 #include <string.h>
24945 #if HAVE_DECL_ALARM
24946 # include <signal.h>
24947 # include <unistd.h>
24948 #endif
24949 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24950    ICC 10.0 has a bug when optimizing the expression -zero.
24951    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
24952    to PowerPC on Mac OS X 10.5.  */
24953 #if defined __hpux || defined __sgi || defined __ICC
24954 static double
24955 compute_minus_zero (void)
24956 {
24957   return -DBL_MIN * DBL_MIN;
24958 }
24959 # define minus_zero compute_minus_zero ()
24960 #else
24961 double minus_zero = -0.0;
24962 #endif
24963 int main()
24964 {
24965   int result = 0;
24966   int i;
24967   volatile double x;
24968   double zero = 0.0;
24969 #if HAVE_DECL_ALARM
24970   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
24971      number.  Let the test fail in this case.  */
24972   signal (SIGALRM, SIG_DFL);
24973   alarm (5);
24974 #endif
24975   /* Test on denormalized numbers.  */
24976   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
24977     ;
24978   if (x > 0.0)
24979     {
24980       int exp;
24981       double y = frexp (x, &exp);
24982       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
24983          On NetBSD: y = 0.75. Correct: y = 0.5.  */
24984       if (y != 0.5)
24985         result |= 1;
24986     }
24987   /* Test on infinite numbers.  */
24988   x = 1.0 / zero;
24989   {
24990     int exp;
24991     double y = frexp (x, &exp);
24992     if (y != x)
24993       result |= 2;
24994   }
24995   /* Test on negative zero.  */
24996   x = minus_zero;
24997   {
24998     int exp;
24999     double y = frexp (x, &exp);
25000     if (memcmp (&y, &x, sizeof x))
25001       result |= 4;
25002   }
25003   return result;
25004 }
25005 _ACEOF
25006 if ac_fn_c_try_run "$LINENO"
25007 then :
25008   gl_cv_func_frexp_works=yes
25009 else
25010   gl_cv_func_frexp_works=no
25011 fi
25012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25013   conftest.$ac_objext conftest.beam conftest.$ac_ext
25014 fi
25015
25016
25017 fi
25018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
25019 printf "%s\n" "$gl_cv_func_frexp_works" >&6; }
25020
25021     case "$gl_cv_func_frexp_works" in
25022       *yes)
25023
25024 printf "%s\n" "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
25025
25026         ;;
25027     esac
25028   fi
25029
25030   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
25031 printf %s "checking whether ldexp can be used without linking with libm... " >&6; }
25032 if test ${gl_cv_func_ldexp_no_libm+y}
25033 then :
25034   printf %s "(cached) " >&6
25035 else
25036
25037       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25038 /* end confdefs.h.  */
25039 #include <math.h>
25040              double x;
25041              int y;
25042 int
25043 main (void)
25044 {
25045 return ldexp (x, y) < 1;
25046   ;
25047   return 0;
25048 }
25049 _ACEOF
25050 if ac_fn_c_try_link "$LINENO"
25051 then :
25052   gl_cv_func_ldexp_no_libm=yes
25053 else
25054   gl_cv_func_ldexp_no_libm=no
25055 fi
25056 rm -f core conftest.err conftest.$ac_objext \
25057     conftest$ac_exeext conftest.$ac_ext
25058
25059 fi
25060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
25061 printf "%s\n" "$gl_cv_func_ldexp_no_libm" >&6; }
25062   if test $gl_cv_func_ldexp_no_libm = yes; then
25063
25064 printf "%s\n" "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
25065
25066   fi
25067
25068
25069
25070
25071
25072
25073   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
25074 printf %s "checking whether frexpl() can be used without linking with libm... " >&6; }
25075 if test ${gl_cv_func_frexpl_no_libm+y}
25076 then :
25077   printf %s "(cached) " >&6
25078 else
25079
25080       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25081 /* end confdefs.h.  */
25082 #include <math.h>
25083              long double x;
25084 int
25085 main (void)
25086 {
25087 int e; return frexpl (x, &e) > 0;
25088   ;
25089   return 0;
25090 }
25091 _ACEOF
25092 if ac_fn_c_try_link "$LINENO"
25093 then :
25094   gl_cv_func_frexpl_no_libm=yes
25095 else
25096   gl_cv_func_frexpl_no_libm=no
25097 fi
25098 rm -f core conftest.err conftest.$ac_objext \
25099     conftest$ac_exeext conftest.$ac_ext
25100
25101 fi
25102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
25103 printf "%s\n" "$gl_cv_func_frexpl_no_libm" >&6; }
25104
25105   if test $gl_cv_func_frexpl_no_libm = yes; then
25106
25107
25108      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
25109 printf %s "checking whether frexpl works... " >&6; }
25110 if test ${gl_cv_func_frexpl_works+y}
25111 then :
25112   printf %s "(cached) " >&6
25113 else
25114
25115       if test "$cross_compiling" = yes
25116 then :
25117
25118          case "$host_os" in
25119            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
25120               gl_cv_func_frexpl_works="guessing no";;
25121            *) gl_cv_func_frexpl_works="guessing yes";;
25122          esac
25123
25124 else
25125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25126 /* end confdefs.h.  */
25127
25128 #include <float.h>
25129 #include <math.h>
25130 /* Override the values of <float.h>, like done in float.in.h.  */
25131 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
25132 # undef LDBL_MIN_EXP
25133 # define LDBL_MIN_EXP    (-16381)
25134 #endif
25135 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
25136 # undef LDBL_MIN_EXP
25137 # define LDBL_MIN_EXP    (-16381)
25138 #endif
25139 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
25140 # undef LDBL_MIN_EXP
25141 # define LDBL_MIN_EXP DBL_MIN_EXP
25142 #endif
25143 #if defined __sgi && (LDBL_MANT_DIG >= 106)
25144 # if defined __GNUC__
25145 #  undef LDBL_MIN_EXP
25146 #  define LDBL_MIN_EXP DBL_MIN_EXP
25147 # endif
25148 #endif
25149 extern
25150 #ifdef __cplusplus
25151 "C"
25152 #endif
25153 long double frexpl (long double, int *);
25154 int main()
25155 {
25156   int result = 0;
25157   volatile long double x;
25158   /* Test on finite numbers that fails on AIX 5.1.  */
25159   x = 16.0L;
25160   {
25161     int exp = -9999;
25162     frexpl (x, &exp);
25163     if (exp != 5)
25164       result |= 1;
25165   }
25166   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
25167      function returns an invalid (incorrectly normalized) value: it returns
25168                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
25169      but the correct result is
25170           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
25171   x = 1.01L;
25172   {
25173     int exp = -9999;
25174     long double y = frexpl (x, &exp);
25175     if (!(exp == 1 && y == 0.505L))
25176       result |= 2;
25177   }
25178   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
25179      LDBL_MAX_EXP = 16384.
25180      In the loop end test, we test x against Infinity, rather than comparing
25181      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
25182   {
25183     int i;
25184     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
25185       {
25186         int exp = -9999;
25187         frexpl (x, &exp);
25188         if (exp != i)
25189           {
25190             result |= 4;
25191             break;
25192           }
25193       }
25194   }
25195   /* Test on denormalized numbers.  */
25196   {
25197     int i;
25198     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
25199       ;
25200     if (x > 0.0L)
25201       {
25202         int exp;
25203         long double y = frexpl (x, &exp);
25204         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
25205            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
25206         if (exp != LDBL_MIN_EXP - 1)
25207           result |= 8;
25208       }
25209   }
25210   /* Test on infinite numbers.  */
25211   x = 1.0L / 0.0L;
25212   {
25213     int exp;
25214     long double y = frexpl (x, &exp);
25215     if (y != x)
25216       result |= 16;
25217   }
25218   return result;
25219 }
25220 _ACEOF
25221 if ac_fn_c_try_run "$LINENO"
25222 then :
25223   gl_cv_func_frexpl_works=yes
25224 else
25225   gl_cv_func_frexpl_works=no
25226 fi
25227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25228   conftest.$ac_objext conftest.beam conftest.$ac_ext
25229 fi
25230
25231
25232 fi
25233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
25234 printf "%s\n" "$gl_cv_func_frexpl_works" >&6; }
25235
25236     case "$gl_cv_func_frexpl_works" in
25237       *yes) gl_func_frexpl_no_libm=yes ;;
25238       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
25239     esac
25240   else
25241     gl_func_frexpl_no_libm=no
25242         REPLACE_FREXPL=1
25243   fi
25244   if test $gl_func_frexpl_no_libm = yes; then
25245
25246 printf "%s\n" "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
25247
25248             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
25249 "
25250 if test "x$ac_cv_have_decl_frexpl" = xyes
25251 then :
25252
25253 else
25254   HAVE_DECL_FREXPL=0
25255 fi
25256
25257   fi
25258
25259
25260   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
25261 printf %s "checking whether ldexpl() can be used without linking with libm... " >&6; }
25262 if test ${gl_cv_func_ldexpl_no_libm+y}
25263 then :
25264   printf %s "(cached) " >&6
25265 else
25266
25267       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25268 /* end confdefs.h.  */
25269 #include <math.h>
25270              long double x;
25271 int
25272 main (void)
25273 {
25274 return ldexpl (x, -1) > 0;
25275   ;
25276   return 0;
25277 }
25278 _ACEOF
25279 if ac_fn_c_try_link "$LINENO"
25280 then :
25281   gl_cv_func_ldexpl_no_libm=yes
25282 else
25283   gl_cv_func_ldexpl_no_libm=no
25284 fi
25285 rm -f core conftest.err conftest.$ac_objext \
25286     conftest$ac_exeext conftest.$ac_ext
25287
25288 fi
25289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
25290 printf "%s\n" "$gl_cv_func_ldexpl_no_libm" >&6; }
25291
25292   if test $gl_cv_func_ldexpl_no_libm = yes; then
25293
25294
25295      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
25296 printf %s "checking whether ldexpl works... " >&6; }
25297 if test ${gl_cv_func_ldexpl_works+y}
25298 then :
25299   printf %s "(cached) " >&6
25300 else
25301
25302       if test "$cross_compiling" = yes
25303 then :
25304
25305          case "$host_os" in
25306            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
25307                             # Guess yes on native Windows.
25308            mingw*)          gl_cv_func_ldexpl_works="guessing yes" ;;
25309            *)               gl_cv_func_ldexpl_works="guessing yes" ;;
25310          esac
25311
25312 else
25313   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25314 /* end confdefs.h.  */
25315
25316 #include <math.h>
25317 extern
25318 #ifdef __cplusplus
25319 "C"
25320 #endif
25321 long double ldexpl (long double, int);
25322 int main()
25323 {
25324   int result = 0;
25325   {
25326     volatile long double x = 1.0;
25327     volatile long double y = ldexpl (x, -1);
25328     if (y != 0.5L)
25329       result |= 1;
25330   }
25331   {
25332     volatile long double x = 1.73205L;
25333     volatile long double y = ldexpl (x, 0);
25334     if (y != x)
25335       result |= 2;
25336   }
25337   return result;
25338 }
25339 _ACEOF
25340 if ac_fn_c_try_run "$LINENO"
25341 then :
25342   gl_cv_func_ldexpl_works=yes
25343 else
25344   gl_cv_func_ldexpl_works=no
25345 fi
25346 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25347   conftest.$ac_objext conftest.beam conftest.$ac_ext
25348 fi
25349
25350
25351 fi
25352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
25353 printf "%s\n" "$gl_cv_func_ldexpl_works" >&6; }
25354
25355     case "$gl_cv_func_ldexpl_works" in
25356       *yes)
25357
25358 printf "%s\n" "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
25359
25360                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
25361 "
25362 if test "x$ac_cv_have_decl_ldexpl" = xyes
25363 then :
25364
25365 else
25366   HAVE_DECL_LDEXPL=0
25367 fi
25368
25369         ;;
25370     esac
25371   fi
25372
25373
25374
25375   if test $gl_cv_func_vfprintf_posix = no; then
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387   gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
25388
25389   REPLACE_PRINTF=1
25390
25391 printf "%s\n" "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
25392
25393   :
25394
25395   fi
25396
25397
25398
25399
25400
25401
25402           GNULIB_PRINTF_POSIX=1
25403
25404
25405
25406
25407
25408 printf "%s\n" "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
25409
25410
25411
25412
25413
25414
25415
25416   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25417 if test "x$ac_cv_func_readdir" = xyes
25418 then :
25419   printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
25420
25421 fi
25422
25423   if test $ac_cv_func_readdir = no; then
25424     HAVE_READDIR=0
25425   fi
25426
25427   if test $HAVE_READDIR = 0; then
25428
25429
25430
25431
25432
25433
25434
25435
25436   gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25437
25438   fi
25439
25440
25441
25442
25443
25444           GNULIB_READDIR=1
25445
25446
25447
25448
25449
25450 printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25451
25452
25453
25454
25455
25456
25457       ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
25458 if test "x$ac_cv_header_stdlib_h" = xyes
25459 then :
25460   printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
25461
25462 fi
25463
25464   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
25465 printf %s "checking for GNU libc compatible realloc... " >&6; }
25466 if test ${ac_cv_func_realloc_0_nonnull+y}
25467 then :
25468   printf %s "(cached) " >&6
25469 else
25470   if test "$cross_compiling" = yes
25471 then :
25472   case "$host_os" in
25473           # Guess yes on platforms where we know the result.
25474           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
25475           | hpux* | solaris* | cygwin* | mingw*)
25476             ac_cv_func_realloc_0_nonnull=yes ;;
25477           # If we don't know, assume the worst.
25478           *) ac_cv_func_realloc_0_nonnull=no ;;
25479         esac
25480
25481 else
25482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25483 /* end confdefs.h.  */
25484 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
25485             # include <stdlib.h>
25486             #else
25487             char *realloc ();
25488             #endif
25489
25490 int
25491 main (void)
25492 {
25493 char *p = realloc (0, 0);
25494             int result = !p;
25495             free (p);
25496             return result;
25497   ;
25498   return 0;
25499 }
25500
25501 _ACEOF
25502 if ac_fn_c_try_run "$LINENO"
25503 then :
25504   ac_cv_func_realloc_0_nonnull=yes
25505 else
25506   ac_cv_func_realloc_0_nonnull=no
25507 fi
25508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25509   conftest.$ac_objext conftest.beam conftest.$ac_ext
25510 fi
25511
25512
25513 fi
25514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
25515 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
25516   if test $ac_cv_func_realloc_0_nonnull = yes
25517 then :
25518
25519 printf "%s\n" "#define HAVE_REALLOC_GNU 1" >>confdefs.h
25520
25521 else
25522   printf "%s\n" "#define HAVE_REALLOC_GNU 0" >>confdefs.h
25523
25524      REPLACE_REALLOC=1
25525
25526 fi
25527
25528
25529   if test $REPLACE_REALLOC = 1; then
25530
25531
25532
25533
25534
25535
25536
25537
25538   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25539
25540   fi
25541
25542
25543 printf "%s\n" "#define GNULIB_REALLOC_GNU 1" >>confdefs.h
25544
25545
25546
25547
25548
25549   if test $gl_cv_func_malloc_posix = yes; then
25550
25551 printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
25552
25553   else
25554     REPLACE_REALLOC=1
25555   fi
25556
25557   if test $REPLACE_REALLOC = 1; then
25558
25559
25560
25561
25562
25563
25564
25565
25566   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
25567
25568   fi
25569
25570
25571
25572
25573
25574           GNULIB_REALLOC_POSIX=1
25575
25576
25577
25578
25579
25580 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
25581
25582
25583
25584
25585
25586
25587   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
25588 printf %s "checking whether rmdir works... " >&6; }
25589 if test ${gl_cv_func_rmdir_works+y}
25590 then :
25591   printf %s "(cached) " >&6
25592 else
25593   mkdir conftest.dir
25594      touch conftest.file
25595      if test "$cross_compiling" = yes
25596 then :
25597   case "$host_os" in
25598                          # Guess yes on glibc systems.
25599           *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
25600                          # Guess no on native Windows.
25601           mingw*)        gl_cv_func_rmdir_works="guessing no" ;;
25602                          # If we don't know, assume the worst.
25603           *)             gl_cv_func_rmdir_works="guessing no" ;;
25604         esac
25605
25606 else
25607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25608 /* end confdefs.h.  */
25609 #include <stdio.h>
25610            #include <errno.h>
25611            #if HAVE_UNISTD_H
25612            # include <unistd.h>
25613            #else /* on Windows with MSVC */
25614            # include <direct.h>
25615            #endif
25616
25617 int
25618 main (void)
25619 {
25620 int result = 0;
25621       if (!rmdir ("conftest.file/"))
25622         result |= 1;
25623       else if (errno != ENOTDIR)
25624         result |= 2;
25625       if (!rmdir ("conftest.dir/./"))
25626         result |= 4;
25627       return result;
25628
25629   ;
25630   return 0;
25631 }
25632 _ACEOF
25633 if ac_fn_c_try_run "$LINENO"
25634 then :
25635   gl_cv_func_rmdir_works=yes
25636 else
25637   gl_cv_func_rmdir_works=no
25638 fi
25639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25640   conftest.$ac_objext conftest.beam conftest.$ac_ext
25641 fi
25642
25643      rm -rf conftest.dir conftest.file
25644 fi
25645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
25646 printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
25647   case "$gl_cv_func_rmdir_works" in
25648     *yes) ;;
25649     *)
25650       REPLACE_RMDIR=1
25651       ;;
25652   esac
25653
25654   if test $REPLACE_RMDIR = 1; then
25655
25656
25657
25658
25659
25660
25661
25662
25663   gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
25664
25665   fi
25666
25667
25668
25669
25670
25671           GNULIB_RMDIR=1
25672
25673
25674
25675
25676
25677 printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
25678
25679
25680
25681
25682
25683
25684
25685   :
25686
25687
25688
25689      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
25690 printf %s "checking for signbit macro... " >&6; }
25691 if test ${gl_cv_func_signbit+y}
25692 then :
25693   printf %s "(cached) " >&6
25694 else
25695
25696       if test "$cross_compiling" = yes
25697 then :
25698   case "$host_os" in
25699                           # Guess yes on glibc systems.
25700            *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
25701                           # Guess yes on native Windows.
25702            mingw*)        gl_cv_func_signbit="guessing yes" ;;
25703                           # If we don't know, assume the worst.
25704            *)             gl_cv_func_signbit="guessing no" ;;
25705          esac
25706
25707 else
25708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25709 /* end confdefs.h.  */
25710
25711 #include <math.h>
25712 /* If signbit is defined as a function, don't use it, since calling it for
25713    'float' or 'long double' arguments would involve conversions.
25714    If signbit is not declared at all but exists as a library function, don't
25715    use it, since the prototype may not match.
25716    If signbit is not declared at all but exists as a compiler built-in, don't
25717    use it, since it's preferable to use __builtin_signbit* (no warnings,
25718    no conversions).  */
25719 #ifndef signbit
25720 # error "signbit should be a macro"
25721 #endif
25722 #include <string.h>
25723
25724 /* Global variables.
25725    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
25726    but cannot constant-fold            __builtin_signbitl (variable).  */
25727 float vf;
25728 double vd;
25729 long double vl;
25730 int main ()
25731 {
25732 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
25733    So we use -p0f and -p0d instead.  */
25734 float p0f = 0.0f;
25735 float m0f = -p0f;
25736 double p0d = 0.0;
25737 double m0d = -p0d;
25738 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
25739    So we use another constant expression instead.
25740    But that expression does not work on other platforms, such as when
25741    cross-compiling to PowerPC on Mac OS X 10.5.  */
25742 long double p0l = 0.0L;
25743 #if defined __hpux || defined __sgi
25744 long double m0l = -LDBL_MIN * LDBL_MIN;
25745 #else
25746 long double m0l = -p0l;
25747 #endif
25748   int result = 0;
25749   if (signbit (vf)) /* link check */
25750     vf++;
25751   {
25752     float plus_inf = 1.0f / p0f;
25753     float minus_inf = -1.0f / p0f;
25754     if (!(!signbit (255.0f)
25755           && signbit (-255.0f)
25756           && !signbit (p0f)
25757           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
25758           && !signbit (plus_inf)
25759           && signbit (minus_inf)))
25760       result |= 1;
25761   }
25762   if (signbit (vd)) /* link check */
25763     vd++;
25764   {
25765     double plus_inf = 1.0 / p0d;
25766     double minus_inf = -1.0 / p0d;
25767     if (!(!signbit (255.0)
25768           && signbit (-255.0)
25769           && !signbit (p0d)
25770           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
25771           && !signbit (plus_inf)
25772           && signbit (minus_inf)))
25773       result |= 2;
25774   }
25775   if (signbit (vl)) /* link check */
25776     vl++;
25777   {
25778     long double plus_inf = 1.0L / p0l;
25779     long double minus_inf = -1.0L / p0l;
25780     if (signbit (255.0L))
25781       result |= 4;
25782     if (!signbit (-255.0L))
25783       result |= 4;
25784     if (signbit (p0l))
25785       result |= 8;
25786     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
25787       result |= 16;
25788     if (signbit (plus_inf))
25789       result |= 32;
25790     if (!signbit (minus_inf))
25791       result |= 64;
25792   }
25793   return result;
25794 }
25795
25796
25797 _ACEOF
25798 if ac_fn_c_try_run "$LINENO"
25799 then :
25800   gl_cv_func_signbit=yes
25801 else
25802   gl_cv_func_signbit=no
25803 fi
25804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25805   conftest.$ac_objext conftest.beam conftest.$ac_ext
25806 fi
25807
25808
25809 fi
25810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
25811 printf "%s\n" "$gl_cv_func_signbit" >&6; }
25812           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
25813 printf %s "checking for signbit compiler built-ins... " >&6; }
25814 if test ${gl_cv_func_signbit_gcc+y}
25815 then :
25816   printf %s "(cached) " >&6
25817 else
25818
25819       if test "$cross_compiling" = yes
25820 then :
25821   case "$host_os" in
25822                           # Guess yes on glibc systems.
25823            *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
25824                           # Guess yes on mingw, no on MSVC.
25825            mingw*)        if test -n "$GCC"; then
25826                             gl_cv_func_signbit_gcc="guessing yes"
25827                           else
25828                             gl_cv_func_signbit_gcc="guessing no"
25829                           fi
25830                           ;;
25831                           # If we don't know, assume the worst.
25832            *)             gl_cv_func_signbit_gcc="guessing no" ;;
25833          esac
25834
25835 else
25836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25837 /* end confdefs.h.  */
25838
25839 #if __GNUC__ >= 4
25840 # define signbit(x) \
25841    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
25842     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
25843     __builtin_signbitf (x))
25844 #else
25845 # error "signbit should be three compiler built-ins"
25846 #endif
25847 #include <string.h>
25848
25849 /* Global variables.
25850    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
25851    but cannot constant-fold            __builtin_signbitl (variable).  */
25852 float vf;
25853 double vd;
25854 long double vl;
25855 int main ()
25856 {
25857 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
25858    So we use -p0f and -p0d instead.  */
25859 float p0f = 0.0f;
25860 float m0f = -p0f;
25861 double p0d = 0.0;
25862 double m0d = -p0d;
25863 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
25864    So we use another constant expression instead.
25865    But that expression does not work on other platforms, such as when
25866    cross-compiling to PowerPC on Mac OS X 10.5.  */
25867 long double p0l = 0.0L;
25868 #if defined __hpux || defined __sgi
25869 long double m0l = -LDBL_MIN * LDBL_MIN;
25870 #else
25871 long double m0l = -p0l;
25872 #endif
25873   int result = 0;
25874   if (signbit (vf)) /* link check */
25875     vf++;
25876   {
25877     float plus_inf = 1.0f / p0f;
25878     float minus_inf = -1.0f / p0f;
25879     if (!(!signbit (255.0f)
25880           && signbit (-255.0f)
25881           && !signbit (p0f)
25882           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
25883           && !signbit (plus_inf)
25884           && signbit (minus_inf)))
25885       result |= 1;
25886   }
25887   if (signbit (vd)) /* link check */
25888     vd++;
25889   {
25890     double plus_inf = 1.0 / p0d;
25891     double minus_inf = -1.0 / p0d;
25892     if (!(!signbit (255.0)
25893           && signbit (-255.0)
25894           && !signbit (p0d)
25895           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
25896           && !signbit (plus_inf)
25897           && signbit (minus_inf)))
25898       result |= 2;
25899   }
25900   if (signbit (vl)) /* link check */
25901     vl++;
25902   {
25903     long double plus_inf = 1.0L / p0l;
25904     long double minus_inf = -1.0L / p0l;
25905     if (signbit (255.0L))
25906       result |= 4;
25907     if (!signbit (-255.0L))
25908       result |= 4;
25909     if (signbit (p0l))
25910       result |= 8;
25911     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
25912       result |= 16;
25913     if (signbit (plus_inf))
25914       result |= 32;
25915     if (!signbit (minus_inf))
25916       result |= 64;
25917   }
25918   return result;
25919 }
25920
25921
25922 _ACEOF
25923 if ac_fn_c_try_run "$LINENO"
25924 then :
25925   gl_cv_func_signbit_gcc=yes
25926 else
25927   gl_cv_func_signbit_gcc=no
25928 fi
25929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25930   conftest.$ac_objext conftest.beam conftest.$ac_ext
25931 fi
25932
25933
25934 fi
25935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
25936 printf "%s\n" "$gl_cv_func_signbit_gcc" >&6; }
25937       case "$gl_cv_func_signbit_gcc" in
25938     *yes)
25939       REPLACE_SIGNBIT_USING_GCC=1
25940       ;;
25941     *)
25942       case "$gl_cv_func_signbit" in
25943         *yes) ;;
25944         *)
25945                     REPLACE_SIGNBIT=1
25946
25947
25948   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
25949 printf %s "checking where to find the sign bit in a 'float'... " >&6; }
25950 if test ${gl_cv_cc_float_signbit+y}
25951 then :
25952   printf %s "(cached) " >&6
25953 else
25954
25955       if test "$cross_compiling" = yes
25956 then :
25957
25958                               gl_cv_cc_float_signbit="unknown"
25959
25960 else
25961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25962 /* end confdefs.h.  */
25963
25964 #include <stddef.h>
25965 #include <stdio.h>
25966 #define NWORDS \
25967   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25968 typedef union { float value; unsigned int word[NWORDS]; }
25969         memory_float;
25970 static memory_float plus = { 1.0f };
25971 static memory_float minus = { -1.0f };
25972 int main ()
25973 {
25974   size_t j, k, i;
25975   unsigned int m;
25976   FILE *fp = fopen ("conftest.out", "w");
25977   if (fp == NULL)
25978     return 1;
25979   /* Find the different bit.  */
25980   k = 0; m = 0;
25981   for (j = 0; j < NWORDS; j++)
25982     {
25983       unsigned int x = plus.word[j] ^ minus.word[j];
25984       if ((x & (x - 1)) || (x && m))
25985         {
25986           /* More than one bit difference.  */
25987           fprintf (fp, "unknown");
25988           fclose (fp);
25989           return 2;
25990         }
25991       if (x)
25992         {
25993           k = j;
25994           m = x;
25995         }
25996     }
25997   if (m == 0)
25998     {
25999       /* No difference.  */
26000       fprintf (fp, "unknown");
26001       fclose (fp);
26002       return 3;
26003     }
26004   /* Now m = plus.word[k] ^ ~minus.word[k].  */
26005   if (plus.word[k] & ~minus.word[k])
26006     {
26007       /* Oh? The sign bit is set in the positive and cleared in the negative
26008          numbers?  */
26009       fprintf (fp, "unknown");
26010       fclose (fp);
26011       return 4;
26012     }
26013   for (i = 0; ; i++)
26014     if ((m >> i) & 1)
26015       break;
26016   fprintf (fp, "word %d bit %d", (int) k, (int) i);
26017   if (fclose (fp) != 0)
26018     return 5;
26019   return 0;
26020 }
26021
26022 _ACEOF
26023 if ac_fn_c_try_run "$LINENO"
26024 then :
26025   gl_cv_cc_float_signbit=`cat conftest.out`
26026 else
26027   gl_cv_cc_float_signbit="unknown"
26028 fi
26029 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26030   conftest.$ac_objext conftest.beam conftest.$ac_ext
26031 fi
26032
26033       rm -f conftest.out
26034
26035 fi
26036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
26037 printf "%s\n" "$gl_cv_cc_float_signbit" >&6; }
26038   case "$gl_cv_cc_float_signbit" in
26039     word*bit*)
26040       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26041       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
26042
26043 printf "%s\n" "#define FLT_SIGNBIT_WORD $word" >>confdefs.h
26044
26045
26046 printf "%s\n" "#define FLT_SIGNBIT_BIT $bit" >>confdefs.h
26047
26048       ;;
26049   esac
26050
26051
26052
26053
26054   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
26055 printf %s "checking where to find the sign bit in a 'double'... " >&6; }
26056 if test ${gl_cv_cc_double_signbit+y}
26057 then :
26058   printf %s "(cached) " >&6
26059 else
26060
26061       if test "$cross_compiling" = yes
26062 then :
26063
26064                               gl_cv_cc_double_signbit="unknown"
26065
26066 else
26067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26068 /* end confdefs.h.  */
26069
26070 #include <stddef.h>
26071 #include <stdio.h>
26072 #define NWORDS \
26073   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26074 typedef union { double value; unsigned int word[NWORDS]; }
26075         memory_float;
26076 static memory_float plus = { 1.0 };
26077 static memory_float minus = { -1.0 };
26078 int main ()
26079 {
26080   size_t j, k, i;
26081   unsigned int m;
26082   FILE *fp = fopen ("conftest.out", "w");
26083   if (fp == NULL)
26084     return 1;
26085   /* Find the different bit.  */
26086   k = 0; m = 0;
26087   for (j = 0; j < NWORDS; j++)
26088     {
26089       unsigned int x = plus.word[j] ^ minus.word[j];
26090       if ((x & (x - 1)) || (x && m))
26091         {
26092           /* More than one bit difference.  */
26093           fprintf (fp, "unknown");
26094           fclose (fp);
26095           return 2;
26096         }
26097       if (x)
26098         {
26099           k = j;
26100           m = x;
26101         }
26102     }
26103   if (m == 0)
26104     {
26105       /* No difference.  */
26106       fprintf (fp, "unknown");
26107       fclose (fp);
26108       return 3;
26109     }
26110   /* Now m = plus.word[k] ^ ~minus.word[k].  */
26111   if (plus.word[k] & ~minus.word[k])
26112     {
26113       /* Oh? The sign bit is set in the positive and cleared in the negative
26114          numbers?  */
26115       fprintf (fp, "unknown");
26116       fclose (fp);
26117       return 4;
26118     }
26119   for (i = 0; ; i++)
26120     if ((m >> i) & 1)
26121       break;
26122   fprintf (fp, "word %d bit %d", (int) k, (int) i);
26123   if (fclose (fp) != 0)
26124     return 5;
26125   return 0;
26126 }
26127
26128 _ACEOF
26129 if ac_fn_c_try_run "$LINENO"
26130 then :
26131   gl_cv_cc_double_signbit=`cat conftest.out`
26132 else
26133   gl_cv_cc_double_signbit="unknown"
26134 fi
26135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26136   conftest.$ac_objext conftest.beam conftest.$ac_ext
26137 fi
26138
26139       rm -f conftest.out
26140
26141 fi
26142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
26143 printf "%s\n" "$gl_cv_cc_double_signbit" >&6; }
26144   case "$gl_cv_cc_double_signbit" in
26145     word*bit*)
26146       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26147       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
26148
26149 printf "%s\n" "#define DBL_SIGNBIT_WORD $word" >>confdefs.h
26150
26151
26152 printf "%s\n" "#define DBL_SIGNBIT_BIT $bit" >>confdefs.h
26153
26154       ;;
26155   esac
26156
26157
26158
26159
26160   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
26161 printf %s "checking where to find the sign bit in a 'long double'... " >&6; }
26162 if test ${gl_cv_cc_long_double_signbit+y}
26163 then :
26164   printf %s "(cached) " >&6
26165 else
26166
26167       if test "$cross_compiling" = yes
26168 then :
26169
26170                               gl_cv_cc_long_double_signbit="unknown"
26171
26172 else
26173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26174 /* end confdefs.h.  */
26175
26176 #include <stddef.h>
26177 #include <stdio.h>
26178 #define NWORDS \
26179   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26180 typedef union { long double value; unsigned int word[NWORDS]; }
26181         memory_float;
26182 static memory_float plus = { 1.0L };
26183 static memory_float minus = { -1.0L };
26184 int main ()
26185 {
26186   size_t j, k, i;
26187   unsigned int m;
26188   FILE *fp = fopen ("conftest.out", "w");
26189   if (fp == NULL)
26190     return 1;
26191   /* Find the different bit.  */
26192   k = 0; m = 0;
26193   for (j = 0; j < NWORDS; j++)
26194     {
26195       unsigned int x = plus.word[j] ^ minus.word[j];
26196       if ((x & (x - 1)) || (x && m))
26197         {
26198           /* More than one bit difference.  */
26199           fprintf (fp, "unknown");
26200           fclose (fp);
26201           return 2;
26202         }
26203       if (x)
26204         {
26205           k = j;
26206           m = x;
26207         }
26208     }
26209   if (m == 0)
26210     {
26211       /* No difference.  */
26212       fprintf (fp, "unknown");
26213       fclose (fp);
26214       return 3;
26215     }
26216   /* Now m = plus.word[k] ^ ~minus.word[k].  */
26217   if (plus.word[k] & ~minus.word[k])
26218     {
26219       /* Oh? The sign bit is set in the positive and cleared in the negative
26220          numbers?  */
26221       fprintf (fp, "unknown");
26222       fclose (fp);
26223       return 4;
26224     }
26225   for (i = 0; ; i++)
26226     if ((m >> i) & 1)
26227       break;
26228   fprintf (fp, "word %d bit %d", (int) k, (int) i);
26229   if (fclose (fp) != 0)
26230     return 5;
26231   return 0;
26232 }
26233
26234 _ACEOF
26235 if ac_fn_c_try_run "$LINENO"
26236 then :
26237   gl_cv_cc_long_double_signbit=`cat conftest.out`
26238 else
26239   gl_cv_cc_long_double_signbit="unknown"
26240 fi
26241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26242   conftest.$ac_objext conftest.beam conftest.$ac_ext
26243 fi
26244
26245       rm -f conftest.out
26246
26247 fi
26248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
26249 printf "%s\n" "$gl_cv_cc_long_double_signbit" >&6; }
26250   case "$gl_cv_cc_long_double_signbit" in
26251     word*bit*)
26252       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
26253       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
26254
26255 printf "%s\n" "#define LDBL_SIGNBIT_WORD $word" >>confdefs.h
26256
26257
26258 printf "%s\n" "#define LDBL_SIGNBIT_BIT $bit" >>confdefs.h
26259
26260       ;;
26261   esac
26262
26263
26264           if test "$gl_cv_cc_float_signbit" = unknown; then
26265                         ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
26266 "
26267 if test "x$ac_cv_have_decl_copysignf" = xyes
26268 then :
26269   ac_have_decl=1
26270 else
26271   ac_have_decl=0
26272 fi
26273
26274 printf "%s\n" "#define HAVE_DECL_COPYSIGNF $ac_have_decl" >>confdefs.h
26275
26276             if test "$ac_cv_have_decl_copysignf" = yes; then
26277                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
26278 printf %s "checking whether copysignf can be used without linking with libm... " >&6; }
26279 if test ${gl_cv_func_copysignf_no_libm+y}
26280 then :
26281   printf %s "(cached) " >&6
26282 else
26283
26284                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26285 /* end confdefs.h.  */
26286 #include <math.h>
26287                          float x, y;
26288 int
26289 main (void)
26290 {
26291 return copysignf (x, y) < 0;
26292   ;
26293   return 0;
26294 }
26295 _ACEOF
26296 if ac_fn_c_try_link "$LINENO"
26297 then :
26298   gl_cv_func_copysignf_no_libm=yes
26299 else
26300   gl_cv_func_copysignf_no_libm=no
26301 fi
26302 rm -f core conftest.err conftest.$ac_objext \
26303     conftest$ac_exeext conftest.$ac_ext
26304
26305 fi
26306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
26307 printf "%s\n" "$gl_cv_func_copysignf_no_libm" >&6; }
26308               if test $gl_cv_func_copysignf_no_libm = yes; then
26309
26310 printf "%s\n" "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
26311
26312               fi
26313             fi
26314           fi
26315           if test "$gl_cv_cc_double_signbit" = unknown; then
26316                         ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
26317 "
26318 if test "x$ac_cv_have_decl_copysign" = xyes
26319 then :
26320   ac_have_decl=1
26321 else
26322   ac_have_decl=0
26323 fi
26324
26325 printf "%s\n" "#define HAVE_DECL_COPYSIGN $ac_have_decl" >>confdefs.h
26326
26327             if test "$ac_cv_have_decl_copysign" = yes; then
26328                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
26329 printf %s "checking whether copysign can be used without linking with libm... " >&6; }
26330 if test ${gl_cv_func_copysign_no_libm+y}
26331 then :
26332   printf %s "(cached) " >&6
26333 else
26334
26335                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26336 /* end confdefs.h.  */
26337 #include <math.h>
26338                          double x, y;
26339 int
26340 main (void)
26341 {
26342 return copysign (x, y) < 0;
26343   ;
26344   return 0;
26345 }
26346 _ACEOF
26347 if ac_fn_c_try_link "$LINENO"
26348 then :
26349   gl_cv_func_copysign_no_libm=yes
26350 else
26351   gl_cv_func_copysign_no_libm=no
26352 fi
26353 rm -f core conftest.err conftest.$ac_objext \
26354     conftest$ac_exeext conftest.$ac_ext
26355
26356 fi
26357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
26358 printf "%s\n" "$gl_cv_func_copysign_no_libm" >&6; }
26359               if test $gl_cv_func_copysign_no_libm = yes; then
26360
26361 printf "%s\n" "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
26362
26363               fi
26364             fi
26365           fi
26366           if test "$gl_cv_cc_long_double_signbit" = unknown; then
26367                         ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
26368 "
26369 if test "x$ac_cv_have_decl_copysignl" = xyes
26370 then :
26371   ac_have_decl=1
26372 else
26373   ac_have_decl=0
26374 fi
26375
26376 printf "%s\n" "#define HAVE_DECL_COPYSIGNL $ac_have_decl" >>confdefs.h
26377
26378             if test "$ac_cv_have_decl_copysignl" = yes; then
26379                             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
26380 printf %s "checking whether copysignl can be used without linking with libm... " >&6; }
26381 if test ${gl_cv_func_copysignl_no_libm+y}
26382 then :
26383   printf %s "(cached) " >&6
26384 else
26385
26386                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26387 /* end confdefs.h.  */
26388 #include <math.h>
26389                          long double x, y;
26390 int
26391 main (void)
26392 {
26393 return copysignl (x, y) < 0;
26394   ;
26395   return 0;
26396 }
26397 _ACEOF
26398 if ac_fn_c_try_link "$LINENO"
26399 then :
26400   gl_cv_func_copysignl_no_libm=yes
26401 else
26402   gl_cv_func_copysignl_no_libm=no
26403 fi
26404 rm -f core conftest.err conftest.$ac_objext \
26405     conftest$ac_exeext conftest.$ac_ext
26406
26407 fi
26408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
26409 printf "%s\n" "$gl_cv_func_copysignl_no_libm" >&6; }
26410               if test $gl_cv_func_copysignl_no_libm = yes; then
26411
26412 printf "%s\n" "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
26413
26414               fi
26415             fi
26416           fi
26417           ;;
26418       esac
26419       ;;
26420   esac
26421
26422   if test $REPLACE_SIGNBIT = 1; then
26423
26424
26425
26426
26427
26428
26429
26430
26431   gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441   gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451   gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
26452
26453   fi
26454
26455
26456
26457
26458
26459           GNULIB_SIGNBIT=1
26460
26461
26462
26463
26464
26465 printf "%s\n" "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
26466
26467
26468
26469
26470   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26471 if test "x$ac_cv_header_stdint_h" = xyes
26472 then :
26473   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
26474
26475 fi
26476
26477     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26478 printf %s "checking for SIZE_MAX... " >&6; }
26479 if test ${gl_cv_size_max+y}
26480 then :
26481   printf %s "(cached) " >&6
26482 else
26483
26484     gl_cv_size_max=
26485     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26486 /* end confdefs.h.  */
26487
26488 #include <limits.h>
26489 #if HAVE_STDINT_H
26490 #include <stdint.h>
26491 #endif
26492 #ifdef SIZE_MAX
26493 Found it
26494 #endif
26495
26496 _ACEOF
26497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26498   $EGREP "Found it" >/dev/null 2>&1
26499 then :
26500   gl_cv_size_max=yes
26501 fi
26502 rm -rf conftest*
26503
26504     if test -z "$gl_cv_size_max"; then
26505                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
26506 #include <limits.h>"
26507 then :
26508
26509 else
26510   size_t_bits_minus_1=
26511 fi
26512
26513       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
26514 then :
26515
26516 else
26517   fits_in_uint=
26518 fi
26519
26520       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
26521         if test $fits_in_uint = 1; then
26522                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26523 /* end confdefs.h.  */
26524 #include <stddef.h>
26525                  extern size_t foo;
26526                  extern unsigned long foo;
26527
26528 int
26529 main (void)
26530 {
26531
26532   ;
26533   return 0;
26534 }
26535 _ACEOF
26536 if ac_fn_c_try_compile "$LINENO"
26537 then :
26538   fits_in_uint=0
26539 fi
26540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26541         fi
26542                                 if test $fits_in_uint = 1; then
26543           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
26544         else
26545           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
26546         fi
26547       else
26548                 gl_cv_size_max='((size_t)~(size_t)0)'
26549       fi
26550     fi
26551
26552 fi
26553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
26554 printf "%s\n" "$gl_cv_size_max" >&6; }
26555   if test "$gl_cv_size_max" != yes; then
26556
26557 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
26558
26559   fi
26560
26561
26562
26563   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26564 printf %s "checking for ssize_t... " >&6; }
26565 if test ${gt_cv_ssize_t+y}
26566 then :
26567   printf %s "(cached) " >&6
26568 else
26569   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26570 /* end confdefs.h.  */
26571 #include <sys/types.h>
26572 int
26573 main (void)
26574 {
26575 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26576             return !x;
26577   ;
26578   return 0;
26579 }
26580 _ACEOF
26581 if ac_fn_c_try_compile "$LINENO"
26582 then :
26583   gt_cv_ssize_t=yes
26584 else
26585   gt_cv_ssize_t=no
26586 fi
26587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26588 fi
26589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26590 printf "%s\n" "$gt_cv_ssize_t" >&6; }
26591   if test $gt_cv_ssize_t = no; then
26592
26593 printf "%s\n" "#define ssize_t int" >>confdefs.h
26594
26595   fi
26596
26597
26598
26599
26600
26601   case "$host_os" in
26602     mingw*)
26603                   REPLACE_STAT=1
26604       ;;
26605     *)
26606                         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26607 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
26608 if test ${gl_cv_func_stat_file_slash+y}
26609 then :
26610   printf %s "(cached) " >&6
26611 else
26612   touch conftest.tmp
26613          # Assume that if we have lstat, we can also check symlinks.
26614          if test $ac_cv_func_lstat = yes; then
26615            ln -s conftest.tmp conftest.lnk
26616          fi
26617          if test "$cross_compiling" = yes
26618 then :
26619   case "$host_os" in
26620                              # Guess yes on glibc systems.
26621               *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26622                              # If we don't know, assume the worst.
26623               *)             gl_cv_func_stat_file_slash="guessing no" ;;
26624             esac
26625
26626 else
26627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26628 /* end confdefs.h.  */
26629 #include <sys/stat.h>
26630
26631 int
26632 main (void)
26633 {
26634 int result = 0;
26635                struct stat st;
26636                if (!stat ("conftest.tmp/", &st))
26637                  result |= 1;
26638 #if HAVE_LSTAT
26639                if (!stat ("conftest.lnk/", &st))
26640                  result |= 2;
26641 #endif
26642                return result;
26643
26644   ;
26645   return 0;
26646 }
26647 _ACEOF
26648 if ac_fn_c_try_run "$LINENO"
26649 then :
26650   gl_cv_func_stat_file_slash=yes
26651 else
26652   gl_cv_func_stat_file_slash=no
26653 fi
26654 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26655   conftest.$ac_objext conftest.beam conftest.$ac_ext
26656 fi
26657
26658          rm -f conftest.tmp conftest.lnk
26659 fi
26660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26661 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
26662       case $gl_cv_func_stat_file_slash in
26663         *no)
26664           REPLACE_STAT=1
26665
26666 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26667 ;;
26668       esac
26669       case $host_os in
26670                 solaris*)
26671           REPLACE_FSTAT=1 ;;
26672       esac
26673       ;;
26674   esac
26675
26676   if test $REPLACE_STAT = 1; then
26677
26678
26679
26680
26681
26682
26683
26684
26685   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
26686
26687     case "$host_os" in
26688       mingw*)
26689
26690
26691
26692
26693
26694
26695
26696
26697   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
26698
26699         ;;
26700     esac
26701
26702
26703   :
26704
26705   fi
26706
26707
26708
26709
26710
26711           GNULIB_STAT=1
26712
26713
26714
26715
26716
26717 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
26718
26719
26720
26721
26722
26723
26724
26725   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>
26726      #include <sys/stat.h>
26727 "
26728 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
26729 then :
26730
26731 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
26732
26733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26734 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26735 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
26736 then :
26737   printf %s "(cached) " >&6
26738 else
26739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26740 /* end confdefs.h.  */
26741
26742             #include <sys/types.h>
26743             #include <sys/stat.h>
26744             #if HAVE_SYS_TIME_H
26745             # include <sys/time.h>
26746             #endif
26747             #include <time.h>
26748             struct timespec ts;
26749             struct stat st;
26750
26751 int
26752 main (void)
26753 {
26754
26755             st.st_atim = ts;
26756
26757   ;
26758   return 0;
26759 }
26760 _ACEOF
26761 if ac_fn_c_try_compile "$LINENO"
26762 then :
26763   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
26764 else
26765   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
26766 fi
26767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26768 fi
26769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26770 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26771      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
26772
26773 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
26774
26775      fi
26776 else
26777   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>
26778         #include <sys/stat.h>
26779 "
26780 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
26781 then :
26782
26783 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
26784
26785
26786 else
26787   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26788            #include <sys/stat.h>
26789 "
26790 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
26791 then :
26792
26793 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
26794
26795
26796 else
26797   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>
26798               #include <sys/stat.h>
26799 "
26800 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
26801 then :
26802
26803 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
26804
26805
26806 fi
26807
26808 fi
26809
26810 fi
26811
26812 fi
26813
26814
26815
26816
26817
26818   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>
26819      #include <sys/stat.h>
26820 "
26821 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
26822 then :
26823
26824 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
26825
26826
26827 else
26828   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26829         #include <sys/stat.h>
26830 "
26831 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
26832 then :
26833
26834 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
26835
26836
26837 else
26838   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>
26839           #include <sys/stat.h>
26840 "
26841 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
26842 then :
26843
26844 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
26845
26846
26847 fi
26848
26849 fi
26850
26851 fi
26852
26853
26854
26855
26856 printf "%s\n" "#define GNULIB_STATAT 1" >>confdefs.h
26857
26858
26859
26860
26861   # Define two additional variables used in the Makefile substitution.
26862
26863   if test "$ac_cv_header_stdbool_h" = yes; then
26864     STDBOOL_H=''
26865   else
26866     STDBOOL_H='stdbool.h'
26867   fi
26868
26869    if test -n "$STDBOOL_H"; then
26870   GL_GENERATE_STDBOOL_H_TRUE=
26871   GL_GENERATE_STDBOOL_H_FALSE='#'
26872 else
26873   GL_GENERATE_STDBOOL_H_TRUE='#'
26874   GL_GENERATE_STDBOOL_H_FALSE=
26875 fi
26876
26877
26878   if test "$ac_cv_type__Bool" = yes; then
26879     HAVE__BOOL=1
26880   else
26881     HAVE__BOOL=0
26882   fi
26883
26884
26885
26886
26887
26888   STDDEF_H=
26889   ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
26890
26891 "
26892 if test "x$ac_cv_type_max_align_t" = xyes
26893 then :
26894
26895 else
26896   HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
26897 fi
26898
26899   if test $gt_cv_c_wchar_t = no; then
26900     HAVE_WCHAR_T=0
26901     STDDEF_H=stddef.h
26902   fi
26903   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26904 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
26905 if test ${gl_cv_decl_null_works+y}
26906 then :
26907   printf %s "(cached) " >&6
26908 else
26909   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26910 /* end confdefs.h.  */
26911 #include <stddef.h>
26912       int test[2 * (sizeof NULL == sizeof (void *)) -1];
26913
26914 int
26915 main (void)
26916 {
26917
26918   ;
26919   return 0;
26920 }
26921 _ACEOF
26922 if ac_fn_c_try_compile "$LINENO"
26923 then :
26924   gl_cv_decl_null_works=yes
26925 else
26926   gl_cv_decl_null_works=no
26927 fi
26928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26929 fi
26930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26931 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
26932   if test $gl_cv_decl_null_works = no; then
26933     REPLACE_NULL=1
26934     STDDEF_H=stddef.h
26935   fi
26936
26937    if test -n "$STDDEF_H"; then
26938   GL_GENERATE_STDDEF_H_TRUE=
26939   GL_GENERATE_STDDEF_H_FALSE='#'
26940 else
26941   GL_GENERATE_STDDEF_H_TRUE='#'
26942   GL_GENERATE_STDDEF_H_FALSE=
26943 fi
26944
26945   if test -n "$STDDEF_H"; then
26946
26947
26948
26949
26950
26951
26952
26953
26954      if test $gl_cv_have_include_next = yes; then
26955        gl_cv_next_stddef_h='<'stddef.h'>'
26956      else
26957        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26958 printf %s "checking absolute name of <stddef.h>... " >&6; }
26959 if test ${gl_cv_next_stddef_h+y}
26960 then :
26961   printf %s "(cached) " >&6
26962 else
26963
26964
26965
26966   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26967 /* end confdefs.h.  */
26968 #include <stddef.h>
26969 _ACEOF
26970                 case "$host_os" in
26971     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26972     *)    gl_absname_cpp="$ac_cpp" ;;
26973   esac
26974
26975   case "$host_os" in
26976     mingw*)
26977                                           gl_dirsep_regex='[/\\]'
26978       ;;
26979     *)
26980       gl_dirsep_regex='\/'
26981       ;;
26982   esac
26983       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26984   gl_header_literal_regex=`echo 'stddef.h' \
26985                            | sed -e "$gl_make_literal_regex_sed"`
26986   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26987       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26988       s|^/[^/]|//&|
26989       p
26990       q
26991     }'
26992
26993         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26994   sed -n "$gl_absolute_header_sed"`
26995
26996            gl_header=$gl_cv_absolute_stddef_h
26997            gl_cv_next_stddef_h='"'$gl_header'"'
26998
26999
27000 fi
27001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27002 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
27003      fi
27004      NEXT_STDDEF_H=$gl_cv_next_stddef_h
27005
27006      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27007        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27008        gl_next_as_first_directive='<'stddef.h'>'
27009      else
27010        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27011        gl_next_as_first_directive=$gl_cv_next_stddef_h
27012      fi
27013      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27014
27015
27016
27017
27018   fi
27019
27020
27021
27022
27023   printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034      if test $gl_cv_have_include_next = yes; then
27035        gl_cv_next_stdio_h='<'stdio.h'>'
27036      else
27037        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27038 printf %s "checking absolute name of <stdio.h>... " >&6; }
27039 if test ${gl_cv_next_stdio_h+y}
27040 then :
27041   printf %s "(cached) " >&6
27042 else
27043
27044
27045
27046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27047 /* end confdefs.h.  */
27048 #include <stdio.h>
27049 _ACEOF
27050                 case "$host_os" in
27051     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27052     *)    gl_absname_cpp="$ac_cpp" ;;
27053   esac
27054
27055   case "$host_os" in
27056     mingw*)
27057                                           gl_dirsep_regex='[/\\]'
27058       ;;
27059     *)
27060       gl_dirsep_regex='\/'
27061       ;;
27062   esac
27063       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27064   gl_header_literal_regex=`echo 'stdio.h' \
27065                            | sed -e "$gl_make_literal_regex_sed"`
27066   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27067       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27068       s|^/[^/]|//&|
27069       p
27070       q
27071     }'
27072
27073         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27074   sed -n "$gl_absolute_header_sed"`
27075
27076            gl_header=$gl_cv_absolute_stdio_h
27077            gl_cv_next_stdio_h='"'$gl_header'"'
27078
27079
27080 fi
27081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27082 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
27083      fi
27084      NEXT_STDIO_H=$gl_cv_next_stdio_h
27085
27086      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27087        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27088        gl_next_as_first_directive='<'stdio.h'>'
27089      else
27090        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27091        gl_next_as_first_directive=$gl_cv_next_stdio_h
27092      fi
27093      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27094
27095
27096
27097
27098
27099         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27100 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27101 if test ${gl_cv_func_printf_attribute_flavor+y}
27102 then :
27103   printf %s "(cached) " >&6
27104 else
27105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27106 /* end confdefs.h.  */
27107
27108        #define __STDC_FORMAT_MACROS 1
27109        #include <stdio.h>
27110        #include <inttypes.h>
27111        /* For non-mingw systems, compilation will trivially succeed.
27112           For mingw, compilation will succeed for older mingw (system
27113           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27114        #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
27115          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27116        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27117        #endif
27118
27119 int
27120 main (void)
27121 {
27122
27123   ;
27124   return 0;
27125 }
27126 _ACEOF
27127 if ac_fn_c_try_compile "$LINENO"
27128 then :
27129   gl_cv_func_printf_attribute_flavor=system
27130 else
27131   gl_cv_func_printf_attribute_flavor=gnu
27132 fi
27133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27134 fi
27135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27136 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
27137   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27138
27139 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27140
27141   fi
27142
27143       GNULIB_FSCANF=1
27144
27145
27146 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
27147
27148
27149   GNULIB_SCANF=1
27150
27151
27152 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
27153
27154
27155   GNULIB_FGETC=1
27156   GNULIB_GETC=1
27157   GNULIB_GETCHAR=1
27158   GNULIB_FGETS=1
27159   GNULIB_FREAD=1
27160
27161
27162       GNULIB_FPRINTF=1
27163   GNULIB_PRINTF=1
27164   GNULIB_VFPRINTF=1
27165   GNULIB_VPRINTF=1
27166   GNULIB_FPUTC=1
27167   GNULIB_PUTC=1
27168   GNULIB_PUTCHAR=1
27169   GNULIB_FPUTS=1
27170   GNULIB_PUTS=1
27171   GNULIB_FWRITE=1
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187      if test $gl_cv_have_include_next = yes; then
27188        gl_cv_next_stdlib_h='<'stdlib.h'>'
27189      else
27190        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27191 printf %s "checking absolute name of <stdlib.h>... " >&6; }
27192 if test ${gl_cv_next_stdlib_h+y}
27193 then :
27194   printf %s "(cached) " >&6
27195 else
27196
27197
27198
27199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27200 /* end confdefs.h.  */
27201 #include <stdlib.h>
27202 _ACEOF
27203                 case "$host_os" in
27204     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27205     *)    gl_absname_cpp="$ac_cpp" ;;
27206   esac
27207
27208   case "$host_os" in
27209     mingw*)
27210                                           gl_dirsep_regex='[/\\]'
27211       ;;
27212     *)
27213       gl_dirsep_regex='\/'
27214       ;;
27215   esac
27216       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27217   gl_header_literal_regex=`echo 'stdlib.h' \
27218                            | sed -e "$gl_make_literal_regex_sed"`
27219   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27220       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27221       s|^/[^/]|//&|
27222       p
27223       q
27224     }'
27225
27226         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27227   sed -n "$gl_absolute_header_sed"`
27228
27229            gl_header=$gl_cv_absolute_stdlib_h
27230            gl_cv_next_stdlib_h='"'$gl_header'"'
27231
27232
27233 fi
27234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27235 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
27236      fi
27237      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27238
27239      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27240        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27241        gl_next_as_first_directive='<'stdlib.h'>'
27242      else
27243        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27244        gl_next_as_first_directive=$gl_cv_next_stdlib_h
27245      fi
27246      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256   case "$host_os" in
27257     cygwin*)
27258                         STDNORETURN_H='stdnoreturn.h'
27259       ;;
27260     *)
27261       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
27262 printf %s "checking for working stdnoreturn.h... " >&6; }
27263 if test ${gl_cv_header_working_stdnoreturn_h+y}
27264 then :
27265   printf %s "(cached) " >&6
27266 else
27267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27268 /* end confdefs.h.  */
27269 #include <stdlib.h>
27270                 #include <stdnoreturn.h>
27271                 /* Do not check for 'noreturn' after the return type.
27272                    C11 allows it, but it's rarely done that way
27273                    and circa-2012 bleeding-edge GCC rejects it when given
27274                    -Werror=old-style-declaration.  */
27275                 noreturn void foo1 (void) { exit (0); }
27276                 _Noreturn void foo2 (void) { exit (0); }
27277                 int testit (int argc, char **argv)
27278                 {
27279                   if (argc & 1)
27280                     return 0;
27281                   (argv[0][0] ? foo1 : foo2) ();
27282                 }
27283
27284 int
27285 main (void)
27286 {
27287
27288   ;
27289   return 0;
27290 }
27291 _ACEOF
27292 if ac_fn_c_try_compile "$LINENO"
27293 then :
27294   gl_cv_header_working_stdnoreturn_h=yes
27295 else
27296   gl_cv_header_working_stdnoreturn_h=no
27297 fi
27298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27299 fi
27300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
27301 printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
27302       if test $gl_cv_header_working_stdnoreturn_h = yes; then
27303         STDNORETURN_H=''
27304       else
27305         STDNORETURN_H='stdnoreturn.h'
27306       fi
27307       ;;
27308   esac
27309
27310    if test -n "$STDNORETURN_H"; then
27311   GL_GENERATE_STDNORETURN_H_TRUE=
27312   GL_GENERATE_STDNORETURN_H_FALSE='#'
27313 else
27314   GL_GENERATE_STDNORETURN_H_TRUE='#'
27315   GL_GENERATE_STDNORETURN_H_FALSE=
27316 fi
27317
27318
27319
27320
27321
27322
27323
27324
27325   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
27326 if test "x$ac_cv_func_stpcpy" = xyes
27327 then :
27328   printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
27329
27330 fi
27331
27332   if test $ac_cv_func_stpcpy = no; then
27333     HAVE_STPCPY=0
27334   fi
27335
27336   if test $HAVE_STPCPY = 0; then
27337
27338
27339
27340
27341
27342
27343
27344
27345   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
27346
27347
27348   :
27349
27350   fi
27351
27352
27353
27354
27355
27356           GNULIB_STPCPY=1
27357
27358
27359
27360
27361
27362 printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
27363
27364
27365
27366
27367
27368
27369
27370   if test $ac_cv_func_strdup = yes; then
27371     if test $gl_cv_func_malloc_posix != yes; then
27372       REPLACE_STRDUP=1
27373     fi
27374   fi
27375
27376   if test $ac_cv_have_decl_strdup = no; then
27377     HAVE_DECL_STRDUP=0
27378   fi
27379
27380   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
27381
27382
27383
27384
27385
27386
27387
27388
27389   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
27390
27391     :
27392   fi
27393
27394
27395
27396
27397
27398           GNULIB_STRDUP=1
27399
27400
27401
27402
27403
27404 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27416     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27417 printf %s "checking for working strerror function... " >&6; }
27418 if test ${gl_cv_func_working_strerror+y}
27419 then :
27420   printf %s "(cached) " >&6
27421 else
27422   if test "$cross_compiling" = yes
27423 then :
27424   case "$host_os" in
27425                           # Guess yes on glibc systems.
27426            *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27427                           # If we don't know, assume the worst.
27428            *)             gl_cv_func_working_strerror="guessing no" ;;
27429          esac
27430
27431 else
27432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27433 /* end confdefs.h.  */
27434 #include <string.h>
27435
27436 int
27437 main (void)
27438 {
27439 if (!*strerror (-2)) return 1;
27440   ;
27441   return 0;
27442 }
27443 _ACEOF
27444 if ac_fn_c_try_run "$LINENO"
27445 then :
27446   gl_cv_func_working_strerror=yes
27447 else
27448   gl_cv_func_working_strerror=no
27449 fi
27450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27451   conftest.$ac_objext conftest.beam conftest.$ac_ext
27452 fi
27453
27454
27455 fi
27456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27457 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
27458     case "$gl_cv_func_working_strerror" in
27459       *yes) ;;
27460       *)
27461                         REPLACE_STRERROR=1
27462         ;;
27463     esac
27464
27465                   case "$gl_cv_func_strerror_r_works" in
27466         *no) REPLACE_STRERROR=1 ;;
27467       esac
27468
27469   else
27470             REPLACE_STRERROR=1
27471   fi
27472
27473   if test $REPLACE_STRERROR = 1; then
27474
27475
27476
27477
27478
27479
27480
27481
27482   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27483
27484   fi
27485
27486
27487 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
27488
27489
27490
27491
27492
27493
27494
27495           GNULIB_STRERROR=1
27496
27497
27498
27499
27500
27501 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
27502
27503
27504
27505
27506
27507   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
27508
27509
27510
27511
27512
27513
27514
27515
27516   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
27517
27518
27519
27520
27521
27522   if test $ac_cv_header_sys_socket_h != yes; then
27523                     ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27524 if test "x$ac_cv_header_winsock2_h" = xyes
27525 then :
27526   printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
27527
27528 fi
27529
27530   fi
27531   if test "$ac_cv_header_winsock2_h" = yes; then
27532     HAVE_WINSOCK2_H=1
27533     UNISTD_H_HAVE_WINSOCK2_H=1
27534     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27535   else
27536     HAVE_WINSOCK2_H=0
27537   fi
27538
27539
27540   fi
27541
27542
27543
27544
27545
27546
27547
27548   if test $ac_cv_have_decl_strerror_r = no; then
27549     HAVE_DECL_STRERROR_R=0
27550   fi
27551
27552   if test $ac_cv_func_strerror_r = yes; then
27553     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27554       if test $gl_cv_func_strerror_r_posix_signature = yes; then
27555         case "$gl_cv_func_strerror_r_works" in
27556                     *no) REPLACE_STRERROR_R=1 ;;
27557         esac
27558       else
27559                 REPLACE_STRERROR_R=1
27560       fi
27561     else
27562                   REPLACE_STRERROR_R=1
27563     fi
27564   fi
27565
27566   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
27567
27568
27569
27570
27571
27572
27573
27574
27575   gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
27576
27577
27578
27579
27580
27581
27582   fi
27583
27584
27585
27586
27587
27588           GNULIB_STRERROR_R=1
27589
27590
27591
27592
27593
27594 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
27595
27596
27597
27598
27599
27600 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX 1" >>confdefs.h
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620      if test $gl_cv_have_include_next = yes; then
27621        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27622      else
27623        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27624 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
27625 if test ${gl_cv_next_sys_stat_h+y}
27626 then :
27627   printf %s "(cached) " >&6
27628 else
27629
27630              if test $ac_cv_header_sys_stat_h = yes; then
27631
27632
27633
27634
27635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27636 /* end confdefs.h.  */
27637 #include <sys/stat.h>
27638 _ACEOF
27639                 case "$host_os" in
27640     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27641     *)    gl_absname_cpp="$ac_cpp" ;;
27642   esac
27643
27644   case "$host_os" in
27645     mingw*)
27646                                           gl_dirsep_regex='[/\\]'
27647       ;;
27648     *)
27649       gl_dirsep_regex='\/'
27650       ;;
27651   esac
27652       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27653   gl_header_literal_regex=`echo 'sys/stat.h' \
27654                            | sed -e "$gl_make_literal_regex_sed"`
27655   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27656       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27657       s|^/[^/]|//&|
27658       p
27659       q
27660     }'
27661
27662         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27663   sed -n "$gl_absolute_header_sed"`
27664
27665            gl_header=$gl_cv_absolute_sys_stat_h
27666            gl_cv_next_sys_stat_h='"'$gl_header'"'
27667           else
27668                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27669              fi
27670
27671
27672 fi
27673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27674 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
27675      fi
27676      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27677
27678      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27679        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27680        gl_next_as_first_directive='<'sys/stat.h'>'
27681      else
27682        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27683        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27684      fi
27685      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27686
27687
27688
27689
27690
27691
27692
27693
27694     WINDOWS_STAT_TIMESPEC=0
27695
27696
27697
27698
27699
27700
27701
27702
27703       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27704      #include <sys/stat.h>
27705 "
27706 if test "x$ac_cv_type_nlink_t" = xyes
27707 then :
27708
27709 else
27710
27711 printf "%s\n" "#define nlink_t int" >>confdefs.h
27712
27713 fi
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732   :
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745      if test $gl_cv_have_include_next = yes; then
27746        gl_cv_next_unistd_h='<'unistd.h'>'
27747      else
27748        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27749 printf %s "checking absolute name of <unistd.h>... " >&6; }
27750 if test ${gl_cv_next_unistd_h+y}
27751 then :
27752   printf %s "(cached) " >&6
27753 else
27754
27755              if test $ac_cv_header_unistd_h = yes; then
27756
27757
27758
27759
27760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27761 /* end confdefs.h.  */
27762 #include <unistd.h>
27763 _ACEOF
27764                 case "$host_os" in
27765     aix*) gl_absname_cpp="$ac_cpp -C" ;;
27766     *)    gl_absname_cpp="$ac_cpp" ;;
27767   esac
27768
27769   case "$host_os" in
27770     mingw*)
27771                                           gl_dirsep_regex='[/\\]'
27772       ;;
27773     *)
27774       gl_dirsep_regex='\/'
27775       ;;
27776   esac
27777       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27778   gl_header_literal_regex=`echo 'unistd.h' \
27779                            | sed -e "$gl_make_literal_regex_sed"`
27780   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27781       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27782       s|^/[^/]|//&|
27783       p
27784       q
27785     }'
27786
27787         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27788   sed -n "$gl_absolute_header_sed"`
27789
27790            gl_header=$gl_cv_absolute_unistd_h
27791            gl_cv_next_unistd_h='"'$gl_header'"'
27792           else
27793                gl_cv_next_unistd_h='<'unistd.h'>'
27794              fi
27795
27796
27797 fi
27798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27799 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
27800      fi
27801      NEXT_UNISTD_H=$gl_cv_next_unistd_h
27802
27803      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27804        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27805        gl_next_as_first_directive='<'unistd.h'>'
27806      else
27807        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27808        gl_next_as_first_directive=$gl_cv_next_unistd_h
27809      fi
27810      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27811
27812
27813
27814
27815   if test $ac_cv_header_unistd_h = yes; then
27816     HAVE_UNISTD_H=1
27817   else
27818     HAVE_UNISTD_H=0
27819   fi
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
27837 printf %s "checking whether unlink honors trailing slashes... " >&6; }
27838 if test ${gl_cv_func_unlink_honors_slashes+y}
27839 then :
27840   printf %s "(cached) " >&6
27841 else
27842   touch conftest.file
27843      # Assume that if we have lstat, we can also check symlinks.
27844      if test $ac_cv_func_lstat = yes; then
27845        ln -s conftest.file conftest.lnk
27846      fi
27847      if test "$cross_compiling" = yes
27848 then :
27849   case "$host_os" in
27850                  # Guess yes on glibc systems.
27851          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
27852                  # Guess no on native Windows.
27853          mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
27854                  # If we don't know, assume the worst.
27855          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
27856        esac
27857
27858 else
27859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27860 /* end confdefs.h.  */
27861 #if HAVE_UNISTD_H
27862            # include <unistd.h>
27863            #else /* on Windows with MSVC */
27864            # include <io.h>
27865            #endif
27866            #include <errno.h>
27867
27868 int
27869 main (void)
27870 {
27871 int result = 0;
27872            if (!unlink ("conftest.file/"))
27873              result |= 1;
27874            else if (errno != ENOTDIR)
27875              result |= 2;
27876 #if HAVE_LSTAT
27877            if (!unlink ("conftest.lnk/"))
27878              result |= 4;
27879            else if (errno != ENOTDIR)
27880              result |= 8;
27881 #endif
27882            return result;
27883
27884   ;
27885   return 0;
27886 }
27887 _ACEOF
27888 if ac_fn_c_try_run "$LINENO"
27889 then :
27890   gl_cv_func_unlink_honors_slashes=yes
27891 else
27892   gl_cv_func_unlink_honors_slashes=no
27893 fi
27894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27895   conftest.$ac_objext conftest.beam conftest.$ac_ext
27896 fi
27897
27898      rm -f conftest.file conftest.lnk
27899 fi
27900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
27901 printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
27902   case "$gl_cv_func_unlink_honors_slashes" in
27903     *no)
27904       REPLACE_UNLINK=1
27905       ;;
27906   esac
27907
27908       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
27909 printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
27910 if test ${gl_cv_func_unlink_parent_fails+y}
27911 then :
27912   printf %s "(cached) " >&6
27913 else
27914   case "$host_os" in
27915        darwin*)
27916                                                       if {
27917               # Use the mktemp program if available. If not available, hide the error
27918               # message.
27919               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
27920               test -n "$tmp" && test -d "$tmp"
27921             } ||
27922             {
27923               # Use a simple mkdir command. It is guaranteed to fail if the directory
27924               # already exists.  $RANDOM is bash specific and expands to empty in shells
27925               # other than bash, ksh and zsh.  Its use does not increase security;
27926               # rather, it minimizes the probability of failure in a very cluttered /tmp
27927               # directory.
27928               tmp=/tmp/gt$$-$RANDOM
27929               (umask 077 && mkdir "$tmp")
27930             }; then
27931            mkdir "$tmp/subdir"
27932            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
27933            export GL_SUBDIR_FOR_UNLINK
27934            if test "$cross_compiling" = yes
27935 then :
27936   # If we don't know, assume the worst.
27937               gl_cv_func_unlink_parent_fails="guessing no"
27938
27939 else
27940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27941 /* end confdefs.h.  */
27942
27943                 #include <stdlib.h>
27944                 #if HAVE_UNISTD_H
27945                 # include <unistd.h>
27946                 #else /* on Windows with MSVC */
27947                 # include <direct.h>
27948                 # include <io.h>
27949                 #endif
27950                 int main ()
27951                 {
27952                   int result = 0;
27953                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
27954                     result |= 1;
27955                   else if (unlink ("..") == 0)
27956                     result |= 2;
27957                   return result;
27958                 }
27959
27960 _ACEOF
27961 if ac_fn_c_try_run "$LINENO"
27962 then :
27963   gl_cv_func_unlink_parent_fails=yes
27964 else
27965   gl_cv_func_unlink_parent_fails=no
27966 fi
27967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27968   conftest.$ac_objext conftest.beam conftest.$ac_ext
27969 fi
27970
27971            unset GL_SUBDIR_FOR_UNLINK
27972            rm -rf "$tmp"
27973          else
27974            gl_cv_func_unlink_parent_fails="guessing no"
27975          fi
27976          ;;
27977        *)
27978          gl_cv_func_unlink_parent_fails="guessing yes"
27979          ;;
27980      esac
27981
27982 fi
27983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
27984 printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
27985   case "$gl_cv_func_unlink_parent_fails" in
27986     *no)
27987       REPLACE_UNLINK=1
27988
27989 printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
27990
27991       ;;
27992   esac
27993
27994   if test $REPLACE_UNLINK = 1; then
27995
27996
27997
27998
27999
28000
28001
28002
28003   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
28004
28005   fi
28006
28007
28008
28009
28010
28011           GNULIB_UNLINK=1
28012
28013
28014
28015
28016
28017 printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027   if test $ac_cv_func_unlinkat = no; then
28028     HAVE_UNLINKAT=0
28029   else
28030     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
28031       *no)
28032         # Solaris 9 has *at functions, but uniformly mishandles trailing
28033         # slash in all of them.
28034         REPLACE_UNLINKAT=1
28035         ;;
28036       *)
28037         # GNU/Hurd has unlinkat, but it has the same bug as unlink.
28038         # Darwin has unlinkat, but it has the same UNLINK_PARENT_BUG.
28039         if test $REPLACE_UNLINK = 1; then
28040           REPLACE_UNLINKAT=1
28041         fi
28042         ;;
28043     esac
28044   fi
28045
28046   if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
28047
28048
28049
28050
28051
28052
28053
28054
28055   gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
28056
28057   fi
28058
28059
28060
28061
28062
28063           GNULIB_UNLINKAT=1
28064
28065
28066
28067
28068
28069 printf "%s\n" "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
28070
28071
28072
28073
28074
28075
28076
28077   if test $ac_cv_func_utime = no; then
28078     HAVE_UTIME=0
28079   else
28080     case "$host_os" in
28081       mingw*)
28082                         REPLACE_UTIME=1
28083         ;;
28084     esac
28085   fi
28086
28087   if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
28088
28089
28090
28091
28092
28093
28094
28095
28096   gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
28097
28098     :
28099   fi
28100
28101
28102
28103
28104
28105           GNULIB_UTIME=1
28106
28107
28108
28109
28110
28111 printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128      if test $gl_cv_have_include_next = yes; then
28129        gl_cv_next_utime_h='<'utime.h'>'
28130      else
28131        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
28132 printf %s "checking absolute name of <utime.h>... " >&6; }
28133 if test ${gl_cv_next_utime_h+y}
28134 then :
28135   printf %s "(cached) " >&6
28136 else
28137
28138              if test $ac_cv_header_utime_h = yes; then
28139
28140
28141
28142
28143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28144 /* end confdefs.h.  */
28145 #include <utime.h>
28146 _ACEOF
28147                 case "$host_os" in
28148     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28149     *)    gl_absname_cpp="$ac_cpp" ;;
28150   esac
28151
28152   case "$host_os" in
28153     mingw*)
28154                                           gl_dirsep_regex='[/\\]'
28155       ;;
28156     *)
28157       gl_dirsep_regex='\/'
28158       ;;
28159   esac
28160       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28161   gl_header_literal_regex=`echo 'utime.h' \
28162                            | sed -e "$gl_make_literal_regex_sed"`
28163   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28164       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28165       s|^/[^/]|//&|
28166       p
28167       q
28168     }'
28169
28170         gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28171   sed -n "$gl_absolute_header_sed"`
28172
28173            gl_header=$gl_cv_absolute_utime_h
28174            gl_cv_next_utime_h='"'$gl_header'"'
28175           else
28176                gl_cv_next_utime_h='<'utime.h'>'
28177              fi
28178
28179
28180 fi
28181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
28182 printf "%s\n" "$gl_cv_next_utime_h" >&6; }
28183      fi
28184      NEXT_UTIME_H=$gl_cv_next_utime_h
28185
28186      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28187        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28188        gl_next_as_first_directive='<'utime.h'>'
28189      else
28190        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28191        gl_next_as_first_directive=$gl_cv_next_utime_h
28192      fi
28193      NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
28194
28195
28196
28197
28198
28199   if test $ac_cv_header_utime_h = yes; then
28200     HAVE_UTIME_H=1
28201   else
28202     HAVE_UTIME_H=0
28203   fi
28204
28205
28206   UTIME_H=''
28207   if test $ac_cv_header_utime_h != yes; then
28208         UTIME_H=utime.h
28209   else
28210     case "$host_os" in
28211       mingw*)         UTIME_H=utime.h
28212         ;;
28213     esac
28214   fi
28215
28216    if test -n "$UTIME_H"; then
28217   GL_GENERATE_UTIME_H_TRUE=
28218   GL_GENERATE_UTIME_H_FALSE='#'
28219 else
28220   GL_GENERATE_UTIME_H_TRUE='#'
28221   GL_GENERATE_UTIME_H_FALSE=
28222 fi
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232   if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
28233                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
28234 printf %s "checking whether futimesat handles NULL file... " >&6; }
28235 if test ${gl_cv_func_futimesat_works+y}
28236 then :
28237   printf %s "(cached) " >&6
28238 else
28239   touch conftest.file
28240        if test "$cross_compiling" = yes
28241 then :
28242   case "$host_os" in
28243                    # Guess yes on glibc systems.
28244            *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
28245                    # If we don't know, assume the worst.
28246            *)      gl_cv_func_futimesat_works="guessing no" ;;
28247          esac
28248
28249 else
28250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28251 /* end confdefs.h.  */
28252
28253 #include <stddef.h>
28254 #include <sys/times.h>
28255 #include <fcntl.h>
28256
28257 int
28258 main (void)
28259 {
28260     int fd = open ("conftest.file", O_RDWR);
28261           if (fd < 0) return 1;
28262           if (futimesat (fd, NULL, NULL)) return 2;
28263
28264   ;
28265   return 0;
28266 }
28267 _ACEOF
28268 if ac_fn_c_try_run "$LINENO"
28269 then :
28270   gl_cv_func_futimesat_works=yes
28271 else
28272   gl_cv_func_futimesat_works=no
28273 fi
28274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28275   conftest.$ac_objext conftest.beam conftest.$ac_ext
28276 fi
28277
28278       rm -f conftest.file
28279 fi
28280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
28281 printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
28282     case "$gl_cv_func_futimesat_works" in
28283       *yes) ;;
28284       *)
28285
28286 printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
28287
28288         ;;
28289     esac
28290   fi
28291
28292
28293
28294   if test $ac_cv_func_vasnprintf = no; then
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
28336
28337   if test $ac_cv_func_vasnprintf = yes; then
28338
28339 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28340
28341   fi
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28354 if test "x$ac_cv_type_ptrdiff_t" = xyes
28355 then :
28356
28357 else
28358
28359 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
28360
28361
28362 fi
28363
28364
28365
28366
28367
28368
28369
28370   fi
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387   gl_cv_func_vfprintf_posix=no
28388   case "$gl_cv_func_printf_sizes_c99" in
28389     *yes)
28390       case "$gl_cv_func_printf_long_double" in
28391         *yes)
28392           case "$gl_cv_func_printf_infinite" in
28393             *yes)
28394               case "$gl_cv_func_printf_infinite_long_double" in
28395                 *yes)
28396                   case "$gl_cv_func_printf_directive_a" in
28397                     *yes)
28398                       case "$gl_cv_func_printf_directive_f" in
28399                         *yes)
28400                           case "$gl_cv_func_printf_directive_n" in
28401                             *yes)
28402                               case "$gl_cv_func_printf_directive_ls" in
28403                                 *yes)
28404                                   case "$gl_cv_func_printf_positions" in
28405                                     *yes)
28406                                       case "$gl_cv_func_printf_flag_grouping" in
28407                                         *yes)
28408                                           case "$gl_cv_func_printf_flag_leftadjust" in
28409                                             *yes)
28410                                               case "$gl_cv_func_printf_flag_zero" in
28411                                                 *yes)
28412                                                   case "$gl_cv_func_printf_precision" in
28413                                                     *yes)
28414                                                       case "$gl_cv_func_printf_enomem" in
28415                                                         *yes)
28416                                                           # vfprintf exists and is
28417                                                           # already POSIX compliant.
28418                                                           gl_cv_func_vfprintf_posix=yes
28419                                                           ;;
28420                                                       esac
28421                                                       ;;
28422                                                   esac
28423                                                   ;;
28424                                               esac
28425                                               ;;
28426                                           esac
28427                                           ;;
28428                                       esac
28429                                       ;;
28430                                   esac
28431                                   ;;
28432                               esac
28433                               ;;
28434                           esac
28435                           ;;
28436                       esac
28437                       ;;
28438                   esac
28439                   ;;
28440               esac
28441               ;;
28442           esac
28443           ;;
28444       esac
28445       ;;
28446   esac
28447   if test $gl_cv_func_vfprintf_posix = no; then
28448
28449
28450
28451   case "$gl_cv_func_printf_infinite" in
28452     *yes)
28453       ;;
28454     *)
28455
28456 printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
28457
28458       ;;
28459   esac
28460
28461
28462
28463
28464   case "$gl_cv_func_printf_long_double" in
28465     *yes)
28466       case "$gl_cv_func_printf_infinite_long_double" in
28467         *yes)
28468           ;;
28469         *)
28470
28471 printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
28472
28473           ;;
28474       esac
28475       ;;
28476   esac
28477
28478
28479
28480   case "$gl_cv_func_printf_directive_a" in
28481     *yes)
28482       ;;
28483     *)
28484
28485 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
28486
28487       ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
28488 if test "x$ac_cv_func_nl_langinfo" = xyes
28489 then :
28490   printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
28491
28492 fi
28493
28494       ;;
28495   esac
28496
28497
28498
28499   case "$gl_cv_func_printf_directive_f" in
28500     *yes)
28501       ;;
28502     *)
28503
28504 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
28505
28506       ;;
28507   esac
28508
28509
28510
28511   case "$gl_cv_func_printf_directive_ls" in
28512     *yes)
28513       ;;
28514     *)
28515
28516 printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
28517
28518       ;;
28519   esac
28520
28521
28522
28523   case "$gl_cv_func_printf_flag_grouping" in
28524     *yes)
28525       ;;
28526     *)
28527
28528 printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
28529
28530       ;;
28531   esac
28532
28533
28534
28535   case "$gl_cv_func_printf_flag_leftadjust" in
28536     *yes)
28537       ;;
28538     *)
28539
28540 printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
28541
28542       ;;
28543   esac
28544
28545
28546
28547   case "$gl_cv_func_printf_flag_zero" in
28548     *yes)
28549       ;;
28550     *)
28551
28552 printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
28553
28554       ;;
28555   esac
28556
28557
28558
28559   case "$gl_cv_func_printf_precision" in
28560     *yes)
28561       ;;
28562     *)
28563
28564 printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
28565
28566
28567 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28568
28569
28570 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28571
28572       ;;
28573   esac
28574
28575
28576
28577   case "$gl_cv_func_printf_enomem" in
28578     *yes)
28579       ;;
28580     *)
28581
28582 printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
28583
28584
28585 printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28586
28587
28588 printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28589
28590       ;;
28591   esac
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
28634
28635   if test $ac_cv_func_vasnprintf = yes; then
28636
28637 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28638
28639   fi
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28652 if test "x$ac_cv_type_ptrdiff_t" = xyes
28653 then :
28654
28655 else
28656
28657 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
28658
28659
28660 fi
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
28679
28680   REPLACE_VFPRINTF=1
28681
28682 printf "%s\n" "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
28683
28684   :
28685
28686   fi
28687
28688
28689
28690
28691
28692
28693           GNULIB_VFPRINTF_POSIX=1
28694
28695
28696
28697
28698
28699 printf "%s\n" "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715      if test $gl_cv_have_include_next = yes; then
28716        gl_cv_next_wchar_h='<'wchar.h'>'
28717      else
28718        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28719 printf %s "checking absolute name of <wchar.h>... " >&6; }
28720 if test ${gl_cv_next_wchar_h+y}
28721 then :
28722   printf %s "(cached) " >&6
28723 else
28724
28725              if test $ac_cv_header_wchar_h = yes; then
28726
28727
28728
28729
28730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28731 /* end confdefs.h.  */
28732 #include <wchar.h>
28733 _ACEOF
28734                 case "$host_os" in
28735     aix*) gl_absname_cpp="$ac_cpp -C" ;;
28736     *)    gl_absname_cpp="$ac_cpp" ;;
28737   esac
28738
28739   case "$host_os" in
28740     mingw*)
28741                                           gl_dirsep_regex='[/\\]'
28742       ;;
28743     *)
28744       gl_dirsep_regex='\/'
28745       ;;
28746   esac
28747       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28748   gl_header_literal_regex=`echo 'wchar.h' \
28749                            | sed -e "$gl_make_literal_regex_sed"`
28750   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28751       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28752       s|^/[^/]|//&|
28753       p
28754       q
28755     }'
28756
28757         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28758   sed -n "$gl_absolute_header_sed"`
28759
28760            gl_header=$gl_cv_absolute_wchar_h
28761            gl_cv_next_wchar_h='"'$gl_header'"'
28762           else
28763                gl_cv_next_wchar_h='<'wchar.h'>'
28764              fi
28765
28766
28767 fi
28768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28769 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
28770      fi
28771      NEXT_WCHAR_H=$gl_cv_next_wchar_h
28772
28773      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28774        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28775        gl_next_as_first_directive='<'wchar.h'>'
28776      else
28777        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28778        gl_next_as_first_directive=$gl_cv_next_wchar_h
28779      fi
28780      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
28781
28782
28783
28784
28785   if test $ac_cv_header_wchar_h = yes; then
28786     HAVE_WCHAR_H=1
28787   else
28788     HAVE_WCHAR_H=0
28789   fi
28790
28791
28792
28793
28794
28795   if test $gt_cv_c_wint_t = yes; then
28796     HAVE_WINT_T=1
28797   else
28798     HAVE_WINT_T=0
28799   fi
28800
28801
28802
28803
28804
28805
28806   :
28807
28808
28809   ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
28810 if test "x$ac_cv_header_stdint_h" = xyes
28811 then :
28812   printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
28813
28814 fi
28815
28816
28817
28818
28819     :
28820
28821   # End of code from modules
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831   gltests_libdeps=
28832   gltests_ltlibdeps=
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842   gl_source_base='tests'
28843   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
28844
28845   gl_module_indicator_condition=$gltests_WITNESS
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855   LIBGZIP_LIBDEPS="$gl_libdeps"
28856
28857   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
28858
28859
28860
28861 # Check whether --enable-gcc-warnings was given.
28862 if test ${enable_gcc_warnings+y}
28863 then :
28864   enableval=$enable_gcc_warnings; case $enableval in
28865      yes|no) ;;
28866      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
28867    esac
28868    gl_gcc_warnings=$enableval
28869 else
28870   if test -d "$srcdir"/.git; then
28871      gl_gcc_warnings=yes
28872    else
28873      gl_gcc_warnings=no
28874    fi
28875
28876 fi
28877
28878
28879 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
28880 # ------------------------------------------------
28881 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
28882 # Otherwise, run RUN-IF-NOT-FOUND.
28883
28884
28885 if test "$gl_gcc_warnings" = yes; then
28886
28887   ac_ext=c
28888 ac_cpp='$CPP $CPPFLAGS'
28889 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28890 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28891 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28892
28893
28894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
28895 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
28896 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
28897 then :
28898   printf %s "(cached) " >&6
28899 else
28900
28901   gl_save_compiler_FLAGS="$CFLAGS"
28902   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
28903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28904 /* end confdefs.h.  */
28905
28906 int
28907 main (void)
28908 {
28909
28910   ;
28911   return 0;
28912 }
28913 _ACEOF
28914 if ac_fn_c_try_link "$LINENO"
28915 then :
28916   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
28917 else
28918   gl_cv_warn_c__Werror__Wunknown_warning_option=no
28919 fi
28920 rm -f core conftest.err conftest.$ac_objext \
28921     conftest$ac_exeext conftest.$ac_ext
28922   CFLAGS="$gl_save_compiler_FLAGS"
28923
28924 fi
28925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
28926 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
28927 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
28928 then :
28929   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
28930 else
28931   gl_unknown_warnings_are_errors=
28932 fi
28933
28934   ac_ext=c
28935 ac_cpp='$CPP $CPPFLAGS'
28936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28939
28940
28941
28942
28943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
28944 printf %s "checking whether C compiler handles -Werror... " >&6; }
28945 if test ${gl_cv_warn_c__Werror+y}
28946 then :
28947   printf %s "(cached) " >&6
28948 else
28949
28950   gl_save_compiler_FLAGS="$CFLAGS"
28951   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
28952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28953 /* end confdefs.h.  */
28954
28955 int
28956 main (void)
28957 {
28958
28959   ;
28960   return 0;
28961 }
28962 _ACEOF
28963 if ac_fn_c_try_link "$LINENO"
28964 then :
28965   gl_cv_warn_c__Werror=yes
28966 else
28967   gl_cv_warn_c__Werror=no
28968 fi
28969 rm -f core conftest.err conftest.$ac_objext \
28970     conftest$ac_exeext conftest.$ac_ext
28971   CFLAGS="$gl_save_compiler_FLAGS"
28972
28973 fi
28974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
28975 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
28976 if test "x$gl_cv_warn_c__Werror" = xyes
28977 then :
28978   as_fn_append WERROR_CFLAGS " -Werror"
28979 fi
28980
28981
28982
28983
28984   nw=
28985   # This, $nw, is the list of warnings we disable.
28986   nw="$nw -Wdeclaration-after-statement" # too useful to forbid
28987   nw="$nw -Waggregate-return"       # anachronistic
28988   nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
28989   nw="$nw -Wc++-compat"             # We don't care about C++ compilers
28990   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
28991   nw="$nw -Wtraditional"            # Warns on #elif which we use often
28992   nw="$nw -Wcast-qual"              # Too many warnings for now
28993   nw="$nw -Wconversion"             # Too many warnings for now
28994   nw="$nw -Wduplicated-branches"    # Too many false alarms
28995   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
28996   nw="$nw -Wsign-conversion"        # Too many warnings for now
28997   nw="$nw -Wtraditional-conversion" # Too many warnings for now
28998   nw="$nw -Wunreachable-code"       # Too many warnings for now
28999   nw="$nw -Wpadded"                 # Our structs are not padded
29000   nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
29001   nw="$nw -Wlogical-op"             # any use of fwrite provokes this
29002   nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
29003   nw="$nw -Wvla"                    # warnings in gettext.h
29004   nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
29005   nw="$nw -Wswitch-enum"            # Too many warnings for now
29006   nw="$nw -Wswitch-default"         # Too many warnings for now
29007   nw="$nw -Wstack-protector"        # not worth working around
29008   # things I might fix soon:
29009   nw="$nw -Wfloat-equal"            # sort.c, seq.c
29010   nw="$nw -Wmissing-format-attribute" # copy.c
29011   nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
29012   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
29013
29014   # Warnings that gzip runs afoul of but coreutils does not.
29015   nw="$nw -Wold-style-definition"
29016   nw="$nw -Wshadow"
29017   nw="$nw -Wstrict-overflow"
29018
29019   # Using -Wstrict-overflow is a pain, but the alternative is worse.
29020   # For an example, see the code that provoked this report:
29021   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
29022   # Code like that still infloops with gcc-4.6.0 and -O2.  Scary indeed.
29023
29024
29025   ac_ext=c
29026 ac_cpp='$CPP $CPPFLAGS'
29027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29030
29031
29032
29033   if test -n "$GCC"; then
29034
29035             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
29036 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
29037     if test ${gl_cv_cc_nomfi_supported+y}
29038 then :
29039   printf %s "(cached) " >&6
29040 else
29041
29042       gl_save_CFLAGS="$CFLAGS"
29043       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
29044       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29045 /* end confdefs.h.  */
29046
29047 int
29048 main (void)
29049 {
29050
29051   ;
29052   return 0;
29053 }
29054 _ACEOF
29055 if ac_fn_c_try_compile "$LINENO"
29056 then :
29057   gl_cv_cc_nomfi_supported=yes
29058 else
29059   gl_cv_cc_nomfi_supported=no
29060 fi
29061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29062       CFLAGS="$gl_save_CFLAGS"
29063 fi
29064
29065     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
29066 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
29067
29068     if test "$gl_cv_cc_nomfi_supported" = yes; then
29069                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
29070 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
29071       if test ${gl_cv_cc_nomfi_needed+y}
29072 then :
29073   printf %s "(cached) " >&6
29074 else
29075
29076         gl_save_CFLAGS="$CFLAGS"
29077         CFLAGS="$CFLAGS -W -Werror"
29078         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29079 /* end confdefs.h.  */
29080 int f (void)
29081                {
29082                  typedef struct { int a; int b; } s_t;
29083                  s_t s1 = { 0, };
29084                  return s1.b;
29085                }
29086
29087 int
29088 main (void)
29089 {
29090
29091   ;
29092   return 0;
29093 }
29094 _ACEOF
29095 if ac_fn_c_try_compile "$LINENO"
29096 then :
29097   gl_cv_cc_nomfi_needed=no
29098 else
29099   gl_cv_cc_nomfi_needed=yes
29100 fi
29101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29102         CFLAGS="$gl_save_CFLAGS"
29103
29104 fi
29105
29106       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
29107 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
29108     fi
29109
29110                 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
29111 printf %s "checking whether -Wuninitialized is supported... " >&6; }
29112     if test ${gl_cv_cc_uninitialized_supported+y}
29113 then :
29114   printf %s "(cached) " >&6
29115 else
29116
29117       gl_save_CFLAGS="$CFLAGS"
29118       CFLAGS="$CFLAGS -Werror -Wuninitialized"
29119       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29120 /* end confdefs.h.  */
29121
29122 int
29123 main (void)
29124 {
29125
29126   ;
29127   return 0;
29128 }
29129 _ACEOF
29130 if ac_fn_c_try_compile "$LINENO"
29131 then :
29132   gl_cv_cc_uninitialized_supported=yes
29133 else
29134   gl_cv_cc_uninitialized_supported=no
29135 fi
29136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29137       CFLAGS="$gl_save_CFLAGS"
29138 fi
29139
29140     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
29141 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
29142
29143   fi
29144
29145   # List all gcc warning categories.
29146   # To compare this list to your installed GCC's, run this Bash command:
29147   #
29148   # comm -3 \
29149   #  <(sed -n 's/^  *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
29150   #  <(gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort |
29151   #      grep -v -x -F -f <(
29152   #         awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
29153
29154   gl_manywarn_set=
29155   for gl_manywarn_item in -fno-common \
29156     -W \
29157     -Wabi \
29158     -Waddress \
29159     -Waggressive-loop-optimizations \
29160     -Wall \
29161     -Wattributes \
29162     -Wbad-function-cast \
29163     -Wbool-compare \
29164     -Wbool-operation \
29165     -Wbuiltin-declaration-mismatch \
29166     -Wbuiltin-macro-redefined \
29167     -Wcast-align \
29168     -Wchar-subscripts \
29169     -Wchkp \
29170     -Wclobbered \
29171     -Wcomment \
29172     -Wcomments \
29173     -Wcoverage-mismatch \
29174     -Wcpp \
29175     -Wdangling-else \
29176     -Wdate-time \
29177     -Wdeprecated \
29178     -Wdeprecated-declarations \
29179     -Wdesignated-init \
29180     -Wdisabled-optimization \
29181     -Wdiscarded-array-qualifiers \
29182     -Wdiscarded-qualifiers \
29183     -Wdiv-by-zero \
29184     -Wdouble-promotion \
29185     -Wduplicated-branches \
29186     -Wduplicated-cond \
29187     -Wduplicate-decl-specifier \
29188     -Wempty-body \
29189     -Wendif-labels \
29190     -Wenum-compare \
29191     -Wexpansion-to-defined \
29192     -Wextra \
29193     -Wformat-contains-nul \
29194     -Wformat-extra-args \
29195     -Wformat-nonliteral \
29196     -Wformat-security \
29197     -Wformat-signedness \
29198     -Wformat-y2k \
29199     -Wformat-zero-length \
29200     -Wframe-address \
29201     -Wfree-nonheap-object \
29202     -Whsa \
29203     -Wignored-attributes \
29204     -Wignored-qualifiers \
29205     -Wimplicit \
29206     -Wimplicit-function-declaration \
29207     -Wimplicit-int \
29208     -Wincompatible-pointer-types \
29209     -Winit-self \
29210     -Winline \
29211     -Wint-conversion \
29212     -Wint-in-bool-context \
29213     -Wint-to-pointer-cast \
29214     -Winvalid-memory-model \
29215     -Winvalid-pch \
29216     -Wjump-misses-init \
29217     -Wlogical-not-parentheses \
29218     -Wlogical-op \
29219     -Wmain \
29220     -Wmaybe-uninitialized \
29221     -Wmemset-elt-size \
29222     -Wmemset-transposed-args \
29223     -Wmisleading-indentation \
29224     -Wmissing-braces \
29225     -Wmissing-declarations \
29226     -Wmissing-field-initializers \
29227     -Wmissing-include-dirs \
29228     -Wmissing-parameter-type \
29229     -Wmissing-prototypes \
29230     -Wmultichar \
29231     -Wnarrowing \
29232     -Wnested-externs \
29233     -Wnonnull \
29234     -Wnonnull-compare \
29235     -Wnull-dereference \
29236     -Wodr \
29237     -Wold-style-declaration \
29238     -Wold-style-definition \
29239     -Wopenmp-simd \
29240     -Woverflow \
29241     -Woverlength-strings \
29242     -Woverride-init \
29243     -Wpacked \
29244     -Wpacked-bitfield-compat \
29245     -Wparentheses \
29246     -Wpointer-arith \
29247     -Wpointer-compare \
29248     -Wpointer-sign \
29249     -Wpointer-to-int-cast \
29250     -Wpragmas \
29251     -Wpsabi \
29252     -Wrestrict \
29253     -Wreturn-local-addr \
29254     -Wreturn-type \
29255     -Wscalar-storage-order \
29256     -Wsequence-point \
29257     -Wshadow \
29258     -Wshift-count-negative \
29259     -Wshift-count-overflow \
29260     -Wshift-negative-value \
29261     -Wsizeof-array-argument \
29262     -Wsizeof-pointer-memaccess \
29263     -Wstack-protector \
29264     -Wstrict-aliasing \
29265     -Wstrict-overflow \
29266     -Wstrict-prototypes \
29267     -Wsuggest-attribute=const \
29268     -Wsuggest-attribute=format \
29269     -Wsuggest-attribute=noreturn \
29270     -Wsuggest-attribute=pure \
29271     -Wsuggest-final-methods \
29272     -Wsuggest-final-types \
29273     -Wswitch \
29274     -Wswitch-bool \
29275     -Wswitch-default \
29276     -Wswitch-unreachable \
29277     -Wsync-nand \
29278     -Wsystem-headers \
29279     -Wtautological-compare \
29280     -Wtrampolines \
29281     -Wtrigraphs \
29282     -Wtype-limits \
29283     -Wuninitialized \
29284     -Wunknown-pragmas \
29285     -Wunsafe-loop-optimizations \
29286     -Wunused \
29287     -Wunused-but-set-parameter \
29288     -Wunused-but-set-variable \
29289     -Wunused-function \
29290     -Wunused-label \
29291     -Wunused-local-typedefs \
29292     -Wunused-macros \
29293     -Wunused-parameter \
29294     -Wunused-result \
29295     -Wunused-value \
29296     -Wunused-variable \
29297     -Wvarargs \
29298     -Wvariadic-macros \
29299     -Wvector-operation-performance \
29300     -Wvla \
29301     -Wvolatile-register-var \
29302     -Wwrite-strings \
29303     \
29304     ; do
29305     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
29306   done
29307
29308   # gcc --help=warnings outputs an unusual form for these options; list
29309   # them here so that the above 'comm' command doesn't report a false match.
29310   # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
29311   # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
29312   # the only platforms where it does not fit in a long, so make that
29313   # a special case.
29314   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
29315 printf %s "checking max safe object size... " >&6; }
29316   if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
29317      ? -1
29318      : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max"        "#include <limits.h>
29319       #include <stddef.h>
29320       #include <stdint.h>
29321     "
29322 then :
29323
29324 else
29325   gl_alloc_max=2147483647
29326 fi
29327
29328   case $gl_alloc_max in
29329     -1) gl_alloc_max=9223372036854775807;;
29330   esac
29331   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
29332 printf "%s\n" "$gl_alloc_max" >&6; }
29333   gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
29334   gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
29335   gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
29336   gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
29337   gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
29338   gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
29339   gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
29340   gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
29341   gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
29342   gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
29343
29344   # These are needed for older GCC versions.
29345   if test -n "$GCC"; then
29346     case `($CC --version) 2>/dev/null` in
29347       'gcc (GCC) '[0-3].* | \
29348       'gcc (GCC) '4.[0-7].*)
29349         gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
29350         gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
29351           ;;
29352     esac
29353   fi
29354
29355   # Disable specific options as needed.
29356   if test "$gl_cv_cc_nomfi_needed" = yes; then
29357     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
29358   fi
29359
29360   if test "$gl_cv_cc_uninitialized_supported" = no; then
29361     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
29362   fi
29363
29364   ws=$gl_manywarn_set
29365
29366   ac_ext=c
29367 ac_cpp='$CPP $CPPFLAGS'
29368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29371
29372
29373
29374   gl_warn_set=
29375   set x $ws; shift
29376   for gl_warn_item
29377   do
29378     case " $nw " in
29379       *" $gl_warn_item "*)
29380         ;;
29381       *)
29382         gl_warn_set="$gl_warn_set $gl_warn_item"
29383         ;;
29384     esac
29385   done
29386   ws=$gl_warn_set
29387
29388   for w in $ws; do
29389
29390
29391 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
29392 gl_positive="$w"
29393 case $gl_positive in
29394   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
29395 esac
29396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
29397 printf %s "checking whether C compiler handles $w... " >&6; }
29398 if eval test \${$as_gl_Warn+y}
29399 then :
29400   printf %s "(cached) " >&6
29401 else
29402
29403   gl_save_compiler_FLAGS="$CFLAGS"
29404   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
29405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29406 /* end confdefs.h.  */
29407
29408 int
29409 main (void)
29410 {
29411
29412   ;
29413   return 0;
29414 }
29415 _ACEOF
29416 if ac_fn_c_try_link "$LINENO"
29417 then :
29418   eval "$as_gl_Warn=yes"
29419 else
29420   eval "$as_gl_Warn=no"
29421 fi
29422 rm -f core conftest.err conftest.$ac_objext \
29423     conftest$ac_exeext conftest.$ac_ext
29424   CFLAGS="$gl_save_compiler_FLAGS"
29425
29426 fi
29427 eval ac_res=\$$as_gl_Warn
29428                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29429 printf "%s\n" "$ac_res" >&6; }
29430 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
29431 then :
29432   as_fn_append WARN_CFLAGS " $w"
29433 fi
29434
29435
29436   done
29437
29438
29439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
29440 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
29441 if test ${gl_cv_warn_c__Wno_sign_compare+y}
29442 then :
29443   printf %s "(cached) " >&6
29444 else
29445
29446   gl_save_compiler_FLAGS="$CFLAGS"
29447   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
29448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29449 /* end confdefs.h.  */
29450
29451 int
29452 main (void)
29453 {
29454
29455   ;
29456   return 0;
29457 }
29458 _ACEOF
29459 if ac_fn_c_try_link "$LINENO"
29460 then :
29461   gl_cv_warn_c__Wno_sign_compare=yes
29462 else
29463   gl_cv_warn_c__Wno_sign_compare=no
29464 fi
29465 rm -f core conftest.err conftest.$ac_objext \
29466     conftest$ac_exeext conftest.$ac_ext
29467   CFLAGS="$gl_save_compiler_FLAGS"
29468
29469 fi
29470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
29471 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
29472 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
29473 then :
29474   as_fn_append WARN_CFLAGS " -Wno-sign-compare"
29475 fi
29476
29477      # Too many warnings for now
29478
29479
29480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
29481 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
29482 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
29483 then :
29484   printf %s "(cached) " >&6
29485 else
29486
29487   gl_save_compiler_FLAGS="$CFLAGS"
29488   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
29489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29490 /* end confdefs.h.  */
29491
29492 int
29493 main (void)
29494 {
29495
29496   ;
29497   return 0;
29498 }
29499 _ACEOF
29500 if ac_fn_c_try_link "$LINENO"
29501 then :
29502   gl_cv_warn_c__Wno_unused_parameter=yes
29503 else
29504   gl_cv_warn_c__Wno_unused_parameter=no
29505 fi
29506 rm -f core conftest.err conftest.$ac_objext \
29507     conftest$ac_exeext conftest.$ac_ext
29508   CFLAGS="$gl_save_compiler_FLAGS"
29509
29510 fi
29511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
29512 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
29513 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
29514 then :
29515   as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
29516 fi
29517
29518  # Too many warnings for now
29519
29520
29521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=const" >&5
29522 printf %s "checking whether C compiler handles -Wsuggest-attribute=const... " >&6; }
29523 if test ${gl_cv_warn_c__Wsuggest_attribute_const+y}
29524 then :
29525   printf %s "(cached) " >&6
29526 else
29527
29528   gl_save_compiler_FLAGS="$CFLAGS"
29529   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=const"
29530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29531 /* end confdefs.h.  */
29532
29533 int
29534 main (void)
29535 {
29536
29537   ;
29538   return 0;
29539 }
29540 _ACEOF
29541 if ac_fn_c_try_link "$LINENO"
29542 then :
29543   gl_cv_warn_c__Wsuggest_attribute_const=yes
29544 else
29545   gl_cv_warn_c__Wsuggest_attribute_const=no
29546 fi
29547 rm -f core conftest.err conftest.$ac_objext \
29548     conftest$ac_exeext conftest.$ac_ext
29549   CFLAGS="$gl_save_compiler_FLAGS"
29550
29551 fi
29552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_const" >&5
29553 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_const" >&6; }
29554 if test "x$gl_cv_warn_c__Wsuggest_attribute_const" = xyes
29555 then :
29556   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=const"
29557 fi
29558
29559
29560
29561
29562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=noreturn" >&5
29563 printf %s "checking whether C compiler handles -Wsuggest-attribute=noreturn... " >&6; }
29564 if test ${gl_cv_warn_c__Wsuggest_attribute_noreturn+y}
29565 then :
29566   printf %s "(cached) " >&6
29567 else
29568
29569   gl_save_compiler_FLAGS="$CFLAGS"
29570   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=noreturn"
29571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29572 /* end confdefs.h.  */
29573
29574 int
29575 main (void)
29576 {
29577
29578   ;
29579   return 0;
29580 }
29581 _ACEOF
29582 if ac_fn_c_try_link "$LINENO"
29583 then :
29584   gl_cv_warn_c__Wsuggest_attribute_noreturn=yes
29585 else
29586   gl_cv_warn_c__Wsuggest_attribute_noreturn=no
29587 fi
29588 rm -f core conftest.err conftest.$ac_objext \
29589     conftest$ac_exeext conftest.$ac_ext
29590   CFLAGS="$gl_save_compiler_FLAGS"
29591
29592 fi
29593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_noreturn" >&5
29594 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_noreturn" >&6; }
29595 if test "x$gl_cv_warn_c__Wsuggest_attribute_noreturn" = xyes
29596 then :
29597   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=noreturn"
29598 fi
29599
29600
29601
29602
29603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
29604 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
29605 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
29606 then :
29607   printf %s "(cached) " >&6
29608 else
29609
29610   gl_save_compiler_FLAGS="$CFLAGS"
29611   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
29612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29613 /* end confdefs.h.  */
29614
29615 int
29616 main (void)
29617 {
29618
29619   ;
29620   return 0;
29621 }
29622 _ACEOF
29623 if ac_fn_c_try_link "$LINENO"
29624 then :
29625   gl_cv_warn_c__Wno_format_nonliteral=yes
29626 else
29627   gl_cv_warn_c__Wno_format_nonliteral=no
29628 fi
29629 rm -f core conftest.err conftest.$ac_objext \
29630     conftest$ac_exeext conftest.$ac_ext
29631   CFLAGS="$gl_save_compiler_FLAGS"
29632
29633 fi
29634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
29635 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
29636 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
29637 then :
29638   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
29639 fi
29640
29641
29642
29643   # Enable this warning only with gcc-4.7 and newer.  With 4.6.2 20111027,
29644   # it suggests test.c's advance function may be pure, even though it
29645   # increments a global variable.  Oops.
29646   # Normally we'd write code to test for the precise failure, but that
29647   # requires a relatively large input to make gcc exhibit the failure.
29648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29649 /* end confdefs.h.  */
29650
29651 #if (4) < __GNUC__ || ((4) == __GNUC__ && (7) <= __GNUC_MINOR__)
29652 /* ok */
29653 #else
29654 # error "your version of gcc is older than 4.7"
29655 #endif
29656
29657 int
29658 main (void)
29659 {
29660
29661   ;
29662   return 0;
29663 },
29664
29665 _ACEOF
29666 if ac_fn_c_try_cpp "$LINENO"
29667 then :
29668
29669
29670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wsuggest-attribute=pure" >&5
29671 printf %s "checking whether C compiler handles -Wsuggest-attribute=pure... " >&6; }
29672 if test ${gl_cv_warn_c__Wsuggest_attribute_pure+y}
29673 then :
29674   printf %s "(cached) " >&6
29675 else
29676
29677   gl_save_compiler_FLAGS="$CFLAGS"
29678   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsuggest-attribute=pure"
29679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29680 /* end confdefs.h.  */
29681
29682 int
29683 main (void)
29684 {
29685
29686   ;
29687   return 0;
29688 }
29689 _ACEOF
29690 if ac_fn_c_try_link "$LINENO"
29691 then :
29692   gl_cv_warn_c__Wsuggest_attribute_pure=yes
29693 else
29694   gl_cv_warn_c__Wsuggest_attribute_pure=no
29695 fi
29696 rm -f core conftest.err conftest.$ac_objext \
29697     conftest$ac_exeext conftest.$ac_ext
29698   CFLAGS="$gl_save_compiler_FLAGS"
29699
29700 fi
29701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wsuggest_attribute_pure" >&5
29702 printf "%s\n" "$gl_cv_warn_c__Wsuggest_attribute_pure" >&6; }
29703 if test "x$gl_cv_warn_c__Wsuggest_attribute_pure" = xyes
29704 then :
29705   as_fn_append WARN_CFLAGS " -Wsuggest-attribute=pure"
29706 fi
29707
29708
29709 fi
29710 rm -f conftest.err conftest.i conftest.$ac_ext
29711
29712
29713
29714   # In spite of excluding -Wlogical-op above, it is enabled, as of
29715   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
29716
29717
29718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
29719 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
29720 if test ${gl_cv_warn_c__Wno_logical_op+y}
29721 then :
29722   printf %s "(cached) " >&6
29723 else
29724
29725   gl_save_compiler_FLAGS="$CFLAGS"
29726   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
29727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29728 /* end confdefs.h.  */
29729
29730 int
29731 main (void)
29732 {
29733
29734   ;
29735   return 0;
29736 }
29737 _ACEOF
29738 if ac_fn_c_try_link "$LINENO"
29739 then :
29740   gl_cv_warn_c__Wno_logical_op=yes
29741 else
29742   gl_cv_warn_c__Wno_logical_op=no
29743 fi
29744 rm -f core conftest.err conftest.$ac_objext \
29745     conftest$ac_exeext conftest.$ac_ext
29746   CFLAGS="$gl_save_compiler_FLAGS"
29747
29748 fi
29749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
29750 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
29751 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
29752 then :
29753   as_fn_append WARN_CFLAGS " -Wno-logical-op"
29754 fi
29755
29756
29757
29758
29759
29760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
29761 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
29762 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
29763 then :
29764   printf %s "(cached) " >&6
29765 else
29766
29767   gl_save_compiler_FLAGS="$CFLAGS"
29768   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
29769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29770 /* end confdefs.h.  */
29771
29772 int
29773 main (void)
29774 {
29775
29776   ;
29777   return 0;
29778 }
29779 _ACEOF
29780 if ac_fn_c_try_link "$LINENO"
29781 then :
29782   gl_cv_warn_c__fdiagnostics_show_option=yes
29783 else
29784   gl_cv_warn_c__fdiagnostics_show_option=no
29785 fi
29786 rm -f core conftest.err conftest.$ac_objext \
29787     conftest$ac_exeext conftest.$ac_ext
29788   CFLAGS="$gl_save_compiler_FLAGS"
29789
29790 fi
29791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
29792 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
29793 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
29794 then :
29795   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
29796 fi
29797
29798
29799
29800
29801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
29802 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
29803 if test ${gl_cv_warn_c__funit_at_a_time+y}
29804 then :
29805   printf %s "(cached) " >&6
29806 else
29807
29808   gl_save_compiler_FLAGS="$CFLAGS"
29809   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
29810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29811 /* end confdefs.h.  */
29812
29813 int
29814 main (void)
29815 {
29816
29817   ;
29818   return 0;
29819 }
29820 _ACEOF
29821 if ac_fn_c_try_link "$LINENO"
29822 then :
29823   gl_cv_warn_c__funit_at_a_time=yes
29824 else
29825   gl_cv_warn_c__funit_at_a_time=no
29826 fi
29827 rm -f core conftest.err conftest.$ac_objext \
29828     conftest$ac_exeext conftest.$ac_ext
29829   CFLAGS="$gl_save_compiler_FLAGS"
29830
29831 fi
29832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
29833 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
29834 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
29835 then :
29836   as_fn_append WARN_CFLAGS " -funit-at-a-time"
29837 fi
29838
29839
29840
29841
29842
29843
29844 printf "%s\n" "#define lint 1" >>confdefs.h
29845
29846
29847
29848 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
29849
29850
29851   # We use a slightly smaller set of warning options for lib/.
29852   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
29853   nw=
29854   nw="$nw -Wstrict-overflow"
29855   nw="$nw -Wuninitialized"
29856   nw="$nw -Wunused-macros"
29857   nw="$nw -Wmissing-prototypes"
29858   nw="$nw -Wold-style-definition"
29859
29860   gl_warn_set=
29861   set x $WARN_CFLAGS; shift
29862   for gl_warn_item
29863   do
29864     case " $nw " in
29865       *" $gl_warn_item "*)
29866         ;;
29867       *)
29868         gl_warn_set="$gl_warn_set $gl_warn_item"
29869         ;;
29870     esac
29871   done
29872   GNULIB_WARN_CFLAGS=$gl_warn_set
29873
29874
29875 fi
29876
29877 # cc -E produces incorrect asm files on SVR4, so postprocess it.
29878 ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
29879
29880
29881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for underline in external names" >&5
29882 printf %s "checking for underline in external names... " >&6; }
29883 if test ${gzip_cv_underline+y}
29884 then :
29885   printf %s "(cached) " >&6
29886 else
29887   gzip_cv_underline=yes
29888    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29889 /* end confdefs.h.  */
29890 int foo() {return 0;}
29891 int
29892 main (void)
29893 {
29894
29895   ;
29896   return 0;
29897 }
29898 _ACEOF
29899 if ac_fn_c_try_compile "$LINENO"
29900 then :
29901   $NM conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
29902         gzip_cv_underline=no
29903 fi
29904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29905 fi
29906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_underline" >&5
29907 printf "%s\n" "$gzip_cv_underline" >&6; }
29908 ASCPPFLAGS=
29909 if test $gzip_cv_underline = no; then
29910   ASCPPFLAGS='-DNO_UNDERLINE'
29911 fi
29912
29913
29914
29915 # Try to assemble match.S.
29916 # "gcc -E match.s" ignores -E, so we must use _match.S.
29917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an assembler syntax supported by this package" >&5
29918 printf %s "checking for an assembler syntax supported by this package... " >&6; }
29919 if test ${gzip_cv_assembler+y}
29920 then :
29921   printf %s "(cached) " >&6
29922 else
29923   gzip_cv_assembler=no
29924    case $DEFS in
29925    *NO_ASM*) ;;
29926    *)
29927      if cp $srcdir/lib/match.c _match.S &&
29928         eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
29929         eval "$ASCPPPOST < _match.i > match_.s"; then
29930        if test ! -s match_.s || grep error < match_.s > /dev/null; then
29931          :
29932        elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null" &&
29933             test -f match_.$OBJEXT; then
29934          rm -f match_.$OBJEXT
29935          gzip_cv_assembler=yes
29936          if echo 'void foo (void) {}' > conftest.c &&
29937             eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null" &&
29938             grep '\.note\.GNU-stack' conftest.s >/dev/null &&
29939             eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null" &&
29940             test -f match_.$OBJEXT; then
29941            gzip_cv_assembler='yes, with -Wa,--noexecstack'
29942          fi
29943        fi
29944      fi
29945      rm -f conftest* _match.i _match.S match_.s match_.$OBJEXT;;
29946    esac
29947 fi
29948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gzip_cv_assembler" >&5
29949 printf "%s\n" "$gzip_cv_assembler" >&6; }
29950 if test "$gzip_cv_assembler" != no; then
29951
29952 printf "%s\n" "#define ASMV /**/" >>confdefs.h
29953
29954   case " $LIBOBJS " in
29955   *" match.$ac_objext "* ) ;;
29956   *) LIBOBJS="$LIBOBJS match.$ac_objext"
29957  ;;
29958 esac
29959
29960 fi
29961 if test "$gzip_cv_assembler" = 'yes, with -Wa,--noexecstack'; then
29962   ASFLAGS_config='-Wa,--noexecstack'
29963 else
29964   ASFLAGS_config=
29965 fi
29966
29967
29968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
29969 printf %s "checking for library containing strerror... " >&6; }
29970 if test ${ac_cv_search_strerror+y}
29971 then :
29972   printf %s "(cached) " >&6
29973 else
29974   ac_func_search_save_LIBS=$LIBS
29975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29976 /* end confdefs.h.  */
29977
29978 /* Override any GCC internal prototype to avoid an error.
29979    Use char because int might match the return type of a GCC
29980    builtin and then its argument prototype would still apply.  */
29981 #ifdef __cplusplus
29982 extern "C"
29983 #endif
29984 char strerror ();
29985 int
29986 main (void)
29987 {
29988 return strerror ();
29989   ;
29990   return 0;
29991 }
29992 _ACEOF
29993 for ac_lib in '' cposix
29994 do
29995   if test -z "$ac_lib"; then
29996     ac_res="none required"
29997   else
29998     ac_res=-l$ac_lib
29999     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
30000   fi
30001   if ac_fn_c_try_link "$LINENO"
30002 then :
30003   ac_cv_search_strerror=$ac_res
30004 fi
30005 rm -f core conftest.err conftest.$ac_objext \
30006     conftest$ac_exeext
30007   if test ${ac_cv_search_strerror+y}
30008 then :
30009   break
30010 fi
30011 done
30012 if test ${ac_cv_search_strerror+y}
30013 then :
30014
30015 else
30016   ac_cv_search_strerror=no
30017 fi
30018 rm conftest.$ac_ext
30019 LIBS=$ac_func_search_save_LIBS
30020 fi
30021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
30022 printf "%s\n" "$ac_cv_search_strerror" >&6; }
30023 ac_res=$ac_cv_search_strerror
30024 if test "$ac_res" != no
30025 then :
30026   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30027
30028 fi
30029
30030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
30031 printf %s "checking for an ANSI C-conforming const... " >&6; }
30032 if test ${ac_cv_c_const+y}
30033 then :
30034   printf %s "(cached) " >&6
30035 else
30036   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30037 /* end confdefs.h.  */
30038
30039 int
30040 main (void)
30041 {
30042
30043 #ifndef __cplusplus
30044   /* Ultrix mips cc rejects this sort of thing.  */
30045   typedef int charset[2];
30046   const charset cs = { 0, 0 };
30047   /* SunOS 4.1.1 cc rejects this.  */
30048   char const *const *pcpcc;
30049   char **ppc;
30050   /* NEC SVR4.0.2 mips cc rejects this.  */
30051   struct point {int x, y;};
30052   static struct point const zero = {0,0};
30053   /* IBM XL C 1.02.0.0 rejects this.
30054      It does not let you subtract one const X* pointer from another in
30055      an arm of an if-expression whose if-part is not a constant
30056      expression */
30057   const char *g = "string";
30058   pcpcc = &g + (g ? g-g : 0);
30059   /* HPUX 7.0 cc rejects these. */
30060   ++pcpcc;
30061   ppc = (char**) pcpcc;
30062   pcpcc = (char const *const *) ppc;
30063   { /* SCO 3.2v4 cc rejects this sort of thing.  */
30064     char tx;
30065     char *t = &tx;
30066     char const *s = 0 ? (char *) 0 : (char const *) 0;
30067
30068     *t++ = 0;
30069     if (s) return 0;
30070   }
30071   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
30072     int x[] = {25, 17};
30073     const int *foo = &x[0];
30074     ++foo;
30075   }
30076   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
30077     typedef const int *iptr;
30078     iptr p = 0;
30079     ++p;
30080   }
30081   { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
30082        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
30083     struct s { int j; const int *ap[3]; } bx;
30084     struct s *b = &bx; b->j = 5;
30085   }
30086   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
30087     const int foo = 10;
30088     if (!foo) return 0;
30089   }
30090   return !cs[0] && !zero.x;
30091 #endif
30092
30093   ;
30094   return 0;
30095 }
30096 _ACEOF
30097 if ac_fn_c_try_compile "$LINENO"
30098 then :
30099   ac_cv_c_const=yes
30100 else
30101   ac_cv_c_const=no
30102 fi
30103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30104 fi
30105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
30106 printf "%s\n" "$ac_cv_c_const" >&6; }
30107 if test $ac_cv_c_const = no; then
30108
30109 printf "%s\n" "#define const /**/" >>confdefs.h
30110
30111 fi
30112
30113 # Autoupdate added the following line to ensure that your configure
30114 # script's behavior did not change.  It is probably safe to remove.
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125 ac_header_dirent=no
30126 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
30127   as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
30128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
30129 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
30130 if eval test \${$as_ac_Header+y}
30131 then :
30132   printf %s "(cached) " >&6
30133 else
30134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30135 /* end confdefs.h.  */
30136 #include <sys/types.h>
30137 #include <$ac_hdr>
30138
30139 int
30140 main (void)
30141 {
30142 if ((DIR *) 0)
30143 return 0;
30144   ;
30145   return 0;
30146 }
30147 _ACEOF
30148 if ac_fn_c_try_compile "$LINENO"
30149 then :
30150   eval "$as_ac_Header=yes"
30151 else
30152   eval "$as_ac_Header=no"
30153 fi
30154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30155 fi
30156 eval ac_res=\$$as_ac_Header
30157                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30158 printf "%s\n" "$ac_res" >&6; }
30159 if eval test \"x\$"$as_ac_Header"\" = x"yes"
30160 then :
30161   cat >>confdefs.h <<_ACEOF
30162 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
30163 _ACEOF
30164
30165 ac_header_dirent=$ac_hdr; break
30166 fi
30167
30168 done
30169 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
30170 if test $ac_header_dirent = dirent.h; then
30171   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
30172 printf %s "checking for library containing opendir... " >&6; }
30173 if test ${ac_cv_search_opendir+y}
30174 then :
30175   printf %s "(cached) " >&6
30176 else
30177   ac_func_search_save_LIBS=$LIBS
30178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30179 /* end confdefs.h.  */
30180
30181 /* Override any GCC internal prototype to avoid an error.
30182    Use char because int might match the return type of a GCC
30183    builtin and then its argument prototype would still apply.  */
30184 #ifdef __cplusplus
30185 extern "C"
30186 #endif
30187 char opendir ();
30188 int
30189 main (void)
30190 {
30191 return opendir ();
30192   ;
30193   return 0;
30194 }
30195 _ACEOF
30196 for ac_lib in '' dir
30197 do
30198   if test -z "$ac_lib"; then
30199     ac_res="none required"
30200   else
30201     ac_res=-l$ac_lib
30202     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
30203   fi
30204   if ac_fn_c_try_link "$LINENO"
30205 then :
30206   ac_cv_search_opendir=$ac_res
30207 fi
30208 rm -f core conftest.err conftest.$ac_objext \
30209     conftest$ac_exeext
30210   if test ${ac_cv_search_opendir+y}
30211 then :
30212   break
30213 fi
30214 done
30215 if test ${ac_cv_search_opendir+y}
30216 then :
30217
30218 else
30219   ac_cv_search_opendir=no
30220 fi
30221 rm conftest.$ac_ext
30222 LIBS=$ac_func_search_save_LIBS
30223 fi
30224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
30225 printf "%s\n" "$ac_cv_search_opendir" >&6; }
30226 ac_res=$ac_cv_search_opendir
30227 if test "$ac_res" != no
30228 then :
30229   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30230
30231 fi
30232
30233 else
30234   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
30235 printf %s "checking for library containing opendir... " >&6; }
30236 if test ${ac_cv_search_opendir+y}
30237 then :
30238   printf %s "(cached) " >&6
30239 else
30240   ac_func_search_save_LIBS=$LIBS
30241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30242 /* end confdefs.h.  */
30243
30244 /* Override any GCC internal prototype to avoid an error.
30245    Use char because int might match the return type of a GCC
30246    builtin and then its argument prototype would still apply.  */
30247 #ifdef __cplusplus
30248 extern "C"
30249 #endif
30250 char opendir ();
30251 int
30252 main (void)
30253 {
30254 return opendir ();
30255   ;
30256   return 0;
30257 }
30258 _ACEOF
30259 for ac_lib in '' x
30260 do
30261   if test -z "$ac_lib"; then
30262     ac_res="none required"
30263   else
30264     ac_res=-l$ac_lib
30265     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
30266   fi
30267   if ac_fn_c_try_link "$LINENO"
30268 then :
30269   ac_cv_search_opendir=$ac_res
30270 fi
30271 rm -f core conftest.err conftest.$ac_objext \
30272     conftest$ac_exeext
30273   if test ${ac_cv_search_opendir+y}
30274 then :
30275   break
30276 fi
30277 done
30278 if test ${ac_cv_search_opendir+y}
30279 then :
30280
30281 else
30282   ac_cv_search_opendir=no
30283 fi
30284 rm conftest.$ac_ext
30285 LIBS=$ac_func_search_save_LIBS
30286 fi
30287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
30288 printf "%s\n" "$ac_cv_search_opendir" >&6; }
30289 ac_res=$ac_cv_search_opendir
30290 if test "$ac_res" != no
30291 then :
30292   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30293
30294 fi
30295
30296 fi
30297
30298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
30299 printf %s "checking return type of signal handlers... " >&6; }
30300 if test ${ac_cv_type_signal+y}
30301 then :
30302   printf %s "(cached) " >&6
30303 else
30304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30305 /* end confdefs.h.  */
30306 #include <sys/types.h>
30307 #include <signal.h>
30308
30309 int
30310 main (void)
30311 {
30312 return *(signal (0, 0)) (0) == 1;
30313   ;
30314   return 0;
30315 }
30316 _ACEOF
30317 if ac_fn_c_try_compile "$LINENO"
30318 then :
30319   ac_cv_type_signal=int
30320 else
30321   ac_cv_type_signal=void
30322 fi
30323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30324 fi
30325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
30326 printf "%s\n" "$ac_cv_type_signal" >&6; }
30327
30328 printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h
30329
30330
30331 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
30332 if test "x$ac_cv_type_size_t" = xyes
30333 then :
30334
30335 else
30336
30337 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
30338
30339 fi
30340
30341 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
30342 if test "x$ac_cv_type_off_t" = xyes
30343 then :
30344
30345 else
30346
30347 printf "%s\n" "#define off_t long int" >>confdefs.h
30348
30349 fi
30350
30351
30352 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile tests/Makefile"
30353
30354 cat >confcache <<\_ACEOF
30355 # This file is a shell script that caches the results of configure
30356 # tests run on this system so they can be shared between configure
30357 # scripts and configure runs, see configure's option --config-cache.
30358 # It is not useful on other systems.  If it contains results you don't
30359 # want to keep, you may remove or edit it.
30360 #
30361 # config.status only pays attention to the cache file if you give it
30362 # the --recheck option to rerun configure.
30363 #
30364 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30365 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30366 # following values.
30367
30368 _ACEOF
30369
30370 # The following way of writing the cache mishandles newlines in values,
30371 # but we know of no workaround that is simple, portable, and efficient.
30372 # So, we kill variables containing newlines.
30373 # Ultrix sh set writes to stderr and can't be redirected directly,
30374 # and sets the high bit in the cache file unless we assign to the vars.
30375 (
30376   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30377     eval ac_val=\$$ac_var
30378     case $ac_val in #(
30379     *${as_nl}*)
30380       case $ac_var in #(
30381       *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30382 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30383       esac
30384       case $ac_var in #(
30385       _ | IFS | as_nl) ;; #(
30386       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30387       *) { eval $ac_var=; unset $ac_var;} ;;
30388       esac ;;
30389     esac
30390   done
30391
30392   (set) 2>&1 |
30393     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30394     *${as_nl}ac_space=\ *)
30395       # `set' does not quote correctly, so add quotes: double-quote
30396       # substitution turns \\\\ into \\, and sed turns \\ into \.
30397       sed -n \
30398         "s/'/'\\\\''/g;
30399           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30400       ;; #(
30401     *)
30402       # `set' quotes correctly as required by POSIX, so do not add quotes.
30403       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30404       ;;
30405     esac |
30406     sort
30407 ) |
30408   sed '
30409      /^ac_cv_env_/b end
30410      t clear
30411      :clear
30412      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
30413      t end
30414      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30415      :end' >>confcache
30416 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30417   if test -w "$cache_file"; then
30418     if test "x$cache_file" != "x/dev/null"; then
30419       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30420 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
30421       if test ! -f "$cache_file" || test -h "$cache_file"; then
30422         cat confcache >"$cache_file"
30423       else
30424         case $cache_file in #(
30425         */* | ?:*)
30426           mv -f confcache "$cache_file"$$ &&
30427           mv -f "$cache_file"$$ "$cache_file" ;; #(
30428         *)
30429           mv -f confcache "$cache_file" ;;
30430         esac
30431       fi
30432     fi
30433   else
30434     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30435 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
30436   fi
30437 fi
30438 rm -f confcache
30439
30440 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30441 # Let make expand exec_prefix.
30442 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30443
30444 DEFS=-DHAVE_CONFIG_H
30445
30446 ac_libobjs=
30447 ac_ltlibobjs=
30448 U=
30449 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30450   # 1. Remove the extension, and $U if already installed.
30451   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30452   ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
30453   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30454   #    will be set to the directory where LIBOBJS objects are built.
30455   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30456   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30457 done
30458 LIBOBJS=$ac_libobjs
30459
30460 LTLIBOBJS=$ac_ltlibobjs
30461
30462
30463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30464 printf %s "checking that generated files are newer than configure... " >&6; }
30465    if test -n "$am_sleep_pid"; then
30466      # Hide warnings about reused PIDs.
30467      wait $am_sleep_pid 2>/dev/null
30468    fi
30469    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
30470 printf "%s\n" "done" >&6; }
30471  if test -n "$EXEEXT"; then
30472   am__EXEEXT_TRUE=
30473   am__EXEEXT_FALSE='#'
30474 else
30475   am__EXEEXT_TRUE='#'
30476   am__EXEEXT_FALSE=
30477 fi
30478
30479 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30480   as_fn_error $? "conditional \"AMDEP\" was never defined.
30481 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30482 fi
30483 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30484   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30485 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30486 fi
30487 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
30488   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
30489 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30490 fi
30491 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
30492   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
30493 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30494 fi
30495 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
30496   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
30497 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30498 fi
30499 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
30500   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
30501 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30502 fi
30503
30504
30505 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
30506   as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
30507 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30508 fi
30509 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30510   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30511 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30512 fi
30513 CONFIG_INCLUDE=lib/config.h
30514
30515 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
30516   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
30517 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30518 fi
30519 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
30520   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
30521 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30522 fi
30523 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30524   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30525 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30526 fi
30527 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
30528   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
30529 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30530 fi
30531 if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
30532   as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
30533 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30534 fi
30535 if test -z "${GL_GENERATE_UTIME_H_TRUE}" && test -z "${GL_GENERATE_UTIME_H_FALSE}"; then
30536   as_fn_error $? "conditional \"GL_GENERATE_UTIME_H\" was never defined.
30537 Usually this means the macro was only invoked conditionally." "$LINENO" 5
30538 fi
30539
30540     gl_libobjs=
30541     gl_ltlibobjs=
30542     if test -n "$gl_LIBOBJS"; then
30543       # Remove the extension.
30544       sed_drop_objext='s/\.o$//;s/\.obj$//'
30545       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30546         gl_libobjs="$gl_libobjs $i.$ac_objext"
30547         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
30548       done
30549     fi
30550     gl_LIBOBJS=$gl_libobjs
30551
30552     gl_LTLIBOBJS=$gl_ltlibobjs
30553
30554
30555
30556     gltests_libobjs=
30557     gltests_ltlibobjs=
30558     if test -n "$gltests_LIBOBJS"; then
30559       # Remove the extension.
30560       sed_drop_objext='s/\.o$//;s/\.obj$//'
30561       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30562         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
30563         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
30564       done
30565     fi
30566     gltests_LIBOBJS=$gltests_libobjs
30567
30568     gltests_LTLIBOBJS=$gltests_ltlibobjs
30569
30570
30571
30572 : "${CONFIG_STATUS=./config.status}"
30573 ac_write_fail=0
30574 ac_clean_files_save=$ac_clean_files
30575 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30577 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
30578 as_write_fail=0
30579 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30580 #! $SHELL
30581 # Generated by $as_me.
30582 # Run this file to recreate the current configuration.
30583 # Compiler output produced by configure, useful for debugging
30584 # configure, is in config.log if it exists.
30585
30586 debug=false
30587 ac_cs_recheck=false
30588 ac_cs_silent=false
30589
30590 SHELL=\${CONFIG_SHELL-$SHELL}
30591 export SHELL
30592 _ASEOF
30593 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30594 ## -------------------- ##
30595 ## M4sh Initialization. ##
30596 ## -------------------- ##
30597
30598 # Be more Bourne compatible
30599 DUALCASE=1; export DUALCASE # for MKS sh
30600 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
30601 then :
30602   emulate sh
30603   NULLCMD=:
30604   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30605   # is contrary to our usage.  Disable this feature.
30606   alias -g '${1+"$@"}'='"$@"'
30607   setopt NO_GLOB_SUBST
30608 else
30609   case `(set -o) 2>/dev/null` in #(
30610   *posix*) :
30611     set -o posix ;; #(
30612   *) :
30613      ;;
30614 esac
30615 fi
30616
30617
30618 # The user is always right.
30619 if ${PATH_SEPARATOR+false} :; then
30620   PATH_SEPARATOR=:
30621   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30622     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30623       PATH_SEPARATOR=';'
30624   }
30625 fi
30626
30627
30628 # IFS
30629 # We need space, tab and new line, in precisely that order.  Quoting is
30630 # there to prevent editors from complaining about space-tab.
30631 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30632 # splitting by setting IFS to empty value.)
30633 as_nl='
30634 '
30635 export as_nl
30636 IFS=" ""        $as_nl"
30637
30638 # Find who we are.  Look in the path if we contain no directory separator.
30639 as_myself=
30640 case $0 in #((
30641   *[\\/]* ) as_myself=$0 ;;
30642   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30643 for as_dir in $PATH
30644 do
30645   IFS=$as_save_IFS
30646   case $as_dir in #(((
30647     '') as_dir=./ ;;
30648     */) ;;
30649     *) as_dir=$as_dir/ ;;
30650   esac
30651     test -r "$as_dir$0" && as_myself=$as_dir$0 && break
30652   done
30653 IFS=$as_save_IFS
30654
30655      ;;
30656 esac
30657 # We did not find ourselves, most probably we were run as `sh COMMAND'
30658 # in which case we are not to be found in the path.
30659 if test "x$as_myself" = x; then
30660   as_myself=$0
30661 fi
30662 if test ! -f "$as_myself"; then
30663   printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30664   exit 1
30665 fi
30666
30667 # Unset variables that we do not need and which cause bugs (e.g. in
30668 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30669 # suppresses any "Segmentation fault" message there.  '((' could
30670 # trigger a bug in pdksh 5.2.14.
30671 for as_var in BASH_ENV ENV MAIL MAILPATH
30672 do eval test \${$as_var+y} \
30673   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30674 done
30675 PS1='$ '
30676 PS2='> '
30677 PS4='+ '
30678
30679 # NLS nuisances.
30680 LC_ALL=C
30681 export LC_ALL
30682 LANGUAGE=C
30683 export LANGUAGE
30684
30685 # CDPATH.
30686 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30687
30688
30689 # as_fn_error STATUS ERROR [LINENO LOG_FD]
30690 # ----------------------------------------
30691 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30692 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30693 # script with STATUS, using 1 if that was 0.
30694 as_fn_error ()
30695 {
30696   as_status=$1; test $as_status -eq 0 && as_status=1
30697   if test "$4"; then
30698     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30699     printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30700   fi
30701   printf "%s\n" "$as_me: error: $2" >&2
30702   as_fn_exit $as_status
30703 } # as_fn_error
30704
30705
30706 # as_fn_set_status STATUS
30707 # -----------------------
30708 # Set $? to STATUS, without forking.
30709 as_fn_set_status ()
30710 {
30711   return $1
30712 } # as_fn_set_status
30713
30714 # as_fn_exit STATUS
30715 # -----------------
30716 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30717 as_fn_exit ()
30718 {
30719   set +e
30720   as_fn_set_status $1
30721   exit $1
30722 } # as_fn_exit
30723
30724 # as_fn_unset VAR
30725 # ---------------
30726 # Portably unset VAR.
30727 as_fn_unset ()
30728 {
30729   { eval $1=; unset $1;}
30730 }
30731 as_unset=as_fn_unset
30732 # as_fn_append VAR VALUE
30733 # ----------------------
30734 # Append the text in VALUE to the end of the definition contained in VAR. Take
30735 # advantage of any shell optimizations that allow amortized linear growth over
30736 # repeated appends, instead of the typical quadratic growth present in naive
30737 # implementations.
30738 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
30739 then :
30740   eval 'as_fn_append ()
30741   {
30742     eval $1+=\$2
30743   }'
30744 else
30745   as_fn_append ()
30746   {
30747     eval $1=\$$1\$2
30748   }
30749 fi # as_fn_append
30750
30751 # as_fn_arith ARG...
30752 # ------------------
30753 # Perform arithmetic evaluation on the ARGs, and store the result in the
30754 # global $as_val. Take advantage of shells that can avoid forks. The arguments
30755 # must be portable across $(()) and expr.
30756 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
30757 then :
30758   eval 'as_fn_arith ()
30759   {
30760     as_val=$(( $* ))
30761   }'
30762 else
30763   as_fn_arith ()
30764   {
30765     as_val=`expr "$@" || test $? -eq 1`
30766   }
30767 fi # as_fn_arith
30768
30769
30770 if expr a : '\(a\)' >/dev/null 2>&1 &&
30771    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30772   as_expr=expr
30773 else
30774   as_expr=false
30775 fi
30776
30777 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30778   as_basename=basename
30779 else
30780   as_basename=false
30781 fi
30782
30783 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30784   as_dirname=dirname
30785 else
30786   as_dirname=false
30787 fi
30788
30789 as_me=`$as_basename -- "$0" ||
30790 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30791          X"$0" : 'X\(//\)$' \| \
30792          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30793 printf "%s\n" X/"$0" |
30794     sed '/^.*\/\([^/][^/]*\)\/*$/{
30795             s//\1/
30796             q
30797           }
30798           /^X\/\(\/\/\)$/{
30799             s//\1/
30800             q
30801           }
30802           /^X\/\(\/\).*/{
30803             s//\1/
30804             q
30805           }
30806           s/.*/./; q'`
30807
30808 # Avoid depending upon Character Ranges.
30809 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30810 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30811 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30812 as_cr_digits='0123456789'
30813 as_cr_alnum=$as_cr_Letters$as_cr_digits
30814
30815 ECHO_C= ECHO_N= ECHO_T=
30816 case `echo -n x` in #(((((
30817 -n*)
30818   case `echo 'xy\c'` in
30819   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30820   xy)  ECHO_C='\c';;
30821   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
30822        ECHO_T=' ';;
30823   esac;;
30824 *)
30825   ECHO_N='-n';;
30826 esac
30827
30828 rm -f conf$$ conf$$.exe conf$$.file
30829 if test -d conf$$.dir; then
30830   rm -f conf$$.dir/conf$$.file
30831 else
30832   rm -f conf$$.dir
30833   mkdir conf$$.dir 2>/dev/null
30834 fi
30835 if (echo >conf$$.file) 2>/dev/null; then
30836   if ln -s conf$$.file conf$$ 2>/dev/null; then
30837     as_ln_s='ln -s'
30838     # ... but there are two gotchas:
30839     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30840     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30841     # In both cases, we have to default to `cp -pR'.
30842     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30843       as_ln_s='cp -pR'
30844   elif ln conf$$.file conf$$ 2>/dev/null; then
30845     as_ln_s=ln
30846   else
30847     as_ln_s='cp -pR'
30848   fi
30849 else
30850   as_ln_s='cp -pR'
30851 fi
30852 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30853 rmdir conf$$.dir 2>/dev/null
30854
30855
30856 # as_fn_mkdir_p
30857 # -------------
30858 # Create "$as_dir" as a directory, including parents if necessary.
30859 as_fn_mkdir_p ()
30860 {
30861
30862   case $as_dir in #(
30863   -*) as_dir=./$as_dir;;
30864   esac
30865   test -d "$as_dir" || eval $as_mkdir_p || {
30866     as_dirs=
30867     while :; do
30868       case $as_dir in #(
30869       *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30870       *) as_qdir=$as_dir;;
30871       esac
30872       as_dirs="'$as_qdir' $as_dirs"
30873       as_dir=`$as_dirname -- "$as_dir" ||
30874 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30875          X"$as_dir" : 'X\(//\)[^/]' \| \
30876          X"$as_dir" : 'X\(//\)$' \| \
30877          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30878 printf "%s\n" X"$as_dir" |
30879     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30880             s//\1/
30881             q
30882           }
30883           /^X\(\/\/\)[^/].*/{
30884             s//\1/
30885             q
30886           }
30887           /^X\(\/\/\)$/{
30888             s//\1/
30889             q
30890           }
30891           /^X\(\/\).*/{
30892             s//\1/
30893             q
30894           }
30895           s/.*/./; q'`
30896       test -d "$as_dir" && break
30897     done
30898     test -z "$as_dirs" || eval "mkdir $as_dirs"
30899   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
30900
30901
30902 } # as_fn_mkdir_p
30903 if mkdir -p . 2>/dev/null; then
30904   as_mkdir_p='mkdir -p "$as_dir"'
30905 else
30906   test -d ./-p && rmdir ./-p
30907   as_mkdir_p=false
30908 fi
30909
30910
30911 # as_fn_executable_p FILE
30912 # -----------------------
30913 # Test if FILE is an executable regular file.
30914 as_fn_executable_p ()
30915 {
30916   test -f "$1" && test -x "$1"
30917 } # as_fn_executable_p
30918 as_test_x='test -x'
30919 as_executable_p=as_fn_executable_p
30920
30921 # Sed expression to map a string onto a valid CPP name.
30922 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30923
30924 # Sed expression to map a string onto a valid variable name.
30925 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30926
30927
30928 exec 6>&1
30929 ## ----------------------------------- ##
30930 ## Main body of $CONFIG_STATUS script. ##
30931 ## ----------------------------------- ##
30932 _ASEOF
30933 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30934
30935 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30936 # Save the log message, to keep $0 and so on meaningful, and to
30937 # report actual input values of CONFIG_FILES etc. instead of their
30938 # values after options handling.
30939 ac_log="
30940 This file was extended by gzip $as_me 1.9, which was
30941 generated by GNU Autoconf 2.69.193-8974.  Invocation command line was
30942
30943   CONFIG_FILES    = $CONFIG_FILES
30944   CONFIG_HEADERS  = $CONFIG_HEADERS
30945   CONFIG_LINKS    = $CONFIG_LINKS
30946   CONFIG_COMMANDS = $CONFIG_COMMANDS
30947   $ $0 $@
30948
30949 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30950 "
30951
30952 _ACEOF
30953
30954 case $ac_config_files in *"
30955 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30956 esac
30957
30958 case $ac_config_headers in *"
30959 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30960 esac
30961
30962
30963 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30964 # Files that config.status was made for.
30965 config_files="$ac_config_files"
30966 config_headers="$ac_config_headers"
30967 config_links="$ac_config_links"
30968 config_commands="$ac_config_commands"
30969
30970 _ACEOF
30971
30972 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30973 ac_cs_usage="\
30974 \`$as_me' instantiates files and other configuration actions
30975 from templates according to the current configuration.  Unless the files
30976 and actions are specified as TAGs, all are instantiated by default.
30977
30978 Usage: $0 [OPTION]... [TAG]...
30979
30980   -h, --help       print this help, then exit
30981   -V, --version    print version number and configuration settings, then exit
30982       --config     print configuration, then exit
30983   -q, --quiet, --silent
30984                    do not print progress messages
30985   -d, --debug      don't remove temporary files
30986       --recheck    update $as_me by reconfiguring in the same conditions
30987       --file=FILE[:TEMPLATE]
30988                    instantiate the configuration file FILE
30989       --header=FILE[:TEMPLATE]
30990                    instantiate the configuration header FILE
30991
30992 Configuration files:
30993 $config_files
30994
30995 Configuration headers:
30996 $config_headers
30997
30998 Configuration links:
30999 $config_links
31000
31001 Configuration commands:
31002 $config_commands
31003
31004 Report bugs to <bug-gzip@gnu.org>."
31005
31006 _ACEOF
31007 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31008 ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31009 ac_cs_version="\\
31010 gzip config.status 1.9
31011 configured by $0, generated by GNU Autoconf 2.69.193-8974,
31012   with options \\"\$ac_cs_config\\"
31013
31014 Copyright (C) 2017 Free Software Foundation, Inc.
31015 This config.status script is free software; the Free Software Foundation
31016 gives unlimited permission to copy, distribute and modify it."
31017
31018 ac_pwd='$ac_pwd'
31019 srcdir='$srcdir'
31020 INSTALL='$INSTALL'
31021 MKDIR_P='$MKDIR_P'
31022 AWK='$AWK'
31023 test -n "\$AWK" || AWK=awk
31024 _ACEOF
31025
31026 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31027 # The default lists apply if the user does not specify any file.
31028 ac_need_defaults=:
31029 while test $# != 0
31030 do
31031   case $1 in
31032   --*=?*)
31033     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31034     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31035     ac_shift=:
31036     ;;
31037   --*=)
31038     ac_option=`expr "X$1" : 'X\([^=]*\)='`
31039     ac_optarg=
31040     ac_shift=:
31041     ;;
31042   *)
31043     ac_option=$1
31044     ac_optarg=$2
31045     ac_shift=shift
31046     ;;
31047   esac
31048
31049   case $ac_option in
31050   # Handling of the options.
31051   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31052     ac_cs_recheck=: ;;
31053   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31054     printf "%s\n" "$ac_cs_version"; exit ;;
31055   --config | --confi | --conf | --con | --co | --c )
31056     printf "%s\n" "$ac_cs_config"; exit ;;
31057   --debug | --debu | --deb | --de | --d | -d )
31058     debug=: ;;
31059   --file | --fil | --fi | --f )
31060     $ac_shift
31061     case $ac_optarg in
31062     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31063     '') as_fn_error $? "missing file argument" ;;
31064     esac
31065     as_fn_append CONFIG_FILES " '$ac_optarg'"
31066     ac_need_defaults=false;;
31067   --header | --heade | --head | --hea )
31068     $ac_shift
31069     case $ac_optarg in
31070     *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31071     esac
31072     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31073     ac_need_defaults=false;;
31074   --he | --h)
31075     # Conflict between --help and --header
31076     as_fn_error $? "ambiguous option: \`$1'
31077 Try \`$0 --help' for more information.";;
31078   --help | --hel | -h )
31079     printf "%s\n" "$ac_cs_usage"; exit ;;
31080   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31081   | -silent | --silent | --silen | --sile | --sil | --si | --s)
31082     ac_cs_silent=: ;;
31083
31084   # This is an error.
31085   -*) as_fn_error $? "unrecognized option: \`$1'
31086 Try \`$0 --help' for more information." ;;
31087
31088   *) as_fn_append ac_config_targets " $1"
31089      ac_need_defaults=false ;;
31090
31091   esac
31092   shift
31093 done
31094
31095 ac_configure_extra_args=
31096
31097 if $ac_cs_silent; then
31098   exec 6>/dev/null
31099   ac_configure_extra_args="$ac_configure_extra_args --silent"
31100 fi
31101
31102 _ACEOF
31103 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31104 if \$ac_cs_recheck; then
31105   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31106   shift
31107   \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
31108   CONFIG_SHELL='$SHELL'
31109   export CONFIG_SHELL
31110   exec "\$@"
31111 fi
31112
31113 _ACEOF
31114 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31115 exec 5>>config.log
31116 {
31117   echo
31118   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31119 ## Running $as_me. ##
31120 _ASBOX
31121   printf "%s\n" "$ac_log"
31122 } >&5
31123
31124 _ACEOF
31125 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31126 #
31127 # INIT-COMMANDS
31128 #
31129 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
31130 GNUmakefile=$GNUmakefile
31131
31132 _ACEOF
31133
31134 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31135
31136 # Handling of arguments.
31137 for ac_config_target in $ac_config_targets
31138 do
31139   case $ac_config_target in
31140     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
31141     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31142     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
31143     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31144     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
31145     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
31146     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31147
31148   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31149   esac
31150 done
31151
31152
31153 # If the user did not use the arguments to specify the items to instantiate,
31154 # then the envvar interface is used.  Set only those that are not.
31155 # We use the long form for the default assignment because of an extremely
31156 # bizarre bug on SunOS 4.1.3.
31157 if $ac_need_defaults; then
31158   test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
31159   test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
31160   test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
31161   test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
31162 fi
31163
31164 # Have a temporary directory for convenience.  Make it in the build tree
31165 # simply because there is no reason against having it here, and in addition,
31166 # creating and moving files from /tmp can sometimes cause problems.
31167 # Hook for its removal unless debugging.
31168 # Note that there is a small window in which the directory will not be cleaned:
31169 # after its creation but before its name has been assigned to `$tmp'.
31170 $debug ||
31171 {
31172   tmp= ac_tmp=
31173   trap 'exit_status=$?
31174   : "${ac_tmp:=$tmp}"
31175   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31176 ' 0
31177   trap 'as_fn_exit 1' 1 2 13 15
31178 }
31179 # Create a (secure) tmp directory for tmp files.
31180
31181 {
31182   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31183   test -d "$tmp"
31184 }  ||
31185 {
31186   tmp=./conf$$-$RANDOM
31187   (umask 077 && mkdir "$tmp")
31188 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31189 ac_tmp=$tmp
31190
31191 # Set up the scripts for CONFIG_FILES section.
31192 # No need to generate them if there are no CONFIG_FILES.
31193 # This happens for instance with `./config.status config.h'.
31194 if test -n "$CONFIG_FILES"; then
31195
31196
31197 ac_cr=`echo X | tr X '\015'`
31198 # On cygwin, bash can eat \r inside `` if the user requested igncr.
31199 # But we know of no other shell where ac_cr would be empty at this
31200 # point, so we can use a bashism as a fallback.
31201 if test "x$ac_cr" = x; then
31202   eval ac_cr=\$\'\\r\'
31203 fi
31204 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31205 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31206   ac_cs_awk_cr='\\r'
31207 else
31208   ac_cs_awk_cr=$ac_cr
31209 fi
31210
31211 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31212 _ACEOF
31213
31214
31215 {
31216   echo "cat >conf$$subs.awk <<_ACEOF" &&
31217   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31218   echo "_ACEOF"
31219 } >conf$$subs.sh ||
31220   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31221 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31222 ac_delim='%!_!# '
31223 for ac_last_try in false false false false false :; do
31224   . ./conf$$subs.sh ||
31225     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31226
31227   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31228   if test $ac_delim_n = $ac_delim_num; then
31229     break
31230   elif $ac_last_try; then
31231     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31232   else
31233     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31234   fi
31235 done
31236 rm -f conf$$subs.sh
31237
31238 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31239 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31240 _ACEOF
31241 sed -n '
31242 h
31243 s/^/S["/; s/!.*/"]=/
31244 p
31245 g
31246 s/^[^!]*!//
31247 :repl
31248 t repl
31249 s/'"$ac_delim"'$//
31250 t delim
31251 :nl
31252 h
31253 s/\(.\{148\}\)..*/\1/
31254 t more1
31255 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31256 p
31257 n
31258 b repl
31259 :more1
31260 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31261 p
31262 g
31263 s/.\{148\}//
31264 t nl
31265 :delim
31266 h
31267 s/\(.\{148\}\)..*/\1/
31268 t more2
31269 s/["\\]/\\&/g; s/^/"/; s/$/"/
31270 p
31271 b
31272 :more2
31273 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31274 p
31275 g
31276 s/.\{148\}//
31277 t delim
31278 ' <conf$$subs.awk | sed '
31279 /^[^""]/{
31280   N
31281   s/\n//
31282 }
31283 ' >>$CONFIG_STATUS || ac_write_fail=1
31284 rm -f conf$$subs.awk
31285 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31286 _ACAWK
31287 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31288   for (key in S) S_is_set[key] = 1
31289   FS = "\a"
31290
31291 }
31292 {
31293   line = $ 0
31294   nfields = split(line, field, "@")
31295   substed = 0
31296   len = length(field[1])
31297   for (i = 2; i < nfields; i++) {
31298     key = field[i]
31299     keylen = length(key)
31300     if (S_is_set[key]) {
31301       value = S[key]
31302       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31303       len += length(value) + length(field[++i])
31304       substed = 1
31305     } else
31306       len += 1 + keylen
31307   }
31308
31309   print line
31310 }
31311
31312 _ACAWK
31313 _ACEOF
31314 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31315 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31316   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31317 else
31318   cat
31319 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31320   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31321 _ACEOF
31322
31323 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31324 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31325 # trailing colons and then remove the whole line if VPATH becomes empty
31326 # (actually we leave an empty line to preserve line numbers).
31327 if test "x$srcdir" = x.; then
31328   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
31329 h
31330 s///
31331 s/^/:/
31332 s/[      ]*$/:/
31333 s/:\$(srcdir):/:/g
31334 s/:\${srcdir}:/:/g
31335 s/:@srcdir@:/:/g
31336 s/^:*//
31337 s/:*$//
31338 x
31339 s/\(=[   ]*\).*/\1/
31340 G
31341 s/\n//
31342 s/^[^=]*=[       ]*$//
31343 }'
31344 fi
31345
31346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31347 fi # test -n "$CONFIG_FILES"
31348
31349 # Set up the scripts for CONFIG_HEADERS section.
31350 # No need to generate them if there are no CONFIG_HEADERS.
31351 # This happens for instance with `./config.status Makefile'.
31352 if test -n "$CONFIG_HEADERS"; then
31353 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31354 BEGIN {
31355 _ACEOF
31356
31357 # Transform confdefs.h into an awk script `defines.awk', embedded as
31358 # here-document in config.status, that substitutes the proper values into
31359 # config.h.in to produce config.h.
31360
31361 # Create a delimiter string that does not exist in confdefs.h, to ease
31362 # handling of long lines.
31363 ac_delim='%!_!# '
31364 for ac_last_try in false false :; do
31365   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31366   if test -z "$ac_tt"; then
31367     break
31368   elif $ac_last_try; then
31369     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31370   else
31371     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31372   fi
31373 done
31374
31375 # For the awk script, D is an array of macro values keyed by name,
31376 # likewise P contains macro parameters if any.  Preserve backslash
31377 # newline sequences.
31378
31379 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31380 sed -n '
31381 s/.\{148\}/&'"$ac_delim"'/g
31382 t rset
31383 :rset
31384 s/^[     ]*#[    ]*define[       ][      ]*/ /
31385 t def
31386 d
31387 :def
31388 s/\\$//
31389 t bsnl
31390 s/["\\]/\\&/g
31391 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31392 D["\1"]=" \3"/p
31393 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31394 d
31395 :bsnl
31396 s/["\\]/\\&/g
31397 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31398 D["\1"]=" \3\\\\\\n"\\/p
31399 t cont
31400 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31401 t cont
31402 d
31403 :cont
31404 n
31405 s/.\{148\}/&'"$ac_delim"'/g
31406 t clear
31407 :clear
31408 s/\\$//
31409 t bsnlc
31410 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31411 d
31412 :bsnlc
31413 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31414 b cont
31415 ' <confdefs.h | sed '
31416 s/'"$ac_delim"'/"\\\
31417 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31418
31419 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31420   for (key in D) D_is_set[key] = 1
31421   FS = "\a"
31422 }
31423 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31424   line = \$ 0
31425   split(line, arg, " ")
31426   if (arg[1] == "#") {
31427     defundef = arg[2]
31428     mac1 = arg[3]
31429   } else {
31430     defundef = substr(arg[1], 2)
31431     mac1 = arg[2]
31432   }
31433   split(mac1, mac2, "(") #)
31434   macro = mac2[1]
31435   prefix = substr(line, 1, index(line, defundef) - 1)
31436   if (D_is_set[macro]) {
31437     # Preserve the white space surrounding the "#".
31438     print prefix "define", macro P[macro] D[macro]
31439     next
31440   } else {
31441     # Replace #undef with comments.  This is necessary, for example,
31442     # in the case of _POSIX_SOURCE, which is predefined and required
31443     # on some systems where configure will not decide to define it.
31444     if (defundef == "undef") {
31445       print "/*", prefix defundef, macro, "*/"
31446       next
31447     }
31448   }
31449 }
31450 { print }
31451 _ACAWK
31452 _ACEOF
31453 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31454   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31455 fi # test -n "$CONFIG_HEADERS"
31456
31457
31458 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
31459 shift
31460 for ac_tag
31461 do
31462   case $ac_tag in
31463   :[FHLC]) ac_mode=$ac_tag; continue;;
31464   esac
31465   case $ac_mode$ac_tag in
31466   :[FHL]*:*);;
31467   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
31468   :[FH]-) ac_tag=-:-;;
31469   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31470   esac
31471   ac_save_IFS=$IFS
31472   IFS=:
31473   set x $ac_tag
31474   IFS=$ac_save_IFS
31475   shift
31476   ac_file=$1
31477   shift
31478
31479   case $ac_mode in
31480   :L) ac_source=$1;;
31481   :[FH])
31482     ac_file_inputs=
31483     for ac_f
31484     do
31485       case $ac_f in
31486       -) ac_f="$ac_tmp/stdin";;
31487       *) # Look for the file first in the build tree, then in the source tree
31488          # (if the path is not absolute).  The absolute path cannot be DOS-style,
31489          # because $ac_f cannot contain `:'.
31490          test -f "$ac_f" ||
31491            case $ac_f in
31492            [\\/$]*) false;;
31493            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31494            esac ||
31495            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
31496       esac
31497       case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31498       as_fn_append ac_file_inputs " '$ac_f'"
31499     done
31500
31501     # Let's still pretend it is `configure' which instantiates (i.e., don't
31502     # use $as_me), people would be surprised to read:
31503     #    /* config.h.  Generated by config.status.  */
31504     configure_input='Generated from '`
31505           printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31506         `' by configure.'
31507     if test x"$ac_file" != x-; then
31508       configure_input="$ac_file.  $configure_input"
31509       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31510 printf "%s\n" "$as_me: creating $ac_file" >&6;}
31511     fi
31512     # Neutralize special characters interpreted by sed in replacement strings.
31513     case $configure_input in #(
31514     *\&* | *\|* | *\\* )
31515        ac_sed_conf_input=`printf "%s\n" "$configure_input" |
31516        sed 's/[\\\\&|]/\\\\&/g'`;; #(
31517     *) ac_sed_conf_input=$configure_input;;
31518     esac
31519
31520     case $ac_tag in
31521     *:-:* | *:-) cat >"$ac_tmp/stdin" \
31522       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
31523     esac
31524     ;;
31525   esac
31526
31527   ac_dir=`$as_dirname -- "$ac_file" ||
31528 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31529          X"$ac_file" : 'X\(//\)[^/]' \| \
31530          X"$ac_file" : 'X\(//\)$' \| \
31531          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31532 printf "%s\n" X"$ac_file" |
31533     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31534             s//\1/
31535             q
31536           }
31537           /^X\(\/\/\)[^/].*/{
31538             s//\1/
31539             q
31540           }
31541           /^X\(\/\/\)$/{
31542             s//\1/
31543             q
31544           }
31545           /^X\(\/\).*/{
31546             s//\1/
31547             q
31548           }
31549           s/.*/./; q'`
31550   as_dir="$ac_dir"; as_fn_mkdir_p
31551   ac_builddir=.
31552
31553 case "$ac_dir" in
31554 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31555 *)
31556   ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
31557   # A ".." for each directory in $ac_dir_suffix.
31558   ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31559   case $ac_top_builddir_sub in
31560   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31561   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31562   esac ;;
31563 esac
31564 ac_abs_top_builddir=$ac_pwd
31565 ac_abs_builddir=$ac_pwd$ac_dir_suffix
31566 # for backward compatibility:
31567 ac_top_builddir=$ac_top_build_prefix
31568
31569 case $srcdir in
31570   .)  # We are building in place.
31571     ac_srcdir=.
31572     ac_top_srcdir=$ac_top_builddir_sub
31573     ac_abs_top_srcdir=$ac_pwd ;;
31574   [\\/]* | ?:[\\/]* )  # Absolute name.
31575     ac_srcdir=$srcdir$ac_dir_suffix;
31576     ac_top_srcdir=$srcdir
31577     ac_abs_top_srcdir=$srcdir ;;
31578   *) # Relative name.
31579     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31580     ac_top_srcdir=$ac_top_build_prefix$srcdir
31581     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31582 esac
31583 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31584
31585
31586   case $ac_mode in
31587   :F)
31588   #
31589   # CONFIG_FILE
31590   #
31591
31592   case $INSTALL in
31593   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31594   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31595   esac
31596   ac_MKDIR_P=$MKDIR_P
31597   case $MKDIR_P in
31598   [\\/$]* | ?:[\\/]* ) ;;
31599   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31600   esac
31601 _ACEOF
31602
31603 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31604 # If the template does not know about datarootdir, expand it.
31605 # FIXME: This hack should be removed a few years after 2.60.
31606 ac_datarootdir_hack=; ac_datarootdir_seen=
31607 ac_sed_dataroot='
31608 /datarootdir/ {
31609   p
31610   q
31611 }
31612 /@datadir@/p
31613 /@docdir@/p
31614 /@infodir@/p
31615 /@localedir@/p
31616 /@mandir@/p'
31617 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31618 *datarootdir*) ac_datarootdir_seen=yes;;
31619 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31620   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31621 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31622 _ACEOF
31623 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31624   ac_datarootdir_hack='
31625   s&@datadir@&$datadir&g
31626   s&@docdir@&$docdir&g
31627   s&@infodir@&$infodir&g
31628   s&@localedir@&$localedir&g
31629   s&@mandir@&$mandir&g
31630   s&\\\${datarootdir}&$datarootdir&g' ;;
31631 esac
31632 _ACEOF
31633
31634 # Neutralize VPATH when `$srcdir' = `.'.
31635 # Shell code in configure.ac might set extrasub.
31636 # FIXME: do we really want to maintain this feature?
31637 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31638 ac_sed_extra="$ac_vpsub
31639 $extrasub
31640 _ACEOF
31641 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31642 :t
31643 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31644 s|@configure_input@|$ac_sed_conf_input|;t t
31645 s&@top_builddir@&$ac_top_builddir_sub&;t t
31646 s&@top_build_prefix@&$ac_top_build_prefix&;t t
31647 s&@srcdir@&$ac_srcdir&;t t
31648 s&@abs_srcdir@&$ac_abs_srcdir&;t t
31649 s&@top_srcdir@&$ac_top_srcdir&;t t
31650 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31651 s&@builddir@&$ac_builddir&;t t
31652 s&@abs_builddir@&$ac_abs_builddir&;t t
31653 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31654 s&@INSTALL@&$ac_INSTALL&;t t
31655 s&@MKDIR_P@&$ac_MKDIR_P&;t t
31656 $ac_datarootdir_hack
31657 "
31658 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
31659   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31660
31661 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31662   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
31663   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
31664       "$ac_tmp/out"`; test -z "$ac_out"; } &&
31665   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31666 which seems to be undefined.  Please make sure it is defined" >&5
31667 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31668 which seems to be undefined.  Please make sure it is defined" >&2;}
31669
31670   rm -f "$ac_tmp/stdin"
31671   case $ac_file in
31672   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
31673   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
31674   esac \
31675   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31676  ;;
31677   :H)
31678   #
31679   # CONFIG_HEADER
31680   #
31681   if test x"$ac_file" != x-; then
31682     {
31683       printf "%s\n" "/* $configure_input  */" \
31684       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
31685     } >"$ac_tmp/config.h" \
31686       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31687     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
31688       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
31689 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
31690     else
31691       rm -f "$ac_file"
31692       mv "$ac_tmp/config.h" "$ac_file" \
31693         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31694     fi
31695   else
31696     printf "%s\n" "/* $configure_input  */" \
31697       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
31698       || as_fn_error $? "could not create -" "$LINENO" 5
31699   fi
31700 # Compute "$ac_file"'s index in $config_headers.
31701 _am_arg="$ac_file"
31702 _am_stamp_count=1
31703 for _am_header in $config_headers :; do
31704   case $_am_header in
31705     $_am_arg | $_am_arg:* )
31706       break ;;
31707     * )
31708       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
31709   esac
31710 done
31711 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
31712 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31713          X"$_am_arg" : 'X\(//\)[^/]' \| \
31714          X"$_am_arg" : 'X\(//\)$' \| \
31715          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
31716 printf "%s\n" X"$_am_arg" |
31717     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31718             s//\1/
31719             q
31720           }
31721           /^X\(\/\/\)[^/].*/{
31722             s//\1/
31723             q
31724           }
31725           /^X\(\/\/\)$/{
31726             s//\1/
31727             q
31728           }
31729           /^X\(\/\).*/{
31730             s//\1/
31731             q
31732           }
31733           s/.*/./; q'`/stamp-h$_am_stamp_count
31734  ;;
31735   :L)
31736   #
31737   # CONFIG_LINK
31738   #
31739
31740   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
31741     :
31742   else
31743     # Prefer the file from the source tree if names are identical.
31744     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
31745       ac_source=$srcdir/$ac_source
31746     fi
31747
31748     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
31749 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
31750
31751     if test ! -r "$ac_source"; then
31752       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
31753     fi
31754     rm -f "$ac_file"
31755
31756     # Try a relative symlink, then a hard link, then a copy.
31757     case $ac_source in
31758     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
31759         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
31760     esac
31761     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
31762       ln "$ac_source" "$ac_file" 2>/dev/null ||
31763       cp -p "$ac_source" "$ac_file" ||
31764       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
31765   fi
31766  ;;
31767   :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
31768 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
31769  ;;
31770   esac
31771
31772
31773   case $ac_file$ac_mode in
31774     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
31775   # Older Autoconf quotes --file arguments for eval, but not when files
31776   # are listed without --file.  Let's play safe and only enable the eval
31777   # if we detect the quoting.
31778   # TODO: see whether this extra hack can be removed once we start
31779   # requiring Autoconf 2.70 or later.
31780   case $CONFIG_FILES in #(
31781   *\'*) :
31782     eval set x "$CONFIG_FILES" ;; #(
31783   *) :
31784     set x $CONFIG_FILES ;; #(
31785   *) :
31786      ;;
31787 esac
31788   shift
31789   # Used to flag and report bootstrapping failures.
31790   am_rc=0
31791   for am_mf
31792   do
31793     # Strip MF so we end up with the name of the file.
31794     am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
31795     # Check whether this is an Automake generated Makefile which includes
31796     # dependency-tracking related rules and includes.
31797     # Grep'ing the whole file directly is not great: AIX grep has a line
31798     # limit of 2048, but all sed's we know have understand at least 4000.
31799     sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
31800       || continue
31801     am_dirpart=`$as_dirname -- "$am_mf" ||
31802 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31803          X"$am_mf" : 'X\(//\)[^/]' \| \
31804          X"$am_mf" : 'X\(//\)$' \| \
31805          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
31806 printf "%s\n" X"$am_mf" |
31807     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31808             s//\1/
31809             q
31810           }
31811           /^X\(\/\/\)[^/].*/{
31812             s//\1/
31813             q
31814           }
31815           /^X\(\/\/\)$/{
31816             s//\1/
31817             q
31818           }
31819           /^X\(\/\).*/{
31820             s//\1/
31821             q
31822           }
31823           s/.*/./; q'`
31824     am_filepart=`$as_basename -- "$am_mf" ||
31825 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
31826          X"$am_mf" : 'X\(//\)$' \| \
31827          X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
31828 printf "%s\n" X/"$am_mf" |
31829     sed '/^.*\/\([^/][^/]*\)\/*$/{
31830             s//\1/
31831             q
31832           }
31833           /^X\/\(\/\/\)$/{
31834             s//\1/
31835             q
31836           }
31837           /^X\/\(\/\).*/{
31838             s//\1/
31839             q
31840           }
31841           s/.*/./; q'`
31842     { echo "$as_me:$LINENO: cd "$am_dirpart" \
31843       && sed -e '/# am--include-marker/d' "$am_filepart" \
31844         | $MAKE -f - am--depfiles" >&5
31845    (cd "$am_dirpart" \
31846       && sed -e '/# am--include-marker/d' "$am_filepart" \
31847         | $MAKE -f - am--depfiles) >&5 2>&5
31848    ac_status=$?
31849    echo "$as_me:$LINENO: \$? = $ac_status" >&5
31850    (exit $ac_status); } || am_rc=$?
31851   done
31852   if test $am_rc -ne 0; then
31853     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31854 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
31855 as_fn_error $? "Something went wrong bootstrapping makefile fragments
31856     for automatic dependency tracking.  Try re-running configure with the
31857     '--disable-dependency-tracking' option to at least be able to build
31858     the package (albeit without support for automatic dependency tracking).
31859 See \`config.log' for more details" "$LINENO" 5; }
31860   fi
31861   { am_dirpart=; unset am_dirpart;}
31862   { am_filepart=; unset am_filepart;}
31863   { am_mf=; unset am_mf;}
31864   { am_rc=; unset am_rc;}
31865   rm -f conftest-deps.mk
31866 }
31867  ;;
31868
31869   esac
31870 done # for ac_tag
31871
31872
31873 as_fn_exit 0
31874 _ACEOF
31875 ac_clean_files=$ac_clean_files_save
31876
31877 test $ac_write_fail = 0 ||
31878   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
31879
31880
31881 # configure is writing to config.log, and then calls config.status.
31882 # config.status does its own redirection, appending to config.log.
31883 # Unfortunately, on DOS this fails, as config.log is still kept open
31884 # by configure, so config.status won't be able to write to it; its
31885 # output is simply discarded.  So we exec the FD to /dev/null,
31886 # effectively closing config.log, so it can be properly (re)opened and
31887 # appended to by config.status.  When coming back to configure, we
31888 # need to make the FD available again.
31889 if test "$no_create" != yes; then
31890   ac_cs_success=:
31891   ac_config_status_args=
31892   test "$silent" = yes &&
31893     ac_config_status_args="$ac_config_status_args --quiet"
31894   exec 5>/dev/null
31895   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31896   exec 5>>config.log
31897   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31898   # would make configure fail if this is the last instruction.
31899   $ac_cs_success || as_fn_exit 1
31900 fi
31901 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31902   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31903 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31904 fi
31905