Minor consistency fixes wrt. piyacc.git commit 6558f0b
[bootstrap_bison.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU Bison 3.0.5.
4 #
5 # Report bugs to <bug-bison@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in #(
28   *posix*) :
29     set -o posix ;; #(
30   *) :
31      ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47   as_echo='print -r --'
48   as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='printf %s\n'
51   as_echo_n='printf %s'
52 else
53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55     as_echo_n='/usr/ucb/echo -n'
56   else
57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58     as_echo_n_body='eval
59       arg=$1;
60       case $arg in #(
61       *"$as_nl"*)
62         expr "X$arg" : "X\\(.*\\)$as_nl";
63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64       esac;
65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66     '
67     export as_echo_n_body
68     as_echo_n='sh -c $as_echo_n_body as_echo'
69   fi
70   export as_echo_body
71   as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76   PATH_SEPARATOR=:
77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79       PATH_SEPARATOR=';'
80   }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order.  Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" ""        $as_nl"
90
91 # Find who we are.  Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94   *[\\/]* ) as_myself=$0 ;;
95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98   IFS=$as_save_IFS
99   test -z "$as_dir" && as_dir=.
100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101   done
102 IFS=$as_save_IFS
103
104      ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109   as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113   exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there.  '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138   # into an infinite loop, continuously re-executing ourselves.
139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140     _as_can_reexec=no; export _as_can_reexec;
141     # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149   *v*x* | *x*v* ) as_opts=-vx ;;
150   *v* ) as_opts=-v ;;
151   *x* ) as_opts=-x ;;
152   * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159   fi
160   # We don't want this to propagate to other subprocesses.
161           { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164   emulate sh
165   NULLCMD=:
166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167   # is contrary to our usage.  Disable this feature.
168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
169   setopt NO_GLOB_SUBST
170 else
171   case \`(set -o) 2>/dev/null\` in #(
172   *posix*) :
173     set -o posix ;; #(
174   *) :
175      ;;
176 esac
177 fi
178 "
179   as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193   exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202   if (eval "$as_required") 2>/dev/null; then :
203   as_have_required=yes
204 else
205   as_have_required=no
206 fi
207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
214   IFS=$as_save_IFS
215   test -z "$as_dir" && as_dir=.
216   as_found=:
217   case $as_dir in #(
218          /*)
219            for as_base in sh bash ksh sh5; do
220              # Try only shells that exist, to save several forks.
221              as_shell=$as_dir/$as_base
222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224   CONFIG_SHELL=$as_shell as_have_required=yes
225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   break 2
227 fi
228 fi
229            done;;
230        esac
231   as_found=false
232 done
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235   CONFIG_SHELL=$SHELL as_have_required=yes
236 fi; }
237 IFS=$as_save_IFS
238
239
240       if test "x$CONFIG_SHELL" != x; then :
241   export CONFIG_SHELL
242              # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250   *v*x* | *x*v* ) as_opts=-vx ;;
251   *v* ) as_opts=-v ;;
252   *x* ) as_opts=-x ;;
253   * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262     if test x$as_have_required = xno; then :
263   $as_echo "$0: This script requires a shell more modern than all"
264   $as_echo "$0: the shells that I found on your system."
265   if test x${ZSH_VERSION+set} = xset ; then
266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268   else
269     $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bison@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
273 $0: have one."
274   fi
275   exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293   { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
300 as_fn_set_status ()
301 {
302   return $1
303 } # as_fn_set_status
304
305 # as_fn_exit STATUS
306 # -----------------
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308 as_fn_exit ()
309 {
310   set +e
311   as_fn_set_status $1
312   exit $1
313 } # as_fn_exit
314
315 # as_fn_mkdir_p
316 # -------------
317 # Create "$as_dir" as a directory, including parents if necessary.
318 as_fn_mkdir_p ()
319 {
320
321   case $as_dir in #(
322   -*) as_dir=./$as_dir;;
323   esac
324   test -d "$as_dir" || eval $as_mkdir_p || {
325     as_dirs=
326     while :; do
327       case $as_dir in #(
328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329       *) as_qdir=$as_dir;;
330       esac
331       as_dirs="'$as_qdir' $as_dirs"
332       as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334          X"$as_dir" : 'X\(//\)[^/]' \| \
335          X"$as_dir" : 'X\(//\)$' \| \
336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339             s//\1/
340             q
341           }
342           /^X\(\/\/\)[^/].*/{
343             s//\1/
344             q
345           }
346           /^X\(\/\/\)$/{
347             s//\1/
348             q
349           }
350           /^X\(\/\).*/{
351             s//\1/
352             q
353           }
354           s/.*/./; q'`
355       test -d "$as_dir" && break
356     done
357     test -z "$as_dirs" || eval "mkdir $as_dirs"
358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361 } # as_fn_mkdir_p
362
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
367 {
368   test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
375 # implementations.
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377   eval 'as_fn_append ()
378   {
379     eval $1+=\$2
380   }'
381 else
382   as_fn_append ()
383   {
384     eval $1=\$$1\$2
385   }
386 fi # as_fn_append
387
388 # as_fn_arith ARG...
389 # ------------------
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394   eval 'as_fn_arith ()
395   {
396     as_val=$(( $* ))
397   }'
398 else
399   as_fn_arith ()
400   {
401     as_val=`expr "$@" || test $? -eq 1`
402   }
403 fi # as_fn_arith
404
405
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
411 as_fn_error ()
412 {
413   as_status=$1; test $as_status -eq 0 && as_status=1
414   if test "$4"; then
415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417   fi
418   $as_echo "$as_me: error: $2" >&2
419   as_fn_exit $as_status
420 } # as_fn_error
421
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
424   as_expr=expr
425 else
426   as_expr=false
427 fi
428
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430   as_basename=basename
431 else
432   as_basename=false
433 fi
434
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436   as_dirname=dirname
437 else
438   as_dirname=false
439 fi
440
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443          X"$0" : 'X\(//\)$' \| \
444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445 $as_echo X/"$0" |
446     sed '/^.*\/\([^/][^/]*\)\/*$/{
447             s//\1/
448             q
449           }
450           /^X\/\(\/\/\)$/{
451             s//\1/
452             q
453           }
454           /^X\/\(\/\).*/{
455             s//\1/
456             q
457           }
458           s/.*/./; q'`
459
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473   sed -n '
474     p
475     /[$]LINENO/=
476   ' <$as_myself |
477     sed '
478       s/[$]LINENO.*/&-/
479       t lineno
480       b
481       :lineno
482       N
483       :loop
484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485       t loop
486       s/-\n.*//
487     ' >$as_me.lineno &&
488   chmod +x "$as_me.lineno" ||
489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492   # already done that, so ensure we don't try to do so again and fall
493   # in an infinite loop.  This has already happened in practice.
494   _as_can_reexec=no; export _as_can_reexec
495   # Don't try to exec as it changes $[0], causing all sort of problems
496   # (the dirname of $[0] is not the place where we might find the
497   # original and so on.  Autoconf is especially sensitive to this).
498   . "./$as_me.lineno"
499   # Exit status is that of the last command.
500   exit
501 }
502
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
505 -n*)
506   case `echo 'xy\c'` in
507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
508   xy)  ECHO_C='\c';;
509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510        ECHO_T=' ';;
511   esac;;
512 *)
513   ECHO_N='-n';;
514 esac
515
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518   rm -f conf$$.dir/conf$$.file
519 else
520   rm -f conf$$.dir
521   mkdir conf$$.dir 2>/dev/null
522 fi
523 if (echo >conf$$.file) 2>/dev/null; then
524   if ln -s conf$$.file conf$$ 2>/dev/null; then
525     as_ln_s='ln -s'
526     # ... but there are two gotchas:
527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529     # In both cases, we have to default to `cp -pR'.
530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531       as_ln_s='cp -pR'
532   elif ln conf$$.file conf$$ 2>/dev/null; then
533     as_ln_s=ln
534   else
535     as_ln_s='cp -pR'
536   fi
537 else
538   as_ln_s='cp -pR'
539 fi
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
542
543 if mkdir -p . 2>/dev/null; then
544   as_mkdir_p='mkdir -p "$as_dir"'
545 else
546   test -d ./-p && rmdir ./-p
547   as_mkdir_p=false
548 fi
549
550 as_test_x='test -x'
551 as_executable_p=as_fn_executable_p
552
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560 test -n "$DJDIR" || exec 7<&0 </dev/null
561 exec 6>&1
562
563 # Name of the host.
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568 #
569 # Initializations.
570 #
571 ac_default_prefix=/usr/local
572 ac_clean_files=
573 ac_config_libobj_dir=.
574 LIBOBJS=
575 cross_compiling=no
576 subdirs=
577 MFLAGS=
578 MAKEFLAGS=
579
580 # Identity of this package.
581 PACKAGE_NAME='GNU Bison'
582 PACKAGE_TARNAME='bison'
583 PACKAGE_VERSION='3.0.5'
584 PACKAGE_STRING='GNU Bison 3.0.5'
585 PACKAGE_BUGREPORT='bug-bison@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/bison/'
587
588 # Factoring default headers for most tests.
589 ac_includes_default="\
590 #include <stdio.h>
591 #ifdef HAVE_SYS_TYPES_H
592 # include <sys/types.h>
593 #endif
594 #ifdef HAVE_SYS_STAT_H
595 # include <sys/stat.h>
596 #endif
597 #ifdef STDC_HEADERS
598 # include <stdlib.h>
599 # include <stddef.h>
600 #else
601 # ifdef HAVE_STDLIB_H
602 #  include <stdlib.h>
603 # endif
604 #endif
605 #ifdef HAVE_STRING_H
606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607 #  include <memory.h>
608 # endif
609 # include <string.h>
610 #endif
611 #ifdef HAVE_STRINGS_H
612 # include <strings.h>
613 #endif
614 #ifdef HAVE_INTTYPES_H
615 # include <inttypes.h>
616 #endif
617 #ifdef HAVE_STDINT_H
618 # include <stdint.h>
619 #endif
620 #ifdef HAVE_UNISTD_H
621 # include <unistd.h>
622 #endif"
623
624 gl_use_threads_default=
625 ac_header_list=
626 ac_func_list=
627 gl_getopt_required=POSIX
628 gt_needs=
629 ac_config_libobj_dir=lib
630 ac_subst_vars='gltests_LTLIBOBJS
631 gltests_LIBOBJS
632 gl_LTLIBOBJS
633 gl_LIBOBJS
634 CONFIG_INCLUDE
635 am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 LIBOBJS
639 HAVE_JVIEW
640 HAVE_JRE
641 HAVE_JAVA
642 HAVE_GIJ
643 HAVE_JAVA_ENVVAR
644 CONF_JAVA
645 HAVE_JVIEW_IN_PATH
646 HAVE_JRE_IN_PATH
647 HAVE_JAVA_IN_PATH
648 HAVE_GIJ_IN_PATH
649 HAVE_JIKES
650 HAVE_JAVAC
651 HAVE_GCJ_C
652 HAVE_JAVAC_ENVVAR
653 CLASSPATH_SEPARATOR
654 CLASSPATH
655 CONF_JAVAC
656 HAVE_JIKES_IN_PATH
657 HAVE_JAVAC_IN_PATH
658 HAVE_GCJ_IN_PATH
659 GCC
660 AUTOM4TE
661 CROSS_COMPILING_FALSE
662 CROSS_COMPILING_TRUE
663 VALGRIND_OPTS_SUPPRESSION
664 VALGRIND
665 aclocaldir
666 BISON_LOCALEDIR
667 POSUB
668 INTLLIBS
669 LTLIBICONV
670 LIBICONV
671 INTL_MACOSX_LIBS
672 XGETTEXT_EXTRA_OPTIONS
673 MSGMERGE
674 XGETTEXT_015
675 XGETTEXT
676 GMSGFMT_015
677 MSGFMT_015
678 GMSGFMT
679 MSGFMT
680 GETTEXT_MACRO_VERSION
681 USE_NLS
682 LIBBISON_LTLIBDEPS
683 LIBBISON_LIBDEPS
684 gltests_WITNESS
685 REPLACE_TOWLOWER
686 REPLACE_ISWCNTRL
687 HAVE_WCTYPE_H
688 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
689 NEXT_WCTYPE_H
690 HAVE_ISWCNTRL
691 REPLACE_ISWBLANK
692 HAVE_WCTRANS_T
693 HAVE_WCTYPE_T
694 HAVE_ISWBLANK
695 GNULIB_TOWCTRANS
696 GNULIB_WCTRANS
697 GNULIB_ISWCTYPE
698 GNULIB_WCTYPE
699 GNULIB_ISWBLANK
700 HAVE_CRTDEFS_H
701 HAVE_WINT_T
702 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
703 NEXT_WCHAR_H
704 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
705 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
706 LIBUNISTRING_UNIWIDTH_H
707 LIBUNISTRING_UNITYPES_H
708 HAVE_UNISTD_H
709 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
710 NEXT_UNISTD_H
711 UNISTD_H_DEFINES_STRUCT_TIMESPEC
712 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
713 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
714 TIME_H_DEFINES_STRUCT_TIMESPEC
715 NEXT_AS_FIRST_DIRECTIVE_TIME_H
716 NEXT_TIME_H
717 REPLACE_LOCALTIME
718 REPLACE_GMTIME
719 GNULIB_GETTIMEOFDAY
720 REPLACE_TZSET
721 REPLACE_TIMEGM
722 REPLACE_STRFTIME
723 REPLACE_NANOSLEEP
724 REPLACE_MKTIME
725 REPLACE_LOCALTIME_R
726 REPLACE_CTIME
727 HAVE_TIMEZONE_T
728 HAVE_TZSET
729 HAVE_TIMEGM
730 HAVE_STRPTIME
731 HAVE_NANOSLEEP
732 HAVE_DECL_LOCALTIME_R
733 GNULIB_TZSET
734 GNULIB_TIME_RZ
735 GNULIB_TIME_R
736 GNULIB_TIMEGM
737 GNULIB_STRPTIME
738 GNULIB_STRFTIME
739 GNULIB_NANOSLEEP
740 GNULIB_LOCALTIME
741 GNULIB_MKTIME
742 GNULIB_CTIME
743 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
744 NEXT_SYS_WAIT_H
745 GNULIB_WAITPID
746 WINDOWS_STAT_INODES
747 WINDOWS_64_BIT_OFF_T
748 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
749 NEXT_SYS_TYPES_H
750 NEXT_AS_FIRST_DIRECTIVE_STRING_H
751 NEXT_STRING_H
752 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
753 NEXT_STDLIB_H
754 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
755 NEXT_STDIO_H
756 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
757 NEXT_STDDEF_H
758 GL_GENERATE_STDDEF_H_FALSE
759 GL_GENERATE_STDDEF_H_TRUE
760 STDDEF_H
761 HAVE_WCHAR_T
762 HAVE_MAX_ALIGN_T
763 REPLACE_NULL
764 HAVE__BOOL
765 GL_GENERATE_STDBOOL_H_FALSE
766 GL_GENERATE_STDBOOL_H_TRUE
767 STDBOOL_H
768 HAVE_SPAWN_H
769 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
770 NEXT_SPAWN_H
771 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
772 NEXT_SIGNAL_H
773 GL_GENERATE_SCHED_H_FALSE
774 GL_GENERATE_SCHED_H_TRUE
775 SCHED_H
776 HAVE_STRUCT_SCHED_PARAM
777 HAVE_SCHED_H
778 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
779 NEXT_SCHED_H
780 REPLACE_RAISE
781 REPLACE_PTHREAD_SIGMASK
782 HAVE_SIGHANDLER_T
783 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
784 HAVE_STRUCT_SIGACTION_SA_SIGACTION
785 HAVE_SIGACTION
786 HAVE_SIGINFO_T
787 HAVE_SIGSET_T
788 HAVE_RAISE
789 HAVE_PTHREAD_SIGMASK
790 HAVE_POSIX_SIGNALBLOCKING
791 GNULIB_SIGACTION
792 GNULIB_SIGPROCMASK
793 GNULIB_SIGNAL_H_SIGPIPE
794 GNULIB_RAISE
795 GNULIB_PTHREAD_SIGMASK
796 ASM_SYMBOL_PREFIX
797 LIB_POSIX_SPAWN
798 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
799 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
800 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
801 REPLACE_POSIX_SPAWN
802 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
803 HAVE_POSIX_SPAWNATTR_T
804 HAVE_POSIX_SPAWN
805 GNULIB_POSIX_SPAWNATTR_DESTROY
806 GNULIB_POSIX_SPAWNATTR_SETSIGMASK
807 GNULIB_POSIX_SPAWNATTR_GETSIGMASK
808 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
809 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
810 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
811 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
812 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
813 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
814 GNULIB_POSIX_SPAWNATTR_SETPGROUP
815 GNULIB_POSIX_SPAWNATTR_GETPGROUP
816 GNULIB_POSIX_SPAWNATTR_SETFLAGS
817 GNULIB_POSIX_SPAWNATTR_GETFLAGS
818 GNULIB_POSIX_SPAWNATTR_INIT
819 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
820 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
821 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
822 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
823 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
824 GNULIB_POSIX_SPAWNP
825 GNULIB_POSIX_SPAWN
826 UNDEFINE_STRTOK_R
827 REPLACE_STRSIGNAL
828 REPLACE_STRERROR_R
829 REPLACE_STRERROR
830 REPLACE_STRTOK_R
831 REPLACE_STRCASESTR
832 REPLACE_STRSTR
833 REPLACE_STRNLEN
834 REPLACE_STRNDUP
835 REPLACE_STRNCAT
836 REPLACE_STRDUP
837 REPLACE_STRCHRNUL
838 REPLACE_STPNCPY
839 REPLACE_MEMMEM
840 REPLACE_MEMCHR
841 HAVE_STRVERSCMP
842 HAVE_DECL_STRSIGNAL
843 HAVE_DECL_STRERROR_R
844 HAVE_DECL_STRTOK_R
845 HAVE_STRCASESTR
846 HAVE_STRSEP
847 HAVE_STRPBRK
848 HAVE_DECL_STRNLEN
849 HAVE_DECL_STRNDUP
850 HAVE_DECL_STRDUP
851 HAVE_STRCHRNUL
852 HAVE_STPNCPY
853 HAVE_STPCPY
854 HAVE_RAWMEMCHR
855 HAVE_DECL_MEMRCHR
856 HAVE_MEMPCPY
857 HAVE_DECL_MEMMEM
858 HAVE_MEMCHR
859 HAVE_FFSLL
860 HAVE_FFSL
861 HAVE_EXPLICIT_BZERO
862 HAVE_MBSLEN
863 GNULIB_STRVERSCMP
864 GNULIB_STRSIGNAL
865 GNULIB_STRERROR_R
866 GNULIB_STRERROR
867 GNULIB_MBSTOK_R
868 GNULIB_MBSSEP
869 GNULIB_MBSSPN
870 GNULIB_MBSPBRK
871 GNULIB_MBSCSPN
872 GNULIB_MBSCASESTR
873 GNULIB_MBSPCASECMP
874 GNULIB_MBSNCASECMP
875 GNULIB_MBSCASECMP
876 GNULIB_MBSSTR
877 GNULIB_MBSRCHR
878 GNULIB_MBSCHR
879 GNULIB_MBSNLEN
880 GNULIB_MBSLEN
881 GNULIB_STRTOK_R
882 GNULIB_STRCASESTR
883 GNULIB_STRSTR
884 GNULIB_STRSEP
885 GNULIB_STRPBRK
886 GNULIB_STRNLEN
887 GNULIB_STRNDUP
888 GNULIB_STRNCAT
889 GNULIB_STRDUP
890 GNULIB_STRCHRNUL
891 GNULIB_STPNCPY
892 GNULIB_STPCPY
893 GNULIB_RAWMEMCHR
894 GNULIB_MEMRCHR
895 GNULIB_MEMPCPY
896 GNULIB_MEMMEM
897 GNULIB_MEMCHR
898 GNULIB_FFSLL
899 GNULIB_FFSL
900 GNULIB_EXPLICIT_BZERO
901 LOCALE_FR_UTF8
902 LOCALE_ZH_CN
903 LOCALE_JA
904 REPLACE_WCSFTIME
905 REPLACE_WCSWIDTH
906 REPLACE_WCWIDTH
907 REPLACE_WCSNRTOMBS
908 REPLACE_WCSRTOMBS
909 REPLACE_WCRTOMB
910 REPLACE_MBSNRTOWCS
911 REPLACE_MBSRTOWCS
912 REPLACE_MBRLEN
913 REPLACE_MBRTOWC
914 REPLACE_MBSINIT
915 REPLACE_WCTOB
916 REPLACE_BTOWC
917 REPLACE_MBSTATE_T
918 HAVE_DECL_WCWIDTH
919 HAVE_DECL_WCTOB
920 HAVE_WCSFTIME
921 HAVE_WCSWIDTH
922 HAVE_WCSTOK
923 HAVE_WCSSTR
924 HAVE_WCSPBRK
925 HAVE_WCSSPN
926 HAVE_WCSCSPN
927 HAVE_WCSRCHR
928 HAVE_WCSCHR
929 HAVE_WCSDUP
930 HAVE_WCSXFRM
931 HAVE_WCSCOLL
932 HAVE_WCSNCASECMP
933 HAVE_WCSCASECMP
934 HAVE_WCSNCMP
935 HAVE_WCSCMP
936 HAVE_WCSNCAT
937 HAVE_WCSCAT
938 HAVE_WCPNCPY
939 HAVE_WCSNCPY
940 HAVE_WCPCPY
941 HAVE_WCSCPY
942 HAVE_WCSNLEN
943 HAVE_WCSLEN
944 HAVE_WMEMSET
945 HAVE_WMEMMOVE
946 HAVE_WMEMCPY
947 HAVE_WMEMCMP
948 HAVE_WMEMCHR
949 HAVE_WCSNRTOMBS
950 HAVE_WCSRTOMBS
951 HAVE_WCRTOMB
952 HAVE_MBSNRTOWCS
953 HAVE_MBSRTOWCS
954 HAVE_MBRLEN
955 HAVE_MBRTOWC
956 HAVE_MBSINIT
957 HAVE_BTOWC
958 GNULIB_WCSFTIME
959 GNULIB_WCSWIDTH
960 GNULIB_WCSTOK
961 GNULIB_WCSSTR
962 GNULIB_WCSPBRK
963 GNULIB_WCSSPN
964 GNULIB_WCSCSPN
965 GNULIB_WCSRCHR
966 GNULIB_WCSCHR
967 GNULIB_WCSDUP
968 GNULIB_WCSXFRM
969 GNULIB_WCSCOLL
970 GNULIB_WCSNCASECMP
971 GNULIB_WCSCASECMP
972 GNULIB_WCSNCMP
973 GNULIB_WCSCMP
974 GNULIB_WCSNCAT
975 GNULIB_WCSCAT
976 GNULIB_WCPNCPY
977 GNULIB_WCSNCPY
978 GNULIB_WCPCPY
979 GNULIB_WCSCPY
980 GNULIB_WCSNLEN
981 GNULIB_WCSLEN
982 GNULIB_WMEMSET
983 GNULIB_WMEMMOVE
984 GNULIB_WMEMCPY
985 GNULIB_WMEMCMP
986 GNULIB_WMEMCHR
987 GNULIB_WCWIDTH
988 GNULIB_WCSNRTOMBS
989 GNULIB_WCSRTOMBS
990 GNULIB_WCRTOMB
991 GNULIB_MBSNRTOWCS
992 GNULIB_MBSRTOWCS
993 GNULIB_MBRLEN
994 GNULIB_MBRTOWC
995 GNULIB_MBSINIT
996 GNULIB_WCTOB
997 GNULIB_BTOWC
998 NEXT_AS_FIRST_DIRECTIVE_MATH_H
999 NEXT_MATH_H
1000 SED
1001 LTLIBMULTITHREAD
1002 LIBMULTITHREAD
1003 LTLIBTHREAD
1004 LIBTHREAD
1005 LIBPTH_PREFIX
1006 LTLIBPTH
1007 LIBPTH
1008 LOCALCHARSET_TESTS_ENVIRONMENT
1009 GLIBC21
1010 LDEXPL_LIBM
1011 LDEXP_LIBM
1012 ISNAN_LIBM
1013 ISNANL_LIBM
1014 ISNAND_LIBM
1015 ISNANF_LIBM
1016 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1017 NEXT_INTTYPES_H
1018 UINT64_MAX_EQ_ULONG_MAX
1019 UINT32_MAX_LT_UINTMAX_MAX
1020 PRIPTR_PREFIX
1021 PRI_MACROS_BROKEN
1022 INT64_MAX_EQ_LONG_MAX
1023 INT32_MAX_LT_INTMAX_MAX
1024 REPLACE_STRTOUMAX
1025 REPLACE_STRTOIMAX
1026 HAVE_DECL_STRTOUMAX
1027 HAVE_DECL_STRTOIMAX
1028 HAVE_DECL_IMAXDIV
1029 HAVE_DECL_IMAXABS
1030 GNULIB_STRTOUMAX
1031 GNULIB_STRTOIMAX
1032 GNULIB_IMAXDIV
1033 GNULIB_IMAXABS
1034 GL_GENERATE_STDINT_H_FALSE
1035 GL_GENERATE_STDINT_H_TRUE
1036 STDINT_H
1037 HAVE_SYS_INTTYPES_H
1038 HAVE_SYS_BITYPES_H
1039 HAVE_C99_STDINT_H
1040 WINT_T_SUFFIX
1041 WCHAR_T_SUFFIX
1042 SIG_ATOMIC_T_SUFFIX
1043 SIZE_T_SUFFIX
1044 PTRDIFF_T_SUFFIX
1045 HAVE_SIGNED_WINT_T
1046 HAVE_SIGNED_WCHAR_T
1047 HAVE_SIGNED_SIG_ATOMIC_T
1048 BITSIZEOF_WINT_T
1049 BITSIZEOF_WCHAR_T
1050 BITSIZEOF_SIG_ATOMIC_T
1051 BITSIZEOF_SIZE_T
1052 BITSIZEOF_PTRDIFF_T
1053 HAVE_STDINT_H
1054 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1055 NEXT_STDINT_H
1056 HAVE_SYS_TYPES_H
1057 HAVE_INTTYPES_H
1058 HAVE_WCHAR_H
1059 HAVE_UNSIGNED_LONG_LONG_INT
1060 HAVE_LONG_LONG_INT
1061 GL_GENERATE_LIMITS_H_FALSE
1062 GL_GENERATE_LIMITS_H_TRUE
1063 LIMITS_H
1064 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1065 NEXT_LIMITS_H
1066 HOST_CPU_C_ABI
1067 HOST_CPU
1068 LTLIBINTL
1069 LIBINTL
1070 GNULIB_GL_UNISTD_H_GETOPT
1071 GETOPT_CDEFS_H
1072 GETOPT_H
1073 HAVE_SYS_CDEFS_H
1074 HAVE_GETOPT_H
1075 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1076 NEXT_GETOPT_H
1077 WINDOWS_64_BIT_ST_SIZE
1078 WINDOWS_STAT_TIMESPEC
1079 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1080 NEXT_SYS_STAT_H
1081 REPLACE_UTIMENSAT
1082 REPLACE_STAT
1083 REPLACE_MKNOD
1084 REPLACE_MKFIFO
1085 REPLACE_MKDIR
1086 REPLACE_LSTAT
1087 REPLACE_FUTIMENS
1088 REPLACE_FSTATAT
1089 REPLACE_FSTAT
1090 HAVE_UTIMENSAT
1091 HAVE_MKNODAT
1092 HAVE_MKNOD
1093 HAVE_MKFIFOAT
1094 HAVE_MKFIFO
1095 HAVE_MKDIRAT
1096 HAVE_LSTAT
1097 HAVE_LCHMOD
1098 HAVE_FUTIMENS
1099 HAVE_FSTATAT
1100 HAVE_FCHMODAT
1101 GNULIB_OVERRIDES_STRUCT_STAT
1102 GNULIB_UTIMENSAT
1103 GNULIB_STAT
1104 GNULIB_MKNODAT
1105 GNULIB_MKNOD
1106 GNULIB_MKFIFOAT
1107 GNULIB_MKFIFO
1108 GNULIB_MKDIRAT
1109 GNULIB_LSTAT
1110 GNULIB_LCHMOD
1111 GNULIB_FUTIMENS
1112 GNULIB_FSTATAT
1113 GNULIB_FSTAT
1114 GNULIB_FCHMODAT
1115 REPLACE_TRUNCL
1116 REPLACE_TRUNCF
1117 REPLACE_TRUNC
1118 REPLACE_TANHF
1119 REPLACE_TANF
1120 REPLACE_SQRTL
1121 REPLACE_SQRTF
1122 REPLACE_SINHF
1123 REPLACE_SINF
1124 REPLACE_SIGNBIT_USING_GCC
1125 REPLACE_SIGNBIT
1126 REPLACE_ROUNDL
1127 REPLACE_ROUNDF
1128 REPLACE_ROUND
1129 REPLACE_REMAINDERL
1130 REPLACE_REMAINDERF
1131 REPLACE_REMAINDER
1132 REPLACE_NAN
1133 REPLACE_MODFL
1134 REPLACE_MODFF
1135 REPLACE_MODF
1136 REPLACE_LOGBL
1137 REPLACE_LOGBF
1138 REPLACE_LOGB
1139 REPLACE_LOG2L
1140 REPLACE_LOG2F
1141 REPLACE_LOG2
1142 REPLACE_LOG1PL
1143 REPLACE_LOG1PF
1144 REPLACE_LOG1P
1145 REPLACE_LOG10L
1146 REPLACE_LOG10F
1147 REPLACE_LOG10
1148 REPLACE_LOGL
1149 REPLACE_LOGF
1150 REPLACE_LOG
1151 REPLACE_LDEXPL
1152 REPLACE_ISNAN
1153 REPLACE_ISINF
1154 REPLACE_ISFINITE
1155 REPLACE_ILOGBL
1156 REPLACE_ILOGBF
1157 REPLACE_ILOGB
1158 REPLACE_HYPOTL
1159 REPLACE_HYPOTF
1160 REPLACE_HYPOT
1161 REPLACE_HUGE_VAL
1162 REPLACE_FREXPL
1163 REPLACE_FREXP
1164 REPLACE_FREXPF
1165 REPLACE_FMODL
1166 REPLACE_FMODF
1167 REPLACE_FMOD
1168 REPLACE_FMAL
1169 REPLACE_FMAF
1170 REPLACE_FMA
1171 REPLACE_FLOORL
1172 REPLACE_FLOORF
1173 REPLACE_FLOOR
1174 REPLACE_FABSL
1175 REPLACE_EXP2L
1176 REPLACE_EXP2
1177 REPLACE_EXPM1F
1178 REPLACE_EXPM1
1179 REPLACE_EXPF
1180 REPLACE_COSHF
1181 REPLACE_COSF
1182 REPLACE_CEILL
1183 REPLACE_CEILF
1184 REPLACE_CEIL
1185 REPLACE_CBRTL
1186 REPLACE_CBRTF
1187 REPLACE_ATAN2F
1188 REPLACE_ATANF
1189 REPLACE_ASINF
1190 REPLACE_ACOSF
1191 HAVE_DECL_TRUNCL
1192 HAVE_DECL_TRUNCF
1193 HAVE_DECL_TRUNC
1194 HAVE_DECL_TANL
1195 HAVE_DECL_SQRTL
1196 HAVE_DECL_SINL
1197 HAVE_DECL_ROUNDL
1198 HAVE_DECL_ROUNDF
1199 HAVE_DECL_ROUND
1200 HAVE_DECL_RINTF
1201 HAVE_DECL_REMAINDERL
1202 HAVE_DECL_REMAINDER
1203 HAVE_DECL_LOGB
1204 HAVE_DECL_LOG2L
1205 HAVE_DECL_LOG2F
1206 HAVE_DECL_LOG2
1207 HAVE_DECL_LOG10L
1208 HAVE_DECL_LOGL
1209 HAVE_DECL_LDEXPL
1210 HAVE_DECL_FREXPL
1211 HAVE_DECL_FLOORL
1212 HAVE_DECL_FLOORF
1213 HAVE_DECL_EXPM1L
1214 HAVE_DECL_EXP2L
1215 HAVE_DECL_EXP2F
1216 HAVE_DECL_EXP2
1217 HAVE_DECL_EXPL
1218 HAVE_DECL_COSL
1219 HAVE_DECL_COPYSIGNF
1220 HAVE_DECL_CEILL
1221 HAVE_DECL_CEILF
1222 HAVE_DECL_CBRTL
1223 HAVE_DECL_CBRTF
1224 HAVE_DECL_ATANL
1225 HAVE_DECL_ASINL
1226 HAVE_DECL_ACOSL
1227 HAVE_TANHF
1228 HAVE_TANL
1229 HAVE_TANF
1230 HAVE_SQRTL
1231 HAVE_SQRTF
1232 HAVE_SINHF
1233 HAVE_SINL
1234 HAVE_SINF
1235 HAVE_RINTL
1236 HAVE_RINT
1237 HAVE_REMAINDERF
1238 HAVE_REMAINDER
1239 HAVE_POWF
1240 HAVE_MODFL
1241 HAVE_MODFF
1242 HAVE_LOGBL
1243 HAVE_LOGBF
1244 HAVE_LOG1PL
1245 HAVE_LOG1PF
1246 HAVE_LOG1P
1247 HAVE_LOG10L
1248 HAVE_LOG10F
1249 HAVE_LOGL
1250 HAVE_LOGF
1251 HAVE_LDEXPF
1252 HAVE_ISNANL
1253 HAVE_ISNAND
1254 HAVE_ISNANF
1255 HAVE_ILOGBL
1256 HAVE_ILOGBF
1257 HAVE_ILOGB
1258 HAVE_HYPOTL
1259 HAVE_HYPOTF
1260 HAVE_FREXPF
1261 HAVE_FMODL
1262 HAVE_FMODF
1263 HAVE_FMAL
1264 HAVE_FMAF
1265 HAVE_FMA
1266 HAVE_FABSL
1267 HAVE_FABSF
1268 HAVE_EXPM1F
1269 HAVE_EXPM1
1270 HAVE_EXPL
1271 HAVE_EXPF
1272 HAVE_COSHF
1273 HAVE_COSL
1274 HAVE_COSF
1275 HAVE_COPYSIGNL
1276 HAVE_COPYSIGN
1277 HAVE_CBRTL
1278 HAVE_CBRTF
1279 HAVE_CBRT
1280 HAVE_ATAN2F
1281 HAVE_ATANL
1282 HAVE_ATANF
1283 HAVE_ASINL
1284 HAVE_ASINF
1285 HAVE_ACOSL
1286 HAVE_ACOSF
1287 GNULIB_TRUNCL
1288 GNULIB_TRUNCF
1289 GNULIB_TRUNC
1290 GNULIB_TANHF
1291 GNULIB_TANL
1292 GNULIB_TANF
1293 GNULIB_SQRTL
1294 GNULIB_SQRTF
1295 GNULIB_SINHF
1296 GNULIB_SINL
1297 GNULIB_SINF
1298 GNULIB_SIGNBIT
1299 GNULIB_ROUNDL
1300 GNULIB_ROUNDF
1301 GNULIB_ROUND
1302 GNULIB_RINTL
1303 GNULIB_RINTF
1304 GNULIB_RINT
1305 GNULIB_REMAINDERL
1306 GNULIB_REMAINDERF
1307 GNULIB_REMAINDER
1308 GNULIB_POWF
1309 GNULIB_MODFL
1310 GNULIB_MODFF
1311 GNULIB_MODF
1312 GNULIB_LOGBL
1313 GNULIB_LOGBF
1314 GNULIB_LOGB
1315 GNULIB_LOG2L
1316 GNULIB_LOG2F
1317 GNULIB_LOG2
1318 GNULIB_LOG1PL
1319 GNULIB_LOG1PF
1320 GNULIB_LOG1P
1321 GNULIB_LOG10L
1322 GNULIB_LOG10F
1323 GNULIB_LOG10
1324 GNULIB_LOGL
1325 GNULIB_LOGF
1326 GNULIB_LOG
1327 GNULIB_LDEXPL
1328 GNULIB_LDEXPF
1329 GNULIB_ISNANL
1330 GNULIB_ISNAND
1331 GNULIB_ISNANF
1332 GNULIB_ISNAN
1333 GNULIB_ISINF
1334 GNULIB_ISFINITE
1335 GNULIB_ILOGBL
1336 GNULIB_ILOGBF
1337 GNULIB_ILOGB
1338 GNULIB_HYPOTL
1339 GNULIB_HYPOTF
1340 GNULIB_HYPOT
1341 GNULIB_FREXPL
1342 GNULIB_FREXP
1343 GNULIB_FREXPF
1344 GNULIB_FMODL
1345 GNULIB_FMODF
1346 GNULIB_FMOD
1347 GNULIB_FMAL
1348 GNULIB_FMAF
1349 GNULIB_FMA
1350 GNULIB_FLOORL
1351 GNULIB_FLOORF
1352 GNULIB_FLOOR
1353 GNULIB_FABSL
1354 GNULIB_FABSF
1355 GNULIB_EXPM1L
1356 GNULIB_EXPM1F
1357 GNULIB_EXPM1
1358 GNULIB_EXP2L
1359 GNULIB_EXP2F
1360 GNULIB_EXP2
1361 GNULIB_EXPL
1362 GNULIB_EXPF
1363 GNULIB_COSHF
1364 GNULIB_COSL
1365 GNULIB_COSF
1366 GNULIB_COPYSIGNL
1367 GNULIB_COPYSIGNF
1368 GNULIB_COPYSIGN
1369 GNULIB_CEILL
1370 GNULIB_CEILF
1371 GNULIB_CEIL
1372 GNULIB_CBRTL
1373 GNULIB_CBRTF
1374 GNULIB_CBRT
1375 GNULIB_ATAN2F
1376 GNULIB_ATANL
1377 GNULIB_ATANF
1378 GNULIB_ASINL
1379 GNULIB_ASINF
1380 GNULIB_ACOSL
1381 GNULIB_ACOSF
1382 HAVE_FEATURES_H
1383 GNULIB_OVERRIDES_WINT_T
1384 APPLE_UNIVERSAL_BUILD
1385 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1386 REPLACE_VSPRINTF
1387 REPLACE_VSNPRINTF
1388 REPLACE_VPRINTF
1389 REPLACE_VFPRINTF
1390 REPLACE_VDPRINTF
1391 REPLACE_VASPRINTF
1392 REPLACE_TMPFILE
1393 REPLACE_STDIO_WRITE_FUNCS
1394 REPLACE_STDIO_READ_FUNCS
1395 REPLACE_SPRINTF
1396 REPLACE_SNPRINTF
1397 REPLACE_RENAMEAT
1398 REPLACE_RENAME
1399 REPLACE_REMOVE
1400 REPLACE_PRINTF
1401 REPLACE_POPEN
1402 REPLACE_PERROR
1403 REPLACE_OBSTACK_PRINTF
1404 REPLACE_GETLINE
1405 REPLACE_GETDELIM
1406 REPLACE_FTELLO
1407 REPLACE_FTELL
1408 REPLACE_FSEEKO
1409 REPLACE_FSEEK
1410 REPLACE_FREOPEN
1411 REPLACE_FPURGE
1412 REPLACE_FPRINTF
1413 REPLACE_FOPEN
1414 REPLACE_FFLUSH
1415 REPLACE_FDOPEN
1416 REPLACE_FCLOSE
1417 REPLACE_DPRINTF
1418 HAVE_VDPRINTF
1419 HAVE_VASPRINTF
1420 HAVE_RENAMEAT
1421 HAVE_POPEN
1422 HAVE_PCLOSE
1423 HAVE_FTELLO
1424 HAVE_FSEEKO
1425 HAVE_DPRINTF
1426 HAVE_DECL_VSNPRINTF
1427 HAVE_DECL_SNPRINTF
1428 HAVE_DECL_OBSTACK_PRINTF
1429 HAVE_DECL_GETLINE
1430 HAVE_DECL_GETDELIM
1431 HAVE_DECL_FTELLO
1432 HAVE_DECL_FSEEKO
1433 HAVE_DECL_FPURGE
1434 GNULIB_VSPRINTF_POSIX
1435 GNULIB_VSNPRINTF
1436 GNULIB_VPRINTF_POSIX
1437 GNULIB_VPRINTF
1438 GNULIB_VFPRINTF_POSIX
1439 GNULIB_VFPRINTF
1440 GNULIB_VDPRINTF
1441 GNULIB_VSCANF
1442 GNULIB_VFSCANF
1443 GNULIB_VASPRINTF
1444 GNULIB_TMPFILE
1445 GNULIB_STDIO_H_SIGPIPE
1446 GNULIB_STDIO_H_NONBLOCKING
1447 GNULIB_SPRINTF_POSIX
1448 GNULIB_SNPRINTF
1449 GNULIB_SCANF
1450 GNULIB_RENAMEAT
1451 GNULIB_RENAME
1452 GNULIB_REMOVE
1453 GNULIB_PUTS
1454 GNULIB_PUTCHAR
1455 GNULIB_PUTC
1456 GNULIB_PRINTF_POSIX
1457 GNULIB_PRINTF
1458 GNULIB_POPEN
1459 GNULIB_PERROR
1460 GNULIB_PCLOSE
1461 GNULIB_OBSTACK_PRINTF_POSIX
1462 GNULIB_OBSTACK_PRINTF
1463 GNULIB_GETLINE
1464 GNULIB_GETDELIM
1465 GNULIB_GETCHAR
1466 GNULIB_GETC
1467 GNULIB_FWRITE
1468 GNULIB_FTELLO
1469 GNULIB_FTELL
1470 GNULIB_FSEEKO
1471 GNULIB_FSEEK
1472 GNULIB_FSCANF
1473 GNULIB_FREOPEN
1474 GNULIB_FREAD
1475 GNULIB_FPUTS
1476 GNULIB_FPUTC
1477 GNULIB_FPURGE
1478 GNULIB_FPRINTF_POSIX
1479 GNULIB_FPRINTF
1480 GNULIB_FOPEN
1481 GNULIB_FGETS
1482 GNULIB_FGETC
1483 GNULIB_FFLUSH
1484 GNULIB_FDOPEN
1485 GNULIB_FCLOSE
1486 GNULIB_DPRINTF
1487 REPLACE_ITOLD
1488 GL_GENERATE_FLOAT_H_FALSE
1489 GL_GENERATE_FLOAT_H_TRUE
1490 FLOAT_H
1491 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1492 NEXT_FLOAT_H
1493 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1494 NEXT_FCNTL_H
1495 REPLACE_OPENAT
1496 REPLACE_OPEN
1497 REPLACE_FCNTL
1498 HAVE_OPENAT
1499 HAVE_FCNTL
1500 GNULIB_OPENAT
1501 GNULIB_OPEN
1502 GNULIB_NONBLOCKING
1503 GNULIB_FCNTL
1504 EOVERFLOW_VALUE
1505 EOVERFLOW_HIDDEN
1506 ENOLINK_VALUE
1507 ENOLINK_HIDDEN
1508 EMULTIHOP_VALUE
1509 EMULTIHOP_HIDDEN
1510 GL_GENERATE_ERRNO_H_FALSE
1511 GL_GENERATE_ERRNO_H_TRUE
1512 ERRNO_H
1513 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1514 NEXT_ERRNO_H
1515 PRAGMA_COLUMNS
1516 PRAGMA_SYSTEM_HEADER
1517 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1518 INCLUDE_NEXT
1519 pkglibexecdir
1520 lispdir
1521 HAVE_WINSOCK2_H
1522 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1523 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1524 UNISTD_H_HAVE_WINSOCK2_H
1525 REPLACE_WRITE
1526 REPLACE_USLEEP
1527 REPLACE_UNLINKAT
1528 REPLACE_UNLINK
1529 REPLACE_TTYNAME_R
1530 REPLACE_TRUNCATE
1531 REPLACE_SYMLINKAT
1532 REPLACE_SYMLINK
1533 REPLACE_SLEEP
1534 REPLACE_RMDIR
1535 REPLACE_READLINKAT
1536 REPLACE_READLINK
1537 REPLACE_READ
1538 REPLACE_PWRITE
1539 REPLACE_PREAD
1540 REPLACE_LSEEK
1541 REPLACE_LINKAT
1542 REPLACE_LINK
1543 REPLACE_LCHOWN
1544 REPLACE_ISATTY
1545 REPLACE_GETPAGESIZE
1546 REPLACE_GETGROUPS
1547 REPLACE_GETLOGIN_R
1548 REPLACE_GETDTABLESIZE
1549 REPLACE_GETDOMAINNAME
1550 REPLACE_GETCWD
1551 REPLACE_FTRUNCATE
1552 REPLACE_FCHOWNAT
1553 REPLACE_FACCESSAT
1554 REPLACE_DUP2
1555 REPLACE_DUP
1556 REPLACE_CLOSE
1557 REPLACE_CHOWN
1558 HAVE_SYS_PARAM_H
1559 HAVE_OS_H
1560 HAVE_DECL_TTYNAME_R
1561 HAVE_DECL_SETHOSTNAME
1562 HAVE_DECL_GETUSERSHELL
1563 HAVE_DECL_GETPAGESIZE
1564 HAVE_DECL_GETLOGIN_R
1565 HAVE_DECL_GETLOGIN
1566 HAVE_DECL_GETDOMAINNAME
1567 HAVE_DECL_FDATASYNC
1568 HAVE_DECL_FCHDIR
1569 HAVE_DECL_ENVIRON
1570 HAVE_USLEEP
1571 HAVE_UNLINKAT
1572 HAVE_TRUNCATE
1573 HAVE_SYMLINKAT
1574 HAVE_SYMLINK
1575 HAVE_SLEEP
1576 HAVE_SETHOSTNAME
1577 HAVE_READLINKAT
1578 HAVE_READLINK
1579 HAVE_PWRITE
1580 HAVE_PREAD
1581 HAVE_PIPE2
1582 HAVE_PIPE
1583 HAVE_LINKAT
1584 HAVE_LINK
1585 HAVE_LCHOWN
1586 HAVE_GROUP_MEMBER
1587 HAVE_GETPAGESIZE
1588 HAVE_GETLOGIN
1589 HAVE_GETHOSTNAME
1590 HAVE_GETGROUPS
1591 HAVE_GETDTABLESIZE
1592 HAVE_FTRUNCATE
1593 HAVE_FSYNC
1594 HAVE_FDATASYNC
1595 HAVE_FCHOWNAT
1596 HAVE_FCHDIR
1597 HAVE_FACCESSAT
1598 HAVE_EUIDACCESS
1599 HAVE_DUP3
1600 HAVE_DUP2
1601 HAVE_CHOWN
1602 GNULIB_WRITE
1603 GNULIB_USLEEP
1604 GNULIB_UNLINKAT
1605 GNULIB_UNLINK
1606 GNULIB_UNISTD_H_SIGPIPE
1607 GNULIB_UNISTD_H_NONBLOCKING
1608 GNULIB_TTYNAME_R
1609 GNULIB_TRUNCATE
1610 GNULIB_SYMLINKAT
1611 GNULIB_SYMLINK
1612 GNULIB_SLEEP
1613 GNULIB_SETHOSTNAME
1614 GNULIB_RMDIR
1615 GNULIB_READLINKAT
1616 GNULIB_READLINK
1617 GNULIB_READ
1618 GNULIB_PWRITE
1619 GNULIB_PREAD
1620 GNULIB_PIPE2
1621 GNULIB_PIPE
1622 GNULIB_LSEEK
1623 GNULIB_LINKAT
1624 GNULIB_LINK
1625 GNULIB_LCHOWN
1626 GNULIB_ISATTY
1627 GNULIB_GROUP_MEMBER
1628 GNULIB_GETUSERSHELL
1629 GNULIB_GETPAGESIZE
1630 GNULIB_GETLOGIN_R
1631 GNULIB_GETLOGIN
1632 GNULIB_GETHOSTNAME
1633 GNULIB_GETGROUPS
1634 GNULIB_GETDTABLESIZE
1635 GNULIB_GETDOMAINNAME
1636 GNULIB_GETCWD
1637 GNULIB_FTRUNCATE
1638 GNULIB_FSYNC
1639 GNULIB_FDATASYNC
1640 GNULIB_FCHOWNAT
1641 GNULIB_FCHDIR
1642 GNULIB_FACCESSAT
1643 GNULIB_EUIDACCESS
1644 GNULIB_ENVIRON
1645 GNULIB_DUP3
1646 GNULIB_DUP2
1647 GNULIB_DUP
1648 GNULIB_CLOSE
1649 GNULIB_CHOWN
1650 GNULIB_CHDIR
1651 REPLACE_WCTOMB
1652 REPLACE_UNSETENV
1653 REPLACE_STRTOD
1654 REPLACE_SETENV
1655 REPLACE_REALPATH
1656 REPLACE_REALLOC
1657 REPLACE_RANDOM_R
1658 REPLACE_QSORT_R
1659 REPLACE_PUTENV
1660 REPLACE_PTSNAME_R
1661 REPLACE_PTSNAME
1662 REPLACE_MKSTEMP
1663 REPLACE_MBTOWC
1664 REPLACE_MALLOC
1665 REPLACE_CANONICALIZE_FILE_NAME
1666 REPLACE_CALLOC
1667 HAVE_DECL_UNSETENV
1668 HAVE_UNLOCKPT
1669 HAVE_SYS_LOADAVG_H
1670 HAVE_STRUCT_RANDOM_DATA
1671 HAVE_STRTOULL
1672 HAVE_STRTOLL
1673 HAVE_STRTOD
1674 HAVE_DECL_SETSTATE
1675 HAVE_DECL_SETENV
1676 HAVE_SETENV
1677 HAVE_SECURE_GETENV
1678 HAVE_RPMATCH
1679 HAVE_REALPATH
1680 HAVE_REALLOCARRAY
1681 HAVE_RANDOM_R
1682 HAVE_RANDOM_H
1683 HAVE_RANDOM
1684 HAVE_QSORT_R
1685 HAVE_PTSNAME_R
1686 HAVE_PTSNAME
1687 HAVE_POSIX_OPENPT
1688 HAVE_MKSTEMPS
1689 HAVE_MKSTEMP
1690 HAVE_MKOSTEMPS
1691 HAVE_MKOSTEMP
1692 HAVE_MKDTEMP
1693 HAVE_DECL_INITSTATE
1694 HAVE_GRANTPT
1695 HAVE_GETSUBOPT
1696 HAVE_DECL_GETLOADAVG
1697 HAVE_CANONICALIZE_FILE_NAME
1698 HAVE_ATOLL
1699 HAVE__EXIT
1700 GNULIB_WCTOMB
1701 GNULIB_UNSETENV
1702 GNULIB_UNLOCKPT
1703 GNULIB_SYSTEM_POSIX
1704 GNULIB_STRTOULL
1705 GNULIB_STRTOLL
1706 GNULIB_STRTOD
1707 GNULIB_SETENV
1708 GNULIB_SECURE_GETENV
1709 GNULIB_RPMATCH
1710 GNULIB_REALPATH
1711 GNULIB_REALLOC_POSIX
1712 GNULIB_REALLOCARRAY
1713 GNULIB_RANDOM_R
1714 GNULIB_RANDOM
1715 GNULIB_QSORT_R
1716 GNULIB_PUTENV
1717 GNULIB_PTSNAME_R
1718 GNULIB_PTSNAME
1719 GNULIB_POSIX_OPENPT
1720 GNULIB_MKSTEMPS
1721 GNULIB_MKSTEMP
1722 GNULIB_MKOSTEMPS
1723 GNULIB_MKOSTEMP
1724 GNULIB_MKDTEMP
1725 GNULIB_MBTOWC
1726 GNULIB_MALLOC_POSIX
1727 GNULIB_GRANTPT
1728 GNULIB_GETSUBOPT
1729 GNULIB_GETLOADAVG
1730 GNULIB_CANONICALIZE_FILE_NAME
1731 GNULIB_CALLOC_POSIX
1732 GNULIB_ATOLL
1733 GNULIB__EXIT
1734 GL_GENERATE_ALLOCA_H_FALSE
1735 GL_GENERATE_ALLOCA_H_TRUE
1736 ALLOCA_H
1737 ALLOCA
1738 GL_COND_LIBTOOL_FALSE
1739 GL_COND_LIBTOOL_TRUE
1740 XSLTPROC
1741 HELP2MAN
1742 PERL
1743 M4_DEBUGFILE
1744 M4_GNU
1745 M4
1746 YFLAGS
1747 YACC
1748 FLEX_CXX_WORKS_FALSE
1749 FLEX_CXX_WORKS_TRUE
1750 LEXLIB
1751 LEX_OUTPUT_ROOT
1752 LEX_IS_FLEX
1753 LEX
1754 DOT
1755 ENABLE_YACC_FALSE
1756 ENABLE_YACC_TRUE
1757 CXX_COMPILER_POSIXLY_CORRECT
1758 BISON_CXX_WORKS_FALSE
1759 BISON_CXX_WORKS_TRUE
1760 BISON_CXX_WORKS
1761 C_COMPILER_POSIXLY_CORRECT
1762 BISON_C_WORKS
1763 FLEX_SCANNER_CXXFLAGS
1764 WARN_CXXFLAGS_TEST
1765 WERROR_CXXFLAGS
1766 WARN_CXXFLAGS
1767 WARN_CFLAGS_TEST
1768 WERROR_CFLAGS
1769 WARN_CFLAGS
1770 ENABLE_GCC_WARNINGS_FALSE
1771 ENABLE_GCC_WARNINGS_TRUE
1772 host_os
1773 host_vendor
1774 host_cpu
1775 host
1776 build_os
1777 build_vendor
1778 build_cpu
1779 build
1780 RANLIB
1781 ARFLAGS
1782 AR
1783 EGREP
1784 GREP
1785 CPP
1786 am__fastdepCXX_FALSE
1787 am__fastdepCXX_TRUE
1788 CXXDEPMODE
1789 ac_ct_CXX
1790 CXXFLAGS
1791 CXX
1792 am__fastdepCC_FALSE
1793 am__fastdepCC_TRUE
1794 CCDEPMODE
1795 am__nodep
1796 AMDEPBACKSLASH
1797 AMDEP_FALSE
1798 AMDEP_TRUE
1799 am__quote
1800 am__include
1801 DEPDIR
1802 OBJEXT
1803 EXEEXT
1804 ac_ct_CC
1805 CPPFLAGS
1806 LDFLAGS
1807 CFLAGS
1808 CC
1809 AM_BACKSLASH
1810 AM_DEFAULT_VERBOSITY
1811 AM_DEFAULT_V
1812 AM_V
1813 am__untar
1814 am__tar
1815 AMTAR
1816 am__leading_dot
1817 SET_MAKE
1818 AWK
1819 mkdir_p
1820 MKDIR_P
1821 INSTALL_STRIP_PROGRAM
1822 STRIP
1823 install_sh
1824 MAKEINFO
1825 AUTOHEADER
1826 AUTOMAKE
1827 AUTOCONF
1828 ACLOCAL
1829 VERSION
1830 PACKAGE
1831 CYGPATH_W
1832 am__isrc
1833 INSTALL_DATA
1834 INSTALL_SCRIPT
1835 INSTALL_PROGRAM
1836 PACKAGE_COPYRIGHT_YEAR
1837 target_alias
1838 host_alias
1839 build_alias
1840 LIBS
1841 ECHO_T
1842 ECHO_N
1843 ECHO_C
1844 DEFS
1845 mandir
1846 localedir
1847 libdir
1848 psdir
1849 pdfdir
1850 dvidir
1851 htmldir
1852 infodir
1853 docdir
1854 oldincludedir
1855 includedir
1856 runstatedir
1857 localstatedir
1858 sharedstatedir
1859 sysconfdir
1860 datadir
1861 datarootdir
1862 libexecdir
1863 sbindir
1864 bindir
1865 program_transform_name
1866 prefix
1867 exec_prefix
1868 PACKAGE_URL
1869 PACKAGE_BUGREPORT
1870 PACKAGE_STRING
1871 PACKAGE_VERSION
1872 PACKAGE_TARNAME
1873 PACKAGE_NAME
1874 PATH_SEPARATOR
1875 SHELL'
1876 ac_subst_files=''
1877 ac_user_opts='
1878 enable_option_checking
1879 enable_silent_rules
1880 enable_dependency_tracking
1881 enable_largefile
1882 enable_threads
1883 enable_gcc_warnings
1884 enable_yacc
1885 enable_assert
1886 with_gnu_ld
1887 enable_rpath
1888 with_libpth_prefix
1889 with_dmalloc
1890 enable_nls
1891 with_libiconv_prefix
1892 with_libintl_prefix
1893 '
1894       ac_precious_vars='build_alias
1895 host_alias
1896 target_alias
1897 CC
1898 CFLAGS
1899 LDFLAGS
1900 LIBS
1901 CPPFLAGS
1902 CXX
1903 CXXFLAGS
1904 CCC
1905 CPP
1906 YACC
1907 YFLAGS
1908 M4'
1909
1910
1911 # Initialize some variables set by options.
1912 ac_init_help=
1913 ac_init_version=false
1914 ac_unrecognized_opts=
1915 ac_unrecognized_sep=
1916 # The variables have the same names as the options, with
1917 # dashes changed to underlines.
1918 cache_file=/dev/null
1919 exec_prefix=NONE
1920 no_create=
1921 no_recursion=
1922 prefix=NONE
1923 program_prefix=NONE
1924 program_suffix=NONE
1925 program_transform_name=s,x,x,
1926 silent=
1927 site=
1928 srcdir=
1929 verbose=
1930 x_includes=NONE
1931 x_libraries=NONE
1932
1933 # Installation directory options.
1934 # These are left unexpanded so users can "make install exec_prefix=/foo"
1935 # and all the variables that are supposed to be based on exec_prefix
1936 # by default will actually change.
1937 # Use braces instead of parens because sh, perl, etc. also accept them.
1938 # (The list follows the same order as the GNU Coding Standards.)
1939 bindir='${exec_prefix}/bin'
1940 sbindir='${exec_prefix}/sbin'
1941 libexecdir='${exec_prefix}/libexec'
1942 datarootdir='${prefix}/share'
1943 datadir='${datarootdir}'
1944 sysconfdir='${prefix}/etc'
1945 sharedstatedir='${prefix}/com'
1946 localstatedir='${prefix}/var'
1947 runstatedir='${localstatedir}/run'
1948 includedir='${prefix}/include'
1949 oldincludedir='/usr/include'
1950 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1951 infodir='${datarootdir}/info'
1952 htmldir='${docdir}'
1953 dvidir='${docdir}'
1954 pdfdir='${docdir}'
1955 psdir='${docdir}'
1956 libdir='${exec_prefix}/lib'
1957 localedir='${datarootdir}/locale'
1958 mandir='${datarootdir}/man'
1959
1960 ac_prev=
1961 ac_dashdash=
1962 for ac_option
1963 do
1964   # If the previous option needs an argument, assign it.
1965   if test -n "$ac_prev"; then
1966     eval $ac_prev=\$ac_option
1967     ac_prev=
1968     continue
1969   fi
1970
1971   case $ac_option in
1972   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1973   *=)   ac_optarg= ;;
1974   *)    ac_optarg=yes ;;
1975   esac
1976
1977   # Accept the important Cygnus configure options, so we can diagnose typos.
1978
1979   case $ac_dashdash$ac_option in
1980   --)
1981     ac_dashdash=yes ;;
1982
1983   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1984     ac_prev=bindir ;;
1985   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1986     bindir=$ac_optarg ;;
1987
1988   -build | --build | --buil | --bui | --bu)
1989     ac_prev=build_alias ;;
1990   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1991     build_alias=$ac_optarg ;;
1992
1993   -cache-file | --cache-file | --cache-fil | --cache-fi \
1994   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1995     ac_prev=cache_file ;;
1996   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1997   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1998     cache_file=$ac_optarg ;;
1999
2000   --config-cache | -C)
2001     cache_file=config.cache ;;
2002
2003   -datadir | --datadir | --datadi | --datad)
2004     ac_prev=datadir ;;
2005   -datadir=* | --datadir=* | --datadi=* | --datad=*)
2006     datadir=$ac_optarg ;;
2007
2008   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2009   | --dataroo | --dataro | --datar)
2010     ac_prev=datarootdir ;;
2011   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2012   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2013     datarootdir=$ac_optarg ;;
2014
2015   -disable-* | --disable-*)
2016     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2017     # Reject names that are not valid shell variable names.
2018     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2019       as_fn_error $? "invalid feature name: $ac_useropt"
2020     ac_useropt_orig=$ac_useropt
2021     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2022     case $ac_user_opts in
2023       *"
2024 "enable_$ac_useropt"
2025 "*) ;;
2026       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2027          ac_unrecognized_sep=', ';;
2028     esac
2029     eval enable_$ac_useropt=no ;;
2030
2031   -docdir | --docdir | --docdi | --doc | --do)
2032     ac_prev=docdir ;;
2033   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2034     docdir=$ac_optarg ;;
2035
2036   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2037     ac_prev=dvidir ;;
2038   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2039     dvidir=$ac_optarg ;;
2040
2041   -enable-* | --enable-*)
2042     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2043     # Reject names that are not valid shell variable names.
2044     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045       as_fn_error $? "invalid feature name: $ac_useropt"
2046     ac_useropt_orig=$ac_useropt
2047     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048     case $ac_user_opts in
2049       *"
2050 "enable_$ac_useropt"
2051 "*) ;;
2052       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2053          ac_unrecognized_sep=', ';;
2054     esac
2055     eval enable_$ac_useropt=\$ac_optarg ;;
2056
2057   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2058   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2059   | --exec | --exe | --ex)
2060     ac_prev=exec_prefix ;;
2061   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2062   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2063   | --exec=* | --exe=* | --ex=*)
2064     exec_prefix=$ac_optarg ;;
2065
2066   -gas | --gas | --ga | --g)
2067     # Obsolete; use --with-gas.
2068     with_gas=yes ;;
2069
2070   -help | --help | --hel | --he | -h)
2071     ac_init_help=long ;;
2072   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2073     ac_init_help=recursive ;;
2074   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2075     ac_init_help=short ;;
2076
2077   -host | --host | --hos | --ho)
2078     ac_prev=host_alias ;;
2079   -host=* | --host=* | --hos=* | --ho=*)
2080     host_alias=$ac_optarg ;;
2081
2082   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2083     ac_prev=htmldir ;;
2084   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2085   | --ht=*)
2086     htmldir=$ac_optarg ;;
2087
2088   -includedir | --includedir | --includedi | --included | --include \
2089   | --includ | --inclu | --incl | --inc)
2090     ac_prev=includedir ;;
2091   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2092   | --includ=* | --inclu=* | --incl=* | --inc=*)
2093     includedir=$ac_optarg ;;
2094
2095   -infodir | --infodir | --infodi | --infod | --info | --inf)
2096     ac_prev=infodir ;;
2097   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2098     infodir=$ac_optarg ;;
2099
2100   -libdir | --libdir | --libdi | --libd)
2101     ac_prev=libdir ;;
2102   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2103     libdir=$ac_optarg ;;
2104
2105   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2106   | --libexe | --libex | --libe)
2107     ac_prev=libexecdir ;;
2108   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2109   | --libexe=* | --libex=* | --libe=*)
2110     libexecdir=$ac_optarg ;;
2111
2112   -localedir | --localedir | --localedi | --localed | --locale)
2113     ac_prev=localedir ;;
2114   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2115     localedir=$ac_optarg ;;
2116
2117   -localstatedir | --localstatedir | --localstatedi | --localstated \
2118   | --localstate | --localstat | --localsta | --localst | --locals)
2119     ac_prev=localstatedir ;;
2120   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2121   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2122     localstatedir=$ac_optarg ;;
2123
2124   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2125     ac_prev=mandir ;;
2126   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2127     mandir=$ac_optarg ;;
2128
2129   -nfp | --nfp | --nf)
2130     # Obsolete; use --without-fp.
2131     with_fp=no ;;
2132
2133   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2134   | --no-cr | --no-c | -n)
2135     no_create=yes ;;
2136
2137   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2138   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2139     no_recursion=yes ;;
2140
2141   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2142   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2143   | --oldin | --oldi | --old | --ol | --o)
2144     ac_prev=oldincludedir ;;
2145   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2146   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2147   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2148     oldincludedir=$ac_optarg ;;
2149
2150   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2151     ac_prev=prefix ;;
2152   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2153     prefix=$ac_optarg ;;
2154
2155   -program-prefix | --program-prefix | --program-prefi | --program-pref \
2156   | --program-pre | --program-pr | --program-p)
2157     ac_prev=program_prefix ;;
2158   -program-prefix=* | --program-prefix=* | --program-prefi=* \
2159   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2160     program_prefix=$ac_optarg ;;
2161
2162   -program-suffix | --program-suffix | --program-suffi | --program-suff \
2163   | --program-suf | --program-su | --program-s)
2164     ac_prev=program_suffix ;;
2165   -program-suffix=* | --program-suffix=* | --program-suffi=* \
2166   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2167     program_suffix=$ac_optarg ;;
2168
2169   -program-transform-name | --program-transform-name \
2170   | --program-transform-nam | --program-transform-na \
2171   | --program-transform-n | --program-transform- \
2172   | --program-transform | --program-transfor \
2173   | --program-transfo | --program-transf \
2174   | --program-trans | --program-tran \
2175   | --progr-tra | --program-tr | --program-t)
2176     ac_prev=program_transform_name ;;
2177   -program-transform-name=* | --program-transform-name=* \
2178   | --program-transform-nam=* | --program-transform-na=* \
2179   | --program-transform-n=* | --program-transform-=* \
2180   | --program-transform=* | --program-transfor=* \
2181   | --program-transfo=* | --program-transf=* \
2182   | --program-trans=* | --program-tran=* \
2183   | --progr-tra=* | --program-tr=* | --program-t=*)
2184     program_transform_name=$ac_optarg ;;
2185
2186   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2187     ac_prev=pdfdir ;;
2188   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2189     pdfdir=$ac_optarg ;;
2190
2191   -psdir | --psdir | --psdi | --psd | --ps)
2192     ac_prev=psdir ;;
2193   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2194     psdir=$ac_optarg ;;
2195
2196   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2197   | -silent | --silent | --silen | --sile | --sil)
2198     silent=yes ;;
2199
2200   -runstatedir | --runstatedir | --runstatedi | --runstated \
2201   | --runstate | --runstat | --runsta | --runst | --runs \
2202   | --run | --ru | --r)
2203     ac_prev=runstatedir ;;
2204   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2205   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2206   | --run=* | --ru=* | --r=*)
2207     runstatedir=$ac_optarg ;;
2208
2209   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2210     ac_prev=sbindir ;;
2211   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2212   | --sbi=* | --sb=*)
2213     sbindir=$ac_optarg ;;
2214
2215   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2216   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2217   | --sharedst | --shareds | --shared | --share | --shar \
2218   | --sha | --sh)
2219     ac_prev=sharedstatedir ;;
2220   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2221   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2222   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2223   | --sha=* | --sh=*)
2224     sharedstatedir=$ac_optarg ;;
2225
2226   -site | --site | --sit)
2227     ac_prev=site ;;
2228   -site=* | --site=* | --sit=*)
2229     site=$ac_optarg ;;
2230
2231   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2232     ac_prev=srcdir ;;
2233   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2234     srcdir=$ac_optarg ;;
2235
2236   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2237   | --syscon | --sysco | --sysc | --sys | --sy)
2238     ac_prev=sysconfdir ;;
2239   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2240   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2241     sysconfdir=$ac_optarg ;;
2242
2243   -target | --target | --targe | --targ | --tar | --ta | --t)
2244     ac_prev=target_alias ;;
2245   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2246     target_alias=$ac_optarg ;;
2247
2248   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2249     verbose=yes ;;
2250
2251   -version | --version | --versio | --versi | --vers | -V)
2252     ac_init_version=: ;;
2253
2254   -with-* | --with-*)
2255     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2256     # Reject names that are not valid shell variable names.
2257     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2258       as_fn_error $? "invalid package name: $ac_useropt"
2259     ac_useropt_orig=$ac_useropt
2260     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2261     case $ac_user_opts in
2262       *"
2263 "with_$ac_useropt"
2264 "*) ;;
2265       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2266          ac_unrecognized_sep=', ';;
2267     esac
2268     eval with_$ac_useropt=\$ac_optarg ;;
2269
2270   -without-* | --without-*)
2271     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2272     # Reject names that are not valid shell variable names.
2273     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2274       as_fn_error $? "invalid package name: $ac_useropt"
2275     ac_useropt_orig=$ac_useropt
2276     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2277     case $ac_user_opts in
2278       *"
2279 "with_$ac_useropt"
2280 "*) ;;
2281       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2282          ac_unrecognized_sep=', ';;
2283     esac
2284     eval with_$ac_useropt=no ;;
2285
2286   --x)
2287     # Obsolete; use --with-x.
2288     with_x=yes ;;
2289
2290   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2291   | --x-incl | --x-inc | --x-in | --x-i)
2292     ac_prev=x_includes ;;
2293   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2294   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2295     x_includes=$ac_optarg ;;
2296
2297   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2298   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2299     ac_prev=x_libraries ;;
2300   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2301   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2302     x_libraries=$ac_optarg ;;
2303
2304   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2305 Try \`$0 --help' for more information"
2306     ;;
2307
2308   *=*)
2309     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2310     # Reject names that are not valid shell variable names.
2311     case $ac_envvar in #(
2312       '' | [0-9]* | *[!_$as_cr_alnum]* )
2313       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2314     esac
2315     eval $ac_envvar=\$ac_optarg
2316     export $ac_envvar ;;
2317
2318   *)
2319     # FIXME: should be removed in autoconf 3.0.
2320     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2321     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2322       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2323     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2324     ;;
2325
2326   esac
2327 done
2328
2329 if test -n "$ac_prev"; then
2330   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2331   as_fn_error $? "missing argument to $ac_option"
2332 fi
2333
2334 if test -n "$ac_unrecognized_opts"; then
2335   case $enable_option_checking in
2336     no) ;;
2337     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2338     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2339   esac
2340 fi
2341
2342 # Check all directory arguments for consistency.
2343 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2344                 datadir sysconfdir sharedstatedir localstatedir includedir \
2345                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2346                 libdir localedir mandir runstatedir
2347 do
2348   eval ac_val=\$$ac_var
2349   # Remove trailing slashes.
2350   case $ac_val in
2351     */ )
2352       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2353       eval $ac_var=\$ac_val;;
2354   esac
2355   # Be sure to have absolute directory names.
2356   case $ac_val in
2357     [\\/$]* | ?:[\\/]* )  continue;;
2358     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2359   esac
2360   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2361 done
2362
2363 # There might be people who depend on the old broken behavior: `$host'
2364 # used to hold the argument of --host etc.
2365 # FIXME: To remove some day.
2366 build=$build_alias
2367 host=$host_alias
2368 target=$target_alias
2369
2370 # FIXME: To remove some day.
2371 if test "x$host_alias" != x; then
2372   if test "x$build_alias" = x; then
2373     cross_compiling=maybe
2374   elif test "x$build_alias" != "x$host_alias"; then
2375     cross_compiling=yes
2376   fi
2377 fi
2378
2379 ac_tool_prefix=
2380 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2381
2382 test "$silent" = yes && exec 6>/dev/null
2383
2384
2385 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2386 ac_ls_di=`ls -di .` &&
2387 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2388   as_fn_error $? "working directory cannot be determined"
2389 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2390   as_fn_error $? "pwd does not report name of working directory"
2391
2392
2393 # Find the source files, if location was not specified.
2394 if test -z "$srcdir"; then
2395   ac_srcdir_defaulted=yes
2396   # Try the directory containing this script, then the parent directory.
2397   ac_confdir=`$as_dirname -- "$as_myself" ||
2398 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2399          X"$as_myself" : 'X\(//\)[^/]' \| \
2400          X"$as_myself" : 'X\(//\)$' \| \
2401          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2402 $as_echo X"$as_myself" |
2403     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2404             s//\1/
2405             q
2406           }
2407           /^X\(\/\/\)[^/].*/{
2408             s//\1/
2409             q
2410           }
2411           /^X\(\/\/\)$/{
2412             s//\1/
2413             q
2414           }
2415           /^X\(\/\).*/{
2416             s//\1/
2417             q
2418           }
2419           s/.*/./; q'`
2420   srcdir=$ac_confdir
2421   if test ! -r "$srcdir/$ac_unique_file"; then
2422     srcdir=..
2423   fi
2424 else
2425   ac_srcdir_defaulted=no
2426 fi
2427 if test ! -r "$srcdir/$ac_unique_file"; then
2428   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2429   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2430 fi
2431 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2432 ac_abs_confdir=`(
2433         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2434         pwd)`
2435 # When building in place, set srcdir=.
2436 if test "$ac_abs_confdir" = "$ac_pwd"; then
2437   srcdir=.
2438 fi
2439 # Remove unnecessary trailing slashes from srcdir.
2440 # Double slashes in file names in object file debugging info
2441 # mess up M-x gdb in Emacs.
2442 case $srcdir in
2443 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2444 esac
2445 for ac_var in $ac_precious_vars; do
2446   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2447   eval ac_env_${ac_var}_value=\$${ac_var}
2448   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2449   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2450 done
2451
2452 #
2453 # Report the --help message.
2454 #
2455 if test "$ac_init_help" = "long"; then
2456   # Omit some internal or obsolete options to make the list less imposing.
2457   # This message is too long to be a string in the A/UX 3.1 sh.
2458   cat <<_ACEOF
2459 \`configure' configures GNU Bison 3.0.5 to adapt to many kinds of systems.
2460
2461 Usage: $0 [OPTION]... [VAR=VALUE]...
2462
2463 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2464 VAR=VALUE.  See below for descriptions of some of the useful variables.
2465
2466 Defaults for the options are specified in brackets.
2467
2468 Configuration:
2469   -h, --help              display this help and exit
2470       --help=short        display options specific to this package
2471       --help=recursive    display the short help of all the included packages
2472   -V, --version           display version information and exit
2473   -q, --quiet, --silent   do not print \`checking ...' messages
2474       --cache-file=FILE   cache test results in FILE [disabled]
2475   -C, --config-cache      alias for \`--cache-file=config.cache'
2476   -n, --no-create         do not create output files
2477       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2478
2479 Installation directories:
2480   --prefix=PREFIX         install architecture-independent files in PREFIX
2481                           [$ac_default_prefix]
2482   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2483                           [PREFIX]
2484
2485 By default, \`make install' will install all the files in
2486 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2487 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2488 for instance \`--prefix=\$HOME'.
2489
2490 For better control, use the options below.
2491
2492 Fine tuning of the installation directories:
2493   --bindir=DIR            user executables [EPREFIX/bin]
2494   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2495   --libexecdir=DIR        program executables [EPREFIX/libexec]
2496   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2497   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2498   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2499   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2500   --libdir=DIR            object code libraries [EPREFIX/lib]
2501   --includedir=DIR        C header files [PREFIX/include]
2502   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2503   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2504   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2505   --infodir=DIR           info documentation [DATAROOTDIR/info]
2506   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2507   --mandir=DIR            man documentation [DATAROOTDIR/man]
2508   --docdir=DIR            documentation root [DATAROOTDIR/doc/bison]
2509   --htmldir=DIR           html documentation [DOCDIR]
2510   --dvidir=DIR            dvi documentation [DOCDIR]
2511   --pdfdir=DIR            pdf documentation [DOCDIR]
2512   --psdir=DIR             ps documentation [DOCDIR]
2513 _ACEOF
2514
2515   cat <<\_ACEOF
2516
2517 Program names:
2518   --program-prefix=PREFIX            prepend PREFIX to installed program names
2519   --program-suffix=SUFFIX            append SUFFIX to installed program names
2520   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2521
2522 System types:
2523   --build=BUILD     configure for building on BUILD [guessed]
2524   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2525 _ACEOF
2526 fi
2527
2528 if test -n "$ac_init_help"; then
2529   case $ac_init_help in
2530      short | recursive ) echo "Configuration of GNU Bison 3.0.5:";;
2531    esac
2532   cat <<\_ACEOF
2533
2534 Optional Features:
2535   --disable-option-checking  ignore unrecognized --enable/--with options
2536   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2537   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2538   --enable-silent-rules   less verbose build output (undo: "make V=1")
2539   --disable-silent-rules  verbose build output (undo: "make V=0")
2540   --enable-dependency-tracking
2541                           do not reject slow dependency extractors
2542   --disable-dependency-tracking
2543                           speeds up one-time build
2544   --disable-largefile     omit support for large files
2545   --enable-threads={posix|solaris|pth|windows}
2546                           specify multithreading API
2547   --disable-threads       build without multithread safety
2548   --enable-gcc-warnings   turn on lots of GCC warnings (not recommended).
2549                            Also, issue synclines from the examples/ to
2550                            the corresponding source in the Texinfo doc.
2551   --disable-yacc          do not build a yacc command or an -ly library
2552   --disable-assert        turn off assertions
2553   --disable-rpath         do not hardcode runtime library paths
2554   --disable-nls           do not use Native Language Support
2555
2556 Optional Packages:
2557   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2558   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2559   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2560   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2561   --without-libpth-prefix     don't search for libpth in includedir and libdir
2562   --with-dmalloc          use dmalloc, as in
2563                           http://www.dmalloc.com/dmalloc.tar.gz
2564   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2565   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2566   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2567   --without-libintl-prefix     don't search for libintl in includedir and libdir
2568
2569 Some influential environment variables:
2570   CC          C compiler command
2571   CFLAGS      C compiler flags
2572   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2573               nonstandard directory <lib dir>
2574   LIBS        libraries to pass to the linker, e.g. -l<library>
2575   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2576               you have headers in a nonstandard directory <include dir>
2577   CXX         C++ compiler command
2578   CXXFLAGS    C++ compiler flags
2579   CPP         C preprocessor
2580   YACC        The `Yet Another Compiler Compiler' implementation to use.
2581               Defaults to the first program found out of: `bison -y', `byacc',
2582               `yacc'.
2583   YFLAGS      The list of arguments that will be passed by default to $YACC.
2584               This script will default YFLAGS to the empty string to avoid a
2585               default value of `-d' given by some make applications.
2586   M4          Location of GNU M4 1.4.6 or later. Defaults to the first program
2587               of 'm4', 'gm4', or 'gnum4' on PATH that meets Autoconf needs.
2588
2589 Use these variables to override the choices made by `configure' or to help
2590 it to find libraries and programs with nonstandard names/locations.
2591
2592 Report bugs to <bug-bison@gnu.org>.
2593 GNU Bison home page: <http://www.gnu.org/software/bison/>.
2594 General help using GNU software: <http://www.gnu.org/gethelp/>.
2595 _ACEOF
2596 ac_status=$?
2597 fi
2598
2599 if test "$ac_init_help" = "recursive"; then
2600   # If there are subdirs, report their specific --help.
2601   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2602     test -d "$ac_dir" ||
2603       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2604       continue
2605     ac_builddir=.
2606
2607 case "$ac_dir" in
2608 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2609 *)
2610   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2611   # A ".." for each directory in $ac_dir_suffix.
2612   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2613   case $ac_top_builddir_sub in
2614   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2615   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2616   esac ;;
2617 esac
2618 ac_abs_top_builddir=$ac_pwd
2619 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2620 # for backward compatibility:
2621 ac_top_builddir=$ac_top_build_prefix
2622
2623 case $srcdir in
2624   .)  # We are building in place.
2625     ac_srcdir=.
2626     ac_top_srcdir=$ac_top_builddir_sub
2627     ac_abs_top_srcdir=$ac_pwd ;;
2628   [\\/]* | ?:[\\/]* )  # Absolute name.
2629     ac_srcdir=$srcdir$ac_dir_suffix;
2630     ac_top_srcdir=$srcdir
2631     ac_abs_top_srcdir=$srcdir ;;
2632   *) # Relative name.
2633     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2634     ac_top_srcdir=$ac_top_build_prefix$srcdir
2635     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2636 esac
2637 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2638
2639     cd "$ac_dir" || { ac_status=$?; continue; }
2640     # Check for guested configure.
2641     if test -f "$ac_srcdir/configure.gnu"; then
2642       echo &&
2643       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2644     elif test -f "$ac_srcdir/configure"; then
2645       echo &&
2646       $SHELL "$ac_srcdir/configure" --help=recursive
2647     else
2648       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2649     fi || ac_status=$?
2650     cd "$ac_pwd" || { ac_status=$?; break; }
2651   done
2652 fi
2653
2654 test -n "$ac_init_help" && exit $ac_status
2655 if $ac_init_version; then
2656   cat <<\_ACEOF
2657 GNU Bison configure 3.0.5
2658 generated by GNU Autoconf 2.69
2659
2660 Copyright (C) 2012 Free Software Foundation, Inc.
2661 This configure script is free software; the Free Software Foundation
2662 gives unlimited permission to copy, distribute and modify it.
2663 _ACEOF
2664   exit
2665 fi
2666
2667 ## ------------------------ ##
2668 ## Autoconf initialization. ##
2669 ## ------------------------ ##
2670
2671 # ac_fn_c_try_compile LINENO
2672 # --------------------------
2673 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2674 ac_fn_c_try_compile ()
2675 {
2676   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2677   rm -f conftest.$ac_objext
2678   if { { ac_try="$ac_compile"
2679 case "(($ac_try" in
2680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2681   *) ac_try_echo=$ac_try;;
2682 esac
2683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2684 $as_echo "$ac_try_echo"; } >&5
2685   (eval "$ac_compile") 2>conftest.err
2686   ac_status=$?
2687   if test -s conftest.err; then
2688     grep -v '^ *+' conftest.err >conftest.er1
2689     cat conftest.er1 >&5
2690     mv -f conftest.er1 conftest.err
2691   fi
2692   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2693   test $ac_status = 0; } && {
2694          test -z "$ac_c_werror_flag" ||
2695          test ! -s conftest.err
2696        } && test -s conftest.$ac_objext; then :
2697   ac_retval=0
2698 else
2699   $as_echo "$as_me: failed program was:" >&5
2700 sed 's/^/| /' conftest.$ac_ext >&5
2701
2702         ac_retval=1
2703 fi
2704   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2705   as_fn_set_status $ac_retval
2706
2707 } # ac_fn_c_try_compile
2708
2709 # ac_fn_cxx_try_compile LINENO
2710 # ----------------------------
2711 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2712 ac_fn_cxx_try_compile ()
2713 {
2714   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2715   rm -f conftest.$ac_objext
2716   if { { ac_try="$ac_compile"
2717 case "(($ac_try" in
2718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719   *) ac_try_echo=$ac_try;;
2720 esac
2721 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2722 $as_echo "$ac_try_echo"; } >&5
2723   (eval "$ac_compile") 2>conftest.err
2724   ac_status=$?
2725   if test -s conftest.err; then
2726     grep -v '^ *+' conftest.err >conftest.er1
2727     cat conftest.er1 >&5
2728     mv -f conftest.er1 conftest.err
2729   fi
2730   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2731   test $ac_status = 0; } && {
2732          test -z "$ac_cxx_werror_flag" ||
2733          test ! -s conftest.err
2734        } && test -s conftest.$ac_objext; then :
2735   ac_retval=0
2736 else
2737   $as_echo "$as_me: failed program was:" >&5
2738 sed 's/^/| /' conftest.$ac_ext >&5
2739
2740         ac_retval=1
2741 fi
2742   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743   as_fn_set_status $ac_retval
2744
2745 } # ac_fn_cxx_try_compile
2746
2747 # ac_fn_c_try_cpp LINENO
2748 # ----------------------
2749 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2750 ac_fn_c_try_cpp ()
2751 {
2752   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753   if { { ac_try="$ac_cpp conftest.$ac_ext"
2754 case "(($ac_try" in
2755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756   *) ac_try_echo=$ac_try;;
2757 esac
2758 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2759 $as_echo "$ac_try_echo"; } >&5
2760   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2761   ac_status=$?
2762   if test -s conftest.err; then
2763     grep -v '^ *+' conftest.err >conftest.er1
2764     cat conftest.er1 >&5
2765     mv -f conftest.er1 conftest.err
2766   fi
2767   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2768   test $ac_status = 0; } > conftest.i && {
2769          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2770          test ! -s conftest.err
2771        }; then :
2772   ac_retval=0
2773 else
2774   $as_echo "$as_me: failed program was:" >&5
2775 sed 's/^/| /' conftest.$ac_ext >&5
2776
2777     ac_retval=1
2778 fi
2779   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2780   as_fn_set_status $ac_retval
2781
2782 } # ac_fn_c_try_cpp
2783
2784 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2785 # -------------------------------------------------------
2786 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2787 # the include files in INCLUDES and setting the cache variable VAR
2788 # accordingly.
2789 ac_fn_c_check_header_mongrel ()
2790 {
2791   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2792   if eval \${$3+:} false; then :
2793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2794 $as_echo_n "checking for $2... " >&6; }
2795 if eval \${$3+:} false; then :
2796   $as_echo_n "(cached) " >&6
2797 fi
2798 eval ac_res=\$$3
2799                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2800 $as_echo "$ac_res" >&6; }
2801 else
2802   # Is the header compilable?
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2804 $as_echo_n "checking $2 usability... " >&6; }
2805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806 /* end confdefs.h.  */
2807 $4
2808 #include <$2>
2809 _ACEOF
2810 if ac_fn_c_try_compile "$LINENO"; then :
2811   ac_header_compiler=yes
2812 else
2813   ac_header_compiler=no
2814 fi
2815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2817 $as_echo "$ac_header_compiler" >&6; }
2818
2819 # Is the header present?
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2821 $as_echo_n "checking $2 presence... " >&6; }
2822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823 /* end confdefs.h.  */
2824 #include <$2>
2825 _ACEOF
2826 if ac_fn_c_try_cpp "$LINENO"; then :
2827   ac_header_preproc=yes
2828 else
2829   ac_header_preproc=no
2830 fi
2831 rm -f conftest.err conftest.i conftest.$ac_ext
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2833 $as_echo "$ac_header_preproc" >&6; }
2834
2835 # So?  What about this header?
2836 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2837   yes:no: )
2838     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2839 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2840     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2841 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2842     ;;
2843   no:yes:* )
2844     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2845 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2846     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2847 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2848     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2849 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2850     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2851 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2852     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2853 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2854 ( $as_echo "## -------------------------------- ##
2855 ## Report this to bug-bison@gnu.org ##
2856 ## -------------------------------- ##"
2857      ) | sed "s/^/$as_me: WARNING:     /" >&2
2858     ;;
2859 esac
2860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2861 $as_echo_n "checking for $2... " >&6; }
2862 if eval \${$3+:} false; then :
2863   $as_echo_n "(cached) " >&6
2864 else
2865   eval "$3=\$ac_header_compiler"
2866 fi
2867 eval ac_res=\$$3
2868                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2869 $as_echo "$ac_res" >&6; }
2870 fi
2871   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2872
2873 } # ac_fn_c_check_header_mongrel
2874
2875 # ac_fn_c_try_run LINENO
2876 # ----------------------
2877 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2878 # that executables *can* be run.
2879 ac_fn_c_try_run ()
2880 {
2881   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882   if { { ac_try="$ac_link"
2883 case "(($ac_try" in
2884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2885   *) ac_try_echo=$ac_try;;
2886 esac
2887 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2888 $as_echo "$ac_try_echo"; } >&5
2889   (eval "$ac_link") 2>&5
2890   ac_status=$?
2891   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2892   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2893   { { case "(($ac_try" in
2894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895   *) ac_try_echo=$ac_try;;
2896 esac
2897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2898 $as_echo "$ac_try_echo"; } >&5
2899   (eval "$ac_try") 2>&5
2900   ac_status=$?
2901   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2902   test $ac_status = 0; }; }; then :
2903   ac_retval=0
2904 else
2905   $as_echo "$as_me: program exited with status $ac_status" >&5
2906        $as_echo "$as_me: failed program was:" >&5
2907 sed 's/^/| /' conftest.$ac_ext >&5
2908
2909        ac_retval=$ac_status
2910 fi
2911   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2912   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2913   as_fn_set_status $ac_retval
2914
2915 } # ac_fn_c_try_run
2916
2917 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2918 # -------------------------------------------------------
2919 # Tests whether HEADER exists and can be compiled using the include files in
2920 # INCLUDES, setting the cache variable VAR accordingly.
2921 ac_fn_c_check_header_compile ()
2922 {
2923   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2925 $as_echo_n "checking for $2... " >&6; }
2926 if eval \${$3+:} false; then :
2927   $as_echo_n "(cached) " >&6
2928 else
2929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2930 /* end confdefs.h.  */
2931 $4
2932 #include <$2>
2933 _ACEOF
2934 if ac_fn_c_try_compile "$LINENO"; then :
2935   eval "$3=yes"
2936 else
2937   eval "$3=no"
2938 fi
2939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2940 fi
2941 eval ac_res=\$$3
2942                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2943 $as_echo "$ac_res" >&6; }
2944   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2945
2946 } # ac_fn_c_check_header_compile
2947
2948 # ac_fn_c_try_link LINENO
2949 # -----------------------
2950 # Try to link conftest.$ac_ext, and return whether this succeeded.
2951 ac_fn_c_try_link ()
2952 {
2953   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2954   rm -f conftest.$ac_objext conftest$ac_exeext
2955   if { { ac_try="$ac_link"
2956 case "(($ac_try" in
2957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2958   *) ac_try_echo=$ac_try;;
2959 esac
2960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2961 $as_echo "$ac_try_echo"; } >&5
2962   (eval "$ac_link") 2>conftest.err
2963   ac_status=$?
2964   if test -s conftest.err; then
2965     grep -v '^ *+' conftest.err >conftest.er1
2966     cat conftest.er1 >&5
2967     mv -f conftest.er1 conftest.err
2968   fi
2969   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2970   test $ac_status = 0; } && {
2971          test -z "$ac_c_werror_flag" ||
2972          test ! -s conftest.err
2973        } && test -s conftest$ac_exeext && {
2974          test "$cross_compiling" = yes ||
2975          test -x conftest$ac_exeext
2976        }; then :
2977   ac_retval=0
2978 else
2979   $as_echo "$as_me: failed program was:" >&5
2980 sed 's/^/| /' conftest.$ac_ext >&5
2981
2982         ac_retval=1
2983 fi
2984   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2985   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2986   # interfere with the next link command; also delete a directory that is
2987   # left behind by Apple's compiler.  We do this before executing the actions.
2988   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2989   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990   as_fn_set_status $ac_retval
2991
2992 } # ac_fn_c_try_link
2993
2994 # ac_fn_cxx_try_link LINENO
2995 # -------------------------
2996 # Try to link conftest.$ac_ext, and return whether this succeeded.
2997 ac_fn_cxx_try_link ()
2998 {
2999   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3000   rm -f conftest.$ac_objext conftest$ac_exeext
3001   if { { ac_try="$ac_link"
3002 case "(($ac_try" in
3003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3004   *) ac_try_echo=$ac_try;;
3005 esac
3006 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3007 $as_echo "$ac_try_echo"; } >&5
3008   (eval "$ac_link") 2>conftest.err
3009   ac_status=$?
3010   if test -s conftest.err; then
3011     grep -v '^ *+' conftest.err >conftest.er1
3012     cat conftest.er1 >&5
3013     mv -f conftest.er1 conftest.err
3014   fi
3015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3016   test $ac_status = 0; } && {
3017          test -z "$ac_cxx_werror_flag" ||
3018          test ! -s conftest.err
3019        } && test -s conftest$ac_exeext && {
3020          test "$cross_compiling" = yes ||
3021          test -x conftest$ac_exeext
3022        }; then :
3023   ac_retval=0
3024 else
3025   $as_echo "$as_me: failed program was:" >&5
3026 sed 's/^/| /' conftest.$ac_ext >&5
3027
3028         ac_retval=1
3029 fi
3030   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3031   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3032   # interfere with the next link command; also delete a directory that is
3033   # left behind by Apple's compiler.  We do this before executing the actions.
3034   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3035   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3036   as_fn_set_status $ac_retval
3037
3038 } # ac_fn_cxx_try_link
3039
3040 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3041 # -------------------------------------------
3042 # Tests whether TYPE exists after having included INCLUDES, setting cache
3043 # variable VAR accordingly.
3044 ac_fn_c_check_type ()
3045 {
3046   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3048 $as_echo_n "checking for $2... " >&6; }
3049 if eval \${$3+:} false; then :
3050   $as_echo_n "(cached) " >&6
3051 else
3052   eval "$3=no"
3053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3054 /* end confdefs.h.  */
3055 $4
3056 int
3057 main ()
3058 {
3059 if (sizeof ($2))
3060          return 0;
3061   ;
3062   return 0;
3063 }
3064 _ACEOF
3065 if ac_fn_c_try_compile "$LINENO"; then :
3066   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3067 /* end confdefs.h.  */
3068 $4
3069 int
3070 main ()
3071 {
3072 if (sizeof (($2)))
3073             return 0;
3074   ;
3075   return 0;
3076 }
3077 _ACEOF
3078 if ac_fn_c_try_compile "$LINENO"; then :
3079
3080 else
3081   eval "$3=yes"
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=\$$3
3088                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3089 $as_echo "$ac_res" >&6; }
3090   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3091
3092 } # ac_fn_c_check_type
3093
3094 # ac_fn_c_check_func LINENO FUNC VAR
3095 # ----------------------------------
3096 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3097 ac_fn_c_check_func ()
3098 {
3099   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3101 $as_echo_n "checking for $2... " >&6; }
3102 if eval \${$3+:} false; then :
3103   $as_echo_n "(cached) " >&6
3104 else
3105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3106 /* end confdefs.h.  */
3107 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3108    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3109 #define $2 innocuous_$2
3110
3111 /* System header to define __stub macros and hopefully few prototypes,
3112     which can conflict with char $2 (); below.
3113     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3114     <limits.h> exists even on freestanding compilers.  */
3115
3116 #ifdef __STDC__
3117 # include <limits.h>
3118 #else
3119 # include <assert.h>
3120 #endif
3121
3122 #undef $2
3123
3124 /* Override any GCC internal prototype to avoid an error.
3125    Use char because int might match the return type of a GCC
3126    builtin and then its argument prototype would still apply.  */
3127 #ifdef __cplusplus
3128 extern "C"
3129 #endif
3130 char $2 ();
3131 /* The GNU C library defines this for functions which it implements
3132     to always fail with ENOSYS.  Some functions are actually named
3133     something starting with __ and the normal name is an alias.  */
3134 #if defined __stub_$2 || defined __stub___$2
3135 choke me
3136 #endif
3137
3138 int
3139 main ()
3140 {
3141 return $2 ();
3142   ;
3143   return 0;
3144 }
3145 _ACEOF
3146 if ac_fn_c_try_link "$LINENO"; then :
3147   eval "$3=yes"
3148 else
3149   eval "$3=no"
3150 fi
3151 rm -f core conftest.err conftest.$ac_objext \
3152     conftest$ac_exeext conftest.$ac_ext
3153 fi
3154 eval ac_res=\$$3
3155                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3156 $as_echo "$ac_res" >&6; }
3157   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3158
3159 } # ac_fn_c_check_func
3160
3161 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3162 # --------------------------------------------
3163 # Tries to find the compile-time value of EXPR in a program that includes
3164 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3165 # computed
3166 ac_fn_c_compute_int ()
3167 {
3168   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3169   if test "$cross_compiling" = yes; then
3170     # Depending upon the size, compute the lo and hi bounds.
3171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3172 /* end confdefs.h.  */
3173 $4
3174 int
3175 main ()
3176 {
3177 static int test_array [1 - 2 * !(($2) >= 0)];
3178 test_array [0] = 0;
3179 return test_array [0];
3180
3181   ;
3182   return 0;
3183 }
3184 _ACEOF
3185 if ac_fn_c_try_compile "$LINENO"; then :
3186   ac_lo=0 ac_mid=0
3187   while :; do
3188     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3189 /* end confdefs.h.  */
3190 $4
3191 int
3192 main ()
3193 {
3194 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3195 test_array [0] = 0;
3196 return test_array [0];
3197
3198   ;
3199   return 0;
3200 }
3201 _ACEOF
3202 if ac_fn_c_try_compile "$LINENO"; then :
3203   ac_hi=$ac_mid; break
3204 else
3205   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3206                         if test $ac_lo -le $ac_mid; then
3207                           ac_lo= ac_hi=
3208                           break
3209                         fi
3210                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3211 fi
3212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3213   done
3214 else
3215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3216 /* end confdefs.h.  */
3217 $4
3218 int
3219 main ()
3220 {
3221 static int test_array [1 - 2 * !(($2) < 0)];
3222 test_array [0] = 0;
3223 return test_array [0];
3224
3225   ;
3226   return 0;
3227 }
3228 _ACEOF
3229 if ac_fn_c_try_compile "$LINENO"; then :
3230   ac_hi=-1 ac_mid=-1
3231   while :; do
3232     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3233 /* end confdefs.h.  */
3234 $4
3235 int
3236 main ()
3237 {
3238 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3239 test_array [0] = 0;
3240 return test_array [0];
3241
3242   ;
3243   return 0;
3244 }
3245 _ACEOF
3246 if ac_fn_c_try_compile "$LINENO"; then :
3247   ac_lo=$ac_mid; break
3248 else
3249   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3250                         if test $ac_mid -le $ac_hi; then
3251                           ac_lo= ac_hi=
3252                           break
3253                         fi
3254                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3255 fi
3256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257   done
3258 else
3259   ac_lo= ac_hi=
3260 fi
3261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3262 fi
3263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3264 # Binary search between lo and hi bounds.
3265 while test "x$ac_lo" != "x$ac_hi"; do
3266   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3268 /* end confdefs.h.  */
3269 $4
3270 int
3271 main ()
3272 {
3273 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3274 test_array [0] = 0;
3275 return test_array [0];
3276
3277   ;
3278   return 0;
3279 }
3280 _ACEOF
3281 if ac_fn_c_try_compile "$LINENO"; then :
3282   ac_hi=$ac_mid
3283 else
3284   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3285 fi
3286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3287 done
3288 case $ac_lo in #((
3289 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3290 '') ac_retval=1 ;;
3291 esac
3292   else
3293     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h.  */
3295 $4
3296 static long int longval () { return $2; }
3297 static unsigned long int ulongval () { return $2; }
3298 #include <stdio.h>
3299 #include <stdlib.h>
3300 int
3301 main ()
3302 {
3303
3304   FILE *f = fopen ("conftest.val", "w");
3305   if (! f)
3306     return 1;
3307   if (($2) < 0)
3308     {
3309       long int i = longval ();
3310       if (i != ($2))
3311         return 1;
3312       fprintf (f, "%ld", i);
3313     }
3314   else
3315     {
3316       unsigned long int i = ulongval ();
3317       if (i != ($2))
3318         return 1;
3319       fprintf (f, "%lu", i);
3320     }
3321   /* Do not output a trailing newline, as this causes \r\n confusion
3322      on some platforms.  */
3323   return ferror (f) || fclose (f) != 0;
3324
3325   ;
3326   return 0;
3327 }
3328 _ACEOF
3329 if ac_fn_c_try_run "$LINENO"; then :
3330   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3331 else
3332   ac_retval=1
3333 fi
3334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3335   conftest.$ac_objext conftest.beam conftest.$ac_ext
3336 rm -f conftest.val
3337
3338   fi
3339   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3340   as_fn_set_status $ac_retval
3341
3342 } # ac_fn_c_compute_int
3343
3344 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3345 # ---------------------------------------------
3346 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3347 # accordingly.
3348 ac_fn_c_check_decl ()
3349 {
3350   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3351   as_decl_name=`echo $2|sed 's/ *(.*//'`
3352   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3353   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3354 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3355 if eval \${$3+:} false; then :
3356   $as_echo_n "(cached) " >&6
3357 else
3358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3359 /* end confdefs.h.  */
3360 $4
3361 int
3362 main ()
3363 {
3364 #ifndef $as_decl_name
3365 #ifdef __cplusplus
3366   (void) $as_decl_use;
3367 #else
3368   (void) $as_decl_name;
3369 #endif
3370 #endif
3371
3372   ;
3373   return 0;
3374 }
3375 _ACEOF
3376 if ac_fn_c_try_compile "$LINENO"; then :
3377   eval "$3=yes"
3378 else
3379   eval "$3=no"
3380 fi
3381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3382 fi
3383 eval ac_res=\$$3
3384                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3385 $as_echo "$ac_res" >&6; }
3386   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3387
3388 } # ac_fn_c_check_decl
3389
3390 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3391 # ----------------------------------------------------
3392 # Tries to find if the field MEMBER exists in type AGGR, after including
3393 # INCLUDES, setting cache variable VAR accordingly.
3394 ac_fn_c_check_member ()
3395 {
3396   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3398 $as_echo_n "checking for $2.$3... " >&6; }
3399 if eval \${$4+:} false; then :
3400   $as_echo_n "(cached) " >&6
3401 else
3402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3403 /* end confdefs.h.  */
3404 $5
3405 int
3406 main ()
3407 {
3408 static $2 ac_aggr;
3409 if (ac_aggr.$3)
3410 return 0;
3411   ;
3412   return 0;
3413 }
3414 _ACEOF
3415 if ac_fn_c_try_compile "$LINENO"; then :
3416   eval "$4=yes"
3417 else
3418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3419 /* end confdefs.h.  */
3420 $5
3421 int
3422 main ()
3423 {
3424 static $2 ac_aggr;
3425 if (sizeof ac_aggr.$3)
3426 return 0;
3427   ;
3428   return 0;
3429 }
3430 _ACEOF
3431 if ac_fn_c_try_compile "$LINENO"; then :
3432   eval "$4=yes"
3433 else
3434   eval "$4=no"
3435 fi
3436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3437 fi
3438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3439 fi
3440 eval ac_res=\$$4
3441                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3442 $as_echo "$ac_res" >&6; }
3443   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3444
3445 } # ac_fn_c_check_member
3446 cat >config.log <<_ACEOF
3447 This file contains any messages produced by compilers while
3448 running configure, to aid debugging if configure makes a mistake.
3449
3450 It was created by GNU Bison $as_me 3.0.5, which was
3451 generated by GNU Autoconf 2.69.  Invocation command line was
3452
3453   $ $0 $@
3454
3455 _ACEOF
3456 exec 5>>config.log
3457 {
3458 cat <<_ASUNAME
3459 ## --------- ##
3460 ## Platform. ##
3461 ## --------- ##
3462
3463 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3464 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3465 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3466 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3467 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3468
3469 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3470 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3471
3472 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3473 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3474 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3475 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3476 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3477 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3478 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3479
3480 _ASUNAME
3481
3482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3483 for as_dir in $PATH
3484 do
3485   IFS=$as_save_IFS
3486   test -z "$as_dir" && as_dir=.
3487     $as_echo "PATH: $as_dir"
3488   done
3489 IFS=$as_save_IFS
3490
3491 } >&5
3492
3493 cat >&5 <<_ACEOF
3494
3495
3496 ## ----------- ##
3497 ## Core tests. ##
3498 ## ----------- ##
3499
3500 _ACEOF
3501
3502
3503 # Keep a trace of the command line.
3504 # Strip out --no-create and --no-recursion so they do not pile up.
3505 # Strip out --silent because we don't want to record it for future runs.
3506 # Also quote any args containing shell meta-characters.
3507 # Make two passes to allow for proper duplicate-argument suppression.
3508 ac_configure_args=
3509 ac_configure_args0=
3510 ac_configure_args1=
3511 ac_must_keep_next=false
3512 for ac_pass in 1 2
3513 do
3514   for ac_arg
3515   do
3516     case $ac_arg in
3517     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3518     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3519     | -silent | --silent | --silen | --sile | --sil)
3520       continue ;;
3521     *\'*)
3522       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3523     esac
3524     case $ac_pass in
3525     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3526     2)
3527       as_fn_append ac_configure_args1 " '$ac_arg'"
3528       if test $ac_must_keep_next = true; then
3529         ac_must_keep_next=false # Got value, back to normal.
3530       else
3531         case $ac_arg in
3532           *=* | --config-cache | -C | -disable-* | --disable-* \
3533           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3534           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3535           | -with-* | --with-* | -without-* | --without-* | --x)
3536             case "$ac_configure_args0 " in
3537               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3538             esac
3539             ;;
3540           -* ) ac_must_keep_next=true ;;
3541         esac
3542       fi
3543       as_fn_append ac_configure_args " '$ac_arg'"
3544       ;;
3545     esac
3546   done
3547 done
3548 { ac_configure_args0=; unset ac_configure_args0;}
3549 { ac_configure_args1=; unset ac_configure_args1;}
3550
3551 # When interrupted or exit'd, cleanup temporary files, and complete
3552 # config.log.  We remove comments because anyway the quotes in there
3553 # would cause problems or look ugly.
3554 # WARNING: Use '\'' to represent an apostrophe within the trap.
3555 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3556 trap 'exit_status=$?
3557   # Save into config.log some information that might help in debugging.
3558   {
3559     echo
3560
3561     $as_echo "## ---------------- ##
3562 ## Cache variables. ##
3563 ## ---------------- ##"
3564     echo
3565     # The following way of writing the cache mishandles newlines in values,
3566 (
3567   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3568     eval ac_val=\$$ac_var
3569     case $ac_val in #(
3570     *${as_nl}*)
3571       case $ac_var in #(
3572       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3573 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3574       esac
3575       case $ac_var in #(
3576       _ | IFS | as_nl) ;; #(
3577       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3578       *) { eval $ac_var=; unset $ac_var;} ;;
3579       esac ;;
3580     esac
3581   done
3582   (set) 2>&1 |
3583     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3584     *${as_nl}ac_space=\ *)
3585       sed -n \
3586         "s/'\''/'\''\\\\'\'''\''/g;
3587           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3588       ;; #(
3589     *)
3590       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3591       ;;
3592     esac |
3593     sort
3594 )
3595     echo
3596
3597     $as_echo "## ----------------- ##
3598 ## Output variables. ##
3599 ## ----------------- ##"
3600     echo
3601     for ac_var in $ac_subst_vars
3602     do
3603       eval ac_val=\$$ac_var
3604       case $ac_val in
3605       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3606       esac
3607       $as_echo "$ac_var='\''$ac_val'\''"
3608     done | sort
3609     echo
3610
3611     if test -n "$ac_subst_files"; then
3612       $as_echo "## ------------------- ##
3613 ## File substitutions. ##
3614 ## ------------------- ##"
3615       echo
3616       for ac_var in $ac_subst_files
3617       do
3618         eval ac_val=\$$ac_var
3619         case $ac_val in
3620         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3621         esac
3622         $as_echo "$ac_var='\''$ac_val'\''"
3623       done | sort
3624       echo
3625     fi
3626
3627     if test -s confdefs.h; then
3628       $as_echo "## ----------- ##
3629 ## confdefs.h. ##
3630 ## ----------- ##"
3631       echo
3632       cat confdefs.h
3633       echo
3634     fi
3635     test "$ac_signal" != 0 &&
3636       $as_echo "$as_me: caught signal $ac_signal"
3637     $as_echo "$as_me: exit $exit_status"
3638   } >&5
3639   rm -f core *.core core.conftest.* &&
3640     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3641     exit $exit_status
3642 ' 0
3643 for ac_signal in 1 2 13 15; do
3644   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3645 done
3646 ac_signal=0
3647
3648 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3649 rm -f -r conftest* confdefs.h
3650
3651 $as_echo "/* confdefs.h */" > confdefs.h
3652
3653 # Predefined preprocessor variables.
3654
3655 cat >>confdefs.h <<_ACEOF
3656 #define PACKAGE_NAME "$PACKAGE_NAME"
3657 _ACEOF
3658
3659 cat >>confdefs.h <<_ACEOF
3660 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3661 _ACEOF
3662
3663 cat >>confdefs.h <<_ACEOF
3664 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3665 _ACEOF
3666
3667 cat >>confdefs.h <<_ACEOF
3668 #define PACKAGE_STRING "$PACKAGE_STRING"
3669 _ACEOF
3670
3671 cat >>confdefs.h <<_ACEOF
3672 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3673 _ACEOF
3674
3675 cat >>confdefs.h <<_ACEOF
3676 #define PACKAGE_URL "$PACKAGE_URL"
3677 _ACEOF
3678
3679
3680 # Let the site file select an alternate cache file if it wants to.
3681 # Prefer an explicitly selected file to automatically selected ones.
3682 ac_site_file1=NONE
3683 ac_site_file2=NONE
3684 if test -n "$CONFIG_SITE"; then
3685   # We do not want a PATH search for config.site.
3686   case $CONFIG_SITE in #((
3687     -*)  ac_site_file1=./$CONFIG_SITE;;
3688     */*) ac_site_file1=$CONFIG_SITE;;
3689     *)   ac_site_file1=./$CONFIG_SITE;;
3690   esac
3691 elif test "x$prefix" != xNONE; then
3692   ac_site_file1=$prefix/share/config.site
3693   ac_site_file2=$prefix/etc/config.site
3694 else
3695   ac_site_file1=$ac_default_prefix/share/config.site
3696   ac_site_file2=$ac_default_prefix/etc/config.site
3697 fi
3698 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3699 do
3700   test "x$ac_site_file" = xNONE && continue
3701   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3702     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3703 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3704     sed 's/^/| /' "$ac_site_file" >&5
3705     . "$ac_site_file" \
3706       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3708 as_fn_error $? "failed to load site script $ac_site_file
3709 See \`config.log' for more details" "$LINENO" 5; }
3710   fi
3711 done
3712
3713 if test -r "$cache_file"; then
3714   # Some versions of bash will fail to source /dev/null (special files
3715   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3716   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3717     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3718 $as_echo "$as_me: loading cache $cache_file" >&6;}
3719     case $cache_file in
3720       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3721       *)                      . "./$cache_file";;
3722     esac
3723   fi
3724 else
3725   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3726 $as_echo "$as_me: creating cache $cache_file" >&6;}
3727   >$cache_file
3728 fi
3729
3730 as_fn_append ac_header_list " locale.h"
3731 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3732 as_fn_append ac_header_list " sys/socket.h"
3733 as_fn_append ac_header_list " unistd.h"
3734 as_fn_append ac_func_list " fcntl"
3735 as_fn_append ac_func_list " symlink"
3736 as_fn_append ac_header_list " stdio_ext.h"
3737 as_fn_append ac_func_list " vasnprintf"
3738 as_fn_append ac_header_list " features.h"
3739 as_fn_append ac_func_list " snprintf"
3740 as_fn_append ac_func_list " __fseterr"
3741 as_fn_append ac_header_list " sys/stat.h"
3742 as_fn_append ac_func_list " getdtablesize"
3743 gl_getopt_required=GNU
3744 as_fn_append ac_header_list " getopt.h"
3745 as_fn_append ac_header_list " sys/cdefs.h"
3746 as_fn_append ac_func_list " getprogname"
3747 as_fn_append ac_func_list " getexecname"
3748 as_fn_append ac_header_list " limits.h"
3749 as_fn_append ac_header_list " wchar.h"
3750 as_fn_append ac_header_list " stdint.h"
3751 as_fn_append ac_header_list " inttypes.h"
3752 as_fn_append ac_func_list " lstat"
3753 as_fn_append ac_header_list " math.h"
3754 as_fn_append ac_func_list " mbsinit"
3755 as_fn_append ac_func_list " mbrtowc"
3756 as_fn_append ac_func_list " isascii"
3757 as_fn_append ac_header_list " sys/mman.h"
3758 as_fn_append ac_func_list " mprotect"
3759 as_fn_append ac_func_list " obstack_printf"
3760 as_fn_append ac_header_list " sys/param.h"
3761 as_fn_append ac_func_list " strerror_r"
3762 as_fn_append ac_func_list " __xpg_strerror_r"
3763 as_fn_append ac_func_list " pipe2"
3764 gl_printf_safe=yes
3765 as_fn_append ac_func_list " sigaction"
3766 as_fn_append ac_func_list " sigaltstack"
3767 as_fn_append ac_func_list " siginterrupt"
3768 as_fn_append ac_header_list " spawn.h"
3769 as_fn_append ac_header_list " sys/time.h"
3770 as_fn_append ac_func_list " strdup"
3771 as_fn_append ac_func_list " catgets"
3772 as_fn_append ac_func_list " strndup"
3773 as_fn_append ac_header_list " sys/wait.h"
3774 as_fn_append ac_func_list " pipe"
3775 as_fn_append ac_header_list " crtdefs.h"
3776 as_fn_append ac_func_list " iswcntrl"
3777 as_fn_append ac_header_list " wctype.h"
3778 as_fn_append ac_func_list " wcwidth"
3779 as_fn_append ac_func_list " setlocale"
3780 gt_needs="$gt_needs need-ngettext"
3781 # Check that the precious variables saved in the cache have kept the same
3782 # value.
3783 ac_cache_corrupted=false
3784 for ac_var in $ac_precious_vars; do
3785   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3786   eval ac_new_set=\$ac_env_${ac_var}_set
3787   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3788   eval ac_new_val=\$ac_env_${ac_var}_value
3789   case $ac_old_set,$ac_new_set in
3790     set,)
3791       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3792 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3793       ac_cache_corrupted=: ;;
3794     ,set)
3795       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3796 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3797       ac_cache_corrupted=: ;;
3798     ,);;
3799     *)
3800       if test "x$ac_old_val" != "x$ac_new_val"; then
3801         # differences in whitespace do not lead to failure.
3802         ac_old_val_w=`echo x $ac_old_val`
3803         ac_new_val_w=`echo x $ac_new_val`
3804         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3805           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3806 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3807           ac_cache_corrupted=:
3808         else
3809           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3810 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3811           eval $ac_var=\$ac_old_val
3812         fi
3813         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3814 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3815         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3816 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3817       fi;;
3818   esac
3819   # Pass precious variables to config.status.
3820   if test "$ac_new_set" = set; then
3821     case $ac_new_val in
3822     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3823     *) ac_arg=$ac_var=$ac_new_val ;;
3824     esac
3825     case " $ac_configure_args " in
3826       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3827       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3828     esac
3829   fi
3830 done
3831 if $ac_cache_corrupted; then
3832   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3833 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3834   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3835 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3836   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3837 fi
3838 ## -------------------- ##
3839 ## Main body of script. ##
3840 ## -------------------- ##
3841
3842 ac_ext=c
3843 ac_cpp='$CPP $CPPFLAGS'
3844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3847
3848
3849 PACKAGE_COPYRIGHT_YEAR=2018
3850
3851
3852 cat >>confdefs.h <<_ACEOF
3853 #define PACKAGE_COPYRIGHT_YEAR $PACKAGE_COPYRIGHT_YEAR
3854 _ACEOF
3855
3856
3857 ac_aux_dir=
3858 for ac_dir in build-aux "$srcdir"/build-aux; do
3859   if test -f "$ac_dir/install-sh"; then
3860     ac_aux_dir=$ac_dir
3861     ac_install_sh="$ac_aux_dir/install-sh -c"
3862     break
3863   elif test -f "$ac_dir/install.sh"; then
3864     ac_aux_dir=$ac_dir
3865     ac_install_sh="$ac_aux_dir/install.sh -c"
3866     break
3867   elif test -f "$ac_dir/shtool"; then
3868     ac_aux_dir=$ac_dir
3869     ac_install_sh="$ac_aux_dir/shtool install -c"
3870     break
3871   fi
3872 done
3873 if test -z "$ac_aux_dir"; then
3874   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3875 fi
3876
3877 # These three variables are undocumented and unsupported,
3878 # and are intended to be withdrawn in a future Autoconf release.
3879 # They can cause serious problems if a builder's source tree is in a directory
3880 # whose full name contains unusual characters.
3881 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3882 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3883 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3884
3885
3886
3887
3888 # We use Automake 1.14's %D% and %C%.
3889 #
3890 # We want gnits strictness only when rolling a stable release.  For
3891 # release candidates, we use version strings like 2.4.3_rc1, but gnits
3892 # doesn't like that, so we let the underscore disable gnits.  Between
3893 # releases, we want to be able run make dist without being required to
3894 # add a bogus NEWS entry.  In that case, the version string
3895 # automatically contains a dash, which we also let disable gnits.
3896 am__api_version='1.15'
3897
3898 # Find a good install program.  We prefer a C program (faster),
3899 # so one script is as good as another.  But avoid the broken or
3900 # incompatible versions:
3901 # SysV /etc/install, /usr/sbin/install
3902 # SunOS /usr/etc/install
3903 # IRIX /sbin/install
3904 # AIX /bin/install
3905 # AmigaOS /C/install, which installs bootblocks on floppy discs
3906 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3907 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3908 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3909 # OS/2's system install, which has a completely different semantic
3910 # ./install, which can be erroneously created by make from ./install.sh.
3911 # Reject install programs that cannot install multiple files.
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3913 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3914 if test -z "$INSTALL"; then
3915 if ${ac_cv_path_install+:} false; then :
3916   $as_echo_n "(cached) " >&6
3917 else
3918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919 for as_dir in $PATH
3920 do
3921   IFS=$as_save_IFS
3922   test -z "$as_dir" && as_dir=.
3923     # Account for people who put trailing slashes in PATH elements.
3924 case $as_dir/ in #((
3925   ./ | .// | /[cC]/* | \
3926   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3927   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3928   /usr/ucb/* ) ;;
3929   *)
3930     # OSF1 and SCO ODT 3.0 have their own names for install.
3931     # Don't use installbsd from OSF since it installs stuff as root
3932     # by default.
3933     for ac_prog in ginstall scoinst install; do
3934       for ac_exec_ext in '' $ac_executable_extensions; do
3935         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3936           if test $ac_prog = install &&
3937             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3938             # AIX install.  It has an incompatible calling convention.
3939             :
3940           elif test $ac_prog = install &&
3941             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3942             # program-specific install script used by HP pwplus--don't use.
3943             :
3944           else
3945             rm -rf conftest.one conftest.two conftest.dir
3946             echo one > conftest.one
3947             echo two > conftest.two
3948             mkdir conftest.dir
3949             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3950               test -s conftest.one && test -s conftest.two &&
3951               test -s conftest.dir/conftest.one &&
3952               test -s conftest.dir/conftest.two
3953             then
3954               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3955               break 3
3956             fi
3957           fi
3958         fi
3959       done
3960     done
3961     ;;
3962 esac
3963
3964   done
3965 IFS=$as_save_IFS
3966
3967 rm -rf conftest.one conftest.two conftest.dir
3968
3969 fi
3970   if test "${ac_cv_path_install+set}" = set; then
3971     INSTALL=$ac_cv_path_install
3972   else
3973     # As a last resort, use the slow shell script.  Don't cache a
3974     # value for INSTALL within a source directory, because that will
3975     # break other packages using the cache if that directory is
3976     # removed, or if the value is a relative name.
3977     INSTALL=$ac_install_sh
3978   fi
3979 fi
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3981 $as_echo "$INSTALL" >&6; }
3982
3983 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3984 # It thinks the first close brace ends the variable substitution.
3985 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3986
3987 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3988
3989 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3990
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3992 $as_echo_n "checking whether build environment is sane... " >&6; }
3993 # Reject unsafe characters in $srcdir or the absolute working directory
3994 # name.  Accept space and tab only in the latter.
3995 am_lf='
3996 '
3997 case `pwd` in
3998   *[\\\"\#\$\&\'\`$am_lf]*)
3999     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4000 esac
4001 case $srcdir in
4002   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
4003     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4004 esac
4005
4006 # Do 'set' in a subshell so we don't clobber the current shell's
4007 # arguments.  Must try -L first in case configure is actually a
4008 # symlink; some systems play weird games with the mod time of symlinks
4009 # (eg FreeBSD returns the mod time of the symlink's containing
4010 # directory).
4011 if (
4012    am_has_slept=no
4013    for am_try in 1 2; do
4014      echo "timestamp, slept: $am_has_slept" > conftest.file
4015      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4016      if test "$*" = "X"; then
4017         # -L didn't work.
4018         set X `ls -t "$srcdir/configure" conftest.file`
4019      fi
4020      if test "$*" != "X $srcdir/configure conftest.file" \
4021         && test "$*" != "X conftest.file $srcdir/configure"; then
4022
4023         # If neither matched, then we have a broken ls.  This can happen
4024         # if, for instance, CONFIG_SHELL is bash and it inherits a
4025         # broken ls alias from the environment.  This has actually
4026         # happened.  Such a system could not be considered "sane".
4027         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4028   alias in your environment" "$LINENO" 5
4029      fi
4030      if test "$2" = conftest.file || test $am_try -eq 2; then
4031        break
4032      fi
4033      # Just in case.
4034      sleep 1
4035      am_has_slept=yes
4036    done
4037    test "$2" = conftest.file
4038    )
4039 then
4040    # Ok.
4041    :
4042 else
4043    as_fn_error $? "newly created file is older than distributed files!
4044 Check your system clock" "$LINENO" 5
4045 fi
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4047 $as_echo "yes" >&6; }
4048 # If we didn't sleep, we still need to ensure time stamps of config.status and
4049 # generated files are strictly newer.
4050 am_sleep_pid=
4051 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4052   ( sleep 1 ) &
4053   am_sleep_pid=$!
4054 fi
4055
4056 rm -f conftest.file
4057
4058 test "$program_prefix" != NONE &&
4059   program_transform_name="s&^&$program_prefix&;$program_transform_name"
4060 # Use a double $ so make ignores it.
4061 test "$program_suffix" != NONE &&
4062   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4063 # Double any \ or $.
4064 # By default was `s,x,x', remove it if useless.
4065 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4066 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4067
4068 # Expand $ac_aux_dir to an absolute path.
4069 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4070
4071 if test x"${MISSING+set}" != xset; then
4072   case $am_aux_dir in
4073   *\ * | *\     *)
4074     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4075   *)
4076     MISSING="\${SHELL} $am_aux_dir/missing" ;;
4077   esac
4078 fi
4079 # Use eval to expand $SHELL
4080 if eval "$MISSING --is-lightweight"; then
4081   am_missing_run="$MISSING "
4082 else
4083   am_missing_run=
4084   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4085 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4086 fi
4087
4088 if test x"${install_sh+set}" != xset; then
4089   case $am_aux_dir in
4090   *\ * | *\     *)
4091     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4092   *)
4093     install_sh="\${SHELL} $am_aux_dir/install-sh"
4094   esac
4095 fi
4096
4097 # Installed binaries are usually stripped using 'strip' when the user
4098 # run "make install-strip".  However 'strip' might not be the right
4099 # tool to use in cross-compilation environments, therefore Automake
4100 # will honor the 'STRIP' environment variable to overrule this program.
4101 if test "$cross_compiling" != no; then
4102   if test -n "$ac_tool_prefix"; then
4103   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}strip; ac_word=$2
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4106 $as_echo_n "checking for $ac_word... " >&6; }
4107 if ${ac_cv_prog_STRIP+:} false; then :
4108   $as_echo_n "(cached) " >&6
4109 else
4110   if test -n "$STRIP"; then
4111   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4112 else
4113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4114 for as_dir in $PATH
4115 do
4116   IFS=$as_save_IFS
4117   test -z "$as_dir" && as_dir=.
4118     for ac_exec_ext in '' $ac_executable_extensions; do
4119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4120     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4122     break 2
4123   fi
4124 done
4125   done
4126 IFS=$as_save_IFS
4127
4128 fi
4129 fi
4130 STRIP=$ac_cv_prog_STRIP
4131 if test -n "$STRIP"; then
4132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4133 $as_echo "$STRIP" >&6; }
4134 else
4135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4136 $as_echo "no" >&6; }
4137 fi
4138
4139
4140 fi
4141 if test -z "$ac_cv_prog_STRIP"; then
4142   ac_ct_STRIP=$STRIP
4143   # Extract the first word of "strip", so it can be a program name with args.
4144 set dummy strip; ac_word=$2
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146 $as_echo_n "checking for $ac_word... " >&6; }
4147 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4148   $as_echo_n "(cached) " >&6
4149 else
4150   if test -n "$ac_ct_STRIP"; then
4151   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4152 else
4153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154 for as_dir in $PATH
4155 do
4156   IFS=$as_save_IFS
4157   test -z "$as_dir" && as_dir=.
4158     for ac_exec_ext in '' $ac_executable_extensions; do
4159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4160     ac_cv_prog_ac_ct_STRIP="strip"
4161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4162     break 2
4163   fi
4164 done
4165   done
4166 IFS=$as_save_IFS
4167
4168 fi
4169 fi
4170 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4171 if test -n "$ac_ct_STRIP"; then
4172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4173 $as_echo "$ac_ct_STRIP" >&6; }
4174 else
4175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176 $as_echo "no" >&6; }
4177 fi
4178
4179   if test "x$ac_ct_STRIP" = x; then
4180     STRIP=":"
4181   else
4182     case $cross_compiling:$ac_tool_warned in
4183 yes:)
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4185 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4186 ac_tool_warned=yes ;;
4187 esac
4188     STRIP=$ac_ct_STRIP
4189   fi
4190 else
4191   STRIP="$ac_cv_prog_STRIP"
4192 fi
4193
4194 fi
4195 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4196
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4198 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4199 if test -z "$MKDIR_P"; then
4200   if ${ac_cv_path_mkdir+:} false; then :
4201   $as_echo_n "(cached) " >&6
4202 else
4203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4204 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4205 do
4206   IFS=$as_save_IFS
4207   test -z "$as_dir" && as_dir=.
4208     for ac_prog in mkdir gmkdir; do
4209          for ac_exec_ext in '' $ac_executable_extensions; do
4210            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4211            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4212              'mkdir (GNU coreutils) '* | \
4213              'mkdir (coreutils) '* | \
4214              'mkdir (fileutils) '4.1*)
4215                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4216                break 3;;
4217            esac
4218          done
4219        done
4220   done
4221 IFS=$as_save_IFS
4222
4223 fi
4224
4225   test -d ./--version && rmdir ./--version
4226   if test "${ac_cv_path_mkdir+set}" = set; then
4227     MKDIR_P="$ac_cv_path_mkdir -p"
4228   else
4229     # As a last resort, use the slow shell script.  Don't cache a
4230     # value for MKDIR_P within a source directory, because that will
4231     # break other packages using the cache if that directory is
4232     # removed, or if the value is a relative name.
4233     MKDIR_P="$ac_install_sh -d"
4234   fi
4235 fi
4236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4237 $as_echo "$MKDIR_P" >&6; }
4238
4239 for ac_prog in gawk mawk nawk awk
4240 do
4241   # Extract the first word of "$ac_prog", so it can be a program name with args.
4242 set dummy $ac_prog; ac_word=$2
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4244 $as_echo_n "checking for $ac_word... " >&6; }
4245 if ${ac_cv_prog_AWK+:} false; then :
4246   $as_echo_n "(cached) " >&6
4247 else
4248   if test -n "$AWK"; then
4249   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4250 else
4251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4252 for as_dir in $PATH
4253 do
4254   IFS=$as_save_IFS
4255   test -z "$as_dir" && as_dir=.
4256     for ac_exec_ext in '' $ac_executable_extensions; do
4257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4258     ac_cv_prog_AWK="$ac_prog"
4259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4260     break 2
4261   fi
4262 done
4263   done
4264 IFS=$as_save_IFS
4265
4266 fi
4267 fi
4268 AWK=$ac_cv_prog_AWK
4269 if test -n "$AWK"; then
4270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4271 $as_echo "$AWK" >&6; }
4272 else
4273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274 $as_echo "no" >&6; }
4275 fi
4276
4277
4278   test -n "$AWK" && break
4279 done
4280
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4282 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4283 set x ${MAKE-make}
4284 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4285 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4286   $as_echo_n "(cached) " >&6
4287 else
4288   cat >conftest.make <<\_ACEOF
4289 SHELL = /bin/sh
4290 all:
4291         @echo '@@@%%%=$(MAKE)=@@@%%%'
4292 _ACEOF
4293 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4294 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4295   *@@@%%%=?*=@@@%%%*)
4296     eval ac_cv_prog_make_${ac_make}_set=yes;;
4297   *)
4298     eval ac_cv_prog_make_${ac_make}_set=no;;
4299 esac
4300 rm -f conftest.make
4301 fi
4302 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4304 $as_echo "yes" >&6; }
4305   SET_MAKE=
4306 else
4307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4308 $as_echo "no" >&6; }
4309   SET_MAKE="MAKE=${MAKE-make}"
4310 fi
4311
4312 rm -rf .tst 2>/dev/null
4313 mkdir .tst 2>/dev/null
4314 if test -d .tst; then
4315   am__leading_dot=.
4316 else
4317   am__leading_dot=_
4318 fi
4319 rmdir .tst 2>/dev/null
4320
4321 # Check whether --enable-silent-rules was given.
4322 if test "${enable_silent_rules+set}" = set; then :
4323   enableval=$enable_silent_rules;
4324 fi
4325
4326 case $enable_silent_rules in # (((
4327   yes) AM_DEFAULT_VERBOSITY=0;;
4328    no) AM_DEFAULT_VERBOSITY=1;;
4329     *) AM_DEFAULT_VERBOSITY=1;;
4330 esac
4331 am_make=${MAKE-make}
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4333 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4334 if ${am_cv_make_support_nested_variables+:} false; then :
4335   $as_echo_n "(cached) " >&6
4336 else
4337   if $as_echo 'TRUE=$(BAR$(V))
4338 BAR0=false
4339 BAR1=true
4340 V=1
4341 am__doit:
4342         @$(TRUE)
4343 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4344   am_cv_make_support_nested_variables=yes
4345 else
4346   am_cv_make_support_nested_variables=no
4347 fi
4348 fi
4349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4350 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4351 if test $am_cv_make_support_nested_variables = yes; then
4352     AM_V='$(V)'
4353   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4354 else
4355   AM_V=$AM_DEFAULT_VERBOSITY
4356   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4357 fi
4358 AM_BACKSLASH='\'
4359
4360 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4361   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4362   # is not polluted with repeated "-I."
4363   am__isrc=' -I$(srcdir)'
4364   # test to see if srcdir already configured
4365   if test -f $srcdir/config.status; then
4366     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4367   fi
4368 fi
4369
4370 # test whether we have cygpath
4371 if test -z "$CYGPATH_W"; then
4372   if (cygpath --version) >/dev/null 2>/dev/null; then
4373     CYGPATH_W='cygpath -w'
4374   else
4375     CYGPATH_W=echo
4376   fi
4377 fi
4378
4379
4380 # Define the identity of the package.
4381  PACKAGE='bison'
4382  VERSION='3.0.5'
4383
4384
4385 cat >>confdefs.h <<_ACEOF
4386 #define PACKAGE "$PACKAGE"
4387 _ACEOF
4388
4389
4390 cat >>confdefs.h <<_ACEOF
4391 #define VERSION "$VERSION"
4392 _ACEOF
4393
4394 # Some tools Automake needs.
4395
4396 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4397
4398
4399 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4400
4401
4402 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4403
4404
4405 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4406
4407
4408 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4409
4410 # For better backward compatibility.  To be removed once Automake 1.9.x
4411 # dies out for good.  For more background, see:
4412 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4413 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4414 mkdir_p='$(MKDIR_P)'
4415
4416 # We need awk for the "check" target (and possibly the TAP driver).  The
4417 # system "awk" is bad on some platforms.
4418 # Always define AMTAR for backward compatibility.  Yes, it's still used
4419 # in the wild :-(  We should find a proper way to deprecate it ...
4420 AMTAR='$${TAR-tar}'
4421
4422
4423 # We'll loop over all known methods to create a tar archive until one works.
4424 _am_tools='gnutar  pax cpio none'
4425
4426 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4427
4428
4429
4430
4431
4432
4433 # POSIX will say in a future version that running "rm -f" with no argument
4434 # is OK; and we want to be able to make that assumption in our Makefile
4435 # recipes.  So use an aggressive probe to check that the usage we want is
4436 # actually supported "in the wild" to an acceptable degree.
4437 # See automake bug#10828.
4438 # To make any issue more visible, cause the running configure to be aborted
4439 # by default if the 'rm' program in use doesn't match our expectations; the
4440 # user can still override this though.
4441 if rm -f && rm -fr && rm -rf; then : OK; else
4442   cat >&2 <<'END'
4443 Oops!
4444
4445 Your 'rm' program seems unable to run without file operands specified
4446 on the command line, even when the '-f' option is present.  This is contrary
4447 to the behaviour of most rm programs out there, and not conforming with
4448 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4449
4450 Please tell bug-automake@gnu.org about your system, including the value
4451 of your $PATH and any error possibly output before this message.  This
4452 can help us improve future automake versions.
4453
4454 END
4455   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4456     echo 'Configuration will proceed anyway, since you have set the' >&2
4457     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4458     echo >&2
4459   else
4460     cat >&2 <<'END'
4461 Aborting the configuration process, to ensure you take notice of the issue.
4462
4463 You can download and install GNU coreutils to get an 'rm' implementation
4464 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4465
4466 If you want to complete the configuration process using your problematic
4467 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4468 to "yes", and re-run configure.
4469
4470 END
4471     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4472   fi
4473 fi
4474
4475 # Check whether --enable-silent-rules was given.
4476 if test "${enable_silent_rules+set}" = set; then :
4477   enableval=$enable_silent_rules;
4478 fi
4479
4480 case $enable_silent_rules in # (((
4481   yes) AM_DEFAULT_VERBOSITY=0;;
4482    no) AM_DEFAULT_VERBOSITY=1;;
4483     *) AM_DEFAULT_VERBOSITY=0;;
4484 esac
4485 am_make=${MAKE-make}
4486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4487 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4488 if ${am_cv_make_support_nested_variables+:} false; then :
4489   $as_echo_n "(cached) " >&6
4490 else
4491   if $as_echo 'TRUE=$(BAR$(V))
4492 BAR0=false
4493 BAR1=true
4494 V=1
4495 am__doit:
4496         @$(TRUE)
4497 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4498   am_cv_make_support_nested_variables=yes
4499 else
4500   am_cv_make_support_nested_variables=no
4501 fi
4502 fi
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4504 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4505 if test $am_cv_make_support_nested_variables = yes; then
4506     AM_V='$(V)'
4507   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4508 else
4509   AM_V=$AM_DEFAULT_VERBOSITY
4510   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4511 fi
4512 AM_BACKSLASH='\'
4513
4514 ac_config_headers="$ac_config_headers lib/config.h:lib/config.in.h"
4515
4516
4517 # Checks for the compiler.
4518 DEPDIR="${am__leading_dot}deps"
4519
4520 ac_config_commands="$ac_config_commands depfiles"
4521
4522
4523 am_make=${MAKE-make}
4524 cat > confinc << 'END'
4525 am__doit:
4526         @echo this is the am__doit target
4527 .PHONY: am__doit
4528 END
4529 # If we don't find an include directive, just comment out the code.
4530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4531 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4532 am__include="#"
4533 am__quote=
4534 _am_result=none
4535 # First try GNU make style include.
4536 echo "include confinc" > confmf
4537 # Ignore all kinds of additional output from 'make'.
4538 case `$am_make -s -f confmf 2> /dev/null` in #(
4539 *the\ am__doit\ target*)
4540   am__include=include
4541   am__quote=
4542   _am_result=GNU
4543   ;;
4544 esac
4545 # Now try BSD make style include.
4546 if test "$am__include" = "#"; then
4547    echo '.include "confinc"' > confmf
4548    case `$am_make -s -f confmf 2> /dev/null` in #(
4549    *the\ am__doit\ target*)
4550      am__include=.include
4551      am__quote="\""
4552      _am_result=BSD
4553      ;;
4554    esac
4555 fi
4556
4557
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4559 $as_echo "$_am_result" >&6; }
4560 rm -f confinc confmf
4561
4562 # Check whether --enable-dependency-tracking was given.
4563 if test "${enable_dependency_tracking+set}" = set; then :
4564   enableval=$enable_dependency_tracking;
4565 fi
4566
4567 if test "x$enable_dependency_tracking" != xno; then
4568   am_depcomp="$ac_aux_dir/depcomp"
4569   AMDEPBACKSLASH='\'
4570   am__nodep='_no'
4571 fi
4572  if test "x$enable_dependency_tracking" != xno; then
4573   AMDEP_TRUE=
4574   AMDEP_FALSE='#'
4575 else
4576   AMDEP_TRUE='#'
4577   AMDEP_FALSE=
4578 fi
4579
4580
4581 ac_ext=c
4582 ac_cpp='$CPP $CPPFLAGS'
4583 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4584 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4585 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4586 if test -n "$ac_tool_prefix"; then
4587   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4588 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590 $as_echo_n "checking for $ac_word... " >&6; }
4591 if ${ac_cv_prog_CC+:} false; then :
4592   $as_echo_n "(cached) " >&6
4593 else
4594   if test -n "$CC"; then
4595   ac_cv_prog_CC="$CC" # Let the user override the test.
4596 else
4597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598 for as_dir in $PATH
4599 do
4600   IFS=$as_save_IFS
4601   test -z "$as_dir" && as_dir=.
4602     for ac_exec_ext in '' $ac_executable_extensions; do
4603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4604     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4606     break 2
4607   fi
4608 done
4609   done
4610 IFS=$as_save_IFS
4611
4612 fi
4613 fi
4614 CC=$ac_cv_prog_CC
4615 if test -n "$CC"; then
4616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4617 $as_echo "$CC" >&6; }
4618 else
4619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620 $as_echo "no" >&6; }
4621 fi
4622
4623
4624 fi
4625 if test -z "$ac_cv_prog_CC"; then
4626   ac_ct_CC=$CC
4627   # Extract the first word of "gcc", so it can be a program name with args.
4628 set dummy gcc; ac_word=$2
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630 $as_echo_n "checking for $ac_word... " >&6; }
4631 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4632   $as_echo_n "(cached) " >&6
4633 else
4634   if test -n "$ac_ct_CC"; then
4635   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4636 else
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638 for as_dir in $PATH
4639 do
4640   IFS=$as_save_IFS
4641   test -z "$as_dir" && as_dir=.
4642     for ac_exec_ext in '' $ac_executable_extensions; do
4643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644     ac_cv_prog_ac_ct_CC="gcc"
4645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646     break 2
4647   fi
4648 done
4649   done
4650 IFS=$as_save_IFS
4651
4652 fi
4653 fi
4654 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4655 if test -n "$ac_ct_CC"; then
4656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4657 $as_echo "$ac_ct_CC" >&6; }
4658 else
4659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660 $as_echo "no" >&6; }
4661 fi
4662
4663   if test "x$ac_ct_CC" = x; then
4664     CC=""
4665   else
4666     case $cross_compiling:$ac_tool_warned in
4667 yes:)
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4669 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4670 ac_tool_warned=yes ;;
4671 esac
4672     CC=$ac_ct_CC
4673   fi
4674 else
4675   CC="$ac_cv_prog_CC"
4676 fi
4677
4678 if test -z "$CC"; then
4679           if test -n "$ac_tool_prefix"; then
4680     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}cc; ac_word=$2
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683 $as_echo_n "checking for $ac_word... " >&6; }
4684 if ${ac_cv_prog_CC+:} false; then :
4685   $as_echo_n "(cached) " >&6
4686 else
4687   if test -n "$CC"; then
4688   ac_cv_prog_CC="$CC" # Let the user override the test.
4689 else
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691 for as_dir in $PATH
4692 do
4693   IFS=$as_save_IFS
4694   test -z "$as_dir" && as_dir=.
4695     for ac_exec_ext in '' $ac_executable_extensions; do
4696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697     ac_cv_prog_CC="${ac_tool_prefix}cc"
4698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699     break 2
4700   fi
4701 done
4702   done
4703 IFS=$as_save_IFS
4704
4705 fi
4706 fi
4707 CC=$ac_cv_prog_CC
4708 if test -n "$CC"; then
4709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4710 $as_echo "$CC" >&6; }
4711 else
4712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713 $as_echo "no" >&6; }
4714 fi
4715
4716
4717   fi
4718 fi
4719 if test -z "$CC"; then
4720   # Extract the first word of "cc", so it can be a program name with args.
4721 set dummy cc; ac_word=$2
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4723 $as_echo_n "checking for $ac_word... " >&6; }
4724 if ${ac_cv_prog_CC+:} false; then :
4725   $as_echo_n "(cached) " >&6
4726 else
4727   if test -n "$CC"; then
4728   ac_cv_prog_CC="$CC" # Let the user override the test.
4729 else
4730   ac_prog_rejected=no
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732 for as_dir in $PATH
4733 do
4734   IFS=$as_save_IFS
4735   test -z "$as_dir" && as_dir=.
4736     for ac_exec_ext in '' $ac_executable_extensions; do
4737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4738     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4739        ac_prog_rejected=yes
4740        continue
4741      fi
4742     ac_cv_prog_CC="cc"
4743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4744     break 2
4745   fi
4746 done
4747   done
4748 IFS=$as_save_IFS
4749
4750 if test $ac_prog_rejected = yes; then
4751   # We found a bogon in the path, so make sure we never use it.
4752   set dummy $ac_cv_prog_CC
4753   shift
4754   if test $# != 0; then
4755     # We chose a different compiler from the bogus one.
4756     # However, it has the same basename, so the bogon will be chosen
4757     # first if we set CC to just the basename; use the full file name.
4758     shift
4759     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4760   fi
4761 fi
4762 fi
4763 fi
4764 CC=$ac_cv_prog_CC
4765 if test -n "$CC"; then
4766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4767 $as_echo "$CC" >&6; }
4768 else
4769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4771 fi
4772
4773
4774 fi
4775 if test -z "$CC"; then
4776   if test -n "$ac_tool_prefix"; then
4777   for ac_prog in cl.exe
4778   do
4779     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4780 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4782 $as_echo_n "checking for $ac_word... " >&6; }
4783 if ${ac_cv_prog_CC+:} false; then :
4784   $as_echo_n "(cached) " >&6
4785 else
4786   if test -n "$CC"; then
4787   ac_cv_prog_CC="$CC" # Let the user override the test.
4788 else
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790 for as_dir in $PATH
4791 do
4792   IFS=$as_save_IFS
4793   test -z "$as_dir" && as_dir=.
4794     for ac_exec_ext in '' $ac_executable_extensions; do
4795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4796     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4798     break 2
4799   fi
4800 done
4801   done
4802 IFS=$as_save_IFS
4803
4804 fi
4805 fi
4806 CC=$ac_cv_prog_CC
4807 if test -n "$CC"; then
4808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4809 $as_echo "$CC" >&6; }
4810 else
4811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812 $as_echo "no" >&6; }
4813 fi
4814
4815
4816     test -n "$CC" && break
4817   done
4818 fi
4819 if test -z "$CC"; then
4820   ac_ct_CC=$CC
4821   for ac_prog in cl.exe
4822 do
4823   # Extract the first word of "$ac_prog", so it can be a program name with args.
4824 set dummy $ac_prog; ac_word=$2
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826 $as_echo_n "checking for $ac_word... " >&6; }
4827 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4828   $as_echo_n "(cached) " >&6
4829 else
4830   if test -n "$ac_ct_CC"; then
4831   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4832 else
4833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834 for as_dir in $PATH
4835 do
4836   IFS=$as_save_IFS
4837   test -z "$as_dir" && as_dir=.
4838     for ac_exec_ext in '' $ac_executable_extensions; do
4839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4840     ac_cv_prog_ac_ct_CC="$ac_prog"
4841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4842     break 2
4843   fi
4844 done
4845   done
4846 IFS=$as_save_IFS
4847
4848 fi
4849 fi
4850 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4851 if test -n "$ac_ct_CC"; then
4852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4853 $as_echo "$ac_ct_CC" >&6; }
4854 else
4855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856 $as_echo "no" >&6; }
4857 fi
4858
4859
4860   test -n "$ac_ct_CC" && break
4861 done
4862
4863   if test "x$ac_ct_CC" = x; then
4864     CC=""
4865   else
4866     case $cross_compiling:$ac_tool_warned in
4867 yes:)
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4869 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4870 ac_tool_warned=yes ;;
4871 esac
4872     CC=$ac_ct_CC
4873   fi
4874 fi
4875
4876 fi
4877
4878
4879 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4880 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4881 as_fn_error $? "no acceptable C compiler found in \$PATH
4882 See \`config.log' for more details" "$LINENO" 5; }
4883
4884 # Provide some information about the compiler.
4885 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4886 set X $ac_compile
4887 ac_compiler=$2
4888 for ac_option in --version -v -V -qversion; do
4889   { { ac_try="$ac_compiler $ac_option >&5"
4890 case "(($ac_try" in
4891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4892   *) ac_try_echo=$ac_try;;
4893 esac
4894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4895 $as_echo "$ac_try_echo"; } >&5
4896   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4897   ac_status=$?
4898   if test -s conftest.err; then
4899     sed '10a\
4900 ... rest of stderr output deleted ...
4901          10q' conftest.err >conftest.er1
4902     cat conftest.er1 >&5
4903   fi
4904   rm -f conftest.er1 conftest.err
4905   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4906   test $ac_status = 0; }
4907 done
4908
4909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4910 /* end confdefs.h.  */
4911
4912 int
4913 main ()
4914 {
4915
4916   ;
4917   return 0;
4918 }
4919 _ACEOF
4920 ac_clean_files_save=$ac_clean_files
4921 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4922 # Try to create an executable without -o first, disregard a.out.
4923 # It will help us diagnose broken compilers, and finding out an intuition
4924 # of exeext.
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4926 $as_echo_n "checking whether the C compiler works... " >&6; }
4927 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4928
4929 # The possible output files:
4930 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4931
4932 ac_rmfiles=
4933 for ac_file in $ac_files
4934 do
4935   case $ac_file in
4936     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4937     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4938   esac
4939 done
4940 rm -f $ac_rmfiles
4941
4942 if { { ac_try="$ac_link_default"
4943 case "(($ac_try" in
4944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4945   *) ac_try_echo=$ac_try;;
4946 esac
4947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4948 $as_echo "$ac_try_echo"; } >&5
4949   (eval "$ac_link_default") 2>&5
4950   ac_status=$?
4951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4952   test $ac_status = 0; }; then :
4953   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4954 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4955 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4956 # so that the user can short-circuit this test for compilers unknown to
4957 # Autoconf.
4958 for ac_file in $ac_files ''
4959 do
4960   test -f "$ac_file" || continue
4961   case $ac_file in
4962     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4963         ;;
4964     [ab].out )
4965         # We found the default executable, but exeext='' is most
4966         # certainly right.
4967         break;;
4968     *.* )
4969         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4970         then :; else
4971            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4972         fi
4973         # We set ac_cv_exeext here because the later test for it is not
4974         # safe: cross compilers may not add the suffix if given an `-o'
4975         # argument, so we may need to know it at that point already.
4976         # Even if this section looks crufty: it has the advantage of
4977         # actually working.
4978         break;;
4979     * )
4980         break;;
4981   esac
4982 done
4983 test "$ac_cv_exeext" = no && ac_cv_exeext=
4984
4985 else
4986   ac_file=''
4987 fi
4988 if test -z "$ac_file"; then :
4989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990 $as_echo "no" >&6; }
4991 $as_echo "$as_me: failed program was:" >&5
4992 sed 's/^/| /' conftest.$ac_ext >&5
4993
4994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4996 as_fn_error 77 "C compiler cannot create executables
4997 See \`config.log' for more details" "$LINENO" 5; }
4998 else
4999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5000 $as_echo "yes" >&6; }
5001 fi
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5003 $as_echo_n "checking for C compiler default output file name... " >&6; }
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5005 $as_echo "$ac_file" >&6; }
5006 ac_exeext=$ac_cv_exeext
5007
5008 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5009 ac_clean_files=$ac_clean_files_save
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5011 $as_echo_n "checking for suffix of executables... " >&6; }
5012 if { { ac_try="$ac_link"
5013 case "(($ac_try" in
5014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5015   *) ac_try_echo=$ac_try;;
5016 esac
5017 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5018 $as_echo "$ac_try_echo"; } >&5
5019   (eval "$ac_link") 2>&5
5020   ac_status=$?
5021   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5022   test $ac_status = 0; }; then :
5023   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5024 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5025 # work properly (i.e., refer to `conftest.exe'), while it won't with
5026 # `rm'.
5027 for ac_file in conftest.exe conftest conftest.*; do
5028   test -f "$ac_file" || continue
5029   case $ac_file in
5030     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5031     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5032           break;;
5033     * ) break;;
5034   esac
5035 done
5036 else
5037   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5039 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5040 See \`config.log' for more details" "$LINENO" 5; }
5041 fi
5042 rm -f conftest conftest$ac_cv_exeext
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5044 $as_echo "$ac_cv_exeext" >&6; }
5045
5046 rm -f conftest.$ac_ext
5047 EXEEXT=$ac_cv_exeext
5048 ac_exeext=$EXEEXT
5049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5050 /* end confdefs.h.  */
5051 #include <stdio.h>
5052 int
5053 main ()
5054 {
5055 FILE *f = fopen ("conftest.out", "w");
5056  return ferror (f) || fclose (f) != 0;
5057
5058   ;
5059   return 0;
5060 }
5061 _ACEOF
5062 ac_clean_files="$ac_clean_files conftest.out"
5063 # Check that the compiler produces executables we can run.  If not, either
5064 # the compiler is broken, or we cross compile.
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5066 $as_echo_n "checking whether we are cross compiling... " >&6; }
5067 if test "$cross_compiling" != yes; then
5068   { { ac_try="$ac_link"
5069 case "(($ac_try" in
5070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5071   *) ac_try_echo=$ac_try;;
5072 esac
5073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5074 $as_echo "$ac_try_echo"; } >&5
5075   (eval "$ac_link") 2>&5
5076   ac_status=$?
5077   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5078   test $ac_status = 0; }
5079   if { ac_try='./conftest$ac_cv_exeext'
5080   { { case "(($ac_try" in
5081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5082   *) ac_try_echo=$ac_try;;
5083 esac
5084 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5085 $as_echo "$ac_try_echo"; } >&5
5086   (eval "$ac_try") 2>&5
5087   ac_status=$?
5088   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5089   test $ac_status = 0; }; }; then
5090     cross_compiling=no
5091   else
5092     if test "$cross_compiling" = maybe; then
5093         cross_compiling=yes
5094     else
5095         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5097 as_fn_error $? "cannot run C compiled programs.
5098 If you meant to cross compile, use \`--host'.
5099 See \`config.log' for more details" "$LINENO" 5; }
5100     fi
5101   fi
5102 fi
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5104 $as_echo "$cross_compiling" >&6; }
5105
5106 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5107 ac_clean_files=$ac_clean_files_save
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5109 $as_echo_n "checking for suffix of object files... " >&6; }
5110 if ${ac_cv_objext+:} false; then :
5111   $as_echo_n "(cached) " >&6
5112 else
5113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5114 /* end confdefs.h.  */
5115
5116 int
5117 main ()
5118 {
5119
5120   ;
5121   return 0;
5122 }
5123 _ACEOF
5124 rm -f conftest.o conftest.obj
5125 if { { ac_try="$ac_compile"
5126 case "(($ac_try" in
5127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5128   *) ac_try_echo=$ac_try;;
5129 esac
5130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5131 $as_echo "$ac_try_echo"; } >&5
5132   (eval "$ac_compile") 2>&5
5133   ac_status=$?
5134   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5135   test $ac_status = 0; }; then :
5136   for ac_file in conftest.o conftest.obj conftest.*; do
5137   test -f "$ac_file" || continue;
5138   case $ac_file in
5139     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5140     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5141        break;;
5142   esac
5143 done
5144 else
5145   $as_echo "$as_me: failed program was:" >&5
5146 sed 's/^/| /' conftest.$ac_ext >&5
5147
5148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5149 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5150 as_fn_error $? "cannot compute suffix of object files: cannot compile
5151 See \`config.log' for more details" "$LINENO" 5; }
5152 fi
5153 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5154 fi
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5156 $as_echo "$ac_cv_objext" >&6; }
5157 OBJEXT=$ac_cv_objext
5158 ac_objext=$OBJEXT
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5160 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5161 if ${ac_cv_c_compiler_gnu+:} false; then :
5162   $as_echo_n "(cached) " >&6
5163 else
5164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5165 /* end confdefs.h.  */
5166
5167 int
5168 main ()
5169 {
5170 #ifndef __GNUC__
5171        choke me
5172 #endif
5173
5174   ;
5175   return 0;
5176 }
5177 _ACEOF
5178 if ac_fn_c_try_compile "$LINENO"; then :
5179   ac_compiler_gnu=yes
5180 else
5181   ac_compiler_gnu=no
5182 fi
5183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5184 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5185
5186 fi
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5188 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5189 if test $ac_compiler_gnu = yes; then
5190   GCC=yes
5191 else
5192   GCC=
5193 fi
5194 ac_test_CFLAGS=${CFLAGS+set}
5195 ac_save_CFLAGS=$CFLAGS
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5197 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5198 if ${ac_cv_prog_cc_g+:} false; then :
5199   $as_echo_n "(cached) " >&6
5200 else
5201   ac_save_c_werror_flag=$ac_c_werror_flag
5202    ac_c_werror_flag=yes
5203    ac_cv_prog_cc_g=no
5204    CFLAGS="-g"
5205    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206 /* end confdefs.h.  */
5207
5208 int
5209 main ()
5210 {
5211
5212   ;
5213   return 0;
5214 }
5215 _ACEOF
5216 if ac_fn_c_try_compile "$LINENO"; then :
5217   ac_cv_prog_cc_g=yes
5218 else
5219   CFLAGS=""
5220       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5221 /* end confdefs.h.  */
5222
5223 int
5224 main ()
5225 {
5226
5227   ;
5228   return 0;
5229 }
5230 _ACEOF
5231 if ac_fn_c_try_compile "$LINENO"; then :
5232
5233 else
5234   ac_c_werror_flag=$ac_save_c_werror_flag
5235          CFLAGS="-g"
5236          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5237 /* end confdefs.h.  */
5238
5239 int
5240 main ()
5241 {
5242
5243   ;
5244   return 0;
5245 }
5246 _ACEOF
5247 if ac_fn_c_try_compile "$LINENO"; then :
5248   ac_cv_prog_cc_g=yes
5249 fi
5250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5251 fi
5252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5253 fi
5254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5255    ac_c_werror_flag=$ac_save_c_werror_flag
5256 fi
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5258 $as_echo "$ac_cv_prog_cc_g" >&6; }
5259 if test "$ac_test_CFLAGS" = set; then
5260   CFLAGS=$ac_save_CFLAGS
5261 elif test $ac_cv_prog_cc_g = yes; then
5262   if test "$GCC" = yes; then
5263     CFLAGS="-g -O2"
5264   else
5265     CFLAGS="-g"
5266   fi
5267 else
5268   if test "$GCC" = yes; then
5269     CFLAGS="-O2"
5270   else
5271     CFLAGS=
5272   fi
5273 fi
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5275 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5276 if ${ac_cv_prog_cc_c89+:} false; then :
5277   $as_echo_n "(cached) " >&6
5278 else
5279   ac_cv_prog_cc_c89=no
5280 ac_save_CC=$CC
5281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5282 /* end confdefs.h.  */
5283 #include <stdarg.h>
5284 #include <stdio.h>
5285 struct stat;
5286 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5287 struct buf { int x; };
5288 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5289 static char *e (p, i)
5290      char **p;
5291      int i;
5292 {
5293   return p[i];
5294 }
5295 static char *f (char * (*g) (char **, int), char **p, ...)
5296 {
5297   char *s;
5298   va_list v;
5299   va_start (v,p);
5300   s = g (p, va_arg (v,int));
5301   va_end (v);
5302   return s;
5303 }
5304
5305 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5306    function prototypes and stuff, but not '\xHH' hex character constants.
5307    These don't provoke an error unfortunately, instead are silently treated
5308    as 'x'.  The following induces an error, until -std is added to get
5309    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5310    array size at least.  It's necessary to write '\x00'==0 to get something
5311    that's true only with -std.  */
5312 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5313
5314 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5315    inside strings and character constants.  */
5316 #define FOO(x) 'x'
5317 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5318
5319 int test (int i, double x);
5320 struct s1 {int (*f) (int a);};
5321 struct s2 {int (*f) (double a);};
5322 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5323 int argc;
5324 char **argv;
5325 int
5326 main ()
5327 {
5328 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5334         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5335 do
5336   CC="$ac_save_CC $ac_arg"
5337   if ac_fn_c_try_compile "$LINENO"; then :
5338   ac_cv_prog_cc_c89=$ac_arg
5339 fi
5340 rm -f core conftest.err conftest.$ac_objext
5341   test "x$ac_cv_prog_cc_c89" != "xno" && break
5342 done
5343 rm -f conftest.$ac_ext
5344 CC=$ac_save_CC
5345
5346 fi
5347 # AC_CACHE_VAL
5348 case "x$ac_cv_prog_cc_c89" in
5349   x)
5350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5351 $as_echo "none needed" >&6; } ;;
5352   xno)
5353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5354 $as_echo "unsupported" >&6; } ;;
5355   *)
5356     CC="$CC $ac_cv_prog_cc_c89"
5357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5358 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5359 esac
5360 if test "x$ac_cv_prog_cc_c89" != xno; then :
5361
5362 fi
5363
5364 ac_ext=c
5365 ac_cpp='$CPP $CPPFLAGS'
5366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5369
5370 ac_ext=c
5371 ac_cpp='$CPP $CPPFLAGS'
5372 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5373 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5374 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5376 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5377 if ${am_cv_prog_cc_c_o+:} false; then :
5378   $as_echo_n "(cached) " >&6
5379 else
5380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5381 /* end confdefs.h.  */
5382
5383 int
5384 main ()
5385 {
5386
5387   ;
5388   return 0;
5389 }
5390 _ACEOF
5391   # Make sure it works both with $CC and with simple cc.
5392   # Following AC_PROG_CC_C_O, we do the test twice because some
5393   # compilers refuse to overwrite an existing .o file with -o,
5394   # though they will create one.
5395   am_cv_prog_cc_c_o=yes
5396   for am_i in 1 2; do
5397     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5398    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5399    ac_status=$?
5400    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401    (exit $ac_status); } \
5402          && test -f conftest2.$ac_objext; then
5403       : OK
5404     else
5405       am_cv_prog_cc_c_o=no
5406       break
5407     fi
5408   done
5409   rm -f core conftest*
5410   unset am_i
5411 fi
5412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5413 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5414 if test "$am_cv_prog_cc_c_o" != yes; then
5415    # Losing compiler, so override with the script.
5416    # FIXME: It is wrong to rewrite CC.
5417    # But if we don't then we get into trouble of one sort or another.
5418    # A longer-term fix would be to have automake use am__CC in this case,
5419    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5420    CC="$am_aux_dir/compile $CC"
5421 fi
5422 ac_ext=c
5423 ac_cpp='$CPP $CPPFLAGS'
5424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5427
5428
5429 depcc="$CC"   am_compiler_list=
5430
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5432 $as_echo_n "checking dependency style of $depcc... " >&6; }
5433 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5434   $as_echo_n "(cached) " >&6
5435 else
5436   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5437   # We make a subdir and do the tests there.  Otherwise we can end up
5438   # making bogus files that we don't know about and never remove.  For
5439   # instance it was reported that on HP-UX the gcc test will end up
5440   # making a dummy file named 'D' -- because '-MD' means "put the output
5441   # in D".
5442   rm -rf conftest.dir
5443   mkdir conftest.dir
5444   # Copy depcomp to subdir because otherwise we won't find it if we're
5445   # using a relative directory.
5446   cp "$am_depcomp" conftest.dir
5447   cd conftest.dir
5448   # We will build objects and dependencies in a subdirectory because
5449   # it helps to detect inapplicable dependency modes.  For instance
5450   # both Tru64's cc and ICC support -MD to output dependencies as a
5451   # side effect of compilation, but ICC will put the dependencies in
5452   # the current directory while Tru64 will put them in the object
5453   # directory.
5454   mkdir sub
5455
5456   am_cv_CC_dependencies_compiler_type=none
5457   if test "$am_compiler_list" = ""; then
5458      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5459   fi
5460   am__universal=false
5461   case " $depcc " in #(
5462      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5463      esac
5464
5465   for depmode in $am_compiler_list; do
5466     # Setup a source with many dependencies, because some compilers
5467     # like to wrap large dependency lists on column 80 (with \), and
5468     # we should not choose a depcomp mode which is confused by this.
5469     #
5470     # We need to recreate these files for each test, as the compiler may
5471     # overwrite some of them when testing with obscure command lines.
5472     # This happens at least with the AIX C compiler.
5473     : > sub/conftest.c
5474     for i in 1 2 3 4 5 6; do
5475       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5476       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5477       # Solaris 10 /bin/sh.
5478       echo '/* dummy */' > sub/conftst$i.h
5479     done
5480     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5481
5482     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5483     # mode.  It turns out that the SunPro C++ compiler does not properly
5484     # handle '-M -o', and we need to detect this.  Also, some Intel
5485     # versions had trouble with output in subdirs.
5486     am__obj=sub/conftest.${OBJEXT-o}
5487     am__minus_obj="-o $am__obj"
5488     case $depmode in
5489     gcc)
5490       # This depmode causes a compiler race in universal mode.
5491       test "$am__universal" = false || continue
5492       ;;
5493     nosideeffect)
5494       # After this tag, mechanisms are not by side-effect, so they'll
5495       # only be used when explicitly requested.
5496       if test "x$enable_dependency_tracking" = xyes; then
5497         continue
5498       else
5499         break
5500       fi
5501       ;;
5502     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5503       # This compiler won't grok '-c -o', but also, the minuso test has
5504       # not run yet.  These depmodes are late enough in the game, and
5505       # so weak that their functioning should not be impacted.
5506       am__obj=conftest.${OBJEXT-o}
5507       am__minus_obj=
5508       ;;
5509     none) break ;;
5510     esac
5511     if depmode=$depmode \
5512        source=sub/conftest.c object=$am__obj \
5513        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5514        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5515          >/dev/null 2>conftest.err &&
5516        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5517        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5518        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5519        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5520       # icc doesn't choke on unknown options, it will just issue warnings
5521       # or remarks (even with -Werror).  So we grep stderr for any message
5522       # that says an option was ignored or not supported.
5523       # When given -MP, icc 7.0 and 7.1 complain thusly:
5524       #   icc: Command line warning: ignoring option '-M'; no argument required
5525       # The diagnosis changed in icc 8.0:
5526       #   icc: Command line remark: option '-MP' not supported
5527       if (grep 'ignoring option' conftest.err ||
5528           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5529         am_cv_CC_dependencies_compiler_type=$depmode
5530         break
5531       fi
5532     fi
5533   done
5534
5535   cd ..
5536   rm -rf conftest.dir
5537 else
5538   am_cv_CC_dependencies_compiler_type=none
5539 fi
5540
5541 fi
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5543 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5544 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5545
5546  if
5547   test "x$enable_dependency_tracking" != xno \
5548   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5549   am__fastdepCC_TRUE=
5550   am__fastdepCC_FALSE='#'
5551 else
5552   am__fastdepCC_TRUE='#'
5553   am__fastdepCC_FALSE=
5554 fi
5555
5556
5557    case $ac_cv_prog_cc_stdc in #(
5558   no) :
5559     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5560   *) :
5561     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5562 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5563 if ${ac_cv_prog_cc_c99+:} false; then :
5564   $as_echo_n "(cached) " >&6
5565 else
5566   ac_cv_prog_cc_c99=no
5567 ac_save_CC=$CC
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569 /* end confdefs.h.  */
5570 #include <stdarg.h>
5571 #include <stdbool.h>
5572 #include <stdlib.h>
5573 #include <wchar.h>
5574 #include <stdio.h>
5575
5576 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5577 #define debug(...) fprintf (stderr, __VA_ARGS__)
5578 #define showlist(...) puts (#__VA_ARGS__)
5579 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5580 static void
5581 test_varargs_macros (void)
5582 {
5583   int x = 1234;
5584   int y = 5678;
5585   debug ("Flag");
5586   debug ("X = %d\n", x);
5587   showlist (The first, second, and third items.);
5588   report (x>y, "x is %d but y is %d", x, y);
5589 }
5590
5591 // Check long long types.
5592 #define BIG64 18446744073709551615ull
5593 #define BIG32 4294967295ul
5594 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5595 #if !BIG_OK
5596   your preprocessor is broken;
5597 #endif
5598 #if BIG_OK
5599 #else
5600   your preprocessor is broken;
5601 #endif
5602 static long long int bignum = -9223372036854775807LL;
5603 static unsigned long long int ubignum = BIG64;
5604
5605 struct incomplete_array
5606 {
5607   int datasize;
5608   double data[];
5609 };
5610
5611 struct named_init {
5612   int number;
5613   const wchar_t *name;
5614   double average;
5615 };
5616
5617 typedef const char *ccp;
5618
5619 static inline int
5620 test_restrict (ccp restrict text)
5621 {
5622   // See if C++-style comments work.
5623   // Iterate through items via the restricted pointer.
5624   // Also check for declarations in for loops.
5625   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5626     continue;
5627   return 0;
5628 }
5629
5630 // Check varargs and va_copy.
5631 static void
5632 test_varargs (const char *format, ...)
5633 {
5634   va_list args;
5635   va_start (args, format);
5636   va_list args_copy;
5637   va_copy (args_copy, args);
5638
5639   const char *str;
5640   int number;
5641   float fnumber;
5642
5643   while (*format)
5644     {
5645       switch (*format++)
5646         {
5647         case 's': // string
5648           str = va_arg (args_copy, const char *);
5649           break;
5650         case 'd': // int
5651           number = va_arg (args_copy, int);
5652           break;
5653         case 'f': // float
5654           fnumber = va_arg (args_copy, double);
5655           break;
5656         default:
5657           break;
5658         }
5659     }
5660   va_end (args_copy);
5661   va_end (args);
5662 }
5663
5664 int
5665 main ()
5666 {
5667
5668   // Check bool.
5669   _Bool success = false;
5670
5671   // Check restrict.
5672   if (test_restrict ("String literal") == 0)
5673     success = true;
5674   char *restrict newvar = "Another string";
5675
5676   // Check varargs.
5677   test_varargs ("s, d' f .", "string", 65, 34.234);
5678   test_varargs_macros ();
5679
5680   // Check flexible array members.
5681   struct incomplete_array *ia =
5682     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5683   ia->datasize = 10;
5684   for (int i = 0; i < ia->datasize; ++i)
5685     ia->data[i] = i * 1.234;
5686
5687   // Check named initializers.
5688   struct named_init ni = {
5689     .number = 34,
5690     .name = L"Test wide string",
5691     .average = 543.34343,
5692   };
5693
5694   ni.number = 58;
5695
5696   int dynamic_array[ni.number];
5697   dynamic_array[ni.number - 1] = 543;
5698
5699   // work around unused variable warnings
5700   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5701           || dynamic_array[ni.number - 1] != 543);
5702
5703   ;
5704   return 0;
5705 }
5706 _ACEOF
5707 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5708 do
5709   CC="$ac_save_CC $ac_arg"
5710   if ac_fn_c_try_compile "$LINENO"; then :
5711   ac_cv_prog_cc_c99=$ac_arg
5712 fi
5713 rm -f core conftest.err conftest.$ac_objext
5714   test "x$ac_cv_prog_cc_c99" != "xno" && break
5715 done
5716 rm -f conftest.$ac_ext
5717 CC=$ac_save_CC
5718
5719 fi
5720 # AC_CACHE_VAL
5721 case "x$ac_cv_prog_cc_c99" in
5722   x)
5723     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5724 $as_echo "none needed" >&6; } ;;
5725   xno)
5726     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5727 $as_echo "unsupported" >&6; } ;;
5728   *)
5729     CC="$CC $ac_cv_prog_cc_c99"
5730     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5731 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5732 esac
5733 if test "x$ac_cv_prog_cc_c99" != xno; then :
5734   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5735 else
5736   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5737 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5738 if ${ac_cv_prog_cc_c89+:} false; then :
5739   $as_echo_n "(cached) " >&6
5740 else
5741   ac_cv_prog_cc_c89=no
5742 ac_save_CC=$CC
5743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5744 /* end confdefs.h.  */
5745 #include <stdarg.h>
5746 #include <stdio.h>
5747 struct stat;
5748 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5749 struct buf { int x; };
5750 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5751 static char *e (p, i)
5752      char **p;
5753      int i;
5754 {
5755   return p[i];
5756 }
5757 static char *f (char * (*g) (char **, int), char **p, ...)
5758 {
5759   char *s;
5760   va_list v;
5761   va_start (v,p);
5762   s = g (p, va_arg (v,int));
5763   va_end (v);
5764   return s;
5765 }
5766
5767 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5768    function prototypes and stuff, but not '\xHH' hex character constants.
5769    These don't provoke an error unfortunately, instead are silently treated
5770    as 'x'.  The following induces an error, until -std is added to get
5771    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5772    array size at least.  It's necessary to write '\x00'==0 to get something
5773    that's true only with -std.  */
5774 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5775
5776 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5777    inside strings and character constants.  */
5778 #define FOO(x) 'x'
5779 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5780
5781 int test (int i, double x);
5782 struct s1 {int (*f) (int a);};
5783 struct s2 {int (*f) (double a);};
5784 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5785 int argc;
5786 char **argv;
5787 int
5788 main ()
5789 {
5790 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5791   ;
5792   return 0;
5793 }
5794 _ACEOF
5795 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5796         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5797 do
5798   CC="$ac_save_CC $ac_arg"
5799   if ac_fn_c_try_compile "$LINENO"; then :
5800   ac_cv_prog_cc_c89=$ac_arg
5801 fi
5802 rm -f core conftest.err conftest.$ac_objext
5803   test "x$ac_cv_prog_cc_c89" != "xno" && break
5804 done
5805 rm -f conftest.$ac_ext
5806 CC=$ac_save_CC
5807
5808 fi
5809 # AC_CACHE_VAL
5810 case "x$ac_cv_prog_cc_c89" in
5811   x)
5812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5813 $as_echo "none needed" >&6; } ;;
5814   xno)
5815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5816 $as_echo "unsupported" >&6; } ;;
5817   *)
5818     CC="$CC $ac_cv_prog_cc_c89"
5819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5820 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5821 esac
5822 if test "x$ac_cv_prog_cc_c89" != xno; then :
5823   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5824 else
5825   ac_cv_prog_cc_stdc=no
5826 fi
5827
5828 fi
5829  ;;
5830 esac
5831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5832 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5833   if ${ac_cv_prog_cc_stdc+:} false; then :
5834   $as_echo_n "(cached) " >&6
5835 fi
5836
5837   case $ac_cv_prog_cc_stdc in #(
5838   no) :
5839     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5840 $as_echo "unsupported" >&6; } ;; #(
5841   '') :
5842     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5843 $as_echo "none needed" >&6; } ;; #(
5844   *) :
5845     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5846 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5847 esac
5848
5849 ac_ext=cpp
5850 ac_cpp='$CXXCPP $CPPFLAGS'
5851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5854 if test -z "$CXX"; then
5855   if test -n "$CCC"; then
5856     CXX=$CCC
5857   else
5858     if test -n "$ac_tool_prefix"; then
5859   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5860   do
5861     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5862 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864 $as_echo_n "checking for $ac_word... " >&6; }
5865 if ${ac_cv_prog_CXX+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   if test -n "$CXX"; then
5869   ac_cv_prog_CXX="$CXX" # Let the user override the test.
5870 else
5871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872 for as_dir in $PATH
5873 do
5874   IFS=$as_save_IFS
5875   test -z "$as_dir" && as_dir=.
5876     for ac_exec_ext in '' $ac_executable_extensions; do
5877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5878     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880     break 2
5881   fi
5882 done
5883   done
5884 IFS=$as_save_IFS
5885
5886 fi
5887 fi
5888 CXX=$ac_cv_prog_CXX
5889 if test -n "$CXX"; then
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5891 $as_echo "$CXX" >&6; }
5892 else
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894 $as_echo "no" >&6; }
5895 fi
5896
5897
5898     test -n "$CXX" && break
5899   done
5900 fi
5901 if test -z "$CXX"; then
5902   ac_ct_CXX=$CXX
5903   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5904 do
5905   # Extract the first word of "$ac_prog", so it can be a program name with args.
5906 set dummy $ac_prog; ac_word=$2
5907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5908 $as_echo_n "checking for $ac_word... " >&6; }
5909 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5910   $as_echo_n "(cached) " >&6
5911 else
5912   if test -n "$ac_ct_CXX"; then
5913   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5914 else
5915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916 for as_dir in $PATH
5917 do
5918   IFS=$as_save_IFS
5919   test -z "$as_dir" && as_dir=.
5920     for ac_exec_ext in '' $ac_executable_extensions; do
5921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922     ac_cv_prog_ac_ct_CXX="$ac_prog"
5923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5924     break 2
5925   fi
5926 done
5927   done
5928 IFS=$as_save_IFS
5929
5930 fi
5931 fi
5932 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5933 if test -n "$ac_ct_CXX"; then
5934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5935 $as_echo "$ac_ct_CXX" >&6; }
5936 else
5937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938 $as_echo "no" >&6; }
5939 fi
5940
5941
5942   test -n "$ac_ct_CXX" && break
5943 done
5944
5945   if test "x$ac_ct_CXX" = x; then
5946     CXX="g++"
5947   else
5948     case $cross_compiling:$ac_tool_warned in
5949 yes:)
5950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5951 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5952 ac_tool_warned=yes ;;
5953 esac
5954     CXX=$ac_ct_CXX
5955   fi
5956 fi
5957
5958   fi
5959 fi
5960 # Provide some information about the compiler.
5961 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
5962 set X $ac_compile
5963 ac_compiler=$2
5964 for ac_option in --version -v -V -qversion; do
5965   { { ac_try="$ac_compiler $ac_option >&5"
5966 case "(($ac_try" in
5967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5968   *) ac_try_echo=$ac_try;;
5969 esac
5970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5971 $as_echo "$ac_try_echo"; } >&5
5972   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5973   ac_status=$?
5974   if test -s conftest.err; then
5975     sed '10a\
5976 ... rest of stderr output deleted ...
5977          10q' conftest.err >conftest.er1
5978     cat conftest.er1 >&5
5979   fi
5980   rm -f conftest.er1 conftest.err
5981   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5982   test $ac_status = 0; }
5983 done
5984
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
5986 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
5987 if ${ac_cv_cxx_compiler_gnu+:} false; then :
5988   $as_echo_n "(cached) " >&6
5989 else
5990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991 /* end confdefs.h.  */
5992
5993 int
5994 main ()
5995 {
5996 #ifndef __GNUC__
5997        choke me
5998 #endif
5999
6000   ;
6001   return 0;
6002 }
6003 _ACEOF
6004 if ac_fn_cxx_try_compile "$LINENO"; then :
6005   ac_compiler_gnu=yes
6006 else
6007   ac_compiler_gnu=no
6008 fi
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
6011
6012 fi
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
6014 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
6015 if test $ac_compiler_gnu = yes; then
6016   GXX=yes
6017 else
6018   GXX=
6019 fi
6020 ac_test_CXXFLAGS=${CXXFLAGS+set}
6021 ac_save_CXXFLAGS=$CXXFLAGS
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
6023 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
6024 if ${ac_cv_prog_cxx_g+:} false; then :
6025   $as_echo_n "(cached) " >&6
6026 else
6027   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6028    ac_cxx_werror_flag=yes
6029    ac_cv_prog_cxx_g=no
6030    CXXFLAGS="-g"
6031    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6032 /* end confdefs.h.  */
6033
6034 int
6035 main ()
6036 {
6037
6038   ;
6039   return 0;
6040 }
6041 _ACEOF
6042 if ac_fn_cxx_try_compile "$LINENO"; then :
6043   ac_cv_prog_cxx_g=yes
6044 else
6045   CXXFLAGS=""
6046       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6047 /* end confdefs.h.  */
6048
6049 int
6050 main ()
6051 {
6052
6053   ;
6054   return 0;
6055 }
6056 _ACEOF
6057 if ac_fn_cxx_try_compile "$LINENO"; then :
6058
6059 else
6060   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6061          CXXFLAGS="-g"
6062          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6063 /* end confdefs.h.  */
6064
6065 int
6066 main ()
6067 {
6068
6069   ;
6070   return 0;
6071 }
6072 _ACEOF
6073 if ac_fn_cxx_try_compile "$LINENO"; then :
6074   ac_cv_prog_cxx_g=yes
6075 fi
6076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6077 fi
6078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6079 fi
6080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6081    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6082 fi
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
6084 $as_echo "$ac_cv_prog_cxx_g" >&6; }
6085 if test "$ac_test_CXXFLAGS" = set; then
6086   CXXFLAGS=$ac_save_CXXFLAGS
6087 elif test $ac_cv_prog_cxx_g = yes; then
6088   if test "$GXX" = yes; then
6089     CXXFLAGS="-g -O2"
6090   else
6091     CXXFLAGS="-g"
6092   fi
6093 else
6094   if test "$GXX" = yes; then
6095     CXXFLAGS="-O2"
6096   else
6097     CXXFLAGS=
6098   fi
6099 fi
6100 ac_ext=c
6101 ac_cpp='$CPP $CPPFLAGS'
6102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6105
6106 depcc="$CXX"  am_compiler_list=
6107
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6109 $as_echo_n "checking dependency style of $depcc... " >&6; }
6110 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
6111   $as_echo_n "(cached) " >&6
6112 else
6113   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6114   # We make a subdir and do the tests there.  Otherwise we can end up
6115   # making bogus files that we don't know about and never remove.  For
6116   # instance it was reported that on HP-UX the gcc test will end up
6117   # making a dummy file named 'D' -- because '-MD' means "put the output
6118   # in D".
6119   rm -rf conftest.dir
6120   mkdir conftest.dir
6121   # Copy depcomp to subdir because otherwise we won't find it if we're
6122   # using a relative directory.
6123   cp "$am_depcomp" conftest.dir
6124   cd conftest.dir
6125   # We will build objects and dependencies in a subdirectory because
6126   # it helps to detect inapplicable dependency modes.  For instance
6127   # both Tru64's cc and ICC support -MD to output dependencies as a
6128   # side effect of compilation, but ICC will put the dependencies in
6129   # the current directory while Tru64 will put them in the object
6130   # directory.
6131   mkdir sub
6132
6133   am_cv_CXX_dependencies_compiler_type=none
6134   if test "$am_compiler_list" = ""; then
6135      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6136   fi
6137   am__universal=false
6138   case " $depcc " in #(
6139      *\ -arch\ *\ -arch\ *) am__universal=true ;;
6140      esac
6141
6142   for depmode in $am_compiler_list; do
6143     # Setup a source with many dependencies, because some compilers
6144     # like to wrap large dependency lists on column 80 (with \), and
6145     # we should not choose a depcomp mode which is confused by this.
6146     #
6147     # We need to recreate these files for each test, as the compiler may
6148     # overwrite some of them when testing with obscure command lines.
6149     # This happens at least with the AIX C compiler.
6150     : > sub/conftest.c
6151     for i in 1 2 3 4 5 6; do
6152       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6153       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6154       # Solaris 10 /bin/sh.
6155       echo '/* dummy */' > sub/conftst$i.h
6156     done
6157     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6158
6159     # We check with '-c' and '-o' for the sake of the "dashmstdout"
6160     # mode.  It turns out that the SunPro C++ compiler does not properly
6161     # handle '-M -o', and we need to detect this.  Also, some Intel
6162     # versions had trouble with output in subdirs.
6163     am__obj=sub/conftest.${OBJEXT-o}
6164     am__minus_obj="-o $am__obj"
6165     case $depmode in
6166     gcc)
6167       # This depmode causes a compiler race in universal mode.
6168       test "$am__universal" = false || continue
6169       ;;
6170     nosideeffect)
6171       # After this tag, mechanisms are not by side-effect, so they'll
6172       # only be used when explicitly requested.
6173       if test "x$enable_dependency_tracking" = xyes; then
6174         continue
6175       else
6176         break
6177       fi
6178       ;;
6179     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6180       # This compiler won't grok '-c -o', but also, the minuso test has
6181       # not run yet.  These depmodes are late enough in the game, and
6182       # so weak that their functioning should not be impacted.
6183       am__obj=conftest.${OBJEXT-o}
6184       am__minus_obj=
6185       ;;
6186     none) break ;;
6187     esac
6188     if depmode=$depmode \
6189        source=sub/conftest.c object=$am__obj \
6190        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6191        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6192          >/dev/null 2>conftest.err &&
6193        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6194        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6195        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6196        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6197       # icc doesn't choke on unknown options, it will just issue warnings
6198       # or remarks (even with -Werror).  So we grep stderr for any message
6199       # that says an option was ignored or not supported.
6200       # When given -MP, icc 7.0 and 7.1 complain thusly:
6201       #   icc: Command line warning: ignoring option '-M'; no argument required
6202       # The diagnosis changed in icc 8.0:
6203       #   icc: Command line remark: option '-MP' not supported
6204       if (grep 'ignoring option' conftest.err ||
6205           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6206         am_cv_CXX_dependencies_compiler_type=$depmode
6207         break
6208       fi
6209     fi
6210   done
6211
6212   cd ..
6213   rm -rf conftest.dir
6214 else
6215   am_cv_CXX_dependencies_compiler_type=none
6216 fi
6217
6218 fi
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
6220 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
6221 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
6222
6223  if
6224   test "x$enable_dependency_tracking" != xno \
6225   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
6226   am__fastdepCXX_TRUE=
6227   am__fastdepCXX_FALSE='#'
6228 else
6229   am__fastdepCXX_TRUE='#'
6230   am__fastdepCXX_FALSE=
6231 fi
6232
6233
6234
6235 # Gnulib (early checks).
6236
6237 ac_ext=c
6238 ac_cpp='$CPP $CPPFLAGS'
6239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6243 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6244 # On Suns, sometimes $CPP names a directory.
6245 if test -n "$CPP" && test -d "$CPP"; then
6246   CPP=
6247 fi
6248 if test -z "$CPP"; then
6249   if ${ac_cv_prog_CPP+:} false; then :
6250   $as_echo_n "(cached) " >&6
6251 else
6252       # Double quotes because CPP needs to be expanded
6253     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6254     do
6255       ac_preproc_ok=false
6256 for ac_c_preproc_warn_flag in '' yes
6257 do
6258   # Use a header file that comes with gcc, so configuring glibc
6259   # with a fresh cross-compiler works.
6260   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6261   # <limits.h> exists even on freestanding compilers.
6262   # On the NeXT, cc -E runs the code through the compiler's parser,
6263   # not just through cpp. "Syntax error" is here to catch this case.
6264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6265 /* end confdefs.h.  */
6266 #ifdef __STDC__
6267 # include <limits.h>
6268 #else
6269 # include <assert.h>
6270 #endif
6271                      Syntax error
6272 _ACEOF
6273 if ac_fn_c_try_cpp "$LINENO"; then :
6274
6275 else
6276   # Broken: fails on valid input.
6277 continue
6278 fi
6279 rm -f conftest.err conftest.i conftest.$ac_ext
6280
6281   # OK, works on sane cases.  Now check whether nonexistent headers
6282   # can be detected and how.
6283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h.  */
6285 #include <ac_nonexistent.h>
6286 _ACEOF
6287 if ac_fn_c_try_cpp "$LINENO"; then :
6288   # Broken: success on invalid input.
6289 continue
6290 else
6291   # Passes both tests.
6292 ac_preproc_ok=:
6293 break
6294 fi
6295 rm -f conftest.err conftest.i conftest.$ac_ext
6296
6297 done
6298 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6299 rm -f conftest.i conftest.err conftest.$ac_ext
6300 if $ac_preproc_ok; then :
6301   break
6302 fi
6303
6304     done
6305     ac_cv_prog_CPP=$CPP
6306
6307 fi
6308   CPP=$ac_cv_prog_CPP
6309 else
6310   ac_cv_prog_CPP=$CPP
6311 fi
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6313 $as_echo "$CPP" >&6; }
6314 ac_preproc_ok=false
6315 for ac_c_preproc_warn_flag in '' yes
6316 do
6317   # Use a header file that comes with gcc, so configuring glibc
6318   # with a fresh cross-compiler works.
6319   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6320   # <limits.h> exists even on freestanding compilers.
6321   # On the NeXT, cc -E runs the code through the compiler's parser,
6322   # not just through cpp. "Syntax error" is here to catch this case.
6323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6324 /* end confdefs.h.  */
6325 #ifdef __STDC__
6326 # include <limits.h>
6327 #else
6328 # include <assert.h>
6329 #endif
6330                      Syntax error
6331 _ACEOF
6332 if ac_fn_c_try_cpp "$LINENO"; then :
6333
6334 else
6335   # Broken: fails on valid input.
6336 continue
6337 fi
6338 rm -f conftest.err conftest.i conftest.$ac_ext
6339
6340   # OK, works on sane cases.  Now check whether nonexistent headers
6341   # can be detected and how.
6342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6343 /* end confdefs.h.  */
6344 #include <ac_nonexistent.h>
6345 _ACEOF
6346 if ac_fn_c_try_cpp "$LINENO"; then :
6347   # Broken: success on invalid input.
6348 continue
6349 else
6350   # Passes both tests.
6351 ac_preproc_ok=:
6352 break
6353 fi
6354 rm -f conftest.err conftest.i conftest.$ac_ext
6355
6356 done
6357 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6358 rm -f conftest.i conftest.err conftest.$ac_ext
6359 if $ac_preproc_ok; then :
6360
6361 else
6362   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6363 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6364 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6365 See \`config.log' for more details" "$LINENO" 5; }
6366 fi
6367
6368 ac_ext=c
6369 ac_cpp='$CPP $CPPFLAGS'
6370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6373
6374
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6376 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6377 if ${ac_cv_path_GREP+:} false; then :
6378   $as_echo_n "(cached) " >&6
6379 else
6380   if test -z "$GREP"; then
6381   ac_path_GREP_found=false
6382   # Loop through the user's path and test for each of PROGNAME-LIST
6383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6385 do
6386   IFS=$as_save_IFS
6387   test -z "$as_dir" && as_dir=.
6388     for ac_prog in grep ggrep; do
6389     for ac_exec_ext in '' $ac_executable_extensions; do
6390       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6391       as_fn_executable_p "$ac_path_GREP" || continue
6392 # Check for GNU ac_path_GREP and select it if it is found.
6393   # Check for GNU $ac_path_GREP
6394 case `"$ac_path_GREP" --version 2>&1` in
6395 *GNU*)
6396   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6397 *)
6398   ac_count=0
6399   $as_echo_n 0123456789 >"conftest.in"
6400   while :
6401   do
6402     cat "conftest.in" "conftest.in" >"conftest.tmp"
6403     mv "conftest.tmp" "conftest.in"
6404     cp "conftest.in" "conftest.nl"
6405     $as_echo 'GREP' >> "conftest.nl"
6406     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6407     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6408     as_fn_arith $ac_count + 1 && ac_count=$as_val
6409     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6410       # Best one so far, save it but keep looking for a better one
6411       ac_cv_path_GREP="$ac_path_GREP"
6412       ac_path_GREP_max=$ac_count
6413     fi
6414     # 10*(2^10) chars as input seems more than enough
6415     test $ac_count -gt 10 && break
6416   done
6417   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6418 esac
6419
6420       $ac_path_GREP_found && break 3
6421     done
6422   done
6423   done
6424 IFS=$as_save_IFS
6425   if test -z "$ac_cv_path_GREP"; then
6426     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6427   fi
6428 else
6429   ac_cv_path_GREP=$GREP
6430 fi
6431
6432 fi
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6434 $as_echo "$ac_cv_path_GREP" >&6; }
6435  GREP="$ac_cv_path_GREP"
6436
6437
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6439 $as_echo_n "checking for egrep... " >&6; }
6440 if ${ac_cv_path_EGREP+:} false; then :
6441   $as_echo_n "(cached) " >&6
6442 else
6443   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6444    then ac_cv_path_EGREP="$GREP -E"
6445    else
6446      if test -z "$EGREP"; then
6447   ac_path_EGREP_found=false
6448   # Loop through the user's path and test for each of PROGNAME-LIST
6449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6451 do
6452   IFS=$as_save_IFS
6453   test -z "$as_dir" && as_dir=.
6454     for ac_prog in egrep; do
6455     for ac_exec_ext in '' $ac_executable_extensions; do
6456       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6457       as_fn_executable_p "$ac_path_EGREP" || continue
6458 # Check for GNU ac_path_EGREP and select it if it is found.
6459   # Check for GNU $ac_path_EGREP
6460 case `"$ac_path_EGREP" --version 2>&1` in
6461 *GNU*)
6462   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6463 *)
6464   ac_count=0
6465   $as_echo_n 0123456789 >"conftest.in"
6466   while :
6467   do
6468     cat "conftest.in" "conftest.in" >"conftest.tmp"
6469     mv "conftest.tmp" "conftest.in"
6470     cp "conftest.in" "conftest.nl"
6471     $as_echo 'EGREP' >> "conftest.nl"
6472     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6473     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6474     as_fn_arith $ac_count + 1 && ac_count=$as_val
6475     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6476       # Best one so far, save it but keep looking for a better one
6477       ac_cv_path_EGREP="$ac_path_EGREP"
6478       ac_path_EGREP_max=$ac_count
6479     fi
6480     # 10*(2^10) chars as input seems more than enough
6481     test $ac_count -gt 10 && break
6482   done
6483   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6484 esac
6485
6486       $ac_path_EGREP_found && break 3
6487     done
6488   done
6489   done
6490 IFS=$as_save_IFS
6491   if test -z "$ac_cv_path_EGREP"; then
6492     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6493   fi
6494 else
6495   ac_cv_path_EGREP=$EGREP
6496 fi
6497
6498    fi
6499 fi
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6501 $as_echo "$ac_cv_path_EGREP" >&6; }
6502  EGREP="$ac_cv_path_EGREP"
6503
6504
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6506 $as_echo_n "checking for ANSI C header files... " >&6; }
6507 if ${ac_cv_header_stdc+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511 /* end confdefs.h.  */
6512 #include <stdlib.h>
6513 #include <stdarg.h>
6514 #include <string.h>
6515 #include <float.h>
6516
6517 int
6518 main ()
6519 {
6520
6521   ;
6522   return 0;
6523 }
6524 _ACEOF
6525 if ac_fn_c_try_compile "$LINENO"; then :
6526   ac_cv_header_stdc=yes
6527 else
6528   ac_cv_header_stdc=no
6529 fi
6530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6531
6532 if test $ac_cv_header_stdc = yes; then
6533   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6534   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6535 /* end confdefs.h.  */
6536 #include <string.h>
6537
6538 _ACEOF
6539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6540   $EGREP "memchr" >/dev/null 2>&1; then :
6541
6542 else
6543   ac_cv_header_stdc=no
6544 fi
6545 rm -f conftest*
6546
6547 fi
6548
6549 if test $ac_cv_header_stdc = yes; then
6550   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h.  */
6553 #include <stdlib.h>
6554
6555 _ACEOF
6556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6557   $EGREP "free" >/dev/null 2>&1; then :
6558
6559 else
6560   ac_cv_header_stdc=no
6561 fi
6562 rm -f conftest*
6563
6564 fi
6565
6566 if test $ac_cv_header_stdc = yes; then
6567   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6568   if test "$cross_compiling" = yes; then :
6569   :
6570 else
6571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6572 /* end confdefs.h.  */
6573 #include <ctype.h>
6574 #include <stdlib.h>
6575 #if ((' ' & 0x0FF) == 0x020)
6576 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6577 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6578 #else
6579 # define ISLOWER(c) \
6580                    (('a' <= (c) && (c) <= 'i') \
6581                      || ('j' <= (c) && (c) <= 'r') \
6582                      || ('s' <= (c) && (c) <= 'z'))
6583 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6584 #endif
6585
6586 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6587 int
6588 main ()
6589 {
6590   int i;
6591   for (i = 0; i < 256; i++)
6592     if (XOR (islower (i), ISLOWER (i))
6593         || toupper (i) != TOUPPER (i))
6594       return 2;
6595   return 0;
6596 }
6597 _ACEOF
6598 if ac_fn_c_try_run "$LINENO"; then :
6599
6600 else
6601   ac_cv_header_stdc=no
6602 fi
6603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6604   conftest.$ac_objext conftest.beam conftest.$ac_ext
6605 fi
6606
6607 fi
6608 fi
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6610 $as_echo "$ac_cv_header_stdc" >&6; }
6611 if test $ac_cv_header_stdc = yes; then
6612
6613 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6614
6615 fi
6616
6617 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6618 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6619                   inttypes.h stdint.h unistd.h
6620 do :
6621   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6622 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6623 "
6624 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6625   cat >>confdefs.h <<_ACEOF
6626 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6627 _ACEOF
6628
6629 fi
6630
6631 done
6632
6633
6634
6635   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6636 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6637   MINIX=yes
6638 else
6639   MINIX=
6640 fi
6641
6642
6643   if test "$MINIX" = yes; then
6644
6645 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6646
6647
6648 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6649
6650
6651 $as_echo "#define _MINIX 1" >>confdefs.h
6652
6653
6654 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6655
6656   fi
6657
6658
6659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6660 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6661 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6662   $as_echo_n "(cached) " >&6
6663 else
6664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6665 /* end confdefs.h.  */
6666
6667 #         define __EXTENSIONS__ 1
6668           $ac_includes_default
6669 int
6670 main ()
6671 {
6672
6673   ;
6674   return 0;
6675 }
6676 _ACEOF
6677 if ac_fn_c_try_compile "$LINENO"; then :
6678   ac_cv_safe_to_define___extensions__=yes
6679 else
6680   ac_cv_safe_to_define___extensions__=no
6681 fi
6682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6683 fi
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6685 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6686   test $ac_cv_safe_to_define___extensions__ = yes &&
6687     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6688
6689   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6690
6691   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6692
6693   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6694
6695   $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6696
6697   $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
6698
6699   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6700
6701   $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6702
6703   $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6704
6705   $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6706
6707   $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6708
6709   $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6710
6711   $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6712
6713   $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6714
6715   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6716
6717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6718 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6719 if ${ac_cv_should_define__xopen_source+:} false; then :
6720   $as_echo_n "(cached) " >&6
6721 else
6722   ac_cv_should_define__xopen_source=no
6723      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6724 /* end confdefs.h.  */
6725
6726           #include <wchar.h>
6727           mbstate_t x;
6728 int
6729 main ()
6730 {
6731
6732   ;
6733   return 0;
6734 }
6735 _ACEOF
6736 if ac_fn_c_try_compile "$LINENO"; then :
6737
6738 else
6739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6740 /* end confdefs.h.  */
6741
6742              #define _XOPEN_SOURCE 500
6743              #include <wchar.h>
6744              mbstate_t x;
6745 int
6746 main ()
6747 {
6748
6749   ;
6750   return 0;
6751 }
6752 _ACEOF
6753 if ac_fn_c_try_compile "$LINENO"; then :
6754   ac_cv_should_define__xopen_source=yes
6755 fi
6756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6757 fi
6758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6759 fi
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6761 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6762   test $ac_cv_should_define__xopen_source = yes &&
6763     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6764
6765   $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6778 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6779 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6780   $as_echo_n "(cached) " >&6
6781 else
6782
6783       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6784 /* end confdefs.h.  */
6785
6786 #ifdef __ACK__
6787 Amsterdam
6788 #endif
6789
6790 _ACEOF
6791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6792   $EGREP "Amsterdam" >/dev/null 2>&1; then :
6793   gl_cv_c_amsterdam_compiler=yes
6794 else
6795   gl_cv_c_amsterdam_compiler=no
6796 fi
6797 rm -f conftest*
6798
6799
6800 fi
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6802 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6803
6804       if test $gl_cv_c_amsterdam_compiler = yes; then
6805     if test -z "$AR"; then
6806       AR='cc -c.a'
6807     fi
6808     if test -z "$ARFLAGS"; then
6809       ARFLAGS='-o'
6810     fi
6811   else
6812                                                 :
6813   fi
6814
6815         if test -n "$ac_tool_prefix"; then
6816   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6817 set dummy ${ac_tool_prefix}ar; ac_word=$2
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819 $as_echo_n "checking for $ac_word... " >&6; }
6820 if ${ac_cv_prog_AR+:} false; then :
6821   $as_echo_n "(cached) " >&6
6822 else
6823   if test -n "$AR"; then
6824   ac_cv_prog_AR="$AR" # Let the user override the test.
6825 else
6826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6827 for as_dir in $PATH
6828 do
6829   IFS=$as_save_IFS
6830   test -z "$as_dir" && as_dir=.
6831     for ac_exec_ext in '' $ac_executable_extensions; do
6832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6833     ac_cv_prog_AR="${ac_tool_prefix}ar"
6834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6835     break 2
6836   fi
6837 done
6838   done
6839 IFS=$as_save_IFS
6840
6841 fi
6842 fi
6843 AR=$ac_cv_prog_AR
6844 if test -n "$AR"; then
6845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6846 $as_echo "$AR" >&6; }
6847 else
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6850 fi
6851
6852
6853 fi
6854 if test -z "$ac_cv_prog_AR"; then
6855   ac_ct_AR=$AR
6856   # Extract the first word of "ar", so it can be a program name with args.
6857 set dummy ar; ac_word=$2
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6859 $as_echo_n "checking for $ac_word... " >&6; }
6860 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6861   $as_echo_n "(cached) " >&6
6862 else
6863   if test -n "$ac_ct_AR"; then
6864   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6865 else
6866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867 for as_dir in $PATH
6868 do
6869   IFS=$as_save_IFS
6870   test -z "$as_dir" && as_dir=.
6871     for ac_exec_ext in '' $ac_executable_extensions; do
6872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873     ac_cv_prog_ac_ct_AR="ar"
6874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875     break 2
6876   fi
6877 done
6878   done
6879 IFS=$as_save_IFS
6880
6881 fi
6882 fi
6883 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6884 if test -n "$ac_ct_AR"; then
6885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6886 $as_echo "$ac_ct_AR" >&6; }
6887 else
6888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6889 $as_echo "no" >&6; }
6890 fi
6891
6892   if test "x$ac_ct_AR" = x; then
6893     AR="ar"
6894   else
6895     case $cross_compiling:$ac_tool_warned in
6896 yes:)
6897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6898 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6899 ac_tool_warned=yes ;;
6900 esac
6901     AR=$ac_ct_AR
6902   fi
6903 else
6904   AR="$ac_cv_prog_AR"
6905 fi
6906
6907   if test -z "$ARFLAGS"; then
6908     ARFLAGS='cr'
6909   fi
6910
6911
6912
6913   if test -z "$RANLIB"; then
6914     if test $gl_cv_c_amsterdam_compiler = yes; then
6915       RANLIB=':'
6916     else
6917             if test -n "$ac_tool_prefix"; then
6918   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6919 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6921 $as_echo_n "checking for $ac_word... " >&6; }
6922 if ${ac_cv_prog_RANLIB+:} false; then :
6923   $as_echo_n "(cached) " >&6
6924 else
6925   if test -n "$RANLIB"; then
6926   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6927 else
6928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929 for as_dir in $PATH
6930 do
6931   IFS=$as_save_IFS
6932   test -z "$as_dir" && as_dir=.
6933     for ac_exec_ext in '' $ac_executable_extensions; do
6934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937     break 2
6938   fi
6939 done
6940   done
6941 IFS=$as_save_IFS
6942
6943 fi
6944 fi
6945 RANLIB=$ac_cv_prog_RANLIB
6946 if test -n "$RANLIB"; then
6947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6948 $as_echo "$RANLIB" >&6; }
6949 else
6950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951 $as_echo "no" >&6; }
6952 fi
6953
6954
6955 fi
6956 if test -z "$ac_cv_prog_RANLIB"; then
6957   ac_ct_RANLIB=$RANLIB
6958   # Extract the first word of "ranlib", so it can be a program name with args.
6959 set dummy ranlib; ac_word=$2
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6961 $as_echo_n "checking for $ac_word... " >&6; }
6962 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6963   $as_echo_n "(cached) " >&6
6964 else
6965   if test -n "$ac_ct_RANLIB"; then
6966   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6967 else
6968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6969 for as_dir in $PATH
6970 do
6971   IFS=$as_save_IFS
6972   test -z "$as_dir" && as_dir=.
6973     for ac_exec_ext in '' $ac_executable_extensions; do
6974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6975     ac_cv_prog_ac_ct_RANLIB="ranlib"
6976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6977     break 2
6978   fi
6979 done
6980   done
6981 IFS=$as_save_IFS
6982
6983 fi
6984 fi
6985 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6986 if test -n "$ac_ct_RANLIB"; then
6987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6988 $as_echo "$ac_ct_RANLIB" >&6; }
6989 else
6990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6991 $as_echo "no" >&6; }
6992 fi
6993
6994   if test "x$ac_ct_RANLIB" = x; then
6995     RANLIB=":"
6996   else
6997     case $cross_compiling:$ac_tool_warned in
6998 yes:)
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7000 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7001 ac_tool_warned=yes ;;
7002 esac
7003     RANLIB=$ac_ct_RANLIB
7004   fi
7005 else
7006   RANLIB="$ac_cv_prog_RANLIB"
7007 fi
7008
7009     fi
7010   fi
7011
7012
7013
7014 # Make sure we can run config.sub.
7015 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
7016   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
7017
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7019 $as_echo_n "checking build system type... " >&6; }
7020 if ${ac_cv_build+:} false; then :
7021   $as_echo_n "(cached) " >&6
7022 else
7023   ac_build_alias=$build_alias
7024 test "x$ac_build_alias" = x &&
7025   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
7026 test "x$ac_build_alias" = x &&
7027   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7028 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
7029   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
7030
7031 fi
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7033 $as_echo "$ac_cv_build" >&6; }
7034 case $ac_cv_build in
7035 *-*-*) ;;
7036 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7037 esac
7038 build=$ac_cv_build
7039 ac_save_IFS=$IFS; IFS='-'
7040 set x $ac_cv_build
7041 shift
7042 build_cpu=$1
7043 build_vendor=$2
7044 shift; shift
7045 # Remember, the first character of IFS is used to create $*,
7046 # except with old shells:
7047 build_os=$*
7048 IFS=$ac_save_IFS
7049 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7050
7051
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7053 $as_echo_n "checking host system type... " >&6; }
7054 if ${ac_cv_host+:} false; then :
7055   $as_echo_n "(cached) " >&6
7056 else
7057   if test "x$host_alias" = x; then
7058   ac_cv_host=$ac_cv_build
7059 else
7060   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
7061     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
7062 fi
7063
7064 fi
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7066 $as_echo "$ac_cv_host" >&6; }
7067 case $ac_cv_host in
7068 *-*-*) ;;
7069 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7070 esac
7071 host=$ac_cv_host
7072 ac_save_IFS=$IFS; IFS='-'
7073 set x $ac_cv_host
7074 shift
7075 host_cpu=$1
7076 host_vendor=$2
7077 shift; shift
7078 # Remember, the first character of IFS is used to create $*,
7079 # except with old shells:
7080 host_os=$*
7081 IFS=$ac_save_IFS
7082 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7083
7084
7085
7086
7087
7088   # IEEE behaviour is the default on all CPUs except Alpha and SH
7089   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
7090   # and the GCC 4.1.2 manual).
7091   case "$host_cpu" in
7092     alpha*)
7093       # On Alpha systems, a compiler option provides the behaviour.
7094       # See the ieee(3) manual page, also available at
7095       # <https://backdrift.org/man/tru64/man3/ieee.3.html>
7096       if test -n "$GCC"; then
7097         # GCC has the option -mieee.
7098         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
7099         CPPFLAGS="$CPPFLAGS -mieee"
7100       else
7101         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
7102         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
7103         CPPFLAGS="$CPPFLAGS -ieee"
7104       fi
7105       ;;
7106     sh*)
7107       if test -n "$GCC"; then
7108         # GCC has the option -mieee.
7109         CPPFLAGS="$CPPFLAGS -mieee"
7110       fi
7111       ;;
7112   esac
7113
7114 # Check whether --enable-largefile was given.
7115 if test "${enable_largefile+set}" = set; then :
7116   enableval=$enable_largefile;
7117 fi
7118
7119 if test "$enable_largefile" != no; then
7120
7121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7122 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7123 if ${ac_cv_sys_largefile_CC+:} false; then :
7124   $as_echo_n "(cached) " >&6
7125 else
7126   ac_cv_sys_largefile_CC=no
7127      if test "$GCC" != yes; then
7128        ac_save_CC=$CC
7129        while :; do
7130          # IRIX 6.2 and later do not support large files by default,
7131          # so use the C compiler's -n32 option if that helps.
7132          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7133 /* end confdefs.h.  */
7134 #include <sys/types.h>
7135  /* Check that off_t can represent 2**63 - 1 correctly.
7136     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7137     since some C++ compilers masquerading as C compilers
7138     incorrectly reject 9223372036854775807.  */
7139 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7140   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7141                        && LARGE_OFF_T % 2147483647 == 1)
7142                       ? 1 : -1];
7143 int
7144 main ()
7145 {
7146
7147   ;
7148   return 0;
7149 }
7150 _ACEOF
7151          if ac_fn_c_try_compile "$LINENO"; then :
7152   break
7153 fi
7154 rm -f core conftest.err conftest.$ac_objext
7155          CC="$CC -n32"
7156          if ac_fn_c_try_compile "$LINENO"; then :
7157   ac_cv_sys_largefile_CC=' -n32'; break
7158 fi
7159 rm -f core conftest.err conftest.$ac_objext
7160          break
7161        done
7162        CC=$ac_save_CC
7163        rm -f conftest.$ac_ext
7164     fi
7165 fi
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7167 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7168   if test "$ac_cv_sys_largefile_CC" != no; then
7169     CC=$CC$ac_cv_sys_largefile_CC
7170   fi
7171
7172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7173 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7174 if ${ac_cv_sys_file_offset_bits+:} false; then :
7175   $as_echo_n "(cached) " >&6
7176 else
7177   while :; do
7178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7179 /* end confdefs.h.  */
7180 #include <sys/types.h>
7181  /* Check that off_t can represent 2**63 - 1 correctly.
7182     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7183     since some C++ compilers masquerading as C compilers
7184     incorrectly reject 9223372036854775807.  */
7185 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7186   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7187                        && LARGE_OFF_T % 2147483647 == 1)
7188                       ? 1 : -1];
7189 int
7190 main ()
7191 {
7192
7193   ;
7194   return 0;
7195 }
7196 _ACEOF
7197 if ac_fn_c_try_compile "$LINENO"; then :
7198   ac_cv_sys_file_offset_bits=no; break
7199 fi
7200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7202 /* end confdefs.h.  */
7203 #define _FILE_OFFSET_BITS 64
7204 #include <sys/types.h>
7205  /* Check that off_t can represent 2**63 - 1 correctly.
7206     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7207     since some C++ compilers masquerading as C compilers
7208     incorrectly reject 9223372036854775807.  */
7209 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7210   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7211                        && LARGE_OFF_T % 2147483647 == 1)
7212                       ? 1 : -1];
7213 int
7214 main ()
7215 {
7216
7217   ;
7218   return 0;
7219 }
7220 _ACEOF
7221 if ac_fn_c_try_compile "$LINENO"; then :
7222   ac_cv_sys_file_offset_bits=64; break
7223 fi
7224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225   ac_cv_sys_file_offset_bits=unknown
7226   break
7227 done
7228 fi
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7230 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7231 case $ac_cv_sys_file_offset_bits in #(
7232   no | unknown) ;;
7233   *)
7234 cat >>confdefs.h <<_ACEOF
7235 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7236 _ACEOF
7237 ;;
7238 esac
7239 rm -rf conftest*
7240   if test $ac_cv_sys_file_offset_bits = unknown; then
7241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7242 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7243 if ${ac_cv_sys_large_files+:} false; then :
7244   $as_echo_n "(cached) " >&6
7245 else
7246   while :; do
7247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7248 /* end confdefs.h.  */
7249 #include <sys/types.h>
7250  /* Check that off_t can represent 2**63 - 1 correctly.
7251     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7252     since some C++ compilers masquerading as C compilers
7253     incorrectly reject 9223372036854775807.  */
7254 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7255   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7256                        && LARGE_OFF_T % 2147483647 == 1)
7257                       ? 1 : -1];
7258 int
7259 main ()
7260 {
7261
7262   ;
7263   return 0;
7264 }
7265 _ACEOF
7266 if ac_fn_c_try_compile "$LINENO"; then :
7267   ac_cv_sys_large_files=no; break
7268 fi
7269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7271 /* end confdefs.h.  */
7272 #define _LARGE_FILES 1
7273 #include <sys/types.h>
7274  /* Check that off_t can represent 2**63 - 1 correctly.
7275     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7276     since some C++ compilers masquerading as C compilers
7277     incorrectly reject 9223372036854775807.  */
7278 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7279   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7280                        && LARGE_OFF_T % 2147483647 == 1)
7281                       ? 1 : -1];
7282 int
7283 main ()
7284 {
7285
7286   ;
7287   return 0;
7288 }
7289 _ACEOF
7290 if ac_fn_c_try_compile "$LINENO"; then :
7291   ac_cv_sys_large_files=1; break
7292 fi
7293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294   ac_cv_sys_large_files=unknown
7295   break
7296 done
7297 fi
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7299 $as_echo "$ac_cv_sys_large_files" >&6; }
7300 case $ac_cv_sys_large_files in #(
7301   no | unknown) ;;
7302   *)
7303 cat >>confdefs.h <<_ACEOF
7304 #define _LARGE_FILES $ac_cv_sys_large_files
7305 _ACEOF
7306 ;;
7307 esac
7308 rm -rf conftest*
7309   fi
7310
7311
7312 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7313
7314 fi
7315
7316
7317
7318
7319
7320
7321   # Check whether --enable-threads was given.
7322 if test "${enable_threads+set}" = set; then :
7323   enableval=$enable_threads; gl_use_threads=$enableval
7324 else
7325   if test -n "$gl_use_threads_default"; then
7326        gl_use_threads="$gl_use_threads_default"
7327      else
7328        case "$host_os" in
7329                                                                osf*) gl_use_threads=no ;;
7330          cygwin*)
7331                case `uname -r` in
7332                  1.[0-5].*) gl_use_threads=no ;;
7333                  *)         gl_use_threads=yes ;;
7334                esac
7335                ;;
7336          *)    gl_use_threads=yes ;;
7337        esac
7338      fi
7339
7340 fi
7341
7342   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7343     # For using <pthread.h>:
7344     case "$host_os" in
7345       osf*)
7346         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7347         # groks <pthread.h>. cc also understands the flag -pthread, but
7348         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7349         # 2. putting a flag into CPPFLAGS that has an effect on the linker
7350         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7351         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7352         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7353         ;;
7354     esac
7355     # Some systems optimize for single-threaded programs by default, and
7356     # need special flags to disable these optimizations. For example, the
7357     # definition of 'errno' in <errno.h>.
7358     case "$host_os" in
7359       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7360       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7361     esac
7362   fi
7363
7364
7365
7366   # Pre-early section.
7367
7368
7369
7370
7371   # Code from module absolute-header:
7372   # Code from module alignof:
7373   # Code from module alloca-opt:
7374   # Code from module announce-gen:
7375   # Code from module argmatch:
7376   # Code from module assert:
7377   # Code from module binary-io:
7378   # Code from module bitrotate:
7379   # Code from module c-ctype:
7380   # Code from module c-strcase:
7381   # Code from module c-strcaseeq:
7382   # Code from module calloc-posix:
7383   # Code from module cloexec:
7384   # Code from module close:
7385   # Code from module close-stream:
7386   # Code from module closeout:
7387   # Code from module concat-filename:
7388   # Code from module config-h:
7389   # Code from module configmake:
7390   # Code from module dirname:
7391   # Code from module dirname-lgpl:
7392   # Code from module do-release-commit-and-tag:
7393   # Code from module dosname:
7394   # Code from module double-slash-root:
7395   # Code from module dup2:
7396   # Code from module environ:
7397   # Code from module errno:
7398   # Code from module error:
7399   # Code from module exitfail:
7400   # Code from module extensions:
7401   # Code from module extern-inline:
7402   # Code from module fatal-signal:
7403   # Code from module fcntl:
7404   # Code from module fcntl-h:
7405   # Code from module fd-hook:
7406   # Code from module fd-safer-flag:
7407   # Code from module fdl:
7408   # Code from module filename:
7409   # Code from module float:
7410   # Code from module fopen:
7411   # Code from module fopen-safer:
7412   # Code from module fpending:
7413   # Code from module fpieee:
7414
7415   # Code from module fprintf-posix:
7416   # Code from module fpucw:
7417   # Code from module frexp-nolibm:
7418   # Code from module frexpl-nolibm:
7419   # Code from module fseterr:
7420   # Code from module fstat:
7421   # Code from module gendocs:
7422   # Code from module getdtablesize:
7423   # Code from module getopt-gnu:
7424   # Code from module getopt-posix:
7425   # Code from module getprogname:
7426   # Code from module gettext:
7427   # Code from module gettext-h:
7428   # Code from module git-version-gen:
7429   # Code from module gitlog-to-changelog:
7430   # Code from module gnu-web-doc-update:
7431   # Code from module gnumakefile:
7432   # Code from module gnupload:
7433   # Code from module gpl-3.0:
7434   # Code from module hard-locale:
7435   # Code from module hash:
7436   # Code from module havelib:
7437   # Code from module host-cpu-c-abi:
7438   # Code from module include_next:
7439   # Code from module intprops:
7440   # Code from module inttypes:
7441   # Code from module inttypes-incomplete:
7442   # Code from module isnan:
7443   # Code from module isnand:
7444   # Code from module isnand-nolibm:
7445   # Code from module isnanf:
7446   # Code from module isnanf-nolibm:
7447   # Code from module isnanl:
7448   # Code from module isnanl-nolibm:
7449   # Code from module javacomp-script:
7450   # Code from module javaexec-script:
7451   # Code from module largefile:
7452
7453   # Code from module ldexp:
7454   # Code from module ldexpl:
7455   # Code from module limits-h:
7456   # Code from module localcharset:
7457   # Code from module lock:
7458   # Code from module lstat:
7459   # Code from module maintainer-makefile:
7460   # Code from module malloc-gnu:
7461   # Code from module malloc-posix:
7462   # Code from module malloca:
7463   # Code from module math:
7464   # Code from module mbrtowc:
7465   # Code from module mbsinit:
7466   # Code from module mbswidth:
7467   # Code from module memchr:
7468   # Code from module minmax:
7469   # Code from module msvc-inval:
7470   # Code from module msvc-nothrow:
7471   # Code from module multiarch:
7472   # Code from module nocrash:
7473   # Code from module non-recursive-gnulib-prefix-hack:
7474   # Code from module obstack:
7475   # Code from module obstack-printf:
7476   # Code from module open:
7477   # Code from module pathmax:
7478   # Code from module perror:
7479   # Code from module pipe2:
7480   # Code from module pipe2-safer:
7481   # Code from module posix_spawn-internal:
7482   # Code from module posix_spawn_file_actions_addclose:
7483   # Code from module posix_spawn_file_actions_adddup2:
7484   # Code from module posix_spawn_file_actions_addopen:
7485   # Code from module posix_spawn_file_actions_destroy:
7486   # Code from module posix_spawn_file_actions_init:
7487   # Code from module posix_spawnattr_destroy:
7488   # Code from module posix_spawnattr_init:
7489   # Code from module posix_spawnattr_setflags:
7490   # Code from module posix_spawnattr_setsigmask:
7491   # Code from module posix_spawnp:
7492   # Code from module printf-frexp:
7493   # Code from module printf-frexpl:
7494   # Code from module printf-posix:
7495   # Code from module printf-safe:
7496   # Code from module progname:
7497   # Code from module quote:
7498   # Code from module quotearg:
7499   # Code from module quotearg-simple:
7500   # Code from module raise:
7501   # Code from module rawmemchr:
7502   # Code from module readme-release:
7503   # Code from module realloc-posix:
7504   # Code from module sched:
7505   # Code from module sigaction:
7506   # Code from module signal-h:
7507   # Code from module signbit:
7508   # Code from module sigprocmask:
7509   # Code from module size_max:
7510   # Code from module snippet/_Noreturn:
7511   # Code from module snippet/arg-nonnull:
7512   # Code from module snippet/c++defs:
7513   # Code from module snippet/warn-on-use:
7514   # Code from module snprintf:
7515   # Code from module snprintf-posix:
7516   # Code from module spawn:
7517   # Code from module spawn-pipe:
7518   # Code from module sprintf-posix:
7519   # Code from module ssize_t:
7520   # Code from module stat:
7521   # Code from module stat-time:
7522   # Code from module stdbool:
7523   # Code from module stddef:
7524   # Code from module stdint:
7525   # Code from module stdio:
7526   # Code from module stdlib:
7527   # Code from module stpcpy:
7528   # Code from module strchrnul:
7529   # Code from module strdup-posix:
7530   # Code from module streq:
7531   # Code from module strerror:
7532   # Code from module strerror-override:
7533   # Code from module strerror_r-posix:
7534   # Code from module string:
7535   # Code from module strndup:
7536   # Code from module strnlen:
7537   # Code from module strverscmp:
7538   # Code from module sys_stat:
7539   # Code from module sys_types:
7540   # Code from module sys_wait:
7541   # Code from module threadlib:
7542
7543
7544
7545   # Code from module time:
7546   # Code from module unistd:
7547   # Code from module unistd-safer:
7548   # Code from module unitypes:
7549   # Code from module uniwidth/base:
7550   # Code from module uniwidth/width:
7551   # Code from module unlink:
7552   # Code from module unlocked-io:
7553   # Code from module unsetenv:
7554   # Code from module update-copyright:
7555   # Code from module useless-if-before-free:
7556   # Code from module vasnprintf:
7557   # Code from module vc-list-files:
7558   # Code from module verify:
7559   # Code from module vfprintf-posix:
7560   # Code from module vsnprintf:
7561   # Code from module vsnprintf-posix:
7562   # Code from module vsprintf-posix:
7563   # Code from module wait-process:
7564   # Code from module waitpid:
7565   # Code from module warnings:
7566   # Code from module wchar:
7567   # Code from module wctype-h:
7568   # Code from module wcwidth:
7569   # Code from module xalloc:
7570   # Code from module xalloc-die:
7571   # Code from module xalloc-oversized:
7572   # Code from module xconcat-filename:
7573   # Code from module xmemdup0:
7574   # Code from module xsize:
7575   # Code from module xstrndup:
7576
7577
7578 # Gnulib uses '#pragma GCC diagnostic push' to silence some
7579 # warnings, but older gcc doesn't support this.
7580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
7581 $as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
7582 if ${lv_cv_gcc_pragma_push_works+:} false; then :
7583   $as_echo_n "(cached) " >&6
7584 else
7585
7586   save_CFLAGS=$CFLAGS
7587   CFLAGS='-Wunknown-pragmas -Werror'
7588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h.  */
7590
7591     #pragma GCC diagnostic push
7592     #pragma GCC diagnostic pop
7593
7594 int
7595 main ()
7596 {
7597
7598   ;
7599   return 0;
7600 }
7601 _ACEOF
7602 if ac_fn_c_try_compile "$LINENO"; then :
7603   lv_cv_gcc_pragma_push_works=yes
7604 else
7605   lv_cv_gcc_pragma_push_works=no
7606 fi
7607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7608   CFLAGS=$save_CFLAGS
7609 fi
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lv_cv_gcc_pragma_push_works" >&5
7611 $as_echo "$lv_cv_gcc_pragma_push_works" >&6; }
7612
7613 # Check whether --enable-gcc-warnings was given.
7614 if test "${enable_gcc_warnings+set}" = set; then :
7615   enableval=$enable_gcc_warnings; case $enable_gcc_warnings in
7616    yes|no) ;;
7617    *)  as_fn_error $? "invalid value for --gcc-warnings: $enable_gcc_warnings" "$LINENO" 5;;
7618  esac
7619 else
7620   enable_gcc_warnings=no
7621 fi
7622
7623  if test "$enable_gcc_warnings" = yes; then
7624   ENABLE_GCC_WARNINGS_TRUE=
7625   ENABLE_GCC_WARNINGS_FALSE='#'
7626 else
7627   ENABLE_GCC_WARNINGS_TRUE='#'
7628   ENABLE_GCC_WARNINGS_FALSE=
7629 fi
7630
7631 if test "$enable_gcc_warnings" = yes; then
7632   warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation
7633     -Wformat -Wnull-dereference -Wpointer-arith -Wwrite-strings'
7634   warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
7635   warn_cxx='-Wnoexcept'
7636   # Warnings for the test suite only.
7637   #
7638   # -fno-color-diagnostics: Clang's use of colors in the error
7639   # messages is confusing the tests looking at the compiler's output
7640   # (e.g., synclines.at).
7641   #
7642   # -Wno-keyword-macro: We use the "#define private public" dirty
7643   # trick in the test suite to check some private implementation
7644   # details for lalr1.cc.
7645   warn_tests='-Wundef -pedantic -Wdeprecated -Wsign-compare -fno-color-diagnostics
7646     -Wno-keyword-macro'
7647
7648   ac_ext=c
7649 ac_cpp='$CPP $CPPFLAGS'
7650 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7651 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7652 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7653
7654   # Clang supports many of GCC's -W options, but only issues warnings
7655   # on the ones it does not recognize.  In that case, gl_WARN_ADD
7656   # thinks the option is supported, and unknown options are then added
7657   # to CFLAGS.  But then, when -Werror is added in the test suite for
7658   # instance, the warning about the unknown option turns into an
7659   # error.
7660   #
7661   # This should be addressed by gnulib's gl_WARN_ADD, but in the
7662   # meanwhile, turn warnings about unknown options into errors in
7663   # CFLAGS, and restore CFLAGS after the tests.
7664   save_CFLAGS=$CFLAGS
7665
7666   ac_ext=c
7667 ac_cpp='$CPP $CPPFLAGS'
7668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7671
7672
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7674 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7675 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
7676   $as_echo_n "(cached) " >&6
7677 else
7678
7679   gl_save_compiler_FLAGS="$CFLAGS"
7680   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7682 /* end confdefs.h.  */
7683
7684 int
7685 main ()
7686 {
7687
7688   ;
7689   return 0;
7690 }
7691 _ACEOF
7692 if ac_fn_c_try_link "$LINENO"; then :
7693   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7694 else
7695   gl_cv_warn_c__Werror__Wunknown_warning_option=no
7696 fi
7697 rm -f core conftest.err conftest.$ac_objext \
7698     conftest$ac_exeext conftest.$ac_ext
7699   CFLAGS="$gl_save_compiler_FLAGS"
7700
7701 fi
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7703 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7704 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
7705   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7706 else
7707   gl_unknown_warnings_are_errors=
7708 fi
7709
7710   ac_ext=c
7711 ac_cpp='$CPP $CPPFLAGS'
7712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7715
7716
7717
7718
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror=unknown-warning-option" >&5
7720 $as_echo_n "checking whether C compiler handles -Werror=unknown-warning-option... " >&6; }
7721 if ${gl_cv_warn_c__Werror_unknown_warning_option+:} false; then :
7722   $as_echo_n "(cached) " >&6
7723 else
7724
7725   gl_save_compiler_FLAGS="$CFLAGS"
7726   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror=unknown-warning-option"
7727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728 /* end confdefs.h.  */
7729
7730 int
7731 main ()
7732 {
7733
7734   ;
7735   return 0;
7736 }
7737 _ACEOF
7738 if ac_fn_c_try_link "$LINENO"; then :
7739   gl_cv_warn_c__Werror_unknown_warning_option=yes
7740 else
7741   gl_cv_warn_c__Werror_unknown_warning_option=no
7742 fi
7743 rm -f core conftest.err conftest.$ac_objext \
7744     conftest$ac_exeext conftest.$ac_ext
7745   CFLAGS="$gl_save_compiler_FLAGS"
7746
7747 fi
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror_unknown_warning_option" >&5
7749 $as_echo "$gl_cv_warn_c__Werror_unknown_warning_option" >&6; }
7750 if test "x$gl_cv_warn_c__Werror_unknown_warning_option" = xyes; then :
7751   as_fn_append CFLAGS " -Werror=unknown-warning-option"
7752 fi
7753
7754
7755   for i in $warn_common $warn_c;
7756   do
7757
7758
7759 as_gl_Warn=`$as_echo "gl_cv_warn_c_$i" | $as_tr_sh`
7760 gl_positive="$i"
7761 case $gl_positive in
7762   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7763 esac
7764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $i" >&5
7765 $as_echo_n "checking whether C compiler handles $i... " >&6; }
7766 if eval \${$as_gl_Warn+:} false; then :
7767   $as_echo_n "(cached) " >&6
7768 else
7769
7770   gl_save_compiler_FLAGS="$CFLAGS"
7771   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7773 /* end confdefs.h.  */
7774
7775 int
7776 main ()
7777 {
7778
7779   ;
7780   return 0;
7781 }
7782 _ACEOF
7783 if ac_fn_c_try_link "$LINENO"; then :
7784   eval "$as_gl_Warn=yes"
7785 else
7786   eval "$as_gl_Warn=no"
7787 fi
7788 rm -f core conftest.err conftest.$ac_objext \
7789     conftest$ac_exeext conftest.$ac_ext
7790   CFLAGS="$gl_save_compiler_FLAGS"
7791
7792 fi
7793 eval ac_res=\$$as_gl_Warn
7794                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7795 $as_echo "$ac_res" >&6; }
7796 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
7797   as_fn_append WARN_CFLAGS " $i"
7798 fi
7799
7800
7801   done
7802
7803
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7805 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7806 if ${gl_cv_warn_c__Werror+:} false; then :
7807   $as_echo_n "(cached) " >&6
7808 else
7809
7810   gl_save_compiler_FLAGS="$CFLAGS"
7811   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813 /* end confdefs.h.  */
7814
7815 int
7816 main ()
7817 {
7818
7819   ;
7820   return 0;
7821 }
7822 _ACEOF
7823 if ac_fn_c_try_link "$LINENO"; then :
7824   gl_cv_warn_c__Werror=yes
7825 else
7826   gl_cv_warn_c__Werror=no
7827 fi
7828 rm -f core conftest.err conftest.$ac_objext \
7829     conftest$ac_exeext conftest.$ac_ext
7830   CFLAGS="$gl_save_compiler_FLAGS"
7831
7832 fi
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7834 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7835 if test "x$gl_cv_warn_c__Werror" = xyes; then :
7836   as_fn_append WERROR_CFLAGS " -Werror"
7837 fi
7838
7839
7840
7841   # Warnings for the test suite, and maybe for bison if GCC is modern
7842   # enough.
7843
7844
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-declarations" >&5
7846 $as_echo_n "checking whether C compiler handles -Wmissing-declarations... " >&6; }
7847 if ${gl_cv_warn_c__Wmissing_declarations+:} false; then :
7848   $as_echo_n "(cached) " >&6
7849 else
7850
7851   gl_save_compiler_FLAGS="$CFLAGS"
7852   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-declarations"
7853   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7854 /* end confdefs.h.  */
7855
7856 int
7857 main ()
7858 {
7859
7860   ;
7861   return 0;
7862 }
7863 _ACEOF
7864 if ac_fn_c_try_link "$LINENO"; then :
7865   gl_cv_warn_c__Wmissing_declarations=yes
7866 else
7867   gl_cv_warn_c__Wmissing_declarations=no
7868 fi
7869 rm -f core conftest.err conftest.$ac_objext \
7870     conftest$ac_exeext conftest.$ac_ext
7871   CFLAGS="$gl_save_compiler_FLAGS"
7872
7873 fi
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wmissing_declarations" >&5
7875 $as_echo "$gl_cv_warn_c__Wmissing_declarations" >&6; }
7876 if test "x$gl_cv_warn_c__Wmissing_declarations" = xyes; then :
7877   as_fn_append WARN_CFLAGS_TEST " -Wmissing-declarations"
7878 fi
7879
7880
7881
7882
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-prototypes" >&5
7884 $as_echo_n "checking whether C compiler handles -Wmissing-prototypes... " >&6; }
7885 if ${gl_cv_warn_c__Wmissing_prototypes+:} false; then :
7886   $as_echo_n "(cached) " >&6
7887 else
7888
7889   gl_save_compiler_FLAGS="$CFLAGS"
7890   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-prototypes"
7891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7892 /* end confdefs.h.  */
7893
7894 int
7895 main ()
7896 {
7897
7898   ;
7899   return 0;
7900 }
7901 _ACEOF
7902 if ac_fn_c_try_link "$LINENO"; then :
7903   gl_cv_warn_c__Wmissing_prototypes=yes
7904 else
7905   gl_cv_warn_c__Wmissing_prototypes=no
7906 fi
7907 rm -f core conftest.err conftest.$ac_objext \
7908     conftest$ac_exeext conftest.$ac_ext
7909   CFLAGS="$gl_save_compiler_FLAGS"
7910
7911 fi
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wmissing_prototypes" >&5
7913 $as_echo "$gl_cv_warn_c__Wmissing_prototypes" >&6; }
7914 if test "x$gl_cv_warn_c__Wmissing_prototypes" = xyes; then :
7915   as_fn_append WARN_CFLAGS_TEST " -Wmissing-prototypes"
7916 fi
7917
7918
7919   test $lv_cv_gcc_pragma_push_works = yes &&
7920     as_fn_append WARN_CFLAGS " $WARN_CFLAGS_TEST"
7921
7922   # Warnings for the test suite only.
7923   for i in $warn_tests;
7924   do
7925
7926
7927 as_gl_Warn=`$as_echo "gl_cv_warn_c_$i" | $as_tr_sh`
7928 gl_positive="$i"
7929 case $gl_positive in
7930   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7931 esac
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $i" >&5
7933 $as_echo_n "checking whether C compiler handles $i... " >&6; }
7934 if eval \${$as_gl_Warn+:} false; then :
7935   $as_echo_n "(cached) " >&6
7936 else
7937
7938   gl_save_compiler_FLAGS="$CFLAGS"
7939   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h.  */
7942
7943 int
7944 main ()
7945 {
7946
7947   ;
7948   return 0;
7949 }
7950 _ACEOF
7951 if ac_fn_c_try_link "$LINENO"; then :
7952   eval "$as_gl_Warn=yes"
7953 else
7954   eval "$as_gl_Warn=no"
7955 fi
7956 rm -f core conftest.err conftest.$ac_objext \
7957     conftest$ac_exeext conftest.$ac_ext
7958   CFLAGS="$gl_save_compiler_FLAGS"
7959
7960 fi
7961 eval ac_res=\$$as_gl_Warn
7962                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7963 $as_echo "$ac_res" >&6; }
7964 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
7965   as_fn_append WARN_CFLAGS_TEST " $i"
7966 fi
7967
7968
7969   done
7970   CFLAGS=$save_CFLAGS
7971   ac_ext=c
7972 ac_cpp='$CPP $CPPFLAGS'
7973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7976
7977
7978   ac_ext=cpp
7979 ac_cpp='$CXXCPP $CPPFLAGS'
7980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7983
7984   save_CXXFLAGS=$CXXFLAGS
7985
7986
7987   ac_ext=cpp
7988 ac_cpp='$CXXCPP $CPPFLAGS'
7989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7992
7993
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror -Wunknown-warning-option" >&5
7995 $as_echo_n "checking whether C++ compiler handles -Werror -Wunknown-warning-option... " >&6; }
7996 if ${gl_cv_warn_cxx__Werror__Wunknown_warning_option+:} false; then :
7997   $as_echo_n "(cached) " >&6
7998 else
7999
8000   gl_save_compiler_FLAGS="$CXXFLAGS"
8001   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
8002   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8003 /* end confdefs.h.  */
8004
8005 int
8006 main ()
8007 {
8008
8009   ;
8010   return 0;
8011 }
8012 _ACEOF
8013 if ac_fn_cxx_try_link "$LINENO"; then :
8014   gl_cv_warn_cxx__Werror__Wunknown_warning_option=yes
8015 else
8016   gl_cv_warn_cxx__Werror__Wunknown_warning_option=no
8017 fi
8018 rm -f core conftest.err conftest.$ac_objext \
8019     conftest$ac_exeext conftest.$ac_ext
8020   CXXFLAGS="$gl_save_compiler_FLAGS"
8021
8022 fi
8023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror__Wunknown_warning_option" >&5
8024 $as_echo "$gl_cv_warn_cxx__Werror__Wunknown_warning_option" >&6; }
8025 if test "x$gl_cv_warn_cxx__Werror__Wunknown_warning_option" = xyes; then :
8026   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
8027 else
8028   gl_unknown_warnings_are_errors=
8029 fi
8030
8031   ac_ext=cpp
8032 ac_cpp='$CXXCPP $CPPFLAGS'
8033 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8034 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8035 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8036
8037
8038
8039
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror=unknown-warning-option" >&5
8041 $as_echo_n "checking whether C++ compiler handles -Werror=unknown-warning-option... " >&6; }
8042 if ${gl_cv_warn_cxx__Werror_unknown_warning_option+:} false; then :
8043   $as_echo_n "(cached) " >&6
8044 else
8045
8046   gl_save_compiler_FLAGS="$CXXFLAGS"
8047   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror=unknown-warning-option"
8048   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8049 /* end confdefs.h.  */
8050
8051 int
8052 main ()
8053 {
8054
8055   ;
8056   return 0;
8057 }
8058 _ACEOF
8059 if ac_fn_cxx_try_link "$LINENO"; then :
8060   gl_cv_warn_cxx__Werror_unknown_warning_option=yes
8061 else
8062   gl_cv_warn_cxx__Werror_unknown_warning_option=no
8063 fi
8064 rm -f core conftest.err conftest.$ac_objext \
8065     conftest$ac_exeext conftest.$ac_ext
8066   CXXFLAGS="$gl_save_compiler_FLAGS"
8067
8068 fi
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror_unknown_warning_option" >&5
8070 $as_echo "$gl_cv_warn_cxx__Werror_unknown_warning_option" >&6; }
8071 if test "x$gl_cv_warn_cxx__Werror_unknown_warning_option" = xyes; then :
8072   as_fn_append CXXFLAGS " -Werror=unknown-warning-option"
8073 fi
8074
8075
8076   for i in $warn_common $warn_cxx;
8077   do
8078
8079
8080 as_gl_Warn=`$as_echo "gl_cv_warn_cxx_$i" | $as_tr_sh`
8081 gl_positive="$i"
8082 case $gl_positive in
8083   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8084 esac
8085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles $i" >&5
8086 $as_echo_n "checking whether C++ compiler handles $i... " >&6; }
8087 if eval \${$as_gl_Warn+:} false; then :
8088   $as_echo_n "(cached) " >&6
8089 else
8090
8091   gl_save_compiler_FLAGS="$CXXFLAGS"
8092   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
8093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8094 /* end confdefs.h.  */
8095
8096 int
8097 main ()
8098 {
8099
8100   ;
8101   return 0;
8102 }
8103 _ACEOF
8104 if ac_fn_cxx_try_link "$LINENO"; then :
8105   eval "$as_gl_Warn=yes"
8106 else
8107   eval "$as_gl_Warn=no"
8108 fi
8109 rm -f core conftest.err conftest.$ac_objext \
8110     conftest$ac_exeext conftest.$ac_ext
8111   CXXFLAGS="$gl_save_compiler_FLAGS"
8112
8113 fi
8114 eval ac_res=\$$as_gl_Warn
8115                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8116 $as_echo "$ac_res" >&6; }
8117 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
8118   as_fn_append WARN_CXXFLAGS " $i"
8119 fi
8120
8121
8122   done
8123
8124
8125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wzero-as-null-pointer-constant" >&5
8126 $as_echo_n "checking whether C++ compiler handles -Wzero-as-null-pointer-constant... " >&6; }
8127 if ${gl_cv_warn_cxx__Wzero_as_null_pointer_constant+:} false; then :
8128   $as_echo_n "(cached) " >&6
8129 else
8130
8131   gl_save_compiler_FLAGS="$CXXFLAGS"
8132   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wzero-as-null-pointer-constant"
8133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8134 /* end confdefs.h.  */
8135
8136 int
8137 main ()
8138 {
8139 nullptr
8140   ;
8141   return 0;
8142 }
8143 _ACEOF
8144 if ac_fn_cxx_try_link "$LINENO"; then :
8145   gl_cv_warn_cxx__Wzero_as_null_pointer_constant=yes
8146 else
8147   gl_cv_warn_cxx__Wzero_as_null_pointer_constant=no
8148 fi
8149 rm -f core conftest.err conftest.$ac_objext \
8150     conftest$ac_exeext conftest.$ac_ext
8151   CXXFLAGS="$gl_save_compiler_FLAGS"
8152
8153 fi
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wzero_as_null_pointer_constant" >&5
8155 $as_echo "$gl_cv_warn_cxx__Wzero_as_null_pointer_constant" >&6; }
8156 if test "x$gl_cv_warn_cxx__Wzero_as_null_pointer_constant" = xyes; then :
8157   as_fn_append WARN_CXXFLAGS " -Wzero-as-null-pointer-constant"
8158 fi
8159
8160
8161
8162
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror" >&5
8164 $as_echo_n "checking whether C++ compiler handles -Werror... " >&6; }
8165 if ${gl_cv_warn_cxx__Werror+:} false; then :
8166   $as_echo_n "(cached) " >&6
8167 else
8168
8169   gl_save_compiler_FLAGS="$CXXFLAGS"
8170   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Werror"
8171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8172 /* end confdefs.h.  */
8173
8174 int
8175 main ()
8176 {
8177
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 if ac_fn_cxx_try_link "$LINENO"; then :
8183   gl_cv_warn_cxx__Werror=yes
8184 else
8185   gl_cv_warn_cxx__Werror=no
8186 fi
8187 rm -f core conftest.err conftest.$ac_objext \
8188     conftest$ac_exeext conftest.$ac_ext
8189   CXXFLAGS="$gl_save_compiler_FLAGS"
8190
8191 fi
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror" >&5
8193 $as_echo "$gl_cv_warn_cxx__Werror" >&6; }
8194 if test "x$gl_cv_warn_cxx__Werror" = xyes; then :
8195   as_fn_append WERROR_CXXFLAGS " -Werror"
8196 fi
8197
8198
8199   # Warnings for the test suite only.
8200   for i in $warn_tests;
8201   do
8202
8203
8204 as_gl_Warn=`$as_echo "gl_cv_warn_cxx_$i" | $as_tr_sh`
8205 gl_positive="$i"
8206 case $gl_positive in
8207   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8208 esac
8209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles $i" >&5
8210 $as_echo_n "checking whether C++ compiler handles $i... " >&6; }
8211 if eval \${$as_gl_Warn+:} false; then :
8212   $as_echo_n "(cached) " >&6
8213 else
8214
8215   gl_save_compiler_FLAGS="$CXXFLAGS"
8216   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
8217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8218 /* end confdefs.h.  */
8219
8220 int
8221 main ()
8222 {
8223
8224   ;
8225   return 0;
8226 }
8227 _ACEOF
8228 if ac_fn_cxx_try_link "$LINENO"; then :
8229   eval "$as_gl_Warn=yes"
8230 else
8231   eval "$as_gl_Warn=no"
8232 fi
8233 rm -f core conftest.err conftest.$ac_objext \
8234     conftest$ac_exeext conftest.$ac_ext
8235   CXXFLAGS="$gl_save_compiler_FLAGS"
8236
8237 fi
8238 eval ac_res=\$$as_gl_Warn
8239                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8240 $as_echo "$ac_res" >&6; }
8241 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
8242   as_fn_append WARN_CXXFLAGS_TEST " $i"
8243 fi
8244
8245
8246   done
8247   # Clang++ 3.2+ reject C code generated by Flex.
8248
8249
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wno-null-conversion" >&5
8251 $as_echo_n "checking whether C++ compiler handles -Wno-null-conversion... " >&6; }
8252 if ${gl_cv_warn_cxx__Wno_null_conversion+:} false; then :
8253   $as_echo_n "(cached) " >&6
8254 else
8255
8256   gl_save_compiler_FLAGS="$CXXFLAGS"
8257   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wnull-conversion"
8258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8259 /* end confdefs.h.  */
8260
8261 int
8262 main ()
8263 {
8264
8265   ;
8266   return 0;
8267 }
8268 _ACEOF
8269 if ac_fn_cxx_try_link "$LINENO"; then :
8270   gl_cv_warn_cxx__Wno_null_conversion=yes
8271 else
8272   gl_cv_warn_cxx__Wno_null_conversion=no
8273 fi
8274 rm -f core conftest.err conftest.$ac_objext \
8275     conftest$ac_exeext conftest.$ac_ext
8276   CXXFLAGS="$gl_save_compiler_FLAGS"
8277
8278 fi
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wno_null_conversion" >&5
8280 $as_echo "$gl_cv_warn_cxx__Wno_null_conversion" >&6; }
8281 if test "x$gl_cv_warn_cxx__Wno_null_conversion" = xyes; then :
8282   as_fn_append FLEX_SCANNER_CXXFLAGS " -Wno-null-conversion"
8283 fi
8284
8285
8286   # So does G++ 4.8...
8287
8288
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wno-sign-compare" >&5
8290 $as_echo_n "checking whether C++ compiler handles -Wno-sign-compare... " >&6; }
8291 if ${gl_cv_warn_cxx__Wno_sign_compare+:} false; then :
8292   $as_echo_n "(cached) " >&6
8293 else
8294
8295   gl_save_compiler_FLAGS="$CXXFLAGS"
8296   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
8297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8298 /* end confdefs.h.  */
8299
8300 int
8301 main ()
8302 {
8303
8304   ;
8305   return 0;
8306 }
8307 _ACEOF
8308 if ac_fn_cxx_try_link "$LINENO"; then :
8309   gl_cv_warn_cxx__Wno_sign_compare=yes
8310 else
8311   gl_cv_warn_cxx__Wno_sign_compare=no
8312 fi
8313 rm -f core conftest.err conftest.$ac_objext \
8314     conftest$ac_exeext conftest.$ac_ext
8315   CXXFLAGS="$gl_save_compiler_FLAGS"
8316
8317 fi
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wno_sign_compare" >&5
8319 $as_echo "$gl_cv_warn_cxx__Wno_sign_compare" >&6; }
8320 if test "x$gl_cv_warn_cxx__Wno_sign_compare" = xyes; then :
8321   as_fn_append FLEX_SCANNER_CXXFLAGS " -Wno-sign-compare"
8322 fi
8323
8324
8325   # ... possiby in std=c++11 mode.
8326
8327
8328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wno-zero-as-null-pointer-constant" >&5
8329 $as_echo_n "checking whether C++ compiler handles -Wno-zero-as-null-pointer-constant... " >&6; }
8330 if ${gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant+:} false; then :
8331   $as_echo_n "(cached) " >&6
8332 else
8333
8334   gl_save_compiler_FLAGS="$CXXFLAGS"
8335   as_fn_append CXXFLAGS " $gl_unknown_warnings_are_errors -Wzero-as-null-pointer-constant"
8336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8337 /* end confdefs.h.  */
8338
8339 int
8340 main ()
8341 {
8342
8343   ;
8344   return 0;
8345 }
8346 _ACEOF
8347 if ac_fn_cxx_try_link "$LINENO"; then :
8348   gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant=yes
8349 else
8350   gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant=no
8351 fi
8352 rm -f core conftest.err conftest.$ac_objext \
8353     conftest$ac_exeext conftest.$ac_ext
8354   CXXFLAGS="$gl_save_compiler_FLAGS"
8355
8356 fi
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant" >&5
8358 $as_echo "$gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant" >&6; }
8359 if test "x$gl_cv_warn_cxx__Wno_zero_as_null_pointer_constant" = xyes; then :
8360   as_fn_append FLEX_SCANNER_CXXFLAGS " -Wno-zero-as-null-pointer-constant"
8361 fi
8362
8363
8364   CXXFLAGS=$save_CXXFLAGS
8365   ac_ext=c
8366 ac_cpp='$CPP $CPPFLAGS'
8367 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8368 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8369 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8370
8371 fi
8372
8373
8374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375 /* end confdefs.h.  */
8376 #include <limits.h>
8377          int test_array[CHAR_BIT];
8378 int
8379 main ()
8380 {
8381
8382   ;
8383   return 0;
8384 }
8385 _ACEOF
8386 if ac_fn_c_try_compile "$LINENO"; then :
8387
8388 else
8389   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8390 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8391 as_fn_error $? "cannot compile a simple C program
8392 See \`config.log' for more details" "$LINENO" 5; }
8393 fi
8394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8395    BISON_C_WORKS=:
8396
8397
8398 ac_ext=c
8399 ac_cpp='$CPP $CPPFLAGS'
8400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8403
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports POSIXLY_CORRECT=1" >&5
8405 $as_echo_n "checking whether $CC supports POSIXLY_CORRECT=1... " >&6; }
8406 if ${bison_cv_c_supports_posixly_correct+:} false; then :
8407   $as_echo_n "(cached) " >&6
8408 else
8409   gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
8410 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
8411   xx) gl_had_POSIXLY_CORRECT=exported ;;
8412   x)  gl_had_POSIXLY_CORRECT=yes      ;;
8413   *)  gl_had_POSIXLY_CORRECT=         ;;
8414 esac
8415 POSIXLY_CORRECT=1
8416 export POSIXLY_CORRECT
8417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8418 /* end confdefs.h.  */
8419
8420 int
8421 main ()
8422 {
8423
8424   ;
8425   return 0;
8426 }
8427 _ACEOF
8428 if ac_fn_c_try_link "$LINENO"; then :
8429   bison_cv_c_supports_posixly_correct=yes
8430 else
8431   bison_cv_c_supports_posixly_correct=no
8432 fi
8433 rm -f core conftest.err conftest.$ac_objext \
8434     conftest$ac_exeext conftest.$ac_ext
8435 case $gl_had_POSIXLY_CORRECT in
8436   exported) ;;
8437   yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
8438   *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
8439 esac
8440
8441 fi
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_c_supports_posixly_correct" >&5
8443 $as_echo "$bison_cv_c_supports_posixly_correct" >&6; }
8444 case $bison_cv_c_supports_posixly_correct in
8445   yes) C_COMPILER_POSIXLY_CORRECT=true
8446  ;;
8447   no)  C_COMPILER_POSIXLY_CORRECT=false
8448 ;;
8449 esac
8450
8451 ac_ext=c
8452 ac_cpp='$CPP $CPPFLAGS'
8453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8456
8457
8458
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX builds executables that work" >&5
8460 $as_echo_n "checking whether $CXX builds executables that work... " >&6; }
8461 if ${bison_cv_cxx_works+:} false; then :
8462   $as_echo_n "(cached) " >&6
8463 else
8464   ac_ext=cpp
8465 ac_cpp='$CXXCPP $CPPFLAGS'
8466 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8467 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8468 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8469
8470     bison_cv_cxx_works=no
8471     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8472 /* end confdefs.h.  */
8473 #include <cstdlib>
8474           #include <iostream>
8475           #include <map>
8476           #include <string>
8477           using namespace std;
8478 int
8479 main ()
8480 {
8481 std::cerr << "";
8482           cout << "";
8483           typedef std::pair<unsigned int, int> uipair;
8484           std::map<unsigned int, int> m;
8485           std::map<unsigned int, int>::iterator i;
8486           m.insert (uipair (4, -4));
8487           for (i = m.begin (); i != m.end (); ++i)
8488             if (i->first != 4)
8489               return 1;
8490   ;
8491   return 0;
8492 }
8493 _ACEOF
8494 if ac_fn_cxx_try_compile "$LINENO"; then :
8495   if { ac_try='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_objext $LIBS >&5'
8496   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8497   (eval $ac_try) 2>&5
8498   ac_status=$?
8499   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8500   test $ac_status = 0; }; }; then :
8501   if test "$cross_compiling" = yes; then :
8502   bison_cv_cxx_works=cross
8503 else
8504   if { ac_try='./conftest$ac_exeext'
8505   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8506   (eval $ac_try) 2>&5
8507   ac_status=$?
8508   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8509   test $ac_status = 0; }; }; then :
8510   bison_cv_cxx_works=yes
8511 fi
8512 fi
8513 fi
8514        rm -f conftest$ac_exeext
8515 fi
8516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8517     ac_ext=c
8518 ac_cpp='$CPP $CPPFLAGS'
8519 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8520 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8521 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8522
8523 fi
8524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_cxx_works" >&5
8525 $as_echo "$bison_cv_cxx_works" >&6; }
8526
8527  case $bison_cv_cxx_works in
8528  yes)
8529     BISON_CXX_WORKS=':';;
8530  no | cross)
8531     BISON_CXX_WORKS='exit 77';;
8532  esac
8533
8534
8535   if test $bison_cv_cxx_works = yes; then
8536   BISON_CXX_WORKS_TRUE=
8537   BISON_CXX_WORKS_FALSE='#'
8538 else
8539   BISON_CXX_WORKS_TRUE='#'
8540   BISON_CXX_WORKS_FALSE=
8541 fi
8542
8543
8544 ac_ext=cpp
8545 ac_cpp='$CXXCPP $CPPFLAGS'
8546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8547 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8549
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports POSIXLY_CORRECT=1" >&5
8551 $as_echo_n "checking whether $CXX supports POSIXLY_CORRECT=1... " >&6; }
8552 if ${bison_cv_cxx_supports_posixly_correct+:} false; then :
8553   $as_echo_n "(cached) " >&6
8554 else
8555   gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
8556 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
8557   xx) gl_had_POSIXLY_CORRECT=exported ;;
8558   x)  gl_had_POSIXLY_CORRECT=yes      ;;
8559   *)  gl_had_POSIXLY_CORRECT=         ;;
8560 esac
8561 POSIXLY_CORRECT=1
8562 export POSIXLY_CORRECT
8563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8564 /* end confdefs.h.  */
8565
8566 int
8567 main ()
8568 {
8569
8570   ;
8571   return 0;
8572 }
8573 _ACEOF
8574 if ac_fn_cxx_try_link "$LINENO"; then :
8575   bison_cv_cxx_supports_posixly_correct=yes
8576 else
8577   bison_cv_cxx_supports_posixly_correct=no
8578 fi
8579 rm -f core conftest.err conftest.$ac_objext \
8580     conftest$ac_exeext conftest.$ac_ext
8581 case $gl_had_POSIXLY_CORRECT in
8582   exported) ;;
8583   yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
8584   *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
8585 esac
8586
8587 fi
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_cxx_supports_posixly_correct" >&5
8589 $as_echo "$bison_cv_cxx_supports_posixly_correct" >&6; }
8590 case $bison_cv_cxx_supports_posixly_correct in
8591   yes) CXX_COMPILER_POSIXLY_CORRECT=true
8592  ;;
8593   no)  CXX_COMPILER_POSIXLY_CORRECT=false
8594 ;;
8595 esac
8596
8597 ac_ext=c
8598 ac_cpp='$CPP $CPPFLAGS'
8599 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8600 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8601 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8602
8603
8604
8605 # Check whether --enable-yacc was given.
8606 if test "${enable_yacc+set}" = set; then :
8607   enableval=$enable_yacc;
8608 else
8609   enable_yacc=yes
8610 fi
8611
8612  if test "$enable_yacc" = yes; then
8613   ENABLE_YACC_TRUE=
8614   ENABLE_YACC_FALSE='#'
8615 else
8616   ENABLE_YACC_TRUE='#'
8617   ENABLE_YACC_FALSE=
8618 fi
8619
8620
8621 # Checks for programs.
8622
8623 DOT=${DOT-"${am_missing_run}dot"}
8624
8625 for ac_prog in flex lex
8626 do
8627   # Extract the first word of "$ac_prog", so it can be a program name with args.
8628 set dummy $ac_prog; ac_word=$2
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630 $as_echo_n "checking for $ac_word... " >&6; }
8631 if ${ac_cv_prog_LEX+:} false; then :
8632   $as_echo_n "(cached) " >&6
8633 else
8634   if test -n "$LEX"; then
8635   ac_cv_prog_LEX="$LEX" # Let the user override the test.
8636 else
8637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8638 for as_dir in $PATH
8639 do
8640   IFS=$as_save_IFS
8641   test -z "$as_dir" && as_dir=.
8642     for ac_exec_ext in '' $ac_executable_extensions; do
8643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8644     ac_cv_prog_LEX="$ac_prog"
8645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8646     break 2
8647   fi
8648 done
8649   done
8650 IFS=$as_save_IFS
8651
8652 fi
8653 fi
8654 LEX=$ac_cv_prog_LEX
8655 if test -n "$LEX"; then
8656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8657 $as_echo "$LEX" >&6; }
8658 else
8659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8660 $as_echo "no" >&6; }
8661 fi
8662
8663
8664   test -n "$LEX" && break
8665 done
8666 test -n "$LEX" || LEX=":"
8667
8668 if test "x$LEX" != "x:"; then
8669   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lex is flex" >&5
8670 $as_echo_n "checking whether lex is flex... " >&6; }
8671 if ${ac_cv_prog_lex_is_flex+:} false; then :
8672   $as_echo_n "(cached) " >&6
8673 else
8674   cat >conftest.l <<_ACEOF
8675 %option debug nodefault noinput nounput noyywrap never-interactive
8676 %x SC_CONF_TEST
8677 %%
8678 a { BEGIN SC_CONF_TEST; }
8679 _ACEOF
8680 if { { ac_try="$LEX conftest.l"
8681 case "(($ac_try" in
8682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8683   *) ac_try_echo=$ac_try;;
8684 esac
8685 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8686 $as_echo "$ac_try_echo"; } >&5
8687   (eval "$LEX conftest.l") 2>&5
8688   ac_status=$?
8689   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8690   test $ac_status = 0; }; then
8691   ac_cv_prog_lex_is_flex=yes
8692 else
8693   ac_cv_prog_lex_is_flex=no
8694 fi
8695
8696 fi
8697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_is_flex" >&5
8698 $as_echo "$ac_cv_prog_lex_is_flex" >&6; }
8699 LEX_IS_FLEX=`test "$ac_cv_prog_lex_is_flex" = yes && echo true || echo false`
8700
8701 cat >conftest.l <<_ACEOF
8702 %%
8703 a { ECHO; }
8704 b { REJECT; }
8705 c { yymore (); }
8706 d { yyless (1); }
8707 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
8708     yyless ((input () != 0)); }
8709 f { unput (yytext[0]); }
8710 . { BEGIN INITIAL; }
8711 %%
8712 #ifdef YYTEXT_POINTER
8713 extern char *yytext;
8714 #endif
8715 int
8716 main (void)
8717 {
8718   return ! yylex () + ! yywrap ();
8719 }
8720 _ACEOF
8721 { { ac_try="$LEX conftest.l"
8722 case "(($ac_try" in
8723   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8724   *) ac_try_echo=$ac_try;;
8725 esac
8726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8727 $as_echo "$ac_try_echo"; } >&5
8728   (eval "$LEX conftest.l") 2>&5
8729   ac_status=$?
8730   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8731   test $ac_status = 0; }
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8733 $as_echo_n "checking lex output file root... " >&6; }
8734 if ${ac_cv_prog_lex_root+:} false; then :
8735   $as_echo_n "(cached) " >&6
8736 else
8737
8738 if test -f lex.yy.c; then
8739   ac_cv_prog_lex_root=lex.yy
8740 elif test -f lexyy.c; then
8741   ac_cv_prog_lex_root=lexyy
8742 else
8743   as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8744 fi
8745 fi
8746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8747 $as_echo "$ac_cv_prog_lex_root" >&6; }
8748 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8749
8750 if test -z "${LEXLIB+set}"; then
8751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8752 $as_echo_n "checking lex library... " >&6; }
8753 if ${ac_cv_lib_lex+:} false; then :
8754   $as_echo_n "(cached) " >&6
8755 else
8756
8757     ac_save_LIBS=$LIBS
8758     ac_cv_lib_lex='none needed'
8759     for ac_lib in '' -lfl -ll; do
8760       LIBS="$ac_lib $ac_save_LIBS"
8761       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8762 /* end confdefs.h.  */
8763 `cat $LEX_OUTPUT_ROOT.c`
8764 _ACEOF
8765 if ac_fn_c_try_link "$LINENO"; then :
8766   ac_cv_lib_lex=$ac_lib
8767 fi
8768 rm -f core conftest.err conftest.$ac_objext \
8769     conftest$ac_exeext conftest.$ac_ext
8770       test "$ac_cv_lib_lex" != 'none needed' && break
8771     done
8772     LIBS=$ac_save_LIBS
8773
8774 fi
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8776 $as_echo "$ac_cv_lib_lex" >&6; }
8777   test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8778 fi
8779
8780
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8782 $as_echo_n "checking whether yytext is a pointer... " >&6; }
8783 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8784   $as_echo_n "(cached) " >&6
8785 else
8786   # POSIX says lex can declare yytext either as a pointer or an array; the
8787 # default is implementation-dependent.  Figure out which it is, since
8788 # not all implementations provide the %pointer and %array declarations.
8789 ac_cv_prog_lex_yytext_pointer=no
8790 ac_save_LIBS=$LIBS
8791 LIBS="$LEXLIB $ac_save_LIBS"
8792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8793 /* end confdefs.h.  */
8794
8795   #define YYTEXT_POINTER 1
8796 `cat $LEX_OUTPUT_ROOT.c`
8797 _ACEOF
8798 if ac_fn_c_try_link "$LINENO"; then :
8799   ac_cv_prog_lex_yytext_pointer=yes
8800 fi
8801 rm -f core conftest.err conftest.$ac_objext \
8802     conftest$ac_exeext conftest.$ac_ext
8803 LIBS=$ac_save_LIBS
8804
8805 fi
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8807 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8808 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8809
8810 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8811
8812 fi
8813 rm -f conftest.l $LEX_OUTPUT_ROOT.c
8814
8815 fi
8816 $LEX_IS_FLEX || test "X$LEX" = X: || {
8817   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bypassing lex because flex is required" >&5
8818 $as_echo "$as_me: WARNING: bypassing lex because flex is required" >&2;}
8819   LEX=:
8820 }
8821  if $LEX_IS_FLEX && test $bison_cv_cxx_works = yes; then
8822   FLEX_CXX_WORKS_TRUE=
8823   FLEX_CXX_WORKS_FALSE='#'
8824 else
8825   FLEX_CXX_WORKS_TRUE='#'
8826   FLEX_CXX_WORKS_FALSE=
8827 fi
8828
8829 for ac_prog in 'bison -y' byacc
8830 do
8831   # Extract the first word of "$ac_prog", so it can be a program name with args.
8832 set dummy $ac_prog; ac_word=$2
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834 $as_echo_n "checking for $ac_word... " >&6; }
8835 if ${ac_cv_prog_YACC+:} false; then :
8836   $as_echo_n "(cached) " >&6
8837 else
8838   if test -n "$YACC"; then
8839   ac_cv_prog_YACC="$YACC" # Let the user override the test.
8840 else
8841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842 for as_dir in $PATH
8843 do
8844   IFS=$as_save_IFS
8845   test -z "$as_dir" && as_dir=.
8846     for ac_exec_ext in '' $ac_executable_extensions; do
8847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848     ac_cv_prog_YACC="$ac_prog"
8849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850     break 2
8851   fi
8852 done
8853   done
8854 IFS=$as_save_IFS
8855
8856 fi
8857 fi
8858 YACC=$ac_cv_prog_YACC
8859 if test -n "$YACC"; then
8860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8861 $as_echo "$YACC" >&6; }
8862 else
8863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8864 $as_echo "no" >&6; }
8865 fi
8866
8867
8868   test -n "$YACC" && break
8869 done
8870 test -n "$YACC" || YACC="yacc"
8871
8872 if test -n "$ac_tool_prefix"; then
8873   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8874 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8876 $as_echo_n "checking for $ac_word... " >&6; }
8877 if ${ac_cv_prog_RANLIB+:} false; then :
8878   $as_echo_n "(cached) " >&6
8879 else
8880   if test -n "$RANLIB"; then
8881   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8882 else
8883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8884 for as_dir in $PATH
8885 do
8886   IFS=$as_save_IFS
8887   test -z "$as_dir" && as_dir=.
8888     for ac_exec_ext in '' $ac_executable_extensions; do
8889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8892     break 2
8893   fi
8894 done
8895   done
8896 IFS=$as_save_IFS
8897
8898 fi
8899 fi
8900 RANLIB=$ac_cv_prog_RANLIB
8901 if test -n "$RANLIB"; then
8902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8903 $as_echo "$RANLIB" >&6; }
8904 else
8905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906 $as_echo "no" >&6; }
8907 fi
8908
8909
8910 fi
8911 if test -z "$ac_cv_prog_RANLIB"; then
8912   ac_ct_RANLIB=$RANLIB
8913   # Extract the first word of "ranlib", so it can be a program name with args.
8914 set dummy ranlib; ac_word=$2
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916 $as_echo_n "checking for $ac_word... " >&6; }
8917 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8918   $as_echo_n "(cached) " >&6
8919 else
8920   if test -n "$ac_ct_RANLIB"; then
8921   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8922 else
8923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8924 for as_dir in $PATH
8925 do
8926   IFS=$as_save_IFS
8927   test -z "$as_dir" && as_dir=.
8928     for ac_exec_ext in '' $ac_executable_extensions; do
8929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8930     ac_cv_prog_ac_ct_RANLIB="ranlib"
8931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8932     break 2
8933   fi
8934 done
8935   done
8936 IFS=$as_save_IFS
8937
8938 fi
8939 fi
8940 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8941 if test -n "$ac_ct_RANLIB"; then
8942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8943 $as_echo "$ac_ct_RANLIB" >&6; }
8944 else
8945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8946 $as_echo "no" >&6; }
8947 fi
8948
8949   if test "x$ac_ct_RANLIB" = x; then
8950     RANLIB=":"
8951   else
8952     case $cross_compiling:$ac_tool_warned in
8953 yes:)
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8955 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8956 ac_tool_warned=yes ;;
8957 esac
8958     RANLIB=$ac_ct_RANLIB
8959   fi
8960 else
8961   RANLIB="$ac_cv_prog_RANLIB"
8962 fi
8963
8964
8965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU M4 that supports accurate traces" >&5
8966 $as_echo_n "checking for GNU M4 that supports accurate traces... " >&6; }
8967 if ${ac_cv_path_M4+:} false; then :
8968   $as_echo_n "(cached) " >&6
8969 else
8970   rm -f conftest.m4f
8971 ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
8972 { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
8973 if test -z "$M4"; then
8974   ac_path_M4_found=false
8975   # Loop through the user's path and test for each of PROGNAME-LIST
8976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8977 for as_dir in $PATH
8978 do
8979   IFS=$as_save_IFS
8980   test -z "$as_dir" && as_dir=.
8981     for ac_prog in m4 gm4 gnum4; do
8982     for ac_exec_ext in '' $ac_executable_extensions; do
8983       ac_path_M4="$as_dir/$ac_prog$ac_exec_ext"
8984       as_fn_executable_p "$ac_path_M4" || continue
8985       # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F.
8986       # Root out GNU M4 1.4.15 with buggy false negative replacement strstr.
8987       # Root out Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 with buggy
8988       # false positive strstr.
8989       ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
8990       ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
8991       ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(..wi.d.,.d.),-1,bug)'
8992       ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(;:11-:12-:12-:12-:12-:12-:12-:12-:12.:12.:12.:12.:12.:12.:12.:12.:12-,:12-:12-:12-:12-:12-:12-:12-:12-),-1,,strstr-bug2)'
8993       test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
8994       && test -z "`$as_echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \
8995       && test -f conftest.m4f \
8996       && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
8997       rm -f conftest.m4f
8998       $ac_path_M4_found && break 3
8999     done
9000   done
9001   done
9002 IFS=$as_save_IFS
9003   if test -z "$ac_cv_path_M4"; then
9004     as_fn_error $? "no acceptable m4 could be found in \$PATH.
9005 GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
9006 GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
9007 Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug." "$LINENO" 5
9008   fi
9009 else
9010   ac_cv_path_M4=$M4
9011 fi
9012
9013 fi
9014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_M4" >&5
9015 $as_echo "$ac_cv_path_M4" >&6; }
9016   M4=$ac_cv_path_M4
9017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_cv_path_M4 accepts --gnu" >&5
9018 $as_echo_n "checking whether $ac_cv_path_M4 accepts --gnu... " >&6; }
9019 if ${ac_cv_prog_gnu_m4_gnu+:} false; then :
9020   $as_echo_n "(cached) " >&6
9021 else
9022   case `$M4 --help < /dev/null 2>&1` in
9023       *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;;
9024       *) ac_cv_prog_gnu_m4_gnu=no ;;
9025     esac
9026 fi
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_gnu" >&5
9028 $as_echo "$ac_cv_prog_gnu_m4_gnu" >&6; }
9029   if test "$ac_cv_prog_gnu_m4_gnu" = yes; then
9030     M4_GNU=--gnu
9031   else
9032     M4_GNU=
9033   fi
9034
9035   if test x$ac_had_posixly_correct = xyes; then
9036     POSIXLY_CORRECT=:
9037     if test $ac_cv_prog_gnu_m4_gnu = no; then
9038       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the version of M4 that was found does not support -g" >&5
9039 $as_echo "$as_me: WARNING: the version of M4 that was found does not support -g" >&2;}
9040       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&5
9041 $as_echo "$as_me: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&2;}
9042     fi
9043   fi
9044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how m4 supports trace files" >&5
9045 $as_echo_n "checking how m4 supports trace files... " >&6; }
9046 if ${ac_cv_prog_gnu_m4_debugfile+:} false; then :
9047   $as_echo_n "(cached) " >&6
9048 else
9049   case `$M4 --help < /dev/null 2>&1` in
9050       *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
9051       *) ac_cv_prog_gnu_m4_debugfile=--error-output ;;
9052     esac
9053 fi
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_debugfile" >&5
9055 $as_echo "$ac_cv_prog_gnu_m4_debugfile" >&6; }
9056   M4_DEBUGFILE=$ac_cv_prog_gnu_m4_debugfile
9057
9058
9059
9060 cat >>confdefs.h <<_ACEOF
9061 #define M4 "$M4"
9062 _ACEOF
9063
9064
9065 cat >>confdefs.h <<_ACEOF
9066 #define M4_GNU_OPTION "$M4_GNU"
9067 _ACEOF
9068
9069 # Extract the first word of "perl", so it can be a program name with args.
9070 set dummy perl; ac_word=$2
9071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9072 $as_echo_n "checking for $ac_word... " >&6; }
9073 if ${ac_cv_path_PERL+:} false; then :
9074   $as_echo_n "(cached) " >&6
9075 else
9076   case $PERL in
9077   [\\/]* | ?:[\\/]*)
9078   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9079   ;;
9080   *)
9081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9082 for as_dir in $PATH
9083 do
9084   IFS=$as_save_IFS
9085   test -z "$as_dir" && as_dir=.
9086     for ac_exec_ext in '' $ac_executable_extensions; do
9087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9088     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9090     break 2
9091   fi
9092 done
9093   done
9094 IFS=$as_save_IFS
9095
9096   ;;
9097 esac
9098 fi
9099 PERL=$ac_cv_path_PERL
9100 if test -n "$PERL"; then
9101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9102 $as_echo "$PERL" >&6; }
9103 else
9104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105 $as_echo "no" >&6; }
9106 fi
9107
9108
9109 if test -z "$PERL"; then
9110    as_fn_error $? "perl not found" "$LINENO" 5
9111 fi
9112
9113 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
9114
9115 # Extract the first word of "xsltproc", so it can be a program name with args.
9116 set dummy xsltproc; ac_word=$2
9117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9118 $as_echo_n "checking for $ac_word... " >&6; }
9119 if ${ac_cv_path_XSLTPROC+:} false; then :
9120   $as_echo_n "(cached) " >&6
9121 else
9122   case $XSLTPROC in
9123   [\\/]* | ?:[\\/]*)
9124   ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
9125   ;;
9126   *)
9127   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9128 for as_dir in $PATH
9129 do
9130   IFS=$as_save_IFS
9131   test -z "$as_dir" && as_dir=.
9132     for ac_exec_ext in '' $ac_executable_extensions; do
9133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9134     ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
9135     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9136     break 2
9137   fi
9138 done
9139   done
9140 IFS=$as_save_IFS
9141
9142   ;;
9143 esac
9144 fi
9145 XSLTPROC=$ac_cv_path_XSLTPROC
9146 if test -n "$XSLTPROC"; then
9147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
9148 $as_echo "$XSLTPROC" >&6; }
9149 else
9150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151 $as_echo "no" >&6; }
9152 fi
9153
9154
9155
9156
9157 # Checks for header files.
9158
9159
9160
9161   for ac_header in $ac_header_list
9162 do :
9163   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9164 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9165 "
9166 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9167   cat >>confdefs.h <<_ACEOF
9168 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9169 _ACEOF
9170
9171 fi
9172
9173 done
9174
9175
9176
9177
9178
9179 # Checks for compiler characteristics.
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9181 $as_echo_n "checking for inline... " >&6; }
9182 if ${ac_cv_c_inline+:} false; then :
9183   $as_echo_n "(cached) " >&6
9184 else
9185   ac_cv_c_inline=no
9186 for ac_kw in inline __inline__ __inline; do
9187   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9188 /* end confdefs.h.  */
9189 #ifndef __cplusplus
9190 typedef int foo_t;
9191 static $ac_kw foo_t static_foo () {return 0; }
9192 $ac_kw foo_t foo () {return 0; }
9193 #endif
9194
9195 _ACEOF
9196 if ac_fn_c_try_compile "$LINENO"; then :
9197   ac_cv_c_inline=$ac_kw
9198 fi
9199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9200   test "$ac_cv_c_inline" != no && break
9201 done
9202
9203 fi
9204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9205 $as_echo "$ac_cv_c_inline" >&6; }
9206
9207 case $ac_cv_c_inline in
9208   inline | yes) ;;
9209   *)
9210     case $ac_cv_c_inline in
9211       no) ac_val=;;
9212       *) ac_val=$ac_cv_c_inline;;
9213     esac
9214     cat >>confdefs.h <<_ACEOF
9215 #ifndef __cplusplus
9216 #define inline $ac_val
9217 #endif
9218 _ACEOF
9219     ;;
9220 esac
9221
9222
9223 # Gnulib (later checks).  Putting them here rather than right after
9224 # gl_EARLY avoids some redundant checks.
9225
9226
9227
9228
9229
9230           LIBC_FATAL_STDERR_=1
9231   export LIBC_FATAL_STDERR_
9232
9233 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9234 if test "x$ac_cv_type_size_t" = xyes; then :
9235
9236 else
9237
9238 cat >>confdefs.h <<_ACEOF
9239 #define size_t unsigned int
9240 _ACEOF
9241
9242 fi
9243
9244 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9245 # for constant arguments.  Useless!
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9247 $as_echo_n "checking for working alloca.h... " >&6; }
9248 if ${ac_cv_working_alloca_h+:} false; then :
9249   $as_echo_n "(cached) " >&6
9250 else
9251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252 /* end confdefs.h.  */
9253 #include <alloca.h>
9254 int
9255 main ()
9256 {
9257 char *p = (char *) alloca (2 * sizeof (int));
9258                           if (p) return 0;
9259   ;
9260   return 0;
9261 }
9262 _ACEOF
9263 if ac_fn_c_try_link "$LINENO"; then :
9264   ac_cv_working_alloca_h=yes
9265 else
9266   ac_cv_working_alloca_h=no
9267 fi
9268 rm -f core conftest.err conftest.$ac_objext \
9269     conftest$ac_exeext conftest.$ac_ext
9270 fi
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9272 $as_echo "$ac_cv_working_alloca_h" >&6; }
9273 if test $ac_cv_working_alloca_h = yes; then
9274
9275 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
9276
9277 fi
9278
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9280 $as_echo_n "checking for alloca... " >&6; }
9281 if ${ac_cv_func_alloca_works+:} false; then :
9282   $as_echo_n "(cached) " >&6
9283 else
9284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9285 /* end confdefs.h.  */
9286 #ifdef __GNUC__
9287 # define alloca __builtin_alloca
9288 #else
9289 # ifdef _MSC_VER
9290 #  include <malloc.h>
9291 #  define alloca _alloca
9292 # else
9293 #  ifdef HAVE_ALLOCA_H
9294 #   include <alloca.h>
9295 #  else
9296 #   ifdef _AIX
9297  #pragma alloca
9298 #   else
9299 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9300 void *alloca (size_t);
9301 #    endif
9302 #   endif
9303 #  endif
9304 # endif
9305 #endif
9306
9307 int
9308 main ()
9309 {
9310 char *p = (char *) alloca (1);
9311                                     if (p) return 0;
9312   ;
9313   return 0;
9314 }
9315 _ACEOF
9316 if ac_fn_c_try_link "$LINENO"; then :
9317   ac_cv_func_alloca_works=yes
9318 else
9319   ac_cv_func_alloca_works=no
9320 fi
9321 rm -f core conftest.err conftest.$ac_objext \
9322     conftest$ac_exeext conftest.$ac_ext
9323 fi
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9325 $as_echo "$ac_cv_func_alloca_works" >&6; }
9326
9327 if test $ac_cv_func_alloca_works = yes; then
9328
9329 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
9330
9331 else
9332   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9333 # that cause trouble.  Some versions do not even contain alloca or
9334 # contain a buggy version.  If you still want to use their alloca,
9335 # use ar to extract alloca.o from them instead of compiling alloca.c.
9336
9337
9338
9339
9340
9341 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9342
9343 $as_echo "#define C_ALLOCA 1" >>confdefs.h
9344
9345
9346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9347 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9348 if ${ac_cv_os_cray+:} false; then :
9349   $as_echo_n "(cached) " >&6
9350 else
9351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9352 /* end confdefs.h.  */
9353 #if defined CRAY && ! defined CRAY2
9354 webecray
9355 #else
9356 wenotbecray
9357 #endif
9358
9359 _ACEOF
9360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9361   $EGREP "webecray" >/dev/null 2>&1; then :
9362   ac_cv_os_cray=yes
9363 else
9364   ac_cv_os_cray=no
9365 fi
9366 rm -f conftest*
9367
9368 fi
9369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9370 $as_echo "$ac_cv_os_cray" >&6; }
9371 if test $ac_cv_os_cray = yes; then
9372   for ac_func in _getb67 GETB67 getb67; do
9373     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9374 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9375 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9376
9377 cat >>confdefs.h <<_ACEOF
9378 #define CRAY_STACKSEG_END $ac_func
9379 _ACEOF
9380
9381     break
9382 fi
9383
9384   done
9385 fi
9386
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9388 $as_echo_n "checking stack direction for C alloca... " >&6; }
9389 if ${ac_cv_c_stack_direction+:} false; then :
9390   $as_echo_n "(cached) " >&6
9391 else
9392   if test "$cross_compiling" = yes; then :
9393   ac_cv_c_stack_direction=0
9394 else
9395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9396 /* end confdefs.h.  */
9397 $ac_includes_default
9398 int
9399 find_stack_direction (int *addr, int depth)
9400 {
9401   int dir, dummy = 0;
9402   if (! addr)
9403     addr = &dummy;
9404   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9405   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9406   return dir + dummy;
9407 }
9408
9409 int
9410 main (int argc, char **argv)
9411 {
9412   return find_stack_direction (0, argc + !argv + 20) < 0;
9413 }
9414 _ACEOF
9415 if ac_fn_c_try_run "$LINENO"; then :
9416   ac_cv_c_stack_direction=1
9417 else
9418   ac_cv_c_stack_direction=-1
9419 fi
9420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9421   conftest.$ac_objext conftest.beam conftest.$ac_ext
9422 fi
9423
9424 fi
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9426 $as_echo "$ac_cv_c_stack_direction" >&6; }
9427 cat >>confdefs.h <<_ACEOF
9428 #define STACK_DIRECTION $ac_cv_c_stack_direction
9429 _ACEOF
9430
9431
9432 fi
9433
9434
9435   GNULIB__EXIT=0;
9436   GNULIB_ATOLL=0;
9437   GNULIB_CALLOC_POSIX=0;
9438   GNULIB_CANONICALIZE_FILE_NAME=0;
9439   GNULIB_GETLOADAVG=0;
9440   GNULIB_GETSUBOPT=0;
9441   GNULIB_GRANTPT=0;
9442   GNULIB_MALLOC_POSIX=0;
9443   GNULIB_MBTOWC=0;
9444   GNULIB_MKDTEMP=0;
9445   GNULIB_MKOSTEMP=0;
9446   GNULIB_MKOSTEMPS=0;
9447   GNULIB_MKSTEMP=0;
9448   GNULIB_MKSTEMPS=0;
9449   GNULIB_POSIX_OPENPT=0;
9450   GNULIB_PTSNAME=0;
9451   GNULIB_PTSNAME_R=0;
9452   GNULIB_PUTENV=0;
9453   GNULIB_QSORT_R=0;
9454   GNULIB_RANDOM=0;
9455   GNULIB_RANDOM_R=0;
9456   GNULIB_REALLOCARRAY=0;
9457   GNULIB_REALLOC_POSIX=0;
9458   GNULIB_REALPATH=0;
9459   GNULIB_RPMATCH=0;
9460   GNULIB_SECURE_GETENV=0;
9461   GNULIB_SETENV=0;
9462   GNULIB_STRTOD=0;
9463   GNULIB_STRTOLL=0;
9464   GNULIB_STRTOULL=0;
9465   GNULIB_SYSTEM_POSIX=0;
9466   GNULIB_UNLOCKPT=0;
9467   GNULIB_UNSETENV=0;
9468   GNULIB_WCTOMB=0;
9469     HAVE__EXIT=1;
9470   HAVE_ATOLL=1;
9471   HAVE_CANONICALIZE_FILE_NAME=1;
9472   HAVE_DECL_GETLOADAVG=1;
9473   HAVE_GETSUBOPT=1;
9474   HAVE_GRANTPT=1;
9475   HAVE_DECL_INITSTATE=1;
9476   HAVE_MKDTEMP=1;
9477   HAVE_MKOSTEMP=1;
9478   HAVE_MKOSTEMPS=1;
9479   HAVE_MKSTEMP=1;
9480   HAVE_MKSTEMPS=1;
9481   HAVE_POSIX_OPENPT=1;
9482   HAVE_PTSNAME=1;
9483   HAVE_PTSNAME_R=1;
9484   HAVE_QSORT_R=1;
9485   HAVE_RANDOM=1;
9486   HAVE_RANDOM_H=1;
9487   HAVE_RANDOM_R=1;
9488   HAVE_REALLOCARRAY=1;
9489   HAVE_REALPATH=1;
9490   HAVE_RPMATCH=1;
9491   HAVE_SECURE_GETENV=1;
9492   HAVE_SETENV=1;
9493   HAVE_DECL_SETENV=1;
9494   HAVE_DECL_SETSTATE=1;
9495   HAVE_STRTOD=1;
9496   HAVE_STRTOLL=1;
9497   HAVE_STRTOULL=1;
9498   HAVE_STRUCT_RANDOM_DATA=1;
9499   HAVE_SYS_LOADAVG_H=0;
9500   HAVE_UNLOCKPT=1;
9501   HAVE_DECL_UNSETENV=1;
9502   REPLACE_CALLOC=0;
9503   REPLACE_CANONICALIZE_FILE_NAME=0;
9504   REPLACE_MALLOC=0;
9505   REPLACE_MBTOWC=0;
9506   REPLACE_MKSTEMP=0;
9507   REPLACE_PTSNAME=0;
9508   REPLACE_PTSNAME_R=0;
9509   REPLACE_PUTENV=0;
9510   REPLACE_QSORT_R=0;
9511   REPLACE_RANDOM_R=0;
9512   REPLACE_REALLOC=0;
9513   REPLACE_REALPATH=0;
9514   REPLACE_SETENV=0;
9515   REPLACE_STRTOD=0;
9516   REPLACE_UNSETENV=0;
9517   REPLACE_WCTOMB=0;
9518
9519
9520   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
9521 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
9522 if ${gl_cv_func_malloc_posix+:} false; then :
9523   $as_echo_n "(cached) " >&6
9524 else
9525
9526                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9527 /* end confdefs.h.  */
9528
9529 int
9530 main ()
9531 {
9532 #if defined _WIN32 && ! defined __CYGWIN__
9533              choke me
9534              #endif
9535
9536   ;
9537   return 0;
9538 }
9539 _ACEOF
9540 if ac_fn_c_try_compile "$LINENO"; then :
9541   gl_cv_func_malloc_posix=yes
9542 else
9543   gl_cv_func_malloc_posix=no
9544 fi
9545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9546
9547 fi
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
9549 $as_echo "$gl_cv_func_malloc_posix" >&6; }
9550
9551
9552   GNULIB_CHDIR=0;
9553   GNULIB_CHOWN=0;
9554   GNULIB_CLOSE=0;
9555   GNULIB_DUP=0;
9556   GNULIB_DUP2=0;
9557   GNULIB_DUP3=0;
9558   GNULIB_ENVIRON=0;
9559   GNULIB_EUIDACCESS=0;
9560   GNULIB_FACCESSAT=0;
9561   GNULIB_FCHDIR=0;
9562   GNULIB_FCHOWNAT=0;
9563   GNULIB_FDATASYNC=0;
9564   GNULIB_FSYNC=0;
9565   GNULIB_FTRUNCATE=0;
9566   GNULIB_GETCWD=0;
9567   GNULIB_GETDOMAINNAME=0;
9568   GNULIB_GETDTABLESIZE=0;
9569   GNULIB_GETGROUPS=0;
9570   GNULIB_GETHOSTNAME=0;
9571   GNULIB_GETLOGIN=0;
9572   GNULIB_GETLOGIN_R=0;
9573   GNULIB_GETPAGESIZE=0;
9574   GNULIB_GETUSERSHELL=0;
9575   GNULIB_GROUP_MEMBER=0;
9576   GNULIB_ISATTY=0;
9577   GNULIB_LCHOWN=0;
9578   GNULIB_LINK=0;
9579   GNULIB_LINKAT=0;
9580   GNULIB_LSEEK=0;
9581   GNULIB_PIPE=0;
9582   GNULIB_PIPE2=0;
9583   GNULIB_PREAD=0;
9584   GNULIB_PWRITE=0;
9585   GNULIB_READ=0;
9586   GNULIB_READLINK=0;
9587   GNULIB_READLINKAT=0;
9588   GNULIB_RMDIR=0;
9589   GNULIB_SETHOSTNAME=0;
9590   GNULIB_SLEEP=0;
9591   GNULIB_SYMLINK=0;
9592   GNULIB_SYMLINKAT=0;
9593   GNULIB_TRUNCATE=0;
9594   GNULIB_TTYNAME_R=0;
9595   GNULIB_UNISTD_H_NONBLOCKING=0;
9596   GNULIB_UNISTD_H_SIGPIPE=0;
9597   GNULIB_UNLINK=0;
9598   GNULIB_UNLINKAT=0;
9599   GNULIB_USLEEP=0;
9600   GNULIB_WRITE=0;
9601     HAVE_CHOWN=1;
9602   HAVE_DUP2=1;
9603   HAVE_DUP3=1;
9604   HAVE_EUIDACCESS=1;
9605   HAVE_FACCESSAT=1;
9606   HAVE_FCHDIR=1;
9607   HAVE_FCHOWNAT=1;
9608   HAVE_FDATASYNC=1;
9609   HAVE_FSYNC=1;
9610   HAVE_FTRUNCATE=1;
9611   HAVE_GETDTABLESIZE=1;
9612   HAVE_GETGROUPS=1;
9613   HAVE_GETHOSTNAME=1;
9614   HAVE_GETLOGIN=1;
9615   HAVE_GETPAGESIZE=1;
9616   HAVE_GROUP_MEMBER=1;
9617   HAVE_LCHOWN=1;
9618   HAVE_LINK=1;
9619   HAVE_LINKAT=1;
9620   HAVE_PIPE=1;
9621   HAVE_PIPE2=1;
9622   HAVE_PREAD=1;
9623   HAVE_PWRITE=1;
9624   HAVE_READLINK=1;
9625   HAVE_READLINKAT=1;
9626   HAVE_SETHOSTNAME=1;
9627   HAVE_SLEEP=1;
9628   HAVE_SYMLINK=1;
9629   HAVE_SYMLINKAT=1;
9630   HAVE_TRUNCATE=1;
9631   HAVE_UNLINKAT=1;
9632   HAVE_USLEEP=1;
9633   HAVE_DECL_ENVIRON=1;
9634   HAVE_DECL_FCHDIR=1;
9635   HAVE_DECL_FDATASYNC=1;
9636   HAVE_DECL_GETDOMAINNAME=1;
9637   HAVE_DECL_GETLOGIN=1;
9638   HAVE_DECL_GETLOGIN_R=1;
9639   HAVE_DECL_GETPAGESIZE=1;
9640   HAVE_DECL_GETUSERSHELL=1;
9641   HAVE_DECL_SETHOSTNAME=1;
9642   HAVE_DECL_TTYNAME_R=1;
9643   HAVE_OS_H=0;
9644   HAVE_SYS_PARAM_H=0;
9645   REPLACE_CHOWN=0;
9646   REPLACE_CLOSE=0;
9647   REPLACE_DUP=0;
9648   REPLACE_DUP2=0;
9649   REPLACE_FACCESSAT=0;
9650   REPLACE_FCHOWNAT=0;
9651   REPLACE_FTRUNCATE=0;
9652   REPLACE_GETCWD=0;
9653   REPLACE_GETDOMAINNAME=0;
9654   REPLACE_GETDTABLESIZE=0;
9655   REPLACE_GETLOGIN_R=0;
9656   REPLACE_GETGROUPS=0;
9657   REPLACE_GETPAGESIZE=0;
9658   REPLACE_ISATTY=0;
9659   REPLACE_LCHOWN=0;
9660   REPLACE_LINK=0;
9661   REPLACE_LINKAT=0;
9662   REPLACE_LSEEK=0;
9663   REPLACE_PREAD=0;
9664   REPLACE_PWRITE=0;
9665   REPLACE_READ=0;
9666   REPLACE_READLINK=0;
9667   REPLACE_READLINKAT=0;
9668   REPLACE_RMDIR=0;
9669   REPLACE_SLEEP=0;
9670   REPLACE_SYMLINK=0;
9671   REPLACE_SYMLINKAT=0;
9672   REPLACE_TRUNCATE=0;
9673   REPLACE_TTYNAME_R=0;
9674   REPLACE_UNLINK=0;
9675   REPLACE_UNLINKAT=0;
9676   REPLACE_USLEEP=0;
9677   REPLACE_WRITE=0;
9678   UNISTD_H_HAVE_WINSOCK2_H=0;
9679   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9680
9681
9682
9683
9684
9685   for ac_func in $ac_func_list
9686 do :
9687   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9688 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9689 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9690   cat >>confdefs.h <<_ACEOF
9691 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9692 _ACEOF
9693
9694 fi
9695 done
9696
9697
9698
9699
9700
9701   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9702     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9703
9704 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9705
9706   else
9707     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9708   fi
9709
9710
9711
9712
9713
9714
9715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9716 $as_echo_n "checking whether // is distinct from /... " >&6; }
9717 if ${gl_cv_double_slash_root+:} false; then :
9718   $as_echo_n "(cached) " >&6
9719 else
9720    if test x"$cross_compiling" = xyes ; then
9721         # When cross-compiling, there is no way to tell whether // is special
9722         # short of a list of hosts.  However, the only known hosts to date
9723         # that have a distinct // are Apollo DomainOS (too old to port to),
9724         # Cygwin, and z/OS.  If anyone knows of another system for which // has
9725         # special semantics and is distinct from /, please report it to
9726         # <bug-gnulib@gnu.org>.
9727         case $host in
9728           *-cygwin | i370-ibm-openedition)
9729             gl_cv_double_slash_root=yes ;;
9730           *)
9731             # Be optimistic and assume that / and // are the same when we
9732             # don't know.
9733             gl_cv_double_slash_root='unknown, assuming no' ;;
9734         esac
9735       else
9736         set x `ls -di / // 2>/dev/null`
9737         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9738           gl_cv_double_slash_root=no
9739         else
9740           gl_cv_double_slash_root=yes
9741         fi
9742       fi
9743 fi
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9745 $as_echo "$gl_cv_double_slash_root" >&6; }
9746   if test "$gl_cv_double_slash_root" = yes; then
9747
9748 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9749
9750   fi
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9766 $as_echo_n "checking if environ is properly declared... " >&6; }
9767   if ${gt_cv_var_environ_declaration+:} false; then :
9768   $as_echo_n "(cached) " >&6
9769 else
9770
9771     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9772 /* end confdefs.h.  */
9773 #if HAVE_UNISTD_H
9774      #include <unistd.h>
9775      #endif
9776      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9777      #include <stdlib.h>
9778
9779            extern struct { int foo; } environ;
9780 int
9781 main ()
9782 {
9783 environ.foo = 1;
9784   ;
9785   return 0;
9786 }
9787 _ACEOF
9788 if ac_fn_c_try_compile "$LINENO"; then :
9789   gt_cv_var_environ_declaration=no
9790 else
9791   gt_cv_var_environ_declaration=yes
9792 fi
9793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9794 fi
9795
9796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9797 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9798   if test $gt_cv_var_environ_declaration = yes; then
9799
9800 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9801
9802   fi
9803
9804
9805   if test $gt_cv_var_environ_declaration != yes; then
9806     HAVE_DECL_ENVIRON=0
9807   fi
9808
9809
9810
9811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9812 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9813 if ${gl_cv_have_include_next+:} false; then :
9814   $as_echo_n "(cached) " >&6
9815 else
9816   rm -rf conftestd1a conftestd1b conftestd2
9817      mkdir conftestd1a conftestd1b conftestd2
9818                                                   cat <<EOF > conftestd1a/conftest.h
9819 #define DEFINED_IN_CONFTESTD1
9820 #include_next <conftest.h>
9821 #ifdef DEFINED_IN_CONFTESTD2
9822 int foo;
9823 #else
9824 #error "include_next doesn't work"
9825 #endif
9826 EOF
9827      cat <<EOF > conftestd1b/conftest.h
9828 #define DEFINED_IN_CONFTESTD1
9829 #include <stdio.h>
9830 #include_next <conftest.h>
9831 #ifdef DEFINED_IN_CONFTESTD2
9832 int foo;
9833 #else
9834 #error "include_next doesn't work"
9835 #endif
9836 EOF
9837      cat <<EOF > conftestd2/conftest.h
9838 #ifndef DEFINED_IN_CONFTESTD1
9839 #error "include_next test doesn't work"
9840 #endif
9841 #define DEFINED_IN_CONFTESTD2
9842 EOF
9843      gl_save_CPPFLAGS="$CPPFLAGS"
9844      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9845      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9846 /* end confdefs.h.  */
9847 #include <conftest.h>
9848 _ACEOF
9849 if ac_fn_c_try_compile "$LINENO"; then :
9850   gl_cv_have_include_next=yes
9851 else
9852   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9853         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9854 /* end confdefs.h.  */
9855 #include <conftest.h>
9856 _ACEOF
9857 if ac_fn_c_try_compile "$LINENO"; then :
9858   gl_cv_have_include_next=buggy
9859 else
9860   gl_cv_have_include_next=no
9861 fi
9862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9863
9864 fi
9865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9866      CPPFLAGS="$gl_save_CPPFLAGS"
9867      rm -rf conftestd1a conftestd1b conftestd2
9868
9869 fi
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9871 $as_echo "$gl_cv_have_include_next" >&6; }
9872   PRAGMA_SYSTEM_HEADER=
9873   if test $gl_cv_have_include_next = yes; then
9874     INCLUDE_NEXT=include_next
9875     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9876     if test -n "$GCC"; then
9877       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9878     fi
9879   else
9880     if test $gl_cv_have_include_next = buggy; then
9881       INCLUDE_NEXT=include
9882       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9883     else
9884       INCLUDE_NEXT=include
9885       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9886     fi
9887   fi
9888
9889
9890
9891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9892 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9893 if ${gl_cv_pragma_columns+:} false; then :
9894   $as_echo_n "(cached) " >&6
9895 else
9896        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h.  */
9898
9899 #ifdef __TANDEM
9900 choke me
9901 #endif
9902
9903 _ACEOF
9904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9905   $EGREP "choke me" >/dev/null 2>&1; then :
9906   gl_cv_pragma_columns=yes
9907 else
9908   gl_cv_pragma_columns=no
9909 fi
9910 rm -f conftest*
9911
9912
9913 fi
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9915 $as_echo "$gl_cv_pragma_columns" >&6; }
9916   if test $gl_cv_pragma_columns = yes; then
9917     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9918   else
9919     PRAGMA_COLUMNS=
9920   fi
9921
9922
9923
9924
9925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9926 $as_echo_n "checking for complete errno.h... " >&6; }
9927 if ${gl_cv_header_errno_h_complete+:} false; then :
9928   $as_echo_n "(cached) " >&6
9929 else
9930
9931     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9932 /* end confdefs.h.  */
9933
9934 #include <errno.h>
9935 #if !defined ETXTBSY
9936 booboo
9937 #endif
9938 #if !defined ENOMSG
9939 booboo
9940 #endif
9941 #if !defined EIDRM
9942 booboo
9943 #endif
9944 #if !defined ENOLINK
9945 booboo
9946 #endif
9947 #if !defined EPROTO
9948 booboo
9949 #endif
9950 #if !defined EMULTIHOP
9951 booboo
9952 #endif
9953 #if !defined EBADMSG
9954 booboo
9955 #endif
9956 #if !defined EOVERFLOW
9957 booboo
9958 #endif
9959 #if !defined ENOTSUP
9960 booboo
9961 #endif
9962 #if !defined ENETRESET
9963 booboo
9964 #endif
9965 #if !defined ECONNABORTED
9966 booboo
9967 #endif
9968 #if !defined ESTALE
9969 booboo
9970 #endif
9971 #if !defined EDQUOT
9972 booboo
9973 #endif
9974 #if !defined ECANCELED
9975 booboo
9976 #endif
9977 #if !defined EOWNERDEAD
9978 booboo
9979 #endif
9980 #if !defined ENOTRECOVERABLE
9981 booboo
9982 #endif
9983 #if !defined EILSEQ
9984 booboo
9985 #endif
9986
9987 _ACEOF
9988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9989   $EGREP "booboo" >/dev/null 2>&1; then :
9990   gl_cv_header_errno_h_complete=no
9991 else
9992   gl_cv_header_errno_h_complete=yes
9993 fi
9994 rm -f conftest*
9995
9996
9997 fi
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9999 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10000   if test $gl_cv_header_errno_h_complete = yes; then
10001     ERRNO_H=''
10002   else
10003
10004
10005
10006
10007
10008
10009
10010
10011      if test $gl_cv_have_include_next = yes; then
10012        gl_cv_next_errno_h='<'errno.h'>'
10013      else
10014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10015 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10016 if ${gl_cv_next_errno_h+:} false; then :
10017   $as_echo_n "(cached) " >&6
10018 else
10019
10020
10021
10022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10023 /* end confdefs.h.  */
10024 #include <errno.h>
10025 _ACEOF
10026                 case "$host_os" in
10027     aix*) gl_absname_cpp="$ac_cpp -C" ;;
10028     *)    gl_absname_cpp="$ac_cpp" ;;
10029   esac
10030
10031   case "$host_os" in
10032     mingw*)
10033                                           gl_dirsep_regex='[/\\]'
10034       ;;
10035     *)
10036       gl_dirsep_regex='\/'
10037       ;;
10038   esac
10039       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10040   gl_header_literal_regex=`echo 'errno.h' \
10041                            | sed -e "$gl_make_literal_regex_sed"`
10042   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10043       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10044       s|^/[^/]|//&|
10045       p
10046       q
10047     }'
10048
10049         gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10050   sed -n "$gl_absolute_header_sed"`
10051
10052            gl_header=$gl_cv_absolute_errno_h
10053            gl_cv_next_errno_h='"'$gl_header'"'
10054
10055
10056 fi
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10058 $as_echo "$gl_cv_next_errno_h" >&6; }
10059      fi
10060      NEXT_ERRNO_H=$gl_cv_next_errno_h
10061
10062      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10063        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10064        gl_next_as_first_directive='<'errno.h'>'
10065      else
10066        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10067        gl_next_as_first_directive=$gl_cv_next_errno_h
10068      fi
10069      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10070
10071
10072
10073
10074     ERRNO_H='errno.h'
10075   fi
10076
10077    if test -n "$ERRNO_H"; then
10078   GL_GENERATE_ERRNO_H_TRUE=
10079   GL_GENERATE_ERRNO_H_FALSE='#'
10080 else
10081   GL_GENERATE_ERRNO_H_TRUE='#'
10082   GL_GENERATE_ERRNO_H_FALSE=
10083 fi
10084
10085
10086   if test -n "$ERRNO_H"; then
10087     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10088 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10089 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10090   $as_echo_n "(cached) " >&6
10091 else
10092
10093       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10094 /* end confdefs.h.  */
10095
10096 #include <errno.h>
10097 #ifdef EMULTIHOP
10098 yes
10099 #endif
10100
10101 _ACEOF
10102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10103   $EGREP "yes" >/dev/null 2>&1; then :
10104   gl_cv_header_errno_h_EMULTIHOP=yes
10105 else
10106   gl_cv_header_errno_h_EMULTIHOP=no
10107 fi
10108 rm -f conftest*
10109
10110       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10111         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10112 /* end confdefs.h.  */
10113
10114 #define _XOPEN_SOURCE_EXTENDED 1
10115 #include <errno.h>
10116 #ifdef EMULTIHOP
10117 yes
10118 #endif
10119
10120 _ACEOF
10121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10122   $EGREP "yes" >/dev/null 2>&1; then :
10123   gl_cv_header_errno_h_EMULTIHOP=hidden
10124 fi
10125 rm -f conftest*
10126
10127         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10128                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10129 #define _XOPEN_SOURCE_EXTENDED 1
10130 #include <errno.h>
10131 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10132 #include <stdio.h>
10133 #include <stdlib.h>
10134 "; then :
10135
10136 fi
10137
10138         fi
10139       fi
10140
10141 fi
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10143 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10144     case $gl_cv_header_errno_h_EMULTIHOP in
10145       yes | no)
10146         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10147         ;;
10148       *)
10149         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10150         ;;
10151     esac
10152
10153
10154   fi
10155
10156
10157   if test -n "$ERRNO_H"; then
10158     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10159 $as_echo_n "checking for ENOLINK value... " >&6; }
10160 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163
10164       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10165 /* end confdefs.h.  */
10166
10167 #include <errno.h>
10168 #ifdef ENOLINK
10169 yes
10170 #endif
10171
10172 _ACEOF
10173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10174   $EGREP "yes" >/dev/null 2>&1; then :
10175   gl_cv_header_errno_h_ENOLINK=yes
10176 else
10177   gl_cv_header_errno_h_ENOLINK=no
10178 fi
10179 rm -f conftest*
10180
10181       if test $gl_cv_header_errno_h_ENOLINK = no; then
10182         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183 /* end confdefs.h.  */
10184
10185 #define _XOPEN_SOURCE_EXTENDED 1
10186 #include <errno.h>
10187 #ifdef ENOLINK
10188 yes
10189 #endif
10190
10191 _ACEOF
10192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10193   $EGREP "yes" >/dev/null 2>&1; then :
10194   gl_cv_header_errno_h_ENOLINK=hidden
10195 fi
10196 rm -f conftest*
10197
10198         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10199                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10200 #define _XOPEN_SOURCE_EXTENDED 1
10201 #include <errno.h>
10202 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10203 #include <stdio.h>
10204 #include <stdlib.h>
10205 "; then :
10206
10207 fi
10208
10209         fi
10210       fi
10211
10212 fi
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10214 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10215     case $gl_cv_header_errno_h_ENOLINK in
10216       yes | no)
10217         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10218         ;;
10219       *)
10220         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10221         ;;
10222     esac
10223
10224
10225   fi
10226
10227
10228   if test -n "$ERRNO_H"; then
10229     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10230 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10231 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10232   $as_echo_n "(cached) " >&6
10233 else
10234
10235       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10236 /* end confdefs.h.  */
10237
10238 #include <errno.h>
10239 #ifdef EOVERFLOW
10240 yes
10241 #endif
10242
10243 _ACEOF
10244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10245   $EGREP "yes" >/dev/null 2>&1; then :
10246   gl_cv_header_errno_h_EOVERFLOW=yes
10247 else
10248   gl_cv_header_errno_h_EOVERFLOW=no
10249 fi
10250 rm -f conftest*
10251
10252       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10253         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254 /* end confdefs.h.  */
10255
10256 #define _XOPEN_SOURCE_EXTENDED 1
10257 #include <errno.h>
10258 #ifdef EOVERFLOW
10259 yes
10260 #endif
10261
10262 _ACEOF
10263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10264   $EGREP "yes" >/dev/null 2>&1; then :
10265   gl_cv_header_errno_h_EOVERFLOW=hidden
10266 fi
10267 rm -f conftest*
10268
10269         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10270                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10271 #define _XOPEN_SOURCE_EXTENDED 1
10272 #include <errno.h>
10273 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10274 #include <stdio.h>
10275 #include <stdlib.h>
10276 "; then :
10277
10278 fi
10279
10280         fi
10281       fi
10282
10283 fi
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10285 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10286     case $gl_cv_header_errno_h_EOVERFLOW in
10287       yes | no)
10288         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10289         ;;
10290       *)
10291         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10292         ;;
10293     esac
10294
10295
10296   fi
10297
10298
10299 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10300 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10301   ac_have_decl=1
10302 else
10303   ac_have_decl=0
10304 fi
10305
10306 cat >>confdefs.h <<_ACEOF
10307 #define HAVE_DECL_STRERROR_R $ac_have_decl
10308 _ACEOF
10309
10310 for ac_func in strerror_r
10311 do :
10312   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10313 if test "x$ac_cv_func_strerror_r" = xyes; then :
10314   cat >>confdefs.h <<_ACEOF
10315 #define HAVE_STRERROR_R 1
10316 _ACEOF
10317
10318 fi
10319 done
10320
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10322 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10323 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10324   $as_echo_n "(cached) " >&6
10325 else
10326
10327     ac_cv_func_strerror_r_char_p=no
10328     if test $ac_cv_have_decl_strerror_r = yes; then
10329       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h.  */
10331 $ac_includes_default
10332 int
10333 main ()
10334 {
10335
10336           char buf[100];
10337           char x = *strerror_r (0, buf, sizeof buf);
10338           char *p = strerror_r (0, buf, sizeof buf);
10339           return !p || x;
10340
10341   ;
10342   return 0;
10343 }
10344 _ACEOF
10345 if ac_fn_c_try_compile "$LINENO"; then :
10346   ac_cv_func_strerror_r_char_p=yes
10347 fi
10348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10349     else
10350       # strerror_r is not declared.  Choose between
10351       # systems that have relatively inaccessible declarations for the
10352       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10353       # former has a strerror_r that returns char*, while the latter
10354       # has a strerror_r that returns `int'.
10355       # This test should segfault on the DEC system.
10356       if test "$cross_compiling" = yes; then :
10357   :
10358 else
10359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10360 /* end confdefs.h.  */
10361 $ac_includes_default
10362         extern char *strerror_r ();
10363 int
10364 main ()
10365 {
10366 char buf[100];
10367           char x = *strerror_r (0, buf, sizeof buf);
10368           return ! isalpha (x);
10369   ;
10370   return 0;
10371 }
10372 _ACEOF
10373 if ac_fn_c_try_run "$LINENO"; then :
10374   ac_cv_func_strerror_r_char_p=yes
10375 fi
10376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10377   conftest.$ac_objext conftest.beam conftest.$ac_ext
10378 fi
10379
10380     fi
10381
10382 fi
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10384 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10385 if test $ac_cv_func_strerror_r_char_p = yes; then
10386
10387 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10388
10389 fi
10390
10391
10392   XGETTEXT_EXTRA_OPTIONS=
10393
10394
10395
10396
10397
10398   ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
10399 "
10400 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
10401
10402 cat >>confdefs.h <<_ACEOF
10403 #define HAVE_SIG_ATOMIC_T 1
10404 _ACEOF
10405
10406
10407 else
10408
10409 $as_echo "#define sig_atomic_t int" >>confdefs.h
10410
10411 fi
10412
10413
10414
10415   GNULIB_FCNTL=0;
10416   GNULIB_NONBLOCKING=0;
10417   GNULIB_OPEN=0;
10418   GNULIB_OPENAT=0;
10419     HAVE_FCNTL=1;
10420   HAVE_OPENAT=1;
10421   REPLACE_FCNTL=0;
10422   REPLACE_OPEN=0;
10423   REPLACE_OPENAT=0;
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10435 $as_echo_n "checking for working fcntl.h... " >&6; }
10436 if ${gl_cv_header_working_fcntl_h+:} false; then :
10437   $as_echo_n "(cached) " >&6
10438 else
10439   if test "$cross_compiling" = yes; then :
10440   case "$host_os" in
10441                   # Guess 'no' on native Windows.
10442           mingw*) gl_cv_header_working_fcntl_h='no' ;;
10443           *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
10444         esac
10445
10446 else
10447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10448 /* end confdefs.h.  */
10449 #include <sys/types.h>
10450            #include <sys/stat.h>
10451            #if HAVE_UNISTD_H
10452            # include <unistd.h>
10453            #else /* on Windows with MSVC */
10454            # include <io.h>
10455            # include <stdlib.h>
10456            # defined sleep(n) _sleep ((n) * 1000)
10457            #endif
10458            #include <fcntl.h>
10459            #ifndef O_NOATIME
10460             #define O_NOATIME 0
10461            #endif
10462            #ifndef O_NOFOLLOW
10463             #define O_NOFOLLOW 0
10464            #endif
10465            static int const constants[] =
10466             {
10467               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10468               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10469             };
10470
10471 int
10472 main ()
10473 {
10474
10475             int result = !constants;
10476             #if HAVE_SYMLINK
10477             {
10478               static char const sym[] = "conftest.sym";
10479               if (symlink ("/dev/null", sym) != 0)
10480                 result |= 2;
10481               else
10482                 {
10483                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10484                   if (fd >= 0)
10485                     {
10486                       close (fd);
10487                       result |= 4;
10488                     }
10489                 }
10490               if (unlink (sym) != 0 || symlink (".", sym) != 0)
10491                 result |= 2;
10492               else
10493                 {
10494                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10495                   if (fd >= 0)
10496                     {
10497                       close (fd);
10498                       result |= 4;
10499                     }
10500                 }
10501               unlink (sym);
10502             }
10503             #endif
10504             {
10505               static char const file[] = "confdefs.h";
10506               int fd = open (file, O_RDONLY | O_NOATIME);
10507               if (fd < 0)
10508                 result |= 8;
10509               else
10510                 {
10511                   struct stat st0;
10512                   if (fstat (fd, &st0) != 0)
10513                     result |= 16;
10514                   else
10515                     {
10516                       char c;
10517                       sleep (1);
10518                       if (read (fd, &c, 1) != 1)
10519                         result |= 24;
10520                       else
10521                         {
10522                           if (close (fd) != 0)
10523                             result |= 32;
10524                           else
10525                             {
10526                               struct stat st1;
10527                               if (stat (file, &st1) != 0)
10528                                 result |= 40;
10529                               else
10530                                 if (st0.st_atime != st1.st_atime)
10531                                   result |= 64;
10532                             }
10533                         }
10534                     }
10535                 }
10536             }
10537             return result;
10538   ;
10539   return 0;
10540 }
10541 _ACEOF
10542 if ac_fn_c_try_run "$LINENO"; then :
10543   gl_cv_header_working_fcntl_h=yes
10544 else
10545   case $? in #(
10546         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10547         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10548         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10549          *) gl_cv_header_working_fcntl_h='no';;
10550         esac
10551 fi
10552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10553   conftest.$ac_objext conftest.beam conftest.$ac_ext
10554 fi
10555
10556
10557 fi
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10559 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10560
10561   case $gl_cv_header_working_fcntl_h in #(
10562   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10563   *) ac_val=1;;
10564   esac
10565
10566 cat >>confdefs.h <<_ACEOF
10567 #define HAVE_WORKING_O_NOATIME $ac_val
10568 _ACEOF
10569
10570
10571   case $gl_cv_header_working_fcntl_h in #(
10572   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10573   *) ac_val=1;;
10574   esac
10575
10576 cat >>confdefs.h <<_ACEOF
10577 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10578 _ACEOF
10579
10580
10581 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10582 if test "x$ac_cv_type_pid_t" = xyes; then :
10583
10584 else
10585
10586 cat >>confdefs.h <<_ACEOF
10587 #define pid_t int
10588 _ACEOF
10589
10590 fi
10591
10592 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10593 if test "x$ac_cv_type_mode_t" = xyes; then :
10594
10595 else
10596
10597 cat >>confdefs.h <<_ACEOF
10598 #define mode_t int
10599 _ACEOF
10600
10601 fi
10602
10603
10604   GNULIB_DPRINTF=0;
10605   GNULIB_FCLOSE=0;
10606   GNULIB_FDOPEN=0;
10607   GNULIB_FFLUSH=0;
10608   GNULIB_FGETC=0;
10609   GNULIB_FGETS=0;
10610   GNULIB_FOPEN=0;
10611   GNULIB_FPRINTF=0;
10612   GNULIB_FPRINTF_POSIX=0;
10613   GNULIB_FPURGE=0;
10614   GNULIB_FPUTC=0;
10615   GNULIB_FPUTS=0;
10616   GNULIB_FREAD=0;
10617   GNULIB_FREOPEN=0;
10618   GNULIB_FSCANF=0;
10619   GNULIB_FSEEK=0;
10620   GNULIB_FSEEKO=0;
10621   GNULIB_FTELL=0;
10622   GNULIB_FTELLO=0;
10623   GNULIB_FWRITE=0;
10624   GNULIB_GETC=0;
10625   GNULIB_GETCHAR=0;
10626   GNULIB_GETDELIM=0;
10627   GNULIB_GETLINE=0;
10628   GNULIB_OBSTACK_PRINTF=0;
10629   GNULIB_OBSTACK_PRINTF_POSIX=0;
10630   GNULIB_PCLOSE=0;
10631   GNULIB_PERROR=0;
10632   GNULIB_POPEN=0;
10633   GNULIB_PRINTF=0;
10634   GNULIB_PRINTF_POSIX=0;
10635   GNULIB_PUTC=0;
10636   GNULIB_PUTCHAR=0;
10637   GNULIB_PUTS=0;
10638   GNULIB_REMOVE=0;
10639   GNULIB_RENAME=0;
10640   GNULIB_RENAMEAT=0;
10641   GNULIB_SCANF=0;
10642   GNULIB_SNPRINTF=0;
10643   GNULIB_SPRINTF_POSIX=0;
10644   GNULIB_STDIO_H_NONBLOCKING=0;
10645   GNULIB_STDIO_H_SIGPIPE=0;
10646   GNULIB_TMPFILE=0;
10647   GNULIB_VASPRINTF=0;
10648   GNULIB_VFSCANF=0;
10649   GNULIB_VSCANF=0;
10650   GNULIB_VDPRINTF=0;
10651   GNULIB_VFPRINTF=0;
10652   GNULIB_VFPRINTF_POSIX=0;
10653   GNULIB_VPRINTF=0;
10654   GNULIB_VPRINTF_POSIX=0;
10655   GNULIB_VSNPRINTF=0;
10656   GNULIB_VSPRINTF_POSIX=0;
10657     HAVE_DECL_FPURGE=1;
10658   HAVE_DECL_FSEEKO=1;
10659   HAVE_DECL_FTELLO=1;
10660   HAVE_DECL_GETDELIM=1;
10661   HAVE_DECL_GETLINE=1;
10662   HAVE_DECL_OBSTACK_PRINTF=1;
10663   HAVE_DECL_SNPRINTF=1;
10664   HAVE_DECL_VSNPRINTF=1;
10665   HAVE_DPRINTF=1;
10666   HAVE_FSEEKO=1;
10667   HAVE_FTELLO=1;
10668   HAVE_PCLOSE=1;
10669   HAVE_POPEN=1;
10670   HAVE_RENAMEAT=1;
10671   HAVE_VASPRINTF=1;
10672   HAVE_VDPRINTF=1;
10673   REPLACE_DPRINTF=0;
10674   REPLACE_FCLOSE=0;
10675   REPLACE_FDOPEN=0;
10676   REPLACE_FFLUSH=0;
10677   REPLACE_FOPEN=0;
10678   REPLACE_FPRINTF=0;
10679   REPLACE_FPURGE=0;
10680   REPLACE_FREOPEN=0;
10681   REPLACE_FSEEK=0;
10682   REPLACE_FSEEKO=0;
10683   REPLACE_FTELL=0;
10684   REPLACE_FTELLO=0;
10685   REPLACE_GETDELIM=0;
10686   REPLACE_GETLINE=0;
10687   REPLACE_OBSTACK_PRINTF=0;
10688   REPLACE_PERROR=0;
10689   REPLACE_POPEN=0;
10690   REPLACE_PRINTF=0;
10691   REPLACE_REMOVE=0;
10692   REPLACE_RENAME=0;
10693   REPLACE_RENAMEAT=0;
10694   REPLACE_SNPRINTF=0;
10695   REPLACE_SPRINTF=0;
10696   REPLACE_STDIO_READ_FUNCS=0;
10697   REPLACE_STDIO_WRITE_FUNCS=0;
10698   REPLACE_TMPFILE=0;
10699   REPLACE_VASPRINTF=0;
10700   REPLACE_VDPRINTF=0;
10701   REPLACE_VFPRINTF=0;
10702   REPLACE_VPRINTF=0;
10703   REPLACE_VSNPRINTF=0;
10704   REPLACE_VSPRINTF=0;
10705
10706
10707
10708
10709   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
10710 $as_echo_n "checking for stdint.h... " >&6; }
10711 if ${gl_cv_header_stdint_h+:} false; then :
10712   $as_echo_n "(cached) " >&6
10713 else
10714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10715 /* end confdefs.h.  */
10716 #include <sys/types.h>
10717             #include <stdint.h>
10718 int
10719 main ()
10720 {
10721 uintmax_t i = (uintmax_t) -1; return !i;
10722   ;
10723   return 0;
10724 }
10725 _ACEOF
10726 if ac_fn_c_try_compile "$LINENO"; then :
10727   gl_cv_header_stdint_h=yes
10728 else
10729   gl_cv_header_stdint_h=no
10730 fi
10731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10732 fi
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
10734 $as_echo "$gl_cv_header_stdint_h" >&6; }
10735   if test $gl_cv_header_stdint_h = yes; then
10736
10737 cat >>confdefs.h <<_ACEOF
10738 #define HAVE_STDINT_H_WITH_UINTMAX 1
10739 _ACEOF
10740
10741   fi
10742
10743
10744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
10745 $as_echo_n "checking for inttypes.h... " >&6; }
10746 if ${gl_cv_header_inttypes_h+:} false; then :
10747   $as_echo_n "(cached) " >&6
10748 else
10749   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10750 /* end confdefs.h.  */
10751
10752 #include <sys/types.h>
10753 #include <inttypes.h>
10754
10755 int
10756 main ()
10757 {
10758 uintmax_t i = (uintmax_t) -1; return !i;
10759   ;
10760   return 0;
10761 }
10762 _ACEOF
10763 if ac_fn_c_try_compile "$LINENO"; then :
10764   gl_cv_header_inttypes_h=yes
10765 else
10766   gl_cv_header_inttypes_h=no
10767 fi
10768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10769 fi
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
10771 $as_echo "$gl_cv_header_inttypes_h" >&6; }
10772   if test $gl_cv_header_inttypes_h = yes; then
10773
10774 cat >>confdefs.h <<_ACEOF
10775 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
10776 _ACEOF
10777
10778   fi
10779
10780
10781
10782
10783
10784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
10785 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
10786 if ${gl_cv_func_printf_sizes_c99+:} false; then :
10787   $as_echo_n "(cached) " >&6
10788 else
10789
10790       if test "$cross_compiling" = yes; then :
10791
10792          case "$host_os" in
10793                                  # Guess yes on glibc systems.
10794            *-gnu* | gnu*)        gl_cv_func_printf_sizes_c99="guessing yes";;
10795                                  # Guess yes on FreeBSD >= 5.
10796            freebsd[1-4].*)       gl_cv_func_printf_sizes_c99="guessing no";;
10797            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
10798                                  # Guess yes on Mac OS X >= 10.3.
10799            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
10800            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
10801                                  # Guess yes on OpenBSD >= 3.9.
10802            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
10803                                  gl_cv_func_printf_sizes_c99="guessing no";;
10804            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
10805                                  # Guess yes on Solaris >= 2.10.
10806            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
10807            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
10808                                  # Guess yes on NetBSD >= 3.
10809            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
10810                                  gl_cv_func_printf_sizes_c99="guessing no";;
10811            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
10812                                  # Guess yes on MSVC, no on mingw.
10813            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10814 /* end confdefs.h.  */
10815
10816 #ifdef _MSC_VER
10817  Known
10818 #endif
10819
10820 _ACEOF
10821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10822   $EGREP "Known" >/dev/null 2>&1; then :
10823   gl_cv_func_printf_sizes_c99="guessing yes"
10824 else
10825   gl_cv_func_printf_sizes_c99="guessing no"
10826 fi
10827 rm -f conftest*
10828
10829                                  ;;
10830                                  # If we don't know, assume the worst.
10831            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
10832          esac
10833
10834 else
10835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10836 /* end confdefs.h.  */
10837
10838 #include <stddef.h>
10839 #include <stdio.h>
10840 #include <string.h>
10841 #include <sys/types.h>
10842 #if HAVE_STDINT_H_WITH_UINTMAX
10843 # include <stdint.h>
10844 #endif
10845 #if HAVE_INTTYPES_H_WITH_UINTMAX
10846 # include <inttypes.h>
10847 #endif
10848 static char buf[100];
10849 int main ()
10850 {
10851   int result = 0;
10852 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
10853   buf[0] = '\0';
10854   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
10855       || strcmp (buf, "12345671 33") != 0)
10856     result |= 1;
10857 #else
10858   result |= 1;
10859 #endif
10860   buf[0] = '\0';
10861   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
10862       || strcmp (buf, "12345672 33") != 0)
10863     result |= 2;
10864   buf[0] = '\0';
10865   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
10866       || strcmp (buf, "12345673 33") != 0)
10867     result |= 4;
10868   buf[0] = '\0';
10869   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
10870       || strcmp (buf, "1.5 33") != 0)
10871     result |= 8;
10872   return result;
10873 }
10874 _ACEOF
10875 if ac_fn_c_try_run "$LINENO"; then :
10876   gl_cv_func_printf_sizes_c99=yes
10877 else
10878   gl_cv_func_printf_sizes_c99=no
10879 fi
10880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10881   conftest.$ac_objext conftest.beam conftest.$ac_ext
10882 fi
10883
10884
10885 fi
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
10887 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
10888
10889
10890
10891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
10892 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
10893 if ${gl_cv_func_printf_long_double+:} false; then :
10894   $as_echo_n "(cached) " >&6
10895 else
10896
10897       if test "$cross_compiling" = yes; then :
10898   case "$host_os" in
10899            beos*)  gl_cv_func_printf_long_double="guessing no";;
10900                    # Guess yes on MSVC, no on mingw.
10901            mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10902 /* end confdefs.h.  */
10903
10904 #ifdef _MSC_VER
10905  Known
10906 #endif
10907
10908 _ACEOF
10909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10910   $EGREP "Known" >/dev/null 2>&1; then :
10911   gl_cv_func_printf_long_double="guessing yes"
10912 else
10913   gl_cv_func_printf_long_double="guessing no"
10914 fi
10915 rm -f conftest*
10916
10917                    ;;
10918            *)      gl_cv_func_printf_long_double="guessing yes";;
10919          esac
10920
10921 else
10922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10923 /* end confdefs.h.  */
10924
10925 #include <stdio.h>
10926 #include <string.h>
10927 static char buf[10000];
10928 int main ()
10929 {
10930   int result = 0;
10931   buf[0] = '\0';
10932   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
10933       || strcmp (buf, "1.750000 33") != 0)
10934     result |= 1;
10935   buf[0] = '\0';
10936   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
10937       || strcmp (buf, "1.750000e+00 33") != 0)
10938     result |= 2;
10939   buf[0] = '\0';
10940   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
10941       || strcmp (buf, "1.75 33") != 0)
10942     result |= 4;
10943   return result;
10944 }
10945 _ACEOF
10946 if ac_fn_c_try_run "$LINENO"; then :
10947   gl_cv_func_printf_long_double=yes
10948 else
10949   gl_cv_func_printf_long_double=no
10950 fi
10951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10952   conftest.$ac_objext conftest.beam conftest.$ac_ext
10953 fi
10954
10955
10956 fi
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
10958 $as_echo "$gl_cv_func_printf_long_double" >&6; }
10959
10960
10961
10962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
10963 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
10964 if ${gl_cv_func_printf_infinite+:} false; then :
10965   $as_echo_n "(cached) " >&6
10966 else
10967
10968       if test "$cross_compiling" = yes; then :
10969
10970          case "$host_os" in
10971                                  # Guess yes on glibc systems.
10972            *-gnu* | gnu*)        gl_cv_func_printf_infinite="guessing yes";;
10973                                  # Guess yes on FreeBSD >= 6.
10974            freebsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
10975            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
10976                                  # Guess yes on Mac OS X >= 10.3.
10977            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
10978            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
10979                                  # Guess yes on HP-UX >= 11.
10980            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
10981            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
10982                                  # Guess yes on NetBSD >= 3.
10983            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
10984                                  gl_cv_func_printf_infinite="guessing no";;
10985            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
10986                                  # Guess yes on BeOS.
10987            beos*)                gl_cv_func_printf_infinite="guessing yes";;
10988                                  # Guess yes on MSVC, no on mingw.
10989            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10990 /* end confdefs.h.  */
10991
10992 #ifdef _MSC_VER
10993  Known
10994 #endif
10995
10996 _ACEOF
10997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10998   $EGREP "Known" >/dev/null 2>&1; then :
10999   gl_cv_func_printf_infinite="guessing yes"
11000 else
11001   gl_cv_func_printf_infinite="guessing no"
11002 fi
11003 rm -f conftest*
11004
11005                                  ;;
11006                                  # If we don't know, assume the worst.
11007            *)                    gl_cv_func_printf_infinite="guessing no";;
11008          esac
11009
11010 else
11011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012 /* end confdefs.h.  */
11013
11014 #include <stdio.h>
11015 #include <string.h>
11016 static int
11017 strisnan (const char *string, size_t start_index, size_t end_index)
11018 {
11019   if (start_index < end_index)
11020     {
11021       if (string[start_index] == '-')
11022         start_index++;
11023       if (start_index + 3 <= end_index
11024           && memcmp (string + start_index, "nan", 3) == 0)
11025         {
11026           start_index += 3;
11027           if (start_index == end_index
11028               || (string[start_index] == '(' && string[end_index - 1] == ')'))
11029             return 1;
11030         }
11031     }
11032   return 0;
11033 }
11034 static int
11035 have_minus_zero ()
11036 {
11037   static double plus_zero = 0.0;
11038   double minus_zero = - plus_zero;
11039   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
11040 }
11041 static char buf[10000];
11042 static double zero = 0.0;
11043 int main ()
11044 {
11045   int result = 0;
11046   if (sprintf (buf, "%f", 1.0 / zero) < 0
11047       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11048     result |= 1;
11049   if (sprintf (buf, "%f", -1.0 / zero) < 0
11050       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11051     result |= 1;
11052   if (sprintf (buf, "%f", zero / zero) < 0
11053       || !strisnan (buf, 0, strlen (buf)))
11054     result |= 2;
11055   if (sprintf (buf, "%e", 1.0 / zero) < 0
11056       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11057     result |= 4;
11058   if (sprintf (buf, "%e", -1.0 / zero) < 0
11059       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11060     result |= 4;
11061   if (sprintf (buf, "%e", zero / zero) < 0
11062       || !strisnan (buf, 0, strlen (buf)))
11063     result |= 8;
11064   if (sprintf (buf, "%g", 1.0 / zero) < 0
11065       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11066     result |= 16;
11067   if (sprintf (buf, "%g", -1.0 / zero) < 0
11068       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11069     result |= 16;
11070   if (sprintf (buf, "%g", zero / zero) < 0
11071       || !strisnan (buf, 0, strlen (buf)))
11072     result |= 32;
11073   /* This test fails on HP-UX 10.20.  */
11074   if (have_minus_zero ())
11075     if (sprintf (buf, "%g", - zero) < 0
11076         || strcmp (buf, "-0") != 0)
11077     result |= 64;
11078   return result;
11079 }
11080 _ACEOF
11081 if ac_fn_c_try_run "$LINENO"; then :
11082   gl_cv_func_printf_infinite=yes
11083 else
11084   gl_cv_func_printf_infinite=no
11085 fi
11086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11087   conftest.$ac_objext conftest.beam conftest.$ac_ext
11088 fi
11089
11090
11091 fi
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
11093 $as_echo "$gl_cv_func_printf_infinite" >&6; }
11094
11095
11096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11097 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11098 if ${ac_cv_c_bigendian+:} false; then :
11099   $as_echo_n "(cached) " >&6
11100 else
11101   ac_cv_c_bigendian=unknown
11102     # See if we're dealing with a universal compiler.
11103     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11104 /* end confdefs.h.  */
11105 #ifndef __APPLE_CC__
11106                not a universal capable compiler
11107              #endif
11108              typedef int dummy;
11109
11110 _ACEOF
11111 if ac_fn_c_try_compile "$LINENO"; then :
11112
11113         # Check for potential -arch flags.  It is not universal unless
11114         # there are at least two -arch flags with different values.
11115         ac_arch=
11116         ac_prev=
11117         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11118          if test -n "$ac_prev"; then
11119            case $ac_word in
11120              i?86 | x86_64 | ppc | ppc64)
11121                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11122                  ac_arch=$ac_word
11123                else
11124                  ac_cv_c_bigendian=universal
11125                  break
11126                fi
11127                ;;
11128            esac
11129            ac_prev=
11130          elif test "x$ac_word" = "x-arch"; then
11131            ac_prev=arch
11132          fi
11133        done
11134 fi
11135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11136     if test $ac_cv_c_bigendian = unknown; then
11137       # See if sys/param.h defines the BYTE_ORDER macro.
11138       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139 /* end confdefs.h.  */
11140 #include <sys/types.h>
11141              #include <sys/param.h>
11142
11143 int
11144 main ()
11145 {
11146 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11147                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11148                      && LITTLE_ENDIAN)
11149               bogus endian macros
11150              #endif
11151
11152   ;
11153   return 0;
11154 }
11155 _ACEOF
11156 if ac_fn_c_try_compile "$LINENO"; then :
11157   # It does; now see whether it defined to BIG_ENDIAN or not.
11158          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159 /* end confdefs.h.  */
11160 #include <sys/types.h>
11161                 #include <sys/param.h>
11162
11163 int
11164 main ()
11165 {
11166 #if BYTE_ORDER != BIG_ENDIAN
11167                  not big endian
11168                 #endif
11169
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 if ac_fn_c_try_compile "$LINENO"; then :
11175   ac_cv_c_bigendian=yes
11176 else
11177   ac_cv_c_bigendian=no
11178 fi
11179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11180 fi
11181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11182     fi
11183     if test $ac_cv_c_bigendian = unknown; then
11184       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11185       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11186 /* end confdefs.h.  */
11187 #include <limits.h>
11188
11189 int
11190 main ()
11191 {
11192 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11193               bogus endian macros
11194              #endif
11195
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 if ac_fn_c_try_compile "$LINENO"; then :
11201   # It does; now see whether it defined to _BIG_ENDIAN or not.
11202          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11203 /* end confdefs.h.  */
11204 #include <limits.h>
11205
11206 int
11207 main ()
11208 {
11209 #ifndef _BIG_ENDIAN
11210                  not big endian
11211                 #endif
11212
11213   ;
11214   return 0;
11215 }
11216 _ACEOF
11217 if ac_fn_c_try_compile "$LINENO"; then :
11218   ac_cv_c_bigendian=yes
11219 else
11220   ac_cv_c_bigendian=no
11221 fi
11222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11223 fi
11224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11225     fi
11226     if test $ac_cv_c_bigendian = unknown; then
11227       # Compile a test program.
11228       if test "$cross_compiling" = yes; then :
11229   # Try to guess by grepping values from an object file.
11230          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11231 /* end confdefs.h.  */
11232 short int ascii_mm[] =
11233                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11234                 short int ascii_ii[] =
11235                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11236                 int use_ascii (int i) {
11237                   return ascii_mm[i] + ascii_ii[i];
11238                 }
11239                 short int ebcdic_ii[] =
11240                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11241                 short int ebcdic_mm[] =
11242                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11243                 int use_ebcdic (int i) {
11244                   return ebcdic_mm[i] + ebcdic_ii[i];
11245                 }
11246                 extern int foo;
11247
11248 int
11249 main ()
11250 {
11251 return use_ascii (foo) == use_ebcdic (foo);
11252   ;
11253   return 0;
11254 }
11255 _ACEOF
11256 if ac_fn_c_try_compile "$LINENO"; then :
11257   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11258               ac_cv_c_bigendian=yes
11259             fi
11260             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11261               if test "$ac_cv_c_bigendian" = unknown; then
11262                 ac_cv_c_bigendian=no
11263               else
11264                 # finding both strings is unlikely to happen, but who knows?
11265                 ac_cv_c_bigendian=unknown
11266               fi
11267             fi
11268 fi
11269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11270 else
11271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11272 /* end confdefs.h.  */
11273 $ac_includes_default
11274 int
11275 main ()
11276 {
11277
11278              /* Are we little or big endian?  From Harbison&Steele.  */
11279              union
11280              {
11281                long int l;
11282                char c[sizeof (long int)];
11283              } u;
11284              u.l = 1;
11285              return u.c[sizeof (long int) - 1] == 1;
11286
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 if ac_fn_c_try_run "$LINENO"; then :
11292   ac_cv_c_bigendian=no
11293 else
11294   ac_cv_c_bigendian=yes
11295 fi
11296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11297   conftest.$ac_objext conftest.beam conftest.$ac_ext
11298 fi
11299
11300     fi
11301 fi
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11303 $as_echo "$ac_cv_c_bigendian" >&6; }
11304  case $ac_cv_c_bigendian in #(
11305    yes)
11306      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11307 ;; #(
11308    no)
11309       ;; #(
11310    universal)
11311
11312 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11313
11314      ;; #(
11315    *)
11316      as_fn_error $? "unknown endianness
11317  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11318  esac
11319
11320
11321
11322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
11323 $as_echo_n "checking whether long double and double are the same... " >&6; }
11324 if ${gl_cv_long_double_equals_double+:} false; then :
11325   $as_echo_n "(cached) " >&6
11326 else
11327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328 /* end confdefs.h.  */
11329 #include <float.h>
11330 int
11331 main ()
11332 {
11333 typedef int check[sizeof (long double) == sizeof (double)
11334                               && LDBL_MANT_DIG == DBL_MANT_DIG
11335                               && LDBL_MAX_EXP == DBL_MAX_EXP
11336                               && LDBL_MIN_EXP == DBL_MIN_EXP
11337                               ? 1 : -1];
11338
11339   ;
11340   return 0;
11341 }
11342 _ACEOF
11343 if ac_fn_c_try_compile "$LINENO"; then :
11344   gl_cv_long_double_equals_double=yes
11345 else
11346   gl_cv_long_double_equals_double=no
11347 fi
11348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11349
11350 fi
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
11352 $as_echo "$gl_cv_long_double_equals_double" >&6; }
11353   if test $gl_cv_long_double_equals_double = yes; then
11354
11355 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
11356
11357     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
11358   else
11359     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
11360   fi
11361
11362
11363
11364
11365
11366
11367
11368          if test -n "$gl_printf_safe"; then
11369
11370 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
11371
11372   fi
11373   case "$gl_cv_func_printf_long_double" in
11374     *yes)
11375       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
11376 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
11377 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
11378   $as_echo_n "(cached) " >&6
11379 else
11380
11381           if test "$cross_compiling" = yes; then :
11382   case "$host_cpu" in
11383                                      # Guess no on ia64, x86_64, i386.
11384                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
11385                *)
11386                  case "$host_os" in
11387                                          # Guess yes on glibc systems.
11388                    *-gnu* | gnu*)        gl_cv_func_printf_infinite_long_double="guessing yes";;
11389                                          # Guess yes on FreeBSD >= 6.
11390                    freebsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
11391                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
11392                                          # Guess yes on HP-UX >= 11.
11393                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
11394                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
11395                                          # Guess yes on MSVC, no on mingw.
11396                    mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397 /* end confdefs.h.  */
11398
11399 #ifdef _MSC_VER
11400  Known
11401 #endif
11402
11403 _ACEOF
11404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11405   $EGREP "Known" >/dev/null 2>&1; then :
11406   gl_cv_func_printf_infinite_long_double="guessing yes"
11407 else
11408   gl_cv_func_printf_infinite_long_double="guessing no"
11409 fi
11410 rm -f conftest*
11411
11412                                          ;;
11413                                          # If we don't know, assume the worst.
11414                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
11415                  esac
11416                  ;;
11417              esac
11418
11419 else
11420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421 /* end confdefs.h.  */
11422
11423
11424 #include <stdlib.h>
11425 #if defined __MACH__ && defined __APPLE__
11426 /* Avoid a crash on Mac OS X.  */
11427 #include <mach/mach.h>
11428 #include <mach/mach_error.h>
11429 #include <mach/thread_status.h>
11430 #include <mach/exception.h>
11431 #include <mach/task.h>
11432 #include <pthread.h>
11433 /* The exception port on which our thread listens.  */
11434 static mach_port_t our_exception_port;
11435 /* The main function of the thread listening for exceptions of type
11436    EXC_BAD_ACCESS.  */
11437 static void *
11438 mach_exception_thread (void *arg)
11439 {
11440   /* Buffer for a message to be received.  */
11441   struct {
11442     mach_msg_header_t head;
11443     mach_msg_body_t msgh_body;
11444     char data[1024];
11445   } msg;
11446   mach_msg_return_t retval;
11447   /* Wait for a message on the exception port.  */
11448   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11449                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11450   if (retval != MACH_MSG_SUCCESS)
11451     abort ();
11452   exit (1);
11453 }
11454 static void
11455 nocrash_init (void)
11456 {
11457   mach_port_t self = mach_task_self ();
11458   /* Allocate a port on which the thread shall listen for exceptions.  */
11459   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11460       == KERN_SUCCESS) {
11461     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
11462     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11463                                 MACH_MSG_TYPE_MAKE_SEND)
11464         == KERN_SUCCESS) {
11465       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
11466          for us.  */
11467       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11468       /* Create the thread listening on the exception port.  */
11469       pthread_attr_t attr;
11470       pthread_t thread;
11471       if (pthread_attr_init (&attr) == 0
11472           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11473           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11474         pthread_attr_destroy (&attr);
11475         /* Replace the exception port info for these exceptions with our own.
11476            Note that we replace the exception port for the entire task, not only
11477            for a particular thread.  This has the effect that when our exception
11478            port gets the message, the thread specific exception port has already
11479            been asked, and we don't need to bother about it.
11480            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
11481         task_set_exception_ports (self, mask, our_exception_port,
11482                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11483       }
11484     }
11485   }
11486 }
11487 #elif defined _WIN32 && ! defined __CYGWIN__
11488 /* Avoid a crash on native Windows.  */
11489 #define WIN32_LEAN_AND_MEAN
11490 #include <windows.h>
11491 #include <winerror.h>
11492 static LONG WINAPI
11493 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11494 {
11495   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11496     {
11497     case EXCEPTION_ACCESS_VIOLATION:
11498     case EXCEPTION_IN_PAGE_ERROR:
11499     case EXCEPTION_STACK_OVERFLOW:
11500     case EXCEPTION_GUARD_PAGE:
11501     case EXCEPTION_PRIV_INSTRUCTION:
11502     case EXCEPTION_ILLEGAL_INSTRUCTION:
11503     case EXCEPTION_DATATYPE_MISALIGNMENT:
11504     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11505     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11506       exit (1);
11507     }
11508   return EXCEPTION_CONTINUE_SEARCH;
11509 }
11510 static void
11511 nocrash_init (void)
11512 {
11513   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11514 }
11515 #else
11516 /* Avoid a crash on POSIX systems.  */
11517 #include <signal.h>
11518 #include <unistd.h>
11519 /* A POSIX signal handler.  */
11520 static void
11521 exception_handler (int sig)
11522 {
11523   _exit (1);
11524 }
11525 static void
11526 nocrash_init (void)
11527 {
11528 #ifdef SIGSEGV
11529   signal (SIGSEGV, exception_handler);
11530 #endif
11531 #ifdef SIGBUS
11532   signal (SIGBUS, exception_handler);
11533 #endif
11534 }
11535 #endif
11536
11537 #include <float.h>
11538 #include <stdio.h>
11539 #include <string.h>
11540 static int
11541 strisnan (const char *string, size_t start_index, size_t end_index)
11542 {
11543   if (start_index < end_index)
11544     {
11545       if (string[start_index] == '-')
11546         start_index++;
11547       if (start_index + 3 <= end_index
11548           && memcmp (string + start_index, "nan", 3) == 0)
11549         {
11550           start_index += 3;
11551           if (start_index == end_index
11552               || (string[start_index] == '(' && string[end_index - 1] == ')'))
11553             return 1;
11554         }
11555     }
11556   return 0;
11557 }
11558 static char buf[10000];
11559 static long double zeroL = 0.0L;
11560 int main ()
11561 {
11562   int result = 0;
11563   nocrash_init();
11564   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
11565       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11566     result |= 1;
11567   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
11568       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11569     result |= 1;
11570   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
11571       || !strisnan (buf, 0, strlen (buf)))
11572     result |= 1;
11573   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
11574       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11575     result |= 1;
11576   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
11577       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11578     result |= 1;
11579   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
11580       || !strisnan (buf, 0, strlen (buf)))
11581     result |= 1;
11582   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
11583       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
11584     result |= 1;
11585   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
11586       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
11587     result |= 1;
11588   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
11589       || !strisnan (buf, 0, strlen (buf)))
11590     result |= 1;
11591 #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
11592 /* Representation of an 80-bit 'long double' as an initializer for a sequence
11593    of 'unsigned int' words.  */
11594 # ifdef WORDS_BIGENDIAN
11595 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
11596      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
11597        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
11598        (unsigned int) (mantlo) << 16                                        \
11599      }
11600 # else
11601 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
11602      { mantlo, manthi, exponent }
11603 # endif
11604   { /* Quiet NaN.  */
11605     static union { unsigned int word[4]; long double value; } x =
11606       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
11607     if (sprintf (buf, "%Lf", x.value) < 0
11608         || !strisnan (buf, 0, strlen (buf)))
11609       result |= 2;
11610     if (sprintf (buf, "%Le", x.value) < 0
11611         || !strisnan (buf, 0, strlen (buf)))
11612       result |= 2;
11613     if (sprintf (buf, "%Lg", x.value) < 0
11614         || !strisnan (buf, 0, strlen (buf)))
11615       result |= 2;
11616   }
11617   {
11618     /* Signalling NaN.  */
11619     static union { unsigned int word[4]; long double value; } x =
11620       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
11621     if (sprintf (buf, "%Lf", x.value) < 0
11622         || !strisnan (buf, 0, strlen (buf)))
11623       result |= 2;
11624     if (sprintf (buf, "%Le", x.value) < 0
11625         || !strisnan (buf, 0, strlen (buf)))
11626       result |= 2;
11627     if (sprintf (buf, "%Lg", x.value) < 0
11628         || !strisnan (buf, 0, strlen (buf)))
11629       result |= 2;
11630   }
11631   { /* Pseudo-NaN.  */
11632     static union { unsigned int word[4]; long double value; } x =
11633       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
11634     if (sprintf (buf, "%Lf", x.value) <= 0)
11635       result |= 4;
11636     if (sprintf (buf, "%Le", x.value) <= 0)
11637       result |= 4;
11638     if (sprintf (buf, "%Lg", x.value) <= 0)
11639       result |= 4;
11640   }
11641   { /* Pseudo-Infinity.  */
11642     static union { unsigned int word[4]; long double value; } x =
11643       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
11644     if (sprintf (buf, "%Lf", x.value) <= 0)
11645       result |= 8;
11646     if (sprintf (buf, "%Le", x.value) <= 0)
11647       result |= 8;
11648     if (sprintf (buf, "%Lg", x.value) <= 0)
11649       result |= 8;
11650   }
11651   { /* Pseudo-Zero.  */
11652     static union { unsigned int word[4]; long double value; } x =
11653       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
11654     if (sprintf (buf, "%Lf", x.value) <= 0)
11655       result |= 16;
11656     if (sprintf (buf, "%Le", x.value) <= 0)
11657       result |= 16;
11658     if (sprintf (buf, "%Lg", x.value) <= 0)
11659       result |= 16;
11660   }
11661   { /* Unnormalized number.  */
11662     static union { unsigned int word[4]; long double value; } x =
11663       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
11664     if (sprintf (buf, "%Lf", x.value) <= 0)
11665       result |= 32;
11666     if (sprintf (buf, "%Le", x.value) <= 0)
11667       result |= 32;
11668     if (sprintf (buf, "%Lg", x.value) <= 0)
11669       result |= 32;
11670   }
11671   { /* Pseudo-Denormal.  */
11672     static union { unsigned int word[4]; long double value; } x =
11673       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
11674     if (sprintf (buf, "%Lf", x.value) <= 0)
11675       result |= 64;
11676     if (sprintf (buf, "%Le", x.value) <= 0)
11677       result |= 64;
11678     if (sprintf (buf, "%Lg", x.value) <= 0)
11679       result |= 64;
11680   }
11681 #endif
11682   return result;
11683 }
11684 _ACEOF
11685 if ac_fn_c_try_run "$LINENO"; then :
11686   gl_cv_func_printf_infinite_long_double=yes
11687 else
11688   gl_cv_func_printf_infinite_long_double=no
11689 fi
11690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11691   conftest.$ac_objext conftest.beam conftest.$ac_ext
11692 fi
11693
11694
11695 fi
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
11697 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
11698       ;;
11699     *)
11700       gl_cv_func_printf_infinite_long_double="irrelevant"
11701       ;;
11702   esac
11703
11704
11705
11706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
11707 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
11708 if ${gl_cv_func_printf_directive_a+:} false; then :
11709   $as_echo_n "(cached) " >&6
11710 else
11711
11712       if test "$cross_compiling" = yes; then :
11713
11714          case "$host_os" in
11715                                  # Guess yes on glibc >= 2.5 systems.
11716            *-gnu* | gnu*)
11717              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718 /* end confdefs.h.  */
11719
11720                #include <features.h>
11721                #ifdef __GNU_LIBRARY__
11722                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
11723                  BZ2908
11724                 #endif
11725                #endif
11726
11727 _ACEOF
11728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11729   $EGREP "BZ2908" >/dev/null 2>&1; then :
11730   gl_cv_func_printf_directive_a="guessing yes"
11731 else
11732   gl_cv_func_printf_directive_a="guessing no"
11733 fi
11734 rm -f conftest*
11735
11736              ;;
11737                                  # Guess no on native Windows.
11738            mingw*)               gl_cv_func_printf_directive_a="guessing no";;
11739                                  # If we don't know, assume the worst.
11740            *)                    gl_cv_func_printf_directive_a="guessing no";;
11741          esac
11742
11743 else
11744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11745 /* end confdefs.h.  */
11746
11747 #include <stdio.h>
11748 #include <string.h>
11749 static char buf[100];
11750 static double zero = 0.0;
11751 int main ()
11752 {
11753   int result = 0;
11754   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
11755       || (strcmp (buf, "0x1.922p+1 33") != 0
11756           && strcmp (buf, "0x3.244p+0 33") != 0
11757           && strcmp (buf, "0x6.488p-1 33") != 0
11758           && strcmp (buf, "0xc.91p-2 33") != 0))
11759     result |= 1;
11760   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
11761       || (strcmp (buf, "-0X1.922P+1 33") != 0
11762           && strcmp (buf, "-0X3.244P+0 33") != 0
11763           && strcmp (buf, "-0X6.488P-1 33") != 0
11764           && strcmp (buf, "-0XC.91P-2 33") != 0))
11765     result |= 2;
11766   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
11767   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
11768       || (strcmp (buf, "0x1.83p+0 33") != 0
11769           && strcmp (buf, "0x3.05p-1 33") != 0
11770           && strcmp (buf, "0x6.0ap-2 33") != 0
11771           && strcmp (buf, "0xc.14p-3 33") != 0))
11772     result |= 4;
11773   /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round.  */
11774   if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
11775       || (strcmp (buf, "0x2p+0 33") != 0
11776           && strcmp (buf, "0x3p-1 33") != 0
11777           && strcmp (buf, "0x6p-2 33") != 0
11778           && strcmp (buf, "0xcp-3 33") != 0))
11779     result |= 4;
11780   /* This catches a FreeBSD 6.1 bug.  See
11781      <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
11782   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
11783       || buf[0] == '0')
11784     result |= 8;
11785   /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
11786   if (sprintf (buf, "%.1a", 1.999) < 0
11787       || (strcmp (buf, "0x1.0p+1") != 0
11788           && strcmp (buf, "0x2.0p+0") != 0
11789           && strcmp (buf, "0x4.0p-1") != 0
11790           && strcmp (buf, "0x8.0p-2") != 0))
11791     result |= 16;
11792   /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
11793      glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
11794   if (sprintf (buf, "%.1La", 1.999L) < 0
11795       || (strcmp (buf, "0x1.0p+1") != 0
11796           && strcmp (buf, "0x2.0p+0") != 0
11797           && strcmp (buf, "0x4.0p-1") != 0
11798           && strcmp (buf, "0x8.0p-2") != 0))
11799     result |= 32;
11800   return result;
11801 }
11802 _ACEOF
11803 if ac_fn_c_try_run "$LINENO"; then :
11804   gl_cv_func_printf_directive_a=yes
11805 else
11806   gl_cv_func_printf_directive_a=no
11807 fi
11808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11809   conftest.$ac_objext conftest.beam conftest.$ac_ext
11810 fi
11811
11812
11813 fi
11814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
11815 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
11816
11817
11818
11819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
11820 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
11821 if ${gl_cv_func_printf_directive_f+:} false; then :
11822   $as_echo_n "(cached) " >&6
11823 else
11824
11825       if test "$cross_compiling" = yes; then :
11826
11827          case "$host_os" in
11828                                  # Guess yes on glibc systems.
11829            *-gnu* | gnu*)        gl_cv_func_printf_directive_f="guessing yes";;
11830                                  # Guess yes on FreeBSD >= 6.
11831            freebsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
11832            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
11833                                  # Guess yes on Mac OS X >= 10.3.
11834            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
11835            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
11836                                  # Guess yes on Solaris >= 2.10.
11837            solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
11838            solaris*)             gl_cv_func_printf_directive_f="guessing no";;
11839                                  # Guess yes on MSVC, no on mingw.
11840            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841 /* end confdefs.h.  */
11842
11843 #ifdef _MSC_VER
11844  Known
11845 #endif
11846
11847 _ACEOF
11848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11849   $EGREP "Known" >/dev/null 2>&1; then :
11850   gl_cv_func_printf_directive_f="guessing yes"
11851 else
11852   gl_cv_func_printf_directive_f="guessing no"
11853 fi
11854 rm -f conftest*
11855
11856                                  ;;
11857                                  # If we don't know, assume the worst.
11858            *)                    gl_cv_func_printf_directive_f="guessing no";;
11859          esac
11860
11861 else
11862   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863 /* end confdefs.h.  */
11864
11865 #include <stdio.h>
11866 #include <string.h>
11867 static char buf[100];
11868 static double zero = 0.0;
11869 int main ()
11870 {
11871   int result = 0;
11872   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
11873       || strcmp (buf, "1234567.000000 33") != 0)
11874     result |= 1;
11875   if (sprintf (buf, "%F", 1.0 / zero) < 0
11876       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
11877     result |= 2;
11878   /* This catches a Cygwin 1.5.x bug.  */
11879   if (sprintf (buf, "%.F", 1234.0) < 0
11880       || strcmp (buf, "1234") != 0)
11881     result |= 4;
11882   return result;
11883 }
11884 _ACEOF
11885 if ac_fn_c_try_run "$LINENO"; then :
11886   gl_cv_func_printf_directive_f=yes
11887 else
11888   gl_cv_func_printf_directive_f=no
11889 fi
11890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11891   conftest.$ac_objext conftest.beam conftest.$ac_ext
11892 fi
11893
11894
11895 fi
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
11897 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
11898
11899
11900
11901      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
11902 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
11903 if ${gl_cv_func_printf_directive_n+:} false; then :
11904   $as_echo_n "(cached) " >&6
11905 else
11906
11907       if test "$cross_compiling" = yes; then :
11908   case "$host_os" in
11909                    # Guess no on native Windows.
11910            mingw*) gl_cv_func_printf_directive_n="guessing no";;
11911            *)      gl_cv_func_printf_directive_n="guessing yes";;
11912          esac
11913
11914 else
11915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11916 /* end confdefs.h.  */
11917
11918 #include <stdio.h>
11919 #include <stdlib.h>
11920 #include <string.h>
11921 #ifdef _MSC_VER
11922 /* See page about "Parameter Validation" on msdn.microsoft.com.  */
11923 static void cdecl
11924 invalid_parameter_handler (const wchar_t *expression,
11925                            const wchar_t *function,
11926                            const wchar_t *file, unsigned int line,
11927                            uintptr_t dummy)
11928 {
11929   exit (1);
11930 }
11931 #endif
11932 static char fmtstring[10];
11933 static char buf[100];
11934 int main ()
11935 {
11936   int count = -1;
11937 #ifdef _MSC_VER
11938   _set_invalid_parameter_handler (invalid_parameter_handler);
11939 #endif
11940   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
11941      support %n in format strings in read-only memory but not in writable
11942      memory.  */
11943   strcpy (fmtstring, "%d %n");
11944   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
11945       || strcmp (buf, "123 ") != 0
11946       || count != 4)
11947     return 1;
11948   return 0;
11949 }
11950 _ACEOF
11951 if ac_fn_c_try_run "$LINENO"; then :
11952   gl_cv_func_printf_directive_n=yes
11953 else
11954   gl_cv_func_printf_directive_n=no
11955 fi
11956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11957   conftest.$ac_objext conftest.beam conftest.$ac_ext
11958 fi
11959
11960
11961 fi
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
11963 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
11964
11965
11966
11967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
11968 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
11969 if ${gl_cv_func_printf_directive_ls+:} false; then :
11970   $as_echo_n "(cached) " >&6
11971 else
11972
11973       if test "$cross_compiling" = yes; then :
11974
11975          case "$host_os" in
11976            openbsd*)       gl_cv_func_printf_directive_ls="guessing no";;
11977            irix*)          gl_cv_func_printf_directive_ls="guessing no";;
11978            solaris*)       gl_cv_func_printf_directive_ls="guessing no";;
11979            cygwin*)        gl_cv_func_printf_directive_ls="guessing no";;
11980            beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
11981                            # Guess yes on native Windows.
11982            mingw*)         gl_cv_func_printf_directive_ls="guessing yes";;
11983            *)              gl_cv_func_printf_directive_ls="guessing yes";;
11984          esac
11985
11986 else
11987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988 /* end confdefs.h.  */
11989
11990 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11991    <wchar.h>.
11992    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11993    included before <wchar.h>.  */
11994 #include <stddef.h>
11995 #include <stdio.h>
11996 #include <time.h>
11997 #include <wchar.h>
11998 #include <string.h>
11999 int main ()
12000 {
12001   int result = 0;
12002   char buf[100];
12003   /* Test whether %ls works at all.
12004      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
12005      Cygwin 1.5.  */
12006   {
12007     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
12008     buf[0] = '\0';
12009     if (sprintf (buf, "%ls", wstring) < 0
12010         || strcmp (buf, "abc") != 0)
12011       result |= 1;
12012   }
12013   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
12014      assertion failure inside libc), but not on OpenBSD 4.0.  */
12015   {
12016     static const wchar_t wstring[] = { 'a', 0 };
12017     buf[0] = '\0';
12018     if (sprintf (buf, "%ls", wstring) < 0
12019         || strcmp (buf, "a") != 0)
12020       result |= 2;
12021   }
12022   /* Test whether precisions in %ls are supported as specified in ISO C 99
12023      section 7.19.6.1:
12024        "If a precision is specified, no more than that many bytes are written
12025         (including shift sequences, if any), and the array shall contain a
12026         null wide character if, to equal the multibyte character sequence
12027         length given by the precision, the function would need to access a
12028         wide character one past the end of the array."
12029      This test fails on Solaris 10.  */
12030   {
12031     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
12032     buf[0] = '\0';
12033     if (sprintf (buf, "%.2ls", wstring) < 0
12034         || strcmp (buf, "ab") != 0)
12035       result |= 8;
12036   }
12037   return result;
12038 }
12039 _ACEOF
12040 if ac_fn_c_try_run "$LINENO"; then :
12041   gl_cv_func_printf_directive_ls=yes
12042 else
12043   gl_cv_func_printf_directive_ls=no
12044 fi
12045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046   conftest.$ac_objext conftest.beam conftest.$ac_ext
12047 fi
12048
12049
12050 fi
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
12052 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
12053
12054
12055
12056      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
12057 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
12058 if ${gl_cv_func_printf_positions+:} false; then :
12059   $as_echo_n "(cached) " >&6
12060 else
12061
12062       if test "$cross_compiling" = yes; then :
12063
12064          case "$host_os" in
12065            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
12066                          gl_cv_func_printf_positions="guessing no";;
12067            beos*)        gl_cv_func_printf_positions="guessing no";;
12068                          # Guess no on native Windows.
12069            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
12070            *)            gl_cv_func_printf_positions="guessing yes";;
12071          esac
12072
12073 else
12074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12075 /* end confdefs.h.  */
12076
12077 #include <stdio.h>
12078 #include <string.h>
12079 /* The string "%2$d %1$d", with dollar characters protected from the shell's
12080    dollar expansion (possibly an autoconf bug).  */
12081 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
12082 static char buf[100];
12083 int main ()
12084 {
12085   sprintf (buf, format, 33, 55);
12086   return (strcmp (buf, "55 33") != 0);
12087 }
12088 _ACEOF
12089 if ac_fn_c_try_run "$LINENO"; then :
12090   gl_cv_func_printf_positions=yes
12091 else
12092   gl_cv_func_printf_positions=no
12093 fi
12094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12095   conftest.$ac_objext conftest.beam conftest.$ac_ext
12096 fi
12097
12098
12099 fi
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
12101 $as_echo "$gl_cv_func_printf_positions" >&6; }
12102
12103
12104
12105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
12106 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
12107 if ${gl_cv_func_printf_flag_grouping+:} false; then :
12108   $as_echo_n "(cached) " >&6
12109 else
12110
12111       if test "$cross_compiling" = yes; then :
12112
12113          case "$host_os" in
12114            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
12115            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
12116                          # Guess no on native Windows.
12117            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
12118            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
12119          esac
12120
12121 else
12122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h.  */
12124
12125 #include <stdio.h>
12126 #include <string.h>
12127 static char buf[100];
12128 int main ()
12129 {
12130   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
12131       || buf[strlen (buf) - 1] != '9')
12132     return 1;
12133   return 0;
12134 }
12135 _ACEOF
12136 if ac_fn_c_try_run "$LINENO"; then :
12137   gl_cv_func_printf_flag_grouping=yes
12138 else
12139   gl_cv_func_printf_flag_grouping=no
12140 fi
12141 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12142   conftest.$ac_objext conftest.beam conftest.$ac_ext
12143 fi
12144
12145
12146 fi
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
12148 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
12149
12150
12151
12152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
12153 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
12154 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
12155   $as_echo_n "(cached) " >&6
12156 else
12157
12158       if test "$cross_compiling" = yes; then :
12159
12160          case "$host_os" in
12161                     # Guess yes on HP-UX 11.
12162            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
12163                     # Guess no on HP-UX 10 and older.
12164            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
12165                     # Guess yes on native Windows.
12166            mingw*)  gl_cv_func_printf_flag_leftadjust="guessing yes";;
12167                     # Guess yes otherwise.
12168            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
12169          esac
12170
12171 else
12172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173 /* end confdefs.h.  */
12174
12175 #include <stdio.h>
12176 #include <string.h>
12177 static char buf[100];
12178 int main ()
12179 {
12180   /* Check that a '-' flag is not annihilated by a negative width.  */
12181   if (sprintf (buf, "a%-*sc", -3, "b") < 0
12182       || strcmp (buf, "ab  c") != 0)
12183     return 1;
12184   return 0;
12185 }
12186 _ACEOF
12187 if ac_fn_c_try_run "$LINENO"; then :
12188   gl_cv_func_printf_flag_leftadjust=yes
12189 else
12190   gl_cv_func_printf_flag_leftadjust=no
12191 fi
12192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12193   conftest.$ac_objext conftest.beam conftest.$ac_ext
12194 fi
12195
12196
12197 fi
12198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
12199 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
12200
12201
12202
12203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
12204 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
12205 if ${gl_cv_func_printf_flag_zero+:} false; then :
12206   $as_echo_n "(cached) " >&6
12207 else
12208
12209       if test "$cross_compiling" = yes; then :
12210
12211          case "$host_os" in
12212                           # Guess yes on glibc systems.
12213            *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
12214                           # Guess yes on BeOS.
12215            beos*)         gl_cv_func_printf_flag_zero="guessing yes";;
12216                           # Guess no on native Windows.
12217            mingw*)        gl_cv_func_printf_flag_zero="guessing no";;
12218                           # If we don't know, assume the worst.
12219            *)             gl_cv_func_printf_flag_zero="guessing no";;
12220          esac
12221
12222 else
12223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224 /* end confdefs.h.  */
12225
12226 #include <stdio.h>
12227 #include <string.h>
12228 static char buf[100];
12229 static double zero = 0.0;
12230 int main ()
12231 {
12232   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
12233       || (strcmp (buf, "       inf") != 0
12234           && strcmp (buf, "  infinity") != 0))
12235     return 1;
12236   return 0;
12237 }
12238 _ACEOF
12239 if ac_fn_c_try_run "$LINENO"; then :
12240   gl_cv_func_printf_flag_zero=yes
12241 else
12242   gl_cv_func_printf_flag_zero=no
12243 fi
12244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12245   conftest.$ac_objext conftest.beam conftest.$ac_ext
12246 fi
12247
12248
12249 fi
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
12251 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
12252
12253
12254
12255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
12256 $as_echo_n "checking whether printf supports large precisions... " >&6; }
12257 if ${gl_cv_func_printf_precision+:} false; then :
12258   $as_echo_n "(cached) " >&6
12259 else
12260
12261       if test "$cross_compiling" = yes; then :
12262
12263          case "$host_os" in
12264            # Guess no only on Solaris, native Windows, and BeOS systems.
12265            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
12266            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
12267            beos*)        gl_cv_func_printf_precision="guessing no" ;;
12268            *)            gl_cv_func_printf_precision="guessing yes" ;;
12269          esac
12270
12271 else
12272   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12273 /* end confdefs.h.  */
12274
12275 #include <stdio.h>
12276 #include <string.h>
12277 static char buf[5000];
12278 int main ()
12279 {
12280   int result = 0;
12281 #ifdef __BEOS__
12282   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
12283   return 1;
12284 #endif
12285   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
12286     result |= 1;
12287   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
12288     result |= 2;
12289   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
12290       || buf[0] != '1')
12291     result |= 4;
12292   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
12293       || buf[0] != '1')
12294     result |= 4;
12295   return result;
12296 }
12297 _ACEOF
12298 if ac_fn_c_try_run "$LINENO"; then :
12299   gl_cv_func_printf_precision=yes
12300 else
12301   gl_cv_func_printf_precision=no
12302 fi
12303 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12304   conftest.$ac_objext conftest.beam conftest.$ac_ext
12305 fi
12306
12307
12308 fi
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
12310 $as_echo "$gl_cv_func_printf_precision" >&6; }
12311
12312
12313     gl_cv_c_multiarch=no
12314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315 /* end confdefs.h.  */
12316 #ifndef __APPLE_CC__
12317          not a universal capable compiler
12318         #endif
12319         typedef int dummy;
12320
12321 _ACEOF
12322 if ac_fn_c_try_compile "$LINENO"; then :
12323
12324                arch=
12325      prev=
12326      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12327        if test -n "$prev"; then
12328          case $word in
12329            i?86 | x86_64 | ppc | ppc64)
12330              if test -z "$arch" || test "$arch" = "$word"; then
12331                arch="$word"
12332              else
12333                gl_cv_c_multiarch=yes
12334              fi
12335              ;;
12336          esac
12337          prev=
12338        else
12339          if test "x$word" = "x-arch"; then
12340            prev=arch
12341          fi
12342        fi
12343      done
12344
12345 fi
12346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12347   if test $gl_cv_c_multiarch = yes; then
12348     APPLE_UNIVERSAL_BUILD=1
12349   else
12350     APPLE_UNIVERSAL_BUILD=0
12351   fi
12352
12353
12354
12355
12356
12357      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
12358 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
12359 if ${gl_cv_func_printf_enomem+:} false; then :
12360   $as_echo_n "(cached) " >&6
12361 else
12362
12363       gl_cv_func_printf_enomem="guessing no"
12364       if test "$cross_compiling" = no; then
12365         if test $APPLE_UNIVERSAL_BUILD = 0; then
12366           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367 /* end confdefs.h.  */
12368
12369
12370 #include <stdlib.h>
12371 #if defined __MACH__ && defined __APPLE__
12372 /* Avoid a crash on Mac OS X.  */
12373 #include <mach/mach.h>
12374 #include <mach/mach_error.h>
12375 #include <mach/thread_status.h>
12376 #include <mach/exception.h>
12377 #include <mach/task.h>
12378 #include <pthread.h>
12379 /* The exception port on which our thread listens.  */
12380 static mach_port_t our_exception_port;
12381 /* The main function of the thread listening for exceptions of type
12382    EXC_BAD_ACCESS.  */
12383 static void *
12384 mach_exception_thread (void *arg)
12385 {
12386   /* Buffer for a message to be received.  */
12387   struct {
12388     mach_msg_header_t head;
12389     mach_msg_body_t msgh_body;
12390     char data1024;
12391   } msg;
12392   mach_msg_return_t retval;
12393   /* Wait for a message on the exception port.  */
12394   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12395                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12396   if (retval != MACH_MSG_SUCCESS)
12397     abort ();
12398   exit (1);
12399 }
12400 static void
12401 nocrash_init (void)
12402 {
12403   mach_port_t self = mach_task_self ();
12404   /* Allocate a port on which the thread shall listen for exceptions.  */
12405   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12406       == KERN_SUCCESS) {
12407     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
12408     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12409                                 MACH_MSG_TYPE_MAKE_SEND)
12410         == KERN_SUCCESS) {
12411       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
12412          for us.  */
12413       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12414       /* Create the thread listening on the exception port.  */
12415       pthread_attr_t attr;
12416       pthread_t thread;
12417       if (pthread_attr_init (&attr) == 0
12418           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12419           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12420         pthread_attr_destroy (&attr);
12421         /* Replace the exception port info for these exceptions with our own.
12422            Note that we replace the exception port for the entire task, not only
12423            for a particular thread.  This has the effect that when our exception
12424            port gets the message, the thread specific exception port has already
12425            been asked, and we don't need to bother about it.
12426            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
12427         task_set_exception_ports (self, mask, our_exception_port,
12428                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12429       }
12430     }
12431   }
12432 }
12433 #elif defined _WIN32 && ! defined __CYGWIN__
12434 /* Avoid a crash on native Windows.  */
12435 #define WIN32_LEAN_AND_MEAN
12436 #include <windows.h>
12437 #include <winerror.h>
12438 static LONG WINAPI
12439 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12440 {
12441   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12442     {
12443     case EXCEPTION_ACCESS_VIOLATION:
12444     case EXCEPTION_IN_PAGE_ERROR:
12445     case EXCEPTION_STACK_OVERFLOW:
12446     case EXCEPTION_GUARD_PAGE:
12447     case EXCEPTION_PRIV_INSTRUCTION:
12448     case EXCEPTION_ILLEGAL_INSTRUCTION:
12449     case EXCEPTION_DATATYPE_MISALIGNMENT:
12450     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12451     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12452       exit (1);
12453     }
12454   return EXCEPTION_CONTINUE_SEARCH;
12455 }
12456 static void
12457 nocrash_init (void)
12458 {
12459   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12460 }
12461 #else
12462 /* Avoid a crash on POSIX systems.  */
12463 #include <signal.h>
12464 #include <unistd.h>
12465 /* A POSIX signal handler.  */
12466 static void
12467 exception_handler (int sig)
12468 {
12469   _exit (1);
12470 }
12471 static void
12472 nocrash_init (void)
12473 {
12474 #ifdef SIGSEGV
12475   signal (SIGSEGV, exception_handler);
12476 #endif
12477 #ifdef SIGBUS
12478   signal (SIGBUS, exception_handler);
12479 #endif
12480 }
12481 #endif
12482
12483 #include <stdio.h>
12484 #include <sys/types.h>
12485 #include <sys/time.h>
12486 #include <sys/resource.h>
12487 #include <errno.h>
12488 int main()
12489 {
12490   struct rlimit limit;
12491   int ret;
12492   nocrash_init ();
12493   /* Some printf implementations allocate temporary space with malloc.  */
12494   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
12495 #ifdef RLIMIT_DATA
12496   if (getrlimit (RLIMIT_DATA, &limit) < 0)
12497     return 77;
12498   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
12499     limit.rlim_max = 5000000;
12500   limit.rlim_cur = limit.rlim_max;
12501   if (setrlimit (RLIMIT_DATA, &limit) < 0)
12502     return 77;
12503 #endif
12504   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
12505 #ifdef RLIMIT_AS
12506   if (getrlimit (RLIMIT_AS, &limit) < 0)
12507     return 77;
12508   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
12509     limit.rlim_max = 5000000;
12510   limit.rlim_cur = limit.rlim_max;
12511   if (setrlimit (RLIMIT_AS, &limit) < 0)
12512     return 77;
12513 #endif
12514   /* Some printf implementations allocate temporary space on the stack.  */
12515 #ifdef RLIMIT_STACK
12516   if (getrlimit (RLIMIT_STACK, &limit) < 0)
12517     return 77;
12518   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
12519     limit.rlim_max = 5000000;
12520   limit.rlim_cur = limit.rlim_max;
12521   if (setrlimit (RLIMIT_STACK, &limit) < 0)
12522     return 77;
12523 #endif
12524   ret = printf ("%.5000000f", 1.0);
12525   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
12526 }
12527
12528 _ACEOF
12529           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12530   (eval $ac_link) 2>&5
12531   ac_status=$?
12532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12533   test $ac_status = 0; } && test -s conftest$ac_exeext; then
12534             (./conftest 2>&5
12535              result=$?
12536              $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
12537              if test $result != 0 && test $result != 77; then result=1; fi
12538              exit $result
12539             ) >/dev/null 2>/dev/null
12540             case $? in
12541               0) gl_cv_func_printf_enomem="yes" ;;
12542               77) gl_cv_func_printf_enomem="guessing no" ;;
12543               *) gl_cv_func_printf_enomem="no" ;;
12544             esac
12545           else
12546             gl_cv_func_printf_enomem="guessing no"
12547           fi
12548           rm -fr conftest*
12549         else
12550                                         gl_cv_func_printf_enomem="guessing no"
12551         fi
12552       fi
12553       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
12554         case "$host_os" in
12555                          # Guess yes on glibc systems.
12556           *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
12557                          # Guess yes on Solaris.
12558           solaris*)      gl_cv_func_printf_enomem="guessing yes";;
12559                          # Guess yes on AIX.
12560           aix*)          gl_cv_func_printf_enomem="guessing yes";;
12561                          # Guess yes on HP-UX/hppa.
12562           hpux*)         case "$host_cpu" in
12563                            hppa*) gl_cv_func_printf_enomem="guessing yes";;
12564                            *)     gl_cv_func_printf_enomem="guessing no";;
12565                          esac
12566                          ;;
12567                          # Guess yes on IRIX.
12568           irix*)         gl_cv_func_printf_enomem="guessing yes";;
12569                          # Guess yes on OSF/1.
12570           osf*)          gl_cv_func_printf_enomem="guessing yes";;
12571                          # Guess yes on BeOS.
12572           beos*)         gl_cv_func_printf_enomem="guessing yes";;
12573                          # Guess yes on Haiku.
12574           haiku*)        gl_cv_func_printf_enomem="guessing yes";;
12575                          # If we don't know, assume the worst.
12576           *)             gl_cv_func_printf_enomem="guessing no";;
12577         esac
12578       fi
12579
12580 fi
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
12582 $as_echo "$gl_cv_func_printf_enomem" >&6; }
12583
12584
12585
12586   case "$gl_cv_func_printf_long_double" in
12587     *yes)
12588       ;;
12589     *)
12590
12591 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
12592
12593       ;;
12594   esac
12595
12596
12597
12598
12599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12600 $as_echo_n "checking for unsigned long long int... " >&6; }
12601 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12602   $as_echo_n "(cached) " >&6
12603 else
12604   ac_cv_type_unsigned_long_long_int=yes
12605      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12606        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12607 /* end confdefs.h.  */
12608
12609   /* For now, do not test the preprocessor; as of 2007 there are too many
12610          implementations with broken preprocessors.  Perhaps this can
12611          be revisited in 2012.  In the meantime, code should not expect
12612          #if to work with literals wider than 32 bits.  */
12613       /* Test literals.  */
12614       long long int ll = 9223372036854775807ll;
12615       long long int nll = -9223372036854775807LL;
12616       unsigned long long int ull = 18446744073709551615ULL;
12617       /* Test constant expressions.   */
12618       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12619                      ? 1 : -1)];
12620       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12621                      ? 1 : -1)];
12622       int i = 63;
12623 int
12624 main ()
12625 {
12626 /* Test availability of runtime routines for shift and division.  */
12627       long long int llmax = 9223372036854775807ll;
12628       unsigned long long int ullmax = 18446744073709551615ull;
12629       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12630               | (llmax / ll) | (llmax % ll)
12631               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12632               | (ullmax / ull) | (ullmax % ull));
12633   ;
12634   return 0;
12635 }
12636
12637 _ACEOF
12638 if ac_fn_c_try_link "$LINENO"; then :
12639
12640 else
12641   ac_cv_type_unsigned_long_long_int=no
12642 fi
12643 rm -f core conftest.err conftest.$ac_objext \
12644     conftest$ac_exeext conftest.$ac_ext
12645      fi
12646 fi
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12648 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12649   if test $ac_cv_type_unsigned_long_long_int = yes; then
12650
12651 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12652
12653   fi
12654
12655
12656
12657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12658 $as_echo_n "checking for long long int... " >&6; }
12659 if ${ac_cv_type_long_long_int+:} false; then :
12660   $as_echo_n "(cached) " >&6
12661 else
12662   ac_cv_type_long_long_int=yes
12663       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12664         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12665         if test $ac_cv_type_long_long_int = yes; then
12666                                         if test "$cross_compiling" = yes; then :
12667   :
12668 else
12669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670 /* end confdefs.h.  */
12671 #include <limits.h>
12672                  #ifndef LLONG_MAX
12673                  # define HALF \
12674                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12675                  # define LLONG_MAX (HALF - 1 + HALF)
12676                  #endif
12677 int
12678 main ()
12679 {
12680 long long int n = 1;
12681                  int i;
12682                  for (i = 0; ; i++)
12683                    {
12684                      long long int m = n << i;
12685                      if (m >> i != n)
12686                        return 1;
12687                      if (LLONG_MAX / 2 < m)
12688                        break;
12689                    }
12690                  return 0;
12691   ;
12692   return 0;
12693 }
12694 _ACEOF
12695 if ac_fn_c_try_run "$LINENO"; then :
12696
12697 else
12698   ac_cv_type_long_long_int=no
12699 fi
12700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12701   conftest.$ac_objext conftest.beam conftest.$ac_ext
12702 fi
12703
12704         fi
12705       fi
12706 fi
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12708 $as_echo "$ac_cv_type_long_long_int" >&6; }
12709   if test $ac_cv_type_long_long_int = yes; then
12710
12711 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12712
12713   fi
12714
12715
12716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
12717 $as_echo_n "checking for wchar_t... " >&6; }
12718 if ${gt_cv_c_wchar_t+:} false; then :
12719   $as_echo_n "(cached) " >&6
12720 else
12721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722 /* end confdefs.h.  */
12723 #include <stddef.h>
12724             wchar_t foo = (wchar_t)'\0';
12725 int
12726 main ()
12727 {
12728
12729   ;
12730   return 0;
12731 }
12732 _ACEOF
12733 if ac_fn_c_try_compile "$LINENO"; then :
12734   gt_cv_c_wchar_t=yes
12735 else
12736   gt_cv_c_wchar_t=no
12737 fi
12738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12739 fi
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
12741 $as_echo "$gt_cv_c_wchar_t" >&6; }
12742   if test $gt_cv_c_wchar_t = yes; then
12743
12744 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
12745
12746   fi
12747
12748
12749   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12750 $as_echo_n "checking for wint_t... " >&6; }
12751 if ${gt_cv_c_wint_t+:} false; then :
12752   $as_echo_n "(cached) " >&6
12753 else
12754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755 /* end confdefs.h.  */
12756
12757 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12758    <wchar.h>.
12759    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
12760    before <wchar.h>.  */
12761 #include <stddef.h>
12762 #include <stdio.h>
12763 #include <time.h>
12764 #include <wchar.h>
12765             wint_t foo = (wchar_t)'\0';
12766 int
12767 main ()
12768 {
12769
12770   ;
12771   return 0;
12772 }
12773 _ACEOF
12774 if ac_fn_c_try_compile "$LINENO"; then :
12775   gt_cv_c_wint_t=yes
12776 else
12777   gt_cv_c_wint_t=no
12778 fi
12779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12780 fi
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12782 $as_echo "$gt_cv_c_wint_t" >&6; }
12783   if test $gt_cv_c_wint_t = yes; then
12784
12785 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12786
12787
12788             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
12789 $as_echo_n "checking whether wint_t is too small... " >&6; }
12790 if ${gl_cv_type_wint_t_too_small+:} false; then :
12791   $as_echo_n "(cached) " >&6
12792 else
12793   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794 /* end confdefs.h.  */
12795
12796 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12797    <wchar.h>.
12798    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12799    included before <wchar.h>.  */
12800 #if !(defined __GLIBC__ && !defined __UCLIBC__)
12801 # include <stddef.h>
12802 # include <stdio.h>
12803 # include <time.h>
12804 #endif
12805 #include <wchar.h>
12806               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12807
12808 int
12809 main ()
12810 {
12811
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 if ac_fn_c_try_compile "$LINENO"; then :
12817   gl_cv_type_wint_t_too_small=no
12818 else
12819   gl_cv_type_wint_t_too_small=yes
12820 fi
12821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12822 fi
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
12824 $as_echo "$gl_cv_type_wint_t_too_small" >&6; }
12825     if test $gl_cv_type_wint_t_too_small = yes; then
12826       GNULIB_OVERRIDES_WINT_T=1
12827     else
12828       GNULIB_OVERRIDES_WINT_T=0
12829     fi
12830   else
12831     GNULIB_OVERRIDES_WINT_T=0
12832   fi
12833
12834
12835
12836
12837
12838
12839   if test $ac_cv_header_features_h = yes; then
12840     HAVE_FEATURES_H=1
12841   else
12842     HAVE_FEATURES_H=0
12843   fi
12844
12845
12846
12847
12848
12849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
12850 $as_echo_n "checking for intmax_t... " >&6; }
12851 if ${gt_cv_c_intmax_t+:} false; then :
12852   $as_echo_n "(cached) " >&6
12853 else
12854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855 /* end confdefs.h.  */
12856
12857 #include <stddef.h>
12858 #include <stdlib.h>
12859 #if HAVE_STDINT_H_WITH_UINTMAX
12860 #include <stdint.h>
12861 #endif
12862 #if HAVE_INTTYPES_H_WITH_UINTMAX
12863 #include <inttypes.h>
12864 #endif
12865
12866 int
12867 main ()
12868 {
12869 intmax_t x = -1; return !x;
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 if ac_fn_c_try_compile "$LINENO"; then :
12875   gt_cv_c_intmax_t=yes
12876 else
12877   gt_cv_c_intmax_t=no
12878 fi
12879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12880 fi
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
12882 $as_echo "$gt_cv_c_intmax_t" >&6; }
12883   if test $gt_cv_c_intmax_t = yes; then
12884
12885 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
12886
12887   else
12888
12889     test $ac_cv_type_long_long_int = yes \
12890       && ac_type='long long' \
12891       || ac_type='long'
12892
12893 cat >>confdefs.h <<_ACEOF
12894 #define intmax_t $ac_type
12895 _ACEOF
12896
12897   fi
12898
12899
12900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
12901 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
12902 if ${gl_cv_cc_double_expbit0+:} false; then :
12903   $as_echo_n "(cached) " >&6
12904 else
12905
12906       if test "$cross_compiling" = yes; then :
12907
12908                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909 /* end confdefs.h.  */
12910
12911 #if defined arm || defined __arm || defined __arm__
12912   mixed_endianness
12913 #endif
12914
12915 _ACEOF
12916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12917   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
12918   gl_cv_cc_double_expbit0="unknown"
12919 else
12920
12921                                                          :
12922 if ${ac_cv_c_bigendian+:} false; then :
12923   $as_echo_n "(cached) " >&6
12924 else
12925   ac_cv_c_bigendian=unknown
12926     # See if we're dealing with a universal compiler.
12927     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12928 /* end confdefs.h.  */
12929 #ifndef __APPLE_CC__
12930                not a universal capable compiler
12931              #endif
12932              typedef int dummy;
12933
12934 _ACEOF
12935 if ac_fn_c_try_compile "$LINENO"; then :
12936
12937         # Check for potential -arch flags.  It is not universal unless
12938         # there are at least two -arch flags with different values.
12939         ac_arch=
12940         ac_prev=
12941         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12942          if test -n "$ac_prev"; then
12943            case $ac_word in
12944              i?86 | x86_64 | ppc | ppc64)
12945                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12946                  ac_arch=$ac_word
12947                else
12948                  ac_cv_c_bigendian=universal
12949                  break
12950                fi
12951                ;;
12952            esac
12953            ac_prev=
12954          elif test "x$ac_word" = "x-arch"; then
12955            ac_prev=arch
12956          fi
12957        done
12958 fi
12959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12960     if test $ac_cv_c_bigendian = unknown; then
12961       # See if sys/param.h defines the BYTE_ORDER macro.
12962       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12963 /* end confdefs.h.  */
12964 #include <sys/types.h>
12965              #include <sys/param.h>
12966
12967 int
12968 main ()
12969 {
12970 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12971                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12972                      && LITTLE_ENDIAN)
12973               bogus endian macros
12974              #endif
12975
12976   ;
12977   return 0;
12978 }
12979 _ACEOF
12980 if ac_fn_c_try_compile "$LINENO"; then :
12981   # It does; now see whether it defined to BIG_ENDIAN or not.
12982          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12983 /* end confdefs.h.  */
12984 #include <sys/types.h>
12985                 #include <sys/param.h>
12986
12987 int
12988 main ()
12989 {
12990 #if BYTE_ORDER != BIG_ENDIAN
12991                  not big endian
12992                 #endif
12993
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 if ac_fn_c_try_compile "$LINENO"; then :
12999   ac_cv_c_bigendian=yes
13000 else
13001   ac_cv_c_bigendian=no
13002 fi
13003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13004 fi
13005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13006     fi
13007     if test $ac_cv_c_bigendian = unknown; then
13008       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13009       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13010 /* end confdefs.h.  */
13011 #include <limits.h>
13012
13013 int
13014 main ()
13015 {
13016 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13017               bogus endian macros
13018              #endif
13019
13020   ;
13021   return 0;
13022 }
13023 _ACEOF
13024 if ac_fn_c_try_compile "$LINENO"; then :
13025   # It does; now see whether it defined to _BIG_ENDIAN or not.
13026          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027 /* end confdefs.h.  */
13028 #include <limits.h>
13029
13030 int
13031 main ()
13032 {
13033 #ifndef _BIG_ENDIAN
13034                  not big endian
13035                 #endif
13036
13037   ;
13038   return 0;
13039 }
13040 _ACEOF
13041 if ac_fn_c_try_compile "$LINENO"; then :
13042   ac_cv_c_bigendian=yes
13043 else
13044   ac_cv_c_bigendian=no
13045 fi
13046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047 fi
13048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13049     fi
13050     if test $ac_cv_c_bigendian = unknown; then
13051       # Compile a test program.
13052       if test "$cross_compiling" = yes; then :
13053   # Try to guess by grepping values from an object file.
13054          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h.  */
13056 short int ascii_mm[] =
13057                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13058                 short int ascii_ii[] =
13059                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13060                 int use_ascii (int i) {
13061                   return ascii_mm[i] + ascii_ii[i];
13062                 }
13063                 short int ebcdic_ii[] =
13064                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13065                 short int ebcdic_mm[] =
13066                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13067                 int use_ebcdic (int i) {
13068                   return ebcdic_mm[i] + ebcdic_ii[i];
13069                 }
13070                 extern int foo;
13071
13072 int
13073 main ()
13074 {
13075 return use_ascii (foo) == use_ebcdic (foo);
13076   ;
13077   return 0;
13078 }
13079 _ACEOF
13080 if ac_fn_c_try_compile "$LINENO"; then :
13081   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13082               ac_cv_c_bigendian=yes
13083             fi
13084             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13085               if test "$ac_cv_c_bigendian" = unknown; then
13086                 ac_cv_c_bigendian=no
13087               else
13088                 # finding both strings is unlikely to happen, but who knows?
13089                 ac_cv_c_bigendian=unknown
13090               fi
13091             fi
13092 fi
13093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13094 else
13095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096 /* end confdefs.h.  */
13097 $ac_includes_default
13098 int
13099 main ()
13100 {
13101
13102              /* Are we little or big endian?  From Harbison&Steele.  */
13103              union
13104              {
13105                long int l;
13106                char c[sizeof (long int)];
13107              } u;
13108              u.l = 1;
13109              return u.c[sizeof (long int) - 1] == 1;
13110
13111   ;
13112   return 0;
13113 }
13114 _ACEOF
13115 if ac_fn_c_try_run "$LINENO"; then :
13116   ac_cv_c_bigendian=no
13117 else
13118   ac_cv_c_bigendian=yes
13119 fi
13120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13121   conftest.$ac_objext conftest.beam conftest.$ac_ext
13122 fi
13123
13124     fi
13125 fi
13126 :
13127  case $ac_cv_c_bigendian in #(
13128    yes)
13129      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13130    no)
13131      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13132    universal)
13133
13134 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13135
13136      ;; #(
13137    *)
13138      gl_cv_cc_double_expbit0="unknown" ;;
13139  esac
13140
13141
13142 fi
13143 rm -f conftest*
13144
13145
13146 else
13147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148 /* end confdefs.h.  */
13149
13150 #include <float.h>
13151 #include <stddef.h>
13152 #include <stdio.h>
13153 #include <string.h>
13154 #define NWORDS \
13155   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13156 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13157 static unsigned int ored_words[NWORDS];
13158 static unsigned int anded_words[NWORDS];
13159 static void add_to_ored_words (double x)
13160 {
13161   memory_double m;
13162   size_t i;
13163   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
13164   memset (&m, 0, sizeof (memory_double));
13165   m.value = x;
13166   for (i = 0; i < NWORDS; i++)
13167     {
13168       ored_words[i] |= m.word[i];
13169       anded_words[i] &= m.word[i];
13170     }
13171 }
13172 int main ()
13173 {
13174   size_t j;
13175   FILE *fp = fopen ("conftest.out", "w");
13176   if (fp == NULL)
13177     return 1;
13178   for (j = 0; j < NWORDS; j++)
13179     anded_words[j] = ~ (unsigned int) 0;
13180   add_to_ored_words (0.25);
13181   add_to_ored_words (0.5);
13182   add_to_ored_words (1.0);
13183   add_to_ored_words (2.0);
13184   add_to_ored_words (4.0);
13185   /* Remove bits that are common (e.g. if representation of the first mantissa
13186      bit is explicit).  */
13187   for (j = 0; j < NWORDS; j++)
13188     ored_words[j] &= ~anded_words[j];
13189   /* Now find the nonzero word.  */
13190   for (j = 0; j < NWORDS; j++)
13191     if (ored_words[j] != 0)
13192       break;
13193   if (j < NWORDS)
13194     {
13195       size_t i;
13196       for (i = j + 1; i < NWORDS; i++)
13197         if (ored_words[i] != 0)
13198           {
13199             fprintf (fp, "unknown");
13200             return (fclose (fp) != 0);
13201           }
13202       for (i = 0; ; i++)
13203         if ((ored_words[j] >> i) & 1)
13204           {
13205             fprintf (fp, "word %d bit %d", (int) j, (int) i);
13206             return (fclose (fp) != 0);
13207           }
13208     }
13209   fprintf (fp, "unknown");
13210   return (fclose (fp) != 0);
13211 }
13212
13213 _ACEOF
13214 if ac_fn_c_try_run "$LINENO"; then :
13215   gl_cv_cc_double_expbit0=`cat conftest.out`
13216 else
13217   gl_cv_cc_double_expbit0="unknown"
13218 fi
13219 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13220   conftest.$ac_objext conftest.beam conftest.$ac_ext
13221 fi
13222
13223       rm -f conftest.out
13224
13225 fi
13226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13227 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13228   case "$gl_cv_cc_double_expbit0" in
13229     word*bit*)
13230       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13231       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13232
13233 cat >>confdefs.h <<_ACEOF
13234 #define DBL_EXPBIT0_WORD $word
13235 _ACEOF
13236
13237
13238 cat >>confdefs.h <<_ACEOF
13239 #define DBL_EXPBIT0_BIT $bit
13240 _ACEOF
13241
13242       ;;
13243   esac
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
13254 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
13255 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
13256   $as_echo_n "(cached) " >&6
13257 else
13258
13259       if test "$cross_compiling" = yes; then :
13260   case "$host_os" in
13261                                  # Guess yes on glibc systems.
13262            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
13263                                  # Guess yes on FreeBSD >= 5.
13264            freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
13265            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13266                                  # Guess yes on Mac OS X >= 10.3.
13267            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
13268            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
13269                                  # Guess yes on OpenBSD >= 3.9.
13270            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
13271                                  gl_cv_func_snprintf_retval_c99="guessing no";;
13272            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
13273                                  # Guess yes on Solaris >= 2.10.
13274            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
13275            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
13276                                  # Guess yes on AIX >= 4.
13277            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
13278            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
13279                                  # Guess yes on NetBSD >= 3.
13280            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
13281                                  gl_cv_func_snprintf_retval_c99="guessing no";;
13282            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
13283                                  # Guess yes on BeOS.
13284            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
13285                                  # Guess yes on MSVC, no on mingw.
13286            mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13287 /* end confdefs.h.  */
13288
13289 #ifdef _MSC_VER
13290  Known
13291 #endif
13292
13293 _ACEOF
13294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13295   $EGREP "Known" >/dev/null 2>&1; then :
13296   gl_cv_func_snprintf_retval_c99="guessing yes"
13297 else
13298   gl_cv_func_snprintf_retval_c99="guessing no"
13299 fi
13300 rm -f conftest*
13301
13302                                  ;;
13303                                  # If we don't know, assume the worst.
13304            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
13305          esac
13306
13307 else
13308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13309 /* end confdefs.h.  */
13310
13311 #include <stdio.h>
13312 #include <string.h>
13313 #if HAVE_SNPRINTF
13314 # define my_snprintf snprintf
13315 #else
13316 # include <stdarg.h>
13317 static int my_snprintf (char *buf, int size, const char *format, ...)
13318 {
13319   va_list args;
13320   int ret;
13321   va_start (args, format);
13322   ret = vsnprintf (buf, size, format, args);
13323   va_end (args);
13324   return ret;
13325 }
13326 #endif
13327 static char buf[100];
13328 int main ()
13329 {
13330   strcpy (buf, "ABCDEF");
13331   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
13332     return 1;
13333   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
13334     return 2;
13335   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
13336     return 3;
13337   return 0;
13338 }
13339 _ACEOF
13340 if ac_fn_c_try_run "$LINENO"; then :
13341   gl_cv_func_snprintf_retval_c99=yes
13342 else
13343   gl_cv_func_snprintf_retval_c99=no
13344 fi
13345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13346   conftest.$ac_objext conftest.beam conftest.$ac_ext
13347 fi
13348
13349
13350 fi
13351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
13352 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
13353
13354
13355
13356
13357
13358
13359   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
13360 do :
13361   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13362 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13363 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13364   cat >>confdefs.h <<_ACEOF
13365 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13366 _ACEOF
13367
13368 fi
13369 done
13370
13371       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
13372 "
13373 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
13374   ac_have_decl=1
13375 else
13376   ac_have_decl=0
13377 fi
13378
13379 cat >>confdefs.h <<_ACEOF
13380 #define HAVE_DECL__SNPRINTF $ac_have_decl
13381 _ACEOF
13382
13383
13384
13385   case "$gl_cv_func_snprintf_retval_c99" in
13386     *yes)
13387
13388 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
13389
13390       ;;
13391   esac
13392
13393
13394   GNULIB_ACOSF=0;
13395   GNULIB_ACOSL=0;
13396   GNULIB_ASINF=0;
13397   GNULIB_ASINL=0;
13398   GNULIB_ATANF=0;
13399   GNULIB_ATANL=0;
13400   GNULIB_ATAN2F=0;
13401   GNULIB_CBRT=0;
13402   GNULIB_CBRTF=0;
13403   GNULIB_CBRTL=0;
13404   GNULIB_CEIL=0;
13405   GNULIB_CEILF=0;
13406   GNULIB_CEILL=0;
13407   GNULIB_COPYSIGN=0;
13408   GNULIB_COPYSIGNF=0;
13409   GNULIB_COPYSIGNL=0;
13410   GNULIB_COSF=0;
13411   GNULIB_COSL=0;
13412   GNULIB_COSHF=0;
13413   GNULIB_EXPF=0;
13414   GNULIB_EXPL=0;
13415   GNULIB_EXP2=0;
13416   GNULIB_EXP2F=0;
13417   GNULIB_EXP2L=0;
13418   GNULIB_EXPM1=0;
13419   GNULIB_EXPM1F=0;
13420   GNULIB_EXPM1L=0;
13421   GNULIB_FABSF=0;
13422   GNULIB_FABSL=0;
13423   GNULIB_FLOOR=0;
13424   GNULIB_FLOORF=0;
13425   GNULIB_FLOORL=0;
13426   GNULIB_FMA=0;
13427   GNULIB_FMAF=0;
13428   GNULIB_FMAL=0;
13429   GNULIB_FMOD=0;
13430   GNULIB_FMODF=0;
13431   GNULIB_FMODL=0;
13432   GNULIB_FREXPF=0;
13433   GNULIB_FREXP=0;
13434   GNULIB_FREXPL=0;
13435   GNULIB_HYPOT=0;
13436   GNULIB_HYPOTF=0;
13437   GNULIB_HYPOTL=0;
13438   GNULIB_ILOGB=0;
13439   GNULIB_ILOGBF=0;
13440   GNULIB_ILOGBL=0;
13441   GNULIB_ISFINITE=0;
13442   GNULIB_ISINF=0;
13443   GNULIB_ISNAN=0;
13444   GNULIB_ISNANF=0;
13445   GNULIB_ISNAND=0;
13446   GNULIB_ISNANL=0;
13447   GNULIB_LDEXPF=0;
13448   GNULIB_LDEXPL=0;
13449   GNULIB_LOG=0;
13450   GNULIB_LOGF=0;
13451   GNULIB_LOGL=0;
13452   GNULIB_LOG10=0;
13453   GNULIB_LOG10F=0;
13454   GNULIB_LOG10L=0;
13455   GNULIB_LOG1P=0;
13456   GNULIB_LOG1PF=0;
13457   GNULIB_LOG1PL=0;
13458   GNULIB_LOG2=0;
13459   GNULIB_LOG2F=0;
13460   GNULIB_LOG2L=0;
13461   GNULIB_LOGB=0;
13462   GNULIB_LOGBF=0;
13463   GNULIB_LOGBL=0;
13464   GNULIB_MODF=0;
13465   GNULIB_MODFF=0;
13466   GNULIB_MODFL=0;
13467   GNULIB_POWF=0;
13468   GNULIB_REMAINDER=0;
13469   GNULIB_REMAINDERF=0;
13470   GNULIB_REMAINDERL=0;
13471   GNULIB_RINT=0;
13472   GNULIB_RINTF=0;
13473   GNULIB_RINTL=0;
13474   GNULIB_ROUND=0;
13475   GNULIB_ROUNDF=0;
13476   GNULIB_ROUNDL=0;
13477   GNULIB_SIGNBIT=0;
13478   GNULIB_SINF=0;
13479   GNULIB_SINL=0;
13480   GNULIB_SINHF=0;
13481   GNULIB_SQRTF=0;
13482   GNULIB_SQRTL=0;
13483   GNULIB_TANF=0;
13484   GNULIB_TANL=0;
13485   GNULIB_TANHF=0;
13486   GNULIB_TRUNC=0;
13487   GNULIB_TRUNCF=0;
13488   GNULIB_TRUNCL=0;
13489     HAVE_ACOSF=1;
13490   HAVE_ACOSL=1;
13491   HAVE_ASINF=1;
13492   HAVE_ASINL=1;
13493   HAVE_ATANF=1;
13494   HAVE_ATANL=1;
13495   HAVE_ATAN2F=1;
13496   HAVE_CBRT=1;
13497   HAVE_CBRTF=1;
13498   HAVE_CBRTL=1;
13499   HAVE_COPYSIGN=1;
13500   HAVE_COPYSIGNL=1;
13501   HAVE_COSF=1;
13502   HAVE_COSL=1;
13503   HAVE_COSHF=1;
13504   HAVE_EXPF=1;
13505   HAVE_EXPL=1;
13506   HAVE_EXPM1=1;
13507   HAVE_EXPM1F=1;
13508   HAVE_FABSF=1;
13509   HAVE_FABSL=1;
13510   HAVE_FMA=1;
13511   HAVE_FMAF=1;
13512   HAVE_FMAL=1;
13513   HAVE_FMODF=1;
13514   HAVE_FMODL=1;
13515   HAVE_FREXPF=1;
13516   HAVE_HYPOTF=1;
13517   HAVE_HYPOTL=1;
13518   HAVE_ILOGB=1;
13519   HAVE_ILOGBF=1;
13520   HAVE_ILOGBL=1;
13521   HAVE_ISNANF=1;
13522   HAVE_ISNAND=1;
13523   HAVE_ISNANL=1;
13524   HAVE_LDEXPF=1;
13525   HAVE_LOGF=1;
13526   HAVE_LOGL=1;
13527   HAVE_LOG10F=1;
13528   HAVE_LOG10L=1;
13529   HAVE_LOG1P=1;
13530   HAVE_LOG1PF=1;
13531   HAVE_LOG1PL=1;
13532   HAVE_LOGBF=1;
13533   HAVE_LOGBL=1;
13534   HAVE_MODFF=1;
13535   HAVE_MODFL=1;
13536   HAVE_POWF=1;
13537   HAVE_REMAINDER=1;
13538   HAVE_REMAINDERF=1;
13539   HAVE_RINT=1;
13540   HAVE_RINTL=1;
13541   HAVE_SINF=1;
13542   HAVE_SINL=1;
13543   HAVE_SINHF=1;
13544   HAVE_SQRTF=1;
13545   HAVE_SQRTL=1;
13546   HAVE_TANF=1;
13547   HAVE_TANL=1;
13548   HAVE_TANHF=1;
13549   HAVE_DECL_ACOSL=1;
13550   HAVE_DECL_ASINL=1;
13551   HAVE_DECL_ATANL=1;
13552   HAVE_DECL_CBRTF=1;
13553   HAVE_DECL_CBRTL=1;
13554   HAVE_DECL_CEILF=1;
13555   HAVE_DECL_CEILL=1;
13556   HAVE_DECL_COPYSIGNF=1;
13557   HAVE_DECL_COSL=1;
13558   HAVE_DECL_EXPL=1;
13559   HAVE_DECL_EXP2=1;
13560   HAVE_DECL_EXP2F=1;
13561   HAVE_DECL_EXP2L=1;
13562   HAVE_DECL_EXPM1L=1;
13563   HAVE_DECL_FLOORF=1;
13564   HAVE_DECL_FLOORL=1;
13565   HAVE_DECL_FREXPL=1;
13566   HAVE_DECL_LDEXPL=1;
13567   HAVE_DECL_LOGL=1;
13568   HAVE_DECL_LOG10L=1;
13569   HAVE_DECL_LOG2=1;
13570   HAVE_DECL_LOG2F=1;
13571   HAVE_DECL_LOG2L=1;
13572   HAVE_DECL_LOGB=1;
13573   HAVE_DECL_REMAINDER=1;
13574   HAVE_DECL_REMAINDERL=1;
13575   HAVE_DECL_RINTF=1;
13576   HAVE_DECL_ROUND=1;
13577   HAVE_DECL_ROUNDF=1;
13578   HAVE_DECL_ROUNDL=1;
13579   HAVE_DECL_SINL=1;
13580   HAVE_DECL_SQRTL=1;
13581   HAVE_DECL_TANL=1;
13582   HAVE_DECL_TRUNC=1;
13583   HAVE_DECL_TRUNCF=1;
13584   HAVE_DECL_TRUNCL=1;
13585   REPLACE_ACOSF=0;
13586   REPLACE_ASINF=0;
13587   REPLACE_ATANF=0;
13588   REPLACE_ATAN2F=0;
13589   REPLACE_CBRTF=0;
13590   REPLACE_CBRTL=0;
13591   REPLACE_CEIL=0;
13592   REPLACE_CEILF=0;
13593   REPLACE_CEILL=0;
13594   REPLACE_COSF=0;
13595   REPLACE_COSHF=0;
13596   REPLACE_EXPF=0;
13597   REPLACE_EXPM1=0;
13598   REPLACE_EXPM1F=0;
13599   REPLACE_EXP2=0;
13600   REPLACE_EXP2L=0;
13601   REPLACE_FABSL=0;
13602   REPLACE_FLOOR=0;
13603   REPLACE_FLOORF=0;
13604   REPLACE_FLOORL=0;
13605   REPLACE_FMA=0;
13606   REPLACE_FMAF=0;
13607   REPLACE_FMAL=0;
13608   REPLACE_FMOD=0;
13609   REPLACE_FMODF=0;
13610   REPLACE_FMODL=0;
13611   REPLACE_FREXPF=0;
13612   REPLACE_FREXP=0;
13613   REPLACE_FREXPL=0;
13614   REPLACE_HUGE_VAL=0;
13615   REPLACE_HYPOT=0;
13616   REPLACE_HYPOTF=0;
13617   REPLACE_HYPOTL=0;
13618   REPLACE_ILOGB=0;
13619   REPLACE_ILOGBF=0;
13620   REPLACE_ILOGBL=0;
13621   REPLACE_ISFINITE=0;
13622   REPLACE_ISINF=0;
13623   REPLACE_ISNAN=0;
13624   REPLACE_LDEXPL=0;
13625   REPLACE_LOG=0;
13626   REPLACE_LOGF=0;
13627   REPLACE_LOGL=0;
13628   REPLACE_LOG10=0;
13629   REPLACE_LOG10F=0;
13630   REPLACE_LOG10L=0;
13631   REPLACE_LOG1P=0;
13632   REPLACE_LOG1PF=0;
13633   REPLACE_LOG1PL=0;
13634   REPLACE_LOG2=0;
13635   REPLACE_LOG2F=0;
13636   REPLACE_LOG2L=0;
13637   REPLACE_LOGB=0;
13638   REPLACE_LOGBF=0;
13639   REPLACE_LOGBL=0;
13640   REPLACE_MODF=0;
13641   REPLACE_MODFF=0;
13642   REPLACE_MODFL=0;
13643   REPLACE_NAN=0;
13644   REPLACE_REMAINDER=0;
13645   REPLACE_REMAINDERF=0;
13646   REPLACE_REMAINDERL=0;
13647   REPLACE_ROUND=0;
13648   REPLACE_ROUNDF=0;
13649   REPLACE_ROUNDL=0;
13650   REPLACE_SIGNBIT=0;
13651   REPLACE_SIGNBIT_USING_GCC=0;
13652   REPLACE_SINF=0;
13653   REPLACE_SINHF=0;
13654   REPLACE_SQRTF=0;
13655   REPLACE_SQRTL=0;
13656   REPLACE_TANF=0;
13657   REPLACE_TANHF=0;
13658   REPLACE_TRUNC=0;
13659   REPLACE_TRUNCF=0;
13660   REPLACE_TRUNCL=0;
13661
13662
13663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
13664 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
13665 if ${gl_cv_func_frexp_no_libm+:} false; then :
13666   $as_echo_n "(cached) " >&6
13667 else
13668
13669       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h.  */
13671 #include <math.h>
13672              double x;
13673 int
13674 main ()
13675 {
13676 int e; return frexp (x, &e) > 0;
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 if ac_fn_c_try_link "$LINENO"; then :
13682   gl_cv_func_frexp_no_libm=yes
13683 else
13684   gl_cv_func_frexp_no_libm=no
13685 fi
13686 rm -f core conftest.err conftest.$ac_objext \
13687     conftest$ac_exeext conftest.$ac_ext
13688
13689 fi
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
13691 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
13692
13693 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
13694 if test "x$ac_cv_have_decl_alarm" = xyes; then :
13695   ac_have_decl=1
13696 else
13697   ac_have_decl=0
13698 fi
13699
13700 cat >>confdefs.h <<_ACEOF
13701 #define HAVE_DECL_ALARM $ac_have_decl
13702 _ACEOF
13703
13704
13705
13706
13707      GNULIB_FCHMODAT=0;
13708   GNULIB_FSTAT=0;
13709   GNULIB_FSTATAT=0;
13710   GNULIB_FUTIMENS=0;
13711   GNULIB_LCHMOD=0;
13712   GNULIB_LSTAT=0;
13713   GNULIB_MKDIRAT=0;
13714   GNULIB_MKFIFO=0;
13715   GNULIB_MKFIFOAT=0;
13716   GNULIB_MKNOD=0;
13717   GNULIB_MKNODAT=0;
13718   GNULIB_STAT=0;
13719   GNULIB_UTIMENSAT=0;
13720   GNULIB_OVERRIDES_STRUCT_STAT=0;
13721     HAVE_FCHMODAT=1;
13722   HAVE_FSTATAT=1;
13723   HAVE_FUTIMENS=1;
13724   HAVE_LCHMOD=1;
13725   HAVE_LSTAT=1;
13726   HAVE_MKDIRAT=1;
13727   HAVE_MKFIFO=1;
13728   HAVE_MKFIFOAT=1;
13729   HAVE_MKNOD=1;
13730   HAVE_MKNODAT=1;
13731   HAVE_UTIMENSAT=1;
13732   REPLACE_FSTAT=0;
13733   REPLACE_FSTATAT=0;
13734   REPLACE_FUTIMENS=0;
13735   REPLACE_LSTAT=0;
13736   REPLACE_MKDIR=0;
13737   REPLACE_MKFIFO=0;
13738   REPLACE_MKNOD=0;
13739   REPLACE_STAT=0;
13740   REPLACE_UTIMENSAT=0;
13741
13742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
13743 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
13744 if ${ac_cv_header_stat_broken+:} false; then :
13745   $as_echo_n "(cached) " >&6
13746 else
13747   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13748 /* end confdefs.h.  */
13749 #include <sys/types.h>
13750 #include <sys/stat.h>
13751
13752 #if defined S_ISBLK && defined S_IFDIR
13753 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
13754 #endif
13755
13756 #if defined S_ISBLK && defined S_IFCHR
13757 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
13758 #endif
13759
13760 #if defined S_ISLNK && defined S_IFREG
13761 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
13762 #endif
13763
13764 #if defined S_ISSOCK && defined S_IFREG
13765 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
13766 #endif
13767
13768 _ACEOF
13769 if ac_fn_c_try_compile "$LINENO"; then :
13770   ac_cv_header_stat_broken=no
13771 else
13772   ac_cv_header_stat_broken=yes
13773 fi
13774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775 fi
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
13777 $as_echo "$ac_cv_header_stat_broken" >&6; }
13778 if test $ac_cv_header_stat_broken = yes; then
13779
13780 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
13781
13782 fi
13783
13784
13785
13786
13787
13788   case "$host_os" in
13789     mingw*)
13790                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
13791 $as_echo_n "checking for 64-bit off_t... " >&6; }
13792 if ${gl_cv_type_off_t_64+:} false; then :
13793   $as_echo_n "(cached) " >&6
13794 else
13795   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13796 /* end confdefs.h.  */
13797 #include <sys/types.h>
13798                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
13799
13800 int
13801 main ()
13802 {
13803
13804   ;
13805   return 0;
13806 }
13807 _ACEOF
13808 if ac_fn_c_try_compile "$LINENO"; then :
13809   gl_cv_type_off_t_64=yes
13810 else
13811   gl_cv_type_off_t_64=no
13812 fi
13813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13814
13815 fi
13816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
13817 $as_echo "$gl_cv_type_off_t_64" >&6; }
13818       if test $gl_cv_type_off_t_64 = no; then
13819         WINDOWS_64_BIT_OFF_T=1
13820       else
13821         WINDOWS_64_BIT_OFF_T=0
13822       fi
13823                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
13824 $as_echo_n "checking for 64-bit st_size... " >&6; }
13825 if ${gl_cv_member_st_size_64+:} false; then :
13826   $as_echo_n "(cached) " >&6
13827 else
13828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h.  */
13830 #include <sys/types.h>
13831                 struct stat buf;
13832                 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
13833
13834 int
13835 main ()
13836 {
13837
13838   ;
13839   return 0;
13840 }
13841 _ACEOF
13842 if ac_fn_c_try_compile "$LINENO"; then :
13843   gl_cv_member_st_size_64=yes
13844 else
13845   gl_cv_member_st_size_64=no
13846 fi
13847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13848
13849 fi
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
13851 $as_echo "$gl_cv_member_st_size_64" >&6; }
13852       if test $gl_cv_member_st_size_64 = no; then
13853         WINDOWS_64_BIT_ST_SIZE=1
13854       else
13855         WINDOWS_64_BIT_ST_SIZE=0
13856       fi
13857       ;;
13858     *)
13859                                                       WINDOWS_64_BIT_OFF_T=0
13860       WINDOWS_64_BIT_ST_SIZE=0
13861       ;;
13862   esac
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878      if test $gl_cv_have_include_next = yes; then
13879        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13880      else
13881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
13882 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
13883 if ${gl_cv_next_sys_stat_h+:} false; then :
13884   $as_echo_n "(cached) " >&6
13885 else
13886
13887              if test $ac_cv_header_sys_stat_h = yes; then
13888
13889
13890
13891
13892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h.  */
13894 #include <sys/stat.h>
13895 _ACEOF
13896                 case "$host_os" in
13897     aix*) gl_absname_cpp="$ac_cpp -C" ;;
13898     *)    gl_absname_cpp="$ac_cpp" ;;
13899   esac
13900
13901   case "$host_os" in
13902     mingw*)
13903                                           gl_dirsep_regex='[/\\]'
13904       ;;
13905     *)
13906       gl_dirsep_regex='\/'
13907       ;;
13908   esac
13909       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13910   gl_header_literal_regex=`echo 'sys/stat.h' \
13911                            | sed -e "$gl_make_literal_regex_sed"`
13912   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13913       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13914       s|^/[^/]|//&|
13915       p
13916       q
13917     }'
13918
13919         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13920   sed -n "$gl_absolute_header_sed"`
13921
13922            gl_header=$gl_cv_absolute_sys_stat_h
13923            gl_cv_next_sys_stat_h='"'$gl_header'"'
13924           else
13925                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13926              fi
13927
13928
13929 fi
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
13931 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
13932      fi
13933      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
13934
13935      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13936        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13937        gl_next_as_first_directive='<'sys/stat.h'>'
13938      else
13939        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13940        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
13941      fi
13942      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
13943
13944
13945
13946
13947
13948
13949
13950
13951     WINDOWS_STAT_TIMESPEC=0
13952
13953
13954
13955
13956
13957
13958
13959
13960       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
13961      #include <sys/stat.h>
13962 "
13963 if test "x$ac_cv_type_nlink_t" = xyes; then :
13964
13965 else
13966
13967 $as_echo "#define nlink_t int" >>confdefs.h
13968
13969 fi
13970
13971
13972
13973     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
13974     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13975     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13976 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13977 if eval \${$as_gl_Symbol+:} false; then :
13978   $as_echo_n "(cached) " >&6
13979 else
13980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13981 /* end confdefs.h.  */
13982 #include <sys/stat.h>
13983
13984 int
13985 main ()
13986 {
13987 #undef $gl_func
13988   (void) $gl_func;
13989   ;
13990   return 0;
13991 }
13992 _ACEOF
13993 if ac_fn_c_try_compile "$LINENO"; then :
13994   eval "$as_gl_Symbol=yes"
13995 else
13996   eval "$as_gl_Symbol=no"
13997 fi
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13999 fi
14000 eval ac_res=\$$as_gl_Symbol
14001                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14002 $as_echo "$ac_res" >&6; }
14003     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14004   cat >>confdefs.h <<_ACEOF
14005 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14006 _ACEOF
14007
14008                      eval ac_cv_have_decl_$gl_func=yes
14009 fi
14010       done
14011
14012
14013
14014
14015 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
14016 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
14017   ac_have_decl=1
14018 else
14019   ac_have_decl=0
14020 fi
14021
14022 cat >>confdefs.h <<_ACEOF
14023 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
14024 _ACEOF
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041      if test $gl_cv_have_include_next = yes; then
14042        gl_cv_next_getopt_h='<'getopt.h'>'
14043      else
14044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
14045 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
14046 if ${gl_cv_next_getopt_h+:} false; then :
14047   $as_echo_n "(cached) " >&6
14048 else
14049
14050              if test $ac_cv_header_getopt_h = yes; then
14051
14052
14053
14054
14055   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14056 /* end confdefs.h.  */
14057 #include <getopt.h>
14058 _ACEOF
14059                 case "$host_os" in
14060     aix*) gl_absname_cpp="$ac_cpp -C" ;;
14061     *)    gl_absname_cpp="$ac_cpp" ;;
14062   esac
14063
14064   case "$host_os" in
14065     mingw*)
14066                                           gl_dirsep_regex='[/\\]'
14067       ;;
14068     *)
14069       gl_dirsep_regex='\/'
14070       ;;
14071   esac
14072       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14073   gl_header_literal_regex=`echo 'getopt.h' \
14074                            | sed -e "$gl_make_literal_regex_sed"`
14075   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14076       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14077       s|^/[^/]|//&|
14078       p
14079       q
14080     }'
14081
14082         gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14083   sed -n "$gl_absolute_header_sed"`
14084
14085            gl_header=$gl_cv_absolute_getopt_h
14086            gl_cv_next_getopt_h='"'$gl_header'"'
14087           else
14088                gl_cv_next_getopt_h='<'getopt.h'>'
14089              fi
14090
14091
14092 fi
14093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
14094 $as_echo "$gl_cv_next_getopt_h" >&6; }
14095      fi
14096      NEXT_GETOPT_H=$gl_cv_next_getopt_h
14097
14098      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14099        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14100        gl_next_as_first_directive='<'getopt.h'>'
14101      else
14102        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14103        gl_next_as_first_directive=$gl_cv_next_getopt_h
14104      fi
14105      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
14106
14107
14108
14109
14110   if test $ac_cv_header_getopt_h = yes; then
14111     HAVE_GETOPT_H=1
14112   else
14113     HAVE_GETOPT_H=0
14114   fi
14115
14116
14117   gl_replace_getopt=
14118
14119     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14120     for ac_header in getopt.h
14121 do :
14122   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
14123 if test "x$ac_cv_header_getopt_h" = xyes; then :
14124   cat >>confdefs.h <<_ACEOF
14125 #define HAVE_GETOPT_H 1
14126 _ACEOF
14127
14128 else
14129   gl_replace_getopt=yes
14130 fi
14131
14132 done
14133
14134   fi
14135
14136     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14137     for ac_func in getopt_long_only
14138 do :
14139   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
14140 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
14141   cat >>confdefs.h <<_ACEOF
14142 #define HAVE_GETOPT_LONG_ONLY 1
14143 _ACEOF
14144
14145 else
14146   gl_replace_getopt=yes
14147 fi
14148 done
14149
14150   fi
14151
14152           if test -z "$gl_replace_getopt"; then
14153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
14154 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
14155 if ${gl_cv_func_getopt_posix+:} false; then :
14156   $as_echo_n "(cached) " >&6
14157 else
14158
14159                                                 if test $cross_compiling = no; then
14160                               if test "$cross_compiling" = yes; then :
14161   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14162 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14163 as_fn_error $? "cannot run test program while cross compiling
14164 See \`config.log' for more details" "$LINENO" 5; }
14165 else
14166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167 /* end confdefs.h.  */
14168
14169 #include <unistd.h>
14170 #include <stdlib.h>
14171 #include <string.h>
14172
14173 int
14174 main ()
14175 {
14176   static char program[] = "program";
14177   static char a[] = "-a";
14178   static char foo[] = "foo";
14179   static char bar[] = "bar";
14180   char *argv[] = { program, a, foo, bar, NULL };
14181   int c;
14182
14183   c = getopt (4, argv, "ab");
14184   if (!(c == 'a'))
14185     return 1;
14186   c = getopt (4, argv, "ab");
14187   if (!(c == -1))
14188     return 2;
14189   if (!(optind == 2))
14190     return 3;
14191   return 0;
14192 }
14193
14194 _ACEOF
14195 if ac_fn_c_try_run "$LINENO"; then :
14196   gl_cv_func_getopt_posix=maybe
14197 else
14198   gl_cv_func_getopt_posix=no
14199 fi
14200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14201   conftest.$ac_objext conftest.beam conftest.$ac_ext
14202 fi
14203
14204           if test $gl_cv_func_getopt_posix = maybe; then
14205                                     if test "$cross_compiling" = yes; then :
14206   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14208 as_fn_error $? "cannot run test program while cross compiling
14209 See \`config.log' for more details" "$LINENO" 5; }
14210 else
14211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14212 /* end confdefs.h.  */
14213
14214 #include <unistd.h>
14215 #include <stdlib.h>
14216 #include <string.h>
14217
14218 int
14219 main ()
14220 {
14221   static char program[] = "program";
14222   static char donald[] = "donald";
14223   static char p[] = "-p";
14224   static char billy[] = "billy";
14225   static char duck[] = "duck";
14226   static char a[] = "-a";
14227   static char bar[] = "bar";
14228   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
14229   int c;
14230
14231   c = getopt (7, argv, "+abp:q:");
14232   if (!(c == -1))
14233     return 4;
14234   if (!(strcmp (argv[0], "program") == 0))
14235     return 5;
14236   if (!(strcmp (argv[1], "donald") == 0))
14237     return 6;
14238   if (!(strcmp (argv[2], "-p") == 0))
14239     return 7;
14240   if (!(strcmp (argv[3], "billy") == 0))
14241     return 8;
14242   if (!(strcmp (argv[4], "duck") == 0))
14243     return 9;
14244   if (!(strcmp (argv[5], "-a") == 0))
14245     return 10;
14246   if (!(strcmp (argv[6], "bar") == 0))
14247     return 11;
14248   if (!(optind == 1))
14249     return 12;
14250   return 0;
14251 }
14252
14253 _ACEOF
14254 if ac_fn_c_try_run "$LINENO"; then :
14255   gl_cv_func_getopt_posix=maybe
14256 else
14257   gl_cv_func_getopt_posix=no
14258 fi
14259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14260   conftest.$ac_objext conftest.beam conftest.$ac_ext
14261 fi
14262
14263           fi
14264           if test $gl_cv_func_getopt_posix = maybe; then
14265                         if test "$cross_compiling" = yes; then :
14266   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14268 as_fn_error $? "cannot run test program while cross compiling
14269 See \`config.log' for more details" "$LINENO" 5; }
14270 else
14271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272 /* end confdefs.h.  */
14273
14274 #include <unistd.h>
14275 #include <stdlib.h>
14276 #include <string.h>
14277
14278 int
14279 main ()
14280 {
14281   static char program[] = "program";
14282   static char ab[] = "-ab";
14283   char *argv[3] = { program, ab, NULL };
14284   if (getopt (2, argv, "ab:") != 'a')
14285     return 13;
14286   if (getopt (2, argv, "ab:") != '?')
14287     return 14;
14288   if (optopt != 'b')
14289     return 15;
14290   if (optind != 2)
14291     return 16;
14292   return 0;
14293 }
14294
14295 _ACEOF
14296 if ac_fn_c_try_run "$LINENO"; then :
14297   gl_cv_func_getopt_posix=yes
14298 else
14299   gl_cv_func_getopt_posix=no
14300 fi
14301 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14302   conftest.$ac_objext conftest.beam conftest.$ac_ext
14303 fi
14304
14305           fi
14306         else
14307           case "$host_os" in
14308             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
14309             *)                       gl_cv_func_getopt_posix="guessing yes";;
14310           esac
14311         fi
14312
14313 fi
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
14315 $as_echo "$gl_cv_func_getopt_posix" >&6; }
14316     case "$gl_cv_func_getopt_posix" in
14317       *no) gl_replace_getopt=yes ;;
14318     esac
14319   fi
14320
14321   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
14322     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
14323 $as_echo_n "checking for working GNU getopt function... " >&6; }
14324 if ${gl_cv_func_getopt_gnu+:} false; then :
14325   $as_echo_n "(cached) " >&6
14326 else
14327   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
14328        # optstring is necessary for programs like m4 that have POSIX-mandated
14329        # semantics for supporting options interspersed with files.
14330        # Also, since getopt_long is a GNU extension, we require optind=0.
14331        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
14332        # so take care to revert to the correct (non-)export state.
14333        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
14334        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
14335          xx) gl_had_POSIXLY_CORRECT=exported ;;
14336          x)  gl_had_POSIXLY_CORRECT=yes      ;;
14337          *)  gl_had_POSIXLY_CORRECT=         ;;
14338        esac
14339        POSIXLY_CORRECT=1
14340        export POSIXLY_CORRECT
14341        if test "$cross_compiling" = yes; then :
14342            gl_cv_func_getopt_gnu="guessing no"
14343
14344 else
14345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h.  */
14347 #include <getopt.h>
14348                            #include <stddef.h>
14349                            #include <string.h>
14350
14351 #include <stdlib.h>
14352 #if defined __MACH__ && defined __APPLE__
14353 /* Avoid a crash on Mac OS X.  */
14354 #include <mach/mach.h>
14355 #include <mach/mach_error.h>
14356 #include <mach/thread_status.h>
14357 #include <mach/exception.h>
14358 #include <mach/task.h>
14359 #include <pthread.h>
14360 /* The exception port on which our thread listens.  */
14361 static mach_port_t our_exception_port;
14362 /* The main function of the thread listening for exceptions of type
14363    EXC_BAD_ACCESS.  */
14364 static void *
14365 mach_exception_thread (void *arg)
14366 {
14367   /* Buffer for a message to be received.  */
14368   struct {
14369     mach_msg_header_t head;
14370     mach_msg_body_t msgh_body;
14371     char data[1024];
14372   } msg;
14373   mach_msg_return_t retval;
14374   /* Wait for a message on the exception port.  */
14375   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
14376                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
14377   if (retval != MACH_MSG_SUCCESS)
14378     abort ();
14379   exit (1);
14380 }
14381 static void
14382 nocrash_init (void)
14383 {
14384   mach_port_t self = mach_task_self ();
14385   /* Allocate a port on which the thread shall listen for exceptions.  */
14386   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
14387       == KERN_SUCCESS) {
14388     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
14389     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
14390                                 MACH_MSG_TYPE_MAKE_SEND)
14391         == KERN_SUCCESS) {
14392       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
14393          for us.  */
14394       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
14395       /* Create the thread listening on the exception port.  */
14396       pthread_attr_t attr;
14397       pthread_t thread;
14398       if (pthread_attr_init (&attr) == 0
14399           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
14400           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
14401         pthread_attr_destroy (&attr);
14402         /* Replace the exception port info for these exceptions with our own.
14403            Note that we replace the exception port for the entire task, not only
14404            for a particular thread.  This has the effect that when our exception
14405            port gets the message, the thread specific exception port has already
14406            been asked, and we don't need to bother about it.
14407            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
14408         task_set_exception_ports (self, mask, our_exception_port,
14409                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
14410       }
14411     }
14412   }
14413 }
14414 #elif defined _WIN32 && ! defined __CYGWIN__
14415 /* Avoid a crash on native Windows.  */
14416 #define WIN32_LEAN_AND_MEAN
14417 #include <windows.h>
14418 #include <winerror.h>
14419 static LONG WINAPI
14420 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
14421 {
14422   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
14423     {
14424     case EXCEPTION_ACCESS_VIOLATION:
14425     case EXCEPTION_IN_PAGE_ERROR:
14426     case EXCEPTION_STACK_OVERFLOW:
14427     case EXCEPTION_GUARD_PAGE:
14428     case EXCEPTION_PRIV_INSTRUCTION:
14429     case EXCEPTION_ILLEGAL_INSTRUCTION:
14430     case EXCEPTION_DATATYPE_MISALIGNMENT:
14431     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
14432     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
14433       exit (1);
14434     }
14435   return EXCEPTION_CONTINUE_SEARCH;
14436 }
14437 static void
14438 nocrash_init (void)
14439 {
14440   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
14441 }
14442 #else
14443 /* Avoid a crash on POSIX systems.  */
14444 #include <signal.h>
14445 #include <unistd.h>
14446 /* A POSIX signal handler.  */
14447 static void
14448 exception_handler (int sig)
14449 {
14450   _exit (1);
14451 }
14452 static void
14453 nocrash_init (void)
14454 {
14455 #ifdef SIGSEGV
14456   signal (SIGSEGV, exception_handler);
14457 #endif
14458 #ifdef SIGBUS
14459   signal (SIGBUS, exception_handler);
14460 #endif
14461 }
14462 #endif
14463
14464
14465 int
14466 main ()
14467 {
14468
14469              int result = 0;
14470
14471              nocrash_init();
14472
14473              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
14474                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
14475                 OSF/1 5.1, Solaris 10.  */
14476              {
14477                static char conftest[] = "conftest";
14478                static char plus[] = "-+";
14479                char *argv[3] = { conftest, plus, NULL };
14480                opterr = 0;
14481                if (getopt (2, argv, "+a") != '?')
14482                  result |= 1;
14483              }
14484              /* This code succeeds on glibc 2.8, mingw,
14485                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
14486                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
14487              {
14488                static char program[] = "program";
14489                static char p[] = "-p";
14490                static char foo[] = "foo";
14491                static char bar[] = "bar";
14492                char *argv[] = { program, p, foo, bar, NULL };
14493
14494                optind = 1;
14495                if (getopt (4, argv, "p::") != 'p')
14496                  result |= 2;
14497                else if (optarg != NULL)
14498                  result |= 4;
14499                else if (getopt (4, argv, "p::") != -1)
14500                  result |= 6;
14501                else if (optind != 2)
14502                  result |= 8;
14503              }
14504              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
14505              {
14506                static char program[] = "program";
14507                static char foo[] = "foo";
14508                static char p[] = "-p";
14509                char *argv[] = { program, foo, p, NULL };
14510                optind = 0;
14511                if (getopt (3, argv, "-p") != 1)
14512                  result |= 16;
14513                else if (getopt (3, argv, "-p") != 'p')
14514                  result |= 16;
14515              }
14516              /* This code fails on glibc 2.11.  */
14517              {
14518                static char program[] = "program";
14519                static char b[] = "-b";
14520                static char a[] = "-a";
14521                char *argv[] = { program, b, a, NULL };
14522                optind = opterr = 0;
14523                if (getopt (3, argv, "+:a:b") != 'b')
14524                  result |= 32;
14525                else if (getopt (3, argv, "+:a:b") != ':')
14526                  result |= 32;
14527              }
14528              /* This code dumps core on glibc 2.14.  */
14529              {
14530                static char program[] = "program";
14531                static char w[] = "-W";
14532                static char dummy[] = "dummy";
14533                char *argv[] = { program, w, dummy, NULL };
14534                optind = opterr = 1;
14535                if (getopt (3, argv, "W;") != 'W')
14536                  result |= 64;
14537              }
14538              return result;
14539
14540   ;
14541   return 0;
14542 }
14543 _ACEOF
14544 if ac_fn_c_try_run "$LINENO"; then :
14545   gl_cv_func_getopt_gnu=yes
14546 else
14547   gl_cv_func_getopt_gnu=no
14548 fi
14549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14550   conftest.$ac_objext conftest.beam conftest.$ac_ext
14551 fi
14552
14553        case $gl_had_POSIXLY_CORRECT in
14554          exported) ;;
14555          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
14556          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
14557        esac
14558
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
14561 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
14562     if test "$gl_cv_func_getopt_gnu" != yes; then
14563       gl_replace_getopt=yes
14564     else
14565       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
14566 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
14567 if ${gl_cv_func_getopt_long_gnu+:} false; then :
14568   $as_echo_n "(cached) " >&6
14569 else
14570   if test "$cross_compiling" = yes; then :
14571               case "$host_os" in
14572               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
14573               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
14574             esac
14575
14576 else
14577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578 /* end confdefs.h.  */
14579 #include <getopt.h>
14580                 #include <stddef.h>
14581                 #include <string.h>
14582
14583 int
14584 main ()
14585 {
14586 static const struct option long_options[] =
14587                   {
14588                     { "xtremely-",no_argument,       NULL, 1003 },
14589                     { "xtra",     no_argument,       NULL, 1001 },
14590                     { "xtreme",   no_argument,       NULL, 1002 },
14591                     { "xtremely", no_argument,       NULL, 1003 },
14592                     { NULL,       0,                 NULL, 0 }
14593                   };
14594                 /* This code fails on OpenBSD 5.0.  */
14595                 {
14596                   static char program[] = "program";
14597                   static char xtremel[] = "--xtremel";
14598                   char *argv[] = { program, xtremel, NULL };
14599                   int option_index;
14600                   optind = 1; opterr = 0;
14601                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
14602                     return 1;
14603                 }
14604                 return 0;
14605
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 if ac_fn_c_try_run "$LINENO"; then :
14611   gl_cv_func_getopt_long_gnu=yes
14612 else
14613   gl_cv_func_getopt_long_gnu=no
14614 fi
14615 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14616   conftest.$ac_objext conftest.beam conftest.$ac_ext
14617 fi
14618
14619
14620 fi
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
14622 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
14623       case "$gl_cv_func_getopt_long_gnu" in
14624         *yes) ;;
14625         *) gl_replace_getopt=yes ;;
14626       esac
14627     fi
14628   fi
14629
14630
14631
14632
14633
14634
14635
14636
14637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638 /* end confdefs.h.  */
14639
14640 #ifdef _MSC_VER
14641 MicrosoftCompiler
14642 #endif
14643
14644 _ACEOF
14645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14646   $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
14647   gl_asmext='asm'
14648      gl_c_asm_opt='-c -Fa'
14649
14650 else
14651   gl_asmext='s'
14652      gl_c_asm_opt='-S'
14653
14654 fi
14655 rm -f conftest*
14656
14657
14658
14659
14660
14661   { $as_echo "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
14662 $as_echo_n "checking host CPU and C ABI... " >&6; }
14663 if ${gl_cv_host_cpu_c_abi+:} false; then :
14664   $as_echo_n "(cached) " >&6
14665 else
14666   case "$host_cpu" in
14667
14668        i[4567]86 )
14669          gl_cv_host_cpu_c_abi=i386
14670          ;;
14671
14672        x86_64 )
14673          # On x86_64 systems, the C compiler may be generating code in one of
14674          # these ABIs:
14675          # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
14676          # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
14677          #   with native Windows (mingw, MSVC).
14678          # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
14679          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
14680          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681 /* end confdefs.h.  */
14682 #if (defined __x86_64__ || defined __amd64__ \
14683                      || defined _M_X64 || defined _M_AMD64)
14684                  int ok;
14685                 #else
14686                  error fail
14687                 #endif
14688
14689 _ACEOF
14690 if ac_fn_c_try_compile "$LINENO"; then :
14691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692 /* end confdefs.h.  */
14693 #if defined __ILP32__ || defined _ILP32
14694                     int ok;
14695                    #else
14696                     error fail
14697                    #endif
14698
14699 _ACEOF
14700 if ac_fn_c_try_compile "$LINENO"; then :
14701   gl_cv_host_cpu_c_abi=x86_64-x32
14702 else
14703   gl_cv_host_cpu_c_abi=x86_64
14704 fi
14705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14706 else
14707   gl_cv_host_cpu_c_abi=i386
14708 fi
14709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14710          ;;
14711
14712        alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
14713          gl_cv_host_cpu_c_abi=alpha
14714          ;;
14715
14716        arm* | aarch64 )
14717          # Assume arm with EABI.
14718          # On arm64 systems, the C compiler may be generating code in one of
14719          # these ABIs:
14720          # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
14721          # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
14722          # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
14723          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h.  */
14725 #ifdef __aarch64__
14726                  int ok;
14727                 #else
14728                  error fail
14729                 #endif
14730
14731 _ACEOF
14732 if ac_fn_c_try_compile "$LINENO"; then :
14733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14734 /* end confdefs.h.  */
14735 #if defined __ILP32__ || defined _ILP32
14736                    int ok;
14737                   #else
14738                    error fail
14739                   #endif
14740
14741 _ACEOF
14742 if ac_fn_c_try_compile "$LINENO"; then :
14743   gl_cv_host_cpu_c_abi=arm64-ilp32
14744 else
14745   gl_cv_host_cpu_c_abi=arm64
14746 fi
14747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14748 else
14749   # Don't distinguish little-endian and big-endian arm, since they
14750             # don't require different machine code for simple operations and
14751             # since the user can distinguish them through the preprocessor
14752             # defines __ARMEL__ vs. __ARMEB__.
14753             # But distinguish arm which passes floating-point arguments and
14754             # return values in integer registers (r0, r1, ...) - this is
14755             # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
14756             # passes them in float registers (s0, s1, ...) and double registers
14757             # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
14758             # sets the preprocessor defines __ARM_PCS (for the first case) and
14759             # __ARM_PCS_VFP (for the second case), but older GCC does not.
14760             echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
14761             # Look for a reference to the register d0 in the .s file.
14762             { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
14763   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14764   (eval $ac_try) 2>&5
14765   ac_status=$?
14766   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14767   test $ac_status = 0; }; } >/dev/null 2>&1
14768             if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
14769               gl_cv_host_cpu_c_abi=armhf
14770             else
14771               gl_cv_host_cpu_c_abi=arm
14772             fi
14773             rm -f conftest*
14774
14775 fi
14776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14777          ;;
14778
14779        hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
14780          # On hppa, the C compiler may be generating 32-bit code or 64-bit
14781          # code. In the latter case, it defines _LP64 and __LP64__.
14782          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783 /* end confdefs.h.  */
14784 #ifdef __LP64__
14785                  int ok;
14786                 #else
14787                  error fail
14788                 #endif
14789
14790 _ACEOF
14791 if ac_fn_c_try_compile "$LINENO"; then :
14792   gl_cv_host_cpu_c_abi=hppa64
14793 else
14794   gl_cv_host_cpu_c_abi=hppa
14795 fi
14796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14797          ;;
14798
14799        ia64* )
14800          # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
14801          # 32-bit code. In the latter case, it defines _ILP32.
14802          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803 /* end confdefs.h.  */
14804 #ifdef _ILP32
14805                  int ok;
14806                 #else
14807                  error fail
14808                 #endif
14809
14810 _ACEOF
14811 if ac_fn_c_try_compile "$LINENO"; then :
14812   gl_cv_host_cpu_c_abi=ia64-ilp32
14813 else
14814   gl_cv_host_cpu_c_abi=ia64
14815 fi
14816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14817          ;;
14818
14819        mips* )
14820          # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
14821          # at 32.
14822          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823 /* end confdefs.h.  */
14824 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
14825                  int ok;
14826                 #else
14827                  error fail
14828                 #endif
14829
14830 _ACEOF
14831 if ac_fn_c_try_compile "$LINENO"; then :
14832   gl_cv_host_cpu_c_abi=mips64
14833 else
14834   # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
14835             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
14836             # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
14837             # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
14838             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14839 /* end confdefs.h.  */
14840 #if (_MIPS_SIM == _ABIN32)
14841                     int ok;
14842                    #else
14843                     error fail
14844                    #endif
14845
14846 _ACEOF
14847 if ac_fn_c_try_compile "$LINENO"; then :
14848   gl_cv_host_cpu_c_abi=mipsn32
14849 else
14850   gl_cv_host_cpu_c_abi=mips
14851 fi
14852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853 fi
14854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855          ;;
14856
14857        powerpc* )
14858          # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
14859          # No need to distinguish them here; the caller may distinguish
14860          # them based on the OS.
14861          # On powerpc64 systems, the C compiler may still be generating
14862          # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
14863          # be generating 64-bit code.
14864          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14865 /* end confdefs.h.  */
14866 #if defined __powerpc64__ || defined _ARCH_PPC64
14867                  int ok;
14868                 #else
14869                  error fail
14870                 #endif
14871
14872 _ACEOF
14873 if ac_fn_c_try_compile "$LINENO"; then :
14874   # On powerpc64, there are two ABIs on Linux: The AIX compatible
14875             # one and the ELFv2 one. The latter defines _CALL_ELF=2.
14876             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14877 /* end confdefs.h.  */
14878 #if defined _CALL_ELF && _CALL_ELF == 2
14879                     int ok;
14880                    #else
14881                     error fail
14882                    #endif
14883
14884 _ACEOF
14885 if ac_fn_c_try_compile "$LINENO"; then :
14886   gl_cv_host_cpu_c_abi=powerpc64-elfv2
14887 else
14888   gl_cv_host_cpu_c_abi=powerpc64
14889 fi
14890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14891
14892 else
14893   gl_cv_host_cpu_c_abi=powerpc
14894 fi
14895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14896          ;;
14897
14898        rs6000 )
14899          gl_cv_host_cpu_c_abi=powerpc
14900          ;;
14901
14902        riscv32 | riscv64 )
14903          # There are 2 architectures (with variants): rv32* and rv64*.
14904          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14905 /* end confdefs.h.  */
14906 #if __riscv_xlen == 64
14907                   int ok;
14908                 #else
14909                   error fail
14910                 #endif
14911
14912 _ACEOF
14913 if ac_fn_c_try_compile "$LINENO"; then :
14914   cpu=riscv64
14915 else
14916   cpu=riscv32
14917 fi
14918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14919          # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
14920          # Size of 'long' and 'void *':
14921          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14922 /* end confdefs.h.  */
14923 #if defined __LP64__
14924                   int ok;
14925                 #else
14926                   error fail
14927                 #endif
14928
14929 _ACEOF
14930 if ac_fn_c_try_compile "$LINENO"; then :
14931   main_abi=lp64
14932 else
14933   main_abi=ilp32
14934 fi
14935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14936          # Float ABIs:
14937          # __riscv_float_abi_double:
14938          #   'float' and 'double' are passed in floating-point registers.
14939          # __riscv_float_abi_single:
14940          #   'float' are passed in floating-point registers.
14941          # __riscv_float_abi_soft:
14942          #   No values are passed in floating-point registers.
14943          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h.  */
14945 #if defined __riscv_float_abi_double
14946                   int ok;
14947                 #else
14948                   error fail
14949                 #endif
14950
14951 _ACEOF
14952 if ac_fn_c_try_compile "$LINENO"; then :
14953   float_abi=d
14954 else
14955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956 /* end confdefs.h.  */
14957 #if defined __riscv_float_abi_single
14958                      int ok;
14959                    #else
14960                      error fail
14961                    #endif
14962
14963 _ACEOF
14964 if ac_fn_c_try_compile "$LINENO"; then :
14965   float_abi=f
14966 else
14967   float_abi=''
14968 fi
14969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14970
14971 fi
14972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14973          gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
14974          ;;
14975
14976        s390* )
14977          # On s390x, the C compiler may be generating 64-bit (= s390x) code
14978          # or 31-bit (= s390) code.
14979          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980 /* end confdefs.h.  */
14981 #if defined __LP64__ || defined __s390x__
14982                   int ok;
14983                 #else
14984                   error fail
14985                 #endif
14986
14987 _ACEOF
14988 if ac_fn_c_try_compile "$LINENO"; then :
14989   gl_cv_host_cpu_c_abi=s390x
14990 else
14991   gl_cv_host_cpu_c_abi=s390
14992 fi
14993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14994          ;;
14995
14996        sparc | sparc64 )
14997          # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
14998          # C compiler still generates 32-bit code.
14999          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15000 /* end confdefs.h.  */
15001 #if defined __sparcv9 || defined __arch64__
15002                  int ok;
15003                 #else
15004                  error fail
15005                 #endif
15006
15007 _ACEOF
15008 if ac_fn_c_try_compile "$LINENO"; then :
15009   gl_cv_host_cpu_c_abi=sparc64
15010 else
15011   gl_cv_host_cpu_c_abi=sparc
15012 fi
15013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15014          ;;
15015
15016        *)
15017          gl_cv_host_cpu_c_abi="$host_cpu"
15018          ;;
15019      esac
15020
15021 fi
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
15023 $as_echo "$gl_cv_host_cpu_c_abi" >&6; }
15024
15025     HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
15026   HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
15027
15028
15029
15030   # This was
15031   #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
15032   #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
15033   # earlier, but KAI C++ 3.2d doesn't like this.
15034   sed -e 's/-/_/g' >> confdefs.h <<EOF
15035 #ifndef __${HOST_CPU}__
15036 #define __${HOST_CPU}__ 1
15037 #endif
15038 #ifndef __${HOST_CPU_C_ABI}__
15039 #define __${HOST_CPU_C_ABI}__ 1
15040 #endif
15041 EOF
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057      if test $gl_cv_have_include_next = yes; then
15058        gl_cv_next_limits_h='<'limits.h'>'
15059      else
15060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
15061 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
15062 if ${gl_cv_next_limits_h+:} false; then :
15063   $as_echo_n "(cached) " >&6
15064 else
15065
15066              if test $ac_cv_header_limits_h = yes; then
15067
15068
15069
15070
15071   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15072 /* end confdefs.h.  */
15073 #include <limits.h>
15074 _ACEOF
15075                 case "$host_os" in
15076     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15077     *)    gl_absname_cpp="$ac_cpp" ;;
15078   esac
15079
15080   case "$host_os" in
15081     mingw*)
15082                                           gl_dirsep_regex='[/\\]'
15083       ;;
15084     *)
15085       gl_dirsep_regex='\/'
15086       ;;
15087   esac
15088       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15089   gl_header_literal_regex=`echo 'limits.h' \
15090                            | sed -e "$gl_make_literal_regex_sed"`
15091   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15092       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15093       s|^/[^/]|//&|
15094       p
15095       q
15096     }'
15097
15098         gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15099   sed -n "$gl_absolute_header_sed"`
15100
15101            gl_header=$gl_cv_absolute_limits_h
15102            gl_cv_next_limits_h='"'$gl_header'"'
15103           else
15104                gl_cv_next_limits_h='<'limits.h'>'
15105              fi
15106
15107
15108 fi
15109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
15110 $as_echo "$gl_cv_next_limits_h" >&6; }
15111      fi
15112      NEXT_LIMITS_H=$gl_cv_next_limits_h
15113
15114      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15115        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15116        gl_next_as_first_directive='<'limits.h'>'
15117      else
15118        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15119        gl_next_as_first_directive=$gl_cv_next_limits_h
15120      fi
15121      NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
15122
15123
15124
15125
15126
15127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
15128 $as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
15129 if ${gl_cv_header_limits_width+:} false; then :
15130   $as_echo_n "(cached) " >&6
15131 else
15132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133 /* end confdefs.h.  */
15134 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15135                            #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15136                           #endif
15137                           #include <limits.h>
15138                           int ullw = ULLONG_WIDTH;
15139 int
15140 main ()
15141 {
15142
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 if ac_fn_c_try_compile "$LINENO"; then :
15148   gl_cv_header_limits_width=yes
15149 else
15150   gl_cv_header_limits_width=no
15151 fi
15152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15153 fi
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
15155 $as_echo "$gl_cv_header_limits_width" >&6; }
15156   if test "$gl_cv_header_limits_width" = yes; then
15157     LIMITS_H=
15158   else
15159     LIMITS_H=limits.h
15160   fi
15161
15162    if test -n "$LIMITS_H"; then
15163   GL_GENERATE_LIMITS_H_TRUE=
15164   GL_GENERATE_LIMITS_H_FALSE='#'
15165 else
15166   GL_GENERATE_LIMITS_H_TRUE='#'
15167   GL_GENERATE_LIMITS_H_FALSE=
15168 fi
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181   if test $ac_cv_type_long_long_int = yes; then
15182     HAVE_LONG_LONG_INT=1
15183   else
15184     HAVE_LONG_LONG_INT=0
15185   fi
15186
15187
15188   if test $ac_cv_type_unsigned_long_long_int = yes; then
15189     HAVE_UNSIGNED_LONG_LONG_INT=1
15190   else
15191     HAVE_UNSIGNED_LONG_LONG_INT=0
15192   fi
15193
15194
15195
15196   if test $ac_cv_header_wchar_h = yes; then
15197     HAVE_WCHAR_H=1
15198   else
15199     HAVE_WCHAR_H=0
15200   fi
15201
15202
15203       if test $ac_cv_header_inttypes_h = yes; then
15204     HAVE_INTTYPES_H=1
15205   else
15206     HAVE_INTTYPES_H=0
15207   fi
15208
15209
15210       if test $ac_cv_header_sys_types_h = yes; then
15211     HAVE_SYS_TYPES_H=1
15212   else
15213     HAVE_SYS_TYPES_H=0
15214   fi
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226      if test $gl_cv_have_include_next = yes; then
15227        gl_cv_next_stdint_h='<'stdint.h'>'
15228      else
15229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
15230 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
15231 if ${gl_cv_next_stdint_h+:} false; then :
15232   $as_echo_n "(cached) " >&6
15233 else
15234
15235              if test $ac_cv_header_stdint_h = yes; then
15236
15237
15238
15239
15240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h.  */
15242 #include <stdint.h>
15243 _ACEOF
15244                 case "$host_os" in
15245     aix*) gl_absname_cpp="$ac_cpp -C" ;;
15246     *)    gl_absname_cpp="$ac_cpp" ;;
15247   esac
15248
15249   case "$host_os" in
15250     mingw*)
15251                                           gl_dirsep_regex='[/\\]'
15252       ;;
15253     *)
15254       gl_dirsep_regex='\/'
15255       ;;
15256   esac
15257       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15258   gl_header_literal_regex=`echo 'stdint.h' \
15259                            | sed -e "$gl_make_literal_regex_sed"`
15260   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15261       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15262       s|^/[^/]|//&|
15263       p
15264       q
15265     }'
15266
15267         gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15268   sed -n "$gl_absolute_header_sed"`
15269
15270            gl_header=$gl_cv_absolute_stdint_h
15271            gl_cv_next_stdint_h='"'$gl_header'"'
15272           else
15273                gl_cv_next_stdint_h='<'stdint.h'>'
15274              fi
15275
15276
15277 fi
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
15279 $as_echo "$gl_cv_next_stdint_h" >&6; }
15280      fi
15281      NEXT_STDINT_H=$gl_cv_next_stdint_h
15282
15283      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15284        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15285        gl_next_as_first_directive='<'stdint.h'>'
15286      else
15287        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15288        gl_next_as_first_directive=$gl_cv_next_stdint_h
15289      fi
15290      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
15291
15292
15293
15294
15295   if test $ac_cv_header_stdint_h = yes; then
15296     HAVE_STDINT_H=1
15297   else
15298     HAVE_STDINT_H=0
15299   fi
15300
15301
15302     if test $ac_cv_header_stdint_h = yes; then
15303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
15304 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
15305 if ${gl_cv_header_working_stdint_h+:} false; then :
15306   $as_echo_n "(cached) " >&6
15307 else
15308   gl_cv_header_working_stdint_h=no
15309        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310 /* end confdefs.h.  */
15311
15312
15313 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15314 #define __STDC_CONSTANT_MACROS 1
15315 #define __STDC_LIMIT_MACROS 1
15316 #include <stdint.h>
15317 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
15318 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
15319 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
15320 #endif
15321
15322
15323   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15324      included before <wchar.h>.  */
15325   #include <stddef.h>
15326   #include <signal.h>
15327   #if HAVE_WCHAR_H
15328   # include <stdio.h>
15329   # include <time.h>
15330   # include <wchar.h>
15331   #endif
15332
15333
15334 #ifdef INT8_MAX
15335 int8_t a1 = INT8_MAX;
15336 int8_t a1min = INT8_MIN;
15337 #endif
15338 #ifdef INT16_MAX
15339 int16_t a2 = INT16_MAX;
15340 int16_t a2min = INT16_MIN;
15341 #endif
15342 #ifdef INT32_MAX
15343 int32_t a3 = INT32_MAX;
15344 int32_t a3min = INT32_MIN;
15345 #endif
15346 #ifdef INT64_MAX
15347 int64_t a4 = INT64_MAX;
15348 int64_t a4min = INT64_MIN;
15349 #endif
15350 #ifdef UINT8_MAX
15351 uint8_t b1 = UINT8_MAX;
15352 #else
15353 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
15354 #endif
15355 #ifdef UINT16_MAX
15356 uint16_t b2 = UINT16_MAX;
15357 #endif
15358 #ifdef UINT32_MAX
15359 uint32_t b3 = UINT32_MAX;
15360 #endif
15361 #ifdef UINT64_MAX
15362 uint64_t b4 = UINT64_MAX;
15363 #endif
15364 int_least8_t c1 = INT8_C (0x7f);
15365 int_least8_t c1max = INT_LEAST8_MAX;
15366 int_least8_t c1min = INT_LEAST8_MIN;
15367 int_least16_t c2 = INT16_C (0x7fff);
15368 int_least16_t c2max = INT_LEAST16_MAX;
15369 int_least16_t c2min = INT_LEAST16_MIN;
15370 int_least32_t c3 = INT32_C (0x7fffffff);
15371 int_least32_t c3max = INT_LEAST32_MAX;
15372 int_least32_t c3min = INT_LEAST32_MIN;
15373 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
15374 int_least64_t c4max = INT_LEAST64_MAX;
15375 int_least64_t c4min = INT_LEAST64_MIN;
15376 uint_least8_t d1 = UINT8_C (0xff);
15377 uint_least8_t d1max = UINT_LEAST8_MAX;
15378 uint_least16_t d2 = UINT16_C (0xffff);
15379 uint_least16_t d2max = UINT_LEAST16_MAX;
15380 uint_least32_t d3 = UINT32_C (0xffffffff);
15381 uint_least32_t d3max = UINT_LEAST32_MAX;
15382 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
15383 uint_least64_t d4max = UINT_LEAST64_MAX;
15384 int_fast8_t e1 = INT_FAST8_MAX;
15385 int_fast8_t e1min = INT_FAST8_MIN;
15386 int_fast16_t e2 = INT_FAST16_MAX;
15387 int_fast16_t e2min = INT_FAST16_MIN;
15388 int_fast32_t e3 = INT_FAST32_MAX;
15389 int_fast32_t e3min = INT_FAST32_MIN;
15390 int_fast64_t e4 = INT_FAST64_MAX;
15391 int_fast64_t e4min = INT_FAST64_MIN;
15392 uint_fast8_t f1 = UINT_FAST8_MAX;
15393 uint_fast16_t f2 = UINT_FAST16_MAX;
15394 uint_fast32_t f3 = UINT_FAST32_MAX;
15395 uint_fast64_t f4 = UINT_FAST64_MAX;
15396 #ifdef INTPTR_MAX
15397 intptr_t g = INTPTR_MAX;
15398 intptr_t gmin = INTPTR_MIN;
15399 #endif
15400 #ifdef UINTPTR_MAX
15401 uintptr_t h = UINTPTR_MAX;
15402 #endif
15403 intmax_t i = INTMAX_MAX;
15404 uintmax_t j = UINTMAX_MAX;
15405
15406 /* Check that SIZE_MAX has the correct type, if possible.  */
15407 #if 201112 <= __STDC_VERSION__
15408 int k = _Generic (SIZE_MAX, size_t: 0);
15409 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
15410        || (0x5110 <= __SUNPRO_C && !__STDC__))
15411 extern size_t k;
15412 extern __typeof__ (SIZE_MAX) k;
15413 #endif
15414
15415 #include <limits.h> /* for CHAR_BIT */
15416 #define TYPE_MINIMUM(t) \
15417   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
15418 #define TYPE_MAXIMUM(t) \
15419   ((t) ((t) 0 < (t) -1 \
15420         ? (t) -1 \
15421         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
15422 struct s {
15423   int check_PTRDIFF:
15424       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
15425       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
15426       ? 1 : -1;
15427   /* Detect bug in FreeBSD 6.0 / ia64.  */
15428   int check_SIG_ATOMIC:
15429       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
15430       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
15431       ? 1 : -1;
15432   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
15433   int check_WCHAR:
15434       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
15435       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
15436       ? 1 : -1;
15437   /* Detect bug in mingw.  */
15438   int check_WINT:
15439       WINT_MIN == TYPE_MINIMUM (wint_t)
15440       && WINT_MAX == TYPE_MAXIMUM (wint_t)
15441       ? 1 : -1;
15442
15443   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
15444   int check_UINT8_C:
15445         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
15446   int check_UINT16_C:
15447         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
15448
15449   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
15450 #ifdef UINT8_MAX
15451   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
15452 #endif
15453 #ifdef UINT16_MAX
15454   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
15455 #endif
15456 #ifdef UINT32_MAX
15457   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
15458 #endif
15459 #ifdef UINT64_MAX
15460   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
15461 #endif
15462   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
15463   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
15464   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
15465   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
15466   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
15467   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
15468   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
15469   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
15470   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
15471   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
15472   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
15473 };
15474
15475 int
15476 main ()
15477 {
15478
15479   ;
15480   return 0;
15481 }
15482 _ACEOF
15483 if ac_fn_c_try_compile "$LINENO"; then :
15484                                                     if test "$cross_compiling" = yes; then :
15485   case "$host_os" in
15486                          # Guess yes on native Windows.
15487                  mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
15488                          # In general, assume it works.
15489                  *)      gl_cv_header_working_stdint_h="guessing yes" ;;
15490                esac
15491
15492 else
15493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15494 /* end confdefs.h.  */
15495
15496
15497 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15498 #define __STDC_CONSTANT_MACROS 1
15499 #define __STDC_LIMIT_MACROS 1
15500 #include <stdint.h>
15501
15502
15503   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15504      included before <wchar.h>.  */
15505   #include <stddef.h>
15506   #include <signal.h>
15507   #if HAVE_WCHAR_H
15508   # include <stdio.h>
15509   # include <time.h>
15510   # include <wchar.h>
15511   #endif
15512
15513
15514 #include <stdio.h>
15515 #include <string.h>
15516 #define MVAL(macro) MVAL1(macro)
15517 #define MVAL1(expression) #expression
15518 static const char *macro_values[] =
15519   {
15520 #ifdef INT8_MAX
15521     MVAL (INT8_MAX),
15522 #endif
15523 #ifdef INT16_MAX
15524     MVAL (INT16_MAX),
15525 #endif
15526 #ifdef INT32_MAX
15527     MVAL (INT32_MAX),
15528 #endif
15529 #ifdef INT64_MAX
15530     MVAL (INT64_MAX),
15531 #endif
15532 #ifdef UINT8_MAX
15533     MVAL (UINT8_MAX),
15534 #endif
15535 #ifdef UINT16_MAX
15536     MVAL (UINT16_MAX),
15537 #endif
15538 #ifdef UINT32_MAX
15539     MVAL (UINT32_MAX),
15540 #endif
15541 #ifdef UINT64_MAX
15542     MVAL (UINT64_MAX),
15543 #endif
15544     NULL
15545   };
15546
15547 int
15548 main ()
15549 {
15550
15551   const char **mv;
15552   for (mv = macro_values; *mv != NULL; mv++)
15553     {
15554       const char *value = *mv;
15555       /* Test whether it looks like a cast expression.  */
15556       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
15557           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
15558           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
15559           || strncmp (value, "((int)"/*)*/, 6) == 0
15560           || strncmp (value, "((signed short)"/*)*/, 15) == 0
15561           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
15562         return mv - macro_values + 1;
15563     }
15564   return 0;
15565
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 if ac_fn_c_try_run "$LINENO"; then :
15571   gl_cv_header_working_stdint_h=yes
15572 fi
15573 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15574   conftest.$ac_objext conftest.beam conftest.$ac_ext
15575 fi
15576
15577
15578 fi
15579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15580
15581 fi
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
15583 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
15584   fi
15585
15586   HAVE_C99_STDINT_H=0
15587   HAVE_SYS_BITYPES_H=0
15588   HAVE_SYS_INTTYPES_H=0
15589   STDINT_H=stdint.h
15590   case "$gl_cv_header_working_stdint_h" in
15591     *yes)
15592       HAVE_C99_STDINT_H=1
15593                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
15594 $as_echo_n "checking whether stdint.h predates C++11... " >&6; }
15595 if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
15596   $as_echo_n "(cached) " >&6
15597 else
15598   gl_cv_header_stdint_predates_cxx11_h=yes
15599          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15600 /* end confdefs.h.  */
15601
15602
15603 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
15604 #include <stdint.h>
15605
15606
15607   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15608      included before <wchar.h>.  */
15609   #include <stddef.h>
15610   #include <signal.h>
15611   #if HAVE_WCHAR_H
15612   # include <stdio.h>
15613   # include <time.h>
15614   # include <wchar.h>
15615   #endif
15616
15617
15618 intmax_t im = INTMAX_MAX;
15619 int32_t i32 = INT32_C (0x7fffffff);
15620
15621 int
15622 main ()
15623 {
15624
15625   ;
15626   return 0;
15627 }
15628 _ACEOF
15629 if ac_fn_c_try_compile "$LINENO"; then :
15630   gl_cv_header_stdint_predates_cxx11_h=no
15631 fi
15632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15633 fi
15634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
15635 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
15636
15637       if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
15638
15639 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
15640
15641
15642 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
15643
15644       fi
15645       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
15646 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
15647 if ${gl_cv_header_stdint_width+:} false; then :
15648   $as_echo_n "(cached) " >&6
15649 else
15650   gl_cv_header_stdint_width=no
15651          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652 /* end confdefs.h.  */
15653
15654               /* Work if build is not clean.  */
15655               #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
15656               #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
15657                #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
15658               #endif
15659               #include <stdint.h>
15660
15661   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15662      included before <wchar.h>.  */
15663   #include <stddef.h>
15664   #include <signal.h>
15665   #if HAVE_WCHAR_H
15666   # include <stdio.h>
15667   # include <time.h>
15668   # include <wchar.h>
15669   #endif
15670
15671               int iw = UINTMAX_WIDTH;
15672
15673 int
15674 main ()
15675 {
15676
15677   ;
15678   return 0;
15679 }
15680 _ACEOF
15681 if ac_fn_c_try_compile "$LINENO"; then :
15682   gl_cv_header_stdint_width=yes
15683 fi
15684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15685 fi
15686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
15687 $as_echo "$gl_cv_header_stdint_width" >&6; }
15688       if test "$gl_cv_header_stdint_width" = yes; then
15689         STDINT_H=
15690       fi
15691       ;;
15692     *)
15693                   for ac_header in sys/inttypes.h sys/bitypes.h
15694 do :
15695   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15696 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15697 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15698   cat >>confdefs.h <<_ACEOF
15699 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15700 _ACEOF
15701
15702 fi
15703
15704 done
15705
15706       if test $ac_cv_header_sys_inttypes_h = yes; then
15707         HAVE_SYS_INTTYPES_H=1
15708       fi
15709       if test $ac_cv_header_sys_bitypes_h = yes; then
15710         HAVE_SYS_BITYPES_H=1
15711       fi
15712
15713
15714   if test $APPLE_UNIVERSAL_BUILD = 0; then
15715
15716
15717   for gltype in ptrdiff_t size_t ; do
15718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15719 $as_echo_n "checking for bit size of $gltype... " >&6; }
15720 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
15721   $as_echo_n "(cached) " >&6
15722 else
15723   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
15724   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15725      included before <wchar.h>.  */
15726   #include <stddef.h>
15727   #include <signal.h>
15728   #if HAVE_WCHAR_H
15729   # include <stdio.h>
15730   # include <time.h>
15731   # include <wchar.h>
15732   #endif
15733
15734 #include <limits.h>"; then :
15735
15736 else
15737   result=unknown
15738 fi
15739
15740        eval gl_cv_bitsizeof_${gltype}=\$result
15741
15742 fi
15743 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15744                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15745 $as_echo "$ac_res" >&6; }
15746     eval result=\$gl_cv_bitsizeof_${gltype}
15747     if test $result = unknown; then
15748                                                 result=0
15749     fi
15750     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15751     cat >>confdefs.h <<_ACEOF
15752 #define BITSIZEOF_${GLTYPE} $result
15753 _ACEOF
15754
15755     eval BITSIZEOF_${GLTYPE}=\$result
15756   done
15757
15758
15759   fi
15760
15761
15762   for gltype in sig_atomic_t wchar_t wint_t ; do
15763     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
15764 $as_echo_n "checking for bit size of $gltype... " >&6; }
15765 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
15766   $as_echo_n "(cached) " >&6
15767 else
15768   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
15769   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15770      included before <wchar.h>.  */
15771   #include <stddef.h>
15772   #include <signal.h>
15773   #if HAVE_WCHAR_H
15774   # include <stdio.h>
15775   # include <time.h>
15776   # include <wchar.h>
15777   #endif
15778
15779 #include <limits.h>"; then :
15780
15781 else
15782   result=unknown
15783 fi
15784
15785        eval gl_cv_bitsizeof_${gltype}=\$result
15786
15787 fi
15788 eval ac_res=\$gl_cv_bitsizeof_${gltype}
15789                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15790 $as_echo "$ac_res" >&6; }
15791     eval result=\$gl_cv_bitsizeof_${gltype}
15792     if test $result = unknown; then
15793                                                 result=0
15794     fi
15795     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15796     cat >>confdefs.h <<_ACEOF
15797 #define BITSIZEOF_${GLTYPE} $result
15798 _ACEOF
15799
15800     eval BITSIZEOF_${GLTYPE}=\$result
15801   done
15802
15803
15804
15805
15806   for gltype in sig_atomic_t wchar_t wint_t ; do
15807     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
15808 $as_echo_n "checking whether $gltype is signed... " >&6; }
15809 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
15810   $as_echo_n "(cached) " >&6
15811 else
15812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15813 /* end confdefs.h.  */
15814
15815   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15816      included before <wchar.h>.  */
15817   #include <stddef.h>
15818   #include <signal.h>
15819   #if HAVE_WCHAR_H
15820   # include <stdio.h>
15821   # include <time.h>
15822   # include <wchar.h>
15823   #endif
15824
15825             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
15826 int
15827 main ()
15828 {
15829
15830   ;
15831   return 0;
15832 }
15833 _ACEOF
15834 if ac_fn_c_try_compile "$LINENO"; then :
15835   result=yes
15836 else
15837   result=no
15838 fi
15839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15840        eval gl_cv_type_${gltype}_signed=\$result
15841
15842 fi
15843 eval ac_res=\$gl_cv_type_${gltype}_signed
15844                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15845 $as_echo "$ac_res" >&6; }
15846     eval result=\$gl_cv_type_${gltype}_signed
15847     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15848     if test "$result" = yes; then
15849       cat >>confdefs.h <<_ACEOF
15850 #define HAVE_SIGNED_${GLTYPE} 1
15851 _ACEOF
15852
15853       eval HAVE_SIGNED_${GLTYPE}=1
15854     else
15855       eval HAVE_SIGNED_${GLTYPE}=0
15856     fi
15857   done
15858
15859
15860   gl_cv_type_ptrdiff_t_signed=yes
15861   gl_cv_type_size_t_signed=no
15862   if test $APPLE_UNIVERSAL_BUILD = 0; then
15863
15864
15865   for gltype in ptrdiff_t size_t ; do
15866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
15867 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
15868 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
15869   $as_echo_n "(cached) " >&6
15870 else
15871   eval gl_cv_type_${gltype}_suffix=no
15872        eval result=\$gl_cv_type_${gltype}_signed
15873        if test "$result" = yes; then
15874          glsufu=
15875        else
15876          glsufu=u
15877        fi
15878        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
15879          case $glsuf in
15880            '')  gltype1='int';;
15881            l)   gltype1='long int';;
15882            ll)  gltype1='long long int';;
15883            i64) gltype1='__int64';;
15884            u)   gltype1='unsigned int';;
15885            ul)  gltype1='unsigned long int';;
15886            ull) gltype1='unsigned long long int';;
15887            ui64)gltype1='unsigned __int64';;
15888          esac
15889          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15890 /* end confdefs.h.  */
15891
15892   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15893      included before <wchar.h>.  */
15894   #include <stddef.h>
15895   #include <signal.h>
15896   #if HAVE_WCHAR_H
15897   # include <stdio.h>
15898   # include <time.h>
15899   # include <wchar.h>
15900   #endif
15901
15902               extern $gltype foo;
15903               extern $gltype1 foo;
15904 int
15905 main ()
15906 {
15907
15908   ;
15909   return 0;
15910 }
15911 _ACEOF
15912 if ac_fn_c_try_compile "$LINENO"; then :
15913   eval gl_cv_type_${gltype}_suffix=\$glsuf
15914 fi
15915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15916          eval result=\$gl_cv_type_${gltype}_suffix
15917          test "$result" != no && break
15918        done
15919 fi
15920 eval ac_res=\$gl_cv_type_${gltype}_suffix
15921                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15922 $as_echo "$ac_res" >&6; }
15923     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15924     eval result=\$gl_cv_type_${gltype}_suffix
15925     test "$result" = no && result=
15926     eval ${GLTYPE}_SUFFIX=\$result
15927     cat >>confdefs.h <<_ACEOF
15928 #define ${GLTYPE}_SUFFIX $result
15929 _ACEOF
15930
15931   done
15932
15933
15934   fi
15935
15936
15937   for gltype in sig_atomic_t wchar_t wint_t ; do
15938     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
15939 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
15940 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
15941   $as_echo_n "(cached) " >&6
15942 else
15943   eval gl_cv_type_${gltype}_suffix=no
15944        eval result=\$gl_cv_type_${gltype}_signed
15945        if test "$result" = yes; then
15946          glsufu=
15947        else
15948          glsufu=u
15949        fi
15950        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
15951          case $glsuf in
15952            '')  gltype1='int';;
15953            l)   gltype1='long int';;
15954            ll)  gltype1='long long int';;
15955            i64) gltype1='__int64';;
15956            u)   gltype1='unsigned int';;
15957            ul)  gltype1='unsigned long int';;
15958            ull) gltype1='unsigned long long int';;
15959            ui64)gltype1='unsigned __int64';;
15960          esac
15961          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15962 /* end confdefs.h.  */
15963
15964   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15965      included before <wchar.h>.  */
15966   #include <stddef.h>
15967   #include <signal.h>
15968   #if HAVE_WCHAR_H
15969   # include <stdio.h>
15970   # include <time.h>
15971   # include <wchar.h>
15972   #endif
15973
15974               extern $gltype foo;
15975               extern $gltype1 foo;
15976 int
15977 main ()
15978 {
15979
15980   ;
15981   return 0;
15982 }
15983 _ACEOF
15984 if ac_fn_c_try_compile "$LINENO"; then :
15985   eval gl_cv_type_${gltype}_suffix=\$glsuf
15986 fi
15987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15988          eval result=\$gl_cv_type_${gltype}_suffix
15989          test "$result" != no && break
15990        done
15991 fi
15992 eval ac_res=\$gl_cv_type_${gltype}_suffix
15993                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15994 $as_echo "$ac_res" >&6; }
15995     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
15996     eval result=\$gl_cv_type_${gltype}_suffix
15997     test "$result" = no && result=
15998     eval ${GLTYPE}_SUFFIX=\$result
15999     cat >>confdefs.h <<_ACEOF
16000 #define ${GLTYPE}_SUFFIX $result
16001 _ACEOF
16002
16003   done
16004
16005
16006
16007           if test $GNULIB_OVERRIDES_WINT_T = 1; then
16008     BITSIZEOF_WINT_T=32
16009   fi
16010
16011       ;;
16012   esac
16013
16014     LIMITS_H=limits.h
16015    if test -n "$LIMITS_H"; then
16016   GL_GENERATE_LIMITS_H_TRUE=
16017   GL_GENERATE_LIMITS_H_FALSE='#'
16018 else
16019   GL_GENERATE_LIMITS_H_TRUE='#'
16020   GL_GENERATE_LIMITS_H_FALSE=
16021 fi
16022
16023
16024
16025
16026
16027
16028    if test -n "$STDINT_H"; then
16029   GL_GENERATE_STDINT_H_TRUE=
16030   GL_GENERATE_STDINT_H_FALSE='#'
16031 else
16032   GL_GENERATE_STDINT_H_TRUE='#'
16033   GL_GENERATE_STDINT_H_FALSE=
16034 fi
16035
16036
16037
16038
16039
16040   GNULIB_IMAXABS=0;
16041   GNULIB_IMAXDIV=0;
16042   GNULIB_STRTOIMAX=0;
16043   GNULIB_STRTOUMAX=0;
16044     HAVE_DECL_IMAXABS=1;
16045   HAVE_DECL_IMAXDIV=1;
16046   HAVE_DECL_STRTOIMAX=1;
16047   HAVE_DECL_STRTOUMAX=1;
16048   REPLACE_STRTOIMAX=0;
16049   REPLACE_STRTOUMAX=0;
16050   INT32_MAX_LT_INTMAX_MAX=1;
16051   INT64_MAX_EQ_LONG_MAX='defined _LP64';
16052   PRI_MACROS_BROKEN=0;
16053   PRIPTR_PREFIX=__PRIPTR_PREFIX;
16054   UINT32_MAX_LT_UINTMAX_MAX=1;
16055   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071      if test $gl_cv_have_include_next = yes; then
16072        gl_cv_next_inttypes_h='<'inttypes.h'>'
16073      else
16074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
16075 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
16076 if ${gl_cv_next_inttypes_h+:} false; then :
16077   $as_echo_n "(cached) " >&6
16078 else
16079
16080              if test $ac_cv_header_inttypes_h = yes; then
16081
16082
16083
16084
16085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16086 /* end confdefs.h.  */
16087 #include <inttypes.h>
16088 _ACEOF
16089                 case "$host_os" in
16090     aix*) gl_absname_cpp="$ac_cpp -C" ;;
16091     *)    gl_absname_cpp="$ac_cpp" ;;
16092   esac
16093
16094   case "$host_os" in
16095     mingw*)
16096                                           gl_dirsep_regex='[/\\]'
16097       ;;
16098     *)
16099       gl_dirsep_regex='\/'
16100       ;;
16101   esac
16102       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16103   gl_header_literal_regex=`echo 'inttypes.h' \
16104                            | sed -e "$gl_make_literal_regex_sed"`
16105   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16106       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16107       s|^/[^/]|//&|
16108       p
16109       q
16110     }'
16111
16112         gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16113   sed -n "$gl_absolute_header_sed"`
16114
16115            gl_header=$gl_cv_absolute_inttypes_h
16116            gl_cv_next_inttypes_h='"'$gl_header'"'
16117           else
16118                gl_cv_next_inttypes_h='<'inttypes.h'>'
16119              fi
16120
16121
16122 fi
16123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
16124 $as_echo "$gl_cv_next_inttypes_h" >&6; }
16125      fi
16126      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
16127
16128      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16129        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16130        gl_next_as_first_directive='<'inttypes.h'>'
16131      else
16132        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16133        gl_next_as_first_directive=$gl_cv_next_inttypes_h
16134      fi
16135      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
16136
16137
16138
16139
16140
16141
16142
16143
16144     for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
16145     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16146     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16147 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16148 if eval \${$as_gl_Symbol+:} false; then :
16149   $as_echo_n "(cached) " >&6
16150 else
16151   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152 /* end confdefs.h.  */
16153 #include <inttypes.h>
16154
16155 int
16156 main ()
16157 {
16158 #undef $gl_func
16159   (void) $gl_func;
16160   ;
16161   return 0;
16162 }
16163 _ACEOF
16164 if ac_fn_c_try_compile "$LINENO"; then :
16165   eval "$as_gl_Symbol=yes"
16166 else
16167   eval "$as_gl_Symbol=no"
16168 fi
16169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16170 fi
16171 eval ac_res=\$$as_gl_Symbol
16172                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16173 $as_echo "$ac_res" >&6; }
16174     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16175   cat >>confdefs.h <<_ACEOF
16176 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16177 _ACEOF
16178
16179                      eval ac_cv_have_decl_$gl_func=yes
16180 fi
16181       done
16182
16183
16184
16185   for ac_header in inttypes.h
16186 do :
16187   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
16188 if test "x$ac_cv_header_inttypes_h" = xyes; then :
16189   cat >>confdefs.h <<_ACEOF
16190 #define HAVE_INTTYPES_H 1
16191 _ACEOF
16192
16193 fi
16194
16195 done
16196
16197   if test $ac_cv_header_inttypes_h = yes; then
16198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
16199 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
16200 if ${gt_cv_inttypes_pri_broken+:} false; then :
16201   $as_echo_n "(cached) " >&6
16202 else
16203
16204         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205 /* end confdefs.h.  */
16206
16207 #include <inttypes.h>
16208 #ifdef PRId32
16209 char *p = PRId32;
16210 #endif
16211
16212 int
16213 main ()
16214 {
16215
16216   ;
16217   return 0;
16218 }
16219 _ACEOF
16220 if ac_fn_c_try_compile "$LINENO"; then :
16221   gt_cv_inttypes_pri_broken=no
16222 else
16223   gt_cv_inttypes_pri_broken=yes
16224 fi
16225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16226
16227 fi
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
16229 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
16230   fi
16231   if test "$gt_cv_inttypes_pri_broken" = yes; then
16232
16233 cat >>confdefs.h <<_ACEOF
16234 #define PRI_MACROS_BROKEN 1
16235 _ACEOF
16236
16237     PRI_MACROS_BROKEN=1
16238   else
16239     PRI_MACROS_BROKEN=0
16240   fi
16241
16242
16243
16244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
16245 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
16246 if ${gl_cv_cc_float_expbit0+:} false; then :
16247   $as_echo_n "(cached) " >&6
16248 else
16249
16250       if test "$cross_compiling" = yes; then :
16251   gl_cv_cc_float_expbit0="word 0 bit 23"
16252 else
16253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254 /* end confdefs.h.  */
16255
16256 #include <float.h>
16257 #include <stddef.h>
16258 #include <stdio.h>
16259 #include <string.h>
16260 #define NWORDS \
16261   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16262 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
16263 static unsigned int ored_words[NWORDS];
16264 static unsigned int anded_words[NWORDS];
16265 static void add_to_ored_words (float x)
16266 {
16267   memory_float m;
16268   size_t i;
16269   /* Clear it first, in case
16270      sizeof (float) < sizeof (memory_float).  */
16271   memset (&m, 0, sizeof (memory_float));
16272   m.value = x;
16273   for (i = 0; i < NWORDS; i++)
16274     {
16275       ored_words[i] |= m.word[i];
16276       anded_words[i] &= m.word[i];
16277     }
16278 }
16279 int main ()
16280 {
16281   size_t j;
16282   FILE *fp = fopen ("conftest.out", "w");
16283   if (fp == NULL)
16284     return 1;
16285   for (j = 0; j < NWORDS; j++)
16286     anded_words[j] = ~ (unsigned int) 0;
16287   add_to_ored_words (0.25f);
16288   add_to_ored_words (0.5f);
16289   add_to_ored_words (1.0f);
16290   add_to_ored_words (2.0f);
16291   add_to_ored_words (4.0f);
16292   /* Remove bits that are common (e.g. if representation of the first mantissa
16293      bit is explicit).  */
16294   for (j = 0; j < NWORDS; j++)
16295     ored_words[j] &= ~anded_words[j];
16296   /* Now find the nonzero word.  */
16297   for (j = 0; j < NWORDS; j++)
16298     if (ored_words[j] != 0)
16299       break;
16300   if (j < NWORDS)
16301     {
16302       size_t i;
16303       for (i = j + 1; i < NWORDS; i++)
16304         if (ored_words[i] != 0)
16305           {
16306             fprintf (fp, "unknown");
16307             return (fclose (fp) != 0);
16308           }
16309       for (i = 0; ; i++)
16310         if ((ored_words[j] >> i) & 1)
16311           {
16312             fprintf (fp, "word %d bit %d", (int) j, (int) i);
16313             return (fclose (fp) != 0);
16314           }
16315     }
16316   fprintf (fp, "unknown");
16317   return (fclose (fp) != 0);
16318 }
16319
16320 _ACEOF
16321 if ac_fn_c_try_run "$LINENO"; then :
16322   gl_cv_cc_float_expbit0=`cat conftest.out`
16323 else
16324   gl_cv_cc_float_expbit0="unknown"
16325 fi
16326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16327   conftest.$ac_objext conftest.beam conftest.$ac_ext
16328 fi
16329
16330       rm -f conftest.out
16331
16332 fi
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
16334 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
16335   case "$gl_cv_cc_float_expbit0" in
16336     word*bit*)
16337       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16338       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
16339
16340 cat >>confdefs.h <<_ACEOF
16341 #define FLT_EXPBIT0_WORD $word
16342 _ACEOF
16343
16344
16345 cat >>confdefs.h <<_ACEOF
16346 #define FLT_EXPBIT0_BIT $bit
16347 _ACEOF
16348
16349       ;;
16350   esac
16351
16352
16353
16354   ISNANF_LIBM=
16355
16356   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
16357 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
16358 if ${gl_cv_func_isnanf_no_libm+:} false; then :
16359   $as_echo_n "(cached) " >&6
16360 else
16361
16362       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16363 /* end confdefs.h.  */
16364 #include <math.h>
16365              #if __GNUC__ >= 4
16366              # undef isnanf
16367              # define isnanf(x) __builtin_isnanf ((float)(x))
16368              #elif defined isnan
16369              # undef isnanf
16370              # define isnanf(x) isnan ((float)(x))
16371              #endif
16372              float x;
16373 int
16374 main ()
16375 {
16376 return isnanf (x);
16377   ;
16378   return 0;
16379 }
16380 _ACEOF
16381 if ac_fn_c_try_link "$LINENO"; then :
16382   gl_cv_func_isnanf_no_libm=yes
16383 else
16384   gl_cv_func_isnanf_no_libm=no
16385 fi
16386 rm -f core conftest.err conftest.$ac_objext \
16387     conftest$ac_exeext conftest.$ac_ext
16388
16389 fi
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
16391 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
16392
16393   if test $gl_cv_func_isnanf_no_libm = no; then
16394
16395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5
16396 $as_echo_n "checking whether isnan(float) can be used with libm... " >&6; }
16397 if ${gl_cv_func_isnanf_in_libm+:} false; then :
16398   $as_echo_n "(cached) " >&6
16399 else
16400
16401       save_LIBS="$LIBS"
16402       LIBS="$LIBS -lm"
16403       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16404 /* end confdefs.h.  */
16405 #include <math.h>
16406              #if __GNUC__ >= 4
16407              # undef isnanf
16408              # define isnanf(x) __builtin_isnanf ((float)(x))
16409              #elif defined isnan
16410              # undef isnanf
16411              # define isnanf(x) isnan ((float)(x))
16412              #endif
16413              float x;
16414 int
16415 main ()
16416 {
16417 return isnanf (x);
16418   ;
16419   return 0;
16420 }
16421 _ACEOF
16422 if ac_fn_c_try_link "$LINENO"; then :
16423   gl_cv_func_isnanf_in_libm=yes
16424 else
16425   gl_cv_func_isnanf_in_libm=no
16426 fi
16427 rm -f core conftest.err conftest.$ac_objext \
16428     conftest$ac_exeext conftest.$ac_ext
16429       LIBS="$save_LIBS"
16430
16431 fi
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5
16433 $as_echo "$gl_cv_func_isnanf_in_libm" >&6; }
16434
16435     if test $gl_cv_func_isnanf_in_libm = yes; then
16436       ISNANF_LIBM=-lm
16437     fi
16438   fi
16439     if test $gl_cv_func_isnanf_no_libm = yes \
16440      || test $gl_cv_func_isnanf_in_libm = yes; then
16441     save_LIBS="$LIBS"
16442     LIBS="$LIBS $ISNANF_LIBM"
16443
16444
16445
16446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
16447 $as_echo_n "checking whether isnan(float) works... " >&6; }
16448 if ${gl_cv_func_isnanf_works+:} false; then :
16449   $as_echo_n "(cached) " >&6
16450 else
16451
16452       if test "$cross_compiling" = yes; then :
16453   case "$host_os" in
16454            irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
16455            mingw*) # Guess yes on mingw, no on MSVC.
16456              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457 /* end confdefs.h.  */
16458
16459 #ifdef __MINGW32__
16460  Known
16461 #endif
16462
16463 _ACEOF
16464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16465   $EGREP "Known" >/dev/null 2>&1; then :
16466   gl_cv_func_isnanf_works="guessing yes"
16467 else
16468   gl_cv_func_isnanf_works="guessing no"
16469 fi
16470 rm -f conftest*
16471
16472              ;;
16473            *) gl_cv_func_isnanf_works="guessing yes" ;;
16474          esac
16475
16476 else
16477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16478 /* end confdefs.h.  */
16479
16480 #include <math.h>
16481 #if __GNUC__ >= 4
16482 # undef isnanf
16483 # define isnanf(x) __builtin_isnanf ((float)(x))
16484 #elif defined isnan
16485 # undef isnanf
16486 # define isnanf(x) isnan ((float)(x))
16487 #endif
16488 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
16489 #ifdef __DECC
16490 static float
16491 NaN ()
16492 {
16493   static float zero = 0.0f;
16494   return zero / zero;
16495 }
16496 #else
16497 # define NaN() (0.0f / 0.0f)
16498 #endif
16499 #define NWORDS \
16500   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16501 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
16502 int main()
16503 {
16504   int result = 0;
16505
16506   if (isnanf (1.0f / 0.0f))
16507     result |= 1;
16508
16509   if (!isnanf (NaN ()))
16510     result |= 2;
16511
16512 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
16513   /* The isnanf function should be immune against changes in the sign bit and
16514      in the mantissa bits.  The xor operation twiddles a bit that can only be
16515      a sign bit or a mantissa bit.  */
16516   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
16517     {
16518       memory_float m;
16519
16520       m.value = NaN ();
16521       /* Set the bits below the exponent to 01111...111.  */
16522       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
16523       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
16524       if (!isnanf (m.value))
16525         result |= 4;
16526     }
16527 #endif
16528
16529   return result;
16530 }
16531 _ACEOF
16532 if ac_fn_c_try_run "$LINENO"; then :
16533   gl_cv_func_isnanf_works=yes
16534 else
16535   gl_cv_func_isnanf_works=no
16536 fi
16537 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16538   conftest.$ac_objext conftest.beam conftest.$ac_ext
16539 fi
16540
16541
16542 fi
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
16544 $as_echo "$gl_cv_func_isnanf_works" >&6; }
16545
16546     LIBS="$save_LIBS"
16547     case "$gl_cv_func_isnanf_works" in
16548       *yes) gl_func_isnanf=yes ;;
16549       *)    gl_func_isnanf=no; ISNANF_LIBM= ;;
16550     esac
16551   else
16552     gl_func_isnanf=no
16553   fi
16554   if test $gl_func_isnanf != yes; then
16555     HAVE_ISNANF=0
16556   fi
16557
16558
16559
16560
16561   ISNAND_LIBM=
16562
16563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
16564 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
16565 if ${gl_cv_func_isnand_no_libm+:} false; then :
16566   $as_echo_n "(cached) " >&6
16567 else
16568
16569       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570 /* end confdefs.h.  */
16571 #include <math.h>
16572              #if __GNUC__ >= 4
16573              # undef isnand
16574              # define isnand(x) __builtin_isnan ((double)(x))
16575              #else
16576              # undef isnand
16577              # define isnand(x) isnan ((double)(x))
16578              #endif
16579              double x;
16580 int
16581 main ()
16582 {
16583 return isnand (x);
16584   ;
16585   return 0;
16586 }
16587 _ACEOF
16588 if ac_fn_c_try_link "$LINENO"; then :
16589   gl_cv_func_isnand_no_libm=yes
16590 else
16591   gl_cv_func_isnand_no_libm=no
16592 fi
16593 rm -f core conftest.err conftest.$ac_objext \
16594     conftest$ac_exeext conftest.$ac_ext
16595
16596 fi
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
16598 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
16599
16600   if test $gl_cv_func_isnand_no_libm = no; then
16601
16602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5
16603 $as_echo_n "checking whether isnan(double) can be used with libm... " >&6; }
16604 if ${gl_cv_func_isnand_in_libm+:} false; then :
16605   $as_echo_n "(cached) " >&6
16606 else
16607
16608       save_LIBS="$LIBS"
16609       LIBS="$LIBS -lm"
16610       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16611 /* end confdefs.h.  */
16612 #include <math.h>
16613              #if __GNUC__ >= 4
16614              # undef isnand
16615              # define isnand(x) __builtin_isnan ((double)(x))
16616              #elif defined isnan
16617              # undef isnand
16618              # define isnand(x) isnan ((double)(x))
16619              #endif
16620              double x;
16621 int
16622 main ()
16623 {
16624 return isnand (x);
16625   ;
16626   return 0;
16627 }
16628 _ACEOF
16629 if ac_fn_c_try_link "$LINENO"; then :
16630   gl_cv_func_isnand_in_libm=yes
16631 else
16632   gl_cv_func_isnand_in_libm=no
16633 fi
16634 rm -f core conftest.err conftest.$ac_objext \
16635     conftest$ac_exeext conftest.$ac_ext
16636       LIBS="$save_LIBS"
16637
16638 fi
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5
16640 $as_echo "$gl_cv_func_isnand_in_libm" >&6; }
16641
16642     if test $gl_cv_func_isnand_in_libm = yes; then
16643       ISNAND_LIBM=-lm
16644     fi
16645   fi
16646     if test $gl_cv_func_isnand_no_libm = yes \
16647      || test $gl_cv_func_isnand_in_libm = yes; then
16648     gl_func_isnand=yes
16649   else
16650     gl_func_isnand=no
16651     HAVE_ISNAND=0
16652   fi
16653
16654
16655
16656
16657   ISNANL_LIBM=
16658
16659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
16660 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
16661 if ${gl_cv_func_isnanl_no_libm+:} false; then :
16662   $as_echo_n "(cached) " >&6
16663 else
16664
16665       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16666 /* end confdefs.h.  */
16667 #include <math.h>
16668              #if __GNUC__ >= 4
16669              # undef isnanl
16670              # define isnanl(x) __builtin_isnanl ((long double)(x))
16671              #elif defined isnan
16672              # undef isnanl
16673              # define isnanl(x) isnan ((long double)(x))
16674              #endif
16675              long double x;
16676 int
16677 main ()
16678 {
16679 return isnanl (x);
16680   ;
16681   return 0;
16682 }
16683 _ACEOF
16684 if ac_fn_c_try_link "$LINENO"; then :
16685   gl_cv_func_isnanl_no_libm=yes
16686 else
16687   gl_cv_func_isnanl_no_libm=no
16688 fi
16689 rm -f core conftest.err conftest.$ac_objext \
16690     conftest$ac_exeext conftest.$ac_ext
16691
16692 fi
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
16694 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
16695
16696   if test $gl_cv_func_isnanl_no_libm = no; then
16697
16698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5
16699 $as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; }
16700 if ${gl_cv_func_isnanl_in_libm+:} false; then :
16701   $as_echo_n "(cached) " >&6
16702 else
16703
16704       save_LIBS="$LIBS"
16705       LIBS="$LIBS -lm"
16706       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16707 /* end confdefs.h.  */
16708 #include <math.h>
16709              #if __GNUC__ >= 4
16710              # undef isnanl
16711              # define isnanl(x) __builtin_isnanl ((long double)(x))
16712              #elif defined isnan
16713              # undef isnanl
16714              # define isnanl(x) isnan ((long double)(x))
16715              #endif
16716              long double x;
16717 int
16718 main ()
16719 {
16720 return isnanl (x);
16721   ;
16722   return 0;
16723 }
16724 _ACEOF
16725 if ac_fn_c_try_link "$LINENO"; then :
16726   gl_cv_func_isnanl_in_libm=yes
16727 else
16728   gl_cv_func_isnanl_in_libm=no
16729 fi
16730 rm -f core conftest.err conftest.$ac_objext \
16731     conftest$ac_exeext conftest.$ac_ext
16732       LIBS="$save_LIBS"
16733
16734 fi
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5
16736 $as_echo "$gl_cv_func_isnanl_in_libm" >&6; }
16737
16738     if test $gl_cv_func_isnanl_in_libm = yes; then
16739       ISNANL_LIBM=-lm
16740     fi
16741   fi
16742     if test $gl_cv_func_isnanl_no_libm = yes \
16743      || test $gl_cv_func_isnanl_in_libm = yes; then
16744     save_LIBS="$LIBS"
16745     LIBS="$LIBS $ISNANL_LIBM"
16746
16747
16748
16749
16750      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
16751 $as_echo_n "checking whether isnanl works... " >&6; }
16752 if ${gl_cv_func_isnanl_works+:} false; then :
16753   $as_echo_n "(cached) " >&6
16754 else
16755
16756       if test "$cross_compiling" = yes; then :
16757   case "$host_os" in
16758            mingw*) # Guess yes on mingw, no on MSVC.
16759              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16760 /* end confdefs.h.  */
16761
16762 #ifdef __MINGW32__
16763  Known
16764 #endif
16765
16766 _ACEOF
16767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16768   $EGREP "Known" >/dev/null 2>&1; then :
16769   gl_cv_func_isnanl_works="guessing yes"
16770 else
16771   gl_cv_func_isnanl_works="guessing no"
16772 fi
16773 rm -f conftest*
16774
16775              ;;
16776            *) gl_cv_func_isnanl_works="guessing yes" ;;
16777          esac
16778
16779 else
16780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16781 /* end confdefs.h.  */
16782
16783 #include <float.h>
16784 #include <limits.h>
16785 #include <math.h>
16786 #if __GNUC__ >= 4
16787 # undef isnanl
16788 # define isnanl(x) __builtin_isnanl ((long double)(x))
16789 #elif defined isnan
16790 # undef isnanl
16791 # define isnanl(x) isnan ((long double)(x))
16792 #endif
16793 #define NWORDS \
16794   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16795 typedef union { unsigned int word[NWORDS]; long double value; }
16796         memory_long_double;
16797 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
16798    runtime type conversion.  */
16799 #ifdef __sgi
16800 static long double NaNl ()
16801 {
16802   double zero = 0.0;
16803   return zero / zero;
16804 }
16805 #else
16806 # define NaNl() (0.0L / 0.0L)
16807 #endif
16808 int main ()
16809 {
16810   int result = 0;
16811
16812   if (!isnanl (NaNl ()))
16813     result |= 1;
16814
16815   {
16816     memory_long_double m;
16817     unsigned int i;
16818
16819     /* The isnanl function should be immune against changes in the sign bit and
16820        in the mantissa bits.  The xor operation twiddles a bit that can only be
16821        a sign bit or a mantissa bit (since the exponent never extends to
16822        bit 31).  */
16823     m.value = NaNl ();
16824     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
16825     for (i = 0; i < NWORDS; i++)
16826       m.word[i] |= 1;
16827     if (!isnanl (m.value))
16828       result |= 1;
16829   }
16830
16831 #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
16832 /* Representation of an 80-bit 'long double' as an initializer for a sequence
16833    of 'unsigned int' words.  */
16834 # ifdef WORDS_BIGENDIAN
16835 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
16836      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
16837        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
16838        (unsigned int) (mantlo) << 16                                        \
16839      }
16840 # else
16841 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
16842      { mantlo, manthi, exponent }
16843 # endif
16844   { /* Quiet NaN.  */
16845     static memory_long_double x =
16846       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
16847     if (!isnanl (x.value))
16848       result |= 2;
16849   }
16850   {
16851     /* Signalling NaN.  */
16852     static memory_long_double x =
16853       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
16854     if (!isnanl (x.value))
16855       result |= 2;
16856   }
16857   /* isnanl should return something even for noncanonical values.  */
16858   { /* Pseudo-NaN.  */
16859     static memory_long_double x =
16860       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
16861     if (isnanl (x.value) && !isnanl (x.value))
16862       result |= 4;
16863   }
16864   { /* Pseudo-Infinity.  */
16865     static memory_long_double x =
16866       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
16867     if (isnanl (x.value) && !isnanl (x.value))
16868       result |= 8;
16869   }
16870   { /* Pseudo-Zero.  */
16871     static memory_long_double x =
16872       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
16873     if (isnanl (x.value) && !isnanl (x.value))
16874       result |= 16;
16875   }
16876   { /* Unnormalized number.  */
16877     static memory_long_double x =
16878       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
16879     if (isnanl (x.value) && !isnanl (x.value))
16880       result |= 32;
16881   }
16882   { /* Pseudo-Denormal.  */
16883     static memory_long_double x =
16884       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
16885     if (isnanl (x.value) && !isnanl (x.value))
16886       result |= 64;
16887   }
16888 #endif
16889
16890   return result;
16891 }
16892 _ACEOF
16893 if ac_fn_c_try_run "$LINENO"; then :
16894   gl_cv_func_isnanl_works=yes
16895 else
16896   gl_cv_func_isnanl_works=no
16897 fi
16898 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16899   conftest.$ac_objext conftest.beam conftest.$ac_ext
16900 fi
16901
16902
16903 fi
16904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
16905 $as_echo "$gl_cv_func_isnanl_works" >&6; }
16906
16907     LIBS="$save_LIBS"
16908     case "$gl_cv_func_isnanl_works" in
16909       *yes) gl_func_isnanl=yes ;;
16910       *)    gl_func_isnanl=no; ISNANL_LIBM= ;;
16911     esac
16912   else
16913     gl_func_isnanl=no
16914   fi
16915   if test $gl_func_isnanl != yes; then
16916     HAVE_ISNANL=0
16917   fi
16918
16919
16920
16921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
16922 $as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
16923 if ${gl_cv_func_ldexp_no_libm+:} false; then :
16924   $as_echo_n "(cached) " >&6
16925 else
16926
16927       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16928 /* end confdefs.h.  */
16929 #ifndef __NO_MATH_INLINES
16930                            # define __NO_MATH_INLINES 1 /* for glibc */
16931                            #endif
16932                            #include <math.h>
16933                            double (*funcptr) (double, int) = ldexp;
16934                            double x;
16935 int
16936 main ()
16937 {
16938 return ldexp (x, -1) > 0;
16939   ;
16940   return 0;
16941 }
16942 _ACEOF
16943 if ac_fn_c_try_link "$LINENO"; then :
16944   gl_cv_func_ldexp_no_libm=yes
16945 else
16946   gl_cv_func_ldexp_no_libm=no
16947 fi
16948 rm -f core conftest.err conftest.$ac_objext \
16949     conftest$ac_exeext conftest.$ac_ext
16950
16951 fi
16952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
16953 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
16954
16955
16956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16957 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16958 if ${am_cv_langinfo_codeset+:} false; then :
16959   $as_echo_n "(cached) " >&6
16960 else
16961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16962 /* end confdefs.h.  */
16963 #include <langinfo.h>
16964 int
16965 main ()
16966 {
16967 char* cs = nl_langinfo(CODESET); return !cs;
16968   ;
16969   return 0;
16970 }
16971 _ACEOF
16972 if ac_fn_c_try_link "$LINENO"; then :
16973   am_cv_langinfo_codeset=yes
16974 else
16975   am_cv_langinfo_codeset=no
16976 fi
16977 rm -f core conftest.err conftest.$ac_objext \
16978     conftest$ac_exeext conftest.$ac_ext
16979
16980 fi
16981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
16982 $as_echo "$am_cv_langinfo_codeset" >&6; }
16983   if test $am_cv_langinfo_codeset = yes; then
16984
16985 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
16986
16987   fi
16988
16989 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
16990 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
16991   ac_have_decl=1
16992 else
16993   ac_have_decl=0
16994 fi
16995
16996 cat >>confdefs.h <<_ACEOF
16997 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
16998 _ACEOF
16999
17000
17001     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
17002 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
17003 if ${ac_cv_gnu_library_2_1+:} false; then :
17004   $as_echo_n "(cached) " >&6
17005 else
17006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17007 /* end confdefs.h.  */
17008
17009 #include <features.h>
17010 #ifdef __GNU_LIBRARY__
17011  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
17012   Lucky GNU user
17013  #endif
17014 #endif
17015 #ifdef __UCLIBC__
17016  Lucky user
17017 #endif
17018
17019 _ACEOF
17020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17021   $EGREP "Lucky" >/dev/null 2>&1; then :
17022   ac_cv_gnu_library_2_1=yes
17023 else
17024   ac_cv_gnu_library_2_1=no
17025 fi
17026 rm -f conftest*
17027
17028
17029
17030 fi
17031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
17032 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
17033
17034     GLIBC21="$ac_cv_gnu_library_2_1"
17035
17036
17037
17038       if test "X$prefix" = "XNONE"; then
17039     acl_final_prefix="$ac_default_prefix"
17040   else
17041     acl_final_prefix="$prefix"
17042   fi
17043   if test "X$exec_prefix" = "XNONE"; then
17044     acl_final_exec_prefix='${prefix}'
17045   else
17046     acl_final_exec_prefix="$exec_prefix"
17047   fi
17048   acl_save_prefix="$prefix"
17049   prefix="$acl_final_prefix"
17050   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
17051   prefix="$acl_save_prefix"
17052
17053
17054
17055 # Check whether --with-gnu-ld was given.
17056 if test "${with_gnu_ld+set}" = set; then :
17057   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
17058 else
17059   with_gnu_ld=no
17060 fi
17061
17062 # Prepare PATH_SEPARATOR.
17063 # The user is always right.
17064 if test "${PATH_SEPARATOR+set}" != set; then
17065   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
17066   # contains only /bin. Note that ksh looks also at the FPATH variable,
17067   # so we have to set that as well for the test.
17068   PATH_SEPARATOR=:
17069   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17070     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
17071            || PATH_SEPARATOR=';'
17072        }
17073 fi
17074
17075 if test -n "$LD"; then
17076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
17077 $as_echo_n "checking for ld... " >&6; }
17078 elif test "$GCC" = yes; then
17079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17080 $as_echo_n "checking for ld used by $CC... " >&6; }
17081 elif test "$with_gnu_ld" = yes; then
17082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17083 $as_echo_n "checking for GNU ld... " >&6; }
17084 else
17085   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17086 $as_echo_n "checking for non-GNU ld... " >&6; }
17087 fi
17088 if test -n "$LD"; then
17089   # Let the user override the test with a path.
17090   :
17091 else
17092   if ${acl_cv_path_LD+:} false; then :
17093   $as_echo_n "(cached) " >&6
17094 else
17095
17096     acl_cv_path_LD= # Final result of this test
17097     ac_prog=ld # Program to search in $PATH
17098     if test "$GCC" = yes; then
17099       # Check if gcc -print-prog-name=ld gives a path.
17100       case $host in
17101         *-*-mingw*)
17102           # gcc leaves a trailing carriage return which upsets mingw
17103           acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17104         *)
17105           acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
17106       esac
17107       case $acl_output in
17108         # Accept absolute paths.
17109         [\\/]* | ?:[\\/]*)
17110           re_direlt='/[^/][^/]*/\.\./'
17111           # Canonicalize the pathname of ld
17112           acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
17113           while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
17114             acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
17115           done
17116           # Got the pathname. No search in PATH is needed.
17117           acl_cv_path_LD="$acl_output"
17118           ac_prog=
17119           ;;
17120         "")
17121           # If it fails, then pretend we aren't using GCC.
17122           ;;
17123         *)
17124           # If it is relative, then search for the first ld in PATH.
17125           with_gnu_ld=unknown
17126           ;;
17127       esac
17128     fi
17129     if test -n "$ac_prog"; then
17130       # Search for $ac_prog in $PATH.
17131       acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
17132       for ac_dir in $PATH; do
17133         IFS="$acl_save_ifs"
17134         test -z "$ac_dir" && ac_dir=.
17135         if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17136           acl_cv_path_LD="$ac_dir/$ac_prog"
17137           # Check to see if the program is GNU ld.  I'd rather use --version,
17138           # but apparently some variants of GNU ld only accept -v.
17139           # Break only if it was the GNU/non-GNU ld that we prefer.
17140           case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
17141             *GNU* | *'with BFD'*)
17142               test "$with_gnu_ld" != no && break
17143               ;;
17144             *)
17145               test "$with_gnu_ld" != yes && break
17146               ;;
17147           esac
17148         fi
17149       done
17150       IFS="$acl_save_ifs"
17151     fi
17152     case $host in
17153       *-*-aix*)
17154         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17155 /* end confdefs.h.  */
17156 #if defined __powerpc64__ || defined _ARCH_PPC64
17157                 int ok;
17158                #else
17159                 error fail
17160                #endif
17161
17162 _ACEOF
17163 if ac_fn_c_try_compile "$LINENO"; then :
17164   # The compiler produces 64-bit code. Add option '-b64' so that the
17165            # linker groks 64-bit object files.
17166            case "$acl_cv_path_LD " in
17167              *" -b64 "*) ;;
17168              *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
17169            esac
17170
17171 fi
17172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17173         ;;
17174       sparc64-*-netbsd*)
17175         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17176 /* end confdefs.h.  */
17177 #if defined __sparcv9 || defined __arch64__
17178                 int ok;
17179                #else
17180                 error fail
17181                #endif
17182
17183 _ACEOF
17184 if ac_fn_c_try_compile "$LINENO"; then :
17185
17186 else
17187   # The compiler produces 32-bit code. Add option '-m elf32_sparc'
17188            # so that the linker groks 32-bit object files.
17189            case "$acl_cv_path_LD " in
17190              *" -m elf32_sparc "*) ;;
17191              *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
17192            esac
17193
17194 fi
17195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17196         ;;
17197     esac
17198
17199 fi
17200
17201   LD="$acl_cv_path_LD"
17202 fi
17203 if test -n "$LD"; then
17204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17205 $as_echo "$LD" >&6; }
17206 else
17207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17208 $as_echo "no" >&6; }
17209   as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
17210 fi
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17212 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
17213 if ${acl_cv_prog_gnu_ld+:} false; then :
17214   $as_echo_n "(cached) " >&6
17215 else
17216   # I'd rather use --version here, but apparently some GNU lds only accept -v.
17217 case `$LD -v 2>&1 </dev/null` in
17218 *GNU* | *'with BFD'*)
17219   acl_cv_prog_gnu_ld=yes
17220   ;;
17221 *)
17222   acl_cv_prog_gnu_ld=no
17223   ;;
17224 esac
17225 fi
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
17227 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
17228 with_gnu_ld=$acl_cv_prog_gnu_ld
17229
17230
17231
17232
17233                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
17234 $as_echo_n "checking for shared library run path origin... " >&6; }
17235 if ${acl_cv_rpath+:} false; then :
17236   $as_echo_n "(cached) " >&6
17237 else
17238
17239     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
17240     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
17241     . ./conftest.sh
17242     rm -f ./conftest.sh
17243     acl_cv_rpath=done
17244
17245 fi
17246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
17247 $as_echo "$acl_cv_rpath" >&6; }
17248   wl="$acl_cv_wl"
17249   acl_libext="$acl_cv_libext"
17250   acl_shlibext="$acl_cv_shlibext"
17251   acl_libname_spec="$acl_cv_libname_spec"
17252   acl_library_names_spec="$acl_cv_library_names_spec"
17253   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
17254   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
17255   acl_hardcode_direct="$acl_cv_hardcode_direct"
17256   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
17257     # Check whether --enable-rpath was given.
17258 if test "${enable_rpath+set}" = set; then :
17259   enableval=$enable_rpath; :
17260 else
17261   enable_rpath=yes
17262 fi
17263
17264
17265
17266
17267
17268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
17269 $as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
17270 if ${acl_cv_libdirstems+:} false; then :
17271   $as_echo_n "(cached) " >&6
17272 else
17273   acl_libdirstem=lib
17274      acl_libdirstem2=
17275      case "$host_os" in
17276        solaris*)
17277                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
17278 $as_echo_n "checking for 64-bit host... " >&6; }
17279 if ${gl_cv_solaris_64bit+:} false; then :
17280   $as_echo_n "(cached) " >&6
17281 else
17282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283 /* end confdefs.h.  */
17284 #ifdef _LP64
17285                     int ok;
17286                    #else
17287                     error fail
17288                    #endif
17289
17290 _ACEOF
17291 if ac_fn_c_try_compile "$LINENO"; then :
17292   gl_cv_solaris_64bit=yes
17293 else
17294   gl_cv_solaris_64bit=no
17295 fi
17296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17297
17298 fi
17299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
17300 $as_echo "$gl_cv_solaris_64bit" >&6; }
17301          if test $gl_cv_solaris_64bit = yes; then
17302            acl_libdirstem=lib/64
17303            case "$host_cpu" in
17304              sparc*)        acl_libdirstem2=lib/sparcv9 ;;
17305              i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
17306            esac
17307          fi
17308          ;;
17309        *)
17310                            case "$gl_cv_host_cpu_c_abi" in
17311            i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
17312              ;;
17313            *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
17314                                                     searchpath=`(if test -f /usr/bin/gcc \
17315                              && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
17316                             LC_ALL=C /usr/bin/gcc -print-search-dirs; \
17317                           else \
17318                             LC_ALL=C $CC -print-search-dirs; \
17319                           fi) 2>/dev/null \
17320                          | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
17321              if test -n "$searchpath"; then
17322                acl_save_IFS="${IFS=     }"; IFS=":"
17323                for searchdir in $searchpath; do
17324                  if test -d "$searchdir"; then
17325                    case "$searchdir" in
17326                      */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
17327                      */../ | */.. )
17328                        # Better ignore directories of this form. They are misleading.
17329                        ;;
17330                      *) searchdir=`cd "$searchdir" && pwd`
17331                         case "$searchdir" in
17332                           */lib64 ) acl_libdirstem=lib64 ;;
17333                         esac ;;
17334                    esac
17335                  fi
17336                done
17337                IFS="$acl_save_IFS"
17338              fi
17339              ;;
17340          esac
17341          ;;
17342      esac
17343      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
17344      acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
17345
17346 fi
17347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
17348 $as_echo "$acl_cv_libdirstems" >&6; }
17349   # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
17350   acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
17351   acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
17352
17353
17354
17355   gl_threads_api=none
17356   LIBTHREAD=
17357   LTLIBTHREAD=
17358   LIBMULTITHREAD=
17359   LTLIBMULTITHREAD=
17360   if test "$gl_use_threads" != no; then
17361         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
17362 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
17363 if ${gl_cv_have_weak+:} false; then :
17364   $as_echo_n "(cached) " >&6
17365 else
17366   gl_cv_have_weak=no
17367               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17368 /* end confdefs.h.  */
17369 extern void xyzzy ();
17370 #pragma weak xyzzy
17371 int
17372 main ()
17373 {
17374 xyzzy();
17375   ;
17376   return 0;
17377 }
17378 _ACEOF
17379 if ac_fn_c_try_link "$LINENO"; then :
17380   gl_cv_have_weak=maybe
17381 fi
17382 rm -f core conftest.err conftest.$ac_objext \
17383     conftest$ac_exeext conftest.$ac_ext
17384        if test $gl_cv_have_weak = maybe; then
17385                            if test "$cross_compiling" = yes; then :
17386                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17387 /* end confdefs.h.  */
17388 #ifdef __ELF__
17389                Extensible Linking Format
17390                #endif
17391
17392 _ACEOF
17393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17394   $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
17395   gl_cv_have_weak="guessing yes"
17396 else
17397   gl_cv_have_weak="guessing no"
17398 fi
17399 rm -f conftest*
17400
17401
17402 else
17403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17404 /* end confdefs.h.  */
17405
17406 #include <stdio.h>
17407 #pragma weak fputs
17408 int main ()
17409 {
17410   return (fputs == NULL);
17411 }
17412 _ACEOF
17413 if ac_fn_c_try_run "$LINENO"; then :
17414   gl_cv_have_weak=yes
17415 else
17416   gl_cv_have_weak=no
17417 fi
17418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17419   conftest.$ac_objext conftest.beam conftest.$ac_ext
17420 fi
17421
17422        fi
17423               case " $LDFLAGS " in
17424          *" -static "*) gl_cv_have_weak=no ;;
17425        esac
17426
17427 fi
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
17429 $as_echo "$gl_cv_have_weak" >&6; }
17430     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
17431       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
17432       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
17433       ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
17434 if test "x$ac_cv_header_pthread_h" = xyes; then :
17435   gl_have_pthread_h=yes
17436 else
17437   gl_have_pthread_h=no
17438 fi
17439
17440
17441       if test "$gl_have_pthread_h" = yes; then
17442         # Other possible tests:
17443         #   -lpthreads (FSU threads, PCthreads)
17444         #   -lgthreads
17445         gl_have_pthread=
17446         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
17447         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
17448         # the second one only in libpthread, and lock.c needs it.
17449         #
17450         # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
17451         # needs -pthread for some reason.  See:
17452         # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
17453         save_LIBS=$LIBS
17454         for gl_pthread in '' '-pthread'; do
17455           LIBS="$LIBS $gl_pthread"
17456           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17457 /* end confdefs.h.  */
17458 #include <pthread.h>
17459                  pthread_mutex_t m;
17460                  pthread_mutexattr_t ma;
17461
17462 int
17463 main ()
17464 {
17465 pthread_mutex_lock (&m);
17466                  pthread_mutexattr_init (&ma);
17467   ;
17468   return 0;
17469 }
17470 _ACEOF
17471 if ac_fn_c_try_link "$LINENO"; then :
17472   gl_have_pthread=yes
17473              LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
17474              LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
17475 fi
17476 rm -f core conftest.err conftest.$ac_objext \
17477     conftest$ac_exeext conftest.$ac_ext
17478           LIBS=$save_LIBS
17479           test -n "$gl_have_pthread" && break
17480         done
17481
17482         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
17483         # since it is defined as a macro on OSF/1.)
17484         if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
17485           # The program links fine without libpthread. But it may actually
17486           # need to link with libpthread in order to create multiple threads.
17487           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17488 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17489 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17490   $as_echo_n "(cached) " >&6
17491 else
17492   ac_check_lib_save_LIBS=$LIBS
17493 LIBS="-lpthread  $LIBS"
17494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17495 /* end confdefs.h.  */
17496
17497 /* Override any GCC internal prototype to avoid an error.
17498    Use char because int might match the return type of a GCC
17499    builtin and then its argument prototype would still apply.  */
17500 #ifdef __cplusplus
17501 extern "C"
17502 #endif
17503 char pthread_kill ();
17504 int
17505 main ()
17506 {
17507 return pthread_kill ();
17508   ;
17509   return 0;
17510 }
17511 _ACEOF
17512 if ac_fn_c_try_link "$LINENO"; then :
17513   ac_cv_lib_pthread_pthread_kill=yes
17514 else
17515   ac_cv_lib_pthread_pthread_kill=no
17516 fi
17517 rm -f core conftest.err conftest.$ac_objext \
17518     conftest$ac_exeext conftest.$ac_ext
17519 LIBS=$ac_check_lib_save_LIBS
17520 fi
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17522 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17523 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17524   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
17525              # On Solaris and HP-UX, most pthread functions exist also in libc.
17526              # Therefore pthread_in_use() needs to actually try to create a
17527              # thread: pthread_create from libc will fail, whereas
17528              # pthread_create will actually create a thread.
17529              # On Solaris 10 or newer, this test is no longer needed, because
17530              # libc contains the fully functional pthread functions.
17531              case "$host_os" in
17532                solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
17533
17534 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
17535
17536              esac
17537
17538 fi
17539
17540         elif test -z "$gl_have_pthread"; then
17541           # Some library is needed. Try libpthread and libc_r.
17542           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
17543 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
17544 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
17545   $as_echo_n "(cached) " >&6
17546 else
17547   ac_check_lib_save_LIBS=$LIBS
17548 LIBS="-lpthread  $LIBS"
17549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17550 /* end confdefs.h.  */
17551
17552 /* Override any GCC internal prototype to avoid an error.
17553    Use char because int might match the return type of a GCC
17554    builtin and then its argument prototype would still apply.  */
17555 #ifdef __cplusplus
17556 extern "C"
17557 #endif
17558 char pthread_kill ();
17559 int
17560 main ()
17561 {
17562 return pthread_kill ();
17563   ;
17564   return 0;
17565 }
17566 _ACEOF
17567 if ac_fn_c_try_link "$LINENO"; then :
17568   ac_cv_lib_pthread_pthread_kill=yes
17569 else
17570   ac_cv_lib_pthread_pthread_kill=no
17571 fi
17572 rm -f core conftest.err conftest.$ac_objext \
17573     conftest$ac_exeext conftest.$ac_ext
17574 LIBS=$ac_check_lib_save_LIBS
17575 fi
17576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
17577 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
17578 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
17579   gl_have_pthread=yes
17580              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
17581              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
17582 fi
17583
17584           if test -z "$gl_have_pthread"; then
17585             # For FreeBSD 4.
17586             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
17587 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
17588 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
17589   $as_echo_n "(cached) " >&6
17590 else
17591   ac_check_lib_save_LIBS=$LIBS
17592 LIBS="-lc_r  $LIBS"
17593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594 /* end confdefs.h.  */
17595
17596 /* Override any GCC internal prototype to avoid an error.
17597    Use char because int might match the return type of a GCC
17598    builtin and then its argument prototype would still apply.  */
17599 #ifdef __cplusplus
17600 extern "C"
17601 #endif
17602 char pthread_kill ();
17603 int
17604 main ()
17605 {
17606 return pthread_kill ();
17607   ;
17608   return 0;
17609 }
17610 _ACEOF
17611 if ac_fn_c_try_link "$LINENO"; then :
17612   ac_cv_lib_c_r_pthread_kill=yes
17613 else
17614   ac_cv_lib_c_r_pthread_kill=no
17615 fi
17616 rm -f core conftest.err conftest.$ac_objext \
17617     conftest$ac_exeext conftest.$ac_ext
17618 LIBS=$ac_check_lib_save_LIBS
17619 fi
17620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
17621 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
17622 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
17623   gl_have_pthread=yes
17624                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
17625                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
17626 fi
17627
17628           fi
17629         fi
17630         if test -n "$gl_have_pthread"; then
17631           gl_threads_api=posix
17632
17633 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
17634
17635           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
17636             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17637
17638 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
17639
17640               LIBTHREAD=
17641               LTLIBTHREAD=
17642             fi
17643           fi
17644         fi
17645       fi
17646     fi
17647     if test -z "$gl_have_pthread"; then
17648       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
17649         gl_have_solaristhread=
17650         gl_save_LIBS="$LIBS"
17651         LIBS="$LIBS -lthread"
17652         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17653 /* end confdefs.h.  */
17654
17655 #include <thread.h>
17656 #include <synch.h>
17657
17658 int
17659 main ()
17660 {
17661 thr_self();
17662   ;
17663   return 0;
17664 }
17665 _ACEOF
17666 if ac_fn_c_try_link "$LINENO"; then :
17667   gl_have_solaristhread=yes
17668 fi
17669 rm -f core conftest.err conftest.$ac_objext \
17670     conftest$ac_exeext conftest.$ac_ext
17671         LIBS="$gl_save_LIBS"
17672         if test -n "$gl_have_solaristhread"; then
17673           gl_threads_api=solaris
17674           LIBTHREAD=-lthread
17675           LTLIBTHREAD=-lthread
17676           LIBMULTITHREAD="$LIBTHREAD"
17677           LTLIBMULTITHREAD="$LTLIBTHREAD"
17678
17679 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
17680
17681           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
17682
17683 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
17684
17685             LIBTHREAD=
17686             LTLIBTHREAD=
17687           fi
17688         fi
17689       fi
17690     fi
17691     if test "$gl_use_threads" = pth; then
17692       gl_save_CPPFLAGS="$CPPFLAGS"
17693
17694
17695
17696
17697
17698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
17699 $as_echo_n "checking how to link with libpth... " >&6; }
17700 if ${ac_cv_libpth_libs+:} false; then :
17701   $as_echo_n "(cached) " >&6
17702 else
17703
17704
17705
17706
17707
17708
17709
17710
17711     use_additional=yes
17712
17713   acl_save_prefix="$prefix"
17714   prefix="$acl_final_prefix"
17715   acl_save_exec_prefix="$exec_prefix"
17716   exec_prefix="$acl_final_exec_prefix"
17717
17718     eval additional_includedir=\"$includedir\"
17719     eval additional_libdir=\"$libdir\"
17720
17721   exec_prefix="$acl_save_exec_prefix"
17722   prefix="$acl_save_prefix"
17723
17724
17725 # Check whether --with-libpth-prefix was given.
17726 if test "${with_libpth_prefix+set}" = set; then :
17727   withval=$with_libpth_prefix;
17728     if test "X$withval" = "Xno"; then
17729       use_additional=no
17730     else
17731       if test "X$withval" = "X"; then
17732
17733   acl_save_prefix="$prefix"
17734   prefix="$acl_final_prefix"
17735   acl_save_exec_prefix="$exec_prefix"
17736   exec_prefix="$acl_final_exec_prefix"
17737
17738           eval additional_includedir=\"$includedir\"
17739           eval additional_libdir=\"$libdir\"
17740
17741   exec_prefix="$acl_save_exec_prefix"
17742   prefix="$acl_save_prefix"
17743
17744       else
17745         additional_includedir="$withval/include"
17746         additional_libdir="$withval/$acl_libdirstem"
17747         if test "$acl_libdirstem2" != "$acl_libdirstem" \
17748            && test ! -d "$withval/$acl_libdirstem"; then
17749           additional_libdir="$withval/$acl_libdirstem2"
17750         fi
17751       fi
17752     fi
17753
17754 fi
17755
17756       LIBPTH=
17757   LTLIBPTH=
17758   INCPTH=
17759   LIBPTH_PREFIX=
17760       HAVE_LIBPTH=
17761   rpathdirs=
17762   ltrpathdirs=
17763   names_already_handled=
17764   names_next_round='pth '
17765   while test -n "$names_next_round"; do
17766     names_this_round="$names_next_round"
17767     names_next_round=
17768     for name in $names_this_round; do
17769       already_handled=
17770       for n in $names_already_handled; do
17771         if test "$n" = "$name"; then
17772           already_handled=yes
17773           break
17774         fi
17775       done
17776       if test -z "$already_handled"; then
17777         names_already_handled="$names_already_handled $name"
17778                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
17779         eval value=\"\$HAVE_LIB$uppername\"
17780         if test -n "$value"; then
17781           if test "$value" = yes; then
17782             eval value=\"\$LIB$uppername\"
17783             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
17784             eval value=\"\$LTLIB$uppername\"
17785             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
17786           else
17787                                     :
17788           fi
17789         else
17790                               found_dir=
17791           found_la=
17792           found_so=
17793           found_a=
17794           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
17795           if test -n "$acl_shlibext"; then
17796             shrext=".$acl_shlibext"             # typically: shrext=.so
17797           else
17798             shrext=
17799           fi
17800           if test $use_additional = yes; then
17801             dir="$additional_libdir"
17802                                     if test -n "$acl_shlibext"; then
17803               if test -f "$dir/$libname$shrext"; then
17804                 found_dir="$dir"
17805                 found_so="$dir/$libname$shrext"
17806               else
17807                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17808                   ver=`(cd "$dir" && \
17809                         for f in "$libname$shrext".*; do echo "$f"; done \
17810                         | sed -e "s,^$libname$shrext\\\\.,," \
17811                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17812                         | sed 1q ) 2>/dev/null`
17813                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17814                     found_dir="$dir"
17815                     found_so="$dir/$libname$shrext.$ver"
17816                   fi
17817                 else
17818                   eval library_names=\"$acl_library_names_spec\"
17819                   for f in $library_names; do
17820                     if test -f "$dir/$f"; then
17821                       found_dir="$dir"
17822                       found_so="$dir/$f"
17823                       break
17824                     fi
17825                   done
17826                 fi
17827               fi
17828             fi
17829                         if test "X$found_dir" = "X"; then
17830               if test -f "$dir/$libname.$acl_libext"; then
17831                 found_dir="$dir"
17832                 found_a="$dir/$libname.$acl_libext"
17833               fi
17834             fi
17835             if test "X$found_dir" != "X"; then
17836               if test -f "$dir/$libname.la"; then
17837                 found_la="$dir/$libname.la"
17838               fi
17839             fi
17840           fi
17841           if test "X$found_dir" = "X"; then
17842             for x in $LDFLAGS $LTLIBPTH; do
17843
17844   acl_save_prefix="$prefix"
17845   prefix="$acl_final_prefix"
17846   acl_save_exec_prefix="$exec_prefix"
17847   exec_prefix="$acl_final_exec_prefix"
17848   eval x=\"$x\"
17849   exec_prefix="$acl_save_exec_prefix"
17850   prefix="$acl_save_prefix"
17851
17852               case "$x" in
17853                 -L*)
17854                   dir=`echo "X$x" | sed -e 's/^X-L//'`
17855                                     if test -n "$acl_shlibext"; then
17856                     if test -f "$dir/$libname$shrext"; then
17857                       found_dir="$dir"
17858                       found_so="$dir/$libname$shrext"
17859                     else
17860                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
17861                         ver=`(cd "$dir" && \
17862                               for f in "$libname$shrext".*; do echo "$f"; done \
17863                               | sed -e "s,^$libname$shrext\\\\.,," \
17864                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
17865                               | sed 1q ) 2>/dev/null`
17866                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
17867                           found_dir="$dir"
17868                           found_so="$dir/$libname$shrext.$ver"
17869                         fi
17870                       else
17871                         eval library_names=\"$acl_library_names_spec\"
17872                         for f in $library_names; do
17873                           if test -f "$dir/$f"; then
17874                             found_dir="$dir"
17875                             found_so="$dir/$f"
17876                             break
17877                           fi
17878                         done
17879                       fi
17880                     fi
17881                   fi
17882                                     if test "X$found_dir" = "X"; then
17883                     if test -f "$dir/$libname.$acl_libext"; then
17884                       found_dir="$dir"
17885                       found_a="$dir/$libname.$acl_libext"
17886                     fi
17887                   fi
17888                   if test "X$found_dir" != "X"; then
17889                     if test -f "$dir/$libname.la"; then
17890                       found_la="$dir/$libname.la"
17891                     fi
17892                   fi
17893                   ;;
17894               esac
17895               if test "X$found_dir" != "X"; then
17896                 break
17897               fi
17898             done
17899           fi
17900           if test "X$found_dir" != "X"; then
17901                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
17902             if test "X$found_so" != "X"; then
17903                                                         if test "$enable_rpath" = no \
17904                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
17905                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
17906                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17907               else
17908                                                                                 haveit=
17909                 for x in $ltrpathdirs; do
17910                   if test "X$x" = "X$found_dir"; then
17911                     haveit=yes
17912                     break
17913                   fi
17914                 done
17915                 if test -z "$haveit"; then
17916                   ltrpathdirs="$ltrpathdirs $found_dir"
17917                 fi
17918                                 if test "$acl_hardcode_direct" = yes; then
17919                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17920                 else
17921                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
17922                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17923                                                             haveit=
17924                     for x in $rpathdirs; do
17925                       if test "X$x" = "X$found_dir"; then
17926                         haveit=yes
17927                         break
17928                       fi
17929                     done
17930                     if test -z "$haveit"; then
17931                       rpathdirs="$rpathdirs $found_dir"
17932                     fi
17933                   else
17934                                                                                 haveit=
17935                     for x in $LDFLAGS $LIBPTH; do
17936
17937   acl_save_prefix="$prefix"
17938   prefix="$acl_final_prefix"
17939   acl_save_exec_prefix="$exec_prefix"
17940   exec_prefix="$acl_final_exec_prefix"
17941   eval x=\"$x\"
17942   exec_prefix="$acl_save_exec_prefix"
17943   prefix="$acl_save_prefix"
17944
17945                       if test "X$x" = "X-L$found_dir"; then
17946                         haveit=yes
17947                         break
17948                       fi
17949                     done
17950                     if test -z "$haveit"; then
17951                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
17952                     fi
17953                     if test "$acl_hardcode_minus_L" != no; then
17954                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
17955                     else
17956                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
17957                     fi
17958                   fi
17959                 fi
17960               fi
17961             else
17962               if test "X$found_a" != "X"; then
17963                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
17964               else
17965                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
17966               fi
17967             fi
17968                         additional_includedir=
17969             case "$found_dir" in
17970               */$acl_libdirstem | */$acl_libdirstem/)
17971                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
17972                 if test "$name" = 'pth'; then
17973                   LIBPTH_PREFIX="$basedir"
17974                 fi
17975                 additional_includedir="$basedir/include"
17976                 ;;
17977               */$acl_libdirstem2 | */$acl_libdirstem2/)
17978                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
17979                 if test "$name" = 'pth'; then
17980                   LIBPTH_PREFIX="$basedir"
17981                 fi
17982                 additional_includedir="$basedir/include"
17983                 ;;
17984             esac
17985             if test "X$additional_includedir" != "X"; then
17986                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
17987                 haveit=
17988                 if test "X$additional_includedir" = "X/usr/local/include"; then
17989                   if test -n "$GCC"; then
17990                     case $host_os in
17991                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
17992                     esac
17993                   fi
17994                 fi
17995                 if test -z "$haveit"; then
17996                   for x in $CPPFLAGS $INCPTH; do
17997
17998   acl_save_prefix="$prefix"
17999   prefix="$acl_final_prefix"
18000   acl_save_exec_prefix="$exec_prefix"
18001   exec_prefix="$acl_final_exec_prefix"
18002   eval x=\"$x\"
18003   exec_prefix="$acl_save_exec_prefix"
18004   prefix="$acl_save_prefix"
18005
18006                     if test "X$x" = "X-I$additional_includedir"; then
18007                       haveit=yes
18008                       break
18009                     fi
18010                   done
18011                   if test -z "$haveit"; then
18012                     if test -d "$additional_includedir"; then
18013                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
18014                     fi
18015                   fi
18016                 fi
18017               fi
18018             fi
18019                         if test -n "$found_la"; then
18020                                                         save_libdir="$libdir"
18021               case "$found_la" in
18022                 */* | *\\*) . "$found_la" ;;
18023                 *) . "./$found_la" ;;
18024               esac
18025               libdir="$save_libdir"
18026                             for dep in $dependency_libs; do
18027                 case "$dep" in
18028                   -L*)
18029                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18030                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
18031                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
18032                       haveit=
18033                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
18034                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
18035                         if test -n "$GCC"; then
18036                           case $host_os in
18037                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
18038                           esac
18039                         fi
18040                       fi
18041                       if test -z "$haveit"; then
18042                         haveit=
18043                         for x in $LDFLAGS $LIBPTH; do
18044
18045   acl_save_prefix="$prefix"
18046   prefix="$acl_final_prefix"
18047   acl_save_exec_prefix="$exec_prefix"
18048   exec_prefix="$acl_final_exec_prefix"
18049   eval x=\"$x\"
18050   exec_prefix="$acl_save_exec_prefix"
18051   prefix="$acl_save_prefix"
18052
18053                           if test "X$x" = "X-L$additional_libdir"; then
18054                             haveit=yes
18055                             break
18056                           fi
18057                         done
18058                         if test -z "$haveit"; then
18059                           if test -d "$additional_libdir"; then
18060                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
18061                           fi
18062                         fi
18063                         haveit=
18064                         for x in $LDFLAGS $LTLIBPTH; do
18065
18066   acl_save_prefix="$prefix"
18067   prefix="$acl_final_prefix"
18068   acl_save_exec_prefix="$exec_prefix"
18069   exec_prefix="$acl_final_exec_prefix"
18070   eval x=\"$x\"
18071   exec_prefix="$acl_save_exec_prefix"
18072   prefix="$acl_save_prefix"
18073
18074                           if test "X$x" = "X-L$additional_libdir"; then
18075                             haveit=yes
18076                             break
18077                           fi
18078                         done
18079                         if test -z "$haveit"; then
18080                           if test -d "$additional_libdir"; then
18081                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
18082                           fi
18083                         fi
18084                       fi
18085                     fi
18086                     ;;
18087                   -R*)
18088                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
18089                     if test "$enable_rpath" != no; then
18090                                                                   haveit=
18091                       for x in $rpathdirs; do
18092                         if test "X$x" = "X$dir"; then
18093                           haveit=yes
18094                           break
18095                         fi
18096                       done
18097                       if test -z "$haveit"; then
18098                         rpathdirs="$rpathdirs $dir"
18099                       fi
18100                                                                   haveit=
18101                       for x in $ltrpathdirs; do
18102                         if test "X$x" = "X$dir"; then
18103                           haveit=yes
18104                           break
18105                         fi
18106                       done
18107                       if test -z "$haveit"; then
18108                         ltrpathdirs="$ltrpathdirs $dir"
18109                       fi
18110                     fi
18111                     ;;
18112                   -l*)
18113                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18114                     ;;
18115                   *.la)
18116                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18117                     ;;
18118                   *)
18119                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
18120                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
18121                     ;;
18122                 esac
18123               done
18124             fi
18125           else
18126                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
18127             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
18128           fi
18129         fi
18130       fi
18131     done
18132   done
18133   if test "X$rpathdirs" != "X"; then
18134     if test -n "$acl_hardcode_libdir_separator"; then
18135                         alldirs=
18136       for found_dir in $rpathdirs; do
18137         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
18138       done
18139             acl_save_libdir="$libdir"
18140       libdir="$alldirs"
18141       eval flag=\"$acl_hardcode_libdir_flag_spec\"
18142       libdir="$acl_save_libdir"
18143       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
18144     else
18145             for found_dir in $rpathdirs; do
18146         acl_save_libdir="$libdir"
18147         libdir="$found_dir"
18148         eval flag=\"$acl_hardcode_libdir_flag_spec\"
18149         libdir="$acl_save_libdir"
18150         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
18151       done
18152     fi
18153   fi
18154   if test "X$ltrpathdirs" != "X"; then
18155             for found_dir in $ltrpathdirs; do
18156       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
18157     done
18158   fi
18159
18160
18161
18162
18163
18164
18165     ac_cv_libpth_libs="$LIBPTH"
18166     ac_cv_libpth_ltlibs="$LTLIBPTH"
18167     ac_cv_libpth_cppflags="$INCPTH"
18168     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
18169
18170 fi
18171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
18172 $as_echo "$ac_cv_libpth_libs" >&6; }
18173   LIBPTH="$ac_cv_libpth_libs"
18174   LTLIBPTH="$ac_cv_libpth_ltlibs"
18175   INCPTH="$ac_cv_libpth_cppflags"
18176   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
18177
18178   for element in $INCPTH; do
18179     haveit=
18180     for x in $CPPFLAGS; do
18181
18182   acl_save_prefix="$prefix"
18183   prefix="$acl_final_prefix"
18184   acl_save_exec_prefix="$exec_prefix"
18185   exec_prefix="$acl_final_exec_prefix"
18186   eval x=\"$x\"
18187   exec_prefix="$acl_save_exec_prefix"
18188   prefix="$acl_save_prefix"
18189
18190       if test "X$x" = "X$element"; then
18191         haveit=yes
18192         break
18193       fi
18194     done
18195     if test -z "$haveit"; then
18196       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18197     fi
18198   done
18199
18200
18201
18202
18203       HAVE_LIBPTH=yes
18204
18205
18206
18207       gl_have_pth=
18208       gl_save_LIBS="$LIBS"
18209       LIBS="$LIBS $LIBPTH"
18210       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18211 /* end confdefs.h.  */
18212 #include <pth.h>
18213 int
18214 main ()
18215 {
18216 pth_self();
18217   ;
18218   return 0;
18219 }
18220 _ACEOF
18221 if ac_fn_c_try_link "$LINENO"; then :
18222   gl_have_pth=yes
18223 fi
18224 rm -f core conftest.err conftest.$ac_objext \
18225     conftest$ac_exeext conftest.$ac_ext
18226       LIBS="$gl_save_LIBS"
18227       if test -n "$gl_have_pth"; then
18228         gl_threads_api=pth
18229         LIBTHREAD="$LIBPTH"
18230         LTLIBTHREAD="$LTLIBPTH"
18231         LIBMULTITHREAD="$LIBTHREAD"
18232         LTLIBMULTITHREAD="$LTLIBTHREAD"
18233
18234 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
18235
18236         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
18237           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
18238
18239 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
18240
18241             LIBTHREAD=
18242             LTLIBTHREAD=
18243           fi
18244         fi
18245       else
18246         CPPFLAGS="$gl_save_CPPFLAGS"
18247       fi
18248     fi
18249     if test -z "$gl_have_pthread"; then
18250       case "$gl_use_threads" in
18251         yes | windows | win32) # The 'win32' is for backward compatibility.
18252           if { case "$host_os" in
18253                  mingw*) true;;
18254                  *) false;;
18255                esac
18256              }; then
18257             gl_threads_api=windows
18258
18259 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
18260
18261           fi
18262           ;;
18263       esac
18264     fi
18265   fi
18266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
18267 $as_echo_n "checking for multithread API to use... " >&6; }
18268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
18269 $as_echo "$gl_threads_api" >&6; }
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18283 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18284 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
18285   $as_echo_n "(cached) " >&6
18286 else
18287   rm -f conftest.sym conftest.file
18288      echo >conftest.file
18289      if test "$cross_compiling" = yes; then :
18290   case "$host_os" in
18291           *-gnu* | gnu*)
18292             # Guess yes on glibc systems.
18293             gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18294           mingw*)
18295             # Guess no on native Windows.
18296             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18297           *)
18298             # If we don't know, assume the worst.
18299             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18300         esac
18301
18302 else
18303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18304 /* end confdefs.h.  */
18305 $ac_includes_default
18306 int
18307 main ()
18308 {
18309 struct stat sbuf;
18310             if (symlink ("conftest.file", "conftest.sym") != 0)
18311               return 1;
18312             /* Linux will dereference the symlink and fail, as required by
18313                POSIX.  That is better in the sense that it means we will not
18314                have to compile and use the lstat wrapper.  */
18315             return lstat ("conftest.sym/", &sbuf) == 0;
18316
18317   ;
18318   return 0;
18319 }
18320 _ACEOF
18321 if ac_fn_c_try_run "$LINENO"; then :
18322   gl_cv_func_lstat_dereferences_slashed_symlink=yes
18323 else
18324   gl_cv_func_lstat_dereferences_slashed_symlink=no
18325 fi
18326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18327   conftest.$ac_objext conftest.beam conftest.$ac_ext
18328 fi
18329
18330      rm -f conftest.sym conftest.file
18331
18332 fi
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18334 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18335   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18336     *yes)
18337
18338 cat >>confdefs.h <<_ACEOF
18339 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18340 _ACEOF
18341
18342       ;;
18343   esac
18344
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
18346 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
18347 if ${ac_cv_path_SED+:} false; then :
18348   $as_echo_n "(cached) " >&6
18349 else
18350             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
18351      for ac_i in 1 2 3 4 5 6 7; do
18352        ac_script="$ac_script$as_nl$ac_script"
18353      done
18354      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
18355      { ac_script=; unset ac_script;}
18356      if test -z "$SED"; then
18357   ac_path_SED_found=false
18358   # Loop through the user's path and test for each of PROGNAME-LIST
18359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18360 for as_dir in $PATH
18361 do
18362   IFS=$as_save_IFS
18363   test -z "$as_dir" && as_dir=.
18364     for ac_prog in sed gsed; do
18365     for ac_exec_ext in '' $ac_executable_extensions; do
18366       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
18367       as_fn_executable_p "$ac_path_SED" || continue
18368 # Check for GNU ac_path_SED and select it if it is found.
18369   # Check for GNU $ac_path_SED
18370 case `"$ac_path_SED" --version 2>&1` in
18371 *GNU*)
18372   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
18373 *)
18374   ac_count=0
18375   $as_echo_n 0123456789 >"conftest.in"
18376   while :
18377   do
18378     cat "conftest.in" "conftest.in" >"conftest.tmp"
18379     mv "conftest.tmp" "conftest.in"
18380     cp "conftest.in" "conftest.nl"
18381     $as_echo '' >> "conftest.nl"
18382     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
18383     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18384     as_fn_arith $ac_count + 1 && ac_count=$as_val
18385     if test $ac_count -gt ${ac_path_SED_max-0}; then
18386       # Best one so far, save it but keep looking for a better one
18387       ac_cv_path_SED="$ac_path_SED"
18388       ac_path_SED_max=$ac_count
18389     fi
18390     # 10*(2^10) chars as input seems more than enough
18391     test $ac_count -gt 10 && break
18392   done
18393   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18394 esac
18395
18396       $ac_path_SED_found && break 3
18397     done
18398   done
18399   done
18400 IFS=$as_save_IFS
18401   if test -z "$ac_cv_path_SED"; then
18402     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
18403   fi
18404 else
18405   ac_cv_path_SED=$SED
18406 fi
18407
18408 fi
18409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
18410 $as_echo "$ac_cv_path_SED" >&6; }
18411  SED="$ac_cv_path_SED"
18412   rm -f conftest.sed
18413
18414
18415
18416       for ac_header in stdlib.h
18417 do :
18418   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
18419 if test "x$ac_cv_header_stdlib_h" = xyes; then :
18420   cat >>confdefs.h <<_ACEOF
18421 #define HAVE_STDLIB_H 1
18422 _ACEOF
18423
18424 fi
18425
18426 done
18427
18428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
18429 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
18430 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
18431   $as_echo_n "(cached) " >&6
18432 else
18433   if test "$cross_compiling" = yes; then :
18434   case "$host_os" in
18435           # Guess yes on platforms where we know the result.
18436           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
18437           | hpux* | solaris* | cygwin* | mingw*)
18438             ac_cv_func_malloc_0_nonnull=yes ;;
18439           # If we don't know, assume the worst.
18440           *) ac_cv_func_malloc_0_nonnull=no ;;
18441         esac
18442
18443 else
18444   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18445 /* end confdefs.h.  */
18446 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
18447             # include <stdlib.h>
18448             #else
18449             char *malloc ();
18450             #endif
18451
18452 int
18453 main ()
18454 {
18455 char *p = malloc (0);
18456             int result = !p;
18457             free (p);
18458             return result;
18459   ;
18460   return 0;
18461 }
18462
18463 _ACEOF
18464 if ac_fn_c_try_run "$LINENO"; then :
18465   ac_cv_func_malloc_0_nonnull=yes
18466 else
18467   ac_cv_func_malloc_0_nonnull=no
18468 fi
18469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18470   conftest.$ac_objext conftest.beam conftest.$ac_ext
18471 fi
18472
18473
18474 fi
18475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
18476 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
18477   if test $ac_cv_func_malloc_0_nonnull = yes; then :
18478   gl_cv_func_malloc_0_nonnull=1
18479 else
18480   gl_cv_func_malloc_0_nonnull=0
18481 fi
18482
18483
18484 cat >>confdefs.h <<_ACEOF
18485 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
18486 _ACEOF
18487
18488
18489
18490
18491
18492   GNULIB_BTOWC=0;
18493   GNULIB_WCTOB=0;
18494   GNULIB_MBSINIT=0;
18495   GNULIB_MBRTOWC=0;
18496   GNULIB_MBRLEN=0;
18497   GNULIB_MBSRTOWCS=0;
18498   GNULIB_MBSNRTOWCS=0;
18499   GNULIB_WCRTOMB=0;
18500   GNULIB_WCSRTOMBS=0;
18501   GNULIB_WCSNRTOMBS=0;
18502   GNULIB_WCWIDTH=0;
18503   GNULIB_WMEMCHR=0;
18504   GNULIB_WMEMCMP=0;
18505   GNULIB_WMEMCPY=0;
18506   GNULIB_WMEMMOVE=0;
18507   GNULIB_WMEMSET=0;
18508   GNULIB_WCSLEN=0;
18509   GNULIB_WCSNLEN=0;
18510   GNULIB_WCSCPY=0;
18511   GNULIB_WCPCPY=0;
18512   GNULIB_WCSNCPY=0;
18513   GNULIB_WCPNCPY=0;
18514   GNULIB_WCSCAT=0;
18515   GNULIB_WCSNCAT=0;
18516   GNULIB_WCSCMP=0;
18517   GNULIB_WCSNCMP=0;
18518   GNULIB_WCSCASECMP=0;
18519   GNULIB_WCSNCASECMP=0;
18520   GNULIB_WCSCOLL=0;
18521   GNULIB_WCSXFRM=0;
18522   GNULIB_WCSDUP=0;
18523   GNULIB_WCSCHR=0;
18524   GNULIB_WCSRCHR=0;
18525   GNULIB_WCSCSPN=0;
18526   GNULIB_WCSSPN=0;
18527   GNULIB_WCSPBRK=0;
18528   GNULIB_WCSSTR=0;
18529   GNULIB_WCSTOK=0;
18530   GNULIB_WCSWIDTH=0;
18531   GNULIB_WCSFTIME=0;
18532     HAVE_BTOWC=1;
18533   HAVE_MBSINIT=1;
18534   HAVE_MBRTOWC=1;
18535   HAVE_MBRLEN=1;
18536   HAVE_MBSRTOWCS=1;
18537   HAVE_MBSNRTOWCS=1;
18538   HAVE_WCRTOMB=1;
18539   HAVE_WCSRTOMBS=1;
18540   HAVE_WCSNRTOMBS=1;
18541   HAVE_WMEMCHR=1;
18542   HAVE_WMEMCMP=1;
18543   HAVE_WMEMCPY=1;
18544   HAVE_WMEMMOVE=1;
18545   HAVE_WMEMSET=1;
18546   HAVE_WCSLEN=1;
18547   HAVE_WCSNLEN=1;
18548   HAVE_WCSCPY=1;
18549   HAVE_WCPCPY=1;
18550   HAVE_WCSNCPY=1;
18551   HAVE_WCPNCPY=1;
18552   HAVE_WCSCAT=1;
18553   HAVE_WCSNCAT=1;
18554   HAVE_WCSCMP=1;
18555   HAVE_WCSNCMP=1;
18556   HAVE_WCSCASECMP=1;
18557   HAVE_WCSNCASECMP=1;
18558   HAVE_WCSCOLL=1;
18559   HAVE_WCSXFRM=1;
18560   HAVE_WCSDUP=1;
18561   HAVE_WCSCHR=1;
18562   HAVE_WCSRCHR=1;
18563   HAVE_WCSCSPN=1;
18564   HAVE_WCSSPN=1;
18565   HAVE_WCSPBRK=1;
18566   HAVE_WCSSTR=1;
18567   HAVE_WCSTOK=1;
18568   HAVE_WCSWIDTH=1;
18569   HAVE_WCSFTIME=1;
18570   HAVE_DECL_WCTOB=1;
18571   HAVE_DECL_WCWIDTH=1;
18572   REPLACE_MBSTATE_T=0;
18573   REPLACE_BTOWC=0;
18574   REPLACE_WCTOB=0;
18575   REPLACE_MBSINIT=0;
18576   REPLACE_MBRTOWC=0;
18577   REPLACE_MBRLEN=0;
18578   REPLACE_MBSRTOWCS=0;
18579   REPLACE_MBSNRTOWCS=0;
18580   REPLACE_WCRTOMB=0;
18581   REPLACE_WCSRTOMBS=0;
18582   REPLACE_WCSNRTOMBS=0;
18583   REPLACE_WCWIDTH=0;
18584   REPLACE_WCSWIDTH=0;
18585   REPLACE_WCSFTIME=0;
18586
18587
18588
18589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
18590 $as_echo_n "checking for mbstate_t... " >&6; }
18591 if ${ac_cv_type_mbstate_t+:} false; then :
18592   $as_echo_n "(cached) " >&6
18593 else
18594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18595 /* end confdefs.h.  */
18596 $ac_includes_default
18597 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18598    <wchar.h>.
18599    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18600    included before <wchar.h>.  */
18601 #include <stddef.h>
18602 #include <stdio.h>
18603 #include <time.h>
18604 #include <wchar.h>
18605 int
18606 main ()
18607 {
18608 mbstate_t x; return sizeof x;
18609   ;
18610   return 0;
18611 }
18612 _ACEOF
18613 if ac_fn_c_try_compile "$LINENO"; then :
18614   ac_cv_type_mbstate_t=yes
18615 else
18616   ac_cv_type_mbstate_t=no
18617 fi
18618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18619 fi
18620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
18621 $as_echo "$ac_cv_type_mbstate_t" >&6; }
18622    if test $ac_cv_type_mbstate_t = yes; then
18623
18624 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
18625
18626    else
18627
18628 $as_echo "#define mbstate_t int" >>confdefs.h
18629
18630    fi
18631
18632
18633
18634
18635
18636
18637
18638
18639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
18640 $as_echo_n "checking for a traditional japanese locale... " >&6; }
18641 if ${gt_cv_locale_ja+:} false; then :
18642   $as_echo_n "(cached) " >&6
18643 else
18644
18645     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18646 /* end confdefs.h.  */
18647
18648 #include <locale.h>
18649 #include <time.h>
18650 #if HAVE_LANGINFO_CODESET
18651 # include <langinfo.h>
18652 #endif
18653 #include <stdlib.h>
18654 #include <string.h>
18655 struct tm t;
18656 char buf[16];
18657 int main ()
18658 {
18659   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
18660      imitates locale dependent behaviour by looking at the environment
18661      variables, and all locales use the UTF-8 encoding.  */
18662 #if defined __BEOS__ || defined __HAIKU__
18663   return 1;
18664 #else
18665   /* Check whether the given locale name is recognized by the system.  */
18666 # if defined _WIN32 && !defined __CYGWIN__
18667   /* On native Windows, setlocale(category, "") looks at the system settings,
18668      not at the environment variables.  Also, when an encoding suffix such
18669      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18670      category of the locale to "C".  */
18671   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18672       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18673     return 1;
18674 # else
18675   if (setlocale (LC_ALL, "") == NULL) return 1;
18676 # endif
18677   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18678      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18679      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18680      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18681      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18682      some unit tests fail.
18683      On MirBSD 10, when an unsupported locale is specified, setlocale()
18684      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
18685 # if HAVE_LANGINFO_CODESET
18686   {
18687     const char *cs = nl_langinfo (CODESET);
18688     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18689         || strcmp (cs, "UTF-8") == 0)
18690       return 1;
18691   }
18692 # endif
18693 # ifdef __CYGWIN__
18694   /* On Cygwin, avoid locale names without encoding suffix, because the
18695      locale_charset() function relies on the encoding suffix.  Note that
18696      LC_ALL is set on the command line.  */
18697   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18698 # endif
18699   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
18700      on Cygwin 1.5.x.  */
18701   if (MB_CUR_MAX == 1)
18702     return 1;
18703   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
18704      This excludes the UTF-8 encoding (except on MirBSD).  */
18705   {
18706     const char *p;
18707     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18708     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
18709     for (p = buf; *p != '\0'; p++)
18710       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
18711         return 1;
18712   }
18713   return 0;
18714 #endif
18715 }
18716
18717 _ACEOF
18718     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18719   (eval $ac_link) 2>&5
18720   ac_status=$?
18721   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18722   test $ac_status = 0; } && test -s conftest$ac_exeext; then
18723       case "$host_os" in
18724         # Handle native Windows specially, because there setlocale() interprets
18725         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18726         # "fr" or "fra" as "French" or "French_France.1252",
18727         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18728         # "ja" as "Japanese" or "Japanese_Japan.932",
18729         # and similar.
18730         mingw*)
18731           # Note that on native Windows, the Japanese locale is
18732           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
18733           # cannot use it here.
18734           gt_cv_locale_ja=none
18735           ;;
18736         *)
18737           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18738           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18739           # configure script would override the LC_ALL setting. Likewise for
18740           # LC_CTYPE, which is also set at the beginning of the configure script.
18741           # Test for the AIX locale name.
18742           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18743             gt_cv_locale_ja=ja_JP
18744           else
18745             # Test for the locale name with explicit encoding suffix.
18746             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18747               gt_cv_locale_ja=ja_JP.EUC-JP
18748             else
18749               # Test for the HP-UX, OSF/1, NetBSD locale name.
18750               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18751                 gt_cv_locale_ja=ja_JP.eucJP
18752               else
18753                 # Test for the IRIX, FreeBSD locale name.
18754                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18755                   gt_cv_locale_ja=ja_JP.EUC
18756                 else
18757                   # Test for the Solaris 7 locale name.
18758                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18759                     gt_cv_locale_ja=ja
18760                   else
18761                     # Special test for NetBSD 1.6.
18762                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
18763                       gt_cv_locale_ja=ja_JP.eucJP
18764                     else
18765                       # None found.
18766                       gt_cv_locale_ja=none
18767                     fi
18768                   fi
18769                 fi
18770               fi
18771             fi
18772           fi
18773           ;;
18774       esac
18775     fi
18776     rm -fr conftest*
18777
18778 fi
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
18780 $as_echo "$gt_cv_locale_ja" >&6; }
18781   LOCALE_JA=$gt_cv_locale_ja
18782
18783
18784
18785
18786
18787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
18788 $as_echo_n "checking for a transitional chinese locale... " >&6; }
18789 if ${gt_cv_locale_zh_CN+:} false; then :
18790   $as_echo_n "(cached) " >&6
18791 else
18792
18793     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18794 /* end confdefs.h.  */
18795
18796 #include <locale.h>
18797 #include <stdlib.h>
18798 #include <time.h>
18799 #if HAVE_LANGINFO_CODESET
18800 # include <langinfo.h>
18801 #endif
18802 #include <stdlib.h>
18803 #include <string.h>
18804 struct tm t;
18805 char buf[16];
18806 int main ()
18807 {
18808   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
18809      imitates locale dependent behaviour by looking at the environment
18810      variables, and all locales use the UTF-8 encoding.  */
18811 #if defined __BEOS__ || defined __HAIKU__
18812   return 1;
18813 #else
18814   /* Check whether the given locale name is recognized by the system.  */
18815 # if defined _WIN32 && !defined __CYGWIN__
18816   /* On native Windows, setlocale(category, "") looks at the system settings,
18817      not at the environment variables.  Also, when an encoding suffix such
18818      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18819      category of the locale to "C".  */
18820   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18821       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18822     return 1;
18823 # else
18824   if (setlocale (LC_ALL, "") == NULL) return 1;
18825 # endif
18826   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18827      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18828      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18829      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18830      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18831      some unit tests fail.
18832      On MirBSD 10, when an unsupported locale is specified, setlocale()
18833      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
18834 # if HAVE_LANGINFO_CODESET
18835   {
18836     const char *cs = nl_langinfo (CODESET);
18837     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
18838         || strcmp (cs, "UTF-8") == 0)
18839       return 1;
18840   }
18841 # endif
18842 # ifdef __CYGWIN__
18843   /* On Cygwin, avoid locale names without encoding suffix, because the
18844      locale_charset() function relies on the encoding suffix.  Note that
18845      LC_ALL is set on the command line.  */
18846   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18847 # endif
18848   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
18849      This excludes the UTF-8 encoding (except on MirBSD).  */
18850   {
18851     const char *p;
18852     t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18853     if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
18854     for (p = buf; *p != '\0'; p++)
18855       if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
18856         return 1;
18857   }
18858   /* Check whether a typical GB18030 multibyte sequence is recognized as a
18859      single wide character.  This excludes the GB2312 and GBK encodings.  */
18860   if (mblen ("\203\062\332\066", 5) != 4)
18861     return 1;
18862   return 0;
18863 #endif
18864 }
18865
18866 _ACEOF
18867     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18868   (eval $ac_link) 2>&5
18869   ac_status=$?
18870   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18871   test $ac_status = 0; } && test -s conftest$ac_exeext; then
18872       case "$host_os" in
18873         # Handle native Windows specially, because there setlocale() interprets
18874         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
18875         # "fr" or "fra" as "French" or "French_France.1252",
18876         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
18877         # "ja" as "Japanese" or "Japanese_Japan.932",
18878         # and similar.
18879         mingw*)
18880           # Test for the hypothetical native Windows locale name.
18881           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18882             gt_cv_locale_zh_CN=Chinese_China.54936
18883           else
18884             # None found.
18885             gt_cv_locale_zh_CN=none
18886           fi
18887           ;;
18888         solaris2.8)
18889           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
18890           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
18891           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
18892           gt_cv_locale_zh_CN=none
18893           ;;
18894         *)
18895           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
18896           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
18897           # configure script would override the LC_ALL setting. Likewise for
18898           # LC_CTYPE, which is also set at the beginning of the configure script.
18899           # Test for the locale name without encoding suffix.
18900           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18901             gt_cv_locale_zh_CN=zh_CN
18902           else
18903             # Test for the locale name with explicit encoding suffix.
18904             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
18905               gt_cv_locale_zh_CN=zh_CN.GB18030
18906             else
18907               # None found.
18908               gt_cv_locale_zh_CN=none
18909             fi
18910           fi
18911           ;;
18912       esac
18913     else
18914       # If there was a link error, due to mblen(), the system is so old that
18915       # it certainly doesn't have a chinese locale.
18916       gt_cv_locale_zh_CN=none
18917     fi
18918     rm -fr conftest*
18919
18920 fi
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
18922 $as_echo "$gt_cv_locale_zh_CN" >&6; }
18923   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
18924
18925
18926
18927
18928   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
18929 $as_echo_n "checking for a french Unicode locale... " >&6; }
18930 if ${gt_cv_locale_fr_utf8+:} false; then :
18931   $as_echo_n "(cached) " >&6
18932 else
18933
18934     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18935 /* end confdefs.h.  */
18936
18937 #include <locale.h>
18938 #include <time.h>
18939 #if HAVE_LANGINFO_CODESET
18940 # include <langinfo.h>
18941 #endif
18942 #include <stdlib.h>
18943 #include <string.h>
18944 struct tm t;
18945 char buf[16];
18946 int main () {
18947   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
18948      imitates locale dependent behaviour by looking at the environment
18949      variables, and all locales use the UTF-8 encoding.  */
18950 #if !(defined __BEOS__ || defined __HAIKU__)
18951   /* Check whether the given locale name is recognized by the system.  */
18952 # if defined _WIN32 && !defined __CYGWIN__
18953   /* On native Windows, setlocale(category, "") looks at the system settings,
18954      not at the environment variables.  Also, when an encoding suffix such
18955      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
18956      category of the locale to "C".  */
18957   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
18958       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
18959     return 1;
18960 # else
18961   if (setlocale (LC_ALL, "") == NULL) return 1;
18962 # endif
18963   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
18964      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
18965      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
18966      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
18967      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
18968      some unit tests fail.  */
18969 # if HAVE_LANGINFO_CODESET
18970   {
18971     const char *cs = nl_langinfo (CODESET);
18972     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
18973       return 1;
18974   }
18975 # endif
18976 # ifdef __CYGWIN__
18977   /* On Cygwin, avoid locale names without encoding suffix, because the
18978      locale_charset() function relies on the encoding suffix.  Note that
18979      LC_ALL is set on the command line.  */
18980   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
18981 # endif
18982   /* Check whether in the abbreviation of the second month, the second
18983      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
18984      two bytes long, with UTF-8 encoding.  */
18985   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
18986   if (strftime (buf, sizeof (buf), "%b", &t) < 4
18987       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
18988     return 1;
18989 #endif
18990 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
18991   /* Check whether the decimal separator is a comma.
18992      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
18993      are nl_langinfo(RADIXCHAR) are both ".".  */
18994   if (localeconv () ->decimal_point[0] != ',') return 1;
18995 #endif
18996   return 0;
18997 }
18998
18999 _ACEOF
19000     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19001   (eval $ac_link) 2>&5
19002   ac_status=$?
19003   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19004   test $ac_status = 0; } && test -s conftest$ac_exeext; then
19005       case "$host_os" in
19006         # Handle native Windows specially, because there setlocale() interprets
19007         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19008         # "fr" or "fra" as "French" or "French_France.1252",
19009         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19010         # "ja" as "Japanese" or "Japanese_Japan.932",
19011         # and similar.
19012         mingw*)
19013           # Test for the hypothetical native Windows locale name.
19014           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19015             gt_cv_locale_fr_utf8=French_France.65001
19016           else
19017             # None found.
19018             gt_cv_locale_fr_utf8=none
19019           fi
19020           ;;
19021         *)
19022           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19023           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19024           # configure script would override the LC_ALL setting. Likewise for
19025           # LC_CTYPE, which is also set at the beginning of the configure script.
19026           # Test for the usual locale name.
19027           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19028             gt_cv_locale_fr_utf8=fr_FR
19029           else
19030             # Test for the locale name with explicit encoding suffix.
19031             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19032               gt_cv_locale_fr_utf8=fr_FR.UTF-8
19033             else
19034               # Test for the Solaris 7 locale name.
19035               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19036                 gt_cv_locale_fr_utf8=fr.UTF-8
19037               else
19038                 # None found.
19039                 gt_cv_locale_fr_utf8=none
19040               fi
19041             fi
19042           fi
19043           ;;
19044       esac
19045     fi
19046     rm -fr conftest*
19047
19048 fi
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
19050 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
19051   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061   GNULIB_EXPLICIT_BZERO=0;
19062   GNULIB_FFSL=0;
19063   GNULIB_FFSLL=0;
19064   GNULIB_MEMCHR=0;
19065   GNULIB_MEMMEM=0;
19066   GNULIB_MEMPCPY=0;
19067   GNULIB_MEMRCHR=0;
19068   GNULIB_RAWMEMCHR=0;
19069   GNULIB_STPCPY=0;
19070   GNULIB_STPNCPY=0;
19071   GNULIB_STRCHRNUL=0;
19072   GNULIB_STRDUP=0;
19073   GNULIB_STRNCAT=0;
19074   GNULIB_STRNDUP=0;
19075   GNULIB_STRNLEN=0;
19076   GNULIB_STRPBRK=0;
19077   GNULIB_STRSEP=0;
19078   GNULIB_STRSTR=0;
19079   GNULIB_STRCASESTR=0;
19080   GNULIB_STRTOK_R=0;
19081   GNULIB_MBSLEN=0;
19082   GNULIB_MBSNLEN=0;
19083   GNULIB_MBSCHR=0;
19084   GNULIB_MBSRCHR=0;
19085   GNULIB_MBSSTR=0;
19086   GNULIB_MBSCASECMP=0;
19087   GNULIB_MBSNCASECMP=0;
19088   GNULIB_MBSPCASECMP=0;
19089   GNULIB_MBSCASESTR=0;
19090   GNULIB_MBSCSPN=0;
19091   GNULIB_MBSPBRK=0;
19092   GNULIB_MBSSPN=0;
19093   GNULIB_MBSSEP=0;
19094   GNULIB_MBSTOK_R=0;
19095   GNULIB_STRERROR=0;
19096   GNULIB_STRERROR_R=0;
19097   GNULIB_STRSIGNAL=0;
19098   GNULIB_STRVERSCMP=0;
19099   HAVE_MBSLEN=0;
19100     HAVE_EXPLICIT_BZERO=1;
19101   HAVE_FFSL=1;
19102   HAVE_FFSLL=1;
19103   HAVE_MEMCHR=1;
19104   HAVE_DECL_MEMMEM=1;
19105   HAVE_MEMPCPY=1;
19106   HAVE_DECL_MEMRCHR=1;
19107   HAVE_RAWMEMCHR=1;
19108   HAVE_STPCPY=1;
19109   HAVE_STPNCPY=1;
19110   HAVE_STRCHRNUL=1;
19111   HAVE_DECL_STRDUP=1;
19112   HAVE_DECL_STRNDUP=1;
19113   HAVE_DECL_STRNLEN=1;
19114   HAVE_STRPBRK=1;
19115   HAVE_STRSEP=1;
19116   HAVE_STRCASESTR=1;
19117   HAVE_DECL_STRTOK_R=1;
19118   HAVE_DECL_STRERROR_R=1;
19119   HAVE_DECL_STRSIGNAL=1;
19120   HAVE_STRVERSCMP=1;
19121   REPLACE_MEMCHR=0;
19122   REPLACE_MEMMEM=0;
19123   REPLACE_STPNCPY=0;
19124   REPLACE_STRCHRNUL=0;
19125   REPLACE_STRDUP=0;
19126   REPLACE_STRNCAT=0;
19127   REPLACE_STRNDUP=0;
19128   REPLACE_STRNLEN=0;
19129   REPLACE_STRSTR=0;
19130   REPLACE_STRCASESTR=0;
19131   REPLACE_STRTOK_R=0;
19132   REPLACE_STRERROR=0;
19133   REPLACE_STRERROR_R=0;
19134   REPLACE_STRSIGNAL=0;
19135   UNDEFINE_STRTOK_R=0;
19136
19137
19138
19139
19140
19141
19142   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
19143   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
19144   # irrelevant for anonymous mappings.
19145   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
19146 if test "x$ac_cv_func_mmap" = xyes; then :
19147   gl_have_mmap=yes
19148 else
19149   gl_have_mmap=no
19150 fi
19151
19152
19153   # Try to allow MAP_ANONYMOUS.
19154   gl_have_mmap_anonymous=no
19155   if test $gl_have_mmap = yes; then
19156     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
19157 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
19158     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19159 /* end confdefs.h.  */
19160
19161 #include <sys/mman.h>
19162 #ifdef MAP_ANONYMOUS
19163     I cannot identify this map
19164 #endif
19165
19166 _ACEOF
19167 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19168   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
19169   gl_have_mmap_anonymous=yes
19170 fi
19171 rm -f conftest*
19172
19173     if test $gl_have_mmap_anonymous != yes; then
19174       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19175 /* end confdefs.h.  */
19176
19177 #include <sys/mman.h>
19178 #ifdef MAP_ANON
19179     I cannot identify this map
19180 #endif
19181
19182 _ACEOF
19183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19184   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
19185
19186 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
19187
19188          gl_have_mmap_anonymous=yes
19189 fi
19190 rm -f conftest*
19191
19192     fi
19193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
19194 $as_echo "$gl_have_mmap_anonymous" >&6; }
19195     if test $gl_have_mmap_anonymous = yes; then
19196
19197 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
19198
19199     fi
19200   fi
19201
19202
19203
19204
19205
19206
19207   if test $HAVE_MEMCHR = 1; then
19208     # Detect platform-specific bugs in some versions of glibc:
19209     # memchr should not dereference anything with length 0
19210     #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
19211     # memchr should not dereference overestimated length after a match
19212     #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
19213     #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
19214     # Assume that memchr works on platforms that lack mprotect.
19215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
19216 $as_echo_n "checking whether memchr works... " >&6; }
19217 if ${gl_cv_func_memchr_works+:} false; then :
19218   $as_echo_n "(cached) " >&6
19219 else
19220   if test "$cross_compiling" = yes; then :
19221   case "$host_os" in
19222                     # Guess yes on native Windows.
19223             mingw*) gl_cv_func_memchr_works="guessing yes" ;;
19224                     # Be pessimistic for now.
19225             *)      gl_cv_func_memchr_works="guessing no" ;;
19226           esac
19227
19228 else
19229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19230 /* end confdefs.h.  */
19231
19232 #include <string.h>
19233 #if HAVE_SYS_MMAN_H
19234 # include <fcntl.h>
19235 # include <unistd.h>
19236 # include <sys/types.h>
19237 # include <sys/mman.h>
19238 # ifndef MAP_FILE
19239 #  define MAP_FILE 0
19240 # endif
19241 #endif
19242
19243 int
19244 main ()
19245 {
19246
19247   int result = 0;
19248   char *fence = NULL;
19249 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
19250 # if HAVE_MAP_ANONYMOUS
19251   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
19252   const int fd = -1;
19253 # else /* !HAVE_MAP_ANONYMOUS */
19254   const int flags = MAP_FILE | MAP_PRIVATE;
19255   int fd = open ("/dev/zero", O_RDONLY, 0666);
19256   if (fd >= 0)
19257 # endif
19258     {
19259       int pagesize = getpagesize ();
19260       char *two_pages =
19261         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
19262                        flags, fd, 0);
19263       if (two_pages != (char *)(-1)
19264           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
19265         fence = two_pages + pagesize;
19266     }
19267 #endif
19268   if (fence)
19269     {
19270       if (memchr (fence, 0, 0))
19271         result |= 1;
19272       strcpy (fence - 9, "12345678");
19273       if (memchr (fence - 9, 0, 79) != fence - 1)
19274         result |= 2;
19275       if (memchr (fence - 1, 0, 3) != fence - 1)
19276         result |= 4;
19277     }
19278   return result;
19279
19280   ;
19281   return 0;
19282 }
19283 _ACEOF
19284 if ac_fn_c_try_run "$LINENO"; then :
19285   gl_cv_func_memchr_works=yes
19286 else
19287   gl_cv_func_memchr_works=no
19288 fi
19289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19290   conftest.$ac_objext conftest.beam conftest.$ac_ext
19291 fi
19292
19293
19294 fi
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
19296 $as_echo "$gl_cv_func_memchr_works" >&6; }
19297     case "$gl_cv_func_memchr_works" in
19298       *yes) ;;
19299       *) REPLACE_MEMCHR=1 ;;
19300     esac
19301   fi
19302
19303
19304
19305
19306
19307   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
19308 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
19309 if ${gl_cv_minmax_in_limits_h+:} false; then :
19310   $as_echo_n "(cached) " >&6
19311 else
19312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19313 /* end confdefs.h.  */
19314 #include <limits.h>
19315             int x = MIN (42, 17);
19316 int
19317 main ()
19318 {
19319
19320   ;
19321   return 0;
19322 }
19323 _ACEOF
19324 if ac_fn_c_try_compile "$LINENO"; then :
19325   gl_cv_minmax_in_limits_h=yes
19326 else
19327   gl_cv_minmax_in_limits_h=no
19328 fi
19329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19330 fi
19331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
19332 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
19333   if test $gl_cv_minmax_in_limits_h = yes; then
19334
19335 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
19336
19337   fi
19338
19339
19340
19341
19342
19343
19344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
19345 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
19346 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
19347   $as_echo_n "(cached) " >&6
19348 else
19349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19350 /* end confdefs.h.  */
19351 #include <sys/param.h>
19352             int x = MIN (42, 17);
19353 int
19354 main ()
19355 {
19356
19357   ;
19358   return 0;
19359 }
19360 _ACEOF
19361 if ac_fn_c_try_compile "$LINENO"; then :
19362   gl_cv_minmax_in_sys_param_h=yes
19363 else
19364   gl_cv_minmax_in_sys_param_h=no
19365 fi
19366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19367 fi
19368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
19369 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
19370   if test $gl_cv_minmax_in_sys_param_h = yes; then
19371
19372 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
19373
19374   fi
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384 ac_fn_c_check_decl "$LINENO" "obstack_printf" "ac_cv_have_decl_obstack_printf" "$ac_includes_default"
19385 if test "x$ac_cv_have_decl_obstack_printf" = xyes; then :
19386   ac_have_decl=1
19387 else
19388   ac_have_decl=0
19389 fi
19390
19391 cat >>confdefs.h <<_ACEOF
19392 #define HAVE_DECL_OBSTACK_PRINTF $ac_have_decl
19393 _ACEOF
19394
19395
19396   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
19397 $as_echo_n "checking for O_CLOEXEC... " >&6; }
19398 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
19399   $as_echo_n "(cached) " >&6
19400 else
19401   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402 /* end confdefs.h.  */
19403 #include <fcntl.h>
19404                           #ifndef O_CLOEXEC
19405                             choke me;
19406                           #endif
19407
19408 int
19409 main ()
19410 {
19411 return O_CLOEXEC;
19412   ;
19413   return 0;
19414 }
19415 _ACEOF
19416 if ac_fn_c_try_compile "$LINENO"; then :
19417   gl_cv_macro_O_CLOEXEC=yes
19418 else
19419   gl_cv_macro_O_CLOEXEC=no
19420 fi
19421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19422 fi
19423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
19424 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
19425
19426
19427
19428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
19429 $as_echo_n "checking for promoted mode_t type... " >&6; }
19430 if ${gl_cv_promoted_mode_t+:} false; then :
19431   $as_echo_n "(cached) " >&6
19432 else
19433
19434                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19435 /* end confdefs.h.  */
19436 #include <sys/types.h>
19437 int
19438 main ()
19439 {
19440 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
19441   ;
19442   return 0;
19443 }
19444 _ACEOF
19445 if ac_fn_c_try_compile "$LINENO"; then :
19446   gl_cv_promoted_mode_t='int'
19447 else
19448   gl_cv_promoted_mode_t='mode_t'
19449 fi
19450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19451
19452 fi
19453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
19454 $as_echo "$gl_cv_promoted_mode_t" >&6; }
19455
19456 cat >>confdefs.h <<_ACEOF
19457 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
19458 _ACEOF
19459
19460
19461
19462
19463
19464      REPLACE_STRERROR_0=0
19465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
19466 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
19467 if ${gl_cv_func_strerror_0_works+:} false; then :
19468   $as_echo_n "(cached) " >&6
19469 else
19470   if test "$cross_compiling" = yes; then :
19471   case "$host_os" in
19472                         # Guess yes on glibc systems.
19473          *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
19474                         # Guess yes on native Windows.
19475          mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
19476                         # If we don't know, assume the worst.
19477          *)             gl_cv_func_strerror_0_works="guessing no" ;;
19478        esac
19479
19480 else
19481   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19482 /* end confdefs.h.  */
19483 #include <string.h>
19484            #include <errno.h>
19485
19486 int
19487 main ()
19488 {
19489 int result = 0;
19490            char *str;
19491            errno = 0;
19492            str = strerror (0);
19493            if (!*str) result |= 1;
19494            if (errno) result |= 2;
19495            if (strstr (str, "nknown") || strstr (str, "ndefined"))
19496              result |= 4;
19497            return result;
19498   ;
19499   return 0;
19500 }
19501 _ACEOF
19502 if ac_fn_c_try_run "$LINENO"; then :
19503   gl_cv_func_strerror_0_works=yes
19504 else
19505   gl_cv_func_strerror_0_works=no
19506 fi
19507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19508   conftest.$ac_objext conftest.beam conftest.$ac_ext
19509 fi
19510
19511
19512 fi
19513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
19514 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
19515   case "$gl_cv_func_strerror_0_works" in
19516     *yes) ;;
19517     *)
19518       REPLACE_STRERROR_0=1
19519
19520 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
19521
19522       ;;
19523   esac
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534   if test $ac_cv_func_strerror_r = yes; then
19535     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
19536                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
19537 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
19538 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
19539   $as_echo_n "(cached) " >&6
19540 else
19541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19542 /* end confdefs.h.  */
19543 #include <string.h>
19544                 int strerror_r (int, char *, size_t);
19545
19546 int
19547 main ()
19548 {
19549
19550   ;
19551   return 0;
19552 }
19553 _ACEOF
19554 if ac_fn_c_try_compile "$LINENO"; then :
19555   gl_cv_func_strerror_r_posix_signature=yes
19556 else
19557   gl_cv_func_strerror_r_posix_signature=no
19558 fi
19559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19560
19561 fi
19562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
19563 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
19564       if test $gl_cv_func_strerror_r_posix_signature = yes; then
19565                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
19566 $as_echo_n "checking whether strerror_r works... " >&6; }
19567 if ${gl_cv_func_strerror_r_works+:} false; then :
19568   $as_echo_n "(cached) " >&6
19569 else
19570   if test "$cross_compiling" = yes; then :
19571
19572               case "$host_os" in
19573                        # Guess no on AIX.
19574                 aix*)  gl_cv_func_strerror_r_works="guessing no";;
19575                        # Guess no on HP-UX.
19576                 hpux*) gl_cv_func_strerror_r_works="guessing no";;
19577                        # Guess no on BSD variants.
19578                 *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
19579                        # Guess yes otherwise.
19580                 *)     gl_cv_func_strerror_r_works="guessing yes";;
19581               esac
19582
19583 else
19584   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19585 /* end confdefs.h.  */
19586 #include <errno.h>
19587                   #include <string.h>
19588
19589 int
19590 main ()
19591 {
19592 int result = 0;
19593                   char buf[79];
19594                   if (strerror_r (EACCES, buf, 0) < 0)
19595                     result |= 1;
19596                   errno = 0;
19597                   if (strerror_r (EACCES, buf, sizeof buf) != 0)
19598                     result |= 2;
19599                   strcpy (buf, "Unknown");
19600                   if (strerror_r (0, buf, sizeof buf) != 0)
19601                     result |= 4;
19602                   if (errno)
19603                     result |= 8;
19604                   if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
19605                     result |= 0x10;
19606                   errno = 0;
19607                   *buf = 0;
19608                   if (strerror_r (-3, buf, sizeof buf) < 0)
19609                     result |= 0x20;
19610                   if (errno)
19611                     result |= 0x40;
19612                   if (!*buf)
19613                     result |= 0x80;
19614                   return result;
19615
19616   ;
19617   return 0;
19618 }
19619 _ACEOF
19620 if ac_fn_c_try_run "$LINENO"; then :
19621   gl_cv_func_strerror_r_works=yes
19622 else
19623   gl_cv_func_strerror_r_works=no
19624 fi
19625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19626   conftest.$ac_objext conftest.beam conftest.$ac_ext
19627 fi
19628
19629
19630 fi
19631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
19632 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
19633       else
19634
19635                         if test $ac_cv_func___xpg_strerror_r = yes; then
19636           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
19637 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
19638 if ${gl_cv_func_strerror_r_works+:} false; then :
19639   $as_echo_n "(cached) " >&6
19640 else
19641   if test "$cross_compiling" = yes; then :
19642                                   gl_cv_func_strerror_r_works="guessing no"
19643
19644 else
19645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19646 /* end confdefs.h.  */
19647 #include <errno.h>
19648                     #include <string.h>
19649                     extern
19650                     #ifdef __cplusplus
19651                     "C"
19652                     #endif
19653                     int __xpg_strerror_r(int, char *, size_t);
19654
19655 int
19656 main ()
19657 {
19658 int result = 0;
19659                     char buf[256] = "^";
19660                     char copy[256];
19661                     char *str = strerror (-1);
19662                     strcpy (copy, str);
19663                     if (__xpg_strerror_r (-2, buf, 1) == 0)
19664                       result |= 1;
19665                     if (*buf)
19666                       result |= 2;
19667                     __xpg_strerror_r (-2, buf, 256);
19668                     if (strcmp (str, copy))
19669                       result |= 4;
19670                     return result;
19671
19672   ;
19673   return 0;
19674 }
19675 _ACEOF
19676 if ac_fn_c_try_run "$LINENO"; then :
19677   gl_cv_func_strerror_r_works=yes
19678 else
19679   gl_cv_func_strerror_r_works=no
19680 fi
19681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19682   conftest.$ac_objext conftest.beam conftest.$ac_ext
19683 fi
19684
19685
19686 fi
19687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
19688 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
19689         fi
19690       fi
19691     fi
19692   fi
19693
19694 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
19695 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
19696   ac_have_decl=1
19697 else
19698   ac_have_decl=0
19699 fi
19700
19701 cat >>confdefs.h <<_ACEOF
19702 #define HAVE_DECL_STRERROR_R $ac_have_decl
19703 _ACEOF
19704
19705
19706
19707
19708
19709
19710
19711
19712   if test $ac_cv_have_decl_strerror_r = no; then
19713     HAVE_DECL_STRERROR_R=0
19714   fi
19715
19716   if test $ac_cv_func_strerror_r = yes; then
19717     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
19718       if test $gl_cv_func_strerror_r_posix_signature = yes; then
19719         case "$gl_cv_func_strerror_r_works" in
19720                     *no) REPLACE_STRERROR_R=1 ;;
19721         esac
19722       else
19723                 REPLACE_STRERROR_R=1
19724       fi
19725     else
19726                   REPLACE_STRERROR_R=1
19727     fi
19728   fi
19729
19730
19731
19732
19733   GNULIB_POSIX_SPAWN=0;
19734   GNULIB_POSIX_SPAWNP=0;
19735   GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
19736   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
19737   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
19738   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
19739   GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
19740   GNULIB_POSIX_SPAWNATTR_INIT=0;
19741   GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
19742   GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
19743   GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
19744   GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
19745   GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
19746   GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
19747   GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
19748   GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
19749   GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
19750   GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
19751   GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
19752   GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
19753   GNULIB_POSIX_SPAWNATTR_DESTROY=0;
19754     HAVE_POSIX_SPAWN=1;
19755   HAVE_POSIX_SPAWNATTR_T=1;
19756   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
19757
19758   REPLACE_POSIX_SPAWN=0;
19759   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
19760
19761   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
19762
19763   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
19764
19765
19766
19767
19768
19769   LIB_POSIX_SPAWN=
19770
19771   gl_saved_libs=$LIBS
19772     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
19773 $as_echo_n "checking for library containing posix_spawn... " >&6; }
19774 if ${ac_cv_search_posix_spawn+:} false; then :
19775   $as_echo_n "(cached) " >&6
19776 else
19777   ac_func_search_save_LIBS=$LIBS
19778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19779 /* end confdefs.h.  */
19780
19781 /* Override any GCC internal prototype to avoid an error.
19782    Use char because int might match the return type of a GCC
19783    builtin and then its argument prototype would still apply.  */
19784 #ifdef __cplusplus
19785 extern "C"
19786 #endif
19787 char posix_spawn ();
19788 int
19789 main ()
19790 {
19791 return posix_spawn ();
19792   ;
19793   return 0;
19794 }
19795 _ACEOF
19796 for ac_lib in '' rt; do
19797   if test -z "$ac_lib"; then
19798     ac_res="none required"
19799   else
19800     ac_res=-l$ac_lib
19801     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19802   fi
19803   if ac_fn_c_try_link "$LINENO"; then :
19804   ac_cv_search_posix_spawn=$ac_res
19805 fi
19806 rm -f core conftest.err conftest.$ac_objext \
19807     conftest$ac_exeext
19808   if ${ac_cv_search_posix_spawn+:} false; then :
19809   break
19810 fi
19811 done
19812 if ${ac_cv_search_posix_spawn+:} false; then :
19813
19814 else
19815   ac_cv_search_posix_spawn=no
19816 fi
19817 rm conftest.$ac_ext
19818 LIBS=$ac_func_search_save_LIBS
19819 fi
19820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
19821 $as_echo "$ac_cv_search_posix_spawn" >&6; }
19822 ac_res=$ac_cv_search_posix_spawn
19823 if test "$ac_res" != no; then :
19824   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19825   test "$ac_cv_search_posix_spawn" = "none required" ||
19826                     LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
19827 fi
19828
19829     for ac_func in posix_spawn
19830 do :
19831   ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
19832 if test "x$ac_cv_func_posix_spawn" = xyes; then :
19833   cat >>confdefs.h <<_ACEOF
19834 #define HAVE_POSIX_SPAWN 1
19835 _ACEOF
19836
19837 fi
19838 done
19839
19840   LIBS=$gl_saved_libs
19841
19842   if test $ac_cv_func_posix_spawn != yes; then
19843     HAVE_POSIX_SPAWN=0
19844   fi
19845
19846
19847
19848
19849                                       if test $ac_cv_func_posix_spawn = yes; then
19850
19851
19852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
19853 $as_echo_n "checking whether posix_spawn works... " >&6; }
19854 if ${gl_cv_func_posix_spawn_works+:} false; then :
19855   $as_echo_n "(cached) " >&6
19856 else
19857   if test $cross_compiling = no; then
19858        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19859 /* end confdefs.h.  */
19860
19861 #include <errno.h>
19862 #include <fcntl.h>
19863 #include <signal.h>
19864 #include <spawn.h>
19865 #include <stdbool.h>
19866 #include <stdio.h>
19867 #include <stdlib.h>
19868 #include <string.h>
19869 #include <unistd.h>
19870 #include <sys/types.h>
19871 #include <sys/wait.h>
19872
19873 extern char **environ;
19874
19875 #ifndef STDIN_FILENO
19876 # define STDIN_FILENO 0
19877 #endif
19878 #ifndef STDOUT_FILENO
19879 # define STDOUT_FILENO 1
19880 #endif
19881 #ifndef STDERR_FILENO
19882 # define STDERR_FILENO 2
19883 #endif
19884
19885 #ifndef WTERMSIG
19886 # define WTERMSIG(x) ((x) & 0x7f)
19887 #endif
19888 #ifndef WIFEXITED
19889 # define WIFEXITED(x) (WTERMSIG (x) == 0)
19890 #endif
19891 #ifndef WEXITSTATUS
19892 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
19893 #endif
19894
19895 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
19896
19897 static int
19898 fd_safer (int fd)
19899 {
19900   if (0 <= fd && fd <= 2)
19901     {
19902       int f = fd_safer (dup (fd));
19903       int e = errno;
19904       close (fd);
19905       errno = e;
19906       fd = f;
19907     }
19908
19909   return fd;
19910 }
19911
19912 int
19913 main ()
19914 {
19915   char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
19916   int ofd[2];
19917   sigset_t blocked_signals;
19918   sigset_t fatal_signal_set;
19919   posix_spawn_file_actions_t actions;
19920   bool actions_allocated;
19921   posix_spawnattr_t attrs;
19922   bool attrs_allocated;
19923   int err;
19924   pid_t child;
19925   int status;
19926   int exitstatus;
19927
19928   setvbuf (stdout, NULL, _IOFBF, 0);
19929   puts ("This should be seen only once.");
19930   if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
19931     {
19932       perror ("cannot create pipe");
19933       exit (1);
19934     }
19935   sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
19936   sigemptyset (&fatal_signal_set);
19937   sigaddset (&fatal_signal_set, SIGINT);
19938   sigaddset (&fatal_signal_set, SIGTERM);
19939   sigaddset (&fatal_signal_set, SIGHUP);
19940   sigaddset (&fatal_signal_set, SIGPIPE);
19941   sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
19942   actions_allocated = false;
19943   attrs_allocated = false;
19944   if ((err = posix_spawn_file_actions_init (&actions)) != 0
19945       || (actions_allocated = true,
19946           (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
19947           || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
19948           || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
19949           || (err = posix_spawnattr_init (&attrs)) != 0
19950           || (attrs_allocated = true,
19951               (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
19952               || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
19953           || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
19954     {
19955       if (actions_allocated)
19956         posix_spawn_file_actions_destroy (&actions);
19957       if (attrs_allocated)
19958         posix_spawnattr_destroy (&attrs);
19959       sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
19960       if (err == ENOENT)
19961         return 0;
19962       else
19963         {
19964           errno = err;
19965           perror ("subprocess failed");
19966           exit (1);
19967         }
19968     }
19969   posix_spawn_file_actions_destroy (&actions);
19970   posix_spawnattr_destroy (&attrs);
19971   sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
19972   close (ofd[0]);
19973   close (ofd[1]);
19974   status = 0;
19975   while (waitpid (child, &status, 0) != child)
19976     ;
19977   if (!WIFEXITED (status))
19978     {
19979       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
19980       exit (1);
19981     }
19982   exitstatus = WEXITSTATUS (status);
19983   if (exitstatus != 127)
19984     {
19985       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
19986       exit (1);
19987     }
19988   return 0;
19989 }
19990
19991 _ACEOF
19992 if ac_fn_c_try_link "$LINENO"; then :
19993   if test -s conftest$ac_exeext \
19994              && ./conftest$ac_exeext > conftest.out \
19995              && echo 'This should be seen only once.' > conftest.ok \
19996              && cmp conftest.out conftest.ok >/dev/null 2>&1; then
19997             gl_cv_func_posix_spawn_works=yes
19998           else
19999             gl_cv_func_posix_spawn_works=no
20000           fi
20001 else
20002   gl_cv_func_posix_spawn_works=no
20003 fi
20004 rm -f core conftest.err conftest.$ac_objext \
20005     conftest$ac_exeext conftest.$ac_ext
20006        if test $gl_cv_func_posix_spawn_works = yes; then
20007          if test "$cross_compiling" = yes; then :
20008   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20009 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20010 as_fn_error $? "cannot run test program while cross compiling
20011 See \`config.log' for more details" "$LINENO" 5; }
20012 else
20013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20014 /* end confdefs.h.  */
20015
20016 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
20017    that contain special characters such as '*'.  */
20018
20019 #include <errno.h>
20020 #include <fcntl.h>
20021 #include <signal.h>
20022 #include <spawn.h>
20023 #include <stdbool.h>
20024 #include <stdio.h>
20025 #include <string.h>
20026 #include <unistd.h>
20027 #include <sys/types.h>
20028 #include <sys/wait.h>
20029
20030 extern char **environ;
20031
20032 #ifndef STDIN_FILENO
20033 # define STDIN_FILENO 0
20034 #endif
20035 #ifndef STDOUT_FILENO
20036 # define STDOUT_FILENO 1
20037 #endif
20038 #ifndef STDERR_FILENO
20039 # define STDERR_FILENO 2
20040 #endif
20041
20042 #ifndef WTERMSIG
20043 # define WTERMSIG(x) ((x) & 0x7f)
20044 #endif
20045 #ifndef WIFEXITED
20046 # define WIFEXITED(x) (WTERMSIG (x) == 0)
20047 #endif
20048 #ifndef WEXITSTATUS
20049 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
20050 #endif
20051
20052 #define CHILD_PROGRAM_FILENAME "conftest"
20053 #define DATA_FILENAME "conftest%=*#?"
20054
20055 static int
20056 parent_main (void)
20057 {
20058   FILE *fp;
20059   char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
20060   posix_spawn_file_actions_t actions;
20061   bool actions_allocated;
20062   int err;
20063   pid_t child;
20064   int status;
20065   int exitstatus;
20066
20067   /* Create a data file with specific contents.  */
20068   fp = fopen (DATA_FILENAME, "wb");
20069   if (fp == NULL)
20070     {
20071       perror ("cannot create data file");
20072       return 1;
20073     }
20074   fwrite ("Halle Potta", 1, 11, fp);
20075   if (fflush (fp) || fclose (fp))
20076     {
20077       perror ("cannot prepare data file");
20078       return 2;
20079     }
20080
20081   /* Avoid reading from our stdin, as it could block.  */
20082   freopen ("/dev/null", "rb", stdin);
20083
20084   /* Test whether posix_spawn_file_actions_addopen with this file name
20085      actually works, but spawning a child that reads from this file.  */
20086   actions_allocated = false;
20087   if ((err = posix_spawn_file_actions_init (&actions)) != 0
20088       || (actions_allocated = true,
20089           (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
20090           || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
20091     {
20092       if (actions_allocated)
20093         posix_spawn_file_actions_destroy (&actions);
20094       errno = err;
20095       perror ("subprocess failed");
20096       return 3;
20097     }
20098   posix_spawn_file_actions_destroy (&actions);
20099   status = 0;
20100   while (waitpid (child, &status, 0) != child)
20101     ;
20102   if (!WIFEXITED (status))
20103     {
20104       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
20105       return 4;
20106     }
20107   exitstatus = WEXITSTATUS (status);
20108   if (exitstatus != 0)
20109     {
20110       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
20111       return 5;
20112     }
20113   return 0;
20114 }
20115
20116 static int
20117 child_main (void)
20118 {
20119   char buf[1024];
20120
20121   /* See if reading from STDIN_FILENO yields the expected contents.  */
20122   if (fread (buf, 1, sizeof (buf), stdin) == 11
20123       && memcmp (buf, "Halle Potta", 11) == 0)
20124     return 0;
20125   else
20126     return 8;
20127 }
20128
20129 static void
20130 cleanup_then_die (int sig)
20131 {
20132   /* Clean up data file.  */
20133   unlink (DATA_FILENAME);
20134
20135   /* Re-raise the signal and die from it.  */
20136   signal (sig, SIG_DFL);
20137   raise (sig);
20138 }
20139
20140 int
20141 main (int argc, char *argv[])
20142 {
20143   int exitstatus;
20144
20145   if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
20146     {
20147       /* This is the parent process.  */
20148       signal (SIGINT, cleanup_then_die);
20149       signal (SIGTERM, cleanup_then_die);
20150       #ifdef SIGHUP
20151       signal (SIGHUP, cleanup_then_die);
20152       #endif
20153
20154       exitstatus = parent_main ();
20155     }
20156   else
20157     {
20158       /* This is the child process.  */
20159
20160       exitstatus = child_main ();
20161     }
20162   unlink (DATA_FILENAME);
20163   return exitstatus;
20164 }
20165
20166 _ACEOF
20167 if ac_fn_c_try_run "$LINENO"; then :
20168
20169 else
20170   gl_cv_func_posix_spawn_works=no
20171 fi
20172 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20173   conftest.$ac_objext conftest.beam conftest.$ac_ext
20174 fi
20175
20176        fi
20177      else
20178        case "$host_os" in
20179          aix*) gl_cv_func_posix_spawn_works="guessing no";;
20180          *)    gl_cv_func_posix_spawn_works="guessing yes";;
20181        esac
20182      fi
20183
20184 fi
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
20186 $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
20187
20188     case "$gl_cv_func_posix_spawn_works" in
20189       *yes)
20190
20191 $as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
20192
20193                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
20194 $as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
20195 if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
20196   $as_echo_n "(cached) " >&6
20197 else
20198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20199 /* end confdefs.h.  */
20200
20201 #include <spawn.h>
20202 #if POSIX_SPAWN_SETSCHEDULER
20203  POSIX scheduling supported
20204 #endif
20205
20206 _ACEOF
20207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20208   $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
20209   gl_cv_func_spawnattr_setschedpolicy=yes
20210 else
20211   gl_cv_func_spawnattr_setschedpolicy=no
20212 fi
20213 rm -f conftest*
20214
20215
20216 fi
20217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
20218 $as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
20219                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
20220 $as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
20221 if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
20222   $as_echo_n "(cached) " >&6
20223 else
20224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20225 /* end confdefs.h.  */
20226
20227 #include <spawn.h>
20228 #if POSIX_SPAWN_SETSCHEDPARAM
20229  POSIX scheduling supported
20230 #endif
20231
20232 _ACEOF
20233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20234   $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
20235   gl_cv_func_spawnattr_setschedparam=yes
20236 else
20237   gl_cv_func_spawnattr_setschedparam=no
20238 fi
20239 rm -f conftest*
20240
20241
20242 fi
20243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
20244 $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
20245         ;;
20246       *) REPLACE_POSIX_SPAWN=1 ;;
20247     esac
20248   fi
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265   gl_cv_func_vfprintf_posix=no
20266   case "$gl_cv_func_printf_sizes_c99" in
20267     *yes)
20268       case "$gl_cv_func_printf_long_double" in
20269         *yes)
20270           case "$gl_cv_func_printf_infinite" in
20271             *yes)
20272               case "$gl_cv_func_printf_infinite_long_double" in
20273                 *yes)
20274                   case "$gl_cv_func_printf_directive_a" in
20275                     *yes)
20276                       case "$gl_cv_func_printf_directive_f" in
20277                         *yes)
20278                           case "$gl_cv_func_printf_directive_n" in
20279                             *yes)
20280                               case "$gl_cv_func_printf_directive_ls" in
20281                                 *yes)
20282                                   case "$gl_cv_func_printf_positions" in
20283                                     *yes)
20284                                       case "$gl_cv_func_printf_flag_grouping" in
20285                                         *yes)
20286                                           case "$gl_cv_func_printf_flag_leftadjust" in
20287                                             *yes)
20288                                               case "$gl_cv_func_printf_flag_zero" in
20289                                                 *yes)
20290                                                   case "$gl_cv_func_printf_precision" in
20291                                                     *yes)
20292                                                       case "$gl_cv_func_printf_enomem" in
20293                                                         *yes)
20294                                                           # vfprintf exists and is
20295                                                           # already POSIX compliant.
20296                                                           gl_cv_func_vfprintf_posix=yes
20297                                                           ;;
20298                                                       esac
20299                                                       ;;
20300                                                   esac
20301                                                   ;;
20302                                               esac
20303                                               ;;
20304                                           esac
20305                                           ;;
20306                                       esac
20307                                       ;;
20308                                   esac
20309                                   ;;
20310                               esac
20311                               ;;
20312                           esac
20313                           ;;
20314                       esac
20315                       ;;
20316                   esac
20317                   ;;
20318               esac
20319               ;;
20320           esac
20321           ;;
20322       esac
20323       ;;
20324   esac
20325   if test $gl_cv_func_vfprintf_posix = no; then
20326
20327
20328
20329   case "$gl_cv_func_printf_infinite" in
20330     *yes)
20331       ;;
20332     *)
20333
20334 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
20335
20336       ;;
20337   esac
20338
20339
20340
20341
20342   case "$gl_cv_func_printf_long_double" in
20343     *yes)
20344       case "$gl_cv_func_printf_infinite_long_double" in
20345         *yes)
20346           ;;
20347         *)
20348
20349 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
20350
20351           ;;
20352       esac
20353       ;;
20354   esac
20355
20356
20357
20358   case "$gl_cv_func_printf_directive_a" in
20359     *yes)
20360       ;;
20361     *)
20362
20363 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
20364
20365       for ac_func in nl_langinfo
20366 do :
20367   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
20368 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
20369   cat >>confdefs.h <<_ACEOF
20370 #define HAVE_NL_LANGINFO 1
20371 _ACEOF
20372
20373 fi
20374 done
20375
20376       ;;
20377   esac
20378
20379
20380
20381   case "$gl_cv_func_printf_directive_f" in
20382     *yes)
20383       ;;
20384     *)
20385
20386 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
20387
20388       ;;
20389   esac
20390
20391
20392
20393   case "$gl_cv_func_printf_directive_ls" in
20394     *yes)
20395       ;;
20396     *)
20397
20398 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
20399
20400       ;;
20401   esac
20402
20403
20404
20405   case "$gl_cv_func_printf_flag_grouping" in
20406     *yes)
20407       ;;
20408     *)
20409
20410 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
20411
20412       ;;
20413   esac
20414
20415
20416
20417   case "$gl_cv_func_printf_flag_leftadjust" in
20418     *yes)
20419       ;;
20420     *)
20421
20422 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
20423
20424       ;;
20425   esac
20426
20427
20428
20429   case "$gl_cv_func_printf_flag_zero" in
20430     *yes)
20431       ;;
20432     *)
20433
20434 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
20435
20436       ;;
20437   esac
20438
20439
20440
20441   case "$gl_cv_func_printf_precision" in
20442     *yes)
20443       ;;
20444     *)
20445
20446 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
20447
20448
20449 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20450
20451
20452 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20453
20454       ;;
20455   esac
20456
20457
20458
20459   case "$gl_cv_func_printf_enomem" in
20460     *yes)
20461       ;;
20462     *)
20463
20464 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
20465
20466
20467 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
20468
20469
20470 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
20471
20472       ;;
20473   esac
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
20516
20517   if test $ac_cv_func_vasnprintf = yes; then
20518
20519 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
20520
20521   fi
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
20534 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
20535
20536 else
20537
20538 $as_echo "#define ptrdiff_t long" >>confdefs.h
20539
20540
20541 fi
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
20560
20561   REPLACE_VFPRINTF=1
20562
20563 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
20564
20565   :
20566
20567   fi
20568
20569
20570
20571
20572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
20573 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
20574 if ${gl_cv_prog_as_underscore+:} false; then :
20575   $as_echo_n "(cached) " >&6
20576 else
20577   cat > conftest.c <<EOF
20578 #ifdef __cplusplus
20579 extern "C" int foo (void);
20580 #endif
20581 int foo(void) { return 0; }
20582 EOF
20583      # Look for the assembly language name in the .s file.
20584      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
20585   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
20586   (eval $ac_try) 2>&5
20587   ac_status=$?
20588   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20589   test $ac_status = 0; }; } >/dev/null 2>&1
20590      if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
20591        gl_cv_prog_as_underscore=yes
20592      else
20593        gl_cv_prog_as_underscore=no
20594      fi
20595      rm -f conftest*
20596
20597 fi
20598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
20599 $as_echo "$gl_cv_prog_as_underscore" >&6; }
20600   if test $gl_cv_prog_as_underscore = yes; then
20601     USER_LABEL_PREFIX=_
20602   else
20603     USER_LABEL_PREFIX=
20604   fi
20605
20606 cat >>confdefs.h <<_ACEOF
20607 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
20608 _ACEOF
20609
20610   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
20611
20612
20613
20614   GNULIB_PTHREAD_SIGMASK=0;
20615   GNULIB_RAISE=0;
20616   GNULIB_SIGNAL_H_SIGPIPE=0;
20617   GNULIB_SIGPROCMASK=0;
20618   GNULIB_SIGACTION=0;
20619     HAVE_POSIX_SIGNALBLOCKING=1;
20620   HAVE_PTHREAD_SIGMASK=1;
20621   HAVE_RAISE=1;
20622   HAVE_SIGSET_T=1;
20623   HAVE_SIGINFO_T=1;
20624   HAVE_SIGACTION=1;
20625   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20626
20627   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20628
20629   HAVE_SIGHANDLER_T=1;
20630   REPLACE_PTHREAD_SIGMASK=0;
20631   REPLACE_RAISE=0;
20632
20633
20634   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20635       #include <signal.h>
20636       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
20637       #include <sys/types.h>
20638
20639 "
20640 if test "x$ac_cv_type_sigset_t" = xyes; then :
20641
20642 cat >>confdefs.h <<_ACEOF
20643 #define HAVE_SIGSET_T 1
20644 _ACEOF
20645
20646 gl_cv_type_sigset_t=yes
20647 else
20648   gl_cv_type_sigset_t=no
20649 fi
20650
20651   if test $gl_cv_type_sigset_t != yes; then
20652     HAVE_SIGSET_T=0
20653   fi
20654
20655
20656
20657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
20658 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
20659 if ${ac_cv_c_restrict+:} false; then :
20660   $as_echo_n "(cached) " >&6
20661 else
20662   ac_cv_c_restrict=no
20663    # The order here caters to the fact that C++ does not require restrict.
20664    for ac_kw in __restrict __restrict__ _Restrict restrict; do
20665      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20666 /* end confdefs.h.  */
20667 typedef int *int_ptr;
20668            int foo (int_ptr $ac_kw ip) { return ip[0]; }
20669            int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
20670            int bar (int ip[$ac_kw]) { return ip[0]; }
20671
20672 int
20673 main ()
20674 {
20675 int s[1];
20676            int *$ac_kw t = s;
20677            t[0] = 0;
20678            return foo (t) + bar (t);
20679
20680   ;
20681   return 0;
20682 }
20683 _ACEOF
20684 if ac_fn_c_try_compile "$LINENO"; then :
20685   ac_cv_c_restrict=$ac_kw
20686 fi
20687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20688      test "$ac_cv_c_restrict" != no && break
20689    done
20690
20691 fi
20692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
20693 $as_echo "$ac_cv_c_restrict" >&6; }
20694
20695  case $ac_cv_c_restrict in
20696    restrict) ;;
20697    no) $as_echo "#define restrict /**/" >>confdefs.h
20698  ;;
20699    *)  cat >>confdefs.h <<_ACEOF
20700 #define restrict $ac_cv_c_restrict
20701 _ACEOF
20702  ;;
20703  esac
20704
20705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
20706 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
20707 if ${ac_cv_type_uid_t+:} false; then :
20708   $as_echo_n "(cached) " >&6
20709 else
20710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20711 /* end confdefs.h.  */
20712 #include <sys/types.h>
20713
20714 _ACEOF
20715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20716   $EGREP "uid_t" >/dev/null 2>&1; then :
20717   ac_cv_type_uid_t=yes
20718 else
20719   ac_cv_type_uid_t=no
20720 fi
20721 rm -f conftest*
20722
20723 fi
20724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
20725 $as_echo "$ac_cv_type_uid_t" >&6; }
20726 if test $ac_cv_type_uid_t = no; then
20727
20728 $as_echo "#define uid_t int" >>confdefs.h
20729
20730
20731 $as_echo "#define gid_t int" >>confdefs.h
20732
20733 fi
20734
20735
20736
20737
20738
20739 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
20740 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
20741   ac_have_decl=1
20742 else
20743   ac_have_decl=0
20744 fi
20745
20746 cat >>confdefs.h <<_ACEOF
20747 #define HAVE_DECL_SNPRINTF $ac_have_decl
20748 _ACEOF
20749
20750
20751
20752
20753
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20755 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20756 if ${ac_cv_header_stdbool_h+:} false; then :
20757   $as_echo_n "(cached) " >&6
20758 else
20759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20760 /* end confdefs.h.  */
20761
20762              #include <stdbool.h>
20763
20764              #ifdef __cplusplus
20765               typedef bool Bool;
20766              #else
20767               typedef _Bool Bool;
20768               #ifndef bool
20769                "error: bool is not defined"
20770               #endif
20771               #ifndef false
20772                "error: false is not defined"
20773               #endif
20774               #if false
20775                "error: false is not 0"
20776               #endif
20777               #ifndef true
20778                "error: true is not defined"
20779               #endif
20780               #if true != 1
20781                "error: true is not 1"
20782               #endif
20783              #endif
20784
20785              #ifndef __bool_true_false_are_defined
20786               "error: __bool_true_false_are_defined is not defined"
20787              #endif
20788
20789              struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
20790
20791              char a[true == 1 ? 1 : -1];
20792              char b[false == 0 ? 1 : -1];
20793              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20794              char d[(bool) 0.5 == true ? 1 : -1];
20795              /* See body of main program for 'e'.  */
20796              char f[(Bool) 0.0 == false ? 1 : -1];
20797              char g[true];
20798              char h[sizeof (Bool)];
20799              char i[sizeof s.t];
20800              enum { j = false, k = true, l = false * true, m = true * 256 };
20801              /* The following fails for
20802                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20803              Bool n[m];
20804              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20805              char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20806              /* Catch a bug in an HP-UX C compiler.  See
20807                 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20808                 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
20809               */
20810              Bool q = true;
20811              Bool *pq = &q;
20812              bool *qq = &q;
20813
20814 int
20815 main ()
20816 {
20817
20818              bool e = &s;
20819              *pq |= q; *pq |= ! q;
20820              *qq |= q; *qq |= ! q;
20821              /* Refer to every declared value, to avoid compiler optimizations.  */
20822              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20823                      + !m + !n + !o + !p + !q + !pq + !qq);
20824
20825   ;
20826   return 0;
20827 }
20828 _ACEOF
20829 if ac_fn_c_try_compile "$LINENO"; then :
20830   ac_cv_header_stdbool_h=yes
20831 else
20832   ac_cv_header_stdbool_h=no
20833 fi
20834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20835 fi
20836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20837 $as_echo "$ac_cv_header_stdbool_h" >&6; }
20838    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20839 if test "x$ac_cv_type__Bool" = xyes; then :
20840
20841 cat >>confdefs.h <<_ACEOF
20842 #define HAVE__BOOL 1
20843 _ACEOF
20844
20845
20846 fi
20847
20848
20849
20850     REPLACE_NULL=0;
20851   HAVE_MAX_ALIGN_T=1;
20852   HAVE_WCHAR_T=1;
20853
20854
20855
20856 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
20857 if test "x$ac_cv_have_decl_strdup" = xyes; then :
20858   ac_have_decl=1
20859 else
20860   ac_have_decl=0
20861 fi
20862
20863 cat >>confdefs.h <<_ACEOF
20864 #define HAVE_DECL_STRDUP $ac_have_decl
20865 _ACEOF
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880      if test $gl_cv_have_include_next = yes; then
20881        gl_cv_next_string_h='<'string.h'>'
20882      else
20883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20884 $as_echo_n "checking absolute name of <string.h>... " >&6; }
20885 if ${gl_cv_next_string_h+:} false; then :
20886   $as_echo_n "(cached) " >&6
20887 else
20888
20889
20890
20891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20892 /* end confdefs.h.  */
20893 #include <string.h>
20894 _ACEOF
20895                 case "$host_os" in
20896     aix*) gl_absname_cpp="$ac_cpp -C" ;;
20897     *)    gl_absname_cpp="$ac_cpp" ;;
20898   esac
20899
20900   case "$host_os" in
20901     mingw*)
20902                                           gl_dirsep_regex='[/\\]'
20903       ;;
20904     *)
20905       gl_dirsep_regex='\/'
20906       ;;
20907   esac
20908       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20909   gl_header_literal_regex=`echo 'string.h' \
20910                            | sed -e "$gl_make_literal_regex_sed"`
20911   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20912       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20913       s|^/[^/]|//&|
20914       p
20915       q
20916     }'
20917
20918         gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20919   sed -n "$gl_absolute_header_sed"`
20920
20921            gl_header=$gl_cv_absolute_string_h
20922            gl_cv_next_string_h='"'$gl_header'"'
20923
20924
20925 fi
20926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20927 $as_echo "$gl_cv_next_string_h" >&6; }
20928      fi
20929      NEXT_STRING_H=$gl_cv_next_string_h
20930
20931      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20932        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20933        gl_next_as_first_directive='<'string.h'>'
20934      else
20935        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20936        gl_next_as_first_directive=$gl_cv_next_string_h
20937      fi
20938      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20939
20940
20941
20942
20943
20944
20945     for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r      strerror_r strsignal strverscmp; do
20946     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20947     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20948 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20949 if eval \${$as_gl_Symbol+:} false; then :
20950   $as_echo_n "(cached) " >&6
20951 else
20952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20953 /* end confdefs.h.  */
20954 #include <string.h>
20955
20956 int
20957 main ()
20958 {
20959 #undef $gl_func
20960   (void) $gl_func;
20961   ;
20962   return 0;
20963 }
20964 _ACEOF
20965 if ac_fn_c_try_compile "$LINENO"; then :
20966   eval "$as_gl_Symbol=yes"
20967 else
20968   eval "$as_gl_Symbol=no"
20969 fi
20970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20971 fi
20972 eval ac_res=\$$as_gl_Symbol
20973                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20974 $as_echo "$ac_res" >&6; }
20975     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20976   cat >>confdefs.h <<_ACEOF
20977 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20978 _ACEOF
20979
20980                      eval ac_cv_have_decl_$gl_func=yes
20981 fi
20982       done
20983
20984
20985 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
20986 if test "x$ac_cv_have_decl_strndup" = xyes; then :
20987   ac_have_decl=1
20988 else
20989   ac_have_decl=0
20990 fi
20991
20992 cat >>confdefs.h <<_ACEOF
20993 #define HAVE_DECL_STRNDUP $ac_have_decl
20994 _ACEOF
20995
20996
20997
20998 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
20999 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
21000   ac_have_decl=1
21001 else
21002   ac_have_decl=0
21003 fi
21004
21005 cat >>confdefs.h <<_ACEOF
21006 #define HAVE_DECL_STRNLEN $ac_have_decl
21007 _ACEOF
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031      if test $gl_cv_have_include_next = yes; then
21032        gl_cv_next_sys_types_h='<'sys/types.h'>'
21033      else
21034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
21035 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
21036 if ${gl_cv_next_sys_types_h+:} false; then :
21037   $as_echo_n "(cached) " >&6
21038 else
21039
21040
21041
21042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21043 /* end confdefs.h.  */
21044 #include <sys/types.h>
21045 _ACEOF
21046                 case "$host_os" in
21047     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21048     *)    gl_absname_cpp="$ac_cpp" ;;
21049   esac
21050
21051   case "$host_os" in
21052     mingw*)
21053                                           gl_dirsep_regex='[/\\]'
21054       ;;
21055     *)
21056       gl_dirsep_regex='\/'
21057       ;;
21058   esac
21059       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21060   gl_header_literal_regex=`echo 'sys/types.h' \
21061                            | sed -e "$gl_make_literal_regex_sed"`
21062   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21063       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21064       s|^/[^/]|//&|
21065       p
21066       q
21067     }'
21068
21069         gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21070   sed -n "$gl_absolute_header_sed"`
21071
21072            gl_header=$gl_cv_absolute_sys_types_h
21073            gl_cv_next_sys_types_h='"'$gl_header'"'
21074
21075
21076 fi
21077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
21078 $as_echo "$gl_cv_next_sys_types_h" >&6; }
21079      fi
21080      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
21081
21082      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21083        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21084        gl_next_as_first_directive='<'sys/types.h'>'
21085      else
21086        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21087        gl_next_as_first_directive=$gl_cv_next_sys_types_h
21088      fi
21089      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102     WINDOWS_STAT_INODES=0
21103
21104
21105
21106
21107   GNULIB_WAITPID=0;
21108
21109
21110
21111
21112   GNULIB_CTIME=0;
21113   GNULIB_MKTIME=0;
21114   GNULIB_LOCALTIME=0;
21115   GNULIB_NANOSLEEP=0;
21116   GNULIB_STRFTIME=0;
21117   GNULIB_STRPTIME=0;
21118   GNULIB_TIMEGM=0;
21119   GNULIB_TIME_R=0;
21120   GNULIB_TIME_RZ=0;
21121   GNULIB_TZSET=0;
21122     HAVE_DECL_LOCALTIME_R=1;
21123   HAVE_NANOSLEEP=1;
21124   HAVE_STRPTIME=1;
21125   HAVE_TIMEGM=1;
21126   HAVE_TZSET=1;
21127     HAVE_TIMEZONE_T=0;
21128         REPLACE_CTIME=GNULIB_PORTCHECK;
21129   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21130   REPLACE_MKTIME=GNULIB_PORTCHECK;
21131   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21132   REPLACE_STRFTIME=GNULIB_PORTCHECK;
21133   REPLACE_TIMEGM=GNULIB_PORTCHECK;
21134   REPLACE_TZSET=GNULIB_PORTCHECK;
21135
21136       : ${GNULIB_GETTIMEOFDAY=0};
21137         REPLACE_GMTIME=0;
21138   REPLACE_LOCALTIME=0;
21139
21140
21141
21142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21143 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21144 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
21145   $as_echo_n "(cached) " >&6
21146 else
21147   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21148 /* end confdefs.h.  */
21149 #include <time.h>
21150
21151 int
21152 main ()
21153 {
21154 static struct timespec x; x.tv_sec = x.tv_nsec;
21155   ;
21156   return 0;
21157 }
21158 _ACEOF
21159 if ac_fn_c_try_compile "$LINENO"; then :
21160   gl_cv_sys_struct_timespec_in_time_h=yes
21161 else
21162   gl_cv_sys_struct_timespec_in_time_h=no
21163 fi
21164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21165 fi
21166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21167 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
21168
21169   TIME_H_DEFINES_STRUCT_TIMESPEC=0
21170   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21171   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21172   UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
21173   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21174     TIME_H_DEFINES_STRUCT_TIMESPEC=1
21175   else
21176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21177 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21178 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
21179   $as_echo_n "(cached) " >&6
21180 else
21181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21182 /* end confdefs.h.  */
21183 #include <sys/time.h>
21184
21185 int
21186 main ()
21187 {
21188 static struct timespec x; x.tv_sec = x.tv_nsec;
21189   ;
21190   return 0;
21191 }
21192 _ACEOF
21193 if ac_fn_c_try_compile "$LINENO"; then :
21194   gl_cv_sys_struct_timespec_in_sys_time_h=yes
21195 else
21196   gl_cv_sys_struct_timespec_in_sys_time_h=no
21197 fi
21198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21199 fi
21200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21201 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21202     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21203       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21204     else
21205       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21206 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21207 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
21208   $as_echo_n "(cached) " >&6
21209 else
21210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21211 /* end confdefs.h.  */
21212 #include <pthread.h>
21213
21214 int
21215 main ()
21216 {
21217 static struct timespec x; x.tv_sec = x.tv_nsec;
21218   ;
21219   return 0;
21220 }
21221 _ACEOF
21222 if ac_fn_c_try_compile "$LINENO"; then :
21223   gl_cv_sys_struct_timespec_in_pthread_h=yes
21224 else
21225   gl_cv_sys_struct_timespec_in_pthread_h=no
21226 fi
21227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21228 fi
21229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21230 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21231       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21232         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21233       else
21234         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
21235 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
21236 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
21237   $as_echo_n "(cached) " >&6
21238 else
21239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21240 /* end confdefs.h.  */
21241 #include <unistd.h>
21242
21243 int
21244 main ()
21245 {
21246 static struct timespec x; x.tv_sec = x.tv_nsec;
21247   ;
21248   return 0;
21249 }
21250 _ACEOF
21251 if ac_fn_c_try_compile "$LINENO"; then :
21252   gl_cv_sys_struct_timespec_in_unistd_h=yes
21253 else
21254   gl_cv_sys_struct_timespec_in_unistd_h=no
21255 fi
21256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21257 fi
21258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
21259 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
21260         if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
21261           UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
21262         fi
21263       fi
21264     fi
21265   fi
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282      if test $gl_cv_have_include_next = yes; then
21283        gl_cv_next_time_h='<'time.h'>'
21284      else
21285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21286 $as_echo_n "checking absolute name of <time.h>... " >&6; }
21287 if ${gl_cv_next_time_h+:} false; then :
21288   $as_echo_n "(cached) " >&6
21289 else
21290
21291
21292
21293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21294 /* end confdefs.h.  */
21295 #include <time.h>
21296 _ACEOF
21297                 case "$host_os" in
21298     aix*) gl_absname_cpp="$ac_cpp -C" ;;
21299     *)    gl_absname_cpp="$ac_cpp" ;;
21300   esac
21301
21302   case "$host_os" in
21303     mingw*)
21304                                           gl_dirsep_regex='[/\\]'
21305       ;;
21306     *)
21307       gl_dirsep_regex='\/'
21308       ;;
21309   esac
21310       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21311   gl_header_literal_regex=`echo 'time.h' \
21312                            | sed -e "$gl_make_literal_regex_sed"`
21313   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21314       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21315       s|^/[^/]|//&|
21316       p
21317       q
21318     }'
21319
21320         gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21321   sed -n "$gl_absolute_header_sed"`
21322
21323            gl_header=$gl_cv_absolute_time_h
21324            gl_cv_next_time_h='"'$gl_header'"'
21325
21326
21327 fi
21328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21329 $as_echo "$gl_cv_next_time_h" >&6; }
21330      fi
21331      NEXT_TIME_H=$gl_cv_next_time_h
21332
21333      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21334        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21335        gl_next_as_first_directive='<'time.h'>'
21336      else
21337        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21338        gl_next_as_first_directive=$gl_cv_next_time_h
21339      fi
21340      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
21356 i\
21357 0
21358 q
21359 '
21360 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
21361 i\
21362 0
21363 q
21364 '
21365 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
21366 i\
21367 0
21368 q
21369 '
21370
21371
21372   if test "$HAVE_LIBUNISTRING" = yes; then
21373     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
21374     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
21375     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
21376   fi
21377
21378 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
21379 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
21380   ac_have_decl=1
21381 else
21382   ac_have_decl=0
21383 fi
21384
21385 cat >>confdefs.h <<_ACEOF
21386 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
21387 _ACEOF
21388
21389 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
21390 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
21391   ac_have_decl=1
21392 else
21393   ac_have_decl=0
21394 fi
21395
21396 cat >>confdefs.h <<_ACEOF
21397 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
21398 _ACEOF
21399
21400 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
21401 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
21402   ac_have_decl=1
21403 else
21404   ac_have_decl=0
21405 fi
21406
21407 cat >>confdefs.h <<_ACEOF
21408 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
21409 _ACEOF
21410
21411 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
21412 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
21413   ac_have_decl=1
21414 else
21415   ac_have_decl=0
21416 fi
21417
21418 cat >>confdefs.h <<_ACEOF
21419 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
21420 _ACEOF
21421
21422 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
21423 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
21424   ac_have_decl=1
21425 else
21426   ac_have_decl=0
21427 fi
21428
21429 cat >>confdefs.h <<_ACEOF
21430 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
21431 _ACEOF
21432
21433 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
21434 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
21435   ac_have_decl=1
21436 else
21437   ac_have_decl=0
21438 fi
21439
21440 cat >>confdefs.h <<_ACEOF
21441 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
21442 _ACEOF
21443
21444 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
21445 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
21446   ac_have_decl=1
21447 else
21448   ac_have_decl=0
21449 fi
21450
21451 cat >>confdefs.h <<_ACEOF
21452 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
21453 _ACEOF
21454
21455 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
21456 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
21457   ac_have_decl=1
21458 else
21459   ac_have_decl=0
21460 fi
21461
21462 cat >>confdefs.h <<_ACEOF
21463 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
21464 _ACEOF
21465
21466 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
21467 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
21468   ac_have_decl=1
21469 else
21470   ac_have_decl=0
21471 fi
21472
21473 cat >>confdefs.h <<_ACEOF
21474 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
21475 _ACEOF
21476
21477 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
21478 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
21479   ac_have_decl=1
21480 else
21481   ac_have_decl=0
21482 fi
21483
21484 cat >>confdefs.h <<_ACEOF
21485 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
21486 _ACEOF
21487
21488 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
21489 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
21490   ac_have_decl=1
21491 else
21492   ac_have_decl=0
21493 fi
21494
21495 cat >>confdefs.h <<_ACEOF
21496 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
21497 _ACEOF
21498
21499 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
21500 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
21501   ac_have_decl=1
21502 else
21503   ac_have_decl=0
21504 fi
21505
21506 cat >>confdefs.h <<_ACEOF
21507 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
21508 _ACEOF
21509
21510 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21511 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
21512   ac_have_decl=1
21513 else
21514   ac_have_decl=0
21515 fi
21516
21517 cat >>confdefs.h <<_ACEOF
21518 #define HAVE_DECL_UNSETENV $ac_have_decl
21519 _ACEOF
21520
21521 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
21522 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
21523   ac_have_decl=1
21524 else
21525   ac_have_decl=0
21526 fi
21527
21528 cat >>confdefs.h <<_ACEOF
21529 #define HAVE_DECL_VSNPRINTF $ac_have_decl
21530 _ACEOF
21531
21532
21533             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
21534 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
21535 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
21536   $as_echo_n "(cached) " >&6
21537 else
21538   gl_cv_header_wchar_h_correct_inline=yes
21539      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21540 /* end confdefs.h.  */
21541
21542        #define wcstod renamed_wcstod
21543 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21544    <wchar.h>.
21545    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21546    included before <wchar.h>.  */
21547 #include <stddef.h>
21548 #include <stdio.h>
21549 #include <time.h>
21550 #include <wchar.h>
21551 extern int zero (void);
21552 int main () { return zero(); }
21553
21554 _ACEOF
21555                               save_ac_compile="$ac_compile"
21556      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
21557      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21558   (eval $ac_compile) 2>&5
21559   ac_status=$?
21560   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21561   test $ac_status = 0; }; then
21562        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21563 /* end confdefs.h.  */
21564
21565          #define wcstod renamed_wcstod
21566 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21567    <wchar.h>.
21568    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21569    included before <wchar.h>.  */
21570 #include <stddef.h>
21571 #include <stdio.h>
21572 #include <time.h>
21573 #include <wchar.h>
21574 int zero (void) { return 0; }
21575
21576 _ACEOF
21577               ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
21578        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21579   (eval $ac_compile) 2>&5
21580   ac_status=$?
21581   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21582   test $ac_status = 0; }; then
21583          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
21584            :
21585          else
21586            gl_cv_header_wchar_h_correct_inline=no
21587          fi
21588        fi
21589      fi
21590      ac_compile="$save_ac_compile"
21591      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
21592
21593 fi
21594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
21595 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
21596   if test $gl_cv_header_wchar_h_correct_inline = no; then
21597     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
21598 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
21599 C99 mode. You have four options:
21600   - Add the flag -fgnu89-inline to CC and reconfigure, or
21601   - Fix your include files, using parts of
21602     <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
21603   - Use a gcc version older than 4.3, or
21604   - Don't use the flags -std=c99 or -std=gnu99.
21605 Configuration aborted." "$LINENO" 5
21606   fi
21607
21608
21609
21610
21611
21612   if test $ac_cv_header_crtdefs_h = yes; then
21613     HAVE_CRTDEFS_H=1
21614   else
21615     HAVE_CRTDEFS_H=0
21616   fi
21617
21618
21619
21620   GNULIB_ISWBLANK=0;
21621   GNULIB_WCTYPE=0;
21622   GNULIB_ISWCTYPE=0;
21623   GNULIB_WCTRANS=0;
21624   GNULIB_TOWCTRANS=0;
21625     HAVE_ISWBLANK=1;
21626   HAVE_WCTYPE_T=1;
21627   HAVE_WCTRANS_T=1;
21628   REPLACE_ISWBLANK=0;
21629
21630
21631
21632
21633
21634
21635
21636
21637    if false; then
21638   GL_COND_LIBTOOL_TRUE=
21639   GL_COND_LIBTOOL_FALSE='#'
21640 else
21641   GL_COND_LIBTOOL_TRUE='#'
21642   GL_COND_LIBTOOL_FALSE=
21643 fi
21644
21645   gl_cond_libtool=false
21646   gl_libdeps=
21647   gl_ltlibdeps=
21648   gl_m4_base='m4'
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658   gl_source_base='lib'
21659
21660
21661   if test $ac_cv_func_alloca_works = no; then
21662     :
21663   fi
21664
21665   # Define an additional variable used in the Makefile substitution.
21666   if test $ac_cv_working_alloca_h = yes; then
21667     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21668 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21669 if ${gl_cv_rpl_alloca+:} false; then :
21670   $as_echo_n "(cached) " >&6
21671 else
21672
21673       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21674 /* end confdefs.h.  */
21675
21676 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
21677         Need own alloca
21678 #endif
21679
21680 _ACEOF
21681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21682   $EGREP "Need own alloca" >/dev/null 2>&1; then :
21683   gl_cv_rpl_alloca=yes
21684 else
21685   gl_cv_rpl_alloca=no
21686 fi
21687 rm -f conftest*
21688
21689
21690 fi
21691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
21692 $as_echo "$gl_cv_rpl_alloca" >&6; }
21693     if test $gl_cv_rpl_alloca = yes; then
21694
21695 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
21696
21697       ALLOCA_H=alloca.h
21698     else
21699                   ALLOCA_H=
21700     fi
21701   else
21702     ALLOCA_H=alloca.h
21703   fi
21704
21705    if test -n "$ALLOCA_H"; then
21706   GL_GENERATE_ALLOCA_H_TRUE=
21707   GL_GENERATE_ALLOCA_H_FALSE='#'
21708 else
21709   GL_GENERATE_ALLOCA_H_TRUE='#'
21710   GL_GENERATE_ALLOCA_H_FALSE=
21711 fi
21712
21713
21714
21715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
21716 $as_echo_n "checking whether to enable assertions... " >&6; }
21717   # Check whether --enable-assert was given.
21718 if test "${enable_assert+set}" = set; then :
21719   enableval=$enable_assert; if test "x$enableval" = xno; then :
21720
21721 $as_echo "#define NDEBUG 1" >>confdefs.h
21722
21723 elif test "x$enableval" != xyes; then :
21724   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
21725 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
21726       enable_assert=yes
21727 fi
21728 else
21729   enable_assert=yes
21730 fi
21731
21732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
21733 $as_echo "$enable_assert" >&6; }
21734
21735
21736
21737
21738   if test $gl_cv_func_malloc_posix = yes; then
21739
21740 $as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
21741
21742   else
21743     REPLACE_CALLOC=1
21744   fi
21745
21746   if test $REPLACE_CALLOC = 1; then
21747
21748
21749
21750
21751
21752
21753
21754
21755   gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
21756
21757   fi
21758
21759
21760
21761
21762
21763           GNULIB_CALLOC_POSIX=1
21764
21765
21766
21767
21768
21769 $as_echo "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
21770
21771
21772
21773
21774
21775 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
21776
21777
21778
21779
21780
21781
21782     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21783       REPLACE_CLOSE=1
21784     fi
21785
21786
21787
21788
21789
21790
21791   if test $ac_cv_header_sys_socket_h != yes; then
21792                     for ac_header in winsock2.h
21793 do :
21794   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21795 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21796   cat >>confdefs.h <<_ACEOF
21797 #define HAVE_WINSOCK2_H 1
21798 _ACEOF
21799
21800 fi
21801
21802 done
21803
21804   fi
21805   if test "$ac_cv_header_winsock2_h" = yes; then
21806     HAVE_WINSOCK2_H=1
21807     UNISTD_H_HAVE_WINSOCK2_H=1
21808     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21809   else
21810     HAVE_WINSOCK2_H=0
21811   fi
21812
21813
21814     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21815                         REPLACE_CLOSE=1
21816     fi
21817
21818
21819
21820   if test $REPLACE_CLOSE = 1; then
21821
21822
21823
21824
21825
21826
21827
21828
21829   gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
21830
21831   fi
21832
21833
21834
21835
21836
21837           GNULIB_CLOSE=1
21838
21839
21840
21841
21842
21843 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21844
21845
21846
21847
21848   :
21849
21850
21851
21852 cat >>confdefs.h <<_ACEOF
21853 #define GNULIB_CLOSE_STREAM 1
21854 _ACEOF
21855
21856
21857
21858   :
21859
21860
21861
21862           if test "x$datarootdir" = x; then
21863     datarootdir='${datadir}'
21864
21865   fi
21866     if test "x$docdir" = x; then
21867     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
21868
21869   fi
21870     if test "x$htmldir" = x; then
21871     htmldir='${docdir}'
21872
21873   fi
21874   if test "x$dvidir" = x; then
21875     dvidir='${docdir}'
21876
21877   fi
21878   if test "x$pdfdir" = x; then
21879     pdfdir='${docdir}'
21880
21881   fi
21882   if test "x$psdir" = x; then
21883     psdir='${docdir}'
21884
21885   fi
21886   if test "x$lispdir" = x; then
21887     lispdir='${datarootdir}/emacs/site-lisp'
21888
21889   fi
21890   if test "x$localedir" = x; then
21891     localedir='${datarootdir}/locale'
21892
21893   fi
21894     if test "x$runstatedir" = x; then
21895     runstatedir='${localstatedir}/run'
21896
21897   fi
21898
21899       pkglibexecdir='${libexecdir}/${PACKAGE}'
21900
21901
21902
21903
21904
21905
21906
21907 cat >>confdefs.h <<_ACEOF
21908 #define GNULIB_DIRNAME 1
21909 _ACEOF
21910
21911
21912
21913
21914
21915
21916
21917
21918   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21919 $as_echo_n "checking whether // is distinct from /... " >&6; }
21920 if ${gl_cv_double_slash_root+:} false; then :
21921   $as_echo_n "(cached) " >&6
21922 else
21923    if test x"$cross_compiling" = xyes ; then
21924         # When cross-compiling, there is no way to tell whether // is special
21925         # short of a list of hosts.  However, the only known hosts to date
21926         # that have a distinct // are Apollo DomainOS (too old to port to),
21927         # Cygwin, and z/OS.  If anyone knows of another system for which // has
21928         # special semantics and is distinct from /, please report it to
21929         # <bug-gnulib@gnu.org>.
21930         case $host in
21931           *-cygwin | i370-ibm-openedition)
21932             gl_cv_double_slash_root=yes ;;
21933           *)
21934             # Be optimistic and assume that / and // are the same when we
21935             # don't know.
21936             gl_cv_double_slash_root='unknown, assuming no' ;;
21937         esac
21938       else
21939         set x `ls -di / // 2>/dev/null`
21940         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
21941           gl_cv_double_slash_root=no
21942         else
21943           gl_cv_double_slash_root=yes
21944         fi
21945       fi
21946 fi
21947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
21948 $as_echo "$gl_cv_double_slash_root" >&6; }
21949   if test "$gl_cv_double_slash_root" = yes; then
21950
21951 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
21952
21953   fi
21954
21955
21956
21957
21958
21959
21960 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
21961
21962
21963   if test $HAVE_DUP2 = 1; then
21964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21965 $as_echo_n "checking whether dup2 works... " >&6; }
21966 if ${gl_cv_func_dup2_works+:} false; then :
21967   $as_echo_n "(cached) " >&6
21968 else
21969   if test "$cross_compiling" = yes; then :
21970   case "$host_os" in
21971            mingw*) # on this platform, dup2 always returns 0 for success
21972              gl_cv_func_dup2_works="guessing no" ;;
21973            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21974              gl_cv_func_dup2_works="guessing no" ;;
21975            aix* | freebsd*)
21976                    # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
21977                    # not EBADF.
21978              gl_cv_func_dup2_works="guessing no" ;;
21979            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21980              gl_cv_func_dup2_works="guessing no" ;;
21981            *-android*) # implemented using dup3(), which fails if oldfd == newfd
21982              gl_cv_func_dup2_works="guessing no" ;;
21983            os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
21984              gl_cv_func_dup2_works="guessing no" ;;
21985            *) gl_cv_func_dup2_works="guessing yes" ;;
21986          esac
21987 else
21988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21989 /* end confdefs.h.  */
21990
21991          #include <errno.h>
21992              #include <fcntl.h>
21993              #include <limits.h>
21994              #include <sys/resource.h>
21995              #include <unistd.h>
21996              #ifndef RLIM_SAVED_CUR
21997              # define RLIM_SAVED_CUR RLIM_INFINITY
21998              #endif
21999              #ifndef RLIM_SAVED_MAX
22000              # define RLIM_SAVED_MAX RLIM_INFINITY
22001              #endif
22002
22003 int
22004 main ()
22005 {
22006 int result = 0;
22007              int bad_fd = INT_MAX;
22008              struct rlimit rlim;
22009              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
22010                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
22011                  && rlim.rlim_cur != RLIM_INFINITY
22012                  && rlim.rlim_cur != RLIM_SAVED_MAX
22013                  && rlim.rlim_cur != RLIM_SAVED_CUR)
22014                bad_fd = rlim.rlim_cur;
22015              #ifdef FD_CLOEXEC
22016                if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22017                  result |= 1;
22018              #endif
22019              if (dup2 (1, 1) != 1)
22020                result |= 2;
22021              #ifdef FD_CLOEXEC
22022                if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22023                  result |= 4;
22024              #endif
22025              close (0);
22026              if (dup2 (0, 0) != -1)
22027                result |= 8;
22028              /* Many gnulib modules require POSIX conformance of EBADF.  */
22029              if (dup2 (2, bad_fd) == -1 && errno != EBADF)
22030                result |= 16;
22031              /* Flush out some cygwin core dumps.  */
22032              if (dup2 (2, -1) != -1 || errno != EBADF)
22033                result |= 32;
22034              dup2 (2, 255);
22035              dup2 (2, 256);
22036              /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
22037              {
22038                int fd = open (".", O_RDONLY);
22039                if (fd == -1)
22040                  result |= 64;
22041                else if (dup2 (fd, fd + 1) == -1)
22042                  result |= 128;
22043
22044                close (fd);
22045              }
22046              return result;
22047   ;
22048   return 0;
22049 }
22050
22051 _ACEOF
22052 if ac_fn_c_try_run "$LINENO"; then :
22053   gl_cv_func_dup2_works=yes
22054 else
22055   gl_cv_func_dup2_works=no
22056 fi
22057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22058   conftest.$ac_objext conftest.beam conftest.$ac_ext
22059 fi
22060
22061
22062 fi
22063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22064 $as_echo "$gl_cv_func_dup2_works" >&6; }
22065     case "$gl_cv_func_dup2_works" in
22066       *yes) ;;
22067       *)
22068         REPLACE_DUP2=1
22069         for ac_func in setdtablesize
22070 do :
22071   ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
22072 if test "x$ac_cv_func_setdtablesize" = xyes; then :
22073   cat >>confdefs.h <<_ACEOF
22074 #define HAVE_SETDTABLESIZE 1
22075 _ACEOF
22076
22077 fi
22078 done
22079
22080         ;;
22081     esac
22082   fi
22083
22084
22085   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22086
22087
22088
22089
22090
22091
22092
22093
22094   gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22095
22096
22097   fi
22098
22099
22100
22101
22102
22103           GNULIB_DUP2=1
22104
22105
22106
22107
22108
22109 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119           GNULIB_ENVIRON=1
22120
22121
22122
22123
22124
22125 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
22126
22127
22128
22129
22130
22131       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
22132 $as_echo_n "checking for error_at_line... " >&6; }
22133 if ${ac_cv_lib_error_at_line+:} false; then :
22134   $as_echo_n "(cached) " >&6
22135 else
22136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22137 /* end confdefs.h.  */
22138 #include <error.h>
22139 int
22140 main ()
22141 {
22142 error_at_line (0, 0, "", 0, "an error occurred");
22143   ;
22144   return 0;
22145 }
22146 _ACEOF
22147 if ac_fn_c_try_link "$LINENO"; then :
22148   ac_cv_lib_error_at_line=yes
22149 else
22150   ac_cv_lib_error_at_line=no
22151 fi
22152 rm -f core conftest.err conftest.$ac_objext \
22153     conftest$ac_exeext conftest.$ac_ext
22154 fi
22155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
22156 $as_echo "$ac_cv_lib_error_at_line" >&6; }
22157
22158   if test $ac_cv_lib_error_at_line = no; then
22159
22160
22161
22162
22163
22164
22165
22166
22167   gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
22168
22169
22170
22171   :
22172
22173   fi
22174
22175
22176   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
22177
22178
22179
22180   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
22181
22182
22183
22184
22185
22186   :
22187
22188
22189
22190
22191
22192
22193   if test $ac_cv_func_fcntl = no; then
22194
22195
22196
22197   if test $ac_cv_func_fcntl = no; then
22198     HAVE_FCNTL=0
22199   else
22200     REPLACE_FCNTL=1
22201   fi
22202
22203   else
22204             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22205 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22206 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
22207   $as_echo_n "(cached) " >&6
22208 else
22209   if test "$cross_compiling" = yes; then :
22210   case $host_os in
22211             aix* | cygwin* | haiku*)
22212                gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
22213             *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
22214           esac
22215 else
22216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22217 /* end confdefs.h.  */
22218 #include <errno.h>
22219               #include <fcntl.h>
22220               #include <limits.h>
22221               #include <sys/resource.h>
22222               #include <unistd.h>
22223               #ifndef RLIM_SAVED_CUR
22224               # define RLIM_SAVED_CUR RLIM_INFINITY
22225               #endif
22226               #ifndef RLIM_SAVED_MAX
22227               # define RLIM_SAVED_MAX RLIM_INFINITY
22228               #endif
22229
22230 int
22231 main ()
22232 {
22233 int result = 0;
22234               int bad_fd = INT_MAX;
22235               struct rlimit rlim;
22236               if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
22237                   && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
22238                   && rlim.rlim_cur != RLIM_INFINITY
22239                   && rlim.rlim_cur != RLIM_SAVED_MAX
22240                   && rlim.rlim_cur != RLIM_SAVED_CUR)
22241                 bad_fd = rlim.rlim_cur;
22242               if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22243               if (errno != EINVAL) result |= 2;
22244               if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
22245               if (errno != EINVAL) result |= 8;
22246               /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
22247               {
22248                 int fd;
22249                 fd = open (".", O_RDONLY);
22250                 if (fd == -1)
22251                   result |= 16;
22252                 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
22253                   result |= 32;
22254
22255                 close (fd);
22256               }
22257               return result;
22258   ;
22259   return 0;
22260 }
22261 _ACEOF
22262 if ac_fn_c_try_run "$LINENO"; then :
22263   gl_cv_func_fcntl_f_dupfd_works=yes
22264 else
22265   gl_cv_func_fcntl_f_dupfd_works=no
22266 fi
22267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22268   conftest.$ac_objext conftest.beam conftest.$ac_ext
22269 fi
22270
22271 fi
22272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22273 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22274     case $gl_cv_func_fcntl_f_dupfd_works in
22275       *yes) ;;
22276       *)
22277
22278
22279   if test $ac_cv_func_fcntl = no; then
22280     HAVE_FCNTL=0
22281   else
22282     REPLACE_FCNTL=1
22283   fi
22284
22285
22286 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22287  ;;
22288     esac
22289
22290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22291 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22292 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
22293   $as_echo_n "(cached) " >&6
22294 else
22295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22296 /* end confdefs.h.  */
22297
22298 #include <fcntl.h>
22299 #ifndef F_DUPFD_CLOEXEC
22300 choke me
22301 #endif
22302
22303 int
22304 main ()
22305 {
22306
22307   ;
22308   return 0;
22309 }
22310 _ACEOF
22311 if ac_fn_c_try_compile "$LINENO"; then :
22312   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22313 /* end confdefs.h.  */
22314
22315 #ifdef __linux__
22316 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22317    it to support the semantics on older kernels that failed with EINVAL.  */
22318 choke me
22319 #endif
22320
22321 int
22322 main ()
22323 {
22324
22325   ;
22326   return 0;
22327 }
22328 _ACEOF
22329 if ac_fn_c_try_compile "$LINENO"; then :
22330   gl_cv_func_fcntl_f_dupfd_cloexec=yes
22331 else
22332   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22333 fi
22334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22335 else
22336   gl_cv_func_fcntl_f_dupfd_cloexec=no
22337 fi
22338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22339 fi
22340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22341 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22342     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22343
22344
22345
22346   if test $ac_cv_func_fcntl = no; then
22347     HAVE_FCNTL=0
22348   else
22349     REPLACE_FCNTL=1
22350   fi
22351
22352           fi
22353   fi
22354
22355
22356   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22357
22358
22359
22360
22361
22362
22363
22364
22365   gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22366
22367   fi
22368
22369
22370
22371
22372
22373           GNULIB_FCNTL=1
22374
22375
22376
22377
22378
22379 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394      if test $gl_cv_have_include_next = yes; then
22395        gl_cv_next_fcntl_h='<'fcntl.h'>'
22396      else
22397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22398 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22399 if ${gl_cv_next_fcntl_h+:} false; then :
22400   $as_echo_n "(cached) " >&6
22401 else
22402
22403
22404
22405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22406 /* end confdefs.h.  */
22407 #include <fcntl.h>
22408 _ACEOF
22409                 case "$host_os" in
22410     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22411     *)    gl_absname_cpp="$ac_cpp" ;;
22412   esac
22413
22414   case "$host_os" in
22415     mingw*)
22416                                           gl_dirsep_regex='[/\\]'
22417       ;;
22418     *)
22419       gl_dirsep_regex='\/'
22420       ;;
22421   esac
22422       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22423   gl_header_literal_regex=`echo 'fcntl.h' \
22424                            | sed -e "$gl_make_literal_regex_sed"`
22425   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22426       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22427       s|^/[^/]|//&|
22428       p
22429       q
22430     }'
22431
22432         gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22433   sed -n "$gl_absolute_header_sed"`
22434
22435            gl_header=$gl_cv_absolute_fcntl_h
22436            gl_cv_next_fcntl_h='"'$gl_header'"'
22437
22438
22439 fi
22440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22441 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22442      fi
22443      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22444
22445      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22446        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22447        gl_next_as_first_directive='<'fcntl.h'>'
22448      else
22449        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22450        gl_next_as_first_directive=$gl_cv_next_fcntl_h
22451      fi
22452      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463     for gl_func in fcntl openat; do
22464     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22465     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22466 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22467 if eval \${$as_gl_Symbol+:} false; then :
22468   $as_echo_n "(cached) " >&6
22469 else
22470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22471 /* end confdefs.h.  */
22472 #include <fcntl.h>
22473
22474 int
22475 main ()
22476 {
22477 #undef $gl_func
22478   (void) $gl_func;
22479   ;
22480   return 0;
22481 }
22482 _ACEOF
22483 if ac_fn_c_try_compile "$LINENO"; then :
22484   eval "$as_gl_Symbol=yes"
22485 else
22486   eval "$as_gl_Symbol=no"
22487 fi
22488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22489 fi
22490 eval ac_res=\$$as_gl_Symbol
22491                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22492 $as_echo "$ac_res" >&6; }
22493     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22494   cat >>confdefs.h <<_ACEOF
22495 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22496 _ACEOF
22497
22498                      eval ac_cv_have_decl_$gl_func=yes
22499 fi
22500       done
22501
22502
22503
22504
22505 cat >>confdefs.h <<_ACEOF
22506 #define GNULIB_FD_SAFER_FLAG 1
22507 _ACEOF
22508
22509
22510
22511
22512
22513   FLOAT_H=
22514   REPLACE_FLOAT_LDBL=0
22515   case "$host_os" in
22516     aix* | beos* | openbsd* | mirbsd* | irix*)
22517       FLOAT_H=float.h
22518       ;;
22519     freebsd* | dragonfly*)
22520       case "$host_cpu" in
22521         i[34567]86 )
22522           FLOAT_H=float.h
22523           ;;
22524         x86_64 )
22525           # On x86_64 systems, the C compiler may still be generating
22526           # 32-bit code.
22527           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22528 /* end confdefs.h.  */
22529 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
22530                   int ok;
22531                  #else
22532                   error fail
22533                  #endif
22534
22535 _ACEOF
22536 if ac_fn_c_try_compile "$LINENO"; then :
22537
22538 else
22539   FLOAT_H=float.h
22540 fi
22541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22542           ;;
22543       esac
22544       ;;
22545     linux*)
22546       case "$host_cpu" in
22547         powerpc*)
22548           FLOAT_H=float.h
22549           ;;
22550       esac
22551       ;;
22552   esac
22553   case "$host_os" in
22554     aix* | freebsd* | dragonfly* | linux*)
22555       if test -n "$FLOAT_H"; then
22556         REPLACE_FLOAT_LDBL=1
22557       fi
22558       ;;
22559   esac
22560
22561     REPLACE_ITOLD=0
22562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
22563 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
22564 if ${gl_cv_func_itold_works+:} false; then :
22565   $as_echo_n "(cached) " >&6
22566 else
22567
22568       if test "$cross_compiling" = yes; then :
22569   case "$host" in
22570            sparc*-*-linux*)
22571              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22572 /* end confdefs.h.  */
22573 #if defined __LP64__ || defined __arch64__
22574                     int ok;
22575                    #else
22576                     error fail
22577                    #endif
22578
22579 _ACEOF
22580 if ac_fn_c_try_compile "$LINENO"; then :
22581   gl_cv_func_itold_works="guessing no"
22582 else
22583   gl_cv_func_itold_works="guessing yes"
22584 fi
22585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22586              ;;
22587                    # Guess yes on native Windows.
22588            mingw*) gl_cv_func_itold_works="guessing yes" ;;
22589            *)      gl_cv_func_itold_works="guessing yes" ;;
22590          esac
22591
22592 else
22593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22594 /* end confdefs.h.  */
22595
22596 int i = -1;
22597 volatile long double ld;
22598 int main ()
22599 {
22600   ld += i * 1.0L;
22601   if (ld > 0)
22602     return 1;
22603   return 0;
22604 }
22605 _ACEOF
22606 if ac_fn_c_try_run "$LINENO"; then :
22607   gl_cv_func_itold_works=yes
22608 else
22609   gl_cv_func_itold_works=no
22610 fi
22611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22612   conftest.$ac_objext conftest.beam conftest.$ac_ext
22613 fi
22614
22615
22616 fi
22617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
22618 $as_echo "$gl_cv_func_itold_works" >&6; }
22619   case "$gl_cv_func_itold_works" in
22620     *no)
22621       REPLACE_ITOLD=1
22622                   FLOAT_H=float.h
22623       ;;
22624   esac
22625
22626   if test -n "$FLOAT_H"; then
22627
22628
22629
22630
22631
22632
22633
22634
22635      if test $gl_cv_have_include_next = yes; then
22636        gl_cv_next_float_h='<'float.h'>'
22637      else
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
22639 $as_echo_n "checking absolute name of <float.h>... " >&6; }
22640 if ${gl_cv_next_float_h+:} false; then :
22641   $as_echo_n "(cached) " >&6
22642 else
22643
22644
22645
22646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22647 /* end confdefs.h.  */
22648 #include <float.h>
22649 _ACEOF
22650                 case "$host_os" in
22651     aix*) gl_absname_cpp="$ac_cpp -C" ;;
22652     *)    gl_absname_cpp="$ac_cpp" ;;
22653   esac
22654
22655   case "$host_os" in
22656     mingw*)
22657                                           gl_dirsep_regex='[/\\]'
22658       ;;
22659     *)
22660       gl_dirsep_regex='\/'
22661       ;;
22662   esac
22663       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22664   gl_header_literal_regex=`echo 'float.h' \
22665                            | sed -e "$gl_make_literal_regex_sed"`
22666   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22667       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22668       s|^/[^/]|//&|
22669       p
22670       q
22671     }'
22672
22673         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22674   sed -n "$gl_absolute_header_sed"`
22675
22676            gl_header=$gl_cv_absolute_float_h
22677            gl_cv_next_float_h='"'$gl_header'"'
22678
22679
22680 fi
22681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
22682 $as_echo "$gl_cv_next_float_h" >&6; }
22683      fi
22684      NEXT_FLOAT_H=$gl_cv_next_float_h
22685
22686      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22687        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22688        gl_next_as_first_directive='<'float.h'>'
22689      else
22690        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22691        gl_next_as_first_directive=$gl_cv_next_float_h
22692      fi
22693      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
22694
22695
22696
22697
22698   fi
22699
22700    if test -n "$FLOAT_H"; then
22701   GL_GENERATE_FLOAT_H_TRUE=
22702   GL_GENERATE_FLOAT_H_FALSE='#'
22703 else
22704   GL_GENERATE_FLOAT_H_TRUE='#'
22705   GL_GENERATE_FLOAT_H_FALSE=
22706 fi
22707
22708
22709
22710   if test $REPLACE_FLOAT_LDBL = 1; then
22711
22712
22713
22714
22715
22716
22717
22718
22719   gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
22720
22721   fi
22722   if test $REPLACE_ITOLD = 1; then
22723
22724
22725
22726
22727
22728
22729
22730
22731   gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
22732
22733   fi
22734
22735
22736
22737   case "$host_os" in
22738     mingw* | pw*)
22739             REPLACE_FOPEN=1
22740             gl_cv_func_fopen_slash="guessing no"
22741       ;;
22742     *)
22743                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
22744 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
22745 if ${gl_cv_func_fopen_slash+:} false; then :
22746   $as_echo_n "(cached) " >&6
22747 else
22748
22749           if test "$cross_compiling" = yes; then :
22750
22751              case "$host_os" in
22752                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22753                  gl_cv_func_fopen_slash="guessing no" ;;
22754                *)
22755                  gl_cv_func_fopen_slash="guessing yes" ;;
22756              esac
22757
22758 else
22759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22760 /* end confdefs.h.  */
22761
22762 #include <stddef.h>
22763 #include <stdio.h>
22764 int main ()
22765 {
22766   FILE *fp = fopen ("conftest.sl/", "w");
22767   int result = (fp != NULL);
22768   if (fp != NULL)
22769     fclose (fp);
22770   return result;
22771 }
22772 _ACEOF
22773 if ac_fn_c_try_run "$LINENO"; then :
22774   gl_cv_func_fopen_slash=yes
22775 else
22776   gl_cv_func_fopen_slash=no
22777 fi
22778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22779   conftest.$ac_objext conftest.beam conftest.$ac_ext
22780 fi
22781
22782           rm -f conftest.sl
22783
22784 fi
22785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
22786 $as_echo "$gl_cv_func_fopen_slash" >&6; }
22787       ;;
22788   esac
22789   case "$gl_cv_func_fopen_slash" in
22790     *no)
22791
22792 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22793
22794       REPLACE_FOPEN=1
22795       ;;
22796   esac
22797
22798   if test $REPLACE_FOPEN = 1; then
22799
22800
22801
22802
22803
22804
22805
22806
22807   gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
22808
22809     :
22810   fi
22811
22812
22813
22814
22815
22816           GNULIB_FOPEN=1
22817
22818
22819
22820
22821
22822 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
22823
22824
22825
22826
22827
22828 cat >>confdefs.h <<_ACEOF
22829 #define GNULIB_FOPEN_SAFER 1
22830 _ACEOF
22831
22832
22833
22834
22835   fp_headers='
22836     #include <stdio.h>
22837     #if HAVE_STDIO_EXT_H
22838     # include <stdio_ext.h>
22839     #endif
22840   '
22841   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
22842 $as_echo_n "checking for __fpending... " >&6; }
22843 if ${gl_cv_func___fpending+:} false; then :
22844   $as_echo_n "(cached) " >&6
22845 else
22846
22847       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22848 /* end confdefs.h.  */
22849 $fp_headers
22850 int
22851 main ()
22852 {
22853 return ! __fpending (stdin);
22854   ;
22855   return 0;
22856 }
22857 _ACEOF
22858 if ac_fn_c_try_link "$LINENO"; then :
22859   gl_cv_func___fpending=yes
22860 else
22861   gl_cv_func___fpending=no
22862 fi
22863 rm -f core conftest.err conftest.$ac_objext \
22864     conftest$ac_exeext conftest.$ac_ext
22865
22866 fi
22867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
22868 $as_echo "$gl_cv_func___fpending" >&6; }
22869   if test $gl_cv_func___fpending = yes; then
22870     ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22871 "
22872 if test "x$ac_cv_have_decl___fpending" = xyes; then :
22873   ac_have_decl=1
22874 else
22875   ac_have_decl=0
22876 fi
22877
22878 cat >>confdefs.h <<_ACEOF
22879 #define HAVE_DECL___FPENDING $ac_have_decl
22880 _ACEOF
22881
22882   fi
22883
22884   if test $gl_cv_func___fpending = no; then
22885
22886
22887
22888
22889
22890
22891
22892
22893   gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22894
22895   fi
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911   gl_cv_func_fprintf_posix=no
22912   case "$gl_cv_func_printf_sizes_c99" in
22913     *yes)
22914       case "$gl_cv_func_printf_long_double" in
22915         *yes)
22916           case "$gl_cv_func_printf_infinite" in
22917             *yes)
22918               case "$gl_cv_func_printf_infinite_long_double" in
22919                 *yes)
22920                   case "$gl_cv_func_printf_directive_a" in
22921                     *yes)
22922                       case "$gl_cv_func_printf_directive_f" in
22923                         *yes)
22924                           case "$gl_cv_func_printf_directive_n" in
22925                             *yes)
22926                               case "$gl_cv_func_printf_directive_ls" in
22927                                 *yes)
22928                                   case "$gl_cv_func_printf_positions" in
22929                                     *yes)
22930                                       case "$gl_cv_func_printf_flag_grouping" in
22931                                         *yes)
22932                                           case "$gl_cv_func_printf_flag_leftadjust" in
22933                                             *yes)
22934                                               case "$gl_cv_func_printf_flag_zero" in
22935                                                 *yes)
22936                                                   case "$gl_cv_func_printf_precision" in
22937                                                     *yes)
22938                                                       case "$gl_cv_func_printf_enomem" in
22939                                                         *yes)
22940                                                           # fprintf exists and is
22941                                                           # already POSIX compliant.
22942                                                           gl_cv_func_fprintf_posix=yes
22943                                                           ;;
22944                                                       esac
22945                                                       ;;
22946                                                   esac
22947                                                   ;;
22948                                               esac
22949                                               ;;
22950                                           esac
22951                                           ;;
22952                                       esac
22953                                       ;;
22954                                   esac
22955                                   ;;
22956                               esac
22957                               ;;
22958                           esac
22959                           ;;
22960                       esac
22961                       ;;
22962                   esac
22963                   ;;
22964               esac
22965               ;;
22966           esac
22967           ;;
22968       esac
22969       ;;
22970   esac
22971   if test $gl_cv_func_fprintf_posix = no; then
22972
22973
22974
22975   case "$gl_cv_func_printf_infinite" in
22976     *yes)
22977       ;;
22978     *)
22979
22980 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
22981
22982       ;;
22983   esac
22984
22985
22986
22987
22988   case "$gl_cv_func_printf_long_double" in
22989     *yes)
22990       case "$gl_cv_func_printf_infinite_long_double" in
22991         *yes)
22992           ;;
22993         *)
22994
22995 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
22996
22997           ;;
22998       esac
22999       ;;
23000   esac
23001
23002
23003
23004   case "$gl_cv_func_printf_directive_a" in
23005     *yes)
23006       ;;
23007     *)
23008
23009 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
23010
23011       for ac_func in nl_langinfo
23012 do :
23013   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
23014 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
23015   cat >>confdefs.h <<_ACEOF
23016 #define HAVE_NL_LANGINFO 1
23017 _ACEOF
23018
23019 fi
23020 done
23021
23022       ;;
23023   esac
23024
23025
23026
23027   case "$gl_cv_func_printf_directive_f" in
23028     *yes)
23029       ;;
23030     *)
23031
23032 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
23033
23034       ;;
23035   esac
23036
23037
23038
23039   case "$gl_cv_func_printf_directive_ls" in
23040     *yes)
23041       ;;
23042     *)
23043
23044 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
23045
23046       ;;
23047   esac
23048
23049
23050
23051   case "$gl_cv_func_printf_flag_grouping" in
23052     *yes)
23053       ;;
23054     *)
23055
23056 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
23057
23058       ;;
23059   esac
23060
23061
23062
23063   case "$gl_cv_func_printf_flag_leftadjust" in
23064     *yes)
23065       ;;
23066     *)
23067
23068 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
23069
23070       ;;
23071   esac
23072
23073
23074
23075   case "$gl_cv_func_printf_flag_zero" in
23076     *yes)
23077       ;;
23078     *)
23079
23080 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
23081
23082       ;;
23083   esac
23084
23085
23086
23087   case "$gl_cv_func_printf_precision" in
23088     *yes)
23089       ;;
23090     *)
23091
23092 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
23093
23094
23095 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
23096
23097
23098 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
23099
23100       ;;
23101   esac
23102
23103
23104
23105   case "$gl_cv_func_printf_enomem" in
23106     *yes)
23107       ;;
23108     *)
23109
23110 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
23111
23112
23113 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
23114
23115
23116 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
23117
23118       ;;
23119   esac
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
23162
23163   if test $ac_cv_func_vasnprintf = yes; then
23164
23165 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
23166
23167   fi
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23180 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23181
23182 else
23183
23184 $as_echo "#define ptrdiff_t long" >>confdefs.h
23185
23186
23187 fi
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205   gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext"
23206
23207   REPLACE_FPRINTF=1
23208
23209 $as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h
23210
23211   :
23212
23213   fi
23214
23215
23216
23217
23218
23219
23220           GNULIB_FPRINTF_POSIX=1
23221
23222
23223
23224
23225
23226 $as_echo "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h
23227
23228
23229
23230
23231
23232
23233   if test $gl_cv_func_frexp_no_libm = yes; then
23234
23235
23236
23237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
23238 $as_echo_n "checking whether frexp works... " >&6; }
23239 if ${gl_cv_func_frexp_works+:} false; then :
23240   $as_echo_n "(cached) " >&6
23241 else
23242
23243       if test "$cross_compiling" = yes; then :
23244   case "$host_os" in
23245            netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
23246            mingw*) # Guess yes with MSVC, no with mingw.
23247              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23248 /* end confdefs.h.  */
23249
23250 #ifdef _MSC_VER
23251  Good
23252 #endif
23253
23254 _ACEOF
23255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23256   $EGREP "Good" >/dev/null 2>&1; then :
23257   gl_cv_func_frexp_works="guessing yes"
23258 else
23259   gl_cv_func_frexp_works="guessing no"
23260 fi
23261 rm -f conftest*
23262
23263              ;;
23264            *) gl_cv_func_frexp_works="guessing yes" ;;
23265          esac
23266
23267 else
23268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23269 /* end confdefs.h.  */
23270
23271 #include <float.h>
23272 #include <math.h>
23273 #include <string.h>
23274 #if HAVE_DECL_ALARM
23275 # include <signal.h>
23276 # include <unistd.h>
23277 #endif
23278 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
23279    ICC 10.0 has a bug when optimizing the expression -zero.
23280    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
23281    to PowerPC on Mac OS X 10.5.  */
23282 #if defined __hpux || defined __sgi || defined __ICC
23283 static double
23284 compute_minus_zero (void)
23285 {
23286   return -DBL_MIN * DBL_MIN;
23287 }
23288 # define minus_zero compute_minus_zero ()
23289 #else
23290 double minus_zero = -0.0;
23291 #endif
23292 int main()
23293 {
23294   int result = 0;
23295   int i;
23296   volatile double x;
23297   double zero = 0.0;
23298 #if HAVE_DECL_ALARM
23299   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
23300      number.  Let the test fail in this case.  */
23301   signal (SIGALRM, SIG_DFL);
23302   alarm (5);
23303 #endif
23304   /* Test on denormalized numbers.  */
23305   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
23306     ;
23307   if (x > 0.0)
23308     {
23309       int exp;
23310       double y = frexp (x, &exp);
23311       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
23312          On NetBSD: y = 0.75. Correct: y = 0.5.  */
23313       if (y != 0.5)
23314         result |= 1;
23315     }
23316   /* Test on infinite numbers.  */
23317   x = 1.0 / zero;
23318   {
23319     int exp;
23320     double y = frexp (x, &exp);
23321     if (y != x)
23322       result |= 2;
23323   }
23324   /* Test on negative zero.  */
23325   x = minus_zero;
23326   {
23327     int exp;
23328     double y = frexp (x, &exp);
23329     if (memcmp (&y, &x, sizeof x))
23330       result |= 4;
23331   }
23332   return result;
23333 }
23334 _ACEOF
23335 if ac_fn_c_try_run "$LINENO"; then :
23336   gl_cv_func_frexp_works=yes
23337 else
23338   gl_cv_func_frexp_works=no
23339 fi
23340 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23341   conftest.$ac_objext conftest.beam conftest.$ac_ext
23342 fi
23343
23344
23345 fi
23346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23347 $as_echo "$gl_cv_func_frexp_works" >&6; }
23348
23349     case "$gl_cv_func_frexp_works" in
23350       *yes) gl_func_frexp_no_libm=yes ;;
23351       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
23352     esac
23353   else
23354     gl_func_frexp_no_libm=no
23355         REPLACE_FREXP=1
23356   fi
23357   if test $gl_func_frexp_no_libm = yes; then
23358
23359 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23360
23361   fi
23362
23363   if test $gl_func_frexp_no_libm != yes; then
23364
23365
23366
23367
23368
23369
23370
23371
23372   gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
23373
23374   fi
23375
23376
23377
23378
23379
23380           GNULIB_FREXP=1
23381
23382
23383
23384
23385
23386 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
23387
23388
23389
23390
23391
23392
23393       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
23394 "
23395 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
23396
23397 else
23398   HAVE_DECL_FREXPL=0
23399 fi
23400
23401   if test $HAVE_DECL_FREXPL = 1; then
23402
23403   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
23404 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
23405 if ${gl_cv_func_frexpl_no_libm+:} false; then :
23406   $as_echo_n "(cached) " >&6
23407 else
23408
23409       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23410 /* end confdefs.h.  */
23411 #include <math.h>
23412              long double x;
23413 int
23414 main ()
23415 {
23416 int e; return frexpl (x, &e) > 0;
23417   ;
23418   return 0;
23419 }
23420 _ACEOF
23421 if ac_fn_c_try_link "$LINENO"; then :
23422   gl_cv_func_frexpl_no_libm=yes
23423 else
23424   gl_cv_func_frexpl_no_libm=no
23425 fi
23426 rm -f core conftest.err conftest.$ac_objext \
23427     conftest$ac_exeext conftest.$ac_ext
23428
23429 fi
23430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
23431 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
23432
23433     if test $gl_cv_func_frexpl_no_libm = yes; then
23434
23435
23436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
23437 $as_echo_n "checking whether frexpl works... " >&6; }
23438 if ${gl_cv_func_frexpl_works+:} false; then :
23439   $as_echo_n "(cached) " >&6
23440 else
23441
23442       if test "$cross_compiling" = yes; then :
23443
23444          case "$host_os" in
23445            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
23446               gl_cv_func_frexpl_works="guessing no";;
23447            *) gl_cv_func_frexpl_works="guessing yes";;
23448          esac
23449
23450 else
23451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23452 /* end confdefs.h.  */
23453
23454 #include <float.h>
23455 #include <math.h>
23456 /* Override the values of <float.h>, like done in float.in.h.  */
23457 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
23458 # undef LDBL_MIN_EXP
23459 # define LDBL_MIN_EXP    (-16381)
23460 #endif
23461 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
23462 # undef LDBL_MIN_EXP
23463 # define LDBL_MIN_EXP    (-16381)
23464 #endif
23465 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
23466 # undef LDBL_MIN_EXP
23467 # define LDBL_MIN_EXP DBL_MIN_EXP
23468 #endif
23469 #if defined __sgi && (LDBL_MANT_DIG >= 106)
23470 # if defined __GNUC__
23471 #  undef LDBL_MIN_EXP
23472 #  define LDBL_MIN_EXP DBL_MIN_EXP
23473 # endif
23474 #endif
23475 extern
23476 #ifdef __cplusplus
23477 "C"
23478 #endif
23479 long double frexpl (long double, int *);
23480 int main()
23481 {
23482   int result = 0;
23483   volatile long double x;
23484   /* Test on finite numbers that fails on AIX 5.1.  */
23485   x = 16.0L;
23486   {
23487     int exp = -9999;
23488     frexpl (x, &exp);
23489     if (exp != 5)
23490       result |= 1;
23491   }
23492   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
23493      function returns an invalid (incorrectly normalized) value: it returns
23494                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
23495      but the correct result is
23496           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
23497   x = 1.01L;
23498   {
23499     int exp = -9999;
23500     long double y = frexpl (x, &exp);
23501     if (!(exp == 1 && y == 0.505L))
23502       result |= 2;
23503   }
23504   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
23505      LDBL_MAX_EXP = 16384.
23506      In the loop end test, we test x against Infinity, rather than comparing
23507      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
23508   {
23509     int i;
23510     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
23511       {
23512         int exp = -9999;
23513         frexpl (x, &exp);
23514         if (exp != i)
23515           {
23516             result |= 4;
23517             break;
23518           }
23519       }
23520   }
23521   /* Test on denormalized numbers.  */
23522   {
23523     int i;
23524     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
23525       ;
23526     if (x > 0.0L)
23527       {
23528         int exp;
23529         long double y = frexpl (x, &exp);
23530         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
23531            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
23532         if (exp != LDBL_MIN_EXP - 1)
23533           result |= 8;
23534       }
23535   }
23536   /* Test on infinite numbers.  */
23537   x = 1.0L / 0.0L;
23538   {
23539     int exp;
23540     long double y = frexpl (x, &exp);
23541     if (y != x)
23542       result |= 16;
23543   }
23544   return result;
23545 }
23546 _ACEOF
23547 if ac_fn_c_try_run "$LINENO"; then :
23548   gl_cv_func_frexpl_works=yes
23549 else
23550   gl_cv_func_frexpl_works=no
23551 fi
23552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23553   conftest.$ac_objext conftest.beam conftest.$ac_ext
23554 fi
23555
23556
23557 fi
23558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
23559 $as_echo "$gl_cv_func_frexpl_works" >&6; }
23560
23561       case "$gl_cv_func_frexpl_works" in
23562         *yes) gl_func_frexpl_no_libm=yes ;;
23563         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
23564       esac
23565     else
23566       gl_func_frexpl_no_libm=no
23567             REPLACE_FREXPL=1
23568     fi
23569     if test $gl_func_frexpl_no_libm = yes; then
23570
23571 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
23572
23573     fi
23574   fi
23575
23576   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
23577
23578
23579
23580
23581
23582
23583
23584
23585   gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
23586
23587   fi
23588
23589
23590
23591
23592
23593           GNULIB_FREXPL=1
23594
23595
23596
23597
23598
23599 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
23600
23601
23602
23603
23604
23605
23606   if test $ac_cv_func___fseterr = no; then
23607
23608
23609
23610
23611
23612
23613
23614
23615   gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext"
23616
23617   fi
23618
23619
23620
23621
23622   case "$host_os" in
23623     mingw* | solaris*)
23624                         REPLACE_FSTAT=1
23625       ;;
23626   esac
23627
23628
23629
23630   if test $REPLACE_FSTAT = 1; then
23631
23632
23633
23634
23635
23636
23637
23638
23639   gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
23640
23641     case "$host_os" in
23642       mingw*)
23643
23644
23645
23646
23647
23648
23649
23650
23651   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
23652
23653         ;;
23654     esac
23655
23656
23657   :
23658
23659   fi
23660
23661
23662
23663
23664
23665           GNULIB_FSTAT=1
23666
23667
23668
23669
23670
23671 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
23672
23673
23674
23675
23676
23677
23678
23679
23680   if test $ac_cv_func_getdtablesize = yes &&
23681      test $ac_cv_have_decl_getdtablesize = yes; then
23682     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
23683 $as_echo_n "checking whether getdtablesize works... " >&6; }
23684 if ${gl_cv_func_getdtablesize_works+:} false; then :
23685   $as_echo_n "(cached) " >&6
23686 else
23687                                                    case "$host_os" in
23688          vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
23689          *)
23690                                                        if test "$cross_compiling" = yes; then :
23691   case "$host_os" in
23692                 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
23693                   gl_cv_func_getdtablesize_works="guessing no" ;;
23694                 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
23695               esac
23696
23697 else
23698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23699 /* end confdefs.h.  */
23700
23701              #include <unistd.h>
23702 int
23703 main ()
23704 {
23705 int size = getdtablesize();
23706                 if (dup2 (0, getdtablesize()) != -1)
23707                   return 1;
23708                 if (size != getdtablesize())
23709                   return 2;
23710
23711   ;
23712   return 0;
23713 }
23714 _ACEOF
23715 if ac_fn_c_try_run "$LINENO"; then :
23716   gl_cv_func_getdtablesize_works=yes
23717 else
23718   gl_cv_func_getdtablesize_works=no
23719 fi
23720 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23721   conftest.$ac_objext conftest.beam conftest.$ac_ext
23722 fi
23723
23724            ;;
23725        esac
23726
23727 fi
23728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
23729 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
23730     case "$gl_cv_func_getdtablesize_works" in
23731       *yes | "no (limitation)") ;;
23732       *) REPLACE_GETDTABLESIZE=1 ;;
23733     esac
23734   else
23735     HAVE_GETDTABLESIZE=0
23736   fi
23737
23738   if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
23739
23740
23741
23742
23743
23744
23745
23746
23747   gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
23748
23749     :
23750   fi
23751
23752
23753
23754
23755
23756           GNULIB_GETDTABLESIZE=1
23757
23758
23759
23760
23761
23762 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775     REPLACE_GETOPT=0
23776     if test -n "$gl_replace_getopt"; then
23777       REPLACE_GETOPT=1
23778     fi
23779
23780   if test $REPLACE_GETOPT = 1; then
23781
23782
23783   if test $ac_cv_header_sys_cdefs_h = yes; then
23784     HAVE_SYS_CDEFS_H=1
23785   else
23786     HAVE_SYS_CDEFS_H=0
23787   fi
23788
23789
23790
23791 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23792
23793   GETOPT_H=getopt.h
23794   GETOPT_CDEFS_H=getopt-cdefs.h
23795
23796
23797
23798   fi
23799
23800   if test $REPLACE_GETOPT = 1; then
23801
23802
23803
23804
23805
23806
23807
23808
23809   gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819   gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23820
23821         GNULIB_GL_UNISTD_H_GETOPT=1
23822   fi
23823
23824
23825
23826
23827   ac_found=0
23828   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23829 "
23830 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
23831   ac_have_decl=1
23832 else
23833   ac_have_decl=0
23834 fi
23835
23836 cat >>confdefs.h <<_ACEOF
23837 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23838 _ACEOF
23839 if test $ac_have_decl = 1; then :
23840   ac_found=1
23841 fi
23842
23843   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23844 "
23845 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
23846   ac_have_decl=1
23847 else
23848   ac_have_decl=0
23849 fi
23850
23851 cat >>confdefs.h <<_ACEOF
23852 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23853 _ACEOF
23854 if test $ac_have_decl = 1; then :
23855   ac_found=1
23856 fi
23857
23858   ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
23859 "
23860 if test "x$ac_cv_have_decl___argv" = xyes; then :
23861   ac_have_decl=1
23862 else
23863   ac_have_decl=0
23864 fi
23865
23866 cat >>confdefs.h <<_ACEOF
23867 #define HAVE_DECL___ARGV $ac_have_decl
23868 _ACEOF
23869 if test $ac_have_decl = 1; then :
23870   ac_found=1
23871 fi
23872
23873
23874   # Incur the cost of this test only if none of the above worked.
23875   if test $ac_found = 0; then
23876     # On OpenBSD 5.1, using the global __progname variable appears to be
23877     # the only way to implement getprogname.
23878     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
23879 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
23880 if ${gl_cv_var___progname+:} false; then :
23881   $as_echo_n "(cached) " >&6
23882 else
23883
23884         gl_cv_var___progname=
23885         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23886 /* end confdefs.h.  */
23887 extern char *__progname;
23888 int
23889 main ()
23890 {
23891 return *__progname;
23892
23893   ;
23894   return 0;
23895 }
23896 _ACEOF
23897 if ac_fn_c_try_link "$LINENO"; then :
23898   gl_cv_var___progname=yes
23899
23900 fi
23901 rm -f core conftest.err conftest.$ac_objext \
23902     conftest$ac_exeext conftest.$ac_ext
23903
23904
23905 fi
23906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
23907 $as_echo "$gl_cv_var___progname" >&6; }
23908     if test "$gl_cv_var___progname" = yes; then
23909
23910 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
23911
23912     fi
23913   fi
23914
23915
23916
23917
23918   # Autoconf 2.61a.99 and earlier don't support linking a file only
23919   # in VPATH builds.  But since GNUmakefile is for maintainer use
23920   # only, it does not matter if we skip the link with older autoconf.
23921   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23922   # builds, so use a shell variable to bypass this.
23923   GNUmakefile=GNUmakefile
23924   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23925
23926
23927   :
23928
23929
23930
23931
23932
23933
23934
23935   PRIPTR_PREFIX=
23936   if test -n "$STDINT_H"; then
23937         PRIPTR_PREFIX='"l"'
23938   else
23939         for glpfx in '' l ll I64; do
23940       case $glpfx in
23941         '')  gltype1='int';;
23942         l)   gltype1='long int';;
23943         ll)  gltype1='long long int';;
23944         I64) gltype1='__int64';;
23945       esac
23946       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23947 /* end confdefs.h.  */
23948 #include <stdint.h>
23949            extern intptr_t foo;
23950            extern $gltype1 foo;
23951 int
23952 main ()
23953 {
23954
23955   ;
23956   return 0;
23957 }
23958 _ACEOF
23959 if ac_fn_c_try_compile "$LINENO"; then :
23960   PRIPTR_PREFIX='"'$glpfx'"'
23961 fi
23962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23963       test -n "$PRIPTR_PREFIX" && break
23964     done
23965   fi
23966
23967
23968
23969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
23970 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
23971 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
23972   $as_echo_n "(cached) " >&6
23973 else
23974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23975 /* end confdefs.h.  */
23976 /* Work also in C++ mode.  */
23977             #define __STDC_LIMIT_MACROS 1
23978
23979             /* Work if build is not clean.  */
23980             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23981
23982             #include <limits.h>
23983             #if HAVE_STDINT_H
23984              #include <stdint.h>
23985             #endif
23986
23987             #if defined INT32_MAX && defined INTMAX_MAX
23988              #define CONDITION (INT32_MAX < INTMAX_MAX)
23989             #elif HAVE_LONG_LONG_INT
23990              #define CONDITION (sizeof (int) < sizeof (long long int))
23991             #else
23992              #define CONDITION 0
23993             #endif
23994             int test[CONDITION ? 1 : -1];
23995 int
23996 main ()
23997 {
23998
23999   ;
24000   return 0;
24001 }
24002 _ACEOF
24003 if ac_fn_c_try_compile "$LINENO"; then :
24004   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
24005 else
24006   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
24007 fi
24008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24009 fi
24010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
24011 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
24012   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
24013     INT32_MAX_LT_INTMAX_MAX=1;
24014   else
24015     INT32_MAX_LT_INTMAX_MAX=0;
24016   fi
24017
24018
24019   if test $APPLE_UNIVERSAL_BUILD = 0; then
24020
24021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
24022 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
24023 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
24024   $as_echo_n "(cached) " >&6
24025 else
24026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24027 /* end confdefs.h.  */
24028 /* Work also in C++ mode.  */
24029             #define __STDC_LIMIT_MACROS 1
24030
24031             /* Work if build is not clean.  */
24032             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
24033
24034             #include <limits.h>
24035             #if HAVE_STDINT_H
24036              #include <stdint.h>
24037             #endif
24038
24039             #if defined INT64_MAX
24040              #define CONDITION (INT64_MAX == LONG_MAX)
24041             #elif HAVE_LONG_LONG_INT
24042              #define CONDITION (sizeof (long long int) == sizeof (long int))
24043             #else
24044              #define CONDITION 0
24045             #endif
24046             int test[CONDITION ? 1 : -1];
24047 int
24048 main ()
24049 {
24050
24051   ;
24052   return 0;
24053 }
24054 _ACEOF
24055 if ac_fn_c_try_compile "$LINENO"; then :
24056   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
24057 else
24058   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
24059 fi
24060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24061 fi
24062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
24063 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
24064   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
24065     INT64_MAX_EQ_LONG_MAX=1;
24066   else
24067     INT64_MAX_EQ_LONG_MAX=0;
24068   fi
24069
24070
24071   else
24072     INT64_MAX_EQ_LONG_MAX=-1
24073   fi
24074
24075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
24076 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
24077 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
24078   $as_echo_n "(cached) " >&6
24079 else
24080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24081 /* end confdefs.h.  */
24082 /* Work also in C++ mode.  */
24083             #define __STDC_LIMIT_MACROS 1
24084
24085             /* Work if build is not clean.  */
24086             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
24087
24088             #include <limits.h>
24089             #if HAVE_STDINT_H
24090              #include <stdint.h>
24091             #endif
24092
24093             #if defined UINT32_MAX && defined UINTMAX_MAX
24094              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
24095             #elif HAVE_LONG_LONG_INT
24096              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
24097             #else
24098              #define CONDITION 0
24099             #endif
24100             int test[CONDITION ? 1 : -1];
24101 int
24102 main ()
24103 {
24104
24105   ;
24106   return 0;
24107 }
24108 _ACEOF
24109 if ac_fn_c_try_compile "$LINENO"; then :
24110   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
24111 else
24112   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
24113 fi
24114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24115 fi
24116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
24117 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
24118   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
24119     UINT32_MAX_LT_UINTMAX_MAX=1;
24120   else
24121     UINT32_MAX_LT_UINTMAX_MAX=0;
24122   fi
24123
24124
24125   if test $APPLE_UNIVERSAL_BUILD = 0; then
24126
24127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
24128 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
24129 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
24130   $as_echo_n "(cached) " >&6
24131 else
24132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24133 /* end confdefs.h.  */
24134 /* Work also in C++ mode.  */
24135             #define __STDC_LIMIT_MACROS 1
24136
24137             /* Work if build is not clean.  */
24138             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
24139
24140             #include <limits.h>
24141             #if HAVE_STDINT_H
24142              #include <stdint.h>
24143             #endif
24144
24145             #if defined UINT64_MAX
24146              #define CONDITION (UINT64_MAX == ULONG_MAX)
24147             #elif HAVE_LONG_LONG_INT
24148              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
24149             #else
24150              #define CONDITION 0
24151             #endif
24152             int test[CONDITION ? 1 : -1];
24153 int
24154 main ()
24155 {
24156
24157   ;
24158   return 0;
24159 }
24160 _ACEOF
24161 if ac_fn_c_try_compile "$LINENO"; then :
24162   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
24163 else
24164   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
24165 fi
24166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24167 fi
24168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
24169 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
24170   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
24171     UINT64_MAX_EQ_ULONG_MAX=1;
24172   else
24173     UINT64_MAX_EQ_ULONG_MAX=0;
24174   fi
24175
24176
24177   else
24178     UINT64_MAX_EQ_ULONG_MAX=-1
24179   fi
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189   # If we replaced any of the underlying isnan* functions, replace
24190   # the isnan macro; it undoubtedly suffers from the same flaws.
24191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan macro works" >&5
24192 $as_echo_n "checking whether isnan macro works... " >&6; }
24193   if test $gl_func_isnanf = yes \
24194      && test $gl_func_isnand = yes \
24195      && test $gl_func_isnanl = yes; then
24196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24197 $as_echo "yes" >&6; }
24198     ISNAN_LIBM=
24199         case " $ISNAN_LIBM " in
24200       *" $ISNANF_LIBM "*) ;;
24201       *) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;;
24202     esac
24203         case " $ISNAN_LIBM " in
24204       *" $ISNAND_LIBM "*) ;;
24205       *) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;;
24206     esac
24207         case " $ISNAN_LIBM " in
24208       *" $ISNANL_LIBM "*) ;;
24209       *) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;;
24210     esac
24211   else
24212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24213 $as_echo "no" >&6; }
24214         REPLACE_ISNAN=1
24215     ISNAN_LIBM=
24216   fi
24217
24218
24219
24220
24221
24222
24223
24224           GNULIB_ISNAN=1
24225
24226
24227
24228
24229
24230 $as_echo "#define GNULIB_TEST_ISNAN 1" >>confdefs.h
24231
24232
24233
24234
24235
24236   ISNAND_LIBM=
24237
24238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
24239 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
24240 if ${gl_cv_func_isnand_no_libm+:} false; then :
24241   $as_echo_n "(cached) " >&6
24242 else
24243
24244       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24245 /* end confdefs.h.  */
24246 #include <math.h>
24247              #if __GNUC__ >= 4
24248              # undef isnand
24249              # define isnand(x) __builtin_isnan ((double)(x))
24250              #else
24251              # undef isnand
24252              # define isnand(x) isnan ((double)(x))
24253              #endif
24254              double x;
24255 int
24256 main ()
24257 {
24258 return isnand (x);
24259   ;
24260   return 0;
24261 }
24262 _ACEOF
24263 if ac_fn_c_try_link "$LINENO"; then :
24264   gl_cv_func_isnand_no_libm=yes
24265 else
24266   gl_cv_func_isnand_no_libm=no
24267 fi
24268 rm -f core conftest.err conftest.$ac_objext \
24269     conftest$ac_exeext conftest.$ac_ext
24270
24271 fi
24272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
24273 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
24274
24275   if test $gl_cv_func_isnand_no_libm = no; then
24276
24277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5
24278 $as_echo_n "checking whether isnan(double) can be used with libm... " >&6; }
24279 if ${gl_cv_func_isnand_in_libm+:} false; then :
24280   $as_echo_n "(cached) " >&6
24281 else
24282
24283       save_LIBS="$LIBS"
24284       LIBS="$LIBS -lm"
24285       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24286 /* end confdefs.h.  */
24287 #include <math.h>
24288              #if __GNUC__ >= 4
24289              # undef isnand
24290              # define isnand(x) __builtin_isnan ((double)(x))
24291              #elif defined isnan
24292              # undef isnand
24293              # define isnand(x) isnan ((double)(x))
24294              #endif
24295              double x;
24296 int
24297 main ()
24298 {
24299 return isnand (x);
24300   ;
24301   return 0;
24302 }
24303 _ACEOF
24304 if ac_fn_c_try_link "$LINENO"; then :
24305   gl_cv_func_isnand_in_libm=yes
24306 else
24307   gl_cv_func_isnand_in_libm=no
24308 fi
24309 rm -f core conftest.err conftest.$ac_objext \
24310     conftest$ac_exeext conftest.$ac_ext
24311       LIBS="$save_LIBS"
24312
24313 fi
24314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5
24315 $as_echo "$gl_cv_func_isnand_in_libm" >&6; }
24316
24317     if test $gl_cv_func_isnand_in_libm = yes; then
24318       ISNAND_LIBM=-lm
24319     fi
24320   fi
24321     if test $gl_cv_func_isnand_no_libm = yes \
24322      || test $gl_cv_func_isnand_in_libm = yes; then
24323     gl_func_isnand=yes
24324   else
24325     gl_func_isnand=no
24326     HAVE_ISNAND=0
24327   fi
24328
24329
24330
24331
24332
24333   if test $HAVE_ISNAND = 0 || test $REPLACE_ISNAN = 1; then
24334
24335
24336
24337
24338
24339
24340
24341
24342   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
24343
24344
24345
24346
24347   fi
24348
24349
24350
24351
24352
24353           GNULIB_ISNAND=1
24354
24355
24356
24357
24358
24359 $as_echo "#define GNULIB_TEST_ISNAND 1" >>confdefs.h
24360
24361
24362
24363
24364
24365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
24366 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
24367 if ${gl_cv_func_isnand_no_libm+:} false; then :
24368   $as_echo_n "(cached) " >&6
24369 else
24370
24371       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24372 /* end confdefs.h.  */
24373 #include <math.h>
24374              #if __GNUC__ >= 4
24375              # undef isnand
24376              # define isnand(x) __builtin_isnan ((double)(x))
24377              #else
24378              # undef isnand
24379              # define isnand(x) isnan ((double)(x))
24380              #endif
24381              double x;
24382 int
24383 main ()
24384 {
24385 return isnand (x);
24386   ;
24387   return 0;
24388 }
24389 _ACEOF
24390 if ac_fn_c_try_link "$LINENO"; then :
24391   gl_cv_func_isnand_no_libm=yes
24392 else
24393   gl_cv_func_isnand_no_libm=no
24394 fi
24395 rm -f core conftest.err conftest.$ac_objext \
24396     conftest$ac_exeext conftest.$ac_ext
24397
24398 fi
24399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
24400 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
24401
24402   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
24403   if test $gl_cv_func_isnand_no_libm = yes; then
24404
24405 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
24406
24407   fi
24408
24409   if test $gl_func_isnand_no_libm != yes; then
24410
24411
24412
24413
24414
24415
24416
24417
24418   gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
24419
24420
24421
24422
24423   fi
24424
24425
24426   ISNANF_LIBM=
24427
24428   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
24429 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
24430 if ${gl_cv_func_isnanf_no_libm+:} false; then :
24431   $as_echo_n "(cached) " >&6
24432 else
24433
24434       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24435 /* end confdefs.h.  */
24436 #include <math.h>
24437              #if __GNUC__ >= 4
24438              # undef isnanf
24439              # define isnanf(x) __builtin_isnanf ((float)(x))
24440              #elif defined isnan
24441              # undef isnanf
24442              # define isnanf(x) isnan ((float)(x))
24443              #endif
24444              float x;
24445 int
24446 main ()
24447 {
24448 return isnanf (x);
24449   ;
24450   return 0;
24451 }
24452 _ACEOF
24453 if ac_fn_c_try_link "$LINENO"; then :
24454   gl_cv_func_isnanf_no_libm=yes
24455 else
24456   gl_cv_func_isnanf_no_libm=no
24457 fi
24458 rm -f core conftest.err conftest.$ac_objext \
24459     conftest$ac_exeext conftest.$ac_ext
24460
24461 fi
24462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
24463 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
24464
24465   if test $gl_cv_func_isnanf_no_libm = no; then
24466
24467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5
24468 $as_echo_n "checking whether isnan(float) can be used with libm... " >&6; }
24469 if ${gl_cv_func_isnanf_in_libm+:} false; then :
24470   $as_echo_n "(cached) " >&6
24471 else
24472
24473       save_LIBS="$LIBS"
24474       LIBS="$LIBS -lm"
24475       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24476 /* end confdefs.h.  */
24477 #include <math.h>
24478              #if __GNUC__ >= 4
24479              # undef isnanf
24480              # define isnanf(x) __builtin_isnanf ((float)(x))
24481              #elif defined isnan
24482              # undef isnanf
24483              # define isnanf(x) isnan ((float)(x))
24484              #endif
24485              float x;
24486 int
24487 main ()
24488 {
24489 return isnanf (x);
24490   ;
24491   return 0;
24492 }
24493 _ACEOF
24494 if ac_fn_c_try_link "$LINENO"; then :
24495   gl_cv_func_isnanf_in_libm=yes
24496 else
24497   gl_cv_func_isnanf_in_libm=no
24498 fi
24499 rm -f core conftest.err conftest.$ac_objext \
24500     conftest$ac_exeext conftest.$ac_ext
24501       LIBS="$save_LIBS"
24502
24503 fi
24504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5
24505 $as_echo "$gl_cv_func_isnanf_in_libm" >&6; }
24506
24507     if test $gl_cv_func_isnanf_in_libm = yes; then
24508       ISNANF_LIBM=-lm
24509     fi
24510   fi
24511     if test $gl_cv_func_isnanf_no_libm = yes \
24512      || test $gl_cv_func_isnanf_in_libm = yes; then
24513     save_LIBS="$LIBS"
24514     LIBS="$LIBS $ISNANF_LIBM"
24515
24516
24517
24518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
24519 $as_echo_n "checking whether isnan(float) works... " >&6; }
24520 if ${gl_cv_func_isnanf_works+:} false; then :
24521   $as_echo_n "(cached) " >&6
24522 else
24523
24524       if test "$cross_compiling" = yes; then :
24525   case "$host_os" in
24526            irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
24527            mingw*) # Guess yes on mingw, no on MSVC.
24528              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24529 /* end confdefs.h.  */
24530
24531 #ifdef __MINGW32__
24532  Known
24533 #endif
24534
24535 _ACEOF
24536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24537   $EGREP "Known" >/dev/null 2>&1; then :
24538   gl_cv_func_isnanf_works="guessing yes"
24539 else
24540   gl_cv_func_isnanf_works="guessing no"
24541 fi
24542 rm -f conftest*
24543
24544              ;;
24545            *) gl_cv_func_isnanf_works="guessing yes" ;;
24546          esac
24547
24548 else
24549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24550 /* end confdefs.h.  */
24551
24552 #include <math.h>
24553 #if __GNUC__ >= 4
24554 # undef isnanf
24555 # define isnanf(x) __builtin_isnanf ((float)(x))
24556 #elif defined isnan
24557 # undef isnanf
24558 # define isnanf(x) isnan ((float)(x))
24559 #endif
24560 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
24561 #ifdef __DECC
24562 static float
24563 NaN ()
24564 {
24565   static float zero = 0.0f;
24566   return zero / zero;
24567 }
24568 #else
24569 # define NaN() (0.0f / 0.0f)
24570 #endif
24571 #define NWORDS \
24572   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24573 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
24574 int main()
24575 {
24576   int result = 0;
24577
24578   if (isnanf (1.0f / 0.0f))
24579     result |= 1;
24580
24581   if (!isnanf (NaN ()))
24582     result |= 2;
24583
24584 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
24585   /* The isnanf function should be immune against changes in the sign bit and
24586      in the mantissa bits.  The xor operation twiddles a bit that can only be
24587      a sign bit or a mantissa bit.  */
24588   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
24589     {
24590       memory_float m;
24591
24592       m.value = NaN ();
24593       /* Set the bits below the exponent to 01111...111.  */
24594       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
24595       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
24596       if (!isnanf (m.value))
24597         result |= 4;
24598     }
24599 #endif
24600
24601   return result;
24602 }
24603 _ACEOF
24604 if ac_fn_c_try_run "$LINENO"; then :
24605   gl_cv_func_isnanf_works=yes
24606 else
24607   gl_cv_func_isnanf_works=no
24608 fi
24609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24610   conftest.$ac_objext conftest.beam conftest.$ac_ext
24611 fi
24612
24613
24614 fi
24615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
24616 $as_echo "$gl_cv_func_isnanf_works" >&6; }
24617
24618     LIBS="$save_LIBS"
24619     case "$gl_cv_func_isnanf_works" in
24620       *yes) gl_func_isnanf=yes ;;
24621       *)    gl_func_isnanf=no; ISNANF_LIBM= ;;
24622     esac
24623   else
24624     gl_func_isnanf=no
24625   fi
24626   if test $gl_func_isnanf != yes; then
24627     HAVE_ISNANF=0
24628   fi
24629
24630
24631
24632
24633
24634   if test $HAVE_ISNANF = 0 || test $REPLACE_ISNAN = 1; then
24635
24636
24637
24638
24639
24640
24641
24642
24643   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
24644
24645
24646
24647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
24648 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
24649 if ${gl_cv_cc_float_expbit0+:} false; then :
24650   $as_echo_n "(cached) " >&6
24651 else
24652
24653       if test "$cross_compiling" = yes; then :
24654   gl_cv_cc_float_expbit0="word 0 bit 23"
24655 else
24656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24657 /* end confdefs.h.  */
24658
24659 #include <float.h>
24660 #include <stddef.h>
24661 #include <stdio.h>
24662 #include <string.h>
24663 #define NWORDS \
24664   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24665 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
24666 static unsigned int ored_words[NWORDS];
24667 static unsigned int anded_words[NWORDS];
24668 static void add_to_ored_words (float x)
24669 {
24670   memory_float m;
24671   size_t i;
24672   /* Clear it first, in case
24673      sizeof (float) < sizeof (memory_float).  */
24674   memset (&m, 0, sizeof (memory_float));
24675   m.value = x;
24676   for (i = 0; i < NWORDS; i++)
24677     {
24678       ored_words[i] |= m.word[i];
24679       anded_words[i] &= m.word[i];
24680     }
24681 }
24682 int main ()
24683 {
24684   size_t j;
24685   FILE *fp = fopen ("conftest.out", "w");
24686   if (fp == NULL)
24687     return 1;
24688   for (j = 0; j < NWORDS; j++)
24689     anded_words[j] = ~ (unsigned int) 0;
24690   add_to_ored_words (0.25f);
24691   add_to_ored_words (0.5f);
24692   add_to_ored_words (1.0f);
24693   add_to_ored_words (2.0f);
24694   add_to_ored_words (4.0f);
24695   /* Remove bits that are common (e.g. if representation of the first mantissa
24696      bit is explicit).  */
24697   for (j = 0; j < NWORDS; j++)
24698     ored_words[j] &= ~anded_words[j];
24699   /* Now find the nonzero word.  */
24700   for (j = 0; j < NWORDS; j++)
24701     if (ored_words[j] != 0)
24702       break;
24703   if (j < NWORDS)
24704     {
24705       size_t i;
24706       for (i = j + 1; i < NWORDS; i++)
24707         if (ored_words[i] != 0)
24708           {
24709             fprintf (fp, "unknown");
24710             return (fclose (fp) != 0);
24711           }
24712       for (i = 0; ; i++)
24713         if ((ored_words[j] >> i) & 1)
24714           {
24715             fprintf (fp, "word %d bit %d", (int) j, (int) i);
24716             return (fclose (fp) != 0);
24717           }
24718     }
24719   fprintf (fp, "unknown");
24720   return (fclose (fp) != 0);
24721 }
24722
24723 _ACEOF
24724 if ac_fn_c_try_run "$LINENO"; then :
24725   gl_cv_cc_float_expbit0=`cat conftest.out`
24726 else
24727   gl_cv_cc_float_expbit0="unknown"
24728 fi
24729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24730   conftest.$ac_objext conftest.beam conftest.$ac_ext
24731 fi
24732
24733       rm -f conftest.out
24734
24735 fi
24736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
24737 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
24738   case "$gl_cv_cc_float_expbit0" in
24739     word*bit*)
24740       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
24741       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
24742
24743 cat >>confdefs.h <<_ACEOF
24744 #define FLT_EXPBIT0_WORD $word
24745 _ACEOF
24746
24747
24748 cat >>confdefs.h <<_ACEOF
24749 #define FLT_EXPBIT0_BIT $bit
24750 _ACEOF
24751
24752       ;;
24753   esac
24754
24755
24756   fi
24757
24758
24759
24760
24761
24762           GNULIB_ISNANF=1
24763
24764
24765
24766
24767
24768 $as_echo "#define GNULIB_TEST_ISNANF 1" >>confdefs.h
24769
24770
24771
24772
24773
24774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
24775 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
24776 if ${gl_cv_func_isnanf_no_libm+:} false; then :
24777   $as_echo_n "(cached) " >&6
24778 else
24779
24780       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781 /* end confdefs.h.  */
24782 #include <math.h>
24783              #if __GNUC__ >= 4
24784              # undef isnanf
24785              # define isnanf(x) __builtin_isnanf ((float)(x))
24786              #elif defined isnan
24787              # undef isnanf
24788              # define isnanf(x) isnan ((float)(x))
24789              #endif
24790              float x;
24791 int
24792 main ()
24793 {
24794 return isnanf (x);
24795   ;
24796   return 0;
24797 }
24798 _ACEOF
24799 if ac_fn_c_try_link "$LINENO"; then :
24800   gl_cv_func_isnanf_no_libm=yes
24801 else
24802   gl_cv_func_isnanf_no_libm=no
24803 fi
24804 rm -f core conftest.err conftest.$ac_objext \
24805     conftest$ac_exeext conftest.$ac_ext
24806
24807 fi
24808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
24809 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
24810
24811   if test $gl_cv_func_isnanf_no_libm = yes; then
24812
24813
24814
24815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
24816 $as_echo_n "checking whether isnan(float) works... " >&6; }
24817 if ${gl_cv_func_isnanf_works+:} false; then :
24818   $as_echo_n "(cached) " >&6
24819 else
24820
24821       if test "$cross_compiling" = yes; then :
24822   case "$host_os" in
24823            irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
24824            mingw*) # Guess yes on mingw, no on MSVC.
24825              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24826 /* end confdefs.h.  */
24827
24828 #ifdef __MINGW32__
24829  Known
24830 #endif
24831
24832 _ACEOF
24833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24834   $EGREP "Known" >/dev/null 2>&1; then :
24835   gl_cv_func_isnanf_works="guessing yes"
24836 else
24837   gl_cv_func_isnanf_works="guessing no"
24838 fi
24839 rm -f conftest*
24840
24841              ;;
24842            *) gl_cv_func_isnanf_works="guessing yes" ;;
24843          esac
24844
24845 else
24846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24847 /* end confdefs.h.  */
24848
24849 #include <math.h>
24850 #if __GNUC__ >= 4
24851 # undef isnanf
24852 # define isnanf(x) __builtin_isnanf ((float)(x))
24853 #elif defined isnan
24854 # undef isnanf
24855 # define isnanf(x) isnan ((float)(x))
24856 #endif
24857 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
24858 #ifdef __DECC
24859 static float
24860 NaN ()
24861 {
24862   static float zero = 0.0f;
24863   return zero / zero;
24864 }
24865 #else
24866 # define NaN() (0.0f / 0.0f)
24867 #endif
24868 #define NWORDS \
24869   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24870 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
24871 int main()
24872 {
24873   int result = 0;
24874
24875   if (isnanf (1.0f / 0.0f))
24876     result |= 1;
24877
24878   if (!isnanf (NaN ()))
24879     result |= 2;
24880
24881 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
24882   /* The isnanf function should be immune against changes in the sign bit and
24883      in the mantissa bits.  The xor operation twiddles a bit that can only be
24884      a sign bit or a mantissa bit.  */
24885   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
24886     {
24887       memory_float m;
24888
24889       m.value = NaN ();
24890       /* Set the bits below the exponent to 01111...111.  */
24891       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
24892       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
24893       if (!isnanf (m.value))
24894         result |= 4;
24895     }
24896 #endif
24897
24898   return result;
24899 }
24900 _ACEOF
24901 if ac_fn_c_try_run "$LINENO"; then :
24902   gl_cv_func_isnanf_works=yes
24903 else
24904   gl_cv_func_isnanf_works=no
24905 fi
24906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24907   conftest.$ac_objext conftest.beam conftest.$ac_ext
24908 fi
24909
24910
24911 fi
24912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
24913 $as_echo "$gl_cv_func_isnanf_works" >&6; }
24914
24915   fi
24916   if test $gl_cv_func_isnanf_no_libm = yes \
24917      && { case "$gl_cv_func_isnanf_works" in
24918             *yes) true;;
24919             *) false;;
24920           esac
24921         }; then
24922     gl_func_isnanf_no_libm=yes
24923
24924 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
24925
24926   else
24927     gl_func_isnanf_no_libm=no
24928   fi
24929
24930   if test $gl_func_isnanf_no_libm != yes; then
24931
24932
24933
24934
24935
24936
24937
24938
24939   gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
24940
24941
24942
24943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
24944 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
24945 if ${gl_cv_cc_float_expbit0+:} false; then :
24946   $as_echo_n "(cached) " >&6
24947 else
24948
24949       if test "$cross_compiling" = yes; then :
24950   gl_cv_cc_float_expbit0="word 0 bit 23"
24951 else
24952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24953 /* end confdefs.h.  */
24954
24955 #include <float.h>
24956 #include <stddef.h>
24957 #include <stdio.h>
24958 #include <string.h>
24959 #define NWORDS \
24960   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24961 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
24962 static unsigned int ored_words[NWORDS];
24963 static unsigned int anded_words[NWORDS];
24964 static void add_to_ored_words (float x)
24965 {
24966   memory_float m;
24967   size_t i;
24968   /* Clear it first, in case
24969      sizeof (float) < sizeof (memory_float).  */
24970   memset (&m, 0, sizeof (memory_float));
24971   m.value = x;
24972   for (i = 0; i < NWORDS; i++)
24973     {
24974       ored_words[i] |= m.word[i];
24975       anded_words[i] &= m.word[i];
24976     }
24977 }
24978 int main ()
24979 {
24980   size_t j;
24981   FILE *fp = fopen ("conftest.out", "w");
24982   if (fp == NULL)
24983     return 1;
24984   for (j = 0; j < NWORDS; j++)
24985     anded_words[j] = ~ (unsigned int) 0;
24986   add_to_ored_words (0.25f);
24987   add_to_ored_words (0.5f);
24988   add_to_ored_words (1.0f);
24989   add_to_ored_words (2.0f);
24990   add_to_ored_words (4.0f);
24991   /* Remove bits that are common (e.g. if representation of the first mantissa
24992      bit is explicit).  */
24993   for (j = 0; j < NWORDS; j++)
24994     ored_words[j] &= ~anded_words[j];
24995   /* Now find the nonzero word.  */
24996   for (j = 0; j < NWORDS; j++)
24997     if (ored_words[j] != 0)
24998       break;
24999   if (j < NWORDS)
25000     {
25001       size_t i;
25002       for (i = j + 1; i < NWORDS; i++)
25003         if (ored_words[i] != 0)
25004           {
25005             fprintf (fp, "unknown");
25006             return (fclose (fp) != 0);
25007           }
25008       for (i = 0; ; i++)
25009         if ((ored_words[j] >> i) & 1)
25010           {
25011             fprintf (fp, "word %d bit %d", (int) j, (int) i);
25012             return (fclose (fp) != 0);
25013           }
25014     }
25015   fprintf (fp, "unknown");
25016   return (fclose (fp) != 0);
25017 }
25018
25019 _ACEOF
25020 if ac_fn_c_try_run "$LINENO"; then :
25021   gl_cv_cc_float_expbit0=`cat conftest.out`
25022 else
25023   gl_cv_cc_float_expbit0="unknown"
25024 fi
25025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25026   conftest.$ac_objext conftest.beam conftest.$ac_ext
25027 fi
25028
25029       rm -f conftest.out
25030
25031 fi
25032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
25033 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
25034   case "$gl_cv_cc_float_expbit0" in
25035     word*bit*)
25036       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25037       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
25038
25039 cat >>confdefs.h <<_ACEOF
25040 #define FLT_EXPBIT0_WORD $word
25041 _ACEOF
25042
25043
25044 cat >>confdefs.h <<_ACEOF
25045 #define FLT_EXPBIT0_BIT $bit
25046 _ACEOF
25047
25048       ;;
25049   esac
25050
25051
25052   fi
25053
25054
25055   ISNANL_LIBM=
25056
25057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
25058 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
25059 if ${gl_cv_func_isnanl_no_libm+:} false; then :
25060   $as_echo_n "(cached) " >&6
25061 else
25062
25063       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25064 /* end confdefs.h.  */
25065 #include <math.h>
25066              #if __GNUC__ >= 4
25067              # undef isnanl
25068              # define isnanl(x) __builtin_isnanl ((long double)(x))
25069              #elif defined isnan
25070              # undef isnanl
25071              # define isnanl(x) isnan ((long double)(x))
25072              #endif
25073              long double x;
25074 int
25075 main ()
25076 {
25077 return isnanl (x);
25078   ;
25079   return 0;
25080 }
25081 _ACEOF
25082 if ac_fn_c_try_link "$LINENO"; then :
25083   gl_cv_func_isnanl_no_libm=yes
25084 else
25085   gl_cv_func_isnanl_no_libm=no
25086 fi
25087 rm -f core conftest.err conftest.$ac_objext \
25088     conftest$ac_exeext conftest.$ac_ext
25089
25090 fi
25091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
25092 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
25093
25094   if test $gl_cv_func_isnanl_no_libm = no; then
25095
25096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5
25097 $as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; }
25098 if ${gl_cv_func_isnanl_in_libm+:} false; then :
25099   $as_echo_n "(cached) " >&6
25100 else
25101
25102       save_LIBS="$LIBS"
25103       LIBS="$LIBS -lm"
25104       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25105 /* end confdefs.h.  */
25106 #include <math.h>
25107              #if __GNUC__ >= 4
25108              # undef isnanl
25109              # define isnanl(x) __builtin_isnanl ((long double)(x))
25110              #elif defined isnan
25111              # undef isnanl
25112              # define isnanl(x) isnan ((long double)(x))
25113              #endif
25114              long double x;
25115 int
25116 main ()
25117 {
25118 return isnanl (x);
25119   ;
25120   return 0;
25121 }
25122 _ACEOF
25123 if ac_fn_c_try_link "$LINENO"; then :
25124   gl_cv_func_isnanl_in_libm=yes
25125 else
25126   gl_cv_func_isnanl_in_libm=no
25127 fi
25128 rm -f core conftest.err conftest.$ac_objext \
25129     conftest$ac_exeext conftest.$ac_ext
25130       LIBS="$save_LIBS"
25131
25132 fi
25133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5
25134 $as_echo "$gl_cv_func_isnanl_in_libm" >&6; }
25135
25136     if test $gl_cv_func_isnanl_in_libm = yes; then
25137       ISNANL_LIBM=-lm
25138     fi
25139   fi
25140     if test $gl_cv_func_isnanl_no_libm = yes \
25141      || test $gl_cv_func_isnanl_in_libm = yes; then
25142     save_LIBS="$LIBS"
25143     LIBS="$LIBS $ISNANL_LIBM"
25144
25145
25146
25147
25148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
25149 $as_echo_n "checking whether isnanl works... " >&6; }
25150 if ${gl_cv_func_isnanl_works+:} false; then :
25151   $as_echo_n "(cached) " >&6
25152 else
25153
25154       if test "$cross_compiling" = yes; then :
25155   case "$host_os" in
25156            mingw*) # Guess yes on mingw, no on MSVC.
25157              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25158 /* end confdefs.h.  */
25159
25160 #ifdef __MINGW32__
25161  Known
25162 #endif
25163
25164 _ACEOF
25165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25166   $EGREP "Known" >/dev/null 2>&1; then :
25167   gl_cv_func_isnanl_works="guessing yes"
25168 else
25169   gl_cv_func_isnanl_works="guessing no"
25170 fi
25171 rm -f conftest*
25172
25173              ;;
25174            *) gl_cv_func_isnanl_works="guessing yes" ;;
25175          esac
25176
25177 else
25178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25179 /* end confdefs.h.  */
25180
25181 #include <float.h>
25182 #include <limits.h>
25183 #include <math.h>
25184 #if __GNUC__ >= 4
25185 # undef isnanl
25186 # define isnanl(x) __builtin_isnanl ((long double)(x))
25187 #elif defined isnan
25188 # undef isnanl
25189 # define isnanl(x) isnan ((long double)(x))
25190 #endif
25191 #define NWORDS \
25192   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25193 typedef union { unsigned int word[NWORDS]; long double value; }
25194         memory_long_double;
25195 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
25196    runtime type conversion.  */
25197 #ifdef __sgi
25198 static long double NaNl ()
25199 {
25200   double zero = 0.0;
25201   return zero / zero;
25202 }
25203 #else
25204 # define NaNl() (0.0L / 0.0L)
25205 #endif
25206 int main ()
25207 {
25208   int result = 0;
25209
25210   if (!isnanl (NaNl ()))
25211     result |= 1;
25212
25213   {
25214     memory_long_double m;
25215     unsigned int i;
25216
25217     /* The isnanl function should be immune against changes in the sign bit and
25218        in the mantissa bits.  The xor operation twiddles a bit that can only be
25219        a sign bit or a mantissa bit (since the exponent never extends to
25220        bit 31).  */
25221     m.value = NaNl ();
25222     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
25223     for (i = 0; i < NWORDS; i++)
25224       m.word[i] |= 1;
25225     if (!isnanl (m.value))
25226       result |= 1;
25227   }
25228
25229 #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
25230 /* Representation of an 80-bit 'long double' as an initializer for a sequence
25231    of 'unsigned int' words.  */
25232 # ifdef WORDS_BIGENDIAN
25233 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
25234      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
25235        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
25236        (unsigned int) (mantlo) << 16                                        \
25237      }
25238 # else
25239 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
25240      { mantlo, manthi, exponent }
25241 # endif
25242   { /* Quiet NaN.  */
25243     static memory_long_double x =
25244       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
25245     if (!isnanl (x.value))
25246       result |= 2;
25247   }
25248   {
25249     /* Signalling NaN.  */
25250     static memory_long_double x =
25251       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
25252     if (!isnanl (x.value))
25253       result |= 2;
25254   }
25255   /* isnanl should return something even for noncanonical values.  */
25256   { /* Pseudo-NaN.  */
25257     static memory_long_double x =
25258       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
25259     if (isnanl (x.value) && !isnanl (x.value))
25260       result |= 4;
25261   }
25262   { /* Pseudo-Infinity.  */
25263     static memory_long_double x =
25264       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
25265     if (isnanl (x.value) && !isnanl (x.value))
25266       result |= 8;
25267   }
25268   { /* Pseudo-Zero.  */
25269     static memory_long_double x =
25270       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
25271     if (isnanl (x.value) && !isnanl (x.value))
25272       result |= 16;
25273   }
25274   { /* Unnormalized number.  */
25275     static memory_long_double x =
25276       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
25277     if (isnanl (x.value) && !isnanl (x.value))
25278       result |= 32;
25279   }
25280   { /* Pseudo-Denormal.  */
25281     static memory_long_double x =
25282       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
25283     if (isnanl (x.value) && !isnanl (x.value))
25284       result |= 64;
25285   }
25286 #endif
25287
25288   return result;
25289 }
25290 _ACEOF
25291 if ac_fn_c_try_run "$LINENO"; then :
25292   gl_cv_func_isnanl_works=yes
25293 else
25294   gl_cv_func_isnanl_works=no
25295 fi
25296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25297   conftest.$ac_objext conftest.beam conftest.$ac_ext
25298 fi
25299
25300
25301 fi
25302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
25303 $as_echo "$gl_cv_func_isnanl_works" >&6; }
25304
25305     LIBS="$save_LIBS"
25306     case "$gl_cv_func_isnanl_works" in
25307       *yes) gl_func_isnanl=yes ;;
25308       *)    gl_func_isnanl=no; ISNANL_LIBM= ;;
25309     esac
25310   else
25311     gl_func_isnanl=no
25312   fi
25313   if test $gl_func_isnanl != yes; then
25314     HAVE_ISNANL=0
25315   fi
25316
25317
25318
25319
25320
25321   if test $HAVE_ISNANL = 0 || test $REPLACE_ISNAN = 1; then
25322
25323
25324
25325
25326
25327
25328
25329
25330   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
25331
25332
25333
25334
25335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
25336 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
25337 if ${gl_cv_cc_long_double_expbit0+:} false; then :
25338   $as_echo_n "(cached) " >&6
25339 else
25340
25341       if test "$cross_compiling" = yes; then :
25342
25343                               gl_cv_cc_long_double_expbit0="unknown"
25344           case "$host_os" in
25345             mingw*) # On native Windows (little-endian), we know the result
25346                     # in two cases: mingw, MSVC.
25347               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25348 /* end confdefs.h.  */
25349
25350 #ifdef __MINGW32__
25351  Known
25352 #endif
25353
25354 _ACEOF
25355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25356   $EGREP "Known" >/dev/null 2>&1; then :
25357   gl_cv_cc_long_double_expbit0="word 2 bit 0"
25358 fi
25359 rm -f conftest*
25360
25361               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25362 /* end confdefs.h.  */
25363
25364 #ifdef _MSC_VER
25365  Known
25366 #endif
25367
25368 _ACEOF
25369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25370   $EGREP "Known" >/dev/null 2>&1; then :
25371   gl_cv_cc_long_double_expbit0="word 1 bit 20"
25372 fi
25373 rm -f conftest*
25374
25375               ;;
25376           esac
25377
25378 else
25379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25380 /* end confdefs.h.  */
25381
25382 #include <float.h>
25383 #include <stddef.h>
25384 #include <stdio.h>
25385 #include <string.h>
25386 #define NWORDS \
25387   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25388 typedef union { long double value; unsigned int word[NWORDS]; }
25389         memory_long_double;
25390 static unsigned int ored_words[NWORDS];
25391 static unsigned int anded_words[NWORDS];
25392 static void add_to_ored_words (long double x)
25393 {
25394   memory_long_double m;
25395   size_t i;
25396   /* Clear it first, in case
25397      sizeof (long double) < sizeof (memory_long_double).  */
25398   memset (&m, 0, sizeof (memory_long_double));
25399   m.value = x;
25400   for (i = 0; i < NWORDS; i++)
25401     {
25402       ored_words[i] |= m.word[i];
25403       anded_words[i] &= m.word[i];
25404     }
25405 }
25406 int main ()
25407 {
25408   size_t j;
25409   FILE *fp = fopen ("conftest.out", "w");
25410   if (fp == NULL)
25411     return 1;
25412   for (j = 0; j < NWORDS; j++)
25413     anded_words[j] = ~ (unsigned int) 0;
25414   add_to_ored_words (0.25L);
25415   add_to_ored_words (0.5L);
25416   add_to_ored_words (1.0L);
25417   add_to_ored_words (2.0L);
25418   add_to_ored_words (4.0L);
25419   /* Remove bits that are common (e.g. if representation of the first mantissa
25420      bit is explicit).  */
25421   for (j = 0; j < NWORDS; j++)
25422     ored_words[j] &= ~anded_words[j];
25423   /* Now find the nonzero word.  */
25424   for (j = 0; j < NWORDS; j++)
25425     if (ored_words[j] != 0)
25426       break;
25427   if (j < NWORDS)
25428     {
25429       size_t i;
25430       for (i = j + 1; i < NWORDS; i++)
25431         if (ored_words[i] != 0)
25432           {
25433             fprintf (fp, "unknown");
25434             return (fclose (fp) != 0);
25435           }
25436       for (i = 0; ; i++)
25437         if ((ored_words[j] >> i) & 1)
25438           {
25439             fprintf (fp, "word %d bit %d", (int) j, (int) i);
25440             return (fclose (fp) != 0);
25441           }
25442     }
25443   fprintf (fp, "unknown");
25444   return (fclose (fp) != 0);
25445 }
25446
25447 _ACEOF
25448 if ac_fn_c_try_run "$LINENO"; then :
25449   gl_cv_cc_long_double_expbit0=`cat conftest.out`
25450 else
25451   gl_cv_cc_long_double_expbit0="unknown"
25452 fi
25453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25454   conftest.$ac_objext conftest.beam conftest.$ac_ext
25455 fi
25456
25457       rm -f conftest.out
25458
25459 fi
25460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
25461 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
25462   case "$gl_cv_cc_long_double_expbit0" in
25463     word*bit*)
25464       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25465       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
25466
25467 cat >>confdefs.h <<_ACEOF
25468 #define LDBL_EXPBIT0_WORD $word
25469 _ACEOF
25470
25471
25472 cat >>confdefs.h <<_ACEOF
25473 #define LDBL_EXPBIT0_BIT $bit
25474 _ACEOF
25475
25476       ;;
25477   esac
25478
25479
25480
25481   fi
25482
25483
25484
25485
25486
25487           GNULIB_ISNANL=1
25488
25489
25490
25491
25492
25493 $as_echo "#define GNULIB_TEST_ISNANL 1" >>confdefs.h
25494
25495
25496
25497
25498
25499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
25500 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
25501 if ${gl_cv_func_isnanl_no_libm+:} false; then :
25502   $as_echo_n "(cached) " >&6
25503 else
25504
25505       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25506 /* end confdefs.h.  */
25507 #include <math.h>
25508              #if __GNUC__ >= 4
25509              # undef isnanl
25510              # define isnanl(x) __builtin_isnanl ((long double)(x))
25511              #elif defined isnan
25512              # undef isnanl
25513              # define isnanl(x) isnan ((long double)(x))
25514              #endif
25515              long double x;
25516 int
25517 main ()
25518 {
25519 return isnanl (x);
25520   ;
25521   return 0;
25522 }
25523 _ACEOF
25524 if ac_fn_c_try_link "$LINENO"; then :
25525   gl_cv_func_isnanl_no_libm=yes
25526 else
25527   gl_cv_func_isnanl_no_libm=no
25528 fi
25529 rm -f core conftest.err conftest.$ac_objext \
25530     conftest$ac_exeext conftest.$ac_ext
25531
25532 fi
25533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
25534 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
25535
25536   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
25537   if test $gl_func_isnanl_no_libm = yes; then
25538
25539
25540
25541
25542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
25543 $as_echo_n "checking whether isnanl works... " >&6; }
25544 if ${gl_cv_func_isnanl_works+:} false; then :
25545   $as_echo_n "(cached) " >&6
25546 else
25547
25548       if test "$cross_compiling" = yes; then :
25549   case "$host_os" in
25550            mingw*) # Guess yes on mingw, no on MSVC.
25551              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25552 /* end confdefs.h.  */
25553
25554 #ifdef __MINGW32__
25555  Known
25556 #endif
25557
25558 _ACEOF
25559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25560   $EGREP "Known" >/dev/null 2>&1; then :
25561   gl_cv_func_isnanl_works="guessing yes"
25562 else
25563   gl_cv_func_isnanl_works="guessing no"
25564 fi
25565 rm -f conftest*
25566
25567              ;;
25568            *) gl_cv_func_isnanl_works="guessing yes" ;;
25569          esac
25570
25571 else
25572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25573 /* end confdefs.h.  */
25574
25575 #include <float.h>
25576 #include <limits.h>
25577 #include <math.h>
25578 #if __GNUC__ >= 4
25579 # undef isnanl
25580 # define isnanl(x) __builtin_isnanl ((long double)(x))
25581 #elif defined isnan
25582 # undef isnanl
25583 # define isnanl(x) isnan ((long double)(x))
25584 #endif
25585 #define NWORDS \
25586   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25587 typedef union { unsigned int word[NWORDS]; long double value; }
25588         memory_long_double;
25589 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
25590    runtime type conversion.  */
25591 #ifdef __sgi
25592 static long double NaNl ()
25593 {
25594   double zero = 0.0;
25595   return zero / zero;
25596 }
25597 #else
25598 # define NaNl() (0.0L / 0.0L)
25599 #endif
25600 int main ()
25601 {
25602   int result = 0;
25603
25604   if (!isnanl (NaNl ()))
25605     result |= 1;
25606
25607   {
25608     memory_long_double m;
25609     unsigned int i;
25610
25611     /* The isnanl function should be immune against changes in the sign bit and
25612        in the mantissa bits.  The xor operation twiddles a bit that can only be
25613        a sign bit or a mantissa bit (since the exponent never extends to
25614        bit 31).  */
25615     m.value = NaNl ();
25616     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
25617     for (i = 0; i < NWORDS; i++)
25618       m.word[i] |= 1;
25619     if (!isnanl (m.value))
25620       result |= 1;
25621   }
25622
25623 #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
25624 /* Representation of an 80-bit 'long double' as an initializer for a sequence
25625    of 'unsigned int' words.  */
25626 # ifdef WORDS_BIGENDIAN
25627 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
25628      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
25629        ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
25630        (unsigned int) (mantlo) << 16                                        \
25631      }
25632 # else
25633 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
25634      { mantlo, manthi, exponent }
25635 # endif
25636   { /* Quiet NaN.  */
25637     static memory_long_double x =
25638       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
25639     if (!isnanl (x.value))
25640       result |= 2;
25641   }
25642   {
25643     /* Signalling NaN.  */
25644     static memory_long_double x =
25645       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
25646     if (!isnanl (x.value))
25647       result |= 2;
25648   }
25649   /* isnanl should return something even for noncanonical values.  */
25650   { /* Pseudo-NaN.  */
25651     static memory_long_double x =
25652       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
25653     if (isnanl (x.value) && !isnanl (x.value))
25654       result |= 4;
25655   }
25656   { /* Pseudo-Infinity.  */
25657     static memory_long_double x =
25658       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
25659     if (isnanl (x.value) && !isnanl (x.value))
25660       result |= 8;
25661   }
25662   { /* Pseudo-Zero.  */
25663     static memory_long_double x =
25664       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
25665     if (isnanl (x.value) && !isnanl (x.value))
25666       result |= 16;
25667   }
25668   { /* Unnormalized number.  */
25669     static memory_long_double x =
25670       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
25671     if (isnanl (x.value) && !isnanl (x.value))
25672       result |= 32;
25673   }
25674   { /* Pseudo-Denormal.  */
25675     static memory_long_double x =
25676       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
25677     if (isnanl (x.value) && !isnanl (x.value))
25678       result |= 64;
25679   }
25680 #endif
25681
25682   return result;
25683 }
25684 _ACEOF
25685 if ac_fn_c_try_run "$LINENO"; then :
25686   gl_cv_func_isnanl_works=yes
25687 else
25688   gl_cv_func_isnanl_works=no
25689 fi
25690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25691   conftest.$ac_objext conftest.beam conftest.$ac_ext
25692 fi
25693
25694
25695 fi
25696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
25697 $as_echo "$gl_cv_func_isnanl_works" >&6; }
25698
25699     case "$gl_cv_func_isnanl_works" in
25700       *yes) ;;
25701       *)    gl_func_isnanl_no_libm=no ;;
25702     esac
25703   fi
25704   if test $gl_func_isnanl_no_libm = yes; then
25705
25706 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
25707
25708   fi
25709
25710   if test $gl_func_isnanl_no_libm != yes; then
25711
25712
25713
25714
25715
25716
25717
25718
25719   gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
25720
25721
25722
25723
25724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
25725 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
25726 if ${gl_cv_cc_long_double_expbit0+:} false; then :
25727   $as_echo_n "(cached) " >&6
25728 else
25729
25730       if test "$cross_compiling" = yes; then :
25731
25732                               gl_cv_cc_long_double_expbit0="unknown"
25733           case "$host_os" in
25734             mingw*) # On native Windows (little-endian), we know the result
25735                     # in two cases: mingw, MSVC.
25736               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25737 /* end confdefs.h.  */
25738
25739 #ifdef __MINGW32__
25740  Known
25741 #endif
25742
25743 _ACEOF
25744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25745   $EGREP "Known" >/dev/null 2>&1; then :
25746   gl_cv_cc_long_double_expbit0="word 2 bit 0"
25747 fi
25748 rm -f conftest*
25749
25750               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25751 /* end confdefs.h.  */
25752
25753 #ifdef _MSC_VER
25754  Known
25755 #endif
25756
25757 _ACEOF
25758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25759   $EGREP "Known" >/dev/null 2>&1; then :
25760   gl_cv_cc_long_double_expbit0="word 1 bit 20"
25761 fi
25762 rm -f conftest*
25763
25764               ;;
25765           esac
25766
25767 else
25768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25769 /* end confdefs.h.  */
25770
25771 #include <float.h>
25772 #include <stddef.h>
25773 #include <stdio.h>
25774 #include <string.h>
25775 #define NWORDS \
25776   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25777 typedef union { long double value; unsigned int word[NWORDS]; }
25778         memory_long_double;
25779 static unsigned int ored_words[NWORDS];
25780 static unsigned int anded_words[NWORDS];
25781 static void add_to_ored_words (long double x)
25782 {
25783   memory_long_double m;
25784   size_t i;
25785   /* Clear it first, in case
25786      sizeof (long double) < sizeof (memory_long_double).  */
25787   memset (&m, 0, sizeof (memory_long_double));
25788   m.value = x;
25789   for (i = 0; i < NWORDS; i++)
25790     {
25791       ored_words[i] |= m.word[i];
25792       anded_words[i] &= m.word[i];
25793     }
25794 }
25795 int main ()
25796 {
25797   size_t j;
25798   FILE *fp = fopen ("conftest.out", "w");
25799   if (fp == NULL)
25800     return 1;
25801   for (j = 0; j < NWORDS; j++)
25802     anded_words[j] = ~ (unsigned int) 0;
25803   add_to_ored_words (0.25L);
25804   add_to_ored_words (0.5L);
25805   add_to_ored_words (1.0L);
25806   add_to_ored_words (2.0L);
25807   add_to_ored_words (4.0L);
25808   /* Remove bits that are common (e.g. if representation of the first mantissa
25809      bit is explicit).  */
25810   for (j = 0; j < NWORDS; j++)
25811     ored_words[j] &= ~anded_words[j];
25812   /* Now find the nonzero word.  */
25813   for (j = 0; j < NWORDS; j++)
25814     if (ored_words[j] != 0)
25815       break;
25816   if (j < NWORDS)
25817     {
25818       size_t i;
25819       for (i = j + 1; i < NWORDS; i++)
25820         if (ored_words[i] != 0)
25821           {
25822             fprintf (fp, "unknown");
25823             return (fclose (fp) != 0);
25824           }
25825       for (i = 0; ; i++)
25826         if ((ored_words[j] >> i) & 1)
25827           {
25828             fprintf (fp, "word %d bit %d", (int) j, (int) i);
25829             return (fclose (fp) != 0);
25830           }
25831     }
25832   fprintf (fp, "unknown");
25833   return (fclose (fp) != 0);
25834 }
25835
25836 _ACEOF
25837 if ac_fn_c_try_run "$LINENO"; then :
25838   gl_cv_cc_long_double_expbit0=`cat conftest.out`
25839 else
25840   gl_cv_cc_long_double_expbit0="unknown"
25841 fi
25842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25843   conftest.$ac_objext conftest.beam conftest.$ac_ext
25844 fi
25845
25846       rm -f conftest.out
25847
25848 fi
25849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
25850 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
25851   case "$gl_cv_cc_long_double_expbit0" in
25852     word*bit*)
25853       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25854       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
25855
25856 cat >>confdefs.h <<_ACEOF
25857 #define LDBL_EXPBIT0_WORD $word
25858 _ACEOF
25859
25860
25861 cat >>confdefs.h <<_ACEOF
25862 #define LDBL_EXPBIT0_BIT $bit
25863 _ACEOF
25864
25865       ;;
25866   esac
25867
25868
25869
25870   fi
25871   # You need to invoke gt_JAVACOMP yourself, possibly with arguments.
25872   ac_config_files="$ac_config_files javacomp.sh:build-aux/javacomp.sh.in"
25873
25874   # You need to invoke gt_JAVAEXEC yourself, possibly with arguments.
25875   ac_config_files="$ac_config_files javaexec.sh:build-aux/javaexec.sh.in"
25876
25877
25878
25879
25880   LDEXP_LIBM=
25881   if test $gl_cv_func_ldexp_no_libm = no; then
25882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used with libm" >&5
25883 $as_echo_n "checking whether ldexp() can be used with libm... " >&6; }
25884 if ${gl_cv_func_ldexp_in_libm+:} false; then :
25885   $as_echo_n "(cached) " >&6
25886 else
25887
25888         save_LIBS="$LIBS"
25889         LIBS="$LIBS -lm"
25890         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25891 /* end confdefs.h.  */
25892 #ifndef __NO_MATH_INLINES
25893                              # define __NO_MATH_INLINES 1 /* for glibc */
25894                              #endif
25895                              #include <math.h>
25896                              double (*funcptr) (double, int) = ldexp;
25897                              double x;
25898 int
25899 main ()
25900 {
25901 return ldexp (x, -1) > 0;
25902   ;
25903   return 0;
25904 }
25905 _ACEOF
25906 if ac_fn_c_try_link "$LINENO"; then :
25907   gl_cv_func_ldexp_in_libm=yes
25908 else
25909   gl_cv_func_ldexp_in_libm=no
25910 fi
25911 rm -f core conftest.err conftest.$ac_objext \
25912     conftest$ac_exeext conftest.$ac_ext
25913         LIBS="$save_LIBS"
25914
25915 fi
25916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_in_libm" >&5
25917 $as_echo "$gl_cv_func_ldexp_in_libm" >&6; }
25918     if test $gl_cv_func_ldexp_in_libm = yes; then
25919       LDEXP_LIBM=-lm
25920     fi
25921   fi
25922
25923
25924
25925
25926
25927
25928
25929
25930       ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
25931 "
25932 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
25933
25934 else
25935   HAVE_DECL_LDEXPL=0
25936 fi
25937
25938
25939   LDEXPL_LIBM=
25940   if test $HAVE_DECL_LDEXPL = 1; then
25941
25942   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
25943 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
25944 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
25945   $as_echo_n "(cached) " >&6
25946 else
25947
25948       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25949 /* end confdefs.h.  */
25950 #include <math.h>
25951              long double x;
25952 int
25953 main ()
25954 {
25955 return ldexpl (x, -1) > 0;
25956   ;
25957   return 0;
25958 }
25959 _ACEOF
25960 if ac_fn_c_try_link "$LINENO"; then :
25961   gl_cv_func_ldexpl_no_libm=yes
25962 else
25963   gl_cv_func_ldexpl_no_libm=no
25964 fi
25965 rm -f core conftest.err conftest.$ac_objext \
25966     conftest$ac_exeext conftest.$ac_ext
25967
25968 fi
25969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
25970 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
25971
25972     if test $gl_cv_func_ldexpl_no_libm = no; then
25973       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used with libm" >&5
25974 $as_echo_n "checking whether ldexpl() can be used with libm... " >&6; }
25975 if ${gl_cv_func_ldexpl_in_libm+:} false; then :
25976   $as_echo_n "(cached) " >&6
25977 else
25978
25979           save_LIBS="$LIBS"
25980           LIBS="$LIBS -lm"
25981           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25982 /* end confdefs.h.  */
25983 #include <math.h>
25984                  long double x;
25985 int
25986 main ()
25987 {
25988 return ldexpl (x, -1) > 0;
25989   ;
25990   return 0;
25991 }
25992 _ACEOF
25993 if ac_fn_c_try_link "$LINENO"; then :
25994   gl_cv_func_ldexpl_in_libm=yes
25995 else
25996   gl_cv_func_ldexpl_in_libm=no
25997 fi
25998 rm -f core conftest.err conftest.$ac_objext \
25999     conftest$ac_exeext conftest.$ac_ext
26000           LIBS="$save_LIBS"
26001
26002 fi
26003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_in_libm" >&5
26004 $as_echo "$gl_cv_func_ldexpl_in_libm" >&6; }
26005       if test $gl_cv_func_ldexpl_in_libm = yes; then
26006         LDEXPL_LIBM=-lm
26007       fi
26008     fi
26009     if test $gl_cv_func_ldexpl_no_libm = yes \
26010        || test $gl_cv_func_ldexpl_in_libm = yes; then
26011       save_LIBS="$LIBS"
26012       LIBS="$LIBS $LDEXPL_LIBM"
26013
26014
26015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
26016 $as_echo_n "checking whether ldexpl works... " >&6; }
26017 if ${gl_cv_func_ldexpl_works+:} false; then :
26018   $as_echo_n "(cached) " >&6
26019 else
26020
26021       if test "$cross_compiling" = yes; then :
26022
26023          case "$host_os" in
26024            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
26025                             # Guess yes on native Windows.
26026            mingw*)          gl_cv_func_ldexpl_works="guessing yes" ;;
26027            *)               gl_cv_func_ldexpl_works="guessing yes" ;;
26028          esac
26029
26030 else
26031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26032 /* end confdefs.h.  */
26033
26034 #include <math.h>
26035 extern
26036 #ifdef __cplusplus
26037 "C"
26038 #endif
26039 long double ldexpl (long double, int);
26040 int main()
26041 {
26042   int result = 0;
26043   {
26044     volatile long double x = 1.0;
26045     volatile long double y = ldexpl (x, -1);
26046     if (y != 0.5L)
26047       result |= 1;
26048   }
26049   {
26050     volatile long double x = 1.73205L;
26051     volatile long double y = ldexpl (x, 0);
26052     if (y != x)
26053       result |= 2;
26054   }
26055   return result;
26056 }
26057 _ACEOF
26058 if ac_fn_c_try_run "$LINENO"; then :
26059   gl_cv_func_ldexpl_works=yes
26060 else
26061   gl_cv_func_ldexpl_works=no
26062 fi
26063 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26064   conftest.$ac_objext conftest.beam conftest.$ac_ext
26065 fi
26066
26067
26068 fi
26069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
26070 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
26071
26072       LIBS="$save_LIBS"
26073       case "$gl_cv_func_ldexpl_works" in
26074         *yes) gl_func_ldexpl=yes ;;
26075         *)    gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;;
26076       esac
26077     else
26078       gl_func_ldexpl=no
26079     fi
26080     if test $gl_func_ldexpl = yes; then
26081
26082 $as_echo "#define HAVE_LDEXPL 1" >>confdefs.h
26083
26084     fi
26085   fi
26086   if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then
26087         if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
26088
26089       LDEXPL_LIBM="$LDEXP_LIBM"
26090     else
26091       LDEXPL_LIBM="$ISNANL_LIBM"
26092     fi
26093   fi
26094
26095
26096   if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then
26097
26098
26099
26100
26101
26102
26103
26104
26105   gl_LIBOBJS="$gl_LIBOBJS ldexpl.$ac_objext"
26106
26107   fi
26108
26109
26110
26111
26112
26113           GNULIB_LDEXPL=1
26114
26115
26116
26117
26118
26119 $as_echo "#define GNULIB_TEST_LDEXPL 1" >>confdefs.h
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
26133
26134
26135
26136   if test "$gl_threads_api" = posix; then
26137     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
26138     # pthread_rwlock_* functions.
26139     has_rwlock=false
26140     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
26141 "
26142 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
26143   has_rwlock=true
26144
26145 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
26146
26147 fi
26148
26149     if $has_rwlock; then
26150
26151
26152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
26153 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
26154 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
26155   $as_echo_n "(cached) " >&6
26156 else
26157   save_LIBS="$LIBS"
26158      LIBS="$LIBS $LIBMULTITHREAD"
26159      if test "$cross_compiling" = yes; then :
26160   gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
26161 else
26162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26163 /* end confdefs.h.  */
26164
26165 #include <errno.h>
26166 #include <pthread.h>
26167 #include <stdlib.h>
26168 #include <unistd.h>
26169
26170 #define SUCCEED() exit (0)
26171 #define FAILURE() exit (1)
26172 #define UNEXPECTED(n) (exit (10 + (n)))
26173
26174 /* The main thread creates the waiting writer and the requesting reader threads
26175    in the default way; this guarantees that they have the same priority.
26176    We can reuse the main thread as first reader thread.  */
26177
26178 static pthread_rwlock_t lock;
26179 static pthread_t reader1;
26180 static pthread_t writer;
26181 static pthread_t reader2;
26182 static pthread_t timer;
26183 /* Used to pass control from writer to reader2 and from reader2 to timer,
26184    as in a relay race.
26185    Passing control from one running thread to another running thread
26186    is most likely faster than to create the second thread.  */
26187 static pthread_mutex_t baton;
26188
26189 static void *
26190 timer_func (void *ignored)
26191 {
26192   /* Step 13 (can be before or after step 12):
26193      The timer thread takes the baton, then waits a moment to make sure
26194      it can tell whether the second reader thread is blocked at step 12.  */
26195   if (pthread_mutex_lock (&baton))
26196     UNEXPECTED (13);
26197   usleep (100000);
26198   /* By the time we get here, it's clear that the second reader thread is
26199      blocked at step 12.  This is the desired behaviour.  */
26200   SUCCEED ();
26201 }
26202
26203 static void *
26204 reader2_func (void *ignored)
26205 {
26206   int err;
26207
26208   /* Step 8 (can be before or after step 7):
26209      The second reader thread takes the baton, then waits a moment to make sure
26210      the writer thread has reached step 7.  */
26211   if (pthread_mutex_lock (&baton))
26212     UNEXPECTED (8);
26213   usleep (100000);
26214   /* Step 9: The second reader thread requests the lock.  */
26215   err = pthread_rwlock_tryrdlock (&lock);
26216   if (err == 0)
26217     FAILURE ();
26218   else if (err != EBUSY)
26219     UNEXPECTED (9);
26220   /* Step 10: Launch a timer, to test whether the next call blocks.  */
26221   if (pthread_create (&timer, NULL, timer_func, NULL))
26222     UNEXPECTED (10);
26223   /* Step 11: Release the baton.  */
26224   if (pthread_mutex_unlock (&baton))
26225     UNEXPECTED (11);
26226   /* Step 12: The second reader thread requests the lock.  */
26227   err = pthread_rwlock_rdlock (&lock);
26228   if (err == 0)
26229     FAILURE ();
26230   else
26231     UNEXPECTED (12);
26232 }
26233
26234 static void *
26235 writer_func (void *ignored)
26236 {
26237   /* Step 4: Take the baton, so that the second reader thread does not go ahead
26238      too early.  */
26239   if (pthread_mutex_lock (&baton))
26240     UNEXPECTED (4);
26241   /* Step 5: Create the second reader thread.  */
26242   if (pthread_create (&reader2, NULL, reader2_func, NULL))
26243     UNEXPECTED (5);
26244   /* Step 6: Release the baton.  */
26245   if (pthread_mutex_unlock (&baton))
26246     UNEXPECTED (6);
26247   /* Step 7: The writer thread requests the lock.  */
26248   if (pthread_rwlock_wrlock (&lock))
26249     UNEXPECTED (7);
26250   return NULL;
26251 }
26252
26253 int
26254 main ()
26255 {
26256   reader1 = pthread_self ();
26257
26258   /* Step 1: The main thread initializes the lock and the baton.  */
26259   if (pthread_rwlock_init (&lock, NULL))
26260     UNEXPECTED (1);
26261   if (pthread_mutex_init (&baton, NULL))
26262     UNEXPECTED (1);
26263   /* Step 2: The main thread acquires the lock as a reader.  */
26264   if (pthread_rwlock_rdlock (&lock))
26265     UNEXPECTED (2);
26266   /* Step 3: Create the writer thread.  */
26267   if (pthread_create (&writer, NULL, writer_func, NULL))
26268     UNEXPECTED (3);
26269   /* Job done.  Go to sleep.  */
26270   for (;;)
26271     {
26272       sleep (1);
26273     }
26274 }
26275
26276 _ACEOF
26277 if ac_fn_c_try_run "$LINENO"; then :
26278   gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
26279 else
26280   gl_cv_pthread_rwlock_rdlock_prefer_writer=no
26281 fi
26282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26283   conftest.$ac_objext conftest.beam conftest.$ac_ext
26284 fi
26285
26286      LIBS="$save_LIBS"
26287
26288 fi
26289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
26290 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
26291   case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
26292     *yes)
26293
26294 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
26295
26296       ;;
26297   esac
26298
26299     fi
26300     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
26301     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26302 /* end confdefs.h.  */
26303
26304       #include <pthread.h>
26305 int
26306 main ()
26307 {
26308
26309 #if __FreeBSD__ == 4
26310 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
26311 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
26312        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
26313 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
26314 #else
26315 int x = (int)PTHREAD_MUTEX_RECURSIVE;
26316 return !x;
26317 #endif
26318
26319   ;
26320   return 0;
26321 }
26322 _ACEOF
26323 if ac_fn_c_try_compile "$LINENO"; then :
26324
26325 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
26326
26327 fi
26328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26329   fi
26330   :
26331
26332
26333
26334 cat >>confdefs.h <<_ACEOF
26335 #define GNULIB_LOCK 1
26336 _ACEOF
26337
26338
26339
26340
26341
26342
26343   if test $ac_cv_func_lstat = yes; then
26344
26345     case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
26346       solaris* | *no)
26347         REPLACE_LSTAT=1
26348         ;;
26349     esac
26350   else
26351     HAVE_LSTAT=0
26352   fi
26353
26354   if test $REPLACE_LSTAT = 1; then
26355
26356
26357
26358
26359
26360
26361
26362
26363   gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
26364
26365     :
26366   fi
26367
26368
26369
26370
26371
26372           GNULIB_LSTAT=1
26373
26374
26375
26376
26377
26378 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
26379
26380
26381
26382
26383
26384
26385
26386
26387       for ac_header in stdlib.h
26388 do :
26389   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
26390 if test "x$ac_cv_header_stdlib_h" = xyes; then :
26391   cat >>confdefs.h <<_ACEOF
26392 #define HAVE_STDLIB_H 1
26393 _ACEOF
26394
26395 fi
26396
26397 done
26398
26399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
26400 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
26401 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
26402   $as_echo_n "(cached) " >&6
26403 else
26404   if test "$cross_compiling" = yes; then :
26405   case "$host_os" in
26406           # Guess yes on platforms where we know the result.
26407           *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
26408           | hpux* | solaris* | cygwin* | mingw*)
26409             ac_cv_func_malloc_0_nonnull=yes ;;
26410           # If we don't know, assume the worst.
26411           *) ac_cv_func_malloc_0_nonnull=no ;;
26412         esac
26413
26414 else
26415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26416 /* end confdefs.h.  */
26417 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
26418             # include <stdlib.h>
26419             #else
26420             char *malloc ();
26421             #endif
26422
26423 int
26424 main ()
26425 {
26426 char *p = malloc (0);
26427             int result = !p;
26428             free (p);
26429             return result;
26430   ;
26431   return 0;
26432 }
26433
26434 _ACEOF
26435 if ac_fn_c_try_run "$LINENO"; then :
26436   ac_cv_func_malloc_0_nonnull=yes
26437 else
26438   ac_cv_func_malloc_0_nonnull=no
26439 fi
26440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26441   conftest.$ac_objext conftest.beam conftest.$ac_ext
26442 fi
26443
26444
26445 fi
26446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
26447 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
26448   if test $ac_cv_func_malloc_0_nonnull = yes; then :
26449
26450 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
26451
26452 else
26453   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
26454
26455      REPLACE_MALLOC=1
26456
26457 fi
26458
26459
26460   if test $REPLACE_MALLOC = 1; then
26461
26462
26463
26464
26465
26466
26467
26468
26469   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
26470
26471   fi
26472
26473
26474 cat >>confdefs.h <<_ACEOF
26475 #define GNULIB_MALLOC_GNU 1
26476 _ACEOF
26477
26478
26479
26480
26481
26482   if test $gl_cv_func_malloc_posix = yes; then
26483
26484 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
26485
26486   else
26487     REPLACE_MALLOC=1
26488   fi
26489
26490   if test $REPLACE_MALLOC = 1; then
26491
26492
26493
26494
26495
26496
26497
26498
26499   gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
26500
26501   fi
26502
26503
26504
26505
26506
26507           GNULIB_MALLOC_POSIX=1
26508
26509
26510
26511
26512
26513 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532      if test $gl_cv_have_include_next = yes; then
26533        gl_cv_next_math_h='<'math.h'>'
26534      else
26535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
26536 $as_echo_n "checking absolute name of <math.h>... " >&6; }
26537 if ${gl_cv_next_math_h+:} false; then :
26538   $as_echo_n "(cached) " >&6
26539 else
26540
26541              if test $ac_cv_header_math_h = yes; then
26542
26543
26544
26545
26546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26547 /* end confdefs.h.  */
26548 #include <math.h>
26549 _ACEOF
26550                 case "$host_os" in
26551     aix*) gl_absname_cpp="$ac_cpp -C" ;;
26552     *)    gl_absname_cpp="$ac_cpp" ;;
26553   esac
26554
26555   case "$host_os" in
26556     mingw*)
26557                                           gl_dirsep_regex='[/\\]'
26558       ;;
26559     *)
26560       gl_dirsep_regex='\/'
26561       ;;
26562   esac
26563       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26564   gl_header_literal_regex=`echo 'math.h' \
26565                            | sed -e "$gl_make_literal_regex_sed"`
26566   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26567       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26568       s|^/[^/]|//&|
26569       p
26570       q
26571     }'
26572
26573         gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26574   sed -n "$gl_absolute_header_sed"`
26575
26576            gl_header=$gl_cv_absolute_math_h
26577            gl_cv_next_math_h='"'$gl_header'"'
26578           else
26579                gl_cv_next_math_h='<'math.h'>'
26580              fi
26581
26582
26583 fi
26584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
26585 $as_echo "$gl_cv_next_math_h" >&6; }
26586      fi
26587      NEXT_MATH_H=$gl_cv_next_math_h
26588
26589      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26590        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26591        gl_next_as_first_directive='<'math.h'>'
26592      else
26593        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26594        gl_next_as_first_directive=$gl_cv_next_math_h
26595      fi
26596      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
26597
26598
26599
26600
26601
26602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
26603 $as_echo_n "checking whether NAN macro works... " >&6; }
26604 if ${gl_cv_header_math_nan_works+:} false; then :
26605   $as_echo_n "(cached) " >&6
26606 else
26607   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26608 /* end confdefs.h.  */
26609 #include <math.h>
26610 int
26611 main ()
26612 {
26613 /* Solaris 10 has a broken definition of NAN.  Other platforms
26614         fail to provide NAN, or provide it only in C99 mode; this
26615         test only needs to fail when NAN is provided but wrong.  */
26616          float f = 1.0f;
26617 #ifdef NAN
26618          f = NAN;
26619 #endif
26620          return f == 0;
26621   ;
26622   return 0;
26623 }
26624 _ACEOF
26625 if ac_fn_c_try_compile "$LINENO"; then :
26626   gl_cv_header_math_nan_works=yes
26627 else
26628   gl_cv_header_math_nan_works=no
26629 fi
26630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26631 fi
26632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
26633 $as_echo "$gl_cv_header_math_nan_works" >&6; }
26634   if test $gl_cv_header_math_nan_works = no; then
26635     REPLACE_NAN=1
26636   fi
26637   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
26638 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
26639 if ${gl_cv_header_math_huge_val_works+:} false; then :
26640   $as_echo_n "(cached) " >&6
26641 else
26642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26643 /* end confdefs.h.  */
26644 #include <math.h>
26645 int
26646 main ()
26647 {
26648 /* Solaris 10 has a broken definition of HUGE_VAL.  */
26649          double d = HUGE_VAL;
26650          return d == 0;
26651   ;
26652   return 0;
26653 }
26654 _ACEOF
26655 if ac_fn_c_try_compile "$LINENO"; then :
26656   gl_cv_header_math_huge_val_works=yes
26657 else
26658   gl_cv_header_math_huge_val_works=no
26659 fi
26660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26661 fi
26662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
26663 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
26664   if test $gl_cv_header_math_huge_val_works = no; then
26665     REPLACE_HUGE_VAL=1
26666   fi
26667
26668
26669     for gl_func in acosf acosl asinf asinl atanf atanl      cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf      expf expl exp2 exp2f exp2l expm1 expm1f expm1l      fabsf fabsl floorf floorl fma fmaf fmal      fmod fmodf fmodl frexpf frexpl hypotf hypotl      ilogb ilogbf ilogbl      ldexpf ldexpl      log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l      logb logbf logbl      modf modff modfl powf      remainder remainderf remainderl      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl      tanf tanl tanhf trunc truncf truncl; do
26670     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26671     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26672 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26673 if eval \${$as_gl_Symbol+:} false; then :
26674   $as_echo_n "(cached) " >&6
26675 else
26676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26677 /* end confdefs.h.  */
26678 #include <math.h>
26679 int
26680 main ()
26681 {
26682 #undef $gl_func
26683   (void) $gl_func;
26684   ;
26685   return 0;
26686 }
26687 _ACEOF
26688 if ac_fn_c_try_compile "$LINENO"; then :
26689   eval "$as_gl_Symbol=yes"
26690 else
26691   eval "$as_gl_Symbol=no"
26692 fi
26693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26694 fi
26695 eval ac_res=\$$as_gl_Symbol
26696                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26697 $as_echo "$ac_res" >&6; }
26698     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26699   cat >>confdefs.h <<_ACEOF
26700 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26701 _ACEOF
26702
26703                      eval ac_cv_have_decl_$gl_func=yes
26704 fi
26705       done
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
26719
26720
26721
26722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
26723 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
26724 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
26725   $as_echo_n "(cached) " >&6
26726 else
26727
26728                   case "$host_os" in
26729                      # Guess no on AIX and OSF/1.
26730         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
26731                      # Guess yes otherwise.
26732         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
26733       esac
26734       if test $LOCALE_JA != none; then
26735         if test "$cross_compiling" = yes; then :
26736   :
26737 else
26738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26739 /* end confdefs.h.  */
26740
26741 #include <locale.h>
26742 #include <string.h>
26743 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26744    <wchar.h>.
26745    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26746    included before <wchar.h>.  */
26747 #include <stddef.h>
26748 #include <stdio.h>
26749 #include <time.h>
26750 #include <wchar.h>
26751 int main ()
26752 {
26753   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
26754     {
26755       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
26756       mbstate_t state;
26757       wchar_t wc;
26758
26759       memset (&state, '\0', sizeof (mbstate_t));
26760       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
26761         if (mbsinit (&state))
26762           return 2;
26763     }
26764   return 0;
26765 }
26766 _ACEOF
26767 if ac_fn_c_try_run "$LINENO"; then :
26768   gl_cv_func_mbrtowc_incomplete_state=yes
26769 else
26770   gl_cv_func_mbrtowc_incomplete_state=no
26771 fi
26772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26773   conftest.$ac_objext conftest.beam conftest.$ac_ext
26774 fi
26775
26776       fi
26777
26778 fi
26779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
26780 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
26781
26782
26783
26784
26785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
26786 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
26787 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
26788   $as_echo_n "(cached) " >&6
26789 else
26790
26791                   case "$host_os" in
26792                     # Guess no on Solaris 8.
26793         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
26794                     # Guess yes otherwise.
26795         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
26796       esac
26797       if test $LOCALE_ZH_CN != none; then
26798         if test "$cross_compiling" = yes; then :
26799   :
26800 else
26801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26802 /* end confdefs.h.  */
26803
26804 #include <locale.h>
26805 #include <stdlib.h>
26806 #include <string.h>
26807 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26808    <wchar.h>.
26809    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26810    included before <wchar.h>.  */
26811 #include <stddef.h>
26812 #include <stdio.h>
26813 #include <time.h>
26814 #include <wchar.h>
26815 int main ()
26816 {
26817   /* This fails on Solaris 8:
26818      mbrtowc returns 2, and sets wc to 0x00F0.
26819      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
26820   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
26821     {
26822       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
26823       mbstate_t state;
26824       wchar_t wc;
26825
26826       memset (&state, '\0', sizeof (mbstate_t));
26827       if (mbrtowc (&wc, input + 3, 6, &state) != 4
26828           && mbtowc (&wc, input + 3, 6) == 4)
26829         return 2;
26830     }
26831   return 0;
26832 }
26833 _ACEOF
26834 if ac_fn_c_try_run "$LINENO"; then :
26835   gl_cv_func_mbrtowc_sanitycheck=yes
26836 else
26837   gl_cv_func_mbrtowc_sanitycheck=no
26838 fi
26839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26840   conftest.$ac_objext conftest.beam conftest.$ac_ext
26841 fi
26842
26843       fi
26844
26845 fi
26846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
26847 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
26848
26849     REPLACE_MBSTATE_T=0
26850     case "$gl_cv_func_mbrtowc_incomplete_state" in
26851       *yes) ;;
26852       *) REPLACE_MBSTATE_T=1 ;;
26853     esac
26854     case "$gl_cv_func_mbrtowc_sanitycheck" in
26855       *yes) ;;
26856       *) REPLACE_MBSTATE_T=1 ;;
26857     esac
26858   else
26859     REPLACE_MBSTATE_T=1
26860   fi
26861
26862
26863
26864   if test $ac_cv_func_mbrtowc = no; then
26865     HAVE_MBRTOWC=0
26866     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
26867 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26868    <wchar.h>.
26869    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26870    included before <wchar.h>.  */
26871 #include <stddef.h>
26872 #include <stdio.h>
26873 #include <time.h>
26874 #include <wchar.h>
26875
26876 "
26877 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
26878   ac_have_decl=1
26879 else
26880   ac_have_decl=0
26881 fi
26882
26883 cat >>confdefs.h <<_ACEOF
26884 #define HAVE_DECL_MBRTOWC $ac_have_decl
26885 _ACEOF
26886
26887     if test $ac_cv_have_decl_mbrtowc = yes; then
26888                         REPLACE_MBRTOWC=1
26889     fi
26890   else
26891     if test $REPLACE_MBSTATE_T = 1; then
26892       REPLACE_MBRTOWC=1
26893     else
26894
26895
26896
26897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
26898 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
26899 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
26900   $as_echo_n "(cached) " >&6
26901 else
26902
26903                   case "$host_os" in
26904                   # Guess no on Solaris.
26905         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
26906                   # Guess yes otherwise.
26907         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
26908       esac
26909       if test $LOCALE_FR_UTF8 != none; then
26910         if test "$cross_compiling" = yes; then :
26911   :
26912 else
26913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26914 /* end confdefs.h.  */
26915
26916 #include <locale.h>
26917 #include <stdlib.h>
26918 #include <string.h>
26919 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26920    <wchar.h>.
26921    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26922    included before <wchar.h>.  */
26923 #include <stddef.h>
26924 #include <stdio.h>
26925 #include <time.h>
26926 #include <wchar.h>
26927 int main ()
26928 {
26929   int result = 0;
26930
26931   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
26932     {
26933       char input[] = "\303\237er";
26934       mbstate_t state;
26935       wchar_t wc;
26936       size_t ret;
26937
26938       memset (&state, '\0', sizeof (mbstate_t));
26939       wc = (wchar_t) 0xBADFACE;
26940       ret = mbrtowc (&wc, input, 5, &state);
26941       if (ret != 2)
26942         result |= 1;
26943       if (!mbsinit (&state))
26944         result |= 2;
26945
26946       memset (&state, '\0', sizeof (mbstate_t));
26947       ret = mbrtowc (NULL, input, 5, &state);
26948       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
26949         result |= 4;
26950       if (!mbsinit (&state))
26951         result |= 8;
26952     }
26953   return result;
26954 }
26955 _ACEOF
26956 if ac_fn_c_try_run "$LINENO"; then :
26957   gl_cv_func_mbrtowc_null_arg1=yes
26958 else
26959   gl_cv_func_mbrtowc_null_arg1=no
26960 fi
26961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26962   conftest.$ac_objext conftest.beam conftest.$ac_ext
26963 fi
26964
26965       fi
26966
26967 fi
26968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
26969 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
26970
26971
26972
26973
26974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
26975 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
26976 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
26977   $as_echo_n "(cached) " >&6
26978 else
26979
26980                   case "$host_os" in
26981               # Guess no on OSF/1.
26982         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
26983               # Guess yes otherwise.
26984         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
26985       esac
26986       if test $LOCALE_FR_UTF8 != none; then
26987         if test "$cross_compiling" = yes; then :
26988   :
26989 else
26990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26991 /* end confdefs.h.  */
26992
26993 #include <locale.h>
26994 #include <string.h>
26995 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26996    <wchar.h>.
26997    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26998    included before <wchar.h>.  */
26999 #include <stddef.h>
27000 #include <stdio.h>
27001 #include <time.h>
27002 #include <wchar.h>
27003 int main ()
27004 {
27005   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27006     {
27007       mbstate_t state;
27008       wchar_t wc;
27009       int ret;
27010
27011       memset (&state, '\0', sizeof (mbstate_t));
27012       wc = (wchar_t) 0xBADFACE;
27013       mbrtowc (&wc, NULL, 5, &state);
27014       /* Check that wc was not modified.  */
27015       if (wc != (wchar_t) 0xBADFACE)
27016         return 2;
27017     }
27018   return 0;
27019 }
27020 _ACEOF
27021 if ac_fn_c_try_run "$LINENO"; then :
27022   gl_cv_func_mbrtowc_null_arg2=yes
27023 else
27024   gl_cv_func_mbrtowc_null_arg2=no
27025 fi
27026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27027   conftest.$ac_objext conftest.beam conftest.$ac_ext
27028 fi
27029
27030       fi
27031
27032 fi
27033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
27034 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
27035
27036
27037
27038
27039
27040
27041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
27042 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
27043 if ${gl_cv_func_mbrtowc_retval+:} false; then :
27044   $as_echo_n "(cached) " >&6
27045 else
27046
27047                   case "$host_os" in
27048                                    # Guess no on HP-UX, Solaris, native Windows.
27049         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
27050                                    # Guess yes otherwise.
27051         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
27052       esac
27053       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
27054          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
27055         if test "$cross_compiling" = yes; then :
27056   :
27057 else
27058   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27059 /* end confdefs.h.  */
27060
27061 #include <locale.h>
27062 #include <string.h>
27063 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27064    <wchar.h>.
27065    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27066    included before <wchar.h>.  */
27067 #include <stddef.h>
27068 #include <stdio.h>
27069 #include <time.h>
27070 #include <wchar.h>
27071 int main ()
27072 {
27073   int result = 0;
27074   int found_some_locale = 0;
27075   /* This fails on Solaris.  */
27076   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
27077     {
27078       char input[] = "B\303\274\303\237er"; /* "Büßer" */
27079       mbstate_t state;
27080       wchar_t wc;
27081
27082       memset (&state, '\0', sizeof (mbstate_t));
27083       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27084         {
27085           input[1] = '\0';
27086           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
27087             result |= 1;
27088         }
27089       found_some_locale = 1;
27090     }
27091   /* This fails on HP-UX 11.11.  */
27092   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27093     {
27094       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27095       mbstate_t state;
27096       wchar_t wc;
27097
27098       memset (&state, '\0', sizeof (mbstate_t));
27099       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27100         {
27101           input[1] = '\0';
27102           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
27103             result |= 2;
27104         }
27105       found_some_locale = 1;
27106     }
27107   /* This fails on native Windows.  */
27108   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
27109     {
27110       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
27111       mbstate_t state;
27112       wchar_t wc;
27113
27114       memset (&state, '\0', sizeof (mbstate_t));
27115       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27116         {
27117           input[3] = '\0';
27118           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27119             result |= 4;
27120         }
27121       found_some_locale = 1;
27122     }
27123   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
27124     {
27125       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
27126       mbstate_t state;
27127       wchar_t wc;
27128
27129       memset (&state, '\0', sizeof (mbstate_t));
27130       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27131         {
27132           input[3] = '\0';
27133           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27134             result |= 8;
27135         }
27136       found_some_locale = 1;
27137     }
27138   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
27139     {
27140       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
27141       mbstate_t state;
27142       wchar_t wc;
27143
27144       memset (&state, '\0', sizeof (mbstate_t));
27145       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
27146         {
27147           input[3] = '\0';
27148           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
27149             result |= 16;
27150         }
27151       found_some_locale = 1;
27152     }
27153   return (found_some_locale ? result : 77);
27154 }
27155 _ACEOF
27156 if ac_fn_c_try_run "$LINENO"; then :
27157   gl_cv_func_mbrtowc_retval=yes
27158 else
27159   if test $? != 77; then
27160              gl_cv_func_mbrtowc_retval=no
27161            fi
27162
27163 fi
27164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27165   conftest.$ac_objext conftest.beam conftest.$ac_ext
27166 fi
27167
27168       fi
27169
27170 fi
27171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
27172 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
27173
27174
27175
27176
27177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
27178 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
27179 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
27180   $as_echo_n "(cached) " >&6
27181 else
27182
27183                   case "$host_os" in
27184                        # Guess no on Solaris 8 and 9.
27185         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
27186                        # Guess yes otherwise.
27187         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
27188       esac
27189       if test $LOCALE_ZH_CN != none; then
27190         if test "$cross_compiling" = yes; then :
27191   :
27192 else
27193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27194 /* end confdefs.h.  */
27195
27196 #include <locale.h>
27197 #include <string.h>
27198 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27199    <wchar.h>.
27200    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27201    included before <wchar.h>.  */
27202 #include <stddef.h>
27203 #include <stdio.h>
27204 #include <time.h>
27205 #include <wchar.h>
27206 int main ()
27207 {
27208   /* This fails on Solaris 8 and 9.  */
27209   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27210     {
27211       mbstate_t state;
27212       wchar_t wc;
27213
27214       memset (&state, '\0', sizeof (mbstate_t));
27215       if (mbrtowc (&wc, "", 1, &state) != 0)
27216         return 2;
27217     }
27218   return 0;
27219 }
27220 _ACEOF
27221 if ac_fn_c_try_run "$LINENO"; then :
27222   gl_cv_func_mbrtowc_nul_retval=yes
27223 else
27224   gl_cv_func_mbrtowc_nul_retval=no
27225 fi
27226 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27227   conftest.$ac_objext conftest.beam conftest.$ac_ext
27228 fi
27229
27230       fi
27231
27232 fi
27233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
27234 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
27235
27236
27237
27238      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
27239 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
27240 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
27241   $as_echo_n "(cached) " >&6
27242 else
27243
27244                   case "$host_os" in
27245                               # Guess no on AIX and glibc systems.
27246         aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
27247                               # Guess yes on native Windows.
27248         mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
27249         *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
27250       esac
27251       if test "$cross_compiling" = yes; then :
27252   :
27253 else
27254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27255 /* end confdefs.h.  */
27256
27257            #include <wchar.h>
27258            static wchar_t wc;
27259            static mbstate_t mbs;
27260            int
27261            main (void)
27262            {
27263              return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
27264            }
27265 _ACEOF
27266 if ac_fn_c_try_run "$LINENO"; then :
27267   gl_cv_func_mbrtowc_empty_input=yes
27268 else
27269   gl_cv_func_mbrtowc_empty_input=no
27270 fi
27271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27272   conftest.$ac_objext conftest.beam conftest.$ac_ext
27273 fi
27274
27275
27276 fi
27277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
27278 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
27279
27280
27281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
27282 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
27283 if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
27284   $as_echo_n "(cached) " >&6
27285 else
27286
27287                gl_cv_C_locale_sans_EILSEQ="guessing no"
27288
27289      if test "$cross_compiling" = yes; then :
27290   case "$host_os" in
27291                  # Guess yes on native Windows.
27292          mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
27293        esac
27294
27295 else
27296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27297 /* end confdefs.h.  */
27298 #include <limits.h>
27299             #include <locale.h>
27300             #include <wchar.h>
27301
27302 int
27303 main ()
27304 {
27305
27306             int i;
27307             char *locale = setlocale (LC_ALL, "C");
27308             if (! locale)
27309               return 2;
27310             for (i = CHAR_MIN; i <= CHAR_MAX; i++)
27311               {
27312                 char c = i;
27313                 wchar_t wc;
27314                 mbstate_t mbs = { 0, };
27315                 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
27316                 if (1 < ss)
27317                   return 3;
27318               }
27319             return 0;
27320
27321   ;
27322   return 0;
27323 }
27324 _ACEOF
27325 if ac_fn_c_try_run "$LINENO"; then :
27326   gl_cv_C_locale_sans_EILSEQ=yes
27327 else
27328   gl_cv_C_locale_sans_EILSEQ=no
27329 fi
27330 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27331   conftest.$ac_objext conftest.beam conftest.$ac_ext
27332 fi
27333
27334
27335 fi
27336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
27337 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
27338
27339       case "$gl_cv_func_mbrtowc_null_arg1" in
27340         *yes) ;;
27341         *)
27342 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
27343
27344            REPLACE_MBRTOWC=1
27345            ;;
27346       esac
27347       case "$gl_cv_func_mbrtowc_null_arg2" in
27348         *yes) ;;
27349         *)
27350 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
27351
27352            REPLACE_MBRTOWC=1
27353            ;;
27354       esac
27355       case "$gl_cv_func_mbrtowc_retval" in
27356         *yes) ;;
27357         *)
27358 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
27359
27360            REPLACE_MBRTOWC=1
27361            ;;
27362       esac
27363       case "$gl_cv_func_mbrtowc_nul_retval" in
27364         *yes) ;;
27365         *)
27366 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
27367
27368            REPLACE_MBRTOWC=1
27369            ;;
27370       esac
27371       case "$gl_cv_func_mbrtowc_empty_input" in
27372         *yes) ;;
27373         *)
27374 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
27375
27376            REPLACE_MBRTOWC=1
27377            ;;
27378       esac
27379       case $gl_cv_C_locale_sans_EILSEQ in
27380         *yes) ;;
27381         *)
27382 $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
27383
27384            REPLACE_MBRTOWC=1
27385            ;;
27386       esac
27387     fi
27388   fi
27389
27390   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
27391
27392
27393
27394
27395
27396
27397
27398
27399   gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
27400
27401
27402   :
27403
27404   fi
27405
27406
27407
27408
27409
27410           GNULIB_MBRTOWC=1
27411
27412
27413
27414
27415
27416 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
27432
27433
27434
27435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
27436 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
27437 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
27438   $as_echo_n "(cached) " >&6
27439 else
27440
27441                   case "$host_os" in
27442                      # Guess no on AIX and OSF/1.
27443         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
27444                      # Guess yes otherwise.
27445         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
27446       esac
27447       if test $LOCALE_JA != none; then
27448         if test "$cross_compiling" = yes; then :
27449   :
27450 else
27451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27452 /* end confdefs.h.  */
27453
27454 #include <locale.h>
27455 #include <string.h>
27456 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27457    <wchar.h>.
27458    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27459    included before <wchar.h>.  */
27460 #include <stddef.h>
27461 #include <stdio.h>
27462 #include <time.h>
27463 #include <wchar.h>
27464 int main ()
27465 {
27466   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
27467     {
27468       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
27469       mbstate_t state;
27470       wchar_t wc;
27471
27472       memset (&state, '\0', sizeof (mbstate_t));
27473       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
27474         if (mbsinit (&state))
27475           return 2;
27476     }
27477   return 0;
27478 }
27479 _ACEOF
27480 if ac_fn_c_try_run "$LINENO"; then :
27481   gl_cv_func_mbrtowc_incomplete_state=yes
27482 else
27483   gl_cv_func_mbrtowc_incomplete_state=no
27484 fi
27485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27486   conftest.$ac_objext conftest.beam conftest.$ac_ext
27487 fi
27488
27489       fi
27490
27491 fi
27492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
27493 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
27494
27495
27496
27497
27498      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
27499 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
27500 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
27501   $as_echo_n "(cached) " >&6
27502 else
27503
27504                   case "$host_os" in
27505                     # Guess no on Solaris 8.
27506         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
27507                     # Guess yes otherwise.
27508         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
27509       esac
27510       if test $LOCALE_ZH_CN != none; then
27511         if test "$cross_compiling" = yes; then :
27512   :
27513 else
27514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27515 /* end confdefs.h.  */
27516
27517 #include <locale.h>
27518 #include <stdlib.h>
27519 #include <string.h>
27520 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27521    <wchar.h>.
27522    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27523    included before <wchar.h>.  */
27524 #include <stddef.h>
27525 #include <stdio.h>
27526 #include <time.h>
27527 #include <wchar.h>
27528 int main ()
27529 {
27530   /* This fails on Solaris 8:
27531      mbrtowc returns 2, and sets wc to 0x00F0.
27532      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
27533   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
27534     {
27535       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
27536       mbstate_t state;
27537       wchar_t wc;
27538
27539       memset (&state, '\0', sizeof (mbstate_t));
27540       if (mbrtowc (&wc, input + 3, 6, &state) != 4
27541           && mbtowc (&wc, input + 3, 6) == 4)
27542         return 2;
27543     }
27544   return 0;
27545 }
27546 _ACEOF
27547 if ac_fn_c_try_run "$LINENO"; then :
27548   gl_cv_func_mbrtowc_sanitycheck=yes
27549 else
27550   gl_cv_func_mbrtowc_sanitycheck=no
27551 fi
27552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27553   conftest.$ac_objext conftest.beam conftest.$ac_ext
27554 fi
27555
27556       fi
27557
27558 fi
27559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
27560 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
27561
27562     REPLACE_MBSTATE_T=0
27563     case "$gl_cv_func_mbrtowc_incomplete_state" in
27564       *yes) ;;
27565       *) REPLACE_MBSTATE_T=1 ;;
27566     esac
27567     case "$gl_cv_func_mbrtowc_sanitycheck" in
27568       *yes) ;;
27569       *) REPLACE_MBSTATE_T=1 ;;
27570     esac
27571   else
27572     REPLACE_MBSTATE_T=1
27573   fi
27574
27575
27576
27577   if test $ac_cv_func_mbsinit = no; then
27578     HAVE_MBSINIT=0
27579     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
27580 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27581    <wchar.h>.
27582    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27583    included before <wchar.h>.  */
27584 #include <stddef.h>
27585 #include <stdio.h>
27586 #include <time.h>
27587 #include <wchar.h>
27588
27589 "
27590 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
27591   ac_have_decl=1
27592 else
27593   ac_have_decl=0
27594 fi
27595
27596 cat >>confdefs.h <<_ACEOF
27597 #define HAVE_DECL_MBSINIT $ac_have_decl
27598 _ACEOF
27599
27600     if test $ac_cv_have_decl_mbsinit = yes; then
27601                         REPLACE_MBSINIT=1
27602     fi
27603   else
27604     if test $REPLACE_MBSTATE_T = 1; then
27605       REPLACE_MBSINIT=1
27606     else
27607                         case "$host_os" in
27608         mingw*) REPLACE_MBSINIT=1 ;;
27609       esac
27610     fi
27611   fi
27612
27613   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
27614
27615
27616
27617
27618
27619
27620
27621
27622   gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
27623
27624
27625   :
27626
27627   fi
27628
27629
27630
27631
27632
27633           GNULIB_MBSINIT=1
27634
27635
27636
27637
27638
27639 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
27640
27641
27642
27643
27644
27645
27646
27647       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
27648 $as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; }
27649 if ${ac_cv_have_decl_mbswidth+:} false; then :
27650   $as_echo_n "(cached) " >&6
27651 else
27652   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27653 /* end confdefs.h.  */
27654
27655 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27656    <wchar.h>.
27657    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
27658    before <wchar.h>.  */
27659 #include <stddef.h>
27660 #include <stdio.h>
27661 #include <time.h>
27662 #include <wchar.h>
27663
27664 int
27665 main ()
27666 {
27667
27668   char *p = (char *) mbswidth;
27669   return !p;
27670
27671   ;
27672   return 0;
27673 }
27674 _ACEOF
27675 if ac_fn_c_try_compile "$LINENO"; then :
27676   ac_cv_have_decl_mbswidth=yes
27677 else
27678   ac_cv_have_decl_mbswidth=no
27679 fi
27680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27681 fi
27682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
27683 $as_echo "$ac_cv_have_decl_mbswidth" >&6; }
27684   if test $ac_cv_have_decl_mbswidth = yes; then
27685     ac_val=1
27686   else
27687     ac_val=0
27688   fi
27689
27690 cat >>confdefs.h <<_ACEOF
27691 #define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val
27692 _ACEOF
27693
27694
27695
27696
27697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
27698 $as_echo_n "checking for mbstate_t... " >&6; }
27699 if ${ac_cv_type_mbstate_t+:} false; then :
27700   $as_echo_n "(cached) " >&6
27701 else
27702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27703 /* end confdefs.h.  */
27704 $ac_includes_default
27705 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27706    <wchar.h>.
27707    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27708    included before <wchar.h>.  */
27709 #include <stddef.h>
27710 #include <stdio.h>
27711 #include <time.h>
27712 #include <wchar.h>
27713 int
27714 main ()
27715 {
27716 mbstate_t x; return sizeof x;
27717   ;
27718   return 0;
27719 }
27720 _ACEOF
27721 if ac_fn_c_try_compile "$LINENO"; then :
27722   ac_cv_type_mbstate_t=yes
27723 else
27724   ac_cv_type_mbstate_t=no
27725 fi
27726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27727 fi
27728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
27729 $as_echo "$ac_cv_type_mbstate_t" >&6; }
27730    if test $ac_cv_type_mbstate_t = yes; then
27731
27732 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
27733
27734    else
27735
27736 $as_echo "#define mbstate_t int" >>confdefs.h
27737
27738    fi
27739
27740
27741
27742   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
27743
27744
27745
27746
27747
27748
27749
27750
27751   gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
27752
27753
27754   for ac_header in bp-sym.h
27755 do :
27756   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
27757 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
27758   cat >>confdefs.h <<_ACEOF
27759 #define HAVE_BP_SYM_H 1
27760 _ACEOF
27761
27762 fi
27763
27764 done
27765
27766
27767   fi
27768
27769
27770
27771
27772
27773           GNULIB_MEMCHR=1
27774
27775
27776
27777
27778
27779 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
27780
27781
27782
27783
27784
27785
27786
27787   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27788
27789
27790
27791
27792
27793
27794
27795
27796   gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
27797
27798   fi
27799
27800   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27801
27802
27803
27804
27805
27806
27807
27808
27809   gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
27810
27811   fi
27812
27813
27814 cat >>confdefs.h <<_ACEOF
27815 #define GNULIB_MSVC_NOTHROW 1
27816 _ACEOF
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
27834 $as_echo_n "checking for obstacks that work with any size object... " >&6; }
27835 if ${ac_cv_func_obstack+:} false; then :
27836   $as_echo_n "(cached) " >&6
27837 else
27838   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27839 /* end confdefs.h.  */
27840 #include "obstack.h"
27841              void *obstack_chunk_alloc (size_t n) { return 0; }
27842              void obstack_chunk_free (void *p) { }
27843              /* Check that an internal function returns size_t, not int.  */
27844              size_t _obstack_memory_used (struct obstack *);
27845
27846 int
27847 main ()
27848 {
27849 struct obstack mem;
27850              obstack_init (&mem);
27851              obstack_free (&mem, 0);
27852
27853   ;
27854   return 0;
27855 }
27856 _ACEOF
27857 if ac_fn_c_try_link "$LINENO"; then :
27858   ac_cv_func_obstack=yes
27859 else
27860   ac_cv_func_obstack=no
27861 fi
27862 rm -f core conftest.err conftest.$ac_objext \
27863     conftest$ac_exeext conftest.$ac_ext
27864 fi
27865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
27866 $as_echo "$ac_cv_func_obstack" >&6; }
27867    if test "$ac_cv_func_obstack" = yes; then
27868
27869 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
27870
27871    else
27872
27873
27874
27875
27876
27877
27878
27879
27880   gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
27881
27882    fi
27883
27884
27885
27886
27887
27888
27889   if test $ac_cv_func_obstack_printf = no ; then
27890
27891
27892   if test $ac_cv_func_obstack_printf = yes; then
27893     REPLACE_OBSTACK_PRINTF=1
27894   fi
27895
27896   fi
27897
27898
27899
27900   if test $ac_cv_have_decl_obstack_printf = no; then
27901     HAVE_DECL_OBSTACK_PRINTF=0
27902   fi
27903
27904
27905   if test $ac_cv_func_obstack_printf = no || test $REPLACE_OBSTACK_PRINTF = 1; then
27906
27907
27908
27909
27910
27911
27912
27913
27914   gl_LIBOBJS="$gl_LIBOBJS obstack_printf.$ac_objext"
27915
27916   fi
27917
27918
27919
27920
27921
27922           GNULIB_OBSTACK_PRINTF=1
27923
27924
27925
27926
27927
27928 $as_echo "#define GNULIB_TEST_OBSTACK_PRINTF 1" >>confdefs.h
27929
27930
27931
27932
27933
27934
27935   case "$host_os" in
27936     mingw* | pw*)
27937       REPLACE_OPEN=1
27938       ;;
27939     *)
27940
27941       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
27942         REPLACE_OPEN=1
27943       fi
27944       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
27945 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
27946 if ${gl_cv_func_open_slash+:} false; then :
27947   $as_echo_n "(cached) " >&6
27948 else
27949   # Assume that if we have lstat, we can also check symlinks.
27950           if test $ac_cv_func_lstat = yes; then
27951             touch conftest.tmp
27952             ln -s conftest.tmp conftest.lnk
27953           fi
27954           if test "$cross_compiling" = yes; then :
27955
27956              case "$host_os" in
27957                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
27958                  gl_cv_func_open_slash="guessing no" ;;
27959                *)
27960                  gl_cv_func_open_slash="guessing yes" ;;
27961              esac
27962
27963 else
27964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27965 /* end confdefs.h.  */
27966
27967 #include <fcntl.h>
27968 #if HAVE_UNISTD_H
27969 # include <unistd.h>
27970 #endif
27971 int main ()
27972 {
27973   int result = 0;
27974 #if HAVE_LSTAT
27975   if (open ("conftest.lnk/", O_RDONLY) != -1)
27976     result |= 1;
27977 #endif
27978   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
27979     result |= 2;
27980   return result;
27981 }
27982 _ACEOF
27983 if ac_fn_c_try_run "$LINENO"; then :
27984   gl_cv_func_open_slash=yes
27985 else
27986   gl_cv_func_open_slash=no
27987 fi
27988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27989   conftest.$ac_objext conftest.beam conftest.$ac_ext
27990 fi
27991
27992           rm -f conftest.sl conftest.tmp conftest.lnk
27993
27994 fi
27995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
27996 $as_echo "$gl_cv_func_open_slash" >&6; }
27997       case "$gl_cv_func_open_slash" in
27998         *no)
27999
28000 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
28001
28002           REPLACE_OPEN=1
28003           ;;
28004       esac
28005       ;;
28006   esac
28007
28008
28009
28010   if test $REPLACE_OPEN = 1; then
28011
28012
28013
28014
28015
28016
28017
28018
28019   gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
28020
28021
28022
28023   :
28024
28025   fi
28026
28027
28028
28029
28030
28031           GNULIB_OPEN=1
28032
28033
28034
28035
28036
28037 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049              if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
28050             REPLACE_PERROR=1
28051   fi
28052   case ${gl_cv_func_strerror_r_works-unset} in
28053     unset|*yes)
28054       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
28055 $as_echo_n "checking whether perror matches strerror... " >&6; }
28056 if ${gl_cv_func_perror_works+:} false; then :
28057   $as_echo_n "(cached) " >&6
28058 else
28059   if test "$cross_compiling" = yes; then :
28060   case "$host_os" in
28061                       # Guess yes on native Windows.
28062               mingw*) gl_cv_func_perror_works="guessing yes" ;;
28063                       # Otherwise guess no.
28064               *)      gl_cv_func_perror_works="guessing no" ;;
28065             esac
28066
28067 else
28068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28069 /* end confdefs.h.  */
28070 #include <errno.h>
28071                 #include <stdio.h>
28072                 #include <stdlib.h>
28073                 #include <string.h>
28074
28075 int
28076 main ()
28077 {
28078 char *str = strerror (-1);
28079                 if (!getenv("CONFTEST_OUTPUT")) return 0;
28080                 if (!str) str = "";
28081                 puts (str);
28082                 errno = -1;
28083                 perror ("");
28084                 return 0;
28085
28086   ;
28087   return 0;
28088 }
28089 _ACEOF
28090 if ac_fn_c_try_run "$LINENO"; then :
28091   if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
28092                && cmp conftest.txt1 conftest.txt2 >/dev/null; then
28093               gl_cv_func_perror_works=yes
28094             else
28095               gl_cv_func_perror_works=no
28096             fi
28097             rm -rf conftest.txt1 conftest.txt2
28098 else
28099   gl_cv_func_perror_works=no
28100 fi
28101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28102   conftest.$ac_objext conftest.beam conftest.$ac_ext
28103 fi
28104
28105
28106 fi
28107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
28108 $as_echo "$gl_cv_func_perror_works" >&6; }
28109       case "$gl_cv_func_perror_works" in
28110         *yes) ;;
28111         *) REPLACE_PERROR=1 ;;
28112       esac
28113       ;;
28114     *)
28115                   REPLACE_PERROR=1
28116       ;;
28117   esac
28118
28119   if test $REPLACE_PERROR = 1; then
28120
28121
28122
28123
28124
28125
28126
28127
28128   gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
28129
28130   fi
28131
28132
28133
28134
28135
28136           GNULIB_PERROR=1
28137
28138
28139
28140
28141
28142 $as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152   if test $ac_cv_func_pipe2 != yes; then
28153     HAVE_PIPE2=0
28154   fi
28155
28156
28157
28158
28159
28160
28161           GNULIB_PIPE2=1
28162
28163
28164
28165
28166
28167 $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
28168
28169
28170
28171
28172
28173 cat >>confdefs.h <<_ACEOF
28174 #define GNULIB_PIPE2_SAFER 1
28175 _ACEOF
28176
28177
28178
28179
28180
28181
28182
28183
28184   if test $REPLACE_POSIX_SPAWN = 1; then
28185     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
28186   else
28187             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
28188 $as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
28189 if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
28190   $as_echo_n "(cached) " >&6
28191 else
28192   if test "$cross_compiling" = yes; then :
28193   # Guess no on Solaris, yes otherwise.
28194           case "$host_os" in
28195             solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
28196                       # Guess no on native Windows.
28197             mingw*)   gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
28198             *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
28199           esac
28200
28201 else
28202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28203 /* end confdefs.h.  */
28204
28205 #include <spawn.h>
28206 int main ()
28207 {
28208   posix_spawn_file_actions_t actions;
28209   if (posix_spawn_file_actions_init (&actions) != 0)
28210     return 1;
28211   if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
28212     return 2;
28213   return 0;
28214 }
28215 _ACEOF
28216 if ac_fn_c_try_run "$LINENO"; then :
28217   gl_cv_func_posix_spawn_file_actions_addclose_works=yes
28218 else
28219   gl_cv_func_posix_spawn_file_actions_addclose_works=no
28220 fi
28221 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28222   conftest.$ac_objext conftest.beam conftest.$ac_ext
28223 fi
28224
28225
28226 fi
28227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
28228 $as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
28229     case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
28230       *yes) ;;
28231       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
28232     esac
28233   fi
28234
28235   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
28236
28237
28238
28239
28240
28241
28242
28243
28244   gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
28245
28246   fi
28247
28248
28249
28250
28251
28252           GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
28253
28254
28255
28256
28257
28258 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268   if test $REPLACE_POSIX_SPAWN = 1; then
28269     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
28270   else
28271             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
28272 $as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
28273 if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
28274   $as_echo_n "(cached) " >&6
28275 else
28276   if test "$cross_compiling" = yes; then :
28277   # Guess no on Solaris, yes otherwise.
28278           case "$host_os" in
28279             solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
28280                       # Guess no on native Windows.
28281             mingw*)   gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
28282             *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
28283           esac
28284
28285 else
28286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28287 /* end confdefs.h.  */
28288
28289 #include <spawn.h>
28290 int main ()
28291 {
28292   posix_spawn_file_actions_t actions;
28293   if (posix_spawn_file_actions_init (&actions) != 0)
28294     return 1;
28295   if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
28296     return 2;
28297   return 0;
28298 }
28299 _ACEOF
28300 if ac_fn_c_try_run "$LINENO"; then :
28301   gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
28302 else
28303   gl_cv_func_posix_spawn_file_actions_adddup2_works=no
28304 fi
28305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28306   conftest.$ac_objext conftest.beam conftest.$ac_ext
28307 fi
28308
28309
28310 fi
28311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
28312 $as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
28313     case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
28314       *yes) ;;
28315       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
28316     esac
28317   fi
28318
28319   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
28320
28321
28322
28323
28324
28325
28326
28327
28328   gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
28329
28330   fi
28331
28332
28333
28334
28335
28336           GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
28337
28338
28339
28340
28341
28342 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352   if test $REPLACE_POSIX_SPAWN = 1; then
28353     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
28354   else
28355             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
28356 $as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
28357 if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
28358   $as_echo_n "(cached) " >&6
28359 else
28360   if test "$cross_compiling" = yes; then :
28361   # Guess no on Solaris, yes otherwise.
28362           case "$host_os" in
28363             solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
28364                       # Guess no on native Windows.
28365             mingw*)   gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
28366             *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
28367           esac
28368
28369 else
28370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28371 /* end confdefs.h.  */
28372
28373 #include <spawn.h>
28374 #include <fcntl.h>
28375 int main ()
28376 {
28377   posix_spawn_file_actions_t actions;
28378   if (posix_spawn_file_actions_init (&actions) != 0)
28379     return 1;
28380   if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
28381       == 0)
28382     return 2;
28383   return 0;
28384 }
28385 _ACEOF
28386 if ac_fn_c_try_run "$LINENO"; then :
28387   gl_cv_func_posix_spawn_file_actions_addopen_works=yes
28388 else
28389   gl_cv_func_posix_spawn_file_actions_addopen_works=no
28390 fi
28391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28392   conftest.$ac_objext conftest.beam conftest.$ac_ext
28393 fi
28394
28395
28396 fi
28397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
28398 $as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
28399     case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
28400       *yes) ;;
28401       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
28402     esac
28403   fi
28404
28405   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
28406
28407
28408
28409
28410
28411
28412
28413
28414   gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
28415
28416   fi
28417
28418
28419
28420
28421
28422           GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
28423
28424
28425
28426
28427
28428 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
28429
28430
28431
28432
28433
28434
28435   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28436
28437
28438
28439
28440
28441
28442
28443
28444   gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
28445
28446   fi
28447
28448
28449
28450
28451
28452           GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
28453
28454
28455
28456
28457
28458 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
28459
28460
28461
28462
28463
28464
28465   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28466
28467
28468
28469
28470
28471
28472
28473
28474   gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
28475
28476   fi
28477
28478
28479
28480
28481
28482           GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
28483
28484
28485
28486
28487
28488 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
28489
28490
28491
28492
28493
28494
28495   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28496
28497
28498
28499
28500
28501
28502
28503
28504   gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
28505
28506   fi
28507
28508
28509
28510
28511
28512           GNULIB_POSIX_SPAWNATTR_DESTROY=1
28513
28514
28515
28516
28517
28518 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
28519
28520
28521
28522
28523
28524
28525   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28526
28527
28528
28529
28530
28531
28532
28533
28534   gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
28535
28536   fi
28537
28538
28539
28540
28541
28542           GNULIB_POSIX_SPAWNATTR_INIT=1
28543
28544
28545
28546
28547
28548 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
28549
28550
28551
28552
28553
28554
28555   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28556
28557
28558
28559
28560
28561
28562
28563
28564   gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
28565
28566   fi
28567
28568
28569
28570
28571
28572           GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
28573
28574
28575
28576
28577
28578 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
28579
28580
28581
28582
28583
28584
28585   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28586
28587
28588
28589
28590
28591
28592
28593
28594   gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
28595
28596   fi
28597
28598
28599
28600
28601
28602           GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
28603
28604
28605
28606
28607
28608 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
28609
28610
28611
28612
28613
28614
28615   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
28616
28617
28618
28619
28620
28621
28622
28623
28624   gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634   gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
28635
28636
28637   for ac_header in paths.h
28638 do :
28639   ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
28640 if test "x$ac_cv_header_paths_h" = xyes; then :
28641   cat >>confdefs.h <<_ACEOF
28642 #define HAVE_PATHS_H 1
28643 _ACEOF
28644
28645 fi
28646
28647 done
28648
28649   for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
28650 do :
28651   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
28652 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
28653 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
28654   cat >>confdefs.h <<_ACEOF
28655 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
28656 _ACEOF
28657
28658 fi
28659 done
28660
28661
28662   fi
28663
28664
28665
28666
28667
28668           GNULIB_POSIX_SPAWNP=1
28669
28670
28671
28672
28673
28674 $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
28675
28676
28677
28678
28679
28680   if test $gl_cv_func_frexp_no_libm = yes; then
28681
28682
28683
28684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
28685 $as_echo_n "checking whether frexp works... " >&6; }
28686 if ${gl_cv_func_frexp_works+:} false; then :
28687   $as_echo_n "(cached) " >&6
28688 else
28689
28690       if test "$cross_compiling" = yes; then :
28691   case "$host_os" in
28692            netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
28693            mingw*) # Guess yes with MSVC, no with mingw.
28694              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28695 /* end confdefs.h.  */
28696
28697 #ifdef _MSC_VER
28698  Good
28699 #endif
28700
28701 _ACEOF
28702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28703   $EGREP "Good" >/dev/null 2>&1; then :
28704   gl_cv_func_frexp_works="guessing yes"
28705 else
28706   gl_cv_func_frexp_works="guessing no"
28707 fi
28708 rm -f conftest*
28709
28710              ;;
28711            *) gl_cv_func_frexp_works="guessing yes" ;;
28712          esac
28713
28714 else
28715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28716 /* end confdefs.h.  */
28717
28718 #include <float.h>
28719 #include <math.h>
28720 #include <string.h>
28721 #if HAVE_DECL_ALARM
28722 # include <signal.h>
28723 # include <unistd.h>
28724 #endif
28725 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
28726    ICC 10.0 has a bug when optimizing the expression -zero.
28727    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
28728    to PowerPC on Mac OS X 10.5.  */
28729 #if defined __hpux || defined __sgi || defined __ICC
28730 static double
28731 compute_minus_zero (void)
28732 {
28733   return -DBL_MIN * DBL_MIN;
28734 }
28735 # define minus_zero compute_minus_zero ()
28736 #else
28737 double minus_zero = -0.0;
28738 #endif
28739 int main()
28740 {
28741   int result = 0;
28742   int i;
28743   volatile double x;
28744   double zero = 0.0;
28745 #if HAVE_DECL_ALARM
28746   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
28747      number.  Let the test fail in this case.  */
28748   signal (SIGALRM, SIG_DFL);
28749   alarm (5);
28750 #endif
28751   /* Test on denormalized numbers.  */
28752   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
28753     ;
28754   if (x > 0.0)
28755     {
28756       int exp;
28757       double y = frexp (x, &exp);
28758       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
28759          On NetBSD: y = 0.75. Correct: y = 0.5.  */
28760       if (y != 0.5)
28761         result |= 1;
28762     }
28763   /* Test on infinite numbers.  */
28764   x = 1.0 / zero;
28765   {
28766     int exp;
28767     double y = frexp (x, &exp);
28768     if (y != x)
28769       result |= 2;
28770   }
28771   /* Test on negative zero.  */
28772   x = minus_zero;
28773   {
28774     int exp;
28775     double y = frexp (x, &exp);
28776     if (memcmp (&y, &x, sizeof x))
28777       result |= 4;
28778   }
28779   return result;
28780 }
28781 _ACEOF
28782 if ac_fn_c_try_run "$LINENO"; then :
28783   gl_cv_func_frexp_works=yes
28784 else
28785   gl_cv_func_frexp_works=no
28786 fi
28787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28788   conftest.$ac_objext conftest.beam conftest.$ac_ext
28789 fi
28790
28791
28792 fi
28793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
28794 $as_echo "$gl_cv_func_frexp_works" >&6; }
28795
28796     case "$gl_cv_func_frexp_works" in
28797       *yes)
28798
28799 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
28800
28801         ;;
28802     esac
28803   fi
28804
28805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
28806 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
28807 if ${gl_cv_func_ldexp_no_libm+:} false; then :
28808   $as_echo_n "(cached) " >&6
28809 else
28810
28811       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28812 /* end confdefs.h.  */
28813 #include <math.h>
28814              double x;
28815              int y;
28816 int
28817 main ()
28818 {
28819 return ldexp (x, y) < 1;
28820   ;
28821   return 0;
28822 }
28823 _ACEOF
28824 if ac_fn_c_try_link "$LINENO"; then :
28825   gl_cv_func_ldexp_no_libm=yes
28826 else
28827   gl_cv_func_ldexp_no_libm=no
28828 fi
28829 rm -f core conftest.err conftest.$ac_objext \
28830     conftest$ac_exeext conftest.$ac_ext
28831
28832 fi
28833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
28834 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
28835   if test $gl_cv_func_ldexp_no_libm = yes; then
28836
28837 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
28838
28839   fi
28840
28841
28842
28843
28844
28845
28846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
28847 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
28848 if ${gl_cv_func_frexpl_no_libm+:} false; then :
28849   $as_echo_n "(cached) " >&6
28850 else
28851
28852       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28853 /* end confdefs.h.  */
28854 #include <math.h>
28855              long double x;
28856 int
28857 main ()
28858 {
28859 int e; return frexpl (x, &e) > 0;
28860   ;
28861   return 0;
28862 }
28863 _ACEOF
28864 if ac_fn_c_try_link "$LINENO"; then :
28865   gl_cv_func_frexpl_no_libm=yes
28866 else
28867   gl_cv_func_frexpl_no_libm=no
28868 fi
28869 rm -f core conftest.err conftest.$ac_objext \
28870     conftest$ac_exeext conftest.$ac_ext
28871
28872 fi
28873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
28874 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
28875
28876   if test $gl_cv_func_frexpl_no_libm = yes; then
28877
28878
28879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
28880 $as_echo_n "checking whether frexpl works... " >&6; }
28881 if ${gl_cv_func_frexpl_works+:} false; then :
28882   $as_echo_n "(cached) " >&6
28883 else
28884
28885       if test "$cross_compiling" = yes; then :
28886
28887          case "$host_os" in
28888            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
28889               gl_cv_func_frexpl_works="guessing no";;
28890            *) gl_cv_func_frexpl_works="guessing yes";;
28891          esac
28892
28893 else
28894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28895 /* end confdefs.h.  */
28896
28897 #include <float.h>
28898 #include <math.h>
28899 /* Override the values of <float.h>, like done in float.in.h.  */
28900 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
28901 # undef LDBL_MIN_EXP
28902 # define LDBL_MIN_EXP    (-16381)
28903 #endif
28904 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
28905 # undef LDBL_MIN_EXP
28906 # define LDBL_MIN_EXP    (-16381)
28907 #endif
28908 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
28909 # undef LDBL_MIN_EXP
28910 # define LDBL_MIN_EXP DBL_MIN_EXP
28911 #endif
28912 #if defined __sgi && (LDBL_MANT_DIG >= 106)
28913 # if defined __GNUC__
28914 #  undef LDBL_MIN_EXP
28915 #  define LDBL_MIN_EXP DBL_MIN_EXP
28916 # endif
28917 #endif
28918 extern
28919 #ifdef __cplusplus
28920 "C"
28921 #endif
28922 long double frexpl (long double, int *);
28923 int main()
28924 {
28925   int result = 0;
28926   volatile long double x;
28927   /* Test on finite numbers that fails on AIX 5.1.  */
28928   x = 16.0L;
28929   {
28930     int exp = -9999;
28931     frexpl (x, &exp);
28932     if (exp != 5)
28933       result |= 1;
28934   }
28935   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
28936      function returns an invalid (incorrectly normalized) value: it returns
28937                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
28938      but the correct result is
28939           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
28940   x = 1.01L;
28941   {
28942     int exp = -9999;
28943     long double y = frexpl (x, &exp);
28944     if (!(exp == 1 && y == 0.505L))
28945       result |= 2;
28946   }
28947   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
28948      LDBL_MAX_EXP = 16384.
28949      In the loop end test, we test x against Infinity, rather than comparing
28950      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
28951   {
28952     int i;
28953     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
28954       {
28955         int exp = -9999;
28956         frexpl (x, &exp);
28957         if (exp != i)
28958           {
28959             result |= 4;
28960             break;
28961           }
28962       }
28963   }
28964   /* Test on denormalized numbers.  */
28965   {
28966     int i;
28967     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
28968       ;
28969     if (x > 0.0L)
28970       {
28971         int exp;
28972         long double y = frexpl (x, &exp);
28973         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
28974            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
28975         if (exp != LDBL_MIN_EXP - 1)
28976           result |= 8;
28977       }
28978   }
28979   /* Test on infinite numbers.  */
28980   x = 1.0L / 0.0L;
28981   {
28982     int exp;
28983     long double y = frexpl (x, &exp);
28984     if (y != x)
28985       result |= 16;
28986   }
28987   return result;
28988 }
28989 _ACEOF
28990 if ac_fn_c_try_run "$LINENO"; then :
28991   gl_cv_func_frexpl_works=yes
28992 else
28993   gl_cv_func_frexpl_works=no
28994 fi
28995 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28996   conftest.$ac_objext conftest.beam conftest.$ac_ext
28997 fi
28998
28999
29000 fi
29001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
29002 $as_echo "$gl_cv_func_frexpl_works" >&6; }
29003
29004     case "$gl_cv_func_frexpl_works" in
29005       *yes) gl_func_frexpl_no_libm=yes ;;
29006       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
29007     esac
29008   else
29009     gl_func_frexpl_no_libm=no
29010         REPLACE_FREXPL=1
29011   fi
29012   if test $gl_func_frexpl_no_libm = yes; then
29013
29014 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
29015
29016             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
29017 "
29018 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
29019
29020 else
29021   HAVE_DECL_FREXPL=0
29022 fi
29023
29024   fi
29025
29026
29027   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
29028 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
29029 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
29030   $as_echo_n "(cached) " >&6
29031 else
29032
29033       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29034 /* end confdefs.h.  */
29035 #include <math.h>
29036              long double x;
29037 int
29038 main ()
29039 {
29040 return ldexpl (x, -1) > 0;
29041   ;
29042   return 0;
29043 }
29044 _ACEOF
29045 if ac_fn_c_try_link "$LINENO"; then :
29046   gl_cv_func_ldexpl_no_libm=yes
29047 else
29048   gl_cv_func_ldexpl_no_libm=no
29049 fi
29050 rm -f core conftest.err conftest.$ac_objext \
29051     conftest$ac_exeext conftest.$ac_ext
29052
29053 fi
29054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
29055 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
29056
29057   if test $gl_cv_func_ldexpl_no_libm = yes; then
29058
29059
29060      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
29061 $as_echo_n "checking whether ldexpl works... " >&6; }
29062 if ${gl_cv_func_ldexpl_works+:} false; then :
29063   $as_echo_n "(cached) " >&6
29064 else
29065
29066       if test "$cross_compiling" = yes; then :
29067
29068          case "$host_os" in
29069            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
29070                             # Guess yes on native Windows.
29071            mingw*)          gl_cv_func_ldexpl_works="guessing yes" ;;
29072            *)               gl_cv_func_ldexpl_works="guessing yes" ;;
29073          esac
29074
29075 else
29076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077 /* end confdefs.h.  */
29078
29079 #include <math.h>
29080 extern
29081 #ifdef __cplusplus
29082 "C"
29083 #endif
29084 long double ldexpl (long double, int);
29085 int main()
29086 {
29087   int result = 0;
29088   {
29089     volatile long double x = 1.0;
29090     volatile long double y = ldexpl (x, -1);
29091     if (y != 0.5L)
29092       result |= 1;
29093   }
29094   {
29095     volatile long double x = 1.73205L;
29096     volatile long double y = ldexpl (x, 0);
29097     if (y != x)
29098       result |= 2;
29099   }
29100   return result;
29101 }
29102 _ACEOF
29103 if ac_fn_c_try_run "$LINENO"; then :
29104   gl_cv_func_ldexpl_works=yes
29105 else
29106   gl_cv_func_ldexpl_works=no
29107 fi
29108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29109   conftest.$ac_objext conftest.beam conftest.$ac_ext
29110 fi
29111
29112
29113 fi
29114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
29115 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
29116
29117     case "$gl_cv_func_ldexpl_works" in
29118       *yes)
29119
29120 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
29121
29122                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
29123 "
29124 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
29125
29126 else
29127   HAVE_DECL_LDEXPL=0
29128 fi
29129
29130         ;;
29131     esac
29132   fi
29133
29134
29135
29136   if test $gl_cv_func_vfprintf_posix = no; then
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148   gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext"
29149
29150   REPLACE_PRINTF=1
29151
29152 $as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h
29153
29154   :
29155
29156   fi
29157
29158
29159
29160
29161
29162
29163           GNULIB_PRINTF_POSIX=1
29164
29165
29166
29167
29168
29169 $as_echo "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h
29170
29171
29172
29173
29174   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
29175 "
29176 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
29177   ac_have_decl=1
29178 else
29179   ac_have_decl=0
29180 fi
29181
29182 cat >>confdefs.h <<_ACEOF
29183 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
29184 _ACEOF
29185
29186   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
29187 "
29188 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
29189   ac_have_decl=1
29190 else
29191   ac_have_decl=0
29192 fi
29193
29194 cat >>confdefs.h <<_ACEOF
29195 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
29196 _ACEOF
29197
29198
29199       :
29200
29201
29202   :
29203
29204
29205
29206
29207   for ac_func in raise
29208 do :
29209   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
29210 if test "x$ac_cv_func_raise" = xyes; then :
29211   cat >>confdefs.h <<_ACEOF
29212 #define HAVE_RAISE 1
29213 _ACEOF
29214
29215 fi
29216 done
29217
29218   if test $ac_cv_func_raise = no; then
29219     HAVE_RAISE=0
29220   else
29221
29222
29223       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
29224         REPLACE_RAISE=1
29225       fi
29226
29227
29228
29229
29230
29231   if test $gl_cv_type_sigset_t = yes; then
29232     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
29233 if test "x$ac_cv_func_sigprocmask" = xyes; then :
29234   gl_cv_func_sigprocmask=1
29235 fi
29236
29237   fi
29238   if test -z "$gl_cv_func_sigprocmask"; then
29239     HAVE_POSIX_SIGNALBLOCKING=0
29240   fi
29241
29242       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
29243         :
29244       fi
29245
29246   fi
29247
29248   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
29249
29250
29251
29252
29253
29254
29255
29256
29257   gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
29258
29259     :
29260   fi
29261
29262
29263
29264
29265
29266           GNULIB_RAISE=1
29267
29268
29269
29270
29271
29272 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
29273
29274
29275
29276
29277
29278
29279
29280   for ac_func in rawmemchr
29281 do :
29282   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
29283 if test "x$ac_cv_func_rawmemchr" = xyes; then :
29284   cat >>confdefs.h <<_ACEOF
29285 #define HAVE_RAWMEMCHR 1
29286 _ACEOF
29287
29288 fi
29289 done
29290
29291   if test $ac_cv_func_rawmemchr = no; then
29292     HAVE_RAWMEMCHR=0
29293   fi
29294
29295   if test $HAVE_RAWMEMCHR = 0; then
29296
29297
29298
29299
29300
29301
29302
29303
29304   gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
29305
29306     :
29307   fi
29308
29309
29310
29311
29312
29313           GNULIB_RAWMEMCHR=1
29314
29315
29316
29317
29318
29319 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
29320
29321
29322
29323
29324
29325
29326   if test $gl_cv_func_malloc_posix = yes; then
29327
29328 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
29329
29330   else
29331     REPLACE_REALLOC=1
29332   fi
29333
29334   if test $REPLACE_REALLOC = 1; then
29335
29336
29337
29338
29339
29340
29341
29342
29343   gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
29344
29345   fi
29346
29347
29348
29349
29350
29351           GNULIB_REALLOC_POSIX=1
29352
29353
29354
29355
29356
29357 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
29358
29359
29360
29361
29362
29363
29364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29365 /* end confdefs.h.  */
29366
29367        #include <sched.h>
29368        struct sched_param a;
29369        int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
29370        pid_t t1;
29371
29372 int
29373 main ()
29374 {
29375
29376   ;
29377   return 0;
29378 }
29379 _ACEOF
29380 if ac_fn_c_try_compile "$LINENO"; then :
29381   SCHED_H=''
29382 else
29383   SCHED_H='sched.h'
29384      for ac_header in sched.h
29385 do :
29386   ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
29387           #include <sys/cdefs.h>
29388          #endif
29389
29390 "
29391 if test "x$ac_cv_header_sched_h" = xyes; then :
29392   cat >>confdefs.h <<_ACEOF
29393 #define HAVE_SCHED_H 1
29394 _ACEOF
29395
29396 fi
29397
29398 done
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408      if test $gl_cv_have_include_next = yes; then
29409        gl_cv_next_sched_h='<'sched.h'>'
29410      else
29411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
29412 $as_echo_n "checking absolute name of <sched.h>... " >&6; }
29413 if ${gl_cv_next_sched_h+:} false; then :
29414   $as_echo_n "(cached) " >&6
29415 else
29416
29417
29418
29419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29420 /* end confdefs.h.  */
29421 #include <sched.h>
29422 _ACEOF
29423                 case "$host_os" in
29424     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29425     *)    gl_absname_cpp="$ac_cpp" ;;
29426   esac
29427
29428   case "$host_os" in
29429     mingw*)
29430                                           gl_dirsep_regex='[/\\]'
29431       ;;
29432     *)
29433       gl_dirsep_regex='\/'
29434       ;;
29435   esac
29436       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29437   gl_header_literal_regex=`echo 'sched.h' \
29438                            | sed -e "$gl_make_literal_regex_sed"`
29439   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29440       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29441       s|^/[^/]|//&|
29442       p
29443       q
29444     }'
29445
29446         gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29447   sed -n "$gl_absolute_header_sed"`
29448
29449            gl_header=$gl_cv_absolute_sched_h
29450            gl_cv_next_sched_h='"'$gl_header'"'
29451
29452
29453 fi
29454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
29455 $as_echo "$gl_cv_next_sched_h" >&6; }
29456      fi
29457      NEXT_SCHED_H=$gl_cv_next_sched_h
29458
29459      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29460        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29461        gl_next_as_first_directive='<'sched.h'>'
29462      else
29463        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29464        gl_next_as_first_directive=$gl_cv_next_sched_h
29465      fi
29466      NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
29467
29468
29469
29470
29471
29472      if test "$ac_cv_header_sched_h" = yes; then
29473        HAVE_SCHED_H=1
29474      else
29475        HAVE_SCHED_H=0
29476      fi
29477
29478
29479      if test "$HAVE_SCHED_H" = 1; then
29480        ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
29481             #include <sys/cdefs.h>
29482            #endif
29483            #include <sched.h>
29484
29485 "
29486 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
29487   HAVE_STRUCT_SCHED_PARAM=1
29488 else
29489   HAVE_STRUCT_SCHED_PARAM=0
29490 fi
29491
29492      else
29493        HAVE_STRUCT_SCHED_PARAM=0
29494        case "$host_os" in
29495          os2*)
29496                       ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
29497 "
29498 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
29499   HAVE_STRUCT_SCHED_PARAM=1
29500 fi
29501
29502            ;;
29503          vms)
29504                       ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
29505 "
29506 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
29507   HAVE_STRUCT_SCHED_PARAM=1
29508 fi
29509
29510            ;;
29511        esac
29512      fi
29513
29514
29515      if test "$ac_cv_header_sys_cdefs_h" = yes; then
29516        HAVE_SYS_CDEFS_H=1
29517      else
29518        HAVE_SYS_CDEFS_H=0
29519      fi
29520
29521
29522
29523
29524 fi
29525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29526
29527    if test -n "$SCHED_H"; then
29528   GL_GENERATE_SCHED_H_TRUE=
29529   GL_GENERATE_SCHED_H_FALSE='#'
29530 else
29531   GL_GENERATE_SCHED_H_TRUE='#'
29532   GL_GENERATE_SCHED_H_FALSE=
29533 fi
29534
29535
29536
29537
29538
29539   if test $ac_cv_func_sigaction = yes; then
29540     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
29541 "
29542 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
29543
29544 cat >>confdefs.h <<_ACEOF
29545 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
29546 _ACEOF
29547
29548
29549 fi
29550
29551     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
29552       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
29553     fi
29554   else
29555     HAVE_SIGACTION=0
29556   fi
29557
29558   if test $HAVE_SIGACTION = 0; then
29559
29560
29561
29562
29563
29564
29565
29566
29567   gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
29568
29569
29570
29571
29572
29573
29574
29575   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
29576 #include <signal.h>
29577
29578 "
29579 if test "x$ac_cv_type_siginfo_t" = xyes; then :
29580
29581 cat >>confdefs.h <<_ACEOF
29582 #define HAVE_SIGINFO_T 1
29583 _ACEOF
29584
29585
29586 fi
29587
29588   if test $ac_cv_type_siginfo_t = no; then
29589     HAVE_SIGINFO_T=0
29590   fi
29591
29592   fi
29593
29594
29595
29596
29597
29598           GNULIB_SIGACTION=1
29599
29600
29601
29602
29603
29604 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619      if test $gl_cv_have_include_next = yes; then
29620        gl_cv_next_signal_h='<'signal.h'>'
29621      else
29622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
29623 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
29624 if ${gl_cv_next_signal_h+:} false; then :
29625   $as_echo_n "(cached) " >&6
29626 else
29627
29628
29629
29630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29631 /* end confdefs.h.  */
29632 #include <signal.h>
29633 _ACEOF
29634                 case "$host_os" in
29635     aix*) gl_absname_cpp="$ac_cpp -C" ;;
29636     *)    gl_absname_cpp="$ac_cpp" ;;
29637   esac
29638
29639   case "$host_os" in
29640     mingw*)
29641                                           gl_dirsep_regex='[/\\]'
29642       ;;
29643     *)
29644       gl_dirsep_regex='\/'
29645       ;;
29646   esac
29647       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29648   gl_header_literal_regex=`echo 'signal.h' \
29649                            | sed -e "$gl_make_literal_regex_sed"`
29650   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29651       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29652       s|^/[^/]|//&|
29653       p
29654       q
29655     }'
29656
29657         gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29658   sed -n "$gl_absolute_header_sed"`
29659
29660            gl_header=$gl_cv_absolute_signal_h
29661            gl_cv_next_signal_h='"'$gl_header'"'
29662
29663
29664 fi
29665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
29666 $as_echo "$gl_cv_next_signal_h" >&6; }
29667      fi
29668      NEXT_SIGNAL_H=$gl_cv_next_signal_h
29669
29670      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29671        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29672        gl_next_as_first_directive='<'signal.h'>'
29673      else
29674        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29675        gl_next_as_first_directive=$gl_cv_next_signal_h
29676      fi
29677      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
29678
29679
29680
29681
29682
29683 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
29684 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
29685   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
29686 #include <signal.h>
29687
29688 "
29689 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
29690
29691 else
29692   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
29693 fi
29694
29695
29696
29697
29698
29699
29700
29701   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
29702 #include <signal.h>
29703
29704 "
29705 if test "x$ac_cv_type_sighandler_t" = xyes; then :
29706
29707 else
29708   HAVE_SIGHANDLER_T=0
29709 fi
29710
29711
29712
29713     for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
29714     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29716 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29717 if eval \${$as_gl_Symbol+:} false; then :
29718   $as_echo_n "(cached) " >&6
29719 else
29720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29721 /* end confdefs.h.  */
29722 #include <signal.h>
29723
29724 int
29725 main ()
29726 {
29727 #undef $gl_func
29728   (void) $gl_func;
29729   ;
29730   return 0;
29731 }
29732 _ACEOF
29733 if ac_fn_c_try_compile "$LINENO"; then :
29734   eval "$as_gl_Symbol=yes"
29735 else
29736   eval "$as_gl_Symbol=no"
29737 fi
29738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29739 fi
29740 eval ac_res=\$$as_gl_Symbol
29741                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29742 $as_echo "$ac_res" >&6; }
29743     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29744   cat >>confdefs.h <<_ACEOF
29745 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29746 _ACEOF
29747
29748                      eval ac_cv_have_decl_$gl_func=yes
29749 fi
29750       done
29751
29752
29753
29754
29755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
29756 $as_echo_n "checking for signbit macro... " >&6; }
29757 if ${gl_cv_func_signbit+:} false; then :
29758   $as_echo_n "(cached) " >&6
29759 else
29760
29761       if test "$cross_compiling" = yes; then :
29762   case "$host_os" in
29763                           # Guess yes on glibc systems.
29764            *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
29765                           # Guess yes on native Windows.
29766            mingw*)        gl_cv_func_signbit="guessing yes" ;;
29767                           # If we don't know, assume the worst.
29768            *)             gl_cv_func_signbit="guessing no" ;;
29769          esac
29770
29771 else
29772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29773 /* end confdefs.h.  */
29774
29775 #include <math.h>
29776 /* If signbit is defined as a function, don't use it, since calling it for
29777    'float' or 'long double' arguments would involve conversions.
29778    If signbit is not declared at all but exists as a library function, don't
29779    use it, since the prototype may not match.
29780    If signbit is not declared at all but exists as a compiler built-in, don't
29781    use it, since it's preferable to use __builtin_signbit* (no warnings,
29782    no conversions).  */
29783 #ifndef signbit
29784 # error "signbit should be a macro"
29785 #endif
29786 #include <string.h>
29787
29788 /* Global variables.
29789    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29790    but cannot constant-fold            __builtin_signbitl (variable).  */
29791 float vf;
29792 double vd;
29793 long double vl;
29794 int main ()
29795 {
29796 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29797    So we use -p0f and -p0d instead.  */
29798 float p0f = 0.0f;
29799 float m0f = -p0f;
29800 double p0d = 0.0;
29801 double m0d = -p0d;
29802 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29803    So we use another constant expression instead.
29804    But that expression does not work on other platforms, such as when
29805    cross-compiling to PowerPC on Mac OS X 10.5.  */
29806 long double p0l = 0.0L;
29807 #if defined __hpux || defined __sgi
29808 long double m0l = -LDBL_MIN * LDBL_MIN;
29809 #else
29810 long double m0l = -p0l;
29811 #endif
29812   int result = 0;
29813   if (signbit (vf)) /* link check */
29814     vf++;
29815   {
29816     float plus_inf = 1.0f / p0f;
29817     float minus_inf = -1.0f / p0f;
29818     if (!(!signbit (255.0f)
29819           && signbit (-255.0f)
29820           && !signbit (p0f)
29821           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29822           && !signbit (plus_inf)
29823           && signbit (minus_inf)))
29824       result |= 1;
29825   }
29826   if (signbit (vd)) /* link check */
29827     vd++;
29828   {
29829     double plus_inf = 1.0 / p0d;
29830     double minus_inf = -1.0 / p0d;
29831     if (!(!signbit (255.0)
29832           && signbit (-255.0)
29833           && !signbit (p0d)
29834           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29835           && !signbit (plus_inf)
29836           && signbit (minus_inf)))
29837       result |= 2;
29838   }
29839   if (signbit (vl)) /* link check */
29840     vl++;
29841   {
29842     long double plus_inf = 1.0L / p0l;
29843     long double minus_inf = -1.0L / p0l;
29844     if (signbit (255.0L))
29845       result |= 4;
29846     if (!signbit (-255.0L))
29847       result |= 4;
29848     if (signbit (p0l))
29849       result |= 8;
29850     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29851       result |= 16;
29852     if (signbit (plus_inf))
29853       result |= 32;
29854     if (!signbit (minus_inf))
29855       result |= 64;
29856   }
29857   return result;
29858 }
29859
29860
29861 _ACEOF
29862 if ac_fn_c_try_run "$LINENO"; then :
29863   gl_cv_func_signbit=yes
29864 else
29865   gl_cv_func_signbit=no
29866 fi
29867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29868   conftest.$ac_objext conftest.beam conftest.$ac_ext
29869 fi
29870
29871
29872 fi
29873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
29874 $as_echo "$gl_cv_func_signbit" >&6; }
29875           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
29876 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
29877 if ${gl_cv_func_signbit_gcc+:} false; then :
29878   $as_echo_n "(cached) " >&6
29879 else
29880
29881       if test "$cross_compiling" = yes; then :
29882   case "$host_os" in
29883                           # Guess yes on glibc systems.
29884            *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
29885                           # Guess yes on mingw, no on MSVC.
29886            mingw*)        if test -n "$GCC"; then
29887                             gl_cv_func_signbit_gcc="guessing yes"
29888                           else
29889                             gl_cv_func_signbit_gcc="guessing no"
29890                           fi
29891                           ;;
29892                           # If we don't know, assume the worst.
29893            *)             gl_cv_func_signbit_gcc="guessing no" ;;
29894          esac
29895
29896 else
29897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29898 /* end confdefs.h.  */
29899
29900 #if __GNUC__ >= 4
29901 # define signbit(x) \
29902    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
29903     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
29904     __builtin_signbitf (x))
29905 #else
29906 # error "signbit should be three compiler built-ins"
29907 #endif
29908 #include <string.h>
29909
29910 /* Global variables.
29911    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29912    but cannot constant-fold            __builtin_signbitl (variable).  */
29913 float vf;
29914 double vd;
29915 long double vl;
29916 int main ()
29917 {
29918 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29919    So we use -p0f and -p0d instead.  */
29920 float p0f = 0.0f;
29921 float m0f = -p0f;
29922 double p0d = 0.0;
29923 double m0d = -p0d;
29924 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29925    So we use another constant expression instead.
29926    But that expression does not work on other platforms, such as when
29927    cross-compiling to PowerPC on Mac OS X 10.5.  */
29928 long double p0l = 0.0L;
29929 #if defined __hpux || defined __sgi
29930 long double m0l = -LDBL_MIN * LDBL_MIN;
29931 #else
29932 long double m0l = -p0l;
29933 #endif
29934   int result = 0;
29935   if (signbit (vf)) /* link check */
29936     vf++;
29937   {
29938     float plus_inf = 1.0f / p0f;
29939     float minus_inf = -1.0f / p0f;
29940     if (!(!signbit (255.0f)
29941           && signbit (-255.0f)
29942           && !signbit (p0f)
29943           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29944           && !signbit (plus_inf)
29945           && signbit (minus_inf)))
29946       result |= 1;
29947   }
29948   if (signbit (vd)) /* link check */
29949     vd++;
29950   {
29951     double plus_inf = 1.0 / p0d;
29952     double minus_inf = -1.0 / p0d;
29953     if (!(!signbit (255.0)
29954           && signbit (-255.0)
29955           && !signbit (p0d)
29956           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29957           && !signbit (plus_inf)
29958           && signbit (minus_inf)))
29959       result |= 2;
29960   }
29961   if (signbit (vl)) /* link check */
29962     vl++;
29963   {
29964     long double plus_inf = 1.0L / p0l;
29965     long double minus_inf = -1.0L / p0l;
29966     if (signbit (255.0L))
29967       result |= 4;
29968     if (!signbit (-255.0L))
29969       result |= 4;
29970     if (signbit (p0l))
29971       result |= 8;
29972     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29973       result |= 16;
29974     if (signbit (plus_inf))
29975       result |= 32;
29976     if (!signbit (minus_inf))
29977       result |= 64;
29978   }
29979   return result;
29980 }
29981
29982
29983 _ACEOF
29984 if ac_fn_c_try_run "$LINENO"; then :
29985   gl_cv_func_signbit_gcc=yes
29986 else
29987   gl_cv_func_signbit_gcc=no
29988 fi
29989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29990   conftest.$ac_objext conftest.beam conftest.$ac_ext
29991 fi
29992
29993
29994 fi
29995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
29996 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
29997       case "$gl_cv_func_signbit_gcc" in
29998     *yes)
29999       REPLACE_SIGNBIT_USING_GCC=1
30000       ;;
30001     *)
30002       case "$gl_cv_func_signbit" in
30003         *yes) ;;
30004         *)
30005                     REPLACE_SIGNBIT=1
30006
30007
30008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
30009 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
30010 if ${gl_cv_cc_float_signbit+:} false; then :
30011   $as_echo_n "(cached) " >&6
30012 else
30013
30014       if test "$cross_compiling" = yes; then :
30015
30016                               gl_cv_cc_float_signbit="unknown"
30017
30018 else
30019   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30020 /* end confdefs.h.  */
30021
30022 #include <stddef.h>
30023 #include <stdio.h>
30024 #define NWORDS \
30025   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30026 typedef union { float value; unsigned int word[NWORDS]; }
30027         memory_float;
30028 static memory_float plus = { 1.0f };
30029 static memory_float minus = { -1.0f };
30030 int main ()
30031 {
30032   size_t j, k, i;
30033   unsigned int m;
30034   FILE *fp = fopen ("conftest.out", "w");
30035   if (fp == NULL)
30036     return 1;
30037   /* Find the different bit.  */
30038   k = 0; m = 0;
30039   for (j = 0; j < NWORDS; j++)
30040     {
30041       unsigned int x = plus.word[j] ^ minus.word[j];
30042       if ((x & (x - 1)) || (x && m))
30043         {
30044           /* More than one bit difference.  */
30045           fprintf (fp, "unknown");
30046           fclose (fp);
30047           return 2;
30048         }
30049       if (x)
30050         {
30051           k = j;
30052           m = x;
30053         }
30054     }
30055   if (m == 0)
30056     {
30057       /* No difference.  */
30058       fprintf (fp, "unknown");
30059       fclose (fp);
30060       return 3;
30061     }
30062   /* Now m = plus.word[k] ^ ~minus.word[k].  */
30063   if (plus.word[k] & ~minus.word[k])
30064     {
30065       /* Oh? The sign bit is set in the positive and cleared in the negative
30066          numbers?  */
30067       fprintf (fp, "unknown");
30068       fclose (fp);
30069       return 4;
30070     }
30071   for (i = 0; ; i++)
30072     if ((m >> i) & 1)
30073       break;
30074   fprintf (fp, "word %d bit %d", (int) k, (int) i);
30075   if (fclose (fp) != 0)
30076     return 5;
30077   return 0;
30078 }
30079
30080 _ACEOF
30081 if ac_fn_c_try_run "$LINENO"; then :
30082   gl_cv_cc_float_signbit=`cat conftest.out`
30083 else
30084   gl_cv_cc_float_signbit="unknown"
30085 fi
30086 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30087   conftest.$ac_objext conftest.beam conftest.$ac_ext
30088 fi
30089
30090       rm -f conftest.out
30091
30092 fi
30093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
30094 $as_echo "$gl_cv_cc_float_signbit" >&6; }
30095   case "$gl_cv_cc_float_signbit" in
30096     word*bit*)
30097       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
30098       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
30099
30100 cat >>confdefs.h <<_ACEOF
30101 #define FLT_SIGNBIT_WORD $word
30102 _ACEOF
30103
30104
30105 cat >>confdefs.h <<_ACEOF
30106 #define FLT_SIGNBIT_BIT $bit
30107 _ACEOF
30108
30109       ;;
30110   esac
30111
30112
30113
30114
30115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
30116 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
30117 if ${gl_cv_cc_double_signbit+:} false; then :
30118   $as_echo_n "(cached) " >&6
30119 else
30120
30121       if test "$cross_compiling" = yes; then :
30122
30123                               gl_cv_cc_double_signbit="unknown"
30124
30125 else
30126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30127 /* end confdefs.h.  */
30128
30129 #include <stddef.h>
30130 #include <stdio.h>
30131 #define NWORDS \
30132   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30133 typedef union { double value; unsigned int word[NWORDS]; }
30134         memory_float;
30135 static memory_float plus = { 1.0 };
30136 static memory_float minus = { -1.0 };
30137 int main ()
30138 {
30139   size_t j, k, i;
30140   unsigned int m;
30141   FILE *fp = fopen ("conftest.out", "w");
30142   if (fp == NULL)
30143     return 1;
30144   /* Find the different bit.  */
30145   k = 0; m = 0;
30146   for (j = 0; j < NWORDS; j++)
30147     {
30148       unsigned int x = plus.word[j] ^ minus.word[j];
30149       if ((x & (x - 1)) || (x && m))
30150         {
30151           /* More than one bit difference.  */
30152           fprintf (fp, "unknown");
30153           fclose (fp);
30154           return 2;
30155         }
30156       if (x)
30157         {
30158           k = j;
30159           m = x;
30160         }
30161     }
30162   if (m == 0)
30163     {
30164       /* No difference.  */
30165       fprintf (fp, "unknown");
30166       fclose (fp);
30167       return 3;
30168     }
30169   /* Now m = plus.word[k] ^ ~minus.word[k].  */
30170   if (plus.word[k] & ~minus.word[k])
30171     {
30172       /* Oh? The sign bit is set in the positive and cleared in the negative
30173          numbers?  */
30174       fprintf (fp, "unknown");
30175       fclose (fp);
30176       return 4;
30177     }
30178   for (i = 0; ; i++)
30179     if ((m >> i) & 1)
30180       break;
30181   fprintf (fp, "word %d bit %d", (int) k, (int) i);
30182   if (fclose (fp) != 0)
30183     return 5;
30184   return 0;
30185 }
30186
30187 _ACEOF
30188 if ac_fn_c_try_run "$LINENO"; then :
30189   gl_cv_cc_double_signbit=`cat conftest.out`
30190 else
30191   gl_cv_cc_double_signbit="unknown"
30192 fi
30193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30194   conftest.$ac_objext conftest.beam conftest.$ac_ext
30195 fi
30196
30197       rm -f conftest.out
30198
30199 fi
30200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
30201 $as_echo "$gl_cv_cc_double_signbit" >&6; }
30202   case "$gl_cv_cc_double_signbit" in
30203     word*bit*)
30204       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
30205       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
30206
30207 cat >>confdefs.h <<_ACEOF
30208 #define DBL_SIGNBIT_WORD $word
30209 _ACEOF
30210
30211
30212 cat >>confdefs.h <<_ACEOF
30213 #define DBL_SIGNBIT_BIT $bit
30214 _ACEOF
30215
30216       ;;
30217   esac
30218
30219
30220
30221
30222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
30223 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
30224 if ${gl_cv_cc_long_double_signbit+:} false; then :
30225   $as_echo_n "(cached) " >&6
30226 else
30227
30228       if test "$cross_compiling" = yes; then :
30229
30230                               gl_cv_cc_long_double_signbit="unknown"
30231
30232 else
30233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30234 /* end confdefs.h.  */
30235
30236 #include <stddef.h>
30237 #include <stdio.h>
30238 #define NWORDS \
30239   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30240 typedef union { long double value; unsigned int word[NWORDS]; }
30241         memory_float;
30242 static memory_float plus = { 1.0L };
30243 static memory_float minus = { -1.0L };
30244 int main ()
30245 {
30246   size_t j, k, i;
30247   unsigned int m;
30248   FILE *fp = fopen ("conftest.out", "w");
30249   if (fp == NULL)
30250     return 1;
30251   /* Find the different bit.  */
30252   k = 0; m = 0;
30253   for (j = 0; j < NWORDS; j++)
30254     {
30255       unsigned int x = plus.word[j] ^ minus.word[j];
30256       if ((x & (x - 1)) || (x && m))
30257         {
30258           /* More than one bit difference.  */
30259           fprintf (fp, "unknown");
30260           fclose (fp);
30261           return 2;
30262         }
30263       if (x)
30264         {
30265           k = j;
30266           m = x;
30267         }
30268     }
30269   if (m == 0)
30270     {
30271       /* No difference.  */
30272       fprintf (fp, "unknown");
30273       fclose (fp);
30274       return 3;
30275     }
30276   /* Now m = plus.word[k] ^ ~minus.word[k].  */
30277   if (plus.word[k] & ~minus.word[k])
30278     {
30279       /* Oh? The sign bit is set in the positive and cleared in the negative
30280          numbers?  */
30281       fprintf (fp, "unknown");
30282       fclose (fp);
30283       return 4;
30284     }
30285   for (i = 0; ; i++)
30286     if ((m >> i) & 1)
30287       break;
30288   fprintf (fp, "word %d bit %d", (int) k, (int) i);
30289   if (fclose (fp) != 0)
30290     return 5;
30291   return 0;
30292 }
30293
30294 _ACEOF
30295 if ac_fn_c_try_run "$LINENO"; then :
30296   gl_cv_cc_long_double_signbit=`cat conftest.out`
30297 else
30298   gl_cv_cc_long_double_signbit="unknown"
30299 fi
30300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30301   conftest.$ac_objext conftest.beam conftest.$ac_ext
30302 fi
30303
30304       rm -f conftest.out
30305
30306 fi
30307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
30308 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
30309   case "$gl_cv_cc_long_double_signbit" in
30310     word*bit*)
30311       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
30312       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
30313
30314 cat >>confdefs.h <<_ACEOF
30315 #define LDBL_SIGNBIT_WORD $word
30316 _ACEOF
30317
30318
30319 cat >>confdefs.h <<_ACEOF
30320 #define LDBL_SIGNBIT_BIT $bit
30321 _ACEOF
30322
30323       ;;
30324   esac
30325
30326
30327           if test "$gl_cv_cc_float_signbit" = unknown; then
30328                         ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
30329 "
30330 if test "x$ac_cv_have_decl_copysignf" = xyes; then :
30331   ac_have_decl=1
30332 else
30333   ac_have_decl=0
30334 fi
30335
30336 cat >>confdefs.h <<_ACEOF
30337 #define HAVE_DECL_COPYSIGNF $ac_have_decl
30338 _ACEOF
30339
30340             if test "$ac_cv_have_decl_copysignf" = yes; then
30341                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
30342 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
30343 if ${gl_cv_func_copysignf_no_libm+:} false; then :
30344   $as_echo_n "(cached) " >&6
30345 else
30346
30347                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30348 /* end confdefs.h.  */
30349 #include <math.h>
30350                          float x, y;
30351 int
30352 main ()
30353 {
30354 return copysignf (x, y) < 0;
30355   ;
30356   return 0;
30357 }
30358 _ACEOF
30359 if ac_fn_c_try_link "$LINENO"; then :
30360   gl_cv_func_copysignf_no_libm=yes
30361 else
30362   gl_cv_func_copysignf_no_libm=no
30363 fi
30364 rm -f core conftest.err conftest.$ac_objext \
30365     conftest$ac_exeext conftest.$ac_ext
30366
30367 fi
30368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
30369 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
30370               if test $gl_cv_func_copysignf_no_libm = yes; then
30371
30372 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
30373
30374               fi
30375             fi
30376           fi
30377           if test "$gl_cv_cc_double_signbit" = unknown; then
30378                         ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
30379 "
30380 if test "x$ac_cv_have_decl_copysign" = xyes; then :
30381   ac_have_decl=1
30382 else
30383   ac_have_decl=0
30384 fi
30385
30386 cat >>confdefs.h <<_ACEOF
30387 #define HAVE_DECL_COPYSIGN $ac_have_decl
30388 _ACEOF
30389
30390             if test "$ac_cv_have_decl_copysign" = yes; then
30391                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
30392 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
30393 if ${gl_cv_func_copysign_no_libm+:} false; then :
30394   $as_echo_n "(cached) " >&6
30395 else
30396
30397                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30398 /* end confdefs.h.  */
30399 #include <math.h>
30400                          double x, y;
30401 int
30402 main ()
30403 {
30404 return copysign (x, y) < 0;
30405   ;
30406   return 0;
30407 }
30408 _ACEOF
30409 if ac_fn_c_try_link "$LINENO"; then :
30410   gl_cv_func_copysign_no_libm=yes
30411 else
30412   gl_cv_func_copysign_no_libm=no
30413 fi
30414 rm -f core conftest.err conftest.$ac_objext \
30415     conftest$ac_exeext conftest.$ac_ext
30416
30417 fi
30418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
30419 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
30420               if test $gl_cv_func_copysign_no_libm = yes; then
30421
30422 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
30423
30424               fi
30425             fi
30426           fi
30427           if test "$gl_cv_cc_long_double_signbit" = unknown; then
30428                         ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
30429 "
30430 if test "x$ac_cv_have_decl_copysignl" = xyes; then :
30431   ac_have_decl=1
30432 else
30433   ac_have_decl=0
30434 fi
30435
30436 cat >>confdefs.h <<_ACEOF
30437 #define HAVE_DECL_COPYSIGNL $ac_have_decl
30438 _ACEOF
30439
30440             if test "$ac_cv_have_decl_copysignl" = yes; then
30441                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
30442 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
30443 if ${gl_cv_func_copysignl_no_libm+:} false; then :
30444   $as_echo_n "(cached) " >&6
30445 else
30446
30447                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30448 /* end confdefs.h.  */
30449 #include <math.h>
30450                          long double x, y;
30451 int
30452 main ()
30453 {
30454 return copysignl (x, y) < 0;
30455   ;
30456   return 0;
30457 }
30458 _ACEOF
30459 if ac_fn_c_try_link "$LINENO"; then :
30460   gl_cv_func_copysignl_no_libm=yes
30461 else
30462   gl_cv_func_copysignl_no_libm=no
30463 fi
30464 rm -f core conftest.err conftest.$ac_objext \
30465     conftest$ac_exeext conftest.$ac_ext
30466
30467 fi
30468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
30469 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
30470               if test $gl_cv_func_copysignl_no_libm = yes; then
30471
30472 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
30473
30474               fi
30475             fi
30476           fi
30477           ;;
30478       esac
30479       ;;
30480   esac
30481
30482   if test $REPLACE_SIGNBIT = 1; then
30483
30484
30485
30486
30487
30488
30489
30490
30491   gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501   gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511   gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
30512
30513   fi
30514
30515
30516
30517
30518
30519           GNULIB_SIGNBIT=1
30520
30521
30522
30523
30524
30525 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
30526
30527
30528
30529
30530
30531
30532   if test $gl_cv_type_sigset_t = yes; then
30533     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
30534 if test "x$ac_cv_func_sigprocmask" = xyes; then :
30535   gl_cv_func_sigprocmask=1
30536 fi
30537
30538   fi
30539   if test -z "$gl_cv_func_sigprocmask"; then
30540     HAVE_POSIX_SIGNALBLOCKING=0
30541   fi
30542
30543   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
30544
30545
30546
30547
30548
30549
30550
30551
30552   gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
30553
30554     :
30555   fi
30556
30557
30558
30559
30560
30561           GNULIB_SIGPROCMASK=1
30562
30563
30564
30565
30566
30567 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
30568
30569
30570
30571
30572   for ac_header in stdint.h
30573 do :
30574   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
30575 if test "x$ac_cv_header_stdint_h" = xyes; then :
30576   cat >>confdefs.h <<_ACEOF
30577 #define HAVE_STDINT_H 1
30578 _ACEOF
30579
30580 fi
30581
30582 done
30583
30584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
30585 $as_echo_n "checking for SIZE_MAX... " >&6; }
30586 if ${gl_cv_size_max+:} false; then :
30587   $as_echo_n "(cached) " >&6
30588 else
30589
30590     gl_cv_size_max=
30591     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30592 /* end confdefs.h.  */
30593
30594 #include <limits.h>
30595 #if HAVE_STDINT_H
30596 #include <stdint.h>
30597 #endif
30598 #ifdef SIZE_MAX
30599 Found it
30600 #endif
30601
30602 _ACEOF
30603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30604   $EGREP "Found it" >/dev/null 2>&1; then :
30605   gl_cv_size_max=yes
30606 fi
30607 rm -f conftest*
30608
30609     if test -z "$gl_cv_size_max"; then
30610                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
30611 #include <limits.h>"; then :
30612
30613 else
30614   size_t_bits_minus_1=
30615 fi
30616
30617       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
30618
30619 else
30620   fits_in_uint=
30621 fi
30622
30623       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
30624         if test $fits_in_uint = 1; then
30625                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30626 /* end confdefs.h.  */
30627 #include <stddef.h>
30628                  extern size_t foo;
30629                  extern unsigned long foo;
30630
30631 int
30632 main ()
30633 {
30634
30635   ;
30636   return 0;
30637 }
30638 _ACEOF
30639 if ac_fn_c_try_compile "$LINENO"; then :
30640   fits_in_uint=0
30641 fi
30642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30643         fi
30644                                 if test $fits_in_uint = 1; then
30645           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
30646         else
30647           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
30648         fi
30649       else
30650                 gl_cv_size_max='((size_t)~(size_t)0)'
30651       fi
30652     fi
30653
30654 fi
30655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
30656 $as_echo "$gl_cv_size_max" >&6; }
30657   if test "$gl_cv_size_max" != yes; then
30658
30659 cat >>confdefs.h <<_ACEOF
30660 #define SIZE_MAX $gl_cv_size_max
30661 _ACEOF
30662
30663   fi
30664
30665
30666
30667
30668   gl_cv_func_snprintf_usable=no
30669   for ac_func in snprintf
30670 do :
30671   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30672 if test "x$ac_cv_func_snprintf" = xyes; then :
30673   cat >>confdefs.h <<_ACEOF
30674 #define HAVE_SNPRINTF 1
30675 _ACEOF
30676
30677 fi
30678 done
30679
30680   if test $ac_cv_func_snprintf = yes; then
30681
30682
30683
30684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
30685 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
30686 if ${gl_cv_func_snprintf_size1+:} false; then :
30687   $as_echo_n "(cached) " >&6
30688 else
30689
30690       if test "$cross_compiling" = yes; then :
30691   case "$host_os" in
30692                    # Guess yes on native Windows.
30693            mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
30694            *)      gl_cv_func_snprintf_size1="guessing yes" ;;
30695          esac
30696
30697 else
30698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30699 /* end confdefs.h.  */
30700
30701 #include <stdio.h>
30702 #if HAVE_SNPRINTF
30703 # define my_snprintf snprintf
30704 #else
30705 # include <stdarg.h>
30706 static int my_snprintf (char *buf, int size, const char *format, ...)
30707 {
30708   va_list args;
30709   int ret;
30710   va_start (args, format);
30711   ret = vsnprintf (buf, size, format, args);
30712   va_end (args);
30713   return ret;
30714 }
30715 #endif
30716 int main()
30717 {
30718   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
30719   my_snprintf (buf, 1, "%d", 12345);
30720   return buf[1] != 'E';
30721 }
30722 _ACEOF
30723 if ac_fn_c_try_run "$LINENO"; then :
30724   gl_cv_func_snprintf_size1=yes
30725 else
30726   gl_cv_func_snprintf_size1=no
30727 fi
30728 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30729   conftest.$ac_objext conftest.beam conftest.$ac_ext
30730 fi
30731
30732
30733 fi
30734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
30735 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
30736
30737     case "$gl_cv_func_snprintf_size1" in
30738       *yes)
30739
30740         case "$gl_cv_func_snprintf_retval_c99" in
30741           *yes)
30742
30743
30744      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
30745 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
30746 if ${gl_cv_func_printf_positions+:} false; then :
30747   $as_echo_n "(cached) " >&6
30748 else
30749
30750       if test "$cross_compiling" = yes; then :
30751
30752          case "$host_os" in
30753            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
30754                          gl_cv_func_printf_positions="guessing no";;
30755            beos*)        gl_cv_func_printf_positions="guessing no";;
30756                          # Guess no on native Windows.
30757            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
30758            *)            gl_cv_func_printf_positions="guessing yes";;
30759          esac
30760
30761 else
30762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30763 /* end confdefs.h.  */
30764
30765 #include <stdio.h>
30766 #include <string.h>
30767 /* The string "%2$d %1$d", with dollar characters protected from the shell's
30768    dollar expansion (possibly an autoconf bug).  */
30769 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
30770 static char buf[100];
30771 int main ()
30772 {
30773   sprintf (buf, format, 33, 55);
30774   return (strcmp (buf, "55 33") != 0);
30775 }
30776 _ACEOF
30777 if ac_fn_c_try_run "$LINENO"; then :
30778   gl_cv_func_printf_positions=yes
30779 else
30780   gl_cv_func_printf_positions=no
30781 fi
30782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30783   conftest.$ac_objext conftest.beam conftest.$ac_ext
30784 fi
30785
30786
30787 fi
30788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
30789 $as_echo "$gl_cv_func_printf_positions" >&6; }
30790
30791             case "$gl_cv_func_printf_positions" in
30792               *yes)
30793                 gl_cv_func_snprintf_usable=yes
30794                 ;;
30795             esac
30796             ;;
30797         esac
30798         ;;
30799     esac
30800   fi
30801   if test $gl_cv_func_snprintf_usable = no; then
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
30813
30814   if test $ac_cv_func_snprintf = yes; then
30815     REPLACE_SNPRINTF=1
30816   else
30817
30818     if test $ac_cv_have_decl_snprintf = yes; then
30819                         REPLACE_SNPRINTF=1
30820     fi
30821   fi
30822   :
30823
30824   fi
30825
30826   if test $ac_cv_have_decl_snprintf = no; then
30827     HAVE_DECL_SNPRINTF=0
30828   fi
30829
30830
30831
30832
30833
30834
30835           GNULIB_SNPRINTF=1
30836
30837
30838
30839
30840
30841 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
30842
30843
30844
30845
30846
30847 cat >>confdefs.h <<_ACEOF
30848 #define GNULIB_SNPRINTF 1
30849 _ACEOF
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867   gl_cv_func_snprintf_posix=no
30868   for ac_func in snprintf
30869 do :
30870   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30871 if test "x$ac_cv_func_snprintf" = xyes; then :
30872   cat >>confdefs.h <<_ACEOF
30873 #define HAVE_SNPRINTF 1
30874 _ACEOF
30875
30876 fi
30877 done
30878
30879   if test $ac_cv_func_snprintf = yes; then
30880
30881
30882
30883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
30884 $as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
30885 if ${gl_cv_func_snprintf_truncation_c99+:} false; then :
30886   $as_echo_n "(cached) " >&6
30887 else
30888
30889       if test "$cross_compiling" = yes; then :
30890
30891          case "$host_os" in
30892                                  # Guess yes on glibc systems.
30893            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
30894                                  # Guess yes on FreeBSD >= 5.
30895            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
30896            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
30897                                  # Guess yes on Mac OS X >= 10.3.
30898            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
30899            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
30900                                  # Guess yes on OpenBSD >= 3.9.
30901            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
30902                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
30903            openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
30904                                  # Guess yes on Solaris >= 2.6.
30905            solaris2.[0-5] | solaris2.[0-5].*)
30906                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
30907            solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
30908                                  # Guess yes on AIX >= 4.
30909            aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
30910            aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
30911                                  # Guess yes on HP-UX >= 11.
30912            hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
30913            hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
30914                                  # Guess yes on IRIX >= 6.5.
30915            irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
30916                                  # Guess yes on OSF/1 >= 5.
30917            osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
30918            osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
30919                                  # Guess yes on NetBSD >= 3.
30920            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
30921                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
30922            netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
30923                                  # Guess yes on BeOS.
30924            beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
30925                                  # Guess no on native Windows.
30926            mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
30927                                  # If we don't know, assume the worst.
30928            *)                    gl_cv_func_snprintf_truncation_c99="guessing no";;
30929          esac
30930
30931 else
30932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30933 /* end confdefs.h.  */
30934
30935 #include <stdio.h>
30936 #include <string.h>
30937 #if HAVE_SNPRINTF
30938 # define my_snprintf snprintf
30939 #else
30940 # include <stdarg.h>
30941 static int my_snprintf (char *buf, int size, const char *format, ...)
30942 {
30943   va_list args;
30944   int ret;
30945   va_start (args, format);
30946   ret = vsnprintf (buf, size, format, args);
30947   va_end (args);
30948   return ret;
30949 }
30950 #endif
30951 static char buf[100];
30952 int main ()
30953 {
30954   strcpy (buf, "ABCDEF");
30955   my_snprintf (buf, 3, "%d %d", 4567, 89);
30956   if (memcmp (buf, "45\0DEF", 6) != 0)
30957     return 1;
30958   return 0;
30959 }
30960 _ACEOF
30961 if ac_fn_c_try_run "$LINENO"; then :
30962   gl_cv_func_snprintf_truncation_c99=yes
30963 else
30964   gl_cv_func_snprintf_truncation_c99=no
30965 fi
30966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30967   conftest.$ac_objext conftest.beam conftest.$ac_ext
30968 fi
30969
30970
30971 fi
30972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
30973 $as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
30974
30975
30976
30977
30978
30979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
30980 $as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
30981 if ${gl_cv_func_snprintf_directive_n+:} false; then :
30982   $as_echo_n "(cached) " >&6
30983 else
30984
30985       if test "$cross_compiling" = yes; then :
30986
30987          case "$host_os" in
30988                                  # Guess yes on glibc systems.
30989            *-gnu* | gnu*)        gl_cv_func_snprintf_directive_n="guessing yes";;
30990                                  # Guess yes on FreeBSD >= 5.
30991            freebsd[1-4].*)       gl_cv_func_snprintf_directive_n="guessing no";;
30992            freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
30993                                  # Guess yes on Mac OS X >= 10.3.
30994            darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
30995            darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
30996                                  # Guess yes on Solaris >= 2.6.
30997            solaris2.[0-5] | solaris2.[0-5].*)
30998                                  gl_cv_func_snprintf_directive_n="guessing no";;
30999            solaris*)             gl_cv_func_snprintf_directive_n="guessing yes";;
31000                                  # Guess yes on AIX >= 4.
31001            aix[1-3]*)            gl_cv_func_snprintf_directive_n="guessing no";;
31002            aix*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
31003                                  # Guess yes on IRIX >= 6.5.
31004            irix6.5)              gl_cv_func_snprintf_directive_n="guessing yes";;
31005                                  # Guess yes on OSF/1 >= 5.
31006            osf[3-4]*)            gl_cv_func_snprintf_directive_n="guessing no";;
31007            osf*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
31008                                  # Guess yes on NetBSD >= 3.
31009            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
31010                                  gl_cv_func_snprintf_directive_n="guessing no";;
31011            netbsd*)              gl_cv_func_snprintf_directive_n="guessing yes";;
31012                                  # Guess yes on BeOS.
31013            beos*)                gl_cv_func_snprintf_directive_n="guessing yes";;
31014                                  # Guess no on native Windows.
31015            mingw*)               gl_cv_func_snprintf_directive_n="guessing no";;
31016                                  # If we don't know, assume the worst.
31017            *)                    gl_cv_func_snprintf_directive_n="guessing no";;
31018          esac
31019
31020 else
31021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022 /* end confdefs.h.  */
31023
31024 #include <stdio.h>
31025 #include <string.h>
31026 #if HAVE_SNPRINTF
31027 # define my_snprintf snprintf
31028 #else
31029 # include <stdarg.h>
31030 static int my_snprintf (char *buf, int size, const char *format, ...)
31031 {
31032   va_list args;
31033   int ret;
31034   va_start (args, format);
31035   ret = vsnprintf (buf, size, format, args);
31036   va_end (args);
31037   return ret;
31038 }
31039 #endif
31040 static char fmtstring[10];
31041 static char buf[100];
31042 int main ()
31043 {
31044   int count = -1;
31045   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
31046      support %n in format strings in read-only memory but not in writable
31047      memory.  */
31048   strcpy (fmtstring, "%d %n");
31049   my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
31050   if (count != 6)
31051     return 1;
31052   return 0;
31053 }
31054 _ACEOF
31055 if ac_fn_c_try_run "$LINENO"; then :
31056   gl_cv_func_snprintf_directive_n=yes
31057 else
31058   gl_cv_func_snprintf_directive_n=no
31059 fi
31060 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31061   conftest.$ac_objext conftest.beam conftest.$ac_ext
31062 fi
31063
31064
31065 fi
31066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
31067 $as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
31068
31069
31070
31071
31072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
31073 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
31074 if ${gl_cv_func_snprintf_size1+:} false; then :
31075   $as_echo_n "(cached) " >&6
31076 else
31077
31078       if test "$cross_compiling" = yes; then :
31079   case "$host_os" in
31080                    # Guess yes on native Windows.
31081            mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
31082            *)      gl_cv_func_snprintf_size1="guessing yes" ;;
31083          esac
31084
31085 else
31086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31087 /* end confdefs.h.  */
31088
31089 #include <stdio.h>
31090 #if HAVE_SNPRINTF
31091 # define my_snprintf snprintf
31092 #else
31093 # include <stdarg.h>
31094 static int my_snprintf (char *buf, int size, const char *format, ...)
31095 {
31096   va_list args;
31097   int ret;
31098   va_start (args, format);
31099   ret = vsnprintf (buf, size, format, args);
31100   va_end (args);
31101   return ret;
31102 }
31103 #endif
31104 int main()
31105 {
31106   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31107   my_snprintf (buf, 1, "%d", 12345);
31108   return buf[1] != 'E';
31109 }
31110 _ACEOF
31111 if ac_fn_c_try_run "$LINENO"; then :
31112   gl_cv_func_snprintf_size1=yes
31113 else
31114   gl_cv_func_snprintf_size1=no
31115 fi
31116 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31117   conftest.$ac_objext conftest.beam conftest.$ac_ext
31118 fi
31119
31120
31121 fi
31122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
31123 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
31124
31125
31126
31127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
31128 $as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
31129 if ${gl_cv_func_vsnprintf_zerosize_c99+:} false; then :
31130   $as_echo_n "(cached) " >&6
31131 else
31132
31133       if test "$cross_compiling" = yes; then :
31134
31135          case "$host_os" in
31136                                  # Guess yes on glibc systems.
31137            *-gnu* | gnu*)        gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31138                                  # Guess yes on FreeBSD >= 5.
31139            freebsd[1-4].*)       gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31140            freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31141                                  # Guess yes on Mac OS X >= 10.3.
31142            darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31143            darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31144                                  # Guess yes on Cygwin.
31145            cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31146                                  # Guess yes on Solaris >= 2.6.
31147            solaris2.[0-5] | solaris2.[0-5].*)
31148                                  gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31149            solaris*)             gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31150                                  # Guess yes on AIX >= 4.
31151            aix[1-3]*)            gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31152            aix*)                 gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31153                                  # Guess yes on IRIX >= 6.5.
31154            irix6.5)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31155                                  # Guess yes on NetBSD >= 3.
31156            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
31157                                  gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31158            netbsd*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31159                                  # Guess yes on BeOS.
31160            beos*)                gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31161                                  # Guess yes on native Windows.
31162            mingw* | pw*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
31163                                  # If we don't know, assume the worst.
31164            *)                    gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
31165          esac
31166
31167 else
31168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31169 /* end confdefs.h.  */
31170
31171 #include <stdarg.h>
31172 #include <stdio.h>
31173 static int my_snprintf (char *buf, int size, const char *format, ...)
31174 {
31175   va_list args;
31176   int ret;
31177   va_start (args, format);
31178   ret = vsnprintf (buf, size, format, args);
31179   va_end (args);
31180   return ret;
31181 }
31182 int main()
31183 {
31184   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31185   my_snprintf (buf, 0, "%d", 12345);
31186   return buf[0] != 'D';
31187 }
31188 _ACEOF
31189 if ac_fn_c_try_run "$LINENO"; then :
31190   gl_cv_func_vsnprintf_zerosize_c99=yes
31191 else
31192   gl_cv_func_vsnprintf_zerosize_c99=no
31193 fi
31194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31195   conftest.$ac_objext conftest.beam conftest.$ac_ext
31196 fi
31197
31198
31199 fi
31200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
31201 $as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
31202
31203     case "$gl_cv_func_printf_sizes_c99" in
31204       *yes)
31205         case "$gl_cv_func_printf_long_double" in
31206           *yes)
31207             case "$gl_cv_func_printf_infinite" in
31208               *yes)
31209                 case "$gl_cv_func_printf_infinite_long_double" in
31210                   *yes)
31211                     case "$gl_cv_func_printf_directive_a" in
31212                       *yes)
31213                         case "$gl_cv_func_printf_directive_f" in
31214                           *yes)
31215                             case "$gl_cv_func_printf_directive_n" in
31216                               *yes)
31217                                 case "$gl_cv_func_printf_directive_ls" in
31218                                   *yes)
31219                                     case "$gl_cv_func_printf_positions" in
31220                                       *yes)
31221                                         case "$gl_cv_func_printf_flag_grouping" in
31222                                           *yes)
31223                                             case "$gl_cv_func_printf_flag_leftadjust" in
31224                                               *yes)
31225                                                 case "$gl_cv_func_printf_flag_zero" in
31226                                                   *yes)
31227                                                     case "$gl_cv_func_printf_precision" in
31228                                                       *yes)
31229                                                         case "$gl_cv_func_printf_enomem" in
31230                                                           *yes)
31231                                                             case "$gl_cv_func_snprintf_truncation_c99" in
31232                                                               *yes)
31233                                                                 case "$gl_cv_func_snprintf_retval_c99" in
31234                                                                   *yes)
31235                                                                     case "$gl_cv_func_snprintf_directive_n" in
31236                                                                       *yes)
31237                                                                         case "$gl_cv_func_snprintf_size1" in
31238                                                                           *yes)
31239                                                                             case "$gl_cv_func_vsnprintf_zerosize_c99" in
31240                                                                               *yes)
31241                                                                                 # snprintf exists and is
31242                                                                                 # already POSIX compliant.
31243                                                                                 gl_cv_func_snprintf_posix=yes
31244                                                                                 ;;
31245                                                                             esac
31246                                                                             ;;
31247                                                                         esac
31248                                                                         ;;
31249                                                                     esac
31250                                                                     ;;
31251                                                                 esac
31252                                                                 ;;
31253                                                             esac
31254                                                             ;;
31255                                                         esac
31256                                                         ;;
31257                                                     esac
31258                                                     ;;
31259                                                 esac
31260                                                 ;;
31261                                             esac
31262                                             ;;
31263                                         esac
31264                                         ;;
31265                                     esac
31266                                     ;;
31267                                 esac
31268                                 ;;
31269                             esac
31270                             ;;
31271                         esac
31272                         ;;
31273                     esac
31274                     ;;
31275                 esac
31276                 ;;
31277             esac
31278             ;;
31279         esac
31280         ;;
31281     esac
31282   fi
31283   if test $gl_cv_func_snprintf_posix = no; then
31284
31285
31286
31287   case "$gl_cv_func_printf_infinite" in
31288     *yes)
31289       ;;
31290     *)
31291
31292 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
31293
31294       ;;
31295   esac
31296
31297
31298
31299
31300   case "$gl_cv_func_printf_long_double" in
31301     *yes)
31302       case "$gl_cv_func_printf_infinite_long_double" in
31303         *yes)
31304           ;;
31305         *)
31306
31307 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
31308
31309           ;;
31310       esac
31311       ;;
31312   esac
31313
31314
31315
31316   case "$gl_cv_func_printf_directive_a" in
31317     *yes)
31318       ;;
31319     *)
31320
31321 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
31322
31323       for ac_func in nl_langinfo
31324 do :
31325   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
31326 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
31327   cat >>confdefs.h <<_ACEOF
31328 #define HAVE_NL_LANGINFO 1
31329 _ACEOF
31330
31331 fi
31332 done
31333
31334       ;;
31335   esac
31336
31337
31338
31339   case "$gl_cv_func_printf_directive_f" in
31340     *yes)
31341       ;;
31342     *)
31343
31344 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
31345
31346       ;;
31347   esac
31348
31349
31350
31351   case "$gl_cv_func_printf_directive_ls" in
31352     *yes)
31353       ;;
31354     *)
31355
31356 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
31357
31358       ;;
31359   esac
31360
31361
31362
31363   case "$gl_cv_func_printf_flag_grouping" in
31364     *yes)
31365       ;;
31366     *)
31367
31368 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
31369
31370       ;;
31371   esac
31372
31373
31374
31375   case "$gl_cv_func_printf_flag_leftadjust" in
31376     *yes)
31377       ;;
31378     *)
31379
31380 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
31381
31382       ;;
31383   esac
31384
31385
31386
31387   case "$gl_cv_func_printf_flag_zero" in
31388     *yes)
31389       ;;
31390     *)
31391
31392 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
31393
31394       ;;
31395   esac
31396
31397
31398
31399   case "$gl_cv_func_printf_precision" in
31400     *yes)
31401       ;;
31402     *)
31403
31404 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
31405
31406
31407 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31408
31409
31410 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31411
31412       ;;
31413   esac
31414
31415
31416
31417   case "$gl_cv_func_printf_enomem" in
31418     *yes)
31419       ;;
31420     *)
31421
31422 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
31423
31424
31425 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31426
31427
31428 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31429
31430       ;;
31431   esac
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31474
31475   if test $ac_cv_func_vasnprintf = yes; then
31476
31477 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31478
31479   fi
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31492 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31493
31494 else
31495
31496 $as_echo "#define ptrdiff_t long" >>confdefs.h
31497
31498
31499 fi
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517   gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
31518
31519   if test $ac_cv_func_snprintf = yes; then
31520     REPLACE_SNPRINTF=1
31521   else
31522
31523     if test $ac_cv_have_decl_snprintf = yes; then
31524                         REPLACE_SNPRINTF=1
31525     fi
31526   fi
31527   :
31528
31529   fi
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543      if test $gl_cv_have_include_next = yes; then
31544        gl_cv_next_spawn_h='<'spawn.h'>'
31545      else
31546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
31547 $as_echo_n "checking absolute name of <spawn.h>... " >&6; }
31548 if ${gl_cv_next_spawn_h+:} false; then :
31549   $as_echo_n "(cached) " >&6
31550 else
31551
31552              if test $ac_cv_header_spawn_h = yes; then
31553
31554
31555
31556
31557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31558 /* end confdefs.h.  */
31559 #include <spawn.h>
31560 _ACEOF
31561                 case "$host_os" in
31562     aix*) gl_absname_cpp="$ac_cpp -C" ;;
31563     *)    gl_absname_cpp="$ac_cpp" ;;
31564   esac
31565
31566   case "$host_os" in
31567     mingw*)
31568                                           gl_dirsep_regex='[/\\]'
31569       ;;
31570     *)
31571       gl_dirsep_regex='\/'
31572       ;;
31573   esac
31574       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31575   gl_header_literal_regex=`echo 'spawn.h' \
31576                            | sed -e "$gl_make_literal_regex_sed"`
31577   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31578       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31579       s|^/[^/]|//&|
31580       p
31581       q
31582     }'
31583
31584         gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31585   sed -n "$gl_absolute_header_sed"`
31586
31587            gl_header=$gl_cv_absolute_spawn_h
31588            gl_cv_next_spawn_h='"'$gl_header'"'
31589           else
31590                gl_cv_next_spawn_h='<'spawn.h'>'
31591              fi
31592
31593
31594 fi
31595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
31596 $as_echo "$gl_cv_next_spawn_h" >&6; }
31597      fi
31598      NEXT_SPAWN_H=$gl_cv_next_spawn_h
31599
31600      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31601        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31602        gl_next_as_first_directive='<'spawn.h'>'
31603      else
31604        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31605        gl_next_as_first_directive=$gl_cv_next_spawn_h
31606      fi
31607      NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
31608
31609
31610
31611
31612
31613   if test $ac_cv_header_spawn_h = yes; then
31614     HAVE_SPAWN_H=1
31615     ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
31616 #include <spawn.h>
31617
31618 "
31619 if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
31620
31621 cat >>confdefs.h <<_ACEOF
31622 #define HAVE_POSIX_SPAWNATTR_T 1
31623 _ACEOF
31624
31625
31626 else
31627   HAVE_POSIX_SPAWNATTR_T=0
31628 fi
31629
31630     ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
31631 #include <spawn.h>
31632
31633 "
31634 if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
31635
31636 cat >>confdefs.h <<_ACEOF
31637 #define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
31638 _ACEOF
31639
31640
31641 else
31642   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
31643 fi
31644
31645   else
31646     HAVE_SPAWN_H=0
31647     HAVE_POSIX_SPAWNATTR_T=0
31648     HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
31649   fi
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661     for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy     posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault     posix_spawnattr_getsigmask posix_spawnattr_setsigmask     posix_spawnattr_getflags posix_spawnattr_setflags     posix_spawnattr_getpgroup posix_spawnattr_setpgroup     posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy     posix_spawnattr_getschedparam posix_spawnattr_setschedparam     posix_spawn_file_actions_init posix_spawn_file_actions_destroy     posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose     posix_spawn_file_actions_adddup2; do
31662     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31663     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31664 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31665 if eval \${$as_gl_Symbol+:} false; then :
31666   $as_echo_n "(cached) " >&6
31667 else
31668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31669 /* end confdefs.h.  */
31670 #include <spawn.h>
31671
31672 int
31673 main ()
31674 {
31675 #undef $gl_func
31676   (void) $gl_func;
31677   ;
31678   return 0;
31679 }
31680 _ACEOF
31681 if ac_fn_c_try_compile "$LINENO"; then :
31682   eval "$as_gl_Symbol=yes"
31683 else
31684   eval "$as_gl_Symbol=no"
31685 fi
31686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31687 fi
31688 eval ac_res=\$$as_gl_Symbol
31689                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31690 $as_echo "$ac_res" >&6; }
31691     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31692   cat >>confdefs.h <<_ACEOF
31693 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31694 _ACEOF
31695
31696                      eval ac_cv_have_decl_$gl_func=yes
31697 fi
31698       done
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719   gl_cv_func_sprintf_posix=no
31720   case "$gl_cv_func_printf_sizes_c99" in
31721     *yes)
31722       case "$gl_cv_func_printf_long_double" in
31723         *yes)
31724           case "$gl_cv_func_printf_infinite" in
31725             *yes)
31726               case "$gl_cv_func_printf_infinite_long_double" in
31727                 *yes)
31728                   case "$gl_cv_func_printf_directive_a" in
31729                     *yes)
31730                       case "$gl_cv_func_printf_directive_f" in
31731                         *yes)
31732                           case "$gl_cv_func_printf_directive_n" in
31733                             *yes)
31734                               case "$gl_cv_func_printf_directive_ls" in
31735                                 *yes)
31736                                   case "$gl_cv_func_printf_positions" in
31737                                     *yes)
31738                                       case "$gl_cv_func_printf_flag_grouping" in
31739                                         *yes)
31740                                           case "$gl_cv_func_printf_flag_leftadjust" in
31741                                             *yes)
31742                                               case "$gl_cv_func_printf_flag_zero" in
31743                                                 *yes)
31744                                                   case "$gl_cv_func_printf_precision" in
31745                                                     *yes)
31746                                                       case "$gl_cv_func_printf_enomem" in
31747                                                         *yes)
31748                                                           # sprintf exists and is
31749                                                           # already POSIX compliant.
31750                                                           gl_cv_func_sprintf_posix=yes
31751                                                           ;;
31752                                                       esac
31753                                                       ;;
31754                                                   esac
31755                                                   ;;
31756                                               esac
31757                                               ;;
31758                                           esac
31759                                           ;;
31760                                       esac
31761                                       ;;
31762                                   esac
31763                                   ;;
31764                               esac
31765                               ;;
31766                           esac
31767                           ;;
31768                       esac
31769                       ;;
31770                   esac
31771                   ;;
31772               esac
31773               ;;
31774           esac
31775           ;;
31776       esac
31777       ;;
31778   esac
31779   if test $gl_cv_func_sprintf_posix = no; then
31780
31781
31782
31783   case "$gl_cv_func_printf_infinite" in
31784     *yes)
31785       ;;
31786     *)
31787
31788 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
31789
31790       ;;
31791   esac
31792
31793
31794
31795
31796   case "$gl_cv_func_printf_long_double" in
31797     *yes)
31798       case "$gl_cv_func_printf_infinite_long_double" in
31799         *yes)
31800           ;;
31801         *)
31802
31803 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
31804
31805           ;;
31806       esac
31807       ;;
31808   esac
31809
31810
31811
31812   case "$gl_cv_func_printf_directive_a" in
31813     *yes)
31814       ;;
31815     *)
31816
31817 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
31818
31819       for ac_func in nl_langinfo
31820 do :
31821   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
31822 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
31823   cat >>confdefs.h <<_ACEOF
31824 #define HAVE_NL_LANGINFO 1
31825 _ACEOF
31826
31827 fi
31828 done
31829
31830       ;;
31831   esac
31832
31833
31834
31835   case "$gl_cv_func_printf_directive_f" in
31836     *yes)
31837       ;;
31838     *)
31839
31840 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
31841
31842       ;;
31843   esac
31844
31845
31846
31847   case "$gl_cv_func_printf_directive_ls" in
31848     *yes)
31849       ;;
31850     *)
31851
31852 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
31853
31854       ;;
31855   esac
31856
31857
31858
31859   case "$gl_cv_func_printf_flag_grouping" in
31860     *yes)
31861       ;;
31862     *)
31863
31864 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
31865
31866       ;;
31867   esac
31868
31869
31870
31871   case "$gl_cv_func_printf_flag_leftadjust" in
31872     *yes)
31873       ;;
31874     *)
31875
31876 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
31877
31878       ;;
31879   esac
31880
31881
31882
31883   case "$gl_cv_func_printf_flag_zero" in
31884     *yes)
31885       ;;
31886     *)
31887
31888 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
31889
31890       ;;
31891   esac
31892
31893
31894
31895   case "$gl_cv_func_printf_precision" in
31896     *yes)
31897       ;;
31898     *)
31899
31900 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
31901
31902
31903 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31904
31905
31906 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31907
31908       ;;
31909   esac
31910
31911
31912
31913   case "$gl_cv_func_printf_enomem" in
31914     *yes)
31915       ;;
31916     *)
31917
31918 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
31919
31920
31921 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
31922
31923
31924 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
31925
31926       ;;
31927   esac
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31970
31971   if test $ac_cv_func_vasnprintf = yes; then
31972
31973 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31974
31975   fi
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31988 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31989
31990 else
31991
31992 $as_echo "#define ptrdiff_t long" >>confdefs.h
31993
31994
31995 fi
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013   gl_LIBOBJS="$gl_LIBOBJS sprintf.$ac_objext"
32014
32015   REPLACE_SPRINTF=1
32016   :
32017
32018   fi
32019
32020
32021
32022
32023
32024
32025           GNULIB_SPRINTF_POSIX=1
32026
32027
32028
32029
32030
32031 $as_echo "#define GNULIB_TEST_SPRINTF_POSIX 1" >>confdefs.h
32032
32033
32034
32035
32036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
32037 $as_echo_n "checking for ssize_t... " >&6; }
32038 if ${gt_cv_ssize_t+:} false; then :
32039   $as_echo_n "(cached) " >&6
32040 else
32041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32042 /* end confdefs.h.  */
32043 #include <sys/types.h>
32044 int
32045 main ()
32046 {
32047 int x = sizeof (ssize_t *) + sizeof (ssize_t);
32048             return !x;
32049   ;
32050   return 0;
32051 }
32052 _ACEOF
32053 if ac_fn_c_try_compile "$LINENO"; then :
32054   gt_cv_ssize_t=yes
32055 else
32056   gt_cv_ssize_t=no
32057 fi
32058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32059 fi
32060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
32061 $as_echo "$gt_cv_ssize_t" >&6; }
32062   if test $gt_cv_ssize_t = no; then
32063
32064 $as_echo "#define ssize_t int" >>confdefs.h
32065
32066   fi
32067
32068
32069
32070
32071
32072   case "$host_os" in
32073     mingw*)
32074                   REPLACE_STAT=1
32075       ;;
32076     *)
32077                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
32078 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
32079 if ${gl_cv_func_stat_file_slash+:} false; then :
32080   $as_echo_n "(cached) " >&6
32081 else
32082   touch conftest.tmp
32083          # Assume that if we have lstat, we can also check symlinks.
32084          if test $ac_cv_func_lstat = yes; then
32085            ln -s conftest.tmp conftest.lnk
32086          fi
32087          if test "$cross_compiling" = yes; then :
32088   case "$host_os" in
32089                              # Guess yes on glibc systems.
32090               *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
32091                              # If we don't know, assume the worst.
32092               *)             gl_cv_func_stat_file_slash="guessing no" ;;
32093             esac
32094
32095 else
32096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32097 /* end confdefs.h.  */
32098 #include <sys/stat.h>
32099
32100 int
32101 main ()
32102 {
32103 int result = 0;
32104                struct stat st;
32105                if (!stat ("conftest.tmp/", &st))
32106                  result |= 1;
32107 #if HAVE_LSTAT
32108                if (!stat ("conftest.lnk/", &st))
32109                  result |= 2;
32110 #endif
32111                return result;
32112
32113   ;
32114   return 0;
32115 }
32116 _ACEOF
32117 if ac_fn_c_try_run "$LINENO"; then :
32118   gl_cv_func_stat_file_slash=yes
32119 else
32120   gl_cv_func_stat_file_slash=no
32121 fi
32122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32123   conftest.$ac_objext conftest.beam conftest.$ac_ext
32124 fi
32125
32126          rm -f conftest.tmp conftest.lnk
32127 fi
32128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
32129 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
32130       case $gl_cv_func_stat_file_slash in
32131         *no)
32132           REPLACE_STAT=1
32133
32134 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
32135 ;;
32136       esac
32137       case $host_os in
32138                 solaris*)
32139           REPLACE_FSTAT=1 ;;
32140       esac
32141       ;;
32142   esac
32143
32144   if test $REPLACE_STAT = 1; then
32145
32146
32147
32148
32149
32150
32151
32152
32153   gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
32154
32155     case "$host_os" in
32156       mingw*)
32157
32158
32159
32160
32161
32162
32163
32164
32165   gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
32166
32167         ;;
32168     esac
32169
32170
32171   :
32172
32173   fi
32174
32175
32176
32177
32178
32179           GNULIB_STAT=1
32180
32181
32182
32183
32184
32185 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
32186
32187
32188
32189
32190
32191
32192
32193   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>
32194      #include <sys/stat.h>
32195 "
32196 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
32197
32198 cat >>confdefs.h <<_ACEOF
32199 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
32200 _ACEOF
32201
32202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
32203 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
32204 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
32205   $as_echo_n "(cached) " >&6
32206 else
32207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208 /* end confdefs.h.  */
32209
32210             #include <sys/types.h>
32211             #include <sys/stat.h>
32212             #if HAVE_SYS_TIME_H
32213             # include <sys/time.h>
32214             #endif
32215             #include <time.h>
32216             struct timespec ts;
32217             struct stat st;
32218
32219 int
32220 main ()
32221 {
32222
32223             st.st_atim = ts;
32224
32225   ;
32226   return 0;
32227 }
32228 _ACEOF
32229 if ac_fn_c_try_compile "$LINENO"; then :
32230   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
32231 else
32232   ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
32233 fi
32234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32235 fi
32236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
32237 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
32238      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
32239
32240 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
32241
32242      fi
32243 else
32244   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>
32245         #include <sys/stat.h>
32246 "
32247 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
32248
32249 cat >>confdefs.h <<_ACEOF
32250 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
32251 _ACEOF
32252
32253
32254 else
32255   ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
32256            #include <sys/stat.h>
32257 "
32258 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
32259
32260 cat >>confdefs.h <<_ACEOF
32261 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
32262 _ACEOF
32263
32264
32265 else
32266   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>
32267               #include <sys/stat.h>
32268 "
32269 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
32270
32271 cat >>confdefs.h <<_ACEOF
32272 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
32273 _ACEOF
32274
32275
32276 fi
32277
32278 fi
32279
32280 fi
32281
32282 fi
32283
32284
32285
32286
32287
32288   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>
32289      #include <sys/stat.h>
32290 "
32291 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
32292
32293 cat >>confdefs.h <<_ACEOF
32294 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
32295 _ACEOF
32296
32297
32298 else
32299   ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
32300         #include <sys/stat.h>
32301 "
32302 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
32303
32304 cat >>confdefs.h <<_ACEOF
32305 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
32306 _ACEOF
32307
32308
32309 else
32310   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>
32311           #include <sys/stat.h>
32312 "
32313 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
32314
32315 cat >>confdefs.h <<_ACEOF
32316 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
32317 _ACEOF
32318
32319
32320 fi
32321
32322 fi
32323
32324 fi
32325
32326
32327
32328
32329
32330   # Define two additional variables used in the Makefile substitution.
32331
32332   if test "$ac_cv_header_stdbool_h" = yes; then
32333     STDBOOL_H=''
32334   else
32335     STDBOOL_H='stdbool.h'
32336   fi
32337
32338    if test -n "$STDBOOL_H"; then
32339   GL_GENERATE_STDBOOL_H_TRUE=
32340   GL_GENERATE_STDBOOL_H_FALSE='#'
32341 else
32342   GL_GENERATE_STDBOOL_H_TRUE='#'
32343   GL_GENERATE_STDBOOL_H_FALSE=
32344 fi
32345
32346
32347   if test "$ac_cv_type__Bool" = yes; then
32348     HAVE__BOOL=1
32349   else
32350     HAVE__BOOL=0
32351   fi
32352
32353
32354
32355
32356
32357   STDDEF_H=
32358   ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
32359
32360 "
32361 if test "x$ac_cv_type_max_align_t" = xyes; then :
32362
32363 else
32364   HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
32365 fi
32366
32367   if test $gt_cv_c_wchar_t = no; then
32368     HAVE_WCHAR_T=0
32369     STDDEF_H=stddef.h
32370   fi
32371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
32372 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
32373 if ${gl_cv_decl_null_works+:} false; then :
32374   $as_echo_n "(cached) " >&6
32375 else
32376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32377 /* end confdefs.h.  */
32378 #include <stddef.h>
32379       int test[2 * (sizeof NULL == sizeof (void *)) -1];
32380
32381 int
32382 main ()
32383 {
32384
32385   ;
32386   return 0;
32387 }
32388 _ACEOF
32389 if ac_fn_c_try_compile "$LINENO"; then :
32390   gl_cv_decl_null_works=yes
32391 else
32392   gl_cv_decl_null_works=no
32393 fi
32394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32395 fi
32396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
32397 $as_echo "$gl_cv_decl_null_works" >&6; }
32398   if test $gl_cv_decl_null_works = no; then
32399     REPLACE_NULL=1
32400     STDDEF_H=stddef.h
32401   fi
32402
32403    if test -n "$STDDEF_H"; then
32404   GL_GENERATE_STDDEF_H_TRUE=
32405   GL_GENERATE_STDDEF_H_FALSE='#'
32406 else
32407   GL_GENERATE_STDDEF_H_TRUE='#'
32408   GL_GENERATE_STDDEF_H_FALSE=
32409 fi
32410
32411   if test -n "$STDDEF_H"; then
32412
32413
32414
32415
32416
32417
32418
32419
32420      if test $gl_cv_have_include_next = yes; then
32421        gl_cv_next_stddef_h='<'stddef.h'>'
32422      else
32423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
32424 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
32425 if ${gl_cv_next_stddef_h+:} false; then :
32426   $as_echo_n "(cached) " >&6
32427 else
32428
32429
32430
32431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32432 /* end confdefs.h.  */
32433 #include <stddef.h>
32434 _ACEOF
32435                 case "$host_os" in
32436     aix*) gl_absname_cpp="$ac_cpp -C" ;;
32437     *)    gl_absname_cpp="$ac_cpp" ;;
32438   esac
32439
32440   case "$host_os" in
32441     mingw*)
32442                                           gl_dirsep_regex='[/\\]'
32443       ;;
32444     *)
32445       gl_dirsep_regex='\/'
32446       ;;
32447   esac
32448       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32449   gl_header_literal_regex=`echo 'stddef.h' \
32450                            | sed -e "$gl_make_literal_regex_sed"`
32451   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32452       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32453       s|^/[^/]|//&|
32454       p
32455       q
32456     }'
32457
32458         gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32459   sed -n "$gl_absolute_header_sed"`
32460
32461            gl_header=$gl_cv_absolute_stddef_h
32462            gl_cv_next_stddef_h='"'$gl_header'"'
32463
32464
32465 fi
32466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
32467 $as_echo "$gl_cv_next_stddef_h" >&6; }
32468      fi
32469      NEXT_STDDEF_H=$gl_cv_next_stddef_h
32470
32471      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32472        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32473        gl_next_as_first_directive='<'stddef.h'>'
32474      else
32475        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32476        gl_next_as_first_directive=$gl_cv_next_stddef_h
32477      fi
32478      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
32479
32480
32481
32482
32483   fi
32484
32485
32486
32487
32488   $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499      if test $gl_cv_have_include_next = yes; then
32500        gl_cv_next_stdio_h='<'stdio.h'>'
32501      else
32502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
32503 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
32504 if ${gl_cv_next_stdio_h+:} false; then :
32505   $as_echo_n "(cached) " >&6
32506 else
32507
32508
32509
32510   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32511 /* end confdefs.h.  */
32512 #include <stdio.h>
32513 _ACEOF
32514                 case "$host_os" in
32515     aix*) gl_absname_cpp="$ac_cpp -C" ;;
32516     *)    gl_absname_cpp="$ac_cpp" ;;
32517   esac
32518
32519   case "$host_os" in
32520     mingw*)
32521                                           gl_dirsep_regex='[/\\]'
32522       ;;
32523     *)
32524       gl_dirsep_regex='\/'
32525       ;;
32526   esac
32527       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32528   gl_header_literal_regex=`echo 'stdio.h' \
32529                            | sed -e "$gl_make_literal_regex_sed"`
32530   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32531       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32532       s|^/[^/]|//&|
32533       p
32534       q
32535     }'
32536
32537         gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32538   sed -n "$gl_absolute_header_sed"`
32539
32540            gl_header=$gl_cv_absolute_stdio_h
32541            gl_cv_next_stdio_h='"'$gl_header'"'
32542
32543
32544 fi
32545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
32546 $as_echo "$gl_cv_next_stdio_h" >&6; }
32547      fi
32548      NEXT_STDIO_H=$gl_cv_next_stdio_h
32549
32550      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32551        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32552        gl_next_as_first_directive='<'stdio.h'>'
32553      else
32554        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32555        gl_next_as_first_directive=$gl_cv_next_stdio_h
32556      fi
32557      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
32558
32559
32560
32561
32562
32563         { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
32564 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
32565 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
32566   $as_echo_n "(cached) " >&6
32567 else
32568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32569 /* end confdefs.h.  */
32570
32571        #define __STDC_FORMAT_MACROS 1
32572        #include <stdio.h>
32573        #include <inttypes.h>
32574        /* For non-mingw systems, compilation will trivially succeed.
32575           For mingw, compilation will succeed for older mingw (system
32576           printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
32577        #if (defined _WIN32 && ! defined __CYGWIN__) && \
32578          (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
32579        extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
32580        #endif
32581
32582 int
32583 main ()
32584 {
32585
32586   ;
32587   return 0;
32588 }
32589 _ACEOF
32590 if ac_fn_c_try_compile "$LINENO"; then :
32591   gl_cv_func_printf_attribute_flavor=system
32592 else
32593   gl_cv_func_printf_attribute_flavor=gnu
32594 fi
32595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32596 fi
32597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
32598 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
32599   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
32600
32601 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
32602
32603   fi
32604
32605       GNULIB_FSCANF=1
32606
32607
32608 cat >>confdefs.h <<_ACEOF
32609 #define GNULIB_FSCANF 1
32610 _ACEOF
32611
32612
32613   GNULIB_SCANF=1
32614
32615
32616 cat >>confdefs.h <<_ACEOF
32617 #define GNULIB_SCANF 1
32618 _ACEOF
32619
32620
32621   GNULIB_FGETC=1
32622   GNULIB_GETC=1
32623   GNULIB_GETCHAR=1
32624   GNULIB_FGETS=1
32625   GNULIB_FREAD=1
32626
32627
32628       GNULIB_FPRINTF=1
32629   GNULIB_PRINTF=1
32630   GNULIB_VFPRINTF=1
32631   GNULIB_VPRINTF=1
32632   GNULIB_FPUTC=1
32633   GNULIB_PUTC=1
32634   GNULIB_PUTCHAR=1
32635   GNULIB_FPUTS=1
32636   GNULIB_PUTS=1
32637   GNULIB_FWRITE=1
32638
32639
32640
32641
32642     for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
32643     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32645 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32646 if eval \${$as_gl_Symbol+:} false; then :
32647   $as_echo_n "(cached) " >&6
32648 else
32649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32650 /* end confdefs.h.  */
32651 #include <stdio.h>
32652
32653 int
32654 main ()
32655 {
32656 #undef $gl_func
32657   (void) $gl_func;
32658   ;
32659   return 0;
32660 }
32661 _ACEOF
32662 if ac_fn_c_try_compile "$LINENO"; then :
32663   eval "$as_gl_Symbol=yes"
32664 else
32665   eval "$as_gl_Symbol=no"
32666 fi
32667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32668 fi
32669 eval ac_res=\$$as_gl_Symbol
32670                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32671 $as_echo "$ac_res" >&6; }
32672     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32673   cat >>confdefs.h <<_ACEOF
32674 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32675 _ACEOF
32676
32677                      eval ac_cv_have_decl_$gl_func=yes
32678 fi
32679       done
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692      if test $gl_cv_have_include_next = yes; then
32693        gl_cv_next_stdlib_h='<'stdlib.h'>'
32694      else
32695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
32696 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
32697 if ${gl_cv_next_stdlib_h+:} false; then :
32698   $as_echo_n "(cached) " >&6
32699 else
32700
32701
32702
32703   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32704 /* end confdefs.h.  */
32705 #include <stdlib.h>
32706 _ACEOF
32707                 case "$host_os" in
32708     aix*) gl_absname_cpp="$ac_cpp -C" ;;
32709     *)    gl_absname_cpp="$ac_cpp" ;;
32710   esac
32711
32712   case "$host_os" in
32713     mingw*)
32714                                           gl_dirsep_regex='[/\\]'
32715       ;;
32716     *)
32717       gl_dirsep_regex='\/'
32718       ;;
32719   esac
32720       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32721   gl_header_literal_regex=`echo 'stdlib.h' \
32722                            | sed -e "$gl_make_literal_regex_sed"`
32723   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32724       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32725       s|^/[^/]|//&|
32726       p
32727       q
32728     }'
32729
32730         gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32731   sed -n "$gl_absolute_header_sed"`
32732
32733            gl_header=$gl_cv_absolute_stdlib_h
32734            gl_cv_next_stdlib_h='"'$gl_header'"'
32735
32736
32737 fi
32738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
32739 $as_echo "$gl_cv_next_stdlib_h" >&6; }
32740      fi
32741      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
32742
32743      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32744        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32745        gl_next_as_first_directive='<'stdlib.h'>'
32746      else
32747        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32748        gl_next_as_first_directive=$gl_cv_next_stdlib_h
32749      fi
32750      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
32751
32752
32753
32754
32755
32756
32757     for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray     realpath rpmatch secure_getenv setenv setstate setstate_r srandom     srandom_r strtod strtoll strtoull unlockpt unsetenv; do
32758     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32759     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32760 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32761 if eval \${$as_gl_Symbol+:} false; then :
32762   $as_echo_n "(cached) " >&6
32763 else
32764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32765 /* end confdefs.h.  */
32766 #include <stdlib.h>
32767 #if HAVE_SYS_LOADAVG_H
32768 /* OpenIndiana has a bug: <sys/time.h> must be included before
32769    <sys/loadavg.h>.  */
32770 # include <sys/time.h>
32771 # include <sys/loadavg.h>
32772 #endif
32773 #if HAVE_RANDOM_H
32774 # include <random.h>
32775 #endif
32776
32777 int
32778 main ()
32779 {
32780 #undef $gl_func
32781   (void) $gl_func;
32782   ;
32783   return 0;
32784 }
32785 _ACEOF
32786 if ac_fn_c_try_compile "$LINENO"; then :
32787   eval "$as_gl_Symbol=yes"
32788 else
32789   eval "$as_gl_Symbol=no"
32790 fi
32791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32792 fi
32793 eval ac_res=\$$as_gl_Symbol
32794                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32795 $as_echo "$ac_res" >&6; }
32796     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32797   cat >>confdefs.h <<_ACEOF
32798 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32799 _ACEOF
32800
32801                      eval ac_cv_have_decl_$gl_func=yes
32802 fi
32803       done
32804
32805
32806
32807
32808
32809
32810
32811
32812   for ac_func in stpcpy
32813 do :
32814   ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
32815 if test "x$ac_cv_func_stpcpy" = xyes; then :
32816   cat >>confdefs.h <<_ACEOF
32817 #define HAVE_STPCPY 1
32818 _ACEOF
32819
32820 fi
32821 done
32822
32823   if test $ac_cv_func_stpcpy = no; then
32824     HAVE_STPCPY=0
32825   fi
32826
32827   if test $HAVE_STPCPY = 0; then
32828
32829
32830
32831
32832
32833
32834
32835
32836   gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
32837
32838
32839   :
32840
32841   fi
32842
32843
32844
32845
32846
32847           GNULIB_STPCPY=1
32848
32849
32850
32851
32852
32853 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
32854
32855
32856
32857
32858
32859
32860
32861   for ac_func in strchrnul
32862 do :
32863   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
32864 if test "x$ac_cv_func_strchrnul" = xyes; then :
32865   cat >>confdefs.h <<_ACEOF
32866 #define HAVE_STRCHRNUL 1
32867 _ACEOF
32868
32869 fi
32870 done
32871
32872   if test $ac_cv_func_strchrnul = no; then
32873     HAVE_STRCHRNUL=0
32874   else
32875     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
32876 $as_echo_n "checking whether strchrnul works... " >&6; }
32877 if ${gl_cv_func_strchrnul_works+:} false; then :
32878   $as_echo_n "(cached) " >&6
32879 else
32880   if test "$cross_compiling" = yes; then :
32881            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32882 /* end confdefs.h.  */
32883
32884 #if defined __CYGWIN__
32885  #include <cygwin/version.h>
32886  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
32887   Lucky user
32888  #endif
32889 #else
32890   Lucky user
32891 #endif
32892
32893 _ACEOF
32894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32895   $EGREP "Lucky user" >/dev/null 2>&1; then :
32896   gl_cv_func_strchrnul_works="guessing yes"
32897 else
32898   gl_cv_func_strchrnul_works="guessing no"
32899 fi
32900 rm -f conftest*
32901
32902
32903 else
32904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32905 /* end confdefs.h.  */
32906
32907 #include <string.h> /* for strchrnul */
32908
32909 int
32910 main ()
32911 {
32912 const char *buf = "a";
32913       return strchrnul (buf, 'b') != buf + 1;
32914
32915   ;
32916   return 0;
32917 }
32918 _ACEOF
32919 if ac_fn_c_try_run "$LINENO"; then :
32920   gl_cv_func_strchrnul_works=yes
32921 else
32922   gl_cv_func_strchrnul_works=no
32923 fi
32924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32925   conftest.$ac_objext conftest.beam conftest.$ac_ext
32926 fi
32927
32928
32929 fi
32930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
32931 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
32932     case "$gl_cv_func_strchrnul_works" in
32933       *yes) ;;
32934       *) REPLACE_STRCHRNUL=1 ;;
32935     esac
32936   fi
32937
32938   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
32939
32940
32941
32942
32943
32944
32945
32946
32947   gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
32948
32949     :
32950   fi
32951
32952
32953
32954
32955
32956           GNULIB_STRCHRNUL=1
32957
32958
32959
32960
32961
32962 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
32963
32964
32965
32966
32967
32968
32969
32970   if test $ac_cv_func_strdup = yes; then
32971     if test $gl_cv_func_malloc_posix != yes; then
32972       REPLACE_STRDUP=1
32973     fi
32974   fi
32975
32976   if test $ac_cv_have_decl_strdup = no; then
32977     HAVE_DECL_STRDUP=0
32978   fi
32979
32980   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
32981
32982
32983
32984
32985
32986
32987
32988
32989   gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
32990
32991     :
32992   fi
32993
32994
32995
32996
32997
32998           GNULIB_STRDUP=1
32999
33000
33001
33002
33003
33004 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
33016     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
33017 $as_echo_n "checking for working strerror function... " >&6; }
33018 if ${gl_cv_func_working_strerror+:} false; then :
33019   $as_echo_n "(cached) " >&6
33020 else
33021   if test "$cross_compiling" = yes; then :
33022   case "$host_os" in
33023                           # Guess yes on glibc systems.
33024            *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
33025                           # If we don't know, assume the worst.
33026            *)             gl_cv_func_working_strerror="guessing no" ;;
33027          esac
33028
33029 else
33030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33031 /* end confdefs.h.  */
33032 #include <string.h>
33033
33034 int
33035 main ()
33036 {
33037 if (!*strerror (-2)) return 1;
33038   ;
33039   return 0;
33040 }
33041 _ACEOF
33042 if ac_fn_c_try_run "$LINENO"; then :
33043   gl_cv_func_working_strerror=yes
33044 else
33045   gl_cv_func_working_strerror=no
33046 fi
33047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33048   conftest.$ac_objext conftest.beam conftest.$ac_ext
33049 fi
33050
33051
33052 fi
33053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
33054 $as_echo "$gl_cv_func_working_strerror" >&6; }
33055     case "$gl_cv_func_working_strerror" in
33056       *yes) ;;
33057       *)
33058                         REPLACE_STRERROR=1
33059         ;;
33060     esac
33061
33062                   case "$gl_cv_func_strerror_r_works" in
33063         *no) REPLACE_STRERROR=1 ;;
33064       esac
33065
33066   else
33067             REPLACE_STRERROR=1
33068   fi
33069
33070   if test $REPLACE_STRERROR = 1; then
33071
33072
33073
33074
33075
33076
33077
33078
33079   gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
33080
33081   fi
33082
33083
33084 cat >>confdefs.h <<_ACEOF
33085 #define GNULIB_STRERROR 1
33086 _ACEOF
33087
33088
33089
33090
33091
33092
33093
33094           GNULIB_STRERROR=1
33095
33096
33097
33098
33099
33100 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
33101
33102
33103
33104
33105
33106   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
33107
33108
33109
33110
33111
33112
33113
33114
33115   gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
33116
33117
33118
33119
33120
33121   if test $ac_cv_header_sys_socket_h != yes; then
33122                     for ac_header in winsock2.h
33123 do :
33124   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
33125 if test "x$ac_cv_header_winsock2_h" = xyes; then :
33126   cat >>confdefs.h <<_ACEOF
33127 #define HAVE_WINSOCK2_H 1
33128 _ACEOF
33129
33130 fi
33131
33132 done
33133
33134   fi
33135   if test "$ac_cv_header_winsock2_h" = yes; then
33136     HAVE_WINSOCK2_H=1
33137     UNISTD_H_HAVE_WINSOCK2_H=1
33138     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
33139   else
33140     HAVE_WINSOCK2_H=0
33141   fi
33142
33143
33144   fi
33145
33146
33147
33148
33149
33150
33151
33152   if test $ac_cv_have_decl_strerror_r = no; then
33153     HAVE_DECL_STRERROR_R=0
33154   fi
33155
33156   if test $ac_cv_func_strerror_r = yes; then
33157     if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
33158       if test $gl_cv_func_strerror_r_posix_signature = yes; then
33159         case "$gl_cv_func_strerror_r_works" in
33160                     *no) REPLACE_STRERROR_R=1 ;;
33161         esac
33162       else
33163                 REPLACE_STRERROR_R=1
33164       fi
33165     else
33166                   REPLACE_STRERROR_R=1
33167     fi
33168   fi
33169
33170   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
33171
33172
33173
33174
33175
33176
33177
33178
33179   gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
33180
33181
33182
33183
33184
33185
33186   fi
33187
33188
33189
33190
33191
33192           GNULIB_STRERROR_R=1
33193
33194
33195
33196
33197
33198 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
33199
33200
33201
33202
33203
33204 cat >>confdefs.h <<_ACEOF
33205 #define GNULIB_STRERROR_R_POSIX 1
33206 _ACEOF
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218   if test $ac_cv_have_decl_strndup = no; then
33219     HAVE_DECL_STRNDUP=0
33220   fi
33221
33222   if test $ac_cv_func_strndup = yes; then
33223     HAVE_STRNDUP=1
33224     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
33225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
33226 $as_echo_n "checking for working strndup... " >&6; }
33227 if ${gl_cv_func_strndup_works+:} false; then :
33228   $as_echo_n "(cached) " >&6
33229 else
33230   if test "$cross_compiling" = yes; then :
33231
33232           case $host_os in
33233             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
33234             *)               gl_cv_func_strndup_works="guessing yes";;
33235           esac
33236
33237 else
33238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33239 /* end confdefs.h.  */
33240
33241          #include <string.h>
33242                            #include <stdlib.h>
33243 int
33244 main ()
33245 {
33246
33247 #if !HAVE_DECL_STRNDUP
33248   extern
33249   #ifdef __cplusplus
33250   "C"
33251   #endif
33252   char *strndup (const char *, size_t);
33253 #endif
33254   int result;
33255   char *s;
33256   s = strndup ("some longer string", 15);
33257   free (s);
33258   s = strndup ("shorter string", 13);
33259   result = s[13] != '\0';
33260   free (s);
33261   return result;
33262   ;
33263   return 0;
33264 }
33265 _ACEOF
33266 if ac_fn_c_try_run "$LINENO"; then :
33267   gl_cv_func_strndup_works=yes
33268 else
33269   gl_cv_func_strndup_works=no
33270 fi
33271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33272   conftest.$ac_objext conftest.beam conftest.$ac_ext
33273 fi
33274
33275 fi
33276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
33277 $as_echo "$gl_cv_func_strndup_works" >&6; }
33278     case $gl_cv_func_strndup_works in
33279       *no) REPLACE_STRNDUP=1 ;;
33280     esac
33281   else
33282     HAVE_STRNDUP=0
33283   fi
33284
33285   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
33286
33287
33288
33289
33290
33291
33292
33293
33294   gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
33295
33296   fi
33297
33298
33299
33300
33301
33302           GNULIB_STRNDUP=1
33303
33304
33305
33306
33307
33308 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318   if test $ac_cv_have_decl_strnlen = no; then
33319     HAVE_DECL_STRNLEN=0
33320   else
33321
33322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
33323 $as_echo_n "checking for working strnlen... " >&6; }
33324 if ${ac_cv_func_strnlen_working+:} false; then :
33325   $as_echo_n "(cached) " >&6
33326 else
33327   if test "$cross_compiling" = yes; then :
33328   # Guess no on AIX systems, yes otherwise.
33329                 case "$host_os" in
33330                   aix*) ac_cv_func_strnlen_working=no;;
33331                   *)    ac_cv_func_strnlen_working=yes;;
33332                 esac
33333 else
33334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33335 /* end confdefs.h.  */
33336 $ac_includes_default
33337 int
33338 main ()
33339 {
33340
33341 #define S "foobar"
33342 #define S_LEN (sizeof S - 1)
33343
33344   /* At least one implementation is buggy: that of AIX 4.3 would
33345      give strnlen (S, 1) == 3.  */
33346
33347   int i;
33348   for (i = 0; i < S_LEN + 1; ++i)
33349     {
33350       int expected = i <= S_LEN ? i : S_LEN;
33351       if (strnlen (S, i) != expected)
33352         return 1;
33353     }
33354   return 0;
33355
33356   ;
33357   return 0;
33358 }
33359 _ACEOF
33360 if ac_fn_c_try_run "$LINENO"; then :
33361   ac_cv_func_strnlen_working=yes
33362 else
33363   ac_cv_func_strnlen_working=no
33364 fi
33365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33366   conftest.$ac_objext conftest.beam conftest.$ac_ext
33367 fi
33368
33369 fi
33370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
33371 $as_echo "$ac_cv_func_strnlen_working" >&6; }
33372 test $ac_cv_func_strnlen_working = no && :
33373
33374
33375     if test $ac_cv_func_strnlen_working = no; then
33376       REPLACE_STRNLEN=1
33377     fi
33378   fi
33379
33380   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
33381
33382
33383
33384
33385
33386
33387
33388
33389   gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
33390
33391     :
33392   fi
33393
33394
33395
33396
33397
33398           GNULIB_STRNLEN=1
33399
33400
33401
33402
33403
33404 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
33405
33406
33407
33408
33409
33410
33411
33412   for ac_func in strverscmp
33413 do :
33414   ac_fn_c_check_func "$LINENO" "strverscmp" "ac_cv_func_strverscmp"
33415 if test "x$ac_cv_func_strverscmp" = xyes; then :
33416   cat >>confdefs.h <<_ACEOF
33417 #define HAVE_STRVERSCMP 1
33418 _ACEOF
33419
33420 fi
33421 done
33422
33423   if test $ac_cv_func_strverscmp = no; then
33424     HAVE_STRVERSCMP=0
33425   fi
33426
33427   if test $HAVE_STRVERSCMP = 0; then
33428
33429
33430
33431
33432
33433
33434
33435
33436   gl_LIBOBJS="$gl_LIBOBJS strverscmp.$ac_objext"
33437
33438
33439   :
33440
33441   fi
33442
33443
33444
33445
33446
33447           GNULIB_STRVERSCMP=1
33448
33449
33450
33451
33452
33453 $as_echo "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471      if test $gl_cv_have_include_next = yes; then
33472        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
33473      else
33474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
33475 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
33476 if ${gl_cv_next_sys_stat_h+:} false; then :
33477   $as_echo_n "(cached) " >&6
33478 else
33479
33480              if test $ac_cv_header_sys_stat_h = yes; then
33481
33482
33483
33484
33485   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33486 /* end confdefs.h.  */
33487 #include <sys/stat.h>
33488 _ACEOF
33489                 case "$host_os" in
33490     aix*) gl_absname_cpp="$ac_cpp -C" ;;
33491     *)    gl_absname_cpp="$ac_cpp" ;;
33492   esac
33493
33494   case "$host_os" in
33495     mingw*)
33496                                           gl_dirsep_regex='[/\\]'
33497       ;;
33498     *)
33499       gl_dirsep_regex='\/'
33500       ;;
33501   esac
33502       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33503   gl_header_literal_regex=`echo 'sys/stat.h' \
33504                            | sed -e "$gl_make_literal_regex_sed"`
33505   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33506       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33507       s|^/[^/]|//&|
33508       p
33509       q
33510     }'
33511
33512         gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33513   sed -n "$gl_absolute_header_sed"`
33514
33515            gl_header=$gl_cv_absolute_sys_stat_h
33516            gl_cv_next_sys_stat_h='"'$gl_header'"'
33517           else
33518                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
33519              fi
33520
33521
33522 fi
33523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
33524 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
33525      fi
33526      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
33527
33528      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33529        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33530        gl_next_as_first_directive='<'sys/stat.h'>'
33531      else
33532        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33533        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
33534      fi
33535      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
33536
33537
33538
33539
33540
33541
33542
33543
33544     WINDOWS_STAT_TIMESPEC=0
33545
33546
33547
33548
33549
33550
33551
33552
33553       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
33554      #include <sys/stat.h>
33555 "
33556 if test "x$ac_cv_type_nlink_t" = xyes; then :
33557
33558 else
33559
33560 $as_echo "#define nlink_t int" >>confdefs.h
33561
33562 fi
33563
33564
33565
33566     for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
33567     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33568     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33569 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33570 if eval \${$as_gl_Symbol+:} false; then :
33571   $as_echo_n "(cached) " >&6
33572 else
33573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33574 /* end confdefs.h.  */
33575 #include <sys/stat.h>
33576
33577 int
33578 main ()
33579 {
33580 #undef $gl_func
33581   (void) $gl_func;
33582   ;
33583   return 0;
33584 }
33585 _ACEOF
33586 if ac_fn_c_try_compile "$LINENO"; then :
33587   eval "$as_gl_Symbol=yes"
33588 else
33589   eval "$as_gl_Symbol=no"
33590 fi
33591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33592 fi
33593 eval ac_res=\$$as_gl_Symbol
33594                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33595 $as_echo "$ac_res" >&6; }
33596     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33597   cat >>confdefs.h <<_ACEOF
33598 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33599 _ACEOF
33600
33601                      eval ac_cv_have_decl_$gl_func=yes
33602 fi
33603       done
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621      if test $gl_cv_have_include_next = yes; then
33622        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
33623      else
33624        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
33625 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
33626 if ${gl_cv_next_sys_wait_h+:} false; then :
33627   $as_echo_n "(cached) " >&6
33628 else
33629
33630              if test $ac_cv_header_sys_wait_h = yes; then
33631
33632
33633
33634
33635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33636 /* end confdefs.h.  */
33637 #include <sys/wait.h>
33638 _ACEOF
33639                 case "$host_os" in
33640     aix*) gl_absname_cpp="$ac_cpp -C" ;;
33641     *)    gl_absname_cpp="$ac_cpp" ;;
33642   esac
33643
33644   case "$host_os" in
33645     mingw*)
33646                                           gl_dirsep_regex='[/\\]'
33647       ;;
33648     *)
33649       gl_dirsep_regex='\/'
33650       ;;
33651   esac
33652       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33653   gl_header_literal_regex=`echo 'sys/wait.h' \
33654                            | sed -e "$gl_make_literal_regex_sed"`
33655   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33656       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33657       s|^/[^/]|//&|
33658       p
33659       q
33660     }'
33661
33662         gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33663   sed -n "$gl_absolute_header_sed"`
33664
33665            gl_header=$gl_cv_absolute_sys_wait_h
33666            gl_cv_next_sys_wait_h='"'$gl_header'"'
33667           else
33668                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
33669              fi
33670
33671
33672 fi
33673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
33674 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
33675      fi
33676      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
33677
33678      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33679        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33680        gl_next_as_first_directive='<'sys/wait.h'>'
33681      else
33682        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33683        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
33684      fi
33685      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
33686
33687
33688
33689
33690
33691
33692
33693
33694     for gl_func in waitpid; do
33695     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33697 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33698 if eval \${$as_gl_Symbol+:} false; then :
33699   $as_echo_n "(cached) " >&6
33700 else
33701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33702 /* end confdefs.h.  */
33703 #include <sys/wait.h>
33704 int
33705 main ()
33706 {
33707 #undef $gl_func
33708   (void) $gl_func;
33709   ;
33710   return 0;
33711 }
33712 _ACEOF
33713 if ac_fn_c_try_compile "$LINENO"; then :
33714   eval "$as_gl_Symbol=yes"
33715 else
33716   eval "$as_gl_Symbol=no"
33717 fi
33718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33719 fi
33720 eval ac_res=\$$as_gl_Symbol
33721                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33722 $as_echo "$ac_res" >&6; }
33723     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33724   cat >>confdefs.h <<_ACEOF
33725 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33726 _ACEOF
33727
33728                      eval ac_cv_have_decl_$gl_func=yes
33729 fi
33730       done
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753      if test $gl_cv_have_include_next = yes; then
33754        gl_cv_next_unistd_h='<'unistd.h'>'
33755      else
33756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
33757 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
33758 if ${gl_cv_next_unistd_h+:} false; then :
33759   $as_echo_n "(cached) " >&6
33760 else
33761
33762              if test $ac_cv_header_unistd_h = yes; then
33763
33764
33765
33766
33767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33768 /* end confdefs.h.  */
33769 #include <unistd.h>
33770 _ACEOF
33771                 case "$host_os" in
33772     aix*) gl_absname_cpp="$ac_cpp -C" ;;
33773     *)    gl_absname_cpp="$ac_cpp" ;;
33774   esac
33775
33776   case "$host_os" in
33777     mingw*)
33778                                           gl_dirsep_regex='[/\\]'
33779       ;;
33780     *)
33781       gl_dirsep_regex='\/'
33782       ;;
33783   esac
33784       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33785   gl_header_literal_regex=`echo 'unistd.h' \
33786                            | sed -e "$gl_make_literal_regex_sed"`
33787   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33788       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33789       s|^/[^/]|//&|
33790       p
33791       q
33792     }'
33793
33794         gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33795   sed -n "$gl_absolute_header_sed"`
33796
33797            gl_header=$gl_cv_absolute_unistd_h
33798            gl_cv_next_unistd_h='"'$gl_header'"'
33799           else
33800                gl_cv_next_unistd_h='<'unistd.h'>'
33801              fi
33802
33803
33804 fi
33805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
33806 $as_echo "$gl_cv_next_unistd_h" >&6; }
33807      fi
33808      NEXT_UNISTD_H=$gl_cv_next_unistd_h
33809
33810      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33811        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33812        gl_next_as_first_directive='<'unistd.h'>'
33813      else
33814        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33815        gl_next_as_first_directive=$gl_cv_next_unistd_h
33816      fi
33817      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
33818
33819
33820
33821
33822   if test $ac_cv_header_unistd_h = yes; then
33823     HAVE_UNISTD_H=1
33824   else
33825     HAVE_UNISTD_H=0
33826   fi
33827
33828
33829
33830
33831
33832
33833
33834     for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize     getusershell setusershell endusershell     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sethostname sleep symlink symlinkat     truncate ttyname_r unlink unlinkat usleep; do
33835     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33836     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33837 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33838 if eval \${$as_gl_Symbol+:} false; then :
33839   $as_echo_n "(cached) " >&6
33840 else
33841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33842 /* end confdefs.h.  */
33843
33844 #if HAVE_UNISTD_H
33845 # include <unistd.h>
33846 #endif
33847 /* Some systems declare various items in the wrong headers.  */
33848 #if !(defined __GLIBC__ && !defined __UCLIBC__)
33849 # include <fcntl.h>
33850 # include <stdio.h>
33851 # include <stdlib.h>
33852 # if defined _WIN32 && ! defined __CYGWIN__
33853 #  include <io.h>
33854 # endif
33855 #endif
33856
33857 int
33858 main ()
33859 {
33860 #undef $gl_func
33861   (void) $gl_func;
33862   ;
33863   return 0;
33864 }
33865 _ACEOF
33866 if ac_fn_c_try_compile "$LINENO"; then :
33867   eval "$as_gl_Symbol=yes"
33868 else
33869   eval "$as_gl_Symbol=no"
33870 fi
33871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33872 fi
33873 eval ac_res=\$$as_gl_Symbol
33874                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33875 $as_echo "$ac_res" >&6; }
33876     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33877   cat >>confdefs.h <<_ACEOF
33878 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33879 _ACEOF
33880
33881                      eval ac_cv_have_decl_$gl_func=yes
33882 fi
33883       done
33884
33885
33886
33887
33888
33889
33890
33891       if  { test "$HAVE_LIBUNISTRING" != yes \
33892     || {
33893
33894
33895
33896             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
33897             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
33898                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
33899                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
33900                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
33901                          }
33902                     }
33903                }
33904
33905
33906
33907
33908        }
33909   }; then
33910     LIBUNISTRING_UNITYPES_H='unitypes.h'
33911   else
33912     LIBUNISTRING_UNITYPES_H=
33913   fi
33914
33915
33916
33917
33918       if  { test "$HAVE_LIBUNISTRING" != yes \
33919     || {
33920
33921
33922
33923             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
33924             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
33925                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
33926                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
33927                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
33928                          }
33929                     }
33930                }
33931
33932
33933
33934
33935        }
33936   }; then
33937     LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
33938   else
33939     LIBUNISTRING_UNIWIDTH_H=
33940   fi
33941
33942
33943
33944
33945        if  { test "$HAVE_LIBUNISTRING" != yes \
33946     || {
33947
33948
33949
33950             test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
33951             || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
33952                  && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
33953                       || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
33954                            && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
33955                          }
33956                     }
33957                }
33958
33959
33960
33961
33962        }
33963   }; then
33964   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
33965   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
33966 else
33967   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
33968   LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
33969 fi
33970
33971
33972
33973
33974
33975
33976
33977     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
33978 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
33979 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
33980   $as_echo_n "(cached) " >&6
33981 else
33982   touch conftest.file
33983      # Assume that if we have lstat, we can also check symlinks.
33984      if test $ac_cv_func_lstat = yes; then
33985        ln -s conftest.file conftest.lnk
33986      fi
33987      if test "$cross_compiling" = yes; then :
33988   case "$host_os" in
33989                  # Guess yes on glibc systems.
33990          *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
33991                  # Guess no on native Windows.
33992          mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
33993                  # If we don't know, assume the worst.
33994          *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
33995        esac
33996
33997 else
33998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33999 /* end confdefs.h.  */
34000 #if HAVE_UNISTD_H
34001            # include <unistd.h>
34002            #else /* on Windows with MSVC */
34003            # include <io.h>
34004            #endif
34005            #include <errno.h>
34006
34007 int
34008 main ()
34009 {
34010 int result = 0;
34011            if (!unlink ("conftest.file/"))
34012              result |= 1;
34013            else if (errno != ENOTDIR)
34014              result |= 2;
34015 #if HAVE_LSTAT
34016            if (!unlink ("conftest.lnk/"))
34017              result |= 4;
34018            else if (errno != ENOTDIR)
34019              result |= 8;
34020 #endif
34021            return result;
34022
34023   ;
34024   return 0;
34025 }
34026 _ACEOF
34027 if ac_fn_c_try_run "$LINENO"; then :
34028   gl_cv_func_unlink_honors_slashes=yes
34029 else
34030   gl_cv_func_unlink_honors_slashes=no
34031 fi
34032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34033   conftest.$ac_objext conftest.beam conftest.$ac_ext
34034 fi
34035
34036      rm -f conftest.file conftest.lnk
34037 fi
34038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
34039 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
34040   case "$gl_cv_func_unlink_honors_slashes" in
34041     *no)
34042       REPLACE_UNLINK=1
34043       ;;
34044   esac
34045
34046       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
34047 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
34048 if ${gl_cv_func_unlink_parent_fails+:} false; then :
34049   $as_echo_n "(cached) " >&6
34050 else
34051   case "$host_os" in
34052        darwin*)
34053                                                       if {
34054               # Use the mktemp program if available. If not available, hide the error
34055               # message.
34056               tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
34057               test -n "$tmp" && test -d "$tmp"
34058             } ||
34059             {
34060               # Use a simple mkdir command. It is guaranteed to fail if the directory
34061               # already exists.  $RANDOM is bash specific and expands to empty in shells
34062               # other than bash, ksh and zsh.  Its use does not increase security;
34063               # rather, it minimizes the probability of failure in a very cluttered /tmp
34064               # directory.
34065               tmp=/tmp/gt$$-$RANDOM
34066               (umask 077 && mkdir "$tmp")
34067             }; then
34068            mkdir "$tmp/subdir"
34069            GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
34070            export GL_SUBDIR_FOR_UNLINK
34071            if test "$cross_compiling" = yes; then :
34072   # If we don't know, assume the worst.
34073               gl_cv_func_unlink_parent_fails="guessing no"
34074
34075 else
34076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34077 /* end confdefs.h.  */
34078
34079                 #include <stdlib.h>
34080                 #if HAVE_UNISTD_H
34081                 # include <unistd.h>
34082                 #else /* on Windows with MSVC */
34083                 # include <direct.h>
34084                 # include <io.h>
34085                 #endif
34086                 int main ()
34087                 {
34088                   int result = 0;
34089                   if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
34090                     result |= 1;
34091                   else if (unlink ("..") == 0)
34092                     result |= 2;
34093                   return result;
34094                 }
34095
34096 _ACEOF
34097 if ac_fn_c_try_run "$LINENO"; then :
34098   gl_cv_func_unlink_parent_fails=yes
34099 else
34100   gl_cv_func_unlink_parent_fails=no
34101 fi
34102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34103   conftest.$ac_objext conftest.beam conftest.$ac_ext
34104 fi
34105
34106            unset GL_SUBDIR_FOR_UNLINK
34107            rm -rf "$tmp"
34108          else
34109            gl_cv_func_unlink_parent_fails="guessing no"
34110          fi
34111          ;;
34112        *)
34113          gl_cv_func_unlink_parent_fails="guessing yes"
34114          ;;
34115      esac
34116
34117 fi
34118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
34119 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
34120   case "$gl_cv_func_unlink_parent_fails" in
34121     *no)
34122       REPLACE_UNLINK=1
34123
34124 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
34125
34126       ;;
34127   esac
34128
34129   if test $REPLACE_UNLINK = 1; then
34130
34131
34132
34133
34134
34135
34136
34137
34138   gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
34139
34140   fi
34141
34142
34143
34144
34145
34146           GNULIB_UNLINK=1
34147
34148
34149
34150
34151
34152 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
34153
34154
34155
34156
34157
34158 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180   if test $ac_cv_have_decl_unsetenv = no; then
34181     HAVE_DECL_UNSETENV=0
34182   fi
34183   for ac_func in unsetenv
34184 do :
34185   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
34186 if test "x$ac_cv_func_unsetenv" = xyes; then :
34187   cat >>confdefs.h <<_ACEOF
34188 #define HAVE_UNSETENV 1
34189 _ACEOF
34190
34191 fi
34192 done
34193
34194   if test $ac_cv_func_unsetenv = no; then
34195     HAVE_UNSETENV=0
34196   else
34197     HAVE_UNSETENV=1
34198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
34199 $as_echo_n "checking for unsetenv() return type... " >&6; }
34200 if ${gt_cv_func_unsetenv_ret+:} false; then :
34201   $as_echo_n "(cached) " >&6
34202 else
34203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34204 /* end confdefs.h.  */
34205
34206 #undef _BSD
34207 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
34208 #include <stdlib.h>
34209 extern
34210 #ifdef __cplusplus
34211 "C"
34212 #endif
34213 int unsetenv (const char *name);
34214
34215 int
34216 main ()
34217 {
34218
34219   ;
34220   return 0;
34221 }
34222 _ACEOF
34223 if ac_fn_c_try_compile "$LINENO"; then :
34224   gt_cv_func_unsetenv_ret='int'
34225 else
34226   gt_cv_func_unsetenv_ret='void'
34227 fi
34228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34229 fi
34230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
34231 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
34232     if test $gt_cv_func_unsetenv_ret = 'void'; then
34233
34234 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
34235
34236       REPLACE_UNSETENV=1
34237     fi
34238
34239                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
34240 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
34241 if ${gl_cv_func_unsetenv_works+:} false; then :
34242   $as_echo_n "(cached) " >&6
34243 else
34244   if test "$cross_compiling" = yes; then :
34245   case "$host_os" in
34246                  # Guess yes on glibc systems.
34247          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
34248                  # If we don't know, assume the worst.
34249          *)      gl_cv_func_unsetenv_works="guessing no" ;;
34250        esac
34251
34252 else
34253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34254 /* end confdefs.h.  */
34255
34256        #include <stdlib.h>
34257        #include <errno.h>
34258        extern char **environ;
34259
34260 int
34261 main ()
34262 {
34263
34264        char entry1[] = "a=1";
34265        char entry2[] = "b=2";
34266        char *env[] = { entry1, entry2, NULL };
34267        if (putenv ((char *) "a=1")) return 1;
34268        if (putenv (entry2)) return 2;
34269        entry2[0] = 'a';
34270        unsetenv ("a");
34271        if (getenv ("a")) return 3;
34272        if (!unsetenv ("") || errno != EINVAL) return 4;
34273        entry2[0] = 'b';
34274        environ = env;
34275        if (!getenv ("a")) return 5;
34276        entry2[0] = 'a';
34277        unsetenv ("a");
34278        if (getenv ("a")) return 6;
34279
34280   ;
34281   return 0;
34282 }
34283 _ACEOF
34284 if ac_fn_c_try_run "$LINENO"; then :
34285   gl_cv_func_unsetenv_works=yes
34286 else
34287   gl_cv_func_unsetenv_works=no
34288 fi
34289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34290   conftest.$ac_objext conftest.beam conftest.$ac_ext
34291 fi
34292
34293 fi
34294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
34295 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
34296     case "$gl_cv_func_unsetenv_works" in
34297       *yes) ;;
34298       *)
34299         REPLACE_UNSETENV=1
34300         ;;
34301     esac
34302   fi
34303
34304   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
34305
34306
34307
34308
34309
34310
34311
34312
34313   gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
34314
34315
34316
34317
34318
34319   fi
34320
34321
34322
34323
34324
34325           GNULIB_UNSETENV=1
34326
34327
34328
34329
34330
34331 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
34332
34333
34334
34335
34336
34337   if test $ac_cv_func_vasnprintf = no; then
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
34379
34380   if test $ac_cv_func_vasnprintf = yes; then
34381
34382 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
34383
34384   fi
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
34397 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
34398
34399 else
34400
34401 $as_echo "#define ptrdiff_t long" >>confdefs.h
34402
34403
34404 fi
34405
34406
34407
34408
34409
34410
34411
34412   fi
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429   gl_cv_func_vfprintf_posix=no
34430   case "$gl_cv_func_printf_sizes_c99" in
34431     *yes)
34432       case "$gl_cv_func_printf_long_double" in
34433         *yes)
34434           case "$gl_cv_func_printf_infinite" in
34435             *yes)
34436               case "$gl_cv_func_printf_infinite_long_double" in
34437                 *yes)
34438                   case "$gl_cv_func_printf_directive_a" in
34439                     *yes)
34440                       case "$gl_cv_func_printf_directive_f" in
34441                         *yes)
34442                           case "$gl_cv_func_printf_directive_n" in
34443                             *yes)
34444                               case "$gl_cv_func_printf_directive_ls" in
34445                                 *yes)
34446                                   case "$gl_cv_func_printf_positions" in
34447                                     *yes)
34448                                       case "$gl_cv_func_printf_flag_grouping" in
34449                                         *yes)
34450                                           case "$gl_cv_func_printf_flag_leftadjust" in
34451                                             *yes)
34452                                               case "$gl_cv_func_printf_flag_zero" in
34453                                                 *yes)
34454                                                   case "$gl_cv_func_printf_precision" in
34455                                                     *yes)
34456                                                       case "$gl_cv_func_printf_enomem" in
34457                                                         *yes)
34458                                                           # vfprintf exists and is
34459                                                           # already POSIX compliant.
34460                                                           gl_cv_func_vfprintf_posix=yes
34461                                                           ;;
34462                                                       esac
34463                                                       ;;
34464                                                   esac
34465                                                   ;;
34466                                               esac
34467                                               ;;
34468                                           esac
34469                                           ;;
34470                                       esac
34471                                       ;;
34472                                   esac
34473                                   ;;
34474                               esac
34475                               ;;
34476                           esac
34477                           ;;
34478                       esac
34479                       ;;
34480                   esac
34481                   ;;
34482               esac
34483               ;;
34484           esac
34485           ;;
34486       esac
34487       ;;
34488   esac
34489   if test $gl_cv_func_vfprintf_posix = no; then
34490
34491
34492
34493   case "$gl_cv_func_printf_infinite" in
34494     *yes)
34495       ;;
34496     *)
34497
34498 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
34499
34500       ;;
34501   esac
34502
34503
34504
34505
34506   case "$gl_cv_func_printf_long_double" in
34507     *yes)
34508       case "$gl_cv_func_printf_infinite_long_double" in
34509         *yes)
34510           ;;
34511         *)
34512
34513 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
34514
34515           ;;
34516       esac
34517       ;;
34518   esac
34519
34520
34521
34522   case "$gl_cv_func_printf_directive_a" in
34523     *yes)
34524       ;;
34525     *)
34526
34527 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
34528
34529       for ac_func in nl_langinfo
34530 do :
34531   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
34532 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
34533   cat >>confdefs.h <<_ACEOF
34534 #define HAVE_NL_LANGINFO 1
34535 _ACEOF
34536
34537 fi
34538 done
34539
34540       ;;
34541   esac
34542
34543
34544
34545   case "$gl_cv_func_printf_directive_f" in
34546     *yes)
34547       ;;
34548     *)
34549
34550 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
34551
34552       ;;
34553   esac
34554
34555
34556
34557   case "$gl_cv_func_printf_directive_ls" in
34558     *yes)
34559       ;;
34560     *)
34561
34562 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
34563
34564       ;;
34565   esac
34566
34567
34568
34569   case "$gl_cv_func_printf_flag_grouping" in
34570     *yes)
34571       ;;
34572     *)
34573
34574 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
34575
34576       ;;
34577   esac
34578
34579
34580
34581   case "$gl_cv_func_printf_flag_leftadjust" in
34582     *yes)
34583       ;;
34584     *)
34585
34586 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
34587
34588       ;;
34589   esac
34590
34591
34592
34593   case "$gl_cv_func_printf_flag_zero" in
34594     *yes)
34595       ;;
34596     *)
34597
34598 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
34599
34600       ;;
34601   esac
34602
34603
34604
34605   case "$gl_cv_func_printf_precision" in
34606     *yes)
34607       ;;
34608     *)
34609
34610 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
34611
34612
34613 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
34614
34615
34616 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
34617
34618       ;;
34619   esac
34620
34621
34622
34623   case "$gl_cv_func_printf_enomem" in
34624     *yes)
34625       ;;
34626     *)
34627
34628 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
34629
34630
34631 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
34632
34633
34634 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
34635
34636       ;;
34637   esac
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
34660
34661
34662
34663
34664
34665
34666
34667
34668
34669   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
34680
34681   if test $ac_cv_func_vasnprintf = yes; then
34682
34683 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
34684
34685   fi
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
34698 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
34699
34700 else
34701
34702 $as_echo "#define ptrdiff_t long" >>confdefs.h
34703
34704
34705 fi
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723   gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
34724
34725   REPLACE_VFPRINTF=1
34726
34727 $as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
34728
34729   :
34730
34731   fi
34732
34733
34734
34735
34736
34737
34738           GNULIB_VFPRINTF_POSIX=1
34739
34740
34741
34742
34743
34744 $as_echo "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h
34745
34746
34747
34748
34749
34750   gl_cv_func_vsnprintf_usable=no
34751   for ac_func in vsnprintf
34752 do :
34753   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
34754 if test "x$ac_cv_func_vsnprintf" = xyes; then :
34755   cat >>confdefs.h <<_ACEOF
34756 #define HAVE_VSNPRINTF 1
34757 _ACEOF
34758
34759 fi
34760 done
34761
34762   if test $ac_cv_func_vsnprintf = yes; then
34763
34764
34765
34766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
34767 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
34768 if ${gl_cv_func_snprintf_size1+:} false; then :
34769   $as_echo_n "(cached) " >&6
34770 else
34771
34772       if test "$cross_compiling" = yes; then :
34773   case "$host_os" in
34774                    # Guess yes on native Windows.
34775            mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
34776            *)      gl_cv_func_snprintf_size1="guessing yes" ;;
34777          esac
34778
34779 else
34780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34781 /* end confdefs.h.  */
34782
34783 #include <stdio.h>
34784 #if HAVE_SNPRINTF
34785 # define my_snprintf snprintf
34786 #else
34787 # include <stdarg.h>
34788 static int my_snprintf (char *buf, int size, const char *format, ...)
34789 {
34790   va_list args;
34791   int ret;
34792   va_start (args, format);
34793   ret = vsnprintf (buf, size, format, args);
34794   va_end (args);
34795   return ret;
34796 }
34797 #endif
34798 int main()
34799 {
34800   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
34801   my_snprintf (buf, 1, "%d", 12345);
34802   return buf[1] != 'E';
34803 }
34804 _ACEOF
34805 if ac_fn_c_try_run "$LINENO"; then :
34806   gl_cv_func_snprintf_size1=yes
34807 else
34808   gl_cv_func_snprintf_size1=no
34809 fi
34810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34811   conftest.$ac_objext conftest.beam conftest.$ac_ext
34812 fi
34813
34814
34815 fi
34816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
34817 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
34818
34819     case "$gl_cv_func_snprintf_size1" in
34820       *yes)
34821
34822         case "$gl_cv_func_snprintf_retval_c99" in
34823           *yes)
34824
34825
34826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
34827 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
34828 if ${gl_cv_func_printf_positions+:} false; then :
34829   $as_echo_n "(cached) " >&6
34830 else
34831
34832       if test "$cross_compiling" = yes; then :
34833
34834          case "$host_os" in
34835            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
34836                          gl_cv_func_printf_positions="guessing no";;
34837            beos*)        gl_cv_func_printf_positions="guessing no";;
34838                          # Guess no on native Windows.
34839            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
34840            *)            gl_cv_func_printf_positions="guessing yes";;
34841          esac
34842
34843 else
34844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34845 /* end confdefs.h.  */
34846
34847 #include <stdio.h>
34848 #include <string.h>
34849 /* The string "%2$d %1$d", with dollar characters protected from the shell's
34850    dollar expansion (possibly an autoconf bug).  */
34851 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
34852 static char buf[100];
34853 int main ()
34854 {
34855   sprintf (buf, format, 33, 55);
34856   return (strcmp (buf, "55 33") != 0);
34857 }
34858 _ACEOF
34859 if ac_fn_c_try_run "$LINENO"; then :
34860   gl_cv_func_printf_positions=yes
34861 else
34862   gl_cv_func_printf_positions=no
34863 fi
34864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34865   conftest.$ac_objext conftest.beam conftest.$ac_ext
34866 fi
34867
34868
34869 fi
34870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
34871 $as_echo "$gl_cv_func_printf_positions" >&6; }
34872
34873             case "$gl_cv_func_printf_positions" in
34874               *yes)
34875                 gl_cv_func_vsnprintf_usable=yes
34876                 ;;
34877             esac
34878             ;;
34879         esac
34880         ;;
34881     esac
34882   fi
34883   if test $gl_cv_func_vsnprintf_usable = no; then
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894   gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
34895
34896   if test $ac_cv_func_vsnprintf = yes; then
34897     REPLACE_VSNPRINTF=1
34898   else
34899
34900     if test $ac_cv_have_decl_vsnprintf = yes; then
34901                         REPLACE_VSNPRINTF=1
34902     fi
34903   fi
34904   :
34905
34906   fi
34907
34908   if test $ac_cv_have_decl_vsnprintf = no; then
34909     HAVE_DECL_VSNPRINTF=0
34910   fi
34911
34912
34913
34914
34915
34916
34917           GNULIB_VSNPRINTF=1
34918
34919
34920
34921
34922
34923 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942   gl_cv_func_vsnprintf_posix=no
34943   for ac_func in vsnprintf
34944 do :
34945   ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
34946 if test "x$ac_cv_func_vsnprintf" = xyes; then :
34947   cat >>confdefs.h <<_ACEOF
34948 #define HAVE_VSNPRINTF 1
34949 _ACEOF
34950
34951 fi
34952 done
34953
34954   if test $ac_cv_func_vsnprintf = yes; then
34955
34956
34957
34958   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
34959 $as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
34960 if ${gl_cv_func_snprintf_truncation_c99+:} false; then :
34961   $as_echo_n "(cached) " >&6
34962 else
34963
34964       if test "$cross_compiling" = yes; then :
34965
34966          case "$host_os" in
34967                                  # Guess yes on glibc systems.
34968            *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
34969                                  # Guess yes on FreeBSD >= 5.
34970            freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
34971            freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
34972                                  # Guess yes on Mac OS X >= 10.3.
34973            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
34974            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
34975                                  # Guess yes on OpenBSD >= 3.9.
34976            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
34977                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
34978            openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
34979                                  # Guess yes on Solaris >= 2.6.
34980            solaris2.[0-5] | solaris2.[0-5].*)
34981                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
34982            solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
34983                                  # Guess yes on AIX >= 4.
34984            aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
34985            aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
34986                                  # Guess yes on HP-UX >= 11.
34987            hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
34988            hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
34989                                  # Guess yes on IRIX >= 6.5.
34990            irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
34991                                  # Guess yes on OSF/1 >= 5.
34992            osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
34993            osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
34994                                  # Guess yes on NetBSD >= 3.
34995            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
34996                                  gl_cv_func_snprintf_truncation_c99="guessing no";;
34997            netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
34998                                  # Guess yes on BeOS.
34999            beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
35000                                  # Guess no on native Windows.
35001            mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
35002                                  # If we don't know, assume the worst.
35003            *)                    gl_cv_func_snprintf_truncation_c99="guessing no";;
35004          esac
35005
35006 else
35007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35008 /* end confdefs.h.  */
35009
35010 #include <stdio.h>
35011 #include <string.h>
35012 #if HAVE_SNPRINTF
35013 # define my_snprintf snprintf
35014 #else
35015 # include <stdarg.h>
35016 static int my_snprintf (char *buf, int size, const char *format, ...)
35017 {
35018   va_list args;
35019   int ret;
35020   va_start (args, format);
35021   ret = vsnprintf (buf, size, format, args);
35022   va_end (args);
35023   return ret;
35024 }
35025 #endif
35026 static char buf[100];
35027 int main ()
35028 {
35029   strcpy (buf, "ABCDEF");
35030   my_snprintf (buf, 3, "%d %d", 4567, 89);
35031   if (memcmp (buf, "45\0DEF", 6) != 0)
35032     return 1;
35033   return 0;
35034 }
35035 _ACEOF
35036 if ac_fn_c_try_run "$LINENO"; then :
35037   gl_cv_func_snprintf_truncation_c99=yes
35038 else
35039   gl_cv_func_snprintf_truncation_c99=no
35040 fi
35041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35042   conftest.$ac_objext conftest.beam conftest.$ac_ext
35043 fi
35044
35045
35046 fi
35047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
35048 $as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
35049
35050
35051
35052
35053
35054   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
35055 $as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
35056 if ${gl_cv_func_snprintf_directive_n+:} false; then :
35057   $as_echo_n "(cached) " >&6
35058 else
35059
35060       if test "$cross_compiling" = yes; then :
35061
35062          case "$host_os" in
35063                                  # Guess yes on glibc systems.
35064            *-gnu* | gnu*)        gl_cv_func_snprintf_directive_n="guessing yes";;
35065                                  # Guess yes on FreeBSD >= 5.
35066            freebsd[1-4].*)       gl_cv_func_snprintf_directive_n="guessing no";;
35067            freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
35068                                  # Guess yes on Mac OS X >= 10.3.
35069            darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
35070            darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
35071                                  # Guess yes on Solaris >= 2.6.
35072            solaris2.[0-5] | solaris2.[0-5].*)
35073                                  gl_cv_func_snprintf_directive_n="guessing no";;
35074            solaris*)             gl_cv_func_snprintf_directive_n="guessing yes";;
35075                                  # Guess yes on AIX >= 4.
35076            aix[1-3]*)            gl_cv_func_snprintf_directive_n="guessing no";;
35077            aix*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
35078                                  # Guess yes on IRIX >= 6.5.
35079            irix6.5)              gl_cv_func_snprintf_directive_n="guessing yes";;
35080                                  # Guess yes on OSF/1 >= 5.
35081            osf[3-4]*)            gl_cv_func_snprintf_directive_n="guessing no";;
35082            osf*)                 gl_cv_func_snprintf_directive_n="guessing yes";;
35083                                  # Guess yes on NetBSD >= 3.
35084            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
35085                                  gl_cv_func_snprintf_directive_n="guessing no";;
35086            netbsd*)              gl_cv_func_snprintf_directive_n="guessing yes";;
35087                                  # Guess yes on BeOS.
35088            beos*)                gl_cv_func_snprintf_directive_n="guessing yes";;
35089                                  # Guess no on native Windows.
35090            mingw*)               gl_cv_func_snprintf_directive_n="guessing no";;
35091                                  # If we don't know, assume the worst.
35092            *)                    gl_cv_func_snprintf_directive_n="guessing no";;
35093          esac
35094
35095 else
35096   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35097 /* end confdefs.h.  */
35098
35099 #include <stdio.h>
35100 #include <string.h>
35101 #if HAVE_SNPRINTF
35102 # define my_snprintf snprintf
35103 #else
35104 # include <stdarg.h>
35105 static int my_snprintf (char *buf, int size, const char *format, ...)
35106 {
35107   va_list args;
35108   int ret;
35109   va_start (args, format);
35110   ret = vsnprintf (buf, size, format, args);
35111   va_end (args);
35112   return ret;
35113 }
35114 #endif
35115 static char fmtstring[10];
35116 static char buf[100];
35117 int main ()
35118 {
35119   int count = -1;
35120   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
35121      support %n in format strings in read-only memory but not in writable
35122      memory.  */
35123   strcpy (fmtstring, "%d %n");
35124   my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
35125   if (count != 6)
35126     return 1;
35127   return 0;
35128 }
35129 _ACEOF
35130 if ac_fn_c_try_run "$LINENO"; then :
35131   gl_cv_func_snprintf_directive_n=yes
35132 else
35133   gl_cv_func_snprintf_directive_n=no
35134 fi
35135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35136   conftest.$ac_objext conftest.beam conftest.$ac_ext
35137 fi
35138
35139
35140 fi
35141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
35142 $as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
35143
35144
35145
35146
35147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
35148 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
35149 if ${gl_cv_func_snprintf_size1+:} false; then :
35150   $as_echo_n "(cached) " >&6
35151 else
35152
35153       if test "$cross_compiling" = yes; then :
35154   case "$host_os" in
35155                    # Guess yes on native Windows.
35156            mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
35157            *)      gl_cv_func_snprintf_size1="guessing yes" ;;
35158          esac
35159
35160 else
35161   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35162 /* end confdefs.h.  */
35163
35164 #include <stdio.h>
35165 #if HAVE_SNPRINTF
35166 # define my_snprintf snprintf
35167 #else
35168 # include <stdarg.h>
35169 static int my_snprintf (char *buf, int size, const char *format, ...)
35170 {
35171   va_list args;
35172   int ret;
35173   va_start (args, format);
35174   ret = vsnprintf (buf, size, format, args);
35175   va_end (args);
35176   return ret;
35177 }
35178 #endif
35179 int main()
35180 {
35181   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35182   my_snprintf (buf, 1, "%d", 12345);
35183   return buf[1] != 'E';
35184 }
35185 _ACEOF
35186 if ac_fn_c_try_run "$LINENO"; then :
35187   gl_cv_func_snprintf_size1=yes
35188 else
35189   gl_cv_func_snprintf_size1=no
35190 fi
35191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35192   conftest.$ac_objext conftest.beam conftest.$ac_ext
35193 fi
35194
35195
35196 fi
35197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
35198 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
35199
35200
35201
35202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
35203 $as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
35204 if ${gl_cv_func_vsnprintf_zerosize_c99+:} false; then :
35205   $as_echo_n "(cached) " >&6
35206 else
35207
35208       if test "$cross_compiling" = yes; then :
35209
35210          case "$host_os" in
35211                                  # Guess yes on glibc systems.
35212            *-gnu* | gnu*)        gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35213                                  # Guess yes on FreeBSD >= 5.
35214            freebsd[1-4].*)       gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35215            freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35216                                  # Guess yes on Mac OS X >= 10.3.
35217            darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35218            darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35219                                  # Guess yes on Cygwin.
35220            cygwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35221                                  # Guess yes on Solaris >= 2.6.
35222            solaris2.[0-5] | solaris2.[0-5].*)
35223                                  gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35224            solaris*)             gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35225                                  # Guess yes on AIX >= 4.
35226            aix[1-3]*)            gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35227            aix*)                 gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35228                                  # Guess yes on IRIX >= 6.5.
35229            irix6.5)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35230                                  # Guess yes on NetBSD >= 3.
35231            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
35232                                  gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35233            netbsd*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35234                                  # Guess yes on BeOS.
35235            beos*)                gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35236                                  # Guess yes on native Windows.
35237            mingw* | pw*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
35238                                  # If we don't know, assume the worst.
35239            *)                    gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
35240          esac
35241
35242 else
35243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35244 /* end confdefs.h.  */
35245
35246 #include <stdarg.h>
35247 #include <stdio.h>
35248 static int my_snprintf (char *buf, int size, const char *format, ...)
35249 {
35250   va_list args;
35251   int ret;
35252   va_start (args, format);
35253   ret = vsnprintf (buf, size, format, args);
35254   va_end (args);
35255   return ret;
35256 }
35257 int main()
35258 {
35259   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35260   my_snprintf (buf, 0, "%d", 12345);
35261   return buf[0] != 'D';
35262 }
35263 _ACEOF
35264 if ac_fn_c_try_run "$LINENO"; then :
35265   gl_cv_func_vsnprintf_zerosize_c99=yes
35266 else
35267   gl_cv_func_vsnprintf_zerosize_c99=no
35268 fi
35269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35270   conftest.$ac_objext conftest.beam conftest.$ac_ext
35271 fi
35272
35273
35274 fi
35275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
35276 $as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
35277
35278     case "$gl_cv_func_printf_sizes_c99" in
35279       *yes)
35280         case "$gl_cv_func_printf_long_double" in
35281           *yes)
35282             case "$gl_cv_func_printf_infinite" in
35283               *yes)
35284                 case "$gl_cv_func_printf_infinite_long_double" in
35285                   *yes)
35286                     case "$gl_cv_func_printf_directive_a" in
35287                       *yes)
35288                         case "$gl_cv_func_printf_directive_f" in
35289                           *yes)
35290                             case "$gl_cv_func_printf_directive_n" in
35291                               *yes)
35292                                 case "$gl_cv_func_printf_directive_ls" in
35293                                   *yes)
35294                                     case "$gl_cv_func_printf_positions" in
35295                                       *yes)
35296                                         case "$gl_cv_func_printf_flag_grouping" in
35297                                           *yes)
35298                                             case "$gl_cv_func_printf_flag_leftadjust" in
35299                                               *yes)
35300                                                 case "$gl_cv_func_printf_flag_zero" in
35301                                                   *yes)
35302                                                     case "$gl_cv_func_printf_precision" in
35303                                                       *yes)
35304                                                         case "$gl_cv_func_printf_enomem" in
35305                                                           *yes)
35306                                                             case "$gl_cv_func_snprintf_truncation_c99" in
35307                                                               *yes)
35308                                                                 case "$gl_cv_func_snprintf_retval_c99" in
35309                                                                   *yes)
35310                                                                     case "$gl_cv_func_snprintf_directive_n" in
35311                                                                       *yes)
35312                                                                         case "$gl_cv_func_snprintf_size1" in
35313                                                                           *yes)
35314                                                                             case "$gl_cv_func_vsnprintf_zerosize_c99" in
35315                                                                               *yes)
35316                                                                                 # vsnprintf exists and is
35317                                                                                 # already POSIX compliant.
35318                                                                                 gl_cv_func_vsnprintf_posix=yes
35319                                                                                 ;;
35320                                                                             esac
35321                                                                             ;;
35322                                                                         esac
35323                                                                         ;;
35324                                                                     esac
35325                                                                     ;;
35326                                                                 esac
35327                                                                 ;;
35328                                                             esac
35329                                                             ;;
35330                                                         esac
35331                                                         ;;
35332                                                     esac
35333                                                     ;;
35334                                                 esac
35335                                                 ;;
35336                                             esac
35337                                             ;;
35338                                         esac
35339                                         ;;
35340                                     esac
35341                                     ;;
35342                                 esac
35343                                 ;;
35344                             esac
35345                             ;;
35346                         esac
35347                         ;;
35348                     esac
35349                     ;;
35350                 esac
35351                 ;;
35352             esac
35353             ;;
35354         esac
35355         ;;
35356     esac
35357   fi
35358   if test $gl_cv_func_vsnprintf_posix = no; then
35359
35360
35361
35362   case "$gl_cv_func_printf_infinite" in
35363     *yes)
35364       ;;
35365     *)
35366
35367 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
35368
35369       ;;
35370   esac
35371
35372
35373
35374
35375   case "$gl_cv_func_printf_long_double" in
35376     *yes)
35377       case "$gl_cv_func_printf_infinite_long_double" in
35378         *yes)
35379           ;;
35380         *)
35381
35382 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
35383
35384           ;;
35385       esac
35386       ;;
35387   esac
35388
35389
35390
35391   case "$gl_cv_func_printf_directive_a" in
35392     *yes)
35393       ;;
35394     *)
35395
35396 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
35397
35398       for ac_func in nl_langinfo
35399 do :
35400   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35401 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
35402   cat >>confdefs.h <<_ACEOF
35403 #define HAVE_NL_LANGINFO 1
35404 _ACEOF
35405
35406 fi
35407 done
35408
35409       ;;
35410   esac
35411
35412
35413
35414   case "$gl_cv_func_printf_directive_f" in
35415     *yes)
35416       ;;
35417     *)
35418
35419 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
35420
35421       ;;
35422   esac
35423
35424
35425
35426   case "$gl_cv_func_printf_directive_ls" in
35427     *yes)
35428       ;;
35429     *)
35430
35431 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
35432
35433       ;;
35434   esac
35435
35436
35437
35438   case "$gl_cv_func_printf_flag_grouping" in
35439     *yes)
35440       ;;
35441     *)
35442
35443 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
35444
35445       ;;
35446   esac
35447
35448
35449
35450   case "$gl_cv_func_printf_flag_leftadjust" in
35451     *yes)
35452       ;;
35453     *)
35454
35455 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
35456
35457       ;;
35458   esac
35459
35460
35461
35462   case "$gl_cv_func_printf_flag_zero" in
35463     *yes)
35464       ;;
35465     *)
35466
35467 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
35468
35469       ;;
35470   esac
35471
35472
35473
35474   case "$gl_cv_func_printf_precision" in
35475     *yes)
35476       ;;
35477     *)
35478
35479 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
35480
35481
35482 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35483
35484
35485 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35486
35487       ;;
35488   esac
35489
35490
35491
35492   case "$gl_cv_func_printf_enomem" in
35493     *yes)
35494       ;;
35495     *)
35496
35497 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
35498
35499
35500 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35501
35502
35503 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35504
35505       ;;
35506   esac
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
35549
35550   if test $ac_cv_func_vasnprintf = yes; then
35551
35552 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
35553
35554   fi
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
35567 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
35568
35569 else
35570
35571 $as_echo "#define ptrdiff_t long" >>confdefs.h
35572
35573
35574 fi
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592   gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
35593
35594   if test $ac_cv_func_vsnprintf = yes; then
35595     REPLACE_VSNPRINTF=1
35596   else
35597
35598     if test $ac_cv_have_decl_vsnprintf = yes; then
35599                         REPLACE_VSNPRINTF=1
35600     fi
35601   fi
35602   :
35603
35604   fi
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621   gl_cv_func_vsprintf_posix=no
35622   case "$gl_cv_func_printf_sizes_c99" in
35623     *yes)
35624       case "$gl_cv_func_printf_long_double" in
35625         *yes)
35626           case "$gl_cv_func_printf_infinite" in
35627             *yes)
35628               case "$gl_cv_func_printf_infinite_long_double" in
35629                 *yes)
35630                   case "$gl_cv_func_printf_directive_a" in
35631                     *yes)
35632                       case "$gl_cv_func_printf_directive_f" in
35633                         *yes)
35634                           case "$gl_cv_func_printf_directive_n" in
35635                             *yes)
35636                               case "$gl_cv_func_printf_directive_ls" in
35637                                 *yes)
35638                                   case "$gl_cv_func_printf_positions" in
35639                                     *yes)
35640                                       case "$gl_cv_func_printf_flag_grouping" in
35641                                         *yes)
35642                                           case "$gl_cv_func_printf_flag_leftadjust" in
35643                                             *yes)
35644                                               case "$gl_cv_func_printf_flag_zero" in
35645                                                 *yes)
35646                                                   case "$gl_cv_func_printf_precision" in
35647                                                     *yes)
35648                                                       case "$gl_cv_func_printf_enomem" in
35649                                                         *yes)
35650                                                           # vsprintf exists and is
35651                                                           # already POSIX compliant.
35652                                                           gl_cv_func_vsprintf_posix=yes
35653                                                           ;;
35654                                                       esac
35655                                                       ;;
35656                                                   esac
35657                                                   ;;
35658                                               esac
35659                                               ;;
35660                                           esac
35661                                           ;;
35662                                       esac
35663                                       ;;
35664                                   esac
35665                                   ;;
35666                               esac
35667                               ;;
35668                           esac
35669                           ;;
35670                       esac
35671                       ;;
35672                   esac
35673                   ;;
35674               esac
35675               ;;
35676           esac
35677           ;;
35678       esac
35679       ;;
35680   esac
35681   if test $gl_cv_func_vsprintf_posix = no; then
35682
35683
35684
35685   case "$gl_cv_func_printf_infinite" in
35686     *yes)
35687       ;;
35688     *)
35689
35690 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
35691
35692       ;;
35693   esac
35694
35695
35696
35697
35698   case "$gl_cv_func_printf_long_double" in
35699     *yes)
35700       case "$gl_cv_func_printf_infinite_long_double" in
35701         *yes)
35702           ;;
35703         *)
35704
35705 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
35706
35707           ;;
35708       esac
35709       ;;
35710   esac
35711
35712
35713
35714   case "$gl_cv_func_printf_directive_a" in
35715     *yes)
35716       ;;
35717     *)
35718
35719 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
35720
35721       for ac_func in nl_langinfo
35722 do :
35723   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
35724 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
35725   cat >>confdefs.h <<_ACEOF
35726 #define HAVE_NL_LANGINFO 1
35727 _ACEOF
35728
35729 fi
35730 done
35731
35732       ;;
35733   esac
35734
35735
35736
35737   case "$gl_cv_func_printf_directive_f" in
35738     *yes)
35739       ;;
35740     *)
35741
35742 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
35743
35744       ;;
35745   esac
35746
35747
35748
35749   case "$gl_cv_func_printf_directive_ls" in
35750     *yes)
35751       ;;
35752     *)
35753
35754 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
35755
35756       ;;
35757   esac
35758
35759
35760
35761   case "$gl_cv_func_printf_flag_grouping" in
35762     *yes)
35763       ;;
35764     *)
35765
35766 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
35767
35768       ;;
35769   esac
35770
35771
35772
35773   case "$gl_cv_func_printf_flag_leftadjust" in
35774     *yes)
35775       ;;
35776     *)
35777
35778 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
35779
35780       ;;
35781   esac
35782
35783
35784
35785   case "$gl_cv_func_printf_flag_zero" in
35786     *yes)
35787       ;;
35788     *)
35789
35790 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
35791
35792       ;;
35793   esac
35794
35795
35796
35797   case "$gl_cv_func_printf_precision" in
35798     *yes)
35799       ;;
35800     *)
35801
35802 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
35803
35804
35805 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35806
35807
35808 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35809
35810       ;;
35811   esac
35812
35813
35814
35815   case "$gl_cv_func_printf_enomem" in
35816     *yes)
35817       ;;
35818     *)
35819
35820 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
35821
35822
35823 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
35824
35825
35826 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
35827
35828       ;;
35829   esac
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841   gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
35842
35843
35844
35845
35846
35847
35848
35849
35850
35851   gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861   gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871   gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
35872
35873   if test $ac_cv_func_vasnprintf = yes; then
35874
35875 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
35876
35877   fi
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
35890 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
35891
35892 else
35893
35894 $as_echo "#define ptrdiff_t long" >>confdefs.h
35895
35896
35897 fi
35898
35899
35900
35901
35902
35903
35904
35905
35906
35907
35908
35909
35910
35911
35912
35913
35914
35915   gl_LIBOBJS="$gl_LIBOBJS vsprintf.$ac_objext"
35916
35917   REPLACE_VSPRINTF=1
35918   :
35919
35920   fi
35921
35922
35923
35924
35925
35926
35927           GNULIB_VSPRINTF_POSIX=1
35928
35929
35930
35931
35932
35933 $as_echo "#define GNULIB_TEST_VSPRINTF_POSIX 1" >>confdefs.h
35934
35935
35936
35937
35938
35939   for ac_func in waitid
35940 do :
35941   ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
35942 if test "x$ac_cv_func_waitid" = xyes; then :
35943   cat >>confdefs.h <<_ACEOF
35944 #define HAVE_WAITID 1
35945 _ACEOF
35946
35947 fi
35948 done
35949
35950
35951
35952
35953   HAVE_WAITPID=1
35954   case $host_os in
35955     mingw*) HAVE_WAITPID=0 ;;
35956   esac
35957
35958   if test $HAVE_WAITPID = 0; then
35959
35960
35961
35962
35963
35964
35965
35966
35967   gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
35968
35969   fi
35970
35971
35972
35973
35974
35975           GNULIB_WAITPID=1
35976
35977
35978
35979
35980
35981 $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997      if test $gl_cv_have_include_next = yes; then
35998        gl_cv_next_wchar_h='<'wchar.h'>'
35999      else
36000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
36001 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
36002 if ${gl_cv_next_wchar_h+:} false; then :
36003   $as_echo_n "(cached) " >&6
36004 else
36005
36006              if test $ac_cv_header_wchar_h = yes; then
36007
36008
36009
36010
36011   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36012 /* end confdefs.h.  */
36013 #include <wchar.h>
36014 _ACEOF
36015                 case "$host_os" in
36016     aix*) gl_absname_cpp="$ac_cpp -C" ;;
36017     *)    gl_absname_cpp="$ac_cpp" ;;
36018   esac
36019
36020   case "$host_os" in
36021     mingw*)
36022                                           gl_dirsep_regex='[/\\]'
36023       ;;
36024     *)
36025       gl_dirsep_regex='\/'
36026       ;;
36027   esac
36028       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36029   gl_header_literal_regex=`echo 'wchar.h' \
36030                            | sed -e "$gl_make_literal_regex_sed"`
36031   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36032       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36033       s|^/[^/]|//&|
36034       p
36035       q
36036     }'
36037
36038         gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36039   sed -n "$gl_absolute_header_sed"`
36040
36041            gl_header=$gl_cv_absolute_wchar_h
36042            gl_cv_next_wchar_h='"'$gl_header'"'
36043           else
36044                gl_cv_next_wchar_h='<'wchar.h'>'
36045              fi
36046
36047
36048 fi
36049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
36050 $as_echo "$gl_cv_next_wchar_h" >&6; }
36051      fi
36052      NEXT_WCHAR_H=$gl_cv_next_wchar_h
36053
36054      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36055        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36056        gl_next_as_first_directive='<'wchar.h'>'
36057      else
36058        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36059        gl_next_as_first_directive=$gl_cv_next_wchar_h
36060      fi
36061      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
36062
36063
36064
36065
36066   if test $ac_cv_header_wchar_h = yes; then
36067     HAVE_WCHAR_H=1
36068   else
36069     HAVE_WCHAR_H=0
36070   fi
36071
36072
36073
36074
36075
36076   if test $gt_cv_c_wint_t = yes; then
36077     HAVE_WINT_T=1
36078   else
36079     HAVE_WINT_T=0
36080   fi
36081
36082
36083
36084
36085
36086     for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime     ; do
36087     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36089 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36090 if eval \${$as_gl_Symbol+:} false; then :
36091   $as_echo_n "(cached) " >&6
36092 else
36093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36094 /* end confdefs.h.  */
36095
36096 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36097    <wchar.h>.
36098    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
36099    included before <wchar.h>.  */
36100 #if !(defined __GLIBC__ && !defined __UCLIBC__)
36101 # include <stddef.h>
36102 # include <stdio.h>
36103 # include <time.h>
36104 #endif
36105 #include <wchar.h>
36106
36107 int
36108 main ()
36109 {
36110 #undef $gl_func
36111   (void) $gl_func;
36112   ;
36113   return 0;
36114 }
36115 _ACEOF
36116 if ac_fn_c_try_compile "$LINENO"; then :
36117   eval "$as_gl_Symbol=yes"
36118 else
36119   eval "$as_gl_Symbol=no"
36120 fi
36121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36122 fi
36123 eval ac_res=\$$as_gl_Symbol
36124                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36125 $as_echo "$ac_res" >&6; }
36126     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
36127   cat >>confdefs.h <<_ACEOF
36128 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
36129 _ACEOF
36130
36131                      eval ac_cv_have_decl_$gl_func=yes
36132 fi
36133       done
36134
36135
36136
36137
36138
36139
36140
36141   if test $ac_cv_func_iswcntrl = yes; then
36142     HAVE_ISWCNTRL=1
36143   else
36144     HAVE_ISWCNTRL=0
36145   fi
36146
36147
36148
36149   if test $gt_cv_c_wint_t = yes; then
36150     HAVE_WINT_T=1
36151   else
36152     HAVE_WINT_T=0
36153   fi
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167      if test $gl_cv_have_include_next = yes; then
36168        gl_cv_next_wctype_h='<'wctype.h'>'
36169      else
36170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
36171 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
36172 if ${gl_cv_next_wctype_h+:} false; then :
36173   $as_echo_n "(cached) " >&6
36174 else
36175
36176              if test $ac_cv_header_wctype_h = yes; then
36177
36178
36179
36180
36181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36182 /* end confdefs.h.  */
36183 #include <wctype.h>
36184 _ACEOF
36185                 case "$host_os" in
36186     aix*) gl_absname_cpp="$ac_cpp -C" ;;
36187     *)    gl_absname_cpp="$ac_cpp" ;;
36188   esac
36189
36190   case "$host_os" in
36191     mingw*)
36192                                           gl_dirsep_regex='[/\\]'
36193       ;;
36194     *)
36195       gl_dirsep_regex='\/'
36196       ;;
36197   esac
36198       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36199   gl_header_literal_regex=`echo 'wctype.h' \
36200                            | sed -e "$gl_make_literal_regex_sed"`
36201   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36202       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36203       s|^/[^/]|//&|
36204       p
36205       q
36206     }'
36207
36208         gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36209   sed -n "$gl_absolute_header_sed"`
36210
36211            gl_header=$gl_cv_absolute_wctype_h
36212            gl_cv_next_wctype_h='"'$gl_header'"'
36213           else
36214                gl_cv_next_wctype_h='<'wctype.h'>'
36215              fi
36216
36217
36218 fi
36219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
36220 $as_echo "$gl_cv_next_wctype_h" >&6; }
36221      fi
36222      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
36223
36224      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36225        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36226        gl_next_as_first_directive='<'wctype.h'>'
36227      else
36228        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36229        gl_next_as_first_directive=$gl_cv_next_wctype_h
36230      fi
36231      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
36232
36233
36234
36235
36236   if test $ac_cv_header_wctype_h = yes; then
36237     if test $ac_cv_func_iswcntrl = yes; then
36238                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
36239 $as_echo_n "checking whether iswcntrl works... " >&6; }
36240 if ${gl_cv_func_iswcntrl_works+:} false; then :
36241   $as_echo_n "(cached) " >&6
36242 else
36243
36244           if test "$cross_compiling" = yes; then :
36245                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36246 /* end confdefs.h.  */
36247 #include <stdlib.h>
36248                           #if __GNU_LIBRARY__ == 1
36249                           Linux libc5 i18n is broken.
36250                           #endif
36251 int
36252 main ()
36253 {
36254
36255   ;
36256   return 0;
36257 }
36258 _ACEOF
36259 if ac_fn_c_try_compile "$LINENO"; then :
36260   gl_cv_func_iswcntrl_works="guessing yes"
36261 else
36262   gl_cv_func_iswcntrl_works="guessing no"
36263 fi
36264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36265
36266 else
36267   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36268 /* end confdefs.h.  */
36269
36270                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36271                   included before <wchar.h>.
36272                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36273                   must be included before <wchar.h>.  */
36274                #include <stddef.h>
36275                #include <stdio.h>
36276                #include <time.h>
36277                #include <wchar.h>
36278                #include <wctype.h>
36279                int main () { return iswprint ('x') == 0; }
36280
36281 _ACEOF
36282 if ac_fn_c_try_run "$LINENO"; then :
36283   gl_cv_func_iswcntrl_works=yes
36284 else
36285   gl_cv_func_iswcntrl_works=no
36286 fi
36287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36288   conftest.$ac_objext conftest.beam conftest.$ac_ext
36289 fi
36290
36291
36292 fi
36293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
36294 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
36295     fi
36296     HAVE_WCTYPE_H=1
36297   else
36298     HAVE_WCTYPE_H=0
36299   fi
36300
36301
36302   case "$gl_cv_func_iswcntrl_works" in
36303     *yes) REPLACE_ISWCNTRL=0 ;;
36304     *)    REPLACE_ISWCNTRL=1 ;;
36305   esac
36306
36307
36308   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
36309         :
36310   fi
36311
36312   if test $REPLACE_ISWCNTRL = 1; then
36313     REPLACE_TOWLOWER=1
36314   else
36315     for ac_func in towlower
36316 do :
36317   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
36318 if test "x$ac_cv_func_towlower" = xyes; then :
36319   cat >>confdefs.h <<_ACEOF
36320 #define HAVE_TOWLOWER 1
36321 _ACEOF
36322
36323 fi
36324 done
36325
36326     if test $ac_cv_func_towlower = yes; then
36327       REPLACE_TOWLOWER=0
36328     else
36329       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36330              included before <wchar.h>.
36331              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36332              must be included before <wchar.h>.  */
36333           #include <stddef.h>
36334           #include <stdio.h>
36335           #include <time.h>
36336           #include <wchar.h>
36337           #if HAVE_WCTYPE_H
36338           # include <wctype.h>
36339           #endif
36340
36341 "
36342 if test "x$ac_cv_have_decl_towlower" = xyes; then :
36343   ac_have_decl=1
36344 else
36345   ac_have_decl=0
36346 fi
36347
36348 cat >>confdefs.h <<_ACEOF
36349 #define HAVE_DECL_TOWLOWER $ac_have_decl
36350 _ACEOF
36351
36352       if test $ac_cv_have_decl_towlower = yes; then
36353                                 REPLACE_TOWLOWER=1
36354       else
36355         REPLACE_TOWLOWER=0
36356       fi
36357     fi
36358   fi
36359
36360
36361   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
36362         :
36363   fi
36364
36365           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
36366 $as_echo_n "checking for wctype_t... " >&6; }
36367 if ${gl_cv_type_wctype_t+:} false; then :
36368   $as_echo_n "(cached) " >&6
36369 else
36370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36371 /* end confdefs.h.  */
36372 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36373                included before <wchar.h>.
36374                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36375                must be included before <wchar.h>.  */
36376             #include <stddef.h>
36377             #include <stdio.h>
36378             #include <time.h>
36379             #include <wchar.h>
36380             #if HAVE_WCTYPE_H
36381             # include <wctype.h>
36382             #endif
36383             wctype_t a;
36384
36385 int
36386 main ()
36387 {
36388
36389   ;
36390   return 0;
36391 }
36392 _ACEOF
36393 if ac_fn_c_try_compile "$LINENO"; then :
36394   gl_cv_type_wctype_t=yes
36395 else
36396   gl_cv_type_wctype_t=no
36397 fi
36398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36399
36400 fi
36401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
36402 $as_echo "$gl_cv_type_wctype_t" >&6; }
36403   if test $gl_cv_type_wctype_t = no; then
36404     HAVE_WCTYPE_T=0
36405   fi
36406
36407       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
36408 $as_echo_n "checking for wctrans_t... " >&6; }
36409 if ${gl_cv_type_wctrans_t+:} false; then :
36410   $as_echo_n "(cached) " >&6
36411 else
36412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36413 /* end confdefs.h.  */
36414 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
36415                included before <wchar.h>.
36416                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
36417                must be included before <wchar.h>.  */
36418             #include <stddef.h>
36419             #include <stdio.h>
36420             #include <time.h>
36421             #include <wchar.h>
36422             #include <wctype.h>
36423             wctrans_t a;
36424
36425 int
36426 main ()
36427 {
36428
36429   ;
36430   return 0;
36431 }
36432 _ACEOF
36433 if ac_fn_c_try_compile "$LINENO"; then :
36434   gl_cv_type_wctrans_t=yes
36435 else
36436   gl_cv_type_wctrans_t=no
36437 fi
36438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36439
36440 fi
36441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
36442 $as_echo "$gl_cv_type_wctrans_t" >&6; }
36443   if test $gl_cv_type_wctrans_t = no; then
36444     HAVE_WCTRANS_T=0
36445   fi
36446
36447
36448     for gl_func in wctype iswctype wctrans towctrans     ; do
36449     as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36451 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36452 if eval \${$as_gl_Symbol+:} false; then :
36453   $as_echo_n "(cached) " >&6
36454 else
36455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36456 /* end confdefs.h.  */
36457
36458 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36459    <wchar.h>.
36460    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
36461    included before <wchar.h>.  */
36462 #if !(defined __GLIBC__ && !defined __UCLIBC__)
36463 # include <stddef.h>
36464 # include <stdio.h>
36465 # include <time.h>
36466 # include <wchar.h>
36467 #endif
36468 #include <wctype.h>
36469
36470 int
36471 main ()
36472 {
36473 #undef $gl_func
36474   (void) $gl_func;
36475   ;
36476   return 0;
36477 }
36478 _ACEOF
36479 if ac_fn_c_try_compile "$LINENO"; then :
36480   eval "$as_gl_Symbol=yes"
36481 else
36482   eval "$as_gl_Symbol=no"
36483 fi
36484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36485 fi
36486 eval ac_res=\$$as_gl_Symbol
36487                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36488 $as_echo "$ac_res" >&6; }
36489     if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
36490   cat >>confdefs.h <<_ACEOF
36491 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
36492 _ACEOF
36493
36494                      eval ac_cv_have_decl_$gl_func=yes
36495 fi
36496       done
36497
36498
36499
36500
36501
36502
36503
36504
36505
36506
36507
36508
36509
36510   ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
36511 /* AIX 3.2.5 declares wcwidth in <string.h>. */
36512 #include <string.h>
36513 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36514    <wchar.h>.
36515    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
36516    before <wchar.h>.  */
36517 #include <stddef.h>
36518 #include <stdio.h>
36519 #include <time.h>
36520 #include <wchar.h>
36521
36522 "
36523 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
36524   ac_have_decl=1
36525 else
36526   ac_have_decl=0
36527 fi
36528
36529 cat >>confdefs.h <<_ACEOF
36530 #define HAVE_DECL_WCWIDTH $ac_have_decl
36531 _ACEOF
36532
36533   if test $ac_cv_have_decl_wcwidth != yes; then
36534     HAVE_DECL_WCWIDTH=0
36535   fi
36536
36537   if test $ac_cv_func_wcwidth != yes; then
36538     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
36539 $as_echo_n "checking whether wcwidth is a macro... " >&6; }
36540 if ${gl_cv_func_wcwidth_macro+:} false; then :
36541   $as_echo_n "(cached) " >&6
36542 else
36543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36544 /* end confdefs.h.  */
36545
36546 #include <wchar.h>
36547 #ifdef wcwidth
36548  wchar_header_defines_wcwidth
36549 #endif
36550 _ACEOF
36551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36552   $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1; then :
36553   gl_cv_func_wcwidth_macro=yes
36554 else
36555   gl_cv_func_wcwidth_macro=no
36556 fi
36557 rm -f conftest*
36558
36559
36560 fi
36561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
36562 $as_echo "$gl_cv_func_wcwidth_macro" >&6; }
36563   fi
36564
36565   if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
36566     HAVE_WCWIDTH=1
36567                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
36568 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
36569 if ${gl_cv_func_wcwidth_works+:} false; then :
36570   $as_echo_n "(cached) " >&6
36571 else
36572
36573         if test "$cross_compiling" = yes; then :
36574
36575            case "$host_os" in
36576                                         # Guess yes on glibc and AIX 7 systems.
36577              *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
36578              *)                         gl_cv_func_wcwidth_works="guessing no";;
36579            esac
36580
36581 else
36582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36583 /* end confdefs.h.  */
36584
36585 #include <locale.h>
36586 /* AIX 3.2.5 declares wcwidth in <string.h>. */
36587 #include <string.h>
36588 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
36589    <wchar.h>.
36590    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
36591    before <wchar.h>.  */
36592 #include <stddef.h>
36593 #include <stdio.h>
36594 #include <time.h>
36595 #include <wchar.h>
36596 #if !HAVE_DECL_WCWIDTH
36597 extern
36598 # ifdef __cplusplus
36599 "C"
36600 # endif
36601 int wcwidth (int);
36602 #endif
36603 int main ()
36604 {
36605   int result = 0;
36606   if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
36607     {
36608       if (wcwidth (0x0301) > 0)
36609         result |= 1;
36610       if (wcwidth (0x05B0) > 0)
36611         result |= 2;
36612       if (wcwidth (0x200B) > 0)
36613         result |= 4;
36614       if (wcwidth (0xFF1A) == 0)
36615         result |= 8;
36616     }
36617   return result;
36618 }
36619 _ACEOF
36620 if ac_fn_c_try_run "$LINENO"; then :
36621   gl_cv_func_wcwidth_works=yes
36622 else
36623   gl_cv_func_wcwidth_works=no
36624 fi
36625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36626   conftest.$ac_objext conftest.beam conftest.$ac_ext
36627 fi
36628
36629
36630 fi
36631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
36632 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
36633     case "$gl_cv_func_wcwidth_works" in
36634       *yes) ;;
36635       *no) REPLACE_WCWIDTH=1 ;;
36636     esac
36637   else
36638     HAVE_WCWIDTH=0
36639   fi
36640
36641   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
36642
36643
36644
36645
36646
36647
36648
36649
36650   gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
36651
36652   fi
36653
36654
36655
36656
36657
36658           GNULIB_WCWIDTH=1
36659
36660
36661
36662
36663
36664 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
36665
36666
36667
36668   :
36669
36670
36671
36672
36673
36674
36675
36676
36677   gl_LIBOBJS="$gl_LIBOBJS xmemdup0.$ac_objext"
36678
36679
36680
36681   for ac_header in stdint.h
36682 do :
36683   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
36684 if test "x$ac_cv_header_stdint_h" = xyes; then :
36685   cat >>confdefs.h <<_ACEOF
36686 #define HAVE_STDINT_H 1
36687 _ACEOF
36688
36689 fi
36690
36691 done
36692
36693
36694
36695
36696   :
36697
36698
36699   # End of code from modules
36700
36701
36702
36703
36704
36705
36706
36707
36708
36709   gltests_libdeps=
36710   gltests_ltlibdeps=
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720   gl_source_base='tests'
36721   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
36722
36723   gl_module_indicator_condition=$gltests_WITNESS
36724
36725
36726
36727
36728
36729
36730
36731
36732
36733   LIBBISON_LIBDEPS="$gl_libdeps"
36734
36735   LIBBISON_LTLIBDEPS="$gl_ltlibdeps"
36736
36737
36738
36739 # Checks for library functions.
36740
36741
36742
36743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
36744 $as_echo_n "checking if malloc debugging is wanted... " >&6; }
36745
36746 # Check whether --with-dmalloc was given.
36747 if test "${with_dmalloc+set}" = set; then :
36748   withval=$with_dmalloc; if test "$withval" = yes; then
36749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36750 $as_echo "yes" >&6; }
36751
36752 $as_echo "#define WITH_DMALLOC 1" >>confdefs.h
36753
36754   LIBS="$LIBS -ldmalloc"
36755   LDFLAGS="$LDFLAGS -g"
36756 else
36757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36758 $as_echo "no" >&6; }
36759 fi
36760 else
36761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36762 $as_echo "no" >&6; }
36763 fi
36764
36765
36766 for ac_header in sys/time.h sys/times.h
36767 do :
36768   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
36769 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
36770 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
36771   cat >>confdefs.h <<_ACEOF
36772 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
36773 _ACEOF
36774
36775 fi
36776
36777 done
36778
36779  for ac_header in sys/resource.h
36780 do :
36781   ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default
36782 #if HAVE_SYS_TIME_H
36783 # include <sys/time.h>
36784 #endif
36785 #ifdef HAVE_SYS_TIMES_H
36786 # include <sys/times.h>
36787 #endif
36788
36789 "
36790 if test "x$ac_cv_header_sys_resource_h" = xyes; then :
36791   cat >>confdefs.h <<_ACEOF
36792 #define HAVE_SYS_RESOURCE_H 1
36793 _ACEOF
36794
36795 fi
36796
36797 done
36798
36799 for ac_func in times
36800 do :
36801   ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
36802 if test "x$ac_cv_func_times" = xyes; then :
36803   cat >>confdefs.h <<_ACEOF
36804 #define HAVE_TIMES 1
36805 _ACEOF
36806
36807 fi
36808 done
36809
36810
36811 ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default
36812 #if HAVE_SYS_TIME_H
36813 # include <sys/time.h>
36814 #endif
36815 #if HAVE_SYS_TIMES_H
36816 # include <sys/times.h>
36817 #endif
36818 #if HAVE_SYS_RESOURCE_H
36819 # include <sys/resource.h>
36820 #endif
36821
36822 "
36823 if test "x$ac_cv_have_decl_getrusage" = xyes; then :
36824   ac_have_decl=1
36825 else
36826   ac_have_decl=0
36827 fi
36828
36829 cat >>confdefs.h <<_ACEOF
36830 #define HAVE_DECL_GETRUSAGE $ac_have_decl
36831 _ACEOF
36832 ac_fn_c_check_decl "$LINENO" "times" "ac_cv_have_decl_times" "$ac_includes_default
36833 #if HAVE_SYS_TIME_H
36834 # include <sys/time.h>
36835 #endif
36836 #if HAVE_SYS_TIMES_H
36837 # include <sys/times.h>
36838 #endif
36839 #if HAVE_SYS_RESOURCE_H
36840 # include <sys/resource.h>
36841 #endif
36842
36843 "
36844 if test "x$ac_cv_have_decl_times" = xyes; then :
36845   ac_have_decl=1
36846 else
36847   ac_have_decl=0
36848 fi
36849
36850 cat >>confdefs.h <<_ACEOF
36851 #define HAVE_DECL_TIMES $ac_have_decl
36852 _ACEOF
36853 ac_fn_c_check_decl "$LINENO" "clock" "ac_cv_have_decl_clock" "$ac_includes_default
36854 #if HAVE_SYS_TIME_H
36855 # include <sys/time.h>
36856 #endif
36857 #if HAVE_SYS_TIMES_H
36858 # include <sys/times.h>
36859 #endif
36860 #if HAVE_SYS_RESOURCE_H
36861 # include <sys/resource.h>
36862 #endif
36863
36864 "
36865 if test "x$ac_cv_have_decl_clock" = xyes; then :
36866   ac_have_decl=1
36867 else
36868   ac_have_decl=0
36869 fi
36870
36871 cat >>confdefs.h <<_ACEOF
36872 #define HAVE_DECL_CLOCK $ac_have_decl
36873 _ACEOF
36874 ac_fn_c_check_decl "$LINENO" "sysconf" "ac_cv_have_decl_sysconf" "$ac_includes_default
36875 #if HAVE_SYS_TIME_H
36876 # include <sys/time.h>
36877 #endif
36878 #if HAVE_SYS_TIMES_H
36879 # include <sys/times.h>
36880 #endif
36881 #if HAVE_SYS_RESOURCE_H
36882 # include <sys/resource.h>
36883 #endif
36884
36885 "
36886 if test "x$ac_cv_have_decl_sysconf" = xyes; then :
36887   ac_have_decl=1
36888 else
36889   ac_have_decl=0
36890 fi
36891
36892 cat >>confdefs.h <<_ACEOF
36893 #define HAVE_DECL_SYSCONF $ac_have_decl
36894 _ACEOF
36895
36896
36897 ac_fn_c_check_type "$LINENO" "clock_t" "ac_cv_type_clock_t" "$ac_includes_default
36898 #if HAVE_SYS_TIME_H
36899 # include <sys/time.h>
36900 #endif
36901 #if HAVE_SYS_TIMES_H
36902 # include <sys/times.h>
36903 #endif
36904 #if HAVE_SYS_RESOURCE_H
36905 # include <sys/resource.h>
36906 #endif
36907
36908 "
36909 if test "x$ac_cv_type_clock_t" = xyes; then :
36910
36911 cat >>confdefs.h <<_ACEOF
36912 #define HAVE_CLOCK_T 1
36913 _ACEOF
36914
36915
36916 fi
36917 ac_fn_c_check_type "$LINENO" "struct tms" "ac_cv_type_struct_tms" "$ac_includes_default
36918 #if HAVE_SYS_TIME_H
36919 # include <sys/time.h>
36920 #endif
36921 #if HAVE_SYS_TIMES_H
36922 # include <sys/times.h>
36923 #endif
36924 #if HAVE_SYS_RESOURCE_H
36925 # include <sys/resource.h>
36926 #endif
36927
36928 "
36929 if test "x$ac_cv_type_struct_tms" = xyes; then :
36930
36931 cat >>confdefs.h <<_ACEOF
36932 #define HAVE_STRUCT_TMS 1
36933 _ACEOF
36934
36935
36936 fi
36937
36938
36939
36940 # Gettext.
36941 # We use gnulib, which is only guaranteed to work properly with the
36942 # latest Gettext.
36943
36944   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
36945 $as_echo_n "checking whether NLS is requested... " >&6; }
36946     # Check whether --enable-nls was given.
36947 if test "${enable_nls+set}" = set; then :
36948   enableval=$enable_nls; USE_NLS=$enableval
36949 else
36950   USE_NLS=yes
36951 fi
36952
36953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36954 $as_echo "$USE_NLS" >&6; }
36955
36956
36957
36958
36959       GETTEXT_MACRO_VERSION=0.19
36960
36961
36962
36963
36964 # Prepare PATH_SEPARATOR.
36965 # The user is always right.
36966 if test "${PATH_SEPARATOR+set}" != set; then
36967   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36968   # contains only /bin. Note that ksh looks also at the FPATH variable,
36969   # so we have to set that as well for the test.
36970   PATH_SEPARATOR=:
36971   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36972     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36973            || PATH_SEPARATOR=';'
36974        }
36975 fi
36976
36977 # Find out how to test for executable files. Don't use a zero-byte file,
36978 # as systems may use methods other than mode bits to determine executability.
36979 cat >conf$$.file <<_ASEOF
36980 #! /bin/sh
36981 exit 0
36982 _ASEOF
36983 chmod +x conf$$.file
36984 if test -x conf$$.file >/dev/null 2>&1; then
36985   ac_executable_p="test -x"
36986 else
36987   ac_executable_p="test -f"
36988 fi
36989 rm -f conf$$.file
36990
36991 # Extract the first word of "msgfmt", so it can be a program name with args.
36992 set dummy msgfmt; ac_word=$2
36993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36994 $as_echo_n "checking for $ac_word... " >&6; }
36995 if ${ac_cv_path_MSGFMT+:} false; then :
36996   $as_echo_n "(cached) " >&6
36997 else
36998   case "$MSGFMT" in
36999   [\\/]* | ?:[\\/]*)
37000     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
37001     ;;
37002   *)
37003     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
37004     for ac_dir in $PATH; do
37005       IFS="$ac_save_IFS"
37006       test -z "$ac_dir" && ac_dir=.
37007       for ac_exec_ext in '' $ac_executable_extensions; do
37008         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
37009           echo "$as_me: trying $ac_dir/$ac_word..." >&5
37010           if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
37011      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
37012             ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
37013             break 2
37014           fi
37015         fi
37016       done
37017     done
37018     IFS="$ac_save_IFS"
37019   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
37020     ;;
37021 esac
37022 fi
37023 MSGFMT="$ac_cv_path_MSGFMT"
37024 if test "$MSGFMT" != ":"; then
37025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
37026 $as_echo "$MSGFMT" >&6; }
37027 else
37028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37029 $as_echo "no" >&6; }
37030 fi
37031
37032   # Extract the first word of "gmsgfmt", so it can be a program name with args.
37033 set dummy gmsgfmt; ac_word=$2
37034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37035 $as_echo_n "checking for $ac_word... " >&6; }
37036 if ${ac_cv_path_GMSGFMT+:} false; then :
37037   $as_echo_n "(cached) " >&6
37038 else
37039   case $GMSGFMT in
37040   [\\/]* | ?:[\\/]*)
37041   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
37042   ;;
37043   *)
37044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37045 for as_dir in $PATH
37046 do
37047   IFS=$as_save_IFS
37048   test -z "$as_dir" && as_dir=.
37049     for ac_exec_ext in '' $ac_executable_extensions; do
37050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37051     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
37052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37053     break 2
37054   fi
37055 done
37056   done
37057 IFS=$as_save_IFS
37058
37059   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
37060   ;;
37061 esac
37062 fi
37063 GMSGFMT=$ac_cv_path_GMSGFMT
37064 if test -n "$GMSGFMT"; then
37065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
37066 $as_echo "$GMSGFMT" >&6; }
37067 else
37068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37069 $as_echo "no" >&6; }
37070 fi
37071
37072
37073
37074     case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
37075     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
37076     *) MSGFMT_015=$MSGFMT ;;
37077   esac
37078
37079   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
37080     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
37081     *) GMSGFMT_015=$GMSGFMT ;;
37082   esac
37083
37084
37085
37086 # Prepare PATH_SEPARATOR.
37087 # The user is always right.
37088 if test "${PATH_SEPARATOR+set}" != set; then
37089   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
37090   # contains only /bin. Note that ksh looks also at the FPATH variable,
37091   # so we have to set that as well for the test.
37092   PATH_SEPARATOR=:
37093   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37094     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37095            || PATH_SEPARATOR=';'
37096        }
37097 fi
37098
37099 # Find out how to test for executable files. Don't use a zero-byte file,
37100 # as systems may use methods other than mode bits to determine executability.
37101 cat >conf$$.file <<_ASEOF
37102 #! /bin/sh
37103 exit 0
37104 _ASEOF
37105 chmod +x conf$$.file
37106 if test -x conf$$.file >/dev/null 2>&1; then
37107   ac_executable_p="test -x"
37108 else
37109   ac_executable_p="test -f"
37110 fi
37111 rm -f conf$$.file
37112
37113 # Extract the first word of "xgettext", so it can be a program name with args.
37114 set dummy xgettext; ac_word=$2
37115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37116 $as_echo_n "checking for $ac_word... " >&6; }
37117 if ${ac_cv_path_XGETTEXT+:} false; then :
37118   $as_echo_n "(cached) " >&6
37119 else
37120   case "$XGETTEXT" in
37121   [\\/]* | ?:[\\/]*)
37122     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
37123     ;;
37124   *)
37125     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
37126     for ac_dir in $PATH; do
37127       IFS="$ac_save_IFS"
37128       test -z "$ac_dir" && ac_dir=.
37129       for ac_exec_ext in '' $ac_executable_extensions; do
37130         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
37131           echo "$as_me: trying $ac_dir/$ac_word..." >&5
37132           if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
37133      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
37134             ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
37135             break 2
37136           fi
37137         fi
37138       done
37139     done
37140     IFS="$ac_save_IFS"
37141   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
37142     ;;
37143 esac
37144 fi
37145 XGETTEXT="$ac_cv_path_XGETTEXT"
37146 if test "$XGETTEXT" != ":"; then
37147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
37148 $as_echo "$XGETTEXT" >&6; }
37149 else
37150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37151 $as_echo "no" >&6; }
37152 fi
37153
37154     rm -f messages.po
37155
37156     case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
37157     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
37158     *) XGETTEXT_015=$XGETTEXT ;;
37159   esac
37160
37161
37162
37163 # Prepare PATH_SEPARATOR.
37164 # The user is always right.
37165 if test "${PATH_SEPARATOR+set}" != set; then
37166   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
37167   # contains only /bin. Note that ksh looks also at the FPATH variable,
37168   # so we have to set that as well for the test.
37169   PATH_SEPARATOR=:
37170   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37171     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
37172            || PATH_SEPARATOR=';'
37173        }
37174 fi
37175
37176 # Find out how to test for executable files. Don't use a zero-byte file,
37177 # as systems may use methods other than mode bits to determine executability.
37178 cat >conf$$.file <<_ASEOF
37179 #! /bin/sh
37180 exit 0
37181 _ASEOF
37182 chmod +x conf$$.file
37183 if test -x conf$$.file >/dev/null 2>&1; then
37184   ac_executable_p="test -x"
37185 else
37186   ac_executable_p="test -f"
37187 fi
37188 rm -f conf$$.file
37189
37190 # Extract the first word of "msgmerge", so it can be a program name with args.
37191 set dummy msgmerge; ac_word=$2
37192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37193 $as_echo_n "checking for $ac_word... " >&6; }
37194 if ${ac_cv_path_MSGMERGE+:} false; then :
37195   $as_echo_n "(cached) " >&6
37196 else
37197   case "$MSGMERGE" in
37198   [\\/]* | ?:[\\/]*)
37199     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
37200     ;;
37201   *)
37202     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
37203     for ac_dir in $PATH; do
37204       IFS="$ac_save_IFS"
37205       test -z "$ac_dir" && ac_dir=.
37206       for ac_exec_ext in '' $ac_executable_extensions; do
37207         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
37208           echo "$as_me: trying $ac_dir/$ac_word..." >&5
37209           if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
37210             ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
37211             break 2
37212           fi
37213         fi
37214       done
37215     done
37216     IFS="$ac_save_IFS"
37217   test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
37218     ;;
37219 esac
37220 fi
37221 MSGMERGE="$ac_cv_path_MSGMERGE"
37222 if test "$MSGMERGE" != ":"; then
37223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
37224 $as_echo "$MSGMERGE" >&6; }
37225 else
37226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227 $as_echo "no" >&6; }
37228 fi
37229
37230
37231         test -n "$localedir" || localedir='${datadir}/locale'
37232
37233
37234     test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
37235
37236
37237   ac_config_commands="$ac_config_commands po-directories"
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251     use_additional=yes
37252
37253   acl_save_prefix="$prefix"
37254   prefix="$acl_final_prefix"
37255   acl_save_exec_prefix="$exec_prefix"
37256   exec_prefix="$acl_final_exec_prefix"
37257
37258     eval additional_includedir=\"$includedir\"
37259     eval additional_libdir=\"$libdir\"
37260
37261   exec_prefix="$acl_save_exec_prefix"
37262   prefix="$acl_save_prefix"
37263
37264
37265 # Check whether --with-libiconv-prefix was given.
37266 if test "${with_libiconv_prefix+set}" = set; then :
37267   withval=$with_libiconv_prefix;
37268     if test "X$withval" = "Xno"; then
37269       use_additional=no
37270     else
37271       if test "X$withval" = "X"; then
37272
37273   acl_save_prefix="$prefix"
37274   prefix="$acl_final_prefix"
37275   acl_save_exec_prefix="$exec_prefix"
37276   exec_prefix="$acl_final_exec_prefix"
37277
37278           eval additional_includedir=\"$includedir\"
37279           eval additional_libdir=\"$libdir\"
37280
37281   exec_prefix="$acl_save_exec_prefix"
37282   prefix="$acl_save_prefix"
37283
37284       else
37285         additional_includedir="$withval/include"
37286         additional_libdir="$withval/$acl_libdirstem"
37287         if test "$acl_libdirstem2" != "$acl_libdirstem" \
37288            && test ! -d "$withval/$acl_libdirstem"; then
37289           additional_libdir="$withval/$acl_libdirstem2"
37290         fi
37291       fi
37292     fi
37293
37294 fi
37295
37296       LIBICONV=
37297   LTLIBICONV=
37298   INCICONV=
37299   LIBICONV_PREFIX=
37300       HAVE_LIBICONV=
37301   rpathdirs=
37302   ltrpathdirs=
37303   names_already_handled=
37304   names_next_round='iconv '
37305   while test -n "$names_next_round"; do
37306     names_this_round="$names_next_round"
37307     names_next_round=
37308     for name in $names_this_round; do
37309       already_handled=
37310       for n in $names_already_handled; do
37311         if test "$n" = "$name"; then
37312           already_handled=yes
37313           break
37314         fi
37315       done
37316       if test -z "$already_handled"; then
37317         names_already_handled="$names_already_handled $name"
37318                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
37319         eval value=\"\$HAVE_LIB$uppername\"
37320         if test -n "$value"; then
37321           if test "$value" = yes; then
37322             eval value=\"\$LIB$uppername\"
37323             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
37324             eval value=\"\$LTLIB$uppername\"
37325             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
37326           else
37327                                     :
37328           fi
37329         else
37330                               found_dir=
37331           found_la=
37332           found_so=
37333           found_a=
37334           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
37335           if test -n "$acl_shlibext"; then
37336             shrext=".$acl_shlibext"             # typically: shrext=.so
37337           else
37338             shrext=
37339           fi
37340           if test $use_additional = yes; then
37341             dir="$additional_libdir"
37342                                     if test -n "$acl_shlibext"; then
37343               if test -f "$dir/$libname$shrext"; then
37344                 found_dir="$dir"
37345                 found_so="$dir/$libname$shrext"
37346               else
37347                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37348                   ver=`(cd "$dir" && \
37349                         for f in "$libname$shrext".*; do echo "$f"; done \
37350                         | sed -e "s,^$libname$shrext\\\\.,," \
37351                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37352                         | sed 1q ) 2>/dev/null`
37353                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37354                     found_dir="$dir"
37355                     found_so="$dir/$libname$shrext.$ver"
37356                   fi
37357                 else
37358                   eval library_names=\"$acl_library_names_spec\"
37359                   for f in $library_names; do
37360                     if test -f "$dir/$f"; then
37361                       found_dir="$dir"
37362                       found_so="$dir/$f"
37363                       break
37364                     fi
37365                   done
37366                 fi
37367               fi
37368             fi
37369                         if test "X$found_dir" = "X"; then
37370               if test -f "$dir/$libname.$acl_libext"; then
37371                 found_dir="$dir"
37372                 found_a="$dir/$libname.$acl_libext"
37373               fi
37374             fi
37375             if test "X$found_dir" != "X"; then
37376               if test -f "$dir/$libname.la"; then
37377                 found_la="$dir/$libname.la"
37378               fi
37379             fi
37380           fi
37381           if test "X$found_dir" = "X"; then
37382             for x in $LDFLAGS $LTLIBICONV; do
37383
37384   acl_save_prefix="$prefix"
37385   prefix="$acl_final_prefix"
37386   acl_save_exec_prefix="$exec_prefix"
37387   exec_prefix="$acl_final_exec_prefix"
37388   eval x=\"$x\"
37389   exec_prefix="$acl_save_exec_prefix"
37390   prefix="$acl_save_prefix"
37391
37392               case "$x" in
37393                 -L*)
37394                   dir=`echo "X$x" | sed -e 's/^X-L//'`
37395                                     if test -n "$acl_shlibext"; then
37396                     if test -f "$dir/$libname$shrext"; then
37397                       found_dir="$dir"
37398                       found_so="$dir/$libname$shrext"
37399                     else
37400                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37401                         ver=`(cd "$dir" && \
37402                               for f in "$libname$shrext".*; do echo "$f"; done \
37403                               | sed -e "s,^$libname$shrext\\\\.,," \
37404                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37405                               | sed 1q ) 2>/dev/null`
37406                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37407                           found_dir="$dir"
37408                           found_so="$dir/$libname$shrext.$ver"
37409                         fi
37410                       else
37411                         eval library_names=\"$acl_library_names_spec\"
37412                         for f in $library_names; do
37413                           if test -f "$dir/$f"; then
37414                             found_dir="$dir"
37415                             found_so="$dir/$f"
37416                             break
37417                           fi
37418                         done
37419                       fi
37420                     fi
37421                   fi
37422                                     if test "X$found_dir" = "X"; then
37423                     if test -f "$dir/$libname.$acl_libext"; then
37424                       found_dir="$dir"
37425                       found_a="$dir/$libname.$acl_libext"
37426                     fi
37427                   fi
37428                   if test "X$found_dir" != "X"; then
37429                     if test -f "$dir/$libname.la"; then
37430                       found_la="$dir/$libname.la"
37431                     fi
37432                   fi
37433                   ;;
37434               esac
37435               if test "X$found_dir" != "X"; then
37436                 break
37437               fi
37438             done
37439           fi
37440           if test "X$found_dir" != "X"; then
37441                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
37442             if test "X$found_so" != "X"; then
37443                                                         if test "$enable_rpath" = no \
37444                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
37445                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
37446                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37447               else
37448                                                                                 haveit=
37449                 for x in $ltrpathdirs; do
37450                   if test "X$x" = "X$found_dir"; then
37451                     haveit=yes
37452                     break
37453                   fi
37454                 done
37455                 if test -z "$haveit"; then
37456                   ltrpathdirs="$ltrpathdirs $found_dir"
37457                 fi
37458                                 if test "$acl_hardcode_direct" = yes; then
37459                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37460                 else
37461                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
37462                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37463                                                             haveit=
37464                     for x in $rpathdirs; do
37465                       if test "X$x" = "X$found_dir"; then
37466                         haveit=yes
37467                         break
37468                       fi
37469                     done
37470                     if test -z "$haveit"; then
37471                       rpathdirs="$rpathdirs $found_dir"
37472                     fi
37473                   else
37474                                                                                 haveit=
37475                     for x in $LDFLAGS $LIBICONV; do
37476
37477   acl_save_prefix="$prefix"
37478   prefix="$acl_final_prefix"
37479   acl_save_exec_prefix="$exec_prefix"
37480   exec_prefix="$acl_final_exec_prefix"
37481   eval x=\"$x\"
37482   exec_prefix="$acl_save_exec_prefix"
37483   prefix="$acl_save_prefix"
37484
37485                       if test "X$x" = "X-L$found_dir"; then
37486                         haveit=yes
37487                         break
37488                       fi
37489                     done
37490                     if test -z "$haveit"; then
37491                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
37492                     fi
37493                     if test "$acl_hardcode_minus_L" != no; then
37494                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
37495                     else
37496                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
37497                     fi
37498                   fi
37499                 fi
37500               fi
37501             else
37502               if test "X$found_a" != "X"; then
37503                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
37504               else
37505                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
37506               fi
37507             fi
37508                         additional_includedir=
37509             case "$found_dir" in
37510               */$acl_libdirstem | */$acl_libdirstem/)
37511                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
37512                 if test "$name" = 'iconv'; then
37513                   LIBICONV_PREFIX="$basedir"
37514                 fi
37515                 additional_includedir="$basedir/include"
37516                 ;;
37517               */$acl_libdirstem2 | */$acl_libdirstem2/)
37518                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
37519                 if test "$name" = 'iconv'; then
37520                   LIBICONV_PREFIX="$basedir"
37521                 fi
37522                 additional_includedir="$basedir/include"
37523                 ;;
37524             esac
37525             if test "X$additional_includedir" != "X"; then
37526                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
37527                 haveit=
37528                 if test "X$additional_includedir" = "X/usr/local/include"; then
37529                   if test -n "$GCC"; then
37530                     case $host_os in
37531                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37532                     esac
37533                   fi
37534                 fi
37535                 if test -z "$haveit"; then
37536                   for x in $CPPFLAGS $INCICONV; do
37537
37538   acl_save_prefix="$prefix"
37539   prefix="$acl_final_prefix"
37540   acl_save_exec_prefix="$exec_prefix"
37541   exec_prefix="$acl_final_exec_prefix"
37542   eval x=\"$x\"
37543   exec_prefix="$acl_save_exec_prefix"
37544   prefix="$acl_save_prefix"
37545
37546                     if test "X$x" = "X-I$additional_includedir"; then
37547                       haveit=yes
37548                       break
37549                     fi
37550                   done
37551                   if test -z "$haveit"; then
37552                     if test -d "$additional_includedir"; then
37553                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
37554                     fi
37555                   fi
37556                 fi
37557               fi
37558             fi
37559                         if test -n "$found_la"; then
37560                                                         save_libdir="$libdir"
37561               case "$found_la" in
37562                 */* | *\\*) . "$found_la" ;;
37563                 *) . "./$found_la" ;;
37564               esac
37565               libdir="$save_libdir"
37566                             for dep in $dependency_libs; do
37567                 case "$dep" in
37568                   -L*)
37569                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
37570                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
37571                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
37572                       haveit=
37573                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
37574                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
37575                         if test -n "$GCC"; then
37576                           case $host_os in
37577                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37578                           esac
37579                         fi
37580                       fi
37581                       if test -z "$haveit"; then
37582                         haveit=
37583                         for x in $LDFLAGS $LIBICONV; do
37584
37585   acl_save_prefix="$prefix"
37586   prefix="$acl_final_prefix"
37587   acl_save_exec_prefix="$exec_prefix"
37588   exec_prefix="$acl_final_exec_prefix"
37589   eval x=\"$x\"
37590   exec_prefix="$acl_save_exec_prefix"
37591   prefix="$acl_save_prefix"
37592
37593                           if test "X$x" = "X-L$additional_libdir"; then
37594                             haveit=yes
37595                             break
37596                           fi
37597                         done
37598                         if test -z "$haveit"; then
37599                           if test -d "$additional_libdir"; then
37600                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
37601                           fi
37602                         fi
37603                         haveit=
37604                         for x in $LDFLAGS $LTLIBICONV; do
37605
37606   acl_save_prefix="$prefix"
37607   prefix="$acl_final_prefix"
37608   acl_save_exec_prefix="$exec_prefix"
37609   exec_prefix="$acl_final_exec_prefix"
37610   eval x=\"$x\"
37611   exec_prefix="$acl_save_exec_prefix"
37612   prefix="$acl_save_prefix"
37613
37614                           if test "X$x" = "X-L$additional_libdir"; then
37615                             haveit=yes
37616                             break
37617                           fi
37618                         done
37619                         if test -z "$haveit"; then
37620                           if test -d "$additional_libdir"; then
37621                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
37622                           fi
37623                         fi
37624                       fi
37625                     fi
37626                     ;;
37627                   -R*)
37628                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
37629                     if test "$enable_rpath" != no; then
37630                                                                   haveit=
37631                       for x in $rpathdirs; do
37632                         if test "X$x" = "X$dir"; then
37633                           haveit=yes
37634                           break
37635                         fi
37636                       done
37637                       if test -z "$haveit"; then
37638                         rpathdirs="$rpathdirs $dir"
37639                       fi
37640                                                                   haveit=
37641                       for x in $ltrpathdirs; do
37642                         if test "X$x" = "X$dir"; then
37643                           haveit=yes
37644                           break
37645                         fi
37646                       done
37647                       if test -z "$haveit"; then
37648                         ltrpathdirs="$ltrpathdirs $dir"
37649                       fi
37650                     fi
37651                     ;;
37652                   -l*)
37653                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
37654                     ;;
37655                   *.la)
37656                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
37657                     ;;
37658                   *)
37659                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
37660                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
37661                     ;;
37662                 esac
37663               done
37664             fi
37665           else
37666                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
37667             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
37668           fi
37669         fi
37670       fi
37671     done
37672   done
37673   if test "X$rpathdirs" != "X"; then
37674     if test -n "$acl_hardcode_libdir_separator"; then
37675                         alldirs=
37676       for found_dir in $rpathdirs; do
37677         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
37678       done
37679             acl_save_libdir="$libdir"
37680       libdir="$alldirs"
37681       eval flag=\"$acl_hardcode_libdir_flag_spec\"
37682       libdir="$acl_save_libdir"
37683       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
37684     else
37685             for found_dir in $rpathdirs; do
37686         acl_save_libdir="$libdir"
37687         libdir="$found_dir"
37688         eval flag=\"$acl_hardcode_libdir_flag_spec\"
37689         libdir="$acl_save_libdir"
37690         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
37691       done
37692     fi
37693   fi
37694   if test "X$ltrpathdirs" != "X"; then
37695             for found_dir in $ltrpathdirs; do
37696       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
37697     done
37698   fi
37699
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
37731 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
37732 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
37733   $as_echo_n "(cached) " >&6
37734 else
37735   gt_save_LIBS="$LIBS"
37736      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
37737      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37738 /* end confdefs.h.  */
37739 #include <CoreFoundation/CFPreferences.h>
37740 int
37741 main ()
37742 {
37743 CFPreferencesCopyAppValue(NULL, NULL)
37744   ;
37745   return 0;
37746 }
37747 _ACEOF
37748 if ac_fn_c_try_link "$LINENO"; then :
37749   gt_cv_func_CFPreferencesCopyAppValue=yes
37750 else
37751   gt_cv_func_CFPreferencesCopyAppValue=no
37752 fi
37753 rm -f core conftest.err conftest.$ac_objext \
37754     conftest$ac_exeext conftest.$ac_ext
37755      LIBS="$gt_save_LIBS"
37756 fi
37757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
37758 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
37759   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
37760
37761 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
37762
37763   fi
37764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
37765 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
37766 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
37767   $as_echo_n "(cached) " >&6
37768 else
37769   gt_save_LIBS="$LIBS"
37770      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
37771      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37772 /* end confdefs.h.  */
37773 #include <CoreFoundation/CFLocale.h>
37774 int
37775 main ()
37776 {
37777 CFLocaleCopyCurrent();
37778   ;
37779   return 0;
37780 }
37781 _ACEOF
37782 if ac_fn_c_try_link "$LINENO"; then :
37783   gt_cv_func_CFLocaleCopyCurrent=yes
37784 else
37785   gt_cv_func_CFLocaleCopyCurrent=no
37786 fi
37787 rm -f core conftest.err conftest.$ac_objext \
37788     conftest$ac_exeext conftest.$ac_ext
37789      LIBS="$gt_save_LIBS"
37790 fi
37791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
37792 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
37793   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
37794
37795 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
37796
37797   fi
37798   INTL_MACOSX_LIBS=
37799   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
37800     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
37801   fi
37802
37803
37804
37805
37806
37807
37808   LIBINTL=
37809   LTLIBINTL=
37810   POSUB=
37811
37812     case " $gt_needs " in
37813     *" need-formatstring-macros "*) gt_api_version=3 ;;
37814     *" need-ngettext "*) gt_api_version=2 ;;
37815     *) gt_api_version=1 ;;
37816   esac
37817   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
37818   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
37819
37820     if test "$USE_NLS" = "yes"; then
37821     gt_use_preinstalled_gnugettext=no
37822
37823
37824         if test $gt_api_version -ge 3; then
37825           gt_revision_test_code='
37826 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
37827 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
37828 #endif
37829 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
37830 '
37831         else
37832           gt_revision_test_code=
37833         fi
37834         if test $gt_api_version -ge 2; then
37835           gt_expression_test_code=' + * ngettext ("", "", 0)'
37836         else
37837           gt_expression_test_code=
37838         fi
37839
37840         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
37841 $as_echo_n "checking for GNU gettext in libc... " >&6; }
37842 if eval \${$gt_func_gnugettext_libc+:} false; then :
37843   $as_echo_n "(cached) " >&6
37844 else
37845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37846 /* end confdefs.h.  */
37847
37848 #include <libintl.h>
37849 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
37850 extern int _nl_msg_cat_cntr;
37851 extern int *_nl_domain_bindings;
37852 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
37853 #else
37854 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
37855 #endif
37856 $gt_revision_test_code
37857
37858 int
37859 main ()
37860 {
37861
37862 bindtextdomain ("", "");
37863 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
37864
37865   ;
37866   return 0;
37867 }
37868 _ACEOF
37869 if ac_fn_c_try_link "$LINENO"; then :
37870   eval "$gt_func_gnugettext_libc=yes"
37871 else
37872   eval "$gt_func_gnugettext_libc=no"
37873 fi
37874 rm -f core conftest.err conftest.$ac_objext \
37875     conftest$ac_exeext conftest.$ac_ext
37876 fi
37877 eval ac_res=\$$gt_func_gnugettext_libc
37878                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37879 $as_echo "$ac_res" >&6; }
37880
37881         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
37882
37883
37884
37885
37886
37887           am_save_CPPFLAGS="$CPPFLAGS"
37888
37889   for element in $INCICONV; do
37890     haveit=
37891     for x in $CPPFLAGS; do
37892
37893   acl_save_prefix="$prefix"
37894   prefix="$acl_final_prefix"
37895   acl_save_exec_prefix="$exec_prefix"
37896   exec_prefix="$acl_final_exec_prefix"
37897   eval x=\"$x\"
37898   exec_prefix="$acl_save_exec_prefix"
37899   prefix="$acl_save_prefix"
37900
37901       if test "X$x" = "X$element"; then
37902         haveit=yes
37903         break
37904       fi
37905     done
37906     if test -z "$haveit"; then
37907       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37908     fi
37909   done
37910
37911
37912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
37913 $as_echo_n "checking for iconv... " >&6; }
37914 if ${am_cv_func_iconv+:} false; then :
37915   $as_echo_n "(cached) " >&6
37916 else
37917
37918     am_cv_func_iconv="no, consider installing GNU libiconv"
37919     am_cv_lib_iconv=no
37920     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37921 /* end confdefs.h.  */
37922
37923 #include <stdlib.h>
37924 #include <iconv.h>
37925
37926 int
37927 main ()
37928 {
37929 iconv_t cd = iconv_open("","");
37930            iconv(cd,NULL,NULL,NULL,NULL);
37931            iconv_close(cd);
37932   ;
37933   return 0;
37934 }
37935 _ACEOF
37936 if ac_fn_c_try_link "$LINENO"; then :
37937   am_cv_func_iconv=yes
37938 fi
37939 rm -f core conftest.err conftest.$ac_objext \
37940     conftest$ac_exeext conftest.$ac_ext
37941     if test "$am_cv_func_iconv" != yes; then
37942       am_save_LIBS="$LIBS"
37943       LIBS="$LIBS $LIBICONV"
37944       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37945 /* end confdefs.h.  */
37946
37947 #include <stdlib.h>
37948 #include <iconv.h>
37949
37950 int
37951 main ()
37952 {
37953 iconv_t cd = iconv_open("","");
37954              iconv(cd,NULL,NULL,NULL,NULL);
37955              iconv_close(cd);
37956   ;
37957   return 0;
37958 }
37959 _ACEOF
37960 if ac_fn_c_try_link "$LINENO"; then :
37961   am_cv_lib_iconv=yes
37962         am_cv_func_iconv=yes
37963 fi
37964 rm -f core conftest.err conftest.$ac_objext \
37965     conftest$ac_exeext conftest.$ac_ext
37966       LIBS="$am_save_LIBS"
37967     fi
37968
37969 fi
37970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
37971 $as_echo "$am_cv_func_iconv" >&6; }
37972   if test "$am_cv_func_iconv" = yes; then
37973     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
37974 $as_echo_n "checking for working iconv... " >&6; }
37975 if ${am_cv_func_iconv_works+:} false; then :
37976   $as_echo_n "(cached) " >&6
37977 else
37978
37979                   am_save_LIBS="$LIBS"
37980       if test $am_cv_lib_iconv = yes; then
37981         LIBS="$LIBS $LIBICONV"
37982       fi
37983       am_cv_func_iconv_works=no
37984       for ac_iconv_const in '' 'const'; do
37985         if test "$cross_compiling" = yes; then :
37986   case "$host_os" in
37987              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
37988              *)            am_cv_func_iconv_works="guessing yes" ;;
37989            esac
37990 else
37991   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37992 /* end confdefs.h.  */
37993
37994 #include <iconv.h>
37995 #include <string.h>
37996
37997 #ifndef ICONV_CONST
37998 # define ICONV_CONST $ac_iconv_const
37999 #endif
38000
38001 int
38002 main ()
38003 {
38004 int result = 0;
38005   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
38006      returns.  */
38007   {
38008     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
38009     if (cd_utf8_to_88591 != (iconv_t)(-1))
38010       {
38011         static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
38012         char buf[10];
38013         ICONV_CONST char *inptr = input;
38014         size_t inbytesleft = strlen (input);
38015         char *outptr = buf;
38016         size_t outbytesleft = sizeof (buf);
38017         size_t res = iconv (cd_utf8_to_88591,
38018                             &inptr, &inbytesleft,
38019                             &outptr, &outbytesleft);
38020         if (res == 0)
38021           result |= 1;
38022         iconv_close (cd_utf8_to_88591);
38023       }
38024   }
38025   /* Test against Solaris 10 bug: Failures are not distinguishable from
38026      successful returns.  */
38027   {
38028     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
38029     if (cd_ascii_to_88591 != (iconv_t)(-1))
38030       {
38031         static ICONV_CONST char input[] = "\263";
38032         char buf[10];
38033         ICONV_CONST char *inptr = input;
38034         size_t inbytesleft = strlen (input);
38035         char *outptr = buf;
38036         size_t outbytesleft = sizeof (buf);
38037         size_t res = iconv (cd_ascii_to_88591,
38038                             &inptr, &inbytesleft,
38039                             &outptr, &outbytesleft);
38040         if (res == 0)
38041           result |= 2;
38042         iconv_close (cd_ascii_to_88591);
38043       }
38044   }
38045   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
38046   {
38047     iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
38048     if (cd_88591_to_utf8 != (iconv_t)(-1))
38049       {
38050         static ICONV_CONST char input[] = "\304";
38051         static char buf[2] = { (char)0xDE, (char)0xAD };
38052         ICONV_CONST char *inptr = input;
38053         size_t inbytesleft = 1;
38054         char *outptr = buf;
38055         size_t outbytesleft = 1;
38056         size_t res = iconv (cd_88591_to_utf8,
38057                             &inptr, &inbytesleft,
38058                             &outptr, &outbytesleft);
38059         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
38060           result |= 4;
38061         iconv_close (cd_88591_to_utf8);
38062       }
38063   }
38064 #if 0 /* This bug could be worked around by the caller.  */
38065   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
38066   {
38067     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
38068     if (cd_88591_to_utf8 != (iconv_t)(-1))
38069       {
38070         static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
38071         char buf[50];
38072         ICONV_CONST char *inptr = input;
38073         size_t inbytesleft = strlen (input);
38074         char *outptr = buf;
38075         size_t outbytesleft = sizeof (buf);
38076         size_t res = iconv (cd_88591_to_utf8,
38077                             &inptr, &inbytesleft,
38078                             &outptr, &outbytesleft);
38079         if ((int)res > 0)
38080           result |= 8;
38081         iconv_close (cd_88591_to_utf8);
38082       }
38083   }
38084 #endif
38085   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
38086      provided.  */
38087   {
38088     /* Try standardized names.  */
38089     iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
38090     /* Try IRIX, OSF/1 names.  */
38091     iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
38092     /* Try AIX names.  */
38093     iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
38094     /* Try HP-UX names.  */
38095     iconv_t cd4 = iconv_open ("utf8", "eucJP");
38096     if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
38097         && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
38098       result |= 16;
38099     if (cd1 != (iconv_t)(-1))
38100       iconv_close (cd1);
38101     if (cd2 != (iconv_t)(-1))
38102       iconv_close (cd2);
38103     if (cd3 != (iconv_t)(-1))
38104       iconv_close (cd3);
38105     if (cd4 != (iconv_t)(-1))
38106       iconv_close (cd4);
38107   }
38108   return result;
38109
38110   ;
38111   return 0;
38112 }
38113 _ACEOF
38114 if ac_fn_c_try_run "$LINENO"; then :
38115   am_cv_func_iconv_works=yes
38116 fi
38117 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38118   conftest.$ac_objext conftest.beam conftest.$ac_ext
38119 fi
38120
38121         test "$am_cv_func_iconv_works" = no || break
38122       done
38123       LIBS="$am_save_LIBS"
38124
38125 fi
38126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
38127 $as_echo "$am_cv_func_iconv_works" >&6; }
38128     case "$am_cv_func_iconv_works" in
38129       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
38130       *)   am_func_iconv=yes ;;
38131     esac
38132   else
38133     am_func_iconv=no am_cv_lib_iconv=no
38134   fi
38135   if test "$am_func_iconv" = yes; then
38136
38137 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
38138
38139   fi
38140   if test "$am_cv_lib_iconv" = yes; then
38141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
38142 $as_echo_n "checking how to link with libiconv... " >&6; }
38143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
38144 $as_echo "$LIBICONV" >&6; }
38145   else
38146             CPPFLAGS="$am_save_CPPFLAGS"
38147     LIBICONV=
38148     LTLIBICONV=
38149   fi
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161     use_additional=yes
38162
38163   acl_save_prefix="$prefix"
38164   prefix="$acl_final_prefix"
38165   acl_save_exec_prefix="$exec_prefix"
38166   exec_prefix="$acl_final_exec_prefix"
38167
38168     eval additional_includedir=\"$includedir\"
38169     eval additional_libdir=\"$libdir\"
38170
38171   exec_prefix="$acl_save_exec_prefix"
38172   prefix="$acl_save_prefix"
38173
38174
38175 # Check whether --with-libintl-prefix was given.
38176 if test "${with_libintl_prefix+set}" = set; then :
38177   withval=$with_libintl_prefix;
38178     if test "X$withval" = "Xno"; then
38179       use_additional=no
38180     else
38181       if test "X$withval" = "X"; then
38182
38183   acl_save_prefix="$prefix"
38184   prefix="$acl_final_prefix"
38185   acl_save_exec_prefix="$exec_prefix"
38186   exec_prefix="$acl_final_exec_prefix"
38187
38188           eval additional_includedir=\"$includedir\"
38189           eval additional_libdir=\"$libdir\"
38190
38191   exec_prefix="$acl_save_exec_prefix"
38192   prefix="$acl_save_prefix"
38193
38194       else
38195         additional_includedir="$withval/include"
38196         additional_libdir="$withval/$acl_libdirstem"
38197         if test "$acl_libdirstem2" != "$acl_libdirstem" \
38198            && test ! -d "$withval/$acl_libdirstem"; then
38199           additional_libdir="$withval/$acl_libdirstem2"
38200         fi
38201       fi
38202     fi
38203
38204 fi
38205
38206       LIBINTL=
38207   LTLIBINTL=
38208   INCINTL=
38209   LIBINTL_PREFIX=
38210       HAVE_LIBINTL=
38211   rpathdirs=
38212   ltrpathdirs=
38213   names_already_handled=
38214   names_next_round='intl '
38215   while test -n "$names_next_round"; do
38216     names_this_round="$names_next_round"
38217     names_next_round=
38218     for name in $names_this_round; do
38219       already_handled=
38220       for n in $names_already_handled; do
38221         if test "$n" = "$name"; then
38222           already_handled=yes
38223           break
38224         fi
38225       done
38226       if test -z "$already_handled"; then
38227         names_already_handled="$names_already_handled $name"
38228                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
38229         eval value=\"\$HAVE_LIB$uppername\"
38230         if test -n "$value"; then
38231           if test "$value" = yes; then
38232             eval value=\"\$LIB$uppername\"
38233             test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
38234             eval value=\"\$LTLIB$uppername\"
38235             test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
38236           else
38237                                     :
38238           fi
38239         else
38240                               found_dir=
38241           found_la=
38242           found_so=
38243           found_a=
38244           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
38245           if test -n "$acl_shlibext"; then
38246             shrext=".$acl_shlibext"             # typically: shrext=.so
38247           else
38248             shrext=
38249           fi
38250           if test $use_additional = yes; then
38251             dir="$additional_libdir"
38252                                     if test -n "$acl_shlibext"; then
38253               if test -f "$dir/$libname$shrext"; then
38254                 found_dir="$dir"
38255                 found_so="$dir/$libname$shrext"
38256               else
38257                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
38258                   ver=`(cd "$dir" && \
38259                         for f in "$libname$shrext".*; do echo "$f"; done \
38260                         | sed -e "s,^$libname$shrext\\\\.,," \
38261                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
38262                         | sed 1q ) 2>/dev/null`
38263                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
38264                     found_dir="$dir"
38265                     found_so="$dir/$libname$shrext.$ver"
38266                   fi
38267                 else
38268                   eval library_names=\"$acl_library_names_spec\"
38269                   for f in $library_names; do
38270                     if test -f "$dir/$f"; then
38271                       found_dir="$dir"
38272                       found_so="$dir/$f"
38273                       break
38274                     fi
38275                   done
38276                 fi
38277               fi
38278             fi
38279                         if test "X$found_dir" = "X"; then
38280               if test -f "$dir/$libname.$acl_libext"; then
38281                 found_dir="$dir"
38282                 found_a="$dir/$libname.$acl_libext"
38283               fi
38284             fi
38285             if test "X$found_dir" != "X"; then
38286               if test -f "$dir/$libname.la"; then
38287                 found_la="$dir/$libname.la"
38288               fi
38289             fi
38290           fi
38291           if test "X$found_dir" = "X"; then
38292             for x in $LDFLAGS $LTLIBINTL; do
38293
38294   acl_save_prefix="$prefix"
38295   prefix="$acl_final_prefix"
38296   acl_save_exec_prefix="$exec_prefix"
38297   exec_prefix="$acl_final_exec_prefix"
38298   eval x=\"$x\"
38299   exec_prefix="$acl_save_exec_prefix"
38300   prefix="$acl_save_prefix"
38301
38302               case "$x" in
38303                 -L*)
38304                   dir=`echo "X$x" | sed -e 's/^X-L//'`
38305                                     if test -n "$acl_shlibext"; then
38306                     if test -f "$dir/$libname$shrext"; then
38307                       found_dir="$dir"
38308                       found_so="$dir/$libname$shrext"
38309                     else
38310                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
38311                         ver=`(cd "$dir" && \
38312                               for f in "$libname$shrext".*; do echo "$f"; done \
38313                               | sed -e "s,^$libname$shrext\\\\.,," \
38314                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
38315                               | sed 1q ) 2>/dev/null`
38316                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
38317                           found_dir="$dir"
38318                           found_so="$dir/$libname$shrext.$ver"
38319                         fi
38320                       else
38321                         eval library_names=\"$acl_library_names_spec\"
38322                         for f in $library_names; do
38323                           if test -f "$dir/$f"; then
38324                             found_dir="$dir"
38325                             found_so="$dir/$f"
38326                             break
38327                           fi
38328                         done
38329                       fi
38330                     fi
38331                   fi
38332                                     if test "X$found_dir" = "X"; then
38333                     if test -f "$dir/$libname.$acl_libext"; then
38334                       found_dir="$dir"
38335                       found_a="$dir/$libname.$acl_libext"
38336                     fi
38337                   fi
38338                   if test "X$found_dir" != "X"; then
38339                     if test -f "$dir/$libname.la"; then
38340                       found_la="$dir/$libname.la"
38341                     fi
38342                   fi
38343                   ;;
38344               esac
38345               if test "X$found_dir" != "X"; then
38346                 break
38347               fi
38348             done
38349           fi
38350           if test "X$found_dir" != "X"; then
38351                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
38352             if test "X$found_so" != "X"; then
38353                                                         if test "$enable_rpath" = no \
38354                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
38355                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
38356                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38357               else
38358                                                                                 haveit=
38359                 for x in $ltrpathdirs; do
38360                   if test "X$x" = "X$found_dir"; then
38361                     haveit=yes
38362                     break
38363                   fi
38364                 done
38365                 if test -z "$haveit"; then
38366                   ltrpathdirs="$ltrpathdirs $found_dir"
38367                 fi
38368                                 if test "$acl_hardcode_direct" = yes; then
38369                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38370                 else
38371                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
38372                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38373                                                             haveit=
38374                     for x in $rpathdirs; do
38375                       if test "X$x" = "X$found_dir"; then
38376                         haveit=yes
38377                         break
38378                       fi
38379                     done
38380                     if test -z "$haveit"; then
38381                       rpathdirs="$rpathdirs $found_dir"
38382                     fi
38383                   else
38384                                                                                 haveit=
38385                     for x in $LDFLAGS $LIBINTL; do
38386
38387   acl_save_prefix="$prefix"
38388   prefix="$acl_final_prefix"
38389   acl_save_exec_prefix="$exec_prefix"
38390   exec_prefix="$acl_final_exec_prefix"
38391   eval x=\"$x\"
38392   exec_prefix="$acl_save_exec_prefix"
38393   prefix="$acl_save_prefix"
38394
38395                       if test "X$x" = "X-L$found_dir"; then
38396                         haveit=yes
38397                         break
38398                       fi
38399                     done
38400                     if test -z "$haveit"; then
38401                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
38402                     fi
38403                     if test "$acl_hardcode_minus_L" != no; then
38404                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
38405                     else
38406                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
38407                     fi
38408                   fi
38409                 fi
38410               fi
38411             else
38412               if test "X$found_a" != "X"; then
38413                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
38414               else
38415                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
38416               fi
38417             fi
38418                         additional_includedir=
38419             case "$found_dir" in
38420               */$acl_libdirstem | */$acl_libdirstem/)
38421                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
38422                 if test "$name" = 'intl'; then
38423                   LIBINTL_PREFIX="$basedir"
38424                 fi
38425                 additional_includedir="$basedir/include"
38426                 ;;
38427               */$acl_libdirstem2 | */$acl_libdirstem2/)
38428                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
38429                 if test "$name" = 'intl'; then
38430                   LIBINTL_PREFIX="$basedir"
38431                 fi
38432                 additional_includedir="$basedir/include"
38433                 ;;
38434             esac
38435             if test "X$additional_includedir" != "X"; then
38436                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
38437                 haveit=
38438                 if test "X$additional_includedir" = "X/usr/local/include"; then
38439                   if test -n "$GCC"; then
38440                     case $host_os in
38441                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
38442                     esac
38443                   fi
38444                 fi
38445                 if test -z "$haveit"; then
38446                   for x in $CPPFLAGS $INCINTL; do
38447
38448   acl_save_prefix="$prefix"
38449   prefix="$acl_final_prefix"
38450   acl_save_exec_prefix="$exec_prefix"
38451   exec_prefix="$acl_final_exec_prefix"
38452   eval x=\"$x\"
38453   exec_prefix="$acl_save_exec_prefix"
38454   prefix="$acl_save_prefix"
38455
38456                     if test "X$x" = "X-I$additional_includedir"; then
38457                       haveit=yes
38458                       break
38459                     fi
38460                   done
38461                   if test -z "$haveit"; then
38462                     if test -d "$additional_includedir"; then
38463                                             INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
38464                     fi
38465                   fi
38466                 fi
38467               fi
38468             fi
38469                         if test -n "$found_la"; then
38470                                                         save_libdir="$libdir"
38471               case "$found_la" in
38472                 */* | *\\*) . "$found_la" ;;
38473                 *) . "./$found_la" ;;
38474               esac
38475               libdir="$save_libdir"
38476                             for dep in $dependency_libs; do
38477                 case "$dep" in
38478                   -L*)
38479                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
38480                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
38481                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
38482                       haveit=
38483                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
38484                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
38485                         if test -n "$GCC"; then
38486                           case $host_os in
38487                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
38488                           esac
38489                         fi
38490                       fi
38491                       if test -z "$haveit"; then
38492                         haveit=
38493                         for x in $LDFLAGS $LIBINTL; do
38494
38495   acl_save_prefix="$prefix"
38496   prefix="$acl_final_prefix"
38497   acl_save_exec_prefix="$exec_prefix"
38498   exec_prefix="$acl_final_exec_prefix"
38499   eval x=\"$x\"
38500   exec_prefix="$acl_save_exec_prefix"
38501   prefix="$acl_save_prefix"
38502
38503                           if test "X$x" = "X-L$additional_libdir"; then
38504                             haveit=yes
38505                             break
38506                           fi
38507                         done
38508                         if test -z "$haveit"; then
38509                           if test -d "$additional_libdir"; then
38510                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
38511                           fi
38512                         fi
38513                         haveit=
38514                         for x in $LDFLAGS $LTLIBINTL; do
38515
38516   acl_save_prefix="$prefix"
38517   prefix="$acl_final_prefix"
38518   acl_save_exec_prefix="$exec_prefix"
38519   exec_prefix="$acl_final_exec_prefix"
38520   eval x=\"$x\"
38521   exec_prefix="$acl_save_exec_prefix"
38522   prefix="$acl_save_prefix"
38523
38524                           if test "X$x" = "X-L$additional_libdir"; then
38525                             haveit=yes
38526                             break
38527                           fi
38528                         done
38529                         if test -z "$haveit"; then
38530                           if test -d "$additional_libdir"; then
38531                                                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
38532                           fi
38533                         fi
38534                       fi
38535                     fi
38536                     ;;
38537                   -R*)
38538                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
38539                     if test "$enable_rpath" != no; then
38540                                                                   haveit=
38541                       for x in $rpathdirs; do
38542                         if test "X$x" = "X$dir"; then
38543                           haveit=yes
38544                           break
38545                         fi
38546                       done
38547                       if test -z "$haveit"; then
38548                         rpathdirs="$rpathdirs $dir"
38549                       fi
38550                                                                   haveit=
38551                       for x in $ltrpathdirs; do
38552                         if test "X$x" = "X$dir"; then
38553                           haveit=yes
38554                           break
38555                         fi
38556                       done
38557                       if test -z "$haveit"; then
38558                         ltrpathdirs="$ltrpathdirs $dir"
38559                       fi
38560                     fi
38561                     ;;
38562                   -l*)
38563                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
38564                     ;;
38565                   *.la)
38566                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
38567                     ;;
38568                   *)
38569                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
38570                     LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
38571                     ;;
38572                 esac
38573               done
38574             fi
38575           else
38576                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
38577             LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
38578           fi
38579         fi
38580       fi
38581     done
38582   done
38583   if test "X$rpathdirs" != "X"; then
38584     if test -n "$acl_hardcode_libdir_separator"; then
38585                         alldirs=
38586       for found_dir in $rpathdirs; do
38587         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
38588       done
38589             acl_save_libdir="$libdir"
38590       libdir="$alldirs"
38591       eval flag=\"$acl_hardcode_libdir_flag_spec\"
38592       libdir="$acl_save_libdir"
38593       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
38594     else
38595             for found_dir in $rpathdirs; do
38596         acl_save_libdir="$libdir"
38597         libdir="$found_dir"
38598         eval flag=\"$acl_hardcode_libdir_flag_spec\"
38599         libdir="$acl_save_libdir"
38600         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
38601       done
38602     fi
38603   fi
38604   if test "X$ltrpathdirs" != "X"; then
38605             for found_dir in $ltrpathdirs; do
38606       LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
38607     done
38608   fi
38609
38610
38611
38612
38613
38614
38615           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
38616 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
38617 if eval \${$gt_func_gnugettext_libintl+:} false; then :
38618   $as_echo_n "(cached) " >&6
38619 else
38620   gt_save_CPPFLAGS="$CPPFLAGS"
38621             CPPFLAGS="$CPPFLAGS $INCINTL"
38622             gt_save_LIBS="$LIBS"
38623             LIBS="$LIBS $LIBINTL"
38624                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38625 /* end confdefs.h.  */
38626
38627 #include <libintl.h>
38628 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
38629 extern int _nl_msg_cat_cntr;
38630 extern
38631 #ifdef __cplusplus
38632 "C"
38633 #endif
38634 const char *_nl_expand_alias (const char *);
38635 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
38636 #else
38637 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
38638 #endif
38639 $gt_revision_test_code
38640
38641 int
38642 main ()
38643 {
38644
38645 bindtextdomain ("", "");
38646 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
38647
38648   ;
38649   return 0;
38650 }
38651 _ACEOF
38652 if ac_fn_c_try_link "$LINENO"; then :
38653   eval "$gt_func_gnugettext_libintl=yes"
38654 else
38655   eval "$gt_func_gnugettext_libintl=no"
38656 fi
38657 rm -f core conftest.err conftest.$ac_objext \
38658     conftest$ac_exeext conftest.$ac_ext
38659                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
38660               LIBS="$LIBS $LIBICONV"
38661               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38662 /* end confdefs.h.  */
38663
38664 #include <libintl.h>
38665 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
38666 extern int _nl_msg_cat_cntr;
38667 extern
38668 #ifdef __cplusplus
38669 "C"
38670 #endif
38671 const char *_nl_expand_alias (const char *);
38672 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
38673 #else
38674 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
38675 #endif
38676 $gt_revision_test_code
38677
38678 int
38679 main ()
38680 {
38681
38682 bindtextdomain ("", "");
38683 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
38684
38685   ;
38686   return 0;
38687 }
38688 _ACEOF
38689 if ac_fn_c_try_link "$LINENO"; then :
38690   LIBINTL="$LIBINTL $LIBICONV"
38691                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
38692                  eval "$gt_func_gnugettext_libintl=yes"
38693
38694 fi
38695 rm -f core conftest.err conftest.$ac_objext \
38696     conftest$ac_exeext conftest.$ac_ext
38697             fi
38698             CPPFLAGS="$gt_save_CPPFLAGS"
38699             LIBS="$gt_save_LIBS"
38700 fi
38701 eval ac_res=\$$gt_func_gnugettext_libintl
38702                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38703 $as_echo "$ac_res" >&6; }
38704         fi
38705
38706                                         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
38707            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
38708                 && test "$PACKAGE" != gettext-runtime \
38709                 && test "$PACKAGE" != gettext-tools; }; then
38710           gt_use_preinstalled_gnugettext=yes
38711         else
38712                     LIBINTL=
38713           LTLIBINTL=
38714           INCINTL=
38715         fi
38716
38717
38718
38719     if test -n "$INTL_MACOSX_LIBS"; then
38720       if test "$gt_use_preinstalled_gnugettext" = "yes" \
38721          || test "$nls_cv_use_gnu_gettext" = "yes"; then
38722                 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
38723         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
38724       fi
38725     fi
38726
38727     if test "$gt_use_preinstalled_gnugettext" = "yes" \
38728        || test "$nls_cv_use_gnu_gettext" = "yes"; then
38729
38730 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
38731
38732     else
38733       USE_NLS=no
38734     fi
38735   fi
38736
38737   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
38738 $as_echo_n "checking whether to use NLS... " >&6; }
38739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
38740 $as_echo "$USE_NLS" >&6; }
38741   if test "$USE_NLS" = "yes"; then
38742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
38743 $as_echo_n "checking where the gettext function comes from... " >&6; }
38744     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
38745       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
38746         gt_source="external libintl"
38747       else
38748         gt_source="libc"
38749       fi
38750     else
38751       gt_source="included intl directory"
38752     fi
38753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
38754 $as_echo "$gt_source" >&6; }
38755   fi
38756
38757   if test "$USE_NLS" = "yes"; then
38758
38759     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
38760       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
38761         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
38762 $as_echo_n "checking how to link with libintl... " >&6; }
38763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
38764 $as_echo "$LIBINTL" >&6; }
38765
38766   for element in $INCINTL; do
38767     haveit=
38768     for x in $CPPFLAGS; do
38769
38770   acl_save_prefix="$prefix"
38771   prefix="$acl_final_prefix"
38772   acl_save_exec_prefix="$exec_prefix"
38773   exec_prefix="$acl_final_exec_prefix"
38774   eval x=\"$x\"
38775   exec_prefix="$acl_save_exec_prefix"
38776   prefix="$acl_save_prefix"
38777
38778       if test "X$x" = "X$element"; then
38779         haveit=yes
38780         break
38781       fi
38782     done
38783     if test -z "$haveit"; then
38784       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
38785     fi
38786   done
38787
38788       fi
38789
38790
38791 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
38792
38793
38794 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
38795
38796     fi
38797
38798         POSUB=po
38799   fi
38800
38801
38802
38803     INTLLIBS="$LIBINTL"
38804
38805
38806
38807
38808
38809
38810
38811
38812   if test -z "$USE_NLS"; then
38813     echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2
38814     exit 1
38815   fi
38816   BISON_LOCALEDIR=
38817   BISON_USE_NLS=no
38818   if test "$USE_NLS" = yes; then
38819                         if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
38820       BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
38821     fi
38822
38823     if test -n "$BISON_LOCALEDIR"; then
38824                               USER_LINGUAS="${LINGUAS-%UNSET%}"
38825       if test -n "$USER_LINGUAS"; then
38826         BISON_USE_NLS=yes
38827       fi
38828     fi
38829   fi
38830   if test $BISON_USE_NLS = yes; then
38831
38832 $as_echo "#define YYENABLE_NLS 1" >>confdefs.h
38833
38834   fi
38835
38836
38837 # Internationalized parsers.
38838 ac_config_files="$ac_config_files runtime-po/Makefile.in"
38839
38840 # Autoconf macros for packages using internationalized parsers.
38841 aclocaldir='${datadir}/aclocal'
38842
38843
38844 # Create the benchmark script.
38845 ac_config_files="$ac_config_files etc/bench.pl"
38846
38847
38848 # Initialize the test suite.
38849 ac_config_commands="$ac_config_commands tests/atconfig"
38850
38851 ac_config_files="$ac_config_files tests/atlocal"
38852
38853 ac_config_files="$ac_config_files tests/bison"
38854
38855
38856 for ac_prog in valgrind
38857 do
38858   # Extract the first word of "$ac_prog", so it can be a program name with args.
38859 set dummy $ac_prog; ac_word=$2
38860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38861 $as_echo_n "checking for $ac_word... " >&6; }
38862 if ${ac_cv_prog_VALGRIND+:} false; then :
38863   $as_echo_n "(cached) " >&6
38864 else
38865   if test -n "$VALGRIND"; then
38866   ac_cv_prog_VALGRIND="$VALGRIND" # Let the user override the test.
38867 else
38868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38869 for as_dir in $PATH
38870 do
38871   IFS=$as_save_IFS
38872   test -z "$as_dir" && as_dir=.
38873     for ac_exec_ext in '' $ac_executable_extensions; do
38874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38875     ac_cv_prog_VALGRIND="$ac_prog"
38876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38877     break 2
38878   fi
38879 done
38880   done
38881 IFS=$as_save_IFS
38882
38883 fi
38884 fi
38885 VALGRIND=$ac_cv_prog_VALGRIND
38886 if test -n "$VALGRIND"; then
38887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5
38888 $as_echo "$VALGRIND" >&6; }
38889 else
38890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38891 $as_echo "no" >&6; }
38892 fi
38893
38894
38895   test -n "$VALGRIND" && break
38896 done
38897
38898 # Use something simpler that $host_os to select our suppression file.
38899 uname=`uname`
38900 case $VALGRIND:$uname in
38901   '':*) ;;
38902   *:Darwin)
38903     # See README-hacking.
38904     VALGRIND=;;
38905   *:*)
38906     suppfile=build-aux/$uname.valgrind
38907     if test -f "$srcdir/$suppfile"; then
38908       VALGRIND_OPTS_SUPPRESSION="--suppressions=\$(abs_top_srcdir)/$suppfile"
38909
38910     fi
38911     ;;
38912 esac
38913
38914 # Whether we cannot run the compiled bison.
38915  if test "$cross_compiling" = yes; then
38916   CROSS_COMPILING_TRUE=
38917   CROSS_COMPILING_FALSE='#'
38918 else
38919   CROSS_COMPILING_TRUE='#'
38920   CROSS_COMPILING_FALSE=
38921 fi
38922
38923
38924
38925 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
38926
38927 # Needed by tests/atlocal.in.
38928
38929
38930
38931
38932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38933 /* end confdefs.h.  */
38934
38935 #if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
38936   yes
38937 #endif
38938
38939 _ACEOF
38940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38941   $EGREP "yes" >/dev/null 2>&1; then :
38942   CLASSPATH_SEPARATOR=';'
38943 else
38944   CLASSPATH_SEPARATOR=':'
38945 fi
38946 rm -f conftest*
38947
38948   source_version=1.3
38949   test -n "$source_version" || {
38950     as_fn_error $? "missing source-version argument to gt_JAVACOMP" "$LINENO" 5
38951   }
38952   target_version=1.4
38953   case "$source_version" in
38954     1.3) goodcode='class conftest {}'
38955          failcode='class conftestfail { static { assert(true); } }' ;;
38956     1.4) goodcode='class conftest     { static { assert(true); } }'
38957          failcode='class conftestfail<T> { T foo() { return null; } }' ;;
38958     1.5) goodcode='class conftest<T>     { T foo() { return null; } }'
38959          failcode='class conftestfail { void foo () { switch ("A") {} } }' ;;
38960     1.7) goodcode='class conftest     { void foo () { switch ("A") {} } }'
38961          failcode='class conftestfail { void foo () { Runnable r = () -> {}; } }' ;;
38962     1.8) goodcode='class conftest     { void foo () { Runnable r = () -> {}; } }'
38963          failcode='interface conftestfail { private void foo () {} }' ;;
38964     9)   goodcode='interface conftest     { private void foo () {} }'
38965          failcode='class conftestfail { public void m() { var i = new Integer(0); } }' ;;
38966     10)  goodcode='class conftest     { public void m() { var i = new Integer(0); } }'
38967          failcode='class conftestfail syntax error' ;;
38968     *) as_fn_error $? "invalid source-version argument to gt_JAVACOMP: $source_version" "$LINENO" 5 ;;
38969   esac
38970   case "$target_version" in
38971     1.1) cfversion=45 ;;
38972     1.2) cfversion=46 ;;
38973     1.3) cfversion=47 ;;
38974     1.4) cfversion=48 ;;
38975     1.5) cfversion=49 ;;
38976     1.6) cfversion=50 ;;
38977     1.7) cfversion=51 ;;
38978     1.8) cfversion=52 ;;
38979     9)   cfversion=53 ;;
38980     10)  cfversion=54 ;;
38981     *) as_fn_error $? "invalid target-version argument to gt_JAVACOMP: $target_version" "$LINENO" 5 ;;
38982   esac
38983   # Function to output the classfile version of a file (8th byte) in decimal.
38984   if od -A x < /dev/null >/dev/null 2>/dev/null; then
38985     # Use POSIX od.
38986     func_classfile_version ()
38987     {
38988       od -A n -t d1 -j 7 -N 1 "$1"
38989     }
38990   else
38991     # Use BSD hexdump.
38992     func_classfile_version ()
38993     {
38994       dd if="$1" bs=1 count=1 skip=7 2>/dev/null | hexdump -e '1/1 "%3d "'
38995       echo
38996     }
38997   fi
38998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java compiler" >&5
38999 $as_echo_n "checking for Java compiler... " >&6; }
39000                                                                                                                                                   CONF_JAVAC=
39001   HAVE_JAVAC_ENVVAR=
39002   HAVE_GCJ_C=
39003   HAVE_JAVAC=
39004   HAVE_JIKES=
39005   HAVE_JAVACOMP=
39006   cat > conftestlib.java <<EOF
39007 public class conftestlib {
39008   public static void main (String[] args) {
39009   }
39010 }
39011 EOF
39012   echo "$goodcode" > conftest.java
39013   echo "$failcode" > conftestfail.java
39014         if test -n "$JAVAC"; then
39015         if $JAVAC --version 2>/dev/null | sed -e 1q | grep gcj > /dev/null; then
39016             if $JAVAC --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then
39017                         rm -f conftest.class
39018         if { echo "$as_me:39018: $JAVAC -d . conftest.java" >&5
39019              $JAVAC -d . conftest.java >&5 2>&1
39020            } \
39021            && test -f conftest.class \
39022            && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39023                     rm -f conftest.class
39024           rm -f conftestfail.class
39025           if { echo "$as_me:39025: $JAVAC -fsource=$source_version -d . conftest.java" >&5
39026                $JAVAC -fsource="$source_version" -d . conftest.java >&5 2>&1
39027              } \
39028              && test -f conftest.class \
39029              && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39030              && { echo "$as_me:39030: $JAVAC -d . conftestfail.java" >&5
39031                   $JAVAC -d . conftestfail.java >&5 2>&1
39032                 } \
39033              && test -f conftestfail.class \
39034              && ! { echo "$as_me:39034: $JAVAC -fsource=$source_version -d . conftestfail.java" >&5
39035                     $JAVAC -fsource="$source_version" -d . conftestfail.java >&5 2>&1
39036                   }; then
39037             CONF_JAVAC="$JAVAC -fsource=$source_version"
39038             HAVE_JAVAC_ENVVAR=1
39039             HAVE_JAVACOMP=1
39040           else
39041             CONF_JAVAC="$JAVAC"
39042             HAVE_JAVAC_ENVVAR=1
39043             HAVE_JAVACOMP=1
39044           fi
39045         else
39046                     rm -f conftest.class
39047           rm -f conftestfail.class
39048           if { echo "$as_me:39048: $JAVAC -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5
39049                $JAVAC -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1
39050              } \
39051              && test -f conftest.class \
39052              && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39053             CONF_JAVAC="$JAVAC -fsource=$source_version -ftarget=$target_version"
39054             HAVE_JAVAC_ENVVAR=1
39055             HAVE_JAVACOMP=1
39056           fi
39057         fi
39058       else
39059                 if test "$target_version" = 1.4 && test "$source_version" = 1.4; then
39060                     rm -f conftest.class
39061           if { echo "$as_me:39061: $JAVAC -d . conftest.java" >&5
39062                $JAVAC -d . conftest.java >&5 2>&1
39063              } \
39064              && test -f conftest.class; then
39065             CONF_JAVAC="$JAVAC"
39066             HAVE_JAVAC_ENVVAR=1
39067             HAVE_JAVACOMP=1
39068           fi
39069         else
39070           if test "$target_version" = 1.4 && test "$source_version" = 1.3; then
39071                                     javac_works=
39072             rm -f conftest.class
39073             if { echo "$as_me:39073: $JAVAC -d . conftest.java" >&5
39074                  $JAVAC -d . conftest.java >&5 2>&1
39075                } \
39076                && test -f conftest.class; then
39077               javac_works=1
39078             fi
39079             javac_noassert_works=
39080             rm -f conftest.class
39081             if { echo "$as_me:39081: $JAVAC -fno-assert -d . conftest.java" >&5
39082                  $JAVAC -fno-assert -d . conftest.java >&5 2>&1
39083                } \
39084                && test -f conftest.class; then
39085               javac_noassert_works=1
39086             fi
39087             if test -n "$javac_works" && test -n "$javac_noassert_works"; then
39088               rm -f conftestfail.class
39089               if { echo "$as_me:39089: $JAVAC -d . conftestfail.java" >&5
39090                    $JAVAC -d . conftestfail.java >&5 2>&1
39091                  } \
39092                  && test -f conftestfail.class \
39093                  && ! { echo "$as_me:39093: $JAVAC -fno-assert -d . conftestfail.java" >&5
39094                         $JAVAC -fno-assert -d . conftestfail.java >&5 2>&1
39095                       }; then
39096                                 javac_works=
39097               fi
39098             fi
39099             if test -n "$javac_works"; then
39100               CONF_JAVAC="$JAVAC"
39101               HAVE_JAVAC_ENVVAR=1
39102               HAVE_JAVACOMP=1
39103             else
39104               if test -n "$javac_noassert_works"; then
39105                 CONF_JAVAC="$JAVAC -fno-assert"
39106                 HAVE_JAVAC_ENVVAR=1
39107                 HAVE_JAVACOMP=1
39108               fi
39109             fi
39110           fi
39111         fi
39112       fi
39113     else
39114                                     if test "$source_version" = 1.5; then
39115         case "$target_version" in
39116           1.1 | 1.2 | 1.3 | 1.4 | 1.5) ;;
39117           *) source_version='1.6' ;;
39118         esac
39119       fi
39120       rm -f conftest.class
39121       if { echo "$as_me:39121: $JAVAC -d . conftest.java" >&5
39122            $JAVAC -d . conftest.java >&5 2>&1
39123          } \
39124          && test -f conftest.class \
39125          && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39126                 rm -f conftest.class
39127         rm -f conftestfail.class
39128         if { echo "$as_me:39128: $JAVAC -source $source_version -d . conftest.java" >&5
39129              $JAVAC -source "$source_version" -d . conftest.java >&5 2>&1
39130            } \
39131            && test -f conftest.class \
39132            && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39133            && { echo "$as_me:39133: $JAVAC -d . conftestfail.java" >&5
39134                 $JAVAC -d . conftestfail.java >&5 2>&1
39135               } \
39136            && test -f conftestfail.class \
39137            && ! { echo "$as_me:39137: $JAVAC -source $source_version -d . conftestfail.java" >&5
39138                   $JAVAC -source "$source_version" -d . conftestfail.java >&5 2>&1
39139                 }; then
39140           CONF_JAVAC="$JAVAC -source $source_version"
39141           HAVE_JAVAC_ENVVAR=1
39142           HAVE_JAVACOMP=1
39143         else
39144           CONF_JAVAC="$JAVAC"
39145           HAVE_JAVAC_ENVVAR=1
39146           HAVE_JAVACOMP=1
39147         fi
39148       else
39149                         rm -f conftest.class
39150         if { echo "$as_me:39150: $JAVAC -target $target_version -d . conftest.java" >&5
39151              $JAVAC -target "$target_version" -d . conftest.java >&5 2>&1
39152            } \
39153            && test -f conftest.class \
39154            && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39155                     rm -f conftest.class
39156           rm -f conftestfail.class
39157           if { echo "$as_me:39157: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5
39158                $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39159              } \
39160              && test -f conftest.class \
39161              && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39162              && { echo "$as_me:39162: $JAVAC -target $target_version -d . conftestfail.java" >&5
39163                   $JAVAC -target "$target_version" -d . conftestfail.java >&5 2>&1
39164                 } \
39165              && test -f conftestfail.class \
39166              && ! { echo "$as_me:39166: $JAVAC -target $target_version -source $source_version -d . conftestfail.java" >&5
39167                     $JAVAC -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1
39168                   }; then
39169             CONF_JAVAC="$JAVAC -target $target_version -source $source_version"
39170             HAVE_JAVAC_ENVVAR=1
39171             HAVE_JAVACOMP=1
39172           else
39173             CONF_JAVAC="$JAVAC -target $target_version"
39174             HAVE_JAVAC_ENVVAR=1
39175             HAVE_JAVACOMP=1
39176           fi
39177         else
39178                                         rm -f conftest.class
39179           if { echo "$as_me:39179: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5
39180                $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39181              } \
39182              && test -f conftest.class \
39183              && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39184             CONF_JAVAC="$JAVAC -target $target_version -source $source_version"
39185             HAVE_JAVAC_ENVVAR=1
39186             HAVE_JAVACOMP=1
39187           fi
39188         fi
39189       fi
39190     fi
39191   fi
39192   if test -z "$HAVE_JAVACOMP"; then
39193                 # Extract the first word of "gcj", so it can be a program name with args.
39194 set dummy gcj; ac_word=$2
39195 :
39196 if ${ac_cv_prog_HAVE_GCJ_IN_PATH+:} false; then :
39197   $as_echo_n "(cached) " >&6
39198 else
39199   if test -n "$HAVE_GCJ_IN_PATH"; then
39200   ac_cv_prog_HAVE_GCJ_IN_PATH="$HAVE_GCJ_IN_PATH" # Let the user override the test.
39201 else
39202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39203 for as_dir in $PATH
39204 do
39205   IFS=$as_save_IFS
39206   test -z "$as_dir" && as_dir=.
39207     for ac_exec_ext in '' $ac_executable_extensions; do
39208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39209     ac_cv_prog_HAVE_GCJ_IN_PATH="yes"
39210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39211     break 2
39212   fi
39213 done
39214   done
39215 IFS=$as_save_IFS
39216
39217 fi
39218 fi
39219 HAVE_GCJ_IN_PATH=$ac_cv_prog_HAVE_GCJ_IN_PATH
39220 if test -n "$HAVE_GCJ_IN_PATH"; then
39221   :
39222 else
39223   :
39224 fi
39225
39226
39227     # Extract the first word of "javac", so it can be a program name with args.
39228 set dummy javac; ac_word=$2
39229 :
39230 if ${ac_cv_prog_HAVE_JAVAC_IN_PATH+:} false; then :
39231   $as_echo_n "(cached) " >&6
39232 else
39233   if test -n "$HAVE_JAVAC_IN_PATH"; then
39234   ac_cv_prog_HAVE_JAVAC_IN_PATH="$HAVE_JAVAC_IN_PATH" # Let the user override the test.
39235 else
39236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39237 for as_dir in $PATH
39238 do
39239   IFS=$as_save_IFS
39240   test -z "$as_dir" && as_dir=.
39241     for ac_exec_ext in '' $ac_executable_extensions; do
39242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39243     ac_cv_prog_HAVE_JAVAC_IN_PATH="yes"
39244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39245     break 2
39246   fi
39247 done
39248   done
39249 IFS=$as_save_IFS
39250
39251 fi
39252 fi
39253 HAVE_JAVAC_IN_PATH=$ac_cv_prog_HAVE_JAVAC_IN_PATH
39254 if test -n "$HAVE_JAVAC_IN_PATH"; then
39255   :
39256 else
39257   :
39258 fi
39259
39260
39261     # Extract the first word of "jikes", so it can be a program name with args.
39262 set dummy jikes; ac_word=$2
39263 :
39264 if ${ac_cv_prog_HAVE_JIKES_IN_PATH+:} false; then :
39265   $as_echo_n "(cached) " >&6
39266 else
39267   if test -n "$HAVE_JIKES_IN_PATH"; then
39268   ac_cv_prog_HAVE_JIKES_IN_PATH="$HAVE_JIKES_IN_PATH" # Let the user override the test.
39269 else
39270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39271 for as_dir in $PATH
39272 do
39273   IFS=$as_save_IFS
39274   test -z "$as_dir" && as_dir=.
39275     for ac_exec_ext in '' $ac_executable_extensions; do
39276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39277     ac_cv_prog_HAVE_JIKES_IN_PATH="yes"
39278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39279     break 2
39280   fi
39281 done
39282   done
39283 IFS=$as_save_IFS
39284
39285 fi
39286 fi
39287 HAVE_JIKES_IN_PATH=$ac_cv_prog_HAVE_JIKES_IN_PATH
39288 if test -n "$HAVE_JIKES_IN_PATH"; then
39289   :
39290 else
39291   :
39292 fi
39293
39294
39295                 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_GCJ_IN_PATH"; then
39296             if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null; then
39297                 if { echo "$as_me:39297: gcj -C -d . conftestlib.java" >&5
39298              gcj -C -d . conftestlib.java >&5 2>&1
39299            }; then
39300                     if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then
39301                                     rm -f conftest.class
39302             if { echo "$as_me:39302: gcj -C -d . conftest.java" >&5
39303                  gcj -C -d . conftest.java >&5 2>&1
39304                } \
39305                && test -f conftest.class \
39306                && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39307                             rm -f conftest.class
39308               rm -f conftestfail.class
39309               if { echo "$as_me:39309: gcj -C -fsource=$source_version -d . conftest.java" >&5
39310                    gcj -C -fsource="$source_version" -d . conftest.java >&5 2>&1
39311                  } \
39312                  && test -f conftest.class \
39313                  && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39314                  && { echo "$as_me:39314: gcj -C -d . conftestfail.java" >&5
39315                       gcj -C -d . conftestfail.java >&5 2>&1
39316                     } \
39317                  && test -f conftestfail.class \
39318                  && ! { echo "$as_me:39318: gcj -C -fsource=$source_version -d . conftestfail.java" >&5
39319                         gcj -C -fsource="$source_version" -d . conftestfail.java >&5 2>&1
39320                       }; then
39321                 CONF_JAVAC="gcj -C -fsource=$source_version"
39322                 HAVE_JAVAC_ENVVAR=1
39323                 HAVE_JAVACOMP=1
39324               else
39325                 CONF_JAVAC="gcj -C"
39326                 HAVE_JAVAC_ENVVAR=1
39327                 HAVE_JAVACOMP=1
39328               fi
39329             else
39330                             rm -f conftest.class
39331               rm -f conftestfail.class
39332               if { echo "$as_me:39332: gcj -C -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5
39333                    gcj -C -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1
39334                  } \
39335                  && test -f conftest.class \
39336                  && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39337                 CONF_JAVAC="gcj -C -fsource=$source_version -ftarget=$target_version"
39338                 HAVE_JAVAC_ENVVAR=1
39339                 HAVE_JAVACOMP=1
39340               fi
39341             fi
39342           else
39343                                                 if test "$target_version" = 1.4 && test "$source_version" = 1.4; then
39344               rm -f conftest.class
39345               if { echo "$as_me:39345: gcj -C -d . conftest.java" >&5
39346                    gcj -C -d . conftest.java >&5 2>&1
39347                  } \
39348                  && test -f conftest.class; then
39349                 CONF_JAVAC="gcj -C"
39350                 HAVE_GCJ_C=1
39351                 HAVE_JAVACOMP=1
39352               fi
39353             else
39354               if test "$target_version" = 1.4 && test "$source_version" = 1.3; then
39355                                                 rm -f conftest.class
39356                 if { echo "$as_me:39356: gcj -C -fno-assert -d . conftest.java" >&5
39357                      gcj -C -fno-assert -d . conftest.java >&5 2>&1
39358                    } \
39359                    && test -f conftest.class; then
39360                   CONF_JAVAC="gcj -C -fno-assert"
39361                   HAVE_GCJ_C=1
39362                   HAVE_JAVACOMP=1
39363                 else
39364                   rm -f conftest.class
39365                   if { echo "$as_me:39365: gcj -C -d . conftest.java" >&5
39366                        gcj -C -d . conftest.java >&5 2>&1
39367                      } \
39368                      && test -f conftest.class; then
39369                     CONF_JAVAC="gcj -C"
39370                     HAVE_GCJ_C=1
39371                     HAVE_JAVACOMP=1
39372                   fi
39373                 fi
39374               fi
39375             fi
39376           fi
39377         fi
39378       fi
39379     fi
39380     if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JAVAC_IN_PATH"; then
39381             if { javac -version >/dev/null 2>/dev/null || test $? -le 2; } \
39382          && ( if javac -help 2>&1 >/dev/null | grep at.dms.kjc.Main >/dev/null && javac -help 2>/dev/null | grep 'released.*2000' >/dev/null ; then exit 1; else exit 0; fi ); then
39383                                         if test "$source_version" = 1.5; then
39384           case "$target_version" in
39385             1.1 | 1.2 | 1.3 | 1.4 | 1.5) ;;
39386             *) source_version='1.6' ;;
39387           esac
39388         fi
39389                         rm -f conftest.class
39390         if { echo "$as_me:39390: javac -d . conftest.java" >&5
39391              javac -d . conftest.java >&5 2>&1
39392            } \
39393            && test -f conftest.class \
39394            && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39395                     rm -f conftest.class
39396           rm -f conftestfail.class
39397           if { echo "$as_me:39397: javac -source $source_version -d . conftest.java" >&5
39398                javac -source "$source_version" -d . conftest.java >&5 2>&1
39399              } \
39400              && test -f conftest.class \
39401              && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39402              && { echo "$as_me:39402: javac -d . conftestfail.java" >&5
39403                   javac -d . conftestfail.java >&5 2>&1
39404                 } \
39405              && test -f conftestfail.class \
39406              && ! { echo "$as_me:39406: javac -source $source_version -d . conftestfail.java" >&5
39407                     javac -source "$source_version" -d . conftestfail.java >&5 2>&1
39408                   }; then
39409             CONF_JAVAC="javac -source $source_version"
39410             HAVE_JAVAC=1
39411             HAVE_JAVACOMP=1
39412           else
39413             CONF_JAVAC="javac"
39414             HAVE_JAVAC=1
39415             HAVE_JAVACOMP=1
39416           fi
39417         else
39418                               rm -f conftest.class
39419           if { echo "$as_me:39419: javac -target $target_version -d . conftest.java" >&5
39420                javac -target "$target_version" -d . conftest.java >&5 2>&1
39421              } \
39422              && test -f conftest.class \
39423              && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39424                         rm -f conftest.class
39425             rm -f conftestfail.class
39426             if { echo "$as_me:39426: javac -target $target_version -source $source_version -d . conftest.java" >&5
39427                  javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39428                } \
39429                && test -f conftest.class \
39430                && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
39431                && { echo "$as_me:39431: javac -target $target_version -d . conftestfail.java" >&5
39432                     javac -target "$target_version" -d . conftestfail.java >&5 2>&1
39433                   } \
39434                && test -f conftestfail.class \
39435                && ! { echo "$as_me:39435: javac -target $target_version -source $source_version -d . conftestfail.java" >&5
39436                       javac -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1
39437                     }; then
39438               CONF_JAVAC="javac -target $target_version -source $source_version"
39439               HAVE_JAVAC=1
39440               HAVE_JAVACOMP=1
39441             else
39442               CONF_JAVAC="javac -target $target_version"
39443               HAVE_JAVAC=1
39444               HAVE_JAVACOMP=1
39445             fi
39446           else
39447                                                 rm -f conftest.class
39448             if { echo "$as_me:39448: javac -target $target_version -source $source_version -d . conftest.java" >&5
39449                  javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
39450                } \
39451                && test -f conftest.class \
39452                && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
39453               CONF_JAVAC="javac -target $target_version -source $source_version"
39454               HAVE_JAVAC=1
39455               HAVE_JAVACOMP=1
39456             fi
39457           fi
39458         fi
39459       fi
39460     fi
39461     if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JIKES_IN_PATH"; then
39462             if { jikes >/dev/null 2>/dev/null || test $? = 1; } \
39463          && (
39464               # See if the existing CLASSPATH is sufficient to make jikes work.
39465               unset JAVA_HOME
39466               jikes conftestlib.java >&5 2>&1
39467               error=$?
39468               rm -f conftestlib.class
39469               exit $error
39470             ); then
39471                                 if test "$source_version" = 1.3; then
39472           CONF_JAVAC="jikes"
39473           HAVE_JIKES=1
39474           HAVE_JAVACOMP=1
39475         fi
39476       fi
39477     fi
39478   fi
39479   rm -f conftest*.java conftest*.class
39480   if test -n "$HAVE_JAVACOMP"; then
39481     ac_result="$CONF_JAVAC"
39482   else
39483     ac_result="no"
39484   fi
39485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
39486 $as_echo "$ac_result" >&6; }
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java virtual machine" >&5
39497 $as_echo_n "checking for Java virtual machine... " >&6; }
39498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39499 /* end confdefs.h.  */
39500
39501 #if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
39502   yes
39503 #endif
39504
39505 _ACEOF
39506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39507   $EGREP "yes" >/dev/null 2>&1; then :
39508   CLASSPATH_SEPARATOR=';'
39509 else
39510   CLASSPATH_SEPARATOR=':'
39511 fi
39512 rm -f conftest*
39513
39514   CONF_JAVA=
39515   HAVE_JAVA_ENVVAR=
39516   HAVE_GIJ=
39517   HAVE_JAVA=
39518   HAVE_JRE=
39519   HAVE_JVIEW=
39520   HAVE_JAVAEXEC=1
39521   if test -n "$JAVA"; then
39522     HAVE_JAVA_ENVVAR=1
39523     CONF_JAVA="$JAVA"
39524   else
39525                 # Extract the first word of "gij", so it can be a program name with args.
39526 set dummy gij; ac_word=$2
39527 :
39528 if ${ac_cv_prog_HAVE_GIJ_IN_PATH+:} false; then :
39529   $as_echo_n "(cached) " >&6
39530 else
39531   if test -n "$HAVE_GIJ_IN_PATH"; then
39532   ac_cv_prog_HAVE_GIJ_IN_PATH="$HAVE_GIJ_IN_PATH" # Let the user override the test.
39533 else
39534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39535 for as_dir in $PATH
39536 do
39537   IFS=$as_save_IFS
39538   test -z "$as_dir" && as_dir=.
39539     for ac_exec_ext in '' $ac_executable_extensions; do
39540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39541     ac_cv_prog_HAVE_GIJ_IN_PATH="yes"
39542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39543     break 2
39544   fi
39545 done
39546   done
39547 IFS=$as_save_IFS
39548
39549 fi
39550 fi
39551 HAVE_GIJ_IN_PATH=$ac_cv_prog_HAVE_GIJ_IN_PATH
39552 if test -n "$HAVE_GIJ_IN_PATH"; then
39553   :
39554 else
39555   :
39556 fi
39557
39558
39559     # Extract the first word of "java", so it can be a program name with args.
39560 set dummy java; ac_word=$2
39561 :
39562 if ${ac_cv_prog_HAVE_JAVA_IN_PATH+:} false; then :
39563   $as_echo_n "(cached) " >&6
39564 else
39565   if test -n "$HAVE_JAVA_IN_PATH"; then
39566   ac_cv_prog_HAVE_JAVA_IN_PATH="$HAVE_JAVA_IN_PATH" # Let the user override the test.
39567 else
39568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39569 for as_dir in $PATH
39570 do
39571   IFS=$as_save_IFS
39572   test -z "$as_dir" && as_dir=.
39573     for ac_exec_ext in '' $ac_executable_extensions; do
39574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39575     ac_cv_prog_HAVE_JAVA_IN_PATH="yes"
39576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39577     break 2
39578   fi
39579 done
39580   done
39581 IFS=$as_save_IFS
39582
39583 fi
39584 fi
39585 HAVE_JAVA_IN_PATH=$ac_cv_prog_HAVE_JAVA_IN_PATH
39586 if test -n "$HAVE_JAVA_IN_PATH"; then
39587   :
39588 else
39589   :
39590 fi
39591
39592
39593     # Extract the first word of "jre", so it can be a program name with args.
39594 set dummy jre; ac_word=$2
39595 :
39596 if ${ac_cv_prog_HAVE_JRE_IN_PATH+:} false; then :
39597   $as_echo_n "(cached) " >&6
39598 else
39599   if test -n "$HAVE_JRE_IN_PATH"; then
39600   ac_cv_prog_HAVE_JRE_IN_PATH="$HAVE_JRE_IN_PATH" # Let the user override the test.
39601 else
39602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39603 for as_dir in $PATH
39604 do
39605   IFS=$as_save_IFS
39606   test -z "$as_dir" && as_dir=.
39607     for ac_exec_ext in '' $ac_executable_extensions; do
39608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39609     ac_cv_prog_HAVE_JRE_IN_PATH="yes"
39610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39611     break 2
39612   fi
39613 done
39614   done
39615 IFS=$as_save_IFS
39616
39617 fi
39618 fi
39619 HAVE_JRE_IN_PATH=$ac_cv_prog_HAVE_JRE_IN_PATH
39620 if test -n "$HAVE_JRE_IN_PATH"; then
39621   :
39622 else
39623   :
39624 fi
39625
39626
39627     # Extract the first word of "jview", so it can be a program name with args.
39628 set dummy jview; ac_word=$2
39629 :
39630 if ${ac_cv_prog_HAVE_JVIEW_IN_PATH+:} false; then :
39631   $as_echo_n "(cached) " >&6
39632 else
39633   if test -n "$HAVE_JVIEW_IN_PATH"; then
39634   ac_cv_prog_HAVE_JVIEW_IN_PATH="$HAVE_JVIEW_IN_PATH" # Let the user override the test.
39635 else
39636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39637 for as_dir in $PATH
39638 do
39639   IFS=$as_save_IFS
39640   test -z "$as_dir" && as_dir=.
39641     for ac_exec_ext in '' $ac_executable_extensions; do
39642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39643     ac_cv_prog_HAVE_JVIEW_IN_PATH="yes"
39644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39645     break 2
39646   fi
39647 done
39648   done
39649 IFS=$as_save_IFS
39650
39651 fi
39652 fi
39653 HAVE_JVIEW_IN_PATH=$ac_cv_prog_HAVE_JVIEW_IN_PATH
39654 if test -n "$HAVE_JVIEW_IN_PATH"; then
39655   :
39656 else
39657   :
39658 fi
39659
39660
39661
39662     export CLASSPATH
39663     if test -n "$HAVE_GIJ_IN_PATH" \
39664        && gij --version >/dev/null 2>/dev/null \
39665        ; then
39666       HAVE_GIJ=1
39667       CONF_JAVA="gij"
39668     else
39669       if test -n "$HAVE_JAVA_IN_PATH" \
39670          && java -version >/dev/null 2>/dev/null \
39671          ; then
39672         HAVE_JAVA=1
39673         CONF_JAVA="java"
39674       else
39675         if test -n "$HAVE_JRE_IN_PATH" \
39676            && (jre >/dev/null 2>/dev/null || test $? = 1) \
39677            ; then
39678           HAVE_JRE=1
39679           CONF_JAVA="jre"
39680         else
39681           if test -n "$HAVE_JVIEW_IN_PATH" \
39682              && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
39683              ; then
39684             HAVE_JVIEW=1
39685             CONF_JAVA="jview"
39686           else
39687             HAVE_JAVAEXEC=
39688           fi
39689         fi
39690       fi
39691     fi
39692
39693   fi
39694   if test -n "$HAVE_JAVAEXEC"; then
39695     ac_result="$CONF_JAVA"
39696   else
39697     ac_result="no"
39698   fi
39699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
39700 $as_echo "$ac_result" >&6; }
39701
39702
39703
39704
39705
39706
39707
39708
39709
39710
39711 ac_config_files="$ac_config_files Makefile po/Makefile.in doc/yacc.1"
39712
39713 cat >confcache <<\_ACEOF
39714 # This file is a shell script that caches the results of configure
39715 # tests run on this system so they can be shared between configure
39716 # scripts and configure runs, see configure's option --config-cache.
39717 # It is not useful on other systems.  If it contains results you don't
39718 # want to keep, you may remove or edit it.
39719 #
39720 # config.status only pays attention to the cache file if you give it
39721 # the --recheck option to rerun configure.
39722 #
39723 # `ac_cv_env_foo' variables (set or unset) will be overridden when
39724 # loading this file, other *unset* `ac_cv_foo' will be assigned the
39725 # following values.
39726
39727 _ACEOF
39728
39729 # The following way of writing the cache mishandles newlines in values,
39730 # but we know of no workaround that is simple, portable, and efficient.
39731 # So, we kill variables containing newlines.
39732 # Ultrix sh set writes to stderr and can't be redirected directly,
39733 # and sets the high bit in the cache file unless we assign to the vars.
39734 (
39735   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
39736     eval ac_val=\$$ac_var
39737     case $ac_val in #(
39738     *${as_nl}*)
39739       case $ac_var in #(
39740       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
39741 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
39742       esac
39743       case $ac_var in #(
39744       _ | IFS | as_nl) ;; #(
39745       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
39746       *) { eval $ac_var=; unset $ac_var;} ;;
39747       esac ;;
39748     esac
39749   done
39750
39751   (set) 2>&1 |
39752     case $as_nl`(ac_space=' '; set) 2>&1` in #(
39753     *${as_nl}ac_space=\ *)
39754       # `set' does not quote correctly, so add quotes: double-quote
39755       # substitution turns \\\\ into \\, and sed turns \\ into \.
39756       sed -n \
39757         "s/'/'\\\\''/g;
39758           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
39759       ;; #(
39760     *)
39761       # `set' quotes correctly as required by POSIX, so do not add quotes.
39762       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
39763       ;;
39764     esac |
39765     sort
39766 ) |
39767   sed '
39768      /^ac_cv_env_/b end
39769      t clear
39770      :clear
39771      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
39772      t end
39773      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
39774      :end' >>confcache
39775 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
39776   if test -w "$cache_file"; then
39777     if test "x$cache_file" != "x/dev/null"; then
39778       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
39779 $as_echo "$as_me: updating cache $cache_file" >&6;}
39780       if test ! -f "$cache_file" || test -h "$cache_file"; then
39781         cat confcache >"$cache_file"
39782       else
39783         case $cache_file in #(
39784         */* | ?:*)
39785           mv -f confcache "$cache_file"$$ &&
39786           mv -f "$cache_file"$$ "$cache_file" ;; #(
39787         *)
39788           mv -f confcache "$cache_file" ;;
39789         esac
39790       fi
39791     fi
39792   else
39793     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
39794 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
39795   fi
39796 fi
39797 rm -f confcache
39798
39799 test "x$prefix" = xNONE && prefix=$ac_default_prefix
39800 # Let make expand exec_prefix.
39801 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
39802
39803 DEFS=-DHAVE_CONFIG_H
39804
39805 ac_libobjs=
39806 ac_ltlibobjs=
39807 U=
39808 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
39809   # 1. Remove the extension, and $U if already installed.
39810   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
39811   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
39812   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
39813   #    will be set to the directory where LIBOBJS objects are built.
39814   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
39815   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
39816 done
39817 LIBOBJS=$ac_libobjs
39818
39819 LTLIBOBJS=$ac_ltlibobjs
39820
39821
39822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
39823 $as_echo_n "checking that generated files are newer than configure... " >&6; }
39824    if test -n "$am_sleep_pid"; then
39825      # Hide warnings about reused PIDs.
39826      wait $am_sleep_pid 2>/dev/null
39827    fi
39828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
39829 $as_echo "done" >&6; }
39830  if test -n "$EXEEXT"; then
39831   am__EXEEXT_TRUE=
39832   am__EXEEXT_FALSE='#'
39833 else
39834   am__EXEEXT_TRUE='#'
39835   am__EXEEXT_FALSE=
39836 fi
39837
39838 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
39839   as_fn_error $? "conditional \"AMDEP\" was never defined.
39840 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39841 fi
39842 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
39843   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
39844 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39845 fi
39846 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
39847   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
39848 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39849 fi
39850 if test -z "${ENABLE_GCC_WARNINGS_TRUE}" && test -z "${ENABLE_GCC_WARNINGS_FALSE}"; then
39851   as_fn_error $? "conditional \"ENABLE_GCC_WARNINGS\" was never defined.
39852 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39853 fi
39854 if test -z "${BISON_CXX_WORKS_TRUE}" && test -z "${BISON_CXX_WORKS_FALSE}"; then
39855   as_fn_error $? "conditional \"BISON_CXX_WORKS\" was never defined.
39856 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39857 fi
39858 if test -z "${ENABLE_YACC_TRUE}" && test -z "${ENABLE_YACC_FALSE}"; then
39859   as_fn_error $? "conditional \"ENABLE_YACC\" was never defined.
39860 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39861 fi
39862 if test -z "${FLEX_CXX_WORKS_TRUE}" && test -z "${FLEX_CXX_WORKS_FALSE}"; then
39863   as_fn_error $? "conditional \"FLEX_CXX_WORKS\" was never defined.
39864 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39865 fi
39866 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
39867   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
39868 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39869 fi
39870 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
39871   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
39872 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39873 fi
39874 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
39875 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
39876   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
39877 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39878 fi
39879 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
39880   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
39881 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39882 fi
39883
39884
39885 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
39886   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
39887 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39888 fi
39889 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
39890   as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
39891 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39892 fi
39893 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
39894   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
39895 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39896 fi
39897 CONFIG_INCLUDE=lib/config.h
39898
39899
39900
39901
39902   # Tell AC_LIBSOURCES where to find source files like alloca.c.
39903
39904
39905   # This hack originated in bison.  It is required when using non-recursive
39906   # automake rules to build from gnulib-provided lib/ sources.  Hence, LIB_DIR
39907   # is usually simply "lib".  Those rules use the list of names like "fchdir.o"
39908   # and "strstr.o" in gl_LIBOBJS.  With non-recursive make, we must prefix each
39909   # such file name with the "lib/" prefix.  See also build-aux/prefix-gnulib-mk.
39910   gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , lib/,g'`
39911
39912   # Listing the names of the variables to prefix is error-prone.
39913   # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
39914   # and whose value ends in '.h'.
39915   for ac_var in $ac_subst_vars
39916   do
39917     eval "ac_val=\$$ac_var"
39918     case $ac_var:$ac_val in
39919       *_H:*.h) eval "$ac_var=lib/\$$ac_var";;
39920     esac
39921   done
39922
39923
39924 if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
39925   as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
39926 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39927 fi
39928 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
39929   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
39930 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39931 fi
39932 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
39933   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
39934 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39935 fi
39936 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
39937   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
39938 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39939 fi
39940
39941     gl_libobjs=
39942     gl_ltlibobjs=
39943     if test -n "$gl_LIBOBJS"; then
39944       # Remove the extension.
39945       sed_drop_objext='s/\.o$//;s/\.obj$//'
39946       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39947         gl_libobjs="$gl_libobjs $i.$ac_objext"
39948         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
39949       done
39950     fi
39951     gl_LIBOBJS=$gl_libobjs
39952
39953     gl_LTLIBOBJS=$gl_ltlibobjs
39954
39955
39956
39957     gltests_libobjs=
39958     gltests_ltlibobjs=
39959     if test -n "$gltests_LIBOBJS"; then
39960       # Remove the extension.
39961       sed_drop_objext='s/\.o$//;s/\.obj$//'
39962       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39963         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
39964         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
39965       done
39966     fi
39967     gltests_LIBOBJS=$gltests_libobjs
39968
39969     gltests_LTLIBOBJS=$gltests_ltlibobjs
39970
39971
39972 if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
39973   as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
39974 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39975 fi
39976
39977 : "${CONFIG_STATUS=./config.status}"
39978 ac_write_fail=0
39979 ac_clean_files_save=$ac_clean_files
39980 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
39981 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
39982 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
39983 as_write_fail=0
39984 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
39985 #! $SHELL
39986 # Generated by $as_me.
39987 # Run this file to recreate the current configuration.
39988 # Compiler output produced by configure, useful for debugging
39989 # configure, is in config.log if it exists.
39990
39991 debug=false
39992 ac_cs_recheck=false
39993 ac_cs_silent=false
39994
39995 SHELL=\${CONFIG_SHELL-$SHELL}
39996 export SHELL
39997 _ASEOF
39998 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
39999 ## -------------------- ##
40000 ## M4sh Initialization. ##
40001 ## -------------------- ##
40002
40003 # Be more Bourne compatible
40004 DUALCASE=1; export DUALCASE # for MKS sh
40005 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
40006   emulate sh
40007   NULLCMD=:
40008   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
40009   # is contrary to our usage.  Disable this feature.
40010   alias -g '${1+"$@"}'='"$@"'
40011   setopt NO_GLOB_SUBST
40012 else
40013   case `(set -o) 2>/dev/null` in #(
40014   *posix*) :
40015     set -o posix ;; #(
40016   *) :
40017      ;;
40018 esac
40019 fi
40020
40021
40022 as_nl='
40023 '
40024 export as_nl
40025 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40026 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40027 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40028 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
40029 # Prefer a ksh shell builtin over an external printf program on Solaris,
40030 # but without wasting forks for bash or zsh.
40031 if test -z "$BASH_VERSION$ZSH_VERSION" \
40032     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
40033   as_echo='print -r --'
40034   as_echo_n='print -rn --'
40035 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
40036   as_echo='printf %s\n'
40037   as_echo_n='printf %s'
40038 else
40039   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
40040     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
40041     as_echo_n='/usr/ucb/echo -n'
40042   else
40043     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
40044     as_echo_n_body='eval
40045       arg=$1;
40046       case $arg in #(
40047       *"$as_nl"*)
40048         expr "X$arg" : "X\\(.*\\)$as_nl";
40049         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
40050       esac;
40051       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
40052     '
40053     export as_echo_n_body
40054     as_echo_n='sh -c $as_echo_n_body as_echo'
40055   fi
40056   export as_echo_body
40057   as_echo='sh -c $as_echo_body as_echo'
40058 fi
40059
40060 # The user is always right.
40061 if test "${PATH_SEPARATOR+set}" != set; then
40062   PATH_SEPARATOR=:
40063   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40064     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
40065       PATH_SEPARATOR=';'
40066   }
40067 fi
40068
40069
40070 # IFS
40071 # We need space, tab and new line, in precisely that order.  Quoting is
40072 # there to prevent editors from complaining about space-tab.
40073 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
40074 # splitting by setting IFS to empty value.)
40075 IFS=" ""        $as_nl"
40076
40077 # Find who we are.  Look in the path if we contain no directory separator.
40078 as_myself=
40079 case $0 in #((
40080   *[\\/]* ) as_myself=$0 ;;
40081   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40082 for as_dir in $PATH
40083 do
40084   IFS=$as_save_IFS
40085   test -z "$as_dir" && as_dir=.
40086     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
40087   done
40088 IFS=$as_save_IFS
40089
40090      ;;
40091 esac
40092 # We did not find ourselves, most probably we were run as `sh COMMAND'
40093 # in which case we are not to be found in the path.
40094 if test "x$as_myself" = x; then
40095   as_myself=$0
40096 fi
40097 if test ! -f "$as_myself"; then
40098   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
40099   exit 1
40100 fi
40101
40102 # Unset variables that we do not need and which cause bugs (e.g. in
40103 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
40104 # suppresses any "Segmentation fault" message there.  '((' could
40105 # trigger a bug in pdksh 5.2.14.
40106 for as_var in BASH_ENV ENV MAIL MAILPATH
40107 do eval test x\${$as_var+set} = xset \
40108   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
40109 done
40110 PS1='$ '
40111 PS2='> '
40112 PS4='+ '
40113
40114 # NLS nuisances.
40115 LC_ALL=C
40116 export LC_ALL
40117 LANGUAGE=C
40118 export LANGUAGE
40119
40120 # CDPATH.
40121 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
40122
40123
40124 # as_fn_error STATUS ERROR [LINENO LOG_FD]
40125 # ----------------------------------------
40126 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
40127 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
40128 # script with STATUS, using 1 if that was 0.
40129 as_fn_error ()
40130 {
40131   as_status=$1; test $as_status -eq 0 && as_status=1
40132   if test "$4"; then
40133     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
40134     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
40135   fi
40136   $as_echo "$as_me: error: $2" >&2
40137   as_fn_exit $as_status
40138 } # as_fn_error
40139
40140
40141 # as_fn_set_status STATUS
40142 # -----------------------
40143 # Set $? to STATUS, without forking.
40144 as_fn_set_status ()
40145 {
40146   return $1
40147 } # as_fn_set_status
40148
40149 # as_fn_exit STATUS
40150 # -----------------
40151 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
40152 as_fn_exit ()
40153 {
40154   set +e
40155   as_fn_set_status $1
40156   exit $1
40157 } # as_fn_exit
40158
40159 # as_fn_unset VAR
40160 # ---------------
40161 # Portably unset VAR.
40162 as_fn_unset ()
40163 {
40164   { eval $1=; unset $1;}
40165 }
40166 as_unset=as_fn_unset
40167 # as_fn_append VAR VALUE
40168 # ----------------------
40169 # Append the text in VALUE to the end of the definition contained in VAR. Take
40170 # advantage of any shell optimizations that allow amortized linear growth over
40171 # repeated appends, instead of the typical quadratic growth present in naive
40172 # implementations.
40173 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
40174   eval 'as_fn_append ()
40175   {
40176     eval $1+=\$2
40177   }'
40178 else
40179   as_fn_append ()
40180   {
40181     eval $1=\$$1\$2
40182   }
40183 fi # as_fn_append
40184
40185 # as_fn_arith ARG...
40186 # ------------------
40187 # Perform arithmetic evaluation on the ARGs, and store the result in the
40188 # global $as_val. Take advantage of shells that can avoid forks. The arguments
40189 # must be portable across $(()) and expr.
40190 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
40191   eval 'as_fn_arith ()
40192   {
40193     as_val=$(( $* ))
40194   }'
40195 else
40196   as_fn_arith ()
40197   {
40198     as_val=`expr "$@" || test $? -eq 1`
40199   }
40200 fi # as_fn_arith
40201
40202
40203 if expr a : '\(a\)' >/dev/null 2>&1 &&
40204    test "X`expr 00001 : '.*\(...\)'`" = X001; then
40205   as_expr=expr
40206 else
40207   as_expr=false
40208 fi
40209
40210 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
40211   as_basename=basename
40212 else
40213   as_basename=false
40214 fi
40215
40216 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
40217   as_dirname=dirname
40218 else
40219   as_dirname=false
40220 fi
40221
40222 as_me=`$as_basename -- "$0" ||
40223 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
40224          X"$0" : 'X\(//\)$' \| \
40225          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
40226 $as_echo X/"$0" |
40227     sed '/^.*\/\([^/][^/]*\)\/*$/{
40228             s//\1/
40229             q
40230           }
40231           /^X\/\(\/\/\)$/{
40232             s//\1/
40233             q
40234           }
40235           /^X\/\(\/\).*/{
40236             s//\1/
40237             q
40238           }
40239           s/.*/./; q'`
40240
40241 # Avoid depending upon Character Ranges.
40242 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
40243 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
40244 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40245 as_cr_digits='0123456789'
40246 as_cr_alnum=$as_cr_Letters$as_cr_digits
40247
40248 ECHO_C= ECHO_N= ECHO_T=
40249 case `echo -n x` in #(((((
40250 -n*)
40251   case `echo 'xy\c'` in
40252   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
40253   xy)  ECHO_C='\c';;
40254   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
40255        ECHO_T=' ';;
40256   esac;;
40257 *)
40258   ECHO_N='-n';;
40259 esac
40260
40261 rm -f conf$$ conf$$.exe conf$$.file
40262 if test -d conf$$.dir; then
40263   rm -f conf$$.dir/conf$$.file
40264 else
40265   rm -f conf$$.dir
40266   mkdir conf$$.dir 2>/dev/null
40267 fi
40268 if (echo >conf$$.file) 2>/dev/null; then
40269   if ln -s conf$$.file conf$$ 2>/dev/null; then
40270     as_ln_s='ln -s'
40271     # ... but there are two gotchas:
40272     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
40273     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
40274     # In both cases, we have to default to `cp -pR'.
40275     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
40276       as_ln_s='cp -pR'
40277   elif ln conf$$.file conf$$ 2>/dev/null; then
40278     as_ln_s=ln
40279   else
40280     as_ln_s='cp -pR'
40281   fi
40282 else
40283   as_ln_s='cp -pR'
40284 fi
40285 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
40286 rmdir conf$$.dir 2>/dev/null
40287
40288
40289 # as_fn_mkdir_p
40290 # -------------
40291 # Create "$as_dir" as a directory, including parents if necessary.
40292 as_fn_mkdir_p ()
40293 {
40294
40295   case $as_dir in #(
40296   -*) as_dir=./$as_dir;;
40297   esac
40298   test -d "$as_dir" || eval $as_mkdir_p || {
40299     as_dirs=
40300     while :; do
40301       case $as_dir in #(
40302       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
40303       *) as_qdir=$as_dir;;
40304       esac
40305       as_dirs="'$as_qdir' $as_dirs"
40306       as_dir=`$as_dirname -- "$as_dir" ||
40307 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40308          X"$as_dir" : 'X\(//\)[^/]' \| \
40309          X"$as_dir" : 'X\(//\)$' \| \
40310          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
40311 $as_echo X"$as_dir" |
40312     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40313             s//\1/
40314             q
40315           }
40316           /^X\(\/\/\)[^/].*/{
40317             s//\1/
40318             q
40319           }
40320           /^X\(\/\/\)$/{
40321             s//\1/
40322             q
40323           }
40324           /^X\(\/\).*/{
40325             s//\1/
40326             q
40327           }
40328           s/.*/./; q'`
40329       test -d "$as_dir" && break
40330     done
40331     test -z "$as_dirs" || eval "mkdir $as_dirs"
40332   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
40333
40334
40335 } # as_fn_mkdir_p
40336 if mkdir -p . 2>/dev/null; then
40337   as_mkdir_p='mkdir -p "$as_dir"'
40338 else
40339   test -d ./-p && rmdir ./-p
40340   as_mkdir_p=false
40341 fi
40342
40343
40344 # as_fn_executable_p FILE
40345 # -----------------------
40346 # Test if FILE is an executable regular file.
40347 as_fn_executable_p ()
40348 {
40349   test -f "$1" && test -x "$1"
40350 } # as_fn_executable_p
40351 as_test_x='test -x'
40352 as_executable_p=as_fn_executable_p
40353
40354 # Sed expression to map a string onto a valid CPP name.
40355 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
40356
40357 # Sed expression to map a string onto a valid variable name.
40358 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
40359
40360
40361 exec 6>&1
40362 ## ----------------------------------- ##
40363 ## Main body of $CONFIG_STATUS script. ##
40364 ## ----------------------------------- ##
40365 _ASEOF
40366 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
40367
40368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40369 # Save the log message, to keep $0 and so on meaningful, and to
40370 # report actual input values of CONFIG_FILES etc. instead of their
40371 # values after options handling.
40372 ac_log="
40373 This file was extended by GNU Bison $as_me 3.0.5, which was
40374 generated by GNU Autoconf 2.69.  Invocation command line was
40375
40376   CONFIG_FILES    = $CONFIG_FILES
40377   CONFIG_HEADERS  = $CONFIG_HEADERS
40378   CONFIG_LINKS    = $CONFIG_LINKS
40379   CONFIG_COMMANDS = $CONFIG_COMMANDS
40380   $ $0 $@
40381
40382 on `(hostname || uname -n) 2>/dev/null | sed 1q`
40383 "
40384
40385 _ACEOF
40386
40387 case $ac_config_files in *"
40388 "*) set x $ac_config_files; shift; ac_config_files=$*;;
40389 esac
40390
40391 case $ac_config_headers in *"
40392 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
40393 esac
40394
40395
40396 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40397 # Files that config.status was made for.
40398 config_files="$ac_config_files"
40399 config_headers="$ac_config_headers"
40400 config_links="$ac_config_links"
40401 config_commands="$ac_config_commands"
40402
40403 _ACEOF
40404
40405 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40406 ac_cs_usage="\
40407 \`$as_me' instantiates files and other configuration actions
40408 from templates according to the current configuration.  Unless the files
40409 and actions are specified as TAGs, all are instantiated by default.
40410
40411 Usage: $0 [OPTION]... [TAG]...
40412
40413   -h, --help       print this help, then exit
40414   -V, --version    print version number and configuration settings, then exit
40415       --config     print configuration, then exit
40416   -q, --quiet, --silent
40417                    do not print progress messages
40418   -d, --debug      don't remove temporary files
40419       --recheck    update $as_me by reconfiguring in the same conditions
40420       --file=FILE[:TEMPLATE]
40421                    instantiate the configuration file FILE
40422       --header=FILE[:TEMPLATE]
40423                    instantiate the configuration header FILE
40424
40425 Configuration files:
40426 $config_files
40427
40428 Configuration headers:
40429 $config_headers
40430
40431 Configuration links:
40432 $config_links
40433
40434 Configuration commands:
40435 $config_commands
40436
40437 Report bugs to <bug-bison@gnu.org>.
40438 GNU Bison home page: <http://www.gnu.org/software/bison/>.
40439 General help using GNU software: <http://www.gnu.org/gethelp/>."
40440
40441 _ACEOF
40442 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40443 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
40444 ac_cs_version="\\
40445 GNU Bison config.status 3.0.5
40446 configured by $0, generated by GNU Autoconf 2.69,
40447   with options \\"\$ac_cs_config\\"
40448
40449 Copyright (C) 2012 Free Software Foundation, Inc.
40450 This config.status script is free software; the Free Software Foundation
40451 gives unlimited permission to copy, distribute and modify it."
40452
40453 ac_pwd='$ac_pwd'
40454 srcdir='$srcdir'
40455 INSTALL='$INSTALL'
40456 MKDIR_P='$MKDIR_P'
40457 AWK='$AWK'
40458 test -n "\$AWK" || AWK=awk
40459 _ACEOF
40460
40461 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40462 # The default lists apply if the user does not specify any file.
40463 ac_need_defaults=:
40464 while test $# != 0
40465 do
40466   case $1 in
40467   --*=?*)
40468     ac_option=`expr "X$1" : 'X\([^=]*\)='`
40469     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
40470     ac_shift=:
40471     ;;
40472   --*=)
40473     ac_option=`expr "X$1" : 'X\([^=]*\)='`
40474     ac_optarg=
40475     ac_shift=:
40476     ;;
40477   *)
40478     ac_option=$1
40479     ac_optarg=$2
40480     ac_shift=shift
40481     ;;
40482   esac
40483
40484   case $ac_option in
40485   # Handling of the options.
40486   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
40487     ac_cs_recheck=: ;;
40488   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
40489     $as_echo "$ac_cs_version"; exit ;;
40490   --config | --confi | --conf | --con | --co | --c )
40491     $as_echo "$ac_cs_config"; exit ;;
40492   --debug | --debu | --deb | --de | --d | -d )
40493     debug=: ;;
40494   --file | --fil | --fi | --f )
40495     $ac_shift
40496     case $ac_optarg in
40497     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40498     '') as_fn_error $? "missing file argument" ;;
40499     esac
40500     as_fn_append CONFIG_FILES " '$ac_optarg'"
40501     ac_need_defaults=false;;
40502   --header | --heade | --head | --hea )
40503     $ac_shift
40504     case $ac_optarg in
40505     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40506     esac
40507     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
40508     ac_need_defaults=false;;
40509   --he | --h)
40510     # Conflict between --help and --header
40511     as_fn_error $? "ambiguous option: \`$1'
40512 Try \`$0 --help' for more information.";;
40513   --help | --hel | -h )
40514     $as_echo "$ac_cs_usage"; exit ;;
40515   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
40516   | -silent | --silent | --silen | --sile | --sil | --si | --s)
40517     ac_cs_silent=: ;;
40518
40519   # This is an error.
40520   -*) as_fn_error $? "unrecognized option: \`$1'
40521 Try \`$0 --help' for more information." ;;
40522
40523   *) as_fn_append ac_config_targets " $1"
40524      ac_need_defaults=false ;;
40525
40526   esac
40527   shift
40528 done
40529
40530 ac_configure_extra_args=
40531
40532 if $ac_cs_silent; then
40533   exec 6>/dev/null
40534   ac_configure_extra_args="$ac_configure_extra_args --silent"
40535 fi
40536
40537 _ACEOF
40538 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40539 if \$ac_cs_recheck; then
40540   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
40541   shift
40542   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
40543   CONFIG_SHELL='$SHELL'
40544   export CONFIG_SHELL
40545   exec "\$@"
40546 fi
40547
40548 _ACEOF
40549 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40550 exec 5>>config.log
40551 {
40552   echo
40553   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
40554 ## Running $as_me. ##
40555 _ASBOX
40556   $as_echo "$ac_log"
40557 } >&5
40558
40559 _ACEOF
40560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40561 #
40562 # INIT-COMMANDS
40563 #
40564 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
40565 GNUmakefile=$GNUmakefile
40566 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
40567     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
40568     # from automake < 1.5.
40569     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
40570     # Capture the value of LINGUAS because we need it to compute CATALOGS.
40571     LINGUAS="${LINGUAS-%UNSET%}"
40572
40573
40574
40575 _ACEOF
40576
40577 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40578
40579 # Handling of arguments.
40580 for ac_config_target in $ac_config_targets
40581 do
40582   case $ac_config_target in
40583     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.in.h" ;;
40584     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
40585     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
40586     "javacomp.sh") CONFIG_FILES="$CONFIG_FILES javacomp.sh:build-aux/javacomp.sh.in" ;;
40587     "javaexec.sh") CONFIG_FILES="$CONFIG_FILES javaexec.sh:build-aux/javaexec.sh.in" ;;
40588     "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
40589     "runtime-po/Makefile.in") CONFIG_FILES="$CONFIG_FILES runtime-po/Makefile.in" ;;
40590     "etc/bench.pl") CONFIG_FILES="$CONFIG_FILES etc/bench.pl" ;;
40591     "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
40592     "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
40593     "tests/bison") CONFIG_FILES="$CONFIG_FILES tests/bison" ;;
40594     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
40595     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
40596     "doc/yacc.1") CONFIG_FILES="$CONFIG_FILES doc/yacc.1" ;;
40597
40598   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
40599   esac
40600 done
40601
40602
40603 # If the user did not use the arguments to specify the items to instantiate,
40604 # then the envvar interface is used.  Set only those that are not.
40605 # We use the long form for the default assignment because of an extremely
40606 # bizarre bug on SunOS 4.1.3.
40607 if $ac_need_defaults; then
40608   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
40609   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
40610   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
40611   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
40612 fi
40613
40614 # Have a temporary directory for convenience.  Make it in the build tree
40615 # simply because there is no reason against having it here, and in addition,
40616 # creating and moving files from /tmp can sometimes cause problems.
40617 # Hook for its removal unless debugging.
40618 # Note that there is a small window in which the directory will not be cleaned:
40619 # after its creation but before its name has been assigned to `$tmp'.
40620 $debug ||
40621 {
40622   tmp= ac_tmp=
40623   trap 'exit_status=$?
40624   : "${ac_tmp:=$tmp}"
40625   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
40626 ' 0
40627   trap 'as_fn_exit 1' 1 2 13 15
40628 }
40629 # Create a (secure) tmp directory for tmp files.
40630
40631 {
40632   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
40633   test -d "$tmp"
40634 }  ||
40635 {
40636   tmp=./conf$$-$RANDOM
40637   (umask 077 && mkdir "$tmp")
40638 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
40639 ac_tmp=$tmp
40640
40641 # Set up the scripts for CONFIG_FILES section.
40642 # No need to generate them if there are no CONFIG_FILES.
40643 # This happens for instance with `./config.status config.h'.
40644 if test -n "$CONFIG_FILES"; then
40645
40646
40647 ac_cr=`echo X | tr X '\015'`
40648 # On cygwin, bash can eat \r inside `` if the user requested igncr.
40649 # But we know of no other shell where ac_cr would be empty at this
40650 # point, so we can use a bashism as a fallback.
40651 if test "x$ac_cr" = x; then
40652   eval ac_cr=\$\'\\r\'
40653 fi
40654 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
40655 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
40656   ac_cs_awk_cr='\\r'
40657 else
40658   ac_cs_awk_cr=$ac_cr
40659 fi
40660
40661 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
40662 _ACEOF
40663
40664
40665 {
40666   echo "cat >conf$$subs.awk <<_ACEOF" &&
40667   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
40668   echo "_ACEOF"
40669 } >conf$$subs.sh ||
40670   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40671 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
40672 ac_delim='%!_!# '
40673 for ac_last_try in false false false false false :; do
40674   . ./conf$$subs.sh ||
40675     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40676
40677   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
40678   if test $ac_delim_n = $ac_delim_num; then
40679     break
40680   elif $ac_last_try; then
40681     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40682   else
40683     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40684   fi
40685 done
40686 rm -f conf$$subs.sh
40687
40688 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40689 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
40690 _ACEOF
40691 sed -n '
40692 h
40693 s/^/S["/; s/!.*/"]=/
40694 p
40695 g
40696 s/^[^!]*!//
40697 :repl
40698 t repl
40699 s/'"$ac_delim"'$//
40700 t delim
40701 :nl
40702 h
40703 s/\(.\{148\}\)..*/\1/
40704 t more1
40705 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
40706 p
40707 n
40708 b repl
40709 :more1
40710 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40711 p
40712 g
40713 s/.\{148\}//
40714 t nl
40715 :delim
40716 h
40717 s/\(.\{148\}\)..*/\1/
40718 t more2
40719 s/["\\]/\\&/g; s/^/"/; s/$/"/
40720 p
40721 b
40722 :more2
40723 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40724 p
40725 g
40726 s/.\{148\}//
40727 t delim
40728 ' <conf$$subs.awk | sed '
40729 /^[^""]/{
40730   N
40731   s/\n//
40732 }
40733 ' >>$CONFIG_STATUS || ac_write_fail=1
40734 rm -f conf$$subs.awk
40735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40736 _ACAWK
40737 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
40738   for (key in S) S_is_set[key] = 1
40739   FS = "\a"
40740
40741 }
40742 {
40743   line = $ 0
40744   nfields = split(line, field, "@")
40745   substed = 0
40746   len = length(field[1])
40747   for (i = 2; i < nfields; i++) {
40748     key = field[i]
40749     keylen = length(key)
40750     if (S_is_set[key]) {
40751       value = S[key]
40752       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
40753       len += length(value) + length(field[++i])
40754       substed = 1
40755     } else
40756       len += 1 + keylen
40757   }
40758
40759   print line
40760 }
40761
40762 _ACAWK
40763 _ACEOF
40764 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40765 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
40766   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
40767 else
40768   cat
40769 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
40770   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
40771 _ACEOF
40772
40773 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
40774 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
40775 # trailing colons and then remove the whole line if VPATH becomes empty
40776 # (actually we leave an empty line to preserve line numbers).
40777 if test "x$srcdir" = x.; then
40778   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
40779 h
40780 s///
40781 s/^/:/
40782 s/[      ]*$/:/
40783 s/:\$(srcdir):/:/g
40784 s/:\${srcdir}:/:/g
40785 s/:@srcdir@:/:/g
40786 s/^:*//
40787 s/:*$//
40788 x
40789 s/\(=[   ]*\).*/\1/
40790 G
40791 s/\n//
40792 s/^[^=]*=[       ]*$//
40793 }'
40794 fi
40795
40796 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40797 fi # test -n "$CONFIG_FILES"
40798
40799 # Set up the scripts for CONFIG_HEADERS section.
40800 # No need to generate them if there are no CONFIG_HEADERS.
40801 # This happens for instance with `./config.status Makefile'.
40802 if test -n "$CONFIG_HEADERS"; then
40803 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
40804 BEGIN {
40805 _ACEOF
40806
40807 # Transform confdefs.h into an awk script `defines.awk', embedded as
40808 # here-document in config.status, that substitutes the proper values into
40809 # config.h.in to produce config.h.
40810
40811 # Create a delimiter string that does not exist in confdefs.h, to ease
40812 # handling of long lines.
40813 ac_delim='%!_!# '
40814 for ac_last_try in false false :; do
40815   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
40816   if test -z "$ac_tt"; then
40817     break
40818   elif $ac_last_try; then
40819     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
40820   else
40821     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40822   fi
40823 done
40824
40825 # For the awk script, D is an array of macro values keyed by name,
40826 # likewise P contains macro parameters if any.  Preserve backslash
40827 # newline sequences.
40828
40829 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
40830 sed -n '
40831 s/.\{148\}/&'"$ac_delim"'/g
40832 t rset
40833 :rset
40834 s/^[     ]*#[    ]*define[       ][      ]*/ /
40835 t def
40836 d
40837 :def
40838 s/\\$//
40839 t bsnl
40840 s/["\\]/\\&/g
40841 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
40842 D["\1"]=" \3"/p
40843 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
40844 d
40845 :bsnl
40846 s/["\\]/\\&/g
40847 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
40848 D["\1"]=" \3\\\\\\n"\\/p
40849 t cont
40850 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
40851 t cont
40852 d
40853 :cont
40854 n
40855 s/.\{148\}/&'"$ac_delim"'/g
40856 t clear
40857 :clear
40858 s/\\$//
40859 t bsnlc
40860 s/["\\]/\\&/g; s/^/"/; s/$/"/p
40861 d
40862 :bsnlc
40863 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
40864 b cont
40865 ' <confdefs.h | sed '
40866 s/'"$ac_delim"'/"\\\
40867 "/g' >>$CONFIG_STATUS || ac_write_fail=1
40868
40869 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40870   for (key in D) D_is_set[key] = 1
40871   FS = "\a"
40872 }
40873 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
40874   line = \$ 0
40875   split(line, arg, " ")
40876   if (arg[1] == "#") {
40877     defundef = arg[2]
40878     mac1 = arg[3]
40879   } else {
40880     defundef = substr(arg[1], 2)
40881     mac1 = arg[2]
40882   }
40883   split(mac1, mac2, "(") #)
40884   macro = mac2[1]
40885   prefix = substr(line, 1, index(line, defundef) - 1)
40886   if (D_is_set[macro]) {
40887     # Preserve the white space surrounding the "#".
40888     print prefix "define", macro P[macro] D[macro]
40889     next
40890   } else {
40891     # Replace #undef with comments.  This is necessary, for example,
40892     # in the case of _POSIX_SOURCE, which is predefined and required
40893     # on some systems where configure will not decide to define it.
40894     if (defundef == "undef") {
40895       print "/*", prefix defundef, macro, "*/"
40896       next
40897     }
40898   }
40899 }
40900 { print }
40901 _ACAWK
40902 _ACEOF
40903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40904   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
40905 fi # test -n "$CONFIG_HEADERS"
40906
40907
40908 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
40909 shift
40910 for ac_tag
40911 do
40912   case $ac_tag in
40913   :[FHLC]) ac_mode=$ac_tag; continue;;
40914   esac
40915   case $ac_mode$ac_tag in
40916   :[FHL]*:*);;
40917   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
40918   :[FH]-) ac_tag=-:-;;
40919   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
40920   esac
40921   ac_save_IFS=$IFS
40922   IFS=:
40923   set x $ac_tag
40924   IFS=$ac_save_IFS
40925   shift
40926   ac_file=$1
40927   shift
40928
40929   case $ac_mode in
40930   :L) ac_source=$1;;
40931   :[FH])
40932     ac_file_inputs=
40933     for ac_f
40934     do
40935       case $ac_f in
40936       -) ac_f="$ac_tmp/stdin";;
40937       *) # Look for the file first in the build tree, then in the source tree
40938          # (if the path is not absolute).  The absolute path cannot be DOS-style,
40939          # because $ac_f cannot contain `:'.
40940          test -f "$ac_f" ||
40941            case $ac_f in
40942            [\\/$]*) false;;
40943            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
40944            esac ||
40945            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
40946       esac
40947       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
40948       as_fn_append ac_file_inputs " '$ac_f'"
40949     done
40950
40951     # Let's still pretend it is `configure' which instantiates (i.e., don't
40952     # use $as_me), people would be surprised to read:
40953     #    /* config.h.  Generated by config.status.  */
40954     configure_input='Generated from '`
40955           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
40956         `' by configure.'
40957     if test x"$ac_file" != x-; then
40958       configure_input="$ac_file.  $configure_input"
40959       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
40960 $as_echo "$as_me: creating $ac_file" >&6;}
40961     fi
40962     # Neutralize special characters interpreted by sed in replacement strings.
40963     case $configure_input in #(
40964     *\&* | *\|* | *\\* )
40965        ac_sed_conf_input=`$as_echo "$configure_input" |
40966        sed 's/[\\\\&|]/\\\\&/g'`;; #(
40967     *) ac_sed_conf_input=$configure_input;;
40968     esac
40969
40970     case $ac_tag in
40971     *:-:* | *:-) cat >"$ac_tmp/stdin" \
40972       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
40973     esac
40974     ;;
40975   esac
40976
40977   ac_dir=`$as_dirname -- "$ac_file" ||
40978 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40979          X"$ac_file" : 'X\(//\)[^/]' \| \
40980          X"$ac_file" : 'X\(//\)$' \| \
40981          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
40982 $as_echo X"$ac_file" |
40983     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40984             s//\1/
40985             q
40986           }
40987           /^X\(\/\/\)[^/].*/{
40988             s//\1/
40989             q
40990           }
40991           /^X\(\/\/\)$/{
40992             s//\1/
40993             q
40994           }
40995           /^X\(\/\).*/{
40996             s//\1/
40997             q
40998           }
40999           s/.*/./; q'`
41000   as_dir="$ac_dir"; as_fn_mkdir_p
41001   ac_builddir=.
41002
41003 case "$ac_dir" in
41004 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
41005 *)
41006   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
41007   # A ".." for each directory in $ac_dir_suffix.
41008   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
41009   case $ac_top_builddir_sub in
41010   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
41011   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
41012   esac ;;
41013 esac
41014 ac_abs_top_builddir=$ac_pwd
41015 ac_abs_builddir=$ac_pwd$ac_dir_suffix
41016 # for backward compatibility:
41017 ac_top_builddir=$ac_top_build_prefix
41018
41019 case $srcdir in
41020   .)  # We are building in place.
41021     ac_srcdir=.
41022     ac_top_srcdir=$ac_top_builddir_sub
41023     ac_abs_top_srcdir=$ac_pwd ;;
41024   [\\/]* | ?:[\\/]* )  # Absolute name.
41025     ac_srcdir=$srcdir$ac_dir_suffix;
41026     ac_top_srcdir=$srcdir
41027     ac_abs_top_srcdir=$srcdir ;;
41028   *) # Relative name.
41029     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
41030     ac_top_srcdir=$ac_top_build_prefix$srcdir
41031     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
41032 esac
41033 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
41034
41035
41036   case $ac_mode in
41037   :F)
41038   #
41039   # CONFIG_FILE
41040   #
41041
41042   case $INSTALL in
41043   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
41044   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
41045   esac
41046   ac_MKDIR_P=$MKDIR_P
41047   case $MKDIR_P in
41048   [\\/$]* | ?:[\\/]* ) ;;
41049   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
41050   esac
41051 _ACEOF
41052
41053 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41054 # If the template does not know about datarootdir, expand it.
41055 # FIXME: This hack should be removed a few years after 2.60.
41056 ac_datarootdir_hack=; ac_datarootdir_seen=
41057 ac_sed_dataroot='
41058 /datarootdir/ {
41059   p
41060   q
41061 }
41062 /@datadir@/p
41063 /@docdir@/p
41064 /@infodir@/p
41065 /@localedir@/p
41066 /@mandir@/p'
41067 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
41068 *datarootdir*) ac_datarootdir_seen=yes;;
41069 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
41070   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
41071 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
41072 _ACEOF
41073 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41074   ac_datarootdir_hack='
41075   s&@datadir@&$datadir&g
41076   s&@docdir@&$docdir&g
41077   s&@infodir@&$infodir&g
41078   s&@localedir@&$localedir&g
41079   s&@mandir@&$mandir&g
41080   s&\\\${datarootdir}&$datarootdir&g' ;;
41081 esac
41082 _ACEOF
41083
41084 # Neutralize VPATH when `$srcdir' = `.'.
41085 # Shell code in configure.ac might set extrasub.
41086 # FIXME: do we really want to maintain this feature?
41087 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41088 ac_sed_extra="$ac_vpsub
41089 $extrasub
41090 _ACEOF
41091 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41092 :t
41093 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
41094 s|@configure_input@|$ac_sed_conf_input|;t t
41095 s&@top_builddir@&$ac_top_builddir_sub&;t t
41096 s&@top_build_prefix@&$ac_top_build_prefix&;t t
41097 s&@srcdir@&$ac_srcdir&;t t
41098 s&@abs_srcdir@&$ac_abs_srcdir&;t t
41099 s&@top_srcdir@&$ac_top_srcdir&;t t
41100 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
41101 s&@builddir@&$ac_builddir&;t t
41102 s&@abs_builddir@&$ac_abs_builddir&;t t
41103 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
41104 s&@INSTALL@&$ac_INSTALL&;t t
41105 s&@MKDIR_P@&$ac_MKDIR_P&;t t
41106 $ac_datarootdir_hack
41107 "
41108 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
41109   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41110
41111 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
41112   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
41113   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
41114       "$ac_tmp/out"`; test -z "$ac_out"; } &&
41115   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41116 which seems to be undefined.  Please make sure it is defined" >&5
41117 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41118 which seems to be undefined.  Please make sure it is defined" >&2;}
41119
41120   rm -f "$ac_tmp/stdin"
41121   case $ac_file in
41122   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
41123   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
41124   esac \
41125   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41126  ;;
41127   :H)
41128   #
41129   # CONFIG_HEADER
41130   #
41131   if test x"$ac_file" != x-; then
41132     {
41133       $as_echo "/* $configure_input  */" \
41134       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
41135     } >"$ac_tmp/config.h" \
41136       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41137     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
41138       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
41139 $as_echo "$as_me: $ac_file is unchanged" >&6;}
41140     else
41141       rm -f "$ac_file"
41142       mv "$ac_tmp/config.h" "$ac_file" \
41143         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41144     fi
41145   else
41146     $as_echo "/* $configure_input  */" \
41147       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
41148       || as_fn_error $? "could not create -" "$LINENO" 5
41149   fi
41150 # Compute "$ac_file"'s index in $config_headers.
41151 _am_arg="$ac_file"
41152 _am_stamp_count=1
41153 for _am_header in $config_headers :; do
41154   case $_am_header in
41155     $_am_arg | $_am_arg:* )
41156       break ;;
41157     * )
41158       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
41159   esac
41160 done
41161 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
41162 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41163          X"$_am_arg" : 'X\(//\)[^/]' \| \
41164          X"$_am_arg" : 'X\(//\)$' \| \
41165          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
41166 $as_echo X"$_am_arg" |
41167     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41168             s//\1/
41169             q
41170           }
41171           /^X\(\/\/\)[^/].*/{
41172             s//\1/
41173             q
41174           }
41175           /^X\(\/\/\)$/{
41176             s//\1/
41177             q
41178           }
41179           /^X\(\/\).*/{
41180             s//\1/
41181             q
41182           }
41183           s/.*/./; q'`/stamp-h$_am_stamp_count
41184  ;;
41185   :L)
41186   #
41187   # CONFIG_LINK
41188   #
41189
41190   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
41191     :
41192   else
41193     # Prefer the file from the source tree if names are identical.
41194     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
41195       ac_source=$srcdir/$ac_source
41196     fi
41197
41198     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
41199 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
41200
41201     if test ! -r "$ac_source"; then
41202       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
41203     fi
41204     rm -f "$ac_file"
41205
41206     # Try a relative symlink, then a hard link, then a copy.
41207     case $ac_source in
41208     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
41209         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
41210     esac
41211     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
41212       ln "$ac_source" "$ac_file" 2>/dev/null ||
41213       cp -p "$ac_source" "$ac_file" ||
41214       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
41215   fi
41216  ;;
41217   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
41218 $as_echo "$as_me: executing $ac_file commands" >&6;}
41219  ;;
41220   esac
41221
41222
41223   case $ac_file$ac_mode in
41224     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
41225   # Older Autoconf quotes --file arguments for eval, but not when files
41226   # are listed without --file.  Let's play safe and only enable the eval
41227   # if we detect the quoting.
41228   case $CONFIG_FILES in
41229   *\'*) eval set x "$CONFIG_FILES" ;;
41230   *)   set x $CONFIG_FILES ;;
41231   esac
41232   shift
41233   for mf
41234   do
41235     # Strip MF so we end up with the name of the file.
41236     mf=`echo "$mf" | sed -e 's/:.*$//'`
41237     # Check whether this is an Automake generated Makefile or not.
41238     # We used to match only the files named 'Makefile.in', but
41239     # some people rename them; so instead we look at the file content.
41240     # Grep'ing the first line is not enough: some people post-process
41241     # each Makefile.in and add a new line on top of each file to say so.
41242     # Grep'ing the whole file is not good either: AIX grep has a line
41243     # limit of 2048, but all sed's we know have understand at least 4000.
41244     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
41245       dirpart=`$as_dirname -- "$mf" ||
41246 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41247          X"$mf" : 'X\(//\)[^/]' \| \
41248          X"$mf" : 'X\(//\)$' \| \
41249          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
41250 $as_echo X"$mf" |
41251     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41252             s//\1/
41253             q
41254           }
41255           /^X\(\/\/\)[^/].*/{
41256             s//\1/
41257             q
41258           }
41259           /^X\(\/\/\)$/{
41260             s//\1/
41261             q
41262           }
41263           /^X\(\/\).*/{
41264             s//\1/
41265             q
41266           }
41267           s/.*/./; q'`
41268     else
41269       continue
41270     fi
41271     # Extract the definition of DEPDIR, am__include, and am__quote
41272     # from the Makefile without running 'make'.
41273     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
41274     test -z "$DEPDIR" && continue
41275     am__include=`sed -n 's/^am__include = //p' < "$mf"`
41276     test -z "$am__include" && continue
41277     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
41278     # Find all dependency output files, they are included files with
41279     # $(DEPDIR) in their names.  We invoke sed twice because it is the
41280     # simplest approach to changing $(DEPDIR) to its actual value in the
41281     # expansion.
41282     for file in `sed -n "
41283       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
41284          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
41285       # Make sure the directory exists.
41286       test -f "$dirpart/$file" && continue
41287       fdir=`$as_dirname -- "$file" ||
41288 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41289          X"$file" : 'X\(//\)[^/]' \| \
41290          X"$file" : 'X\(//\)$' \| \
41291          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
41292 $as_echo X"$file" |
41293     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41294             s//\1/
41295             q
41296           }
41297           /^X\(\/\/\)[^/].*/{
41298             s//\1/
41299             q
41300           }
41301           /^X\(\/\/\)$/{
41302             s//\1/
41303             q
41304           }
41305           /^X\(\/\).*/{
41306             s//\1/
41307             q
41308           }
41309           s/.*/./; q'`
41310       as_dir=$dirpart/$fdir; as_fn_mkdir_p
41311       # echo "creating $dirpart/$file"
41312       echo '# dummy' > "$dirpart/$file"
41313     done
41314   done
41315 }
41316  ;;
41317     "po-directories":C)
41318     for ac_file in $CONFIG_FILES; do
41319       # Support "outfile[:infile[:infile...]]"
41320       case "$ac_file" in
41321         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
41322       esac
41323       # PO directories have a Makefile.in generated from Makefile.in.in.
41324       case "$ac_file" in */Makefile.in)
41325         # Adjust a relative srcdir.
41326         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
41327         ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
41328         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
41329         # In autoconf-2.13 it is called $ac_given_srcdir.
41330         # In autoconf-2.50 it is called $srcdir.
41331         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
41332         case "$ac_given_srcdir" in
41333           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
41334           /*) top_srcdir="$ac_given_srcdir" ;;
41335           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
41336         esac
41337         # Treat a directory as a PO directory if and only if it has a
41338         # POTFILES.in file. This allows packages to have multiple PO
41339         # directories under different names or in different locations.
41340         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
41341           rm -f "$ac_dir/POTFILES"
41342           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
41343           gt_tab=`printf '\t'`
41344           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
41345           POMAKEFILEDEPS="POTFILES.in"
41346           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
41347           # on $ac_dir but don't depend on user-specified configuration
41348           # parameters.
41349           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
41350             # The LINGUAS file contains the set of available languages.
41351             if test -n "$OBSOLETE_ALL_LINGUAS"; then
41352               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
41353             fi
41354             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
41355             # Hide the ALL_LINGUAS assignment from automake < 1.5.
41356             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
41357             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
41358           else
41359             # The set of available languages was given in configure.in.
41360             # Hide the ALL_LINGUAS assignment from automake < 1.5.
41361             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
41362           fi
41363           # Compute POFILES
41364           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
41365           # Compute UPDATEPOFILES
41366           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
41367           # Compute DUMMYPOFILES
41368           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
41369           # Compute GMOFILES
41370           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
41371           case "$ac_given_srcdir" in
41372             .) srcdirpre= ;;
41373             *) srcdirpre='$(srcdir)/' ;;
41374           esac
41375           POFILES=
41376           UPDATEPOFILES=
41377           DUMMYPOFILES=
41378           GMOFILES=
41379           for lang in $ALL_LINGUAS; do
41380             POFILES="$POFILES $srcdirpre$lang.po"
41381             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
41382             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
41383             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
41384           done
41385           # CATALOGS depends on both $ac_dir and the user's LINGUAS
41386           # environment variable.
41387           INST_LINGUAS=
41388           if test -n "$ALL_LINGUAS"; then
41389             for presentlang in $ALL_LINGUAS; do
41390               useit=no
41391               if test "%UNSET%" != "$LINGUAS"; then
41392                 desiredlanguages="$LINGUAS"
41393               else
41394                 desiredlanguages="$ALL_LINGUAS"
41395               fi
41396               for desiredlang in $desiredlanguages; do
41397                 # Use the presentlang catalog if desiredlang is
41398                 #   a. equal to presentlang, or
41399                 #   b. a variant of presentlang (because in this case,
41400                 #      presentlang can be used as a fallback for messages
41401                 #      which are not translated in the desiredlang catalog).
41402                 case "$desiredlang" in
41403                   "$presentlang"*) useit=yes;;
41404                 esac
41405               done
41406               if test $useit = yes; then
41407                 INST_LINGUAS="$INST_LINGUAS $presentlang"
41408               fi
41409             done
41410           fi
41411           CATALOGS=
41412           if test -n "$INST_LINGUAS"; then
41413             for lang in $INST_LINGUAS; do
41414               CATALOGS="$CATALOGS $lang.gmo"
41415             done
41416           fi
41417           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
41418           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
41419           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
41420             if test -f "$f"; then
41421               case "$f" in
41422                 *.orig | *.bak | *~) ;;
41423                 *) cat "$f" >> "$ac_dir/Makefile" ;;
41424               esac
41425             fi
41426           done
41427         fi
41428         ;;
41429       esac
41430     done ;;
41431     "etc/bench.pl":F) chmod +x etc/bench.pl ;;
41432     "tests/atconfig":C) cat >tests/atconfig <<ATEOF
41433 # Configurable variable values for building test suites.
41434 # Generated by $0.
41435 # Copyright (C) 2012 Free Software Foundation, Inc.
41436
41437 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
41438 at_testdir='tests'
41439 abs_builddir='$ac_abs_builddir'
41440 at_srcdir='$ac_srcdir'
41441 abs_srcdir='$ac_abs_srcdir'
41442 at_top_srcdir='$ac_top_srcdir'
41443 abs_top_srcdir='$ac_abs_top_srcdir'
41444 at_top_build_prefix='$ac_top_build_prefix'
41445 abs_top_builddir='$ac_abs_top_builddir'
41446
41447 # Backward compatibility with Autotest <= 2.59b:
41448 at_top_builddir=\$at_top_build_prefix
41449
41450 AUTOTEST_PATH='tests'
41451
41452 SHELL=\${CONFIG_SHELL-'$SHELL'}
41453 ATEOF
41454  ;;
41455     "tests/bison":F) chmod +x tests/bison ;;
41456
41457   esac
41458 done # for ac_tag
41459
41460
41461 as_fn_exit 0
41462 _ACEOF
41463 ac_clean_files=$ac_clean_files_save
41464
41465 test $ac_write_fail = 0 ||
41466   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
41467
41468
41469 # configure is writing to config.log, and then calls config.status.
41470 # config.status does its own redirection, appending to config.log.
41471 # Unfortunately, on DOS this fails, as config.log is still kept open
41472 # by configure, so config.status won't be able to write to it; its
41473 # output is simply discarded.  So we exec the FD to /dev/null,
41474 # effectively closing config.log, so it can be properly (re)opened and
41475 # appended to by config.status.  When coming back to configure, we
41476 # need to make the FD available again.
41477 if test "$no_create" != yes; then
41478   ac_cs_success=:
41479   ac_config_status_args=
41480   test "$silent" = yes &&
41481     ac_config_status_args="$ac_config_status_args --quiet"
41482   exec 5>/dev/null
41483   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
41484   exec 5>>config.log
41485   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
41486   # would make configure fail if this is the last instruction.
41487   $ac_cs_success || as_fn_exit 1
41488 fi
41489 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
41490   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
41491 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
41492 fi
41493