add packaging
[platform/upstream/m4.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU M4 1.4.17.
4 #
5 # Report bugs to <bug-m4@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-m4@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 M4'
582 PACKAGE_TARNAME='m4'
583 PACKAGE_VERSION='1.4.17'
584 PACKAGE_STRING='GNU M4 1.4.17'
585 PACKAGE_BUGREPORT='bug-m4@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/m4/'
587
588 ac_unique_file="src/m4.h"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
591 #include <stdio.h>
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
594 #endif
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
597 #endif
598 #ifdef STDC_HEADERS
599 # include <stdlib.h>
600 # include <stddef.h>
601 #else
602 # ifdef HAVE_STDLIB_H
603 #  include <stdlib.h>
604 # endif
605 #endif
606 #ifdef HAVE_STRING_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608 #  include <memory.h>
609 # endif
610 # include <string.h>
611 #endif
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
614 #endif
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
617 #endif
618 #ifdef HAVE_STDINT_H
619 # include <stdint.h>
620 #endif
621 #ifdef HAVE_UNISTD_H
622 # include <unistd.h>
623 #endif"
624
625 gl_use_threads_default=
626 ac_func_list=
627 ac_header_list=
628 gl_getopt_required=POSIX
629 gl_getopt_required=POSIX
630 ac_subst_vars='M4tests_LTLIBOBJS
631 M4tests_LIBOBJS
632 M4_LTLIBOBJS
633 M4_LIBOBJS
634 CONFIG_INCLUDE
635 am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 LIBOBJS
639 LIBTESTS_LIBDEPS
640 LIBM4_LTLIBDEPS
641 LIBM4_LIBDEPS
642 abs_aux_dir
643 POSIX_SPAWN_PORTED_FALSE
644 POSIX_SPAWN_PORTED_TRUE
645 INTL_MACOSX_LIBS
646 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
647 NEXT_INTTYPES_H
648 UINT64_MAX_EQ_ULONG_MAX
649 UINT32_MAX_LT_UINTMAX_MAX
650 PRIPTR_PREFIX
651 PRI_MACROS_BROKEN
652 INT64_MAX_EQ_LONG_MAX
653 INT32_MAX_LT_INTMAX_MAX
654 REPLACE_STRTOIMAX
655 HAVE_DECL_STRTOUMAX
656 HAVE_DECL_STRTOIMAX
657 HAVE_DECL_IMAXDIV
658 HAVE_DECL_IMAXABS
659 GNULIB_STRTOUMAX
660 GNULIB_STRTOIMAX
661 GNULIB_IMAXDIV
662 GNULIB_IMAXABS
663 HAVE_DIRENT_H
664 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
665 NEXT_DIRENT_H
666 REPLACE_FDOPENDIR
667 REPLACE_DIRFD
668 REPLACE_CLOSEDIR
669 REPLACE_OPENDIR
670 HAVE_ALPHASORT
671 HAVE_SCANDIR
672 HAVE_FDOPENDIR
673 HAVE_DECL_FDOPENDIR
674 HAVE_DECL_DIRFD
675 HAVE_CLOSEDIR
676 HAVE_REWINDDIR
677 HAVE_READDIR
678 HAVE_OPENDIR
679 GNULIB_ALPHASORT
680 GNULIB_SCANDIR
681 GNULIB_FDOPENDIR
682 GNULIB_DIRFD
683 GNULIB_CLOSEDIR
684 GNULIB_REWINDDIR
685 GNULIB_READDIR
686 GNULIB_OPENDIR
687 LOCALE_TR_UTF8
688 am__fastdepCXX_FALSE
689 am__fastdepCXX_TRUE
690 CXXDEPMODE
691 ANSICXX_FALSE
692 ANSICXX_TRUE
693 CXXFLAGS
694 ac_ct_CXX
695 CXX
696 CXX_CHOICE
697 M4tests_WITNESS
698 REPLACE_TOWLOWER
699 REPLACE_ISWCNTRL
700 HAVE_WCTYPE_H
701 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
702 NEXT_WCTYPE_H
703 HAVE_ISWCNTRL
704 REPLACE_ISWBLANK
705 HAVE_WCTRANS_T
706 HAVE_WCTYPE_T
707 HAVE_ISWBLANK
708 GNULIB_TOWCTRANS
709 GNULIB_WCTRANS
710 GNULIB_ISWCTYPE
711 GNULIB_WCTYPE
712 GNULIB_ISWBLANK
713 HAVE_WINT_T
714 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
715 NEXT_WCHAR_H
716 HAVE_FEATURES_H
717 HAVE_UNISTD_H
718 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
719 NEXT_UNISTD_H
720 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
721 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
722 TIME_H_DEFINES_STRUCT_TIMESPEC
723 NEXT_AS_FIRST_DIRECTIVE_TIME_H
724 NEXT_TIME_H
725 REPLACE_TIMEGM
726 REPLACE_NANOSLEEP
727 REPLACE_MKTIME
728 REPLACE_LOCALTIME_R
729 HAVE_TIMEGM
730 HAVE_STRPTIME
731 HAVE_NANOSLEEP
732 HAVE_DECL_LOCALTIME_R
733 GNULIB_TIME_R
734 GNULIB_TIMEGM
735 GNULIB_STRPTIME
736 GNULIB_NANOSLEEP
737 GNULIB_MKTIME
738 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
739 NEXT_SYS_WAIT_H
740 GNULIB_WAITPID
741 NEXT_AS_FIRST_DIRECTIVE_STRING_H
742 NEXT_STRING_H
743 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
744 NEXT_STDLIB_H
745 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
746 NEXT_STDIO_H
747 GL_GENERATE_STDINT_H_FALSE
748 GL_GENERATE_STDINT_H_TRUE
749 STDINT_H
750 WINT_T_SUFFIX
751 WCHAR_T_SUFFIX
752 SIG_ATOMIC_T_SUFFIX
753 SIZE_T_SUFFIX
754 PTRDIFF_T_SUFFIX
755 HAVE_SIGNED_WINT_T
756 HAVE_SIGNED_WCHAR_T
757 HAVE_SIGNED_SIG_ATOMIC_T
758 BITSIZEOF_WINT_T
759 BITSIZEOF_WCHAR_T
760 BITSIZEOF_SIG_ATOMIC_T
761 BITSIZEOF_SIZE_T
762 BITSIZEOF_PTRDIFF_T
763 HAVE_SYS_BITYPES_H
764 HAVE_SYS_INTTYPES_H
765 HAVE_STDINT_H
766 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
767 NEXT_STDINT_H
768 HAVE_SYS_TYPES_H
769 HAVE_INTTYPES_H
770 HAVE_WCHAR_H
771 HAVE_UNSIGNED_LONG_LONG_INT
772 HAVE_LONG_LONG_INT
773 HAVE__BOOL
774 GL_GENERATE_STDBOOL_H_FALSE
775 GL_GENERATE_STDBOOL_H_TRUE
776 STDBOOL_H
777 GL_GENERATE_STDARG_H_FALSE
778 GL_GENERATE_STDARG_H_TRUE
779 STDARG_H
780 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
781 NEXT_STDARG_H
782 HAVE_SPAWN_H
783 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
784 NEXT_SPAWN_H
785 ASM_SYMBOL_PREFIX
786 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
787 NEXT_SIGNAL_H
788 GL_GENERATE_SCHED_H_FALSE
789 GL_GENERATE_SCHED_H_TRUE
790 SCHED_H
791 HAVE_STRUCT_SCHED_PARAM
792 HAVE_SCHED_H
793 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
794 NEXT_SCHED_H
795 REPLACE_RAISE
796 REPLACE_PTHREAD_SIGMASK
797 HAVE_SIGHANDLER_T
798 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
799 HAVE_STRUCT_SIGACTION_SA_SIGACTION
800 HAVE_SIGACTION
801 HAVE_SIGINFO_T
802 HAVE_SIGSET_T
803 HAVE_RAISE
804 HAVE_PTHREAD_SIGMASK
805 HAVE_POSIX_SIGNALBLOCKING
806 GNULIB_SIGACTION
807 GNULIB_SIGPROCMASK
808 GNULIB_SIGNAL_H_SIGPIPE
809 GNULIB_RAISE
810 GNULIB_PTHREAD_SIGMASK
811 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
812 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
813 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
814 REPLACE_POSIX_SPAWN
815 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
816 HAVE_POSIX_SPAWNATTR_T
817 HAVE_POSIX_SPAWN
818 GNULIB_POSIX_SPAWNATTR_DESTROY
819 GNULIB_POSIX_SPAWNATTR_SETSIGMASK
820 GNULIB_POSIX_SPAWNATTR_GETSIGMASK
821 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
822 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
823 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
824 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
825 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
826 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
827 GNULIB_POSIX_SPAWNATTR_SETPGROUP
828 GNULIB_POSIX_SPAWNATTR_GETPGROUP
829 GNULIB_POSIX_SPAWNATTR_SETFLAGS
830 GNULIB_POSIX_SPAWNATTR_GETFLAGS
831 GNULIB_POSIX_SPAWNATTR_INIT
832 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
833 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
834 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
835 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
836 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
837 GNULIB_POSIX_SPAWNP
838 GNULIB_POSIX_SPAWN
839 APPLE_UNIVERSAL_BUILD
840 UNDEFINE_STRTOK_R
841 REPLACE_STRTOK_R
842 REPLACE_STRSIGNAL
843 REPLACE_STRNLEN
844 REPLACE_STRNDUP
845 REPLACE_STRNCAT
846 REPLACE_STRERROR_R
847 REPLACE_STRERROR
848 REPLACE_STRCHRNUL
849 REPLACE_STRCASESTR
850 REPLACE_STRSTR
851 REPLACE_STRDUP
852 REPLACE_STPNCPY
853 REPLACE_MEMMEM
854 REPLACE_MEMCHR
855 HAVE_STRVERSCMP
856 HAVE_DECL_STRSIGNAL
857 HAVE_DECL_STRERROR_R
858 HAVE_DECL_STRTOK_R
859 HAVE_STRCASESTR
860 HAVE_STRSEP
861 HAVE_STRPBRK
862 HAVE_DECL_STRNLEN
863 HAVE_DECL_STRNDUP
864 HAVE_DECL_STRDUP
865 HAVE_STRCHRNUL
866 HAVE_STPNCPY
867 HAVE_STPCPY
868 HAVE_RAWMEMCHR
869 HAVE_DECL_MEMRCHR
870 HAVE_MEMPCPY
871 HAVE_DECL_MEMMEM
872 HAVE_MEMCHR
873 HAVE_FFSLL
874 HAVE_FFSL
875 HAVE_MBSLEN
876 GNULIB_STRVERSCMP
877 GNULIB_STRSIGNAL
878 GNULIB_STRERROR_R
879 GNULIB_STRERROR
880 GNULIB_MBSTOK_R
881 GNULIB_MBSSEP
882 GNULIB_MBSSPN
883 GNULIB_MBSPBRK
884 GNULIB_MBSCSPN
885 GNULIB_MBSCASESTR
886 GNULIB_MBSPCASECMP
887 GNULIB_MBSNCASECMP
888 GNULIB_MBSCASECMP
889 GNULIB_MBSSTR
890 GNULIB_MBSRCHR
891 GNULIB_MBSCHR
892 GNULIB_MBSNLEN
893 GNULIB_MBSLEN
894 GNULIB_STRTOK_R
895 GNULIB_STRCASESTR
896 GNULIB_STRSTR
897 GNULIB_STRSEP
898 GNULIB_STRPBRK
899 GNULIB_STRNLEN
900 GNULIB_STRNDUP
901 GNULIB_STRNCAT
902 GNULIB_STRDUP
903 GNULIB_STRCHRNUL
904 GNULIB_STPNCPY
905 GNULIB_STPCPY
906 GNULIB_RAWMEMCHR
907 GNULIB_MEMRCHR
908 GNULIB_MEMPCPY
909 GNULIB_MEMMEM
910 GNULIB_MEMCHR
911 GNULIB_FFSLL
912 GNULIB_FFSL
913 LOCALE_FR_UTF8
914 LOCALE_ZH_CN
915 LOCALE_JA
916 NEXT_AS_FIRST_DIRECTIVE_MATH_H
917 NEXT_MATH_H
918 LTLIBMULTITHREAD
919 LIBMULTITHREAD
920 LTLIBTHREAD
921 LIBTHREAD
922 LIBPTH_PREFIX
923 LTLIBPTH
924 LIBPTH
925 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
926 NEXT_LOCALE_H
927 HAVE_XLOCALE_H
928 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
929 NEXT_STDDEF_H
930 GL_GENERATE_STDDEF_H_FALSE
931 GL_GENERATE_STDDEF_H_TRUE
932 STDDEF_H
933 HAVE_WCHAR_T
934 REPLACE_NULL
935 REPLACE_STRUCT_LCONV
936 REPLACE_DUPLOCALE
937 REPLACE_SETLOCALE
938 REPLACE_LOCALECONV
939 HAVE_DUPLOCALE
940 GNULIB_DUPLOCALE
941 GNULIB_SETLOCALE
942 GNULIB_LOCALECONV
943 LOCALCHARSET_TESTS_ENVIRONMENT
944 GLIBC21
945 HAVE_LANGINFO_YESEXPR
946 HAVE_LANGINFO_ERA
947 HAVE_LANGINFO_T_FMT_AMPM
948 HAVE_LANGINFO_CODESET
949 HAVE_LANGINFO_H
950 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
951 NEXT_LANGINFO_H
952 REPLACE_NL_LANGINFO
953 HAVE_NL_LANGINFO
954 GNULIB_NL_LANGINFO
955 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
956 NEXT_SYS_TIME_H
957 REPLACE_STRUCT_TIMEVAL
958 REPLACE_GETTIMEOFDAY
959 HAVE_SYS_TIME_H
960 HAVE_STRUCT_TIMEVAL
961 HAVE_GETTIMEOFDAY
962 GNULIB_GETTIMEOFDAY
963 LTLIBINTL
964 LIBINTL
965 GNULIB_GL_M4_UNISTD_H_GETOPT
966 GETOPT_H
967 HAVE_GETOPT_H
968 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
969 NEXT_GETOPT_H
970 WINDOWS_64_BIT_ST_SIZE
971 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
972 NEXT_SYS_STAT_H
973 REPLACE_UTIMENSAT
974 REPLACE_STAT
975 REPLACE_MKNOD
976 REPLACE_MKFIFO
977 REPLACE_MKDIR
978 REPLACE_LSTAT
979 REPLACE_FUTIMENS
980 REPLACE_FSTATAT
981 REPLACE_FSTAT
982 HAVE_UTIMENSAT
983 HAVE_MKNODAT
984 HAVE_MKNOD
985 HAVE_MKFIFOAT
986 HAVE_MKFIFO
987 HAVE_MKDIRAT
988 HAVE_LSTAT
989 HAVE_LCHMOD
990 HAVE_FUTIMENS
991 HAVE_FSTATAT
992 HAVE_FCHMODAT
993 GNULIB_UTIMENSAT
994 GNULIB_STAT
995 GNULIB_MKNODAT
996 GNULIB_MKNOD
997 GNULIB_MKFIFOAT
998 GNULIB_MKFIFO
999 GNULIB_MKDIRAT
1000 GNULIB_LSTAT
1001 GNULIB_LCHMOD
1002 GNULIB_FUTIMENS
1003 GNULIB_FSTATAT
1004 GNULIB_FSTAT
1005 GNULIB_FCHMODAT
1006 WINDOWS_64_BIT_OFF_T
1007 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1008 NEXT_SYS_TYPES_H
1009 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1010 REPLACE_TRUNCL
1011 REPLACE_TRUNCF
1012 REPLACE_TRUNC
1013 REPLACE_SQRTL
1014 REPLACE_SIGNBIT_USING_GCC
1015 REPLACE_SIGNBIT
1016 REPLACE_ROUNDL
1017 REPLACE_ROUNDF
1018 REPLACE_ROUND
1019 REPLACE_REMAINDERL
1020 REPLACE_REMAINDERF
1021 REPLACE_REMAINDER
1022 REPLACE_NAN
1023 REPLACE_MODFL
1024 REPLACE_MODFF
1025 REPLACE_MODF
1026 REPLACE_LOGBL
1027 REPLACE_LOGBF
1028 REPLACE_LOGB
1029 REPLACE_LOG2L
1030 REPLACE_LOG2F
1031 REPLACE_LOG2
1032 REPLACE_LOG1PL
1033 REPLACE_LOG1PF
1034 REPLACE_LOG1P
1035 REPLACE_LOG10L
1036 REPLACE_LOG10F
1037 REPLACE_LOG10
1038 REPLACE_LOGL
1039 REPLACE_LOGF
1040 REPLACE_LOG
1041 REPLACE_LDEXPL
1042 REPLACE_ISNAN
1043 REPLACE_ISINF
1044 REPLACE_ISFINITE
1045 REPLACE_ILOGBF
1046 REPLACE_ILOGB
1047 REPLACE_HYPOTL
1048 REPLACE_HYPOTF
1049 REPLACE_HYPOT
1050 REPLACE_HUGE_VAL
1051 REPLACE_FREXPL
1052 REPLACE_FREXP
1053 REPLACE_FREXPF
1054 REPLACE_FMODL
1055 REPLACE_FMODF
1056 REPLACE_FMOD
1057 REPLACE_FMAL
1058 REPLACE_FMAF
1059 REPLACE_FMA
1060 REPLACE_FLOORL
1061 REPLACE_FLOORF
1062 REPLACE_FLOOR
1063 REPLACE_FABSL
1064 REPLACE_EXP2L
1065 REPLACE_EXP2
1066 REPLACE_EXPM1F
1067 REPLACE_EXPM1
1068 REPLACE_CEILL
1069 REPLACE_CEILF
1070 REPLACE_CEIL
1071 REPLACE_CBRTL
1072 REPLACE_CBRTF
1073 HAVE_DECL_TRUNCL
1074 HAVE_DECL_TRUNCF
1075 HAVE_DECL_TRUNC
1076 HAVE_DECL_TANL
1077 HAVE_DECL_SQRTL
1078 HAVE_DECL_SINL
1079 HAVE_DECL_ROUNDL
1080 HAVE_DECL_ROUNDF
1081 HAVE_DECL_ROUND
1082 HAVE_DECL_RINTF
1083 HAVE_DECL_REMAINDERL
1084 HAVE_DECL_REMAINDER
1085 HAVE_DECL_LOGB
1086 HAVE_DECL_LOG2L
1087 HAVE_DECL_LOG2F
1088 HAVE_DECL_LOG2
1089 HAVE_DECL_LOG10L
1090 HAVE_DECL_LOGL
1091 HAVE_DECL_LDEXPL
1092 HAVE_DECL_FREXPL
1093 HAVE_DECL_FLOORL
1094 HAVE_DECL_FLOORF
1095 HAVE_DECL_EXPM1L
1096 HAVE_DECL_EXP2L
1097 HAVE_DECL_EXP2F
1098 HAVE_DECL_EXP2
1099 HAVE_DECL_EXPL
1100 HAVE_DECL_COSL
1101 HAVE_DECL_COPYSIGNF
1102 HAVE_DECL_CEILL
1103 HAVE_DECL_CEILF
1104 HAVE_DECL_CBRTL
1105 HAVE_DECL_CBRTF
1106 HAVE_DECL_ATANL
1107 HAVE_DECL_ASINL
1108 HAVE_DECL_ACOSL
1109 HAVE_TANHF
1110 HAVE_TANL
1111 HAVE_TANF
1112 HAVE_SQRTL
1113 HAVE_SQRTF
1114 HAVE_SINHF
1115 HAVE_SINL
1116 HAVE_SINF
1117 HAVE_RINTL
1118 HAVE_RINT
1119 HAVE_REMAINDERF
1120 HAVE_REMAINDER
1121 HAVE_POWF
1122 HAVE_MODFL
1123 HAVE_MODFF
1124 HAVE_LOGBL
1125 HAVE_LOGBF
1126 HAVE_LOG1PL
1127 HAVE_LOG1PF
1128 HAVE_LOG1P
1129 HAVE_LOG10L
1130 HAVE_LOG10F
1131 HAVE_LOGL
1132 HAVE_LOGF
1133 HAVE_LDEXPF
1134 HAVE_ISNANL
1135 HAVE_ISNAND
1136 HAVE_ISNANF
1137 HAVE_ILOGBL
1138 HAVE_ILOGBF
1139 HAVE_ILOGB
1140 HAVE_HYPOTL
1141 HAVE_HYPOTF
1142 HAVE_FREXPF
1143 HAVE_FMODL
1144 HAVE_FMODF
1145 HAVE_FMAL
1146 HAVE_FMAF
1147 HAVE_FMA
1148 HAVE_FABSL
1149 HAVE_FABSF
1150 HAVE_EXPM1F
1151 HAVE_EXPM1
1152 HAVE_EXPL
1153 HAVE_EXPF
1154 HAVE_COSHF
1155 HAVE_COSL
1156 HAVE_COSF
1157 HAVE_COPYSIGNL
1158 HAVE_COPYSIGN
1159 HAVE_CBRTL
1160 HAVE_CBRTF
1161 HAVE_CBRT
1162 HAVE_ATAN2F
1163 HAVE_ATANL
1164 HAVE_ATANF
1165 HAVE_ASINL
1166 HAVE_ASINF
1167 HAVE_ACOSL
1168 HAVE_ACOSF
1169 GNULIB_TRUNCL
1170 GNULIB_TRUNCF
1171 GNULIB_TRUNC
1172 GNULIB_TANHF
1173 GNULIB_TANL
1174 GNULIB_TANF
1175 GNULIB_SQRTL
1176 GNULIB_SQRTF
1177 GNULIB_SINHF
1178 GNULIB_SINL
1179 GNULIB_SINF
1180 GNULIB_SIGNBIT
1181 GNULIB_ROUNDL
1182 GNULIB_ROUNDF
1183 GNULIB_ROUND
1184 GNULIB_RINTL
1185 GNULIB_RINTF
1186 GNULIB_RINT
1187 GNULIB_REMAINDERL
1188 GNULIB_REMAINDERF
1189 GNULIB_REMAINDER
1190 GNULIB_POWF
1191 GNULIB_MODFL
1192 GNULIB_MODFF
1193 GNULIB_MODF
1194 GNULIB_LOGBL
1195 GNULIB_LOGBF
1196 GNULIB_LOGB
1197 GNULIB_LOG2L
1198 GNULIB_LOG2F
1199 GNULIB_LOG2
1200 GNULIB_LOG1PL
1201 GNULIB_LOG1PF
1202 GNULIB_LOG1P
1203 GNULIB_LOG10L
1204 GNULIB_LOG10F
1205 GNULIB_LOG10
1206 GNULIB_LOGL
1207 GNULIB_LOGF
1208 GNULIB_LOG
1209 GNULIB_LDEXPL
1210 GNULIB_LDEXPF
1211 GNULIB_ISNANL
1212 GNULIB_ISNAND
1213 GNULIB_ISNANF
1214 GNULIB_ISNAN
1215 GNULIB_ISINF
1216 GNULIB_ISFINITE
1217 GNULIB_ILOGBL
1218 GNULIB_ILOGBF
1219 GNULIB_ILOGB
1220 GNULIB_HYPOTL
1221 GNULIB_HYPOTF
1222 GNULIB_HYPOT
1223 GNULIB_FREXPL
1224 GNULIB_FREXP
1225 GNULIB_FREXPF
1226 GNULIB_FMODL
1227 GNULIB_FMODF
1228 GNULIB_FMOD
1229 GNULIB_FMAL
1230 GNULIB_FMAF
1231 GNULIB_FMA
1232 GNULIB_FLOORL
1233 GNULIB_FLOORF
1234 GNULIB_FLOOR
1235 GNULIB_FABSL
1236 GNULIB_FABSF
1237 GNULIB_EXPM1L
1238 GNULIB_EXPM1F
1239 GNULIB_EXPM1
1240 GNULIB_EXP2L
1241 GNULIB_EXP2F
1242 GNULIB_EXP2
1243 GNULIB_EXPL
1244 GNULIB_EXPF
1245 GNULIB_COSHF
1246 GNULIB_COSL
1247 GNULIB_COSF
1248 GNULIB_COPYSIGNL
1249 GNULIB_COPYSIGNF
1250 GNULIB_COPYSIGN
1251 GNULIB_CEILL
1252 GNULIB_CEILF
1253 GNULIB_CEIL
1254 GNULIB_CBRTL
1255 GNULIB_CBRTF
1256 GNULIB_CBRT
1257 GNULIB_ATAN2F
1258 GNULIB_ATANL
1259 GNULIB_ATANF
1260 GNULIB_ASINL
1261 GNULIB_ASINF
1262 GNULIB_ACOSL
1263 GNULIB_ACOSF
1264 REPLACE_ITOLD
1265 GL_GENERATE_FLOAT_H_FALSE
1266 GL_GENERATE_FLOAT_H_TRUE
1267 FLOAT_H
1268 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1269 NEXT_FLOAT_H
1270 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1271 NEXT_FCNTL_H
1272 REPLACE_OPENAT
1273 REPLACE_OPEN
1274 REPLACE_FCNTL
1275 HAVE_OPENAT
1276 HAVE_FCNTL
1277 GNULIB_OPENAT
1278 GNULIB_OPEN
1279 GNULIB_NONBLOCKING
1280 GNULIB_FCNTL
1281 REPLACE_VSPRINTF
1282 REPLACE_VSNPRINTF
1283 REPLACE_VPRINTF
1284 REPLACE_VFPRINTF
1285 REPLACE_VDPRINTF
1286 REPLACE_VASPRINTF
1287 REPLACE_TMPFILE
1288 REPLACE_STDIO_WRITE_FUNCS
1289 REPLACE_STDIO_READ_FUNCS
1290 REPLACE_SPRINTF
1291 REPLACE_SNPRINTF
1292 REPLACE_RENAMEAT
1293 REPLACE_RENAME
1294 REPLACE_REMOVE
1295 REPLACE_PRINTF
1296 REPLACE_POPEN
1297 REPLACE_PERROR
1298 REPLACE_OBSTACK_PRINTF
1299 REPLACE_GETLINE
1300 REPLACE_GETDELIM
1301 REPLACE_FTELLO
1302 REPLACE_FTELL
1303 REPLACE_FSEEKO
1304 REPLACE_FSEEK
1305 REPLACE_FREOPEN
1306 REPLACE_FPURGE
1307 REPLACE_FPRINTF
1308 REPLACE_FOPEN
1309 REPLACE_FFLUSH
1310 REPLACE_FDOPEN
1311 REPLACE_FCLOSE
1312 REPLACE_DPRINTF
1313 HAVE_VDPRINTF
1314 HAVE_VASPRINTF
1315 HAVE_RENAMEAT
1316 HAVE_POPEN
1317 HAVE_PCLOSE
1318 HAVE_FTELLO
1319 HAVE_FSEEKO
1320 HAVE_DPRINTF
1321 HAVE_DECL_VSNPRINTF
1322 HAVE_DECL_SNPRINTF
1323 HAVE_DECL_OBSTACK_PRINTF
1324 HAVE_DECL_GETLINE
1325 HAVE_DECL_GETDELIM
1326 HAVE_DECL_FTELLO
1327 HAVE_DECL_FSEEKO
1328 HAVE_DECL_FPURGE
1329 GNULIB_VSPRINTF_POSIX
1330 GNULIB_VSNPRINTF
1331 GNULIB_VPRINTF_POSIX
1332 GNULIB_VPRINTF
1333 GNULIB_VFPRINTF_POSIX
1334 GNULIB_VFPRINTF
1335 GNULIB_VDPRINTF
1336 GNULIB_VSCANF
1337 GNULIB_VFSCANF
1338 GNULIB_VASPRINTF
1339 GNULIB_TMPFILE
1340 GNULIB_STDIO_H_SIGPIPE
1341 GNULIB_STDIO_H_NONBLOCKING
1342 GNULIB_SPRINTF_POSIX
1343 GNULIB_SNPRINTF
1344 GNULIB_SCANF
1345 GNULIB_RENAMEAT
1346 GNULIB_RENAME
1347 GNULIB_REMOVE
1348 GNULIB_PUTS
1349 GNULIB_PUTCHAR
1350 GNULIB_PUTC
1351 GNULIB_PRINTF_POSIX
1352 GNULIB_PRINTF
1353 GNULIB_POPEN
1354 GNULIB_PERROR
1355 GNULIB_PCLOSE
1356 GNULIB_OBSTACK_PRINTF_POSIX
1357 GNULIB_OBSTACK_PRINTF
1358 GNULIB_GETLINE
1359 GNULIB_GETDELIM
1360 GNULIB_GETCHAR
1361 GNULIB_GETC
1362 GNULIB_FWRITE
1363 GNULIB_FTELLO
1364 GNULIB_FTELL
1365 GNULIB_FSEEKO
1366 GNULIB_FSEEK
1367 GNULIB_FSCANF
1368 GNULIB_FREOPEN
1369 GNULIB_FREAD
1370 GNULIB_FPUTS
1371 GNULIB_FPUTC
1372 GNULIB_FPURGE
1373 GNULIB_FPRINTF_POSIX
1374 GNULIB_FPRINTF
1375 GNULIB_FOPEN
1376 GNULIB_FGETS
1377 GNULIB_FGETC
1378 GNULIB_FFLUSH
1379 GNULIB_FDOPEN
1380 GNULIB_FCLOSE
1381 GNULIB_DPRINTF
1382 EOVERFLOW_VALUE
1383 EOVERFLOW_HIDDEN
1384 ENOLINK_VALUE
1385 ENOLINK_HIDDEN
1386 EMULTIHOP_VALUE
1387 EMULTIHOP_HIDDEN
1388 GL_GENERATE_ERRNO_H_FALSE
1389 GL_GENERATE_ERRNO_H_TRUE
1390 ERRNO_H
1391 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1392 NEXT_ERRNO_H
1393 PRAGMA_COLUMNS
1394 PRAGMA_SYSTEM_HEADER
1395 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1396 INCLUDE_NEXT
1397 pkglibexecdir
1398 lispdir
1399 HAVE_WINSOCK2_H
1400 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1401 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1402 UNISTD_H_HAVE_WINSOCK2_H
1403 REPLACE_WRITE
1404 REPLACE_USLEEP
1405 REPLACE_UNLINKAT
1406 REPLACE_UNLINK
1407 REPLACE_TTYNAME_R
1408 REPLACE_SYMLINK
1409 REPLACE_SLEEP
1410 REPLACE_RMDIR
1411 REPLACE_READLINK
1412 REPLACE_READ
1413 REPLACE_PWRITE
1414 REPLACE_PREAD
1415 REPLACE_LSEEK
1416 REPLACE_LINKAT
1417 REPLACE_LINK
1418 REPLACE_LCHOWN
1419 REPLACE_ISATTY
1420 REPLACE_GETPAGESIZE
1421 REPLACE_GETGROUPS
1422 REPLACE_GETLOGIN_R
1423 REPLACE_GETDOMAINNAME
1424 REPLACE_GETCWD
1425 REPLACE_FTRUNCATE
1426 REPLACE_FCHOWNAT
1427 REPLACE_DUP2
1428 REPLACE_DUP
1429 REPLACE_CLOSE
1430 REPLACE_CHOWN
1431 HAVE_SYS_PARAM_H
1432 HAVE_OS_H
1433 HAVE_DECL_TTYNAME_R
1434 HAVE_DECL_SETHOSTNAME
1435 HAVE_DECL_GETUSERSHELL
1436 HAVE_DECL_GETPAGESIZE
1437 HAVE_DECL_GETLOGIN_R
1438 HAVE_DECL_GETDOMAINNAME
1439 HAVE_DECL_FDATASYNC
1440 HAVE_DECL_FCHDIR
1441 HAVE_DECL_ENVIRON
1442 HAVE_USLEEP
1443 HAVE_UNLINKAT
1444 HAVE_SYMLINKAT
1445 HAVE_SYMLINK
1446 HAVE_SLEEP
1447 HAVE_SETHOSTNAME
1448 HAVE_READLINKAT
1449 HAVE_READLINK
1450 HAVE_PWRITE
1451 HAVE_PREAD
1452 HAVE_PIPE2
1453 HAVE_PIPE
1454 HAVE_LINKAT
1455 HAVE_LINK
1456 HAVE_LCHOWN
1457 HAVE_GROUP_MEMBER
1458 HAVE_GETPAGESIZE
1459 HAVE_GETLOGIN
1460 HAVE_GETHOSTNAME
1461 HAVE_GETGROUPS
1462 HAVE_GETDTABLESIZE
1463 HAVE_FTRUNCATE
1464 HAVE_FSYNC
1465 HAVE_FDATASYNC
1466 HAVE_FCHOWNAT
1467 HAVE_FCHDIR
1468 HAVE_FACCESSAT
1469 HAVE_EUIDACCESS
1470 HAVE_DUP3
1471 HAVE_DUP2
1472 HAVE_CHOWN
1473 GNULIB_WRITE
1474 GNULIB_USLEEP
1475 GNULIB_UNLINKAT
1476 GNULIB_UNLINK
1477 GNULIB_UNISTD_H_SIGPIPE
1478 GNULIB_UNISTD_H_NONBLOCKING
1479 GNULIB_TTYNAME_R
1480 GNULIB_SYMLINKAT
1481 GNULIB_SYMLINK
1482 GNULIB_SLEEP
1483 GNULIB_SETHOSTNAME
1484 GNULIB_RMDIR
1485 GNULIB_READLINKAT
1486 GNULIB_READLINK
1487 GNULIB_READ
1488 GNULIB_PWRITE
1489 GNULIB_PREAD
1490 GNULIB_PIPE2
1491 GNULIB_PIPE
1492 GNULIB_LSEEK
1493 GNULIB_LINKAT
1494 GNULIB_LINK
1495 GNULIB_LCHOWN
1496 GNULIB_ISATTY
1497 GNULIB_GROUP_MEMBER
1498 GNULIB_GETUSERSHELL
1499 GNULIB_GETPAGESIZE
1500 GNULIB_GETLOGIN_R
1501 GNULIB_GETLOGIN
1502 GNULIB_GETHOSTNAME
1503 GNULIB_GETGROUPS
1504 GNULIB_GETDTABLESIZE
1505 GNULIB_GETDOMAINNAME
1506 GNULIB_GETCWD
1507 GNULIB_FTRUNCATE
1508 GNULIB_FSYNC
1509 GNULIB_FDATASYNC
1510 GNULIB_FCHOWNAT
1511 GNULIB_FCHDIR
1512 GNULIB_FACCESSAT
1513 GNULIB_EUIDACCESS
1514 GNULIB_ENVIRON
1515 GNULIB_DUP3
1516 GNULIB_DUP2
1517 GNULIB_DUP
1518 GNULIB_CLOSE
1519 GNULIB_CHOWN
1520 GNULIB_CHDIR
1521 REPLACE_WCTOMB
1522 REPLACE_UNSETENV
1523 REPLACE_STRTOD
1524 REPLACE_SETENV
1525 REPLACE_REALPATH
1526 REPLACE_REALLOC
1527 REPLACE_RANDOM_R
1528 REPLACE_PUTENV
1529 REPLACE_PTSNAME_R
1530 REPLACE_PTSNAME
1531 REPLACE_MKSTEMP
1532 REPLACE_MBTOWC
1533 REPLACE_MALLOC
1534 REPLACE_CANONICALIZE_FILE_NAME
1535 REPLACE_CALLOC
1536 HAVE_DECL_UNSETENV
1537 HAVE_UNLOCKPT
1538 HAVE_SYS_LOADAVG_H
1539 HAVE_STRUCT_RANDOM_DATA
1540 HAVE_STRTOULL
1541 HAVE_STRTOLL
1542 HAVE_STRTOD
1543 HAVE_DECL_SETENV
1544 HAVE_SETENV
1545 HAVE_SECURE_GETENV
1546 HAVE_RPMATCH
1547 HAVE_REALPATH
1548 HAVE_RANDOM_R
1549 HAVE_RANDOM_H
1550 HAVE_RANDOM
1551 HAVE_PTSNAME_R
1552 HAVE_PTSNAME
1553 HAVE_POSIX_OPENPT
1554 HAVE_MKSTEMPS
1555 HAVE_MKSTEMP
1556 HAVE_MKOSTEMPS
1557 HAVE_MKOSTEMP
1558 HAVE_MKDTEMP
1559 HAVE_GRANTPT
1560 HAVE_GETSUBOPT
1561 HAVE_DECL_GETLOADAVG
1562 HAVE_CANONICALIZE_FILE_NAME
1563 HAVE_ATOLL
1564 HAVE__EXIT
1565 GNULIB_WCTOMB
1566 GNULIB_UNSETENV
1567 GNULIB_UNLOCKPT
1568 GNULIB_SYSTEM_POSIX
1569 GNULIB_STRTOULL
1570 GNULIB_STRTOLL
1571 GNULIB_STRTOD
1572 GNULIB_SETENV
1573 GNULIB_SECURE_GETENV
1574 GNULIB_RPMATCH
1575 GNULIB_REALPATH
1576 GNULIB_REALLOC_POSIX
1577 GNULIB_RANDOM_R
1578 GNULIB_RANDOM
1579 GNULIB_PUTENV
1580 GNULIB_PTSNAME_R
1581 GNULIB_PTSNAME
1582 GNULIB_POSIX_OPENPT
1583 GNULIB_MKSTEMPS
1584 GNULIB_MKSTEMP
1585 GNULIB_MKOSTEMPS
1586 GNULIB_MKOSTEMP
1587 GNULIB_MKDTEMP
1588 GNULIB_MBTOWC
1589 GNULIB_MALLOC_POSIX
1590 GNULIB_GRANTPT
1591 GNULIB_GETSUBOPT
1592 GNULIB_GETLOADAVG
1593 GNULIB_CANONICALIZE_FILE_NAME
1594 GNULIB_CALLOC_POSIX
1595 GNULIB_ATOLL
1596 GNULIB__EXIT
1597 LTLIBCSTACK
1598 LIBCSTACK
1599 LIBSIGSEGV_PREFIX
1600 LTLIBSIGSEGV
1601 LIBSIGSEGV
1602 HAVE_LIBSIGSEGV
1603 LOCALE_FR
1604 REPLACE_WCSWIDTH
1605 REPLACE_WCWIDTH
1606 REPLACE_WCSNRTOMBS
1607 REPLACE_WCSRTOMBS
1608 REPLACE_WCRTOMB
1609 REPLACE_MBSNRTOWCS
1610 REPLACE_MBSRTOWCS
1611 REPLACE_MBRLEN
1612 REPLACE_MBRTOWC
1613 REPLACE_MBSINIT
1614 REPLACE_WCTOB
1615 REPLACE_BTOWC
1616 REPLACE_MBSTATE_T
1617 HAVE_DECL_WCWIDTH
1618 HAVE_DECL_WCTOB
1619 HAVE_WCSWIDTH
1620 HAVE_WCSTOK
1621 HAVE_WCSSTR
1622 HAVE_WCSPBRK
1623 HAVE_WCSSPN
1624 HAVE_WCSCSPN
1625 HAVE_WCSRCHR
1626 HAVE_WCSCHR
1627 HAVE_WCSDUP
1628 HAVE_WCSXFRM
1629 HAVE_WCSCOLL
1630 HAVE_WCSNCASECMP
1631 HAVE_WCSCASECMP
1632 HAVE_WCSNCMP
1633 HAVE_WCSCMP
1634 HAVE_WCSNCAT
1635 HAVE_WCSCAT
1636 HAVE_WCPNCPY
1637 HAVE_WCSNCPY
1638 HAVE_WCPCPY
1639 HAVE_WCSCPY
1640 HAVE_WCSNLEN
1641 HAVE_WCSLEN
1642 HAVE_WMEMSET
1643 HAVE_WMEMMOVE
1644 HAVE_WMEMCPY
1645 HAVE_WMEMCMP
1646 HAVE_WMEMCHR
1647 HAVE_WCSNRTOMBS
1648 HAVE_WCSRTOMBS
1649 HAVE_WCRTOMB
1650 HAVE_MBSNRTOWCS
1651 HAVE_MBSRTOWCS
1652 HAVE_MBRLEN
1653 HAVE_MBRTOWC
1654 HAVE_MBSINIT
1655 HAVE_BTOWC
1656 GNULIB_WCSWIDTH
1657 GNULIB_WCSTOK
1658 GNULIB_WCSSTR
1659 GNULIB_WCSPBRK
1660 GNULIB_WCSSPN
1661 GNULIB_WCSCSPN
1662 GNULIB_WCSRCHR
1663 GNULIB_WCSCHR
1664 GNULIB_WCSDUP
1665 GNULIB_WCSXFRM
1666 GNULIB_WCSCOLL
1667 GNULIB_WCSNCASECMP
1668 GNULIB_WCSCASECMP
1669 GNULIB_WCSNCMP
1670 GNULIB_WCSCMP
1671 GNULIB_WCSNCAT
1672 GNULIB_WCSCAT
1673 GNULIB_WCPNCPY
1674 GNULIB_WCSNCPY
1675 GNULIB_WCPCPY
1676 GNULIB_WCSCPY
1677 GNULIB_WCSNLEN
1678 GNULIB_WCSLEN
1679 GNULIB_WMEMSET
1680 GNULIB_WMEMMOVE
1681 GNULIB_WMEMCPY
1682 GNULIB_WMEMCMP
1683 GNULIB_WMEMCHR
1684 GNULIB_WCWIDTH
1685 GNULIB_WCSNRTOMBS
1686 GNULIB_WCSRTOMBS
1687 GNULIB_WCRTOMB
1688 GNULIB_MBSNRTOWCS
1689 GNULIB_MBSRTOWCS
1690 GNULIB_MBRLEN
1691 GNULIB_MBRTOWC
1692 GNULIB_MBSINIT
1693 GNULIB_WCTOB
1694 GNULIB_BTOWC
1695 GL_GENERATE_ALLOCA_H_FALSE
1696 GL_GENERATE_ALLOCA_H_TRUE
1697 ALLOCA_H
1698 ALLOCA
1699 GL_COND_LIBTOOL_FALSE
1700 GL_COND_LIBTOOL_TRUE
1701 WARN_CFLAGS
1702 WERROR_CFLAGS
1703 host_os
1704 host_vendor
1705 host_cpu
1706 host
1707 build_os
1708 build_vendor
1709 build_cpu
1710 build
1711 RANLIB
1712 ARFLAGS
1713 AR
1714 EGREP
1715 GREP
1716 CPP
1717 am__fastdepCC_FALSE
1718 am__fastdepCC_TRUE
1719 CCDEPMODE
1720 am__nodep
1721 AMDEPBACKSLASH
1722 AMDEP_FALSE
1723 AMDEP_TRUE
1724 am__quote
1725 am__include
1726 DEPDIR
1727 OBJEXT
1728 EXEEXT
1729 ac_ct_CC
1730 CPPFLAGS
1731 LDFLAGS
1732 CFLAGS
1733 CC
1734 AM_BACKSLASH
1735 AM_DEFAULT_VERBOSITY
1736 AM_DEFAULT_V
1737 AM_V
1738 am__untar
1739 am__tar
1740 AMTAR
1741 am__leading_dot
1742 SET_MAKE
1743 AWK
1744 mkdir_p
1745 MKDIR_P
1746 INSTALL_STRIP_PROGRAM
1747 STRIP
1748 install_sh
1749 MAKEINFO
1750 AUTOHEADER
1751 AUTOMAKE
1752 AUTOCONF
1753 ACLOCAL
1754 VERSION
1755 PACKAGE
1756 CYGPATH_W
1757 am__isrc
1758 INSTALL_DATA
1759 INSTALL_SCRIPT
1760 INSTALL_PROGRAM
1761 target_alias
1762 host_alias
1763 build_alias
1764 LIBS
1765 ECHO_T
1766 ECHO_N
1767 ECHO_C
1768 DEFS
1769 mandir
1770 localedir
1771 libdir
1772 psdir
1773 pdfdir
1774 dvidir
1775 htmldir
1776 infodir
1777 docdir
1778 oldincludedir
1779 includedir
1780 localstatedir
1781 sharedstatedir
1782 sysconfdir
1783 datadir
1784 datarootdir
1785 libexecdir
1786 sbindir
1787 bindir
1788 program_transform_name
1789 prefix
1790 exec_prefix
1791 PACKAGE_URL
1792 PACKAGE_BUGREPORT
1793 PACKAGE_STRING
1794 PACKAGE_VERSION
1795 PACKAGE_TARNAME
1796 PACKAGE_NAME
1797 PATH_SEPARATOR
1798 SHELL'
1799 ac_subst_files=''
1800 ac_user_opts='
1801 enable_option_checking
1802 enable_silent_rules
1803 enable_dependency_tracking
1804 enable_largefile
1805 enable_threads
1806 enable_gcc_warnings
1807 enable_assert
1808 with_gnu_ld
1809 enable_rpath
1810 with_libsigsegv_prefix
1811 with_libpth_prefix
1812 with_included_regex
1813 with_packager
1814 with_packager_version
1815 with_packager_bug_reports
1816 enable_c__
1817 enable_changeword
1818 with_syscmd_shell
1819 with_dmalloc
1820 '
1821       ac_precious_vars='build_alias
1822 host_alias
1823 target_alias
1824 CC
1825 CFLAGS
1826 LDFLAGS
1827 LIBS
1828 CPPFLAGS
1829 CPP
1830 CXX
1831 CXXFLAGS'
1832
1833
1834 # Initialize some variables set by options.
1835 ac_init_help=
1836 ac_init_version=false
1837 ac_unrecognized_opts=
1838 ac_unrecognized_sep=
1839 # The variables have the same names as the options, with
1840 # dashes changed to underlines.
1841 cache_file=/dev/null
1842 exec_prefix=NONE
1843 no_create=
1844 no_recursion=
1845 prefix=NONE
1846 program_prefix=NONE
1847 program_suffix=NONE
1848 program_transform_name=s,x,x,
1849 silent=
1850 site=
1851 srcdir=
1852 verbose=
1853 x_includes=NONE
1854 x_libraries=NONE
1855
1856 # Installation directory options.
1857 # These are left unexpanded so users can "make install exec_prefix=/foo"
1858 # and all the variables that are supposed to be based on exec_prefix
1859 # by default will actually change.
1860 # Use braces instead of parens because sh, perl, etc. also accept them.
1861 # (The list follows the same order as the GNU Coding Standards.)
1862 bindir='${exec_prefix}/bin'
1863 sbindir='${exec_prefix}/sbin'
1864 libexecdir='${exec_prefix}/libexec'
1865 datarootdir='${prefix}/share'
1866 datadir='${datarootdir}'
1867 sysconfdir='${prefix}/etc'
1868 sharedstatedir='${prefix}/com'
1869 localstatedir='${prefix}/var'
1870 includedir='${prefix}/include'
1871 oldincludedir='/usr/include'
1872 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1873 infodir='${datarootdir}/info'
1874 htmldir='${docdir}'
1875 dvidir='${docdir}'
1876 pdfdir='${docdir}'
1877 psdir='${docdir}'
1878 libdir='${exec_prefix}/lib'
1879 localedir='${datarootdir}/locale'
1880 mandir='${datarootdir}/man'
1881
1882 ac_prev=
1883 ac_dashdash=
1884 for ac_option
1885 do
1886   # If the previous option needs an argument, assign it.
1887   if test -n "$ac_prev"; then
1888     eval $ac_prev=\$ac_option
1889     ac_prev=
1890     continue
1891   fi
1892
1893   case $ac_option in
1894   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1895   *=)   ac_optarg= ;;
1896   *)    ac_optarg=yes ;;
1897   esac
1898
1899   # Accept the important Cygnus configure options, so we can diagnose typos.
1900
1901   case $ac_dashdash$ac_option in
1902   --)
1903     ac_dashdash=yes ;;
1904
1905   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1906     ac_prev=bindir ;;
1907   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1908     bindir=$ac_optarg ;;
1909
1910   -build | --build | --buil | --bui | --bu)
1911     ac_prev=build_alias ;;
1912   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1913     build_alias=$ac_optarg ;;
1914
1915   -cache-file | --cache-file | --cache-fil | --cache-fi \
1916   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1917     ac_prev=cache_file ;;
1918   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1919   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1920     cache_file=$ac_optarg ;;
1921
1922   --config-cache | -C)
1923     cache_file=config.cache ;;
1924
1925   -datadir | --datadir | --datadi | --datad)
1926     ac_prev=datadir ;;
1927   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1928     datadir=$ac_optarg ;;
1929
1930   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1931   | --dataroo | --dataro | --datar)
1932     ac_prev=datarootdir ;;
1933   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1934   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1935     datarootdir=$ac_optarg ;;
1936
1937   -disable-* | --disable-*)
1938     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1939     # Reject names that are not valid shell variable names.
1940     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1941       as_fn_error $? "invalid feature name: $ac_useropt"
1942     ac_useropt_orig=$ac_useropt
1943     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1944     case $ac_user_opts in
1945       *"
1946 "enable_$ac_useropt"
1947 "*) ;;
1948       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1949          ac_unrecognized_sep=', ';;
1950     esac
1951     eval enable_$ac_useropt=no ;;
1952
1953   -docdir | --docdir | --docdi | --doc | --do)
1954     ac_prev=docdir ;;
1955   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1956     docdir=$ac_optarg ;;
1957
1958   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1959     ac_prev=dvidir ;;
1960   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1961     dvidir=$ac_optarg ;;
1962
1963   -enable-* | --enable-*)
1964     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1965     # Reject names that are not valid shell variable names.
1966     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1967       as_fn_error $? "invalid feature name: $ac_useropt"
1968     ac_useropt_orig=$ac_useropt
1969     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1970     case $ac_user_opts in
1971       *"
1972 "enable_$ac_useropt"
1973 "*) ;;
1974       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1975          ac_unrecognized_sep=', ';;
1976     esac
1977     eval enable_$ac_useropt=\$ac_optarg ;;
1978
1979   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1980   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1981   | --exec | --exe | --ex)
1982     ac_prev=exec_prefix ;;
1983   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1984   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1985   | --exec=* | --exe=* | --ex=*)
1986     exec_prefix=$ac_optarg ;;
1987
1988   -gas | --gas | --ga | --g)
1989     # Obsolete; use --with-gas.
1990     with_gas=yes ;;
1991
1992   -help | --help | --hel | --he | -h)
1993     ac_init_help=long ;;
1994   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1995     ac_init_help=recursive ;;
1996   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1997     ac_init_help=short ;;
1998
1999   -host | --host | --hos | --ho)
2000     ac_prev=host_alias ;;
2001   -host=* | --host=* | --hos=* | --ho=*)
2002     host_alias=$ac_optarg ;;
2003
2004   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2005     ac_prev=htmldir ;;
2006   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2007   | --ht=*)
2008     htmldir=$ac_optarg ;;
2009
2010   -includedir | --includedir | --includedi | --included | --include \
2011   | --includ | --inclu | --incl | --inc)
2012     ac_prev=includedir ;;
2013   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2014   | --includ=* | --inclu=* | --incl=* | --inc=*)
2015     includedir=$ac_optarg ;;
2016
2017   -infodir | --infodir | --infodi | --infod | --info | --inf)
2018     ac_prev=infodir ;;
2019   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2020     infodir=$ac_optarg ;;
2021
2022   -libdir | --libdir | --libdi | --libd)
2023     ac_prev=libdir ;;
2024   -libdir=* | --libdir=* | --libdi=* | --libd=*)
2025     libdir=$ac_optarg ;;
2026
2027   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2028   | --libexe | --libex | --libe)
2029     ac_prev=libexecdir ;;
2030   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2031   | --libexe=* | --libex=* | --libe=*)
2032     libexecdir=$ac_optarg ;;
2033
2034   -localedir | --localedir | --localedi | --localed | --locale)
2035     ac_prev=localedir ;;
2036   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2037     localedir=$ac_optarg ;;
2038
2039   -localstatedir | --localstatedir | --localstatedi | --localstated \
2040   | --localstate | --localstat | --localsta | --localst | --locals)
2041     ac_prev=localstatedir ;;
2042   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2043   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2044     localstatedir=$ac_optarg ;;
2045
2046   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2047     ac_prev=mandir ;;
2048   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2049     mandir=$ac_optarg ;;
2050
2051   -nfp | --nfp | --nf)
2052     # Obsolete; use --without-fp.
2053     with_fp=no ;;
2054
2055   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2056   | --no-cr | --no-c | -n)
2057     no_create=yes ;;
2058
2059   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2060   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2061     no_recursion=yes ;;
2062
2063   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2064   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2065   | --oldin | --oldi | --old | --ol | --o)
2066     ac_prev=oldincludedir ;;
2067   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2068   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2069   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2070     oldincludedir=$ac_optarg ;;
2071
2072   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2073     ac_prev=prefix ;;
2074   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2075     prefix=$ac_optarg ;;
2076
2077   -program-prefix | --program-prefix | --program-prefi | --program-pref \
2078   | --program-pre | --program-pr | --program-p)
2079     ac_prev=program_prefix ;;
2080   -program-prefix=* | --program-prefix=* | --program-prefi=* \
2081   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2082     program_prefix=$ac_optarg ;;
2083
2084   -program-suffix | --program-suffix | --program-suffi | --program-suff \
2085   | --program-suf | --program-su | --program-s)
2086     ac_prev=program_suffix ;;
2087   -program-suffix=* | --program-suffix=* | --program-suffi=* \
2088   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2089     program_suffix=$ac_optarg ;;
2090
2091   -program-transform-name | --program-transform-name \
2092   | --program-transform-nam | --program-transform-na \
2093   | --program-transform-n | --program-transform- \
2094   | --program-transform | --program-transfor \
2095   | --program-transfo | --program-transf \
2096   | --program-trans | --program-tran \
2097   | --progr-tra | --program-tr | --program-t)
2098     ac_prev=program_transform_name ;;
2099   -program-transform-name=* | --program-transform-name=* \
2100   | --program-transform-nam=* | --program-transform-na=* \
2101   | --program-transform-n=* | --program-transform-=* \
2102   | --program-transform=* | --program-transfor=* \
2103   | --program-transfo=* | --program-transf=* \
2104   | --program-trans=* | --program-tran=* \
2105   | --progr-tra=* | --program-tr=* | --program-t=*)
2106     program_transform_name=$ac_optarg ;;
2107
2108   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2109     ac_prev=pdfdir ;;
2110   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2111     pdfdir=$ac_optarg ;;
2112
2113   -psdir | --psdir | --psdi | --psd | --ps)
2114     ac_prev=psdir ;;
2115   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2116     psdir=$ac_optarg ;;
2117
2118   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2119   | -silent | --silent | --silen | --sile | --sil)
2120     silent=yes ;;
2121
2122   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2123     ac_prev=sbindir ;;
2124   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2125   | --sbi=* | --sb=*)
2126     sbindir=$ac_optarg ;;
2127
2128   -sharedstatedir | --sharedstatedir | --sharedstatedi \
2129   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2130   | --sharedst | --shareds | --shared | --share | --shar \
2131   | --sha | --sh)
2132     ac_prev=sharedstatedir ;;
2133   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2134   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2135   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2136   | --sha=* | --sh=*)
2137     sharedstatedir=$ac_optarg ;;
2138
2139   -site | --site | --sit)
2140     ac_prev=site ;;
2141   -site=* | --site=* | --sit=*)
2142     site=$ac_optarg ;;
2143
2144   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2145     ac_prev=srcdir ;;
2146   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2147     srcdir=$ac_optarg ;;
2148
2149   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2150   | --syscon | --sysco | --sysc | --sys | --sy)
2151     ac_prev=sysconfdir ;;
2152   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2153   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2154     sysconfdir=$ac_optarg ;;
2155
2156   -target | --target | --targe | --targ | --tar | --ta | --t)
2157     ac_prev=target_alias ;;
2158   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2159     target_alias=$ac_optarg ;;
2160
2161   -v | -verbose | --verbose | --verbos | --verbo | --verb)
2162     verbose=yes ;;
2163
2164   -version | --version | --versio | --versi | --vers | -V)
2165     ac_init_version=: ;;
2166
2167   -with-* | --with-*)
2168     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2169     # Reject names that are not valid shell variable names.
2170     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2171       as_fn_error $? "invalid package name: $ac_useropt"
2172     ac_useropt_orig=$ac_useropt
2173     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2174     case $ac_user_opts in
2175       *"
2176 "with_$ac_useropt"
2177 "*) ;;
2178       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2179          ac_unrecognized_sep=', ';;
2180     esac
2181     eval with_$ac_useropt=\$ac_optarg ;;
2182
2183   -without-* | --without-*)
2184     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2185     # Reject names that are not valid shell variable names.
2186     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2187       as_fn_error $? "invalid package name: $ac_useropt"
2188     ac_useropt_orig=$ac_useropt
2189     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2190     case $ac_user_opts in
2191       *"
2192 "with_$ac_useropt"
2193 "*) ;;
2194       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2195          ac_unrecognized_sep=', ';;
2196     esac
2197     eval with_$ac_useropt=no ;;
2198
2199   --x)
2200     # Obsolete; use --with-x.
2201     with_x=yes ;;
2202
2203   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2204   | --x-incl | --x-inc | --x-in | --x-i)
2205     ac_prev=x_includes ;;
2206   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2207   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2208     x_includes=$ac_optarg ;;
2209
2210   -x-libraries | --x-libraries | --x-librarie | --x-librari \
2211   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2212     ac_prev=x_libraries ;;
2213   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2214   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2215     x_libraries=$ac_optarg ;;
2216
2217   -*) as_fn_error $? "unrecognized option: \`$ac_option'
2218 Try \`$0 --help' for more information"
2219     ;;
2220
2221   *=*)
2222     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2223     # Reject names that are not valid shell variable names.
2224     case $ac_envvar in #(
2225       '' | [0-9]* | *[!_$as_cr_alnum]* )
2226       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2227     esac
2228     eval $ac_envvar=\$ac_optarg
2229     export $ac_envvar ;;
2230
2231   *)
2232     # FIXME: should be removed in autoconf 3.0.
2233     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2234     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2235       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2236     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2237     ;;
2238
2239   esac
2240 done
2241
2242 if test -n "$ac_prev"; then
2243   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2244   as_fn_error $? "missing argument to $ac_option"
2245 fi
2246
2247 if test -n "$ac_unrecognized_opts"; then
2248   case $enable_option_checking in
2249     no) ;;
2250     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2251     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2252   esac
2253 fi
2254
2255 # Check all directory arguments for consistency.
2256 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
2257                 datadir sysconfdir sharedstatedir localstatedir includedir \
2258                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2259                 libdir localedir mandir
2260 do
2261   eval ac_val=\$$ac_var
2262   # Remove trailing slashes.
2263   case $ac_val in
2264     */ )
2265       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2266       eval $ac_var=\$ac_val;;
2267   esac
2268   # Be sure to have absolute directory names.
2269   case $ac_val in
2270     [\\/$]* | ?:[\\/]* )  continue;;
2271     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2272   esac
2273   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2274 done
2275
2276 # There might be people who depend on the old broken behavior: `$host'
2277 # used to hold the argument of --host etc.
2278 # FIXME: To remove some day.
2279 build=$build_alias
2280 host=$host_alias
2281 target=$target_alias
2282
2283 # FIXME: To remove some day.
2284 if test "x$host_alias" != x; then
2285   if test "x$build_alias" = x; then
2286     cross_compiling=maybe
2287   elif test "x$build_alias" != "x$host_alias"; then
2288     cross_compiling=yes
2289   fi
2290 fi
2291
2292 ac_tool_prefix=
2293 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2294
2295 test "$silent" = yes && exec 6>/dev/null
2296
2297
2298 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2299 ac_ls_di=`ls -di .` &&
2300 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2301   as_fn_error $? "working directory cannot be determined"
2302 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2303   as_fn_error $? "pwd does not report name of working directory"
2304
2305
2306 # Find the source files, if location was not specified.
2307 if test -z "$srcdir"; then
2308   ac_srcdir_defaulted=yes
2309   # Try the directory containing this script, then the parent directory.
2310   ac_confdir=`$as_dirname -- "$as_myself" ||
2311 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2312          X"$as_myself" : 'X\(//\)[^/]' \| \
2313          X"$as_myself" : 'X\(//\)$' \| \
2314          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2315 $as_echo X"$as_myself" |
2316     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2317             s//\1/
2318             q
2319           }
2320           /^X\(\/\/\)[^/].*/{
2321             s//\1/
2322             q
2323           }
2324           /^X\(\/\/\)$/{
2325             s//\1/
2326             q
2327           }
2328           /^X\(\/\).*/{
2329             s//\1/
2330             q
2331           }
2332           s/.*/./; q'`
2333   srcdir=$ac_confdir
2334   if test ! -r "$srcdir/$ac_unique_file"; then
2335     srcdir=..
2336   fi
2337 else
2338   ac_srcdir_defaulted=no
2339 fi
2340 if test ! -r "$srcdir/$ac_unique_file"; then
2341   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2342   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2343 fi
2344 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2345 ac_abs_confdir=`(
2346         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2347         pwd)`
2348 # When building in place, set srcdir=.
2349 if test "$ac_abs_confdir" = "$ac_pwd"; then
2350   srcdir=.
2351 fi
2352 # Remove unnecessary trailing slashes from srcdir.
2353 # Double slashes in file names in object file debugging info
2354 # mess up M-x gdb in Emacs.
2355 case $srcdir in
2356 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2357 esac
2358 for ac_var in $ac_precious_vars; do
2359   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2360   eval ac_env_${ac_var}_value=\$${ac_var}
2361   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2362   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2363 done
2364
2365 #
2366 # Report the --help message.
2367 #
2368 if test "$ac_init_help" = "long"; then
2369   # Omit some internal or obsolete options to make the list less imposing.
2370   # This message is too long to be a string in the A/UX 3.1 sh.
2371   cat <<_ACEOF
2372 \`configure' configures GNU M4 1.4.17 to adapt to many kinds of systems.
2373
2374 Usage: $0 [OPTION]... [VAR=VALUE]...
2375
2376 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2377 VAR=VALUE.  See below for descriptions of some of the useful variables.
2378
2379 Defaults for the options are specified in brackets.
2380
2381 Configuration:
2382   -h, --help              display this help and exit
2383       --help=short        display options specific to this package
2384       --help=recursive    display the short help of all the included packages
2385   -V, --version           display version information and exit
2386   -q, --quiet, --silent   do not print \`checking ...' messages
2387       --cache-file=FILE   cache test results in FILE [disabled]
2388   -C, --config-cache      alias for \`--cache-file=config.cache'
2389   -n, --no-create         do not create output files
2390       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2391
2392 Installation directories:
2393   --prefix=PREFIX         install architecture-independent files in PREFIX
2394                           [$ac_default_prefix]
2395   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2396                           [PREFIX]
2397
2398 By default, \`make install' will install all the files in
2399 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2400 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2401 for instance \`--prefix=\$HOME'.
2402
2403 For better control, use the options below.
2404
2405 Fine tuning of the installation directories:
2406   --bindir=DIR            user executables [EPREFIX/bin]
2407   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2408   --libexecdir=DIR        program executables [EPREFIX/libexec]
2409   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2410   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2411   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2412   --libdir=DIR            object code libraries [EPREFIX/lib]
2413   --includedir=DIR        C header files [PREFIX/include]
2414   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2415   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2416   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2417   --infodir=DIR           info documentation [DATAROOTDIR/info]
2418   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2419   --mandir=DIR            man documentation [DATAROOTDIR/man]
2420   --docdir=DIR            documentation root [DATAROOTDIR/doc/m4]
2421   --htmldir=DIR           html documentation [DOCDIR]
2422   --dvidir=DIR            dvi documentation [DOCDIR]
2423   --pdfdir=DIR            pdf documentation [DOCDIR]
2424   --psdir=DIR             ps documentation [DOCDIR]
2425 _ACEOF
2426
2427   cat <<\_ACEOF
2428
2429 Program names:
2430   --program-prefix=PREFIX            prepend PREFIX to installed program names
2431   --program-suffix=SUFFIX            append SUFFIX to installed program names
2432   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2433
2434 System types:
2435   --build=BUILD     configure for building on BUILD [guessed]
2436   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2437 _ACEOF
2438 fi
2439
2440 if test -n "$ac_init_help"; then
2441   case $ac_init_help in
2442      short | recursive ) echo "Configuration of GNU M4 1.4.17:";;
2443    esac
2444   cat <<\_ACEOF
2445
2446 Optional Features:
2447   --disable-option-checking  ignore unrecognized --enable/--with options
2448   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2449   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2450   --enable-silent-rules   less verbose build output (undo: "make V=1")
2451   --disable-silent-rules  verbose build output (undo: "make V=0")
2452   --enable-dependency-tracking
2453                           do not reject slow dependency extractors
2454   --disable-dependency-tracking
2455                           speeds up one-time build
2456   --disable-largefile     omit support for large files
2457   --enable-threads={posix|solaris|pth|windows}
2458                           specify multithreading API
2459   --disable-threads       build without multithread safety
2460   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2461   --disable-assert        turn off assertions
2462   --disable-rpath         do not hardcode runtime library paths
2463   --enable-c++            also build C++ sources
2464   --enable-changeword     enable -W and changeword() builtin
2465
2466 Optional Packages:
2467   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2468   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2469   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2470   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2471   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2472   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2473   --without-libpth-prefix     don't search for libpth in includedir and libdir
2474   --without-included-regex
2475                           don't compile regex; this is the default on systems
2476                           with recent-enough versions of the GNU C Library
2477                           (use with caution on other systems).
2478   --with-packager         String identifying the packager of this software
2479   --with-packager-version Packager-specific version information
2480   --with-packager-bug-reports
2481                           Packager info for bug reports (URL/e-mail/...)
2482   --with-syscmd-shell     shell used by syscmd [/bin/sh]
2483   --with-dmalloc          use dmalloc, as in dmalloc.tar.gz from
2484                           @/ftp.antaire.com:antaire/src/dmalloc.
2485
2486 Some influential environment variables:
2487   CC          C compiler command
2488   CFLAGS      C compiler flags
2489   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2490               nonstandard directory <lib dir>
2491   LIBS        libraries to pass to the linker, e.g. -l<library>
2492   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2493               you have headers in a nonstandard directory <include dir>
2494   CPP         C preprocessor
2495   CXX         C++ compiler command
2496   CXXFLAGS    C++ compiler flags
2497
2498 Use these variables to override the choices made by `configure' or to help
2499 it to find libraries and programs with nonstandard names/locations.
2500
2501 Report bugs to <bug-m4@gnu.org>.
2502 GNU M4 home page: <http://www.gnu.org/software/m4/>.
2503 General help using GNU software: <http://www.gnu.org/gethelp/>.
2504 _ACEOF
2505 ac_status=$?
2506 fi
2507
2508 if test "$ac_init_help" = "recursive"; then
2509   # If there are subdirs, report their specific --help.
2510   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2511     test -d "$ac_dir" ||
2512       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2513       continue
2514     ac_builddir=.
2515
2516 case "$ac_dir" in
2517 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2518 *)
2519   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2520   # A ".." for each directory in $ac_dir_suffix.
2521   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2522   case $ac_top_builddir_sub in
2523   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2524   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2525   esac ;;
2526 esac
2527 ac_abs_top_builddir=$ac_pwd
2528 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2529 # for backward compatibility:
2530 ac_top_builddir=$ac_top_build_prefix
2531
2532 case $srcdir in
2533   .)  # We are building in place.
2534     ac_srcdir=.
2535     ac_top_srcdir=$ac_top_builddir_sub
2536     ac_abs_top_srcdir=$ac_pwd ;;
2537   [\\/]* | ?:[\\/]* )  # Absolute name.
2538     ac_srcdir=$srcdir$ac_dir_suffix;
2539     ac_top_srcdir=$srcdir
2540     ac_abs_top_srcdir=$srcdir ;;
2541   *) # Relative name.
2542     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2543     ac_top_srcdir=$ac_top_build_prefix$srcdir
2544     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2545 esac
2546 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2547
2548     cd "$ac_dir" || { ac_status=$?; continue; }
2549     # Check for guested configure.
2550     if test -f "$ac_srcdir/configure.gnu"; then
2551       echo &&
2552       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2553     elif test -f "$ac_srcdir/configure"; then
2554       echo &&
2555       $SHELL "$ac_srcdir/configure" --help=recursive
2556     else
2557       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2558     fi || ac_status=$?
2559     cd "$ac_pwd" || { ac_status=$?; break; }
2560   done
2561 fi
2562
2563 test -n "$ac_init_help" && exit $ac_status
2564 if $ac_init_version; then
2565   cat <<\_ACEOF
2566 GNU M4 configure 1.4.17
2567 generated by GNU Autoconf 2.69
2568
2569 Copyright (C) 2012 Free Software Foundation, Inc.
2570 This configure script is free software; the Free Software Foundation
2571 gives unlimited permission to copy, distribute and modify it.
2572 _ACEOF
2573   exit
2574 fi
2575
2576 ## ------------------------ ##
2577 ## Autoconf initialization. ##
2578 ## ------------------------ ##
2579
2580 # ac_fn_c_try_compile LINENO
2581 # --------------------------
2582 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2583 ac_fn_c_try_compile ()
2584 {
2585   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586   rm -f conftest.$ac_objext
2587   if { { ac_try="$ac_compile"
2588 case "(($ac_try" in
2589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2590   *) ac_try_echo=$ac_try;;
2591 esac
2592 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2593 $as_echo "$ac_try_echo"; } >&5
2594   (eval "$ac_compile") 2>conftest.err
2595   ac_status=$?
2596   if test -s conftest.err; then
2597     grep -v '^ *+' conftest.err >conftest.er1
2598     cat conftest.er1 >&5
2599     mv -f conftest.er1 conftest.err
2600   fi
2601   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2602   test $ac_status = 0; } && {
2603          test -z "$ac_c_werror_flag" ||
2604          test ! -s conftest.err
2605        } && test -s conftest.$ac_objext; then :
2606   ac_retval=0
2607 else
2608   $as_echo "$as_me: failed program was:" >&5
2609 sed 's/^/| /' conftest.$ac_ext >&5
2610
2611         ac_retval=1
2612 fi
2613   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2614   as_fn_set_status $ac_retval
2615
2616 } # ac_fn_c_try_compile
2617
2618 # ac_fn_c_try_cpp LINENO
2619 # ----------------------
2620 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2621 ac_fn_c_try_cpp ()
2622 {
2623   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2624   if { { ac_try="$ac_cpp conftest.$ac_ext"
2625 case "(($ac_try" in
2626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627   *) ac_try_echo=$ac_try;;
2628 esac
2629 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2630 $as_echo "$ac_try_echo"; } >&5
2631   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2632   ac_status=$?
2633   if test -s conftest.err; then
2634     grep -v '^ *+' conftest.err >conftest.er1
2635     cat conftest.er1 >&5
2636     mv -f conftest.er1 conftest.err
2637   fi
2638   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2639   test $ac_status = 0; } > conftest.i && {
2640          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2641          test ! -s conftest.err
2642        }; then :
2643   ac_retval=0
2644 else
2645   $as_echo "$as_me: failed program was:" >&5
2646 sed 's/^/| /' conftest.$ac_ext >&5
2647
2648     ac_retval=1
2649 fi
2650   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2651   as_fn_set_status $ac_retval
2652
2653 } # ac_fn_c_try_cpp
2654
2655 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2656 # -------------------------------------------------------
2657 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2658 # the include files in INCLUDES and setting the cache variable VAR
2659 # accordingly.
2660 ac_fn_c_check_header_mongrel ()
2661 {
2662   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2663   if eval \${$3+:} false; then :
2664   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2665 $as_echo_n "checking for $2... " >&6; }
2666 if eval \${$3+:} false; then :
2667   $as_echo_n "(cached) " >&6
2668 fi
2669 eval ac_res=\$$3
2670                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2671 $as_echo "$ac_res" >&6; }
2672 else
2673   # Is the header compilable?
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2675 $as_echo_n "checking $2 usability... " >&6; }
2676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2677 /* end confdefs.h.  */
2678 $4
2679 #include <$2>
2680 _ACEOF
2681 if ac_fn_c_try_compile "$LINENO"; then :
2682   ac_header_compiler=yes
2683 else
2684   ac_header_compiler=no
2685 fi
2686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2688 $as_echo "$ac_header_compiler" >&6; }
2689
2690 # Is the header present?
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2692 $as_echo_n "checking $2 presence... " >&6; }
2693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2694 /* end confdefs.h.  */
2695 #include <$2>
2696 _ACEOF
2697 if ac_fn_c_try_cpp "$LINENO"; then :
2698   ac_header_preproc=yes
2699 else
2700   ac_header_preproc=no
2701 fi
2702 rm -f conftest.err conftest.i conftest.$ac_ext
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2704 $as_echo "$ac_header_preproc" >&6; }
2705
2706 # So?  What about this header?
2707 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2708   yes:no: )
2709     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2710 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2711     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2712 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2713     ;;
2714   no:yes:* )
2715     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2716 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2717     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2718 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2719     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2720 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2721     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2722 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2723     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2724 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2725 ( $as_echo "## ----------------------------- ##
2726 ## Report this to bug-m4@gnu.org ##
2727 ## ----------------------------- ##"
2728      ) | sed "s/^/$as_me: WARNING:     /" >&2
2729     ;;
2730 esac
2731   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2732 $as_echo_n "checking for $2... " >&6; }
2733 if eval \${$3+:} false; then :
2734   $as_echo_n "(cached) " >&6
2735 else
2736   eval "$3=\$ac_header_compiler"
2737 fi
2738 eval ac_res=\$$3
2739                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2740 $as_echo "$ac_res" >&6; }
2741 fi
2742   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743
2744 } # ac_fn_c_check_header_mongrel
2745
2746 # ac_fn_c_try_run LINENO
2747 # ----------------------
2748 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2749 # that executables *can* be run.
2750 ac_fn_c_try_run ()
2751 {
2752   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753   if { { ac_try="$ac_link"
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_link") 2>&5
2761   ac_status=$?
2762   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2763   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2764   { { case "(($ac_try" in
2765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766   *) ac_try_echo=$ac_try;;
2767 esac
2768 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2769 $as_echo "$ac_try_echo"; } >&5
2770   (eval "$ac_try") 2>&5
2771   ac_status=$?
2772   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2773   test $ac_status = 0; }; }; then :
2774   ac_retval=0
2775 else
2776   $as_echo "$as_me: program exited with status $ac_status" >&5
2777        $as_echo "$as_me: failed program was:" >&5
2778 sed 's/^/| /' conftest.$ac_ext >&5
2779
2780        ac_retval=$ac_status
2781 fi
2782   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2783   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2784   as_fn_set_status $ac_retval
2785
2786 } # ac_fn_c_try_run
2787
2788 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2789 # -------------------------------------------------------
2790 # Tests whether HEADER exists and can be compiled using the include files in
2791 # INCLUDES, setting the cache variable VAR accordingly.
2792 ac_fn_c_check_header_compile ()
2793 {
2794   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2796 $as_echo_n "checking for $2... " >&6; }
2797 if eval \${$3+:} false; then :
2798   $as_echo_n "(cached) " >&6
2799 else
2800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801 /* end confdefs.h.  */
2802 $4
2803 #include <$2>
2804 _ACEOF
2805 if ac_fn_c_try_compile "$LINENO"; then :
2806   eval "$3=yes"
2807 else
2808   eval "$3=no"
2809 fi
2810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2811 fi
2812 eval ac_res=\$$3
2813                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2814 $as_echo "$ac_res" >&6; }
2815   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2816
2817 } # ac_fn_c_check_header_compile
2818
2819 # ac_fn_c_try_link LINENO
2820 # -----------------------
2821 # Try to link conftest.$ac_ext, and return whether this succeeded.
2822 ac_fn_c_try_link ()
2823 {
2824   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2825   rm -f conftest.$ac_objext conftest$ac_exeext
2826   if { { ac_try="$ac_link"
2827 case "(($ac_try" in
2828   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829   *) ac_try_echo=$ac_try;;
2830 esac
2831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2832 $as_echo "$ac_try_echo"; } >&5
2833   (eval "$ac_link") 2>conftest.err
2834   ac_status=$?
2835   if test -s conftest.err; then
2836     grep -v '^ *+' conftest.err >conftest.er1
2837     cat conftest.er1 >&5
2838     mv -f conftest.er1 conftest.err
2839   fi
2840   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2841   test $ac_status = 0; } && {
2842          test -z "$ac_c_werror_flag" ||
2843          test ! -s conftest.err
2844        } && test -s conftest$ac_exeext && {
2845          test "$cross_compiling" = yes ||
2846          test -x conftest$ac_exeext
2847        }; then :
2848   ac_retval=0
2849 else
2850   $as_echo "$as_me: failed program was:" >&5
2851 sed 's/^/| /' conftest.$ac_ext >&5
2852
2853         ac_retval=1
2854 fi
2855   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2856   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2857   # interfere with the next link command; also delete a directory that is
2858   # left behind by Apple's compiler.  We do this before executing the actions.
2859   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2860   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2861   as_fn_set_status $ac_retval
2862
2863 } # ac_fn_c_try_link
2864
2865 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2866 # -------------------------------------------
2867 # Tests whether TYPE exists after having included INCLUDES, setting cache
2868 # variable VAR accordingly.
2869 ac_fn_c_check_type ()
2870 {
2871   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2873 $as_echo_n "checking for $2... " >&6; }
2874 if eval \${$3+:} false; then :
2875   $as_echo_n "(cached) " >&6
2876 else
2877   eval "$3=no"
2878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879 /* end confdefs.h.  */
2880 $4
2881 int
2882 main ()
2883 {
2884 if (sizeof ($2))
2885          return 0;
2886   ;
2887   return 0;
2888 }
2889 _ACEOF
2890 if ac_fn_c_try_compile "$LINENO"; then :
2891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892 /* end confdefs.h.  */
2893 $4
2894 int
2895 main ()
2896 {
2897 if (sizeof (($2)))
2898             return 0;
2899   ;
2900   return 0;
2901 }
2902 _ACEOF
2903 if ac_fn_c_try_compile "$LINENO"; then :
2904
2905 else
2906   eval "$3=yes"
2907 fi
2908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2909 fi
2910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2911 fi
2912 eval ac_res=\$$3
2913                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2914 $as_echo "$ac_res" >&6; }
2915   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2916
2917 } # ac_fn_c_check_type
2918
2919 # ac_fn_c_check_func LINENO FUNC VAR
2920 # ----------------------------------
2921 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2922 ac_fn_c_check_func ()
2923 {
2924   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2926 $as_echo_n "checking for $2... " >&6; }
2927 if eval \${$3+:} false; then :
2928   $as_echo_n "(cached) " >&6
2929 else
2930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2931 /* end confdefs.h.  */
2932 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2933    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2934 #define $2 innocuous_$2
2935
2936 /* System header to define __stub macros and hopefully few prototypes,
2937     which can conflict with char $2 (); below.
2938     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2939     <limits.h> exists even on freestanding compilers.  */
2940
2941 #ifdef __STDC__
2942 # include <limits.h>
2943 #else
2944 # include <assert.h>
2945 #endif
2946
2947 #undef $2
2948
2949 /* Override any GCC internal prototype to avoid an error.
2950    Use char because int might match the return type of a GCC
2951    builtin and then its argument prototype would still apply.  */
2952 #ifdef __cplusplus
2953 extern "C"
2954 #endif
2955 char $2 ();
2956 /* The GNU C library defines this for functions which it implements
2957     to always fail with ENOSYS.  Some functions are actually named
2958     something starting with __ and the normal name is an alias.  */
2959 #if defined __stub_$2 || defined __stub___$2
2960 choke me
2961 #endif
2962
2963 int
2964 main ()
2965 {
2966 return $2 ();
2967   ;
2968   return 0;
2969 }
2970 _ACEOF
2971 if ac_fn_c_try_link "$LINENO"; then :
2972   eval "$3=yes"
2973 else
2974   eval "$3=no"
2975 fi
2976 rm -f core conftest.err conftest.$ac_objext \
2977     conftest$ac_exeext conftest.$ac_ext
2978 fi
2979 eval ac_res=\$$3
2980                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2981 $as_echo "$ac_res" >&6; }
2982   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2983
2984 } # ac_fn_c_check_func
2985
2986 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2987 # ---------------------------------------------
2988 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2989 # accordingly.
2990 ac_fn_c_check_decl ()
2991 {
2992   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2993   as_decl_name=`echo $2|sed 's/ *(.*//'`
2994   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2995   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2996 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2997 if eval \${$3+:} false; then :
2998   $as_echo_n "(cached) " >&6
2999 else
3000   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3001 /* end confdefs.h.  */
3002 $4
3003 int
3004 main ()
3005 {
3006 #ifndef $as_decl_name
3007 #ifdef __cplusplus
3008   (void) $as_decl_use;
3009 #else
3010   (void) $as_decl_name;
3011 #endif
3012 #endif
3013
3014   ;
3015   return 0;
3016 }
3017 _ACEOF
3018 if ac_fn_c_try_compile "$LINENO"; then :
3019   eval "$3=yes"
3020 else
3021   eval "$3=no"
3022 fi
3023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3024 fi
3025 eval ac_res=\$$3
3026                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3027 $as_echo "$ac_res" >&6; }
3028   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3029
3030 } # ac_fn_c_check_decl
3031
3032 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3033 # --------------------------------------------
3034 # Tries to find the compile-time value of EXPR in a program that includes
3035 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3036 # computed
3037 ac_fn_c_compute_int ()
3038 {
3039   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3040   if test "$cross_compiling" = yes; then
3041     # Depending upon the size, compute the lo and hi bounds.
3042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3043 /* end confdefs.h.  */
3044 $4
3045 int
3046 main ()
3047 {
3048 static int test_array [1 - 2 * !(($2) >= 0)];
3049 test_array [0] = 0;
3050 return test_array [0];
3051
3052   ;
3053   return 0;
3054 }
3055 _ACEOF
3056 if ac_fn_c_try_compile "$LINENO"; then :
3057   ac_lo=0 ac_mid=0
3058   while :; do
3059     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060 /* end confdefs.h.  */
3061 $4
3062 int
3063 main ()
3064 {
3065 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3066 test_array [0] = 0;
3067 return test_array [0];
3068
3069   ;
3070   return 0;
3071 }
3072 _ACEOF
3073 if ac_fn_c_try_compile "$LINENO"; then :
3074   ac_hi=$ac_mid; break
3075 else
3076   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3077                         if test $ac_lo -le $ac_mid; then
3078                           ac_lo= ac_hi=
3079                           break
3080                         fi
3081                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3082 fi
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084   done
3085 else
3086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3087 /* end confdefs.h.  */
3088 $4
3089 int
3090 main ()
3091 {
3092 static int test_array [1 - 2 * !(($2) < 0)];
3093 test_array [0] = 0;
3094 return test_array [0];
3095
3096   ;
3097   return 0;
3098 }
3099 _ACEOF
3100 if ac_fn_c_try_compile "$LINENO"; then :
3101   ac_hi=-1 ac_mid=-1
3102   while :; do
3103     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3104 /* end confdefs.h.  */
3105 $4
3106 int
3107 main ()
3108 {
3109 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3110 test_array [0] = 0;
3111 return test_array [0];
3112
3113   ;
3114   return 0;
3115 }
3116 _ACEOF
3117 if ac_fn_c_try_compile "$LINENO"; then :
3118   ac_lo=$ac_mid; break
3119 else
3120   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3121                         if test $ac_mid -le $ac_hi; then
3122                           ac_lo= ac_hi=
3123                           break
3124                         fi
3125                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3126 fi
3127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3128   done
3129 else
3130   ac_lo= ac_hi=
3131 fi
3132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3133 fi
3134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3135 # Binary search between lo and hi bounds.
3136 while test "x$ac_lo" != "x$ac_hi"; do
3137   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3139 /* end confdefs.h.  */
3140 $4
3141 int
3142 main ()
3143 {
3144 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3145 test_array [0] = 0;
3146 return test_array [0];
3147
3148   ;
3149   return 0;
3150 }
3151 _ACEOF
3152 if ac_fn_c_try_compile "$LINENO"; then :
3153   ac_hi=$ac_mid
3154 else
3155   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3156 fi
3157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3158 done
3159 case $ac_lo in #((
3160 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3161 '') ac_retval=1 ;;
3162 esac
3163   else
3164     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3165 /* end confdefs.h.  */
3166 $4
3167 static long int longval () { return $2; }
3168 static unsigned long int ulongval () { return $2; }
3169 #include <stdio.h>
3170 #include <stdlib.h>
3171 int
3172 main ()
3173 {
3174
3175   FILE *f = fopen ("conftest.val", "w");
3176   if (! f)
3177     return 1;
3178   if (($2) < 0)
3179     {
3180       long int i = longval ();
3181       if (i != ($2))
3182         return 1;
3183       fprintf (f, "%ld", i);
3184     }
3185   else
3186     {
3187       unsigned long int i = ulongval ();
3188       if (i != ($2))
3189         return 1;
3190       fprintf (f, "%lu", i);
3191     }
3192   /* Do not output a trailing newline, as this causes \r\n confusion
3193      on some platforms.  */
3194   return ferror (f) || fclose (f) != 0;
3195
3196   ;
3197   return 0;
3198 }
3199 _ACEOF
3200 if ac_fn_c_try_run "$LINENO"; then :
3201   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3202 else
3203   ac_retval=1
3204 fi
3205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3206   conftest.$ac_objext conftest.beam conftest.$ac_ext
3207 rm -f conftest.val
3208
3209   fi
3210   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3211   as_fn_set_status $ac_retval
3212
3213 } # ac_fn_c_compute_int
3214
3215 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3216 # ----------------------------------------------------
3217 # Tries to find if the field MEMBER exists in type AGGR, after including
3218 # INCLUDES, setting cache variable VAR accordingly.
3219 ac_fn_c_check_member ()
3220 {
3221   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3223 $as_echo_n "checking for $2.$3... " >&6; }
3224 if eval \${$4+:} false; then :
3225   $as_echo_n "(cached) " >&6
3226 else
3227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3228 /* end confdefs.h.  */
3229 $5
3230 int
3231 main ()
3232 {
3233 static $2 ac_aggr;
3234 if (ac_aggr.$3)
3235 return 0;
3236   ;
3237   return 0;
3238 }
3239 _ACEOF
3240 if ac_fn_c_try_compile "$LINENO"; then :
3241   eval "$4=yes"
3242 else
3243   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3244 /* end confdefs.h.  */
3245 $5
3246 int
3247 main ()
3248 {
3249 static $2 ac_aggr;
3250 if (sizeof ac_aggr.$3)
3251 return 0;
3252   ;
3253   return 0;
3254 }
3255 _ACEOF
3256 if ac_fn_c_try_compile "$LINENO"; then :
3257   eval "$4=yes"
3258 else
3259   eval "$4=no"
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 fi
3265 eval ac_res=\$$4
3266                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3267 $as_echo "$ac_res" >&6; }
3268   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3269
3270 } # ac_fn_c_check_member
3271 cat >config.log <<_ACEOF
3272 This file contains any messages produced by compilers while
3273 running configure, to aid debugging if configure makes a mistake.
3274
3275 It was created by GNU M4 $as_me 1.4.17, which was
3276 generated by GNU Autoconf 2.69.  Invocation command line was
3277
3278   $ $0 $@
3279
3280 _ACEOF
3281 exec 5>>config.log
3282 {
3283 cat <<_ASUNAME
3284 ## --------- ##
3285 ## Platform. ##
3286 ## --------- ##
3287
3288 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3289 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3290 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3291 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3292 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3293
3294 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3295 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3296
3297 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3298 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3299 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3300 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3301 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3302 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3303 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3304
3305 _ASUNAME
3306
3307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308 for as_dir in $PATH
3309 do
3310   IFS=$as_save_IFS
3311   test -z "$as_dir" && as_dir=.
3312     $as_echo "PATH: $as_dir"
3313   done
3314 IFS=$as_save_IFS
3315
3316 } >&5
3317
3318 cat >&5 <<_ACEOF
3319
3320
3321 ## ----------- ##
3322 ## Core tests. ##
3323 ## ----------- ##
3324
3325 _ACEOF
3326
3327
3328 # Keep a trace of the command line.
3329 # Strip out --no-create and --no-recursion so they do not pile up.
3330 # Strip out --silent because we don't want to record it for future runs.
3331 # Also quote any args containing shell meta-characters.
3332 # Make two passes to allow for proper duplicate-argument suppression.
3333 ac_configure_args=
3334 ac_configure_args0=
3335 ac_configure_args1=
3336 ac_must_keep_next=false
3337 for ac_pass in 1 2
3338 do
3339   for ac_arg
3340   do
3341     case $ac_arg in
3342     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3343     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3344     | -silent | --silent | --silen | --sile | --sil)
3345       continue ;;
3346     *\'*)
3347       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3348     esac
3349     case $ac_pass in
3350     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3351     2)
3352       as_fn_append ac_configure_args1 " '$ac_arg'"
3353       if test $ac_must_keep_next = true; then
3354         ac_must_keep_next=false # Got value, back to normal.
3355       else
3356         case $ac_arg in
3357           *=* | --config-cache | -C | -disable-* | --disable-* \
3358           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3359           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3360           | -with-* | --with-* | -without-* | --without-* | --x)
3361             case "$ac_configure_args0 " in
3362               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3363             esac
3364             ;;
3365           -* ) ac_must_keep_next=true ;;
3366         esac
3367       fi
3368       as_fn_append ac_configure_args " '$ac_arg'"
3369       ;;
3370     esac
3371   done
3372 done
3373 { ac_configure_args0=; unset ac_configure_args0;}
3374 { ac_configure_args1=; unset ac_configure_args1;}
3375
3376 # When interrupted or exit'd, cleanup temporary files, and complete
3377 # config.log.  We remove comments because anyway the quotes in there
3378 # would cause problems or look ugly.
3379 # WARNING: Use '\'' to represent an apostrophe within the trap.
3380 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3381 trap 'exit_status=$?
3382   # Save into config.log some information that might help in debugging.
3383   {
3384     echo
3385
3386     $as_echo "## ---------------- ##
3387 ## Cache variables. ##
3388 ## ---------------- ##"
3389     echo
3390     # The following way of writing the cache mishandles newlines in values,
3391 (
3392   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3393     eval ac_val=\$$ac_var
3394     case $ac_val in #(
3395     *${as_nl}*)
3396       case $ac_var in #(
3397       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3398 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3399       esac
3400       case $ac_var in #(
3401       _ | IFS | as_nl) ;; #(
3402       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3403       *) { eval $ac_var=; unset $ac_var;} ;;
3404       esac ;;
3405     esac
3406   done
3407   (set) 2>&1 |
3408     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3409     *${as_nl}ac_space=\ *)
3410       sed -n \
3411         "s/'\''/'\''\\\\'\'''\''/g;
3412           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3413       ;; #(
3414     *)
3415       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3416       ;;
3417     esac |
3418     sort
3419 )
3420     echo
3421
3422     $as_echo "## ----------------- ##
3423 ## Output variables. ##
3424 ## ----------------- ##"
3425     echo
3426     for ac_var in $ac_subst_vars
3427     do
3428       eval ac_val=\$$ac_var
3429       case $ac_val in
3430       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3431       esac
3432       $as_echo "$ac_var='\''$ac_val'\''"
3433     done | sort
3434     echo
3435
3436     if test -n "$ac_subst_files"; then
3437       $as_echo "## ------------------- ##
3438 ## File substitutions. ##
3439 ## ------------------- ##"
3440       echo
3441       for ac_var in $ac_subst_files
3442       do
3443         eval ac_val=\$$ac_var
3444         case $ac_val in
3445         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3446         esac
3447         $as_echo "$ac_var='\''$ac_val'\''"
3448       done | sort
3449       echo
3450     fi
3451
3452     if test -s confdefs.h; then
3453       $as_echo "## ----------- ##
3454 ## confdefs.h. ##
3455 ## ----------- ##"
3456       echo
3457       cat confdefs.h
3458       echo
3459     fi
3460     test "$ac_signal" != 0 &&
3461       $as_echo "$as_me: caught signal $ac_signal"
3462     $as_echo "$as_me: exit $exit_status"
3463   } >&5
3464   rm -f core *.core core.conftest.* &&
3465     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3466     exit $exit_status
3467 ' 0
3468 for ac_signal in 1 2 13 15; do
3469   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3470 done
3471 ac_signal=0
3472
3473 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3474 rm -f -r conftest* confdefs.h
3475
3476 $as_echo "/* confdefs.h */" > confdefs.h
3477
3478 # Predefined preprocessor variables.
3479
3480 cat >>confdefs.h <<_ACEOF
3481 #define PACKAGE_NAME "$PACKAGE_NAME"
3482 _ACEOF
3483
3484 cat >>confdefs.h <<_ACEOF
3485 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3486 _ACEOF
3487
3488 cat >>confdefs.h <<_ACEOF
3489 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3490 _ACEOF
3491
3492 cat >>confdefs.h <<_ACEOF
3493 #define PACKAGE_STRING "$PACKAGE_STRING"
3494 _ACEOF
3495
3496 cat >>confdefs.h <<_ACEOF
3497 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3498 _ACEOF
3499
3500 cat >>confdefs.h <<_ACEOF
3501 #define PACKAGE_URL "$PACKAGE_URL"
3502 _ACEOF
3503
3504
3505 # Let the site file select an alternate cache file if it wants to.
3506 # Prefer an explicitly selected file to automatically selected ones.
3507 ac_site_file1=NONE
3508 ac_site_file2=NONE
3509 if test -n "$CONFIG_SITE"; then
3510   # We do not want a PATH search for config.site.
3511   case $CONFIG_SITE in #((
3512     -*)  ac_site_file1=./$CONFIG_SITE;;
3513     */*) ac_site_file1=$CONFIG_SITE;;
3514     *)   ac_site_file1=./$CONFIG_SITE;;
3515   esac
3516 elif test "x$prefix" != xNONE; then
3517   ac_site_file1=$prefix/share/config.site
3518   ac_site_file2=$prefix/etc/config.site
3519 else
3520   ac_site_file1=$ac_default_prefix/share/config.site
3521   ac_site_file2=$ac_default_prefix/etc/config.site
3522 fi
3523 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3524 do
3525   test "x$ac_site_file" = xNONE && continue
3526   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3527     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3528 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3529     sed 's/^/| /' "$ac_site_file" >&5
3530     . "$ac_site_file" \
3531       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3532 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3533 as_fn_error $? "failed to load site script $ac_site_file
3534 See \`config.log' for more details" "$LINENO" 5; }
3535   fi
3536 done
3537
3538 if test -r "$cache_file"; then
3539   # Some versions of bash will fail to source /dev/null (special files
3540   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3541   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3542     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3543 $as_echo "$as_me: loading cache $cache_file" >&6;}
3544     case $cache_file in
3545       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3546       *)                      . "./$cache_file";;
3547     esac
3548   fi
3549 else
3550   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3551 $as_echo "$as_me: creating cache $cache_file" >&6;}
3552   >$cache_file
3553 fi
3554
3555 gl_use_threads_default=no
3556 as_fn_append ac_func_list " btowc"
3557 as_fn_append ac_func_list " setrlimit"
3558 as_fn_append ac_header_list " ucontext.h"
3559 as_fn_append ac_func_list " sigaltstack"
3560 as_fn_append ac_header_list " unistd.h"
3561 as_fn_append ac_func_list " canonicalize_file_name"
3562 as_fn_append ac_func_list " getcwd"
3563 as_fn_append ac_func_list " readlink"
3564 as_fn_append ac_func_list " realpath"
3565 as_fn_append ac_header_list " sys/param.h"
3566 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3567 as_fn_append ac_header_list " sys/socket.h"
3568 as_fn_append ac_func_list " fcntl"
3569 as_fn_append ac_func_list " symlink"
3570 as_fn_append ac_func_list " mempcpy"
3571 as_fn_append ac_header_list " stdio_ext.h"
3572 as_fn_append ac_func_list " fpurge"
3573 as_fn_append ac_func_list " __fpurge"
3574 as_fn_append ac_func_list " __freadahead"
3575 as_fn_append ac_func_list " __freading"
3576 as_fn_append ac_header_list " sys/stat.h"
3577 as_fn_append ac_func_list " getdtablesize"
3578 gl_getopt_required=GNU
3579 as_fn_append ac_header_list " getopt.h"
3580 as_fn_append ac_header_list " sys/time.h"
3581 as_fn_append ac_func_list " gettimeofday"
3582 as_fn_append ac_header_list " langinfo.h"
3583 as_fn_append ac_header_list " xlocale.h"
3584 as_fn_append ac_func_list " lstat"
3585 as_fn_append ac_header_list " math.h"
3586 as_fn_append ac_func_list " mbsinit"
3587 as_fn_append ac_func_list " mbrtowc"
3588 as_fn_append ac_header_list " sys/mman.h"
3589 as_fn_append ac_func_list " mprotect"
3590 as_fn_append ac_func_list " mkstemp"
3591 as_fn_append ac_func_list " nl_langinfo"
3592 as_fn_append ac_func_list " pipe2"
3593 as_fn_append ac_func_list " posix_spawn"
3594 gl_printf_safe=yes
3595 as_fn_append ac_func_list " isblank"
3596 as_fn_append ac_func_list " iswctype"
3597 as_fn_append ac_func_list " wcscoll"
3598 as_fn_append ac_func_list " link"
3599 as_fn_append ac_header_list " sched.h"
3600 as_fn_append ac_func_list " secure_getenv"
3601 as_fn_append ac_func_list " sigaction"
3602 as_fn_append ac_func_list " siginterrupt"
3603 as_fn_append ac_func_list " snprintf"
3604 as_fn_append ac_header_list " spawn.h"
3605 as_fn_append ac_header_list " wchar.h"
3606 as_fn_append ac_header_list " stdint.h"
3607 as_fn_append ac_func_list " strndup"
3608 as_fn_append ac_header_list " sys/wait.h"
3609 as_fn_append ac_func_list " pipe"
3610 as_fn_append ac_func_list " vasnprintf"
3611 as_fn_append ac_header_list " features.h"
3612 as_fn_append ac_func_list " wcrtomb"
3613 as_fn_append ac_func_list " iswcntrl"
3614 as_fn_append ac_header_list " wctype.h"
3615 as_fn_append ac_header_list " dirent.h"
3616 as_fn_append ac_header_list " inttypes.h"
3617 as_fn_append ac_func_list " newlocale"
3618 as_fn_append ac_func_list " setenv"
3619 as_fn_append ac_func_list " sleep"
3620 as_fn_append ac_func_list " strdup"
3621 as_fn_append ac_func_list " wctob"
3622 # Check that the precious variables saved in the cache have kept the same
3623 # value.
3624 ac_cache_corrupted=false
3625 for ac_var in $ac_precious_vars; do
3626   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3627   eval ac_new_set=\$ac_env_${ac_var}_set
3628   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3629   eval ac_new_val=\$ac_env_${ac_var}_value
3630   case $ac_old_set,$ac_new_set in
3631     set,)
3632       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3633 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3634       ac_cache_corrupted=: ;;
3635     ,set)
3636       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3637 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3638       ac_cache_corrupted=: ;;
3639     ,);;
3640     *)
3641       if test "x$ac_old_val" != "x$ac_new_val"; then
3642         # differences in whitespace do not lead to failure.
3643         ac_old_val_w=`echo x $ac_old_val`
3644         ac_new_val_w=`echo x $ac_new_val`
3645         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3646           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3647 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3648           ac_cache_corrupted=:
3649         else
3650           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3651 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3652           eval $ac_var=\$ac_old_val
3653         fi
3654         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3655 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3656         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3657 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3658       fi;;
3659   esac
3660   # Pass precious variables to config.status.
3661   if test "$ac_new_set" = set; then
3662     case $ac_new_val in
3663     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3664     *) ac_arg=$ac_var=$ac_new_val ;;
3665     esac
3666     case " $ac_configure_args " in
3667       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3668       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3669     esac
3670   fi
3671 done
3672 if $ac_cache_corrupted; then
3673   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3674 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3675   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3676 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3677   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3678 fi
3679 ## -------------------- ##
3680 ## Main body of script. ##
3681 ## -------------------- ##
3682
3683 ac_ext=c
3684 ac_cpp='$CPP $CPPFLAGS'
3685 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3686 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3687 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3688
3689
3690 ac_aux_dir=
3691 for ac_dir in build-aux "$srcdir"/build-aux; do
3692   if test -f "$ac_dir/install-sh"; then
3693     ac_aux_dir=$ac_dir
3694     ac_install_sh="$ac_aux_dir/install-sh -c"
3695     break
3696   elif test -f "$ac_dir/install.sh"; then
3697     ac_aux_dir=$ac_dir
3698     ac_install_sh="$ac_aux_dir/install.sh -c"
3699     break
3700   elif test -f "$ac_dir/shtool"; then
3701     ac_aux_dir=$ac_dir
3702     ac_install_sh="$ac_aux_dir/shtool install -c"
3703     break
3704   fi
3705 done
3706 if test -z "$ac_aux_dir"; then
3707   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3708 fi
3709
3710 # These three variables are undocumented and unsupported,
3711 # and are intended to be withdrawn in a future Autoconf release.
3712 # They can cause serious problems if a builder's source tree is in a directory
3713 # whose full name contains unusual characters.
3714 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3715 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3716 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3717
3718
3719
3720 am__api_version='1.14'
3721
3722 # Find a good install program.  We prefer a C program (faster),
3723 # so one script is as good as another.  But avoid the broken or
3724 # incompatible versions:
3725 # SysV /etc/install, /usr/sbin/install
3726 # SunOS /usr/etc/install
3727 # IRIX /sbin/install
3728 # AIX /bin/install
3729 # AmigaOS /C/install, which installs bootblocks on floppy discs
3730 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3731 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3732 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3733 # OS/2's system install, which has a completely different semantic
3734 # ./install, which can be erroneously created by make from ./install.sh.
3735 # Reject install programs that cannot install multiple files.
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3737 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3738 if test -z "$INSTALL"; then
3739 if ${ac_cv_path_install+:} false; then :
3740   $as_echo_n "(cached) " >&6
3741 else
3742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743 for as_dir in $PATH
3744 do
3745   IFS=$as_save_IFS
3746   test -z "$as_dir" && as_dir=.
3747     # Account for people who put trailing slashes in PATH elements.
3748 case $as_dir/ in #((
3749   ./ | .// | /[cC]/* | \
3750   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3751   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3752   /usr/ucb/* ) ;;
3753   *)
3754     # OSF1 and SCO ODT 3.0 have their own names for install.
3755     # Don't use installbsd from OSF since it installs stuff as root
3756     # by default.
3757     for ac_prog in ginstall scoinst install; do
3758       for ac_exec_ext in '' $ac_executable_extensions; do
3759         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3760           if test $ac_prog = install &&
3761             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3762             # AIX install.  It has an incompatible calling convention.
3763             :
3764           elif test $ac_prog = install &&
3765             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3766             # program-specific install script used by HP pwplus--don't use.
3767             :
3768           else
3769             rm -rf conftest.one conftest.two conftest.dir
3770             echo one > conftest.one
3771             echo two > conftest.two
3772             mkdir conftest.dir
3773             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3774               test -s conftest.one && test -s conftest.two &&
3775               test -s conftest.dir/conftest.one &&
3776               test -s conftest.dir/conftest.two
3777             then
3778               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3779               break 3
3780             fi
3781           fi
3782         fi
3783       done
3784     done
3785     ;;
3786 esac
3787
3788   done
3789 IFS=$as_save_IFS
3790
3791 rm -rf conftest.one conftest.two conftest.dir
3792
3793 fi
3794   if test "${ac_cv_path_install+set}" = set; then
3795     INSTALL=$ac_cv_path_install
3796   else
3797     # As a last resort, use the slow shell script.  Don't cache a
3798     # value for INSTALL within a source directory, because that will
3799     # break other packages using the cache if that directory is
3800     # removed, or if the value is a relative name.
3801     INSTALL=$ac_install_sh
3802   fi
3803 fi
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3805 $as_echo "$INSTALL" >&6; }
3806
3807 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3808 # It thinks the first close brace ends the variable substitution.
3809 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3810
3811 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3812
3813 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3814
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3816 $as_echo_n "checking whether build environment is sane... " >&6; }
3817 # Reject unsafe characters in $srcdir or the absolute working directory
3818 # name.  Accept space and tab only in the latter.
3819 am_lf='
3820 '
3821 case `pwd` in
3822   *[\\\"\#\$\&\'\`$am_lf]*)
3823     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3824 esac
3825 case $srcdir in
3826   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3827     as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3828 esac
3829
3830 # Do 'set' in a subshell so we don't clobber the current shell's
3831 # arguments.  Must try -L first in case configure is actually a
3832 # symlink; some systems play weird games with the mod time of symlinks
3833 # (eg FreeBSD returns the mod time of the symlink's containing
3834 # directory).
3835 if (
3836    am_has_slept=no
3837    for am_try in 1 2; do
3838      echo "timestamp, slept: $am_has_slept" > conftest.file
3839      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3840      if test "$*" = "X"; then
3841         # -L didn't work.
3842         set X `ls -t "$srcdir/configure" conftest.file`
3843      fi
3844      if test "$*" != "X $srcdir/configure conftest.file" \
3845         && test "$*" != "X conftest.file $srcdir/configure"; then
3846
3847         # If neither matched, then we have a broken ls.  This can happen
3848         # if, for instance, CONFIG_SHELL is bash and it inherits a
3849         # broken ls alias from the environment.  This has actually
3850         # happened.  Such a system could not be considered "sane".
3851         as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3852   alias in your environment" "$LINENO" 5
3853      fi
3854      if test "$2" = conftest.file || test $am_try -eq 2; then
3855        break
3856      fi
3857      # Just in case.
3858      sleep 1
3859      am_has_slept=yes
3860    done
3861    test "$2" = conftest.file
3862    )
3863 then
3864    # Ok.
3865    :
3866 else
3867    as_fn_error $? "newly created file is older than distributed files!
3868 Check your system clock" "$LINENO" 5
3869 fi
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3871 $as_echo "yes" >&6; }
3872 # If we didn't sleep, we still need to ensure time stamps of config.status and
3873 # generated files are strictly newer.
3874 am_sleep_pid=
3875 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3876   ( sleep 1 ) &
3877   am_sleep_pid=$!
3878 fi
3879
3880 rm -f conftest.file
3881
3882 test "$program_prefix" != NONE &&
3883   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3884 # Use a double $ so make ignores it.
3885 test "$program_suffix" != NONE &&
3886   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3887 # Double any \ or $.
3888 # By default was `s,x,x', remove it if useless.
3889 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3890 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3891
3892 # expand $ac_aux_dir to an absolute path
3893 am_aux_dir=`cd $ac_aux_dir && pwd`
3894
3895 if test x"${MISSING+set}" != xset; then
3896   case $am_aux_dir in
3897   *\ * | *\     *)
3898     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3899   *)
3900     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3901   esac
3902 fi
3903 # Use eval to expand $SHELL
3904 if eval "$MISSING --is-lightweight"; then
3905   am_missing_run="$MISSING "
3906 else
3907   am_missing_run=
3908   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3909 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3910 fi
3911
3912 if test x"${install_sh}" != xset; then
3913   case $am_aux_dir in
3914   *\ * | *\     *)
3915     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3916   *)
3917     install_sh="\${SHELL} $am_aux_dir/install-sh"
3918   esac
3919 fi
3920
3921 # Installed binaries are usually stripped using 'strip' when the user
3922 # run "make install-strip".  However 'strip' might not be the right
3923 # tool to use in cross-compilation environments, therefore Automake
3924 # will honor the 'STRIP' environment variable to overrule this program.
3925 if test "$cross_compiling" != no; then
3926   if test -n "$ac_tool_prefix"; then
3927   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3928 set dummy ${ac_tool_prefix}strip; ac_word=$2
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3930 $as_echo_n "checking for $ac_word... " >&6; }
3931 if ${ac_cv_prog_STRIP+:} false; then :
3932   $as_echo_n "(cached) " >&6
3933 else
3934   if test -n "$STRIP"; then
3935   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3936 else
3937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3938 for as_dir in $PATH
3939 do
3940   IFS=$as_save_IFS
3941   test -z "$as_dir" && as_dir=.
3942     for ac_exec_ext in '' $ac_executable_extensions; do
3943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3944     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3946     break 2
3947   fi
3948 done
3949   done
3950 IFS=$as_save_IFS
3951
3952 fi
3953 fi
3954 STRIP=$ac_cv_prog_STRIP
3955 if test -n "$STRIP"; then
3956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3957 $as_echo "$STRIP" >&6; }
3958 else
3959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3960 $as_echo "no" >&6; }
3961 fi
3962
3963
3964 fi
3965 if test -z "$ac_cv_prog_STRIP"; then
3966   ac_ct_STRIP=$STRIP
3967   # Extract the first word of "strip", so it can be a program name with args.
3968 set dummy strip; ac_word=$2
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3970 $as_echo_n "checking for $ac_word... " >&6; }
3971 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3972   $as_echo_n "(cached) " >&6
3973 else
3974   if test -n "$ac_ct_STRIP"; then
3975   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3976 else
3977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3978 for as_dir in $PATH
3979 do
3980   IFS=$as_save_IFS
3981   test -z "$as_dir" && as_dir=.
3982     for ac_exec_ext in '' $ac_executable_extensions; do
3983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3984     ac_cv_prog_ac_ct_STRIP="strip"
3985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3986     break 2
3987   fi
3988 done
3989   done
3990 IFS=$as_save_IFS
3991
3992 fi
3993 fi
3994 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3995 if test -n "$ac_ct_STRIP"; then
3996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3997 $as_echo "$ac_ct_STRIP" >&6; }
3998 else
3999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000 $as_echo "no" >&6; }
4001 fi
4002
4003   if test "x$ac_ct_STRIP" = x; then
4004     STRIP=":"
4005   else
4006     case $cross_compiling:$ac_tool_warned in
4007 yes:)
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4009 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4010 ac_tool_warned=yes ;;
4011 esac
4012     STRIP=$ac_ct_STRIP
4013   fi
4014 else
4015   STRIP="$ac_cv_prog_STRIP"
4016 fi
4017
4018 fi
4019 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4020
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4022 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4023 if test -z "$MKDIR_P"; then
4024   if ${ac_cv_path_mkdir+:} false; then :
4025   $as_echo_n "(cached) " >&6
4026 else
4027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4028 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4029 do
4030   IFS=$as_save_IFS
4031   test -z "$as_dir" && as_dir=.
4032     for ac_prog in mkdir gmkdir; do
4033          for ac_exec_ext in '' $ac_executable_extensions; do
4034            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4035            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4036              'mkdir (GNU coreutils) '* | \
4037              'mkdir (coreutils) '* | \
4038              'mkdir (fileutils) '4.1*)
4039                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4040                break 3;;
4041            esac
4042          done
4043        done
4044   done
4045 IFS=$as_save_IFS
4046
4047 fi
4048
4049   test -d ./--version && rmdir ./--version
4050   if test "${ac_cv_path_mkdir+set}" = set; then
4051     MKDIR_P="$ac_cv_path_mkdir -p"
4052   else
4053     # As a last resort, use the slow shell script.  Don't cache a
4054     # value for MKDIR_P within a source directory, because that will
4055     # break other packages using the cache if that directory is
4056     # removed, or if the value is a relative name.
4057     MKDIR_P="$ac_install_sh -d"
4058   fi
4059 fi
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4061 $as_echo "$MKDIR_P" >&6; }
4062
4063 for ac_prog in gawk mawk nawk awk
4064 do
4065   # Extract the first word of "$ac_prog", so it can be a program name with args.
4066 set dummy $ac_prog; ac_word=$2
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4068 $as_echo_n "checking for $ac_word... " >&6; }
4069 if ${ac_cv_prog_AWK+:} false; then :
4070   $as_echo_n "(cached) " >&6
4071 else
4072   if test -n "$AWK"; then
4073   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4074 else
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076 for as_dir in $PATH
4077 do
4078   IFS=$as_save_IFS
4079   test -z "$as_dir" && as_dir=.
4080     for ac_exec_ext in '' $ac_executable_extensions; do
4081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4082     ac_cv_prog_AWK="$ac_prog"
4083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084     break 2
4085   fi
4086 done
4087   done
4088 IFS=$as_save_IFS
4089
4090 fi
4091 fi
4092 AWK=$ac_cv_prog_AWK
4093 if test -n "$AWK"; then
4094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4095 $as_echo "$AWK" >&6; }
4096 else
4097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4098 $as_echo "no" >&6; }
4099 fi
4100
4101
4102   test -n "$AWK" && break
4103 done
4104
4105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4106 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4107 set x ${MAKE-make}
4108 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4109 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4110   $as_echo_n "(cached) " >&6
4111 else
4112   cat >conftest.make <<\_ACEOF
4113 SHELL = /bin/sh
4114 all:
4115         @echo '@@@%%%=$(MAKE)=@@@%%%'
4116 _ACEOF
4117 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4118 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4119   *@@@%%%=?*=@@@%%%*)
4120     eval ac_cv_prog_make_${ac_make}_set=yes;;
4121   *)
4122     eval ac_cv_prog_make_${ac_make}_set=no;;
4123 esac
4124 rm -f conftest.make
4125 fi
4126 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4128 $as_echo "yes" >&6; }
4129   SET_MAKE=
4130 else
4131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4132 $as_echo "no" >&6; }
4133   SET_MAKE="MAKE=${MAKE-make}"
4134 fi
4135
4136 rm -rf .tst 2>/dev/null
4137 mkdir .tst 2>/dev/null
4138 if test -d .tst; then
4139   am__leading_dot=.
4140 else
4141   am__leading_dot=_
4142 fi
4143 rmdir .tst 2>/dev/null
4144
4145 # Check whether --enable-silent-rules was given.
4146 if test "${enable_silent_rules+set}" = set; then :
4147   enableval=$enable_silent_rules;
4148 fi
4149
4150 case $enable_silent_rules in # (((
4151   yes) AM_DEFAULT_VERBOSITY=0;;
4152    no) AM_DEFAULT_VERBOSITY=1;;
4153     *) AM_DEFAULT_VERBOSITY=1;;
4154 esac
4155 am_make=${MAKE-make}
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4157 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4158 if ${am_cv_make_support_nested_variables+:} false; then :
4159   $as_echo_n "(cached) " >&6
4160 else
4161   if $as_echo 'TRUE=$(BAR$(V))
4162 BAR0=false
4163 BAR1=true
4164 V=1
4165 am__doit:
4166         @$(TRUE)
4167 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4168   am_cv_make_support_nested_variables=yes
4169 else
4170   am_cv_make_support_nested_variables=no
4171 fi
4172 fi
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4174 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4175 if test $am_cv_make_support_nested_variables = yes; then
4176     AM_V='$(V)'
4177   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4178 else
4179   AM_V=$AM_DEFAULT_VERBOSITY
4180   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4181 fi
4182 AM_BACKSLASH='\'
4183
4184 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4185   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4186   # is not polluted with repeated "-I."
4187   am__isrc=' -I$(srcdir)'
4188   # test to see if srcdir already configured
4189   if test -f $srcdir/config.status; then
4190     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4191   fi
4192 fi
4193
4194 # test whether we have cygpath
4195 if test -z "$CYGPATH_W"; then
4196   if (cygpath --version) >/dev/null 2>/dev/null; then
4197     CYGPATH_W='cygpath -w'
4198   else
4199     CYGPATH_W=echo
4200   fi
4201 fi
4202
4203
4204 # Define the identity of the package.
4205  PACKAGE='m4'
4206  VERSION='1.4.17'
4207
4208
4209 cat >>confdefs.h <<_ACEOF
4210 #define PACKAGE "$PACKAGE"
4211 _ACEOF
4212
4213
4214 cat >>confdefs.h <<_ACEOF
4215 #define VERSION "$VERSION"
4216 _ACEOF
4217
4218 # Some tools Automake needs.
4219
4220 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4221
4222
4223 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4224
4225
4226 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4227
4228
4229 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4230
4231
4232 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4233
4234 # For better backward compatibility.  To be removed once Automake 1.9.x
4235 # dies out for good.  For more background, see:
4236 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4237 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4238 mkdir_p='$(MKDIR_P)'
4239
4240 # We need awk for the "check" target.  The system "awk" is bad on
4241 # some platforms.
4242 # Always define AMTAR for backward compatibility.  Yes, it's still used
4243 # in the wild :-(  We should find a proper way to deprecate it ...
4244 AMTAR='$${TAR-tar}'
4245
4246
4247 # We'll loop over all known methods to create a tar archive until one works.
4248 _am_tools='gnutar  pax cpio none'
4249
4250 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4251
4252
4253
4254
4255
4256
4257 # POSIX will say in a future version that running "rm -f" with no argument
4258 # is OK; and we want to be able to make that assumption in our Makefile
4259 # recipes.  So use an aggressive probe to check that the usage we want is
4260 # actually supported "in the wild" to an acceptable degree.
4261 # See automake bug#10828.
4262 # To make any issue more visible, cause the running configure to be aborted
4263 # by default if the 'rm' program in use doesn't match our expectations; the
4264 # user can still override this though.
4265 if rm -f && rm -fr && rm -rf; then : OK; else
4266   cat >&2 <<'END'
4267 Oops!
4268
4269 Your 'rm' program seems unable to run without file operands specified
4270 on the command line, even when the '-f' option is present.  This is contrary
4271 to the behaviour of most rm programs out there, and not conforming with
4272 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4273
4274 Please tell bug-automake@gnu.org about your system, including the value
4275 of your $PATH and any error possibly output before this message.  This
4276 can help us improve future automake versions.
4277
4278 END
4279   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4280     echo 'Configuration will proceed anyway, since you have set the' >&2
4281     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4282     echo >&2
4283   else
4284     cat >&2 <<'END'
4285 Aborting the configuration process, to ensure you take notice of the issue.
4286
4287 You can download and install GNU coreutils to get an 'rm' implementation
4288 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4289
4290 If you want to complete the configuration process using your problematic
4291 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4292 to "yes", and re-run configure.
4293
4294 END
4295     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4296   fi
4297 fi
4298
4299
4300
4301
4302 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4303
4304
4305 ac_ext=c
4306 ac_cpp='$CPP $CPPFLAGS'
4307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4310 if test -n "$ac_tool_prefix"; then
4311   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4312 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4314 $as_echo_n "checking for $ac_word... " >&6; }
4315 if ${ac_cv_prog_CC+:} false; then :
4316   $as_echo_n "(cached) " >&6
4317 else
4318   if test -n "$CC"; then
4319   ac_cv_prog_CC="$CC" # Let the user override the test.
4320 else
4321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4322 for as_dir in $PATH
4323 do
4324   IFS=$as_save_IFS
4325   test -z "$as_dir" && as_dir=.
4326     for ac_exec_ext in '' $ac_executable_extensions; do
4327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4328     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4330     break 2
4331   fi
4332 done
4333   done
4334 IFS=$as_save_IFS
4335
4336 fi
4337 fi
4338 CC=$ac_cv_prog_CC
4339 if test -n "$CC"; then
4340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4341 $as_echo "$CC" >&6; }
4342 else
4343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4344 $as_echo "no" >&6; }
4345 fi
4346
4347
4348 fi
4349 if test -z "$ac_cv_prog_CC"; then
4350   ac_ct_CC=$CC
4351   # Extract the first word of "gcc", so it can be a program name with args.
4352 set dummy gcc; ac_word=$2
4353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354 $as_echo_n "checking for $ac_word... " >&6; }
4355 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4356   $as_echo_n "(cached) " >&6
4357 else
4358   if test -n "$ac_ct_CC"; then
4359   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4360 else
4361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362 for as_dir in $PATH
4363 do
4364   IFS=$as_save_IFS
4365   test -z "$as_dir" && as_dir=.
4366     for ac_exec_ext in '' $ac_executable_extensions; do
4367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4368     ac_cv_prog_ac_ct_CC="gcc"
4369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4370     break 2
4371   fi
4372 done
4373   done
4374 IFS=$as_save_IFS
4375
4376 fi
4377 fi
4378 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4379 if test -n "$ac_ct_CC"; then
4380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4381 $as_echo "$ac_ct_CC" >&6; }
4382 else
4383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4384 $as_echo "no" >&6; }
4385 fi
4386
4387   if test "x$ac_ct_CC" = x; then
4388     CC=""
4389   else
4390     case $cross_compiling:$ac_tool_warned in
4391 yes:)
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4393 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4394 ac_tool_warned=yes ;;
4395 esac
4396     CC=$ac_ct_CC
4397   fi
4398 else
4399   CC="$ac_cv_prog_CC"
4400 fi
4401
4402 if test -z "$CC"; then
4403           if test -n "$ac_tool_prefix"; then
4404     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4405 set dummy ${ac_tool_prefix}cc; ac_word=$2
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4407 $as_echo_n "checking for $ac_word... " >&6; }
4408 if ${ac_cv_prog_CC+:} false; then :
4409   $as_echo_n "(cached) " >&6
4410 else
4411   if test -n "$CC"; then
4412   ac_cv_prog_CC="$CC" # Let the user override the test.
4413 else
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415 for as_dir in $PATH
4416 do
4417   IFS=$as_save_IFS
4418   test -z "$as_dir" && as_dir=.
4419     for ac_exec_ext in '' $ac_executable_extensions; do
4420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4421     ac_cv_prog_CC="${ac_tool_prefix}cc"
4422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4423     break 2
4424   fi
4425 done
4426   done
4427 IFS=$as_save_IFS
4428
4429 fi
4430 fi
4431 CC=$ac_cv_prog_CC
4432 if test -n "$CC"; then
4433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4434 $as_echo "$CC" >&6; }
4435 else
4436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4437 $as_echo "no" >&6; }
4438 fi
4439
4440
4441   fi
4442 fi
4443 if test -z "$CC"; then
4444   # Extract the first word of "cc", so it can be a program name with args.
4445 set dummy cc; ac_word=$2
4446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4447 $as_echo_n "checking for $ac_word... " >&6; }
4448 if ${ac_cv_prog_CC+:} false; then :
4449   $as_echo_n "(cached) " >&6
4450 else
4451   if test -n "$CC"; then
4452   ac_cv_prog_CC="$CC" # Let the user override the test.
4453 else
4454   ac_prog_rejected=no
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456 for as_dir in $PATH
4457 do
4458   IFS=$as_save_IFS
4459   test -z "$as_dir" && as_dir=.
4460     for ac_exec_ext in '' $ac_executable_extensions; do
4461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4462     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4463        ac_prog_rejected=yes
4464        continue
4465      fi
4466     ac_cv_prog_CC="cc"
4467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4468     break 2
4469   fi
4470 done
4471   done
4472 IFS=$as_save_IFS
4473
4474 if test $ac_prog_rejected = yes; then
4475   # We found a bogon in the path, so make sure we never use it.
4476   set dummy $ac_cv_prog_CC
4477   shift
4478   if test $# != 0; then
4479     # We chose a different compiler from the bogus one.
4480     # However, it has the same basename, so the bogon will be chosen
4481     # first if we set CC to just the basename; use the full file name.
4482     shift
4483     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4484   fi
4485 fi
4486 fi
4487 fi
4488 CC=$ac_cv_prog_CC
4489 if test -n "$CC"; then
4490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4491 $as_echo "$CC" >&6; }
4492 else
4493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4494 $as_echo "no" >&6; }
4495 fi
4496
4497
4498 fi
4499 if test -z "$CC"; then
4500   if test -n "$ac_tool_prefix"; then
4501   for ac_prog in cl.exe
4502   do
4503     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4504 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4506 $as_echo_n "checking for $ac_word... " >&6; }
4507 if ${ac_cv_prog_CC+:} false; then :
4508   $as_echo_n "(cached) " >&6
4509 else
4510   if test -n "$CC"; then
4511   ac_cv_prog_CC="$CC" # Let the user override the test.
4512 else
4513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514 for as_dir in $PATH
4515 do
4516   IFS=$as_save_IFS
4517   test -z "$as_dir" && as_dir=.
4518     for ac_exec_ext in '' $ac_executable_extensions; do
4519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4520     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4522     break 2
4523   fi
4524 done
4525   done
4526 IFS=$as_save_IFS
4527
4528 fi
4529 fi
4530 CC=$ac_cv_prog_CC
4531 if test -n "$CC"; then
4532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4533 $as_echo "$CC" >&6; }
4534 else
4535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536 $as_echo "no" >&6; }
4537 fi
4538
4539
4540     test -n "$CC" && break
4541   done
4542 fi
4543 if test -z "$CC"; then
4544   ac_ct_CC=$CC
4545   for ac_prog in cl.exe
4546 do
4547   # Extract the first word of "$ac_prog", so it can be a program name with args.
4548 set dummy $ac_prog; ac_word=$2
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4550 $as_echo_n "checking for $ac_word... " >&6; }
4551 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4552   $as_echo_n "(cached) " >&6
4553 else
4554   if test -n "$ac_ct_CC"; then
4555   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4556 else
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558 for as_dir in $PATH
4559 do
4560   IFS=$as_save_IFS
4561   test -z "$as_dir" && as_dir=.
4562     for ac_exec_ext in '' $ac_executable_extensions; do
4563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564     ac_cv_prog_ac_ct_CC="$ac_prog"
4565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566     break 2
4567   fi
4568 done
4569   done
4570 IFS=$as_save_IFS
4571
4572 fi
4573 fi
4574 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4575 if test -n "$ac_ct_CC"; then
4576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4577 $as_echo "$ac_ct_CC" >&6; }
4578 else
4579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580 $as_echo "no" >&6; }
4581 fi
4582
4583
4584   test -n "$ac_ct_CC" && break
4585 done
4586
4587   if test "x$ac_ct_CC" = x; then
4588     CC=""
4589   else
4590     case $cross_compiling:$ac_tool_warned in
4591 yes:)
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4593 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4594 ac_tool_warned=yes ;;
4595 esac
4596     CC=$ac_ct_CC
4597   fi
4598 fi
4599
4600 fi
4601
4602
4603 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4604 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4605 as_fn_error $? "no acceptable C compiler found in \$PATH
4606 See \`config.log' for more details" "$LINENO" 5; }
4607
4608 # Provide some information about the compiler.
4609 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4610 set X $ac_compile
4611 ac_compiler=$2
4612 for ac_option in --version -v -V -qversion; do
4613   { { ac_try="$ac_compiler $ac_option >&5"
4614 case "(($ac_try" in
4615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616   *) ac_try_echo=$ac_try;;
4617 esac
4618 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4619 $as_echo "$ac_try_echo"; } >&5
4620   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4621   ac_status=$?
4622   if test -s conftest.err; then
4623     sed '10a\
4624 ... rest of stderr output deleted ...
4625          10q' conftest.err >conftest.er1
4626     cat conftest.er1 >&5
4627   fi
4628   rm -f conftest.er1 conftest.err
4629   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4630   test $ac_status = 0; }
4631 done
4632
4633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4634 /* end confdefs.h.  */
4635
4636 int
4637 main ()
4638 {
4639
4640   ;
4641   return 0;
4642 }
4643 _ACEOF
4644 ac_clean_files_save=$ac_clean_files
4645 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4646 # Try to create an executable without -o first, disregard a.out.
4647 # It will help us diagnose broken compilers, and finding out an intuition
4648 # of exeext.
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4650 $as_echo_n "checking whether the C compiler works... " >&6; }
4651 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4652
4653 # The possible output files:
4654 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4655
4656 ac_rmfiles=
4657 for ac_file in $ac_files
4658 do
4659   case $ac_file in
4660     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4661     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4662   esac
4663 done
4664 rm -f $ac_rmfiles
4665
4666 if { { ac_try="$ac_link_default"
4667 case "(($ac_try" in
4668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4669   *) ac_try_echo=$ac_try;;
4670 esac
4671 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4672 $as_echo "$ac_try_echo"; } >&5
4673   (eval "$ac_link_default") 2>&5
4674   ac_status=$?
4675   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4676   test $ac_status = 0; }; then :
4677   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4678 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4679 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4680 # so that the user can short-circuit this test for compilers unknown to
4681 # Autoconf.
4682 for ac_file in $ac_files ''
4683 do
4684   test -f "$ac_file" || continue
4685   case $ac_file in
4686     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4687         ;;
4688     [ab].out )
4689         # We found the default executable, but exeext='' is most
4690         # certainly right.
4691         break;;
4692     *.* )
4693         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4694         then :; else
4695            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4696         fi
4697         # We set ac_cv_exeext here because the later test for it is not
4698         # safe: cross compilers may not add the suffix if given an `-o'
4699         # argument, so we may need to know it at that point already.
4700         # Even if this section looks crufty: it has the advantage of
4701         # actually working.
4702         break;;
4703     * )
4704         break;;
4705   esac
4706 done
4707 test "$ac_cv_exeext" = no && ac_cv_exeext=
4708
4709 else
4710   ac_file=''
4711 fi
4712 if test -z "$ac_file"; then :
4713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714 $as_echo "no" >&6; }
4715 $as_echo "$as_me: failed program was:" >&5
4716 sed 's/^/| /' conftest.$ac_ext >&5
4717
4718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4719 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4720 as_fn_error 77 "C compiler cannot create executables
4721 See \`config.log' for more details" "$LINENO" 5; }
4722 else
4723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4724 $as_echo "yes" >&6; }
4725 fi
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4727 $as_echo_n "checking for C compiler default output file name... " >&6; }
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4729 $as_echo "$ac_file" >&6; }
4730 ac_exeext=$ac_cv_exeext
4731
4732 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4733 ac_clean_files=$ac_clean_files_save
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4735 $as_echo_n "checking for suffix of executables... " >&6; }
4736 if { { ac_try="$ac_link"
4737 case "(($ac_try" in
4738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4739   *) ac_try_echo=$ac_try;;
4740 esac
4741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4742 $as_echo "$ac_try_echo"; } >&5
4743   (eval "$ac_link") 2>&5
4744   ac_status=$?
4745   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4746   test $ac_status = 0; }; then :
4747   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4748 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4749 # work properly (i.e., refer to `conftest.exe'), while it won't with
4750 # `rm'.
4751 for ac_file in conftest.exe conftest conftest.*; do
4752   test -f "$ac_file" || continue
4753   case $ac_file in
4754     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4755     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4756           break;;
4757     * ) break;;
4758   esac
4759 done
4760 else
4761   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4763 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4764 See \`config.log' for more details" "$LINENO" 5; }
4765 fi
4766 rm -f conftest conftest$ac_cv_exeext
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4768 $as_echo "$ac_cv_exeext" >&6; }
4769
4770 rm -f conftest.$ac_ext
4771 EXEEXT=$ac_cv_exeext
4772 ac_exeext=$EXEEXT
4773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4774 /* end confdefs.h.  */
4775 #include <stdio.h>
4776 int
4777 main ()
4778 {
4779 FILE *f = fopen ("conftest.out", "w");
4780  return ferror (f) || fclose (f) != 0;
4781
4782   ;
4783   return 0;
4784 }
4785 _ACEOF
4786 ac_clean_files="$ac_clean_files conftest.out"
4787 # Check that the compiler produces executables we can run.  If not, either
4788 # the compiler is broken, or we cross compile.
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4790 $as_echo_n "checking whether we are cross compiling... " >&6; }
4791 if test "$cross_compiling" != yes; then
4792   { { ac_try="$ac_link"
4793 case "(($ac_try" in
4794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4795   *) ac_try_echo=$ac_try;;
4796 esac
4797 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4798 $as_echo "$ac_try_echo"; } >&5
4799   (eval "$ac_link") 2>&5
4800   ac_status=$?
4801   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4802   test $ac_status = 0; }
4803   if { ac_try='./conftest$ac_cv_exeext'
4804   { { case "(($ac_try" in
4805   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4806   *) ac_try_echo=$ac_try;;
4807 esac
4808 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4809 $as_echo "$ac_try_echo"; } >&5
4810   (eval "$ac_try") 2>&5
4811   ac_status=$?
4812   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4813   test $ac_status = 0; }; }; then
4814     cross_compiling=no
4815   else
4816     if test "$cross_compiling" = maybe; then
4817         cross_compiling=yes
4818     else
4819         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4820 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4821 as_fn_error $? "cannot run C compiled programs.
4822 If you meant to cross compile, use \`--host'.
4823 See \`config.log' for more details" "$LINENO" 5; }
4824     fi
4825   fi
4826 fi
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4828 $as_echo "$cross_compiling" >&6; }
4829
4830 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4831 ac_clean_files=$ac_clean_files_save
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4833 $as_echo_n "checking for suffix of object files... " >&6; }
4834 if ${ac_cv_objext+:} false; then :
4835   $as_echo_n "(cached) " >&6
4836 else
4837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838 /* end confdefs.h.  */
4839
4840 int
4841 main ()
4842 {
4843
4844   ;
4845   return 0;
4846 }
4847 _ACEOF
4848 rm -f conftest.o conftest.obj
4849 if { { ac_try="$ac_compile"
4850 case "(($ac_try" in
4851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4852   *) ac_try_echo=$ac_try;;
4853 esac
4854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4855 $as_echo "$ac_try_echo"; } >&5
4856   (eval "$ac_compile") 2>&5
4857   ac_status=$?
4858   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4859   test $ac_status = 0; }; then :
4860   for ac_file in conftest.o conftest.obj conftest.*; do
4861   test -f "$ac_file" || continue;
4862   case $ac_file in
4863     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4864     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4865        break;;
4866   esac
4867 done
4868 else
4869   $as_echo "$as_me: failed program was:" >&5
4870 sed 's/^/| /' conftest.$ac_ext >&5
4871
4872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4873 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4874 as_fn_error $? "cannot compute suffix of object files: cannot compile
4875 See \`config.log' for more details" "$LINENO" 5; }
4876 fi
4877 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4878 fi
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4880 $as_echo "$ac_cv_objext" >&6; }
4881 OBJEXT=$ac_cv_objext
4882 ac_objext=$OBJEXT
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4884 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4885 if ${ac_cv_c_compiler_gnu+:} false; then :
4886   $as_echo_n "(cached) " >&6
4887 else
4888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h.  */
4890
4891 int
4892 main ()
4893 {
4894 #ifndef __GNUC__
4895        choke me
4896 #endif
4897
4898   ;
4899   return 0;
4900 }
4901 _ACEOF
4902 if ac_fn_c_try_compile "$LINENO"; then :
4903   ac_compiler_gnu=yes
4904 else
4905   ac_compiler_gnu=no
4906 fi
4907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4909
4910 fi
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4912 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4913 if test $ac_compiler_gnu = yes; then
4914   GCC=yes
4915 else
4916   GCC=
4917 fi
4918 ac_test_CFLAGS=${CFLAGS+set}
4919 ac_save_CFLAGS=$CFLAGS
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4921 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4922 if ${ac_cv_prog_cc_g+:} false; then :
4923   $as_echo_n "(cached) " >&6
4924 else
4925   ac_save_c_werror_flag=$ac_c_werror_flag
4926    ac_c_werror_flag=yes
4927    ac_cv_prog_cc_g=no
4928    CFLAGS="-g"
4929    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4930 /* end confdefs.h.  */
4931
4932 int
4933 main ()
4934 {
4935
4936   ;
4937   return 0;
4938 }
4939 _ACEOF
4940 if ac_fn_c_try_compile "$LINENO"; then :
4941   ac_cv_prog_cc_g=yes
4942 else
4943   CFLAGS=""
4944       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4945 /* end confdefs.h.  */
4946
4947 int
4948 main ()
4949 {
4950
4951   ;
4952   return 0;
4953 }
4954 _ACEOF
4955 if ac_fn_c_try_compile "$LINENO"; then :
4956
4957 else
4958   ac_c_werror_flag=$ac_save_c_werror_flag
4959          CFLAGS="-g"
4960          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961 /* end confdefs.h.  */
4962
4963 int
4964 main ()
4965 {
4966
4967   ;
4968   return 0;
4969 }
4970 _ACEOF
4971 if ac_fn_c_try_compile "$LINENO"; then :
4972   ac_cv_prog_cc_g=yes
4973 fi
4974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4975 fi
4976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977 fi
4978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4979    ac_c_werror_flag=$ac_save_c_werror_flag
4980 fi
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4982 $as_echo "$ac_cv_prog_cc_g" >&6; }
4983 if test "$ac_test_CFLAGS" = set; then
4984   CFLAGS=$ac_save_CFLAGS
4985 elif test $ac_cv_prog_cc_g = yes; then
4986   if test "$GCC" = yes; then
4987     CFLAGS="-g -O2"
4988   else
4989     CFLAGS="-g"
4990   fi
4991 else
4992   if test "$GCC" = yes; then
4993     CFLAGS="-O2"
4994   else
4995     CFLAGS=
4996   fi
4997 fi
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4999 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5000 if ${ac_cv_prog_cc_c89+:} false; then :
5001   $as_echo_n "(cached) " >&6
5002 else
5003   ac_cv_prog_cc_c89=no
5004 ac_save_CC=$CC
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h.  */
5007 #include <stdarg.h>
5008 #include <stdio.h>
5009 struct stat;
5010 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5011 struct buf { int x; };
5012 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5013 static char *e (p, i)
5014      char **p;
5015      int i;
5016 {
5017   return p[i];
5018 }
5019 static char *f (char * (*g) (char **, int), char **p, ...)
5020 {
5021   char *s;
5022   va_list v;
5023   va_start (v,p);
5024   s = g (p, va_arg (v,int));
5025   va_end (v);
5026   return s;
5027 }
5028
5029 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5030    function prototypes and stuff, but not '\xHH' hex character constants.
5031    These don't provoke an error unfortunately, instead are silently treated
5032    as 'x'.  The following induces an error, until -std is added to get
5033    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5034    array size at least.  It's necessary to write '\x00'==0 to get something
5035    that's true only with -std.  */
5036 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5037
5038 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5039    inside strings and character constants.  */
5040 #define FOO(x) 'x'
5041 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5042
5043 int test (int i, double x);
5044 struct s1 {int (*f) (int a);};
5045 struct s2 {int (*f) (double a);};
5046 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5047 int argc;
5048 char **argv;
5049 int
5050 main ()
5051 {
5052 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5053   ;
5054   return 0;
5055 }
5056 _ACEOF
5057 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5058         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5059 do
5060   CC="$ac_save_CC $ac_arg"
5061   if ac_fn_c_try_compile "$LINENO"; then :
5062   ac_cv_prog_cc_c89=$ac_arg
5063 fi
5064 rm -f core conftest.err conftest.$ac_objext
5065   test "x$ac_cv_prog_cc_c89" != "xno" && break
5066 done
5067 rm -f conftest.$ac_ext
5068 CC=$ac_save_CC
5069
5070 fi
5071 # AC_CACHE_VAL
5072 case "x$ac_cv_prog_cc_c89" in
5073   x)
5074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5075 $as_echo "none needed" >&6; } ;;
5076   xno)
5077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5078 $as_echo "unsupported" >&6; } ;;
5079   *)
5080     CC="$CC $ac_cv_prog_cc_c89"
5081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5082 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5083 esac
5084 if test "x$ac_cv_prog_cc_c89" != xno; then :
5085
5086 fi
5087
5088 ac_ext=c
5089 ac_cpp='$CPP $CPPFLAGS'
5090 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5091 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5092 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5093
5094 ac_ext=c
5095 ac_cpp='$CPP $CPPFLAGS'
5096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5100 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5101 if ${am_cv_prog_cc_c_o+:} false; then :
5102   $as_echo_n "(cached) " >&6
5103 else
5104   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5105 /* end confdefs.h.  */
5106
5107 int
5108 main ()
5109 {
5110
5111   ;
5112   return 0;
5113 }
5114 _ACEOF
5115   # Make sure it works both with $CC and with simple cc.
5116   # Following AC_PROG_CC_C_O, we do the test twice because some
5117   # compilers refuse to overwrite an existing .o file with -o,
5118   # though they will create one.
5119   am_cv_prog_cc_c_o=yes
5120   for am_i in 1 2; do
5121     if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5122    ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5123    ac_status=$?
5124    echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125    (exit $ac_status); } \
5126          && test -f conftest2.$ac_objext; then
5127       : OK
5128     else
5129       am_cv_prog_cc_c_o=no
5130       break
5131     fi
5132   done
5133   rm -f core conftest*
5134   unset am_i
5135 fi
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5137 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5138 if test "$am_cv_prog_cc_c_o" != yes; then
5139    # Losing compiler, so override with the script.
5140    # FIXME: It is wrong to rewrite CC.
5141    # But if we don't then we get into trouble of one sort or another.
5142    # A longer-term fix would be to have automake use am__CC in this case,
5143    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5144    CC="$am_aux_dir/compile $CC"
5145 fi
5146 ac_ext=c
5147 ac_cpp='$CPP $CPPFLAGS'
5148 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5149 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5151
5152 DEPDIR="${am__leading_dot}deps"
5153
5154 ac_config_commands="$ac_config_commands depfiles"
5155
5156
5157 am_make=${MAKE-make}
5158 cat > confinc << 'END'
5159 am__doit:
5160         @echo this is the am__doit target
5161 .PHONY: am__doit
5162 END
5163 # If we don't find an include directive, just comment out the code.
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5165 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5166 am__include="#"
5167 am__quote=
5168 _am_result=none
5169 # First try GNU make style include.
5170 echo "include confinc" > confmf
5171 # Ignore all kinds of additional output from 'make'.
5172 case `$am_make -s -f confmf 2> /dev/null` in #(
5173 *the\ am__doit\ target*)
5174   am__include=include
5175   am__quote=
5176   _am_result=GNU
5177   ;;
5178 esac
5179 # Now try BSD make style include.
5180 if test "$am__include" = "#"; then
5181    echo '.include "confinc"' > confmf
5182    case `$am_make -s -f confmf 2> /dev/null` in #(
5183    *the\ am__doit\ target*)
5184      am__include=.include
5185      am__quote="\""
5186      _am_result=BSD
5187      ;;
5188    esac
5189 fi
5190
5191
5192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5193 $as_echo "$_am_result" >&6; }
5194 rm -f confinc confmf
5195
5196 # Check whether --enable-dependency-tracking was given.
5197 if test "${enable_dependency_tracking+set}" = set; then :
5198   enableval=$enable_dependency_tracking;
5199 fi
5200
5201 if test "x$enable_dependency_tracking" != xno; then
5202   am_depcomp="$ac_aux_dir/depcomp"
5203   AMDEPBACKSLASH='\'
5204   am__nodep='_no'
5205 fi
5206  if test "x$enable_dependency_tracking" != xno; then
5207   AMDEP_TRUE=
5208   AMDEP_FALSE='#'
5209 else
5210   AMDEP_TRUE='#'
5211   AMDEP_FALSE=
5212 fi
5213
5214
5215
5216 depcc="$CC"   am_compiler_list=
5217
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5219 $as_echo_n "checking dependency style of $depcc... " >&6; }
5220 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5221   $as_echo_n "(cached) " >&6
5222 else
5223   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5224   # We make a subdir and do the tests there.  Otherwise we can end up
5225   # making bogus files that we don't know about and never remove.  For
5226   # instance it was reported that on HP-UX the gcc test will end up
5227   # making a dummy file named 'D' -- because '-MD' means "put the output
5228   # in D".
5229   rm -rf conftest.dir
5230   mkdir conftest.dir
5231   # Copy depcomp to subdir because otherwise we won't find it if we're
5232   # using a relative directory.
5233   cp "$am_depcomp" conftest.dir
5234   cd conftest.dir
5235   # We will build objects and dependencies in a subdirectory because
5236   # it helps to detect inapplicable dependency modes.  For instance
5237   # both Tru64's cc and ICC support -MD to output dependencies as a
5238   # side effect of compilation, but ICC will put the dependencies in
5239   # the current directory while Tru64 will put them in the object
5240   # directory.
5241   mkdir sub
5242
5243   am_cv_CC_dependencies_compiler_type=none
5244   if test "$am_compiler_list" = ""; then
5245      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5246   fi
5247   am__universal=false
5248   case " $depcc " in #(
5249      *\ -arch\ *\ -arch\ *) am__universal=true ;;
5250      esac
5251
5252   for depmode in $am_compiler_list; do
5253     # Setup a source with many dependencies, because some compilers
5254     # like to wrap large dependency lists on column 80 (with \), and
5255     # we should not choose a depcomp mode which is confused by this.
5256     #
5257     # We need to recreate these files for each test, as the compiler may
5258     # overwrite some of them when testing with obscure command lines.
5259     # This happens at least with the AIX C compiler.
5260     : > sub/conftest.c
5261     for i in 1 2 3 4 5 6; do
5262       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5263       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5264       # Solaris 10 /bin/sh.
5265       echo '/* dummy */' > sub/conftst$i.h
5266     done
5267     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5268
5269     # We check with '-c' and '-o' for the sake of the "dashmstdout"
5270     # mode.  It turns out that the SunPro C++ compiler does not properly
5271     # handle '-M -o', and we need to detect this.  Also, some Intel
5272     # versions had trouble with output in subdirs.
5273     am__obj=sub/conftest.${OBJEXT-o}
5274     am__minus_obj="-o $am__obj"
5275     case $depmode in
5276     gcc)
5277       # This depmode causes a compiler race in universal mode.
5278       test "$am__universal" = false || continue
5279       ;;
5280     nosideeffect)
5281       # After this tag, mechanisms are not by side-effect, so they'll
5282       # only be used when explicitly requested.
5283       if test "x$enable_dependency_tracking" = xyes; then
5284         continue
5285       else
5286         break
5287       fi
5288       ;;
5289     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5290       # This compiler won't grok '-c -o', but also, the minuso test has
5291       # not run yet.  These depmodes are late enough in the game, and
5292       # so weak that their functioning should not be impacted.
5293       am__obj=conftest.${OBJEXT-o}
5294       am__minus_obj=
5295       ;;
5296     none) break ;;
5297     esac
5298     if depmode=$depmode \
5299        source=sub/conftest.c object=$am__obj \
5300        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5301        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5302          >/dev/null 2>conftest.err &&
5303        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5304        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5305        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5306        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5307       # icc doesn't choke on unknown options, it will just issue warnings
5308       # or remarks (even with -Werror).  So we grep stderr for any message
5309       # that says an option was ignored or not supported.
5310       # When given -MP, icc 7.0 and 7.1 complain thusly:
5311       #   icc: Command line warning: ignoring option '-M'; no argument required
5312       # The diagnosis changed in icc 8.0:
5313       #   icc: Command line remark: option '-MP' not supported
5314       if (grep 'ignoring option' conftest.err ||
5315           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5316         am_cv_CC_dependencies_compiler_type=$depmode
5317         break
5318       fi
5319     fi
5320   done
5321
5322   cd ..
5323   rm -rf conftest.dir
5324 else
5325   am_cv_CC_dependencies_compiler_type=none
5326 fi
5327
5328 fi
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5330 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5331 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5332
5333  if
5334   test "x$enable_dependency_tracking" != xno \
5335   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5336   am__fastdepCC_TRUE=
5337   am__fastdepCC_FALSE='#'
5338 else
5339   am__fastdepCC_TRUE='#'
5340   am__fastdepCC_FALSE=
5341 fi
5342
5343
5344
5345
5346 ac_ext=c
5347 ac_cpp='$CPP $CPPFLAGS'
5348 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5349 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5350 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5352 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5353 # On Suns, sometimes $CPP names a directory.
5354 if test -n "$CPP" && test -d "$CPP"; then
5355   CPP=
5356 fi
5357 if test -z "$CPP"; then
5358   if ${ac_cv_prog_CPP+:} false; then :
5359   $as_echo_n "(cached) " >&6
5360 else
5361       # Double quotes because CPP needs to be expanded
5362     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5363     do
5364       ac_preproc_ok=false
5365 for ac_c_preproc_warn_flag in '' yes
5366 do
5367   # Use a header file that comes with gcc, so configuring glibc
5368   # with a fresh cross-compiler works.
5369   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5370   # <limits.h> exists even on freestanding compilers.
5371   # On the NeXT, cc -E runs the code through the compiler's parser,
5372   # not just through cpp. "Syntax error" is here to catch this case.
5373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374 /* end confdefs.h.  */
5375 #ifdef __STDC__
5376 # include <limits.h>
5377 #else
5378 # include <assert.h>
5379 #endif
5380                      Syntax error
5381 _ACEOF
5382 if ac_fn_c_try_cpp "$LINENO"; then :
5383
5384 else
5385   # Broken: fails on valid input.
5386 continue
5387 fi
5388 rm -f conftest.err conftest.i conftest.$ac_ext
5389
5390   # OK, works on sane cases.  Now check whether nonexistent headers
5391   # can be detected and how.
5392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393 /* end confdefs.h.  */
5394 #include <ac_nonexistent.h>
5395 _ACEOF
5396 if ac_fn_c_try_cpp "$LINENO"; then :
5397   # Broken: success on invalid input.
5398 continue
5399 else
5400   # Passes both tests.
5401 ac_preproc_ok=:
5402 break
5403 fi
5404 rm -f conftest.err conftest.i conftest.$ac_ext
5405
5406 done
5407 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5408 rm -f conftest.i conftest.err conftest.$ac_ext
5409 if $ac_preproc_ok; then :
5410   break
5411 fi
5412
5413     done
5414     ac_cv_prog_CPP=$CPP
5415
5416 fi
5417   CPP=$ac_cv_prog_CPP
5418 else
5419   ac_cv_prog_CPP=$CPP
5420 fi
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5422 $as_echo "$CPP" >&6; }
5423 ac_preproc_ok=false
5424 for ac_c_preproc_warn_flag in '' yes
5425 do
5426   # Use a header file that comes with gcc, so configuring glibc
5427   # with a fresh cross-compiler works.
5428   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5429   # <limits.h> exists even on freestanding compilers.
5430   # On the NeXT, cc -E runs the code through the compiler's parser,
5431   # not just through cpp. "Syntax error" is here to catch this case.
5432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5433 /* end confdefs.h.  */
5434 #ifdef __STDC__
5435 # include <limits.h>
5436 #else
5437 # include <assert.h>
5438 #endif
5439                      Syntax error
5440 _ACEOF
5441 if ac_fn_c_try_cpp "$LINENO"; then :
5442
5443 else
5444   # Broken: fails on valid input.
5445 continue
5446 fi
5447 rm -f conftest.err conftest.i conftest.$ac_ext
5448
5449   # OK, works on sane cases.  Now check whether nonexistent headers
5450   # can be detected and how.
5451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452 /* end confdefs.h.  */
5453 #include <ac_nonexistent.h>
5454 _ACEOF
5455 if ac_fn_c_try_cpp "$LINENO"; then :
5456   # Broken: success on invalid input.
5457 continue
5458 else
5459   # Passes both tests.
5460 ac_preproc_ok=:
5461 break
5462 fi
5463 rm -f conftest.err conftest.i conftest.$ac_ext
5464
5465 done
5466 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5467 rm -f conftest.i conftest.err conftest.$ac_ext
5468 if $ac_preproc_ok; then :
5469
5470 else
5471   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5473 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5474 See \`config.log' for more details" "$LINENO" 5; }
5475 fi
5476
5477 ac_ext=c
5478 ac_cpp='$CPP $CPPFLAGS'
5479 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5480 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5481 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5482
5483
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5485 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5486 if ${ac_cv_path_GREP+:} false; then :
5487   $as_echo_n "(cached) " >&6
5488 else
5489   if test -z "$GREP"; then
5490   ac_path_GREP_found=false
5491   # Loop through the user's path and test for each of PROGNAME-LIST
5492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5494 do
5495   IFS=$as_save_IFS
5496   test -z "$as_dir" && as_dir=.
5497     for ac_prog in grep ggrep; do
5498     for ac_exec_ext in '' $ac_executable_extensions; do
5499       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5500       as_fn_executable_p "$ac_path_GREP" || continue
5501 # Check for GNU ac_path_GREP and select it if it is found.
5502   # Check for GNU $ac_path_GREP
5503 case `"$ac_path_GREP" --version 2>&1` in
5504 *GNU*)
5505   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5506 *)
5507   ac_count=0
5508   $as_echo_n 0123456789 >"conftest.in"
5509   while :
5510   do
5511     cat "conftest.in" "conftest.in" >"conftest.tmp"
5512     mv "conftest.tmp" "conftest.in"
5513     cp "conftest.in" "conftest.nl"
5514     $as_echo 'GREP' >> "conftest.nl"
5515     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5516     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5517     as_fn_arith $ac_count + 1 && ac_count=$as_val
5518     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5519       # Best one so far, save it but keep looking for a better one
5520       ac_cv_path_GREP="$ac_path_GREP"
5521       ac_path_GREP_max=$ac_count
5522     fi
5523     # 10*(2^10) chars as input seems more than enough
5524     test $ac_count -gt 10 && break
5525   done
5526   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5527 esac
5528
5529       $ac_path_GREP_found && break 3
5530     done
5531   done
5532   done
5533 IFS=$as_save_IFS
5534   if test -z "$ac_cv_path_GREP"; then
5535     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5536   fi
5537 else
5538   ac_cv_path_GREP=$GREP
5539 fi
5540
5541 fi
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5543 $as_echo "$ac_cv_path_GREP" >&6; }
5544  GREP="$ac_cv_path_GREP"
5545
5546
5547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5548 $as_echo_n "checking for egrep... " >&6; }
5549 if ${ac_cv_path_EGREP+:} false; then :
5550   $as_echo_n "(cached) " >&6
5551 else
5552   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5553    then ac_cv_path_EGREP="$GREP -E"
5554    else
5555      if test -z "$EGREP"; then
5556   ac_path_EGREP_found=false
5557   # Loop through the user's path and test for each of PROGNAME-LIST
5558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5559 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5560 do
5561   IFS=$as_save_IFS
5562   test -z "$as_dir" && as_dir=.
5563     for ac_prog in egrep; do
5564     for ac_exec_ext in '' $ac_executable_extensions; do
5565       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5566       as_fn_executable_p "$ac_path_EGREP" || continue
5567 # Check for GNU ac_path_EGREP and select it if it is found.
5568   # Check for GNU $ac_path_EGREP
5569 case `"$ac_path_EGREP" --version 2>&1` in
5570 *GNU*)
5571   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5572 *)
5573   ac_count=0
5574   $as_echo_n 0123456789 >"conftest.in"
5575   while :
5576   do
5577     cat "conftest.in" "conftest.in" >"conftest.tmp"
5578     mv "conftest.tmp" "conftest.in"
5579     cp "conftest.in" "conftest.nl"
5580     $as_echo 'EGREP' >> "conftest.nl"
5581     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5582     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5583     as_fn_arith $ac_count + 1 && ac_count=$as_val
5584     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5585       # Best one so far, save it but keep looking for a better one
5586       ac_cv_path_EGREP="$ac_path_EGREP"
5587       ac_path_EGREP_max=$ac_count
5588     fi
5589     # 10*(2^10) chars as input seems more than enough
5590     test $ac_count -gt 10 && break
5591   done
5592   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5593 esac
5594
5595       $ac_path_EGREP_found && break 3
5596     done
5597   done
5598   done
5599 IFS=$as_save_IFS
5600   if test -z "$ac_cv_path_EGREP"; then
5601     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5602   fi
5603 else
5604   ac_cv_path_EGREP=$EGREP
5605 fi
5606
5607    fi
5608 fi
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5610 $as_echo "$ac_cv_path_EGREP" >&6; }
5611  EGREP="$ac_cv_path_EGREP"
5612
5613
5614
5615
5616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5617 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5618 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5619   $as_echo_n "(cached) " >&6
5620 else
5621
5622       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5623 /* end confdefs.h.  */
5624
5625 #ifdef __ACK__
5626 Amsterdam
5627 #endif
5628
5629 _ACEOF
5630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5631   $EGREP "Amsterdam" >/dev/null 2>&1; then :
5632   gl_cv_c_amsterdam_compiler=yes
5633 else
5634   gl_cv_c_amsterdam_compiler=no
5635 fi
5636 rm -f conftest*
5637
5638
5639 fi
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5641 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5642   if test -z "$AR"; then
5643     if test $gl_cv_c_amsterdam_compiler = yes; then
5644       AR='cc -c.a'
5645       if test -z "$ARFLAGS"; then
5646         ARFLAGS='-o'
5647       fi
5648     else
5649                   if test -n "$ac_tool_prefix"; then
5650   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5651 set dummy ${ac_tool_prefix}ar; ac_word=$2
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5653 $as_echo_n "checking for $ac_word... " >&6; }
5654 if ${ac_cv_prog_AR+:} false; then :
5655   $as_echo_n "(cached) " >&6
5656 else
5657   if test -n "$AR"; then
5658   ac_cv_prog_AR="$AR" # Let the user override the test.
5659 else
5660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661 for as_dir in $PATH
5662 do
5663   IFS=$as_save_IFS
5664   test -z "$as_dir" && as_dir=.
5665     for ac_exec_ext in '' $ac_executable_extensions; do
5666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5667     ac_cv_prog_AR="${ac_tool_prefix}ar"
5668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669     break 2
5670   fi
5671 done
5672   done
5673 IFS=$as_save_IFS
5674
5675 fi
5676 fi
5677 AR=$ac_cv_prog_AR
5678 if test -n "$AR"; then
5679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5680 $as_echo "$AR" >&6; }
5681 else
5682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5683 $as_echo "no" >&6; }
5684 fi
5685
5686
5687 fi
5688 if test -z "$ac_cv_prog_AR"; then
5689   ac_ct_AR=$AR
5690   # Extract the first word of "ar", so it can be a program name with args.
5691 set dummy ar; ac_word=$2
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5693 $as_echo_n "checking for $ac_word... " >&6; }
5694 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5695   $as_echo_n "(cached) " >&6
5696 else
5697   if test -n "$ac_ct_AR"; then
5698   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5699 else
5700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701 for as_dir in $PATH
5702 do
5703   IFS=$as_save_IFS
5704   test -z "$as_dir" && as_dir=.
5705     for ac_exec_ext in '' $ac_executable_extensions; do
5706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707     ac_cv_prog_ac_ct_AR="ar"
5708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709     break 2
5710   fi
5711 done
5712   done
5713 IFS=$as_save_IFS
5714
5715 fi
5716 fi
5717 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5718 if test -n "$ac_ct_AR"; then
5719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5720 $as_echo "$ac_ct_AR" >&6; }
5721 else
5722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723 $as_echo "no" >&6; }
5724 fi
5725
5726   if test "x$ac_ct_AR" = x; then
5727     AR="ar"
5728   else
5729     case $cross_compiling:$ac_tool_warned in
5730 yes:)
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5732 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5733 ac_tool_warned=yes ;;
5734 esac
5735     AR=$ac_ct_AR
5736   fi
5737 else
5738   AR="$ac_cv_prog_AR"
5739 fi
5740
5741       if test -z "$ARFLAGS"; then
5742         ARFLAGS='cru'
5743       fi
5744     fi
5745   else
5746     if test -z "$ARFLAGS"; then
5747       ARFLAGS='cru'
5748     fi
5749   fi
5750
5751
5752   if test -z "$RANLIB"; then
5753     if test $gl_cv_c_amsterdam_compiler = yes; then
5754       RANLIB=':'
5755     else
5756             if test -n "$ac_tool_prefix"; then
5757   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5758 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760 $as_echo_n "checking for $ac_word... " >&6; }
5761 if ${ac_cv_prog_RANLIB+:} false; then :
5762   $as_echo_n "(cached) " >&6
5763 else
5764   if test -n "$RANLIB"; then
5765   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5766 else
5767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768 for as_dir in $PATH
5769 do
5770   IFS=$as_save_IFS
5771   test -z "$as_dir" && as_dir=.
5772     for ac_exec_ext in '' $ac_executable_extensions; do
5773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5774     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5776     break 2
5777   fi
5778 done
5779   done
5780 IFS=$as_save_IFS
5781
5782 fi
5783 fi
5784 RANLIB=$ac_cv_prog_RANLIB
5785 if test -n "$RANLIB"; then
5786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5787 $as_echo "$RANLIB" >&6; }
5788 else
5789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790 $as_echo "no" >&6; }
5791 fi
5792
5793
5794 fi
5795 if test -z "$ac_cv_prog_RANLIB"; then
5796   ac_ct_RANLIB=$RANLIB
5797   # Extract the first word of "ranlib", so it can be a program name with args.
5798 set dummy ranlib; ac_word=$2
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800 $as_echo_n "checking for $ac_word... " >&6; }
5801 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5802   $as_echo_n "(cached) " >&6
5803 else
5804   if test -n "$ac_ct_RANLIB"; then
5805   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5806 else
5807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5808 for as_dir in $PATH
5809 do
5810   IFS=$as_save_IFS
5811   test -z "$as_dir" && as_dir=.
5812     for ac_exec_ext in '' $ac_executable_extensions; do
5813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5814     ac_cv_prog_ac_ct_RANLIB="ranlib"
5815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5816     break 2
5817   fi
5818 done
5819   done
5820 IFS=$as_save_IFS
5821
5822 fi
5823 fi
5824 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5825 if test -n "$ac_ct_RANLIB"; then
5826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5827 $as_echo "$ac_ct_RANLIB" >&6; }
5828 else
5829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5830 $as_echo "no" >&6; }
5831 fi
5832
5833   if test "x$ac_ct_RANLIB" = x; then
5834     RANLIB=":"
5835   else
5836     case $cross_compiling:$ac_tool_warned in
5837 yes:)
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5839 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5840 ac_tool_warned=yes ;;
5841 esac
5842     RANLIB=$ac_ct_RANLIB
5843   fi
5844 else
5845   RANLIB="$ac_cv_prog_RANLIB"
5846 fi
5847
5848     fi
5849   fi
5850
5851
5852
5853 # Make sure we can run config.sub.
5854 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5855   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5856
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5858 $as_echo_n "checking build system type... " >&6; }
5859 if ${ac_cv_build+:} false; then :
5860   $as_echo_n "(cached) " >&6
5861 else
5862   ac_build_alias=$build_alias
5863 test "x$ac_build_alias" = x &&
5864   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5865 test "x$ac_build_alias" = x &&
5866   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5867 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5868   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5869
5870 fi
5871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5872 $as_echo "$ac_cv_build" >&6; }
5873 case $ac_cv_build in
5874 *-*-*) ;;
5875 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5876 esac
5877 build=$ac_cv_build
5878 ac_save_IFS=$IFS; IFS='-'
5879 set x $ac_cv_build
5880 shift
5881 build_cpu=$1
5882 build_vendor=$2
5883 shift; shift
5884 # Remember, the first character of IFS is used to create $*,
5885 # except with old shells:
5886 build_os=$*
5887 IFS=$ac_save_IFS
5888 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5889
5890
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5892 $as_echo_n "checking host system type... " >&6; }
5893 if ${ac_cv_host+:} false; then :
5894   $as_echo_n "(cached) " >&6
5895 else
5896   if test "x$host_alias" = x; then
5897   ac_cv_host=$ac_cv_build
5898 else
5899   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5900     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5901 fi
5902
5903 fi
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5905 $as_echo "$ac_cv_host" >&6; }
5906 case $ac_cv_host in
5907 *-*-*) ;;
5908 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5909 esac
5910 host=$ac_cv_host
5911 ac_save_IFS=$IFS; IFS='-'
5912 set x $ac_cv_host
5913 shift
5914 host_cpu=$1
5915 host_vendor=$2
5916 shift; shift
5917 # Remember, the first character of IFS is used to create $*,
5918 # except with old shells:
5919 host_os=$*
5920 IFS=$ac_save_IFS
5921 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5922
5923
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5925 $as_echo_n "checking for ANSI C header files... " >&6; }
5926 if ${ac_cv_header_stdc+:} false; then :
5927   $as_echo_n "(cached) " >&6
5928 else
5929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5930 /* end confdefs.h.  */
5931 #include <stdlib.h>
5932 #include <stdarg.h>
5933 #include <string.h>
5934 #include <float.h>
5935
5936 int
5937 main ()
5938 {
5939
5940   ;
5941   return 0;
5942 }
5943 _ACEOF
5944 if ac_fn_c_try_compile "$LINENO"; then :
5945   ac_cv_header_stdc=yes
5946 else
5947   ac_cv_header_stdc=no
5948 fi
5949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5950
5951 if test $ac_cv_header_stdc = yes; then
5952   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5954 /* end confdefs.h.  */
5955 #include <string.h>
5956
5957 _ACEOF
5958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5959   $EGREP "memchr" >/dev/null 2>&1; then :
5960
5961 else
5962   ac_cv_header_stdc=no
5963 fi
5964 rm -f conftest*
5965
5966 fi
5967
5968 if test $ac_cv_header_stdc = yes; then
5969   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5971 /* end confdefs.h.  */
5972 #include <stdlib.h>
5973
5974 _ACEOF
5975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5976   $EGREP "free" >/dev/null 2>&1; then :
5977
5978 else
5979   ac_cv_header_stdc=no
5980 fi
5981 rm -f conftest*
5982
5983 fi
5984
5985 if test $ac_cv_header_stdc = yes; then
5986   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5987   if test "$cross_compiling" = yes; then :
5988   :
5989 else
5990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991 /* end confdefs.h.  */
5992 #include <ctype.h>
5993 #include <stdlib.h>
5994 #if ((' ' & 0x0FF) == 0x020)
5995 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5996 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5997 #else
5998 # define ISLOWER(c) \
5999                    (('a' <= (c) && (c) <= 'i') \
6000                      || ('j' <= (c) && (c) <= 'r') \
6001                      || ('s' <= (c) && (c) <= 'z'))
6002 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6003 #endif
6004
6005 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6006 int
6007 main ()
6008 {
6009   int i;
6010   for (i = 0; i < 256; i++)
6011     if (XOR (islower (i), ISLOWER (i))
6012         || toupper (i) != TOUPPER (i))
6013       return 2;
6014   return 0;
6015 }
6016 _ACEOF
6017 if ac_fn_c_try_run "$LINENO"; then :
6018
6019 else
6020   ac_cv_header_stdc=no
6021 fi
6022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6023   conftest.$ac_objext conftest.beam conftest.$ac_ext
6024 fi
6025
6026 fi
6027 fi
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6029 $as_echo "$ac_cv_header_stdc" >&6; }
6030 if test $ac_cv_header_stdc = yes; then
6031
6032 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6033
6034 fi
6035
6036 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6037 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6038                   inttypes.h stdint.h unistd.h
6039 do :
6040   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6041 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6042 "
6043 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6044   cat >>confdefs.h <<_ACEOF
6045 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6046 _ACEOF
6047
6048 fi
6049
6050 done
6051
6052
6053
6054   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6055 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6056   MINIX=yes
6057 else
6058   MINIX=
6059 fi
6060
6061
6062   if test "$MINIX" = yes; then
6063
6064 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6065
6066
6067 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6068
6069
6070 $as_echo "#define _MINIX 1" >>confdefs.h
6071
6072
6073 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6074
6075   fi
6076
6077
6078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6079 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6080 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6081   $as_echo_n "(cached) " >&6
6082 else
6083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6084 /* end confdefs.h.  */
6085
6086 #         define __EXTENSIONS__ 1
6087           $ac_includes_default
6088 int
6089 main ()
6090 {
6091
6092   ;
6093   return 0;
6094 }
6095 _ACEOF
6096 if ac_fn_c_try_compile "$LINENO"; then :
6097   ac_cv_safe_to_define___extensions__=yes
6098 else
6099   ac_cv_safe_to_define___extensions__=no
6100 fi
6101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102 fi
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6104 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6105   test $ac_cv_safe_to_define___extensions__ = yes &&
6106     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6107
6108   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6109
6110   $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6111
6112   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6113
6114   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6115
6116   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6117
6118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6119 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6120 if ${ac_cv_should_define__xopen_source+:} false; then :
6121   $as_echo_n "(cached) " >&6
6122 else
6123   ac_cv_should_define__xopen_source=no
6124      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6125 /* end confdefs.h.  */
6126
6127           #include <wchar.h>
6128           mbstate_t x;
6129 int
6130 main ()
6131 {
6132
6133   ;
6134   return 0;
6135 }
6136 _ACEOF
6137 if ac_fn_c_try_compile "$LINENO"; then :
6138
6139 else
6140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6141 /* end confdefs.h.  */
6142
6143              #define _XOPEN_SOURCE 500
6144              #include <wchar.h>
6145              mbstate_t x;
6146 int
6147 main ()
6148 {
6149
6150   ;
6151   return 0;
6152 }
6153 _ACEOF
6154 if ac_fn_c_try_compile "$LINENO"; then :
6155   ac_cv_should_define__xopen_source=yes
6156 fi
6157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6158 fi
6159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6160 fi
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6162 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6163   test $ac_cv_should_define__xopen_source = yes &&
6164     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6165
6166
6167
6168
6169
6170
6171
6172
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6174 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6175 if ${ac_cv_sys_largefile_source+:} false; then :
6176   $as_echo_n "(cached) " >&6
6177 else
6178   while :; do
6179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h.  */
6181 #include <sys/types.h> /* for off_t */
6182      #include <stdio.h>
6183 int
6184 main ()
6185 {
6186 int (*fp) (FILE *, off_t, int) = fseeko;
6187      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6188   ;
6189   return 0;
6190 }
6191 _ACEOF
6192 if ac_fn_c_try_link "$LINENO"; then :
6193   ac_cv_sys_largefile_source=no; break
6194 fi
6195 rm -f core conftest.err conftest.$ac_objext \
6196     conftest$ac_exeext conftest.$ac_ext
6197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6198 /* end confdefs.h.  */
6199 #define _LARGEFILE_SOURCE 1
6200 #include <sys/types.h> /* for off_t */
6201      #include <stdio.h>
6202 int
6203 main ()
6204 {
6205 int (*fp) (FILE *, off_t, int) = fseeko;
6206      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6207   ;
6208   return 0;
6209 }
6210 _ACEOF
6211 if ac_fn_c_try_link "$LINENO"; then :
6212   ac_cv_sys_largefile_source=1; break
6213 fi
6214 rm -f core conftest.err conftest.$ac_objext \
6215     conftest$ac_exeext conftest.$ac_ext
6216   ac_cv_sys_largefile_source=unknown
6217   break
6218 done
6219 fi
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6221 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6222 case $ac_cv_sys_largefile_source in #(
6223   no | unknown) ;;
6224   *)
6225 cat >>confdefs.h <<_ACEOF
6226 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6227 _ACEOF
6228 ;;
6229 esac
6230 rm -rf conftest*
6231
6232 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6233 # in glibc 2.1.3, but that breaks too many other things.
6234 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6235 if test $ac_cv_sys_largefile_source != unknown; then
6236
6237 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6238
6239 fi
6240
6241
6242
6243
6244   # IEEE behaviour is the default on all CPUs except Alpha and SH
6245   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6246   # and the GCC 4.1.2 manual).
6247   case "$host_cpu" in
6248     alpha*)
6249       # On Alpha systems, a compiler option provides the behaviour.
6250       # See the ieee(3) manual page, also available at
6251       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6252       if test -n "$GCC"; then
6253         # GCC has the option -mieee.
6254         # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6255         CPPFLAGS="$CPPFLAGS -mieee"
6256       else
6257         # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6258         # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6259         CPPFLAGS="$CPPFLAGS -ieee"
6260       fi
6261       ;;
6262     sh*)
6263       if test -n "$GCC"; then
6264         # GCC has the option -mieee.
6265         CPPFLAGS="$CPPFLAGS -mieee"
6266       fi
6267       ;;
6268   esac
6269
6270 # Check whether --enable-largefile was given.
6271 if test "${enable_largefile+set}" = set; then :
6272   enableval=$enable_largefile;
6273 fi
6274
6275 if test "$enable_largefile" != no; then
6276
6277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6278 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6279 if ${ac_cv_sys_largefile_CC+:} false; then :
6280   $as_echo_n "(cached) " >&6
6281 else
6282   ac_cv_sys_largefile_CC=no
6283      if test "$GCC" != yes; then
6284        ac_save_CC=$CC
6285        while :; do
6286          # IRIX 6.2 and later do not support large files by default,
6287          # so use the C compiler's -n32 option if that helps.
6288          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6289 /* end confdefs.h.  */
6290 #include <sys/types.h>
6291  /* Check that off_t can represent 2**63 - 1 correctly.
6292     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6293     since some C++ compilers masquerading as C compilers
6294     incorrectly reject 9223372036854775807.  */
6295 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6296   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6297                        && LARGE_OFF_T % 2147483647 == 1)
6298                       ? 1 : -1];
6299 int
6300 main ()
6301 {
6302
6303   ;
6304   return 0;
6305 }
6306 _ACEOF
6307          if ac_fn_c_try_compile "$LINENO"; then :
6308   break
6309 fi
6310 rm -f core conftest.err conftest.$ac_objext
6311          CC="$CC -n32"
6312          if ac_fn_c_try_compile "$LINENO"; then :
6313   ac_cv_sys_largefile_CC=' -n32'; break
6314 fi
6315 rm -f core conftest.err conftest.$ac_objext
6316          break
6317        done
6318        CC=$ac_save_CC
6319        rm -f conftest.$ac_ext
6320     fi
6321 fi
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6323 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6324   if test "$ac_cv_sys_largefile_CC" != no; then
6325     CC=$CC$ac_cv_sys_largefile_CC
6326   fi
6327
6328   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6329 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6330 if ${ac_cv_sys_file_offset_bits+:} false; then :
6331   $as_echo_n "(cached) " >&6
6332 else
6333   while :; do
6334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6335 /* end confdefs.h.  */
6336 #include <sys/types.h>
6337  /* Check that off_t can represent 2**63 - 1 correctly.
6338     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6339     since some C++ compilers masquerading as C compilers
6340     incorrectly reject 9223372036854775807.  */
6341 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6342   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6343                        && LARGE_OFF_T % 2147483647 == 1)
6344                       ? 1 : -1];
6345 int
6346 main ()
6347 {
6348
6349   ;
6350   return 0;
6351 }
6352 _ACEOF
6353 if ac_fn_c_try_compile "$LINENO"; then :
6354   ac_cv_sys_file_offset_bits=no; break
6355 fi
6356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6358 /* end confdefs.h.  */
6359 #define _FILE_OFFSET_BITS 64
6360 #include <sys/types.h>
6361  /* Check that off_t can represent 2**63 - 1 correctly.
6362     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6363     since some C++ compilers masquerading as C compilers
6364     incorrectly reject 9223372036854775807.  */
6365 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6366   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6367                        && LARGE_OFF_T % 2147483647 == 1)
6368                       ? 1 : -1];
6369 int
6370 main ()
6371 {
6372
6373   ;
6374   return 0;
6375 }
6376 _ACEOF
6377 if ac_fn_c_try_compile "$LINENO"; then :
6378   ac_cv_sys_file_offset_bits=64; break
6379 fi
6380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6381   ac_cv_sys_file_offset_bits=unknown
6382   break
6383 done
6384 fi
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6386 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6387 case $ac_cv_sys_file_offset_bits in #(
6388   no | unknown) ;;
6389   *)
6390 cat >>confdefs.h <<_ACEOF
6391 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6392 _ACEOF
6393 ;;
6394 esac
6395 rm -rf conftest*
6396   if test $ac_cv_sys_file_offset_bits = unknown; then
6397     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6398 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6399 if ${ac_cv_sys_large_files+:} false; then :
6400   $as_echo_n "(cached) " >&6
6401 else
6402   while :; do
6403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6404 /* end confdefs.h.  */
6405 #include <sys/types.h>
6406  /* Check that off_t can represent 2**63 - 1 correctly.
6407     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6408     since some C++ compilers masquerading as C compilers
6409     incorrectly reject 9223372036854775807.  */
6410 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6411   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6412                        && LARGE_OFF_T % 2147483647 == 1)
6413                       ? 1 : -1];
6414 int
6415 main ()
6416 {
6417
6418   ;
6419   return 0;
6420 }
6421 _ACEOF
6422 if ac_fn_c_try_compile "$LINENO"; then :
6423   ac_cv_sys_large_files=no; break
6424 fi
6425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6427 /* end confdefs.h.  */
6428 #define _LARGE_FILES 1
6429 #include <sys/types.h>
6430  /* Check that off_t can represent 2**63 - 1 correctly.
6431     We can't simply define LARGE_OFF_T to be 9223372036854775807,
6432     since some C++ compilers masquerading as C compilers
6433     incorrectly reject 9223372036854775807.  */
6434 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6435   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6436                        && LARGE_OFF_T % 2147483647 == 1)
6437                       ? 1 : -1];
6438 int
6439 main ()
6440 {
6441
6442   ;
6443   return 0;
6444 }
6445 _ACEOF
6446 if ac_fn_c_try_compile "$LINENO"; then :
6447   ac_cv_sys_large_files=1; break
6448 fi
6449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6450   ac_cv_sys_large_files=unknown
6451   break
6452 done
6453 fi
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6455 $as_echo "$ac_cv_sys_large_files" >&6; }
6456 case $ac_cv_sys_large_files in #(
6457   no | unknown) ;;
6458   *)
6459 cat >>confdefs.h <<_ACEOF
6460 #define _LARGE_FILES $ac_cv_sys_large_files
6461 _ACEOF
6462 ;;
6463 esac
6464 rm -rf conftest*
6465   fi
6466
6467
6468 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6469
6470 fi
6471
6472    case $ac_cv_prog_cc_stdc in #(
6473   no) :
6474     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6475   *) :
6476     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6477 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6478 if ${ac_cv_prog_cc_c99+:} false; then :
6479   $as_echo_n "(cached) " >&6
6480 else
6481   ac_cv_prog_cc_c99=no
6482 ac_save_CC=$CC
6483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484 /* end confdefs.h.  */
6485 #include <stdarg.h>
6486 #include <stdbool.h>
6487 #include <stdlib.h>
6488 #include <wchar.h>
6489 #include <stdio.h>
6490
6491 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
6492 #define debug(...) fprintf (stderr, __VA_ARGS__)
6493 #define showlist(...) puts (#__VA_ARGS__)
6494 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6495 static void
6496 test_varargs_macros (void)
6497 {
6498   int x = 1234;
6499   int y = 5678;
6500   debug ("Flag");
6501   debug ("X = %d\n", x);
6502   showlist (The first, second, and third items.);
6503   report (x>y, "x is %d but y is %d", x, y);
6504 }
6505
6506 // Check long long types.
6507 #define BIG64 18446744073709551615ull
6508 #define BIG32 4294967295ul
6509 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6510 #if !BIG_OK
6511   your preprocessor is broken;
6512 #endif
6513 #if BIG_OK
6514 #else
6515   your preprocessor is broken;
6516 #endif
6517 static long long int bignum = -9223372036854775807LL;
6518 static unsigned long long int ubignum = BIG64;
6519
6520 struct incomplete_array
6521 {
6522   int datasize;
6523   double data[];
6524 };
6525
6526 struct named_init {
6527   int number;
6528   const wchar_t *name;
6529   double average;
6530 };
6531
6532 typedef const char *ccp;
6533
6534 static inline int
6535 test_restrict (ccp restrict text)
6536 {
6537   // See if C++-style comments work.
6538   // Iterate through items via the restricted pointer.
6539   // Also check for declarations in for loops.
6540   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6541     continue;
6542   return 0;
6543 }
6544
6545 // Check varargs and va_copy.
6546 static void
6547 test_varargs (const char *format, ...)
6548 {
6549   va_list args;
6550   va_start (args, format);
6551   va_list args_copy;
6552   va_copy (args_copy, args);
6553
6554   const char *str;
6555   int number;
6556   float fnumber;
6557
6558   while (*format)
6559     {
6560       switch (*format++)
6561         {
6562         case 's': // string
6563           str = va_arg (args_copy, const char *);
6564           break;
6565         case 'd': // int
6566           number = va_arg (args_copy, int);
6567           break;
6568         case 'f': // float
6569           fnumber = va_arg (args_copy, double);
6570           break;
6571         default:
6572           break;
6573         }
6574     }
6575   va_end (args_copy);
6576   va_end (args);
6577 }
6578
6579 int
6580 main ()
6581 {
6582
6583   // Check bool.
6584   _Bool success = false;
6585
6586   // Check restrict.
6587   if (test_restrict ("String literal") == 0)
6588     success = true;
6589   char *restrict newvar = "Another string";
6590
6591   // Check varargs.
6592   test_varargs ("s, d' f .", "string", 65, 34.234);
6593   test_varargs_macros ();
6594
6595   // Check flexible array members.
6596   struct incomplete_array *ia =
6597     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6598   ia->datasize = 10;
6599   for (int i = 0; i < ia->datasize; ++i)
6600     ia->data[i] = i * 1.234;
6601
6602   // Check named initializers.
6603   struct named_init ni = {
6604     .number = 34,
6605     .name = L"Test wide string",
6606     .average = 543.34343,
6607   };
6608
6609   ni.number = 58;
6610
6611   int dynamic_array[ni.number];
6612   dynamic_array[ni.number - 1] = 543;
6613
6614   // work around unused variable warnings
6615   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6616           || dynamic_array[ni.number - 1] != 543);
6617
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6623 do
6624   CC="$ac_save_CC $ac_arg"
6625   if ac_fn_c_try_compile "$LINENO"; then :
6626   ac_cv_prog_cc_c99=$ac_arg
6627 fi
6628 rm -f core conftest.err conftest.$ac_objext
6629   test "x$ac_cv_prog_cc_c99" != "xno" && break
6630 done
6631 rm -f conftest.$ac_ext
6632 CC=$ac_save_CC
6633
6634 fi
6635 # AC_CACHE_VAL
6636 case "x$ac_cv_prog_cc_c99" in
6637   x)
6638     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6639 $as_echo "none needed" >&6; } ;;
6640   xno)
6641     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6642 $as_echo "unsupported" >&6; } ;;
6643   *)
6644     CC="$CC $ac_cv_prog_cc_c99"
6645     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6646 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6647 esac
6648 if test "x$ac_cv_prog_cc_c99" != xno; then :
6649   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6650 else
6651   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6652 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6653 if ${ac_cv_prog_cc_c89+:} false; then :
6654   $as_echo_n "(cached) " >&6
6655 else
6656   ac_cv_prog_cc_c89=no
6657 ac_save_CC=$CC
6658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6659 /* end confdefs.h.  */
6660 #include <stdarg.h>
6661 #include <stdio.h>
6662 struct stat;
6663 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6664 struct buf { int x; };
6665 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6666 static char *e (p, i)
6667      char **p;
6668      int i;
6669 {
6670   return p[i];
6671 }
6672 static char *f (char * (*g) (char **, int), char **p, ...)
6673 {
6674   char *s;
6675   va_list v;
6676   va_start (v,p);
6677   s = g (p, va_arg (v,int));
6678   va_end (v);
6679   return s;
6680 }
6681
6682 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6683    function prototypes and stuff, but not '\xHH' hex character constants.
6684    These don't provoke an error unfortunately, instead are silently treated
6685    as 'x'.  The following induces an error, until -std is added to get
6686    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6687    array size at least.  It's necessary to write '\x00'==0 to get something
6688    that's true only with -std.  */
6689 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6690
6691 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6692    inside strings and character constants.  */
6693 #define FOO(x) 'x'
6694 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6695
6696 int test (int i, double x);
6697 struct s1 {int (*f) (int a);};
6698 struct s2 {int (*f) (double a);};
6699 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6700 int argc;
6701 char **argv;
6702 int
6703 main ()
6704 {
6705 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6706   ;
6707   return 0;
6708 }
6709 _ACEOF
6710 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6711         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6712 do
6713   CC="$ac_save_CC $ac_arg"
6714   if ac_fn_c_try_compile "$LINENO"; then :
6715   ac_cv_prog_cc_c89=$ac_arg
6716 fi
6717 rm -f core conftest.err conftest.$ac_objext
6718   test "x$ac_cv_prog_cc_c89" != "xno" && break
6719 done
6720 rm -f conftest.$ac_ext
6721 CC=$ac_save_CC
6722
6723 fi
6724 # AC_CACHE_VAL
6725 case "x$ac_cv_prog_cc_c89" in
6726   x)
6727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6728 $as_echo "none needed" >&6; } ;;
6729   xno)
6730     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6731 $as_echo "unsupported" >&6; } ;;
6732   *)
6733     CC="$CC $ac_cv_prog_cc_c89"
6734     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6735 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6736 esac
6737 if test "x$ac_cv_prog_cc_c89" != xno; then :
6738   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6739 else
6740   ac_cv_prog_cc_stdc=no
6741 fi
6742
6743 fi
6744  ;;
6745 esac
6746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6747 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6748   if ${ac_cv_prog_cc_stdc+:} false; then :
6749   $as_echo_n "(cached) " >&6
6750 fi
6751
6752   case $ac_cv_prog_cc_stdc in #(
6753   no) :
6754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6755 $as_echo "unsupported" >&6; } ;; #(
6756   '') :
6757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6758 $as_echo "none needed" >&6; } ;; #(
6759   *) :
6760     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6761 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6762 esac
6763
6764
6765
6766
6767
6768
6769   # Check whether --enable-threads was given.
6770 if test "${enable_threads+set}" = set; then :
6771   enableval=$enable_threads; gl_use_threads=$enableval
6772 else
6773   if test -n "$gl_use_threads_default"; then
6774        gl_use_threads="$gl_use_threads_default"
6775      else
6776        case "$host_os" in
6777                                                                osf*) gl_use_threads=no ;;
6778          cygwin*)
6779                case `uname -r` in
6780                  1.[0-5].*) gl_use_threads=no ;;
6781                  *)         gl_use_threads=yes ;;
6782                esac
6783                ;;
6784          *)    gl_use_threads=yes ;;
6785        esac
6786      fi
6787
6788 fi
6789
6790   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6791     # For using <pthread.h>:
6792     case "$host_os" in
6793       osf*)
6794         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6795         # groks <pthread.h>. cc also understands the flag -pthread, but
6796         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6797         # 2. putting a flag into CPPFLAGS that has an effect on the linker
6798         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6799         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6800         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6801         ;;
6802     esac
6803     # Some systems optimize for single-threaded programs by default, and
6804     # need special flags to disable these optimizations. For example, the
6805     # definition of 'errno' in <errno.h>.
6806     case "$host_os" in
6807       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6808       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6809     esac
6810   fi
6811
6812
6813
6814
6815   # Code from module alloca-opt:
6816   # Code from module alloca-opt-tests:
6817   # Code from module announce-gen:
6818   # Code from module ansi-c++-opt:
6819   # Code from module array-list:
6820   # Code from module array-list-tests:
6821   # Code from module array-oset:
6822   # Code from module array-oset-tests:
6823   # Code from module assert:
6824   # Code from module autobuild:
6825
6826
6827
6828
6829   if test -z "$AB_PACKAGE"; then
6830     AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
6831   fi
6832   { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
6833 $as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
6834
6835   if test -z "$AB_VERSION"; then
6836     AB_VERSION=${PACKAGE_VERSION:-$VERSION}
6837   fi
6838   { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
6839 $as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
6840
6841   hostname=`hostname`
6842   if test "$hostname"; then
6843     { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
6844 $as_echo "$as_me: autobuild hostname... $hostname" >&6;}
6845   fi
6846
6847
6848
6849   date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
6850   if test "$?" != 0; then
6851     date=`date`
6852   fi
6853   if test "$date"; then
6854     { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
6855 $as_echo "$as_me: autobuild timestamp... $date" >&6;}
6856   fi
6857
6858   # Code from module avltree-oset:
6859   # Code from module avltree-oset-tests:
6860   # Code from module binary-io:
6861   # Code from module binary-io-tests:
6862   # Code from module btowc:
6863   # Code from module btowc-tests:
6864   # Code from module c-ctype:
6865   # Code from module c-ctype-tests:
6866   # Code from module c-stack:
6867   # Code from module c-stack-tests:
6868   # Code from module c-strcase:
6869   # Code from module c-strcase-tests:
6870   # Code from module c-strcaseeq:
6871   # Code from module canonicalize-lgpl:
6872   # Code from module canonicalize-lgpl-tests:
6873   # Code from module chdir:
6874   # Code from module chdir-tests:
6875   # Code from module clean-temp:
6876   # Code from module cloexec:
6877   # Code from module cloexec-tests:
6878   # Code from module close:
6879   # Code from module close-stream:
6880   # Code from module close-tests:
6881   # Code from module closedir:
6882   # Code from module closein:
6883   # Code from module closein-tests:
6884   # Code from module closeout:
6885   # Code from module config-h:
6886   # Code from module configmake:
6887   # Code from module dirent:
6888   # Code from module dirent-c++-tests:
6889   # Code from module dirent-tests:
6890   # Code from module dirname:
6891   # Code from module dirname-lgpl:
6892   # Code from module dirname-tests:
6893   # Code from module dosname:
6894   # Code from module double-slash-root:
6895   # Code from module dup:
6896   # Code from module dup-tests:
6897   # Code from module dup2:
6898   # Code from module dup2-tests:
6899   # Code from module environ:
6900   # Code from module environ-tests:
6901   # Code from module errno:
6902   # Code from module errno-tests:
6903   # Code from module error:
6904   # Code from module execute:
6905   # Code from module exitfail:
6906   # Code from module extensions:
6907
6908   # Code from module extern-inline:
6909   # Code from module fatal-signal:
6910   # Code from module fclose:
6911   # Code from module fclose-tests:
6912   # Code from module fcntl:
6913   # Code from module fcntl-h:
6914   # Code from module fcntl-h-c++-tests:
6915   # Code from module fcntl-h-tests:
6916   # Code from module fcntl-tests:
6917   # Code from module fd-hook:
6918   # Code from module fd-safer-flag:
6919   # Code from module fdl-1.3:
6920   # Code from module fdopen:
6921   # Code from module fdopen-tests:
6922   # Code from module fflush:
6923
6924   # Code from module fflush-tests:
6925   # Code from module fgetc-tests:
6926   # Code from module filename:
6927   # Code from module filenamecat:
6928   # Code from module filenamecat-lgpl:
6929   # Code from module filenamecat-tests:
6930   # Code from module float:
6931   # Code from module float-tests:
6932   # Code from module fopen:
6933   # Code from module fopen-safer:
6934   # Code from module fopen-safer-tests:
6935   # Code from module fopen-tests:
6936   # Code from module fpending:
6937   # Code from module fpending-tests:
6938   # Code from module fpieee:
6939
6940   # Code from module fpucw:
6941   # Code from module fpurge:
6942   # Code from module fpurge-tests:
6943   # Code from module fputc-tests:
6944   # Code from module fread-tests:
6945   # Code from module freadahead:
6946   # Code from module freadahead-tests:
6947   # Code from module freading:
6948   # Code from module freading-tests:
6949   # Code from module frexp-nolibm:
6950   # Code from module frexp-nolibm-tests:
6951   # Code from module frexpl-nolibm:
6952   # Code from module frexpl-nolibm-tests:
6953   # Code from module fseek:
6954   # Code from module fseek-tests:
6955   # Code from module fseeko:
6956
6957   # Code from module fseeko-tests:
6958   # Code from module fstat:
6959   # Code from module fstat-tests:
6960   # Code from module ftell:
6961   # Code from module ftell-tests:
6962   # Code from module ftello:
6963
6964   # Code from module ftello-tests:
6965   # Code from module fwrite-tests:
6966   # Code from module gendocs:
6967   # Code from module getcwd-lgpl:
6968   # Code from module getcwd-lgpl-tests:
6969   # Code from module getdtablesize:
6970   # Code from module getdtablesize-tests:
6971   # Code from module getopt-gnu:
6972   # Code from module getopt-posix:
6973   # Code from module getopt-posix-tests:
6974   # Code from module getpagesize:
6975   # Code from module gettext-h:
6976   # Code from module gettimeofday:
6977   # Code from module gettimeofday-tests:
6978   # Code from module git-version-gen:
6979   # Code from module gnu-web-doc-update:
6980   # Code from module gnumakefile:
6981   # Code from module gnupload:
6982   # Code from module gpl-3.0:
6983   # Code from module havelib:
6984   # Code from module ignore-value:
6985   # Code from module ignore-value-tests:
6986   # Code from module include_next:
6987   # Code from module intprops:
6988   # Code from module intprops-tests:
6989   # Code from module inttypes:
6990   # Code from module inttypes-incomplete:
6991   # Code from module inttypes-tests:
6992   # Code from module isnand-nolibm:
6993   # Code from module isnand-nolibm-tests:
6994   # Code from module isnanf-nolibm:
6995   # Code from module isnanf-nolibm-tests:
6996   # Code from module isnanl-nolibm:
6997   # Code from module isnanl-nolibm-tests:
6998   # Code from module langinfo:
6999   # Code from module langinfo-c++-tests:
7000   # Code from module langinfo-tests:
7001   # Code from module largefile:
7002
7003   # Code from module libsigsegv:
7004   # Code from module link:
7005   # Code from module link-tests:
7006   # Code from module linkedhash-list:
7007   # Code from module linkedhash-list-tests:
7008   # Code from module list:
7009   # Code from module localcharset:
7010   # Code from module locale:
7011   # Code from module locale-c++-tests:
7012   # Code from module locale-tests:
7013   # Code from module localeconv:
7014   # Code from module localeconv-tests:
7015   # Code from module localename:
7016   # Code from module localename-tests:
7017   # Code from module lock:
7018   # Code from module lseek:
7019   # Code from module lseek-tests:
7020   # Code from module lstat:
7021   # Code from module lstat-tests:
7022   # Code from module maintainer-makefile:
7023   # Code from module malloc-gnu:
7024   # Code from module malloc-gnu-tests:
7025   # Code from module malloc-posix:
7026   # Code from module malloca:
7027   # Code from module malloca-tests:
7028   # Code from module manywarnings:
7029   # Code from module math:
7030   # Code from module math-c++-tests:
7031   # Code from module math-tests:
7032   # Code from module mbrtowc:
7033   # Code from module mbrtowc-tests:
7034   # Code from module mbsinit:
7035   # Code from module mbsinit-tests:
7036   # Code from module mbtowc:
7037   # Code from module memchr:
7038   # Code from module memchr-tests:
7039   # Code from module memchr2:
7040   # Code from module memchr2-tests:
7041   # Code from module mkdtemp:
7042   # Code from module mkstemp:
7043   # Code from module msvc-inval:
7044   # Code from module msvc-nothrow:
7045   # Code from module multiarch:
7046   # Code from module nl_langinfo:
7047   # Code from module nl_langinfo-tests:
7048   # Code from module nocrash:
7049   # Code from module obstack:
7050   # Code from module open:
7051   # Code from module open-tests:
7052   # Code from module opendir:
7053   # Code from module oset:
7054   # Code from module pathmax:
7055   # Code from module pathmax-tests:
7056   # Code from module pipe2:
7057   # Code from module pipe2-safer:
7058   # Code from module pipe2-tests:
7059   # Code from module posix_spawn-internal:
7060   # Code from module posix_spawn_file_actions_addclose:
7061   # Code from module posix_spawn_file_actions_addclose-tests:
7062   # Code from module posix_spawn_file_actions_adddup2:
7063   # Code from module posix_spawn_file_actions_adddup2-tests:
7064   # Code from module posix_spawn_file_actions_addopen:
7065   # Code from module posix_spawn_file_actions_addopen-tests:
7066   # Code from module posix_spawn_file_actions_destroy:
7067   # Code from module posix_spawn_file_actions_init:
7068   # Code from module posix_spawnattr_destroy:
7069   # Code from module posix_spawnattr_init:
7070   # Code from module posix_spawnattr_setflags:
7071   # Code from module posix_spawnattr_setsigmask:
7072   # Code from module posix_spawnp:
7073   # Code from module posix_spawnp-tests:
7074   # Code from module printf-frexp:
7075   # Code from module printf-frexp-tests:
7076   # Code from module printf-frexpl:
7077   # Code from module printf-frexpl-tests:
7078   # Code from module printf-safe:
7079   # Code from module progname:
7080   # Code from module putenv:
7081   # Code from module quotearg:
7082   # Code from module quotearg-simple:
7083   # Code from module quotearg-simple-tests:
7084   # Code from module raise:
7085   # Code from module raise-tests:
7086   # Code from module rawmemchr:
7087   # Code from module rawmemchr-tests:
7088   # Code from module readdir:
7089   # Code from module readlink:
7090   # Code from module readlink-tests:
7091   # Code from module regex:
7092   # Code from module regex-tests:
7093   # Code from module rename:
7094   # Code from module rename-tests:
7095   # Code from module rmdir:
7096   # Code from module rmdir-tests:
7097   # Code from module same-inode:
7098   # Code from module sched:
7099   # Code from module sched-tests:
7100   # Code from module secure_getenv:
7101   # Code from module setenv:
7102   # Code from module setenv-tests:
7103   # Code from module setlocale:
7104   # Code from module setlocale-tests:
7105   # Code from module sigaction:
7106   # Code from module sigaction-tests:
7107   # Code from module signal-h:
7108   # Code from module signal-h-c++-tests:
7109   # Code from module signal-h-tests:
7110   # Code from module signbit:
7111   # Code from module signbit-tests:
7112   # Code from module sigpipe:
7113   # Code from module sigpipe-tests:
7114   # Code from module sigprocmask:
7115   # Code from module sigprocmask-tests:
7116   # Code from module size_max:
7117   # Code from module sleep:
7118   # Code from module sleep-tests:
7119   # Code from module snippet/_Noreturn:
7120   # Code from module snippet/arg-nonnull:
7121   # Code from module snippet/c++defs:
7122   # Code from module snippet/unused-parameter:
7123   # Code from module snippet/warn-on-use:
7124   # Code from module snprintf:
7125   # Code from module snprintf-tests:
7126   # Code from module spawn:
7127   # Code from module spawn-c++-tests:
7128   # Code from module spawn-pipe:
7129   # Code from module spawn-pipe-tests:
7130   # Code from module spawn-tests:
7131   # Code from module ssize_t:
7132   # Code from module stat:
7133   # Code from module stat-tests:
7134   # Code from module stdarg:
7135
7136
7137
7138   # Code from module stdbool:
7139   # Code from module stdbool-tests:
7140   # Code from module stddef:
7141   # Code from module stddef-tests:
7142   # Code from module stdint:
7143   # Code from module stdint-tests:
7144   # Code from module stdio:
7145   # Code from module stdio-c++-tests:
7146   # Code from module stdio-tests:
7147   # Code from module stdlib:
7148   # Code from module stdlib-c++-tests:
7149   # Code from module stdlib-safer:
7150   # Code from module stdlib-tests:
7151   # Code from module strchrnul:
7152   # Code from module strchrnul-tests:
7153   # Code from module strdup-posix:
7154   # Code from module streq:
7155   # Code from module strerror:
7156   # Code from module strerror-override:
7157   # Code from module strerror-tests:
7158   # Code from module string:
7159   # Code from module string-c++-tests:
7160   # Code from module string-tests:
7161   # Code from module strndup:
7162   # Code from module strnlen:
7163   # Code from module strnlen-tests:
7164   # Code from module strsignal:
7165   # Code from module strsignal-tests:
7166   # Code from module strstr:
7167   # Code from module strstr-simple:
7168   # Code from module strstr-tests:
7169   # Code from module strtod:
7170   # Code from module strtod-tests:
7171   # Code from module symlink:
7172   # Code from module symlink-tests:
7173   # Code from module sys_stat:
7174   # Code from module sys_stat-c++-tests:
7175   # Code from module sys_stat-tests:
7176   # Code from module sys_time:
7177   # Code from module sys_time-c++-tests:
7178   # Code from module sys_time-tests:
7179   # Code from module sys_types:
7180   # Code from module sys_types-c++-tests:
7181   # Code from module sys_types-tests:
7182   # Code from module sys_wait:
7183   # Code from module sys_wait-c++-tests:
7184   # Code from module sys_wait-tests:
7185   # Code from module tempname:
7186   # Code from module test-framework-sh:
7187   # Code from module test-framework-sh-tests:
7188   # Code from module threadlib:
7189
7190
7191
7192   # Code from module time:
7193   # Code from module time-c++-tests:
7194   # Code from module time-tests:
7195   # Code from module tls:
7196   # Code from module tmpdir:
7197   # Code from module unistd:
7198   # Code from module unistd-c++-tests:
7199   # Code from module unistd-safer:
7200   # Code from module unistd-safer-tests:
7201   # Code from module unistd-tests:
7202   # Code from module unlocked-io:
7203   # Code from module unsetenv:
7204   # Code from module unsetenv-tests:
7205   # Code from module update-copyright:
7206   # Code from module update-copyright-tests:
7207   # Code from module useless-if-before-free:
7208   # Code from module vasnprintf:
7209   # Code from module vasnprintf-tests:
7210   # Code from module vasprintf:
7211   # Code from module vasprintf-posix:
7212   # Code from module vasprintf-posix-tests:
7213   # Code from module vasprintf-tests:
7214   # Code from module vc-list-files:
7215   # Code from module vc-list-files-tests:
7216   # Code from module verify:
7217   # Code from module verify-tests:
7218   # Code from module verror:
7219   # Code from module version-etc:
7220   # Code from module version-etc-fsf:
7221   # Code from module version-etc-tests:
7222   # Code from module wait-process:
7223   # Code from module waitpid:
7224   # Code from module warnings:
7225   # Code from module wchar:
7226   # Code from module wchar-c++-tests:
7227   # Code from module wchar-tests:
7228   # Code from module wcrtomb:
7229   # Code from module wcrtomb-tests:
7230   # Code from module wctob:
7231   # Code from module wctomb:
7232   # Code from module wctype-h:
7233   # Code from module wctype-h-c++-tests:
7234   # Code from module wctype-h-tests:
7235   # Code from module write:
7236   # Code from module write-tests:
7237   # Code from module xalloc:
7238   # Code from module xalloc-die:
7239   # Code from module xalloc-die-tests:
7240   # Code from module xalloc-oversized:
7241   # Code from module xlist:
7242   # Code from module xmalloca:
7243   # Code from module xoset:
7244   # Code from module xprintf:
7245   # Code from module xsize:
7246   # Code from module xstrndup:
7247   # Code from module xvasprintf:
7248   # Code from module xvasprintf-posix:
7249   # Code from module xvasprintf-tests:
7250
7251
7252 # Maintainer note - comment this line out if you plan to rerun
7253 # GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
7254 # Leave it uncommented for normal releases, for faster ./configure.
7255
7256
7257
7258
7259 # M4 is single-threaded; so we can optimize gnulib code by using this:
7260
7261
7262
7263
7264 # Check whether --enable-gcc-warnings was given.
7265 if test "${enable_gcc_warnings+set}" = set; then :
7266   enableval=$enable_gcc_warnings; case $enableval in
7267      yes|no) ;;
7268      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7269    esac
7270    gl_gcc_warnings=$enableval
7271 else
7272   if test -d "$srcdir"/.git; then
7273      gl_gcc_warnings=yes
7274    else
7275      gl_gcc_warnings=no
7276    fi
7277
7278 fi
7279
7280
7281 if test "$gl_gcc_warnings" = yes; then
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7283 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7284 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
7285   $as_echo_n "(cached) " >&6
7286 else
7287
7288   gl_save_compiler_FLAGS="$CFLAGS"
7289   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291 /* end confdefs.h.  */
7292
7293 int
7294 main ()
7295 {
7296
7297   ;
7298   return 0;
7299 }
7300 _ACEOF
7301 if ac_fn_c_try_compile "$LINENO"; then :
7302   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7303 else
7304   gl_cv_warn_c__Werror__Wunknown_warning_option=no
7305 fi
7306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7307   CFLAGS="$gl_save_compiler_FLAGS"
7308
7309 fi
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7311 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7312 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
7313   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7314 else
7315   gl_unknown_warnings_are_errors=
7316 fi
7317
7318
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7320 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7321 if ${gl_cv_warn_c__Werror+:} false; then :
7322   $as_echo_n "(cached) " >&6
7323 else
7324
7325   gl_save_compiler_FLAGS="$CFLAGS"
7326   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
7327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328 /* end confdefs.h.  */
7329
7330 int
7331 main ()
7332 {
7333
7334   ;
7335   return 0;
7336 }
7337 _ACEOF
7338 if ac_fn_c_try_compile "$LINENO"; then :
7339   gl_cv_warn_c__Werror=yes
7340 else
7341   gl_cv_warn_c__Werror=no
7342 fi
7343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7344   CFLAGS="$gl_save_compiler_FLAGS"
7345
7346 fi
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7348 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7349 if test "x$gl_cv_warn_c__Werror" = xyes; then :
7350   as_fn_append WERROR_CFLAGS " -Werror"
7351 fi
7352
7353
7354
7355
7356   # We use '#pragma GCC diagnostic push' to silence some
7357   # warnings, but older gcc doesn't support this.
7358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
7359 $as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
7360 if ${M4_cv_gcc_pragma_push_works+:} false; then :
7361   $as_echo_n "(cached) " >&6
7362 else
7363
7364     save_CFLAGS=$CFLAGS
7365     CFLAGS='-Wunknown-pragmas -Werror'
7366     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7367 /* end confdefs.h.  */
7368
7369       #pragma GCC diagnostic push
7370       #pragma GCC diagnostic pop
7371
7372 int
7373 main ()
7374 {
7375
7376   ;
7377   return 0;
7378 }
7379 _ACEOF
7380 if ac_fn_c_try_compile "$LINENO"; then :
7381   M4_cv_gcc_pragma_push_works=yes
7382 else
7383   M4_cv_gcc_pragma_push_works=no
7384 fi
7385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7386     CFLAGS=$save_CFLAGS
7387 fi
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
7389 $as_echo "$M4_cv_gcc_pragma_push_works" >&6; }
7390
7391   # This, $nw, is the list of warnings we disable.
7392   nw=
7393   nw="$nw -Waggregate-return"       # K&R is anachronistic
7394   nw="$nw -Wtraditional-conversion" # K&R is anachronistic
7395   nw="$nw -Wundef"                  # K&R is anachronistic
7396   nw="$nw -Wtraditional"            # K&R is anachronistic
7397   nw="$nw -Wlong-long"              # C90 is anachronistic
7398   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
7399   nw="$nw -Wpadded"                 # Our structs are not packed
7400   nw="$nw -Wconversion"             # Too many warnings for now
7401   nw="$nw -Wsign-conversion"        # Too many warnings for now
7402   nw="$nw -Wcast-qual"              # Too many warnings for now
7403   nw="$nw -Wswitch-enum"            # Too many warnings for now
7404   # gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
7405   nw="$nw -Wenum-compare"
7406
7407   # Gnulib uses '#pragma GCC diagnostic push' to silence some
7408   # warnings, but older gcc doesn't support this.
7409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
7410 $as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
7411 if ${M4_cv_gcc_pragma_push_works+:} false; then :
7412   $as_echo_n "(cached) " >&6
7413 else
7414
7415     save_CFLAGS=$CFLAGS
7416     CFLAGS='-Wunknown-pragmas -Werror'
7417     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418 /* end confdefs.h.  */
7419
7420       #pragma GCC diagnostic push
7421       #pragma GCC diagnostic pop
7422
7423 int
7424 main ()
7425 {
7426
7427   ;
7428   return 0;
7429 }
7430 _ACEOF
7431 if ac_fn_c_try_compile "$LINENO"; then :
7432   M4_cv_gcc_pragma_push_works=yes
7433 else
7434   M4_cv_gcc_pragma_push_works=no
7435 fi
7436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7437     CFLAGS=$save_CFLAGS
7438 fi
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
7440 $as_echo "$M4_cv_gcc_pragma_push_works" >&6; }
7441   if test $M4_cv_gcc_pragma_push_works = no; then
7442     nw="$nw -Wmissing-prototypes"
7443     nw="$nw -Wmissing-declarations"
7444     nw="$nw -Wunreachable-code"
7445   fi
7446
7447
7448
7449   if test -n "$GCC"; then
7450
7451             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7452 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7453     if ${gl_cv_cc_nomfi_supported+:} false; then :
7454   $as_echo_n "(cached) " >&6
7455 else
7456
7457       gl_save_CFLAGS="$CFLAGS"
7458       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7459       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7460 /* end confdefs.h.  */
7461
7462 int
7463 main ()
7464 {
7465
7466   ;
7467   return 0;
7468 }
7469 _ACEOF
7470 if ac_fn_c_try_compile "$LINENO"; then :
7471   gl_cv_cc_nomfi_supported=yes
7472 else
7473   gl_cv_cc_nomfi_supported=no
7474 fi
7475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7476       CFLAGS="$gl_save_CFLAGS"
7477 fi
7478
7479     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7480 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7481
7482     if test "$gl_cv_cc_nomfi_supported" = yes; then
7483                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7484 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7485       if ${gl_cv_cc_nomfi_needed+:} false; then :
7486   $as_echo_n "(cached) " >&6
7487 else
7488
7489         gl_save_CFLAGS="$CFLAGS"
7490         CFLAGS="$CFLAGS -W -Werror"
7491         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7492 /* end confdefs.h.  */
7493 void f (void)
7494                {
7495                  typedef struct { int a; int b; } s_t;
7496                  s_t s1 = { 0, };
7497                }
7498
7499 int
7500 main ()
7501 {
7502
7503   ;
7504   return 0;
7505 }
7506 _ACEOF
7507 if ac_fn_c_try_compile "$LINENO"; then :
7508   gl_cv_cc_nomfi_needed=no
7509 else
7510   gl_cv_cc_nomfi_needed=yes
7511 fi
7512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7513         CFLAGS="$gl_save_CFLAGS"
7514
7515 fi
7516
7517       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7518 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7519     fi
7520
7521                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7522 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7523     if ${gl_cv_cc_uninitialized_supported+:} false; then :
7524   $as_echo_n "(cached) " >&6
7525 else
7526
7527       gl_save_CFLAGS="$CFLAGS"
7528       CFLAGS="$CFLAGS -Werror -Wuninitialized"
7529       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h.  */
7531
7532 int
7533 main ()
7534 {
7535
7536   ;
7537   return 0;
7538 }
7539 _ACEOF
7540 if ac_fn_c_try_compile "$LINENO"; then :
7541   gl_cv_cc_uninitialized_supported=yes
7542 else
7543   gl_cv_cc_uninitialized_supported=no
7544 fi
7545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7546       CFLAGS="$gl_save_CFLAGS"
7547 fi
7548
7549     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7550 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7551
7552   fi
7553
7554   # List all gcc warning categories.
7555   gl_manywarn_set=
7556   for gl_manywarn_item in \
7557     -W \
7558     -Wabi \
7559     -Waddress \
7560     -Waggressive-loop-optimizations \
7561     -Wall \
7562     -Warray-bounds \
7563     -Wattributes \
7564     -Wbad-function-cast \
7565     -Wbuiltin-macro-redefined \
7566     -Wcast-align \
7567     -Wchar-subscripts \
7568     -Wclobbered \
7569     -Wcomment \
7570     -Wcomments \
7571     -Wcoverage-mismatch \
7572     -Wcpp \
7573     -Wdeprecated \
7574     -Wdeprecated-declarations \
7575     -Wdisabled-optimization \
7576     -Wdiv-by-zero \
7577     -Wdouble-promotion \
7578     -Wempty-body \
7579     -Wendif-labels \
7580     -Wenum-compare \
7581     -Wextra \
7582     -Wformat-contains-nul \
7583     -Wformat-extra-args \
7584     -Wformat-nonliteral \
7585     -Wformat-security \
7586     -Wformat-y2k \
7587     -Wformat-zero-length \
7588     -Wfree-nonheap-object \
7589     -Wignored-qualifiers \
7590     -Wimplicit \
7591     -Wimplicit-function-declaration \
7592     -Wimplicit-int \
7593     -Winit-self \
7594     -Winline \
7595     -Wint-to-pointer-cast \
7596     -Winvalid-memory-model \
7597     -Winvalid-pch \
7598     -Wjump-misses-init \
7599     -Wlogical-op \
7600     -Wmain \
7601     -Wmaybe-uninitialized \
7602     -Wmissing-braces \
7603     -Wmissing-declarations \
7604     -Wmissing-field-initializers \
7605     -Wmissing-include-dirs \
7606     -Wmissing-parameter-type \
7607     -Wmissing-prototypes \
7608     -Wmudflap \
7609     -Wmultichar \
7610     -Wnarrowing \
7611     -Wnested-externs \
7612     -Wnonnull \
7613     -Wnormalized=nfc \
7614     -Wold-style-declaration \
7615     -Wold-style-definition \
7616     -Woverflow \
7617     -Woverlength-strings \
7618     -Woverride-init \
7619     -Wpacked \
7620     -Wpacked-bitfield-compat \
7621     -Wparentheses \
7622     -Wpointer-arith \
7623     -Wpointer-sign \
7624     -Wpointer-to-int-cast \
7625     -Wpragmas \
7626     -Wreturn-local-addr \
7627     -Wreturn-type \
7628     -Wsequence-point \
7629     -Wshadow \
7630     -Wsizeof-pointer-memaccess \
7631     -Wstack-protector \
7632     -Wstrict-aliasing \
7633     -Wstrict-overflow \
7634     -Wstrict-prototypes \
7635     -Wsuggest-attribute=const \
7636     -Wsuggest-attribute=format \
7637     -Wsuggest-attribute=noreturn \
7638     -Wsuggest-attribute=pure \
7639     -Wswitch \
7640     -Wswitch-default \
7641     -Wsync-nand \
7642     -Wsystem-headers \
7643     -Wtrampolines \
7644     -Wtrigraphs \
7645     -Wtype-limits \
7646     -Wuninitialized \
7647     -Wunknown-pragmas \
7648     -Wunsafe-loop-optimizations \
7649     -Wunused \
7650     -Wunused-but-set-parameter \
7651     -Wunused-but-set-variable \
7652     -Wunused-function \
7653     -Wunused-label \
7654     -Wunused-local-typedefs \
7655     -Wunused-macros \
7656     -Wunused-parameter \
7657     -Wunused-result \
7658     -Wunused-value \
7659     -Wunused-variable \
7660     -Wvarargs \
7661     -Wvariadic-macros \
7662     -Wvector-operation-performance \
7663     -Wvla \
7664     -Wvolatile-register-var \
7665     -Wwrite-strings \
7666     \
7667     ; do
7668     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7669   done
7670
7671   # Disable specific options as needed.
7672   if test "$gl_cv_cc_nomfi_needed" = yes; then
7673     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7674   fi
7675
7676   if test "$gl_cv_cc_uninitialized_supported" = no; then
7677     gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7678   fi
7679
7680   ws=$gl_manywarn_set
7681
7682
7683   gl_warn_set=
7684   set x $ws; shift
7685   for gl_warn_item
7686   do
7687     case " $nw " in
7688       *" $gl_warn_item "*)
7689         ;;
7690       *)
7691         gl_warn_set="$gl_warn_set $gl_warn_item"
7692         ;;
7693     esac
7694   done
7695   ws=$gl_warn_set
7696
7697   for w in $ws; do
7698
7699 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7700 gl_positive="$w"
7701 case $gl_positive in
7702   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7703 esac
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7705 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7706 if eval \${$as_gl_Warn+:} false; then :
7707   $as_echo_n "(cached) " >&6
7708 else
7709
7710   gl_save_compiler_FLAGS="$CFLAGS"
7711   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
7712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7713 /* end confdefs.h.  */
7714
7715 int
7716 main ()
7717 {
7718
7719   ;
7720   return 0;
7721 }
7722 _ACEOF
7723 if ac_fn_c_try_compile "$LINENO"; then :
7724   eval "$as_gl_Warn=yes"
7725 else
7726   eval "$as_gl_Warn=no"
7727 fi
7728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7729   CFLAGS="$gl_save_compiler_FLAGS"
7730
7731 fi
7732 eval ac_res=\$$as_gl_Warn
7733                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7734 $as_echo "$ac_res" >&6; }
7735 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
7736   as_fn_append WARN_CFLAGS " $w"
7737 fi
7738
7739
7740   done
7741
7742   # Gnulib turns on -Wformat=2, which implies -Wformat-nonliteral, but
7743   # we temporarily override it in format.c if possible.
7744   if test $M4_cv_gcc_pragma_push_works = no; then
7745
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7747 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7748 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
7749   $as_echo_n "(cached) " >&6
7750 else
7751
7752   gl_save_compiler_FLAGS="$CFLAGS"
7753   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
7754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7755 /* end confdefs.h.  */
7756
7757 int
7758 main ()
7759 {
7760
7761   ;
7762   return 0;
7763 }
7764 _ACEOF
7765 if ac_fn_c_try_compile "$LINENO"; then :
7766   gl_cv_warn_c__Wno_format_nonliteral=yes
7767 else
7768   gl_cv_warn_c__Wno_format_nonliteral=no
7769 fi
7770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7771   CFLAGS="$gl_save_compiler_FLAGS"
7772
7773 fi
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7775 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7776 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
7777   as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7778 fi
7779
7780
7781   fi
7782
7783
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7785 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7786 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
7787   $as_echo_n "(cached) " >&6
7788 else
7789
7790   gl_save_compiler_FLAGS="$CFLAGS"
7791   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
7792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7793 /* end confdefs.h.  */
7794
7795 int
7796 main ()
7797 {
7798
7799   ;
7800   return 0;
7801 }
7802 _ACEOF
7803 if ac_fn_c_try_compile "$LINENO"; then :
7804   gl_cv_warn_c__fdiagnostics_show_option=yes
7805 else
7806   gl_cv_warn_c__fdiagnostics_show_option=no
7807 fi
7808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7809   CFLAGS="$gl_save_compiler_FLAGS"
7810
7811 fi
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7813 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7814 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
7815   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
7816 fi
7817
7818
7819
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7821 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7822 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
7823   $as_echo_n "(cached) " >&6
7824 else
7825
7826   gl_save_compiler_FLAGS="$CFLAGS"
7827   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
7828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7829 /* end confdefs.h.  */
7830
7831 int
7832 main ()
7833 {
7834
7835   ;
7836   return 0;
7837 }
7838 _ACEOF
7839 if ac_fn_c_try_compile "$LINENO"; then :
7840   gl_cv_warn_c__funit_at_a_time=yes
7841 else
7842   gl_cv_warn_c__funit_at_a_time=no
7843 fi
7844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7845   CFLAGS="$gl_save_compiler_FLAGS"
7846
7847 fi
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7849 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7850 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
7851   as_fn_append WARN_CFLAGS " -funit-at-a-time"
7852 fi
7853
7854
7855
7856
7857
7858
7859 fi
7860
7861 # Tandem/NSK is broken - it has 'long long int' but not
7862 # 'unsigned long long int', which confuses assumptions made by gnulib.
7863 # Simply pretend that neither type exists if both do not work.
7864
7865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7866 $as_echo_n "checking for unsigned long long int... " >&6; }
7867 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7868   $as_echo_n "(cached) " >&6
7869 else
7870   ac_cv_type_unsigned_long_long_int=yes
7871      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7872        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7873 /* end confdefs.h.  */
7874
7875   /* For now, do not test the preprocessor; as of 2007 there are too many
7876          implementations with broken preprocessors.  Perhaps this can
7877          be revisited in 2012.  In the meantime, code should not expect
7878          #if to work with literals wider than 32 bits.  */
7879       /* Test literals.  */
7880       long long int ll = 9223372036854775807ll;
7881       long long int nll = -9223372036854775807LL;
7882       unsigned long long int ull = 18446744073709551615ULL;
7883       /* Test constant expressions.   */
7884       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7885                      ? 1 : -1)];
7886       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7887                      ? 1 : -1)];
7888       int i = 63;
7889 int
7890 main ()
7891 {
7892 /* Test availability of runtime routines for shift and division.  */
7893       long long int llmax = 9223372036854775807ll;
7894       unsigned long long int ullmax = 18446744073709551615ull;
7895       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7896               | (llmax / ll) | (llmax % ll)
7897               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7898               | (ullmax / ull) | (ullmax % ull));
7899   ;
7900   return 0;
7901 }
7902
7903 _ACEOF
7904 if ac_fn_c_try_link "$LINENO"; then :
7905
7906 else
7907   ac_cv_type_unsigned_long_long_int=no
7908 fi
7909 rm -f core conftest.err conftest.$ac_objext \
7910     conftest$ac_exeext conftest.$ac_ext
7911      fi
7912 fi
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7914 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7915   if test $ac_cv_type_unsigned_long_long_int = yes; then
7916
7917 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7918
7919   fi
7920
7921
7922
7923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
7924 $as_echo_n "checking for long long int... " >&6; }
7925 if ${ac_cv_type_long_long_int+:} false; then :
7926   $as_echo_n "(cached) " >&6
7927 else
7928   ac_cv_type_long_long_int=yes
7929       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7930         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
7931         if test $ac_cv_type_long_long_int = yes; then
7932                                         if test "$cross_compiling" = yes; then :
7933   :
7934 else
7935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7936 /* end confdefs.h.  */
7937 #include <limits.h>
7938                  #ifndef LLONG_MAX
7939                  # define HALF \
7940                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
7941                  # define LLONG_MAX (HALF - 1 + HALF)
7942                  #endif
7943 int
7944 main ()
7945 {
7946 long long int n = 1;
7947                  int i;
7948                  for (i = 0; ; i++)
7949                    {
7950                      long long int m = n << i;
7951                      if (m >> i != n)
7952                        return 1;
7953                      if (LLONG_MAX / 2 < m)
7954                        break;
7955                    }
7956                  return 0;
7957   ;
7958   return 0;
7959 }
7960 _ACEOF
7961 if ac_fn_c_try_run "$LINENO"; then :
7962
7963 else
7964   ac_cv_type_long_long_int=no
7965 fi
7966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7967   conftest.$ac_objext conftest.beam conftest.$ac_ext
7968 fi
7969
7970         fi
7971       fi
7972 fi
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7974 $as_echo "$ac_cv_type_long_long_int" >&6; }
7975   if test $ac_cv_type_long_long_int = yes; then
7976
7977 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7978
7979   fi
7980
7981
7982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7983 $as_echo_n "checking for unsigned long long int... " >&6; }
7984 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7985   $as_echo_n "(cached) " >&6
7986 else
7987   ac_cv_type_unsigned_long_long_int=yes
7988      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7989        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7990 /* end confdefs.h.  */
7991
7992   /* For now, do not test the preprocessor; as of 2007 there are too many
7993          implementations with broken preprocessors.  Perhaps this can
7994          be revisited in 2012.  In the meantime, code should not expect
7995          #if to work with literals wider than 32 bits.  */
7996       /* Test literals.  */
7997       long long int ll = 9223372036854775807ll;
7998       long long int nll = -9223372036854775807LL;
7999       unsigned long long int ull = 18446744073709551615ULL;
8000       /* Test constant expressions.   */
8001       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8002                      ? 1 : -1)];
8003       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8004                      ? 1 : -1)];
8005       int i = 63;
8006 int
8007 main ()
8008 {
8009 /* Test availability of runtime routines for shift and division.  */
8010       long long int llmax = 9223372036854775807ll;
8011       unsigned long long int ullmax = 18446744073709551615ull;
8012       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8013               | (llmax / ll) | (llmax % ll)
8014               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8015               | (ullmax / ull) | (ullmax % ull));
8016   ;
8017   return 0;
8018 }
8019
8020 _ACEOF
8021 if ac_fn_c_try_link "$LINENO"; then :
8022
8023 else
8024   ac_cv_type_unsigned_long_long_int=no
8025 fi
8026 rm -f core conftest.err conftest.$ac_objext \
8027     conftest$ac_exeext conftest.$ac_ext
8028      fi
8029 fi
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8031 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8032   if test $ac_cv_type_unsigned_long_long_int = yes; then
8033
8034 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8035
8036   fi
8037
8038 if test $ac_cv_type_long_long_int:$ac_cv_type_unsigned_long_long_int = yes:no
8039 then
8040   ac_cv_type_long_long_int=no
8041
8042 $as_echo "#define HAVE_LONG_LONG_INT 0" >>confdefs.h
8043
8044 fi
8045
8046
8047
8048
8049
8050
8051           LIBC_FATAL_STDERR_=1
8052   export LIBC_FATAL_STDERR_
8053
8054 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8055 if test "x$ac_cv_type_size_t" = xyes; then :
8056
8057 else
8058
8059 cat >>confdefs.h <<_ACEOF
8060 #define size_t unsigned int
8061 _ACEOF
8062
8063 fi
8064
8065 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8066 # for constant arguments.  Useless!
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8068 $as_echo_n "checking for working alloca.h... " >&6; }
8069 if ${ac_cv_working_alloca_h+:} false; then :
8070   $as_echo_n "(cached) " >&6
8071 else
8072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8073 /* end confdefs.h.  */
8074 #include <alloca.h>
8075 int
8076 main ()
8077 {
8078 char *p = (char *) alloca (2 * sizeof (int));
8079                           if (p) return 0;
8080   ;
8081   return 0;
8082 }
8083 _ACEOF
8084 if ac_fn_c_try_link "$LINENO"; then :
8085   ac_cv_working_alloca_h=yes
8086 else
8087   ac_cv_working_alloca_h=no
8088 fi
8089 rm -f core conftest.err conftest.$ac_objext \
8090     conftest$ac_exeext conftest.$ac_ext
8091 fi
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8093 $as_echo "$ac_cv_working_alloca_h" >&6; }
8094 if test $ac_cv_working_alloca_h = yes; then
8095
8096 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8097
8098 fi
8099
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8101 $as_echo_n "checking for alloca... " >&6; }
8102 if ${ac_cv_func_alloca_works+:} false; then :
8103   $as_echo_n "(cached) " >&6
8104 else
8105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106 /* end confdefs.h.  */
8107 #ifdef __GNUC__
8108 # define alloca __builtin_alloca
8109 #else
8110 # ifdef _MSC_VER
8111 #  include <malloc.h>
8112 #  define alloca _alloca
8113 # else
8114 #  ifdef HAVE_ALLOCA_H
8115 #   include <alloca.h>
8116 #  else
8117 #   ifdef _AIX
8118  #pragma alloca
8119 #   else
8120 #    ifndef alloca /* predefined by HP cc +Olibcalls */
8121 void *alloca (size_t);
8122 #    endif
8123 #   endif
8124 #  endif
8125 # endif
8126 #endif
8127
8128 int
8129 main ()
8130 {
8131 char *p = (char *) alloca (1);
8132                                     if (p) return 0;
8133   ;
8134   return 0;
8135 }
8136 _ACEOF
8137 if ac_fn_c_try_link "$LINENO"; then :
8138   ac_cv_func_alloca_works=yes
8139 else
8140   ac_cv_func_alloca_works=no
8141 fi
8142 rm -f core conftest.err conftest.$ac_objext \
8143     conftest$ac_exeext conftest.$ac_ext
8144 fi
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8146 $as_echo "$ac_cv_func_alloca_works" >&6; }
8147
8148 if test $ac_cv_func_alloca_works = yes; then
8149
8150 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8151
8152 else
8153   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8154 # that cause trouble.  Some versions do not even contain alloca or
8155 # contain a buggy version.  If you still want to use their alloca,
8156 # use ar to extract alloca.o from them instead of compiling alloca.c.
8157
8158
8159
8160
8161
8162 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8163
8164 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8165
8166
8167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8168 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8169 if ${ac_cv_os_cray+:} false; then :
8170   $as_echo_n "(cached) " >&6
8171 else
8172   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8173 /* end confdefs.h.  */
8174 #if defined CRAY && ! defined CRAY2
8175 webecray
8176 #else
8177 wenotbecray
8178 #endif
8179
8180 _ACEOF
8181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8182   $EGREP "webecray" >/dev/null 2>&1; then :
8183   ac_cv_os_cray=yes
8184 else
8185   ac_cv_os_cray=no
8186 fi
8187 rm -f conftest*
8188
8189 fi
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8191 $as_echo "$ac_cv_os_cray" >&6; }
8192 if test $ac_cv_os_cray = yes; then
8193   for ac_func in _getb67 GETB67 getb67; do
8194     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8195 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8196 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8197
8198 cat >>confdefs.h <<_ACEOF
8199 #define CRAY_STACKSEG_END $ac_func
8200 _ACEOF
8201
8202     break
8203 fi
8204
8205   done
8206 fi
8207
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8209 $as_echo_n "checking stack direction for C alloca... " >&6; }
8210 if ${ac_cv_c_stack_direction+:} false; then :
8211   $as_echo_n "(cached) " >&6
8212 else
8213   if test "$cross_compiling" = yes; then :
8214   ac_cv_c_stack_direction=0
8215 else
8216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8217 /* end confdefs.h.  */
8218 $ac_includes_default
8219 int
8220 find_stack_direction (int *addr, int depth)
8221 {
8222   int dir, dummy = 0;
8223   if (! addr)
8224     addr = &dummy;
8225   *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8226   dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8227   return dir + dummy;
8228 }
8229
8230 int
8231 main (int argc, char **argv)
8232 {
8233   return find_stack_direction (0, argc + !argv + 20) < 0;
8234 }
8235 _ACEOF
8236 if ac_fn_c_try_run "$LINENO"; then :
8237   ac_cv_c_stack_direction=1
8238 else
8239   ac_cv_c_stack_direction=-1
8240 fi
8241 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8242   conftest.$ac_objext conftest.beam conftest.$ac_ext
8243 fi
8244
8245 fi
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8247 $as_echo "$ac_cv_c_stack_direction" >&6; }
8248 cat >>confdefs.h <<_ACEOF
8249 #define STACK_DIRECTION $ac_cv_c_stack_direction
8250 _ACEOF
8251
8252
8253 fi
8254
8255
8256   GNULIB_BTOWC=0;
8257   GNULIB_WCTOB=0;
8258   GNULIB_MBSINIT=0;
8259   GNULIB_MBRTOWC=0;
8260   GNULIB_MBRLEN=0;
8261   GNULIB_MBSRTOWCS=0;
8262   GNULIB_MBSNRTOWCS=0;
8263   GNULIB_WCRTOMB=0;
8264   GNULIB_WCSRTOMBS=0;
8265   GNULIB_WCSNRTOMBS=0;
8266   GNULIB_WCWIDTH=0;
8267   GNULIB_WMEMCHR=0;
8268   GNULIB_WMEMCMP=0;
8269   GNULIB_WMEMCPY=0;
8270   GNULIB_WMEMMOVE=0;
8271   GNULIB_WMEMSET=0;
8272   GNULIB_WCSLEN=0;
8273   GNULIB_WCSNLEN=0;
8274   GNULIB_WCSCPY=0;
8275   GNULIB_WCPCPY=0;
8276   GNULIB_WCSNCPY=0;
8277   GNULIB_WCPNCPY=0;
8278   GNULIB_WCSCAT=0;
8279   GNULIB_WCSNCAT=0;
8280   GNULIB_WCSCMP=0;
8281   GNULIB_WCSNCMP=0;
8282   GNULIB_WCSCASECMP=0;
8283   GNULIB_WCSNCASECMP=0;
8284   GNULIB_WCSCOLL=0;
8285   GNULIB_WCSXFRM=0;
8286   GNULIB_WCSDUP=0;
8287   GNULIB_WCSCHR=0;
8288   GNULIB_WCSRCHR=0;
8289   GNULIB_WCSCSPN=0;
8290   GNULIB_WCSSPN=0;
8291   GNULIB_WCSPBRK=0;
8292   GNULIB_WCSSTR=0;
8293   GNULIB_WCSTOK=0;
8294   GNULIB_WCSWIDTH=0;
8295     HAVE_BTOWC=1;
8296   HAVE_MBSINIT=1;
8297   HAVE_MBRTOWC=1;
8298   HAVE_MBRLEN=1;
8299   HAVE_MBSRTOWCS=1;
8300   HAVE_MBSNRTOWCS=1;
8301   HAVE_WCRTOMB=1;
8302   HAVE_WCSRTOMBS=1;
8303   HAVE_WCSNRTOMBS=1;
8304   HAVE_WMEMCHR=1;
8305   HAVE_WMEMCMP=1;
8306   HAVE_WMEMCPY=1;
8307   HAVE_WMEMMOVE=1;
8308   HAVE_WMEMSET=1;
8309   HAVE_WCSLEN=1;
8310   HAVE_WCSNLEN=1;
8311   HAVE_WCSCPY=1;
8312   HAVE_WCPCPY=1;
8313   HAVE_WCSNCPY=1;
8314   HAVE_WCPNCPY=1;
8315   HAVE_WCSCAT=1;
8316   HAVE_WCSNCAT=1;
8317   HAVE_WCSCMP=1;
8318   HAVE_WCSNCMP=1;
8319   HAVE_WCSCASECMP=1;
8320   HAVE_WCSNCASECMP=1;
8321   HAVE_WCSCOLL=1;
8322   HAVE_WCSXFRM=1;
8323   HAVE_WCSDUP=1;
8324   HAVE_WCSCHR=1;
8325   HAVE_WCSRCHR=1;
8326   HAVE_WCSCSPN=1;
8327   HAVE_WCSSPN=1;
8328   HAVE_WCSPBRK=1;
8329   HAVE_WCSSTR=1;
8330   HAVE_WCSTOK=1;
8331   HAVE_WCSWIDTH=1;
8332   HAVE_DECL_WCTOB=1;
8333   HAVE_DECL_WCWIDTH=1;
8334   REPLACE_MBSTATE_T=0;
8335   REPLACE_BTOWC=0;
8336   REPLACE_WCTOB=0;
8337   REPLACE_MBSINIT=0;
8338   REPLACE_MBRTOWC=0;
8339   REPLACE_MBRLEN=0;
8340   REPLACE_MBSRTOWCS=0;
8341   REPLACE_MBSNRTOWCS=0;
8342   REPLACE_WCRTOMB=0;
8343   REPLACE_WCSRTOMBS=0;
8344   REPLACE_WCSNRTOMBS=0;
8345   REPLACE_WCWIDTH=0;
8346   REPLACE_WCSWIDTH=0;
8347
8348
8349             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8350 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8351 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8352   $as_echo_n "(cached) " >&6
8353 else
8354   gl_cv_header_wchar_h_correct_inline=yes
8355      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8356 /* end confdefs.h.  */
8357
8358        #define wcstod renamed_wcstod
8359 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8360    <wchar.h>.
8361    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8362    included before <wchar.h>.  */
8363 #include <stddef.h>
8364 #include <stdio.h>
8365 #include <time.h>
8366 #include <wchar.h>
8367 extern int zero (void);
8368 int main () { return zero(); }
8369
8370 _ACEOF
8371      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8372   (eval $ac_compile) 2>&5
8373   ac_status=$?
8374   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8375   test $ac_status = 0; }; then
8376        mv conftest.$ac_objext conftest1.$ac_objext
8377        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8378 /* end confdefs.h.  */
8379
8380          #define wcstod renamed_wcstod
8381 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8382    <wchar.h>.
8383    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8384    included before <wchar.h>.  */
8385 #include <stddef.h>
8386 #include <stdio.h>
8387 #include <time.h>
8388 #include <wchar.h>
8389 int zero (void) { return 0; }
8390
8391 _ACEOF
8392        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8393   (eval $ac_compile) 2>&5
8394   ac_status=$?
8395   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8396   test $ac_status = 0; }; then
8397          mv conftest.$ac_objext conftest2.$ac_objext
8398          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8399            :
8400          else
8401            gl_cv_header_wchar_h_correct_inline=no
8402          fi
8403        fi
8404      fi
8405      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8406
8407 fi
8408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8409 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8410   if test $gl_cv_header_wchar_h_correct_inline = no; then
8411     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8412 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8413 C99 mode. You have four options:
8414   - Add the flag -fgnu89-inline to CC and reconfigure, or
8415   - Fix your include files, using parts of
8416     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8417   - Use a gcc version older than 4.3, or
8418   - Don't use the flags -std=c99 or -std=gnu99.
8419 Configuration aborted." "$LINENO" 5
8420   fi
8421
8422
8423
8424
8425   for ac_func in $ac_func_list
8426 do :
8427   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8428 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8429 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8430   cat >>confdefs.h <<_ACEOF
8431 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8432 _ACEOF
8433
8434 fi
8435 done
8436
8437
8438
8439
8440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8441 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8442 if ${am_cv_langinfo_codeset+:} false; then :
8443   $as_echo_n "(cached) " >&6
8444 else
8445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8446 /* end confdefs.h.  */
8447 #include <langinfo.h>
8448 int
8449 main ()
8450 {
8451 char* cs = nl_langinfo(CODESET); return !cs;
8452   ;
8453   return 0;
8454 }
8455 _ACEOF
8456 if ac_fn_c_try_link "$LINENO"; then :
8457   am_cv_langinfo_codeset=yes
8458 else
8459   am_cv_langinfo_codeset=no
8460 fi
8461 rm -f core conftest.err conftest.$ac_objext \
8462     conftest$ac_exeext conftest.$ac_ext
8463
8464 fi
8465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8466 $as_echo "$am_cv_langinfo_codeset" >&6; }
8467   if test $am_cv_langinfo_codeset = yes; then
8468
8469 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8470
8471   fi
8472
8473
8474
8475
8476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8477 $as_echo_n "checking for a traditional french locale... " >&6; }
8478 if ${gt_cv_locale_fr+:} false; then :
8479   $as_echo_n "(cached) " >&6
8480 else
8481
8482     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8483 /* end confdefs.h.  */
8484
8485 #include <locale.h>
8486 #include <time.h>
8487 #if HAVE_LANGINFO_CODESET
8488 # include <langinfo.h>
8489 #endif
8490 #include <stdlib.h>
8491 #include <string.h>
8492 struct tm t;
8493 char buf[16];
8494 int main () {
8495   /* Check whether the given locale name is recognized by the system.  */
8496 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8497   /* On native Windows, setlocale(category, "") looks at the system settings,
8498      not at the environment variables.  Also, when an encoding suffix such
8499      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8500      category of the locale to "C".  */
8501   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8502       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8503     return 1;
8504 #else
8505   if (setlocale (LC_ALL, "") == NULL) return 1;
8506 #endif
8507   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8508      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8509      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8510      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8511      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8512      some unit tests fail.
8513      On MirBSD 10, when an unsupported locale is specified, setlocale()
8514      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
8515 #if HAVE_LANGINFO_CODESET
8516   {
8517     const char *cs = nl_langinfo (CODESET);
8518     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8519         || strcmp (cs, "UTF-8") == 0)
8520       return 1;
8521   }
8522 #endif
8523 #ifdef __CYGWIN__
8524   /* On Cygwin, avoid locale names without encoding suffix, because the
8525      locale_charset() function relies on the encoding suffix.  Note that
8526      LC_ALL is set on the command line.  */
8527   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8528 #endif
8529   /* Check whether in the abbreviation of the second month, the second
8530      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8531      one byte long. This excludes the UTF-8 encoding.  */
8532   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8533   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8534 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
8535   /* Check whether the decimal separator is a comma.
8536      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8537      are nl_langinfo(RADIXCHAR) are both ".".  */
8538   if (localeconv () ->decimal_point[0] != ',') return 1;
8539 #endif
8540   return 0;
8541 }
8542
8543 _ACEOF
8544     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8545   (eval $ac_link) 2>&5
8546   ac_status=$?
8547   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8548   test $ac_status = 0; } && test -s conftest$ac_exeext; then
8549       case "$host_os" in
8550         # Handle native Windows specially, because there setlocale() interprets
8551         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8552         # "fr" or "fra" as "French" or "French_France.1252",
8553         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8554         # "ja" as "Japanese" or "Japanese_Japan.932",
8555         # and similar.
8556         mingw*)
8557           # Test for the native Windows locale name.
8558           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8559             gt_cv_locale_fr=French_France.1252
8560           else
8561             # None found.
8562             gt_cv_locale_fr=none
8563           fi
8564           ;;
8565         *)
8566           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8567           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8568           # configure script would override the LC_ALL setting. Likewise for
8569           # LC_CTYPE, which is also set at the beginning of the configure script.
8570           # Test for the usual locale name.
8571           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8572             gt_cv_locale_fr=fr_FR
8573           else
8574             # Test for the locale name with explicit encoding suffix.
8575             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8576               gt_cv_locale_fr=fr_FR.ISO-8859-1
8577             else
8578               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8579               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8580                 gt_cv_locale_fr=fr_FR.ISO8859-1
8581               else
8582                 # Test for the HP-UX locale name.
8583                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8584                   gt_cv_locale_fr=fr_FR.iso88591
8585                 else
8586                   # Test for the Solaris 7 locale name.
8587                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8588                     gt_cv_locale_fr=fr
8589                   else
8590                     # None found.
8591                     gt_cv_locale_fr=none
8592                   fi
8593                 fi
8594               fi
8595             fi
8596           fi
8597           ;;
8598       esac
8599     fi
8600     rm -fr conftest*
8601
8602 fi
8603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8604 $as_echo "$gt_cv_locale_fr" >&6; }
8605   LOCALE_FR=$gt_cv_locale_fr
8606
8607
8608
8609
8610
8611
8612
8613   for ac_header in $ac_header_list
8614 do :
8615   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8616 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8617 "
8618 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8619   cat >>confdefs.h <<_ACEOF
8620 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8621 _ACEOF
8622
8623 fi
8624
8625 done
8626
8627
8628
8629
8630
8631
8632
8633
8634             case "$host_os" in
8635      sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
8636        FAULT_YIELDS_SIGBUS=1 ;;
8637      hpux*) # HP-UX
8638        FAULT_YIELDS_SIGBUS=1 ;;
8639      macos* | darwin*) # Mac OS X
8640        FAULT_YIELDS_SIGBUS=1 ;;
8641      gnu*) # Hurd
8642        FAULT_YIELDS_SIGBUS=1 ;;
8643      *)
8644        FAULT_YIELDS_SIGBUS=0 ;;
8645    esac
8646
8647 cat >>confdefs.h <<_ACEOF
8648 #define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS
8649 _ACEOF
8650
8651
8652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
8653 $as_echo_n "checking for working C stack overflow detection... " >&6; }
8654 if ${ac_cv_sys_stack_overflow_works+:} false; then :
8655   $as_echo_n "(cached) " >&6
8656 else
8657   if test "$cross_compiling" = yes; then :
8658   ac_cv_sys_stack_overflow_works=cross-compiling
8659 else
8660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8661 /* end confdefs.h.  */
8662
8663             #include <unistd.h>
8664             #include <signal.h>
8665             #if HAVE_SETRLIMIT
8666             # include <sys/types.h>
8667             # include <sys/time.h>
8668             # include <sys/resource.h>
8669             #endif
8670             #ifndef SIGSTKSZ
8671             # define SIGSTKSZ 16384
8672             #endif
8673
8674             static union
8675             {
8676               char buffer[2 * SIGSTKSZ];
8677               long double ld;
8678               long u;
8679               void *p;
8680             } alternate_signal_stack;
8681
8682             static void
8683             segv_handler (int signo)
8684             {
8685               _exit (0);
8686             }
8687
8688             static int
8689             c_stack_action ()
8690             {
8691               stack_t st;
8692               struct sigaction act;
8693               int r;
8694
8695               st.ss_flags = 0;
8696               /* Use the midpoint to avoid Irix sigaltstack bug.  */
8697               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8698               st.ss_size = SIGSTKSZ;
8699               r = sigaltstack (&st, 0);
8700               if (r != 0)
8701                 return 1;
8702
8703               sigemptyset (&act.sa_mask);
8704               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
8705               act.sa_handler = segv_handler;
8706               #if FAULT_YIELDS_SIGBUS
8707               if (sigaction (SIGBUS, &act, 0) < 0)
8708                 return 2;
8709               #endif
8710               if (sigaction (SIGSEGV, &act, 0) < 0)
8711                 return 3;
8712               return 0;
8713             }
8714             static volatile int *
8715             recurse_1 (volatile int n, volatile int *p)
8716             {
8717               if (n >= 0)
8718                 *recurse_1 (n + 1, p) += n;
8719               return p;
8720             }
8721             static int
8722             recurse (volatile int n)
8723             {
8724               int sum = 0;
8725               return *recurse_1 (n, &sum);
8726             }
8727             int
8728             main ()
8729             {
8730               int result;
8731               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8732               /* Before starting the endless recursion, try to be friendly
8733                  to the user's machine.  On some Linux 2.2.x systems, there
8734                  is no stack limit for user processes at all.  We don't want
8735                  to kill such systems.  */
8736               struct rlimit rl;
8737               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8738               setrlimit (RLIMIT_STACK, &rl);
8739               #endif
8740
8741               result = c_stack_action ();
8742               if (result != 0)
8743                 return result;
8744               return recurse (0);
8745             }
8746
8747 _ACEOF
8748 if ac_fn_c_try_run "$LINENO"; then :
8749   ac_cv_sys_stack_overflow_works=yes
8750 else
8751   ac_cv_sys_stack_overflow_works=no
8752 fi
8753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8754   conftest.$ac_objext conftest.beam conftest.$ac_ext
8755 fi
8756
8757 fi
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
8759 $as_echo "$ac_cv_sys_stack_overflow_works" >&6; }
8760
8761   if test $ac_cv_sys_stack_overflow_works = yes; then
8762
8763 $as_echo "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
8764
8765
8766                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
8767 $as_echo_n "checking for correct stack_t interpretation... " >&6; }
8768 if ${gl_cv_sigaltstack_low_base+:} false; then :
8769   $as_echo_n "(cached) " >&6
8770 else
8771
8772       if test "$cross_compiling" = yes; then :
8773   gl_cv_sigaltstack_low_base=cross-compiling
8774 else
8775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8776 /* end confdefs.h.  */
8777
8778
8779 #include <stdlib.h>
8780 #include <signal.h>
8781 #if HAVE_SYS_SIGNAL_H
8782 # include <sys/signal.h>
8783 #endif
8784 #ifndef SIGSTKSZ
8785 # define SIGSTKSZ 16384
8786 #endif
8787 volatile char *stack_lower_bound;
8788 volatile char *stack_upper_bound;
8789 static void check_stack_location (volatile char *addr)
8790 {
8791   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
8792     exit (0);
8793   else
8794     exit (1);
8795 }
8796 static void stackoverflow_handler (int sig)
8797 {
8798   char dummy;
8799   check_stack_location (&dummy);
8800 }
8801 int main ()
8802 {
8803   char mystack[2 * SIGSTKSZ];
8804   stack_t altstack;
8805   struct sigaction action;
8806   /* Install the alternate stack.  */
8807   altstack.ss_sp = mystack + SIGSTKSZ;
8808   altstack.ss_size = SIGSTKSZ;
8809   stack_lower_bound = (char *) altstack.ss_sp;
8810   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
8811   altstack.ss_flags = 0; /* no SS_DISABLE */
8812   if (sigaltstack (&altstack, NULL) < 0)
8813     exit (2);
8814   /* Install the SIGSEGV handler.  */
8815   sigemptyset (&action.sa_mask);
8816   action.sa_handler = &stackoverflow_handler;
8817   action.sa_flags = SA_ONSTACK;
8818   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
8819     exit(3);
8820   /* Provoke a SIGSEGV.  */
8821   raise (SIGSEGV);
8822   exit (4);
8823 }
8824 _ACEOF
8825 if ac_fn_c_try_run "$LINENO"; then :
8826   gl_cv_sigaltstack_low_base=yes
8827 else
8828   gl_cv_sigaltstack_low_base=no
8829 fi
8830 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8831   conftest.$ac_objext conftest.beam conftest.$ac_ext
8832 fi
8833
8834 fi
8835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
8836 $as_echo "$gl_cv_sigaltstack_low_base" >&6; }
8837    if test "$gl_cv_sigaltstack_low_base" = no; then
8838
8839 $as_echo "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
8840
8841     fi
8842
8843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
8844 $as_echo_n "checking for precise C stack overflow detection... " >&6; }
8845 if ${ac_cv_sys_xsi_stack_overflow_heuristic+:} false; then :
8846   $as_echo_n "(cached) " >&6
8847 else
8848   if test "$cross_compiling" = yes; then :
8849   ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
8850 else
8851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852 /* end confdefs.h.  */
8853
8854             #include <unistd.h>
8855             #include <signal.h>
8856             #if HAVE_UCONTEXT_H
8857             # include <ucontext.h>
8858             #endif
8859             #if HAVE_SETRLIMIT
8860             # include <sys/types.h>
8861             # include <sys/time.h>
8862             # include <sys/resource.h>
8863             #endif
8864             #ifndef SIGSTKSZ
8865             # define SIGSTKSZ 16384
8866             #endif
8867
8868             static union
8869             {
8870               char buffer[2 * SIGSTKSZ];
8871               long double ld;
8872               long u;
8873               void *p;
8874             } alternate_signal_stack;
8875
8876             #if STACK_DIRECTION
8877             # define find_stack_direction(ptr) STACK_DIRECTION
8878             #else
8879             static int
8880             find_stack_direction (char const *addr)
8881             {
8882               char dummy;
8883               return (! addr ? find_stack_direction (&dummy)
8884                       : addr < &dummy ? 1 : -1);
8885             }
8886             #endif
8887
8888             static void
8889             segv_handler (int signo, siginfo_t *info, void *context)
8890             {
8891               if (0 < info->si_code)
8892                 {
8893                   /* For XSI heuristics to work, we need uc_stack to describe
8894                      the interrupted stack (as on Solaris), and not the
8895                      currently executing stack (as on Linux).  */
8896                   ucontext_t const *user_context = context;
8897                   char const *stack_min = user_context->uc_stack.ss_sp;
8898                   size_t stack_size = user_context->uc_stack.ss_size;
8899                   char const *faulting_address = info->si_addr;
8900                   size_t s = faulting_address - stack_min;
8901                   size_t page_size = sysconf (_SC_PAGESIZE);
8902                   if (find_stack_direction (0) < 0)
8903                     s += page_size;
8904                   if (s < stack_size + page_size)
8905                     _exit (0);
8906                   _exit (4);
8907                 }
8908               _exit (5);
8909             }
8910
8911             static int
8912             c_stack_action ()
8913             {
8914               stack_t st;
8915               struct sigaction act;
8916               int r;
8917
8918               st.ss_flags = 0;
8919               /* Use the midpoint to avoid Irix sigaltstack bug.  */
8920               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8921               st.ss_size = SIGSTKSZ;
8922               r = sigaltstack (&st, 0);
8923               if (r != 0)
8924                 return 1;
8925
8926               sigemptyset (&act.sa_mask);
8927               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
8928               act.sa_sigaction = segv_handler;
8929               #if FAULT_YIELDS_SIGBUS
8930               if (sigaction (SIGBUS, &act, 0) < 0)
8931                 return 2;
8932               #endif
8933               if (sigaction (SIGSEGV, &act, 0) < 0)
8934                 return 3;
8935               return 0;
8936             }
8937             static volatile int *
8938             recurse_1 (volatile int n, volatile int *p)
8939             {
8940               if (n >= 0)
8941                 *recurse_1 (n + 1, p) += n;
8942               return p;
8943             }
8944             static int
8945             recurse (volatile int n)
8946             {
8947               int sum = 0;
8948               return *recurse_1 (n, &sum);
8949             }
8950             int
8951             main ()
8952             {
8953               int result;
8954               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8955               /* Before starting the endless recursion, try to be friendly
8956                  to the user's machine.  On some Linux 2.2.x systems, there
8957                  is no stack limit for user processes at all.  We don't want
8958                  to kill such systems.  */
8959               struct rlimit rl;
8960               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8961               setrlimit (RLIMIT_STACK, &rl);
8962               #endif
8963
8964               result = c_stack_action ();
8965               if (result != 0)
8966                 return result;
8967               return recurse (0);
8968             }
8969
8970 _ACEOF
8971 if ac_fn_c_try_run "$LINENO"; then :
8972   ac_cv_sys_xsi_stack_overflow_heuristic=yes
8973 else
8974   ac_cv_sys_xsi_stack_overflow_heuristic=no
8975 fi
8976 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8977   conftest.$ac_objext conftest.beam conftest.$ac_ext
8978 fi
8979
8980 fi
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
8982 $as_echo "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
8983
8984    if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
8985
8986 $as_echo "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
8987
8988    fi
8989   fi
8990
8991       if test "X$prefix" = "XNONE"; then
8992     acl_final_prefix="$ac_default_prefix"
8993   else
8994     acl_final_prefix="$prefix"
8995   fi
8996   if test "X$exec_prefix" = "XNONE"; then
8997     acl_final_exec_prefix='${prefix}'
8998   else
8999     acl_final_exec_prefix="$exec_prefix"
9000   fi
9001   acl_save_prefix="$prefix"
9002   prefix="$acl_final_prefix"
9003   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
9004   prefix="$acl_save_prefix"
9005
9006
9007
9008 # Check whether --with-gnu-ld was given.
9009 if test "${with_gnu_ld+set}" = set; then :
9010   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9011 else
9012   with_gnu_ld=no
9013 fi
9014
9015 # Prepare PATH_SEPARATOR.
9016 # The user is always right.
9017 if test "${PATH_SEPARATOR+set}" != set; then
9018   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
9019   # contains only /bin. Note that ksh looks also at the FPATH variable,
9020   # so we have to set that as well for the test.
9021   PATH_SEPARATOR=:
9022   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9023     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
9024            || PATH_SEPARATOR=';'
9025        }
9026 fi
9027
9028 ac_prog=ld
9029 if test "$GCC" = yes; then
9030   # Check if gcc -print-prog-name=ld gives a path.
9031   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
9032 $as_echo_n "checking for ld used by $CC... " >&6; }
9033   case $host in
9034   *-*-mingw*)
9035     # gcc leaves a trailing carriage return which upsets mingw
9036     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9037   *)
9038     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9039   esac
9040   case $ac_prog in
9041     # Accept absolute paths.
9042     [\\/]* | ?:[\\/]*)
9043       re_direlt='/[^/][^/]*/\.\./'
9044       # Canonicalize the pathname of ld
9045       ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
9046       while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
9047         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9048       done
9049       test -z "$LD" && LD="$ac_prog"
9050       ;;
9051   "")
9052     # If it fails, then pretend we aren't using GCC.
9053     ac_prog=ld
9054     ;;
9055   *)
9056     # If it is relative, then search for the first ld in PATH.
9057     with_gnu_ld=unknown
9058     ;;
9059   esac
9060 elif test "$with_gnu_ld" = yes; then
9061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9062 $as_echo_n "checking for GNU ld... " >&6; }
9063 else
9064   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9065 $as_echo_n "checking for non-GNU ld... " >&6; }
9066 fi
9067 if ${acl_cv_path_LD+:} false; then :
9068   $as_echo_n "(cached) " >&6
9069 else
9070   if test -z "$LD"; then
9071   acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9072   for ac_dir in $PATH; do
9073     IFS="$acl_save_ifs"
9074     test -z "$ac_dir" && ac_dir=.
9075     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9076       acl_cv_path_LD="$ac_dir/$ac_prog"
9077       # Check to see if the program is GNU ld.  I'd rather use --version,
9078       # but apparently some variants of GNU ld only accept -v.
9079       # Break only if it was the GNU/non-GNU ld that we prefer.
9080       case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
9081       *GNU* | *'with BFD'*)
9082         test "$with_gnu_ld" != no && break
9083         ;;
9084       *)
9085         test "$with_gnu_ld" != yes && break
9086         ;;
9087       esac
9088     fi
9089   done
9090   IFS="$acl_save_ifs"
9091 else
9092   acl_cv_path_LD="$LD" # Let the user override the test with a path.
9093 fi
9094 fi
9095
9096 LD="$acl_cv_path_LD"
9097 if test -n "$LD"; then
9098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9099 $as_echo "$LD" >&6; }
9100 else
9101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102 $as_echo "no" >&6; }
9103 fi
9104 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9106 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9107 if ${acl_cv_prog_gnu_ld+:} false; then :
9108   $as_echo_n "(cached) " >&6
9109 else
9110   # I'd rather use --version here, but apparently some GNU lds only accept -v.
9111 case `$LD -v 2>&1 </dev/null` in
9112 *GNU* | *'with BFD'*)
9113   acl_cv_prog_gnu_ld=yes
9114   ;;
9115 *)
9116   acl_cv_prog_gnu_ld=no
9117   ;;
9118 esac
9119 fi
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
9121 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
9122 with_gnu_ld=$acl_cv_prog_gnu_ld
9123
9124
9125
9126
9127                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
9128 $as_echo_n "checking for shared library run path origin... " >&6; }
9129 if ${acl_cv_rpath+:} false; then :
9130   $as_echo_n "(cached) " >&6
9131 else
9132
9133     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
9134     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
9135     . ./conftest.sh
9136     rm -f ./conftest.sh
9137     acl_cv_rpath=done
9138
9139 fi
9140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
9141 $as_echo "$acl_cv_rpath" >&6; }
9142   wl="$acl_cv_wl"
9143   acl_libext="$acl_cv_libext"
9144   acl_shlibext="$acl_cv_shlibext"
9145   acl_libname_spec="$acl_cv_libname_spec"
9146   acl_library_names_spec="$acl_cv_library_names_spec"
9147   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9148   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9149   acl_hardcode_direct="$acl_cv_hardcode_direct"
9150   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
9151     # Check whether --enable-rpath was given.
9152 if test "${enable_rpath+set}" = set; then :
9153   enableval=$enable_rpath; :
9154 else
9155   enable_rpath=yes
9156 fi
9157
9158
9159
9160
9161   acl_libdirstem=lib
9162   acl_libdirstem2=
9163   case "$host_os" in
9164     solaris*)
9165                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
9166 $as_echo_n "checking for 64-bit host... " >&6; }
9167 if ${gl_cv_solaris_64bit+:} false; then :
9168   $as_echo_n "(cached) " >&6
9169 else
9170   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9171 /* end confdefs.h.  */
9172
9173 #ifdef _LP64
9174 sixtyfour bits
9175 #endif
9176
9177 _ACEOF
9178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9179   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
9180   gl_cv_solaris_64bit=yes
9181 else
9182   gl_cv_solaris_64bit=no
9183 fi
9184 rm -f conftest*
9185
9186
9187 fi
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
9189 $as_echo "$gl_cv_solaris_64bit" >&6; }
9190       if test $gl_cv_solaris_64bit = yes; then
9191         acl_libdirstem=lib/64
9192         case "$host_cpu" in
9193           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
9194           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
9195         esac
9196       fi
9197       ;;
9198     *)
9199       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
9200       if test -n "$searchpath"; then
9201         acl_save_IFS="${IFS=    }"; IFS=":"
9202         for searchdir in $searchpath; do
9203           if test -d "$searchdir"; then
9204             case "$searchdir" in
9205               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
9206               */../ | */.. )
9207                 # Better ignore directories of this form. They are misleading.
9208                 ;;
9209               *) searchdir=`cd "$searchdir" && pwd`
9210                  case "$searchdir" in
9211                    */lib64 ) acl_libdirstem=lib64 ;;
9212                  esac ;;
9213             esac
9214           fi
9215         done
9216         IFS="$acl_save_IFS"
9217       fi
9218       ;;
9219   esac
9220   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236     use_additional=yes
9237
9238   acl_save_prefix="$prefix"
9239   prefix="$acl_final_prefix"
9240   acl_save_exec_prefix="$exec_prefix"
9241   exec_prefix="$acl_final_exec_prefix"
9242
9243     eval additional_includedir=\"$includedir\"
9244     eval additional_libdir=\"$libdir\"
9245
9246   exec_prefix="$acl_save_exec_prefix"
9247   prefix="$acl_save_prefix"
9248
9249
9250 # Check whether --with-libsigsegv-prefix was given.
9251 if test "${with_libsigsegv_prefix+set}" = set; then :
9252   withval=$with_libsigsegv_prefix;
9253     if test "X$withval" = "Xno"; then
9254       use_additional=no
9255     else
9256       if test "X$withval" = "X"; then
9257
9258   acl_save_prefix="$prefix"
9259   prefix="$acl_final_prefix"
9260   acl_save_exec_prefix="$exec_prefix"
9261   exec_prefix="$acl_final_exec_prefix"
9262
9263           eval additional_includedir=\"$includedir\"
9264           eval additional_libdir=\"$libdir\"
9265
9266   exec_prefix="$acl_save_exec_prefix"
9267   prefix="$acl_save_prefix"
9268
9269       else
9270         additional_includedir="$withval/include"
9271         additional_libdir="$withval/$acl_libdirstem"
9272         if test "$acl_libdirstem2" != "$acl_libdirstem" \
9273            && ! test -d "$withval/$acl_libdirstem"; then
9274           additional_libdir="$withval/$acl_libdirstem2"
9275         fi
9276       fi
9277     fi
9278
9279 fi
9280
9281       LIBSIGSEGV=
9282   LTLIBSIGSEGV=
9283   INCSIGSEGV=
9284   LIBSIGSEGV_PREFIX=
9285       HAVE_LIBSIGSEGV=
9286   rpathdirs=
9287   ltrpathdirs=
9288   names_already_handled=
9289   names_next_round='sigsegv '
9290   while test -n "$names_next_round"; do
9291     names_this_round="$names_next_round"
9292     names_next_round=
9293     for name in $names_this_round; do
9294       already_handled=
9295       for n in $names_already_handled; do
9296         if test "$n" = "$name"; then
9297           already_handled=yes
9298           break
9299         fi
9300       done
9301       if test -z "$already_handled"; then
9302         names_already_handled="$names_already_handled $name"
9303                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
9304         eval value=\"\$HAVE_LIB$uppername\"
9305         if test -n "$value"; then
9306           if test "$value" = yes; then
9307             eval value=\"\$LIB$uppername\"
9308             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
9309             eval value=\"\$LTLIB$uppername\"
9310             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
9311           else
9312                                     :
9313           fi
9314         else
9315                               found_dir=
9316           found_la=
9317           found_so=
9318           found_a=
9319           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
9320           if test -n "$acl_shlibext"; then
9321             shrext=".$acl_shlibext"             # typically: shrext=.so
9322           else
9323             shrext=
9324           fi
9325           if test $use_additional = yes; then
9326             dir="$additional_libdir"
9327                                     if test -n "$acl_shlibext"; then
9328               if test -f "$dir/$libname$shrext"; then
9329                 found_dir="$dir"
9330                 found_so="$dir/$libname$shrext"
9331               else
9332                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9333                   ver=`(cd "$dir" && \
9334                         for f in "$libname$shrext".*; do echo "$f"; done \
9335                         | sed -e "s,^$libname$shrext\\\\.,," \
9336                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9337                         | sed 1q ) 2>/dev/null`
9338                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9339                     found_dir="$dir"
9340                     found_so="$dir/$libname$shrext.$ver"
9341                   fi
9342                 else
9343                   eval library_names=\"$acl_library_names_spec\"
9344                   for f in $library_names; do
9345                     if test -f "$dir/$f"; then
9346                       found_dir="$dir"
9347                       found_so="$dir/$f"
9348                       break
9349                     fi
9350                   done
9351                 fi
9352               fi
9353             fi
9354                         if test "X$found_dir" = "X"; then
9355               if test -f "$dir/$libname.$acl_libext"; then
9356                 found_dir="$dir"
9357                 found_a="$dir/$libname.$acl_libext"
9358               fi
9359             fi
9360             if test "X$found_dir" != "X"; then
9361               if test -f "$dir/$libname.la"; then
9362                 found_la="$dir/$libname.la"
9363               fi
9364             fi
9365           fi
9366           if test "X$found_dir" = "X"; then
9367             for x in $LDFLAGS $LTLIBSIGSEGV; do
9368
9369   acl_save_prefix="$prefix"
9370   prefix="$acl_final_prefix"
9371   acl_save_exec_prefix="$exec_prefix"
9372   exec_prefix="$acl_final_exec_prefix"
9373   eval x=\"$x\"
9374   exec_prefix="$acl_save_exec_prefix"
9375   prefix="$acl_save_prefix"
9376
9377               case "$x" in
9378                 -L*)
9379                   dir=`echo "X$x" | sed -e 's/^X-L//'`
9380                                     if test -n "$acl_shlibext"; then
9381                     if test -f "$dir/$libname$shrext"; then
9382                       found_dir="$dir"
9383                       found_so="$dir/$libname$shrext"
9384                     else
9385                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9386                         ver=`(cd "$dir" && \
9387                               for f in "$libname$shrext".*; do echo "$f"; done \
9388                               | sed -e "s,^$libname$shrext\\\\.,," \
9389                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9390                               | sed 1q ) 2>/dev/null`
9391                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9392                           found_dir="$dir"
9393                           found_so="$dir/$libname$shrext.$ver"
9394                         fi
9395                       else
9396                         eval library_names=\"$acl_library_names_spec\"
9397                         for f in $library_names; do
9398                           if test -f "$dir/$f"; then
9399                             found_dir="$dir"
9400                             found_so="$dir/$f"
9401                             break
9402                           fi
9403                         done
9404                       fi
9405                     fi
9406                   fi
9407                                     if test "X$found_dir" = "X"; then
9408                     if test -f "$dir/$libname.$acl_libext"; then
9409                       found_dir="$dir"
9410                       found_a="$dir/$libname.$acl_libext"
9411                     fi
9412                   fi
9413                   if test "X$found_dir" != "X"; then
9414                     if test -f "$dir/$libname.la"; then
9415                       found_la="$dir/$libname.la"
9416                     fi
9417                   fi
9418                   ;;
9419               esac
9420               if test "X$found_dir" != "X"; then
9421                 break
9422               fi
9423             done
9424           fi
9425           if test "X$found_dir" != "X"; then
9426                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
9427             if test "X$found_so" != "X"; then
9428                                                         if test "$enable_rpath" = no \
9429                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
9430                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
9431                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9432               else
9433                                                                                 haveit=
9434                 for x in $ltrpathdirs; do
9435                   if test "X$x" = "X$found_dir"; then
9436                     haveit=yes
9437                     break
9438                   fi
9439                 done
9440                 if test -z "$haveit"; then
9441                   ltrpathdirs="$ltrpathdirs $found_dir"
9442                 fi
9443                                 if test "$acl_hardcode_direct" = yes; then
9444                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9445                 else
9446                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
9447                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9448                                                             haveit=
9449                     for x in $rpathdirs; do
9450                       if test "X$x" = "X$found_dir"; then
9451                         haveit=yes
9452                         break
9453                       fi
9454                     done
9455                     if test -z "$haveit"; then
9456                       rpathdirs="$rpathdirs $found_dir"
9457                     fi
9458                   else
9459                                                                                 haveit=
9460                     for x in $LDFLAGS $LIBSIGSEGV; do
9461
9462   acl_save_prefix="$prefix"
9463   prefix="$acl_final_prefix"
9464   acl_save_exec_prefix="$exec_prefix"
9465   exec_prefix="$acl_final_exec_prefix"
9466   eval x=\"$x\"
9467   exec_prefix="$acl_save_exec_prefix"
9468   prefix="$acl_save_prefix"
9469
9470                       if test "X$x" = "X-L$found_dir"; then
9471                         haveit=yes
9472                         break
9473                       fi
9474                     done
9475                     if test -z "$haveit"; then
9476                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
9477                     fi
9478                     if test "$acl_hardcode_minus_L" != no; then
9479                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9480                     else
9481                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9482                     fi
9483                   fi
9484                 fi
9485               fi
9486             else
9487               if test "X$found_a" != "X"; then
9488                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
9489               else
9490                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
9491               fi
9492             fi
9493                         additional_includedir=
9494             case "$found_dir" in
9495               */$acl_libdirstem | */$acl_libdirstem/)
9496                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
9497                 if test "$name" = 'sigsegv'; then
9498                   LIBSIGSEGV_PREFIX="$basedir"
9499                 fi
9500                 additional_includedir="$basedir/include"
9501                 ;;
9502               */$acl_libdirstem2 | */$acl_libdirstem2/)
9503                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
9504                 if test "$name" = 'sigsegv'; then
9505                   LIBSIGSEGV_PREFIX="$basedir"
9506                 fi
9507                 additional_includedir="$basedir/include"
9508                 ;;
9509             esac
9510             if test "X$additional_includedir" != "X"; then
9511                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
9512                 haveit=
9513                 if test "X$additional_includedir" = "X/usr/local/include"; then
9514                   if test -n "$GCC"; then
9515                     case $host_os in
9516                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9517                     esac
9518                   fi
9519                 fi
9520                 if test -z "$haveit"; then
9521                   for x in $CPPFLAGS $INCSIGSEGV; do
9522
9523   acl_save_prefix="$prefix"
9524   prefix="$acl_final_prefix"
9525   acl_save_exec_prefix="$exec_prefix"
9526   exec_prefix="$acl_final_exec_prefix"
9527   eval x=\"$x\"
9528   exec_prefix="$acl_save_exec_prefix"
9529   prefix="$acl_save_prefix"
9530
9531                     if test "X$x" = "X-I$additional_includedir"; then
9532                       haveit=yes
9533                       break
9534                     fi
9535                   done
9536                   if test -z "$haveit"; then
9537                     if test -d "$additional_includedir"; then
9538                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
9539                     fi
9540                   fi
9541                 fi
9542               fi
9543             fi
9544                         if test -n "$found_la"; then
9545                                                         save_libdir="$libdir"
9546               case "$found_la" in
9547                 */* | *\\*) . "$found_la" ;;
9548                 *) . "./$found_la" ;;
9549               esac
9550               libdir="$save_libdir"
9551                             for dep in $dependency_libs; do
9552                 case "$dep" in
9553                   -L*)
9554                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9555                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
9556                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
9557                       haveit=
9558                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
9559                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
9560                         if test -n "$GCC"; then
9561                           case $host_os in
9562                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9563                           esac
9564                         fi
9565                       fi
9566                       if test -z "$haveit"; then
9567                         haveit=
9568                         for x in $LDFLAGS $LIBSIGSEGV; do
9569
9570   acl_save_prefix="$prefix"
9571   prefix="$acl_final_prefix"
9572   acl_save_exec_prefix="$exec_prefix"
9573   exec_prefix="$acl_final_exec_prefix"
9574   eval x=\"$x\"
9575   exec_prefix="$acl_save_exec_prefix"
9576   prefix="$acl_save_prefix"
9577
9578                           if test "X$x" = "X-L$additional_libdir"; then
9579                             haveit=yes
9580                             break
9581                           fi
9582                         done
9583                         if test -z "$haveit"; then
9584                           if test -d "$additional_libdir"; then
9585                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
9586                           fi
9587                         fi
9588                         haveit=
9589                         for x in $LDFLAGS $LTLIBSIGSEGV; do
9590
9591   acl_save_prefix="$prefix"
9592   prefix="$acl_final_prefix"
9593   acl_save_exec_prefix="$exec_prefix"
9594   exec_prefix="$acl_final_exec_prefix"
9595   eval x=\"$x\"
9596   exec_prefix="$acl_save_exec_prefix"
9597   prefix="$acl_save_prefix"
9598
9599                           if test "X$x" = "X-L$additional_libdir"; then
9600                             haveit=yes
9601                             break
9602                           fi
9603                         done
9604                         if test -z "$haveit"; then
9605                           if test -d "$additional_libdir"; then
9606                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
9607                           fi
9608                         fi
9609                       fi
9610                     fi
9611                     ;;
9612                   -R*)
9613                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
9614                     if test "$enable_rpath" != no; then
9615                                                                   haveit=
9616                       for x in $rpathdirs; do
9617                         if test "X$x" = "X$dir"; then
9618                           haveit=yes
9619                           break
9620                         fi
9621                       done
9622                       if test -z "$haveit"; then
9623                         rpathdirs="$rpathdirs $dir"
9624                       fi
9625                                                                   haveit=
9626                       for x in $ltrpathdirs; do
9627                         if test "X$x" = "X$dir"; then
9628                           haveit=yes
9629                           break
9630                         fi
9631                       done
9632                       if test -z "$haveit"; then
9633                         ltrpathdirs="$ltrpathdirs $dir"
9634                       fi
9635                     fi
9636                     ;;
9637                   -l*)
9638                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9639                     ;;
9640                   *.la)
9641                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9642                     ;;
9643                   *)
9644                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
9645                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
9646                     ;;
9647                 esac
9648               done
9649             fi
9650           else
9651                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9652             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
9653           fi
9654         fi
9655       fi
9656     done
9657   done
9658   if test "X$rpathdirs" != "X"; then
9659     if test -n "$acl_hardcode_libdir_separator"; then
9660                         alldirs=
9661       for found_dir in $rpathdirs; do
9662         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
9663       done
9664             acl_save_libdir="$libdir"
9665       libdir="$alldirs"
9666       eval flag=\"$acl_hardcode_libdir_flag_spec\"
9667       libdir="$acl_save_libdir"
9668       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9669     else
9670             for found_dir in $rpathdirs; do
9671         acl_save_libdir="$libdir"
9672         libdir="$found_dir"
9673         eval flag=\"$acl_hardcode_libdir_flag_spec\"
9674         libdir="$acl_save_libdir"
9675         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9676       done
9677     fi
9678   fi
9679   if test "X$ltrpathdirs" != "X"; then
9680             for found_dir in $ltrpathdirs; do
9681       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
9682     done
9683   fi
9684
9685
9686
9687
9688
9689
9690
9691         ac_save_CPPFLAGS="$CPPFLAGS"
9692
9693   for element in $INCSIGSEGV; do
9694     haveit=
9695     for x in $CPPFLAGS; do
9696
9697   acl_save_prefix="$prefix"
9698   prefix="$acl_final_prefix"
9699   acl_save_exec_prefix="$exec_prefix"
9700   exec_prefix="$acl_final_exec_prefix"
9701   eval x=\"$x\"
9702   exec_prefix="$acl_save_exec_prefix"
9703   prefix="$acl_save_prefix"
9704
9705       if test "X$x" = "X$element"; then
9706         haveit=yes
9707         break
9708       fi
9709     done
9710     if test -z "$haveit"; then
9711       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9712     fi
9713   done
9714
9715
9716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
9717 $as_echo_n "checking for libsigsegv... " >&6; }
9718 if ${ac_cv_libsigsegv+:} false; then :
9719   $as_echo_n "(cached) " >&6
9720 else
9721
9722     ac_save_LIBS="$LIBS"
9723                                 case " $LIBSIGSEGV" in
9724       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
9725       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
9726     esac
9727     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728 /* end confdefs.h.  */
9729 #include <sigsegv.h>
9730 int
9731 main ()
9732 {
9733 sigsegv_deinstall_handler();
9734   ;
9735   return 0;
9736 }
9737 _ACEOF
9738 if ac_fn_c_try_link "$LINENO"; then :
9739   ac_cv_libsigsegv=yes
9740 else
9741   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
9742 fi
9743 rm -f core conftest.err conftest.$ac_objext \
9744     conftest$ac_exeext conftest.$ac_ext
9745     LIBS="$ac_save_LIBS"
9746
9747 fi
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
9749 $as_echo "$ac_cv_libsigsegv" >&6; }
9750   if test "$ac_cv_libsigsegv" = yes; then
9751     HAVE_LIBSIGSEGV=yes
9752
9753 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
9754
9755     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
9756 $as_echo_n "checking how to link with libsigsegv... " >&6; }
9757     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
9758 $as_echo "$LIBSIGSEGV" >&6; }
9759   else
9760     HAVE_LIBSIGSEGV=no
9761             CPPFLAGS="$ac_save_CPPFLAGS"
9762     LIBSIGSEGV=
9763     LTLIBSIGSEGV=
9764     LIBSIGSEGV_PREFIX=
9765   fi
9766
9767
9768
9769
9770
9771
9772
9773     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
9774
9775
9776
9777
9778
9779
9780   GNULIB__EXIT=0;
9781   GNULIB_ATOLL=0;
9782   GNULIB_CALLOC_POSIX=0;
9783   GNULIB_CANONICALIZE_FILE_NAME=0;
9784   GNULIB_GETLOADAVG=0;
9785   GNULIB_GETSUBOPT=0;
9786   GNULIB_GRANTPT=0;
9787   GNULIB_MALLOC_POSIX=0;
9788   GNULIB_MBTOWC=0;
9789   GNULIB_MKDTEMP=0;
9790   GNULIB_MKOSTEMP=0;
9791   GNULIB_MKOSTEMPS=0;
9792   GNULIB_MKSTEMP=0;
9793   GNULIB_MKSTEMPS=0;
9794   GNULIB_POSIX_OPENPT=0;
9795   GNULIB_PTSNAME=0;
9796   GNULIB_PTSNAME_R=0;
9797   GNULIB_PUTENV=0;
9798   GNULIB_RANDOM=0;
9799   GNULIB_RANDOM_R=0;
9800   GNULIB_REALLOC_POSIX=0;
9801   GNULIB_REALPATH=0;
9802   GNULIB_RPMATCH=0;
9803   GNULIB_SECURE_GETENV=0;
9804   GNULIB_SETENV=0;
9805   GNULIB_STRTOD=0;
9806   GNULIB_STRTOLL=0;
9807   GNULIB_STRTOULL=0;
9808   GNULIB_SYSTEM_POSIX=0;
9809   GNULIB_UNLOCKPT=0;
9810   GNULIB_UNSETENV=0;
9811   GNULIB_WCTOMB=0;
9812     HAVE__EXIT=1;
9813   HAVE_ATOLL=1;
9814   HAVE_CANONICALIZE_FILE_NAME=1;
9815   HAVE_DECL_GETLOADAVG=1;
9816   HAVE_GETSUBOPT=1;
9817   HAVE_GRANTPT=1;
9818   HAVE_MKDTEMP=1;
9819   HAVE_MKOSTEMP=1;
9820   HAVE_MKOSTEMPS=1;
9821   HAVE_MKSTEMP=1;
9822   HAVE_MKSTEMPS=1;
9823   HAVE_POSIX_OPENPT=1;
9824   HAVE_PTSNAME=1;
9825   HAVE_PTSNAME_R=1;
9826   HAVE_RANDOM=1;
9827   HAVE_RANDOM_H=1;
9828   HAVE_RANDOM_R=1;
9829   HAVE_REALPATH=1;
9830   HAVE_RPMATCH=1;
9831   HAVE_SECURE_GETENV=1;
9832   HAVE_SETENV=1;
9833   HAVE_DECL_SETENV=1;
9834   HAVE_STRTOD=1;
9835   HAVE_STRTOLL=1;
9836   HAVE_STRTOULL=1;
9837   HAVE_STRUCT_RANDOM_DATA=1;
9838   HAVE_SYS_LOADAVG_H=0;
9839   HAVE_UNLOCKPT=1;
9840   HAVE_DECL_UNSETENV=1;
9841   REPLACE_CALLOC=0;
9842   REPLACE_CANONICALIZE_FILE_NAME=0;
9843   REPLACE_MALLOC=0;
9844   REPLACE_MBTOWC=0;
9845   REPLACE_MKSTEMP=0;
9846   REPLACE_PTSNAME=0;
9847   REPLACE_PTSNAME_R=0;
9848   REPLACE_PUTENV=0;
9849   REPLACE_RANDOM_R=0;
9850   REPLACE_REALLOC=0;
9851   REPLACE_REALPATH=0;
9852   REPLACE_SETENV=0;
9853   REPLACE_STRTOD=0;
9854   REPLACE_UNSETENV=0;
9855   REPLACE_WCTOMB=0;
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9866 $as_echo_n "checking whether // is distinct from /... " >&6; }
9867 if ${gl_cv_double_slash_root+:} false; then :
9868   $as_echo_n "(cached) " >&6
9869 else
9870    if test x"$cross_compiling" = xyes ; then
9871         # When cross-compiling, there is no way to tell whether // is special
9872         # short of a list of hosts.  However, the only known hosts to date
9873         # that have a distinct // are Apollo DomainOS (too old to port to),
9874         # Cygwin, and z/OS.  If anyone knows of another system for which // has
9875         # special semantics and is distinct from /, please report it to
9876         # <bug-gnulib@gnu.org>.
9877         case $host in
9878           *-cygwin | i370-ibm-openedition)
9879             gl_cv_double_slash_root=yes ;;
9880           *)
9881             # Be optimistic and assume that / and // are the same when we
9882             # don't know.
9883             gl_cv_double_slash_root='unknown, assuming no' ;;
9884         esac
9885       else
9886         set x `ls -di / // 2>/dev/null`
9887         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9888           gl_cv_double_slash_root=no
9889         else
9890           gl_cv_double_slash_root=yes
9891         fi
9892       fi
9893 fi
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9895 $as_echo "$gl_cv_double_slash_root" >&6; }
9896   if test "$gl_cv_double_slash_root" = yes; then
9897
9898 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9899
9900   fi
9901
9902
9903
9904
9905
9906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9907 $as_echo_n "checking whether realpath works... " >&6; }
9908 if ${gl_cv_func_realpath_works+:} false; then :
9909   $as_echo_n "(cached) " >&6
9910 else
9911
9912     touch conftest.a
9913     mkdir conftest.d
9914     if test "$cross_compiling" = yes; then :
9915   case "$host_os" in
9916                        # Guess yes on glibc systems.
9917         *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9918                        # If we don't know, assume the worst.
9919         *)             gl_cv_func_realpath_works="guessing no" ;;
9920       esac
9921
9922 else
9923   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924 /* end confdefs.h.  */
9925
9926
9927
9928 #include <stdlib.h>
9929 #if defined __MACH__ && defined __APPLE__
9930 /* Avoid a crash on Mac OS X.  */
9931 #include <mach/mach.h>
9932 #include <mach/mach_error.h>
9933 #include <mach/thread_status.h>
9934 #include <mach/exception.h>
9935 #include <mach/task.h>
9936 #include <pthread.h>
9937 /* The exception port on which our thread listens.  */
9938 static mach_port_t our_exception_port;
9939 /* The main function of the thread listening for exceptions of type
9940    EXC_BAD_ACCESS.  */
9941 static void *
9942 mach_exception_thread (void *arg)
9943 {
9944   /* Buffer for a message to be received.  */
9945   struct {
9946     mach_msg_header_t head;
9947     mach_msg_body_t msgh_body;
9948     char data[1024];
9949   } msg;
9950   mach_msg_return_t retval;
9951   /* Wait for a message on the exception port.  */
9952   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9953                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9954   if (retval != MACH_MSG_SUCCESS)
9955     abort ();
9956   exit (1);
9957 }
9958 static void
9959 nocrash_init (void)
9960 {
9961   mach_port_t self = mach_task_self ();
9962   /* Allocate a port on which the thread shall listen for exceptions.  */
9963   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9964       == KERN_SUCCESS) {
9965     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
9966     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9967                                 MACH_MSG_TYPE_MAKE_SEND)
9968         == KERN_SUCCESS) {
9969       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
9970          for us.  */
9971       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9972       /* Create the thread listening on the exception port.  */
9973       pthread_attr_t attr;
9974       pthread_t thread;
9975       if (pthread_attr_init (&attr) == 0
9976           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9977           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9978         pthread_attr_destroy (&attr);
9979         /* Replace the exception port info for these exceptions with our own.
9980            Note that we replace the exception port for the entire task, not only
9981            for a particular thread.  This has the effect that when our exception
9982            port gets the message, the thread specific exception port has already
9983            been asked, and we don't need to bother about it.
9984            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
9985         task_set_exception_ports (self, mask, our_exception_port,
9986                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9987       }
9988     }
9989   }
9990 }
9991 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9992 /* Avoid a crash on native Windows.  */
9993 #define WIN32_LEAN_AND_MEAN
9994 #include <windows.h>
9995 #include <winerror.h>
9996 static LONG WINAPI
9997 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9998 {
9999   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10000     {
10001     case EXCEPTION_ACCESS_VIOLATION:
10002     case EXCEPTION_IN_PAGE_ERROR:
10003     case EXCEPTION_STACK_OVERFLOW:
10004     case EXCEPTION_GUARD_PAGE:
10005     case EXCEPTION_PRIV_INSTRUCTION:
10006     case EXCEPTION_ILLEGAL_INSTRUCTION:
10007     case EXCEPTION_DATATYPE_MISALIGNMENT:
10008     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10009     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10010       exit (1);
10011     }
10012   return EXCEPTION_CONTINUE_SEARCH;
10013 }
10014 static void
10015 nocrash_init (void)
10016 {
10017   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10018 }
10019 #else
10020 /* Avoid a crash on POSIX systems.  */
10021 #include <signal.h>
10022 /* A POSIX signal handler.  */
10023 static void
10024 exception_handler (int sig)
10025 {
10026   exit (1);
10027 }
10028 static void
10029 nocrash_init (void)
10030 {
10031 #ifdef SIGSEGV
10032   signal (SIGSEGV, exception_handler);
10033 #endif
10034 #ifdef SIGBUS
10035   signal (SIGBUS, exception_handler);
10036 #endif
10037 }
10038 #endif
10039
10040         #include <stdlib.h>
10041         #include <string.h>
10042
10043 int
10044 main ()
10045 {
10046
10047         int result = 0;
10048         {
10049           char *name = realpath ("conftest.a", NULL);
10050           if (!(name && *name == '/'))
10051             result |= 1;
10052         }
10053         {
10054           char *name = realpath ("conftest.b/../conftest.a", NULL);
10055           if (name != NULL)
10056             result |= 2;
10057         }
10058         {
10059           char *name = realpath ("conftest.a/", NULL);
10060           if (name != NULL)
10061             result |= 4;
10062         }
10063         {
10064           char *name1 = realpath (".", NULL);
10065           char *name2 = realpath ("conftest.d//./..", NULL);
10066           if (strcmp (name1, name2) != 0)
10067             result |= 8;
10068         }
10069         return result;
10070
10071   ;
10072   return 0;
10073 }
10074
10075 _ACEOF
10076 if ac_fn_c_try_run "$LINENO"; then :
10077   gl_cv_func_realpath_works=yes
10078 else
10079   gl_cv_func_realpath_works=no
10080 fi
10081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10082   conftest.$ac_objext conftest.beam conftest.$ac_ext
10083 fi
10084
10085     rm -rf conftest.a conftest.d
10086
10087 fi
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
10089 $as_echo "$gl_cv_func_realpath_works" >&6; }
10090   case "$gl_cv_func_realpath_works" in
10091     *yes)
10092
10093 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
10094
10095       ;;
10096   esac
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108   GNULIB_CHDIR=0;
10109   GNULIB_CHOWN=0;
10110   GNULIB_CLOSE=0;
10111   GNULIB_DUP=0;
10112   GNULIB_DUP2=0;
10113   GNULIB_DUP3=0;
10114   GNULIB_ENVIRON=0;
10115   GNULIB_EUIDACCESS=0;
10116   GNULIB_FACCESSAT=0;
10117   GNULIB_FCHDIR=0;
10118   GNULIB_FCHOWNAT=0;
10119   GNULIB_FDATASYNC=0;
10120   GNULIB_FSYNC=0;
10121   GNULIB_FTRUNCATE=0;
10122   GNULIB_GETCWD=0;
10123   GNULIB_GETDOMAINNAME=0;
10124   GNULIB_GETDTABLESIZE=0;
10125   GNULIB_GETGROUPS=0;
10126   GNULIB_GETHOSTNAME=0;
10127   GNULIB_GETLOGIN=0;
10128   GNULIB_GETLOGIN_R=0;
10129   GNULIB_GETPAGESIZE=0;
10130   GNULIB_GETUSERSHELL=0;
10131   GNULIB_GROUP_MEMBER=0;
10132   GNULIB_ISATTY=0;
10133   GNULIB_LCHOWN=0;
10134   GNULIB_LINK=0;
10135   GNULIB_LINKAT=0;
10136   GNULIB_LSEEK=0;
10137   GNULIB_PIPE=0;
10138   GNULIB_PIPE2=0;
10139   GNULIB_PREAD=0;
10140   GNULIB_PWRITE=0;
10141   GNULIB_READ=0;
10142   GNULIB_READLINK=0;
10143   GNULIB_READLINKAT=0;
10144   GNULIB_RMDIR=0;
10145   GNULIB_SETHOSTNAME=0;
10146   GNULIB_SLEEP=0;
10147   GNULIB_SYMLINK=0;
10148   GNULIB_SYMLINKAT=0;
10149   GNULIB_TTYNAME_R=0;
10150   GNULIB_UNISTD_H_NONBLOCKING=0;
10151   GNULIB_UNISTD_H_SIGPIPE=0;
10152   GNULIB_UNLINK=0;
10153   GNULIB_UNLINKAT=0;
10154   GNULIB_USLEEP=0;
10155   GNULIB_WRITE=0;
10156     HAVE_CHOWN=1;
10157   HAVE_DUP2=1;
10158   HAVE_DUP3=1;
10159   HAVE_EUIDACCESS=1;
10160   HAVE_FACCESSAT=1;
10161   HAVE_FCHDIR=1;
10162   HAVE_FCHOWNAT=1;
10163   HAVE_FDATASYNC=1;
10164   HAVE_FSYNC=1;
10165   HAVE_FTRUNCATE=1;
10166   HAVE_GETDTABLESIZE=1;
10167   HAVE_GETGROUPS=1;
10168   HAVE_GETHOSTNAME=1;
10169   HAVE_GETLOGIN=1;
10170   HAVE_GETPAGESIZE=1;
10171   HAVE_GROUP_MEMBER=1;
10172   HAVE_LCHOWN=1;
10173   HAVE_LINK=1;
10174   HAVE_LINKAT=1;
10175   HAVE_PIPE=1;
10176   HAVE_PIPE2=1;
10177   HAVE_PREAD=1;
10178   HAVE_PWRITE=1;
10179   HAVE_READLINK=1;
10180   HAVE_READLINKAT=1;
10181   HAVE_SETHOSTNAME=1;
10182   HAVE_SLEEP=1;
10183   HAVE_SYMLINK=1;
10184   HAVE_SYMLINKAT=1;
10185   HAVE_UNLINKAT=1;
10186   HAVE_USLEEP=1;
10187   HAVE_DECL_ENVIRON=1;
10188   HAVE_DECL_FCHDIR=1;
10189   HAVE_DECL_FDATASYNC=1;
10190   HAVE_DECL_GETDOMAINNAME=1;
10191   HAVE_DECL_GETLOGIN_R=1;
10192   HAVE_DECL_GETPAGESIZE=1;
10193   HAVE_DECL_GETUSERSHELL=1;
10194   HAVE_DECL_SETHOSTNAME=1;
10195   HAVE_DECL_TTYNAME_R=1;
10196   HAVE_OS_H=0;
10197   HAVE_SYS_PARAM_H=0;
10198   REPLACE_CHOWN=0;
10199   REPLACE_CLOSE=0;
10200   REPLACE_DUP=0;
10201   REPLACE_DUP2=0;
10202   REPLACE_FCHOWNAT=0;
10203   REPLACE_FTRUNCATE=0;
10204   REPLACE_GETCWD=0;
10205   REPLACE_GETDOMAINNAME=0;
10206   REPLACE_GETLOGIN_R=0;
10207   REPLACE_GETGROUPS=0;
10208   REPLACE_GETPAGESIZE=0;
10209   REPLACE_ISATTY=0;
10210   REPLACE_LCHOWN=0;
10211   REPLACE_LINK=0;
10212   REPLACE_LINKAT=0;
10213   REPLACE_LSEEK=0;
10214   REPLACE_PREAD=0;
10215   REPLACE_PWRITE=0;
10216   REPLACE_READ=0;
10217   REPLACE_READLINK=0;
10218   REPLACE_RMDIR=0;
10219   REPLACE_SLEEP=0;
10220   REPLACE_SYMLINK=0;
10221   REPLACE_TTYNAME_R=0;
10222   REPLACE_UNLINK=0;
10223   REPLACE_UNLINKAT=0;
10224   REPLACE_USLEEP=0;
10225   REPLACE_WRITE=0;
10226   UNISTD_H_HAVE_WINSOCK2_H=0;
10227   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
10228
10229
10230
10231
10232
10233
10234   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10235     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10236
10237 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10238
10239   else
10240     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10241   fi
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
10258 $as_echo_n "checking if environ is properly declared... " >&6; }
10259   if ${gt_cv_var_environ_declaration+:} false; then :
10260   $as_echo_n "(cached) " >&6
10261 else
10262
10263     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10264 /* end confdefs.h.  */
10265 #if HAVE_UNISTD_H
10266      #include <unistd.h>
10267      #endif
10268      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
10269      #include <stdlib.h>
10270
10271            extern struct { int foo; } environ;
10272 int
10273 main ()
10274 {
10275 environ.foo = 1;
10276   ;
10277   return 0;
10278 }
10279 _ACEOF
10280 if ac_fn_c_try_compile "$LINENO"; then :
10281   gt_cv_var_environ_declaration=no
10282 else
10283   gt_cv_var_environ_declaration=yes
10284 fi
10285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10286 fi
10287
10288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
10289 $as_echo "$gt_cv_var_environ_declaration" >&6; }
10290   if test $gt_cv_var_environ_declaration = yes; then
10291
10292 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
10293
10294   fi
10295
10296
10297   if test $gt_cv_var_environ_declaration != yes; then
10298     HAVE_DECL_ENVIRON=0
10299   fi
10300
10301
10302
10303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
10304 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
10305 if ${gl_cv_have_include_next+:} false; then :
10306   $as_echo_n "(cached) " >&6
10307 else
10308   rm -rf conftestd1a conftestd1b conftestd2
10309      mkdir conftestd1a conftestd1b conftestd2
10310                                                   cat <<EOF > conftestd1a/conftest.h
10311 #define DEFINED_IN_CONFTESTD1
10312 #include_next <conftest.h>
10313 #ifdef DEFINED_IN_CONFTESTD2
10314 int foo;
10315 #else
10316 #error "include_next doesn't work"
10317 #endif
10318 EOF
10319      cat <<EOF > conftestd1b/conftest.h
10320 #define DEFINED_IN_CONFTESTD1
10321 #include <stdio.h>
10322 #include_next <conftest.h>
10323 #ifdef DEFINED_IN_CONFTESTD2
10324 int foo;
10325 #else
10326 #error "include_next doesn't work"
10327 #endif
10328 EOF
10329      cat <<EOF > conftestd2/conftest.h
10330 #ifndef DEFINED_IN_CONFTESTD1
10331 #error "include_next test doesn't work"
10332 #endif
10333 #define DEFINED_IN_CONFTESTD2
10334 EOF
10335      gl_save_CPPFLAGS="$CPPFLAGS"
10336      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
10337      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10338 /* end confdefs.h.  */
10339 #include <conftest.h>
10340 _ACEOF
10341 if ac_fn_c_try_compile "$LINENO"; then :
10342   gl_cv_have_include_next=yes
10343 else
10344   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
10345         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10346 /* end confdefs.h.  */
10347 #include <conftest.h>
10348 _ACEOF
10349 if ac_fn_c_try_compile "$LINENO"; then :
10350   gl_cv_have_include_next=buggy
10351 else
10352   gl_cv_have_include_next=no
10353 fi
10354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10355
10356 fi
10357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10358      CPPFLAGS="$gl_save_CPPFLAGS"
10359      rm -rf conftestd1a conftestd1b conftestd2
10360
10361 fi
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
10363 $as_echo "$gl_cv_have_include_next" >&6; }
10364   PRAGMA_SYSTEM_HEADER=
10365   if test $gl_cv_have_include_next = yes; then
10366     INCLUDE_NEXT=include_next
10367     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
10368     if test -n "$GCC"; then
10369       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
10370     fi
10371   else
10372     if test $gl_cv_have_include_next = buggy; then
10373       INCLUDE_NEXT=include
10374       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
10375     else
10376       INCLUDE_NEXT=include
10377       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
10378     fi
10379   fi
10380
10381
10382
10383   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
10384 $as_echo_n "checking whether system header files limit the line length... " >&6; }
10385 if ${gl_cv_pragma_columns+:} false; then :
10386   $as_echo_n "(cached) " >&6
10387 else
10388        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10389 /* end confdefs.h.  */
10390
10391 #ifdef __TANDEM
10392 choke me
10393 #endif
10394
10395 _ACEOF
10396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10397   $EGREP "choke me" >/dev/null 2>&1; then :
10398   gl_cv_pragma_columns=yes
10399 else
10400   gl_cv_pragma_columns=no
10401 fi
10402 rm -f conftest*
10403
10404
10405 fi
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
10407 $as_echo "$gl_cv_pragma_columns" >&6; }
10408   if test $gl_cv_pragma_columns = yes; then
10409     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
10410   else
10411     PRAGMA_COLUMNS=
10412   fi
10413
10414
10415
10416
10417   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
10418 $as_echo_n "checking for complete errno.h... " >&6; }
10419 if ${gl_cv_header_errno_h_complete+:} false; then :
10420   $as_echo_n "(cached) " >&6
10421 else
10422
10423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10424 /* end confdefs.h.  */
10425
10426 #include <errno.h>
10427 #if !defined ETXTBSY
10428 booboo
10429 #endif
10430 #if !defined ENOMSG
10431 booboo
10432 #endif
10433 #if !defined EIDRM
10434 booboo
10435 #endif
10436 #if !defined ENOLINK
10437 booboo
10438 #endif
10439 #if !defined EPROTO
10440 booboo
10441 #endif
10442 #if !defined EMULTIHOP
10443 booboo
10444 #endif
10445 #if !defined EBADMSG
10446 booboo
10447 #endif
10448 #if !defined EOVERFLOW
10449 booboo
10450 #endif
10451 #if !defined ENOTSUP
10452 booboo
10453 #endif
10454 #if !defined ENETRESET
10455 booboo
10456 #endif
10457 #if !defined ECONNABORTED
10458 booboo
10459 #endif
10460 #if !defined ESTALE
10461 booboo
10462 #endif
10463 #if !defined EDQUOT
10464 booboo
10465 #endif
10466 #if !defined ECANCELED
10467 booboo
10468 #endif
10469 #if !defined EOWNERDEAD
10470 booboo
10471 #endif
10472 #if !defined ENOTRECOVERABLE
10473 booboo
10474 #endif
10475 #if !defined EILSEQ
10476 booboo
10477 #endif
10478
10479 _ACEOF
10480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10481   $EGREP "booboo" >/dev/null 2>&1; then :
10482   gl_cv_header_errno_h_complete=no
10483 else
10484   gl_cv_header_errno_h_complete=yes
10485 fi
10486 rm -f conftest*
10487
10488
10489 fi
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10491 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10492   if test $gl_cv_header_errno_h_complete = yes; then
10493     ERRNO_H=''
10494   else
10495
10496
10497
10498
10499
10500
10501
10502
10503      if test $gl_cv_have_include_next = yes; then
10504        gl_cv_next_errno_h='<'errno.h'>'
10505      else
10506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10507 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10508 if ${gl_cv_next_errno_h+:} false; then :
10509   $as_echo_n "(cached) " >&6
10510 else
10511
10512                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10513 /* end confdefs.h.  */
10514 #include <errno.h>
10515
10516 _ACEOF
10517                                                                                                                         case "$host_os" in
10518                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10519                  *)    gl_absname_cpp="$ac_cpp" ;;
10520                esac
10521
10522                case "$host_os" in
10523                  mingw*)
10524                                                                                                                                      gl_dirsep_regex='[/\\]'
10525                    ;;
10526                  *)
10527                    gl_dirsep_regex='\/'
10528                    ;;
10529                esac
10530                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10531
10532                gl_header_literal_regex=`echo 'errno.h' \
10533                                         | sed -e "$gl_make_literal_regex_sed"`
10534                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10535                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10536                    s|^/[^/]|//&|
10537                    p
10538                    q
10539                  }'
10540                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10541                       sed -n "$gl_absolute_header_sed"`'"'
10542
10543
10544 fi
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10546 $as_echo "$gl_cv_next_errno_h" >&6; }
10547      fi
10548      NEXT_ERRNO_H=$gl_cv_next_errno_h
10549
10550      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10551        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10552        gl_next_as_first_directive='<'errno.h'>'
10553      else
10554        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10555        gl_next_as_first_directive=$gl_cv_next_errno_h
10556      fi
10557      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10558
10559
10560
10561
10562     ERRNO_H='errno.h'
10563   fi
10564
10565    if test -n "$ERRNO_H"; then
10566   GL_GENERATE_ERRNO_H_TRUE=
10567   GL_GENERATE_ERRNO_H_FALSE='#'
10568 else
10569   GL_GENERATE_ERRNO_H_TRUE='#'
10570   GL_GENERATE_ERRNO_H_FALSE=
10571 fi
10572
10573
10574   if test -n "$ERRNO_H"; then
10575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10576 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10577 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10578   $as_echo_n "(cached) " >&6
10579 else
10580
10581       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h.  */
10583
10584 #include <errno.h>
10585 #ifdef EMULTIHOP
10586 yes
10587 #endif
10588
10589 _ACEOF
10590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10591   $EGREP "yes" >/dev/null 2>&1; then :
10592   gl_cv_header_errno_h_EMULTIHOP=yes
10593 else
10594   gl_cv_header_errno_h_EMULTIHOP=no
10595 fi
10596 rm -f conftest*
10597
10598       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10599         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10600 /* end confdefs.h.  */
10601
10602 #define _XOPEN_SOURCE_EXTENDED 1
10603 #include <errno.h>
10604 #ifdef EMULTIHOP
10605 yes
10606 #endif
10607
10608 _ACEOF
10609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10610   $EGREP "yes" >/dev/null 2>&1; then :
10611   gl_cv_header_errno_h_EMULTIHOP=hidden
10612 fi
10613 rm -f conftest*
10614
10615         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10616                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
10617 #define _XOPEN_SOURCE_EXTENDED 1
10618 #include <errno.h>
10619 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10620 #include <stdio.h>
10621 #include <stdlib.h>
10622 "; then :
10623
10624 fi
10625
10626         fi
10627       fi
10628
10629 fi
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10631 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10632     case $gl_cv_header_errno_h_EMULTIHOP in
10633       yes | no)
10634         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10635         ;;
10636       *)
10637         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10638         ;;
10639     esac
10640
10641
10642   fi
10643
10644
10645   if test -n "$ERRNO_H"; then
10646     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10647 $as_echo_n "checking for ENOLINK value... " >&6; }
10648 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10649   $as_echo_n "(cached) " >&6
10650 else
10651
10652       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10653 /* end confdefs.h.  */
10654
10655 #include <errno.h>
10656 #ifdef ENOLINK
10657 yes
10658 #endif
10659
10660 _ACEOF
10661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10662   $EGREP "yes" >/dev/null 2>&1; then :
10663   gl_cv_header_errno_h_ENOLINK=yes
10664 else
10665   gl_cv_header_errno_h_ENOLINK=no
10666 fi
10667 rm -f conftest*
10668
10669       if test $gl_cv_header_errno_h_ENOLINK = no; then
10670         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10671 /* end confdefs.h.  */
10672
10673 #define _XOPEN_SOURCE_EXTENDED 1
10674 #include <errno.h>
10675 #ifdef ENOLINK
10676 yes
10677 #endif
10678
10679 _ACEOF
10680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10681   $EGREP "yes" >/dev/null 2>&1; then :
10682   gl_cv_header_errno_h_ENOLINK=hidden
10683 fi
10684 rm -f conftest*
10685
10686         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10687                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
10688 #define _XOPEN_SOURCE_EXTENDED 1
10689 #include <errno.h>
10690 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10691 #include <stdio.h>
10692 #include <stdlib.h>
10693 "; then :
10694
10695 fi
10696
10697         fi
10698       fi
10699
10700 fi
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10702 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10703     case $gl_cv_header_errno_h_ENOLINK in
10704       yes | no)
10705         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10706         ;;
10707       *)
10708         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10709         ;;
10710     esac
10711
10712
10713   fi
10714
10715
10716   if test -n "$ERRNO_H"; then
10717     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10718 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10719 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722
10723       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724 /* end confdefs.h.  */
10725
10726 #include <errno.h>
10727 #ifdef EOVERFLOW
10728 yes
10729 #endif
10730
10731 _ACEOF
10732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10733   $EGREP "yes" >/dev/null 2>&1; then :
10734   gl_cv_header_errno_h_EOVERFLOW=yes
10735 else
10736   gl_cv_header_errno_h_EOVERFLOW=no
10737 fi
10738 rm -f conftest*
10739
10740       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10741         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10742 /* end confdefs.h.  */
10743
10744 #define _XOPEN_SOURCE_EXTENDED 1
10745 #include <errno.h>
10746 #ifdef EOVERFLOW
10747 yes
10748 #endif
10749
10750 _ACEOF
10751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10752   $EGREP "yes" >/dev/null 2>&1; then :
10753   gl_cv_header_errno_h_EOVERFLOW=hidden
10754 fi
10755 rm -f conftest*
10756
10757         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10758                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
10759 #define _XOPEN_SOURCE_EXTENDED 1
10760 #include <errno.h>
10761 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
10762 #include <stdio.h>
10763 #include <stdlib.h>
10764 "; then :
10765
10766 fi
10767
10768         fi
10769       fi
10770
10771 fi
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10773 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10774     case $gl_cv_header_errno_h_EOVERFLOW in
10775       yes | no)
10776         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10777         ;;
10778       *)
10779         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10780         ;;
10781     esac
10782
10783
10784   fi
10785
10786
10787 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10788 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10789   ac_have_decl=1
10790 else
10791   ac_have_decl=0
10792 fi
10793
10794 cat >>confdefs.h <<_ACEOF
10795 #define HAVE_DECL_STRERROR_R $ac_have_decl
10796 _ACEOF
10797
10798 for ac_func in strerror_r
10799 do :
10800   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10801 if test "x$ac_cv_func_strerror_r" = xyes; then :
10802   cat >>confdefs.h <<_ACEOF
10803 #define HAVE_STRERROR_R 1
10804 _ACEOF
10805
10806 fi
10807 done
10808
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10810 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10811 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10812   $as_echo_n "(cached) " >&6
10813 else
10814
10815     ac_cv_func_strerror_r_char_p=no
10816     if test $ac_cv_have_decl_strerror_r = yes; then
10817       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10818 /* end confdefs.h.  */
10819 $ac_includes_default
10820 int
10821 main ()
10822 {
10823
10824           char buf[100];
10825           char x = *strerror_r (0, buf, sizeof buf);
10826           char *p = strerror_r (0, buf, sizeof buf);
10827           return !p || x;
10828
10829   ;
10830   return 0;
10831 }
10832 _ACEOF
10833 if ac_fn_c_try_compile "$LINENO"; then :
10834   ac_cv_func_strerror_r_char_p=yes
10835 fi
10836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10837     else
10838       # strerror_r is not declared.  Choose between
10839       # systems that have relatively inaccessible declarations for the
10840       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
10841       # former has a strerror_r that returns char*, while the latter
10842       # has a strerror_r that returns `int'.
10843       # This test should segfault on the DEC system.
10844       if test "$cross_compiling" = yes; then :
10845   :
10846 else
10847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848 /* end confdefs.h.  */
10849 $ac_includes_default
10850         extern char *strerror_r ();
10851 int
10852 main ()
10853 {
10854 char buf[100];
10855           char x = *strerror_r (0, buf, sizeof buf);
10856           return ! isalpha (x);
10857   ;
10858   return 0;
10859 }
10860 _ACEOF
10861 if ac_fn_c_try_run "$LINENO"; then :
10862   ac_cv_func_strerror_r_char_p=yes
10863 fi
10864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10865   conftest.$ac_objext conftest.beam conftest.$ac_ext
10866 fi
10867
10868     fi
10869
10870 fi
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10872 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10873 if test $ac_cv_func_strerror_r_char_p = yes; then
10874
10875 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10876
10877 fi
10878
10879 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10880 if test "x$ac_cv_type_mode_t" = xyes; then :
10881
10882 else
10883
10884 cat >>confdefs.h <<_ACEOF
10885 #define mode_t int
10886 _ACEOF
10887
10888 fi
10889
10890
10891
10892
10893
10894   ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
10895 "
10896 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
10897
10898 cat >>confdefs.h <<_ACEOF
10899 #define HAVE_SIG_ATOMIC_T 1
10900 _ACEOF
10901
10902
10903 else
10904
10905 $as_echo "#define sig_atomic_t int" >>confdefs.h
10906
10907 fi
10908
10909
10910
10911   GNULIB_DPRINTF=0;
10912   GNULIB_FCLOSE=0;
10913   GNULIB_FDOPEN=0;
10914   GNULIB_FFLUSH=0;
10915   GNULIB_FGETC=0;
10916   GNULIB_FGETS=0;
10917   GNULIB_FOPEN=0;
10918   GNULIB_FPRINTF=0;
10919   GNULIB_FPRINTF_POSIX=0;
10920   GNULIB_FPURGE=0;
10921   GNULIB_FPUTC=0;
10922   GNULIB_FPUTS=0;
10923   GNULIB_FREAD=0;
10924   GNULIB_FREOPEN=0;
10925   GNULIB_FSCANF=0;
10926   GNULIB_FSEEK=0;
10927   GNULIB_FSEEKO=0;
10928   GNULIB_FTELL=0;
10929   GNULIB_FTELLO=0;
10930   GNULIB_FWRITE=0;
10931   GNULIB_GETC=0;
10932   GNULIB_GETCHAR=0;
10933   GNULIB_GETDELIM=0;
10934   GNULIB_GETLINE=0;
10935   GNULIB_OBSTACK_PRINTF=0;
10936   GNULIB_OBSTACK_PRINTF_POSIX=0;
10937   GNULIB_PCLOSE=0;
10938   GNULIB_PERROR=0;
10939   GNULIB_POPEN=0;
10940   GNULIB_PRINTF=0;
10941   GNULIB_PRINTF_POSIX=0;
10942   GNULIB_PUTC=0;
10943   GNULIB_PUTCHAR=0;
10944   GNULIB_PUTS=0;
10945   GNULIB_REMOVE=0;
10946   GNULIB_RENAME=0;
10947   GNULIB_RENAMEAT=0;
10948   GNULIB_SCANF=0;
10949   GNULIB_SNPRINTF=0;
10950   GNULIB_SPRINTF_POSIX=0;
10951   GNULIB_STDIO_H_NONBLOCKING=0;
10952   GNULIB_STDIO_H_SIGPIPE=0;
10953   GNULIB_TMPFILE=0;
10954   GNULIB_VASPRINTF=0;
10955   GNULIB_VFSCANF=0;
10956   GNULIB_VSCANF=0;
10957   GNULIB_VDPRINTF=0;
10958   GNULIB_VFPRINTF=0;
10959   GNULIB_VFPRINTF_POSIX=0;
10960   GNULIB_VPRINTF=0;
10961   GNULIB_VPRINTF_POSIX=0;
10962   GNULIB_VSNPRINTF=0;
10963   GNULIB_VSPRINTF_POSIX=0;
10964     HAVE_DECL_FPURGE=1;
10965   HAVE_DECL_FSEEKO=1;
10966   HAVE_DECL_FTELLO=1;
10967   HAVE_DECL_GETDELIM=1;
10968   HAVE_DECL_GETLINE=1;
10969   HAVE_DECL_OBSTACK_PRINTF=1;
10970   HAVE_DECL_SNPRINTF=1;
10971   HAVE_DECL_VSNPRINTF=1;
10972   HAVE_DPRINTF=1;
10973   HAVE_FSEEKO=1;
10974   HAVE_FTELLO=1;
10975   HAVE_PCLOSE=1;
10976   HAVE_POPEN=1;
10977   HAVE_RENAMEAT=1;
10978   HAVE_VASPRINTF=1;
10979   HAVE_VDPRINTF=1;
10980   REPLACE_DPRINTF=0;
10981   REPLACE_FCLOSE=0;
10982   REPLACE_FDOPEN=0;
10983   REPLACE_FFLUSH=0;
10984   REPLACE_FOPEN=0;
10985   REPLACE_FPRINTF=0;
10986   REPLACE_FPURGE=0;
10987   REPLACE_FREOPEN=0;
10988   REPLACE_FSEEK=0;
10989   REPLACE_FSEEKO=0;
10990   REPLACE_FTELL=0;
10991   REPLACE_FTELLO=0;
10992   REPLACE_GETDELIM=0;
10993   REPLACE_GETLINE=0;
10994   REPLACE_OBSTACK_PRINTF=0;
10995   REPLACE_PERROR=0;
10996   REPLACE_POPEN=0;
10997   REPLACE_PRINTF=0;
10998   REPLACE_REMOVE=0;
10999   REPLACE_RENAME=0;
11000   REPLACE_RENAMEAT=0;
11001   REPLACE_SNPRINTF=0;
11002   REPLACE_SPRINTF=0;
11003   REPLACE_STDIO_READ_FUNCS=0;
11004   REPLACE_STDIO_WRITE_FUNCS=0;
11005   REPLACE_TMPFILE=0;
11006   REPLACE_VASPRINTF=0;
11007   REPLACE_VDPRINTF=0;
11008   REPLACE_VFPRINTF=0;
11009   REPLACE_VPRINTF=0;
11010   REPLACE_VSNPRINTF=0;
11011   REPLACE_VSPRINTF=0;
11012
11013
11014   GNULIB_FCNTL=0;
11015   GNULIB_NONBLOCKING=0;
11016   GNULIB_OPEN=0;
11017   GNULIB_OPENAT=0;
11018     HAVE_FCNTL=1;
11019   HAVE_OPENAT=1;
11020   REPLACE_FCNTL=0;
11021   REPLACE_OPEN=0;
11022   REPLACE_OPENAT=0;
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11034 $as_echo_n "checking for working fcntl.h... " >&6; }
11035 if ${gl_cv_header_working_fcntl_h+:} false; then :
11036   $as_echo_n "(cached) " >&6
11037 else
11038   if test "$cross_compiling" = yes; then :
11039   gl_cv_header_working_fcntl_h=cross-compiling
11040 else
11041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11042 /* end confdefs.h.  */
11043 #include <sys/types.h>
11044            #include <sys/stat.h>
11045            #if HAVE_UNISTD_H
11046            # include <unistd.h>
11047            #else /* on Windows with MSVC */
11048            # include <io.h>
11049            # include <stdlib.h>
11050            # defined sleep(n) _sleep ((n) * 1000)
11051            #endif
11052            #include <fcntl.h>
11053            #ifndef O_NOATIME
11054             #define O_NOATIME 0
11055            #endif
11056            #ifndef O_NOFOLLOW
11057             #define O_NOFOLLOW 0
11058            #endif
11059            static int const constants[] =
11060             {
11061               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11062               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11063             };
11064
11065 int
11066 main ()
11067 {
11068
11069             int result = !constants;
11070             #if HAVE_SYMLINK
11071             {
11072               static char const sym[] = "conftest.sym";
11073               if (symlink ("/dev/null", sym) != 0)
11074                 result |= 2;
11075               else
11076                 {
11077                   int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11078                   if (fd >= 0)
11079                     {
11080                       close (fd);
11081                       result |= 4;
11082                     }
11083                 }
11084               if (unlink (sym) != 0 || symlink (".", sym) != 0)
11085                 result |= 2;
11086               else
11087                 {
11088                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11089                   if (fd >= 0)
11090                     {
11091                       close (fd);
11092                       result |= 4;
11093                     }
11094                 }
11095               unlink (sym);
11096             }
11097             #endif
11098             {
11099               static char const file[] = "confdefs.h";
11100               int fd = open (file, O_RDONLY | O_NOATIME);
11101               if (fd < 0)
11102                 result |= 8;
11103               else
11104                 {
11105                   struct stat st0;
11106                   if (fstat (fd, &st0) != 0)
11107                     result |= 16;
11108                   else
11109                     {
11110                       char c;
11111                       sleep (1);
11112                       if (read (fd, &c, 1) != 1)
11113                         result |= 24;
11114                       else
11115                         {
11116                           if (close (fd) != 0)
11117                             result |= 32;
11118                           else
11119                             {
11120                               struct stat st1;
11121                               if (stat (file, &st1) != 0)
11122                                 result |= 40;
11123                               else
11124                                 if (st0.st_atime != st1.st_atime)
11125                                   result |= 64;
11126                             }
11127                         }
11128                     }
11129                 }
11130             }
11131             return result;
11132   ;
11133   return 0;
11134 }
11135 _ACEOF
11136 if ac_fn_c_try_run "$LINENO"; then :
11137   gl_cv_header_working_fcntl_h=yes
11138 else
11139   case $? in #(
11140         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11141         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11142         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11143          *) gl_cv_header_working_fcntl_h='no';;
11144         esac
11145 fi
11146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11147   conftest.$ac_objext conftest.beam conftest.$ac_ext
11148 fi
11149
11150 fi
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11152 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
11153
11154   case $gl_cv_header_working_fcntl_h in #(
11155   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11156   *) ac_val=1;;
11157   esac
11158
11159 cat >>confdefs.h <<_ACEOF
11160 #define HAVE_WORKING_O_NOATIME $ac_val
11161 _ACEOF
11162
11163
11164   case $gl_cv_header_working_fcntl_h in #(
11165   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11166   *) ac_val=1;;
11167   esac
11168
11169 cat >>confdefs.h <<_ACEOF
11170 #define HAVE_WORKING_O_NOFOLLOW $ac_val
11171 _ACEOF
11172
11173
11174 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11175 if test "x$ac_cv_type_pid_t" = xyes; then :
11176
11177 else
11178
11179 cat >>confdefs.h <<_ACEOF
11180 #define pid_t int
11181 _ACEOF
11182
11183 fi
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201   GNULIB_ACOSF=0;
11202   GNULIB_ACOSL=0;
11203   GNULIB_ASINF=0;
11204   GNULIB_ASINL=0;
11205   GNULIB_ATANF=0;
11206   GNULIB_ATANL=0;
11207   GNULIB_ATAN2F=0;
11208   GNULIB_CBRT=0;
11209   GNULIB_CBRTF=0;
11210   GNULIB_CBRTL=0;
11211   GNULIB_CEIL=0;
11212   GNULIB_CEILF=0;
11213   GNULIB_CEILL=0;
11214   GNULIB_COPYSIGN=0;
11215   GNULIB_COPYSIGNF=0;
11216   GNULIB_COPYSIGNL=0;
11217   GNULIB_COSF=0;
11218   GNULIB_COSL=0;
11219   GNULIB_COSHF=0;
11220   GNULIB_EXPF=0;
11221   GNULIB_EXPL=0;
11222   GNULIB_EXP2=0;
11223   GNULIB_EXP2F=0;
11224   GNULIB_EXP2L=0;
11225   GNULIB_EXPM1=0;
11226   GNULIB_EXPM1F=0;
11227   GNULIB_EXPM1L=0;
11228   GNULIB_FABSF=0;
11229   GNULIB_FABSL=0;
11230   GNULIB_FLOOR=0;
11231   GNULIB_FLOORF=0;
11232   GNULIB_FLOORL=0;
11233   GNULIB_FMA=0;
11234   GNULIB_FMAF=0;
11235   GNULIB_FMAL=0;
11236   GNULIB_FMOD=0;
11237   GNULIB_FMODF=0;
11238   GNULIB_FMODL=0;
11239   GNULIB_FREXPF=0;
11240   GNULIB_FREXP=0;
11241   GNULIB_FREXPL=0;
11242   GNULIB_HYPOT=0;
11243   GNULIB_HYPOTF=0;
11244   GNULIB_HYPOTL=0;
11245   GNULIB_ILOGB=0;
11246   GNULIB_ILOGBF=0;
11247   GNULIB_ILOGBL=0;
11248   GNULIB_ISFINITE=0;
11249   GNULIB_ISINF=0;
11250   GNULIB_ISNAN=0;
11251   GNULIB_ISNANF=0;
11252   GNULIB_ISNAND=0;
11253   GNULIB_ISNANL=0;
11254   GNULIB_LDEXPF=0;
11255   GNULIB_LDEXPL=0;
11256   GNULIB_LOG=0;
11257   GNULIB_LOGF=0;
11258   GNULIB_LOGL=0;
11259   GNULIB_LOG10=0;
11260   GNULIB_LOG10F=0;
11261   GNULIB_LOG10L=0;
11262   GNULIB_LOG1P=0;
11263   GNULIB_LOG1PF=0;
11264   GNULIB_LOG1PL=0;
11265   GNULIB_LOG2=0;
11266   GNULIB_LOG2F=0;
11267   GNULIB_LOG2L=0;
11268   GNULIB_LOGB=0;
11269   GNULIB_LOGBF=0;
11270   GNULIB_LOGBL=0;
11271   GNULIB_MODF=0;
11272   GNULIB_MODFF=0;
11273   GNULIB_MODFL=0;
11274   GNULIB_POWF=0;
11275   GNULIB_REMAINDER=0;
11276   GNULIB_REMAINDERF=0;
11277   GNULIB_REMAINDERL=0;
11278   GNULIB_RINT=0;
11279   GNULIB_RINTF=0;
11280   GNULIB_RINTL=0;
11281   GNULIB_ROUND=0;
11282   GNULIB_ROUNDF=0;
11283   GNULIB_ROUNDL=0;
11284   GNULIB_SIGNBIT=0;
11285   GNULIB_SINF=0;
11286   GNULIB_SINL=0;
11287   GNULIB_SINHF=0;
11288   GNULIB_SQRTF=0;
11289   GNULIB_SQRTL=0;
11290   GNULIB_TANF=0;
11291   GNULIB_TANL=0;
11292   GNULIB_TANHF=0;
11293   GNULIB_TRUNC=0;
11294   GNULIB_TRUNCF=0;
11295   GNULIB_TRUNCL=0;
11296     HAVE_ACOSF=1;
11297   HAVE_ACOSL=1;
11298   HAVE_ASINF=1;
11299   HAVE_ASINL=1;
11300   HAVE_ATANF=1;
11301   HAVE_ATANL=1;
11302   HAVE_ATAN2F=1;
11303   HAVE_CBRT=1;
11304   HAVE_CBRTF=1;
11305   HAVE_CBRTL=1;
11306   HAVE_COPYSIGN=1;
11307   HAVE_COPYSIGNL=1;
11308   HAVE_COSF=1;
11309   HAVE_COSL=1;
11310   HAVE_COSHF=1;
11311   HAVE_EXPF=1;
11312   HAVE_EXPL=1;
11313   HAVE_EXPM1=1;
11314   HAVE_EXPM1F=1;
11315   HAVE_FABSF=1;
11316   HAVE_FABSL=1;
11317   HAVE_FMA=1;
11318   HAVE_FMAF=1;
11319   HAVE_FMAL=1;
11320   HAVE_FMODF=1;
11321   HAVE_FMODL=1;
11322   HAVE_FREXPF=1;
11323   HAVE_HYPOTF=1;
11324   HAVE_HYPOTL=1;
11325   HAVE_ILOGB=1;
11326   HAVE_ILOGBF=1;
11327   HAVE_ILOGBL=1;
11328   HAVE_ISNANF=1;
11329   HAVE_ISNAND=1;
11330   HAVE_ISNANL=1;
11331   HAVE_LDEXPF=1;
11332   HAVE_LOGF=1;
11333   HAVE_LOGL=1;
11334   HAVE_LOG10F=1;
11335   HAVE_LOG10L=1;
11336   HAVE_LOG1P=1;
11337   HAVE_LOG1PF=1;
11338   HAVE_LOG1PL=1;
11339   HAVE_LOGBF=1;
11340   HAVE_LOGBL=1;
11341   HAVE_MODFF=1;
11342   HAVE_MODFL=1;
11343   HAVE_POWF=1;
11344   HAVE_REMAINDER=1;
11345   HAVE_REMAINDERF=1;
11346   HAVE_RINT=1;
11347   HAVE_RINTL=1;
11348   HAVE_SINF=1;
11349   HAVE_SINL=1;
11350   HAVE_SINHF=1;
11351   HAVE_SQRTF=1;
11352   HAVE_SQRTL=1;
11353   HAVE_TANF=1;
11354   HAVE_TANL=1;
11355   HAVE_TANHF=1;
11356   HAVE_DECL_ACOSL=1;
11357   HAVE_DECL_ASINL=1;
11358   HAVE_DECL_ATANL=1;
11359   HAVE_DECL_CBRTF=1;
11360   HAVE_DECL_CBRTL=1;
11361   HAVE_DECL_CEILF=1;
11362   HAVE_DECL_CEILL=1;
11363   HAVE_DECL_COPYSIGNF=1;
11364   HAVE_DECL_COSL=1;
11365   HAVE_DECL_EXPL=1;
11366   HAVE_DECL_EXP2=1;
11367   HAVE_DECL_EXP2F=1;
11368   HAVE_DECL_EXP2L=1;
11369   HAVE_DECL_EXPM1L=1;
11370   HAVE_DECL_FLOORF=1;
11371   HAVE_DECL_FLOORL=1;
11372   HAVE_DECL_FREXPL=1;
11373   HAVE_DECL_LDEXPL=1;
11374   HAVE_DECL_LOGL=1;
11375   HAVE_DECL_LOG10L=1;
11376   HAVE_DECL_LOG2=1;
11377   HAVE_DECL_LOG2F=1;
11378   HAVE_DECL_LOG2L=1;
11379   HAVE_DECL_LOGB=1;
11380   HAVE_DECL_REMAINDER=1;
11381   HAVE_DECL_REMAINDERL=1;
11382   HAVE_DECL_RINTF=1;
11383   HAVE_DECL_ROUND=1;
11384   HAVE_DECL_ROUNDF=1;
11385   HAVE_DECL_ROUNDL=1;
11386   HAVE_DECL_SINL=1;
11387   HAVE_DECL_SQRTL=1;
11388   HAVE_DECL_TANL=1;
11389   HAVE_DECL_TRUNC=1;
11390   HAVE_DECL_TRUNCF=1;
11391   HAVE_DECL_TRUNCL=1;
11392   REPLACE_CBRTF=0;
11393   REPLACE_CBRTL=0;
11394   REPLACE_CEIL=0;
11395   REPLACE_CEILF=0;
11396   REPLACE_CEILL=0;
11397   REPLACE_EXPM1=0;
11398   REPLACE_EXPM1F=0;
11399   REPLACE_EXP2=0;
11400   REPLACE_EXP2L=0;
11401   REPLACE_FABSL=0;
11402   REPLACE_FLOOR=0;
11403   REPLACE_FLOORF=0;
11404   REPLACE_FLOORL=0;
11405   REPLACE_FMA=0;
11406   REPLACE_FMAF=0;
11407   REPLACE_FMAL=0;
11408   REPLACE_FMOD=0;
11409   REPLACE_FMODF=0;
11410   REPLACE_FMODL=0;
11411   REPLACE_FREXPF=0;
11412   REPLACE_FREXP=0;
11413   REPLACE_FREXPL=0;
11414   REPLACE_HUGE_VAL=0;
11415   REPLACE_HYPOT=0;
11416   REPLACE_HYPOTF=0;
11417   REPLACE_HYPOTL=0;
11418   REPLACE_ILOGB=0;
11419   REPLACE_ILOGBF=0;
11420   REPLACE_ISFINITE=0;
11421   REPLACE_ISINF=0;
11422   REPLACE_ISNAN=0;
11423   REPLACE_LDEXPL=0;
11424   REPLACE_LOG=0;
11425   REPLACE_LOGF=0;
11426   REPLACE_LOGL=0;
11427   REPLACE_LOG10=0;
11428   REPLACE_LOG10F=0;
11429   REPLACE_LOG10L=0;
11430   REPLACE_LOG1P=0;
11431   REPLACE_LOG1PF=0;
11432   REPLACE_LOG1PL=0;
11433   REPLACE_LOG2=0;
11434   REPLACE_LOG2F=0;
11435   REPLACE_LOG2L=0;
11436   REPLACE_LOGB=0;
11437   REPLACE_LOGBF=0;
11438   REPLACE_LOGBL=0;
11439   REPLACE_MODF=0;
11440   REPLACE_MODFF=0;
11441   REPLACE_MODFL=0;
11442   REPLACE_NAN=0;
11443   REPLACE_REMAINDER=0;
11444   REPLACE_REMAINDERF=0;
11445   REPLACE_REMAINDERL=0;
11446   REPLACE_ROUND=0;
11447   REPLACE_ROUNDF=0;
11448   REPLACE_ROUNDL=0;
11449   REPLACE_SIGNBIT=0;
11450   REPLACE_SIGNBIT_USING_GCC=0;
11451   REPLACE_SQRTL=0;
11452   REPLACE_TRUNC=0;
11453   REPLACE_TRUNCF=0;
11454   REPLACE_TRUNCL=0;
11455
11456
11457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
11458 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
11459 if ${gl_cv_func_frexp_no_libm+:} false; then :
11460   $as_echo_n "(cached) " >&6
11461 else
11462
11463       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11464 /* end confdefs.h.  */
11465 #include <math.h>
11466              double x;
11467 int
11468 main ()
11469 {
11470 int e; return frexp (x, &e) > 0;
11471   ;
11472   return 0;
11473 }
11474 _ACEOF
11475 if ac_fn_c_try_link "$LINENO"; then :
11476   gl_cv_func_frexp_no_libm=yes
11477 else
11478   gl_cv_func_frexp_no_libm=no
11479 fi
11480 rm -f core conftest.err conftest.$ac_objext \
11481     conftest$ac_exeext conftest.$ac_ext
11482
11483 fi
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
11485 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
11486
11487 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
11488 if test "x$ac_cv_have_decl_alarm" = xyes; then :
11489   ac_have_decl=1
11490 else
11491   ac_have_decl=0
11492 fi
11493
11494 cat >>confdefs.h <<_ACEOF
11495 #define HAVE_DECL_ALARM $ac_have_decl
11496 _ACEOF
11497
11498
11499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
11500 $as_echo_n "checking whether long double and double are the same... " >&6; }
11501 if ${gl_cv_long_double_equals_double+:} false; then :
11502   $as_echo_n "(cached) " >&6
11503 else
11504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11505 /* end confdefs.h.  */
11506 #include <float.h>
11507 int
11508 main ()
11509 {
11510 typedef int check[sizeof (long double) == sizeof (double)
11511                               && LDBL_MANT_DIG == DBL_MANT_DIG
11512                               && LDBL_MAX_EXP == DBL_MAX_EXP
11513                               && LDBL_MIN_EXP == DBL_MIN_EXP
11514                               ? 1 : -1];
11515
11516   ;
11517   return 0;
11518 }
11519 _ACEOF
11520 if ac_fn_c_try_compile "$LINENO"; then :
11521   gl_cv_long_double_equals_double=yes
11522 else
11523   gl_cv_long_double_equals_double=no
11524 fi
11525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11526
11527 fi
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
11529 $as_echo "$gl_cv_long_double_equals_double" >&6; }
11530   if test $gl_cv_long_double_equals_double = yes; then
11531
11532 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
11533
11534     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
11535   else
11536     HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
11537   fi
11538
11539
11540
11541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11542 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11543 if ${gl_cv_var_stdin_large_offset+:} false; then :
11544   $as_echo_n "(cached) " >&6
11545 else
11546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11547 /* end confdefs.h.  */
11548 #include <stdio.h>
11549 int
11550 main ()
11551 {
11552 #if defined __SL64 && defined __SCLE /* cygwin */
11553   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11554      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
11555      it is easier to do a version check than building a runtime test.  */
11556 # include <cygwin/version.h>
11557 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11558   choke me
11559 # endif
11560 #endif
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 if ac_fn_c_try_link "$LINENO"; then :
11566   gl_cv_var_stdin_large_offset=yes
11567 else
11568   gl_cv_var_stdin_large_offset=no
11569 fi
11570 rm -f core conftest.err conftest.$ac_objext \
11571     conftest$ac_exeext conftest.$ac_ext
11572 fi
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11574 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11575
11576
11577
11578
11579
11580   case "$host_os" in
11581     mingw*)
11582                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11583 $as_echo_n "checking for 64-bit off_t... " >&6; }
11584 if ${gl_cv_type_off_t_64+:} false; then :
11585   $as_echo_n "(cached) " >&6
11586 else
11587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11588 /* end confdefs.h.  */
11589 #include <sys/types.h>
11590                 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11591
11592 int
11593 main ()
11594 {
11595
11596   ;
11597   return 0;
11598 }
11599 _ACEOF
11600 if ac_fn_c_try_compile "$LINENO"; then :
11601   gl_cv_type_off_t_64=yes
11602 else
11603   gl_cv_type_off_t_64=no
11604 fi
11605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11606
11607 fi
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11609 $as_echo "$gl_cv_type_off_t_64" >&6; }
11610       if test $gl_cv_type_off_t_64 = no; then
11611         WINDOWS_64_BIT_OFF_T=1
11612       else
11613         WINDOWS_64_BIT_OFF_T=0
11614       fi
11615                   WINDOWS_64_BIT_ST_SIZE=1
11616       ;;
11617     *)
11618                                                       WINDOWS_64_BIT_OFF_T=0
11619       WINDOWS_64_BIT_ST_SIZE=0
11620       ;;
11621   esac
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639      if test $gl_cv_have_include_next = yes; then
11640        gl_cv_next_sys_types_h='<'sys/types.h'>'
11641      else
11642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
11643 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
11644 if ${gl_cv_next_sys_types_h+:} false; then :
11645   $as_echo_n "(cached) " >&6
11646 else
11647
11648                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h.  */
11650 #include <sys/types.h>
11651
11652 _ACEOF
11653                                                                                                                         case "$host_os" in
11654                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11655                  *)    gl_absname_cpp="$ac_cpp" ;;
11656                esac
11657
11658                case "$host_os" in
11659                  mingw*)
11660                                                                                                                                      gl_dirsep_regex='[/\\]'
11661                    ;;
11662                  *)
11663                    gl_dirsep_regex='\/'
11664                    ;;
11665                esac
11666                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11667
11668                gl_header_literal_regex=`echo 'sys/types.h' \
11669                                         | sed -e "$gl_make_literal_regex_sed"`
11670                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11671                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11672                    s|^/[^/]|//&|
11673                    p
11674                    q
11675                  }'
11676                                                             gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11677                       sed -n "$gl_absolute_header_sed"`'"'
11678
11679
11680 fi
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
11682 $as_echo "$gl_cv_next_sys_types_h" >&6; }
11683      fi
11684      NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
11685
11686      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11687        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11688        gl_next_as_first_directive='<'sys/types.h'>'
11689      else
11690        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11691        gl_next_as_first_directive=$gl_cv_next_sys_types_h
11692      fi
11693      NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
11706 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
11707   ac_have_decl=1
11708 else
11709   ac_have_decl=0
11710 fi
11711
11712 cat >>confdefs.h <<_ACEOF
11713 #define HAVE_DECL_FSEEKO $ac_have_decl
11714 _ACEOF
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11725 $as_echo_n "checking for fseeko... " >&6; }
11726 if ${gl_cv_func_fseeko+:} false; then :
11727   $as_echo_n "(cached) " >&6
11728 else
11729
11730       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731 /* end confdefs.h.  */
11732 #include <stdio.h>
11733
11734 int
11735 main ()
11736 {
11737 fseeko (stdin, 0, 0);
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 if ac_fn_c_try_link "$LINENO"; then :
11743   gl_cv_func_fseeko=yes
11744 else
11745   gl_cv_func_fseeko=no
11746 fi
11747 rm -f core conftest.err conftest.$ac_objext \
11748     conftest$ac_exeext conftest.$ac_ext
11749
11750 fi
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11752 $as_echo "$gl_cv_func_fseeko" >&6; }
11753
11754
11755   if test $ac_cv_have_decl_fseeko = no; then
11756     HAVE_DECL_FSEEKO=0
11757   fi
11758
11759   if test $gl_cv_func_fseeko = no; then
11760     HAVE_FSEEKO=0
11761   else
11762     if test $WINDOWS_64_BIT_OFF_T = 1; then
11763       REPLACE_FSEEKO=1
11764     fi
11765     if test $gl_cv_var_stdin_large_offset = no; then
11766       REPLACE_FSEEKO=1
11767     fi
11768
11769
11770
11771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
11772 $as_echo_n "checking whether fflush works on input streams... " >&6; }
11773 if ${gl_cv_func_fflush_stdin+:} false; then :
11774   $as_echo_n "(cached) " >&6
11775 else
11776   echo hello world > conftest.txt
11777      if test "$cross_compiling" = yes; then :
11778   gl_cv_func_fflush_stdin=cross
11779 else
11780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h.  */
11782
11783 #include <stdio.h>
11784 #if HAVE_UNISTD_H
11785 # include <unistd.h>
11786 #else /* on Windows with MSVC */
11787 # include <io.h>
11788 #endif
11789
11790 int
11791 main ()
11792 {
11793 FILE *f = fopen ("conftest.txt", "r");
11794          char buffer[10];
11795          int fd;
11796          int c;
11797          if (f == NULL)
11798            return 1;
11799          fd = fileno (f);
11800          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
11801            return 2;
11802          /* For deterministic results, ensure f read a bigger buffer.  */
11803          if (lseek (fd, 0, SEEK_CUR) == 5)
11804            return 3;
11805          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
11806             on BSD systems and on mingw.  */
11807          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
11808            return 4;
11809          if (lseek (fd, 0, SEEK_CUR) != 5)
11810            return 5;
11811          /* Verify behaviour of fflush after ungetc. See
11812             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
11813          /* Verify behaviour of fflush after a backup ungetc.  This fails on
11814             mingw.  */
11815          c = fgetc (f);
11816          ungetc (c, f);
11817          fflush (f);
11818          if (fgetc (f) != c)
11819            return 6;
11820          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
11821             on glibc 2.8 and on BSD systems.  */
11822          c = fgetc (f);
11823          ungetc ('@', f);
11824          fflush (f);
11825          if (fgetc (f) != c)
11826            return 7;
11827          return 0;
11828
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 if ac_fn_c_try_run "$LINENO"; then :
11834   gl_cv_func_fflush_stdin=yes
11835 else
11836   gl_cv_func_fflush_stdin=no
11837 fi
11838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11839   conftest.$ac_objext conftest.beam conftest.$ac_ext
11840 fi
11841
11842      rm conftest.txt
11843
11844 fi
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
11846 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
11847   case $gl_cv_func_fflush_stdin in
11848     yes) gl_func_fflush_stdin=1 ;;
11849     no)  gl_func_fflush_stdin=0 ;;
11850     *)   gl_func_fflush_stdin='(-1)' ;;
11851   esac
11852
11853 cat >>confdefs.h <<_ACEOF
11854 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
11855 _ACEOF
11856
11857
11858       if test $gl_cv_func_fflush_stdin != yes; then
11859         REPLACE_FSEEKO=1
11860       fi
11861
11862   fi
11863
11864
11865      GNULIB_FCHMODAT=0;
11866   GNULIB_FSTAT=0;
11867   GNULIB_FSTATAT=0;
11868   GNULIB_FUTIMENS=0;
11869   GNULIB_LCHMOD=0;
11870   GNULIB_LSTAT=0;
11871   GNULIB_MKDIRAT=0;
11872   GNULIB_MKFIFO=0;
11873   GNULIB_MKFIFOAT=0;
11874   GNULIB_MKNOD=0;
11875   GNULIB_MKNODAT=0;
11876   GNULIB_STAT=0;
11877   GNULIB_UTIMENSAT=0;
11878     HAVE_FCHMODAT=1;
11879   HAVE_FSTATAT=1;
11880   HAVE_FUTIMENS=1;
11881   HAVE_LCHMOD=1;
11882   HAVE_LSTAT=1;
11883   HAVE_MKDIRAT=1;
11884   HAVE_MKFIFO=1;
11885   HAVE_MKFIFOAT=1;
11886   HAVE_MKNOD=1;
11887   HAVE_MKNODAT=1;
11888   HAVE_UTIMENSAT=1;
11889   REPLACE_FSTAT=0;
11890   REPLACE_FSTATAT=0;
11891   REPLACE_FUTIMENS=0;
11892   REPLACE_LSTAT=0;
11893   REPLACE_MKDIR=0;
11894   REPLACE_MKFIFO=0;
11895   REPLACE_MKNOD=0;
11896   REPLACE_STAT=0;
11897   REPLACE_UTIMENSAT=0;
11898
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11900 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11901 if ${ac_cv_header_stat_broken+:} false; then :
11902   $as_echo_n "(cached) " >&6
11903 else
11904   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905 /* end confdefs.h.  */
11906 #include <sys/types.h>
11907 #include <sys/stat.h>
11908
11909 #if defined S_ISBLK && defined S_IFDIR
11910 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11911 #endif
11912
11913 #if defined S_ISBLK && defined S_IFCHR
11914 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11915 #endif
11916
11917 #if defined S_ISLNK && defined S_IFREG
11918 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11919 #endif
11920
11921 #if defined S_ISSOCK && defined S_IFREG
11922 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11923 #endif
11924
11925 _ACEOF
11926 if ac_fn_c_try_compile "$LINENO"; then :
11927   ac_cv_header_stat_broken=no
11928 else
11929   ac_cv_header_stat_broken=yes
11930 fi
11931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11932 fi
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11934 $as_echo "$ac_cv_header_stat_broken" >&6; }
11935 if test $ac_cv_header_stat_broken = yes; then
11936
11937 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11938
11939 fi
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957      if test $gl_cv_have_include_next = yes; then
11958        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11959      else
11960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11961 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11962 if ${gl_cv_next_sys_stat_h+:} false; then :
11963   $as_echo_n "(cached) " >&6
11964 else
11965
11966              if test $ac_cv_header_sys_stat_h = yes; then
11967
11968
11969                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11970 /* end confdefs.h.  */
11971 #include <sys/stat.h>
11972
11973 _ACEOF
11974                                                                                                                         case "$host_os" in
11975                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
11976                  *)    gl_absname_cpp="$ac_cpp" ;;
11977                esac
11978
11979                case "$host_os" in
11980                  mingw*)
11981                                                                                                                                      gl_dirsep_regex='[/\\]'
11982                    ;;
11983                  *)
11984                    gl_dirsep_regex='\/'
11985                    ;;
11986                esac
11987                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11988
11989                gl_header_literal_regex=`echo 'sys/stat.h' \
11990                                         | sed -e "$gl_make_literal_regex_sed"`
11991                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11992                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11993                    s|^/[^/]|//&|
11994                    p
11995                    q
11996                  }'
11997                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11998                       sed -n "$gl_absolute_header_sed"`'"'
11999           else
12000                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12001              fi
12002
12003
12004 fi
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12006 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
12007      fi
12008      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12009
12010      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12011        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12012        gl_next_as_first_directive='<'sys/stat.h'>'
12013      else
12014        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12015        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12016      fi
12017      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12030
12031 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12032
12033   fi
12034
12035       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12036      #include <sys/stat.h>
12037 "
12038 if test "x$ac_cv_type_nlink_t" = xyes; then :
12039
12040 else
12041
12042 $as_echo "#define nlink_t int" >>confdefs.h
12043
12044 fi
12045
12046
12047
12048
12049 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12050 if test "x$ac_cv_have_decl_ftello" = xyes; then :
12051   ac_have_decl=1
12052 else
12053   ac_have_decl=0
12054 fi
12055
12056 cat >>confdefs.h <<_ACEOF
12057 #define HAVE_DECL_FTELLO $ac_have_decl
12058 _ACEOF
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069   if test $ac_cv_have_decl_ftello = no; then
12070     HAVE_DECL_FTELLO=0
12071   fi
12072
12073   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12074 $as_echo_n "checking for ftello... " >&6; }
12075 if ${gl_cv_func_ftello+:} false; then :
12076   $as_echo_n "(cached) " >&6
12077 else
12078
12079       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080 /* end confdefs.h.  */
12081 #include <stdio.h>
12082 int
12083 main ()
12084 {
12085 ftello (stdin);
12086   ;
12087   return 0;
12088 }
12089 _ACEOF
12090 if ac_fn_c_try_link "$LINENO"; then :
12091   gl_cv_func_ftello=yes
12092 else
12093   gl_cv_func_ftello=no
12094 fi
12095 rm -f core conftest.err conftest.$ac_objext \
12096     conftest$ac_exeext conftest.$ac_ext
12097
12098 fi
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12100 $as_echo "$gl_cv_func_ftello" >&6; }
12101   if test $gl_cv_func_ftello = no; then
12102     HAVE_FTELLO=0
12103   else
12104     if test $WINDOWS_64_BIT_OFF_T = 1; then
12105       REPLACE_FTELLO=1
12106     fi
12107     if test $gl_cv_var_stdin_large_offset = no; then
12108       REPLACE_FTELLO=1
12109     fi
12110     if test $REPLACE_FTELLO = 0; then
12111
12112       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12113 $as_echo_n "checking whether ftello works... " >&6; }
12114 if ${gl_cv_func_ftello_works+:} false; then :
12115   $as_echo_n "(cached) " >&6
12116 else
12117
12118                               case "$host_os" in
12119                       # Guess no on Solaris.
12120             solaris*) gl_cv_func_ftello_works="guessing no" ;;
12121                       # Guess yes otherwise.
12122             *)        gl_cv_func_ftello_works="guessing yes" ;;
12123           esac
12124           if test "$cross_compiling" = yes; then :
12125   :
12126 else
12127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128 /* end confdefs.h.  */
12129
12130 #include <stdio.h>
12131 #include <stdlib.h>
12132 #include <string.h>
12133 #define TESTFILE "conftest.tmp"
12134 int
12135 main (void)
12136 {
12137   FILE *fp;
12138
12139   /* Create a file with some contents.  */
12140   fp = fopen (TESTFILE, "w");
12141   if (fp == NULL)
12142     return 70;
12143   if (fwrite ("foogarsh", 1, 8, fp) < 8)
12144     return 71;
12145   if (fclose (fp))
12146     return 72;
12147
12148   /* The file's contents is now "foogarsh".  */
12149
12150   /* Try writing after reading to EOF.  */
12151   fp = fopen (TESTFILE, "r+");
12152   if (fp == NULL)
12153     return 73;
12154   if (fseek (fp, -1, SEEK_END))
12155     return 74;
12156   if (!(getc (fp) == 'h'))
12157     return 1;
12158   if (!(getc (fp) == EOF))
12159     return 2;
12160   if (!(ftell (fp) == 8))
12161     return 3;
12162   if (!(ftell (fp) == 8))
12163     return 4;
12164   if (!(putc ('!', fp) == '!'))
12165     return 5;
12166   if (!(ftell (fp) == 9))
12167     return 6;
12168   if (!(fclose (fp) == 0))
12169     return 7;
12170   fp = fopen (TESTFILE, "r");
12171   if (fp == NULL)
12172     return 75;
12173   {
12174     char buf[10];
12175     if (!(fread (buf, 1, 10, fp) == 9))
12176       return 10;
12177     if (!(memcmp (buf, "foogarsh!", 9) == 0))
12178       return 11;
12179   }
12180   if (!(fclose (fp) == 0))
12181     return 12;
12182
12183   /* The file's contents is now "foogarsh!".  */
12184
12185   return 0;
12186 }
12187 _ACEOF
12188 if ac_fn_c_try_run "$LINENO"; then :
12189   gl_cv_func_ftello_works=yes
12190 else
12191   gl_cv_func_ftello_works=no
12192 fi
12193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12194   conftest.$ac_objext conftest.beam conftest.$ac_ext
12195 fi
12196
12197
12198 fi
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12200 $as_echo "$gl_cv_func_ftello_works" >&6; }
12201       case "$gl_cv_func_ftello_works" in
12202         *yes) ;;
12203         *)
12204           REPLACE_FTELLO=1
12205
12206 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12207
12208           ;;
12209       esac
12210     fi
12211   fi
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230      if test $gl_cv_have_include_next = yes; then
12231        gl_cv_next_getopt_h='<'getopt.h'>'
12232      else
12233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
12234 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
12235 if ${gl_cv_next_getopt_h+:} false; then :
12236   $as_echo_n "(cached) " >&6
12237 else
12238
12239              if test $ac_cv_header_getopt_h = yes; then
12240
12241
12242                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243 /* end confdefs.h.  */
12244 #include <getopt.h>
12245
12246 _ACEOF
12247                                                                                                                         case "$host_os" in
12248                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12249                  *)    gl_absname_cpp="$ac_cpp" ;;
12250                esac
12251
12252                case "$host_os" in
12253                  mingw*)
12254                                                                                                                                      gl_dirsep_regex='[/\\]'
12255                    ;;
12256                  *)
12257                    gl_dirsep_regex='\/'
12258                    ;;
12259                esac
12260                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12261
12262                gl_header_literal_regex=`echo 'getopt.h' \
12263                                         | sed -e "$gl_make_literal_regex_sed"`
12264                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12265                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12266                    s|^/[^/]|//&|
12267                    p
12268                    q
12269                  }'
12270                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12271                       sed -n "$gl_absolute_header_sed"`'"'
12272           else
12273                gl_cv_next_getopt_h='<'getopt.h'>'
12274              fi
12275
12276
12277 fi
12278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
12279 $as_echo "$gl_cv_next_getopt_h" >&6; }
12280      fi
12281      NEXT_GETOPT_H=$gl_cv_next_getopt_h
12282
12283      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12284        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12285        gl_next_as_first_directive='<'getopt.h'>'
12286      else
12287        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12288        gl_next_as_first_directive=$gl_cv_next_getopt_h
12289      fi
12290      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
12291
12292
12293
12294
12295   if test $ac_cv_header_getopt_h = yes; then
12296     HAVE_GETOPT_H=1
12297   else
12298     HAVE_GETOPT_H=0
12299   fi
12300
12301
12302   gl_replace_getopt=
12303
12304     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12305     for ac_header in getopt.h
12306 do :
12307   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12308 if test "x$ac_cv_header_getopt_h" = xyes; then :
12309   cat >>confdefs.h <<_ACEOF
12310 #define HAVE_GETOPT_H 1
12311 _ACEOF
12312
12313 else
12314   gl_replace_getopt=yes
12315 fi
12316
12317 done
12318
12319   fi
12320
12321     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12322     for ac_func in getopt_long_only
12323 do :
12324   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12325 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
12326   cat >>confdefs.h <<_ACEOF
12327 #define HAVE_GETOPT_LONG_ONLY 1
12328 _ACEOF
12329
12330 else
12331   gl_replace_getopt=yes
12332 fi
12333 done
12334
12335   fi
12336
12337           if test -z "$gl_replace_getopt"; then
12338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
12339 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
12340 if ${gl_cv_func_getopt_posix+:} false; then :
12341   $as_echo_n "(cached) " >&6
12342 else
12343
12344                                                 if test $cross_compiling = no; then
12345                               if test "$cross_compiling" = yes; then :
12346   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12347 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12348 as_fn_error $? "cannot run test program while cross compiling
12349 See \`config.log' for more details" "$LINENO" 5; }
12350 else
12351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352 /* end confdefs.h.  */
12353
12354 #include <unistd.h>
12355 #include <stdlib.h>
12356 #include <string.h>
12357
12358 int
12359 main ()
12360 {
12361   static char program[] = "program";
12362   static char a[] = "-a";
12363   static char foo[] = "foo";
12364   static char bar[] = "bar";
12365   char *argv[] = { program, a, foo, bar, NULL };
12366   int c;
12367
12368   c = getopt (4, argv, "ab");
12369   if (!(c == 'a'))
12370     return 1;
12371   c = getopt (4, argv, "ab");
12372   if (!(c == -1))
12373     return 2;
12374   if (!(optind == 2))
12375     return 3;
12376   return 0;
12377 }
12378
12379 _ACEOF
12380 if ac_fn_c_try_run "$LINENO"; then :
12381   gl_cv_func_getopt_posix=maybe
12382 else
12383   gl_cv_func_getopt_posix=no
12384 fi
12385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12386   conftest.$ac_objext conftest.beam conftest.$ac_ext
12387 fi
12388
12389           if test $gl_cv_func_getopt_posix = maybe; then
12390                                     if test "$cross_compiling" = yes; then :
12391   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12393 as_fn_error $? "cannot run test program while cross compiling
12394 See \`config.log' for more details" "$LINENO" 5; }
12395 else
12396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397 /* end confdefs.h.  */
12398
12399 #include <unistd.h>
12400 #include <stdlib.h>
12401 #include <string.h>
12402
12403 int
12404 main ()
12405 {
12406   static char program[] = "program";
12407   static char donald[] = "donald";
12408   static char p[] = "-p";
12409   static char billy[] = "billy";
12410   static char duck[] = "duck";
12411   static char a[] = "-a";
12412   static char bar[] = "bar";
12413   char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
12414   int c;
12415
12416   c = getopt (7, argv, "+abp:q:");
12417   if (!(c == -1))
12418     return 4;
12419   if (!(strcmp (argv[0], "program") == 0))
12420     return 5;
12421   if (!(strcmp (argv[1], "donald") == 0))
12422     return 6;
12423   if (!(strcmp (argv[2], "-p") == 0))
12424     return 7;
12425   if (!(strcmp (argv[3], "billy") == 0))
12426     return 8;
12427   if (!(strcmp (argv[4], "duck") == 0))
12428     return 9;
12429   if (!(strcmp (argv[5], "-a") == 0))
12430     return 10;
12431   if (!(strcmp (argv[6], "bar") == 0))
12432     return 11;
12433   if (!(optind == 1))
12434     return 12;
12435   return 0;
12436 }
12437
12438 _ACEOF
12439 if ac_fn_c_try_run "$LINENO"; then :
12440   gl_cv_func_getopt_posix=maybe
12441 else
12442   gl_cv_func_getopt_posix=no
12443 fi
12444 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12445   conftest.$ac_objext conftest.beam conftest.$ac_ext
12446 fi
12447
12448           fi
12449           if test $gl_cv_func_getopt_posix = maybe; then
12450                         if test "$cross_compiling" = yes; then :
12451   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12452 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12453 as_fn_error $? "cannot run test program while cross compiling
12454 See \`config.log' for more details" "$LINENO" 5; }
12455 else
12456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457 /* end confdefs.h.  */
12458
12459 #include <unistd.h>
12460 #include <stdlib.h>
12461 #include <string.h>
12462
12463 int
12464 main ()
12465 {
12466   static char program[] = "program";
12467   static char ab[] = "-ab";
12468   char *argv[3] = { program, ab, NULL };
12469   if (getopt (2, argv, "ab:") != 'a')
12470     return 13;
12471   if (getopt (2, argv, "ab:") != '?')
12472     return 14;
12473   if (optopt != 'b')
12474     return 15;
12475   if (optind != 2)
12476     return 16;
12477   return 0;
12478 }
12479
12480 _ACEOF
12481 if ac_fn_c_try_run "$LINENO"; then :
12482   gl_cv_func_getopt_posix=yes
12483 else
12484   gl_cv_func_getopt_posix=no
12485 fi
12486 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12487   conftest.$ac_objext conftest.beam conftest.$ac_ext
12488 fi
12489
12490           fi
12491         else
12492           case "$host_os" in
12493             darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
12494             *)                       gl_cv_func_getopt_posix="guessing yes";;
12495           esac
12496         fi
12497
12498 fi
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
12500 $as_echo "$gl_cv_func_getopt_posix" >&6; }
12501     case "$gl_cv_func_getopt_posix" in
12502       *no) gl_replace_getopt=yes ;;
12503     esac
12504   fi
12505
12506   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
12507     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12508 $as_echo_n "checking for working GNU getopt function... " >&6; }
12509 if ${gl_cv_func_getopt_gnu+:} false; then :
12510   $as_echo_n "(cached) " >&6
12511 else
12512   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
12513        # optstring is necessary for programs like m4 that have POSIX-mandated
12514        # semantics for supporting options interspersed with files.
12515        # Also, since getopt_long is a GNU extension, we require optind=0.
12516        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
12517        # so take care to revert to the correct (non-)export state.
12518        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
12519        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
12520          xx) gl_had_POSIXLY_CORRECT=exported ;;
12521          x)  gl_had_POSIXLY_CORRECT=yes      ;;
12522          *)  gl_had_POSIXLY_CORRECT=         ;;
12523        esac
12524        POSIXLY_CORRECT=1
12525        export POSIXLY_CORRECT
12526        if test "$cross_compiling" = yes; then :
12527            gl_cv_func_getopt_gnu="guessing no"
12528
12529 else
12530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531 /* end confdefs.h.  */
12532 #include <getopt.h>
12533                            #include <stddef.h>
12534                            #include <string.h>
12535
12536 #include <stdlib.h>
12537 #if defined __MACH__ && defined __APPLE__
12538 /* Avoid a crash on Mac OS X.  */
12539 #include <mach/mach.h>
12540 #include <mach/mach_error.h>
12541 #include <mach/thread_status.h>
12542 #include <mach/exception.h>
12543 #include <mach/task.h>
12544 #include <pthread.h>
12545 /* The exception port on which our thread listens.  */
12546 static mach_port_t our_exception_port;
12547 /* The main function of the thread listening for exceptions of type
12548    EXC_BAD_ACCESS.  */
12549 static void *
12550 mach_exception_thread (void *arg)
12551 {
12552   /* Buffer for a message to be received.  */
12553   struct {
12554     mach_msg_header_t head;
12555     mach_msg_body_t msgh_body;
12556     char data[1024];
12557   } msg;
12558   mach_msg_return_t retval;
12559   /* Wait for a message on the exception port.  */
12560   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
12561                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
12562   if (retval != MACH_MSG_SUCCESS)
12563     abort ();
12564   exit (1);
12565 }
12566 static void
12567 nocrash_init (void)
12568 {
12569   mach_port_t self = mach_task_self ();
12570   /* Allocate a port on which the thread shall listen for exceptions.  */
12571   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
12572       == KERN_SUCCESS) {
12573     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
12574     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
12575                                 MACH_MSG_TYPE_MAKE_SEND)
12576         == KERN_SUCCESS) {
12577       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
12578          for us.  */
12579       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
12580       /* Create the thread listening on the exception port.  */
12581       pthread_attr_t attr;
12582       pthread_t thread;
12583       if (pthread_attr_init (&attr) == 0
12584           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
12585           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
12586         pthread_attr_destroy (&attr);
12587         /* Replace the exception port info for these exceptions with our own.
12588            Note that we replace the exception port for the entire task, not only
12589            for a particular thread.  This has the effect that when our exception
12590            port gets the message, the thread specific exception port has already
12591            been asked, and we don't need to bother about it.
12592            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
12593         task_set_exception_ports (self, mask, our_exception_port,
12594                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
12595       }
12596     }
12597   }
12598 }
12599 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12600 /* Avoid a crash on native Windows.  */
12601 #define WIN32_LEAN_AND_MEAN
12602 #include <windows.h>
12603 #include <winerror.h>
12604 static LONG WINAPI
12605 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
12606 {
12607   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
12608     {
12609     case EXCEPTION_ACCESS_VIOLATION:
12610     case EXCEPTION_IN_PAGE_ERROR:
12611     case EXCEPTION_STACK_OVERFLOW:
12612     case EXCEPTION_GUARD_PAGE:
12613     case EXCEPTION_PRIV_INSTRUCTION:
12614     case EXCEPTION_ILLEGAL_INSTRUCTION:
12615     case EXCEPTION_DATATYPE_MISALIGNMENT:
12616     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
12617     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
12618       exit (1);
12619     }
12620   return EXCEPTION_CONTINUE_SEARCH;
12621 }
12622 static void
12623 nocrash_init (void)
12624 {
12625   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
12626 }
12627 #else
12628 /* Avoid a crash on POSIX systems.  */
12629 #include <signal.h>
12630 /* A POSIX signal handler.  */
12631 static void
12632 exception_handler (int sig)
12633 {
12634   exit (1);
12635 }
12636 static void
12637 nocrash_init (void)
12638 {
12639 #ifdef SIGSEGV
12640   signal (SIGSEGV, exception_handler);
12641 #endif
12642 #ifdef SIGBUS
12643   signal (SIGBUS, exception_handler);
12644 #endif
12645 }
12646 #endif
12647
12648
12649 int
12650 main ()
12651 {
12652
12653              int result = 0;
12654
12655              nocrash_init();
12656
12657              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
12658                 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
12659                 OSF/1 5.1, Solaris 10.  */
12660              {
12661                static char conftest[] = "conftest";
12662                static char plus[] = "-+";
12663                char *argv[3] = { conftest, plus, NULL };
12664                opterr = 0;
12665                if (getopt (2, argv, "+a") != '?')
12666                  result |= 1;
12667              }
12668              /* This code succeeds on glibc 2.8, mingw,
12669                 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
12670                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
12671              {
12672                static char program[] = "program";
12673                static char p[] = "-p";
12674                static char foo[] = "foo";
12675                static char bar[] = "bar";
12676                char *argv[] = { program, p, foo, bar, NULL };
12677
12678                optind = 1;
12679                if (getopt (4, argv, "p::") != 'p')
12680                  result |= 2;
12681                else if (optarg != NULL)
12682                  result |= 4;
12683                else if (getopt (4, argv, "p::") != -1)
12684                  result |= 6;
12685                else if (optind != 2)
12686                  result |= 8;
12687              }
12688              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
12689              {
12690                static char program[] = "program";
12691                static char foo[] = "foo";
12692                static char p[] = "-p";
12693                char *argv[] = { program, foo, p, NULL };
12694                optind = 0;
12695                if (getopt (3, argv, "-p") != 1)
12696                  result |= 16;
12697                else if (getopt (3, argv, "-p") != 'p')
12698                  result |= 16;
12699              }
12700              /* This code fails on glibc 2.11.  */
12701              {
12702                static char program[] = "program";
12703                static char b[] = "-b";
12704                static char a[] = "-a";
12705                char *argv[] = { program, b, a, NULL };
12706                optind = opterr = 0;
12707                if (getopt (3, argv, "+:a:b") != 'b')
12708                  result |= 32;
12709                else if (getopt (3, argv, "+:a:b") != ':')
12710                  result |= 32;
12711              }
12712              /* This code dumps core on glibc 2.14.  */
12713              {
12714                static char program[] = "program";
12715                static char w[] = "-W";
12716                static char dummy[] = "dummy";
12717                char *argv[] = { program, w, dummy, NULL };
12718                optind = opterr = 1;
12719                if (getopt (3, argv, "W;") != 'W')
12720                  result |= 64;
12721              }
12722              return result;
12723
12724   ;
12725   return 0;
12726 }
12727 _ACEOF
12728 if ac_fn_c_try_run "$LINENO"; then :
12729   gl_cv_func_getopt_gnu=yes
12730 else
12731   gl_cv_func_getopt_gnu=no
12732 fi
12733 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734   conftest.$ac_objext conftest.beam conftest.$ac_ext
12735 fi
12736
12737        case $gl_had_POSIXLY_CORRECT in
12738          exported) ;;
12739          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
12740          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
12741        esac
12742
12743 fi
12744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
12745 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
12746     if test "$gl_cv_func_getopt_gnu" != yes; then
12747       gl_replace_getopt=yes
12748     else
12749       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
12750 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
12751 if ${gl_cv_func_getopt_long_gnu+:} false; then :
12752   $as_echo_n "(cached) " >&6
12753 else
12754   if test "$cross_compiling" = yes; then :
12755               case "$host_os" in
12756               openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
12757               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
12758             esac
12759
12760 else
12761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762 /* end confdefs.h.  */
12763 #include <getopt.h>
12764                 #include <stddef.h>
12765                 #include <string.h>
12766
12767 int
12768 main ()
12769 {
12770 static const struct option long_options[] =
12771                   {
12772                     { "xtremely-",no_argument,       NULL, 1003 },
12773                     { "xtra",     no_argument,       NULL, 1001 },
12774                     { "xtreme",   no_argument,       NULL, 1002 },
12775                     { "xtremely", no_argument,       NULL, 1003 },
12776                     { NULL,       0,                 NULL, 0 }
12777                   };
12778                 /* This code fails on OpenBSD 5.0.  */
12779                 {
12780                   static char program[] = "program";
12781                   static char xtremel[] = "--xtremel";
12782                   char *argv[] = { program, xtremel, NULL };
12783                   int option_index;
12784                   optind = 1; opterr = 0;
12785                   if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
12786                     return 1;
12787                 }
12788                 return 0;
12789
12790   ;
12791   return 0;
12792 }
12793 _ACEOF
12794 if ac_fn_c_try_run "$LINENO"; then :
12795   gl_cv_func_getopt_long_gnu=yes
12796 else
12797   gl_cv_func_getopt_long_gnu=no
12798 fi
12799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12800   conftest.$ac_objext conftest.beam conftest.$ac_ext
12801 fi
12802
12803
12804 fi
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
12806 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
12807       case "$gl_cv_func_getopt_long_gnu" in
12808         *yes) ;;
12809         *) gl_replace_getopt=yes ;;
12810       esac
12811     fi
12812   fi
12813
12814
12815
12816
12817
12818
12819     REPLACE_GETOPT=0
12820     if test -n "$gl_replace_getopt"; then
12821       REPLACE_GETOPT=1
12822     fi
12823
12824   if test $REPLACE_GETOPT = 1; then
12825
12826   GETOPT_H=getopt.h
12827
12828 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12829
12830
12831
12832   fi
12833
12834 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12835 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12836   ac_have_decl=1
12837 else
12838   ac_have_decl=0
12839 fi
12840
12841 cat >>confdefs.h <<_ACEOF
12842 #define HAVE_DECL_GETENV $ac_have_decl
12843 _ACEOF
12844
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12846 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12847 if ${ac_cv_c_restrict+:} false; then :
12848   $as_echo_n "(cached) " >&6
12849 else
12850   ac_cv_c_restrict=no
12851    # The order here caters to the fact that C++ does not require restrict.
12852    for ac_kw in __restrict __restrict__ _Restrict restrict; do
12853      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854 /* end confdefs.h.  */
12855 typedef int * int_ptr;
12856         int foo (int_ptr $ac_kw ip) {
12857         return ip[0];
12858        }
12859 int
12860 main ()
12861 {
12862 int s[1];
12863         int * $ac_kw t = s;
12864         t[0] = 0;
12865         return foo(t)
12866   ;
12867   return 0;
12868 }
12869 _ACEOF
12870 if ac_fn_c_try_compile "$LINENO"; then :
12871   ac_cv_c_restrict=$ac_kw
12872 fi
12873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12874      test "$ac_cv_c_restrict" != no && break
12875    done
12876
12877 fi
12878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12879 $as_echo "$ac_cv_c_restrict" >&6; }
12880
12881  case $ac_cv_c_restrict in
12882    restrict) ;;
12883    no) $as_echo "#define restrict /**/" >>confdefs.h
12884  ;;
12885    *)  cat >>confdefs.h <<_ACEOF
12886 #define restrict $ac_cv_c_restrict
12887 _ACEOF
12888  ;;
12889  esac
12890
12891
12892   GNULIB_GETTIMEOFDAY=0;
12893     HAVE_GETTIMEOFDAY=1;
12894   HAVE_STRUCT_TIMEVAL=1;
12895   HAVE_SYS_TIME_H=1;
12896   REPLACE_GETTIMEOFDAY=0;
12897   REPLACE_STRUCT_TIMEVAL=0;
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914      if test $gl_cv_have_include_next = yes; then
12915        gl_cv_next_sys_time_h='<'sys/time.h'>'
12916      else
12917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12918 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12919 if ${gl_cv_next_sys_time_h+:} false; then :
12920   $as_echo_n "(cached) " >&6
12921 else
12922
12923              if test $ac_cv_header_sys_time_h = yes; then
12924
12925
12926                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12927 /* end confdefs.h.  */
12928 #include <sys/time.h>
12929
12930 _ACEOF
12931                                                                                                                         case "$host_os" in
12932                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
12933                  *)    gl_absname_cpp="$ac_cpp" ;;
12934                esac
12935
12936                case "$host_os" in
12937                  mingw*)
12938                                                                                                                                      gl_dirsep_regex='[/\\]'
12939                    ;;
12940                  *)
12941                    gl_dirsep_regex='\/'
12942                    ;;
12943                esac
12944                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12945
12946                gl_header_literal_regex=`echo 'sys/time.h' \
12947                                         | sed -e "$gl_make_literal_regex_sed"`
12948                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12949                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12950                    s|^/[^/]|//&|
12951                    p
12952                    q
12953                  }'
12954                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12955                       sed -n "$gl_absolute_header_sed"`'"'
12956           else
12957                gl_cv_next_sys_time_h='<'sys/time.h'>'
12958              fi
12959
12960
12961 fi
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12963 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12964      fi
12965      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12966
12967      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12968        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12969        gl_next_as_first_directive='<'sys/time.h'>'
12970      else
12971        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12972        gl_next_as_first_directive=$gl_cv_next_sys_time_h
12973      fi
12974      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12975
12976
12977
12978
12979
12980   if test $ac_cv_header_sys_time_h != yes; then
12981     HAVE_SYS_TIME_H=0
12982   fi
12983
12984
12985
12986
12987
12988   if test $ac_cv_header_sys_socket_h != yes; then
12989                     for ac_header in winsock2.h
12990 do :
12991   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12992 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12993   cat >>confdefs.h <<_ACEOF
12994 #define HAVE_WINSOCK2_H 1
12995 _ACEOF
12996
12997 fi
12998
12999 done
13000
13001   fi
13002   if test "$ac_cv_header_winsock2_h" = yes; then
13003     HAVE_WINSOCK2_H=1
13004     UNISTD_H_HAVE_WINSOCK2_H=1
13005     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13006   else
13007     HAVE_WINSOCK2_H=0
13008   fi
13009
13010
13011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13012 $as_echo_n "checking for struct timeval... " >&6; }
13013 if ${gl_cv_sys_struct_timeval+:} false; then :
13014   $as_echo_n "(cached) " >&6
13015 else
13016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13017 /* end confdefs.h.  */
13018 #if HAVE_SYS_TIME_H
13019              #include <sys/time.h>
13020             #endif
13021             #include <time.h>
13022             #if HAVE_WINSOCK2_H
13023             # include <winsock2.h>
13024             #endif
13025
13026 int
13027 main ()
13028 {
13029 static struct timeval x; x.tv_sec = x.tv_usec;
13030   ;
13031   return 0;
13032 }
13033 _ACEOF
13034 if ac_fn_c_try_compile "$LINENO"; then :
13035   gl_cv_sys_struct_timeval=yes
13036 else
13037   gl_cv_sys_struct_timeval=no
13038 fi
13039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13040
13041 fi
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
13043 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
13044   if test $gl_cv_sys_struct_timeval != yes; then
13045     HAVE_STRUCT_TIMEVAL=0
13046   else
13047                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
13048 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
13049 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
13050   $as_echo_n "(cached) " >&6
13051 else
13052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053 /* end confdefs.h.  */
13054 #if HAVE_SYS_TIME_H
13055                #include <sys/time.h>
13056               #endif
13057               #include <time.h>
13058               #if HAVE_WINSOCK2_H
13059               # include <winsock2.h>
13060               #endif
13061
13062 int
13063 main ()
13064 {
13065 static struct timeval x;
13066               typedef int verify_tv_sec_type[
13067                 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
13068               ];
13069
13070   ;
13071   return 0;
13072 }
13073 _ACEOF
13074 if ac_fn_c_try_compile "$LINENO"; then :
13075   gl_cv_sys_struct_timeval_tv_sec=yes
13076 else
13077   gl_cv_sys_struct_timeval_tv_sec=no
13078 fi
13079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13080
13081 fi
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
13083 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
13084     if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
13085       REPLACE_STRUCT_TIMEVAL=1
13086     fi
13087   fi
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13098 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13099 if ${gl_cv_cc_double_expbit0+:} false; then :
13100   $as_echo_n "(cached) " >&6
13101 else
13102
13103       if test "$cross_compiling" = yes; then :
13104
13105                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106 /* end confdefs.h.  */
13107
13108 #if defined arm || defined __arm || defined __arm__
13109   mixed_endianness
13110 #endif
13111
13112 _ACEOF
13113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13114   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13115   gl_cv_cc_double_expbit0="unknown"
13116 else
13117
13118                                                          :
13119 if ${ac_cv_c_bigendian+:} false; then :
13120   $as_echo_n "(cached) " >&6
13121 else
13122   ac_cv_c_bigendian=unknown
13123     # See if we're dealing with a universal compiler.
13124     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125 /* end confdefs.h.  */
13126 #ifndef __APPLE_CC__
13127                not a universal capable compiler
13128              #endif
13129              typedef int dummy;
13130
13131 _ACEOF
13132 if ac_fn_c_try_compile "$LINENO"; then :
13133
13134         # Check for potential -arch flags.  It is not universal unless
13135         # there are at least two -arch flags with different values.
13136         ac_arch=
13137         ac_prev=
13138         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13139          if test -n "$ac_prev"; then
13140            case $ac_word in
13141              i?86 | x86_64 | ppc | ppc64)
13142                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13143                  ac_arch=$ac_word
13144                else
13145                  ac_cv_c_bigendian=universal
13146                  break
13147                fi
13148                ;;
13149            esac
13150            ac_prev=
13151          elif test "x$ac_word" = "x-arch"; then
13152            ac_prev=arch
13153          fi
13154        done
13155 fi
13156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13157     if test $ac_cv_c_bigendian = unknown; then
13158       # See if sys/param.h defines the BYTE_ORDER macro.
13159       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160 /* end confdefs.h.  */
13161 #include <sys/types.h>
13162              #include <sys/param.h>
13163
13164 int
13165 main ()
13166 {
13167 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13168                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13169                      && LITTLE_ENDIAN)
13170               bogus endian macros
13171              #endif
13172
13173   ;
13174   return 0;
13175 }
13176 _ACEOF
13177 if ac_fn_c_try_compile "$LINENO"; then :
13178   # It does; now see whether it defined to BIG_ENDIAN or not.
13179          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13180 /* end confdefs.h.  */
13181 #include <sys/types.h>
13182                 #include <sys/param.h>
13183
13184 int
13185 main ()
13186 {
13187 #if BYTE_ORDER != BIG_ENDIAN
13188                  not big endian
13189                 #endif
13190
13191   ;
13192   return 0;
13193 }
13194 _ACEOF
13195 if ac_fn_c_try_compile "$LINENO"; then :
13196   ac_cv_c_bigendian=yes
13197 else
13198   ac_cv_c_bigendian=no
13199 fi
13200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201 fi
13202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13203     fi
13204     if test $ac_cv_c_bigendian = unknown; then
13205       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13206       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h.  */
13208 #include <limits.h>
13209
13210 int
13211 main ()
13212 {
13213 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13214               bogus endian macros
13215              #endif
13216
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 if ac_fn_c_try_compile "$LINENO"; then :
13222   # It does; now see whether it defined to _BIG_ENDIAN or not.
13223          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224 /* end confdefs.h.  */
13225 #include <limits.h>
13226
13227 int
13228 main ()
13229 {
13230 #ifndef _BIG_ENDIAN
13231                  not big endian
13232                 #endif
13233
13234   ;
13235   return 0;
13236 }
13237 _ACEOF
13238 if ac_fn_c_try_compile "$LINENO"; then :
13239   ac_cv_c_bigendian=yes
13240 else
13241   ac_cv_c_bigendian=no
13242 fi
13243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13244 fi
13245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13246     fi
13247     if test $ac_cv_c_bigendian = unknown; then
13248       # Compile a test program.
13249       if test "$cross_compiling" = yes; then :
13250   # Try to guess by grepping values from an object file.
13251          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h.  */
13253 short int ascii_mm[] =
13254                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13255                 short int ascii_ii[] =
13256                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13257                 int use_ascii (int i) {
13258                   return ascii_mm[i] + ascii_ii[i];
13259                 }
13260                 short int ebcdic_ii[] =
13261                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13262                 short int ebcdic_mm[] =
13263                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13264                 int use_ebcdic (int i) {
13265                   return ebcdic_mm[i] + ebcdic_ii[i];
13266                 }
13267                 extern int foo;
13268
13269 int
13270 main ()
13271 {
13272 return use_ascii (foo) == use_ebcdic (foo);
13273   ;
13274   return 0;
13275 }
13276 _ACEOF
13277 if ac_fn_c_try_compile "$LINENO"; then :
13278   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13279               ac_cv_c_bigendian=yes
13280             fi
13281             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13282               if test "$ac_cv_c_bigendian" = unknown; then
13283                 ac_cv_c_bigendian=no
13284               else
13285                 # finding both strings is unlikely to happen, but who knows?
13286                 ac_cv_c_bigendian=unknown
13287               fi
13288             fi
13289 fi
13290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13291 else
13292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13293 /* end confdefs.h.  */
13294 $ac_includes_default
13295 int
13296 main ()
13297 {
13298
13299              /* Are we little or big endian?  From Harbison&Steele.  */
13300              union
13301              {
13302                long int l;
13303                char c[sizeof (long int)];
13304              } u;
13305              u.l = 1;
13306              return u.c[sizeof (long int) - 1] == 1;
13307
13308   ;
13309   return 0;
13310 }
13311 _ACEOF
13312 if ac_fn_c_try_run "$LINENO"; then :
13313   ac_cv_c_bigendian=no
13314 else
13315   ac_cv_c_bigendian=yes
13316 fi
13317 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13318   conftest.$ac_objext conftest.beam conftest.$ac_ext
13319 fi
13320
13321     fi
13322 fi
13323 :
13324  case $ac_cv_c_bigendian in #(
13325    yes)
13326      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13327    no)
13328      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13329    universal)
13330
13331 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13332
13333      ;; #(
13334    *)
13335      gl_cv_cc_double_expbit0="unknown" ;;
13336  esac
13337
13338
13339 fi
13340 rm -f conftest*
13341
13342
13343 else
13344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13345 /* end confdefs.h.  */
13346
13347 #include <float.h>
13348 #include <stddef.h>
13349 #include <stdio.h>
13350 #include <string.h>
13351 #define NWORDS \
13352   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13353 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13354 static unsigned int ored_words[NWORDS];
13355 static unsigned int anded_words[NWORDS];
13356 static void add_to_ored_words (double x)
13357 {
13358   memory_double m;
13359   size_t i;
13360   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
13361   memset (&m, 0, sizeof (memory_double));
13362   m.value = x;
13363   for (i = 0; i < NWORDS; i++)
13364     {
13365       ored_words[i] |= m.word[i];
13366       anded_words[i] &= m.word[i];
13367     }
13368 }
13369 int main ()
13370 {
13371   size_t j;
13372   FILE *fp = fopen ("conftest.out", "w");
13373   if (fp == NULL)
13374     return 1;
13375   for (j = 0; j < NWORDS; j++)
13376     anded_words[j] = ~ (unsigned int) 0;
13377   add_to_ored_words (0.25);
13378   add_to_ored_words (0.5);
13379   add_to_ored_words (1.0);
13380   add_to_ored_words (2.0);
13381   add_to_ored_words (4.0);
13382   /* Remove bits that are common (e.g. if representation of the first mantissa
13383      bit is explicit).  */
13384   for (j = 0; j < NWORDS; j++)
13385     ored_words[j] &= ~anded_words[j];
13386   /* Now find the nonzero word.  */
13387   for (j = 0; j < NWORDS; j++)
13388     if (ored_words[j] != 0)
13389       break;
13390   if (j < NWORDS)
13391     {
13392       size_t i;
13393       for (i = j + 1; i < NWORDS; i++)
13394         if (ored_words[i] != 0)
13395           {
13396             fprintf (fp, "unknown");
13397             return (fclose (fp) != 0);
13398           }
13399       for (i = 0; ; i++)
13400         if ((ored_words[j] >> i) & 1)
13401           {
13402             fprintf (fp, "word %d bit %d", (int) j, (int) i);
13403             return (fclose (fp) != 0);
13404           }
13405     }
13406   fprintf (fp, "unknown");
13407   return (fclose (fp) != 0);
13408 }
13409
13410 _ACEOF
13411 if ac_fn_c_try_run "$LINENO"; then :
13412   gl_cv_cc_double_expbit0=`cat conftest.out`
13413 else
13414   gl_cv_cc_double_expbit0="unknown"
13415 fi
13416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13417   conftest.$ac_objext conftest.beam conftest.$ac_ext
13418 fi
13419
13420       rm -f conftest.out
13421
13422 fi
13423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13424 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13425   case "$gl_cv_cc_double_expbit0" in
13426     word*bit*)
13427       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13428       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13429
13430 cat >>confdefs.h <<_ACEOF
13431 #define DBL_EXPBIT0_WORD $word
13432 _ACEOF
13433
13434
13435 cat >>confdefs.h <<_ACEOF
13436 #define DBL_EXPBIT0_BIT $bit
13437 _ACEOF
13438
13439       ;;
13440   esac
13441
13442
13443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
13444 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
13445 if ${gl_cv_cc_float_expbit0+:} false; then :
13446   $as_echo_n "(cached) " >&6
13447 else
13448
13449       if test "$cross_compiling" = yes; then :
13450   gl_cv_cc_float_expbit0="word 0 bit 23"
13451 else
13452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453 /* end confdefs.h.  */
13454
13455 #include <float.h>
13456 #include <stddef.h>
13457 #include <stdio.h>
13458 #include <string.h>
13459 #define NWORDS \
13460   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13461 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13462 static unsigned int ored_words[NWORDS];
13463 static unsigned int anded_words[NWORDS];
13464 static void add_to_ored_words (float x)
13465 {
13466   memory_float m;
13467   size_t i;
13468   /* Clear it first, in case
13469      sizeof (float) < sizeof (memory_float).  */
13470   memset (&m, 0, sizeof (memory_float));
13471   m.value = x;
13472   for (i = 0; i < NWORDS; i++)
13473     {
13474       ored_words[i] |= m.word[i];
13475       anded_words[i] &= m.word[i];
13476     }
13477 }
13478 int main ()
13479 {
13480   size_t j;
13481   FILE *fp = fopen ("conftest.out", "w");
13482   if (fp == NULL)
13483     return 1;
13484   for (j = 0; j < NWORDS; j++)
13485     anded_words[j] = ~ (unsigned int) 0;
13486   add_to_ored_words (0.25f);
13487   add_to_ored_words (0.5f);
13488   add_to_ored_words (1.0f);
13489   add_to_ored_words (2.0f);
13490   add_to_ored_words (4.0f);
13491   /* Remove bits that are common (e.g. if representation of the first mantissa
13492      bit is explicit).  */
13493   for (j = 0; j < NWORDS; j++)
13494     ored_words[j] &= ~anded_words[j];
13495   /* Now find the nonzero word.  */
13496   for (j = 0; j < NWORDS; j++)
13497     if (ored_words[j] != 0)
13498       break;
13499   if (j < NWORDS)
13500     {
13501       size_t i;
13502       for (i = j + 1; i < NWORDS; i++)
13503         if (ored_words[i] != 0)
13504           {
13505             fprintf (fp, "unknown");
13506             return (fclose (fp) != 0);
13507           }
13508       for (i = 0; ; i++)
13509         if ((ored_words[j] >> i) & 1)
13510           {
13511             fprintf (fp, "word %d bit %d", (int) j, (int) i);
13512             return (fclose (fp) != 0);
13513           }
13514     }
13515   fprintf (fp, "unknown");
13516   return (fclose (fp) != 0);
13517 }
13518
13519 _ACEOF
13520 if ac_fn_c_try_run "$LINENO"; then :
13521   gl_cv_cc_float_expbit0=`cat conftest.out`
13522 else
13523   gl_cv_cc_float_expbit0="unknown"
13524 fi
13525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13526   conftest.$ac_objext conftest.beam conftest.$ac_ext
13527 fi
13528
13529       rm -f conftest.out
13530
13531 fi
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13533 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
13534   case "$gl_cv_cc_float_expbit0" in
13535     word*bit*)
13536       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13537       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13538
13539 cat >>confdefs.h <<_ACEOF
13540 #define FLT_EXPBIT0_WORD $word
13541 _ACEOF
13542
13543
13544 cat >>confdefs.h <<_ACEOF
13545 #define FLT_EXPBIT0_BIT $bit
13546 _ACEOF
13547
13548       ;;
13549   esac
13550
13551
13552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13553 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13554 if ${ac_cv_c_bigendian+:} false; then :
13555   $as_echo_n "(cached) " >&6
13556 else
13557   ac_cv_c_bigendian=unknown
13558     # See if we're dealing with a universal compiler.
13559     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13560 /* end confdefs.h.  */
13561 #ifndef __APPLE_CC__
13562                not a universal capable compiler
13563              #endif
13564              typedef int dummy;
13565
13566 _ACEOF
13567 if ac_fn_c_try_compile "$LINENO"; then :
13568
13569         # Check for potential -arch flags.  It is not universal unless
13570         # there are at least two -arch flags with different values.
13571         ac_arch=
13572         ac_prev=
13573         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13574          if test -n "$ac_prev"; then
13575            case $ac_word in
13576              i?86 | x86_64 | ppc | ppc64)
13577                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13578                  ac_arch=$ac_word
13579                else
13580                  ac_cv_c_bigendian=universal
13581                  break
13582                fi
13583                ;;
13584            esac
13585            ac_prev=
13586          elif test "x$ac_word" = "x-arch"; then
13587            ac_prev=arch
13588          fi
13589        done
13590 fi
13591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592     if test $ac_cv_c_bigendian = unknown; then
13593       # See if sys/param.h defines the BYTE_ORDER macro.
13594       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595 /* end confdefs.h.  */
13596 #include <sys/types.h>
13597              #include <sys/param.h>
13598
13599 int
13600 main ()
13601 {
13602 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13603                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13604                      && LITTLE_ENDIAN)
13605               bogus endian macros
13606              #endif
13607
13608   ;
13609   return 0;
13610 }
13611 _ACEOF
13612 if ac_fn_c_try_compile "$LINENO"; then :
13613   # It does; now see whether it defined to BIG_ENDIAN or not.
13614          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13615 /* end confdefs.h.  */
13616 #include <sys/types.h>
13617                 #include <sys/param.h>
13618
13619 int
13620 main ()
13621 {
13622 #if BYTE_ORDER != BIG_ENDIAN
13623                  not big endian
13624                 #endif
13625
13626   ;
13627   return 0;
13628 }
13629 _ACEOF
13630 if ac_fn_c_try_compile "$LINENO"; then :
13631   ac_cv_c_bigendian=yes
13632 else
13633   ac_cv_c_bigendian=no
13634 fi
13635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13636 fi
13637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13638     fi
13639     if test $ac_cv_c_bigendian = unknown; then
13640       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13641       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642 /* end confdefs.h.  */
13643 #include <limits.h>
13644
13645 int
13646 main ()
13647 {
13648 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13649               bogus endian macros
13650              #endif
13651
13652   ;
13653   return 0;
13654 }
13655 _ACEOF
13656 if ac_fn_c_try_compile "$LINENO"; then :
13657   # It does; now see whether it defined to _BIG_ENDIAN or not.
13658          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659 /* end confdefs.h.  */
13660 #include <limits.h>
13661
13662 int
13663 main ()
13664 {
13665 #ifndef _BIG_ENDIAN
13666                  not big endian
13667                 #endif
13668
13669   ;
13670   return 0;
13671 }
13672 _ACEOF
13673 if ac_fn_c_try_compile "$LINENO"; then :
13674   ac_cv_c_bigendian=yes
13675 else
13676   ac_cv_c_bigendian=no
13677 fi
13678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13679 fi
13680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13681     fi
13682     if test $ac_cv_c_bigendian = unknown; then
13683       # Compile a test program.
13684       if test "$cross_compiling" = yes; then :
13685   # Try to guess by grepping values from an object file.
13686          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687 /* end confdefs.h.  */
13688 short int ascii_mm[] =
13689                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13690                 short int ascii_ii[] =
13691                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13692                 int use_ascii (int i) {
13693                   return ascii_mm[i] + ascii_ii[i];
13694                 }
13695                 short int ebcdic_ii[] =
13696                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13697                 short int ebcdic_mm[] =
13698                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13699                 int use_ebcdic (int i) {
13700                   return ebcdic_mm[i] + ebcdic_ii[i];
13701                 }
13702                 extern int foo;
13703
13704 int
13705 main ()
13706 {
13707 return use_ascii (foo) == use_ebcdic (foo);
13708   ;
13709   return 0;
13710 }
13711 _ACEOF
13712 if ac_fn_c_try_compile "$LINENO"; then :
13713   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13714               ac_cv_c_bigendian=yes
13715             fi
13716             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13717               if test "$ac_cv_c_bigendian" = unknown; then
13718                 ac_cv_c_bigendian=no
13719               else
13720                 # finding both strings is unlikely to happen, but who knows?
13721                 ac_cv_c_bigendian=unknown
13722               fi
13723             fi
13724 fi
13725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13726 else
13727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13728 /* end confdefs.h.  */
13729 $ac_includes_default
13730 int
13731 main ()
13732 {
13733
13734              /* Are we little or big endian?  From Harbison&Steele.  */
13735              union
13736              {
13737                long int l;
13738                char c[sizeof (long int)];
13739              } u;
13740              u.l = 1;
13741              return u.c[sizeof (long int) - 1] == 1;
13742
13743   ;
13744   return 0;
13745 }
13746 _ACEOF
13747 if ac_fn_c_try_run "$LINENO"; then :
13748   ac_cv_c_bigendian=no
13749 else
13750   ac_cv_c_bigendian=yes
13751 fi
13752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13753   conftest.$ac_objext conftest.beam conftest.$ac_ext
13754 fi
13755
13756     fi
13757 fi
13758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13759 $as_echo "$ac_cv_c_bigendian" >&6; }
13760  case $ac_cv_c_bigendian in #(
13761    yes)
13762      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13763 ;; #(
13764    no)
13765       ;; #(
13766    universal)
13767
13768 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13769
13770      ;; #(
13771    *)
13772      as_fn_error $? "unknown endianness
13773  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13774  esac
13775
13776
13777
13778   GNULIB_NL_LANGINFO=0;
13779     HAVE_NL_LANGINFO=1;
13780   REPLACE_NL_LANGINFO=0;
13781
13782
13783
13784 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13785 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
13786   ac_have_decl=1
13787 else
13788   ac_have_decl=0
13789 fi
13790
13791 cat >>confdefs.h <<_ACEOF
13792 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13793 _ACEOF
13794
13795
13796     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13797 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13798 if ${ac_cv_gnu_library_2_1+:} false; then :
13799   $as_echo_n "(cached) " >&6
13800 else
13801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802 /* end confdefs.h.  */
13803
13804 #include <features.h>
13805 #ifdef __GNU_LIBRARY__
13806  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13807   Lucky GNU user
13808  #endif
13809 #endif
13810 #ifdef __UCLIBC__
13811  Lucky user
13812 #endif
13813
13814 _ACEOF
13815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13816   $EGREP "Lucky" >/dev/null 2>&1; then :
13817   ac_cv_gnu_library_2_1=yes
13818 else
13819   ac_cv_gnu_library_2_1=no
13820 fi
13821 rm -f conftest*
13822
13823
13824
13825 fi
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13827 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13828
13829     GLIBC21="$ac_cv_gnu_library_2_1"
13830
13831
13832
13833   GNULIB_LOCALECONV=0;
13834   GNULIB_SETLOCALE=0;
13835   GNULIB_DUPLOCALE=0;
13836     HAVE_DUPLOCALE=1;
13837   REPLACE_LOCALECONV=0;
13838   REPLACE_SETLOCALE=0;
13839   REPLACE_DUPLOCALE=0;
13840   REPLACE_STRUCT_LCONV=0;
13841
13842
13843     REPLACE_NULL=0;
13844   HAVE_WCHAR_T=1;
13845
13846
13847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13848 $as_echo_n "checking for wchar_t... " >&6; }
13849 if ${gt_cv_c_wchar_t+:} false; then :
13850   $as_echo_n "(cached) " >&6
13851 else
13852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13853 /* end confdefs.h.  */
13854 #include <stddef.h>
13855             wchar_t foo = (wchar_t)'\0';
13856 int
13857 main ()
13858 {
13859
13860   ;
13861   return 0;
13862 }
13863 _ACEOF
13864 if ac_fn_c_try_compile "$LINENO"; then :
13865   gt_cv_c_wchar_t=yes
13866 else
13867   gt_cv_c_wchar_t=no
13868 fi
13869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13870 fi
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13872 $as_echo "$gt_cv_c_wchar_t" >&6; }
13873   if test $gt_cv_c_wchar_t = yes; then
13874
13875 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13876
13877   fi
13878
13879
13880
13881
13882   STDDEF_H=
13883   if test $gt_cv_c_wchar_t = no; then
13884     HAVE_WCHAR_T=0
13885     STDDEF_H=stddef.h
13886   fi
13887   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13888 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13889 if ${gl_cv_decl_null_works+:} false; then :
13890   $as_echo_n "(cached) " >&6
13891 else
13892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h.  */
13894 #include <stddef.h>
13895       int test[2 * (sizeof NULL == sizeof (void *)) -1];
13896
13897 int
13898 main ()
13899 {
13900
13901   ;
13902   return 0;
13903 }
13904 _ACEOF
13905 if ac_fn_c_try_compile "$LINENO"; then :
13906   gl_cv_decl_null_works=yes
13907 else
13908   gl_cv_decl_null_works=no
13909 fi
13910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13911 fi
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13913 $as_echo "$gl_cv_decl_null_works" >&6; }
13914   if test $gl_cv_decl_null_works = no; then
13915     REPLACE_NULL=1
13916     STDDEF_H=stddef.h
13917   fi
13918
13919    if test -n "$STDDEF_H"; then
13920   GL_GENERATE_STDDEF_H_TRUE=
13921   GL_GENERATE_STDDEF_H_FALSE='#'
13922 else
13923   GL_GENERATE_STDDEF_H_TRUE='#'
13924   GL_GENERATE_STDDEF_H_FALSE=
13925 fi
13926
13927   if test -n "$STDDEF_H"; then
13928
13929
13930
13931
13932
13933
13934
13935
13936      if test $gl_cv_have_include_next = yes; then
13937        gl_cv_next_stddef_h='<'stddef.h'>'
13938      else
13939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13940 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13941 if ${gl_cv_next_stddef_h+:} false; then :
13942   $as_echo_n "(cached) " >&6
13943 else
13944
13945                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13946 /* end confdefs.h.  */
13947 #include <stddef.h>
13948
13949 _ACEOF
13950                                                                                                                         case "$host_os" in
13951                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13952                  *)    gl_absname_cpp="$ac_cpp" ;;
13953                esac
13954
13955                case "$host_os" in
13956                  mingw*)
13957                                                                                                                                      gl_dirsep_regex='[/\\]'
13958                    ;;
13959                  *)
13960                    gl_dirsep_regex='\/'
13961                    ;;
13962                esac
13963                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13964
13965                gl_header_literal_regex=`echo 'stddef.h' \
13966                                         | sed -e "$gl_make_literal_regex_sed"`
13967                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13968                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13969                    s|^/[^/]|//&|
13970                    p
13971                    q
13972                  }'
13973                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13974                       sed -n "$gl_absolute_header_sed"`'"'
13975
13976
13977 fi
13978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13979 $as_echo "$gl_cv_next_stddef_h" >&6; }
13980      fi
13981      NEXT_STDDEF_H=$gl_cv_next_stddef_h
13982
13983      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13984        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13985        gl_next_as_first_directive='<'stddef.h'>'
13986      else
13987        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13988        gl_next_as_first_directive=$gl_cv_next_stddef_h
13989      fi
13990      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13991
13992
13993
13994
13995   fi
13996
13997
13998
13999
14000
14001   gl_threads_api=none
14002   LIBTHREAD=
14003   LTLIBTHREAD=
14004   LIBMULTITHREAD=
14005   LTLIBMULTITHREAD=
14006   if test "$gl_use_threads" != no; then
14007         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14008 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14009 if ${gl_cv_have_weak+:} false; then :
14010   $as_echo_n "(cached) " >&6
14011 else
14012   gl_cv_have_weak=no
14013               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014 /* end confdefs.h.  */
14015 extern void xyzzy ();
14016 #pragma weak xyzzy
14017 int
14018 main ()
14019 {
14020 xyzzy();
14021   ;
14022   return 0;
14023 }
14024 _ACEOF
14025 if ac_fn_c_try_link "$LINENO"; then :
14026   gl_cv_have_weak=maybe
14027 fi
14028 rm -f core conftest.err conftest.$ac_objext \
14029     conftest$ac_exeext conftest.$ac_ext
14030        if test $gl_cv_have_weak = maybe; then
14031                            if test "$cross_compiling" = yes; then :
14032                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033 /* end confdefs.h.  */
14034 #ifdef __ELF__
14035                Extensible Linking Format
14036                #endif
14037
14038 _ACEOF
14039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14040   $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14041   gl_cv_have_weak="guessing yes"
14042 else
14043   gl_cv_have_weak="guessing no"
14044 fi
14045 rm -f conftest*
14046
14047
14048 else
14049   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14050 /* end confdefs.h.  */
14051
14052 #include <stdio.h>
14053 #pragma weak fputs
14054 int main ()
14055 {
14056   return (fputs == NULL);
14057 }
14058 _ACEOF
14059 if ac_fn_c_try_run "$LINENO"; then :
14060   gl_cv_have_weak=yes
14061 else
14062   gl_cv_have_weak=no
14063 fi
14064 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14065   conftest.$ac_objext conftest.beam conftest.$ac_ext
14066 fi
14067
14068        fi
14069
14070 fi
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14072 $as_echo "$gl_cv_have_weak" >&6; }
14073     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14074       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14075       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14076       ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14077 if test "x$ac_cv_header_pthread_h" = xyes; then :
14078   gl_have_pthread_h=yes
14079 else
14080   gl_have_pthread_h=no
14081 fi
14082
14083
14084       if test "$gl_have_pthread_h" = yes; then
14085         # Other possible tests:
14086         #   -lpthreads (FSU threads, PCthreads)
14087         #   -lgthreads
14088         gl_have_pthread=
14089         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14090         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14091         # the second one only in libpthread, and lock.c needs it.
14092         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14093 /* end confdefs.h.  */
14094 #include <pthread.h>
14095 int
14096 main ()
14097 {
14098 pthread_mutex_lock((pthread_mutex_t*)0);
14099                pthread_mutexattr_init((pthread_mutexattr_t*)0);
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 if ac_fn_c_try_link "$LINENO"; then :
14105   gl_have_pthread=yes
14106 fi
14107 rm -f core conftest.err conftest.$ac_objext \
14108     conftest$ac_exeext conftest.$ac_ext
14109         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14110         # since it is defined as a macro on OSF/1.)
14111         if test -n "$gl_have_pthread"; then
14112           # The program links fine without libpthread. But it may actually
14113           # need to link with libpthread in order to create multiple threads.
14114           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14115 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14116 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14117   $as_echo_n "(cached) " >&6
14118 else
14119   ac_check_lib_save_LIBS=$LIBS
14120 LIBS="-lpthread  $LIBS"
14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122 /* end confdefs.h.  */
14123
14124 /* Override any GCC internal prototype to avoid an error.
14125    Use char because int might match the return type of a GCC
14126    builtin and then its argument prototype would still apply.  */
14127 #ifdef __cplusplus
14128 extern "C"
14129 #endif
14130 char pthread_kill ();
14131 int
14132 main ()
14133 {
14134 return pthread_kill ();
14135   ;
14136   return 0;
14137 }
14138 _ACEOF
14139 if ac_fn_c_try_link "$LINENO"; then :
14140   ac_cv_lib_pthread_pthread_kill=yes
14141 else
14142   ac_cv_lib_pthread_pthread_kill=no
14143 fi
14144 rm -f core conftest.err conftest.$ac_objext \
14145     conftest$ac_exeext conftest.$ac_ext
14146 LIBS=$ac_check_lib_save_LIBS
14147 fi
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14149 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14150 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14151   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14152              # On Solaris and HP-UX, most pthread functions exist also in libc.
14153              # Therefore pthread_in_use() needs to actually try to create a
14154              # thread: pthread_create from libc will fail, whereas
14155              # pthread_create will actually create a thread.
14156              case "$host_os" in
14157                solaris* | hpux*)
14158
14159 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14160
14161              esac
14162
14163 fi
14164
14165         else
14166           # Some library is needed. Try libpthread and libc_r.
14167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14168 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14169 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14170   $as_echo_n "(cached) " >&6
14171 else
14172   ac_check_lib_save_LIBS=$LIBS
14173 LIBS="-lpthread  $LIBS"
14174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14175 /* end confdefs.h.  */
14176
14177 /* Override any GCC internal prototype to avoid an error.
14178    Use char because int might match the return type of a GCC
14179    builtin and then its argument prototype would still apply.  */
14180 #ifdef __cplusplus
14181 extern "C"
14182 #endif
14183 char pthread_kill ();
14184 int
14185 main ()
14186 {
14187 return pthread_kill ();
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 if ac_fn_c_try_link "$LINENO"; then :
14193   ac_cv_lib_pthread_pthread_kill=yes
14194 else
14195   ac_cv_lib_pthread_pthread_kill=no
14196 fi
14197 rm -f core conftest.err conftest.$ac_objext \
14198     conftest$ac_exeext conftest.$ac_ext
14199 LIBS=$ac_check_lib_save_LIBS
14200 fi
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14202 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14203 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14204   gl_have_pthread=yes
14205              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
14206              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14207 fi
14208
14209           if test -z "$gl_have_pthread"; then
14210             # For FreeBSD 4.
14211             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14212 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14213 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14214   $as_echo_n "(cached) " >&6
14215 else
14216   ac_check_lib_save_LIBS=$LIBS
14217 LIBS="-lc_r  $LIBS"
14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14219 /* end confdefs.h.  */
14220
14221 /* Override any GCC internal prototype to avoid an error.
14222    Use char because int might match the return type of a GCC
14223    builtin and then its argument prototype would still apply.  */
14224 #ifdef __cplusplus
14225 extern "C"
14226 #endif
14227 char pthread_kill ();
14228 int
14229 main ()
14230 {
14231 return pthread_kill ();
14232   ;
14233   return 0;
14234 }
14235 _ACEOF
14236 if ac_fn_c_try_link "$LINENO"; then :
14237   ac_cv_lib_c_r_pthread_kill=yes
14238 else
14239   ac_cv_lib_c_r_pthread_kill=no
14240 fi
14241 rm -f core conftest.err conftest.$ac_objext \
14242     conftest$ac_exeext conftest.$ac_ext
14243 LIBS=$ac_check_lib_save_LIBS
14244 fi
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14246 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14247 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14248   gl_have_pthread=yes
14249                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
14250                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
14251 fi
14252
14253           fi
14254         fi
14255         if test -n "$gl_have_pthread"; then
14256           gl_threads_api=posix
14257
14258 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14259
14260           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14261             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14262
14263 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14264
14265               LIBTHREAD=
14266               LTLIBTHREAD=
14267             fi
14268           fi
14269         fi
14270       fi
14271     fi
14272     if test -z "$gl_have_pthread"; then
14273       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
14274         gl_have_solaristhread=
14275         gl_save_LIBS="$LIBS"
14276         LIBS="$LIBS -lthread"
14277         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278 /* end confdefs.h.  */
14279
14280 #include <thread.h>
14281 #include <synch.h>
14282
14283 int
14284 main ()
14285 {
14286 thr_self();
14287   ;
14288   return 0;
14289 }
14290 _ACEOF
14291 if ac_fn_c_try_link "$LINENO"; then :
14292   gl_have_solaristhread=yes
14293 fi
14294 rm -f core conftest.err conftest.$ac_objext \
14295     conftest$ac_exeext conftest.$ac_ext
14296         LIBS="$gl_save_LIBS"
14297         if test -n "$gl_have_solaristhread"; then
14298           gl_threads_api=solaris
14299           LIBTHREAD=-lthread
14300           LTLIBTHREAD=-lthread
14301           LIBMULTITHREAD="$LIBTHREAD"
14302           LTLIBMULTITHREAD="$LTLIBTHREAD"
14303
14304 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
14305
14306           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14307
14308 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14309
14310             LIBTHREAD=
14311             LTLIBTHREAD=
14312           fi
14313         fi
14314       fi
14315     fi
14316     if test "$gl_use_threads" = pth; then
14317       gl_save_CPPFLAGS="$CPPFLAGS"
14318
14319
14320
14321
14322
14323   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
14324 $as_echo_n "checking how to link with libpth... " >&6; }
14325 if ${ac_cv_libpth_libs+:} false; then :
14326   $as_echo_n "(cached) " >&6
14327 else
14328
14329
14330
14331
14332
14333
14334
14335
14336     use_additional=yes
14337
14338   acl_save_prefix="$prefix"
14339   prefix="$acl_final_prefix"
14340   acl_save_exec_prefix="$exec_prefix"
14341   exec_prefix="$acl_final_exec_prefix"
14342
14343     eval additional_includedir=\"$includedir\"
14344     eval additional_libdir=\"$libdir\"
14345
14346   exec_prefix="$acl_save_exec_prefix"
14347   prefix="$acl_save_prefix"
14348
14349
14350 # Check whether --with-libpth-prefix was given.
14351 if test "${with_libpth_prefix+set}" = set; then :
14352   withval=$with_libpth_prefix;
14353     if test "X$withval" = "Xno"; then
14354       use_additional=no
14355     else
14356       if test "X$withval" = "X"; then
14357
14358   acl_save_prefix="$prefix"
14359   prefix="$acl_final_prefix"
14360   acl_save_exec_prefix="$exec_prefix"
14361   exec_prefix="$acl_final_exec_prefix"
14362
14363           eval additional_includedir=\"$includedir\"
14364           eval additional_libdir=\"$libdir\"
14365
14366   exec_prefix="$acl_save_exec_prefix"
14367   prefix="$acl_save_prefix"
14368
14369       else
14370         additional_includedir="$withval/include"
14371         additional_libdir="$withval/$acl_libdirstem"
14372         if test "$acl_libdirstem2" != "$acl_libdirstem" \
14373            && ! test -d "$withval/$acl_libdirstem"; then
14374           additional_libdir="$withval/$acl_libdirstem2"
14375         fi
14376       fi
14377     fi
14378
14379 fi
14380
14381       LIBPTH=
14382   LTLIBPTH=
14383   INCPTH=
14384   LIBPTH_PREFIX=
14385       HAVE_LIBPTH=
14386   rpathdirs=
14387   ltrpathdirs=
14388   names_already_handled=
14389   names_next_round='pth '
14390   while test -n "$names_next_round"; do
14391     names_this_round="$names_next_round"
14392     names_next_round=
14393     for name in $names_this_round; do
14394       already_handled=
14395       for n in $names_already_handled; do
14396         if test "$n" = "$name"; then
14397           already_handled=yes
14398           break
14399         fi
14400       done
14401       if test -z "$already_handled"; then
14402         names_already_handled="$names_already_handled $name"
14403                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
14404         eval value=\"\$HAVE_LIB$uppername\"
14405         if test -n "$value"; then
14406           if test "$value" = yes; then
14407             eval value=\"\$LIB$uppername\"
14408             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
14409             eval value=\"\$LTLIB$uppername\"
14410             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
14411           else
14412                                     :
14413           fi
14414         else
14415                               found_dir=
14416           found_la=
14417           found_so=
14418           found_a=
14419           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
14420           if test -n "$acl_shlibext"; then
14421             shrext=".$acl_shlibext"             # typically: shrext=.so
14422           else
14423             shrext=
14424           fi
14425           if test $use_additional = yes; then
14426             dir="$additional_libdir"
14427                                     if test -n "$acl_shlibext"; then
14428               if test -f "$dir/$libname$shrext"; then
14429                 found_dir="$dir"
14430                 found_so="$dir/$libname$shrext"
14431               else
14432                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14433                   ver=`(cd "$dir" && \
14434                         for f in "$libname$shrext".*; do echo "$f"; done \
14435                         | sed -e "s,^$libname$shrext\\\\.,," \
14436                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14437                         | sed 1q ) 2>/dev/null`
14438                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14439                     found_dir="$dir"
14440                     found_so="$dir/$libname$shrext.$ver"
14441                   fi
14442                 else
14443                   eval library_names=\"$acl_library_names_spec\"
14444                   for f in $library_names; do
14445                     if test -f "$dir/$f"; then
14446                       found_dir="$dir"
14447                       found_so="$dir/$f"
14448                       break
14449                     fi
14450                   done
14451                 fi
14452               fi
14453             fi
14454                         if test "X$found_dir" = "X"; then
14455               if test -f "$dir/$libname.$acl_libext"; then
14456                 found_dir="$dir"
14457                 found_a="$dir/$libname.$acl_libext"
14458               fi
14459             fi
14460             if test "X$found_dir" != "X"; then
14461               if test -f "$dir/$libname.la"; then
14462                 found_la="$dir/$libname.la"
14463               fi
14464             fi
14465           fi
14466           if test "X$found_dir" = "X"; then
14467             for x in $LDFLAGS $LTLIBPTH; do
14468
14469   acl_save_prefix="$prefix"
14470   prefix="$acl_final_prefix"
14471   acl_save_exec_prefix="$exec_prefix"
14472   exec_prefix="$acl_final_exec_prefix"
14473   eval x=\"$x\"
14474   exec_prefix="$acl_save_exec_prefix"
14475   prefix="$acl_save_prefix"
14476
14477               case "$x" in
14478                 -L*)
14479                   dir=`echo "X$x" | sed -e 's/^X-L//'`
14480                                     if test -n "$acl_shlibext"; then
14481                     if test -f "$dir/$libname$shrext"; then
14482                       found_dir="$dir"
14483                       found_so="$dir/$libname$shrext"
14484                     else
14485                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
14486                         ver=`(cd "$dir" && \
14487                               for f in "$libname$shrext".*; do echo "$f"; done \
14488                               | sed -e "s,^$libname$shrext\\\\.,," \
14489                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
14490                               | sed 1q ) 2>/dev/null`
14491                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
14492                           found_dir="$dir"
14493                           found_so="$dir/$libname$shrext.$ver"
14494                         fi
14495                       else
14496                         eval library_names=\"$acl_library_names_spec\"
14497                         for f in $library_names; do
14498                           if test -f "$dir/$f"; then
14499                             found_dir="$dir"
14500                             found_so="$dir/$f"
14501                             break
14502                           fi
14503                         done
14504                       fi
14505                     fi
14506                   fi
14507                                     if test "X$found_dir" = "X"; then
14508                     if test -f "$dir/$libname.$acl_libext"; then
14509                       found_dir="$dir"
14510                       found_a="$dir/$libname.$acl_libext"
14511                     fi
14512                   fi
14513                   if test "X$found_dir" != "X"; then
14514                     if test -f "$dir/$libname.la"; then
14515                       found_la="$dir/$libname.la"
14516                     fi
14517                   fi
14518                   ;;
14519               esac
14520               if test "X$found_dir" != "X"; then
14521                 break
14522               fi
14523             done
14524           fi
14525           if test "X$found_dir" != "X"; then
14526                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
14527             if test "X$found_so" != "X"; then
14528                                                         if test "$enable_rpath" = no \
14529                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
14530                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
14531                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14532               else
14533                                                                                 haveit=
14534                 for x in $ltrpathdirs; do
14535                   if test "X$x" = "X$found_dir"; then
14536                     haveit=yes
14537                     break
14538                   fi
14539                 done
14540                 if test -z "$haveit"; then
14541                   ltrpathdirs="$ltrpathdirs $found_dir"
14542                 fi
14543                                 if test "$acl_hardcode_direct" = yes; then
14544                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14545                 else
14546                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
14547                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14548                                                             haveit=
14549                     for x in $rpathdirs; do
14550                       if test "X$x" = "X$found_dir"; then
14551                         haveit=yes
14552                         break
14553                       fi
14554                     done
14555                     if test -z "$haveit"; then
14556                       rpathdirs="$rpathdirs $found_dir"
14557                     fi
14558                   else
14559                                                                                 haveit=
14560                     for x in $LDFLAGS $LIBPTH; do
14561
14562   acl_save_prefix="$prefix"
14563   prefix="$acl_final_prefix"
14564   acl_save_exec_prefix="$exec_prefix"
14565   exec_prefix="$acl_final_exec_prefix"
14566   eval x=\"$x\"
14567   exec_prefix="$acl_save_exec_prefix"
14568   prefix="$acl_save_prefix"
14569
14570                       if test "X$x" = "X-L$found_dir"; then
14571                         haveit=yes
14572                         break
14573                       fi
14574                     done
14575                     if test -z "$haveit"; then
14576                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
14577                     fi
14578                     if test "$acl_hardcode_minus_L" != no; then
14579                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
14580                     else
14581                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14582                     fi
14583                   fi
14584                 fi
14585               fi
14586             else
14587               if test "X$found_a" != "X"; then
14588                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
14589               else
14590                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
14591               fi
14592             fi
14593                         additional_includedir=
14594             case "$found_dir" in
14595               */$acl_libdirstem | */$acl_libdirstem/)
14596                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
14597                 if test "$name" = 'pth'; then
14598                   LIBPTH_PREFIX="$basedir"
14599                 fi
14600                 additional_includedir="$basedir/include"
14601                 ;;
14602               */$acl_libdirstem2 | */$acl_libdirstem2/)
14603                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
14604                 if test "$name" = 'pth'; then
14605                   LIBPTH_PREFIX="$basedir"
14606                 fi
14607                 additional_includedir="$basedir/include"
14608                 ;;
14609             esac
14610             if test "X$additional_includedir" != "X"; then
14611                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
14612                 haveit=
14613                 if test "X$additional_includedir" = "X/usr/local/include"; then
14614                   if test -n "$GCC"; then
14615                     case $host_os in
14616                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14617                     esac
14618                   fi
14619                 fi
14620                 if test -z "$haveit"; then
14621                   for x in $CPPFLAGS $INCPTH; do
14622
14623   acl_save_prefix="$prefix"
14624   prefix="$acl_final_prefix"
14625   acl_save_exec_prefix="$exec_prefix"
14626   exec_prefix="$acl_final_exec_prefix"
14627   eval x=\"$x\"
14628   exec_prefix="$acl_save_exec_prefix"
14629   prefix="$acl_save_prefix"
14630
14631                     if test "X$x" = "X-I$additional_includedir"; then
14632                       haveit=yes
14633                       break
14634                     fi
14635                   done
14636                   if test -z "$haveit"; then
14637                     if test -d "$additional_includedir"; then
14638                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
14639                     fi
14640                   fi
14641                 fi
14642               fi
14643             fi
14644                         if test -n "$found_la"; then
14645                                                         save_libdir="$libdir"
14646               case "$found_la" in
14647                 */* | *\\*) . "$found_la" ;;
14648                 *) . "./$found_la" ;;
14649               esac
14650               libdir="$save_libdir"
14651                             for dep in $dependency_libs; do
14652                 case "$dep" in
14653                   -L*)
14654                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14655                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
14656                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
14657                       haveit=
14658                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
14659                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
14660                         if test -n "$GCC"; then
14661                           case $host_os in
14662                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
14663                           esac
14664                         fi
14665                       fi
14666                       if test -z "$haveit"; then
14667                         haveit=
14668                         for x in $LDFLAGS $LIBPTH; do
14669
14670   acl_save_prefix="$prefix"
14671   prefix="$acl_final_prefix"
14672   acl_save_exec_prefix="$exec_prefix"
14673   exec_prefix="$acl_final_exec_prefix"
14674   eval x=\"$x\"
14675   exec_prefix="$acl_save_exec_prefix"
14676   prefix="$acl_save_prefix"
14677
14678                           if test "X$x" = "X-L$additional_libdir"; then
14679                             haveit=yes
14680                             break
14681                           fi
14682                         done
14683                         if test -z "$haveit"; then
14684                           if test -d "$additional_libdir"; then
14685                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
14686                           fi
14687                         fi
14688                         haveit=
14689                         for x in $LDFLAGS $LTLIBPTH; do
14690
14691   acl_save_prefix="$prefix"
14692   prefix="$acl_final_prefix"
14693   acl_save_exec_prefix="$exec_prefix"
14694   exec_prefix="$acl_final_exec_prefix"
14695   eval x=\"$x\"
14696   exec_prefix="$acl_save_exec_prefix"
14697   prefix="$acl_save_prefix"
14698
14699                           if test "X$x" = "X-L$additional_libdir"; then
14700                             haveit=yes
14701                             break
14702                           fi
14703                         done
14704                         if test -z "$haveit"; then
14705                           if test -d "$additional_libdir"; then
14706                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
14707                           fi
14708                         fi
14709                       fi
14710                     fi
14711                     ;;
14712                   -R*)
14713                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
14714                     if test "$enable_rpath" != no; then
14715                                                                   haveit=
14716                       for x in $rpathdirs; do
14717                         if test "X$x" = "X$dir"; then
14718                           haveit=yes
14719                           break
14720                         fi
14721                       done
14722                       if test -z "$haveit"; then
14723                         rpathdirs="$rpathdirs $dir"
14724                       fi
14725                                                                   haveit=
14726                       for x in $ltrpathdirs; do
14727                         if test "X$x" = "X$dir"; then
14728                           haveit=yes
14729                           break
14730                         fi
14731                       done
14732                       if test -z "$haveit"; then
14733                         ltrpathdirs="$ltrpathdirs $dir"
14734                       fi
14735                     fi
14736                     ;;
14737                   -l*)
14738                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14739                     ;;
14740                   *.la)
14741                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14742                     ;;
14743                   *)
14744                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
14745                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14746                     ;;
14747                 esac
14748               done
14749             fi
14750           else
14751                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14752             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14753           fi
14754         fi
14755       fi
14756     done
14757   done
14758   if test "X$rpathdirs" != "X"; then
14759     if test -n "$acl_hardcode_libdir_separator"; then
14760                         alldirs=
14761       for found_dir in $rpathdirs; do
14762         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14763       done
14764             acl_save_libdir="$libdir"
14765       libdir="$alldirs"
14766       eval flag=\"$acl_hardcode_libdir_flag_spec\"
14767       libdir="$acl_save_libdir"
14768       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14769     else
14770             for found_dir in $rpathdirs; do
14771         acl_save_libdir="$libdir"
14772         libdir="$found_dir"
14773         eval flag=\"$acl_hardcode_libdir_flag_spec\"
14774         libdir="$acl_save_libdir"
14775         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14776       done
14777     fi
14778   fi
14779   if test "X$ltrpathdirs" != "X"; then
14780             for found_dir in $ltrpathdirs; do
14781       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14782     done
14783   fi
14784
14785
14786
14787
14788
14789
14790     ac_cv_libpth_libs="$LIBPTH"
14791     ac_cv_libpth_ltlibs="$LTLIBPTH"
14792     ac_cv_libpth_cppflags="$INCPTH"
14793     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14794
14795 fi
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14797 $as_echo "$ac_cv_libpth_libs" >&6; }
14798   LIBPTH="$ac_cv_libpth_libs"
14799   LTLIBPTH="$ac_cv_libpth_ltlibs"
14800   INCPTH="$ac_cv_libpth_cppflags"
14801   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14802
14803   for element in $INCPTH; do
14804     haveit=
14805     for x in $CPPFLAGS; do
14806
14807   acl_save_prefix="$prefix"
14808   prefix="$acl_final_prefix"
14809   acl_save_exec_prefix="$exec_prefix"
14810   exec_prefix="$acl_final_exec_prefix"
14811   eval x=\"$x\"
14812   exec_prefix="$acl_save_exec_prefix"
14813   prefix="$acl_save_prefix"
14814
14815       if test "X$x" = "X$element"; then
14816         haveit=yes
14817         break
14818       fi
14819     done
14820     if test -z "$haveit"; then
14821       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14822     fi
14823   done
14824
14825
14826
14827
14828       HAVE_LIBPTH=yes
14829
14830
14831
14832       gl_have_pth=
14833       gl_save_LIBS="$LIBS"
14834       LIBS="$LIBS $LIBPTH"
14835       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14836 /* end confdefs.h.  */
14837 #include <pth.h>
14838 int
14839 main ()
14840 {
14841 pth_self();
14842   ;
14843   return 0;
14844 }
14845 _ACEOF
14846 if ac_fn_c_try_link "$LINENO"; then :
14847   gl_have_pth=yes
14848 fi
14849 rm -f core conftest.err conftest.$ac_objext \
14850     conftest$ac_exeext conftest.$ac_ext
14851       LIBS="$gl_save_LIBS"
14852       if test -n "$gl_have_pth"; then
14853         gl_threads_api=pth
14854         LIBTHREAD="$LIBPTH"
14855         LTLIBTHREAD="$LTLIBPTH"
14856         LIBMULTITHREAD="$LIBTHREAD"
14857         LTLIBMULTITHREAD="$LTLIBTHREAD"
14858
14859 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
14860
14861         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14862           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14863
14864 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14865
14866             LIBTHREAD=
14867             LTLIBTHREAD=
14868           fi
14869         fi
14870       else
14871         CPPFLAGS="$gl_save_CPPFLAGS"
14872       fi
14873     fi
14874     if test -z "$gl_have_pthread"; then
14875       case "$gl_use_threads" in
14876         yes | windows | win32) # The 'win32' is for backward compatibility.
14877           if { case "$host_os" in
14878                  mingw*) true;;
14879                  *) false;;
14880                esac
14881              }; then
14882             gl_threads_api=windows
14883
14884 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14885
14886           fi
14887           ;;
14888       esac
14889     fi
14890   fi
14891   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14892 $as_echo_n "checking for multithread API to use... " >&6; }
14893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14894 $as_echo "$gl_threads_api" >&6; }
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14908 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
14909 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
14910   $as_echo_n "(cached) " >&6
14911 else
14912   rm -f conftest.sym conftest.file
14913      echo >conftest.file
14914      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
14915        if test "$cross_compiling" = yes; then :
14916   case "$host_os" in
14917                     # Guess yes on glibc systems.
14918             *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14919                     # If we don't know, assume the worst.
14920             *)      gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14921           esac
14922
14923 else
14924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14925 /* end confdefs.h.  */
14926 $ac_includes_default
14927 int
14928 main ()
14929 {
14930 struct stat sbuf;
14931               /* Linux will dereference the symlink and fail, as required by
14932                  POSIX.  That is better in the sense that it means we will not
14933                  have to compile and use the lstat wrapper.  */
14934               return lstat ("conftest.sym/", &sbuf) == 0;
14935
14936   ;
14937   return 0;
14938 }
14939 _ACEOF
14940 if ac_fn_c_try_run "$LINENO"; then :
14941   gl_cv_func_lstat_dereferences_slashed_symlink=yes
14942 else
14943   gl_cv_func_lstat_dereferences_slashed_symlink=no
14944 fi
14945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14946   conftest.$ac_objext conftest.beam conftest.$ac_ext
14947 fi
14948
14949      else
14950        # If the 'ln -s' command failed, then we probably don't even
14951        # have an lstat function.
14952        gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
14953      fi
14954      rm -f conftest.sym conftest.file
14955
14956 fi
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14958 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14959   case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14960     *yes)
14961
14962 cat >>confdefs.h <<_ACEOF
14963 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
14964 _ACEOF
14965
14966       ;;
14967   esac
14968
14969
14970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14971 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14972 if ${gl_cv_func_malloc_posix+:} false; then :
14973   $as_echo_n "(cached) " >&6
14974 else
14975
14976                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14977 /* end confdefs.h.  */
14978
14979 int
14980 main ()
14981 {
14982 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
14983              choke me
14984              #endif
14985
14986   ;
14987   return 0;
14988 }
14989 _ACEOF
14990 if ac_fn_c_try_compile "$LINENO"; then :
14991   gl_cv_func_malloc_posix=yes
14992 else
14993   gl_cv_func_malloc_posix=no
14994 fi
14995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14996
14997 fi
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14999 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15000
15001
15002
15003       for ac_header in stdlib.h
15004 do :
15005   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15006 if test "x$ac_cv_header_stdlib_h" = xyes; then :
15007   cat >>confdefs.h <<_ACEOF
15008 #define HAVE_STDLIB_H 1
15009 _ACEOF
15010
15011 fi
15012
15013 done
15014
15015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15016 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15017 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15018   $as_echo_n "(cached) " >&6
15019 else
15020   if test "$cross_compiling" = yes; then :
15021   case "$host_os" in
15022           # Guess yes on platforms where we know the result.
15023           *-gnu* | freebsd* | netbsd* | openbsd* \
15024           | hpux* | solaris* | cygwin* | mingw*)
15025             ac_cv_func_malloc_0_nonnull=yes ;;
15026           # If we don't know, assume the worst.
15027           *) ac_cv_func_malloc_0_nonnull=no ;;
15028         esac
15029
15030 else
15031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15032 /* end confdefs.h.  */
15033 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15034             # include <stdlib.h>
15035             #else
15036             char *malloc ();
15037             #endif
15038
15039 int
15040 main ()
15041 {
15042 return ! malloc (0);
15043   ;
15044   return 0;
15045 }
15046
15047 _ACEOF
15048 if ac_fn_c_try_run "$LINENO"; then :
15049   ac_cv_func_malloc_0_nonnull=yes
15050 else
15051   ac_cv_func_malloc_0_nonnull=no
15052 fi
15053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15054   conftest.$ac_objext conftest.beam conftest.$ac_ext
15055 fi
15056
15057
15058 fi
15059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15060 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15061   if test $ac_cv_func_malloc_0_nonnull = yes; then :
15062   gl_cv_func_malloc_0_nonnull=1
15063 else
15064   gl_cv_func_malloc_0_nonnull=0
15065 fi
15066
15067
15068 cat >>confdefs.h <<_ACEOF
15069 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15070 _ACEOF
15071
15072
15073
15074
15075
15076
15077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15078 $as_echo_n "checking for mbstate_t... " >&6; }
15079 if ${ac_cv_type_mbstate_t+:} false; then :
15080   $as_echo_n "(cached) " >&6
15081 else
15082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15083 /* end confdefs.h.  */
15084 $ac_includes_default
15085 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15086    <wchar.h>.
15087    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15088    included before <wchar.h>.  */
15089 #include <stddef.h>
15090 #include <stdio.h>
15091 #include <time.h>
15092 #include <wchar.h>
15093 int
15094 main ()
15095 {
15096 mbstate_t x; return sizeof x;
15097   ;
15098   return 0;
15099 }
15100 _ACEOF
15101 if ac_fn_c_try_compile "$LINENO"; then :
15102   ac_cv_type_mbstate_t=yes
15103 else
15104   ac_cv_type_mbstate_t=no
15105 fi
15106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15107 fi
15108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15109 $as_echo "$ac_cv_type_mbstate_t" >&6; }
15110    if test $ac_cv_type_mbstate_t = yes; then
15111
15112 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15113
15114    else
15115
15116 $as_echo "#define mbstate_t int" >>confdefs.h
15117
15118    fi
15119
15120
15121
15122
15123
15124
15125
15126
15127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15128 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15129 if ${gt_cv_locale_ja+:} false; then :
15130   $as_echo_n "(cached) " >&6
15131 else
15132
15133     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15134 /* end confdefs.h.  */
15135
15136 #include <locale.h>
15137 #include <time.h>
15138 #if HAVE_LANGINFO_CODESET
15139 # include <langinfo.h>
15140 #endif
15141 #include <stdlib.h>
15142 #include <string.h>
15143 struct tm t;
15144 char buf[16];
15145 int main ()
15146 {
15147   const char *p;
15148   /* Check whether the given locale name is recognized by the system.  */
15149 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15150   /* On native Windows, setlocale(category, "") looks at the system settings,
15151      not at the environment variables.  Also, when an encoding suffix such
15152      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15153      category of the locale to "C".  */
15154   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15155       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15156     return 1;
15157 #else
15158   if (setlocale (LC_ALL, "") == NULL) return 1;
15159 #endif
15160   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15161      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15162      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15163      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15164      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15165      some unit tests fail.
15166      On MirBSD 10, when an unsupported locale is specified, setlocale()
15167      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15168 #if HAVE_LANGINFO_CODESET
15169   {
15170     const char *cs = nl_langinfo (CODESET);
15171     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15172         || strcmp (cs, "UTF-8") == 0)
15173       return 1;
15174   }
15175 #endif
15176 #ifdef __CYGWIN__
15177   /* On Cygwin, avoid locale names without encoding suffix, because the
15178      locale_charset() function relies on the encoding suffix.  Note that
15179      LC_ALL is set on the command line.  */
15180   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15181 #endif
15182   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
15183      on Cygwin 1.5.x.  */
15184   if (MB_CUR_MAX == 1)
15185     return 1;
15186   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15187      This excludes the UTF-8 encoding (except on MirBSD).  */
15188   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15189   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15190   for (p = buf; *p != '\0'; p++)
15191     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15192       return 1;
15193   return 0;
15194 }
15195
15196 _ACEOF
15197     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15198   (eval $ac_link) 2>&5
15199   ac_status=$?
15200   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15201   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15202       case "$host_os" in
15203         # Handle native Windows specially, because there setlocale() interprets
15204         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15205         # "fr" or "fra" as "French" or "French_France.1252",
15206         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15207         # "ja" as "Japanese" or "Japanese_Japan.932",
15208         # and similar.
15209         mingw*)
15210           # Note that on native Windows, the Japanese locale is
15211           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15212           # cannot use it here.
15213           gt_cv_locale_ja=none
15214           ;;
15215         *)
15216           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15217           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15218           # configure script would override the LC_ALL setting. Likewise for
15219           # LC_CTYPE, which is also set at the beginning of the configure script.
15220           # Test for the AIX locale name.
15221           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15222             gt_cv_locale_ja=ja_JP
15223           else
15224             # Test for the locale name with explicit encoding suffix.
15225             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15226               gt_cv_locale_ja=ja_JP.EUC-JP
15227             else
15228               # Test for the HP-UX, OSF/1, NetBSD locale name.
15229               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15230                 gt_cv_locale_ja=ja_JP.eucJP
15231               else
15232                 # Test for the IRIX, FreeBSD locale name.
15233                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15234                   gt_cv_locale_ja=ja_JP.EUC
15235                 else
15236                   # Test for the Solaris 7 locale name.
15237                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15238                     gt_cv_locale_ja=ja
15239                   else
15240                     # Special test for NetBSD 1.6.
15241                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15242                       gt_cv_locale_ja=ja_JP.eucJP
15243                     else
15244                       # None found.
15245                       gt_cv_locale_ja=none
15246                     fi
15247                   fi
15248                 fi
15249               fi
15250             fi
15251           fi
15252           ;;
15253       esac
15254     fi
15255     rm -fr conftest*
15256
15257 fi
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15259 $as_echo "$gt_cv_locale_ja" >&6; }
15260   LOCALE_JA=$gt_cv_locale_ja
15261
15262
15263
15264
15265
15266   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15267 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15268 if ${gt_cv_locale_zh_CN+:} false; then :
15269   $as_echo_n "(cached) " >&6
15270 else
15271
15272     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h.  */
15274
15275 #include <locale.h>
15276 #include <stdlib.h>
15277 #include <time.h>
15278 #if HAVE_LANGINFO_CODESET
15279 # include <langinfo.h>
15280 #endif
15281 #include <stdlib.h>
15282 #include <string.h>
15283 struct tm t;
15284 char buf[16];
15285 int main ()
15286 {
15287   const char *p;
15288   /* Check whether the given locale name is recognized by the system.  */
15289 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15290   /* On native Windows, setlocale(category, "") looks at the system settings,
15291      not at the environment variables.  Also, when an encoding suffix such
15292      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15293      category of the locale to "C".  */
15294   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15295       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15296     return 1;
15297 #else
15298   if (setlocale (LC_ALL, "") == NULL) return 1;
15299 #endif
15300   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15301      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15302      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15303      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15304      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15305      some unit tests fail.
15306      On MirBSD 10, when an unsupported locale is specified, setlocale()
15307      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
15308 #if HAVE_LANGINFO_CODESET
15309   {
15310     const char *cs = nl_langinfo (CODESET);
15311     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15312         || strcmp (cs, "UTF-8") == 0)
15313       return 1;
15314   }
15315 #endif
15316 #ifdef __CYGWIN__
15317   /* On Cygwin, avoid locale names without encoding suffix, because the
15318      locale_charset() function relies on the encoding suffix.  Note that
15319      LC_ALL is set on the command line.  */
15320   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15321 #endif
15322   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15323      This excludes the UTF-8 encoding (except on MirBSD).  */
15324   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15325   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15326   for (p = buf; *p != '\0'; p++)
15327     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15328       return 1;
15329   /* Check whether a typical GB18030 multibyte sequence is recognized as a
15330      single wide character.  This excludes the GB2312 and GBK encodings.  */
15331   if (mblen ("\203\062\332\066", 5) != 4)
15332     return 1;
15333   return 0;
15334 }
15335
15336 _ACEOF
15337     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15338   (eval $ac_link) 2>&5
15339   ac_status=$?
15340   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15341   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15342       case "$host_os" in
15343         # Handle native Windows specially, because there setlocale() interprets
15344         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15345         # "fr" or "fra" as "French" or "French_France.1252",
15346         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15347         # "ja" as "Japanese" or "Japanese_Japan.932",
15348         # and similar.
15349         mingw*)
15350           # Test for the hypothetical native Windows locale name.
15351           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15352             gt_cv_locale_zh_CN=Chinese_China.54936
15353           else
15354             # None found.
15355             gt_cv_locale_zh_CN=none
15356           fi
15357           ;;
15358         solaris2.8)
15359           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15360           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15361           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15362           gt_cv_locale_zh_CN=none
15363           ;;
15364         *)
15365           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15366           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15367           # configure script would override the LC_ALL setting. Likewise for
15368           # LC_CTYPE, which is also set at the beginning of the configure script.
15369           # Test for the locale name without encoding suffix.
15370           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15371             gt_cv_locale_zh_CN=zh_CN
15372           else
15373             # Test for the locale name with explicit encoding suffix.
15374             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15375               gt_cv_locale_zh_CN=zh_CN.GB18030
15376             else
15377               # None found.
15378               gt_cv_locale_zh_CN=none
15379             fi
15380           fi
15381           ;;
15382       esac
15383     else
15384       # If there was a link error, due to mblen(), the system is so old that
15385       # it certainly doesn't have a chinese locale.
15386       gt_cv_locale_zh_CN=none
15387     fi
15388     rm -fr conftest*
15389
15390 fi
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15392 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15393   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15394
15395
15396
15397
15398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15399 $as_echo_n "checking for a french Unicode locale... " >&6; }
15400 if ${gt_cv_locale_fr_utf8+:} false; then :
15401   $as_echo_n "(cached) " >&6
15402 else
15403
15404     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405 /* end confdefs.h.  */
15406
15407 #include <locale.h>
15408 #include <time.h>
15409 #if HAVE_LANGINFO_CODESET
15410 # include <langinfo.h>
15411 #endif
15412 #include <stdlib.h>
15413 #include <string.h>
15414 struct tm t;
15415 char buf[16];
15416 int main () {
15417   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
15418      imitates locale dependent behaviour by looking at the environment
15419      variables, and all locales use the UTF-8 encoding.  */
15420 #if !(defined __BEOS__ || defined __HAIKU__)
15421   /* Check whether the given locale name is recognized by the system.  */
15422 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15423   /* On native Windows, setlocale(category, "") looks at the system settings,
15424      not at the environment variables.  Also, when an encoding suffix such
15425      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15426      category of the locale to "C".  */
15427   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15428       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15429     return 1;
15430 # else
15431   if (setlocale (LC_ALL, "") == NULL) return 1;
15432 # endif
15433   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15434      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15435      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15436      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15437      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15438      some unit tests fail.  */
15439 # if HAVE_LANGINFO_CODESET
15440   {
15441     const char *cs = nl_langinfo (CODESET);
15442     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15443       return 1;
15444   }
15445 # endif
15446 # ifdef __CYGWIN__
15447   /* On Cygwin, avoid locale names without encoding suffix, because the
15448      locale_charset() function relies on the encoding suffix.  Note that
15449      LC_ALL is set on the command line.  */
15450   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15451 # endif
15452   /* Check whether in the abbreviation of the second month, the second
15453      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15454      two bytes long, with UTF-8 encoding.  */
15455   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15456   if (strftime (buf, sizeof (buf), "%b", &t) < 4
15457       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15458     return 1;
15459 #endif
15460 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
15461   /* Check whether the decimal separator is a comma.
15462      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15463      are nl_langinfo(RADIXCHAR) are both ".".  */
15464   if (localeconv () ->decimal_point[0] != ',') return 1;
15465 #endif
15466   return 0;
15467 }
15468
15469 _ACEOF
15470     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15471   (eval $ac_link) 2>&5
15472   ac_status=$?
15473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15474   test $ac_status = 0; } && test -s conftest$ac_exeext; then
15475       case "$host_os" in
15476         # Handle native Windows specially, because there setlocale() interprets
15477         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15478         # "fr" or "fra" as "French" or "French_France.1252",
15479         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15480         # "ja" as "Japanese" or "Japanese_Japan.932",
15481         # and similar.
15482         mingw*)
15483           # Test for the hypothetical native Windows locale name.
15484           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15485             gt_cv_locale_fr_utf8=French_France.65001
15486           else
15487             # None found.
15488             gt_cv_locale_fr_utf8=none
15489           fi
15490           ;;
15491         *)
15492           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15493           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15494           # configure script would override the LC_ALL setting. Likewise for
15495           # LC_CTYPE, which is also set at the beginning of the configure script.
15496           # Test for the usual locale name.
15497           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15498             gt_cv_locale_fr_utf8=fr_FR
15499           else
15500             # Test for the locale name with explicit encoding suffix.
15501             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15502               gt_cv_locale_fr_utf8=fr_FR.UTF-8
15503             else
15504               # Test for the Solaris 7 locale name.
15505               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15506                 gt_cv_locale_fr_utf8=fr.UTF-8
15507               else
15508                 # None found.
15509                 gt_cv_locale_fr_utf8=none
15510               fi
15511             fi
15512           fi
15513           ;;
15514       esac
15515     fi
15516     rm -fr conftest*
15517
15518 fi
15519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15520 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15521   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15522
15523
15524
15525
15526
15527
15528
15529   GNULIB_FFSL=0;
15530   GNULIB_FFSLL=0;
15531   GNULIB_MEMCHR=0;
15532   GNULIB_MEMMEM=0;
15533   GNULIB_MEMPCPY=0;
15534   GNULIB_MEMRCHR=0;
15535   GNULIB_RAWMEMCHR=0;
15536   GNULIB_STPCPY=0;
15537   GNULIB_STPNCPY=0;
15538   GNULIB_STRCHRNUL=0;
15539   GNULIB_STRDUP=0;
15540   GNULIB_STRNCAT=0;
15541   GNULIB_STRNDUP=0;
15542   GNULIB_STRNLEN=0;
15543   GNULIB_STRPBRK=0;
15544   GNULIB_STRSEP=0;
15545   GNULIB_STRSTR=0;
15546   GNULIB_STRCASESTR=0;
15547   GNULIB_STRTOK_R=0;
15548   GNULIB_MBSLEN=0;
15549   GNULIB_MBSNLEN=0;
15550   GNULIB_MBSCHR=0;
15551   GNULIB_MBSRCHR=0;
15552   GNULIB_MBSSTR=0;
15553   GNULIB_MBSCASECMP=0;
15554   GNULIB_MBSNCASECMP=0;
15555   GNULIB_MBSPCASECMP=0;
15556   GNULIB_MBSCASESTR=0;
15557   GNULIB_MBSCSPN=0;
15558   GNULIB_MBSPBRK=0;
15559   GNULIB_MBSSPN=0;
15560   GNULIB_MBSSEP=0;
15561   GNULIB_MBSTOK_R=0;
15562   GNULIB_STRERROR=0;
15563   GNULIB_STRERROR_R=0;
15564   GNULIB_STRSIGNAL=0;
15565   GNULIB_STRVERSCMP=0;
15566   HAVE_MBSLEN=0;
15567     HAVE_FFSL=1;
15568   HAVE_FFSLL=1;
15569   HAVE_MEMCHR=1;
15570   HAVE_DECL_MEMMEM=1;
15571   HAVE_MEMPCPY=1;
15572   HAVE_DECL_MEMRCHR=1;
15573   HAVE_RAWMEMCHR=1;
15574   HAVE_STPCPY=1;
15575   HAVE_STPNCPY=1;
15576   HAVE_STRCHRNUL=1;
15577   HAVE_DECL_STRDUP=1;
15578   HAVE_DECL_STRNDUP=1;
15579   HAVE_DECL_STRNLEN=1;
15580   HAVE_STRPBRK=1;
15581   HAVE_STRSEP=1;
15582   HAVE_STRCASESTR=1;
15583   HAVE_DECL_STRTOK_R=1;
15584   HAVE_DECL_STRERROR_R=1;
15585   HAVE_DECL_STRSIGNAL=1;
15586   HAVE_STRVERSCMP=1;
15587   REPLACE_MEMCHR=0;
15588   REPLACE_MEMMEM=0;
15589   REPLACE_STPNCPY=0;
15590   REPLACE_STRDUP=0;
15591   REPLACE_STRSTR=0;
15592   REPLACE_STRCASESTR=0;
15593   REPLACE_STRCHRNUL=0;
15594   REPLACE_STRERROR=0;
15595   REPLACE_STRERROR_R=0;
15596   REPLACE_STRNCAT=0;
15597   REPLACE_STRNDUP=0;
15598   REPLACE_STRNLEN=0;
15599   REPLACE_STRSIGNAL=0;
15600   REPLACE_STRTOK_R=0;
15601   UNDEFINE_STRTOK_R=0;
15602
15603
15604
15605
15606
15607   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15608   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15609   # irrelevant for anonymous mappings.
15610   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15611 if test "x$ac_cv_func_mmap" = xyes; then :
15612   gl_have_mmap=yes
15613 else
15614   gl_have_mmap=no
15615 fi
15616
15617
15618   # Try to allow MAP_ANONYMOUS.
15619   gl_have_mmap_anonymous=no
15620   if test $gl_have_mmap = yes; then
15621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15622 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15623     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624 /* end confdefs.h.  */
15625
15626 #include <sys/mman.h>
15627 #ifdef MAP_ANONYMOUS
15628     I cannot identify this map
15629 #endif
15630
15631 _ACEOF
15632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15633   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15634   gl_have_mmap_anonymous=yes
15635 fi
15636 rm -f conftest*
15637
15638     if test $gl_have_mmap_anonymous != yes; then
15639       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15640 /* end confdefs.h.  */
15641
15642 #include <sys/mman.h>
15643 #ifdef MAP_ANON
15644     I cannot identify this map
15645 #endif
15646
15647 _ACEOF
15648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15649   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15650
15651 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15652
15653          gl_have_mmap_anonymous=yes
15654 fi
15655 rm -f conftest*
15656
15657     fi
15658     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15659 $as_echo "$gl_have_mmap_anonymous" >&6; }
15660     if test $gl_have_mmap_anonymous = yes; then
15661
15662 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15663
15664     fi
15665   fi
15666
15667
15668
15669
15670
15671
15672   if test $HAVE_MEMCHR = 1; then
15673     # Detect platform-specific bugs in some versions of glibc:
15674     # memchr should not dereference anything with length 0
15675     #   http://bugzilla.redhat.com/499689
15676     # memchr should not dereference overestimated length after a match
15677     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15678     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15679     # Assume that memchr works on platforms that lack mprotect.
15680     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15681 $as_echo_n "checking whether memchr works... " >&6; }
15682 if ${gl_cv_func_memchr_works+:} false; then :
15683   $as_echo_n "(cached) " >&6
15684 else
15685   if test "$cross_compiling" = yes; then :
15686          gl_cv_func_memchr_works="guessing no"
15687 else
15688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15689 /* end confdefs.h.  */
15690
15691 #include <string.h>
15692 #if HAVE_SYS_MMAN_H
15693 # include <fcntl.h>
15694 # include <unistd.h>
15695 # include <sys/types.h>
15696 # include <sys/mman.h>
15697 # ifndef MAP_FILE
15698 #  define MAP_FILE 0
15699 # endif
15700 #endif
15701
15702 int
15703 main ()
15704 {
15705
15706   int result = 0;
15707   char *fence = NULL;
15708 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15709 # if HAVE_MAP_ANONYMOUS
15710   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15711   const int fd = -1;
15712 # else /* !HAVE_MAP_ANONYMOUS */
15713   const int flags = MAP_FILE | MAP_PRIVATE;
15714   int fd = open ("/dev/zero", O_RDONLY, 0666);
15715   if (fd >= 0)
15716 # endif
15717     {
15718       int pagesize = getpagesize ();
15719       char *two_pages =
15720         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15721                        flags, fd, 0);
15722       if (two_pages != (char *)(-1)
15723           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15724         fence = two_pages + pagesize;
15725     }
15726 #endif
15727   if (fence)
15728     {
15729       if (memchr (fence, 0, 0))
15730         result |= 1;
15731       strcpy (fence - 9, "12345678");
15732       if (memchr (fence - 9, 0, 79) != fence - 1)
15733         result |= 2;
15734       if (memchr (fence - 1, 0, 3) != fence - 1)
15735         result |= 4;
15736     }
15737   return result;
15738
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 if ac_fn_c_try_run "$LINENO"; then :
15744   gl_cv_func_memchr_works=yes
15745 else
15746   gl_cv_func_memchr_works=no
15747 fi
15748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15749   conftest.$ac_objext conftest.beam conftest.$ac_ext
15750 fi
15751
15752 fi
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15754 $as_echo "$gl_cv_func_memchr_works" >&6; }
15755     if test "$gl_cv_func_memchr_works" != yes; then
15756       REPLACE_MEMCHR=1
15757     fi
15758   fi
15759
15760
15761
15762
15763     gl_cv_c_multiarch=no
15764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15765 /* end confdefs.h.  */
15766 #ifndef __APPLE_CC__
15767          not a universal capable compiler
15768         #endif
15769         typedef int dummy;
15770
15771 _ACEOF
15772 if ac_fn_c_try_compile "$LINENO"; then :
15773
15774                arch=
15775      prev=
15776      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
15777        if test -n "$prev"; then
15778          case $word in
15779            i?86 | x86_64 | ppc | ppc64)
15780              if test -z "$arch" || test "$arch" = "$word"; then
15781                arch="$word"
15782              else
15783                gl_cv_c_multiarch=yes
15784              fi
15785              ;;
15786          esac
15787          prev=
15788        else
15789          if test "x$word" = "x-arch"; then
15790            prev=arch
15791          fi
15792        fi
15793      done
15794
15795 fi
15796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15797   if test $gl_cv_c_multiarch = yes; then
15798     APPLE_UNIVERSAL_BUILD=1
15799   else
15800     APPLE_UNIVERSAL_BUILD=0
15801   fi
15802
15803
15804
15805
15806
15807
15808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
15809 $as_echo_n "checking for promoted mode_t type... " >&6; }
15810 if ${gl_cv_promoted_mode_t+:} false; then :
15811   $as_echo_n "(cached) " >&6
15812 else
15813
15814                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15815 /* end confdefs.h.  */
15816 #include <sys/types.h>
15817 int
15818 main ()
15819 {
15820 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
15821   ;
15822   return 0;
15823 }
15824 _ACEOF
15825 if ac_fn_c_try_compile "$LINENO"; then :
15826   gl_cv_promoted_mode_t='int'
15827 else
15828   gl_cv_promoted_mode_t='mode_t'
15829 fi
15830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15831
15832 fi
15833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
15834 $as_echo "$gl_cv_promoted_mode_t" >&6; }
15835
15836 cat >>confdefs.h <<_ACEOF
15837 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
15838 _ACEOF
15839
15840
15841
15842
15843
15844   GNULIB_POSIX_SPAWN=0;
15845   GNULIB_POSIX_SPAWNP=0;
15846   GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
15847   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
15848   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
15849   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
15850   GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
15851   GNULIB_POSIX_SPAWNATTR_INIT=0;
15852   GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
15853   GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
15854   GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
15855   GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
15856   GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
15857   GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
15858   GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
15859   GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
15860   GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
15861   GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
15862   GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
15863   GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
15864   GNULIB_POSIX_SPAWNATTR_DESTROY=0;
15865     HAVE_POSIX_SPAWN=1;
15866   HAVE_POSIX_SPAWNATTR_T=1;
15867   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
15868
15869   REPLACE_POSIX_SPAWN=0;
15870   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
15871
15872   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
15873
15874   REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
15875
15876
15877
15878
15879
15880
15881
15882
15883   if test $ac_cv_func_posix_spawn != yes; then
15884     HAVE_POSIX_SPAWN=0
15885   fi
15886
15887
15888
15889
15890                                       if test $ac_cv_func_posix_spawn = yes; then
15891
15892
15893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
15894 $as_echo_n "checking whether posix_spawn works... " >&6; }
15895 if ${gl_cv_func_posix_spawn_works+:} false; then :
15896   $as_echo_n "(cached) " >&6
15897 else
15898   if test $cross_compiling = no; then
15899        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900 /* end confdefs.h.  */
15901
15902 #include <errno.h>
15903 #include <fcntl.h>
15904 #include <signal.h>
15905 #include <spawn.h>
15906 #include <stdbool.h>
15907 #include <stdio.h>
15908 #include <stdlib.h>
15909 #include <string.h>
15910 #include <unistd.h>
15911 #include <sys/types.h>
15912 #include <sys/wait.h>
15913
15914 extern char **environ;
15915
15916 #ifndef STDIN_FILENO
15917 # define STDIN_FILENO 0
15918 #endif
15919 #ifndef STDOUT_FILENO
15920 # define STDOUT_FILENO 1
15921 #endif
15922 #ifndef STDERR_FILENO
15923 # define STDERR_FILENO 2
15924 #endif
15925
15926 #ifndef WTERMSIG
15927 # define WTERMSIG(x) ((x) & 0x7f)
15928 #endif
15929 #ifndef WIFEXITED
15930 # define WIFEXITED(x) (WTERMSIG (x) == 0)
15931 #endif
15932 #ifndef WEXITSTATUS
15933 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
15934 #endif
15935
15936 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
15937
15938 static int
15939 fd_safer (int fd)
15940 {
15941   if (0 <= fd && fd <= 2)
15942     {
15943       int f = fd_safer (dup (fd));
15944       int e = errno;
15945       close (fd);
15946       errno = e;
15947       fd = f;
15948     }
15949
15950   return fd;
15951 }
15952
15953 int
15954 main ()
15955 {
15956   char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
15957   int ofd[2];
15958   sigset_t blocked_signals;
15959   sigset_t fatal_signal_set;
15960   posix_spawn_file_actions_t actions;
15961   bool actions_allocated;
15962   posix_spawnattr_t attrs;
15963   bool attrs_allocated;
15964   int err;
15965   pid_t child;
15966   int status;
15967   int exitstatus;
15968
15969   setvbuf (stdout, NULL, _IOFBF, 0);
15970   puts ("This should be seen only once.");
15971   if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
15972     {
15973       perror ("cannot create pipe");
15974       exit (1);
15975     }
15976   sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
15977   sigemptyset (&fatal_signal_set);
15978   sigaddset (&fatal_signal_set, SIGINT);
15979   sigaddset (&fatal_signal_set, SIGTERM);
15980   sigaddset (&fatal_signal_set, SIGHUP);
15981   sigaddset (&fatal_signal_set, SIGPIPE);
15982   sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
15983   actions_allocated = false;
15984   attrs_allocated = false;
15985   if ((err = posix_spawn_file_actions_init (&actions)) != 0
15986       || (actions_allocated = true,
15987           (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
15988           || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
15989           || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
15990           || (err = posix_spawnattr_init (&attrs)) != 0
15991           || (attrs_allocated = true,
15992               (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
15993               || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
15994           || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
15995     {
15996       if (actions_allocated)
15997         posix_spawn_file_actions_destroy (&actions);
15998       if (attrs_allocated)
15999         posix_spawnattr_destroy (&attrs);
16000       sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
16001       if (err == ENOENT)
16002         return 0;
16003       else
16004         {
16005           errno = err;
16006           perror ("subprocess failed");
16007           exit (1);
16008         }
16009     }
16010   posix_spawn_file_actions_destroy (&actions);
16011   posix_spawnattr_destroy (&attrs);
16012   sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
16013   close (ofd[0]);
16014   close (ofd[1]);
16015   status = 0;
16016   while (waitpid (child, &status, 0) != child)
16017     ;
16018   if (!WIFEXITED (status))
16019     {
16020       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
16021       exit (1);
16022     }
16023   exitstatus = WEXITSTATUS (status);
16024   if (exitstatus != 127)
16025     {
16026       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
16027       exit (1);
16028     }
16029   return 0;
16030 }
16031
16032 _ACEOF
16033 if ac_fn_c_try_link "$LINENO"; then :
16034   if test -s conftest$ac_exeext \
16035              && ./conftest$ac_exeext > conftest.out \
16036              && echo 'This should be seen only once.' > conftest.ok \
16037              && cmp conftest.out conftest.ok > /dev/null; then
16038             gl_cv_func_posix_spawn_works=yes
16039           else
16040             gl_cv_func_posix_spawn_works=no
16041           fi
16042 else
16043   gl_cv_func_posix_spawn_works=no
16044 fi
16045 rm -f core conftest.err conftest.$ac_objext \
16046     conftest$ac_exeext conftest.$ac_ext
16047        if test $gl_cv_func_posix_spawn_works = yes; then
16048          if test "$cross_compiling" = yes; then :
16049   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16051 as_fn_error $? "cannot run test program while cross compiling
16052 See \`config.log' for more details" "$LINENO" 5; }
16053 else
16054   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16055 /* end confdefs.h.  */
16056
16057 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
16058    that contain special characters such as '*'.  */
16059
16060 #include <errno.h>
16061 #include <fcntl.h>
16062 #include <signal.h>
16063 #include <spawn.h>
16064 #include <stdbool.h>
16065 #include <stdio.h>
16066 #include <string.h>
16067 #include <unistd.h>
16068 #include <sys/types.h>
16069 #include <sys/wait.h>
16070
16071 extern char **environ;
16072
16073 #ifndef STDIN_FILENO
16074 # define STDIN_FILENO 0
16075 #endif
16076 #ifndef STDOUT_FILENO
16077 # define STDOUT_FILENO 1
16078 #endif
16079 #ifndef STDERR_FILENO
16080 # define STDERR_FILENO 2
16081 #endif
16082
16083 #ifndef WTERMSIG
16084 # define WTERMSIG(x) ((x) & 0x7f)
16085 #endif
16086 #ifndef WIFEXITED
16087 # define WIFEXITED(x) (WTERMSIG (x) == 0)
16088 #endif
16089 #ifndef WEXITSTATUS
16090 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
16091 #endif
16092
16093 #define CHILD_PROGRAM_FILENAME "conftest"
16094 #define DATA_FILENAME "conftest%=*#?"
16095
16096 static int
16097 parent_main (void)
16098 {
16099   FILE *fp;
16100   char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
16101   posix_spawn_file_actions_t actions;
16102   bool actions_allocated;
16103   int err;
16104   pid_t child;
16105   int status;
16106   int exitstatus;
16107
16108   /* Create a data file with specific contents.  */
16109   fp = fopen (DATA_FILENAME, "wb");
16110   if (fp == NULL)
16111     {
16112       perror ("cannot create data file");
16113       return 1;
16114     }
16115   fwrite ("Halle Potta", 1, 11, fp);
16116   if (fflush (fp) || fclose (fp))
16117     {
16118       perror ("cannot prepare data file");
16119       return 2;
16120     }
16121
16122   /* Avoid reading from our stdin, as it could block.  */
16123   freopen ("/dev/null", "rb", stdin);
16124
16125   /* Test whether posix_spawn_file_actions_addopen with this file name
16126      actually works, but spawning a child that reads from this file.  */
16127   actions_allocated = false;
16128   if ((err = posix_spawn_file_actions_init (&actions)) != 0
16129       || (actions_allocated = true,
16130           (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
16131           || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
16132     {
16133       if (actions_allocated)
16134         posix_spawn_file_actions_destroy (&actions);
16135       errno = err;
16136       perror ("subprocess failed");
16137       return 3;
16138     }
16139   posix_spawn_file_actions_destroy (&actions);
16140   status = 0;
16141   while (waitpid (child, &status, 0) != child)
16142     ;
16143   if (!WIFEXITED (status))
16144     {
16145       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
16146       return 4;
16147     }
16148   exitstatus = WEXITSTATUS (status);
16149   if (exitstatus != 0)
16150     {
16151       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
16152       return 5;
16153     }
16154   return 0;
16155 }
16156
16157 static int
16158 child_main (void)
16159 {
16160   char buf[1024];
16161
16162   /* See if reading from STDIN_FILENO yields the expected contents.  */
16163   if (fread (buf, 1, sizeof (buf), stdin) == 11
16164       && memcmp (buf, "Halle Potta", 11) == 0)
16165     return 0;
16166   else
16167     return 8;
16168 }
16169
16170 static void
16171 cleanup_then_die (int sig)
16172 {
16173   /* Clean up data file.  */
16174   unlink (DATA_FILENAME);
16175
16176   /* Re-raise the signal and die from it.  */
16177   signal (sig, SIG_DFL);
16178   raise (sig);
16179 }
16180
16181 int
16182 main (int argc, char *argv[])
16183 {
16184   int exitstatus;
16185
16186   if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
16187     {
16188       /* This is the parent process.  */
16189       signal (SIGINT, cleanup_then_die);
16190       signal (SIGTERM, cleanup_then_die);
16191       #ifdef SIGHUP
16192       signal (SIGHUP, cleanup_then_die);
16193       #endif
16194
16195       exitstatus = parent_main ();
16196     }
16197   else
16198     {
16199       /* This is the child process.  */
16200
16201       exitstatus = child_main ();
16202     }
16203   unlink (DATA_FILENAME);
16204   return exitstatus;
16205 }
16206
16207 _ACEOF
16208 if ac_fn_c_try_run "$LINENO"; then :
16209
16210 else
16211   gl_cv_func_posix_spawn_works=no
16212 fi
16213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16214   conftest.$ac_objext conftest.beam conftest.$ac_ext
16215 fi
16216
16217        fi
16218      else
16219        case "$host_os" in
16220          aix*) gl_cv_func_posix_spawn_works="guessing no";;
16221          *)    gl_cv_func_posix_spawn_works="guessing yes";;
16222        esac
16223      fi
16224
16225 fi
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
16227 $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
16228
16229     case "$gl_cv_func_posix_spawn_works" in
16230       *yes)
16231
16232 $as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
16233
16234                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
16235 $as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
16236 if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
16237   $as_echo_n "(cached) " >&6
16238 else
16239   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16240 /* end confdefs.h.  */
16241
16242 #include <spawn.h>
16243 #if POSIX_SPAWN_SETSCHEDULER
16244  POSIX scheduling supported
16245 #endif
16246
16247 _ACEOF
16248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16249   $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
16250   gl_cv_func_spawnattr_setschedpolicy=yes
16251 else
16252   gl_cv_func_spawnattr_setschedpolicy=no
16253 fi
16254 rm -f conftest*
16255
16256
16257 fi
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
16259 $as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
16260                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
16261 $as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
16262 if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
16263   $as_echo_n "(cached) " >&6
16264 else
16265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16266 /* end confdefs.h.  */
16267
16268 #include <spawn.h>
16269 #if POSIX_SPAWN_SETSCHEDPARAM
16270  POSIX scheduling supported
16271 #endif
16272
16273 _ACEOF
16274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16275   $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
16276   gl_cv_func_spawnattr_setschedparam=yes
16277 else
16278   gl_cv_func_spawnattr_setschedparam=no
16279 fi
16280 rm -f conftest*
16281
16282
16283 fi
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
16285 $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
16286         ;;
16287       *) REPLACE_POSIX_SPAWN=1 ;;
16288     esac
16289   fi
16290
16291
16292   GNULIB_PTHREAD_SIGMASK=0;
16293   GNULIB_RAISE=0;
16294   GNULIB_SIGNAL_H_SIGPIPE=0;
16295   GNULIB_SIGPROCMASK=0;
16296   GNULIB_SIGACTION=0;
16297     HAVE_POSIX_SIGNALBLOCKING=1;
16298   HAVE_PTHREAD_SIGMASK=1;
16299   HAVE_RAISE=1;
16300   HAVE_SIGSET_T=1;
16301   HAVE_SIGINFO_T=1;
16302   HAVE_SIGACTION=1;
16303   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16304
16305   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16306
16307   HAVE_SIGHANDLER_T=1;
16308   REPLACE_PTHREAD_SIGMASK=0;
16309   REPLACE_RAISE=0;
16310
16311
16312   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16313       #include <signal.h>
16314       /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
16315       #include <sys/types.h>
16316
16317 "
16318 if test "x$ac_cv_type_sigset_t" = xyes; then :
16319
16320 cat >>confdefs.h <<_ACEOF
16321 #define HAVE_SIGSET_T 1
16322 _ACEOF
16323
16324 gl_cv_type_sigset_t=yes
16325 else
16326   gl_cv_type_sigset_t=no
16327 fi
16328
16329   if test $gl_cv_type_sigset_t != yes; then
16330     HAVE_SIGSET_T=0
16331   fi
16332
16333
16334
16335   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
16336 $as_echo_n "checking for SIGPIPE... " >&6; }
16337 if ${gl_cv_header_signal_h_SIGPIPE+:} false; then :
16338   $as_echo_n "(cached) " >&6
16339 else
16340
16341     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16342 /* end confdefs.h.  */
16343
16344 #include <signal.h>
16345 #if !defined SIGPIPE
16346 booboo
16347 #endif
16348
16349 _ACEOF
16350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16351   $EGREP "booboo" >/dev/null 2>&1; then :
16352   gl_cv_header_signal_h_SIGPIPE=no
16353 else
16354   gl_cv_header_signal_h_SIGPIPE=yes
16355 fi
16356 rm -f conftest*
16357
16358
16359 fi
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
16361 $as_echo "$gl_cv_header_signal_h_SIGPIPE" >&6; }
16362
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16364 $as_echo_n "checking for inline... " >&6; }
16365 if ${ac_cv_c_inline+:} false; then :
16366   $as_echo_n "(cached) " >&6
16367 else
16368   ac_cv_c_inline=no
16369 for ac_kw in inline __inline__ __inline; do
16370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371 /* end confdefs.h.  */
16372 #ifndef __cplusplus
16373 typedef int foo_t;
16374 static $ac_kw foo_t static_foo () {return 0; }
16375 $ac_kw foo_t foo () {return 0; }
16376 #endif
16377
16378 _ACEOF
16379 if ac_fn_c_try_compile "$LINENO"; then :
16380   ac_cv_c_inline=$ac_kw
16381 fi
16382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16383   test "$ac_cv_c_inline" != no && break
16384 done
16385
16386 fi
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16388 $as_echo "$ac_cv_c_inline" >&6; }
16389
16390 case $ac_cv_c_inline in
16391   inline | yes) ;;
16392   *)
16393     case $ac_cv_c_inline in
16394       no) ac_val=;;
16395       *) ac_val=$ac_cv_c_inline;;
16396     esac
16397     cat >>confdefs.h <<_ACEOF
16398 #ifndef __cplusplus
16399 #define inline $ac_val
16400 #endif
16401 _ACEOF
16402     ;;
16403 esac
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16420 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
16421 if ${ac_cv_type_uid_t+:} false; then :
16422   $as_echo_n "(cached) " >&6
16423 else
16424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425 /* end confdefs.h.  */
16426 #include <sys/types.h>
16427
16428 _ACEOF
16429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16430   $EGREP "uid_t" >/dev/null 2>&1; then :
16431   ac_cv_type_uid_t=yes
16432 else
16433   ac_cv_type_uid_t=no
16434 fi
16435 rm -f conftest*
16436
16437 fi
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16439 $as_echo "$ac_cv_type_uid_t" >&6; }
16440 if test $ac_cv_type_uid_t = no; then
16441
16442 $as_echo "#define uid_t int" >>confdefs.h
16443
16444
16445 $as_echo "#define gid_t int" >>confdefs.h
16446
16447 fi
16448
16449
16450
16451
16452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453 /* end confdefs.h.  */
16454
16455 #ifdef _MSC_VER
16456 MicrosoftCompiler
16457 #endif
16458
16459 _ACEOF
16460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16461   $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
16462   gl_asmext='asm'
16463      gl_c_asm_opt='-c -Fa'
16464
16465 else
16466   gl_asmext='s'
16467      gl_c_asm_opt='-S'
16468
16469 fi
16470 rm -f conftest*
16471
16472
16473
16474
16475   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
16476 $as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
16477 if ${gl_cv_prog_as_underscore+:} false; then :
16478   $as_echo_n "(cached) " >&6
16479 else
16480   cat > conftest.c <<EOF
16481 #ifdef __cplusplus
16482 extern "C" int foo (void);
16483 #endif
16484 int foo(void) { return 0; }
16485 EOF
16486      # Look for the assembly language name in the .s file.
16487      { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
16488   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
16489   (eval $ac_try) 2>&5
16490   ac_status=$?
16491   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16492   test $ac_status = 0; }; } >/dev/null 2>&1
16493      if grep _foo conftest.$gl_asmext >/dev/null ; then
16494        gl_cv_prog_as_underscore=yes
16495      else
16496        gl_cv_prog_as_underscore=no
16497      fi
16498      rm -f conftest*
16499
16500 fi
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
16502 $as_echo "$gl_cv_prog_as_underscore" >&6; }
16503   if test $gl_cv_prog_as_underscore = yes; then
16504     USER_LABEL_PREFIX=_
16505   else
16506     USER_LABEL_PREFIX=
16507   fi
16508
16509 cat >>confdefs.h <<_ACEOF
16510 #define USER_LABEL_PREFIX $USER_LABEL_PREFIX
16511 _ACEOF
16512
16513   ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
16525 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
16526 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
16527   $as_echo_n "(cached) " >&6
16528 else
16529
16530       if test "$cross_compiling" = yes; then :
16531
16532          case "$host_os" in
16533                                  # Guess yes on glibc systems.
16534            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
16535                                  # Guess yes on FreeBSD >= 5.
16536            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
16537            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
16538                                  # Guess yes on Mac OS X >= 10.3.
16539            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
16540            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
16541                                  # Guess yes on OpenBSD >= 3.9.
16542            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
16543                                  gl_cv_func_snprintf_retval_c99="guessing no";;
16544            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
16545                                  # Guess yes on Solaris >= 2.10.
16546            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
16547            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
16548                                  # Guess yes on AIX >= 4.
16549            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
16550            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
16551                                  # Guess yes on NetBSD >= 3.
16552            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
16553                                  gl_cv_func_snprintf_retval_c99="guessing no";;
16554            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
16555                                  # Guess yes on BeOS.
16556            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
16557                                  # If we don't know, assume the worst.
16558            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
16559          esac
16560
16561 else
16562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16563 /* end confdefs.h.  */
16564
16565 #include <stdio.h>
16566 #include <string.h>
16567 #if HAVE_SNPRINTF
16568 # define my_snprintf snprintf
16569 #else
16570 # include <stdarg.h>
16571 static int my_snprintf (char *buf, int size, const char *format, ...)
16572 {
16573   va_list args;
16574   int ret;
16575   va_start (args, format);
16576   ret = vsnprintf (buf, size, format, args);
16577   va_end (args);
16578   return ret;
16579 }
16580 #endif
16581 static char buf[100];
16582 int main ()
16583 {
16584   strcpy (buf, "ABCDEF");
16585   if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
16586     return 1;
16587   if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
16588     return 2;
16589   if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
16590     return 3;
16591   return 0;
16592 }
16593 _ACEOF
16594 if ac_fn_c_try_run "$LINENO"; then :
16595   gl_cv_func_snprintf_retval_c99=yes
16596 else
16597   gl_cv_func_snprintf_retval_c99=no
16598 fi
16599 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16600   conftest.$ac_objext conftest.beam conftest.$ac_ext
16601 fi
16602
16603
16604 fi
16605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
16606 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
16607
16608 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
16609 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
16610   ac_have_decl=1
16611 else
16612   ac_have_decl=0
16613 fi
16614
16615 cat >>confdefs.h <<_ACEOF
16616 #define HAVE_DECL_SNPRINTF $ac_have_decl
16617 _ACEOF
16618
16619
16620
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16622 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16623 if ${ac_cv_header_stdbool_h+:} false; then :
16624   $as_echo_n "(cached) " >&6
16625 else
16626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627 /* end confdefs.h.  */
16628
16629              #include <stdbool.h>
16630              #ifndef bool
16631               "error: bool is not defined"
16632              #endif
16633              #ifndef false
16634               "error: false is not defined"
16635              #endif
16636              #if false
16637               "error: false is not 0"
16638              #endif
16639              #ifndef true
16640               "error: true is not defined"
16641              #endif
16642              #if true != 1
16643               "error: true is not 1"
16644              #endif
16645              #ifndef __bool_true_false_are_defined
16646               "error: __bool_true_false_are_defined is not defined"
16647              #endif
16648
16649              struct s { _Bool s: 1; _Bool t; } s;
16650
16651              char a[true == 1 ? 1 : -1];
16652              char b[false == 0 ? 1 : -1];
16653              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16654              char d[(bool) 0.5 == true ? 1 : -1];
16655              /* See body of main program for 'e'.  */
16656              char f[(_Bool) 0.0 == false ? 1 : -1];
16657              char g[true];
16658              char h[sizeof (_Bool)];
16659              char i[sizeof s.t];
16660              enum { j = false, k = true, l = false * true, m = true * 256 };
16661              /* The following fails for
16662                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16663              _Bool n[m];
16664              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16665              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16666              /* Catch a bug in an HP-UX C compiler.  See
16667                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16668                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
16669               */
16670              _Bool q = true;
16671              _Bool *pq = &q;
16672
16673 int
16674 main ()
16675 {
16676
16677              bool e = &s;
16678              *pq |= q;
16679              *pq |= ! q;
16680              /* Refer to every declared value, to avoid compiler optimizations.  */
16681              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16682                      + !m + !n + !o + !p + !q + !pq);
16683
16684   ;
16685   return 0;
16686 }
16687 _ACEOF
16688 if ac_fn_c_try_compile "$LINENO"; then :
16689   ac_cv_header_stdbool_h=yes
16690 else
16691   ac_cv_header_stdbool_h=no
16692 fi
16693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16694 fi
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16696 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16697    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16698 if test "x$ac_cv_type__Bool" = xyes; then :
16699
16700 cat >>confdefs.h <<_ACEOF
16701 #define HAVE__BOOL 1
16702 _ACEOF
16703
16704
16705 fi
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715   if test $ac_cv_type_long_long_int = yes; then
16716     HAVE_LONG_LONG_INT=1
16717   else
16718     HAVE_LONG_LONG_INT=0
16719   fi
16720
16721
16722   if test $ac_cv_type_unsigned_long_long_int = yes; then
16723     HAVE_UNSIGNED_LONG_LONG_INT=1
16724   else
16725     HAVE_UNSIGNED_LONG_LONG_INT=0
16726   fi
16727
16728
16729
16730   if test $ac_cv_header_wchar_h = yes; then
16731     HAVE_WCHAR_H=1
16732   else
16733     HAVE_WCHAR_H=0
16734   fi
16735
16736
16737       if test $ac_cv_header_inttypes_h = yes; then
16738     HAVE_INTTYPES_H=1
16739   else
16740     HAVE_INTTYPES_H=0
16741   fi
16742
16743
16744       if test $ac_cv_header_sys_types_h = yes; then
16745     HAVE_SYS_TYPES_H=1
16746   else
16747     HAVE_SYS_TYPES_H=0
16748   fi
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760      if test $gl_cv_have_include_next = yes; then
16761        gl_cv_next_stdint_h='<'stdint.h'>'
16762      else
16763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
16764 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
16765 if ${gl_cv_next_stdint_h+:} false; then :
16766   $as_echo_n "(cached) " >&6
16767 else
16768
16769              if test $ac_cv_header_stdint_h = yes; then
16770
16771
16772                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16773 /* end confdefs.h.  */
16774 #include <stdint.h>
16775
16776 _ACEOF
16777                                                                                                                         case "$host_os" in
16778                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
16779                  *)    gl_absname_cpp="$ac_cpp" ;;
16780                esac
16781
16782                case "$host_os" in
16783                  mingw*)
16784                                                                                                                                      gl_dirsep_regex='[/\\]'
16785                    ;;
16786                  *)
16787                    gl_dirsep_regex='\/'
16788                    ;;
16789                esac
16790                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16791
16792                gl_header_literal_regex=`echo 'stdint.h' \
16793                                         | sed -e "$gl_make_literal_regex_sed"`
16794                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16795                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16796                    s|^/[^/]|//&|
16797                    p
16798                    q
16799                  }'
16800                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16801                       sed -n "$gl_absolute_header_sed"`'"'
16802           else
16803                gl_cv_next_stdint_h='<'stdint.h'>'
16804              fi
16805
16806
16807 fi
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
16809 $as_echo "$gl_cv_next_stdint_h" >&6; }
16810      fi
16811      NEXT_STDINT_H=$gl_cv_next_stdint_h
16812
16813      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16814        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16815        gl_next_as_first_directive='<'stdint.h'>'
16816      else
16817        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16818        gl_next_as_first_directive=$gl_cv_next_stdint_h
16819      fi
16820      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
16821
16822
16823
16824
16825   if test $ac_cv_header_stdint_h = yes; then
16826     HAVE_STDINT_H=1
16827   else
16828     HAVE_STDINT_H=0
16829   fi
16830
16831
16832     if test $ac_cv_header_stdint_h = yes; then
16833     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
16834 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
16835 if ${gl_cv_header_working_stdint_h+:} false; then :
16836   $as_echo_n "(cached) " >&6
16837 else
16838   gl_cv_header_working_stdint_h=no
16839        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16840 /* end confdefs.h.  */
16841
16842
16843 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
16844 #include <stdint.h>
16845 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
16846 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
16847 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
16848 #endif
16849
16850
16851   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16852      included before <wchar.h>.  */
16853   #include <stddef.h>
16854   #include <signal.h>
16855   #if HAVE_WCHAR_H
16856   # include <stdio.h>
16857   # include <time.h>
16858   # include <wchar.h>
16859   #endif
16860
16861
16862 #ifdef INT8_MAX
16863 int8_t a1 = INT8_MAX;
16864 int8_t a1min = INT8_MIN;
16865 #endif
16866 #ifdef INT16_MAX
16867 int16_t a2 = INT16_MAX;
16868 int16_t a2min = INT16_MIN;
16869 #endif
16870 #ifdef INT32_MAX
16871 int32_t a3 = INT32_MAX;
16872 int32_t a3min = INT32_MIN;
16873 #endif
16874 #ifdef INT64_MAX
16875 int64_t a4 = INT64_MAX;
16876 int64_t a4min = INT64_MIN;
16877 #endif
16878 #ifdef UINT8_MAX
16879 uint8_t b1 = UINT8_MAX;
16880 #else
16881 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
16882 #endif
16883 #ifdef UINT16_MAX
16884 uint16_t b2 = UINT16_MAX;
16885 #endif
16886 #ifdef UINT32_MAX
16887 uint32_t b3 = UINT32_MAX;
16888 #endif
16889 #ifdef UINT64_MAX
16890 uint64_t b4 = UINT64_MAX;
16891 #endif
16892 int_least8_t c1 = INT8_C (0x7f);
16893 int_least8_t c1max = INT_LEAST8_MAX;
16894 int_least8_t c1min = INT_LEAST8_MIN;
16895 int_least16_t c2 = INT16_C (0x7fff);
16896 int_least16_t c2max = INT_LEAST16_MAX;
16897 int_least16_t c2min = INT_LEAST16_MIN;
16898 int_least32_t c3 = INT32_C (0x7fffffff);
16899 int_least32_t c3max = INT_LEAST32_MAX;
16900 int_least32_t c3min = INT_LEAST32_MIN;
16901 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
16902 int_least64_t c4max = INT_LEAST64_MAX;
16903 int_least64_t c4min = INT_LEAST64_MIN;
16904 uint_least8_t d1 = UINT8_C (0xff);
16905 uint_least8_t d1max = UINT_LEAST8_MAX;
16906 uint_least16_t d2 = UINT16_C (0xffff);
16907 uint_least16_t d2max = UINT_LEAST16_MAX;
16908 uint_least32_t d3 = UINT32_C (0xffffffff);
16909 uint_least32_t d3max = UINT_LEAST32_MAX;
16910 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
16911 uint_least64_t d4max = UINT_LEAST64_MAX;
16912 int_fast8_t e1 = INT_FAST8_MAX;
16913 int_fast8_t e1min = INT_FAST8_MIN;
16914 int_fast16_t e2 = INT_FAST16_MAX;
16915 int_fast16_t e2min = INT_FAST16_MIN;
16916 int_fast32_t e3 = INT_FAST32_MAX;
16917 int_fast32_t e3min = INT_FAST32_MIN;
16918 int_fast64_t e4 = INT_FAST64_MAX;
16919 int_fast64_t e4min = INT_FAST64_MIN;
16920 uint_fast8_t f1 = UINT_FAST8_MAX;
16921 uint_fast16_t f2 = UINT_FAST16_MAX;
16922 uint_fast32_t f3 = UINT_FAST32_MAX;
16923 uint_fast64_t f4 = UINT_FAST64_MAX;
16924 #ifdef INTPTR_MAX
16925 intptr_t g = INTPTR_MAX;
16926 intptr_t gmin = INTPTR_MIN;
16927 #endif
16928 #ifdef UINTPTR_MAX
16929 uintptr_t h = UINTPTR_MAX;
16930 #endif
16931 intmax_t i = INTMAX_MAX;
16932 uintmax_t j = UINTMAX_MAX;
16933
16934 #include <limits.h> /* for CHAR_BIT */
16935 #define TYPE_MINIMUM(t) \
16936   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16937 #define TYPE_MAXIMUM(t) \
16938   ((t) ((t) 0 < (t) -1 \
16939         ? (t) -1 \
16940         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16941 struct s {
16942   int check_PTRDIFF:
16943       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
16944       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
16945       ? 1 : -1;
16946   /* Detect bug in FreeBSD 6.0 / ia64.  */
16947   int check_SIG_ATOMIC:
16948       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
16949       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
16950       ? 1 : -1;
16951   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
16952   int check_WCHAR:
16953       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
16954       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
16955       ? 1 : -1;
16956   /* Detect bug in mingw.  */
16957   int check_WINT:
16958       WINT_MIN == TYPE_MINIMUM (wint_t)
16959       && WINT_MAX == TYPE_MAXIMUM (wint_t)
16960       ? 1 : -1;
16961
16962   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
16963   int check_UINT8_C:
16964         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
16965   int check_UINT16_C:
16966         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
16967
16968   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
16969 #ifdef UINT8_MAX
16970   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
16971 #endif
16972 #ifdef UINT16_MAX
16973   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
16974 #endif
16975 #ifdef UINT32_MAX
16976   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
16977 #endif
16978 #ifdef UINT64_MAX
16979   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
16980 #endif
16981   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
16982   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
16983   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
16984   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
16985   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
16986   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
16987   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
16988   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
16989   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
16990   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
16991   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
16992 };
16993
16994 int
16995 main ()
16996 {
16997
16998   ;
16999   return 0;
17000 }
17001 _ACEOF
17002 if ac_fn_c_try_compile "$LINENO"; then :
17003                                                     if test "$cross_compiling" = yes; then :
17004                  gl_cv_header_working_stdint_h=yes
17005
17006 else
17007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17008 /* end confdefs.h.  */
17009
17010
17011 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17012 #include <stdint.h>
17013
17014
17015   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17016      included before <wchar.h>.  */
17017   #include <stddef.h>
17018   #include <signal.h>
17019   #if HAVE_WCHAR_H
17020   # include <stdio.h>
17021   # include <time.h>
17022   # include <wchar.h>
17023   #endif
17024
17025
17026 #include <stdio.h>
17027 #include <string.h>
17028 #define MVAL(macro) MVAL1(macro)
17029 #define MVAL1(expression) #expression
17030 static const char *macro_values[] =
17031   {
17032 #ifdef INT8_MAX
17033     MVAL (INT8_MAX),
17034 #endif
17035 #ifdef INT16_MAX
17036     MVAL (INT16_MAX),
17037 #endif
17038 #ifdef INT32_MAX
17039     MVAL (INT32_MAX),
17040 #endif
17041 #ifdef INT64_MAX
17042     MVAL (INT64_MAX),
17043 #endif
17044 #ifdef UINT8_MAX
17045     MVAL (UINT8_MAX),
17046 #endif
17047 #ifdef UINT16_MAX
17048     MVAL (UINT16_MAX),
17049 #endif
17050 #ifdef UINT32_MAX
17051     MVAL (UINT32_MAX),
17052 #endif
17053 #ifdef UINT64_MAX
17054     MVAL (UINT64_MAX),
17055 #endif
17056     NULL
17057   };
17058
17059 int
17060 main ()
17061 {
17062
17063   const char **mv;
17064   for (mv = macro_values; *mv != NULL; mv++)
17065     {
17066       const char *value = *mv;
17067       /* Test whether it looks like a cast expression.  */
17068       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17069           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17070           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17071           || strncmp (value, "((int)"/*)*/, 6) == 0
17072           || strncmp (value, "((signed short)"/*)*/, 15) == 0
17073           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17074         return mv - macro_values + 1;
17075     }
17076   return 0;
17077
17078   ;
17079   return 0;
17080 }
17081 _ACEOF
17082 if ac_fn_c_try_run "$LINENO"; then :
17083   gl_cv_header_working_stdint_h=yes
17084 fi
17085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17086   conftest.$ac_objext conftest.beam conftest.$ac_ext
17087 fi
17088
17089
17090 fi
17091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17092
17093 fi
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17095 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
17096   fi
17097   if test "$gl_cv_header_working_stdint_h" = yes; then
17098     STDINT_H=
17099   else
17100             for ac_header in sys/inttypes.h sys/bitypes.h
17101 do :
17102   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17103 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17104 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17105   cat >>confdefs.h <<_ACEOF
17106 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17107 _ACEOF
17108
17109 fi
17110
17111 done
17112
17113     if test $ac_cv_header_sys_inttypes_h = yes; then
17114       HAVE_SYS_INTTYPES_H=1
17115     else
17116       HAVE_SYS_INTTYPES_H=0
17117     fi
17118
17119     if test $ac_cv_header_sys_bitypes_h = yes; then
17120       HAVE_SYS_BITYPES_H=1
17121     else
17122       HAVE_SYS_BITYPES_H=0
17123     fi
17124
17125
17126
17127
17128   if test $APPLE_UNIVERSAL_BUILD = 0; then
17129
17130
17131   for gltype in ptrdiff_t size_t ; do
17132     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17133 $as_echo_n "checking for bit size of $gltype... " >&6; }
17134 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
17135   $as_echo_n "(cached) " >&6
17136 else
17137   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
17138   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17139      included before <wchar.h>.  */
17140   #include <stddef.h>
17141   #include <signal.h>
17142   #if HAVE_WCHAR_H
17143   # include <stdio.h>
17144   # include <time.h>
17145   # include <wchar.h>
17146   #endif
17147
17148 #include <limits.h>"; then :
17149
17150 else
17151   result=unknown
17152 fi
17153
17154        eval gl_cv_bitsizeof_${gltype}=\$result
17155
17156 fi
17157 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17158                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17159 $as_echo "$ac_res" >&6; }
17160     eval result=\$gl_cv_bitsizeof_${gltype}
17161     if test $result = unknown; then
17162                                                 result=0
17163     fi
17164     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17165     cat >>confdefs.h <<_ACEOF
17166 #define BITSIZEOF_${GLTYPE} $result
17167 _ACEOF
17168
17169     eval BITSIZEOF_${GLTYPE}=\$result
17170   done
17171
17172
17173   fi
17174
17175
17176   for gltype in sig_atomic_t wchar_t wint_t ; do
17177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17178 $as_echo_n "checking for bit size of $gltype... " >&6; }
17179 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
17180   $as_echo_n "(cached) " >&6
17181 else
17182   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
17183   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17184      included before <wchar.h>.  */
17185   #include <stddef.h>
17186   #include <signal.h>
17187   #if HAVE_WCHAR_H
17188   # include <stdio.h>
17189   # include <time.h>
17190   # include <wchar.h>
17191   #endif
17192
17193 #include <limits.h>"; then :
17194
17195 else
17196   result=unknown
17197 fi
17198
17199        eval gl_cv_bitsizeof_${gltype}=\$result
17200
17201 fi
17202 eval ac_res=\$gl_cv_bitsizeof_${gltype}
17203                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17204 $as_echo "$ac_res" >&6; }
17205     eval result=\$gl_cv_bitsizeof_${gltype}
17206     if test $result = unknown; then
17207                                                 result=0
17208     fi
17209     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17210     cat >>confdefs.h <<_ACEOF
17211 #define BITSIZEOF_${GLTYPE} $result
17212 _ACEOF
17213
17214     eval BITSIZEOF_${GLTYPE}=\$result
17215   done
17216
17217
17218
17219
17220   for gltype in sig_atomic_t wchar_t wint_t ; do
17221     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17222 $as_echo_n "checking whether $gltype is signed... " >&6; }
17223 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
17224   $as_echo_n "(cached) " >&6
17225 else
17226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227 /* end confdefs.h.  */
17228
17229   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17230      included before <wchar.h>.  */
17231   #include <stddef.h>
17232   #include <signal.h>
17233   #if HAVE_WCHAR_H
17234   # include <stdio.h>
17235   # include <time.h>
17236   # include <wchar.h>
17237   #endif
17238
17239             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
17240 int
17241 main ()
17242 {
17243
17244   ;
17245   return 0;
17246 }
17247 _ACEOF
17248 if ac_fn_c_try_compile "$LINENO"; then :
17249   result=yes
17250 else
17251   result=no
17252 fi
17253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17254        eval gl_cv_type_${gltype}_signed=\$result
17255
17256 fi
17257 eval ac_res=\$gl_cv_type_${gltype}_signed
17258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17259 $as_echo "$ac_res" >&6; }
17260     eval result=\$gl_cv_type_${gltype}_signed
17261     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17262     if test "$result" = yes; then
17263       cat >>confdefs.h <<_ACEOF
17264 #define HAVE_SIGNED_${GLTYPE} 1
17265 _ACEOF
17266
17267       eval HAVE_SIGNED_${GLTYPE}=1
17268     else
17269       eval HAVE_SIGNED_${GLTYPE}=0
17270     fi
17271   done
17272
17273
17274   gl_cv_type_ptrdiff_t_signed=yes
17275   gl_cv_type_size_t_signed=no
17276   if test $APPLE_UNIVERSAL_BUILD = 0; then
17277
17278
17279   for gltype in ptrdiff_t size_t ; do
17280     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17281 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17282 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
17283   $as_echo_n "(cached) " >&6
17284 else
17285   eval gl_cv_type_${gltype}_suffix=no
17286        eval result=\$gl_cv_type_${gltype}_signed
17287        if test "$result" = yes; then
17288          glsufu=
17289        else
17290          glsufu=u
17291        fi
17292        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17293          case $glsuf in
17294            '')  gltype1='int';;
17295            l)   gltype1='long int';;
17296            ll)  gltype1='long long int';;
17297            i64) gltype1='__int64';;
17298            u)   gltype1='unsigned int';;
17299            ul)  gltype1='unsigned long int';;
17300            ull) gltype1='unsigned long long int';;
17301            ui64)gltype1='unsigned __int64';;
17302          esac
17303          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17304 /* end confdefs.h.  */
17305
17306   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17307      included before <wchar.h>.  */
17308   #include <stddef.h>
17309   #include <signal.h>
17310   #if HAVE_WCHAR_H
17311   # include <stdio.h>
17312   # include <time.h>
17313   # include <wchar.h>
17314   #endif
17315
17316               extern $gltype foo;
17317               extern $gltype1 foo;
17318 int
17319 main ()
17320 {
17321
17322   ;
17323   return 0;
17324 }
17325 _ACEOF
17326 if ac_fn_c_try_compile "$LINENO"; then :
17327   eval gl_cv_type_${gltype}_suffix=\$glsuf
17328 fi
17329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17330          eval result=\$gl_cv_type_${gltype}_suffix
17331          test "$result" != no && break
17332        done
17333 fi
17334 eval ac_res=\$gl_cv_type_${gltype}_suffix
17335                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17336 $as_echo "$ac_res" >&6; }
17337     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17338     eval result=\$gl_cv_type_${gltype}_suffix
17339     test "$result" = no && result=
17340     eval ${GLTYPE}_SUFFIX=\$result
17341     cat >>confdefs.h <<_ACEOF
17342 #define ${GLTYPE}_SUFFIX $result
17343 _ACEOF
17344
17345   done
17346
17347
17348   fi
17349
17350
17351   for gltype in sig_atomic_t wchar_t wint_t ; do
17352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17353 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17354 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
17355   $as_echo_n "(cached) " >&6
17356 else
17357   eval gl_cv_type_${gltype}_suffix=no
17358        eval result=\$gl_cv_type_${gltype}_signed
17359        if test "$result" = yes; then
17360          glsufu=
17361        else
17362          glsufu=u
17363        fi
17364        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17365          case $glsuf in
17366            '')  gltype1='int';;
17367            l)   gltype1='long int';;
17368            ll)  gltype1='long long int';;
17369            i64) gltype1='__int64';;
17370            u)   gltype1='unsigned int';;
17371            ul)  gltype1='unsigned long int';;
17372            ull) gltype1='unsigned long long int';;
17373            ui64)gltype1='unsigned __int64';;
17374          esac
17375          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17376 /* end confdefs.h.  */
17377
17378   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17379      included before <wchar.h>.  */
17380   #include <stddef.h>
17381   #include <signal.h>
17382   #if HAVE_WCHAR_H
17383   # include <stdio.h>
17384   # include <time.h>
17385   # include <wchar.h>
17386   #endif
17387
17388               extern $gltype foo;
17389               extern $gltype1 foo;
17390 int
17391 main ()
17392 {
17393
17394   ;
17395   return 0;
17396 }
17397 _ACEOF
17398 if ac_fn_c_try_compile "$LINENO"; then :
17399   eval gl_cv_type_${gltype}_suffix=\$glsuf
17400 fi
17401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17402          eval result=\$gl_cv_type_${gltype}_suffix
17403          test "$result" != no && break
17404        done
17405 fi
17406 eval ac_res=\$gl_cv_type_${gltype}_suffix
17407                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17408 $as_echo "$ac_res" >&6; }
17409     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17410     eval result=\$gl_cv_type_${gltype}_suffix
17411     test "$result" = no && result=
17412     eval ${GLTYPE}_SUFFIX=\$result
17413     cat >>confdefs.h <<_ACEOF
17414 #define ${GLTYPE}_SUFFIX $result
17415 _ACEOF
17416
17417   done
17418
17419
17420
17421           if test $BITSIZEOF_WINT_T -lt 32; then
17422     BITSIZEOF_WINT_T=32
17423   fi
17424
17425     STDINT_H=stdint.h
17426   fi
17427
17428    if test -n "$STDINT_H"; then
17429   GL_GENERATE_STDINT_H_TRUE=
17430   GL_GENERATE_STDINT_H_FALSE='#'
17431 else
17432   GL_GENERATE_STDINT_H_TRUE='#'
17433   GL_GENERATE_STDINT_H_FALSE=
17434 fi
17435
17436
17437
17438      REPLACE_STRERROR_0=0
17439   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17440 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17441 if ${gl_cv_func_strerror_0_works+:} false; then :
17442   $as_echo_n "(cached) " >&6
17443 else
17444   if test "$cross_compiling" = yes; then :
17445   case "$host_os" in
17446                  # Guess yes on glibc systems.
17447          *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17448                  # If we don't know, assume the worst.
17449          *)      gl_cv_func_strerror_0_works="guessing no" ;;
17450        esac
17451
17452 else
17453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17454 /* end confdefs.h.  */
17455 #include <string.h>
17456            #include <errno.h>
17457
17458 int
17459 main ()
17460 {
17461 int result = 0;
17462            char *str;
17463            errno = 0;
17464            str = strerror (0);
17465            if (!*str) result |= 1;
17466            if (errno) result |= 2;
17467            if (strstr (str, "nknown") || strstr (str, "ndefined"))
17468              result |= 4;
17469            return result;
17470   ;
17471   return 0;
17472 }
17473 _ACEOF
17474 if ac_fn_c_try_run "$LINENO"; then :
17475   gl_cv_func_strerror_0_works=yes
17476 else
17477   gl_cv_func_strerror_0_works=no
17478 fi
17479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17480   conftest.$ac_objext conftest.beam conftest.$ac_ext
17481 fi
17482
17483
17484 fi
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17486 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
17487   case "$gl_cv_func_strerror_0_works" in
17488     *yes) ;;
17489     *)
17490       REPLACE_STRERROR_0=1
17491
17492 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17493
17494       ;;
17495   esac
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508      if test $gl_cv_have_include_next = yes; then
17509        gl_cv_next_string_h='<'string.h'>'
17510      else
17511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17512 $as_echo_n "checking absolute name of <string.h>... " >&6; }
17513 if ${gl_cv_next_string_h+:} false; then :
17514   $as_echo_n "(cached) " >&6
17515 else
17516
17517                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17518 /* end confdefs.h.  */
17519 #include <string.h>
17520
17521 _ACEOF
17522                                                                                                                         case "$host_os" in
17523                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17524                  *)    gl_absname_cpp="$ac_cpp" ;;
17525                esac
17526
17527                case "$host_os" in
17528                  mingw*)
17529                                                                                                                                      gl_dirsep_regex='[/\\]'
17530                    ;;
17531                  *)
17532                    gl_dirsep_regex='\/'
17533                    ;;
17534                esac
17535                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17536
17537                gl_header_literal_regex=`echo 'string.h' \
17538                                         | sed -e "$gl_make_literal_regex_sed"`
17539                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17540                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17541                    s|^/[^/]|//&|
17542                    p
17543                    q
17544                  }'
17545                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17546                       sed -n "$gl_absolute_header_sed"`'"'
17547
17548
17549 fi
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17551 $as_echo "$gl_cv_next_string_h" >&6; }
17552      fi
17553      NEXT_STRING_H=$gl_cv_next_string_h
17554
17555      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17556        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17557        gl_next_as_first_directive='<'string.h'>'
17558      else
17559        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17560        gl_next_as_first_directive=$gl_cv_next_string_h
17561      fi
17562      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17563
17564
17565
17566
17567
17568
17569
17570 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
17571 if test "x$ac_cv_have_decl_strndup" = xyes; then :
17572   ac_have_decl=1
17573 else
17574   ac_have_decl=0
17575 fi
17576
17577 cat >>confdefs.h <<_ACEOF
17578 #define HAVE_DECL_STRNDUP $ac_have_decl
17579 _ACEOF
17580
17581
17582
17583 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17584 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17585   ac_have_decl=1
17586 else
17587   ac_have_decl=0
17588 fi
17589
17590 cat >>confdefs.h <<_ACEOF
17591 #define HAVE_DECL_STRNLEN $ac_have_decl
17592 _ACEOF
17593
17594 ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
17595 if test "x$ac_cv_have_decl_strsignal" = xyes; then :
17596   ac_have_decl=1
17597 else
17598   ac_have_decl=0
17599 fi
17600
17601 cat >>confdefs.h <<_ACEOF
17602 #define HAVE_DECL_STRSIGNAL $ac_have_decl
17603 _ACEOF
17604
17605 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
17606 /* NetBSD declares sys_siglist in unistd.h.  */
17607 #ifdef HAVE_UNISTD_H
17608 # include <unistd.h>
17609 #endif
17610
17611 "
17612 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
17613   ac_have_decl=1
17614 else
17615   ac_have_decl=0
17616 fi
17617
17618 cat >>confdefs.h <<_ACEOF
17619 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
17620 _ACEOF
17621
17622
17623
17624
17625
17626   if test "$gl_cv_func_memchr_works" != yes; then
17627     REPLACE_STRSTR=1
17628   else
17629         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17630 $as_echo_n "checking whether strstr works... " >&6; }
17631 if ${gl_cv_func_strstr_works_always+:} false; then :
17632   $as_echo_n "(cached) " >&6
17633 else
17634   if test "$cross_compiling" = yes; then :
17635                                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17636 /* end confdefs.h.  */
17637
17638 #ifdef __GNU_LIBRARY__
17639  #include <features.h>
17640  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17641      || defined __UCLIBC__
17642   Lucky user
17643  #endif
17644 #elif defined __CYGWIN__
17645  #include <cygwin/version.h>
17646  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17647   Lucky user
17648  #endif
17649 #else
17650   Lucky user
17651 #endif
17652
17653 _ACEOF
17654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17655   $EGREP "Lucky user" >/dev/null 2>&1; then :
17656   gl_cv_func_strstr_works_always="guessing yes"
17657 else
17658   gl_cv_func_strstr_works_always="guessing no"
17659 fi
17660 rm -f conftest*
17661
17662
17663 else
17664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17665 /* end confdefs.h.  */
17666
17667 #include <string.h> /* for strstr */
17668 #define P "_EF_BF_BD"
17669 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17670 #define NEEDLE P P P P P
17671
17672 int
17673 main ()
17674 {
17675 return !!strstr (HAYSTACK, NEEDLE);
17676
17677   ;
17678   return 0;
17679 }
17680 _ACEOF
17681 if ac_fn_c_try_run "$LINENO"; then :
17682   gl_cv_func_strstr_works_always=yes
17683 else
17684   gl_cv_func_strstr_works_always=no
17685 fi
17686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17687   conftest.$ac_objext conftest.beam conftest.$ac_ext
17688 fi
17689
17690
17691 fi
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17693 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
17694     case "$gl_cv_func_strstr_works_always" in
17695       *yes) ;;
17696       *)
17697         REPLACE_STRSTR=1
17698         ;;
17699     esac
17700   fi
17701
17702
17703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
17704 $as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
17705 if ${gl_cv_func_ldexp_no_libm+:} false; then :
17706   $as_echo_n "(cached) " >&6
17707 else
17708
17709       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17710 /* end confdefs.h.  */
17711 #ifndef __NO_MATH_INLINES
17712                            # define __NO_MATH_INLINES 1 /* for glibc */
17713                            #endif
17714                            #include <math.h>
17715                            double (*funcptr) (double, int) = ldexp;
17716                            double x;
17717 int
17718 main ()
17719 {
17720 return ldexp (x, -1) > 0;
17721   ;
17722   return 0;
17723 }
17724 _ACEOF
17725 if ac_fn_c_try_link "$LINENO"; then :
17726   gl_cv_func_ldexp_no_libm=yes
17727 else
17728   gl_cv_func_ldexp_no_libm=no
17729 fi
17730 rm -f core conftest.err conftest.$ac_objext \
17731     conftest$ac_exeext conftest.$ac_ext
17732
17733 fi
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
17735 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
17736
17737
17738   GNULIB_WAITPID=0;
17739
17740
17741
17742
17743   GNULIB_MKTIME=0;
17744   GNULIB_NANOSLEEP=0;
17745   GNULIB_STRPTIME=0;
17746   GNULIB_TIMEGM=0;
17747   GNULIB_TIME_R=0;
17748     HAVE_DECL_LOCALTIME_R=1;
17749   HAVE_NANOSLEEP=1;
17750   HAVE_STRPTIME=1;
17751   HAVE_TIMEGM=1;
17752         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17753   REPLACE_MKTIME=GNULIB_PORTCHECK;
17754   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17755   REPLACE_TIMEGM=GNULIB_PORTCHECK;
17756
17757
17758
17759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17760 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17761 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17762   $as_echo_n "(cached) " >&6
17763 else
17764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17765 /* end confdefs.h.  */
17766 #include <time.h>
17767
17768 int
17769 main ()
17770 {
17771 static struct timespec x; x.tv_sec = x.tv_nsec;
17772   ;
17773   return 0;
17774 }
17775 _ACEOF
17776 if ac_fn_c_try_compile "$LINENO"; then :
17777   gl_cv_sys_struct_timespec_in_time_h=yes
17778 else
17779   gl_cv_sys_struct_timespec_in_time_h=no
17780 fi
17781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17782 fi
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17784 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17785
17786   TIME_H_DEFINES_STRUCT_TIMESPEC=0
17787   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17788   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17789   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17790     TIME_H_DEFINES_STRUCT_TIMESPEC=1
17791   else
17792     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17793 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17794 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17795   $as_echo_n "(cached) " >&6
17796 else
17797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17798 /* end confdefs.h.  */
17799 #include <sys/time.h>
17800
17801 int
17802 main ()
17803 {
17804 static struct timespec x; x.tv_sec = x.tv_nsec;
17805   ;
17806   return 0;
17807 }
17808 _ACEOF
17809 if ac_fn_c_try_compile "$LINENO"; then :
17810   gl_cv_sys_struct_timespec_in_sys_time_h=yes
17811 else
17812   gl_cv_sys_struct_timespec_in_sys_time_h=no
17813 fi
17814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17815 fi
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17817 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17818     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17819       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17820     else
17821       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17822 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17823 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17824   $as_echo_n "(cached) " >&6
17825 else
17826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17827 /* end confdefs.h.  */
17828 #include <pthread.h>
17829
17830 int
17831 main ()
17832 {
17833 static struct timespec x; x.tv_sec = x.tv_nsec;
17834   ;
17835   return 0;
17836 }
17837 _ACEOF
17838 if ac_fn_c_try_compile "$LINENO"; then :
17839   gl_cv_sys_struct_timespec_in_pthread_h=yes
17840 else
17841   gl_cv_sys_struct_timespec_in_pthread_h=no
17842 fi
17843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17844 fi
17845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17846 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17847       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17848         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17849       fi
17850     fi
17851   fi
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867      if test $gl_cv_have_include_next = yes; then
17868        gl_cv_next_time_h='<'time.h'>'
17869      else
17870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17871 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17872 if ${gl_cv_next_time_h+:} false; then :
17873   $as_echo_n "(cached) " >&6
17874 else
17875
17876                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17877 /* end confdefs.h.  */
17878 #include <time.h>
17879
17880 _ACEOF
17881                                                                                                                         case "$host_os" in
17882                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17883                  *)    gl_absname_cpp="$ac_cpp" ;;
17884                esac
17885
17886                case "$host_os" in
17887                  mingw*)
17888                                                                                                                                      gl_dirsep_regex='[/\\]'
17889                    ;;
17890                  *)
17891                    gl_dirsep_regex='\/'
17892                    ;;
17893                esac
17894                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17895
17896                gl_header_literal_regex=`echo 'time.h' \
17897                                         | sed -e "$gl_make_literal_regex_sed"`
17898                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17899                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17900                    s|^/[^/]|//&|
17901                    p
17902                    q
17903                  }'
17904                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17905                       sed -n "$gl_absolute_header_sed"`'"'
17906
17907
17908 fi
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17910 $as_echo "$gl_cv_next_time_h" >&6; }
17911      fi
17912      NEXT_TIME_H=$gl_cv_next_time_h
17913
17914      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17915        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17916        gl_next_as_first_directive='<'time.h'>'
17917      else
17918        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17919        gl_next_as_first_directive=$gl_cv_next_time_h
17920      fi
17921      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17922
17923
17924
17925
17926
17927
17928
17929
17930 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
17931 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
17932   ac_have_decl=1
17933 else
17934   ac_have_decl=0
17935 fi
17936
17937 cat >>confdefs.h <<_ACEOF
17938 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
17939 _ACEOF
17940
17941 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
17942 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
17943   ac_have_decl=1
17944 else
17945   ac_have_decl=0
17946 fi
17947
17948 cat >>confdefs.h <<_ACEOF
17949 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
17950 _ACEOF
17951
17952 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
17953 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
17954   ac_have_decl=1
17955 else
17956   ac_have_decl=0
17957 fi
17958
17959 cat >>confdefs.h <<_ACEOF
17960 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
17961 _ACEOF
17962
17963 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
17964 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
17965   ac_have_decl=1
17966 else
17967   ac_have_decl=0
17968 fi
17969
17970 cat >>confdefs.h <<_ACEOF
17971 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
17972 _ACEOF
17973
17974 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
17975 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
17976   ac_have_decl=1
17977 else
17978   ac_have_decl=0
17979 fi
17980
17981 cat >>confdefs.h <<_ACEOF
17982 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
17983 _ACEOF
17984
17985 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
17986 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
17987   ac_have_decl=1
17988 else
17989   ac_have_decl=0
17990 fi
17991
17992 cat >>confdefs.h <<_ACEOF
17993 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
17994 _ACEOF
17995
17996 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
17997 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
17998   ac_have_decl=1
17999 else
18000   ac_have_decl=0
18001 fi
18002
18003 cat >>confdefs.h <<_ACEOF
18004 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
18005 _ACEOF
18006
18007 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
18008 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
18009   ac_have_decl=1
18010 else
18011   ac_have_decl=0
18012 fi
18013
18014 cat >>confdefs.h <<_ACEOF
18015 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
18016 _ACEOF
18017
18018 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
18019 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
18020   ac_have_decl=1
18021 else
18022   ac_have_decl=0
18023 fi
18024
18025 cat >>confdefs.h <<_ACEOF
18026 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
18027 _ACEOF
18028
18029 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
18030 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
18031   ac_have_decl=1
18032 else
18033   ac_have_decl=0
18034 fi
18035
18036 cat >>confdefs.h <<_ACEOF
18037 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
18038 _ACEOF
18039
18040 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
18041 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
18042   ac_have_decl=1
18043 else
18044   ac_have_decl=0
18045 fi
18046
18047 cat >>confdefs.h <<_ACEOF
18048 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
18049 _ACEOF
18050
18051 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
18052 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
18053   ac_have_decl=1
18054 else
18055   ac_have_decl=0
18056 fi
18057
18058 cat >>confdefs.h <<_ACEOF
18059 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
18060 _ACEOF
18061
18062
18063
18064
18065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
18066 $as_echo_n "checking for wint_t... " >&6; }
18067 if ${gt_cv_c_wint_t+:} false; then :
18068   $as_echo_n "(cached) " >&6
18069 else
18070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18071 /* end confdefs.h.  */
18072
18073 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
18074    <wchar.h>.
18075    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
18076    before <wchar.h>.  */
18077 #include <stddef.h>
18078 #include <stdio.h>
18079 #include <time.h>
18080 #include <wchar.h>
18081             wint_t foo = (wchar_t)'\0';
18082 int
18083 main ()
18084 {
18085
18086   ;
18087   return 0;
18088 }
18089 _ACEOF
18090 if ac_fn_c_try_compile "$LINENO"; then :
18091   gt_cv_c_wint_t=yes
18092 else
18093   gt_cv_c_wint_t=no
18094 fi
18095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18096 fi
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
18098 $as_echo "$gt_cv_c_wint_t" >&6; }
18099   if test $gt_cv_c_wint_t = yes; then
18100
18101 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
18102
18103   fi
18104
18105
18106
18107
18108
18109   if test $ac_cv_header_features_h = yes; then
18110     HAVE_FEATURES_H=1
18111   else
18112     HAVE_FEATURES_H=0
18113   fi
18114
18115
18116
18117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
18118 $as_echo_n "checking for inttypes.h... " >&6; }
18119 if ${gl_cv_header_inttypes_h+:} false; then :
18120   $as_echo_n "(cached) " >&6
18121 else
18122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18123 /* end confdefs.h.  */
18124
18125 #include <sys/types.h>
18126 #include <inttypes.h>
18127
18128 int
18129 main ()
18130 {
18131 uintmax_t i = (uintmax_t) -1; return !i;
18132   ;
18133   return 0;
18134 }
18135 _ACEOF
18136 if ac_fn_c_try_compile "$LINENO"; then :
18137   gl_cv_header_inttypes_h=yes
18138 else
18139   gl_cv_header_inttypes_h=no
18140 fi
18141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18142 fi
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
18144 $as_echo "$gl_cv_header_inttypes_h" >&6; }
18145   if test $gl_cv_header_inttypes_h = yes; then
18146
18147 cat >>confdefs.h <<_ACEOF
18148 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
18149 _ACEOF
18150
18151   fi
18152
18153
18154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
18155 $as_echo_n "checking for stdint.h... " >&6; }
18156 if ${gl_cv_header_stdint_h+:} false; then :
18157   $as_echo_n "(cached) " >&6
18158 else
18159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18160 /* end confdefs.h.  */
18161 #include <sys/types.h>
18162             #include <stdint.h>
18163 int
18164 main ()
18165 {
18166 uintmax_t i = (uintmax_t) -1; return !i;
18167   ;
18168   return 0;
18169 }
18170 _ACEOF
18171 if ac_fn_c_try_compile "$LINENO"; then :
18172   gl_cv_header_stdint_h=yes
18173 else
18174   gl_cv_header_stdint_h=no
18175 fi
18176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18177 fi
18178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
18179 $as_echo "$gl_cv_header_stdint_h" >&6; }
18180   if test $gl_cv_header_stdint_h = yes; then
18181
18182 cat >>confdefs.h <<_ACEOF
18183 #define HAVE_STDINT_H_WITH_UINTMAX 1
18184 _ACEOF
18185
18186   fi
18187
18188
18189
18190
18191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
18192 $as_echo_n "checking for intmax_t... " >&6; }
18193 if ${gt_cv_c_intmax_t+:} false; then :
18194   $as_echo_n "(cached) " >&6
18195 else
18196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18197 /* end confdefs.h.  */
18198
18199 #include <stddef.h>
18200 #include <stdlib.h>
18201 #if HAVE_STDINT_H_WITH_UINTMAX
18202 #include <stdint.h>
18203 #endif
18204 #if HAVE_INTTYPES_H_WITH_UINTMAX
18205 #include <inttypes.h>
18206 #endif
18207
18208 int
18209 main ()
18210 {
18211 intmax_t x = -1; return !x;
18212   ;
18213   return 0;
18214 }
18215 _ACEOF
18216 if ac_fn_c_try_compile "$LINENO"; then :
18217   gt_cv_c_intmax_t=yes
18218 else
18219   gt_cv_c_intmax_t=no
18220 fi
18221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18222 fi
18223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
18224 $as_echo "$gt_cv_c_intmax_t" >&6; }
18225   if test $gt_cv_c_intmax_t = yes; then
18226
18227 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
18228
18229   else
18230
18231     test $ac_cv_type_long_long_int = yes \
18232       && ac_type='long long' \
18233       || ac_type='long'
18234
18235 cat >>confdefs.h <<_ACEOF
18236 #define intmax_t $ac_type
18237 _ACEOF
18238
18239   fi
18240
18241
18242
18243
18244
18245
18246   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
18247 do :
18248   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18249 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18250 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18251   cat >>confdefs.h <<_ACEOF
18252 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18253 _ACEOF
18254
18255 fi
18256 done
18257
18258       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
18259 "
18260 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
18261   ac_have_decl=1
18262 else
18263   ac_have_decl=0
18264 fi
18265
18266 cat >>confdefs.h <<_ACEOF
18267 #define HAVE_DECL__SNPRINTF $ac_have_decl
18268 _ACEOF
18269
18270
18271
18272   case "$gl_cv_func_snprintf_retval_c99" in
18273     *yes)
18274
18275 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
18276
18277       ;;
18278   esac
18279
18280
18281
18282
18283
18284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
18285 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
18286 if ${gl_cv_func_printf_sizes_c99+:} false; then :
18287   $as_echo_n "(cached) " >&6
18288 else
18289
18290       if test "$cross_compiling" = yes; then :
18291
18292          case "$host_os" in
18293                                  # Guess yes on glibc systems.
18294            *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
18295                                  # Guess yes on FreeBSD >= 5.
18296            freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
18297            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
18298                                  # Guess yes on Mac OS X >= 10.3.
18299            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
18300            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
18301                                  # Guess yes on OpenBSD >= 3.9.
18302            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18303                                  gl_cv_func_printf_sizes_c99="guessing no";;
18304            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
18305                                  # Guess yes on Solaris >= 2.10.
18306            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
18307            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
18308                                  # Guess yes on NetBSD >= 3.
18309            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18310                                  gl_cv_func_printf_sizes_c99="guessing no";;
18311            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
18312                                  # If we don't know, assume the worst.
18313            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
18314          esac
18315
18316 else
18317   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318 /* end confdefs.h.  */
18319
18320 #include <stddef.h>
18321 #include <stdio.h>
18322 #include <string.h>
18323 #include <sys/types.h>
18324 #if HAVE_STDINT_H_WITH_UINTMAX
18325 # include <stdint.h>
18326 #endif
18327 #if HAVE_INTTYPES_H_WITH_UINTMAX
18328 # include <inttypes.h>
18329 #endif
18330 static char buf[100];
18331 int main ()
18332 {
18333   int result = 0;
18334 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
18335   buf[0] = '\0';
18336   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
18337       || strcmp (buf, "12345671 33") != 0)
18338     result |= 1;
18339 #endif
18340   buf[0] = '\0';
18341   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
18342       || strcmp (buf, "12345672 33") != 0)
18343     result |= 2;
18344   buf[0] = '\0';
18345   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
18346       || strcmp (buf, "12345673 33") != 0)
18347     result |= 4;
18348   buf[0] = '\0';
18349   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
18350       || strcmp (buf, "1.5 33") != 0)
18351     result |= 8;
18352   return result;
18353 }
18354 _ACEOF
18355 if ac_fn_c_try_run "$LINENO"; then :
18356   gl_cv_func_printf_sizes_c99=yes
18357 else
18358   gl_cv_func_printf_sizes_c99=no
18359 fi
18360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18361   conftest.$ac_objext conftest.beam conftest.$ac_ext
18362 fi
18363
18364
18365 fi
18366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
18367 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
18368
18369
18370
18371      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
18372 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
18373 if ${gl_cv_func_printf_long_double+:} false; then :
18374   $as_echo_n "(cached) " >&6
18375 else
18376
18377       if test "$cross_compiling" = yes; then :
18378
18379          case "$host_os" in
18380            beos*)        gl_cv_func_printf_long_double="guessing no";;
18381            mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
18382            *)            gl_cv_func_printf_long_double="guessing yes";;
18383          esac
18384
18385 else
18386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18387 /* end confdefs.h.  */
18388
18389 #include <stdio.h>
18390 #include <string.h>
18391 static char buf[10000];
18392 int main ()
18393 {
18394   int result = 0;
18395   buf[0] = '\0';
18396   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
18397       || strcmp (buf, "1.750000 33") != 0)
18398     result |= 1;
18399   buf[0] = '\0';
18400   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
18401       || strcmp (buf, "1.750000e+00 33") != 0)
18402     result |= 2;
18403   buf[0] = '\0';
18404   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
18405       || strcmp (buf, "1.75 33") != 0)
18406     result |= 4;
18407   return result;
18408 }
18409 _ACEOF
18410 if ac_fn_c_try_run "$LINENO"; then :
18411   gl_cv_func_printf_long_double=yes
18412 else
18413   gl_cv_func_printf_long_double=no
18414 fi
18415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18416   conftest.$ac_objext conftest.beam conftest.$ac_ext
18417 fi
18418
18419
18420 fi
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
18422 $as_echo "$gl_cv_func_printf_long_double" >&6; }
18423
18424
18425
18426      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
18427 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
18428 if ${gl_cv_func_printf_infinite+:} false; then :
18429   $as_echo_n "(cached) " >&6
18430 else
18431
18432       if test "$cross_compiling" = yes; then :
18433
18434          case "$host_os" in
18435                                  # Guess yes on glibc systems.
18436            *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
18437                                  # Guess yes on FreeBSD >= 6.
18438            freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
18439            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
18440                                  # Guess yes on Mac OS X >= 10.3.
18441            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
18442            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
18443                                  # Guess yes on HP-UX >= 11.
18444            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
18445            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
18446                                  # Guess yes on NetBSD >= 3.
18447            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18448                                  gl_cv_func_printf_infinite="guessing no";;
18449            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
18450                                  # Guess yes on BeOS.
18451            beos*)                gl_cv_func_printf_infinite="guessing yes";;
18452                                  # If we don't know, assume the worst.
18453            *)                    gl_cv_func_printf_infinite="guessing no";;
18454          esac
18455
18456 else
18457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18458 /* end confdefs.h.  */
18459
18460 #include <stdio.h>
18461 #include <string.h>
18462 static int
18463 strisnan (const char *string, size_t start_index, size_t end_index)
18464 {
18465   if (start_index < end_index)
18466     {
18467       if (string[start_index] == '-')
18468         start_index++;
18469       if (start_index + 3 <= end_index
18470           && memcmp (string + start_index, "nan", 3) == 0)
18471         {
18472           start_index += 3;
18473           if (start_index == end_index
18474               || (string[start_index] == '(' && string[end_index - 1] == ')'))
18475             return 1;
18476         }
18477     }
18478   return 0;
18479 }
18480 static int
18481 have_minus_zero ()
18482 {
18483   static double plus_zero = 0.0;
18484   double minus_zero = - plus_zero;
18485   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
18486 }
18487 static char buf[10000];
18488 static double zero = 0.0;
18489 int main ()
18490 {
18491   int result = 0;
18492   if (sprintf (buf, "%f", 1.0 / zero) < 0
18493       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18494     result |= 1;
18495   if (sprintf (buf, "%f", -1.0 / zero) < 0
18496       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18497     result |= 1;
18498   if (sprintf (buf, "%f", zero / zero) < 0
18499       || !strisnan (buf, 0, strlen (buf)))
18500     result |= 2;
18501   if (sprintf (buf, "%e", 1.0 / zero) < 0
18502       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18503     result |= 4;
18504   if (sprintf (buf, "%e", -1.0 / zero) < 0
18505       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18506     result |= 4;
18507   if (sprintf (buf, "%e", zero / zero) < 0
18508       || !strisnan (buf, 0, strlen (buf)))
18509     result |= 8;
18510   if (sprintf (buf, "%g", 1.0 / zero) < 0
18511       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18512     result |= 16;
18513   if (sprintf (buf, "%g", -1.0 / zero) < 0
18514       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18515     result |= 16;
18516   if (sprintf (buf, "%g", zero / zero) < 0
18517       || !strisnan (buf, 0, strlen (buf)))
18518     result |= 32;
18519   /* This test fails on HP-UX 10.20.  */
18520   if (have_minus_zero ())
18521     if (sprintf (buf, "%g", - zero) < 0
18522         || strcmp (buf, "-0") != 0)
18523     result |= 64;
18524   return result;
18525 }
18526 _ACEOF
18527 if ac_fn_c_try_run "$LINENO"; then :
18528   gl_cv_func_printf_infinite=yes
18529 else
18530   gl_cv_func_printf_infinite=no
18531 fi
18532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18533   conftest.$ac_objext conftest.beam conftest.$ac_ext
18534 fi
18535
18536
18537 fi
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
18539 $as_echo "$gl_cv_func_printf_infinite" >&6; }
18540
18541
18542
18543
18544
18545
18546          if test -n "$gl_printf_safe"; then
18547
18548 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
18549
18550   fi
18551   case "$gl_cv_func_printf_long_double" in
18552     *yes)
18553       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
18554 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
18555 if ${gl_cv_func_printf_infinite_long_double+:} false; then :
18556   $as_echo_n "(cached) " >&6
18557 else
18558
18559           if test "$cross_compiling" = yes; then :
18560
18561              case "$host_cpu" in
18562                                      # Guess no on ia64, x86_64, i386.
18563                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
18564                *)
18565                  case "$host_os" in
18566                                          # Guess yes on glibc systems.
18567                    *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
18568                                          # Guess yes on FreeBSD >= 6.
18569                    freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
18570                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
18571                                          # Guess yes on HP-UX >= 11.
18572                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
18573                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
18574                                          # If we don't know, assume the worst.
18575                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
18576                  esac
18577                  ;;
18578              esac
18579
18580 else
18581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18582 /* end confdefs.h.  */
18583
18584
18585 #include <stdlib.h>
18586 #if defined __MACH__ && defined __APPLE__
18587 /* Avoid a crash on Mac OS X.  */
18588 #include <mach/mach.h>
18589 #include <mach/mach_error.h>
18590 #include <mach/thread_status.h>
18591 #include <mach/exception.h>
18592 #include <mach/task.h>
18593 #include <pthread.h>
18594 /* The exception port on which our thread listens.  */
18595 static mach_port_t our_exception_port;
18596 /* The main function of the thread listening for exceptions of type
18597    EXC_BAD_ACCESS.  */
18598 static void *
18599 mach_exception_thread (void *arg)
18600 {
18601   /* Buffer for a message to be received.  */
18602   struct {
18603     mach_msg_header_t head;
18604     mach_msg_body_t msgh_body;
18605     char data[1024];
18606   } msg;
18607   mach_msg_return_t retval;
18608   /* Wait for a message on the exception port.  */
18609   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18610                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18611   if (retval != MACH_MSG_SUCCESS)
18612     abort ();
18613   exit (1);
18614 }
18615 static void
18616 nocrash_init (void)
18617 {
18618   mach_port_t self = mach_task_self ();
18619   /* Allocate a port on which the thread shall listen for exceptions.  */
18620   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18621       == KERN_SUCCESS) {
18622     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
18623     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18624                                 MACH_MSG_TYPE_MAKE_SEND)
18625         == KERN_SUCCESS) {
18626       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
18627          for us.  */
18628       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18629       /* Create the thread listening on the exception port.  */
18630       pthread_attr_t attr;
18631       pthread_t thread;
18632       if (pthread_attr_init (&attr) == 0
18633           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18634           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18635         pthread_attr_destroy (&attr);
18636         /* Replace the exception port info for these exceptions with our own.
18637            Note that we replace the exception port for the entire task, not only
18638            for a particular thread.  This has the effect that when our exception
18639            port gets the message, the thread specific exception port has already
18640            been asked, and we don't need to bother about it.
18641            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
18642         task_set_exception_ports (self, mask, our_exception_port,
18643                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
18644       }
18645     }
18646   }
18647 }
18648 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18649 /* Avoid a crash on native Windows.  */
18650 #define WIN32_LEAN_AND_MEAN
18651 #include <windows.h>
18652 #include <winerror.h>
18653 static LONG WINAPI
18654 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
18655 {
18656   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
18657     {
18658     case EXCEPTION_ACCESS_VIOLATION:
18659     case EXCEPTION_IN_PAGE_ERROR:
18660     case EXCEPTION_STACK_OVERFLOW:
18661     case EXCEPTION_GUARD_PAGE:
18662     case EXCEPTION_PRIV_INSTRUCTION:
18663     case EXCEPTION_ILLEGAL_INSTRUCTION:
18664     case EXCEPTION_DATATYPE_MISALIGNMENT:
18665     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
18666     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
18667       exit (1);
18668     }
18669   return EXCEPTION_CONTINUE_SEARCH;
18670 }
18671 static void
18672 nocrash_init (void)
18673 {
18674   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
18675 }
18676 #else
18677 /* Avoid a crash on POSIX systems.  */
18678 #include <signal.h>
18679 /* A POSIX signal handler.  */
18680 static void
18681 exception_handler (int sig)
18682 {
18683   exit (1);
18684 }
18685 static void
18686 nocrash_init (void)
18687 {
18688 #ifdef SIGSEGV
18689   signal (SIGSEGV, exception_handler);
18690 #endif
18691 #ifdef SIGBUS
18692   signal (SIGBUS, exception_handler);
18693 #endif
18694 }
18695 #endif
18696
18697 #include <float.h>
18698 #include <stdio.h>
18699 #include <string.h>
18700 static int
18701 strisnan (const char *string, size_t start_index, size_t end_index)
18702 {
18703   if (start_index < end_index)
18704     {
18705       if (string[start_index] == '-')
18706         start_index++;
18707       if (start_index + 3 <= end_index
18708           && memcmp (string + start_index, "nan", 3) == 0)
18709         {
18710           start_index += 3;
18711           if (start_index == end_index
18712               || (string[start_index] == '(' && string[end_index - 1] == ')'))
18713             return 1;
18714         }
18715     }
18716   return 0;
18717 }
18718 static char buf[10000];
18719 static long double zeroL = 0.0L;
18720 int main ()
18721 {
18722   int result = 0;
18723   nocrash_init();
18724   if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
18725       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18726     result |= 1;
18727   if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
18728       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18729     result |= 1;
18730   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
18731       || !strisnan (buf, 0, strlen (buf)))
18732     result |= 1;
18733   if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
18734       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18735     result |= 1;
18736   if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
18737       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18738     result |= 1;
18739   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
18740       || !strisnan (buf, 0, strlen (buf)))
18741     result |= 1;
18742   if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
18743       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
18744     result |= 1;
18745   if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
18746       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
18747     result |= 1;
18748   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
18749       || !strisnan (buf, 0, strlen (buf)))
18750     result |= 1;
18751 #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
18752 /* Representation of an 80-bit 'long double' as an initializer for a sequence
18753    of 'unsigned int' words.  */
18754 # ifdef WORDS_BIGENDIAN
18755 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
18756      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
18757        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
18758        (unsigned int) (mantlo) << 16                                        \
18759      }
18760 # else
18761 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
18762      { mantlo, manthi, exponent }
18763 # endif
18764   { /* Quiet NaN.  */
18765     static union { unsigned int word[4]; long double value; } x =
18766       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
18767     if (sprintf (buf, "%Lf", x.value) < 0
18768         || !strisnan (buf, 0, strlen (buf)))
18769       result |= 2;
18770     if (sprintf (buf, "%Le", x.value) < 0
18771         || !strisnan (buf, 0, strlen (buf)))
18772       result |= 2;
18773     if (sprintf (buf, "%Lg", x.value) < 0
18774         || !strisnan (buf, 0, strlen (buf)))
18775       result |= 2;
18776   }
18777   {
18778     /* Signalling NaN.  */
18779     static union { unsigned int word[4]; long double value; } x =
18780       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
18781     if (sprintf (buf, "%Lf", x.value) < 0
18782         || !strisnan (buf, 0, strlen (buf)))
18783       result |= 2;
18784     if (sprintf (buf, "%Le", x.value) < 0
18785         || !strisnan (buf, 0, strlen (buf)))
18786       result |= 2;
18787     if (sprintf (buf, "%Lg", x.value) < 0
18788         || !strisnan (buf, 0, strlen (buf)))
18789       result |= 2;
18790   }
18791   { /* Pseudo-NaN.  */
18792     static union { unsigned int word[4]; long double value; } x =
18793       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
18794     if (sprintf (buf, "%Lf", x.value) < 0
18795         || !strisnan (buf, 0, strlen (buf)))
18796       result |= 4;
18797     if (sprintf (buf, "%Le", x.value) < 0
18798         || !strisnan (buf, 0, strlen (buf)))
18799       result |= 4;
18800     if (sprintf (buf, "%Lg", x.value) < 0
18801         || !strisnan (buf, 0, strlen (buf)))
18802       result |= 4;
18803   }
18804   { /* Pseudo-Infinity.  */
18805     static union { unsigned int word[4]; long double value; } x =
18806       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
18807     if (sprintf (buf, "%Lf", x.value) < 0
18808         || !strisnan (buf, 0, strlen (buf)))
18809       result |= 8;
18810     if (sprintf (buf, "%Le", x.value) < 0
18811         || !strisnan (buf, 0, strlen (buf)))
18812       result |= 8;
18813     if (sprintf (buf, "%Lg", x.value) < 0
18814         || !strisnan (buf, 0, strlen (buf)))
18815       result |= 8;
18816   }
18817   { /* Pseudo-Zero.  */
18818     static union { unsigned int word[4]; long double value; } x =
18819       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
18820     if (sprintf (buf, "%Lf", x.value) < 0
18821         || !strisnan (buf, 0, strlen (buf)))
18822       result |= 16;
18823     if (sprintf (buf, "%Le", x.value) < 0
18824         || !strisnan (buf, 0, strlen (buf)))
18825       result |= 16;
18826     if (sprintf (buf, "%Lg", x.value) < 0
18827         || !strisnan (buf, 0, strlen (buf)))
18828       result |= 16;
18829   }
18830   { /* Unnormalized number.  */
18831     static union { unsigned int word[4]; long double value; } x =
18832       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
18833     if (sprintf (buf, "%Lf", x.value) < 0
18834         || !strisnan (buf, 0, strlen (buf)))
18835       result |= 32;
18836     if (sprintf (buf, "%Le", x.value) < 0
18837         || !strisnan (buf, 0, strlen (buf)))
18838       result |= 32;
18839     if (sprintf (buf, "%Lg", x.value) < 0
18840         || !strisnan (buf, 0, strlen (buf)))
18841       result |= 32;
18842   }
18843   { /* Pseudo-Denormal.  */
18844     static union { unsigned int word[4]; long double value; } x =
18845       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
18846     if (sprintf (buf, "%Lf", x.value) < 0
18847         || !strisnan (buf, 0, strlen (buf)))
18848       result |= 64;
18849     if (sprintf (buf, "%Le", x.value) < 0
18850         || !strisnan (buf, 0, strlen (buf)))
18851       result |= 64;
18852     if (sprintf (buf, "%Lg", x.value) < 0
18853         || !strisnan (buf, 0, strlen (buf)))
18854       result |= 64;
18855   }
18856 #endif
18857   return result;
18858 }
18859 _ACEOF
18860 if ac_fn_c_try_run "$LINENO"; then :
18861   gl_cv_func_printf_infinite_long_double=yes
18862 else
18863   gl_cv_func_printf_infinite_long_double=no
18864 fi
18865 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18866   conftest.$ac_objext conftest.beam conftest.$ac_ext
18867 fi
18868
18869
18870 fi
18871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
18872 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
18873       ;;
18874     *)
18875       gl_cv_func_printf_infinite_long_double="irrelevant"
18876       ;;
18877   esac
18878
18879
18880
18881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
18882 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
18883 if ${gl_cv_func_printf_directive_a+:} false; then :
18884   $as_echo_n "(cached) " >&6
18885 else
18886
18887       if test "$cross_compiling" = yes; then :
18888
18889          case "$host_os" in
18890                                  # Guess yes on glibc >= 2.5 systems.
18891            *-gnu*)
18892              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18893 /* end confdefs.h.  */
18894
18895                #include <features.h>
18896                #ifdef __GNU_LIBRARY__
18897                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
18898                  BZ2908
18899                 #endif
18900                #endif
18901
18902 _ACEOF
18903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18904   $EGREP "BZ2908" >/dev/null 2>&1; then :
18905   gl_cv_func_printf_directive_a="guessing yes"
18906 else
18907   gl_cv_func_printf_directive_a="guessing no"
18908 fi
18909 rm -f conftest*
18910
18911              ;;
18912                                  # If we don't know, assume the worst.
18913            *)                    gl_cv_func_printf_directive_a="guessing no";;
18914          esac
18915
18916 else
18917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18918 /* end confdefs.h.  */
18919
18920 #include <stdio.h>
18921 #include <string.h>
18922 static char buf[100];
18923 static double zero = 0.0;
18924 int main ()
18925 {
18926   int result = 0;
18927   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
18928       || (strcmp (buf, "0x1.922p+1 33") != 0
18929           && strcmp (buf, "0x3.244p+0 33") != 0
18930           && strcmp (buf, "0x6.488p-1 33") != 0
18931           && strcmp (buf, "0xc.91p-2 33") != 0))
18932     result |= 1;
18933   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
18934       || (strcmp (buf, "-0X1.922P+1 33") != 0
18935           && strcmp (buf, "-0X3.244P+0 33") != 0
18936           && strcmp (buf, "-0X6.488P-1 33") != 0
18937           && strcmp (buf, "-0XC.91P-2 33") != 0))
18938     result |= 2;
18939   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
18940   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
18941       || (strcmp (buf, "0x1.83p+0 33") != 0
18942           && strcmp (buf, "0x3.05p-1 33") != 0
18943           && strcmp (buf, "0x6.0ap-2 33") != 0
18944           && strcmp (buf, "0xc.14p-3 33") != 0))
18945     result |= 4;
18946   /* This catches a FreeBSD 6.1 bug.  See
18947      <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
18948   if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
18949       || buf[0] == '0')
18950     result |= 8;
18951   /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug.  */
18952   if (sprintf (buf, "%.1a", 1.999) < 0
18953       || (strcmp (buf, "0x1.0p+1") != 0
18954           && strcmp (buf, "0x2.0p+0") != 0
18955           && strcmp (buf, "0x4.0p-1") != 0
18956           && strcmp (buf, "0x8.0p-2") != 0))
18957     result |= 16;
18958   /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
18959      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
18960   if (sprintf (buf, "%.1La", 1.999L) < 0
18961       || (strcmp (buf, "0x1.0p+1") != 0
18962           && strcmp (buf, "0x2.0p+0") != 0
18963           && strcmp (buf, "0x4.0p-1") != 0
18964           && strcmp (buf, "0x8.0p-2") != 0))
18965     result |= 32;
18966   return result;
18967 }
18968 _ACEOF
18969 if ac_fn_c_try_run "$LINENO"; then :
18970   gl_cv_func_printf_directive_a=yes
18971 else
18972   gl_cv_func_printf_directive_a=no
18973 fi
18974 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18975   conftest.$ac_objext conftest.beam conftest.$ac_ext
18976 fi
18977
18978
18979 fi
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
18981 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
18982
18983
18984
18985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
18986 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
18987 if ${gl_cv_func_printf_directive_f+:} false; then :
18988   $as_echo_n "(cached) " >&6
18989 else
18990
18991       if test "$cross_compiling" = yes; then :
18992
18993          case "$host_os" in
18994                                  # Guess yes on glibc systems.
18995            *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
18996                                  # Guess yes on FreeBSD >= 6.
18997            freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
18998            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
18999                                  # Guess yes on Mac OS X >= 10.3.
19000            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
19001            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
19002                                  # Guess yes on Solaris >= 2.10.
19003            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
19004            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
19005                                  # If we don't know, assume the worst.
19006            *)                    gl_cv_func_printf_directive_f="guessing no";;
19007          esac
19008
19009 else
19010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19011 /* end confdefs.h.  */
19012
19013 #include <stdio.h>
19014 #include <string.h>
19015 static char buf[100];
19016 static double zero = 0.0;
19017 int main ()
19018 {
19019   int result = 0;
19020   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
19021       || strcmp (buf, "1234567.000000 33") != 0)
19022     result |= 1;
19023   if (sprintf (buf, "%F", 1.0 / zero) < 0
19024       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
19025     result |= 2;
19026   /* This catches a Cygwin 1.5.x bug.  */
19027   if (sprintf (buf, "%.F", 1234.0) < 0
19028       || strcmp (buf, "1234") != 0)
19029     result |= 4;
19030   return result;
19031 }
19032 _ACEOF
19033 if ac_fn_c_try_run "$LINENO"; then :
19034   gl_cv_func_printf_directive_f=yes
19035 else
19036   gl_cv_func_printf_directive_f=no
19037 fi
19038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19039   conftest.$ac_objext conftest.beam conftest.$ac_ext
19040 fi
19041
19042
19043 fi
19044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
19045 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
19046
19047
19048
19049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
19050 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
19051 if ${gl_cv_func_printf_directive_n+:} false; then :
19052   $as_echo_n "(cached) " >&6
19053 else
19054
19055       if test "$cross_compiling" = yes; then :
19056
19057          case "$host_os" in
19058            mingw*) gl_cv_func_printf_directive_n="guessing no";;
19059            *)      gl_cv_func_printf_directive_n="guessing yes";;
19060          esac
19061
19062 else
19063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19064 /* end confdefs.h.  */
19065
19066 #include <stdio.h>
19067 #include <stdlib.h>
19068 #include <string.h>
19069 #ifdef _MSC_VER
19070 /* See page about "Parameter Validation" on msdn.microsoft.com.  */
19071 static void cdecl
19072 invalid_parameter_handler (const wchar_t *expression,
19073                            const wchar_t *function,
19074                            const wchar_t *file, unsigned int line,
19075                            uintptr_t dummy)
19076 {
19077   exit (1);
19078 }
19079 #endif
19080 static char fmtstring[10];
19081 static char buf[100];
19082 int main ()
19083 {
19084   int count = -1;
19085 #ifdef _MSC_VER
19086   _set_invalid_parameter_handler (invalid_parameter_handler);
19087 #endif
19088   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
19089      support %n in format strings in read-only memory but not in writable
19090      memory.  */
19091   strcpy (fmtstring, "%d %n");
19092   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
19093       || strcmp (buf, "123 ") != 0
19094       || count != 4)
19095     return 1;
19096   return 0;
19097 }
19098 _ACEOF
19099 if ac_fn_c_try_run "$LINENO"; then :
19100   gl_cv_func_printf_directive_n=yes
19101 else
19102   gl_cv_func_printf_directive_n=no
19103 fi
19104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19105   conftest.$ac_objext conftest.beam conftest.$ac_ext
19106 fi
19107
19108
19109 fi
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
19111 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
19112
19113
19114
19115      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
19116 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
19117 if ${gl_cv_func_printf_directive_ls+:} false; then :
19118   $as_echo_n "(cached) " >&6
19119 else
19120
19121       if test "$cross_compiling" = yes; then :
19122
19123          case "$host_os" in
19124            openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
19125            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
19126            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
19127            cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
19128            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
19129            *)               gl_cv_func_printf_directive_ls="guessing yes";;
19130          esac
19131
19132 else
19133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134 /* end confdefs.h.  */
19135
19136 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19137    <wchar.h>.
19138    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19139    included before <wchar.h>.  */
19140 #include <stddef.h>
19141 #include <stdio.h>
19142 #include <time.h>
19143 #include <wchar.h>
19144 #include <string.h>
19145 int main ()
19146 {
19147   int result = 0;
19148   char buf[100];
19149   /* Test whether %ls works at all.
19150      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
19151      Cygwin 1.5.  */
19152   {
19153     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
19154     buf[0] = '\0';
19155     if (sprintf (buf, "%ls", wstring) < 0
19156         || strcmp (buf, "abc") != 0)
19157       result |= 1;
19158   }
19159   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
19160      assertion failure inside libc), but not on OpenBSD 4.0.  */
19161   {
19162     static const wchar_t wstring[] = { 'a', 0 };
19163     buf[0] = '\0';
19164     if (sprintf (buf, "%ls", wstring) < 0
19165         || strcmp (buf, "a") != 0)
19166       result |= 2;
19167   }
19168   /* Test whether precisions in %ls are supported as specified in ISO C 99
19169      section 7.19.6.1:
19170        "If a precision is specified, no more than that many bytes are written
19171         (including shift sequences, if any), and the array shall contain a
19172         null wide character if, to equal the multibyte character sequence
19173         length given by the precision, the function would need to access a
19174         wide character one past the end of the array."
19175      This test fails on Solaris 10.  */
19176   {
19177     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
19178     buf[0] = '\0';
19179     if (sprintf (buf, "%.2ls", wstring) < 0
19180         || strcmp (buf, "ab") != 0)
19181       result |= 8;
19182   }
19183   return result;
19184 }
19185 _ACEOF
19186 if ac_fn_c_try_run "$LINENO"; then :
19187   gl_cv_func_printf_directive_ls=yes
19188 else
19189   gl_cv_func_printf_directive_ls=no
19190 fi
19191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19192   conftest.$ac_objext conftest.beam conftest.$ac_ext
19193 fi
19194
19195
19196 fi
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
19198 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
19199
19200
19201
19202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
19203 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
19204 if ${gl_cv_func_printf_flag_grouping+:} false; then :
19205   $as_echo_n "(cached) " >&6
19206 else
19207
19208       if test "$cross_compiling" = yes; then :
19209
19210          case "$host_os" in
19211            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
19212            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
19213            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
19214            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
19215          esac
19216
19217 else
19218   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19219 /* end confdefs.h.  */
19220
19221 #include <stdio.h>
19222 #include <string.h>
19223 static char buf[100];
19224 int main ()
19225 {
19226   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
19227       || buf[strlen (buf) - 1] != '9')
19228     return 1;
19229   return 0;
19230 }
19231 _ACEOF
19232 if ac_fn_c_try_run "$LINENO"; then :
19233   gl_cv_func_printf_flag_grouping=yes
19234 else
19235   gl_cv_func_printf_flag_grouping=no
19236 fi
19237 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19238   conftest.$ac_objext conftest.beam conftest.$ac_ext
19239 fi
19240
19241
19242 fi
19243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
19244 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
19245
19246
19247
19248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
19249 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
19250 if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
19251   $as_echo_n "(cached) " >&6
19252 else
19253
19254       if test "$cross_compiling" = yes; then :
19255
19256          case "$host_os" in
19257                     # Guess yes on HP-UX 11.
19258            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
19259                     # Guess no on HP-UX 10 and older.
19260            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
19261                     # Guess yes otherwise.
19262            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
19263          esac
19264
19265 else
19266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19267 /* end confdefs.h.  */
19268
19269 #include <stdio.h>
19270 #include <string.h>
19271 static char buf[100];
19272 int main ()
19273 {
19274   /* Check that a '-' flag is not annihilated by a negative width.  */
19275   if (sprintf (buf, "a%-*sc", -3, "b") < 0
19276       || strcmp (buf, "ab  c") != 0)
19277     return 1;
19278   return 0;
19279 }
19280 _ACEOF
19281 if ac_fn_c_try_run "$LINENO"; then :
19282   gl_cv_func_printf_flag_leftadjust=yes
19283 else
19284   gl_cv_func_printf_flag_leftadjust=no
19285 fi
19286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19287   conftest.$ac_objext conftest.beam conftest.$ac_ext
19288 fi
19289
19290
19291 fi
19292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
19293 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
19294
19295
19296
19297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
19298 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
19299 if ${gl_cv_func_printf_flag_zero+:} false; then :
19300   $as_echo_n "(cached) " >&6
19301 else
19302
19303       if test "$cross_compiling" = yes; then :
19304
19305          case "$host_os" in
19306                    # Guess yes on glibc systems.
19307            *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
19308                    # Guess yes on BeOS.
19309            beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
19310                    # If we don't know, assume the worst.
19311            *)      gl_cv_func_printf_flag_zero="guessing no";;
19312          esac
19313
19314 else
19315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316 /* end confdefs.h.  */
19317
19318 #include <stdio.h>
19319 #include <string.h>
19320 static char buf[100];
19321 static double zero = 0.0;
19322 int main ()
19323 {
19324   if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
19325       || (strcmp (buf, "       inf") != 0
19326           && strcmp (buf, "  infinity") != 0))
19327     return 1;
19328   return 0;
19329 }
19330 _ACEOF
19331 if ac_fn_c_try_run "$LINENO"; then :
19332   gl_cv_func_printf_flag_zero=yes
19333 else
19334   gl_cv_func_printf_flag_zero=no
19335 fi
19336 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19337   conftest.$ac_objext conftest.beam conftest.$ac_ext
19338 fi
19339
19340
19341 fi
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
19343 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
19344
19345
19346
19347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
19348 $as_echo_n "checking whether printf supports large precisions... " >&6; }
19349 if ${gl_cv_func_printf_precision+:} false; then :
19350   $as_echo_n "(cached) " >&6
19351 else
19352
19353       if test "$cross_compiling" = yes; then :
19354
19355          case "$host_os" in
19356            # Guess no only on Solaris, native Windows, and BeOS systems.
19357            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
19358            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
19359            beos*)        gl_cv_func_printf_precision="guessing no" ;;
19360            *)            gl_cv_func_printf_precision="guessing yes" ;;
19361          esac
19362
19363 else
19364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19365 /* end confdefs.h.  */
19366
19367 #include <stdio.h>
19368 #include <string.h>
19369 static char buf[5000];
19370 int main ()
19371 {
19372   int result = 0;
19373 #ifdef __BEOS__
19374   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
19375   return 1;
19376 #endif
19377   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
19378     result |= 1;
19379   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
19380     result |= 2;
19381   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
19382       || buf[0] != '1')
19383     result |= 4;
19384   if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
19385       || buf[0] != '1')
19386     result |= 4;
19387   return result;
19388 }
19389 _ACEOF
19390 if ac_fn_c_try_run "$LINENO"; then :
19391   gl_cv_func_printf_precision=yes
19392 else
19393   gl_cv_func_printf_precision=no
19394 fi
19395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19396   conftest.$ac_objext conftest.beam conftest.$ac_ext
19397 fi
19398
19399
19400 fi
19401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
19402 $as_echo "$gl_cv_func_printf_precision" >&6; }
19403
19404
19405
19406
19407      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
19408 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
19409 if ${gl_cv_func_printf_enomem+:} false; then :
19410   $as_echo_n "(cached) " >&6
19411 else
19412
19413       gl_cv_func_printf_enomem="guessing no"
19414       if test "$cross_compiling" = no; then
19415         if test $APPLE_UNIVERSAL_BUILD = 0; then
19416           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19417 /* end confdefs.h.  */
19418
19419
19420 #include <stdlib.h>
19421 #if defined __MACH__ && defined __APPLE__
19422 /* Avoid a crash on Mac OS X.  */
19423 #include <mach/mach.h>
19424 #include <mach/mach_error.h>
19425 #include <mach/thread_status.h>
19426 #include <mach/exception.h>
19427 #include <mach/task.h>
19428 #include <pthread.h>
19429 /* The exception port on which our thread listens.  */
19430 static mach_port_t our_exception_port;
19431 /* The main function of the thread listening for exceptions of type
19432    EXC_BAD_ACCESS.  */
19433 static void *
19434 mach_exception_thread (void *arg)
19435 {
19436   /* Buffer for a message to be received.  */
19437   struct {
19438     mach_msg_header_t head;
19439     mach_msg_body_t msgh_body;
19440     char data1024;
19441   } msg;
19442   mach_msg_return_t retval;
19443   /* Wait for a message on the exception port.  */
19444   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19445                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19446   if (retval != MACH_MSG_SUCCESS)
19447     abort ();
19448   exit (1);
19449 }
19450 static void
19451 nocrash_init (void)
19452 {
19453   mach_port_t self = mach_task_self ();
19454   /* Allocate a port on which the thread shall listen for exceptions.  */
19455   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19456       == KERN_SUCCESS) {
19457     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
19458     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19459                                 MACH_MSG_TYPE_MAKE_SEND)
19460         == KERN_SUCCESS) {
19461       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
19462          for us.  */
19463       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19464       /* Create the thread listening on the exception port.  */
19465       pthread_attr_t attr;
19466       pthread_t thread;
19467       if (pthread_attr_init (&attr) == 0
19468           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19469           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19470         pthread_attr_destroy (&attr);
19471         /* Replace the exception port info for these exceptions with our own.
19472            Note that we replace the exception port for the entire task, not only
19473            for a particular thread.  This has the effect that when our exception
19474            port gets the message, the thread specific exception port has already
19475            been asked, and we don't need to bother about it.
19476            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
19477         task_set_exception_ports (self, mask, our_exception_port,
19478                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19479       }
19480     }
19481   }
19482 }
19483 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19484 /* Avoid a crash on native Windows.  */
19485 #define WIN32_LEAN_AND_MEAN
19486 #include <windows.h>
19487 #include <winerror.h>
19488 static LONG WINAPI
19489 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19490 {
19491   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19492     {
19493     case EXCEPTION_ACCESS_VIOLATION:
19494     case EXCEPTION_IN_PAGE_ERROR:
19495     case EXCEPTION_STACK_OVERFLOW:
19496     case EXCEPTION_GUARD_PAGE:
19497     case EXCEPTION_PRIV_INSTRUCTION:
19498     case EXCEPTION_ILLEGAL_INSTRUCTION:
19499     case EXCEPTION_DATATYPE_MISALIGNMENT:
19500     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19501     case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19502       exit (1);
19503     }
19504   return EXCEPTION_CONTINUE_SEARCH;
19505 }
19506 static void
19507 nocrash_init (void)
19508 {
19509   SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19510 }
19511 #else
19512 /* Avoid a crash on POSIX systems.  */
19513 #include <signal.h>
19514 /* A POSIX signal handler.  */
19515 static void
19516 exception_handler (int sig)
19517 {
19518   exit (1);
19519 }
19520 static void
19521 nocrash_init (void)
19522 {
19523 #ifdef SIGSEGV
19524   signal (SIGSEGV, exception_handler);
19525 #endif
19526 #ifdef SIGBUS
19527   signal (SIGBUS, exception_handler);
19528 #endif
19529 }
19530 #endif
19531
19532 #include <stdio.h>
19533 #include <sys/types.h>
19534 #include <sys/time.h>
19535 #include <sys/resource.h>
19536 #include <errno.h>
19537 int main()
19538 {
19539   struct rlimit limit;
19540   int ret;
19541   nocrash_init ();
19542   /* Some printf implementations allocate temporary space with malloc.  */
19543   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
19544 #ifdef RLIMIT_DATA
19545   if (getrlimit (RLIMIT_DATA, &limit) < 0)
19546     return 77;
19547   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
19548     limit.rlim_max = 5000000;
19549   limit.rlim_cur = limit.rlim_max;
19550   if (setrlimit (RLIMIT_DATA, &limit) < 0)
19551     return 77;
19552 #endif
19553   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
19554 #ifdef RLIMIT_AS
19555   if (getrlimit (RLIMIT_AS, &limit) < 0)
19556     return 77;
19557   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
19558     limit.rlim_max = 5000000;
19559   limit.rlim_cur = limit.rlim_max;
19560   if (setrlimit (RLIMIT_AS, &limit) < 0)
19561     return 77;
19562 #endif
19563   /* Some printf implementations allocate temporary space on the stack.  */
19564 #ifdef RLIMIT_STACK
19565   if (getrlimit (RLIMIT_STACK, &limit) < 0)
19566     return 77;
19567   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
19568     limit.rlim_max = 5000000;
19569   limit.rlim_cur = limit.rlim_max;
19570   if (setrlimit (RLIMIT_STACK, &limit) < 0)
19571     return 77;
19572 #endif
19573   ret = printf ("%.5000000f", 1.0);
19574   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
19575 }
19576
19577 _ACEOF
19578           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19579   (eval $ac_link) 2>&5
19580   ac_status=$?
19581   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19582   test $ac_status = 0; } && test -s conftest$ac_exeext; then
19583             (./conftest 2>&5
19584              result=$?
19585              $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
19586              if test $result != 0 && test $result != 77; then result=1; fi
19587              exit $result
19588             ) >/dev/null 2>/dev/null
19589             case $? in
19590               0) gl_cv_func_printf_enomem="yes" ;;
19591               77) gl_cv_func_printf_enomem="guessing no" ;;
19592               *) gl_cv_func_printf_enomem="no" ;;
19593             esac
19594           else
19595             gl_cv_func_printf_enomem="guessing no"
19596           fi
19597           rm -fr conftest*
19598         else
19599                                         gl_cv_func_printf_enomem="guessing no"
19600         fi
19601       fi
19602       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
19603         case "$host_os" in
19604                     # Guess yes on glibc systems.
19605           *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
19606                     # Guess yes on Solaris.
19607           solaris*) gl_cv_func_printf_enomem="guessing yes";;
19608                     # Guess yes on AIX.
19609           aix*)     gl_cv_func_printf_enomem="guessing yes";;
19610                     # Guess yes on HP-UX/hppa.
19611           hpux*)    case "$host_cpu" in
19612                       hppa*) gl_cv_func_printf_enomem="guessing yes";;
19613                       *)     gl_cv_func_printf_enomem="guessing no";;
19614                     esac
19615                     ;;
19616                     # Guess yes on IRIX.
19617           irix*)    gl_cv_func_printf_enomem="guessing yes";;
19618                     # Guess yes on OSF/1.
19619           osf*)     gl_cv_func_printf_enomem="guessing yes";;
19620                     # Guess yes on BeOS.
19621           beos*)    gl_cv_func_printf_enomem="guessing yes";;
19622                     # Guess yes on Haiku.
19623           haiku*)   gl_cv_func_printf_enomem="guessing yes";;
19624                     # If we don't know, assume the worst.
19625           *)        gl_cv_func_printf_enomem="guessing no";;
19626         esac
19627       fi
19628
19629 fi
19630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
19631 $as_echo "$gl_cv_func_printf_enomem" >&6; }
19632
19633
19634
19635   case "$gl_cv_func_printf_long_double" in
19636     *yes)
19637       ;;
19638     *)
19639
19640 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
19641
19642       ;;
19643   esac
19644
19645
19646
19647
19648   GNULIB_ISWBLANK=0;
19649   GNULIB_WCTYPE=0;
19650   GNULIB_ISWCTYPE=0;
19651   GNULIB_WCTRANS=0;
19652   GNULIB_TOWCTRANS=0;
19653     HAVE_ISWBLANK=1;
19654   HAVE_WCTYPE_T=1;
19655   HAVE_WCTRANS_T=1;
19656   REPLACE_ISWBLANK=0;
19657
19658
19659
19660
19661
19662
19663   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
19664 $as_echo_n "checking whether to use C++... " >&6; }
19665     # Check whether --enable-c++ was given.
19666 if test "${enable_c__+set}" = set; then :
19667   enableval=$enable_c__; CXX_CHOICE="$enableval"
19668 else
19669   CXX_CHOICE=no
19670 fi
19671
19672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
19673 $as_echo "$CXX_CHOICE" >&6; }
19674
19675
19676
19677      GNULIB_OPENDIR=0;
19678   GNULIB_READDIR=0;
19679   GNULIB_REWINDDIR=0;
19680   GNULIB_CLOSEDIR=0;
19681   GNULIB_DIRFD=0;
19682   GNULIB_FDOPENDIR=0;
19683   GNULIB_SCANDIR=0;
19684   GNULIB_ALPHASORT=0;
19685     HAVE_OPENDIR=1;
19686   HAVE_READDIR=1;
19687   HAVE_REWINDDIR=1;
19688   HAVE_CLOSEDIR=1;
19689   HAVE_DECL_DIRFD=1;
19690   HAVE_DECL_FDOPENDIR=1;
19691   HAVE_FDOPENDIR=1;
19692   HAVE_SCANDIR=1;
19693   HAVE_ALPHASORT=1;
19694   REPLACE_OPENDIR=0;
19695   REPLACE_CLOSEDIR=0;
19696   REPLACE_DIRFD=0;
19697   REPLACE_FDOPENDIR=0;
19698
19699
19700
19701
19702
19703
19704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
19705 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
19706 if ${gl_cv_func_ungetc_works+:} false; then :
19707   $as_echo_n "(cached) " >&6
19708 else
19709   if test "$cross_compiling" = yes; then :
19710   case "$host_os" in
19711                    # Guess yes on glibc systems.
19712            *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
19713                    # If we don't know, assume the worst.
19714            *)      gl_cv_func_ungetc_works="guessing no" ;;
19715          esac
19716
19717 else
19718   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19719 /* end confdefs.h.  */
19720
19721 #include <stdio.h>
19722
19723 int
19724 main ()
19725 {
19726 FILE *f;
19727            if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
19728            if (fputs ("abc", f) < 0) return 2;
19729            rewind (f);
19730            if (fgetc (f) != 'a') return 3;
19731            if (fgetc (f) != 'b') return 4;
19732            if (ungetc ('d', f) != 'd') return 5;
19733            if (ftell (f) != 1) return 6;
19734            if (fgetc (f) != 'd') return 7;
19735            if (ftell (f) != 2) return 8;
19736            if (fseek (f, 0, SEEK_CUR) != 0) return 9;
19737            if (ftell (f) != 2) return 10;
19738            if (fgetc (f) != 'c') return 11;
19739            fclose (f); remove ("conftest.tmp");
19740   ;
19741   return 0;
19742 }
19743 _ACEOF
19744 if ac_fn_c_try_run "$LINENO"; then :
19745   gl_cv_func_ungetc_works=yes
19746 else
19747   gl_cv_func_ungetc_works=no
19748 fi
19749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19750   conftest.$ac_objext conftest.beam conftest.$ac_ext
19751 fi
19752
19753
19754 fi
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
19756 $as_echo "$gl_cv_func_ungetc_works" >&6; }
19757   case "$gl_cv_func_ungetc_works" in
19758     *yes) ;;
19759     *)
19760
19761 $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
19762
19763       ;;
19764   esac
19765
19766
19767
19768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
19769 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
19770 if ${gl_cv_func_getcwd_null+:} false; then :
19771   $as_echo_n "(cached) " >&6
19772 else
19773   if test "$cross_compiling" = yes; then :
19774   case "$host_os" in
19775                      # Guess yes on glibc systems.
19776             *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
19777                      # Guess yes on Cygwin.
19778             cygwin*) gl_cv_func_getcwd_null="guessing yes";;
19779                      # If we don't know, assume the worst.
19780             *)       gl_cv_func_getcwd_null="guessing no";;
19781           esac
19782
19783 else
19784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19785 /* end confdefs.h.  */
19786
19787 #        if HAVE_UNISTD_H
19788 #         include <unistd.h>
19789 #        else /* on Windows with MSVC */
19790 #         include <direct.h>
19791 #        endif
19792 #        ifndef getcwd
19793          char *getcwd ();
19794 #        endif
19795
19796 int
19797 main ()
19798 {
19799
19800 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19801 /* mingw cwd does not start with '/', but getcwd does allocate.
19802    However, mingw fails to honor non-zero size.  */
19803 #else
19804            if (chdir ("/") != 0)
19805              return 1;
19806            else
19807              {
19808                char *f = getcwd (NULL, 0);
19809                if (! f)
19810                  return 2;
19811                if (f[0] != '/')
19812                  return 3;
19813                if (f[1] != '\0')
19814                  return 4;
19815                return 0;
19816              }
19817 #endif
19818
19819   ;
19820   return 0;
19821 }
19822 _ACEOF
19823 if ac_fn_c_try_run "$LINENO"; then :
19824   gl_cv_func_getcwd_null=yes
19825 else
19826   gl_cv_func_getcwd_null=no
19827 fi
19828 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19829   conftest.$ac_objext conftest.beam conftest.$ac_ext
19830 fi
19831
19832 fi
19833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
19834 $as_echo "$gl_cv_func_getcwd_null" >&6; }
19835
19836
19837   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
19838 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
19839 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
19840   $as_echo_n "(cached) " >&6
19841 else
19842   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19843 /* end confdefs.h.  */
19844 #include <unistd.h>
19845 int
19846 main ()
19847 {
19848 extern
19849            #ifdef __cplusplus
19850            "C"
19851            #endif
19852            char *getcwd (char *, size_t);
19853
19854   ;
19855   return 0;
19856 }
19857
19858 _ACEOF
19859 if ac_fn_c_try_compile "$LINENO"; then :
19860   gl_cv_func_getcwd_posix_signature=yes
19861 else
19862   gl_cv_func_getcwd_posix_signature=no
19863 fi
19864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19865
19866 fi
19867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
19868 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
19869
19870
19871
19872
19873   GNULIB_IMAXABS=0;
19874   GNULIB_IMAXDIV=0;
19875   GNULIB_STRTOIMAX=0;
19876   GNULIB_STRTOUMAX=0;
19877     HAVE_DECL_IMAXABS=1;
19878   HAVE_DECL_IMAXDIV=1;
19879   HAVE_DECL_STRTOIMAX=1;
19880   HAVE_DECL_STRTOUMAX=1;
19881   REPLACE_STRTOIMAX=0;
19882   INT32_MAX_LT_INTMAX_MAX=1;
19883   INT64_MAX_EQ_LONG_MAX='defined _LP64';
19884   PRI_MACROS_BROKEN=0;
19885   PRIPTR_PREFIX=__PRIPTR_PREFIX;
19886   UINT32_MAX_LT_UINTMAX_MAX=1;
19887   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903      if test $gl_cv_have_include_next = yes; then
19904        gl_cv_next_inttypes_h='<'inttypes.h'>'
19905      else
19906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19907 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19908 if ${gl_cv_next_inttypes_h+:} false; then :
19909   $as_echo_n "(cached) " >&6
19910 else
19911
19912              if test $ac_cv_header_inttypes_h = yes; then
19913
19914
19915                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19916 /* end confdefs.h.  */
19917 #include <inttypes.h>
19918
19919 _ACEOF
19920                                                                                                                         case "$host_os" in
19921                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
19922                  *)    gl_absname_cpp="$ac_cpp" ;;
19923                esac
19924
19925                case "$host_os" in
19926                  mingw*)
19927                                                                                                                                      gl_dirsep_regex='[/\\]'
19928                    ;;
19929                  *)
19930                    gl_dirsep_regex='\/'
19931                    ;;
19932                esac
19933                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19934
19935                gl_header_literal_regex=`echo 'inttypes.h' \
19936                                         | sed -e "$gl_make_literal_regex_sed"`
19937                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19938                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19939                    s|^/[^/]|//&|
19940                    p
19941                    q
19942                  }'
19943                                                             gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19944                       sed -n "$gl_absolute_header_sed"`'"'
19945           else
19946                gl_cv_next_inttypes_h='<'inttypes.h'>'
19947              fi
19948
19949
19950 fi
19951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19952 $as_echo "$gl_cv_next_inttypes_h" >&6; }
19953      fi
19954      NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19955
19956      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19957        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19958        gl_next_as_first_directive='<'inttypes.h'>'
19959      else
19960        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19961        gl_next_as_first_directive=$gl_cv_next_inttypes_h
19962      fi
19963      NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974   for ac_header in inttypes.h
19975 do :
19976   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
19977 if test "x$ac_cv_header_inttypes_h" = xyes; then :
19978   cat >>confdefs.h <<_ACEOF
19979 #define HAVE_INTTYPES_H 1
19980 _ACEOF
19981
19982 fi
19983
19984 done
19985
19986   if test $ac_cv_header_inttypes_h = yes; then
19987     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
19988 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
19989 if ${gt_cv_inttypes_pri_broken+:} false; then :
19990   $as_echo_n "(cached) " >&6
19991 else
19992
19993         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19994 /* end confdefs.h.  */
19995
19996 #include <inttypes.h>
19997 #ifdef PRId32
19998 char *p = PRId32;
19999 #endif
20000
20001 int
20002 main ()
20003 {
20004
20005   ;
20006   return 0;
20007 }
20008 _ACEOF
20009 if ac_fn_c_try_compile "$LINENO"; then :
20010   gt_cv_inttypes_pri_broken=no
20011 else
20012   gt_cv_inttypes_pri_broken=yes
20013 fi
20014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20015
20016 fi
20017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
20018 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
20019   fi
20020   if test "$gt_cv_inttypes_pri_broken" = yes; then
20021
20022 cat >>confdefs.h <<_ACEOF
20023 #define PRI_MACROS_BROKEN 1
20024 _ACEOF
20025
20026     PRI_MACROS_BROKEN=1
20027   else
20028     PRI_MACROS_BROKEN=0
20029   fi
20030
20031
20032
20033
20034
20035   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
20036 $as_echo_n "checking for LC_MESSAGES... " >&6; }
20037 if ${gt_cv_val_LC_MESSAGES+:} false; then :
20038   $as_echo_n "(cached) " >&6
20039 else
20040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20041 /* end confdefs.h.  */
20042 #include <locale.h>
20043 int
20044 main ()
20045 {
20046 return LC_MESSAGES
20047   ;
20048   return 0;
20049 }
20050 _ACEOF
20051 if ac_fn_c_try_link "$LINENO"; then :
20052   gt_cv_val_LC_MESSAGES=yes
20053 else
20054   gt_cv_val_LC_MESSAGES=no
20055 fi
20056 rm -f core conftest.err conftest.$ac_objext \
20057     conftest$ac_exeext conftest.$ac_ext
20058 fi
20059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
20060 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
20061   if test $gt_cv_val_LC_MESSAGES = yes; then
20062
20063 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
20064
20065   fi
20066
20067
20068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
20069 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
20070 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
20071   $as_echo_n "(cached) " >&6
20072 else
20073   gt_save_LIBS="$LIBS"
20074      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
20075      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20076 /* end confdefs.h.  */
20077 #include <CoreFoundation/CFPreferences.h>
20078 int
20079 main ()
20080 {
20081 CFPreferencesCopyAppValue(NULL, NULL)
20082   ;
20083   return 0;
20084 }
20085 _ACEOF
20086 if ac_fn_c_try_link "$LINENO"; then :
20087   gt_cv_func_CFPreferencesCopyAppValue=yes
20088 else
20089   gt_cv_func_CFPreferencesCopyAppValue=no
20090 fi
20091 rm -f core conftest.err conftest.$ac_objext \
20092     conftest$ac_exeext conftest.$ac_ext
20093      LIBS="$gt_save_LIBS"
20094 fi
20095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
20096 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
20097   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
20098
20099 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
20100
20101   fi
20102     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
20103 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
20104 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
20105   $as_echo_n "(cached) " >&6
20106 else
20107   gt_save_LIBS="$LIBS"
20108      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
20109      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20110 /* end confdefs.h.  */
20111 #include <CoreFoundation/CFLocale.h>
20112 int
20113 main ()
20114 {
20115 CFLocaleCopyCurrent();
20116   ;
20117   return 0;
20118 }
20119 _ACEOF
20120 if ac_fn_c_try_link "$LINENO"; then :
20121   gt_cv_func_CFLocaleCopyCurrent=yes
20122 else
20123   gt_cv_func_CFLocaleCopyCurrent=no
20124 fi
20125 rm -f core conftest.err conftest.$ac_objext \
20126     conftest$ac_exeext conftest.$ac_ext
20127      LIBS="$gt_save_LIBS"
20128 fi
20129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
20130 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
20131   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
20132
20133 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
20134
20135   fi
20136   INTL_MACOSX_LIBS=
20137   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
20138     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
20139   fi
20140
20141
20142 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
20143 if test "x$ac_cv_have_decl_setenv" = xyes; then :
20144   ac_have_decl=1
20145 else
20146   ac_have_decl=0
20147 fi
20148
20149 cat >>confdefs.h <<_ACEOF
20150 #define HAVE_DECL_SETENV $ac_have_decl
20151 _ACEOF
20152
20153
20154
20155
20156
20157
20158   if test $ac_cv_have_decl_setenv = no; then
20159     HAVE_DECL_SETENV=0
20160   fi
20161
20162
20163
20164
20165
20166   for ac_header in search.h
20167 do :
20168   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
20169 if test "x$ac_cv_header_search_h" = xyes; then :
20170   cat >>confdefs.h <<_ACEOF
20171 #define HAVE_SEARCH_H 1
20172 _ACEOF
20173
20174 fi
20175
20176 done
20177
20178   for ac_func in tsearch
20179 do :
20180   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
20181 if test "x$ac_cv_func_tsearch" = xyes; then :
20182   cat >>confdefs.h <<_ACEOF
20183 #define HAVE_TSEARCH 1
20184 _ACEOF
20185
20186 fi
20187 done
20188
20189
20190
20191
20192
20193
20194
20195 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
20196 if test "x$ac_cv_have_decl_strdup" = xyes; then :
20197   ac_have_decl=1
20198 else
20199   ac_have_decl=0
20200 fi
20201
20202 cat >>confdefs.h <<_ACEOF
20203 #define HAVE_DECL_STRDUP $ac_have_decl
20204 _ACEOF
20205
20206 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
20207 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
20208   ac_have_decl=1
20209 else
20210   ac_have_decl=0
20211 fi
20212
20213 cat >>confdefs.h <<_ACEOF
20214 #define HAVE_DECL_UNSETENV $ac_have_decl
20215 _ACEOF
20216
20217
20218
20219
20220    if false; then
20221   GL_COND_LIBTOOL_TRUE=
20222   GL_COND_LIBTOOL_FALSE='#'
20223 else
20224   GL_COND_LIBTOOL_TRUE='#'
20225   GL_COND_LIBTOOL_FALSE=
20226 fi
20227
20228   gl_cond_libtool=false
20229   gl_libdeps=
20230   gl_ltlibdeps=
20231   gl_m4_base='m4'
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241   gl_source_base='lib'
20242
20243
20244   if test $ac_cv_func_alloca_works = no; then
20245     :
20246   fi
20247
20248   # Define an additional variable used in the Makefile substitution.
20249   if test $ac_cv_working_alloca_h = yes; then
20250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20251 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20252 if ${gl_cv_rpl_alloca+:} false; then :
20253   $as_echo_n "(cached) " >&6
20254 else
20255
20256       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20257 /* end confdefs.h.  */
20258
20259 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20260         Need own alloca
20261 #endif
20262
20263 _ACEOF
20264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20265   $EGREP "Need own alloca" >/dev/null 2>&1; then :
20266   gl_cv_rpl_alloca=yes
20267 else
20268   gl_cv_rpl_alloca=no
20269 fi
20270 rm -f conftest*
20271
20272
20273 fi
20274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20275 $as_echo "$gl_cv_rpl_alloca" >&6; }
20276     if test $gl_cv_rpl_alloca = yes; then
20277
20278 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20279
20280       ALLOCA_H=alloca.h
20281     else
20282                   ALLOCA_H=
20283     fi
20284   else
20285     ALLOCA_H=alloca.h
20286   fi
20287
20288    if test -n "$ALLOCA_H"; then
20289   GL_GENERATE_ALLOCA_H_TRUE=
20290   GL_GENERATE_ALLOCA_H_FALSE='#'
20291 else
20292   GL_GENERATE_ALLOCA_H_TRUE='#'
20293   GL_GENERATE_ALLOCA_H_FALSE=
20294 fi
20295
20296
20297
20298   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
20299 $as_echo_n "checking whether to enable assertions... " >&6; }
20300   # Check whether --enable-assert was given.
20301 if test "${enable_assert+set}" = set; then :
20302   enableval=$enable_assert; if test "x$enableval" = xno; then :
20303
20304 $as_echo "#define NDEBUG 1" >>confdefs.h
20305
20306 elif test "x$enableval" != xyes; then :
20307   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
20308 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
20309       enable_assert=yes
20310 fi
20311 else
20312   enable_assert=yes
20313 fi
20314
20315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
20316 $as_echo "$enable_assert" >&6; }
20317
20318
20319
20320
20321
20322
20323
20324   if test $ac_cv_func_btowc = no; then
20325     HAVE_BTOWC=0
20326   else
20327
20328
20329
20330
20331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
20332 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
20333 if ${gl_cv_func_btowc_nul+:} false; then :
20334   $as_echo_n "(cached) " >&6
20335 else
20336
20337         if test "$cross_compiling" = yes; then :
20338
20339            case "$host_os" in
20340                       # Guess no on Cygwin.
20341              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
20342                       # Guess yes otherwise.
20343              *)       gl_cv_func_btowc_nul="guessing yes" ;;
20344            esac
20345
20346 else
20347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20348 /* end confdefs.h.  */
20349
20350 #include <string.h>
20351 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20352    <wchar.h>.
20353    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20354    included before <wchar.h>.  */
20355 #include <stddef.h>
20356 #include <stdio.h>
20357 #include <time.h>
20358 #include <wchar.h>
20359 int main ()
20360 {
20361   if (btowc ('\0') != 0)
20362     return 1;
20363   return 0;
20364 }
20365 _ACEOF
20366 if ac_fn_c_try_run "$LINENO"; then :
20367   gl_cv_func_btowc_nul=yes
20368 else
20369   gl_cv_func_btowc_nul=no
20370 fi
20371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20372   conftest.$ac_objext conftest.beam conftest.$ac_ext
20373 fi
20374
20375
20376 fi
20377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
20378 $as_echo "$gl_cv_func_btowc_nul" >&6; }
20379
20380         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
20381 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
20382 if ${gl_cv_func_btowc_eof+:} false; then :
20383   $as_echo_n "(cached) " >&6
20384 else
20385
20386                         case "$host_os" in
20387                  # Guess no on IRIX.
20388           irix*) gl_cv_func_btowc_eof="guessing no" ;;
20389                  # Guess yes otherwise.
20390           *)     gl_cv_func_btowc_eof="guessing yes" ;;
20391         esac
20392         if test $LOCALE_FR != none; then
20393           if test "$cross_compiling" = yes; then :
20394   :
20395 else
20396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20397 /* end confdefs.h.  */
20398
20399 #include <locale.h>
20400 #include <string.h>
20401 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20402    <wchar.h>.
20403    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20404    included before <wchar.h>.  */
20405 #include <stddef.h>
20406 #include <stdio.h>
20407 #include <time.h>
20408 #include <wchar.h>
20409 int main ()
20410 {
20411   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20412     {
20413       if (btowc (EOF) != WEOF)
20414         return 1;
20415     }
20416   return 0;
20417 }
20418 _ACEOF
20419 if ac_fn_c_try_run "$LINENO"; then :
20420   gl_cv_func_btowc_eof=yes
20421 else
20422   gl_cv_func_btowc_eof=no
20423 fi
20424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20425   conftest.$ac_objext conftest.beam conftest.$ac_ext
20426 fi
20427
20428         fi
20429
20430 fi
20431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
20432 $as_echo "$gl_cv_func_btowc_eof" >&6; }
20433
20434     case "$gl_cv_func_btowc_nul" in
20435       *yes) ;;
20436       *) REPLACE_BTOWC=1 ;;
20437     esac
20438     case "$gl_cv_func_btowc_eof" in
20439       *yes) ;;
20440       *) REPLACE_BTOWC=1 ;;
20441     esac
20442   fi
20443
20444   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
20445
20446
20447
20448
20449
20450
20451
20452
20453   M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
20454
20455
20456   :
20457
20458   fi
20459
20460
20461
20462
20463
20464           GNULIB_BTOWC=1
20465
20466
20467
20468
20469
20470 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
20471
20472
20473
20474
20475
20476
20477
20478    # for STACK_DIRECTION
20479
20480
20481
20482    ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
20483 "
20484 if test "x$ac_cv_have_decl_sigaltstack" = xyes; then :
20485   ac_have_decl=1
20486 else
20487   ac_have_decl=0
20488 fi
20489
20490 cat >>confdefs.h <<_ACEOF
20491 #define HAVE_DECL_SIGALTSTACK $ac_have_decl
20492 _ACEOF
20493
20494
20495
20496
20497    ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
20498 "
20499 if test "x$ac_cv_type_stack_t" = xyes; then :
20500
20501 cat >>confdefs.h <<_ACEOF
20502 #define HAVE_STACK_T 1
20503 _ACEOF
20504
20505
20506 fi
20507
20508
20509       if test "$gl_cv_lib_sigsegv" = yes \
20510        && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
20511      LIBCSTACK=$LIBSIGSEGV
20512
20513      LTLIBCSTACK=$LTLIBSIGSEGV
20514
20515    fi
20516
20517
20518
20519
20520
20521   if test $ac_cv_func_canonicalize_file_name = no; then
20522     HAVE_CANONICALIZE_FILE_NAME=0
20523     if test $ac_cv_func_realpath = no; then
20524       HAVE_REALPATH=0
20525     else
20526       case "$gl_cv_func_realpath_works" in
20527         *yes) ;;
20528         *)    REPLACE_REALPATH=1 ;;
20529       esac
20530     fi
20531   else
20532     case "$gl_cv_func_realpath_works" in
20533       *yes)
20534         ;;
20535       *)
20536         REPLACE_CANONICALIZE_FILE_NAME=1
20537         REPLACE_REALPATH=1
20538         ;;
20539     esac
20540   fi
20541
20542   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
20543
20544
20545
20546
20547
20548
20549
20550
20551   M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
20552
20553   fi
20554
20555
20556 cat >>confdefs.h <<_ACEOF
20557 #define GNULIB_CANONICALIZE_LGPL 1
20558 _ACEOF
20559
20560
20561
20562
20563
20564
20565
20566           GNULIB_CANONICALIZE_FILE_NAME=1
20567
20568
20569
20570
20571
20572 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
20573
20574
20575
20576
20577
20578
20579
20580
20581           GNULIB_REALPATH=1
20582
20583
20584
20585
20586
20587 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
20588
20589
20590
20591
20592
20593
20594
20595
20596           GNULIB_CHDIR=1
20597
20598
20599
20600
20601
20602 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
20603
20604
20605
20606
20607 $as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
20608
20609
20610
20611 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
20612
20613
20614
20615
20616
20617   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20618     REPLACE_CLOSE=1
20619   fi
20620
20621
20622
20623
20624
20625   if test $ac_cv_header_sys_socket_h != yes; then
20626                     for ac_header in winsock2.h
20627 do :
20628   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20629 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20630   cat >>confdefs.h <<_ACEOF
20631 #define HAVE_WINSOCK2_H 1
20632 _ACEOF
20633
20634 fi
20635
20636 done
20637
20638   fi
20639   if test "$ac_cv_header_winsock2_h" = yes; then
20640     HAVE_WINSOCK2_H=1
20641     UNISTD_H_HAVE_WINSOCK2_H=1
20642     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20643   else
20644     HAVE_WINSOCK2_H=0
20645   fi
20646
20647
20648     if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
20649                         REPLACE_CLOSE=1
20650     fi
20651
20652
20653
20654   if test $REPLACE_CLOSE = 1; then
20655
20656
20657
20658
20659
20660
20661
20662
20663   M4_LIBOBJS="$M4_LIBOBJS close.$ac_objext"
20664
20665   fi
20666
20667
20668
20669
20670
20671           GNULIB_CLOSE=1
20672
20673
20674
20675
20676
20677 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
20678
20679
20680
20681
20682   :
20683
20684
20685
20686 cat >>confdefs.h <<_ACEOF
20687 #define GNULIB_CLOSE_STREAM 1
20688 _ACEOF
20689
20690
20691
20692   :
20693
20694
20695   :
20696
20697
20698
20699           if test "x$datarootdir" = x; then
20700     datarootdir='${datadir}'
20701
20702   fi
20703     if test "x$docdir" = x; then
20704     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
20705
20706   fi
20707     if test "x$htmldir" = x; then
20708     htmldir='${docdir}'
20709
20710   fi
20711   if test "x$dvidir" = x; then
20712     dvidir='${docdir}'
20713
20714   fi
20715   if test "x$pdfdir" = x; then
20716     pdfdir='${docdir}'
20717
20718   fi
20719   if test "x$psdir" = x; then
20720     psdir='${docdir}'
20721
20722   fi
20723   if test "x$lispdir" = x; then
20724     lispdir='${datarootdir}/emacs/site-lisp'
20725
20726   fi
20727   if test "x$localedir" = x; then
20728     localedir='${datarootdir}/locale'
20729
20730   fi
20731
20732       pkglibexecdir='${libexecdir}/${PACKAGE}'
20733
20734
20735
20736
20737
20738
20739
20740 cat >>confdefs.h <<_ACEOF
20741 #define GNULIB_DIRNAME 1
20742 _ACEOF
20743
20744
20745
20746
20747
20748
20749
20750
20751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20752 $as_echo_n "checking whether // is distinct from /... " >&6; }
20753 if ${gl_cv_double_slash_root+:} false; then :
20754   $as_echo_n "(cached) " >&6
20755 else
20756    if test x"$cross_compiling" = xyes ; then
20757         # When cross-compiling, there is no way to tell whether // is special
20758         # short of a list of hosts.  However, the only known hosts to date
20759         # that have a distinct // are Apollo DomainOS (too old to port to),
20760         # Cygwin, and z/OS.  If anyone knows of another system for which // has
20761         # special semantics and is distinct from /, please report it to
20762         # <bug-gnulib@gnu.org>.
20763         case $host in
20764           *-cygwin | i370-ibm-openedition)
20765             gl_cv_double_slash_root=yes ;;
20766           *)
20767             # Be optimistic and assume that / and // are the same when we
20768             # don't know.
20769             gl_cv_double_slash_root='unknown, assuming no' ;;
20770         esac
20771       else
20772         set x `ls -di / // 2>/dev/null`
20773         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20774           gl_cv_double_slash_root=no
20775         else
20776           gl_cv_double_slash_root=yes
20777         fi
20778       fi
20779 fi
20780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20781 $as_echo "$gl_cv_double_slash_root" >&6; }
20782   if test "$gl_cv_double_slash_root" = yes; then
20783
20784 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20785
20786   fi
20787
20788
20789
20790
20791
20792
20793 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
20794
20795
20796   if test $HAVE_DUP2 = 1; then
20797     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20798 $as_echo_n "checking whether dup2 works... " >&6; }
20799 if ${gl_cv_func_dup2_works+:} false; then :
20800   $as_echo_n "(cached) " >&6
20801 else
20802   if test "$cross_compiling" = yes; then :
20803   case "$host_os" in
20804            mingw*) # on this platform, dup2 always returns 0 for success
20805              gl_cv_func_dup2_works="guessing no" ;;
20806            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20807              gl_cv_func_dup2_works="guessing no" ;;
20808            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20809                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20810              gl_cv_func_dup2_works="guessing no" ;;
20811            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20812              gl_cv_func_dup2_works="guessing no" ;;
20813            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20814              gl_cv_func_dup2_works="guessing no" ;;
20815            *) gl_cv_func_dup2_works="guessing yes" ;;
20816          esac
20817 else
20818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20819 /* end confdefs.h.  */
20820
20821          #include <unistd.h>
20822 #include <fcntl.h>
20823 #include <errno.h>
20824 int
20825 main ()
20826 {
20827 int result = 0;
20828 #ifdef FD_CLOEXEC
20829             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20830               result |= 1;
20831 #endif
20832             if (dup2 (1, 1) == 0)
20833               result |= 2;
20834 #ifdef FD_CLOEXEC
20835             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20836               result |= 4;
20837 #endif
20838             close (0);
20839             if (dup2 (0, 0) != -1)
20840               result |= 8;
20841             /* Many gnulib modules require POSIX conformance of EBADF.  */
20842             if (dup2 (2, 1000000) == -1 && errno != EBADF)
20843               result |= 16;
20844             /* Flush out a cygwin core dump.  */
20845             if (dup2 (2, -1) != -1 || errno != EBADF)
20846               result |= 32;
20847             return result;
20848
20849   ;
20850   return 0;
20851 }
20852
20853 _ACEOF
20854 if ac_fn_c_try_run "$LINENO"; then :
20855   gl_cv_func_dup2_works=yes
20856 else
20857   gl_cv_func_dup2_works=no
20858 fi
20859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20860   conftest.$ac_objext conftest.beam conftest.$ac_ext
20861 fi
20862
20863
20864 fi
20865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20866 $as_echo "$gl_cv_func_dup2_works" >&6; }
20867     case "$gl_cv_func_dup2_works" in
20868       *yes) ;;
20869       *)
20870         REPLACE_DUP2=1
20871         ;;
20872     esac
20873   fi
20874
20875
20876   if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
20877
20878
20879
20880
20881
20882
20883
20884
20885   M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
20886
20887
20888   fi
20889
20890
20891
20892
20893
20894           GNULIB_DUP2=1
20895
20896
20897
20898
20899
20900 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910           GNULIB_ENVIRON=1
20911
20912
20913
20914
20915
20916 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
20917
20918
20919
20920
20921
20922       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
20923 $as_echo_n "checking for error_at_line... " >&6; }
20924 if ${ac_cv_lib_error_at_line+:} false; then :
20925   $as_echo_n "(cached) " >&6
20926 else
20927   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20928 /* end confdefs.h.  */
20929 #include <error.h>
20930 int
20931 main ()
20932 {
20933 error_at_line (0, 0, "", 0, "an error occurred");
20934   ;
20935   return 0;
20936 }
20937 _ACEOF
20938 if ac_fn_c_try_link "$LINENO"; then :
20939   ac_cv_lib_error_at_line=yes
20940 else
20941   ac_cv_lib_error_at_line=no
20942 fi
20943 rm -f core conftest.err conftest.$ac_objext \
20944     conftest$ac_exeext conftest.$ac_ext
20945 fi
20946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
20947 $as_echo "$ac_cv_lib_error_at_line" >&6; }
20948
20949   if test $ac_cv_lib_error_at_line = no; then
20950
20951
20952
20953
20954
20955
20956
20957
20958   M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
20959
20960
20961
20962   :
20963
20964   fi
20965
20966
20967
20968
20969
20970
20971
20972
20973   :
20974
20975
20976
20977
20978
20979
20980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
20981 $as_echo_n "checking whether fflush works on input streams... " >&6; }
20982 if ${gl_cv_func_fflush_stdin+:} false; then :
20983   $as_echo_n "(cached) " >&6
20984 else
20985   echo hello world > conftest.txt
20986      if test "$cross_compiling" = yes; then :
20987   gl_cv_func_fflush_stdin=cross
20988 else
20989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20990 /* end confdefs.h.  */
20991
20992 #include <stdio.h>
20993 #if HAVE_UNISTD_H
20994 # include <unistd.h>
20995 #else /* on Windows with MSVC */
20996 # include <io.h>
20997 #endif
20998
20999 int
21000 main ()
21001 {
21002 FILE *f = fopen ("conftest.txt", "r");
21003          char buffer[10];
21004          int fd;
21005          int c;
21006          if (f == NULL)
21007            return 1;
21008          fd = fileno (f);
21009          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21010            return 2;
21011          /* For deterministic results, ensure f read a bigger buffer.  */
21012          if (lseek (fd, 0, SEEK_CUR) == 5)
21013            return 3;
21014          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
21015             on BSD systems and on mingw.  */
21016          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21017            return 4;
21018          if (lseek (fd, 0, SEEK_CUR) != 5)
21019            return 5;
21020          /* Verify behaviour of fflush after ungetc. See
21021             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
21022          /* Verify behaviour of fflush after a backup ungetc.  This fails on
21023             mingw.  */
21024          c = fgetc (f);
21025          ungetc (c, f);
21026          fflush (f);
21027          if (fgetc (f) != c)
21028            return 6;
21029          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
21030             on glibc 2.8 and on BSD systems.  */
21031          c = fgetc (f);
21032          ungetc ('@', f);
21033          fflush (f);
21034          if (fgetc (f) != c)
21035            return 7;
21036          return 0;
21037
21038   ;
21039   return 0;
21040 }
21041 _ACEOF
21042 if ac_fn_c_try_run "$LINENO"; then :
21043   gl_cv_func_fflush_stdin=yes
21044 else
21045   gl_cv_func_fflush_stdin=no
21046 fi
21047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21048   conftest.$ac_objext conftest.beam conftest.$ac_ext
21049 fi
21050
21051      rm conftest.txt
21052
21053 fi
21054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21055 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
21056   case $gl_cv_func_fflush_stdin in
21057     yes) gl_func_fflush_stdin=1 ;;
21058     no)  gl_func_fflush_stdin=0 ;;
21059     *)   gl_func_fflush_stdin='(-1)' ;;
21060   esac
21061
21062 cat >>confdefs.h <<_ACEOF
21063 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
21064 _ACEOF
21065
21066
21067   if test $gl_cv_func_fflush_stdin != yes; then
21068     REPLACE_FCLOSE=1
21069   fi
21070
21071
21072   if test $REPLACE_CLOSE = 1; then
21073     REPLACE_FCLOSE=1
21074   fi
21075
21076   if test $REPLACE_FCLOSE = 1; then
21077
21078
21079
21080
21081
21082
21083
21084
21085   M4_LIBOBJS="$M4_LIBOBJS fclose.$ac_objext"
21086
21087   fi
21088
21089
21090
21091
21092
21093           GNULIB_FCLOSE=1
21094
21095
21096
21097
21098
21099 $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
21100
21101
21102
21103
21104
21105
21106
21107
21108   if test $ac_cv_func_fcntl = no; then
21109
21110
21111
21112   if test $ac_cv_func_fcntl = no; then
21113     HAVE_FCNTL=0
21114   else
21115     REPLACE_FCNTL=1
21116   fi
21117
21118   else
21119             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
21120 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
21121 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
21122   $as_echo_n "(cached) " >&6
21123 else
21124   if test "$cross_compiling" = yes; then :
21125   # Guess that it works on glibc systems
21126           case $host_os in #((
21127             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
21128             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
21129           esac
21130 else
21131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21132 /* end confdefs.h.  */
21133
21134 #include <fcntl.h>
21135 #include <errno.h>
21136
21137 int
21138 main ()
21139 {
21140 int result = 0;
21141       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
21142       if (errno != EINVAL) result |= 2;
21143       return result;
21144
21145   ;
21146   return 0;
21147 }
21148 _ACEOF
21149 if ac_fn_c_try_run "$LINENO"; then :
21150   gl_cv_func_fcntl_f_dupfd_works=yes
21151 else
21152   gl_cv_func_fcntl_f_dupfd_works=no
21153 fi
21154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21155   conftest.$ac_objext conftest.beam conftest.$ac_ext
21156 fi
21157
21158 fi
21159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
21160 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
21161     case $gl_cv_func_fcntl_f_dupfd_works in
21162       *yes) ;;
21163       *)
21164
21165
21166   if test $ac_cv_func_fcntl = no; then
21167     HAVE_FCNTL=0
21168   else
21169     REPLACE_FCNTL=1
21170   fi
21171
21172
21173 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
21174  ;;
21175     esac
21176
21177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
21178 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
21179 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
21180   $as_echo_n "(cached) " >&6
21181 else
21182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21183 /* end confdefs.h.  */
21184
21185 #include <fcntl.h>
21186 #ifndef F_DUPFD_CLOEXEC
21187 choke me
21188 #endif
21189
21190 int
21191 main ()
21192 {
21193
21194   ;
21195   return 0;
21196 }
21197 _ACEOF
21198 if ac_fn_c_try_compile "$LINENO"; then :
21199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21200 /* end confdefs.h.  */
21201
21202 #ifdef __linux__
21203 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
21204    it to support the semantics on older kernels that failed with EINVAL.  */
21205 choke me
21206 #endif
21207
21208 int
21209 main ()
21210 {
21211
21212   ;
21213   return 0;
21214 }
21215 _ACEOF
21216 if ac_fn_c_try_compile "$LINENO"; then :
21217   gl_cv_func_fcntl_f_dupfd_cloexec=yes
21218 else
21219   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
21220 fi
21221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21222 else
21223   gl_cv_func_fcntl_f_dupfd_cloexec=no
21224 fi
21225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21226 fi
21227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
21228 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
21229     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
21230
21231
21232
21233   if test $ac_cv_func_fcntl = no; then
21234     HAVE_FCNTL=0
21235   else
21236     REPLACE_FCNTL=1
21237   fi
21238
21239           fi
21240   fi
21241
21242
21243   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
21244
21245
21246
21247
21248
21249
21250
21251
21252   M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
21253
21254   fi
21255
21256
21257
21258
21259
21260           GNULIB_FCNTL=1
21261
21262
21263
21264
21265
21266 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281      if test $gl_cv_have_include_next = yes; then
21282        gl_cv_next_fcntl_h='<'fcntl.h'>'
21283      else
21284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21285 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21286 if ${gl_cv_next_fcntl_h+:} false; then :
21287   $as_echo_n "(cached) " >&6
21288 else
21289
21290                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21291 /* end confdefs.h.  */
21292 #include <fcntl.h>
21293
21294 _ACEOF
21295                                                                                                                         case "$host_os" in
21296                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
21297                  *)    gl_absname_cpp="$ac_cpp" ;;
21298                esac
21299
21300                case "$host_os" in
21301                  mingw*)
21302                                                                                                                                      gl_dirsep_regex='[/\\]'
21303                    ;;
21304                  *)
21305                    gl_dirsep_regex='\/'
21306                    ;;
21307                esac
21308                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21309
21310                gl_header_literal_regex=`echo 'fcntl.h' \
21311                                         | sed -e "$gl_make_literal_regex_sed"`
21312                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21313                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21314                    s|^/[^/]|//&|
21315                    p
21316                    q
21317                  }'
21318                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21319                       sed -n "$gl_absolute_header_sed"`'"'
21320
21321
21322 fi
21323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21324 $as_echo "$gl_cv_next_fcntl_h" >&6; }
21325      fi
21326      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21327
21328      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21329        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21330        gl_next_as_first_directive='<'fcntl.h'>'
21331      else
21332        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21333        gl_next_as_first_directive=$gl_cv_next_fcntl_h
21334      fi
21335      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349 cat >>confdefs.h <<_ACEOF
21350 #define GNULIB_FD_SAFER_FLAG 1
21351 _ACEOF
21352
21353
21354
21355
21356
21357
21358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21359 $as_echo_n "checking whether fflush works on input streams... " >&6; }
21360 if ${gl_cv_func_fflush_stdin+:} false; then :
21361   $as_echo_n "(cached) " >&6
21362 else
21363   echo hello world > conftest.txt
21364      if test "$cross_compiling" = yes; then :
21365   gl_cv_func_fflush_stdin=cross
21366 else
21367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21368 /* end confdefs.h.  */
21369
21370 #include <stdio.h>
21371 #if HAVE_UNISTD_H
21372 # include <unistd.h>
21373 #else /* on Windows with MSVC */
21374 # include <io.h>
21375 #endif
21376
21377 int
21378 main ()
21379 {
21380 FILE *f = fopen ("conftest.txt", "r");
21381          char buffer[10];
21382          int fd;
21383          int c;
21384          if (f == NULL)
21385            return 1;
21386          fd = fileno (f);
21387          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21388            return 2;
21389          /* For deterministic results, ensure f read a bigger buffer.  */
21390          if (lseek (fd, 0, SEEK_CUR) == 5)
21391            return 3;
21392          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
21393             on BSD systems and on mingw.  */
21394          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21395            return 4;
21396          if (lseek (fd, 0, SEEK_CUR) != 5)
21397            return 5;
21398          /* Verify behaviour of fflush after ungetc. See
21399             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
21400          /* Verify behaviour of fflush after a backup ungetc.  This fails on
21401             mingw.  */
21402          c = fgetc (f);
21403          ungetc (c, f);
21404          fflush (f);
21405          if (fgetc (f) != c)
21406            return 6;
21407          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
21408             on glibc 2.8 and on BSD systems.  */
21409          c = fgetc (f);
21410          ungetc ('@', f);
21411          fflush (f);
21412          if (fgetc (f) != c)
21413            return 7;
21414          return 0;
21415
21416   ;
21417   return 0;
21418 }
21419 _ACEOF
21420 if ac_fn_c_try_run "$LINENO"; then :
21421   gl_cv_func_fflush_stdin=yes
21422 else
21423   gl_cv_func_fflush_stdin=no
21424 fi
21425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21426   conftest.$ac_objext conftest.beam conftest.$ac_ext
21427 fi
21428
21429      rm conftest.txt
21430
21431 fi
21432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21433 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
21434   case $gl_cv_func_fflush_stdin in
21435     yes) gl_func_fflush_stdin=1 ;;
21436     no)  gl_func_fflush_stdin=0 ;;
21437     *)   gl_func_fflush_stdin='(-1)' ;;
21438   esac
21439
21440 cat >>confdefs.h <<_ACEOF
21441 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
21442 _ACEOF
21443
21444
21445   if test $gl_cv_func_fflush_stdin != yes; then
21446     REPLACE_FFLUSH=1
21447   fi
21448
21449   if test $REPLACE_FFLUSH = 1; then
21450
21451
21452
21453
21454
21455
21456
21457
21458   M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
21459
21460     :
21461   fi
21462
21463
21464 cat >>confdefs.h <<_ACEOF
21465 #define GNULIB_FFLUSH 1
21466 _ACEOF
21467
21468
21469
21470
21471
21472
21473
21474           GNULIB_FFLUSH=1
21475
21476
21477
21478
21479
21480 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
21481
21482
21483
21484
21485
21486
21487
21488
21489 cat >>confdefs.h <<_ACEOF
21490 #define GNULIB_FILENAMECAT 1
21491 _ACEOF
21492
21493
21494
21495
21496
21497
21498
21499
21500   FLOAT_H=
21501   REPLACE_FLOAT_LDBL=0
21502   case "$host_os" in
21503     aix* | beos* | openbsd* | mirbsd* | irix*)
21504       FLOAT_H=float.h
21505       ;;
21506     freebsd*)
21507       case "$host_cpu" in
21508         i[34567]86 )
21509           FLOAT_H=float.h
21510           ;;
21511         x86_64 )
21512           # On x86_64 systems, the C compiler may still be generating
21513           # 32-bit code.
21514           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21515 /* end confdefs.h.  */
21516 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
21517              yes
21518              #endif
21519 _ACEOF
21520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21521   $EGREP "yes" >/dev/null 2>&1; then :
21522
21523 else
21524   FLOAT_H=float.h
21525 fi
21526 rm -f conftest*
21527
21528           ;;
21529       esac
21530       ;;
21531     linux*)
21532       case "$host_cpu" in
21533         powerpc*)
21534           FLOAT_H=float.h
21535           ;;
21536       esac
21537       ;;
21538   esac
21539   case "$host_os" in
21540     aix* | freebsd* | linux*)
21541       if test -n "$FLOAT_H"; then
21542         REPLACE_FLOAT_LDBL=1
21543       fi
21544       ;;
21545   esac
21546
21547     REPLACE_ITOLD=0
21548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
21549 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
21550 if ${gl_cv_func_itold_works+:} false; then :
21551   $as_echo_n "(cached) " >&6
21552 else
21553
21554       if test "$cross_compiling" = yes; then :
21555   case "$host" in
21556            sparc*-*-linux*)
21557              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21558 /* end confdefs.h.  */
21559 #if defined __LP64__ || defined __arch64__
21560                 yes
21561                 #endif
21562 _ACEOF
21563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21564   $EGREP "yes" >/dev/null 2>&1; then :
21565   gl_cv_func_itold_works="guessing no"
21566 else
21567   gl_cv_func_itold_works="guessing yes"
21568 fi
21569 rm -f conftest*
21570
21571              ;;
21572            *) gl_cv_func_itold_works="guessing yes" ;;
21573          esac
21574
21575 else
21576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21577 /* end confdefs.h.  */
21578
21579 int i = -1;
21580 volatile long double ld;
21581 int main ()
21582 {
21583   ld += i * 1.0L;
21584   if (ld > 0)
21585     return 1;
21586   return 0;
21587 }
21588 _ACEOF
21589 if ac_fn_c_try_run "$LINENO"; then :
21590   gl_cv_func_itold_works=yes
21591 else
21592   gl_cv_func_itold_works=no
21593 fi
21594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21595   conftest.$ac_objext conftest.beam conftest.$ac_ext
21596 fi
21597
21598
21599 fi
21600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
21601 $as_echo "$gl_cv_func_itold_works" >&6; }
21602   case "$gl_cv_func_itold_works" in
21603     *no)
21604       REPLACE_ITOLD=1
21605                   FLOAT_H=float.h
21606       ;;
21607   esac
21608
21609   if test -n "$FLOAT_H"; then
21610
21611
21612
21613
21614
21615
21616
21617
21618      if test $gl_cv_have_include_next = yes; then
21619        gl_cv_next_float_h='<'float.h'>'
21620      else
21621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
21622 $as_echo_n "checking absolute name of <float.h>... " >&6; }
21623 if ${gl_cv_next_float_h+:} false; then :
21624   $as_echo_n "(cached) " >&6
21625 else
21626
21627                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21628 /* end confdefs.h.  */
21629 #include <float.h>
21630
21631 _ACEOF
21632                                                                                                                         case "$host_os" in
21633                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
21634                  *)    gl_absname_cpp="$ac_cpp" ;;
21635                esac
21636
21637                case "$host_os" in
21638                  mingw*)
21639                                                                                                                                      gl_dirsep_regex='[/\\]'
21640                    ;;
21641                  *)
21642                    gl_dirsep_regex='\/'
21643                    ;;
21644                esac
21645                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21646
21647                gl_header_literal_regex=`echo 'float.h' \
21648                                         | sed -e "$gl_make_literal_regex_sed"`
21649                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21650                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21651                    s|^/[^/]|//&|
21652                    p
21653                    q
21654                  }'
21655                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21656                       sed -n "$gl_absolute_header_sed"`'"'
21657
21658
21659 fi
21660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
21661 $as_echo "$gl_cv_next_float_h" >&6; }
21662      fi
21663      NEXT_FLOAT_H=$gl_cv_next_float_h
21664
21665      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21666        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21667        gl_next_as_first_directive='<'float.h'>'
21668      else
21669        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21670        gl_next_as_first_directive=$gl_cv_next_float_h
21671      fi
21672      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
21673
21674
21675
21676
21677   fi
21678
21679    if test -n "$FLOAT_H"; then
21680   GL_GENERATE_FLOAT_H_TRUE=
21681   GL_GENERATE_FLOAT_H_FALSE='#'
21682 else
21683   GL_GENERATE_FLOAT_H_TRUE='#'
21684   GL_GENERATE_FLOAT_H_FALSE=
21685 fi
21686
21687
21688
21689   if test $REPLACE_FLOAT_LDBL = 1; then
21690
21691
21692
21693
21694
21695
21696
21697
21698   M4_LIBOBJS="$M4_LIBOBJS float.$ac_objext"
21699
21700   fi
21701   if test $REPLACE_ITOLD = 1; then
21702
21703
21704
21705
21706
21707
21708
21709
21710   M4_LIBOBJS="$M4_LIBOBJS itold.$ac_objext"
21711
21712   fi
21713
21714
21715
21716   case "$host_os" in
21717     mingw* | pw*)
21718             REPLACE_FOPEN=1
21719             gl_cv_func_fopen_slash="guessing no"
21720       ;;
21721     *)
21722                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
21723 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
21724 if ${gl_cv_func_fopen_slash+:} false; then :
21725   $as_echo_n "(cached) " >&6
21726 else
21727
21728           if test "$cross_compiling" = yes; then :
21729
21730              case "$host_os" in
21731                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
21732                  gl_cv_func_fopen_slash="guessing no" ;;
21733                *)
21734                  gl_cv_func_fopen_slash="guessing yes" ;;
21735              esac
21736
21737 else
21738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21739 /* end confdefs.h.  */
21740
21741 #include <stddef.h>
21742 #include <stdio.h>
21743 int main ()
21744 {
21745   return fopen ("conftest.sl/", "w") != NULL;
21746 }
21747 _ACEOF
21748 if ac_fn_c_try_run "$LINENO"; then :
21749   gl_cv_func_fopen_slash=yes
21750 else
21751   gl_cv_func_fopen_slash=no
21752 fi
21753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21754   conftest.$ac_objext conftest.beam conftest.$ac_ext
21755 fi
21756
21757           rm -f conftest.sl
21758
21759 fi
21760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
21761 $as_echo "$gl_cv_func_fopen_slash" >&6; }
21762       ;;
21763   esac
21764   case "$gl_cv_func_fopen_slash" in
21765     *no)
21766
21767 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
21768
21769       REPLACE_FOPEN=1
21770       ;;
21771   esac
21772
21773   if test $REPLACE_FOPEN = 1; then
21774
21775
21776
21777
21778
21779
21780
21781
21782   M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
21783
21784     :
21785   fi
21786
21787
21788
21789
21790
21791           GNULIB_FOPEN=1
21792
21793
21794
21795
21796
21797 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
21798
21799
21800
21801
21802
21803 cat >>confdefs.h <<_ACEOF
21804 #define GNULIB_FOPEN_SAFER 1
21805 _ACEOF
21806
21807
21808
21809
21810   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
21811 $as_echo_n "checking for __fpending... " >&6; }
21812 if ${gl_cv_func___fpending+:} false; then :
21813   $as_echo_n "(cached) " >&6
21814 else
21815
21816       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21817 /* end confdefs.h.  */
21818 #include <stdio.h>
21819              #if HAVE_STDIO_EXT_H
21820              # include <stdio_ext.h>
21821              #endif
21822
21823 int
21824 main ()
21825 {
21826 return ! __fpending (stdin);
21827   ;
21828   return 0;
21829 }
21830 _ACEOF
21831 if ac_fn_c_try_link "$LINENO"; then :
21832   gl_cv_func___fpending=yes
21833 else
21834   gl_cv_func___fpending=no
21835 fi
21836 rm -f core conftest.err conftest.$ac_objext \
21837     conftest$ac_exeext conftest.$ac_ext
21838
21839 fi
21840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
21841 $as_echo "$gl_cv_func___fpending" >&6; }
21842
21843   if test $gl_cv_func___fpending = no; then
21844
21845
21846
21847
21848
21849
21850
21851
21852   M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
21853
21854
21855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21856 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21857 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
21858   $as_echo_n "(cached) " >&6
21859 else
21860
21861       for ac_expr in                                                    \
21862                                                                         \
21863           '# glibc2'                                                    \
21864           'fp->_IO_write_ptr - fp->_IO_write_base'                      \
21865                                                                         \
21866           '# traditional Unix'                                          \
21867           'fp->_ptr - fp->_base'                                        \
21868                                                                         \
21869           '# BSD'                                                       \
21870           'fp->_p - fp->_bf._base'                                      \
21871                                                                         \
21872           '# SCO, Unixware'                                             \
21873           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
21874                                                                         \
21875           '# QNX'                                                       \
21876           '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21877                                                                         \
21878           '# old glibc?'                                                \
21879           'fp->__bufp - fp->__buffer'                                   \
21880                                                                         \
21881           '# old glibc iostream?'                                       \
21882           'fp->_pptr - fp->_pbase'                                      \
21883                                                                         \
21884           '# emx+gcc'                                                   \
21885           'fp->_ptr - fp->_buffer'                                      \
21886                                                                         \
21887           '# Minix'                                                     \
21888           'fp->_ptr - fp->_buf'                                         \
21889                                                                         \
21890           '# Plan9'                                                     \
21891           'fp->wp - fp->buf'                                            \
21892                                                                         \
21893           '# VMS'                                                       \
21894           '(*fp)->_ptr - (*fp)->_base'                                  \
21895                                                                         \
21896           '# e.g., DGUX R4.11; the info is not available'               \
21897           1                                                             \
21898           ; do
21899
21900         # Skip each embedded comment.
21901         case "$ac_expr" in '#'*) continue;; esac
21902
21903         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21904 /* end confdefs.h.  */
21905 #include <stdio.h>
21906 int
21907 main ()
21908 {
21909 FILE *fp = stdin; (void) ($ac_expr);
21910   ;
21911   return 0;
21912 }
21913 _ACEOF
21914 if ac_fn_c_try_compile "$LINENO"; then :
21915   fp_done=yes
21916
21917 fi
21918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21919         test "$fp_done" = yes && break
21920       done
21921
21922       ac_cv_sys_pending_output_n_bytes=$ac_expr
21923
21924
21925 fi
21926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21927 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21928
21929 cat >>confdefs.h <<_ACEOF
21930 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21931 _ACEOF
21932
21933
21934   fi
21935
21936
21937
21938
21939   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
21940 "
21941 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
21942   ac_have_decl=1
21943 else
21944   ac_have_decl=0
21945 fi
21946
21947 cat >>confdefs.h <<_ACEOF
21948 #define HAVE_DECL_FPURGE $ac_have_decl
21949 _ACEOF
21950
21951   if test "x$ac_cv_func_fpurge" = xyes; then
21952     HAVE_FPURGE=1
21953     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
21954     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
21955 $as_echo_n "checking whether fpurge works... " >&6; }
21956 if ${gl_cv_func_fpurge_works+:} false; then :
21957   $as_echo_n "(cached) " >&6
21958 else
21959   if test "$cross_compiling" = yes; then :
21960   gl_cv_func_fpurge_works='guessing no'
21961 else
21962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21963 /* end confdefs.h.  */
21964 #include <stdio.h>
21965
21966 int
21967 main ()
21968 {
21969 FILE *f = fopen ("conftest.txt", "w+");
21970         if (!f) return 1;
21971         if (fputc ('a', f) != 'a') return 2;
21972         rewind (f);
21973         if (fgetc (f) != 'a') return 3;
21974         if (fgetc (f) != EOF) return 4;
21975         if (fpurge (f) != 0) return 5;
21976         if (putc ('b', f) != 'b') return 6;
21977         if (fclose (f) != 0) return 7;
21978         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
21979         if (fgetc (f) != 'a') return 9;
21980         if (fgetc (f) != 'b') return 10;
21981         if (fgetc (f) != EOF) return 11;
21982         if (fclose (f) != 0) return 12;
21983         if (remove ("conftest.txt") != 0) return 13;
21984         return 0;
21985   ;
21986   return 0;
21987 }
21988 _ACEOF
21989 if ac_fn_c_try_run "$LINENO"; then :
21990   gl_cv_func_fpurge_works=yes
21991 else
21992   gl_cv_func_fpurge_works=no
21993 fi
21994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21995   conftest.$ac_objext conftest.beam conftest.$ac_ext
21996 fi
21997
21998 fi
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
22000 $as_echo "$gl_cv_func_fpurge_works" >&6; }
22001     if test "x$gl_cv_func_fpurge_works" != xyes; then
22002       REPLACE_FPURGE=1
22003     fi
22004   else
22005     HAVE_FPURGE=0
22006   fi
22007   if test "x$ac_cv_have_decl_fpurge" = xno; then
22008     HAVE_DECL_FPURGE=0
22009   fi
22010
22011   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
22012
22013
22014
22015
22016
22017
22018
22019
22020   M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
22021
22022   fi
22023
22024
22025
22026
22027
22028           GNULIB_FPURGE=1
22029
22030
22031
22032
22033
22034 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
22035
22036
22037
22038
22039
22040
22041   if test $ac_cv_func___freadahead = no; then
22042
22043
22044
22045
22046
22047
22048
22049
22050   M4_LIBOBJS="$M4_LIBOBJS freadahead.$ac_objext"
22051
22052   fi
22053
22054
22055
22056
22057
22058
22059   if test $gl_cv_func_frexp_no_libm = yes; then
22060
22061
22062
22063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
22064 $as_echo_n "checking whether frexp works... " >&6; }
22065 if ${gl_cv_func_frexp_works+:} false; then :
22066   $as_echo_n "(cached) " >&6
22067 else
22068
22069       if test "$cross_compiling" = yes; then :
22070   case "$host_os" in
22071            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
22072            *)                        gl_cv_func_frexp_works="guessing yes";;
22073          esac
22074
22075 else
22076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22077 /* end confdefs.h.  */
22078
22079 #include <float.h>
22080 #include <math.h>
22081 #include <string.h>
22082 #if HAVE_DECL_ALARM
22083 # include <signal.h>
22084 # include <unistd.h>
22085 #endif
22086 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
22087    ICC 10.0 has a bug when optimizing the expression -zero.
22088    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
22089    to PowerPC on Mac OS X 10.5.  */
22090 #if defined __hpux || defined __sgi || defined __ICC
22091 static double
22092 compute_minus_zero (void)
22093 {
22094   return -DBL_MIN * DBL_MIN;
22095 }
22096 # define minus_zero compute_minus_zero ()
22097 #else
22098 double minus_zero = -0.0;
22099 #endif
22100 int main()
22101 {
22102   int result = 0;
22103   int i;
22104   volatile double x;
22105   double zero = 0.0;
22106 #if HAVE_DECL_ALARM
22107   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
22108      number.  Let the test fail in this case.  */
22109   signal (SIGALRM, SIG_DFL);
22110   alarm (5);
22111 #endif
22112   /* Test on denormalized numbers.  */
22113   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
22114     ;
22115   if (x > 0.0)
22116     {
22117       int exp;
22118       double y = frexp (x, &exp);
22119       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
22120          On NetBSD: y = 0.75. Correct: y = 0.5.  */
22121       if (y != 0.5)
22122         result |= 1;
22123     }
22124   /* Test on infinite numbers.  */
22125   x = 1.0 / zero;
22126   {
22127     int exp;
22128     double y = frexp (x, &exp);
22129     if (y != x)
22130       result |= 2;
22131   }
22132   /* Test on negative zero.  */
22133   x = minus_zero;
22134   {
22135     int exp;
22136     double y = frexp (x, &exp);
22137     if (memcmp (&y, &x, sizeof x))
22138       result |= 4;
22139   }
22140   return result;
22141 }
22142 _ACEOF
22143 if ac_fn_c_try_run "$LINENO"; then :
22144   gl_cv_func_frexp_works=yes
22145 else
22146   gl_cv_func_frexp_works=no
22147 fi
22148 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22149   conftest.$ac_objext conftest.beam conftest.$ac_ext
22150 fi
22151
22152
22153 fi
22154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
22155 $as_echo "$gl_cv_func_frexp_works" >&6; }
22156
22157     case "$gl_cv_func_frexp_works" in
22158       *yes) gl_func_frexp_no_libm=yes ;;
22159       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
22160     esac
22161   else
22162     gl_func_frexp_no_libm=no
22163         REPLACE_FREXP=1
22164   fi
22165   if test $gl_func_frexp_no_libm = yes; then
22166
22167 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
22168
22169   fi
22170
22171   if test $gl_func_frexp_no_libm != yes; then
22172
22173
22174
22175
22176
22177
22178
22179
22180   M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
22181
22182   fi
22183
22184
22185
22186
22187
22188           GNULIB_FREXP=1
22189
22190
22191
22192
22193
22194 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
22195
22196
22197
22198
22199
22200
22201       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
22202 "
22203 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
22204
22205 else
22206   HAVE_DECL_FREXPL=0
22207 fi
22208
22209   if test $HAVE_DECL_FREXPL = 1; then
22210
22211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
22212 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
22213 if ${gl_cv_func_frexpl_no_libm+:} false; then :
22214   $as_echo_n "(cached) " >&6
22215 else
22216
22217       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22218 /* end confdefs.h.  */
22219 #include <math.h>
22220              long double x;
22221 int
22222 main ()
22223 {
22224 int e; return frexpl (x, &e) > 0;
22225   ;
22226   return 0;
22227 }
22228 _ACEOF
22229 if ac_fn_c_try_link "$LINENO"; then :
22230   gl_cv_func_frexpl_no_libm=yes
22231 else
22232   gl_cv_func_frexpl_no_libm=no
22233 fi
22234 rm -f core conftest.err conftest.$ac_objext \
22235     conftest$ac_exeext conftest.$ac_ext
22236
22237 fi
22238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
22239 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
22240
22241     if test $gl_cv_func_frexpl_no_libm = yes; then
22242
22243
22244      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
22245 $as_echo_n "checking whether frexpl works... " >&6; }
22246 if ${gl_cv_func_frexpl_works+:} false; then :
22247   $as_echo_n "(cached) " >&6
22248 else
22249
22250       if test "$cross_compiling" = yes; then :
22251
22252          case "$host_os" in
22253            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
22254               gl_cv_func_frexpl_works="guessing no";;
22255            *) gl_cv_func_frexpl_works="guessing yes";;
22256          esac
22257
22258 else
22259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22260 /* end confdefs.h.  */
22261
22262 #include <float.h>
22263 #include <math.h>
22264 /* Override the values of <float.h>, like done in float.in.h.  */
22265 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
22266 # undef LDBL_MIN_EXP
22267 # define LDBL_MIN_EXP    (-16381)
22268 #endif
22269 #if defined __i386__ && defined __FreeBSD__
22270 # undef LDBL_MIN_EXP
22271 # define LDBL_MIN_EXP    (-16381)
22272 #endif
22273 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
22274 # undef LDBL_MIN_EXP
22275 # define LDBL_MIN_EXP DBL_MIN_EXP
22276 #endif
22277 #if defined __sgi && (LDBL_MANT_DIG >= 106)
22278 # if defined __GNUC__
22279 #  undef LDBL_MIN_EXP
22280 #  define LDBL_MIN_EXP DBL_MIN_EXP
22281 # endif
22282 #endif
22283 extern
22284 #ifdef __cplusplus
22285 "C"
22286 #endif
22287 long double frexpl (long double, int *);
22288 int main()
22289 {
22290   int result = 0;
22291   volatile long double x;
22292   /* Test on finite numbers that fails on AIX 5.1.  */
22293   x = 16.0L;
22294   {
22295     int exp = -9999;
22296     frexpl (x, &exp);
22297     if (exp != 5)
22298       result |= 1;
22299   }
22300   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
22301      function returns an invalid (incorrectly normalized) value: it returns
22302                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
22303      but the correct result is
22304           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
22305   x = 1.01L;
22306   {
22307     int exp = -9999;
22308     long double y = frexpl (x, &exp);
22309     if (!(exp == 1 && y == 0.505L))
22310       result |= 2;
22311   }
22312   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
22313      LDBL_MAX_EXP = 16384.
22314      In the loop end test, we test x against Infinity, rather than comparing
22315      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
22316   {
22317     int i;
22318     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
22319       {
22320         int exp = -9999;
22321         frexpl (x, &exp);
22322         if (exp != i)
22323           {
22324             result |= 4;
22325             break;
22326           }
22327       }
22328   }
22329   /* Test on denormalized numbers.  */
22330   {
22331     int i;
22332     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
22333       ;
22334     if (x > 0.0L)
22335       {
22336         int exp;
22337         long double y = frexpl (x, &exp);
22338         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
22339            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
22340         if (exp != LDBL_MIN_EXP - 1)
22341           result |= 8;
22342       }
22343   }
22344   /* Test on infinite numbers.  */
22345   x = 1.0L / 0.0L;
22346   {
22347     int exp;
22348     long double y = frexpl (x, &exp);
22349     if (y != x)
22350       result |= 16;
22351   }
22352   return result;
22353 }
22354 _ACEOF
22355 if ac_fn_c_try_run "$LINENO"; then :
22356   gl_cv_func_frexpl_works=yes
22357 else
22358   gl_cv_func_frexpl_works=no
22359 fi
22360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22361   conftest.$ac_objext conftest.beam conftest.$ac_ext
22362 fi
22363
22364
22365 fi
22366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
22367 $as_echo "$gl_cv_func_frexpl_works" >&6; }
22368
22369       case "$gl_cv_func_frexpl_works" in
22370         *yes) gl_func_frexpl_no_libm=yes ;;
22371         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
22372       esac
22373     else
22374       gl_func_frexpl_no_libm=no
22375             REPLACE_FREXPL=1
22376     fi
22377     if test $gl_func_frexpl_no_libm = yes; then
22378
22379 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
22380
22381     fi
22382   fi
22383
22384   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
22385
22386
22387
22388
22389
22390
22391
22392
22393   M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
22394
22395   fi
22396
22397
22398
22399
22400
22401           GNULIB_FREXPL=1
22402
22403
22404
22405
22406
22407 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
22408
22409
22410
22411
22412
22413
22414     if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22415     REPLACE_FSEEK=1
22416   fi
22417
22418   if test $REPLACE_FSEEK = 1; then
22419
22420
22421
22422
22423
22424
22425
22426
22427   M4_LIBOBJS="$M4_LIBOBJS fseek.$ac_objext"
22428
22429   fi
22430
22431
22432
22433
22434
22435           GNULIB_FSEEK=1
22436
22437
22438
22439
22440
22441 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
22454 $as_echo_n "checking for fseeko... " >&6; }
22455 if ${gl_cv_func_fseeko+:} false; then :
22456   $as_echo_n "(cached) " >&6
22457 else
22458
22459       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22460 /* end confdefs.h.  */
22461 #include <stdio.h>
22462
22463 int
22464 main ()
22465 {
22466 fseeko (stdin, 0, 0);
22467   ;
22468   return 0;
22469 }
22470 _ACEOF
22471 if ac_fn_c_try_link "$LINENO"; then :
22472   gl_cv_func_fseeko=yes
22473 else
22474   gl_cv_func_fseeko=no
22475 fi
22476 rm -f core conftest.err conftest.$ac_objext \
22477     conftest$ac_exeext conftest.$ac_ext
22478
22479 fi
22480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
22481 $as_echo "$gl_cv_func_fseeko" >&6; }
22482
22483
22484   if test $ac_cv_have_decl_fseeko = no; then
22485     HAVE_DECL_FSEEKO=0
22486   fi
22487
22488   if test $gl_cv_func_fseeko = no; then
22489     HAVE_FSEEKO=0
22490   else
22491     if test $WINDOWS_64_BIT_OFF_T = 1; then
22492       REPLACE_FSEEKO=1
22493     fi
22494     if test $gl_cv_var_stdin_large_offset = no; then
22495       REPLACE_FSEEKO=1
22496     fi
22497
22498
22499
22500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
22501 $as_echo_n "checking whether fflush works on input streams... " >&6; }
22502 if ${gl_cv_func_fflush_stdin+:} false; then :
22503   $as_echo_n "(cached) " >&6
22504 else
22505   echo hello world > conftest.txt
22506      if test "$cross_compiling" = yes; then :
22507   gl_cv_func_fflush_stdin=cross
22508 else
22509   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22510 /* end confdefs.h.  */
22511
22512 #include <stdio.h>
22513 #if HAVE_UNISTD_H
22514 # include <unistd.h>
22515 #else /* on Windows with MSVC */
22516 # include <io.h>
22517 #endif
22518
22519 int
22520 main ()
22521 {
22522 FILE *f = fopen ("conftest.txt", "r");
22523          char buffer[10];
22524          int fd;
22525          int c;
22526          if (f == NULL)
22527            return 1;
22528          fd = fileno (f);
22529          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
22530            return 2;
22531          /* For deterministic results, ensure f read a bigger buffer.  */
22532          if (lseek (fd, 0, SEEK_CUR) == 5)
22533            return 3;
22534          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
22535             on BSD systems and on mingw.  */
22536          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
22537            return 4;
22538          if (lseek (fd, 0, SEEK_CUR) != 5)
22539            return 5;
22540          /* Verify behaviour of fflush after ungetc. See
22541             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
22542          /* Verify behaviour of fflush after a backup ungetc.  This fails on
22543             mingw.  */
22544          c = fgetc (f);
22545          ungetc (c, f);
22546          fflush (f);
22547          if (fgetc (f) != c)
22548            return 6;
22549          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
22550             on glibc 2.8 and on BSD systems.  */
22551          c = fgetc (f);
22552          ungetc ('@', f);
22553          fflush (f);
22554          if (fgetc (f) != c)
22555            return 7;
22556          return 0;
22557
22558   ;
22559   return 0;
22560 }
22561 _ACEOF
22562 if ac_fn_c_try_run "$LINENO"; then :
22563   gl_cv_func_fflush_stdin=yes
22564 else
22565   gl_cv_func_fflush_stdin=no
22566 fi
22567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22568   conftest.$ac_objext conftest.beam conftest.$ac_ext
22569 fi
22570
22571      rm conftest.txt
22572
22573 fi
22574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
22575 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
22576   case $gl_cv_func_fflush_stdin in
22577     yes) gl_func_fflush_stdin=1 ;;
22578     no)  gl_func_fflush_stdin=0 ;;
22579     *)   gl_func_fflush_stdin='(-1)' ;;
22580   esac
22581
22582 cat >>confdefs.h <<_ACEOF
22583 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
22584 _ACEOF
22585
22586
22587       if test $gl_cv_func_fflush_stdin != yes; then
22588         REPLACE_FSEEKO=1
22589       fi
22590
22591   fi
22592
22593   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22594
22595
22596
22597
22598
22599
22600
22601
22602   M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
22603
22604
22605       for ac_func in _fseeki64
22606 do :
22607   ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
22608 if test "x$ac_cv_func__fseeki64" = xyes; then :
22609   cat >>confdefs.h <<_ACEOF
22610 #define HAVE__FSEEKI64 1
22611 _ACEOF
22612
22613 fi
22614 done
22615
22616
22617   fi
22618
22619
22620
22621
22622
22623           GNULIB_FSEEKO=1
22624
22625
22626
22627
22628
22629 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
22630
22631
22632
22633
22634
22635
22636
22637   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
22638     REPLACE_FSTAT=1
22639   fi
22640
22641
22642   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
22643     REPLACE_FSTAT=1
22644   fi
22645
22646
22647
22648   if test $REPLACE_FSTAT = 1; then
22649
22650
22651
22652
22653
22654
22655
22656
22657   M4_LIBOBJS="$M4_LIBOBJS fstat.$ac_objext"
22658
22659     :
22660   fi
22661
22662
22663
22664
22665
22666           GNULIB_FSTAT=1
22667
22668
22669
22670
22671
22672 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
22673
22674
22675
22676
22677
22678
22679     if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22680     REPLACE_FTELL=1
22681   fi
22682
22683   if test $REPLACE_FTELL = 1; then
22684
22685
22686
22687
22688
22689
22690
22691
22692   M4_LIBOBJS="$M4_LIBOBJS ftell.$ac_objext"
22693
22694   fi
22695
22696
22697
22698
22699
22700           GNULIB_FTELL=1
22701
22702
22703
22704
22705
22706 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719   if test $ac_cv_have_decl_ftello = no; then
22720     HAVE_DECL_FTELLO=0
22721   fi
22722
22723   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
22724 $as_echo_n "checking for ftello... " >&6; }
22725 if ${gl_cv_func_ftello+:} false; then :
22726   $as_echo_n "(cached) " >&6
22727 else
22728
22729       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22730 /* end confdefs.h.  */
22731 #include <stdio.h>
22732 int
22733 main ()
22734 {
22735 ftello (stdin);
22736   ;
22737   return 0;
22738 }
22739 _ACEOF
22740 if ac_fn_c_try_link "$LINENO"; then :
22741   gl_cv_func_ftello=yes
22742 else
22743   gl_cv_func_ftello=no
22744 fi
22745 rm -f core conftest.err conftest.$ac_objext \
22746     conftest$ac_exeext conftest.$ac_ext
22747
22748 fi
22749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
22750 $as_echo "$gl_cv_func_ftello" >&6; }
22751   if test $gl_cv_func_ftello = no; then
22752     HAVE_FTELLO=0
22753   else
22754     if test $WINDOWS_64_BIT_OFF_T = 1; then
22755       REPLACE_FTELLO=1
22756     fi
22757     if test $gl_cv_var_stdin_large_offset = no; then
22758       REPLACE_FTELLO=1
22759     fi
22760     if test $REPLACE_FTELLO = 0; then
22761
22762       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
22763 $as_echo_n "checking whether ftello works... " >&6; }
22764 if ${gl_cv_func_ftello_works+:} false; then :
22765   $as_echo_n "(cached) " >&6
22766 else
22767
22768                               case "$host_os" in
22769                       # Guess no on Solaris.
22770             solaris*) gl_cv_func_ftello_works="guessing no" ;;
22771                       # Guess yes otherwise.
22772             *)        gl_cv_func_ftello_works="guessing yes" ;;
22773           esac
22774           if test "$cross_compiling" = yes; then :
22775   :
22776 else
22777   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22778 /* end confdefs.h.  */
22779
22780 #include <stdio.h>
22781 #include <stdlib.h>
22782 #include <string.h>
22783 #define TESTFILE "conftest.tmp"
22784 int
22785 main (void)
22786 {
22787   FILE *fp;
22788
22789   /* Create a file with some contents.  */
22790   fp = fopen (TESTFILE, "w");
22791   if (fp == NULL)
22792     return 70;
22793   if (fwrite ("foogarsh", 1, 8, fp) < 8)
22794     return 71;
22795   if (fclose (fp))
22796     return 72;
22797
22798   /* The file's contents is now "foogarsh".  */
22799
22800   /* Try writing after reading to EOF.  */
22801   fp = fopen (TESTFILE, "r+");
22802   if (fp == NULL)
22803     return 73;
22804   if (fseek (fp, -1, SEEK_END))
22805     return 74;
22806   if (!(getc (fp) == 'h'))
22807     return 1;
22808   if (!(getc (fp) == EOF))
22809     return 2;
22810   if (!(ftell (fp) == 8))
22811     return 3;
22812   if (!(ftell (fp) == 8))
22813     return 4;
22814   if (!(putc ('!', fp) == '!'))
22815     return 5;
22816   if (!(ftell (fp) == 9))
22817     return 6;
22818   if (!(fclose (fp) == 0))
22819     return 7;
22820   fp = fopen (TESTFILE, "r");
22821   if (fp == NULL)
22822     return 75;
22823   {
22824     char buf[10];
22825     if (!(fread (buf, 1, 10, fp) == 9))
22826       return 10;
22827     if (!(memcmp (buf, "foogarsh!", 9) == 0))
22828       return 11;
22829   }
22830   if (!(fclose (fp) == 0))
22831     return 12;
22832
22833   /* The file's contents is now "foogarsh!".  */
22834
22835   return 0;
22836 }
22837 _ACEOF
22838 if ac_fn_c_try_run "$LINENO"; then :
22839   gl_cv_func_ftello_works=yes
22840 else
22841   gl_cv_func_ftello_works=no
22842 fi
22843 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22844   conftest.$ac_objext conftest.beam conftest.$ac_ext
22845 fi
22846
22847
22848 fi
22849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
22850 $as_echo "$gl_cv_func_ftello_works" >&6; }
22851       case "$gl_cv_func_ftello_works" in
22852         *yes) ;;
22853         *)
22854           REPLACE_FTELLO=1
22855
22856 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
22857
22858           ;;
22859       esac
22860     fi
22861   fi
22862
22863   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
22864
22865
22866
22867
22868
22869
22870
22871
22872   M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
22873
22874
22875       for ac_func in _ftelli64
22876 do :
22877   ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
22878 if test "x$ac_cv_func__ftelli64" = xyes; then :
22879   cat >>confdefs.h <<_ACEOF
22880 #define HAVE__FTELLI64 1
22881 _ACEOF
22882
22883 fi
22884 done
22885
22886
22887   fi
22888
22889
22890
22891
22892
22893           GNULIB_FTELLO=1
22894
22895
22896
22897
22898
22899 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
22900
22901
22902
22903
22904
22905
22906   if test $ac_cv_func_getdtablesize != yes; then
22907     HAVE_GETDTABLESIZE=0
22908   fi
22909
22910   if test $HAVE_GETDTABLESIZE = 0; then
22911
22912
22913
22914
22915
22916
22917
22918
22919   M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
22920
22921     :
22922   fi
22923
22924
22925
22926
22927
22928           GNULIB_GETDTABLESIZE=1
22929
22930
22931
22932
22933
22934 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22935
22936
22937
22938
22939
22940
22941
22942
22943   if test $REPLACE_GETOPT = 1; then
22944
22945
22946
22947
22948
22949
22950
22951
22952   M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962   M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
22963
22964
22965
22966
22967         GNULIB_GL_M4_UNISTD_H_GETOPT=1
22968   fi
22969
22970
22971
22972 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
22973
22974
22975
22976
22977
22978
22979
22980     REPLACE_GETOPT=0
22981     if test -n "$gl_replace_getopt"; then
22982       REPLACE_GETOPT=1
22983     fi
22984
22985   if test $REPLACE_GETOPT = 1; then
22986
22987   GETOPT_H=getopt.h
22988
22989 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22990
22991
22992
22993   fi
22994
22995   if test $REPLACE_GETOPT = 1; then
22996
22997
22998
22999
23000
23001
23002
23003
23004   M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014   M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
23015
23016
23017
23018
23019         GNULIB_GL_M4_UNISTD_H_GETOPT=1
23020   fi
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030   gl_gettimeofday_timezone=void
23031   if test $ac_cv_func_gettimeofday != yes; then
23032     HAVE_GETTIMEOFDAY=0
23033   else
23034
23035
23036
23037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23038 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23039 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
23040   $as_echo_n "(cached) " >&6
23041 else
23042   if test "$cross_compiling" = yes; then :
23043   # When cross-compiling:
23044       case "$host_os" in
23045                 # Guess all is fine on glibc systems.
23046         *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23047                 # If we don't know, assume the worst.
23048         *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23049       esac
23050
23051 else
23052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23053 /* end confdefs.h.  */
23054 #include <string.h>
23055           #include <sys/time.h>
23056           #include <time.h>
23057           #include <stdlib.h>
23058
23059 int
23060 main ()
23061 {
23062
23063           time_t t = 0;
23064           struct tm *lt;
23065           struct tm saved_lt;
23066           struct timeval tv;
23067           lt = localtime (&t);
23068           saved_lt = *lt;
23069           gettimeofday (&tv, NULL);
23070           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23071
23072   ;
23073   return 0;
23074 }
23075 _ACEOF
23076 if ac_fn_c_try_run "$LINENO"; then :
23077   gl_cv_func_gettimeofday_clobber=no
23078 else
23079   gl_cv_func_gettimeofday_clobber=yes
23080 fi
23081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23082   conftest.$ac_objext conftest.beam conftest.$ac_ext
23083 fi
23084
23085 fi
23086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23087 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23088
23089  case "$gl_cv_func_gettimeofday_clobber" in
23090    *yes)
23091      REPLACE_GETTIMEOFDAY=1
23092
23093
23094 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23095
23096
23097 $as_echo "#define localtime rpl_localtime" >>confdefs.h
23098
23099
23100
23101 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23102
23103      ;;
23104  esac
23105
23106     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23107 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23108 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
23109   $as_echo_n "(cached) " >&6
23110 else
23111   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23112 /* end confdefs.h.  */
23113 #include <sys/time.h>
23114               struct timeval c;
23115               int gettimeofday (struct timeval *restrict, void *restrict);
23116
23117 int
23118 main ()
23119 {
23120 /* glibc uses struct timezone * rather than the POSIX void *
23121                  if _GNU_SOURCE is defined.  However, since the only portable
23122                  use of gettimeofday uses NULL as the second parameter, and
23123                  since the glibc definition is actually more typesafe, it is
23124                  not worth wrapping this to get a compliant signature.  */
23125               int (*f) (struct timeval *restrict, void *restrict)
23126                 = gettimeofday;
23127               int x = f (&c, 0);
23128               return !(x | c.tv_sec | c.tv_usec);
23129
23130   ;
23131   return 0;
23132 }
23133 _ACEOF
23134 if ac_fn_c_try_compile "$LINENO"; then :
23135   gl_cv_func_gettimeofday_posix_signature=yes
23136 else
23137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23138 /* end confdefs.h.  */
23139 #include <sys/time.h>
23140 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23141
23142 int
23143 main ()
23144 {
23145
23146   ;
23147   return 0;
23148 }
23149 _ACEOF
23150 if ac_fn_c_try_compile "$LINENO"; then :
23151   gl_cv_func_gettimeofday_posix_signature=almost
23152 else
23153   gl_cv_func_gettimeofday_posix_signature=no
23154 fi
23155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23156 fi
23157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23158 fi
23159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23160 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23161     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23162       gl_gettimeofday_timezone='struct timezone'
23163     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23164       REPLACE_GETTIMEOFDAY=1
23165     fi
23166         if test $REPLACE_STRUCT_TIMEVAL = 1; then
23167       REPLACE_GETTIMEOFDAY=1
23168     fi
23169
23170   fi
23171
23172 cat >>confdefs.h <<_ACEOF
23173 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23174 _ACEOF
23175
23176
23177   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23178
23179
23180
23181
23182
23183
23184
23185
23186   M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
23187
23188
23189   for ac_header in sys/timeb.h
23190 do :
23191   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23192 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
23193   cat >>confdefs.h <<_ACEOF
23194 #define HAVE_SYS_TIMEB_H 1
23195 _ACEOF
23196
23197 fi
23198
23199 done
23200
23201   for ac_func in _ftime
23202 do :
23203   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23204 if test "x$ac_cv_func__ftime" = xyes; then :
23205   cat >>confdefs.h <<_ACEOF
23206 #define HAVE__FTIME 1
23207 _ACEOF
23208
23209 fi
23210 done
23211
23212
23213   fi
23214
23215
23216
23217
23218
23219           GNULIB_GETTIMEOFDAY=1
23220
23221
23222
23223
23224
23225 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
23226
23227
23228
23229   # Autoconf 2.61a.99 and earlier don't support linking a file only
23230   # in VPATH builds.  But since GNUmakefile is for maintainer use
23231   # only, it does not matter if we skip the link with older autoconf.
23232   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23233   # builds, so use a shell variable to bypass this.
23234   GNUmakefile=GNUmakefile
23235   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23236
23237
23238
23239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
23240 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
23241 if ${gl_cv_func_isnand_no_libm+:} false; then :
23242   $as_echo_n "(cached) " >&6
23243 else
23244
23245       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23246 /* end confdefs.h.  */
23247 #include <math.h>
23248              #if __GNUC__ >= 4
23249              # undef isnand
23250              # define isnand(x) __builtin_isnan ((double)(x))
23251              #else
23252              # undef isnand
23253              # define isnand(x) isnan ((double)(x))
23254              #endif
23255              double x;
23256 int
23257 main ()
23258 {
23259 return isnand (x);
23260   ;
23261   return 0;
23262 }
23263 _ACEOF
23264 if ac_fn_c_try_link "$LINENO"; then :
23265   gl_cv_func_isnand_no_libm=yes
23266 else
23267   gl_cv_func_isnand_no_libm=no
23268 fi
23269 rm -f core conftest.err conftest.$ac_objext \
23270     conftest$ac_exeext conftest.$ac_ext
23271
23272 fi
23273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
23274 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
23275
23276   gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
23277   if test $gl_cv_func_isnand_no_libm = yes; then
23278
23279 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
23280
23281   fi
23282
23283   if test $gl_func_isnand_no_libm != yes; then
23284
23285
23286
23287
23288
23289
23290
23291
23292   M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
23293
23294
23295
23296
23297   fi
23298
23299
23300   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
23301 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
23302 if ${gl_cv_func_isnanf_no_libm+:} false; then :
23303   $as_echo_n "(cached) " >&6
23304 else
23305
23306       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23307 /* end confdefs.h.  */
23308 #include <math.h>
23309              #if __GNUC__ >= 4
23310              # undef isnanf
23311              # define isnanf(x) __builtin_isnanf ((float)(x))
23312              #elif defined isnan
23313              # undef isnanf
23314              # define isnanf(x) isnan ((float)(x))
23315              #endif
23316              float x;
23317 int
23318 main ()
23319 {
23320 return isnanf (x);
23321   ;
23322   return 0;
23323 }
23324 _ACEOF
23325 if ac_fn_c_try_link "$LINENO"; then :
23326   gl_cv_func_isnanf_no_libm=yes
23327 else
23328   gl_cv_func_isnanf_no_libm=no
23329 fi
23330 rm -f core conftest.err conftest.$ac_objext \
23331     conftest$ac_exeext conftest.$ac_ext
23332
23333 fi
23334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
23335 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
23336
23337   if test $gl_cv_func_isnanf_no_libm = yes; then
23338
23339
23340
23341   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
23342 $as_echo_n "checking whether isnan(float) works... " >&6; }
23343 if ${gl_cv_func_isnanf_works+:} false; then :
23344   $as_echo_n "(cached) " >&6
23345 else
23346
23347       if test "$cross_compiling" = yes; then :
23348   case "$host_os" in
23349            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
23350            *)                gl_cv_func_isnanf_works="guessing yes";;
23351          esac
23352
23353 else
23354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23355 /* end confdefs.h.  */
23356
23357 #include <math.h>
23358 #if __GNUC__ >= 4
23359 # undef isnanf
23360 # define isnanf(x) __builtin_isnanf ((float)(x))
23361 #elif defined isnan
23362 # undef isnanf
23363 # define isnanf(x) isnan ((float)(x))
23364 #endif
23365 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
23366 #ifdef __DECC
23367 static float
23368 NaN ()
23369 {
23370   static float zero = 0.0f;
23371   return zero / zero;
23372 }
23373 #else
23374 # define NaN() (0.0f / 0.0f)
23375 #endif
23376 #define NWORDS \
23377   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23378 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
23379 int main()
23380 {
23381   int result = 0;
23382
23383   if (isnanf (1.0f / 0.0f))
23384     result |= 1;
23385
23386   if (!isnanf (NaN ()))
23387     result |= 2;
23388
23389 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
23390   /* The isnanf function should be immune against changes in the sign bit and
23391      in the mantissa bits.  The xor operation twiddles a bit that can only be
23392      a sign bit or a mantissa bit.  */
23393   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
23394     {
23395       memory_float m;
23396
23397       m.value = NaN ();
23398       /* Set the bits below the exponent to 01111...111.  */
23399       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
23400       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
23401       if (!isnanf (m.value))
23402         result |= 4;
23403     }
23404 #endif
23405
23406   return result;
23407 }
23408 _ACEOF
23409 if ac_fn_c_try_run "$LINENO"; then :
23410   gl_cv_func_isnanf_works=yes
23411 else
23412   gl_cv_func_isnanf_works=no
23413 fi
23414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23415   conftest.$ac_objext conftest.beam conftest.$ac_ext
23416 fi
23417
23418
23419 fi
23420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
23421 $as_echo "$gl_cv_func_isnanf_works" >&6; }
23422
23423   fi
23424   if test $gl_cv_func_isnanf_no_libm = yes \
23425      && { case "$gl_cv_func_isnanf_works" in
23426             *yes) true;;
23427             *) false;;
23428           esac
23429         }; then
23430     gl_func_isnanf_no_libm=yes
23431
23432 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
23433
23434   else
23435     gl_func_isnanf_no_libm=no
23436   fi
23437
23438   if test $gl_func_isnanf_no_libm != yes; then
23439
23440
23441
23442
23443
23444
23445
23446
23447   M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
23448
23449
23450
23451   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
23452 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
23453 if ${gl_cv_cc_float_expbit0+:} false; then :
23454   $as_echo_n "(cached) " >&6
23455 else
23456
23457       if test "$cross_compiling" = yes; then :
23458   gl_cv_cc_float_expbit0="word 0 bit 23"
23459 else
23460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23461 /* end confdefs.h.  */
23462
23463 #include <float.h>
23464 #include <stddef.h>
23465 #include <stdio.h>
23466 #include <string.h>
23467 #define NWORDS \
23468   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23469 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
23470 static unsigned int ored_words[NWORDS];
23471 static unsigned int anded_words[NWORDS];
23472 static void add_to_ored_words (float x)
23473 {
23474   memory_float m;
23475   size_t i;
23476   /* Clear it first, in case
23477      sizeof (float) < sizeof (memory_float).  */
23478   memset (&m, 0, sizeof (memory_float));
23479   m.value = x;
23480   for (i = 0; i < NWORDS; i++)
23481     {
23482       ored_words[i] |= m.word[i];
23483       anded_words[i] &= m.word[i];
23484     }
23485 }
23486 int main ()
23487 {
23488   size_t j;
23489   FILE *fp = fopen ("conftest.out", "w");
23490   if (fp == NULL)
23491     return 1;
23492   for (j = 0; j < NWORDS; j++)
23493     anded_words[j] = ~ (unsigned int) 0;
23494   add_to_ored_words (0.25f);
23495   add_to_ored_words (0.5f);
23496   add_to_ored_words (1.0f);
23497   add_to_ored_words (2.0f);
23498   add_to_ored_words (4.0f);
23499   /* Remove bits that are common (e.g. if representation of the first mantissa
23500      bit is explicit).  */
23501   for (j = 0; j < NWORDS; j++)
23502     ored_words[j] &= ~anded_words[j];
23503   /* Now find the nonzero word.  */
23504   for (j = 0; j < NWORDS; j++)
23505     if (ored_words[j] != 0)
23506       break;
23507   if (j < NWORDS)
23508     {
23509       size_t i;
23510       for (i = j + 1; i < NWORDS; i++)
23511         if (ored_words[i] != 0)
23512           {
23513             fprintf (fp, "unknown");
23514             return (fclose (fp) != 0);
23515           }
23516       for (i = 0; ; i++)
23517         if ((ored_words[j] >> i) & 1)
23518           {
23519             fprintf (fp, "word %d bit %d", (int) j, (int) i);
23520             return (fclose (fp) != 0);
23521           }
23522     }
23523   fprintf (fp, "unknown");
23524   return (fclose (fp) != 0);
23525 }
23526
23527 _ACEOF
23528 if ac_fn_c_try_run "$LINENO"; then :
23529   gl_cv_cc_float_expbit0=`cat conftest.out`
23530 else
23531   gl_cv_cc_float_expbit0="unknown"
23532 fi
23533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23534   conftest.$ac_objext conftest.beam conftest.$ac_ext
23535 fi
23536
23537       rm -f conftest.out
23538
23539 fi
23540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
23541 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
23542   case "$gl_cv_cc_float_expbit0" in
23543     word*bit*)
23544       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23545       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
23546
23547 cat >>confdefs.h <<_ACEOF
23548 #define FLT_EXPBIT0_WORD $word
23549 _ACEOF
23550
23551
23552 cat >>confdefs.h <<_ACEOF
23553 #define FLT_EXPBIT0_BIT $bit
23554 _ACEOF
23555
23556       ;;
23557   esac
23558
23559
23560   fi
23561
23562
23563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23564 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23565 if ${gl_cv_func_isnanl_no_libm+:} false; then :
23566   $as_echo_n "(cached) " >&6
23567 else
23568
23569       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23570 /* end confdefs.h.  */
23571 #include <math.h>
23572              #if __GNUC__ >= 4
23573              # undef isnanl
23574              # define isnanl(x) __builtin_isnanl ((long double)(x))
23575              #elif defined isnan
23576              # undef isnanl
23577              # define isnanl(x) isnan ((long double)(x))
23578              #endif
23579              long double x;
23580 int
23581 main ()
23582 {
23583 return isnanl (x);
23584   ;
23585   return 0;
23586 }
23587 _ACEOF
23588 if ac_fn_c_try_link "$LINENO"; then :
23589   gl_cv_func_isnanl_no_libm=yes
23590 else
23591   gl_cv_func_isnanl_no_libm=no
23592 fi
23593 rm -f core conftest.err conftest.$ac_objext \
23594     conftest$ac_exeext conftest.$ac_ext
23595
23596 fi
23597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23598 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
23599
23600   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23601   if test $gl_func_isnanl_no_libm = yes; then
23602
23603
23604
23605
23606      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23607 $as_echo_n "checking whether isnanl works... " >&6; }
23608 if ${gl_cv_func_isnanl_works+:} false; then :
23609   $as_echo_n "(cached) " >&6
23610 else
23611
23612       if test "$cross_compiling" = yes; then :
23613   case "$host_cpu" in
23614                                  # Guess no on ia64, x86_64, i386.
23615            ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
23616            *)
23617              case "$host_os" in
23618                netbsd*) gl_cv_func_isnanl_works="guessing no";;
23619                *)       gl_cv_func_isnanl_works="guessing yes";;
23620              esac
23621              ;;
23622          esac
23623
23624 else
23625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23626 /* end confdefs.h.  */
23627
23628 #include <float.h>
23629 #include <limits.h>
23630 #include <math.h>
23631 #if __GNUC__ >= 4
23632 # undef isnanl
23633 # define isnanl(x) __builtin_isnanl ((long double)(x))
23634 #elif defined isnan
23635 # undef isnanl
23636 # define isnanl(x) isnan ((long double)(x))
23637 #endif
23638 #define NWORDS \
23639   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23640 typedef union { unsigned int word[NWORDS]; long double value; }
23641         memory_long_double;
23642 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23643    runtime type conversion.  */
23644 #ifdef __sgi
23645 static long double NaNl ()
23646 {
23647   double zero = 0.0;
23648   return zero / zero;
23649 }
23650 #else
23651 # define NaNl() (0.0L / 0.0L)
23652 #endif
23653 int main ()
23654 {
23655   int result = 0;
23656
23657   if (!isnanl (NaNl ()))
23658     result |= 1;
23659
23660   {
23661     memory_long_double m;
23662     unsigned int i;
23663
23664     /* The isnanl function should be immune against changes in the sign bit and
23665        in the mantissa bits.  The xor operation twiddles a bit that can only be
23666        a sign bit or a mantissa bit (since the exponent never extends to
23667        bit 31).  */
23668     m.value = NaNl ();
23669     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23670     for (i = 0; i < NWORDS; i++)
23671       m.word[i] |= 1;
23672     if (!isnanl (m.value))
23673       result |= 1;
23674   }
23675
23676 #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
23677 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23678    of 'unsigned int' words.  */
23679 # ifdef WORDS_BIGENDIAN
23680 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
23681      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23682        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
23683        (unsigned int) (mantlo) << 16                                        \
23684      }
23685 # else
23686 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
23687      { mantlo, manthi, exponent }
23688 # endif
23689   { /* Quiet NaN.  */
23690     static memory_long_double x =
23691       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23692     if (!isnanl (x.value))
23693       result |= 2;
23694   }
23695   {
23696     /* Signalling NaN.  */
23697     static memory_long_double x =
23698       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23699     if (!isnanl (x.value))
23700       result |= 2;
23701   }
23702   /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
23703      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
23704        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
23705        Application Architecture.
23706        Table 5-2 "Floating-Point Register Encodings"
23707        Figure 5-6 "Memory to Floating-Point Register Data Translation"
23708    */
23709   { /* Pseudo-NaN.  */
23710     static memory_long_double x =
23711       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23712     if (!isnanl (x.value))
23713       result |= 4;
23714   }
23715   { /* Pseudo-Infinity.  */
23716     static memory_long_double x =
23717       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23718     if (!isnanl (x.value))
23719       result |= 8;
23720   }
23721   { /* Pseudo-Zero.  */
23722     static memory_long_double x =
23723       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23724     if (!isnanl (x.value))
23725       result |= 16;
23726   }
23727   { /* Unnormalized number.  */
23728     static memory_long_double x =
23729       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23730     if (!isnanl (x.value))
23731       result |= 32;
23732   }
23733   { /* Pseudo-Denormal.  */
23734     static memory_long_double x =
23735       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23736     if (!isnanl (x.value))
23737       result |= 64;
23738   }
23739 #endif
23740
23741   return result;
23742 }
23743 _ACEOF
23744 if ac_fn_c_try_run "$LINENO"; then :
23745   gl_cv_func_isnanl_works=yes
23746 else
23747   gl_cv_func_isnanl_works=no
23748 fi
23749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23750   conftest.$ac_objext conftest.beam conftest.$ac_ext
23751 fi
23752
23753
23754 fi
23755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23756 $as_echo "$gl_cv_func_isnanl_works" >&6; }
23757
23758     case "$gl_cv_func_isnanl_works" in
23759       *yes) ;;
23760       *)    gl_func_isnanl_no_libm=no ;;
23761     esac
23762   fi
23763   if test $gl_func_isnanl_no_libm = yes; then
23764
23765 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23766
23767   fi
23768
23769   if test $gl_func_isnanl_no_libm != yes; then
23770
23771
23772
23773
23774
23775
23776
23777
23778   M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
23779
23780
23781
23782
23783   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23784 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23785 if ${gl_cv_cc_long_double_expbit0+:} false; then :
23786   $as_echo_n "(cached) " >&6
23787 else
23788
23789       if test "$cross_compiling" = yes; then :
23790
23791                               gl_cv_cc_long_double_expbit0="unknown"
23792
23793 else
23794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23795 /* end confdefs.h.  */
23796
23797 #include <float.h>
23798 #include <stddef.h>
23799 #include <stdio.h>
23800 #include <string.h>
23801 #define NWORDS \
23802   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23803 typedef union { long double value; unsigned int word[NWORDS]; }
23804         memory_long_double;
23805 static unsigned int ored_words[NWORDS];
23806 static unsigned int anded_words[NWORDS];
23807 static void add_to_ored_words (long double x)
23808 {
23809   memory_long_double m;
23810   size_t i;
23811   /* Clear it first, in case
23812      sizeof (long double) < sizeof (memory_long_double).  */
23813   memset (&m, 0, sizeof (memory_long_double));
23814   m.value = x;
23815   for (i = 0; i < NWORDS; i++)
23816     {
23817       ored_words[i] |= m.word[i];
23818       anded_words[i] &= m.word[i];
23819     }
23820 }
23821 int main ()
23822 {
23823   size_t j;
23824   FILE *fp = fopen ("conftest.out", "w");
23825   if (fp == NULL)
23826     return 1;
23827   for (j = 0; j < NWORDS; j++)
23828     anded_words[j] = ~ (unsigned int) 0;
23829   add_to_ored_words (0.25L);
23830   add_to_ored_words (0.5L);
23831   add_to_ored_words (1.0L);
23832   add_to_ored_words (2.0L);
23833   add_to_ored_words (4.0L);
23834   /* Remove bits that are common (e.g. if representation of the first mantissa
23835      bit is explicit).  */
23836   for (j = 0; j < NWORDS; j++)
23837     ored_words[j] &= ~anded_words[j];
23838   /* Now find the nonzero word.  */
23839   for (j = 0; j < NWORDS; j++)
23840     if (ored_words[j] != 0)
23841       break;
23842   if (j < NWORDS)
23843     {
23844       size_t i;
23845       for (i = j + 1; i < NWORDS; i++)
23846         if (ored_words[i] != 0)
23847           {
23848             fprintf (fp, "unknown");
23849             return (fclose (fp) != 0);
23850           }
23851       for (i = 0; ; i++)
23852         if ((ored_words[j] >> i) & 1)
23853           {
23854             fprintf (fp, "word %d bit %d", (int) j, (int) i);
23855             return (fclose (fp) != 0);
23856           }
23857     }
23858   fprintf (fp, "unknown");
23859   return (fclose (fp) != 0);
23860 }
23861
23862 _ACEOF
23863 if ac_fn_c_try_run "$LINENO"; then :
23864   gl_cv_cc_long_double_expbit0=`cat conftest.out`
23865 else
23866   gl_cv_cc_long_double_expbit0="unknown"
23867 fi
23868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23869   conftest.$ac_objext conftest.beam conftest.$ac_ext
23870 fi
23871
23872       rm -f conftest.out
23873
23874 fi
23875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23876 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23877   case "$gl_cv_cc_long_double_expbit0" in
23878     word*bit*)
23879       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23880       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23881
23882 cat >>confdefs.h <<_ACEOF
23883 #define LDBL_EXPBIT0_WORD $word
23884 _ACEOF
23885
23886
23887 cat >>confdefs.h <<_ACEOF
23888 #define LDBL_EXPBIT0_BIT $bit
23889 _ACEOF
23890
23891       ;;
23892   esac
23893
23894
23895
23896   fi
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911      if test $gl_cv_have_include_next = yes; then
23912        gl_cv_next_langinfo_h='<'langinfo.h'>'
23913      else
23914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
23915 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
23916 if ${gl_cv_next_langinfo_h+:} false; then :
23917   $as_echo_n "(cached) " >&6
23918 else
23919
23920              if test $ac_cv_header_langinfo_h = yes; then
23921
23922
23923                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23924 /* end confdefs.h.  */
23925 #include <langinfo.h>
23926
23927 _ACEOF
23928                                                                                                                         case "$host_os" in
23929                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
23930                  *)    gl_absname_cpp="$ac_cpp" ;;
23931                esac
23932
23933                case "$host_os" in
23934                  mingw*)
23935                                                                                                                                      gl_dirsep_regex='[/\\]'
23936                    ;;
23937                  *)
23938                    gl_dirsep_regex='\/'
23939                    ;;
23940                esac
23941                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23942
23943                gl_header_literal_regex=`echo 'langinfo.h' \
23944                                         | sed -e "$gl_make_literal_regex_sed"`
23945                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23946                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23947                    s|^/[^/]|//&|
23948                    p
23949                    q
23950                  }'
23951                                                             gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23952                       sed -n "$gl_absolute_header_sed"`'"'
23953           else
23954                gl_cv_next_langinfo_h='<'langinfo.h'>'
23955              fi
23956
23957
23958 fi
23959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
23960 $as_echo "$gl_cv_next_langinfo_h" >&6; }
23961      fi
23962      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
23963
23964      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23965        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23966        gl_next_as_first_directive='<'langinfo.h'>'
23967      else
23968        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23969        gl_next_as_first_directive=$gl_cv_next_langinfo_h
23970      fi
23971      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
23972
23973
23974
23975
23976
23977     HAVE_LANGINFO_CODESET=0
23978   HAVE_LANGINFO_T_FMT_AMPM=0
23979   HAVE_LANGINFO_ERA=0
23980   HAVE_LANGINFO_YESEXPR=0
23981
23982   if test $ac_cv_header_langinfo_h = yes; then
23983     HAVE_LANGINFO_H=1
23984             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
23985 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
23986 if ${gl_cv_header_langinfo_codeset+:} false; then :
23987   $as_echo_n "(cached) " >&6
23988 else
23989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23990 /* end confdefs.h.  */
23991 #include <langinfo.h>
23992 int a = CODESET;
23993
23994 int
23995 main ()
23996 {
23997
23998   ;
23999   return 0;
24000 }
24001 _ACEOF
24002 if ac_fn_c_try_compile "$LINENO"; then :
24003   gl_cv_header_langinfo_codeset=yes
24004 else
24005   gl_cv_header_langinfo_codeset=no
24006 fi
24007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24008
24009 fi
24010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
24011 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
24012     if test $gl_cv_header_langinfo_codeset = yes; then
24013       HAVE_LANGINFO_CODESET=1
24014     fi
24015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
24016 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
24017 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
24018   $as_echo_n "(cached) " >&6
24019 else
24020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24021 /* end confdefs.h.  */
24022 #include <langinfo.h>
24023 int a = T_FMT_AMPM;
24024
24025 int
24026 main ()
24027 {
24028
24029   ;
24030   return 0;
24031 }
24032 _ACEOF
24033 if ac_fn_c_try_compile "$LINENO"; then :
24034   gl_cv_header_langinfo_t_fmt_ampm=yes
24035 else
24036   gl_cv_header_langinfo_t_fmt_ampm=no
24037 fi
24038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24039
24040 fi
24041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
24042 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
24043     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
24044       HAVE_LANGINFO_T_FMT_AMPM=1
24045     fi
24046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
24047 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
24048 if ${gl_cv_header_langinfo_era+:} false; then :
24049   $as_echo_n "(cached) " >&6
24050 else
24051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24052 /* end confdefs.h.  */
24053 #include <langinfo.h>
24054 int a = ERA;
24055
24056 int
24057 main ()
24058 {
24059
24060   ;
24061   return 0;
24062 }
24063 _ACEOF
24064 if ac_fn_c_try_compile "$LINENO"; then :
24065   gl_cv_header_langinfo_era=yes
24066 else
24067   gl_cv_header_langinfo_era=no
24068 fi
24069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24070
24071 fi
24072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
24073 $as_echo "$gl_cv_header_langinfo_era" >&6; }
24074     if test $gl_cv_header_langinfo_era = yes; then
24075       HAVE_LANGINFO_ERA=1
24076     fi
24077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
24078 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
24079 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
24080   $as_echo_n "(cached) " >&6
24081 else
24082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24083 /* end confdefs.h.  */
24084 #include <langinfo.h>
24085 int a = YESEXPR;
24086
24087 int
24088 main ()
24089 {
24090
24091   ;
24092   return 0;
24093 }
24094 _ACEOF
24095 if ac_fn_c_try_compile "$LINENO"; then :
24096   gl_cv_header_langinfo_yesexpr=yes
24097 else
24098   gl_cv_header_langinfo_yesexpr=no
24099 fi
24100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24101
24102 fi
24103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
24104 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
24105     if test $gl_cv_header_langinfo_yesexpr = yes; then
24106       HAVE_LANGINFO_YESEXPR=1
24107     fi
24108   else
24109     HAVE_LANGINFO_H=0
24110   fi
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134     use_additional=yes
24135
24136   acl_save_prefix="$prefix"
24137   prefix="$acl_final_prefix"
24138   acl_save_exec_prefix="$exec_prefix"
24139   exec_prefix="$acl_final_exec_prefix"
24140
24141     eval additional_includedir=\"$includedir\"
24142     eval additional_libdir=\"$libdir\"
24143
24144   exec_prefix="$acl_save_exec_prefix"
24145   prefix="$acl_save_prefix"
24146
24147
24148 # Check whether --with-libsigsegv-prefix was given.
24149 if test "${with_libsigsegv_prefix+set}" = set; then :
24150   withval=$with_libsigsegv_prefix;
24151     if test "X$withval" = "Xno"; then
24152       use_additional=no
24153     else
24154       if test "X$withval" = "X"; then
24155
24156   acl_save_prefix="$prefix"
24157   prefix="$acl_final_prefix"
24158   acl_save_exec_prefix="$exec_prefix"
24159   exec_prefix="$acl_final_exec_prefix"
24160
24161           eval additional_includedir=\"$includedir\"
24162           eval additional_libdir=\"$libdir\"
24163
24164   exec_prefix="$acl_save_exec_prefix"
24165   prefix="$acl_save_prefix"
24166
24167       else
24168         additional_includedir="$withval/include"
24169         additional_libdir="$withval/$acl_libdirstem"
24170         if test "$acl_libdirstem2" != "$acl_libdirstem" \
24171            && ! test -d "$withval/$acl_libdirstem"; then
24172           additional_libdir="$withval/$acl_libdirstem2"
24173         fi
24174       fi
24175     fi
24176
24177 fi
24178
24179       LIBSIGSEGV=
24180   LTLIBSIGSEGV=
24181   INCSIGSEGV=
24182   LIBSIGSEGV_PREFIX=
24183       HAVE_LIBSIGSEGV=
24184   rpathdirs=
24185   ltrpathdirs=
24186   names_already_handled=
24187   names_next_round='sigsegv '
24188   while test -n "$names_next_round"; do
24189     names_this_round="$names_next_round"
24190     names_next_round=
24191     for name in $names_this_round; do
24192       already_handled=
24193       for n in $names_already_handled; do
24194         if test "$n" = "$name"; then
24195           already_handled=yes
24196           break
24197         fi
24198       done
24199       if test -z "$already_handled"; then
24200         names_already_handled="$names_already_handled $name"
24201                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
24202         eval value=\"\$HAVE_LIB$uppername\"
24203         if test -n "$value"; then
24204           if test "$value" = yes; then
24205             eval value=\"\$LIB$uppername\"
24206             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
24207             eval value=\"\$LTLIB$uppername\"
24208             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
24209           else
24210                                     :
24211           fi
24212         else
24213                               found_dir=
24214           found_la=
24215           found_so=
24216           found_a=
24217           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
24218           if test -n "$acl_shlibext"; then
24219             shrext=".$acl_shlibext"             # typically: shrext=.so
24220           else
24221             shrext=
24222           fi
24223           if test $use_additional = yes; then
24224             dir="$additional_libdir"
24225                                     if test -n "$acl_shlibext"; then
24226               if test -f "$dir/$libname$shrext"; then
24227                 found_dir="$dir"
24228                 found_so="$dir/$libname$shrext"
24229               else
24230                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24231                   ver=`(cd "$dir" && \
24232                         for f in "$libname$shrext".*; do echo "$f"; done \
24233                         | sed -e "s,^$libname$shrext\\\\.,," \
24234                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24235                         | sed 1q ) 2>/dev/null`
24236                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
24237                     found_dir="$dir"
24238                     found_so="$dir/$libname$shrext.$ver"
24239                   fi
24240                 else
24241                   eval library_names=\"$acl_library_names_spec\"
24242                   for f in $library_names; do
24243                     if test -f "$dir/$f"; then
24244                       found_dir="$dir"
24245                       found_so="$dir/$f"
24246                       break
24247                     fi
24248                   done
24249                 fi
24250               fi
24251             fi
24252                         if test "X$found_dir" = "X"; then
24253               if test -f "$dir/$libname.$acl_libext"; then
24254                 found_dir="$dir"
24255                 found_a="$dir/$libname.$acl_libext"
24256               fi
24257             fi
24258             if test "X$found_dir" != "X"; then
24259               if test -f "$dir/$libname.la"; then
24260                 found_la="$dir/$libname.la"
24261               fi
24262             fi
24263           fi
24264           if test "X$found_dir" = "X"; then
24265             for x in $LDFLAGS $LTLIBSIGSEGV; do
24266
24267   acl_save_prefix="$prefix"
24268   prefix="$acl_final_prefix"
24269   acl_save_exec_prefix="$exec_prefix"
24270   exec_prefix="$acl_final_exec_prefix"
24271   eval x=\"$x\"
24272   exec_prefix="$acl_save_exec_prefix"
24273   prefix="$acl_save_prefix"
24274
24275               case "$x" in
24276                 -L*)
24277                   dir=`echo "X$x" | sed -e 's/^X-L//'`
24278                                     if test -n "$acl_shlibext"; then
24279                     if test -f "$dir/$libname$shrext"; then
24280                       found_dir="$dir"
24281                       found_so="$dir/$libname$shrext"
24282                     else
24283                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24284                         ver=`(cd "$dir" && \
24285                               for f in "$libname$shrext".*; do echo "$f"; done \
24286                               | sed -e "s,^$libname$shrext\\\\.,," \
24287                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24288                               | sed 1q ) 2>/dev/null`
24289                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
24290                           found_dir="$dir"
24291                           found_so="$dir/$libname$shrext.$ver"
24292                         fi
24293                       else
24294                         eval library_names=\"$acl_library_names_spec\"
24295                         for f in $library_names; do
24296                           if test -f "$dir/$f"; then
24297                             found_dir="$dir"
24298                             found_so="$dir/$f"
24299                             break
24300                           fi
24301                         done
24302                       fi
24303                     fi
24304                   fi
24305                                     if test "X$found_dir" = "X"; then
24306                     if test -f "$dir/$libname.$acl_libext"; then
24307                       found_dir="$dir"
24308                       found_a="$dir/$libname.$acl_libext"
24309                     fi
24310                   fi
24311                   if test "X$found_dir" != "X"; then
24312                     if test -f "$dir/$libname.la"; then
24313                       found_la="$dir/$libname.la"
24314                     fi
24315                   fi
24316                   ;;
24317               esac
24318               if test "X$found_dir" != "X"; then
24319                 break
24320               fi
24321             done
24322           fi
24323           if test "X$found_dir" != "X"; then
24324                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
24325             if test "X$found_so" != "X"; then
24326                                                         if test "$enable_rpath" = no \
24327                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
24328                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
24329                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24330               else
24331                                                                                 haveit=
24332                 for x in $ltrpathdirs; do
24333                   if test "X$x" = "X$found_dir"; then
24334                     haveit=yes
24335                     break
24336                   fi
24337                 done
24338                 if test -z "$haveit"; then
24339                   ltrpathdirs="$ltrpathdirs $found_dir"
24340                 fi
24341                                 if test "$acl_hardcode_direct" = yes; then
24342                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24343                 else
24344                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
24345                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24346                                                             haveit=
24347                     for x in $rpathdirs; do
24348                       if test "X$x" = "X$found_dir"; then
24349                         haveit=yes
24350                         break
24351                       fi
24352                     done
24353                     if test -z "$haveit"; then
24354                       rpathdirs="$rpathdirs $found_dir"
24355                     fi
24356                   else
24357                                                                                 haveit=
24358                     for x in $LDFLAGS $LIBSIGSEGV; do
24359
24360   acl_save_prefix="$prefix"
24361   prefix="$acl_final_prefix"
24362   acl_save_exec_prefix="$exec_prefix"
24363   exec_prefix="$acl_final_exec_prefix"
24364   eval x=\"$x\"
24365   exec_prefix="$acl_save_exec_prefix"
24366   prefix="$acl_save_prefix"
24367
24368                       if test "X$x" = "X-L$found_dir"; then
24369                         haveit=yes
24370                         break
24371                       fi
24372                     done
24373                     if test -z "$haveit"; then
24374                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
24375                     fi
24376                     if test "$acl_hardcode_minus_L" != no; then
24377                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
24378                     else
24379                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
24380                     fi
24381                   fi
24382                 fi
24383               fi
24384             else
24385               if test "X$found_a" != "X"; then
24386                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
24387               else
24388                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
24389               fi
24390             fi
24391                         additional_includedir=
24392             case "$found_dir" in
24393               */$acl_libdirstem | */$acl_libdirstem/)
24394                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
24395                 if test "$name" = 'sigsegv'; then
24396                   LIBSIGSEGV_PREFIX="$basedir"
24397                 fi
24398                 additional_includedir="$basedir/include"
24399                 ;;
24400               */$acl_libdirstem2 | */$acl_libdirstem2/)
24401                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
24402                 if test "$name" = 'sigsegv'; then
24403                   LIBSIGSEGV_PREFIX="$basedir"
24404                 fi
24405                 additional_includedir="$basedir/include"
24406                 ;;
24407             esac
24408             if test "X$additional_includedir" != "X"; then
24409                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
24410                 haveit=
24411                 if test "X$additional_includedir" = "X/usr/local/include"; then
24412                   if test -n "$GCC"; then
24413                     case $host_os in
24414                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24415                     esac
24416                   fi
24417                 fi
24418                 if test -z "$haveit"; then
24419                   for x in $CPPFLAGS $INCSIGSEGV; do
24420
24421   acl_save_prefix="$prefix"
24422   prefix="$acl_final_prefix"
24423   acl_save_exec_prefix="$exec_prefix"
24424   exec_prefix="$acl_final_exec_prefix"
24425   eval x=\"$x\"
24426   exec_prefix="$acl_save_exec_prefix"
24427   prefix="$acl_save_prefix"
24428
24429                     if test "X$x" = "X-I$additional_includedir"; then
24430                       haveit=yes
24431                       break
24432                     fi
24433                   done
24434                   if test -z "$haveit"; then
24435                     if test -d "$additional_includedir"; then
24436                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
24437                     fi
24438                   fi
24439                 fi
24440               fi
24441             fi
24442                         if test -n "$found_la"; then
24443                                                         save_libdir="$libdir"
24444               case "$found_la" in
24445                 */* | *\\*) . "$found_la" ;;
24446                 *) . "./$found_la" ;;
24447               esac
24448               libdir="$save_libdir"
24449                             for dep in $dependency_libs; do
24450                 case "$dep" in
24451                   -L*)
24452                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
24453                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
24454                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
24455                       haveit=
24456                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
24457                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
24458                         if test -n "$GCC"; then
24459                           case $host_os in
24460                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24461                           esac
24462                         fi
24463                       fi
24464                       if test -z "$haveit"; then
24465                         haveit=
24466                         for x in $LDFLAGS $LIBSIGSEGV; do
24467
24468   acl_save_prefix="$prefix"
24469   prefix="$acl_final_prefix"
24470   acl_save_exec_prefix="$exec_prefix"
24471   exec_prefix="$acl_final_exec_prefix"
24472   eval x=\"$x\"
24473   exec_prefix="$acl_save_exec_prefix"
24474   prefix="$acl_save_prefix"
24475
24476                           if test "X$x" = "X-L$additional_libdir"; then
24477                             haveit=yes
24478                             break
24479                           fi
24480                         done
24481                         if test -z "$haveit"; then
24482                           if test -d "$additional_libdir"; then
24483                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
24484                           fi
24485                         fi
24486                         haveit=
24487                         for x in $LDFLAGS $LTLIBSIGSEGV; do
24488
24489   acl_save_prefix="$prefix"
24490   prefix="$acl_final_prefix"
24491   acl_save_exec_prefix="$exec_prefix"
24492   exec_prefix="$acl_final_exec_prefix"
24493   eval x=\"$x\"
24494   exec_prefix="$acl_save_exec_prefix"
24495   prefix="$acl_save_prefix"
24496
24497                           if test "X$x" = "X-L$additional_libdir"; then
24498                             haveit=yes
24499                             break
24500                           fi
24501                         done
24502                         if test -z "$haveit"; then
24503                           if test -d "$additional_libdir"; then
24504                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
24505                           fi
24506                         fi
24507                       fi
24508                     fi
24509                     ;;
24510                   -R*)
24511                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
24512                     if test "$enable_rpath" != no; then
24513                                                                   haveit=
24514                       for x in $rpathdirs; do
24515                         if test "X$x" = "X$dir"; then
24516                           haveit=yes
24517                           break
24518                         fi
24519                       done
24520                       if test -z "$haveit"; then
24521                         rpathdirs="$rpathdirs $dir"
24522                       fi
24523                                                                   haveit=
24524                       for x in $ltrpathdirs; do
24525                         if test "X$x" = "X$dir"; then
24526                           haveit=yes
24527                           break
24528                         fi
24529                       done
24530                       if test -z "$haveit"; then
24531                         ltrpathdirs="$ltrpathdirs $dir"
24532                       fi
24533                     fi
24534                     ;;
24535                   -l*)
24536                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
24537                     ;;
24538                   *.la)
24539                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
24540                     ;;
24541                   *)
24542                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
24543                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
24544                     ;;
24545                 esac
24546               done
24547             fi
24548           else
24549                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
24550             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
24551           fi
24552         fi
24553       fi
24554     done
24555   done
24556   if test "X$rpathdirs" != "X"; then
24557     if test -n "$acl_hardcode_libdir_separator"; then
24558                         alldirs=
24559       for found_dir in $rpathdirs; do
24560         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
24561       done
24562             acl_save_libdir="$libdir"
24563       libdir="$alldirs"
24564       eval flag=\"$acl_hardcode_libdir_flag_spec\"
24565       libdir="$acl_save_libdir"
24566       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
24567     else
24568             for found_dir in $rpathdirs; do
24569         acl_save_libdir="$libdir"
24570         libdir="$found_dir"
24571         eval flag=\"$acl_hardcode_libdir_flag_spec\"
24572         libdir="$acl_save_libdir"
24573         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
24574       done
24575     fi
24576   fi
24577   if test "X$ltrpathdirs" != "X"; then
24578             for found_dir in $ltrpathdirs; do
24579       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
24580     done
24581   fi
24582
24583
24584
24585
24586
24587
24588
24589         ac_save_CPPFLAGS="$CPPFLAGS"
24590
24591   for element in $INCSIGSEGV; do
24592     haveit=
24593     for x in $CPPFLAGS; do
24594
24595   acl_save_prefix="$prefix"
24596   prefix="$acl_final_prefix"
24597   acl_save_exec_prefix="$exec_prefix"
24598   exec_prefix="$acl_final_exec_prefix"
24599   eval x=\"$x\"
24600   exec_prefix="$acl_save_exec_prefix"
24601   prefix="$acl_save_prefix"
24602
24603       if test "X$x" = "X$element"; then
24604         haveit=yes
24605         break
24606       fi
24607     done
24608     if test -z "$haveit"; then
24609       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
24610     fi
24611   done
24612
24613
24614   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
24615 $as_echo_n "checking for libsigsegv... " >&6; }
24616 if ${ac_cv_libsigsegv+:} false; then :
24617   $as_echo_n "(cached) " >&6
24618 else
24619
24620     ac_save_LIBS="$LIBS"
24621                                 case " $LIBSIGSEGV" in
24622       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
24623       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
24624     esac
24625     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24626 /* end confdefs.h.  */
24627 #include <sigsegv.h>
24628 int
24629 main ()
24630 {
24631 sigsegv_deinstall_handler();
24632   ;
24633   return 0;
24634 }
24635 _ACEOF
24636 if ac_fn_c_try_link "$LINENO"; then :
24637   ac_cv_libsigsegv=yes
24638 else
24639   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
24640 fi
24641 rm -f core conftest.err conftest.$ac_objext \
24642     conftest$ac_exeext conftest.$ac_ext
24643     LIBS="$ac_save_LIBS"
24644
24645 fi
24646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
24647 $as_echo "$ac_cv_libsigsegv" >&6; }
24648   if test "$ac_cv_libsigsegv" = yes; then
24649     HAVE_LIBSIGSEGV=yes
24650
24651 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
24652
24653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
24654 $as_echo_n "checking how to link with libsigsegv... " >&6; }
24655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
24656 $as_echo "$LIBSIGSEGV" >&6; }
24657   else
24658     HAVE_LIBSIGSEGV=no
24659             CPPFLAGS="$ac_save_CPPFLAGS"
24660     LIBSIGSEGV=
24661     LTLIBSIGSEGV=
24662     LIBSIGSEGV_PREFIX=
24663   fi
24664
24665
24666
24667
24668
24669
24670
24671     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691   case "$host_os" in
24692     solaris*)
24693
24694 $as_echo "#define _LCONV_C99 1" >>confdefs.h
24695
24696       ;;
24697   esac
24698
24699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
24700 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
24701 if ${gl_cv_header_locale_h_posix2001+:} false; then :
24702   $as_echo_n "(cached) " >&6
24703 else
24704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24705 /* end confdefs.h.  */
24706 #include <locale.h>
24707             int x = LC_MESSAGES;
24708             int y = sizeof (((struct lconv *) 0)->decimal_point);
24709 int
24710 main ()
24711 {
24712
24713   ;
24714   return 0;
24715 }
24716 _ACEOF
24717 if ac_fn_c_try_compile "$LINENO"; then :
24718   gl_cv_header_locale_h_posix2001=yes
24719 else
24720   gl_cv_header_locale_h_posix2001=no
24721 fi
24722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24723 fi
24724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
24725 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
24726
24727
24728   if test $ac_cv_header_xlocale_h = yes; then
24729     HAVE_XLOCALE_H=1
24730                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
24731 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
24732 if ${gl_cv_header_locale_has_locale_t+:} false; then :
24733   $as_echo_n "(cached) " >&6
24734 else
24735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24736 /* end confdefs.h.  */
24737 #include <locale.h>
24738               locale_t x;
24739 int
24740 main ()
24741 {
24742
24743   ;
24744   return 0;
24745 }
24746 _ACEOF
24747 if ac_fn_c_try_compile "$LINENO"; then :
24748   gl_cv_header_locale_has_locale_t=yes
24749 else
24750   gl_cv_header_locale_has_locale_t=no
24751 fi
24752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24753
24754 fi
24755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
24756 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
24757     if test $gl_cv_header_locale_has_locale_t = yes; then
24758       gl_cv_header_locale_h_needs_xlocale_h=no
24759     else
24760       gl_cv_header_locale_h_needs_xlocale_h=yes
24761     fi
24762   else
24763     HAVE_XLOCALE_H=0
24764     gl_cv_header_locale_h_needs_xlocale_h=no
24765   fi
24766
24767
24768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
24769 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
24770 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
24771   $as_echo_n "(cached) " >&6
24772 else
24773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24774 /* end confdefs.h.  */
24775 #include <locale.h>
24776             struct lconv l;
24777             int x = sizeof (l.decimal_point);
24778             int y = sizeof (l.int_p_cs_precedes);
24779 int
24780 main ()
24781 {
24782
24783   ;
24784   return 0;
24785 }
24786 _ACEOF
24787 if ac_fn_c_try_compile "$LINENO"; then :
24788   gl_cv_sys_struct_lconv_ok=yes
24789 else
24790   gl_cv_sys_struct_lconv_ok=no
24791 fi
24792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24793
24794 fi
24795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
24796 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
24797   if test $gl_cv_sys_struct_lconv_ok = no; then
24798     REPLACE_STRUCT_LCONV=1
24799   fi
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809      if test $gl_cv_have_include_next = yes; then
24810        gl_cv_next_locale_h='<'locale.h'>'
24811      else
24812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
24813 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
24814 if ${gl_cv_next_locale_h+:} false; then :
24815   $as_echo_n "(cached) " >&6
24816 else
24817
24818                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24819 /* end confdefs.h.  */
24820 #include <locale.h>
24821
24822 _ACEOF
24823                                                                                                                         case "$host_os" in
24824                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
24825                  *)    gl_absname_cpp="$ac_cpp" ;;
24826                esac
24827
24828                case "$host_os" in
24829                  mingw*)
24830                                                                                                                                      gl_dirsep_regex='[/\\]'
24831                    ;;
24832                  *)
24833                    gl_dirsep_regex='\/'
24834                    ;;
24835                esac
24836                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24837
24838                gl_header_literal_regex=`echo 'locale.h' \
24839                                         | sed -e "$gl_make_literal_regex_sed"`
24840                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24841                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24842                    s|^/[^/]|//&|
24843                    p
24844                    q
24845                  }'
24846                                                             gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24847                       sed -n "$gl_absolute_header_sed"`'"'
24848
24849
24850 fi
24851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
24852 $as_echo "$gl_cv_next_locale_h" >&6; }
24853      fi
24854      NEXT_LOCALE_H=$gl_cv_next_locale_h
24855
24856      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24857        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24858        gl_next_as_first_directive='<'locale.h'>'
24859      else
24860        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24861        gl_next_as_first_directive=$gl_cv_next_locale_h
24862      fi
24863      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875   if test $REPLACE_STRUCT_LCONV = 1; then
24876     REPLACE_LOCALECONV=1
24877   fi
24878
24879   if test $REPLACE_LOCALECONV = 1; then
24880
24881
24882
24883
24884
24885
24886
24887
24888   M4_LIBOBJS="$M4_LIBOBJS localeconv.$ac_objext"
24889
24890
24891   ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
24892 "
24893 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
24894
24895 cat >>confdefs.h <<_ACEOF
24896 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
24897 _ACEOF
24898
24899
24900 fi
24901
24902
24903   fi
24904
24905
24906
24907
24908
24909           GNULIB_LOCALECONV=1
24910
24911
24912
24913
24914
24915 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
24916
24917
24918
24919
24920
24921   if test "$gl_threads_api" = posix; then
24922     # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
24923     # pthread_rwlock_* functions.
24924     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
24925 "
24926 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
24927
24928 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
24929
24930 fi
24931
24932     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24933     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24934 /* end confdefs.h.  */
24935
24936       #include <pthread.h>
24937 int
24938 main ()
24939 {
24940
24941 #if __FreeBSD__ == 4
24942 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24943 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24944        && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24945 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24946 #else
24947 int x = (int)PTHREAD_MUTEX_RECURSIVE;
24948 return !x;
24949 #endif
24950
24951   ;
24952   return 0;
24953 }
24954 _ACEOF
24955 if ac_fn_c_try_compile "$LINENO"; then :
24956
24957 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24958
24959 fi
24960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24961   fi
24962   :
24963
24964
24965
24966 cat >>confdefs.h <<_ACEOF
24967 #define GNULIB_LOCK 1
24968 _ACEOF
24969
24970
24971
24972
24973
24974
24975
24976
24977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
24978 $as_echo_n "checking whether lseek detects pipes... " >&6; }
24979 if ${gl_cv_func_lseek_pipe+:} false; then :
24980   $as_echo_n "(cached) " >&6
24981 else
24982   case "$host_os" in
24983        mingw*)
24984                                                                gl_cv_func_lseek_pipe=no
24985          ;;
24986        *)
24987          if test $cross_compiling = no; then
24988            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24989 /* end confdefs.h.  */
24990
24991 #include <sys/types.h> /* for off_t */
24992 #include <stdio.h> /* for SEEK_CUR */
24993 #if HAVE_UNISTD_H
24994 # include <unistd.h>
24995 #else /* on Windows with MSVC */
24996 # include <io.h>
24997 #endif
24998
24999 int
25000 main ()
25001 {
25002
25003   /* Exit with success only if stdin is seekable.  */
25004   return lseek (0, (off_t)0, SEEK_CUR) < 0;
25005
25006   ;
25007   return 0;
25008 }
25009 _ACEOF
25010 if ac_fn_c_try_link "$LINENO"; then :
25011   if test -s conftest$ac_exeext \
25012                  && ./conftest$ac_exeext < conftest.$ac_ext \
25013                  && test 1 = "`echo hi \
25014                    | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
25015                 gl_cv_func_lseek_pipe=yes
25016               else
25017                 gl_cv_func_lseek_pipe=no
25018               fi
25019
25020 else
25021   gl_cv_func_lseek_pipe=no
25022 fi
25023 rm -f core conftest.err conftest.$ac_objext \
25024     conftest$ac_exeext conftest.$ac_ext
25025          else
25026            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25027 /* end confdefs.h.  */
25028
25029 #if defined __BEOS__
25030 /* BeOS mistakenly return 0 when trying to seek on pipes.  */
25031   Choke me.
25032 #endif
25033 _ACEOF
25034 if ac_fn_c_try_compile "$LINENO"; then :
25035   gl_cv_func_lseek_pipe=yes
25036 else
25037   gl_cv_func_lseek_pipe=no
25038 fi
25039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25040          fi
25041          ;;
25042      esac
25043
25044 fi
25045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
25046 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
25047   if test $gl_cv_func_lseek_pipe = no; then
25048     REPLACE_LSEEK=1
25049
25050 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
25051
25052   fi
25053
25054
25055   if test $WINDOWS_64_BIT_OFF_T = 1; then
25056     REPLACE_LSEEK=1
25057   fi
25058
25059   if test $REPLACE_LSEEK = 1; then
25060
25061
25062
25063
25064
25065
25066
25067
25068   M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
25069
25070   fi
25071
25072
25073
25074
25075
25076           GNULIB_LSEEK=1
25077
25078
25079
25080
25081
25082 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
25083
25084
25085
25086
25087
25088
25089   if test $ac_cv_func_lstat = yes; then
25090
25091     case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
25092       *no)
25093         REPLACE_LSTAT=1
25094         ;;
25095     esac
25096   else
25097     HAVE_LSTAT=0
25098   fi
25099
25100   if test $REPLACE_LSTAT = 1; then
25101
25102
25103
25104
25105
25106
25107
25108
25109   M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
25110
25111     :
25112   fi
25113
25114
25115
25116
25117
25118           GNULIB_LSTAT=1
25119
25120
25121
25122
25123
25124 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
25125
25126
25127
25128
25129
25130
25131
25132       for ac_header in stdlib.h
25133 do :
25134   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
25135 if test "x$ac_cv_header_stdlib_h" = xyes; then :
25136   cat >>confdefs.h <<_ACEOF
25137 #define HAVE_STDLIB_H 1
25138 _ACEOF
25139
25140 fi
25141
25142 done
25143
25144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
25145 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
25146 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
25147   $as_echo_n "(cached) " >&6
25148 else
25149   if test "$cross_compiling" = yes; then :
25150   case "$host_os" in
25151           # Guess yes on platforms where we know the result.
25152           *-gnu* | freebsd* | netbsd* | openbsd* \
25153           | hpux* | solaris* | cygwin* | mingw*)
25154             ac_cv_func_malloc_0_nonnull=yes ;;
25155           # If we don't know, assume the worst.
25156           *) ac_cv_func_malloc_0_nonnull=no ;;
25157         esac
25158
25159 else
25160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25161 /* end confdefs.h.  */
25162 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
25163             # include <stdlib.h>
25164             #else
25165             char *malloc ();
25166             #endif
25167
25168 int
25169 main ()
25170 {
25171 return ! malloc (0);
25172   ;
25173   return 0;
25174 }
25175
25176 _ACEOF
25177 if ac_fn_c_try_run "$LINENO"; then :
25178   ac_cv_func_malloc_0_nonnull=yes
25179 else
25180   ac_cv_func_malloc_0_nonnull=no
25181 fi
25182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25183   conftest.$ac_objext conftest.beam conftest.$ac_ext
25184 fi
25185
25186
25187 fi
25188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
25189 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
25190   if test $ac_cv_func_malloc_0_nonnull = yes; then :
25191
25192 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
25193
25194 else
25195   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
25196
25197      REPLACE_MALLOC=1
25198
25199 fi
25200
25201
25202   if test $REPLACE_MALLOC = 1; then
25203
25204
25205
25206
25207
25208
25209
25210
25211   M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
25212
25213   fi
25214
25215
25216 cat >>confdefs.h <<_ACEOF
25217 #define GNULIB_MALLOC_GNU 1
25218 _ACEOF
25219
25220
25221
25222
25223
25224   if test $gl_cv_func_malloc_posix = yes; then
25225
25226 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
25227
25228   else
25229     REPLACE_MALLOC=1
25230   fi
25231
25232   if test $REPLACE_MALLOC = 1; then
25233
25234
25235
25236
25237
25238
25239
25240
25241   M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
25242
25243   fi
25244
25245
25246
25247
25248
25249           GNULIB_MALLOC_POSIX=1
25250
25251
25252
25253
25254
25255 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274      if test $gl_cv_have_include_next = yes; then
25275        gl_cv_next_math_h='<'math.h'>'
25276      else
25277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
25278 $as_echo_n "checking absolute name of <math.h>... " >&6; }
25279 if ${gl_cv_next_math_h+:} false; then :
25280   $as_echo_n "(cached) " >&6
25281 else
25282
25283              if test $ac_cv_header_math_h = yes; then
25284
25285
25286                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25287 /* end confdefs.h.  */
25288 #include <math.h>
25289
25290 _ACEOF
25291                                                                                                                         case "$host_os" in
25292                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25293                  *)    gl_absname_cpp="$ac_cpp" ;;
25294                esac
25295
25296                case "$host_os" in
25297                  mingw*)
25298                                                                                                                                      gl_dirsep_regex='[/\\]'
25299                    ;;
25300                  *)
25301                    gl_dirsep_regex='\/'
25302                    ;;
25303                esac
25304                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25305
25306                gl_header_literal_regex=`echo 'math.h' \
25307                                         | sed -e "$gl_make_literal_regex_sed"`
25308                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25309                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25310                    s|^/[^/]|//&|
25311                    p
25312                    q
25313                  }'
25314                                                             gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25315                       sed -n "$gl_absolute_header_sed"`'"'
25316           else
25317                gl_cv_next_math_h='<'math.h'>'
25318              fi
25319
25320
25321 fi
25322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
25323 $as_echo "$gl_cv_next_math_h" >&6; }
25324      fi
25325      NEXT_MATH_H=$gl_cv_next_math_h
25326
25327      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25328        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25329        gl_next_as_first_directive='<'math.h'>'
25330      else
25331        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25332        gl_next_as_first_directive=$gl_cv_next_math_h
25333      fi
25334      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
25335
25336
25337
25338
25339
25340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
25341 $as_echo_n "checking whether NAN macro works... " >&6; }
25342 if ${gl_cv_header_math_nan_works+:} false; then :
25343   $as_echo_n "(cached) " >&6
25344 else
25345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25346 /* end confdefs.h.  */
25347 #include <math.h>
25348 int
25349 main ()
25350 {
25351 /* Solaris 10 has a broken definition of NAN.  Other platforms
25352         fail to provide NAN, or provide it only in C99 mode; this
25353         test only needs to fail when NAN is provided but wrong.  */
25354          float f = 1.0f;
25355 #ifdef NAN
25356          f = NAN;
25357 #endif
25358          return f == 0;
25359   ;
25360   return 0;
25361 }
25362 _ACEOF
25363 if ac_fn_c_try_compile "$LINENO"; then :
25364   gl_cv_header_math_nan_works=yes
25365 else
25366   gl_cv_header_math_nan_works=no
25367 fi
25368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25369 fi
25370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
25371 $as_echo "$gl_cv_header_math_nan_works" >&6; }
25372   if test $gl_cv_header_math_nan_works = no; then
25373     REPLACE_NAN=1
25374   fi
25375   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
25376 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
25377 if ${gl_cv_header_math_huge_val_works+:} false; then :
25378   $as_echo_n "(cached) " >&6
25379 else
25380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25381 /* end confdefs.h.  */
25382 #include <math.h>
25383 int
25384 main ()
25385 {
25386 /* Solaris 10 has a broken definition of HUGE_VAL.  */
25387          double d = HUGE_VAL;
25388          return d == 0;
25389   ;
25390   return 0;
25391 }
25392 _ACEOF
25393 if ac_fn_c_try_compile "$LINENO"; then :
25394   gl_cv_header_math_huge_val_works=yes
25395 else
25396   gl_cv_header_math_huge_val_works=no
25397 fi
25398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25399 fi
25400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
25401 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
25402   if test $gl_cv_header_math_huge_val_works = no; then
25403     REPLACE_HUGE_VAL=1
25404   fi
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
25419
25420
25421
25422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25423 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25424 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25425   $as_echo_n "(cached) " >&6
25426 else
25427
25428                   case "$host_os" in
25429                      # Guess no on AIX and OSF/1.
25430         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25431                      # Guess yes otherwise.
25432         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25433       esac
25434       if test $LOCALE_JA != none; then
25435         if test "$cross_compiling" = yes; then :
25436   :
25437 else
25438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25439 /* end confdefs.h.  */
25440
25441 #include <locale.h>
25442 #include <string.h>
25443 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25444    <wchar.h>.
25445    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25446    included before <wchar.h>.  */
25447 #include <stddef.h>
25448 #include <stdio.h>
25449 #include <time.h>
25450 #include <wchar.h>
25451 int main ()
25452 {
25453   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25454     {
25455       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25456       mbstate_t state;
25457       wchar_t wc;
25458
25459       memset (&state, '\0', sizeof (mbstate_t));
25460       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25461         if (mbsinit (&state))
25462           return 1;
25463     }
25464   return 0;
25465 }
25466 _ACEOF
25467 if ac_fn_c_try_run "$LINENO"; then :
25468   gl_cv_func_mbrtowc_incomplete_state=yes
25469 else
25470   gl_cv_func_mbrtowc_incomplete_state=no
25471 fi
25472 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25473   conftest.$ac_objext conftest.beam conftest.$ac_ext
25474 fi
25475
25476       fi
25477
25478 fi
25479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25480 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25481
25482
25483
25484
25485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25486 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25487 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25488   $as_echo_n "(cached) " >&6
25489 else
25490
25491                   case "$host_os" in
25492                     # Guess no on Solaris 8.
25493         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25494                     # Guess yes otherwise.
25495         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25496       esac
25497       if test $LOCALE_ZH_CN != none; then
25498         if test "$cross_compiling" = yes; then :
25499   :
25500 else
25501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25502 /* end confdefs.h.  */
25503
25504 #include <locale.h>
25505 #include <stdlib.h>
25506 #include <string.h>
25507 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25508    <wchar.h>.
25509    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25510    included before <wchar.h>.  */
25511 #include <stddef.h>
25512 #include <stdio.h>
25513 #include <time.h>
25514 #include <wchar.h>
25515 int main ()
25516 {
25517   /* This fails on Solaris 8:
25518      mbrtowc returns 2, and sets wc to 0x00F0.
25519      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
25520   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25521     {
25522       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25523       mbstate_t state;
25524       wchar_t wc;
25525
25526       memset (&state, '\0', sizeof (mbstate_t));
25527       if (mbrtowc (&wc, input + 3, 6, &state) != 4
25528           && mbtowc (&wc, input + 3, 6) == 4)
25529         return 1;
25530     }
25531   return 0;
25532 }
25533 _ACEOF
25534 if ac_fn_c_try_run "$LINENO"; then :
25535   gl_cv_func_mbrtowc_sanitycheck=yes
25536 else
25537   gl_cv_func_mbrtowc_sanitycheck=no
25538 fi
25539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25540   conftest.$ac_objext conftest.beam conftest.$ac_ext
25541 fi
25542
25543       fi
25544
25545 fi
25546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25547 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25548
25549     REPLACE_MBSTATE_T=0
25550     case "$gl_cv_func_mbrtowc_incomplete_state" in
25551       *yes) ;;
25552       *) REPLACE_MBSTATE_T=1 ;;
25553     esac
25554     case "$gl_cv_func_mbrtowc_sanitycheck" in
25555       *yes) ;;
25556       *) REPLACE_MBSTATE_T=1 ;;
25557     esac
25558   else
25559     REPLACE_MBSTATE_T=1
25560   fi
25561
25562
25563
25564   if test $ac_cv_func_mbrtowc = no; then
25565     HAVE_MBRTOWC=0
25566     ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
25567 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25568    <wchar.h>.
25569    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25570    included before <wchar.h>.  */
25571 #include <stddef.h>
25572 #include <stdio.h>
25573 #include <time.h>
25574 #include <wchar.h>
25575
25576 "
25577 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
25578   ac_have_decl=1
25579 else
25580   ac_have_decl=0
25581 fi
25582
25583 cat >>confdefs.h <<_ACEOF
25584 #define HAVE_DECL_MBRTOWC $ac_have_decl
25585 _ACEOF
25586
25587     if test $ac_cv_have_decl_mbrtowc = yes; then
25588                         REPLACE_MBRTOWC=1
25589     fi
25590   else
25591     if test $REPLACE_MBSTATE_T = 1; then
25592       REPLACE_MBRTOWC=1
25593     else
25594
25595
25596
25597      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
25598 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
25599 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
25600   $as_echo_n "(cached) " >&6
25601 else
25602
25603                   case "$host_os" in
25604                   # Guess no on Solaris.
25605         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
25606                   # Guess yes otherwise.
25607         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
25608       esac
25609       if test $LOCALE_FR_UTF8 != none; then
25610         if test "$cross_compiling" = yes; then :
25611   :
25612 else
25613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25614 /* end confdefs.h.  */
25615
25616 #include <locale.h>
25617 #include <stdlib.h>
25618 #include <string.h>
25619 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25620    <wchar.h>.
25621    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25622    included before <wchar.h>.  */
25623 #include <stddef.h>
25624 #include <stdio.h>
25625 #include <time.h>
25626 #include <wchar.h>
25627 int main ()
25628 {
25629   int result = 0;
25630
25631   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25632     {
25633       char input[] = "\303\237er";
25634       mbstate_t state;
25635       wchar_t wc;
25636       size_t ret;
25637
25638       memset (&state, '\0', sizeof (mbstate_t));
25639       wc = (wchar_t) 0xBADFACE;
25640       ret = mbrtowc (&wc, input, 5, &state);
25641       if (ret != 2)
25642         result |= 1;
25643       if (!mbsinit (&state))
25644         result |= 2;
25645
25646       memset (&state, '\0', sizeof (mbstate_t));
25647       ret = mbrtowc (NULL, input, 5, &state);
25648       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
25649         result |= 4;
25650       if (!mbsinit (&state))
25651         result |= 8;
25652     }
25653   return result;
25654 }
25655 _ACEOF
25656 if ac_fn_c_try_run "$LINENO"; then :
25657   gl_cv_func_mbrtowc_null_arg1=yes
25658 else
25659   gl_cv_func_mbrtowc_null_arg1=no
25660 fi
25661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25662   conftest.$ac_objext conftest.beam conftest.$ac_ext
25663 fi
25664
25665       fi
25666
25667 fi
25668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
25669 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
25670
25671
25672
25673
25674      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
25675 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
25676 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
25677   $as_echo_n "(cached) " >&6
25678 else
25679
25680                   case "$host_os" in
25681               # Guess no on OSF/1.
25682         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
25683               # Guess yes otherwise.
25684         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
25685       esac
25686       if test $LOCALE_FR_UTF8 != none; then
25687         if test "$cross_compiling" = yes; then :
25688   :
25689 else
25690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25691 /* end confdefs.h.  */
25692
25693 #include <locale.h>
25694 #include <string.h>
25695 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25696    <wchar.h>.
25697    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25698    included before <wchar.h>.  */
25699 #include <stddef.h>
25700 #include <stdio.h>
25701 #include <time.h>
25702 #include <wchar.h>
25703 int main ()
25704 {
25705   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25706     {
25707       mbstate_t state;
25708       wchar_t wc;
25709       int ret;
25710
25711       memset (&state, '\0', sizeof (mbstate_t));
25712       wc = (wchar_t) 0xBADFACE;
25713       mbrtowc (&wc, NULL, 5, &state);
25714       /* Check that wc was not modified.  */
25715       if (wc != (wchar_t) 0xBADFACE)
25716         return 1;
25717     }
25718   return 0;
25719 }
25720 _ACEOF
25721 if ac_fn_c_try_run "$LINENO"; then :
25722   gl_cv_func_mbrtowc_null_arg2=yes
25723 else
25724   gl_cv_func_mbrtowc_null_arg2=no
25725 fi
25726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25727   conftest.$ac_objext conftest.beam conftest.$ac_ext
25728 fi
25729
25730       fi
25731
25732 fi
25733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
25734 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
25735
25736
25737
25738
25739
25740
25741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
25742 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
25743 if ${gl_cv_func_mbrtowc_retval+:} false; then :
25744   $as_echo_n "(cached) " >&6
25745 else
25746
25747                   case "$host_os" in
25748                                    # Guess no on HP-UX, Solaris, native Windows.
25749         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
25750                                    # Guess yes otherwise.
25751         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
25752       esac
25753       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
25754          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
25755         if test "$cross_compiling" = yes; then :
25756   :
25757 else
25758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25759 /* end confdefs.h.  */
25760
25761 #include <locale.h>
25762 #include <string.h>
25763 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25764    <wchar.h>.
25765    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25766    included before <wchar.h>.  */
25767 #include <stddef.h>
25768 #include <stdio.h>
25769 #include <time.h>
25770 #include <wchar.h>
25771 int main ()
25772 {
25773   int result = 0;
25774   int found_some_locale = 0;
25775   /* This fails on Solaris.  */
25776   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25777     {
25778       char input[] = "B\303\274\303\237er"; /* "Büßer" */
25779       mbstate_t state;
25780       wchar_t wc;
25781
25782       memset (&state, '\0', sizeof (mbstate_t));
25783       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25784         {
25785           input[1] = '\0';
25786           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
25787             result |= 1;
25788         }
25789       found_some_locale = 1;
25790     }
25791   /* This fails on HP-UX 11.11.  */
25792   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25793     {
25794       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25795       mbstate_t state;
25796       wchar_t wc;
25797
25798       memset (&state, '\0', sizeof (mbstate_t));
25799       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25800         {
25801           input[1] = '\0';
25802           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
25803             result |= 2;
25804         }
25805       found_some_locale = 1;
25806     }
25807   /* This fails on native Windows.  */
25808   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
25809     {
25810       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
25811       mbstate_t state;
25812       wchar_t wc;
25813
25814       memset (&state, '\0', sizeof (mbstate_t));
25815       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25816         {
25817           input[3] = '\0';
25818           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25819             result |= 4;
25820         }
25821       found_some_locale = 1;
25822     }
25823   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
25824     {
25825       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
25826       mbstate_t state;
25827       wchar_t wc;
25828
25829       memset (&state, '\0', sizeof (mbstate_t));
25830       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25831         {
25832           input[3] = '\0';
25833           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25834             result |= 8;
25835         }
25836       found_some_locale = 1;
25837     }
25838   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
25839     {
25840       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
25841       mbstate_t state;
25842       wchar_t wc;
25843
25844       memset (&state, '\0', sizeof (mbstate_t));
25845       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25846         {
25847           input[3] = '\0';
25848           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25849             result |= 16;
25850         }
25851       found_some_locale = 1;
25852     }
25853   return (found_some_locale ? result : 77);
25854 }
25855 _ACEOF
25856 if ac_fn_c_try_run "$LINENO"; then :
25857   gl_cv_func_mbrtowc_retval=yes
25858 else
25859   if test $? != 77; then
25860              gl_cv_func_mbrtowc_retval=no
25861            fi
25862
25863 fi
25864 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25865   conftest.$ac_objext conftest.beam conftest.$ac_ext
25866 fi
25867
25868       fi
25869
25870 fi
25871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
25872 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
25873
25874
25875
25876
25877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
25878 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
25879 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
25880   $as_echo_n "(cached) " >&6
25881 else
25882
25883                   case "$host_os" in
25884                        # Guess no on Solaris 8 and 9.
25885         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
25886                        # Guess yes otherwise.
25887         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
25888       esac
25889       if test $LOCALE_ZH_CN != none; then
25890         if test "$cross_compiling" = yes; then :
25891   :
25892 else
25893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25894 /* end confdefs.h.  */
25895
25896 #include <locale.h>
25897 #include <string.h>
25898 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25899    <wchar.h>.
25900    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25901    included before <wchar.h>.  */
25902 #include <stddef.h>
25903 #include <stdio.h>
25904 #include <time.h>
25905 #include <wchar.h>
25906 int main ()
25907 {
25908   /* This fails on Solaris 8 and 9.  */
25909   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25910     {
25911       mbstate_t state;
25912       wchar_t wc;
25913
25914       memset (&state, '\0', sizeof (mbstate_t));
25915       if (mbrtowc (&wc, "", 1, &state) != 0)
25916         return 1;
25917     }
25918   return 0;
25919 }
25920 _ACEOF
25921 if ac_fn_c_try_run "$LINENO"; then :
25922   gl_cv_func_mbrtowc_nul_retval=yes
25923 else
25924   gl_cv_func_mbrtowc_nul_retval=no
25925 fi
25926 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25927   conftest.$ac_objext conftest.beam conftest.$ac_ext
25928 fi
25929
25930       fi
25931
25932 fi
25933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
25934 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
25935
25936       case "$gl_cv_func_mbrtowc_null_arg1" in
25937         *yes) ;;
25938         *)
25939 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
25940
25941            REPLACE_MBRTOWC=1
25942            ;;
25943       esac
25944       case "$gl_cv_func_mbrtowc_null_arg2" in
25945         *yes) ;;
25946         *)
25947 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
25948
25949            REPLACE_MBRTOWC=1
25950            ;;
25951       esac
25952       case "$gl_cv_func_mbrtowc_retval" in
25953         *yes) ;;
25954         *)
25955 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
25956
25957            REPLACE_MBRTOWC=1
25958            ;;
25959       esac
25960       case "$gl_cv_func_mbrtowc_nul_retval" in
25961         *yes) ;;
25962         *)
25963 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
25964
25965            REPLACE_MBRTOWC=1
25966            ;;
25967       esac
25968     fi
25969   fi
25970
25971   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
25972
25973
25974
25975
25976
25977
25978
25979
25980   M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
25981
25982
25983   :
25984
25985   fi
25986
25987
25988
25989
25990
25991           GNULIB_MBRTOWC=1
25992
25993
25994
25995
25996
25997 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
26013
26014
26015
26016      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
26017 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
26018 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
26019   $as_echo_n "(cached) " >&6
26020 else
26021
26022                   case "$host_os" in
26023                      # Guess no on AIX and OSF/1.
26024         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
26025                      # Guess yes otherwise.
26026         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
26027       esac
26028       if test $LOCALE_JA != none; then
26029         if test "$cross_compiling" = yes; then :
26030   :
26031 else
26032   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26033 /* end confdefs.h.  */
26034
26035 #include <locale.h>
26036 #include <string.h>
26037 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26038    <wchar.h>.
26039    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26040    included before <wchar.h>.  */
26041 #include <stddef.h>
26042 #include <stdio.h>
26043 #include <time.h>
26044 #include <wchar.h>
26045 int main ()
26046 {
26047   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
26048     {
26049       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
26050       mbstate_t state;
26051       wchar_t wc;
26052
26053       memset (&state, '\0', sizeof (mbstate_t));
26054       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
26055         if (mbsinit (&state))
26056           return 1;
26057     }
26058   return 0;
26059 }
26060 _ACEOF
26061 if ac_fn_c_try_run "$LINENO"; then :
26062   gl_cv_func_mbrtowc_incomplete_state=yes
26063 else
26064   gl_cv_func_mbrtowc_incomplete_state=no
26065 fi
26066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26067   conftest.$ac_objext conftest.beam conftest.$ac_ext
26068 fi
26069
26070       fi
26071
26072 fi
26073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
26074 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
26075
26076
26077
26078
26079      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
26080 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
26081 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
26082   $as_echo_n "(cached) " >&6
26083 else
26084
26085                   case "$host_os" in
26086                     # Guess no on Solaris 8.
26087         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
26088                     # Guess yes otherwise.
26089         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
26090       esac
26091       if test $LOCALE_ZH_CN != none; then
26092         if test "$cross_compiling" = yes; then :
26093   :
26094 else
26095   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26096 /* end confdefs.h.  */
26097
26098 #include <locale.h>
26099 #include <stdlib.h>
26100 #include <string.h>
26101 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26102    <wchar.h>.
26103    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26104    included before <wchar.h>.  */
26105 #include <stddef.h>
26106 #include <stdio.h>
26107 #include <time.h>
26108 #include <wchar.h>
26109 int main ()
26110 {
26111   /* This fails on Solaris 8:
26112      mbrtowc returns 2, and sets wc to 0x00F0.
26113      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
26114   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
26115     {
26116       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
26117       mbstate_t state;
26118       wchar_t wc;
26119
26120       memset (&state, '\0', sizeof (mbstate_t));
26121       if (mbrtowc (&wc, input + 3, 6, &state) != 4
26122           && mbtowc (&wc, input + 3, 6) == 4)
26123         return 1;
26124     }
26125   return 0;
26126 }
26127 _ACEOF
26128 if ac_fn_c_try_run "$LINENO"; then :
26129   gl_cv_func_mbrtowc_sanitycheck=yes
26130 else
26131   gl_cv_func_mbrtowc_sanitycheck=no
26132 fi
26133 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26134   conftest.$ac_objext conftest.beam conftest.$ac_ext
26135 fi
26136
26137       fi
26138
26139 fi
26140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
26141 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
26142
26143     REPLACE_MBSTATE_T=0
26144     case "$gl_cv_func_mbrtowc_incomplete_state" in
26145       *yes) ;;
26146       *) REPLACE_MBSTATE_T=1 ;;
26147     esac
26148     case "$gl_cv_func_mbrtowc_sanitycheck" in
26149       *yes) ;;
26150       *) REPLACE_MBSTATE_T=1 ;;
26151     esac
26152   else
26153     REPLACE_MBSTATE_T=1
26154   fi
26155
26156
26157
26158   if test $ac_cv_func_mbsinit = no; then
26159     HAVE_MBSINIT=0
26160     ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
26161 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26162    <wchar.h>.
26163    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26164    included before <wchar.h>.  */
26165 #include <stddef.h>
26166 #include <stdio.h>
26167 #include <time.h>
26168 #include <wchar.h>
26169
26170 "
26171 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
26172   ac_have_decl=1
26173 else
26174   ac_have_decl=0
26175 fi
26176
26177 cat >>confdefs.h <<_ACEOF
26178 #define HAVE_DECL_MBSINIT $ac_have_decl
26179 _ACEOF
26180
26181     if test $ac_cv_have_decl_mbsinit = yes; then
26182                         REPLACE_MBSINIT=1
26183     fi
26184   else
26185     if test $REPLACE_MBSTATE_T = 1; then
26186       REPLACE_MBSINIT=1
26187     else
26188                         case "$host_os" in
26189         mingw*) REPLACE_MBSINIT=1 ;;
26190       esac
26191     fi
26192   fi
26193
26194   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
26195
26196
26197
26198
26199
26200
26201
26202
26203   M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
26204
26205
26206   :
26207
26208   fi
26209
26210
26211
26212
26213
26214           GNULIB_MBSINIT=1
26215
26216
26217
26218
26219
26220 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
26221
26222
26223
26224
26225
26226
26227   if false; then
26228     REPLACE_MBTOWC=1
26229   fi
26230
26231   if test $REPLACE_MBTOWC = 1; then
26232
26233
26234
26235
26236
26237
26238
26239
26240   M4_LIBOBJS="$M4_LIBOBJS mbtowc.$ac_objext"
26241
26242
26243   :
26244
26245   fi
26246
26247
26248
26249
26250
26251           GNULIB_MBTOWC=1
26252
26253
26254
26255
26256
26257 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
26258
26259
26260
26261
26262   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
26263
26264
26265
26266
26267
26268
26269
26270
26271   M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
26272
26273
26274   for ac_header in bp-sym.h
26275 do :
26276   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
26277 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
26278   cat >>confdefs.h <<_ACEOF
26279 #define HAVE_BP_SYM_H 1
26280 _ACEOF
26281
26282 fi
26283
26284 done
26285
26286
26287   fi
26288
26289
26290
26291
26292
26293           GNULIB_MEMCHR=1
26294
26295
26296
26297
26298
26299 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
26300
26301
26302
26303
26304
26305   for ac_func in mkdtemp
26306 do :
26307   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26308 if test "x$ac_cv_func_mkdtemp" = xyes; then :
26309   cat >>confdefs.h <<_ACEOF
26310 #define HAVE_MKDTEMP 1
26311 _ACEOF
26312
26313 fi
26314 done
26315
26316   if test $ac_cv_func_mkdtemp = no; then
26317     HAVE_MKDTEMP=0
26318   fi
26319
26320   if test $HAVE_MKDTEMP = 0; then
26321
26322
26323
26324
26325
26326
26327
26328
26329   M4_LIBOBJS="$M4_LIBOBJS mkdtemp.$ac_objext"
26330
26331     :
26332
26333   fi
26334
26335
26336
26337
26338
26339           GNULIB_MKDTEMP=1
26340
26341
26342
26343
26344
26345 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26346
26347
26348
26349
26350
26351
26352
26353   if test $ac_cv_func_mkstemp = yes; then
26354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
26355 $as_echo_n "checking for working mkstemp... " >&6; }
26356 if ${gl_cv_func_working_mkstemp+:} false; then :
26357   $as_echo_n "(cached) " >&6
26358 else
26359
26360         mkdir conftest.mkstemp
26361         if test "$cross_compiling" = yes; then :
26362   case "$host_os" in
26363                      # Guess yes on glibc systems.
26364              *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
26365                      # If we don't know, assume the worst.
26366              *)      gl_cv_func_working_mkstemp="guessing no" ;;
26367            esac
26368
26369 else
26370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26371 /* end confdefs.h.  */
26372 $ac_includes_default
26373 int
26374 main ()
26375 {
26376 int result = 0;
26377               int i;
26378               off_t large = (off_t) 4294967295u;
26379               if (large < 0)
26380                 large = 2147483647;
26381               umask (0);
26382               for (i = 0; i < 70; i++)
26383                 {
26384                   char templ[] = "conftest.mkstemp/coXXXXXX";
26385                   int (*mkstemp_function) (char *) = mkstemp;
26386                   int fd = mkstemp_function (templ);
26387                   if (fd < 0)
26388                     result |= 1;
26389                   else
26390                     {
26391                       struct stat st;
26392                       if (lseek (fd, large, SEEK_SET) != large)
26393                         result |= 2;
26394                       if (fstat (fd, &st) < 0)
26395                         result |= 4;
26396                       else if (st.st_mode & 0077)
26397                         result |= 8;
26398                       if (close (fd))
26399                         result |= 16;
26400                     }
26401                 }
26402               return result;
26403   ;
26404   return 0;
26405 }
26406 _ACEOF
26407 if ac_fn_c_try_run "$LINENO"; then :
26408   gl_cv_func_working_mkstemp=yes
26409 else
26410   gl_cv_func_working_mkstemp=no
26411 fi
26412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26413   conftest.$ac_objext conftest.beam conftest.$ac_ext
26414 fi
26415
26416         rm -rf conftest.mkstemp
26417
26418 fi
26419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
26420 $as_echo "$gl_cv_func_working_mkstemp" >&6; }
26421     case "$gl_cv_func_working_mkstemp" in
26422       *yes) ;;
26423       *)
26424         REPLACE_MKSTEMP=1
26425         ;;
26426     esac
26427   else
26428     HAVE_MKSTEMP=0
26429   fi
26430
26431   if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
26432
26433
26434
26435
26436
26437
26438
26439
26440   M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
26441
26442
26443
26444   fi
26445
26446
26447
26448
26449
26450           GNULIB_MKSTEMP=1
26451
26452
26453
26454
26455
26456 $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
26457
26458
26459
26460
26461
26462   if test $ac_cv_func__set_invalid_parameter_handler = yes; then
26463     HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
26464
26465 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
26466
26467   else
26468     HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
26469   fi
26470
26471
26472   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26473
26474
26475
26476
26477
26478
26479
26480
26481   M4_LIBOBJS="$M4_LIBOBJS msvc-inval.$ac_objext"
26482
26483   fi
26484
26485
26486
26487   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26488
26489
26490
26491
26492
26493
26494
26495
26496   M4_LIBOBJS="$M4_LIBOBJS msvc-nothrow.$ac_objext"
26497
26498   fi
26499
26500
26501
26502
26503
26504      if test $ac_cv_func_nl_langinfo = yes; then
26505     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
26506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
26507 $as_echo_n "checking whether YESEXPR works... " >&6; }
26508 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
26509   $as_echo_n "(cached) " >&6
26510 else
26511   if test "$cross_compiling" = yes; then :
26512
26513          case "$host_os" in
26514                    # Guess no on irix systems.
26515            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
26516                    # Guess yes elsewhere.
26517            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
26518          esac
26519
26520 else
26521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26522 /* end confdefs.h.  */
26523 #include <langinfo.h>
26524
26525 int
26526 main ()
26527 {
26528 return !*nl_langinfo(YESEXPR);
26529
26530   ;
26531   return 0;
26532 }
26533 _ACEOF
26534 if ac_fn_c_try_run "$LINENO"; then :
26535   gl_cv_func_nl_langinfo_yesexpr_works=yes
26536 else
26537   gl_cv_func_nl_langinfo_yesexpr_works=no
26538 fi
26539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26540   conftest.$ac_objext conftest.beam conftest.$ac_ext
26541 fi
26542
26543
26544 fi
26545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
26546 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
26547     case $gl_cv_func_nl_langinfo_yesexpr_works in
26548       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
26549       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
26550     esac
26551
26552 cat >>confdefs.h <<_ACEOF
26553 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
26554 _ACEOF
26555
26556     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
26557         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
26558       :
26559     else
26560       REPLACE_NL_LANGINFO=1
26561
26562 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
26563
26564     fi
26565   else
26566     HAVE_NL_LANGINFO=0
26567   fi
26568
26569   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
26570
26571
26572
26573
26574
26575
26576
26577
26578   M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
26579
26580   fi
26581
26582
26583
26584
26585
26586           GNULIB_NL_LANGINFO=1
26587
26588
26589
26590
26591
26592 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
26609 $as_echo_n "checking for obstacks... " >&6; }
26610 if ${ac_cv_func_obstack+:} false; then :
26611   $as_echo_n "(cached) " >&6
26612 else
26613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26614 /* end confdefs.h.  */
26615 $ac_includes_default
26616                       #include "obstack.h"
26617 int
26618 main ()
26619 {
26620 struct obstack mem;
26621                        #define obstack_chunk_alloc malloc
26622                        #define obstack_chunk_free free
26623                        obstack_init (&mem);
26624                        obstack_free (&mem, 0);
26625   ;
26626   return 0;
26627 }
26628 _ACEOF
26629 if ac_fn_c_try_link "$LINENO"; then :
26630   ac_cv_func_obstack=yes
26631 else
26632   ac_cv_func_obstack=no
26633 fi
26634 rm -f core conftest.err conftest.$ac_objext \
26635     conftest$ac_exeext conftest.$ac_ext
26636 fi
26637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
26638 $as_echo "$ac_cv_func_obstack" >&6; }
26639 if test $ac_cv_func_obstack = yes; then
26640
26641 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
26642
26643 else
26644
26645
26646
26647
26648
26649
26650
26651
26652   M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
26653
26654 fi
26655
26656
26657
26658   case "$host_os" in
26659     mingw* | pw*)
26660       REPLACE_OPEN=1
26661       ;;
26662     *)
26663
26664       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26665 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26666 if ${gl_cv_func_open_slash+:} false; then :
26667   $as_echo_n "(cached) " >&6
26668 else
26669   # Assume that if we have lstat, we can also check symlinks.
26670           if test $ac_cv_func_lstat = yes; then
26671             touch conftest.tmp
26672             ln -s conftest.tmp conftest.lnk
26673           fi
26674           if test "$cross_compiling" = yes; then :
26675
26676              case "$host_os" in
26677                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26678                  gl_cv_func_open_slash="guessing no" ;;
26679                *)
26680                  gl_cv_func_open_slash="guessing yes" ;;
26681              esac
26682
26683 else
26684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26685 /* end confdefs.h.  */
26686
26687 #include <fcntl.h>
26688 #if HAVE_UNISTD_H
26689 # include <unistd.h>
26690 #endif
26691 int main ()
26692 {
26693   int result = 0;
26694 #if HAVE_LSTAT
26695   if (open ("conftest.lnk/", O_RDONLY) != -1)
26696     result |= 1;
26697 #endif
26698   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26699     result |= 2;
26700   return result;
26701 }
26702 _ACEOF
26703 if ac_fn_c_try_run "$LINENO"; then :
26704   gl_cv_func_open_slash=yes
26705 else
26706   gl_cv_func_open_slash=no
26707 fi
26708 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26709   conftest.$ac_objext conftest.beam conftest.$ac_ext
26710 fi
26711
26712           rm -f conftest.sl conftest.tmp conftest.lnk
26713
26714 fi
26715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26716 $as_echo "$gl_cv_func_open_slash" >&6; }
26717       case "$gl_cv_func_open_slash" in
26718         *no)
26719
26720 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26721
26722           REPLACE_OPEN=1
26723           ;;
26724       esac
26725       ;;
26726   esac
26727
26728
26729
26730   if test $REPLACE_OPEN = 1; then
26731
26732
26733
26734
26735
26736
26737
26738
26739   M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
26740
26741
26742
26743   :
26744
26745   fi
26746
26747
26748
26749
26750
26751           GNULIB_OPEN=1
26752
26753
26754
26755
26756
26757 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770   if test $ac_cv_func_pipe2 != yes; then
26771     HAVE_PIPE2=0
26772   fi
26773
26774
26775
26776
26777
26778
26779           GNULIB_PIPE2=1
26780
26781
26782
26783
26784
26785 $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
26786
26787
26788
26789
26790
26791 cat >>confdefs.h <<_ACEOF
26792 #define GNULIB_PIPE2_SAFER 1
26793 _ACEOF
26794
26795
26796
26797
26798
26799
26800
26801
26802   if test $REPLACE_POSIX_SPAWN = 1; then
26803     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26804   else
26805             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
26806 $as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
26807 if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
26808   $as_echo_n "(cached) " >&6
26809 else
26810   if test "$cross_compiling" = yes; then :
26811   # Guess no on Solaris, yes otherwise.
26812           case "$host_os" in
26813             solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
26814             *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
26815           esac
26816
26817 else
26818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26819 /* end confdefs.h.  */
26820
26821 #include <spawn.h>
26822 int main ()
26823 {
26824   posix_spawn_file_actions_t actions;
26825   if (posix_spawn_file_actions_init (&actions) != 0)
26826     return 1;
26827   if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
26828     return 2;
26829   return 0;
26830 }
26831 _ACEOF
26832 if ac_fn_c_try_run "$LINENO"; then :
26833   gl_cv_func_posix_spawn_file_actions_addclose_works=yes
26834 else
26835   gl_cv_func_posix_spawn_file_actions_addclose_works=no
26836 fi
26837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26838   conftest.$ac_objext conftest.beam conftest.$ac_ext
26839 fi
26840
26841
26842 fi
26843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
26844 $as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
26845     case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
26846       *yes) ;;
26847       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
26848     esac
26849   fi
26850
26851   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
26852
26853
26854
26855
26856
26857
26858
26859
26860   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
26861
26862   fi
26863
26864
26865
26866
26867
26868           GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26869
26870
26871
26872
26873
26874 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884   if test $REPLACE_POSIX_SPAWN = 1; then
26885     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26886   else
26887             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
26888 $as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
26889 if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
26890   $as_echo_n "(cached) " >&6
26891 else
26892   if test "$cross_compiling" = yes; then :
26893   # Guess no on Solaris, yes otherwise.
26894           case "$host_os" in
26895             solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
26896             *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
26897           esac
26898
26899 else
26900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26901 /* end confdefs.h.  */
26902
26903 #include <spawn.h>
26904 int main ()
26905 {
26906   posix_spawn_file_actions_t actions;
26907   if (posix_spawn_file_actions_init (&actions) != 0)
26908     return 1;
26909   if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
26910     return 2;
26911   return 0;
26912 }
26913 _ACEOF
26914 if ac_fn_c_try_run "$LINENO"; then :
26915   gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
26916 else
26917   gl_cv_func_posix_spawn_file_actions_adddup2_works=no
26918 fi
26919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26920   conftest.$ac_objext conftest.beam conftest.$ac_ext
26921 fi
26922
26923
26924 fi
26925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
26926 $as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
26927     case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
26928       *yes) ;;
26929       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
26930     esac
26931   fi
26932
26933   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
26934
26935
26936
26937
26938
26939
26940
26941
26942   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
26943
26944   fi
26945
26946
26947
26948
26949
26950           GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26951
26952
26953
26954
26955
26956 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966   if test $REPLACE_POSIX_SPAWN = 1; then
26967     REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
26968   else
26969             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
26970 $as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
26971 if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
26972   $as_echo_n "(cached) " >&6
26973 else
26974   if test "$cross_compiling" = yes; then :
26975   # Guess no on Solaris, yes otherwise.
26976           case "$host_os" in
26977             solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
26978             *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
26979           esac
26980
26981 else
26982   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26983 /* end confdefs.h.  */
26984
26985 #include <spawn.h>
26986 #include <fcntl.h>
26987 int main ()
26988 {
26989   posix_spawn_file_actions_t actions;
26990   if (posix_spawn_file_actions_init (&actions) != 0)
26991     return 1;
26992   if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
26993       == 0)
26994     return 2;
26995   return 0;
26996 }
26997 _ACEOF
26998 if ac_fn_c_try_run "$LINENO"; then :
26999   gl_cv_func_posix_spawn_file_actions_addopen_works=yes
27000 else
27001   gl_cv_func_posix_spawn_file_actions_addopen_works=no
27002 fi
27003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27004   conftest.$ac_objext conftest.beam conftest.$ac_ext
27005 fi
27006
27007
27008 fi
27009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
27010 $as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
27011     case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
27012       *yes) ;;
27013       *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
27014     esac
27015   fi
27016
27017   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
27018
27019
27020
27021
27022
27023
27024
27025
27026   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
27027
27028   fi
27029
27030
27031
27032
27033
27034           GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
27035
27036
27037
27038
27039
27040 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
27041
27042
27043
27044
27045
27046
27047   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27048
27049
27050
27051
27052
27053
27054
27055
27056   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
27057
27058   fi
27059
27060
27061
27062
27063
27064           GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
27065
27066
27067
27068
27069
27070 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
27071
27072
27073
27074
27075
27076
27077   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27078
27079
27080
27081
27082
27083
27084
27085
27086   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
27087
27088   fi
27089
27090
27091
27092
27093
27094           GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
27095
27096
27097
27098
27099
27100 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
27101
27102
27103
27104
27105
27106
27107   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27108
27109
27110
27111
27112
27113
27114
27115
27116   M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
27117
27118   fi
27119
27120
27121
27122
27123
27124           GNULIB_POSIX_SPAWNATTR_DESTROY=1
27125
27126
27127
27128
27129
27130 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
27131
27132
27133
27134
27135
27136
27137   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27138
27139
27140
27141
27142
27143
27144
27145
27146   M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
27147
27148   fi
27149
27150
27151
27152
27153
27154           GNULIB_POSIX_SPAWNATTR_INIT=1
27155
27156
27157
27158
27159
27160 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
27161
27162
27163
27164
27165
27166
27167   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27168
27169
27170
27171
27172
27173
27174
27175
27176   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
27177
27178   fi
27179
27180
27181
27182
27183
27184           GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
27185
27186
27187
27188
27189
27190 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
27191
27192
27193
27194
27195
27196
27197   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27198
27199
27200
27201
27202
27203
27204
27205
27206   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
27207
27208   fi
27209
27210
27211
27212
27213
27214           GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
27215
27216
27217
27218
27219
27220 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
27221
27222
27223
27224
27225
27226
27227   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27228
27229
27230
27231
27232
27233
27234
27235
27236   M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246   M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
27247
27248
27249   for ac_header in paths.h
27250 do :
27251   ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
27252 if test "x$ac_cv_header_paths_h" = xyes; then :
27253   cat >>confdefs.h <<_ACEOF
27254 #define HAVE_PATHS_H 1
27255 _ACEOF
27256
27257 fi
27258
27259 done
27260
27261   for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
27262 do :
27263   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27264 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27265 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27266   cat >>confdefs.h <<_ACEOF
27267 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27268 _ACEOF
27269
27270 fi
27271 done
27272
27273
27274   fi
27275
27276
27277
27278
27279
27280           GNULIB_POSIX_SPAWNP=1
27281
27282
27283
27284
27285
27286 $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
27287
27288
27289
27290
27291
27292   if test $gl_cv_func_frexp_no_libm = yes; then
27293
27294
27295
27296   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
27297 $as_echo_n "checking whether frexp works... " >&6; }
27298 if ${gl_cv_func_frexp_works+:} false; then :
27299   $as_echo_n "(cached) " >&6
27300 else
27301
27302       if test "$cross_compiling" = yes; then :
27303   case "$host_os" in
27304            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
27305            *)                        gl_cv_func_frexp_works="guessing yes";;
27306          esac
27307
27308 else
27309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27310 /* end confdefs.h.  */
27311
27312 #include <float.h>
27313 #include <math.h>
27314 #include <string.h>
27315 #if HAVE_DECL_ALARM
27316 # include <signal.h>
27317 # include <unistd.h>
27318 #endif
27319 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
27320    ICC 10.0 has a bug when optimizing the expression -zero.
27321    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
27322    to PowerPC on Mac OS X 10.5.  */
27323 #if defined __hpux || defined __sgi || defined __ICC
27324 static double
27325 compute_minus_zero (void)
27326 {
27327   return -DBL_MIN * DBL_MIN;
27328 }
27329 # define minus_zero compute_minus_zero ()
27330 #else
27331 double minus_zero = -0.0;
27332 #endif
27333 int main()
27334 {
27335   int result = 0;
27336   int i;
27337   volatile double x;
27338   double zero = 0.0;
27339 #if HAVE_DECL_ALARM
27340   /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
27341      number.  Let the test fail in this case.  */
27342   signal (SIGALRM, SIG_DFL);
27343   alarm (5);
27344 #endif
27345   /* Test on denormalized numbers.  */
27346   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
27347     ;
27348   if (x > 0.0)
27349     {
27350       int exp;
27351       double y = frexp (x, &exp);
27352       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
27353          On NetBSD: y = 0.75. Correct: y = 0.5.  */
27354       if (y != 0.5)
27355         result |= 1;
27356     }
27357   /* Test on infinite numbers.  */
27358   x = 1.0 / zero;
27359   {
27360     int exp;
27361     double y = frexp (x, &exp);
27362     if (y != x)
27363       result |= 2;
27364   }
27365   /* Test on negative zero.  */
27366   x = minus_zero;
27367   {
27368     int exp;
27369     double y = frexp (x, &exp);
27370     if (memcmp (&y, &x, sizeof x))
27371       result |= 4;
27372   }
27373   return result;
27374 }
27375 _ACEOF
27376 if ac_fn_c_try_run "$LINENO"; then :
27377   gl_cv_func_frexp_works=yes
27378 else
27379   gl_cv_func_frexp_works=no
27380 fi
27381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27382   conftest.$ac_objext conftest.beam conftest.$ac_ext
27383 fi
27384
27385
27386 fi
27387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
27388 $as_echo "$gl_cv_func_frexp_works" >&6; }
27389
27390     case "$gl_cv_func_frexp_works" in
27391       *yes)
27392
27393 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
27394
27395         ;;
27396     esac
27397   fi
27398
27399   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
27400 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
27401 if ${gl_cv_func_ldexp_no_libm+:} false; then :
27402   $as_echo_n "(cached) " >&6
27403 else
27404
27405       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27406 /* end confdefs.h.  */
27407 #include <math.h>
27408              double x;
27409              int y;
27410 int
27411 main ()
27412 {
27413 return ldexp (x, y) < 1;
27414   ;
27415   return 0;
27416 }
27417 _ACEOF
27418 if ac_fn_c_try_link "$LINENO"; then :
27419   gl_cv_func_ldexp_no_libm=yes
27420 else
27421   gl_cv_func_ldexp_no_libm=no
27422 fi
27423 rm -f core conftest.err conftest.$ac_objext \
27424     conftest$ac_exeext conftest.$ac_ext
27425
27426 fi
27427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
27428 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
27429   if test $gl_cv_func_ldexp_no_libm = yes; then
27430
27431 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
27432
27433   fi
27434
27435
27436
27437
27438
27439
27440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
27441 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
27442 if ${gl_cv_func_frexpl_no_libm+:} false; then :
27443   $as_echo_n "(cached) " >&6
27444 else
27445
27446       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27447 /* end confdefs.h.  */
27448 #include <math.h>
27449              long double x;
27450 int
27451 main ()
27452 {
27453 int e; return frexpl (x, &e) > 0;
27454   ;
27455   return 0;
27456 }
27457 _ACEOF
27458 if ac_fn_c_try_link "$LINENO"; then :
27459   gl_cv_func_frexpl_no_libm=yes
27460 else
27461   gl_cv_func_frexpl_no_libm=no
27462 fi
27463 rm -f core conftest.err conftest.$ac_objext \
27464     conftest$ac_exeext conftest.$ac_ext
27465
27466 fi
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
27468 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
27469
27470   if test $gl_cv_func_frexpl_no_libm = yes; then
27471
27472
27473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
27474 $as_echo_n "checking whether frexpl works... " >&6; }
27475 if ${gl_cv_func_frexpl_works+:} false; then :
27476   $as_echo_n "(cached) " >&6
27477 else
27478
27479       if test "$cross_compiling" = yes; then :
27480
27481          case "$host_os" in
27482            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
27483               gl_cv_func_frexpl_works="guessing no";;
27484            *) gl_cv_func_frexpl_works="guessing yes";;
27485          esac
27486
27487 else
27488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27489 /* end confdefs.h.  */
27490
27491 #include <float.h>
27492 #include <math.h>
27493 /* Override the values of <float.h>, like done in float.in.h.  */
27494 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
27495 # undef LDBL_MIN_EXP
27496 # define LDBL_MIN_EXP    (-16381)
27497 #endif
27498 #if defined __i386__ && defined __FreeBSD__
27499 # undef LDBL_MIN_EXP
27500 # define LDBL_MIN_EXP    (-16381)
27501 #endif
27502 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
27503 # undef LDBL_MIN_EXP
27504 # define LDBL_MIN_EXP DBL_MIN_EXP
27505 #endif
27506 #if defined __sgi && (LDBL_MANT_DIG >= 106)
27507 # if defined __GNUC__
27508 #  undef LDBL_MIN_EXP
27509 #  define LDBL_MIN_EXP DBL_MIN_EXP
27510 # endif
27511 #endif
27512 extern
27513 #ifdef __cplusplus
27514 "C"
27515 #endif
27516 long double frexpl (long double, int *);
27517 int main()
27518 {
27519   int result = 0;
27520   volatile long double x;
27521   /* Test on finite numbers that fails on AIX 5.1.  */
27522   x = 16.0L;
27523   {
27524     int exp = -9999;
27525     frexpl (x, &exp);
27526     if (exp != 5)
27527       result |= 1;
27528   }
27529   /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
27530      function returns an invalid (incorrectly normalized) value: it returns
27531                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
27532      but the correct result is
27533           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
27534   x = 1.01L;
27535   {
27536     int exp = -9999;
27537     long double y = frexpl (x, &exp);
27538     if (!(exp == 1 && y == 0.505L))
27539       result |= 2;
27540   }
27541   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
27542      LDBL_MAX_EXP = 16384.
27543      In the loop end test, we test x against Infinity, rather than comparing
27544      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
27545   {
27546     int i;
27547     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
27548       {
27549         int exp = -9999;
27550         frexpl (x, &exp);
27551         if (exp != i)
27552           {
27553             result |= 4;
27554             break;
27555           }
27556       }
27557   }
27558   /* Test on denormalized numbers.  */
27559   {
27560     int i;
27561     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
27562       ;
27563     if (x > 0.0L)
27564       {
27565         int exp;
27566         long double y = frexpl (x, &exp);
27567         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
27568            exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
27569         if (exp != LDBL_MIN_EXP - 1)
27570           result |= 8;
27571       }
27572   }
27573   /* Test on infinite numbers.  */
27574   x = 1.0L / 0.0L;
27575   {
27576     int exp;
27577     long double y = frexpl (x, &exp);
27578     if (y != x)
27579       result |= 16;
27580   }
27581   return result;
27582 }
27583 _ACEOF
27584 if ac_fn_c_try_run "$LINENO"; then :
27585   gl_cv_func_frexpl_works=yes
27586 else
27587   gl_cv_func_frexpl_works=no
27588 fi
27589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27590   conftest.$ac_objext conftest.beam conftest.$ac_ext
27591 fi
27592
27593
27594 fi
27595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
27596 $as_echo "$gl_cv_func_frexpl_works" >&6; }
27597
27598     case "$gl_cv_func_frexpl_works" in
27599       *yes) gl_func_frexpl_no_libm=yes ;;
27600       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
27601     esac
27602   else
27603     gl_func_frexpl_no_libm=no
27604         REPLACE_FREXPL=1
27605   fi
27606   if test $gl_func_frexpl_no_libm = yes; then
27607
27608 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
27609
27610             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
27611 "
27612 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
27613
27614 else
27615   HAVE_DECL_FREXPL=0
27616 fi
27617
27618   fi
27619
27620
27621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
27622 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
27623 if ${gl_cv_func_ldexpl_no_libm+:} false; then :
27624   $as_echo_n "(cached) " >&6
27625 else
27626
27627       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27628 /* end confdefs.h.  */
27629 #include <math.h>
27630              long double x;
27631 int
27632 main ()
27633 {
27634 return ldexpl (x, -1) > 0;
27635   ;
27636   return 0;
27637 }
27638 _ACEOF
27639 if ac_fn_c_try_link "$LINENO"; then :
27640   gl_cv_func_ldexpl_no_libm=yes
27641 else
27642   gl_cv_func_ldexpl_no_libm=no
27643 fi
27644 rm -f core conftest.err conftest.$ac_objext \
27645     conftest$ac_exeext conftest.$ac_ext
27646
27647 fi
27648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
27649 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
27650
27651   if test $gl_cv_func_ldexpl_no_libm = yes; then
27652
27653
27654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
27655 $as_echo_n "checking whether ldexpl works... " >&6; }
27656 if ${gl_cv_func_ldexpl_works+:} false; then :
27657   $as_echo_n "(cached) " >&6
27658 else
27659
27660       if test "$cross_compiling" = yes; then :
27661
27662          case "$host_os" in
27663            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
27664            *)               gl_cv_func_ldexpl_works="guessing yes";;
27665          esac
27666
27667 else
27668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27669 /* end confdefs.h.  */
27670
27671 #include <math.h>
27672 extern
27673 #ifdef __cplusplus
27674 "C"
27675 #endif
27676 long double ldexpl (long double, int);
27677 int main()
27678 {
27679   int result = 0;
27680   {
27681     volatile long double x = 1.0;
27682     volatile long double y = ldexpl (x, -1);
27683     if (y != 0.5L)
27684       result |= 1;
27685   }
27686   {
27687     volatile long double x = 1.73205L;
27688     volatile long double y = ldexpl (x, 0);
27689     if (y != x)
27690       result |= 2;
27691   }
27692   return result;
27693 }
27694 _ACEOF
27695 if ac_fn_c_try_run "$LINENO"; then :
27696   gl_cv_func_ldexpl_works=yes
27697 else
27698   gl_cv_func_ldexpl_works=no
27699 fi
27700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27701   conftest.$ac_objext conftest.beam conftest.$ac_ext
27702 fi
27703
27704
27705 fi
27706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
27707 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
27708
27709     case "$gl_cv_func_ldexpl_works" in
27710       *yes)
27711
27712 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
27713
27714                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
27715 "
27716 if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
27717
27718 else
27719   HAVE_DECL_LDEXPL=0
27720 fi
27721
27722         ;;
27723     esac
27724   fi
27725
27726
27727   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
27728 "
27729 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
27730   ac_have_decl=1
27731 else
27732   ac_have_decl=0
27733 fi
27734
27735 cat >>confdefs.h <<_ACEOF
27736 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
27737 _ACEOF
27738
27739   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
27740 "
27741 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
27742   ac_have_decl=1
27743 else
27744   ac_have_decl=0
27745 fi
27746
27747 cat >>confdefs.h <<_ACEOF
27748 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
27749 _ACEOF
27750
27751
27752   :
27753
27754
27755
27756
27757
27758   for ac_func in raise
27759 do :
27760   ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
27761 if test "x$ac_cv_func_raise" = xyes; then :
27762   cat >>confdefs.h <<_ACEOF
27763 #define HAVE_RAISE 1
27764 _ACEOF
27765
27766 fi
27767 done
27768
27769   if test $ac_cv_func_raise = no; then
27770     HAVE_RAISE=0
27771   else
27772     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27773       REPLACE_RAISE=1
27774     fi
27775
27776
27777
27778
27779   if test $gl_cv_type_sigset_t = yes; then
27780     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
27781 if test "x$ac_cv_func_sigprocmask" = xyes; then :
27782   gl_cv_func_sigprocmask=1
27783 fi
27784
27785   fi
27786   if test -z "$gl_cv_func_sigprocmask"; then
27787     HAVE_POSIX_SIGNALBLOCKING=0
27788   fi
27789
27790       if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
27791
27792
27793
27794
27795           if test $gl_cv_header_signal_h_SIGPIPE != yes; then
27796             REPLACE_RAISE=1
27797           fi
27798
27799       fi
27800
27801   fi
27802
27803   if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
27804
27805
27806
27807
27808
27809
27810
27811
27812   M4_LIBOBJS="$M4_LIBOBJS raise.$ac_objext"
27813
27814     :
27815   fi
27816
27817
27818
27819
27820
27821           GNULIB_RAISE=1
27822
27823
27824
27825
27826
27827 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
27828
27829
27830
27831
27832
27833
27834
27835   for ac_func in rawmemchr
27836 do :
27837   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
27838 if test "x$ac_cv_func_rawmemchr" = xyes; then :
27839   cat >>confdefs.h <<_ACEOF
27840 #define HAVE_RAWMEMCHR 1
27841 _ACEOF
27842
27843 fi
27844 done
27845
27846   if test $ac_cv_func_rawmemchr = no; then
27847     HAVE_RAWMEMCHR=0
27848   fi
27849
27850   if test $HAVE_RAWMEMCHR = 0; then
27851
27852
27853
27854
27855
27856
27857
27858
27859   M4_LIBOBJS="$M4_LIBOBJS rawmemchr.$ac_objext"
27860
27861     :
27862   fi
27863
27864
27865
27866
27867
27868           GNULIB_RAWMEMCHR=1
27869
27870
27871
27872
27873
27874 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27875
27876
27877
27878
27879
27880
27881   if test $ac_cv_func_readlink = no; then
27882     HAVE_READLINK=0
27883   else
27884     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
27885 $as_echo_n "checking whether readlink signature is correct... " >&6; }
27886 if ${gl_cv_decl_readlink_works+:} false; then :
27887   $as_echo_n "(cached) " >&6
27888 else
27889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27890 /* end confdefs.h.  */
27891 #include <unistd.h>
27892       /* Cause compilation failure if original declaration has wrong type.  */
27893       ssize_t readlink (const char *, char *, size_t);
27894 int
27895 main ()
27896 {
27897
27898   ;
27899   return 0;
27900 }
27901 _ACEOF
27902 if ac_fn_c_try_compile "$LINENO"; then :
27903   gl_cv_decl_readlink_works=yes
27904 else
27905   gl_cv_decl_readlink_works=no
27906 fi
27907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27908 fi
27909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
27910 $as_echo "$gl_cv_decl_readlink_works" >&6; }
27911             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
27912 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
27913 if ${gl_cv_func_readlink_works+:} false; then :
27914   $as_echo_n "(cached) " >&6
27915 else
27916   # We have readlink, so assume ln -s works.
27917        ln -s conftest.no-such conftest.link
27918        ln -s conftest.link conftest.lnk2
27919        if test "$cross_compiling" = yes; then :
27920   case "$host_os" in
27921                     # Guess yes on glibc systems.
27922             *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
27923                     # If we don't know, assume the worst.
27924             *)      gl_cv_func_readlink_works="guessing no" ;;
27925           esac
27926
27927 else
27928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27929 /* end confdefs.h.  */
27930 #include <unistd.h>
27931
27932 int
27933 main ()
27934 {
27935 char buf[20];
27936       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
27937   ;
27938   return 0;
27939 }
27940 _ACEOF
27941 if ac_fn_c_try_run "$LINENO"; then :
27942   gl_cv_func_readlink_works=yes
27943 else
27944   gl_cv_func_readlink_works=no
27945 fi
27946 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27947   conftest.$ac_objext conftest.beam conftest.$ac_ext
27948 fi
27949
27950       rm -f conftest.link conftest.lnk2
27951 fi
27952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
27953 $as_echo "$gl_cv_func_readlink_works" >&6; }
27954     case "$gl_cv_func_readlink_works" in
27955       *yes)
27956         if test "$gl_cv_decl_readlink_works" != yes; then
27957           REPLACE_READLINK=1
27958         fi
27959         ;;
27960       *)
27961
27962 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
27963
27964         REPLACE_READLINK=1
27965         ;;
27966     esac
27967   fi
27968
27969   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27970
27971
27972
27973
27974
27975
27976
27977
27978   M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
27979
27980
27981   :
27982
27983   fi
27984
27985
27986
27987
27988
27989           GNULIB_READLINK=1
27990
27991
27992
27993
27994
27995 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
27996
27997
27998
27999
28000
28001 # Check whether --with-included-regex was given.
28002 if test "${with_included_regex+set}" = set; then :
28003   withval=$with_included_regex;
28004 fi
28005
28006
28007   case $with_included_regex in #(
28008   yes|no) ac_use_included_regex=$with_included_regex
28009         ;;
28010   '')
28011     # If the system regex support is good enough that it passes the
28012     # following run test, then default to *not* using the included regex.c.
28013     # If cross compiling, assume the test would fail and use the included
28014     # regex.c.
28015
28016     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
28017 $as_echo_n "checking for working re_compile_pattern... " >&6; }
28018 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
28019   $as_echo_n "(cached) " >&6
28020 else
28021   if test "$cross_compiling" = yes; then :
28022          gl_cv_func_re_compile_pattern_working=no
28023 else
28024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28025 /* end confdefs.h.  */
28026 #include <regex.h>
28027
28028             #include <locale.h>
28029             #include <limits.h>
28030             #include <string.h>
28031             #if HAVE_DECL_ALARM
28032             # include <unistd.h>
28033             # include <signal.h>
28034             #endif
28035
28036 int
28037 main ()
28038 {
28039 int result = 0;
28040             static struct re_pattern_buffer regex;
28041             unsigned char folded_chars[UCHAR_MAX + 1];
28042             int i;
28043             const char *s;
28044             struct re_registers regs;
28045
28046 #if HAVE_DECL_ALARM
28047             /* Some builds of glibc go into an infinite loop on this test.  */
28048             signal (SIGALRM, SIG_DFL);
28049             alarm (2);
28050 #endif
28051             if (setlocale (LC_ALL, "en_US.UTF-8"))
28052               {
28053                 {
28054                   /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
28055                      This test needs valgrind to catch the bug on Debian
28056                      GNU/Linux 3.1 x86, but it might catch the bug better
28057                      on other platforms and it shouldn't hurt to try the
28058                      test here.  */
28059                   static char const pat[] = "insert into";
28060                   static char const data[] =
28061                     "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
28062                   re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
28063                                  | RE_ICASE);
28064                   memset (&regex, 0, sizeof regex);
28065                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
28066                   if (s)
28067                     result |= 1;
28068                   else if (re_search (&regex, data, sizeof data - 1,
28069                                       0, sizeof data - 1, &regs)
28070                            != -1)
28071                     result |= 1;
28072                 }
28073
28074                 {
28075                   /* This test is from glibc bug 15078.
28076                      The test case is from Andreas Schwab in
28077                      <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
28078                      */
28079                   static char const pat[] = "[^x]x";
28080                   static char const data[] =
28081                     /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
28082                     "\xe1\x80\x80"
28083                     "\xe1\x80\xbb"
28084                     "\xe1\x80\xbd"
28085                     "\xe1\x80\x94"
28086                     "\xe1\x80\xba"
28087                     "\xe1\x80\xaf"
28088                     "\xe1\x80\x95"
28089                     "\xe1\x80\xba"
28090                     "x";
28091                   re_set_syntax (0);
28092                   memset (&regex, 0, sizeof regex);
28093                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
28094                   if (s)
28095                     result |= 1;
28096                   else
28097                     {
28098                       i = re_search (&regex, data, sizeof data - 1,
28099                                      0, sizeof data - 1, 0);
28100                       if (i != 0 && i != 21)
28101                         result |= 1;
28102                     }
28103                 }
28104
28105                 if (! setlocale (LC_ALL, "C"))
28106                   return 1;
28107               }
28108
28109             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
28110             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
28111             memset (&regex, 0, sizeof regex);
28112             s = re_compile_pattern ("a[^x]b", 6, &regex);
28113             if (s)
28114               result |= 2;
28115             /* This should fail, but succeeds for glibc-2.5.  */
28116             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
28117               result |= 2;
28118
28119             /* This regular expression is from Spencer ere test number 75
28120                in grep-2.3.  */
28121             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
28122             memset (&regex, 0, sizeof regex);
28123             for (i = 0; i <= UCHAR_MAX; i++)
28124               folded_chars[i] = i;
28125             regex.translate = folded_chars;
28126             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
28127             /* This should fail with _Invalid character class name_ error.  */
28128             if (!s)
28129               result |= 4;
28130
28131             /* Ensure that [b-a] is diagnosed as invalid, when
28132                using RE_NO_EMPTY_RANGES. */
28133             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
28134             memset (&regex, 0, sizeof regex);
28135             s = re_compile_pattern ("a[b-a]", 6, &regex);
28136             if (s == 0)
28137               result |= 8;
28138
28139             /* This should succeed, but does not for glibc-2.1.3.  */
28140             memset (&regex, 0, sizeof regex);
28141             s = re_compile_pattern ("{1", 2, &regex);
28142             if (s)
28143               result |= 8;
28144
28145             /* The following example is derived from a problem report
28146                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
28147             memset (&regex, 0, sizeof regex);
28148             s = re_compile_pattern ("[an\371]*n", 7, &regex);
28149             if (s)
28150               result |= 8;
28151             /* This should match, but does not for glibc-2.2.1.  */
28152             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
28153               result |= 8;
28154
28155             memset (&regex, 0, sizeof regex);
28156             s = re_compile_pattern ("x", 1, &regex);
28157             if (s)
28158               result |= 8;
28159             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
28160             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
28161               result |= 8;
28162
28163             /* The version of regex.c in older versions of gnulib
28164                ignored RE_ICASE.  Detect that problem too.  */
28165             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
28166             memset (&regex, 0, sizeof regex);
28167             s = re_compile_pattern ("x", 1, &regex);
28168             if (s)
28169               result |= 16;
28170             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
28171               result |= 16;
28172
28173             /* Catch a bug reported by Vin Shelton in
28174                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
28175                */
28176             re_set_syntax (RE_SYNTAX_POSIX_BASIC
28177                            & ~RE_CONTEXT_INVALID_DUP
28178                            & ~RE_NO_EMPTY_RANGES);
28179             memset (&regex, 0, sizeof regex);
28180             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
28181             if (s)
28182               result |= 32;
28183
28184             /* REG_STARTEND was added to glibc on 2004-01-15.
28185                Reject older versions.  */
28186             if (! REG_STARTEND)
28187               result |= 64;
28188
28189 #if 0
28190             /* It would be nice to reject hosts whose regoff_t values are too
28191                narrow (including glibc on hosts with 64-bit ptrdiff_t and
28192                32-bit int), but we should wait until glibc implements this
28193                feature.  Otherwise, support for equivalence classes and
28194                multibyte collation symbols would always be broken except
28195                when compiling --without-included-regex.   */
28196             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
28197                 || sizeof (regoff_t) < sizeof (ssize_t))
28198               result |= 64;
28199 #endif
28200
28201             return result;
28202
28203   ;
28204   return 0;
28205 }
28206 _ACEOF
28207 if ac_fn_c_try_run "$LINENO"; then :
28208   gl_cv_func_re_compile_pattern_working=yes
28209 else
28210   gl_cv_func_re_compile_pattern_working=no
28211 fi
28212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28213   conftest.$ac_objext conftest.beam conftest.$ac_ext
28214 fi
28215
28216 fi
28217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
28218 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
28219     case $gl_cv_func_re_compile_pattern_working in #(
28220     yes) ac_use_included_regex=no;; #(
28221     no) ac_use_included_regex=yes;;
28222     esac
28223     ;;
28224   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
28225     ;;
28226   esac
28227
28228   if test $ac_use_included_regex = yes; then
28229
28230 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
28231
28232
28233 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
28234
28235
28236 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
28237
28238
28239 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
28240
28241
28242 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
28243
28244
28245 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
28246
28247
28248 $as_echo "#define re_search rpl_re_search" >>confdefs.h
28249
28250
28251 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
28252
28253
28254 $as_echo "#define re_match rpl_re_match" >>confdefs.h
28255
28256
28257 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
28258
28259
28260 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
28261
28262
28263 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
28264
28265
28266 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
28267
28268
28269 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
28270
28271
28272 $as_echo "#define regexec rpl_regexec" >>confdefs.h
28273
28274
28275 $as_echo "#define regerror rpl_regerror" >>confdefs.h
28276
28277
28278 $as_echo "#define regfree rpl_regfree" >>confdefs.h
28279
28280   fi
28281
28282   if test $ac_use_included_regex = yes; then
28283
28284
28285
28286
28287
28288
28289
28290
28291   M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
28292
28293
28294
28295
28296
28297
28298
28299
28300   for ac_header in libintl.h
28301 do :
28302   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
28303 if test "x$ac_cv_header_libintl_h" = xyes; then :
28304   cat >>confdefs.h <<_ACEOF
28305 #define HAVE_LIBINTL_H 1
28306 _ACEOF
28307
28308 fi
28309
28310 done
28311
28312
28313   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
28314 "
28315 if test "x$ac_cv_have_decl_isblank" = xyes; then :
28316   ac_have_decl=1
28317 else
28318   ac_have_decl=0
28319 fi
28320
28321 cat >>confdefs.h <<_ACEOF
28322 #define HAVE_DECL_ISBLANK $ac_have_decl
28323 _ACEOF
28324
28325
28326   fi
28327
28328
28329
28330
28331
28332                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
28333 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
28334 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
28335   $as_echo_n "(cached) " >&6
28336 else
28337   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
28338     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
28339       as_fn_error $? "cannot create temporary files" "$LINENO" 5
28340     # Assume that if we have lstat, we can also check symlinks.
28341     if test $ac_cv_func_lstat = yes; then
28342       ln -s conftest.f conftest.lnk
28343     fi
28344     if test "$cross_compiling" = yes; then :
28345         case "$host_os" in
28346                  # Guess yes on glibc systems.
28347          *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
28348                  # If we don't know, assume the worst.
28349          *)      gl_cv_func_rename_slash_dst_works="guessing no" ;;
28350        esac
28351
28352 else
28353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28354 /* end confdefs.h.  */
28355
28356 #        include <stdio.h>
28357 #        include <stdlib.h>
28358
28359 int
28360 main ()
28361 {
28362 int result = 0;
28363            if (rename ("conftest.f1", "conftest.f2/") == 0)
28364              result |= 1;
28365            if (rename ("conftest.d1", "conftest.d2/") != 0)
28366              result |= 2;
28367 #if HAVE_LSTAT
28368            if (rename ("conftest.f", "conftest.lnk/") == 0)
28369              result |= 4;
28370 #endif
28371            return result;
28372
28373   ;
28374   return 0;
28375 }
28376 _ACEOF
28377 if ac_fn_c_try_run "$LINENO"; then :
28378   gl_cv_func_rename_slash_dst_works=yes
28379 else
28380   gl_cv_func_rename_slash_dst_works=no
28381 fi
28382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28383   conftest.$ac_objext conftest.beam conftest.$ac_ext
28384 fi
28385
28386     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
28387
28388 fi
28389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
28390 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
28391   case "$gl_cv_func_rename_slash_dst_works" in
28392     *yes) ;;
28393     *)
28394       REPLACE_RENAME=1
28395
28396 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
28397
28398       ;;
28399   esac
28400
28401             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
28402 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
28403 if ${gl_cv_func_rename_slash_src_works+:} false; then :
28404   $as_echo_n "(cached) " >&6
28405 else
28406   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
28407     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
28408       as_fn_error $? "cannot create temporary files" "$LINENO" 5
28409     # Assume that if we have lstat, we can also check symlinks.
28410     if test $ac_cv_func_lstat = yes; then
28411       ln -s conftest.f conftest.lnk
28412     fi
28413     if test "$cross_compiling" = yes; then :
28414         case "$host_os" in
28415                  # Guess yes on glibc systems.
28416          *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
28417                  # If we don't know, assume the worst.
28418          *)      gl_cv_func_rename_slash_src_works="guessing no" ;;
28419        esac
28420
28421 else
28422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28423 /* end confdefs.h.  */
28424
28425 #        include <stdio.h>
28426 #        include <stdlib.h>
28427
28428 int
28429 main ()
28430 {
28431 int result = 0;
28432            if (rename ("conftest.f1/", "conftest.d3") == 0)
28433              result |= 1;
28434            if (rename ("conftest.d1/", "conftest.d2") != 0)
28435              result |= 2;
28436 #if HAVE_LSTAT
28437            if (rename ("conftest.lnk/", "conftest.f") == 0)
28438              result |= 4;
28439 #endif
28440            return result;
28441
28442   ;
28443   return 0;
28444 }
28445 _ACEOF
28446 if ac_fn_c_try_run "$LINENO"; then :
28447   gl_cv_func_rename_slash_src_works=yes
28448 else
28449   gl_cv_func_rename_slash_src_works=no
28450 fi
28451 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28452   conftest.$ac_objext conftest.beam conftest.$ac_ext
28453 fi
28454
28455     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
28456
28457 fi
28458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
28459 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
28460   case "$gl_cv_func_rename_slash_src_works" in
28461     *yes) ;;
28462     *)
28463       REPLACE_RENAME=1
28464
28465 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
28466
28467       ;;
28468   esac
28469
28470
28471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
28472 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
28473 if ${gl_cv_func_rename_link_works+:} false; then :
28474   $as_echo_n "(cached) " >&6
28475 else
28476   if test $ac_cv_func_link = yes; then
28477        rm -rf conftest.f conftest.f1
28478        if touch conftest.f && ln conftest.f conftest.f1 &&
28479            set x `ls -i conftest.f conftest.f1` && test "" = ""; then
28480          if test "$cross_compiling" = yes; then :
28481              case "$host_os" in
28482                       # Guess yes on glibc systems.
28483               *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
28484                       # If we don't know, assume the worst.
28485               *)      gl_cv_func_rename_link_works="guessing no" ;;
28486             esac
28487
28488 else
28489   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28490 /* end confdefs.h.  */
28491
28492 #             include <stdio.h>
28493 #             include <stdlib.h>
28494 #             include <unistd.h>
28495
28496 int
28497 main ()
28498 {
28499 int result = 0;
28500                 if (rename ("conftest.f", "conftest.f1"))
28501                   result |= 1;
28502                 if (unlink ("conftest.f1"))
28503                   result |= 2;
28504                 if (rename ("conftest.f", "conftest.f"))
28505                   result |= 4;
28506                 if (rename ("conftest.f1", "conftest.f1") == 0)
28507                   result |= 8;
28508                 return result;
28509
28510   ;
28511   return 0;
28512 }
28513 _ACEOF
28514 if ac_fn_c_try_run "$LINENO"; then :
28515   gl_cv_func_rename_link_works=yes
28516 else
28517   gl_cv_func_rename_link_works=no
28518 fi
28519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28520   conftest.$ac_objext conftest.beam conftest.$ac_ext
28521 fi
28522
28523        else
28524          gl_cv_func_rename_link_works="guessing no"
28525        fi
28526        rm -rf conftest.f conftest.f1
28527      else
28528        gl_cv_func_rename_link_works=yes
28529      fi
28530
28531 fi
28532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
28533 $as_echo "$gl_cv_func_rename_link_works" >&6; }
28534   case "$gl_cv_func_rename_link_works" in
28535     *yes) ;;
28536     *)
28537       REPLACE_RENAME=1
28538
28539 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
28540
28541       ;;
28542   esac
28543
28544           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
28545 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
28546 if ${gl_cv_func_rename_dest_works+:} false; then :
28547   $as_echo_n "(cached) " >&6
28548 else
28549   rm -rf conftest.f conftest.d1 conftest.d2
28550     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
28551       as_fn_error $? "cannot create temporary files" "$LINENO" 5
28552     if test "$cross_compiling" = yes; then :
28553         case "$host_os" in
28554                  # Guess yes on glibc systems.
28555          *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
28556                  # If we don't know, assume the worst.
28557          *)      gl_cv_func_rename_dest_works="guessing no" ;;
28558        esac
28559
28560 else
28561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28562 /* end confdefs.h.  */
28563
28564 #        include <stdio.h>
28565 #        include <stdlib.h>
28566
28567 int
28568 main ()
28569 {
28570 int result = 0;
28571            if (rename ("conftest.d1", "conftest.d2") != 0)
28572              result |= 1;
28573            if (rename ("conftest.d2", "conftest.f") == 0)
28574              result |= 2;
28575            return result;
28576
28577   ;
28578   return 0;
28579 }
28580 _ACEOF
28581 if ac_fn_c_try_run "$LINENO"; then :
28582   gl_cv_func_rename_dest_works=yes
28583 else
28584   gl_cv_func_rename_dest_works=no
28585 fi
28586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28587   conftest.$ac_objext conftest.beam conftest.$ac_ext
28588 fi
28589
28590     rm -rf conftest.f conftest.d1 conftest.d2
28591
28592 fi
28593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
28594 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
28595   case "$gl_cv_func_rename_dest_works" in
28596     *yes) ;;
28597     *)
28598       REPLACE_RENAME=1
28599
28600 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
28601
28602       ;;
28603   esac
28604
28605   if test $REPLACE_RENAME = 1; then
28606
28607
28608
28609
28610
28611
28612
28613
28614   M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
28615
28616   fi
28617
28618
28619
28620
28621
28622           GNULIB_RENAME=1
28623
28624
28625
28626
28627
28628 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
28629
28630
28631
28632
28633
28634
28635   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
28636 $as_echo_n "checking whether rmdir works... " >&6; }
28637 if ${gl_cv_func_rmdir_works+:} false; then :
28638   $as_echo_n "(cached) " >&6
28639 else
28640   mkdir conftest.dir
28641      touch conftest.file
28642      if test "$cross_compiling" = yes; then :
28643   case "$host_os" in
28644                   # Guess yes on glibc systems.
28645           *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
28646                   # If we don't know, assume the worst.
28647           *)      gl_cv_func_rmdir_works="guessing no" ;;
28648         esac
28649
28650 else
28651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28652 /* end confdefs.h.  */
28653 #include <stdio.h>
28654            #include <errno.h>
28655            #if HAVE_UNISTD_H
28656            # include <unistd.h>
28657            #else /* on Windows with MSVC */
28658            # include <direct.h>
28659            #endif
28660
28661 int
28662 main ()
28663 {
28664 int result = 0;
28665       if (!rmdir ("conftest.file/"))
28666         result |= 1;
28667       else if (errno != ENOTDIR)
28668         result |= 2;
28669       if (!rmdir ("conftest.dir/./"))
28670         result |= 4;
28671       return result;
28672
28673   ;
28674   return 0;
28675 }
28676 _ACEOF
28677 if ac_fn_c_try_run "$LINENO"; then :
28678   gl_cv_func_rmdir_works=yes
28679 else
28680   gl_cv_func_rmdir_works=no
28681 fi
28682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28683   conftest.$ac_objext conftest.beam conftest.$ac_ext
28684 fi
28685
28686      rm -rf conftest.dir conftest.file
28687 fi
28688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
28689 $as_echo "$gl_cv_func_rmdir_works" >&6; }
28690   case "$gl_cv_func_rmdir_works" in
28691     *yes) ;;
28692     *)
28693       REPLACE_RMDIR=1
28694       ;;
28695   esac
28696
28697   if test $REPLACE_RMDIR = 1; then
28698
28699
28700
28701
28702
28703
28704
28705
28706   M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
28707
28708   fi
28709
28710
28711
28712
28713
28714           GNULIB_RMDIR=1
28715
28716
28717
28718
28719
28720 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
28721
28722
28723
28724
28725   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28726 /* end confdefs.h.  */
28727
28728        #include <sched.h>
28729        struct sched_param a;
28730        int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
28731        pid_t t1;
28732
28733 int
28734 main ()
28735 {
28736
28737   ;
28738   return 0;
28739 }
28740 _ACEOF
28741 if ac_fn_c_try_compile "$LINENO"; then :
28742   SCHED_H=''
28743 else
28744   SCHED_H='sched.h'
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755      if test $gl_cv_have_include_next = yes; then
28756        gl_cv_next_sched_h='<'sched.h'>'
28757      else
28758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
28759 $as_echo_n "checking absolute name of <sched.h>... " >&6; }
28760 if ${gl_cv_next_sched_h+:} false; then :
28761   $as_echo_n "(cached) " >&6
28762 else
28763
28764              if test $ac_cv_header_sched_h = yes; then
28765
28766
28767                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28768 /* end confdefs.h.  */
28769 #include <sched.h>
28770
28771 _ACEOF
28772                                                                                                                         case "$host_os" in
28773                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28774                  *)    gl_absname_cpp="$ac_cpp" ;;
28775                esac
28776
28777                case "$host_os" in
28778                  mingw*)
28779                                                                                                                                      gl_dirsep_regex='[/\\]'
28780                    ;;
28781                  *)
28782                    gl_dirsep_regex='\/'
28783                    ;;
28784                esac
28785                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28786
28787                gl_header_literal_regex=`echo 'sched.h' \
28788                                         | sed -e "$gl_make_literal_regex_sed"`
28789                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28790                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28791                    s|^/[^/]|//&|
28792                    p
28793                    q
28794                  }'
28795                                                             gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28796                       sed -n "$gl_absolute_header_sed"`'"'
28797           else
28798                gl_cv_next_sched_h='<'sched.h'>'
28799              fi
28800
28801
28802 fi
28803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
28804 $as_echo "$gl_cv_next_sched_h" >&6; }
28805      fi
28806      NEXT_SCHED_H=$gl_cv_next_sched_h
28807
28808      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28809        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28810        gl_next_as_first_directive='<'sched.h'>'
28811      else
28812        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28813        gl_next_as_first_directive=$gl_cv_next_sched_h
28814      fi
28815      NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
28816
28817
28818
28819
28820
28821      if test $ac_cv_header_sched_h = yes; then
28822        HAVE_SCHED_H=1
28823      else
28824        HAVE_SCHED_H=0
28825      fi
28826
28827
28828      ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
28829 "
28830 if test "x$ac_cv_type_struct_sched_param" = xyes; then :
28831   HAVE_STRUCT_SCHED_PARAM=1
28832 else
28833   HAVE_STRUCT_SCHED_PARAM=0
28834 fi
28835
28836
28837
28838
28839
28840 fi
28841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28842
28843    if test -n "$SCHED_H"; then
28844   GL_GENERATE_SCHED_H_TRUE=
28845   GL_GENERATE_SCHED_H_FALSE='#'
28846 else
28847   GL_GENERATE_SCHED_H_TRUE='#'
28848   GL_GENERATE_SCHED_H_FALSE=
28849 fi
28850
28851
28852
28853
28854
28855
28856
28857   if test $ac_cv_func_secure_getenv = no; then
28858     HAVE_SECURE_GETENV=0
28859   fi
28860
28861   if test $HAVE_SECURE_GETENV = 0; then
28862
28863
28864
28865
28866
28867
28868
28869
28870   M4_LIBOBJS="$M4_LIBOBJS secure_getenv.$ac_objext"
28871
28872
28873   for ac_func in __secure_getenv
28874 do :
28875   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28876 if test "x$ac_cv_func___secure_getenv" = xyes; then :
28877   cat >>confdefs.h <<_ACEOF
28878 #define HAVE___SECURE_GETENV 1
28879 _ACEOF
28880
28881 fi
28882 done
28883
28884   if test $ac_cv_func___secure_getenv = no; then
28885     for ac_func in issetugid
28886 do :
28887   ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28888 if test "x$ac_cv_func_issetugid" = xyes; then :
28889   cat >>confdefs.h <<_ACEOF
28890 #define HAVE_ISSETUGID 1
28891 _ACEOF
28892
28893 fi
28894 done
28895
28896   fi
28897
28898   fi
28899
28900
28901
28902
28903
28904           GNULIB_SECURE_GETENV=1
28905
28906
28907
28908
28909
28910 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
28911
28912
28913
28914
28915
28916
28917   if test $ac_cv_func_sigaction = yes; then
28918     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
28919 "
28920 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
28921
28922 cat >>confdefs.h <<_ACEOF
28923 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
28924 _ACEOF
28925
28926
28927 fi
28928
28929     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
28930       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
28931     fi
28932   else
28933     HAVE_SIGACTION=0
28934   fi
28935
28936   if test $HAVE_SIGACTION = 0; then
28937
28938
28939
28940
28941
28942
28943
28944
28945   M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
28946
28947
28948
28949
28950
28951
28952
28953   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
28954 #include <signal.h>
28955
28956 "
28957 if test "x$ac_cv_type_siginfo_t" = xyes; then :
28958
28959 cat >>confdefs.h <<_ACEOF
28960 #define HAVE_SIGINFO_T 1
28961 _ACEOF
28962
28963
28964 fi
28965
28966   if test $ac_cv_type_siginfo_t = no; then
28967     HAVE_SIGINFO_T=0
28968   fi
28969
28970   fi
28971
28972
28973
28974
28975
28976           GNULIB_SIGACTION=1
28977
28978
28979
28980
28981
28982 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997      if test $gl_cv_have_include_next = yes; then
28998        gl_cv_next_signal_h='<'signal.h'>'
28999      else
29000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
29001 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
29002 if ${gl_cv_next_signal_h+:} false; then :
29003   $as_echo_n "(cached) " >&6
29004 else
29005
29006                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29007 /* end confdefs.h.  */
29008 #include <signal.h>
29009
29010 _ACEOF
29011                                                                                                                         case "$host_os" in
29012                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
29013                  *)    gl_absname_cpp="$ac_cpp" ;;
29014                esac
29015
29016                case "$host_os" in
29017                  mingw*)
29018                                                                                                                                      gl_dirsep_regex='[/\\]'
29019                    ;;
29020                  *)
29021                    gl_dirsep_regex='\/'
29022                    ;;
29023                esac
29024                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29025
29026                gl_header_literal_regex=`echo 'signal.h' \
29027                                         | sed -e "$gl_make_literal_regex_sed"`
29028                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29029                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29030                    s|^/[^/]|//&|
29031                    p
29032                    q
29033                  }'
29034                                                             gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29035                       sed -n "$gl_absolute_header_sed"`'"'
29036
29037
29038 fi
29039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
29040 $as_echo "$gl_cv_next_signal_h" >&6; }
29041      fi
29042      NEXT_SIGNAL_H=$gl_cv_next_signal_h
29043
29044      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29045        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29046        gl_next_as_first_directive='<'signal.h'>'
29047      else
29048        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29049        gl_next_as_first_directive=$gl_cv_next_signal_h
29050      fi
29051      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
29052
29053
29054
29055
29056
29057 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
29058 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
29059   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
29060 #include <signal.h>
29061
29062 "
29063 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
29064
29065 else
29066   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
29067 fi
29068
29069
29070
29071
29072
29073
29074
29075   ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
29076 #include <signal.h>
29077
29078 "
29079 if test "x$ac_cv_type_sighandler_t" = xyes; then :
29080
29081 else
29082   HAVE_SIGHANDLER_T=0
29083 fi
29084
29085
29086
29087
29088
29089
29090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
29091 $as_echo_n "checking for signbit macro... " >&6; }
29092 if ${gl_cv_func_signbit+:} false; then :
29093   $as_echo_n "(cached) " >&6
29094 else
29095
29096       if test "$cross_compiling" = yes; then :
29097   case "$host_os" in
29098                    # Guess yes on glibc systems.
29099            *-gnu*) gl_cv_func_signbit="guessing yes" ;;
29100                    # If we don't know, assume the worst.
29101            *)      gl_cv_func_signbit="guessing no" ;;
29102          esac
29103
29104 else
29105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29106 /* end confdefs.h.  */
29107
29108 #include <math.h>
29109 /* If signbit is defined as a function, don't use it, since calling it for
29110    'float' or 'long double' arguments would involve conversions.
29111    If signbit is not declared at all but exists as a library function, don't
29112    use it, since the prototype may not match.
29113    If signbit is not declared at all but exists as a compiler built-in, don't
29114    use it, since it's preferable to use __builtin_signbit* (no warnings,
29115    no conversions).  */
29116 #ifndef signbit
29117 # error "signbit should be a macro"
29118 #endif
29119 #include <string.h>
29120
29121 /* Global variables.
29122    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29123    but cannot constant-fold            __builtin_signbitl (variable).  */
29124 float vf;
29125 double vd;
29126 long double vl;
29127 int main ()
29128 {
29129 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29130    So we use -p0f and -p0d instead.  */
29131 float p0f = 0.0f;
29132 float m0f = -p0f;
29133 double p0d = 0.0;
29134 double m0d = -p0d;
29135 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29136    So we use another constant expression instead.
29137    But that expression does not work on other platforms, such as when
29138    cross-compiling to PowerPC on Mac OS X 10.5.  */
29139 long double p0l = 0.0L;
29140 #if defined __hpux || defined __sgi
29141 long double m0l = -LDBL_MIN * LDBL_MIN;
29142 #else
29143 long double m0l = -p0l;
29144 #endif
29145   int result = 0;
29146   if (signbit (vf)) /* link check */
29147     vf++;
29148   {
29149     float plus_inf = 1.0f / p0f;
29150     float minus_inf = -1.0f / p0f;
29151     if (!(!signbit (255.0f)
29152           && signbit (-255.0f)
29153           && !signbit (p0f)
29154           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29155           && !signbit (plus_inf)
29156           && signbit (minus_inf)))
29157       result |= 1;
29158   }
29159   if (signbit (vd)) /* link check */
29160     vd++;
29161   {
29162     double plus_inf = 1.0 / p0d;
29163     double minus_inf = -1.0 / p0d;
29164     if (!(!signbit (255.0)
29165           && signbit (-255.0)
29166           && !signbit (p0d)
29167           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29168           && !signbit (plus_inf)
29169           && signbit (minus_inf)))
29170       result |= 2;
29171   }
29172   if (signbit (vl)) /* link check */
29173     vl++;
29174   {
29175     long double plus_inf = 1.0L / p0l;
29176     long double minus_inf = -1.0L / p0l;
29177     if (signbit (255.0L))
29178       result |= 4;
29179     if (!signbit (-255.0L))
29180       result |= 4;
29181     if (signbit (p0l))
29182       result |= 8;
29183     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29184       result |= 16;
29185     if (signbit (plus_inf))
29186       result |= 32;
29187     if (!signbit (minus_inf))
29188       result |= 64;
29189   }
29190   return result;
29191 }
29192
29193
29194 _ACEOF
29195 if ac_fn_c_try_run "$LINENO"; then :
29196   gl_cv_func_signbit=yes
29197 else
29198   gl_cv_func_signbit=no
29199 fi
29200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29201   conftest.$ac_objext conftest.beam conftest.$ac_ext
29202 fi
29203
29204
29205 fi
29206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
29207 $as_echo "$gl_cv_func_signbit" >&6; }
29208           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
29209 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
29210 if ${gl_cv_func_signbit_gcc+:} false; then :
29211   $as_echo_n "(cached) " >&6
29212 else
29213
29214       if test "$cross_compiling" = yes; then :
29215   case "$host_os" in
29216                    # Guess yes on glibc systems.
29217            *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
29218                    # If we don't know, assume the worst.
29219            *)      gl_cv_func_signbit_gcc="guessing no" ;;
29220          esac
29221
29222 else
29223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29224 /* end confdefs.h.  */
29225
29226 #if __GNUC__ >= 4
29227 # define signbit(x) \
29228    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
29229     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
29230     __builtin_signbitf (x))
29231 #else
29232 # error "signbit should be three compiler built-ins"
29233 #endif
29234 #include <string.h>
29235
29236 /* Global variables.
29237    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
29238    but cannot constant-fold            __builtin_signbitl (variable).  */
29239 float vf;
29240 double vd;
29241 long double vl;
29242 int main ()
29243 {
29244 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
29245    So we use -p0f and -p0d instead.  */
29246 float p0f = 0.0f;
29247 float m0f = -p0f;
29248 double p0d = 0.0;
29249 double m0d = -p0d;
29250 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
29251    So we use another constant expression instead.
29252    But that expression does not work on other platforms, such as when
29253    cross-compiling to PowerPC on Mac OS X 10.5.  */
29254 long double p0l = 0.0L;
29255 #if defined __hpux || defined __sgi
29256 long double m0l = -LDBL_MIN * LDBL_MIN;
29257 #else
29258 long double m0l = -p0l;
29259 #endif
29260   int result = 0;
29261   if (signbit (vf)) /* link check */
29262     vf++;
29263   {
29264     float plus_inf = 1.0f / p0f;
29265     float minus_inf = -1.0f / p0f;
29266     if (!(!signbit (255.0f)
29267           && signbit (-255.0f)
29268           && !signbit (p0f)
29269           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
29270           && !signbit (plus_inf)
29271           && signbit (minus_inf)))
29272       result |= 1;
29273   }
29274   if (signbit (vd)) /* link check */
29275     vd++;
29276   {
29277     double plus_inf = 1.0 / p0d;
29278     double minus_inf = -1.0 / p0d;
29279     if (!(!signbit (255.0)
29280           && signbit (-255.0)
29281           && !signbit (p0d)
29282           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
29283           && !signbit (plus_inf)
29284           && signbit (minus_inf)))
29285       result |= 2;
29286   }
29287   if (signbit (vl)) /* link check */
29288     vl++;
29289   {
29290     long double plus_inf = 1.0L / p0l;
29291     long double minus_inf = -1.0L / p0l;
29292     if (signbit (255.0L))
29293       result |= 4;
29294     if (!signbit (-255.0L))
29295       result |= 4;
29296     if (signbit (p0l))
29297       result |= 8;
29298     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
29299       result |= 16;
29300     if (signbit (plus_inf))
29301       result |= 32;
29302     if (!signbit (minus_inf))
29303       result |= 64;
29304   }
29305   return result;
29306 }
29307
29308
29309 _ACEOF
29310 if ac_fn_c_try_run "$LINENO"; then :
29311   gl_cv_func_signbit_gcc=yes
29312 else
29313   gl_cv_func_signbit_gcc=no
29314 fi
29315 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29316   conftest.$ac_objext conftest.beam conftest.$ac_ext
29317 fi
29318
29319
29320 fi
29321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
29322 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
29323       case "$gl_cv_func_signbit_gcc" in
29324     *yes)
29325       REPLACE_SIGNBIT_USING_GCC=1
29326       ;;
29327     *)
29328       case "$gl_cv_func_signbit" in
29329         *yes) ;;
29330         *)
29331                     REPLACE_SIGNBIT=1
29332
29333
29334   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
29335 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
29336 if ${gl_cv_cc_float_signbit+:} false; then :
29337   $as_echo_n "(cached) " >&6
29338 else
29339
29340       if test "$cross_compiling" = yes; then :
29341
29342                               gl_cv_cc_float_signbit="unknown"
29343
29344 else
29345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29346 /* end confdefs.h.  */
29347
29348 #include <stddef.h>
29349 #include <stdio.h>
29350 #define NWORDS \
29351   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
29352 typedef union { float value; unsigned int word[NWORDS]; }
29353         memory_float;
29354 static memory_float plus = { 1.0f };
29355 static memory_float minus = { -1.0f };
29356 int main ()
29357 {
29358   size_t j, k, i;
29359   unsigned int m;
29360   FILE *fp = fopen ("conftest.out", "w");
29361   if (fp == NULL)
29362     return 1;
29363   /* Find the different bit.  */
29364   k = 0; m = 0;
29365   for (j = 0; j < NWORDS; j++)
29366     {
29367       unsigned int x = plus.word[j] ^ minus.word[j];
29368       if ((x & (x - 1)) || (x && m))
29369         {
29370           /* More than one bit difference.  */
29371           fprintf (fp, "unknown");
29372           return 2;
29373         }
29374       if (x)
29375         {
29376           k = j;
29377           m = x;
29378         }
29379     }
29380   if (m == 0)
29381     {
29382       /* No difference.  */
29383       fprintf (fp, "unknown");
29384       return 3;
29385     }
29386   /* Now m = plus.word[k] ^ ~minus.word[k].  */
29387   if (plus.word[k] & ~minus.word[k])
29388     {
29389       /* Oh? The sign bit is set in the positive and cleared in the negative
29390          numbers?  */
29391       fprintf (fp, "unknown");
29392       return 4;
29393     }
29394   for (i = 0; ; i++)
29395     if ((m >> i) & 1)
29396       break;
29397   fprintf (fp, "word %d bit %d", (int) k, (int) i);
29398   if (fclose (fp) != 0)
29399     return 5;
29400   return 0;
29401 }
29402
29403 _ACEOF
29404 if ac_fn_c_try_run "$LINENO"; then :
29405   gl_cv_cc_float_signbit=`cat conftest.out`
29406 else
29407   gl_cv_cc_float_signbit="unknown"
29408 fi
29409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29410   conftest.$ac_objext conftest.beam conftest.$ac_ext
29411 fi
29412
29413       rm -f conftest.out
29414
29415 fi
29416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
29417 $as_echo "$gl_cv_cc_float_signbit" >&6; }
29418   case "$gl_cv_cc_float_signbit" in
29419     word*bit*)
29420       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
29421       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
29422
29423 cat >>confdefs.h <<_ACEOF
29424 #define FLT_SIGNBIT_WORD $word
29425 _ACEOF
29426
29427
29428 cat >>confdefs.h <<_ACEOF
29429 #define FLT_SIGNBIT_BIT $bit
29430 _ACEOF
29431
29432       ;;
29433   esac
29434
29435
29436
29437
29438   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
29439 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
29440 if ${gl_cv_cc_double_signbit+:} false; then :
29441   $as_echo_n "(cached) " >&6
29442 else
29443
29444       if test "$cross_compiling" = yes; then :
29445
29446                               gl_cv_cc_double_signbit="unknown"
29447
29448 else
29449   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29450 /* end confdefs.h.  */
29451
29452 #include <stddef.h>
29453 #include <stdio.h>
29454 #define NWORDS \
29455   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
29456 typedef union { double value; unsigned int word[NWORDS]; }
29457         memory_float;
29458 static memory_float plus = { 1.0 };
29459 static memory_float minus = { -1.0 };
29460 int main ()
29461 {
29462   size_t j, k, i;
29463   unsigned int m;
29464   FILE *fp = fopen ("conftest.out", "w");
29465   if (fp == NULL)
29466     return 1;
29467   /* Find the different bit.  */
29468   k = 0; m = 0;
29469   for (j = 0; j < NWORDS; j++)
29470     {
29471       unsigned int x = plus.word[j] ^ minus.word[j];
29472       if ((x & (x - 1)) || (x && m))
29473         {
29474           /* More than one bit difference.  */
29475           fprintf (fp, "unknown");
29476           return 2;
29477         }
29478       if (x)
29479         {
29480           k = j;
29481           m = x;
29482         }
29483     }
29484   if (m == 0)
29485     {
29486       /* No difference.  */
29487       fprintf (fp, "unknown");
29488       return 3;
29489     }
29490   /* Now m = plus.word[k] ^ ~minus.word[k].  */
29491   if (plus.word[k] & ~minus.word[k])
29492     {
29493       /* Oh? The sign bit is set in the positive and cleared in the negative
29494          numbers?  */
29495       fprintf (fp, "unknown");
29496       return 4;
29497     }
29498   for (i = 0; ; i++)
29499     if ((m >> i) & 1)
29500       break;
29501   fprintf (fp, "word %d bit %d", (int) k, (int) i);
29502   if (fclose (fp) != 0)
29503     return 5;
29504   return 0;
29505 }
29506
29507 _ACEOF
29508 if ac_fn_c_try_run "$LINENO"; then :
29509   gl_cv_cc_double_signbit=`cat conftest.out`
29510 else
29511   gl_cv_cc_double_signbit="unknown"
29512 fi
29513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29514   conftest.$ac_objext conftest.beam conftest.$ac_ext
29515 fi
29516
29517       rm -f conftest.out
29518
29519 fi
29520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
29521 $as_echo "$gl_cv_cc_double_signbit" >&6; }
29522   case "$gl_cv_cc_double_signbit" in
29523     word*bit*)
29524       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
29525       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
29526
29527 cat >>confdefs.h <<_ACEOF
29528 #define DBL_SIGNBIT_WORD $word
29529 _ACEOF
29530
29531
29532 cat >>confdefs.h <<_ACEOF
29533 #define DBL_SIGNBIT_BIT $bit
29534 _ACEOF
29535
29536       ;;
29537   esac
29538
29539
29540
29541
29542   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
29543 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
29544 if ${gl_cv_cc_long_double_signbit+:} false; then :
29545   $as_echo_n "(cached) " >&6
29546 else
29547
29548       if test "$cross_compiling" = yes; then :
29549
29550                               gl_cv_cc_long_double_signbit="unknown"
29551
29552 else
29553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29554 /* end confdefs.h.  */
29555
29556 #include <stddef.h>
29557 #include <stdio.h>
29558 #define NWORDS \
29559   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
29560 typedef union { long double value; unsigned int word[NWORDS]; }
29561         memory_float;
29562 static memory_float plus = { 1.0L };
29563 static memory_float minus = { -1.0L };
29564 int main ()
29565 {
29566   size_t j, k, i;
29567   unsigned int m;
29568   FILE *fp = fopen ("conftest.out", "w");
29569   if (fp == NULL)
29570     return 1;
29571   /* Find the different bit.  */
29572   k = 0; m = 0;
29573   for (j = 0; j < NWORDS; j++)
29574     {
29575       unsigned int x = plus.word[j] ^ minus.word[j];
29576       if ((x & (x - 1)) || (x && m))
29577         {
29578           /* More than one bit difference.  */
29579           fprintf (fp, "unknown");
29580           return 2;
29581         }
29582       if (x)
29583         {
29584           k = j;
29585           m = x;
29586         }
29587     }
29588   if (m == 0)
29589     {
29590       /* No difference.  */
29591       fprintf (fp, "unknown");
29592       return 3;
29593     }
29594   /* Now m = plus.word[k] ^ ~minus.word[k].  */
29595   if (plus.word[k] & ~minus.word[k])
29596     {
29597       /* Oh? The sign bit is set in the positive and cleared in the negative
29598          numbers?  */
29599       fprintf (fp, "unknown");
29600       return 4;
29601     }
29602   for (i = 0; ; i++)
29603     if ((m >> i) & 1)
29604       break;
29605   fprintf (fp, "word %d bit %d", (int) k, (int) i);
29606   if (fclose (fp) != 0)
29607     return 5;
29608   return 0;
29609 }
29610
29611 _ACEOF
29612 if ac_fn_c_try_run "$LINENO"; then :
29613   gl_cv_cc_long_double_signbit=`cat conftest.out`
29614 else
29615   gl_cv_cc_long_double_signbit="unknown"
29616 fi
29617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29618   conftest.$ac_objext conftest.beam conftest.$ac_ext
29619 fi
29620
29621       rm -f conftest.out
29622
29623 fi
29624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
29625 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
29626   case "$gl_cv_cc_long_double_signbit" in
29627     word*bit*)
29628       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
29629       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
29630
29631 cat >>confdefs.h <<_ACEOF
29632 #define LDBL_SIGNBIT_WORD $word
29633 _ACEOF
29634
29635
29636 cat >>confdefs.h <<_ACEOF
29637 #define LDBL_SIGNBIT_BIT $bit
29638 _ACEOF
29639
29640       ;;
29641   esac
29642
29643
29644           if test "$gl_cv_cc_float_signbit" = unknown; then
29645                         ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
29646 "
29647 if test "x$ac_cv_have_decl_copysignf" = xyes; then :
29648   ac_have_decl=1
29649 else
29650   ac_have_decl=0
29651 fi
29652
29653 cat >>confdefs.h <<_ACEOF
29654 #define HAVE_DECL_COPYSIGNF $ac_have_decl
29655 _ACEOF
29656
29657             if test "$ac_cv_have_decl_copysignf" = yes; then
29658                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
29659 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
29660 if ${gl_cv_func_copysignf_no_libm+:} false; then :
29661   $as_echo_n "(cached) " >&6
29662 else
29663
29664                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29665 /* end confdefs.h.  */
29666 #include <math.h>
29667                          float x, y;
29668 int
29669 main ()
29670 {
29671 return copysignf (x, y) < 0;
29672   ;
29673   return 0;
29674 }
29675 _ACEOF
29676 if ac_fn_c_try_link "$LINENO"; then :
29677   gl_cv_func_copysignf_no_libm=yes
29678 else
29679   gl_cv_func_copysignf_no_libm=no
29680 fi
29681 rm -f core conftest.err conftest.$ac_objext \
29682     conftest$ac_exeext conftest.$ac_ext
29683
29684 fi
29685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
29686 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
29687               if test $gl_cv_func_copysignf_no_libm = yes; then
29688
29689 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
29690
29691               fi
29692             fi
29693           fi
29694           if test "$gl_cv_cc_double_signbit" = unknown; then
29695                         ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
29696 "
29697 if test "x$ac_cv_have_decl_copysign" = xyes; then :
29698   ac_have_decl=1
29699 else
29700   ac_have_decl=0
29701 fi
29702
29703 cat >>confdefs.h <<_ACEOF
29704 #define HAVE_DECL_COPYSIGN $ac_have_decl
29705 _ACEOF
29706
29707             if test "$ac_cv_have_decl_copysign" = yes; then
29708                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
29709 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
29710 if ${gl_cv_func_copysign_no_libm+:} false; then :
29711   $as_echo_n "(cached) " >&6
29712 else
29713
29714                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29715 /* end confdefs.h.  */
29716 #include <math.h>
29717                          double x, y;
29718 int
29719 main ()
29720 {
29721 return copysign (x, y) < 0;
29722   ;
29723   return 0;
29724 }
29725 _ACEOF
29726 if ac_fn_c_try_link "$LINENO"; then :
29727   gl_cv_func_copysign_no_libm=yes
29728 else
29729   gl_cv_func_copysign_no_libm=no
29730 fi
29731 rm -f core conftest.err conftest.$ac_objext \
29732     conftest$ac_exeext conftest.$ac_ext
29733
29734 fi
29735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
29736 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
29737               if test $gl_cv_func_copysign_no_libm = yes; then
29738
29739 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
29740
29741               fi
29742             fi
29743           fi
29744           if test "$gl_cv_cc_long_double_signbit" = unknown; then
29745                         ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
29746 "
29747 if test "x$ac_cv_have_decl_copysignl" = xyes; then :
29748   ac_have_decl=1
29749 else
29750   ac_have_decl=0
29751 fi
29752
29753 cat >>confdefs.h <<_ACEOF
29754 #define HAVE_DECL_COPYSIGNL $ac_have_decl
29755 _ACEOF
29756
29757             if test "$ac_cv_have_decl_copysignl" = yes; then
29758                             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
29759 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
29760 if ${gl_cv_func_copysignl_no_libm+:} false; then :
29761   $as_echo_n "(cached) " >&6
29762 else
29763
29764                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29765 /* end confdefs.h.  */
29766 #include <math.h>
29767                          long double x, y;
29768 int
29769 main ()
29770 {
29771 return copysignl (x, y) < 0;
29772   ;
29773   return 0;
29774 }
29775 _ACEOF
29776 if ac_fn_c_try_link "$LINENO"; then :
29777   gl_cv_func_copysignl_no_libm=yes
29778 else
29779   gl_cv_func_copysignl_no_libm=no
29780 fi
29781 rm -f core conftest.err conftest.$ac_objext \
29782     conftest$ac_exeext conftest.$ac_ext
29783
29784 fi
29785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
29786 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
29787               if test $gl_cv_func_copysignl_no_libm = yes; then
29788
29789 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
29790
29791               fi
29792             fi
29793           fi
29794           ;;
29795       esac
29796       ;;
29797   esac
29798
29799   if test $REPLACE_SIGNBIT = 1; then
29800
29801
29802
29803
29804
29805
29806
29807
29808   M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818   M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828   M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
29829
29830   fi
29831
29832
29833
29834
29835
29836           GNULIB_SIGNBIT=1
29837
29838
29839
29840
29841
29842 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
29843
29844
29845
29846
29847
29848
29849
29850
29851 cat >>confdefs.h <<_ACEOF
29852 #define GNULIB_SIGPIPE 1
29853 _ACEOF
29854
29855
29856
29857   GNULIB_SIGNAL_H_SIGPIPE=1
29858
29859
29860   GNULIB_STDIO_H_SIGPIPE=1
29861
29862   GNULIB_UNISTD_H_SIGPIPE=1
29863
29864
29865
29866   if test $gl_cv_type_sigset_t = yes; then
29867     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
29868 if test "x$ac_cv_func_sigprocmask" = xyes; then :
29869   gl_cv_func_sigprocmask=1
29870 fi
29871
29872   fi
29873   if test -z "$gl_cv_func_sigprocmask"; then
29874     HAVE_POSIX_SIGNALBLOCKING=0
29875   fi
29876
29877   if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
29878
29879
29880
29881
29882
29883
29884
29885
29886   M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
29887
29888     :
29889   fi
29890
29891
29892
29893
29894
29895           GNULIB_SIGPROCMASK=1
29896
29897
29898
29899
29900
29901 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
29902
29903
29904
29905
29906   for ac_header in stdint.h
29907 do :
29908   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29909 if test "x$ac_cv_header_stdint_h" = xyes; then :
29910   cat >>confdefs.h <<_ACEOF
29911 #define HAVE_STDINT_H 1
29912 _ACEOF
29913
29914 fi
29915
29916 done
29917
29918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
29919 $as_echo_n "checking for SIZE_MAX... " >&6; }
29920 if ${gl_cv_size_max+:} false; then :
29921   $as_echo_n "(cached) " >&6
29922 else
29923
29924     gl_cv_size_max=
29925     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29926 /* end confdefs.h.  */
29927
29928 #include <limits.h>
29929 #if HAVE_STDINT_H
29930 #include <stdint.h>
29931 #endif
29932 #ifdef SIZE_MAX
29933 Found it
29934 #endif
29935
29936 _ACEOF
29937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29938   $EGREP "Found it" >/dev/null 2>&1; then :
29939   gl_cv_size_max=yes
29940 fi
29941 rm -f conftest*
29942
29943     if test -z "$gl_cv_size_max"; then
29944                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
29945 #include <limits.h>"; then :
29946
29947 else
29948   size_t_bits_minus_1=
29949 fi
29950
29951       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
29952
29953 else
29954   fits_in_uint=
29955 fi
29956
29957       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
29958         if test $fits_in_uint = 1; then
29959                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29960 /* end confdefs.h.  */
29961 #include <stddef.h>
29962                  extern size_t foo;
29963                  extern unsigned long foo;
29964
29965 int
29966 main ()
29967 {
29968
29969   ;
29970   return 0;
29971 }
29972 _ACEOF
29973 if ac_fn_c_try_compile "$LINENO"; then :
29974   fits_in_uint=0
29975 fi
29976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29977         fi
29978                                 if test $fits_in_uint = 1; then
29979           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
29980         else
29981           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
29982         fi
29983       else
29984                 gl_cv_size_max='((size_t)~(size_t)0)'
29985       fi
29986     fi
29987
29988 fi
29989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
29990 $as_echo "$gl_cv_size_max" >&6; }
29991   if test "$gl_cv_size_max" != yes; then
29992
29993 cat >>confdefs.h <<_ACEOF
29994 #define SIZE_MAX $gl_cv_size_max
29995 _ACEOF
29996
29997   fi
29998
29999
30000
30001
30002   gl_cv_func_snprintf_usable=no
30003   for ac_func in snprintf
30004 do :
30005   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
30006 if test "x$ac_cv_func_snprintf" = xyes; then :
30007   cat >>confdefs.h <<_ACEOF
30008 #define HAVE_SNPRINTF 1
30009 _ACEOF
30010
30011 fi
30012 done
30013
30014   if test $ac_cv_func_snprintf = yes; then
30015
30016
30017
30018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
30019 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
30020 if ${gl_cv_func_snprintf_size1+:} false; then :
30021   $as_echo_n "(cached) " >&6
30022 else
30023
30024       if test "$cross_compiling" = yes; then :
30025   gl_cv_func_snprintf_size1="guessing yes"
30026 else
30027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30028 /* end confdefs.h.  */
30029
30030 #include <stdio.h>
30031 #if HAVE_SNPRINTF
30032 # define my_snprintf snprintf
30033 #else
30034 # include <stdarg.h>
30035 static int my_snprintf (char *buf, int size, const char *format, ...)
30036 {
30037   va_list args;
30038   int ret;
30039   va_start (args, format);
30040   ret = vsnprintf (buf, size, format, args);
30041   va_end (args);
30042   return ret;
30043 }
30044 #endif
30045 int main()
30046 {
30047   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
30048   my_snprintf (buf, 1, "%d", 12345);
30049   return buf[1] != 'E';
30050 }
30051 _ACEOF
30052 if ac_fn_c_try_run "$LINENO"; then :
30053   gl_cv_func_snprintf_size1=yes
30054 else
30055   gl_cv_func_snprintf_size1=no
30056 fi
30057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30058   conftest.$ac_objext conftest.beam conftest.$ac_ext
30059 fi
30060
30061
30062 fi
30063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
30064 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
30065
30066     case "$gl_cv_func_snprintf_size1" in
30067       *yes)
30068
30069         case "$gl_cv_func_snprintf_retval_c99" in
30070           *yes)
30071
30072
30073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
30074 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
30075 if ${gl_cv_func_printf_positions+:} false; then :
30076   $as_echo_n "(cached) " >&6
30077 else
30078
30079       if test "$cross_compiling" = yes; then :
30080
30081          case "$host_os" in
30082            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
30083                          gl_cv_func_printf_positions="guessing no";;
30084            beos*)        gl_cv_func_printf_positions="guessing no";;
30085            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
30086            *)            gl_cv_func_printf_positions="guessing yes";;
30087          esac
30088
30089 else
30090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30091 /* end confdefs.h.  */
30092
30093 #include <stdio.h>
30094 #include <string.h>
30095 /* The string "%2$d %1$d", with dollar characters protected from the shell's
30096    dollar expansion (possibly an autoconf bug).  */
30097 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
30098 static char buf[100];
30099 int main ()
30100 {
30101   sprintf (buf, format, 33, 55);
30102   return (strcmp (buf, "55 33") != 0);
30103 }
30104 _ACEOF
30105 if ac_fn_c_try_run "$LINENO"; then :
30106   gl_cv_func_printf_positions=yes
30107 else
30108   gl_cv_func_printf_positions=no
30109 fi
30110 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30111   conftest.$ac_objext conftest.beam conftest.$ac_ext
30112 fi
30113
30114
30115 fi
30116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
30117 $as_echo "$gl_cv_func_printf_positions" >&6; }
30118
30119             case "$gl_cv_func_printf_positions" in
30120               *yes)
30121                 gl_cv_func_snprintf_usable=yes
30122                 ;;
30123             esac
30124             ;;
30125         esac
30126         ;;
30127     esac
30128   fi
30129   if test $gl_cv_func_snprintf_usable = no; then
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140   M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
30141
30142   if test $ac_cv_func_snprintf = yes; then
30143     REPLACE_SNPRINTF=1
30144   fi
30145   :
30146
30147   fi
30148
30149   if test $ac_cv_have_decl_snprintf = no; then
30150     HAVE_DECL_SNPRINTF=0
30151   fi
30152
30153
30154
30155
30156
30157
30158           GNULIB_SNPRINTF=1
30159
30160
30161
30162
30163
30164 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
30165
30166
30167
30168
30169
30170 cat >>confdefs.h <<_ACEOF
30171 #define GNULIB_SNPRINTF 1
30172 _ACEOF
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187      if test $gl_cv_have_include_next = yes; then
30188        gl_cv_next_spawn_h='<'spawn.h'>'
30189      else
30190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
30191 $as_echo_n "checking absolute name of <spawn.h>... " >&6; }
30192 if ${gl_cv_next_spawn_h+:} false; then :
30193   $as_echo_n "(cached) " >&6
30194 else
30195
30196              if test $ac_cv_header_spawn_h = yes; then
30197
30198
30199                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30200 /* end confdefs.h.  */
30201 #include <spawn.h>
30202
30203 _ACEOF
30204                                                                                                                         case "$host_os" in
30205                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30206                  *)    gl_absname_cpp="$ac_cpp" ;;
30207                esac
30208
30209                case "$host_os" in
30210                  mingw*)
30211                                                                                                                                      gl_dirsep_regex='[/\\]'
30212                    ;;
30213                  *)
30214                    gl_dirsep_regex='\/'
30215                    ;;
30216                esac
30217                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30218
30219                gl_header_literal_regex=`echo 'spawn.h' \
30220                                         | sed -e "$gl_make_literal_regex_sed"`
30221                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30222                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30223                    s|^/[^/]|//&|
30224                    p
30225                    q
30226                  }'
30227                                                             gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30228                       sed -n "$gl_absolute_header_sed"`'"'
30229           else
30230                gl_cv_next_spawn_h='<'spawn.h'>'
30231              fi
30232
30233
30234 fi
30235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
30236 $as_echo "$gl_cv_next_spawn_h" >&6; }
30237      fi
30238      NEXT_SPAWN_H=$gl_cv_next_spawn_h
30239
30240      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30241        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30242        gl_next_as_first_directive='<'spawn.h'>'
30243      else
30244        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30245        gl_next_as_first_directive=$gl_cv_next_spawn_h
30246      fi
30247      NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
30248
30249
30250
30251
30252
30253   if test $ac_cv_header_spawn_h = yes; then
30254     HAVE_SPAWN_H=1
30255     ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
30256 #include <spawn.h>
30257
30258 "
30259 if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
30260
30261 cat >>confdefs.h <<_ACEOF
30262 #define HAVE_POSIX_SPAWNATTR_T 1
30263 _ACEOF
30264
30265
30266 else
30267   HAVE_POSIX_SPAWNATTR_T=0
30268 fi
30269
30270     ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
30271 #include <spawn.h>
30272
30273 "
30274 if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
30275
30276 cat >>confdefs.h <<_ACEOF
30277 #define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
30278 _ACEOF
30279
30280
30281 else
30282   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
30283 fi
30284
30285   else
30286     HAVE_SPAWN_H=0
30287     HAVE_POSIX_SPAWNATTR_T=0
30288     HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
30289   fi
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
30307 $as_echo_n "checking for ssize_t... " >&6; }
30308 if ${gt_cv_ssize_t+:} false; then :
30309   $as_echo_n "(cached) " >&6
30310 else
30311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30312 /* end confdefs.h.  */
30313 #include <sys/types.h>
30314 int
30315 main ()
30316 {
30317 int x = sizeof (ssize_t *) + sizeof (ssize_t);
30318             return !x;
30319   ;
30320   return 0;
30321 }
30322 _ACEOF
30323 if ac_fn_c_try_compile "$LINENO"; then :
30324   gt_cv_ssize_t=yes
30325 else
30326   gt_cv_ssize_t=no
30327 fi
30328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30329 fi
30330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
30331 $as_echo "$gt_cv_ssize_t" >&6; }
30332   if test $gt_cv_ssize_t = no; then
30333
30334 $as_echo "#define ssize_t int" >>confdefs.h
30335
30336   fi
30337
30338
30339
30340
30341     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
30342 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
30343 if ${gl_cv_func_stat_dir_slash+:} false; then :
30344   $as_echo_n "(cached) " >&6
30345 else
30346   if test "$cross_compiling" = yes; then :
30347   case $host_os in
30348             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
30349             *) gl_cv_func_stat_dir_slash="guessing yes";;
30350           esac
30351 else
30352   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30353 /* end confdefs.h.  */
30354 #include <sys/stat.h>
30355
30356 int
30357 main ()
30358 {
30359 struct stat st; return stat (".", &st) != stat ("./", &st);
30360   ;
30361   return 0;
30362 }
30363 _ACEOF
30364 if ac_fn_c_try_run "$LINENO"; then :
30365   gl_cv_func_stat_dir_slash=yes
30366 else
30367   gl_cv_func_stat_dir_slash=no
30368 fi
30369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30370   conftest.$ac_objext conftest.beam conftest.$ac_ext
30371 fi
30372
30373 fi
30374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
30375 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
30376         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
30377 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
30378 if ${gl_cv_func_stat_file_slash+:} false; then :
30379   $as_echo_n "(cached) " >&6
30380 else
30381   touch conftest.tmp
30382        # Assume that if we have lstat, we can also check symlinks.
30383        if test $ac_cv_func_lstat = yes; then
30384          ln -s conftest.tmp conftest.lnk
30385        fi
30386        if test "$cross_compiling" = yes; then :
30387   case "$host_os" in
30388                     # Guess yes on glibc systems.
30389             *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
30390                     # If we don't know, assume the worst.
30391             *)      gl_cv_func_stat_file_slash="guessing no" ;;
30392           esac
30393
30394 else
30395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30396 /* end confdefs.h.  */
30397 #include <sys/stat.h>
30398
30399 int
30400 main ()
30401 {
30402 int result = 0;
30403       struct stat st;
30404       if (!stat ("conftest.tmp/", &st))
30405         result |= 1;
30406 #if HAVE_LSTAT
30407       if (!stat ("conftest.lnk/", &st))
30408         result |= 2;
30409 #endif
30410       return result;
30411
30412   ;
30413   return 0;
30414 }
30415 _ACEOF
30416 if ac_fn_c_try_run "$LINENO"; then :
30417   gl_cv_func_stat_file_slash=yes
30418 else
30419   gl_cv_func_stat_file_slash=no
30420 fi
30421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30422   conftest.$ac_objext conftest.beam conftest.$ac_ext
30423 fi
30424
30425        rm -f conftest.tmp conftest.lnk
30426 fi
30427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
30428 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
30429   case $gl_cv_func_stat_dir_slash in
30430     *no) REPLACE_STAT=1
30431
30432 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
30433 ;;
30434   esac
30435   case $gl_cv_func_stat_file_slash in
30436     *no) REPLACE_STAT=1
30437
30438 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
30439 ;;
30440   esac
30441
30442   if test $REPLACE_STAT = 1; then
30443
30444
30445
30446
30447
30448
30449
30450
30451   M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
30452
30453     :
30454   fi
30455
30456
30457
30458
30459
30460           GNULIB_STAT=1
30461
30462
30463
30464
30465
30466 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
30467
30468
30469
30470
30471   STDARG_H=''
30472   NEXT_STDARG_H='<stdarg.h>'
30473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
30474 $as_echo_n "checking for va_copy... " >&6; }
30475   if ${gl_cv_func_va_copy+:} false; then :
30476   $as_echo_n "(cached) " >&6
30477 else
30478
30479     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30480 /* end confdefs.h.  */
30481 #include <stdarg.h>
30482 int
30483 main ()
30484 {
30485
30486 #ifndef va_copy
30487 void (*func) (va_list, va_list) = va_copy;
30488 #endif
30489
30490   ;
30491   return 0;
30492 }
30493 _ACEOF
30494 if ac_fn_c_try_compile "$LINENO"; then :
30495   gl_cv_func_va_copy=yes
30496 else
30497   gl_cv_func_va_copy=no
30498 fi
30499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30500 fi
30501
30502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
30503 $as_echo "$gl_cv_func_va_copy" >&6; }
30504   if test $gl_cv_func_va_copy = no; then
30505                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30506 /* end confdefs.h.  */
30507 #if defined _AIX && !defined __GNUC__
30508         AIX vaccine
30509        #endif
30510
30511 _ACEOF
30512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30513   $EGREP "vaccine" >/dev/null 2>&1; then :
30514   gl_aixcc=yes
30515 else
30516   gl_aixcc=no
30517 fi
30518 rm -f conftest*
30519
30520     if test $gl_aixcc = yes; then
30521             STDARG_H=stdarg.h
30522
30523
30524
30525
30526
30527
30528
30529
30530      if test $gl_cv_have_include_next = yes; then
30531        gl_cv_next_stdarg_h='<'stdarg.h'>'
30532      else
30533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
30534 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
30535 if ${gl_cv_next_stdarg_h+:} false; then :
30536   $as_echo_n "(cached) " >&6
30537 else
30538
30539                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30540 /* end confdefs.h.  */
30541 #include <stdarg.h>
30542
30543 _ACEOF
30544                                                                                                                         case "$host_os" in
30545                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30546                  *)    gl_absname_cpp="$ac_cpp" ;;
30547                esac
30548
30549                case "$host_os" in
30550                  mingw*)
30551                                                                                                                                      gl_dirsep_regex='[/\\]'
30552                    ;;
30553                  *)
30554                    gl_dirsep_regex='\/'
30555                    ;;
30556                esac
30557                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30558
30559                gl_header_literal_regex=`echo 'stdarg.h' \
30560                                         | sed -e "$gl_make_literal_regex_sed"`
30561                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30562                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30563                    s|^/[^/]|//&|
30564                    p
30565                    q
30566                  }'
30567                                                             gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30568                       sed -n "$gl_absolute_header_sed"`'"'
30569
30570
30571 fi
30572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
30573 $as_echo "$gl_cv_next_stdarg_h" >&6; }
30574      fi
30575      NEXT_STDARG_H=$gl_cv_next_stdarg_h
30576
30577      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30578        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30579        gl_next_as_first_directive='<'stdarg.h'>'
30580      else
30581        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30582        gl_next_as_first_directive=$gl_cv_next_stdarg_h
30583      fi
30584      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
30585
30586
30587
30588
30589             if test "$gl_cv_next_stdarg_h" = '""'; then
30590         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
30591         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
30592       fi
30593     else
30594
30595   saved_as_echo_n="$as_echo_n"
30596   as_echo_n=':'
30597   if ${gl_cv_func___va_copy+:} false; then :
30598   $as_echo_n "(cached) " >&6
30599 else
30600
30601         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30602 /* end confdefs.h.  */
30603 #include <stdarg.h>
30604 int
30605 main ()
30606 {
30607
30608 #ifndef __va_copy
30609 error, bail out
30610 #endif
30611
30612   ;
30613   return 0;
30614 }
30615 _ACEOF
30616 if ac_fn_c_try_compile "$LINENO"; then :
30617   gl_cv_func___va_copy=yes
30618 else
30619   gl_cv_func___va_copy=no
30620 fi
30621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30622 fi
30623
30624   as_echo_n="$saved_as_echo_n"
30625
30626       if test $gl_cv_func___va_copy = yes; then
30627
30628 $as_echo "#define va_copy __va_copy" >>confdefs.h
30629
30630       else
30631
30632
30633 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
30634
30635       fi
30636     fi
30637   fi
30638
30639    if test -n "$STDARG_H"; then
30640   GL_GENERATE_STDARG_H_TRUE=
30641   GL_GENERATE_STDARG_H_FALSE='#'
30642 else
30643   GL_GENERATE_STDARG_H_TRUE='#'
30644   GL_GENERATE_STDARG_H_FALSE=
30645 fi
30646
30647
30648
30649
30650
30651
30652   # Define two additional variables used in the Makefile substitution.
30653
30654   if test "$ac_cv_header_stdbool_h" = yes; then
30655     STDBOOL_H=''
30656   else
30657     STDBOOL_H='stdbool.h'
30658   fi
30659
30660    if test -n "$STDBOOL_H"; then
30661   GL_GENERATE_STDBOOL_H_TRUE=
30662   GL_GENERATE_STDBOOL_H_FALSE='#'
30663 else
30664   GL_GENERATE_STDBOOL_H_TRUE='#'
30665   GL_GENERATE_STDBOOL_H_FALSE=
30666 fi
30667
30668
30669   if test "$ac_cv_type__Bool" = yes; then
30670     HAVE__BOOL=1
30671   else
30672     HAVE__BOOL=0
30673   fi
30674
30675
30676
30677
30678
30679   STDDEF_H=
30680   if test $gt_cv_c_wchar_t = no; then
30681     HAVE_WCHAR_T=0
30682     STDDEF_H=stddef.h
30683   fi
30684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
30685 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
30686 if ${gl_cv_decl_null_works+:} false; then :
30687   $as_echo_n "(cached) " >&6
30688 else
30689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30690 /* end confdefs.h.  */
30691 #include <stddef.h>
30692       int test[2 * (sizeof NULL == sizeof (void *)) -1];
30693
30694 int
30695 main ()
30696 {
30697
30698   ;
30699   return 0;
30700 }
30701 _ACEOF
30702 if ac_fn_c_try_compile "$LINENO"; then :
30703   gl_cv_decl_null_works=yes
30704 else
30705   gl_cv_decl_null_works=no
30706 fi
30707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30708 fi
30709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
30710 $as_echo "$gl_cv_decl_null_works" >&6; }
30711   if test $gl_cv_decl_null_works = no; then
30712     REPLACE_NULL=1
30713     STDDEF_H=stddef.h
30714   fi
30715
30716    if test -n "$STDDEF_H"; then
30717   GL_GENERATE_STDDEF_H_TRUE=
30718   GL_GENERATE_STDDEF_H_FALSE='#'
30719 else
30720   GL_GENERATE_STDDEF_H_TRUE='#'
30721   GL_GENERATE_STDDEF_H_FALSE=
30722 fi
30723
30724   if test -n "$STDDEF_H"; then
30725
30726
30727
30728
30729
30730
30731
30732
30733      if test $gl_cv_have_include_next = yes; then
30734        gl_cv_next_stddef_h='<'stddef.h'>'
30735      else
30736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
30737 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
30738 if ${gl_cv_next_stddef_h+:} false; then :
30739   $as_echo_n "(cached) " >&6
30740 else
30741
30742                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30743 /* end confdefs.h.  */
30744 #include <stddef.h>
30745
30746 _ACEOF
30747                                                                                                                         case "$host_os" in
30748                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30749                  *)    gl_absname_cpp="$ac_cpp" ;;
30750                esac
30751
30752                case "$host_os" in
30753                  mingw*)
30754                                                                                                                                      gl_dirsep_regex='[/\\]'
30755                    ;;
30756                  *)
30757                    gl_dirsep_regex='\/'
30758                    ;;
30759                esac
30760                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30761
30762                gl_header_literal_regex=`echo 'stddef.h' \
30763                                         | sed -e "$gl_make_literal_regex_sed"`
30764                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30765                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30766                    s|^/[^/]|//&|
30767                    p
30768                    q
30769                  }'
30770                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30771                       sed -n "$gl_absolute_header_sed"`'"'
30772
30773
30774 fi
30775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
30776 $as_echo "$gl_cv_next_stddef_h" >&6; }
30777      fi
30778      NEXT_STDDEF_H=$gl_cv_next_stddef_h
30779
30780      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30781        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30782        gl_next_as_first_directive='<'stddef.h'>'
30783      else
30784        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30785        gl_next_as_first_directive=$gl_cv_next_stddef_h
30786      fi
30787      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
30788
30789
30790
30791
30792   fi
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805      if test $gl_cv_have_include_next = yes; then
30806        gl_cv_next_stdio_h='<'stdio.h'>'
30807      else
30808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
30809 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
30810 if ${gl_cv_next_stdio_h+:} false; then :
30811   $as_echo_n "(cached) " >&6
30812 else
30813
30814                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30815 /* end confdefs.h.  */
30816 #include <stdio.h>
30817
30818 _ACEOF
30819                                                                                                                         case "$host_os" in
30820                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30821                  *)    gl_absname_cpp="$ac_cpp" ;;
30822                esac
30823
30824                case "$host_os" in
30825                  mingw*)
30826                                                                                                                                      gl_dirsep_regex='[/\\]'
30827                    ;;
30828                  *)
30829                    gl_dirsep_regex='\/'
30830                    ;;
30831                esac
30832                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30833
30834                gl_header_literal_regex=`echo 'stdio.h' \
30835                                         | sed -e "$gl_make_literal_regex_sed"`
30836                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30837                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30838                    s|^/[^/]|//&|
30839                    p
30840                    q
30841                  }'
30842                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30843                       sed -n "$gl_absolute_header_sed"`'"'
30844
30845
30846 fi
30847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
30848 $as_echo "$gl_cv_next_stdio_h" >&6; }
30849      fi
30850      NEXT_STDIO_H=$gl_cv_next_stdio_h
30851
30852      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30853        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30854        gl_next_as_first_directive='<'stdio.h'>'
30855      else
30856        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30857        gl_next_as_first_directive=$gl_cv_next_stdio_h
30858      fi
30859      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
30860
30861
30862
30863
30864
30865       GNULIB_FSCANF=1
30866
30867
30868 cat >>confdefs.h <<_ACEOF
30869 #define GNULIB_FSCANF 1
30870 _ACEOF
30871
30872
30873   GNULIB_SCANF=1
30874
30875
30876 cat >>confdefs.h <<_ACEOF
30877 #define GNULIB_SCANF 1
30878 _ACEOF
30879
30880
30881   GNULIB_FGETC=1
30882   GNULIB_GETC=1
30883   GNULIB_GETCHAR=1
30884   GNULIB_FGETS=1
30885   GNULIB_FREAD=1
30886
30887
30888       GNULIB_FPRINTF=1
30889   GNULIB_PRINTF=1
30890   GNULIB_VFPRINTF=1
30891   GNULIB_VPRINTF=1
30892   GNULIB_FPUTC=1
30893   GNULIB_PUTC=1
30894   GNULIB_PUTCHAR=1
30895   GNULIB_FPUTS=1
30896   GNULIB_PUTS=1
30897   GNULIB_FWRITE=1
30898
30899
30900
30901
30902     if test $gl_cv_header_signal_h_SIGPIPE != yes; then
30903       REPLACE_STDIO_WRITE_FUNCS=1
30904
30905
30906
30907
30908
30909
30910
30911
30912   M4_LIBOBJS="$M4_LIBOBJS stdio-write.$ac_objext"
30913
30914     fi
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930      if test $gl_cv_have_include_next = yes; then
30931        gl_cv_next_stdlib_h='<'stdlib.h'>'
30932      else
30933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
30934 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
30935 if ${gl_cv_next_stdlib_h+:} false; then :
30936   $as_echo_n "(cached) " >&6
30937 else
30938
30939                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30940 /* end confdefs.h.  */
30941 #include <stdlib.h>
30942
30943 _ACEOF
30944                                                                                                                         case "$host_os" in
30945                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30946                  *)    gl_absname_cpp="$ac_cpp" ;;
30947                esac
30948
30949                case "$host_os" in
30950                  mingw*)
30951                                                                                                                                      gl_dirsep_regex='[/\\]'
30952                    ;;
30953                  *)
30954                    gl_dirsep_regex='\/'
30955                    ;;
30956                esac
30957                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30958
30959                gl_header_literal_regex=`echo 'stdlib.h' \
30960                                         | sed -e "$gl_make_literal_regex_sed"`
30961                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30962                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30963                    s|^/[^/]|//&|
30964                    p
30965                    q
30966                  }'
30967                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30968                       sed -n "$gl_absolute_header_sed"`'"'
30969
30970
30971 fi
30972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
30973 $as_echo "$gl_cv_next_stdlib_h" >&6; }
30974      fi
30975      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
30976
30977      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30978        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30979        gl_next_as_first_directive='<'stdlib.h'>'
30980      else
30981        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30982        gl_next_as_first_directive=$gl_cv_next_stdlib_h
30983      fi
30984      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996   for ac_func in strchrnul
30997 do :
30998   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
30999 if test "x$ac_cv_func_strchrnul" = xyes; then :
31000   cat >>confdefs.h <<_ACEOF
31001 #define HAVE_STRCHRNUL 1
31002 _ACEOF
31003
31004 fi
31005 done
31006
31007   if test $ac_cv_func_strchrnul = no; then
31008     HAVE_STRCHRNUL=0
31009   else
31010     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
31011 $as_echo_n "checking whether strchrnul works... " >&6; }
31012 if ${gl_cv_func_strchrnul_works+:} false; then :
31013   $as_echo_n "(cached) " >&6
31014 else
31015   if test "$cross_compiling" = yes; then :
31016            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31017 /* end confdefs.h.  */
31018
31019 #if defined __CYGWIN__
31020  #include <cygwin/version.h>
31021  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
31022   Lucky user
31023  #endif
31024 #else
31025   Lucky user
31026 #endif
31027
31028 _ACEOF
31029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31030   $EGREP "Lucky user" >/dev/null 2>&1; then :
31031   gl_cv_func_strchrnul_works="guessing yes"
31032 else
31033   gl_cv_func_strchrnul_works="guessing no"
31034 fi
31035 rm -f conftest*
31036
31037
31038 else
31039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31040 /* end confdefs.h.  */
31041
31042 #include <string.h> /* for strchrnul */
31043
31044 int
31045 main ()
31046 {
31047 const char *buf = "a";
31048       return strchrnul (buf, 'b') != buf + 1;
31049
31050   ;
31051   return 0;
31052 }
31053 _ACEOF
31054 if ac_fn_c_try_run "$LINENO"; then :
31055   gl_cv_func_strchrnul_works=yes
31056 else
31057   gl_cv_func_strchrnul_works=no
31058 fi
31059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31060   conftest.$ac_objext conftest.beam conftest.$ac_ext
31061 fi
31062
31063
31064 fi
31065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
31066 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
31067     case "$gl_cv_func_strchrnul_works" in
31068       *yes) ;;
31069       *) REPLACE_STRCHRNUL=1 ;;
31070     esac
31071   fi
31072
31073   if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
31074
31075
31076
31077
31078
31079
31080
31081
31082   M4_LIBOBJS="$M4_LIBOBJS strchrnul.$ac_objext"
31083
31084     :
31085   fi
31086
31087
31088
31089
31090
31091           GNULIB_STRCHRNUL=1
31092
31093
31094
31095
31096
31097 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
31098
31099
31100
31101
31102
31103
31104
31105
31106   if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
31107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
31108 $as_echo_n "checking for working strerror function... " >&6; }
31109 if ${gl_cv_func_working_strerror+:} false; then :
31110   $as_echo_n "(cached) " >&6
31111 else
31112   if test "$cross_compiling" = yes; then :
31113   case "$host_os" in
31114                    # Guess yes on glibc systems.
31115            *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
31116                    # If we don't know, assume the worst.
31117            *)      gl_cv_func_working_strerror="guessing no" ;;
31118          esac
31119
31120 else
31121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31122 /* end confdefs.h.  */
31123 #include <string.h>
31124
31125 int
31126 main ()
31127 {
31128 if (!*strerror (-2)) return 1;
31129   ;
31130   return 0;
31131 }
31132 _ACEOF
31133 if ac_fn_c_try_run "$LINENO"; then :
31134   gl_cv_func_working_strerror=yes
31135 else
31136   gl_cv_func_working_strerror=no
31137 fi
31138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31139   conftest.$ac_objext conftest.beam conftest.$ac_ext
31140 fi
31141
31142
31143 fi
31144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
31145 $as_echo "$gl_cv_func_working_strerror" >&6; }
31146     case "$gl_cv_func_working_strerror" in
31147       *yes) ;;
31148       *)
31149                         REPLACE_STRERROR=1
31150         ;;
31151     esac
31152
31153   else
31154             REPLACE_STRERROR=1
31155   fi
31156
31157   if test $REPLACE_STRERROR = 1; then
31158
31159
31160
31161
31162
31163
31164
31165
31166   M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
31167
31168   fi
31169
31170
31171 cat >>confdefs.h <<_ACEOF
31172 #define GNULIB_STRERROR 1
31173 _ACEOF
31174
31175
31176
31177
31178
31179
31180
31181           GNULIB_STRERROR=1
31182
31183
31184
31185
31186
31187 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
31188
31189
31190
31191
31192
31193   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
31194
31195
31196
31197
31198
31199
31200
31201
31202   M4_LIBOBJS="$M4_LIBOBJS strerror-override.$ac_objext"
31203
31204
31205
31206
31207
31208   if test $ac_cv_header_sys_socket_h != yes; then
31209                     for ac_header in winsock2.h
31210 do :
31211   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
31212 if test "x$ac_cv_header_winsock2_h" = xyes; then :
31213   cat >>confdefs.h <<_ACEOF
31214 #define HAVE_WINSOCK2_H 1
31215 _ACEOF
31216
31217 fi
31218
31219 done
31220
31221   fi
31222   if test "$ac_cv_header_winsock2_h" = yes; then
31223     HAVE_WINSOCK2_H=1
31224     UNISTD_H_HAVE_WINSOCK2_H=1
31225     SYS_IOCTL_H_HAVE_WINSOCK2_H=1
31226   else
31227     HAVE_WINSOCK2_H=0
31228   fi
31229
31230
31231   fi
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241   if test $ac_cv_have_decl_strndup = no; then
31242     HAVE_DECL_STRNDUP=0
31243   fi
31244
31245   if test $ac_cv_func_strndup = yes; then
31246     HAVE_STRNDUP=1
31247     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
31248     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
31249 $as_echo_n "checking for working strndup... " >&6; }
31250 if ${gl_cv_func_strndup_works+:} false; then :
31251   $as_echo_n "(cached) " >&6
31252 else
31253   if test "$cross_compiling" = yes; then :
31254
31255           case $host_os in
31256             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
31257             *)               gl_cv_func_strndup_works="guessing yes";;
31258           esac
31259
31260 else
31261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31262 /* end confdefs.h.  */
31263
31264          #include <string.h>
31265                            #include <stdlib.h>
31266 int
31267 main ()
31268 {
31269
31270 #if !HAVE_DECL_STRNDUP
31271   extern
31272   #ifdef __cplusplus
31273   "C"
31274   #endif
31275   char *strndup (const char *, size_t);
31276 #endif
31277   char *s;
31278   s = strndup ("some longer string", 15);
31279   free (s);
31280   s = strndup ("shorter string", 13);
31281   return s[13] != '\0';
31282   ;
31283   return 0;
31284 }
31285 _ACEOF
31286 if ac_fn_c_try_run "$LINENO"; then :
31287   gl_cv_func_strndup_works=yes
31288 else
31289   gl_cv_func_strndup_works=no
31290 fi
31291 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31292   conftest.$ac_objext conftest.beam conftest.$ac_ext
31293 fi
31294
31295 fi
31296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
31297 $as_echo "$gl_cv_func_strndup_works" >&6; }
31298     case $gl_cv_func_strndup_works in
31299       *no) REPLACE_STRNDUP=1 ;;
31300     esac
31301   else
31302     HAVE_STRNDUP=0
31303   fi
31304
31305   if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
31306
31307
31308
31309
31310
31311
31312
31313
31314   M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
31315
31316   fi
31317
31318
31319
31320
31321
31322           GNULIB_STRNDUP=1
31323
31324
31325
31326
31327
31328 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338   if test $ac_cv_have_decl_strnlen = no; then
31339     HAVE_DECL_STRNLEN=0
31340   else
31341
31342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
31343 $as_echo_n "checking for working strnlen... " >&6; }
31344 if ${ac_cv_func_strnlen_working+:} false; then :
31345   $as_echo_n "(cached) " >&6
31346 else
31347   if test "$cross_compiling" = yes; then :
31348   # Guess no on AIX systems, yes otherwise.
31349                 case "$host_os" in
31350                   aix*) ac_cv_func_strnlen_working=no;;
31351                   *)    ac_cv_func_strnlen_working=yes;;
31352                 esac
31353 else
31354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31355 /* end confdefs.h.  */
31356 $ac_includes_default
31357 int
31358 main ()
31359 {
31360
31361 #define S "foobar"
31362 #define S_LEN (sizeof S - 1)
31363
31364   /* At least one implementation is buggy: that of AIX 4.3 would
31365      give strnlen (S, 1) == 3.  */
31366
31367   int i;
31368   for (i = 0; i < S_LEN + 1; ++i)
31369     {
31370       int expected = i <= S_LEN ? i : S_LEN;
31371       if (strnlen (S, i) != expected)
31372         return 1;
31373     }
31374   return 0;
31375
31376   ;
31377   return 0;
31378 }
31379 _ACEOF
31380 if ac_fn_c_try_run "$LINENO"; then :
31381   ac_cv_func_strnlen_working=yes
31382 else
31383   ac_cv_func_strnlen_working=no
31384 fi
31385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31386   conftest.$ac_objext conftest.beam conftest.$ac_ext
31387 fi
31388
31389 fi
31390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
31391 $as_echo "$ac_cv_func_strnlen_working" >&6; }
31392 test $ac_cv_func_strnlen_working = no && :
31393
31394
31395     if test $ac_cv_func_strnlen_working = no; then
31396       REPLACE_STRNLEN=1
31397     fi
31398   fi
31399
31400   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
31401
31402
31403
31404
31405
31406
31407
31408
31409   M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
31410
31411     :
31412   fi
31413
31414
31415
31416
31417
31418           GNULIB_STRNLEN=1
31419
31420
31421
31422
31423
31424 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434   if test $ac_cv_have_decl_strsignal = no; then
31435     HAVE_DECL_STRSIGNAL=0
31436   fi
31437
31438   for ac_func in strsignal
31439 do :
31440   ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
31441 if test "x$ac_cv_func_strsignal" = xyes; then :
31442   cat >>confdefs.h <<_ACEOF
31443 #define HAVE_STRSIGNAL 1
31444 _ACEOF
31445
31446 fi
31447 done
31448
31449   if test $ac_cv_func_strsignal = yes; then
31450     HAVE_STRSIGNAL=1
31451             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
31452 $as_echo_n "checking whether strsignal always returns a string... " >&6; }
31453 if ${gl_cv_func_working_strsignal+:} false; then :
31454   $as_echo_n "(cached) " >&6
31455 else
31456   if test "$cross_compiling" = yes; then :
31457   case "$host_os" in
31458             solaris* | aix*) gl_cv_func_working_strsignal=no;;
31459             *)               gl_cv_func_working_strsignal="guessing yes";;
31460           esac
31461 else
31462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31463 /* end confdefs.h.  */
31464 #include <string.h>
31465 #include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
31466
31467 int
31468 main ()
31469 {
31470 int result = 0;
31471               char *s = strsignal (-1);
31472               if (s == (char *) 0)
31473                 result |= 1;
31474               if (s == (char *) -1)
31475                 result |= 2;
31476               return result;
31477
31478   ;
31479   return 0;
31480 }
31481 _ACEOF
31482 if ac_fn_c_try_run "$LINENO"; then :
31483   gl_cv_func_working_strsignal=yes
31484 else
31485   gl_cv_func_working_strsignal=no
31486 fi
31487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31488   conftest.$ac_objext conftest.beam conftest.$ac_ext
31489 fi
31490
31491 fi
31492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
31493 $as_echo "$gl_cv_func_working_strsignal" >&6; }
31494     if test "$gl_cv_func_working_strsignal" = no; then
31495       REPLACE_STRSIGNAL=1
31496     fi
31497   else
31498     HAVE_STRSIGNAL=0
31499   fi
31500
31501   if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
31502
31503
31504
31505
31506
31507
31508
31509
31510   M4_LIBOBJS="$M4_LIBOBJS strsignal.$ac_objext"
31511
31512
31513
31514
31515   ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
31516 "
31517 if test "x$ac_cv_have_decl__sys_siglist" = xyes; then :
31518   ac_have_decl=1
31519 else
31520   ac_have_decl=0
31521 fi
31522
31523 cat >>confdefs.h <<_ACEOF
31524 #define HAVE_DECL__SYS_SIGLIST $ac_have_decl
31525 _ACEOF
31526
31527
31528   fi
31529
31530
31531
31532
31533
31534           GNULIB_STRSIGNAL=1
31535
31536
31537
31538
31539
31540 $as_echo "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
31541
31542
31543
31544
31545
31546   if test $REPLACE_STRSTR = 0; then
31547     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
31548 $as_echo_n "checking whether strstr works in linear time... " >&6; }
31549 if ${gl_cv_func_strstr_linear+:} false; then :
31550   $as_echo_n "(cached) " >&6
31551 else
31552   if test "$cross_compiling" = yes; then :
31553                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31554 /* end confdefs.h.  */
31555
31556 #include <features.h>
31557 #ifdef __GNU_LIBRARY__
31558  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
31559      && !(defined __i386__ || defined __x86_64__) \
31560      && !defined __UCLIBC__
31561   Lucky user
31562  #endif
31563 #endif
31564 #ifdef __CYGWIN__
31565  #include <cygwin/version.h>
31566  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
31567   Lucky user
31568  #endif
31569 #endif
31570
31571 _ACEOF
31572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31573   $EGREP "Lucky user" >/dev/null 2>&1; then :
31574   gl_cv_func_strstr_linear="guessing yes"
31575 else
31576   gl_cv_func_strstr_linear="guessing no"
31577 fi
31578 rm -f conftest*
31579
31580
31581 else
31582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31583 /* end confdefs.h.  */
31584
31585 #include <signal.h> /* for signal */
31586 #include <string.h> /* for strstr */
31587 #include <stdlib.h> /* for malloc */
31588 #include <unistd.h> /* for alarm */
31589 static void quit (int sig) { exit (sig + 128); }
31590
31591 int
31592 main ()
31593 {
31594
31595     int result = 0;
31596     size_t m = 1000000;
31597     char *haystack = (char *) malloc (2 * m + 2);
31598     char *needle = (char *) malloc (m + 2);
31599     /* Failure to compile this test due to missing alarm is okay,
31600        since all such platforms (mingw) also have quadratic strstr.  */
31601     signal (SIGALRM, quit);
31602     alarm (5);
31603     /* Check for quadratic performance.  */
31604     if (haystack && needle)
31605       {
31606         memset (haystack, 'A', 2 * m);
31607         haystack[2 * m] = 'B';
31608         haystack[2 * m + 1] = 0;
31609         memset (needle, 'A', m);
31610         needle[m] = 'B';
31611         needle[m + 1] = 0;
31612         if (!strstr (haystack, needle))
31613           result |= 1;
31614       }
31615     return result;
31616
31617   ;
31618   return 0;
31619 }
31620 _ACEOF
31621 if ac_fn_c_try_run "$LINENO"; then :
31622   gl_cv_func_strstr_linear=yes
31623 else
31624   gl_cv_func_strstr_linear=no
31625 fi
31626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31627   conftest.$ac_objext conftest.beam conftest.$ac_ext
31628 fi
31629
31630
31631 fi
31632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
31633 $as_echo "$gl_cv_func_strstr_linear" >&6; }
31634     case "$gl_cv_func_strstr_linear" in
31635       *yes) ;;
31636       *)
31637         REPLACE_STRSTR=1
31638         ;;
31639     esac
31640   fi
31641
31642   if test $REPLACE_STRSTR = 1; then
31643
31644
31645
31646
31647
31648
31649
31650
31651   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
31652
31653   fi
31654
31655
31656
31657   if test "$gl_cv_func_memchr_works" != yes; then
31658     REPLACE_STRSTR=1
31659   else
31660         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
31661 $as_echo_n "checking whether strstr works... " >&6; }
31662 if ${gl_cv_func_strstr_works_always+:} false; then :
31663   $as_echo_n "(cached) " >&6
31664 else
31665   if test "$cross_compiling" = yes; then :
31666                                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31667 /* end confdefs.h.  */
31668
31669 #ifdef __GNU_LIBRARY__
31670  #include <features.h>
31671  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
31672      || defined __UCLIBC__
31673   Lucky user
31674  #endif
31675 #elif defined __CYGWIN__
31676  #include <cygwin/version.h>
31677  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
31678   Lucky user
31679  #endif
31680 #else
31681   Lucky user
31682 #endif
31683
31684 _ACEOF
31685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31686   $EGREP "Lucky user" >/dev/null 2>&1; then :
31687   gl_cv_func_strstr_works_always="guessing yes"
31688 else
31689   gl_cv_func_strstr_works_always="guessing no"
31690 fi
31691 rm -f conftest*
31692
31693
31694 else
31695   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31696 /* end confdefs.h.  */
31697
31698 #include <string.h> /* for strstr */
31699 #define P "_EF_BF_BD"
31700 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
31701 #define NEEDLE P P P P P
31702
31703 int
31704 main ()
31705 {
31706 return !!strstr (HAYSTACK, NEEDLE);
31707
31708   ;
31709   return 0;
31710 }
31711 _ACEOF
31712 if ac_fn_c_try_run "$LINENO"; then :
31713   gl_cv_func_strstr_works_always=yes
31714 else
31715   gl_cv_func_strstr_works_always=no
31716 fi
31717 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31718   conftest.$ac_objext conftest.beam conftest.$ac_ext
31719 fi
31720
31721
31722 fi
31723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
31724 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
31725     case "$gl_cv_func_strstr_works_always" in
31726       *yes) ;;
31727       *)
31728         REPLACE_STRSTR=1
31729         ;;
31730     esac
31731   fi
31732
31733   if test $REPLACE_STRSTR = 1; then
31734
31735
31736
31737
31738
31739
31740
31741
31742   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
31743
31744   fi
31745
31746
31747
31748
31749
31750           GNULIB_STRSTR=1
31751
31752
31753
31754
31755
31756 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
31757
31758
31759
31760
31761
31762
31763   if test $HAVE_STRTOD = 1; then
31764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
31765 $as_echo_n "checking whether strtod obeys C99... " >&6; }
31766 if ${gl_cv_func_strtod_works+:} false; then :
31767   $as_echo_n "(cached) " >&6
31768 else
31769   if test "$cross_compiling" = yes; then :
31770                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31771 /* end confdefs.h.  */
31772
31773 #include <features.h>
31774 #ifdef __GNU_LIBRARY__
31775  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
31776      && !defined __UCLIBC__
31777   Lucky user
31778  #endif
31779 #endif
31780
31781 _ACEOF
31782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31783   $EGREP "Lucky user" >/dev/null 2>&1; then :
31784   gl_cv_func_strtod_works="guessing yes"
31785 else
31786   gl_cv_func_strtod_works="guessing no"
31787 fi
31788 rm -f conftest*
31789
31790 else
31791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31792 /* end confdefs.h.  */
31793
31794 #include <stdlib.h>
31795 #include <math.h>
31796 #include <errno.h>
31797 /* Compare two numbers with ==.
31798    This is a separate function because IRIX 6.5 "cc -O" miscompiles an
31799    'x == x' test.  */
31800 static int
31801 numeric_equal (double x, double y)
31802 {
31803   return x == y;
31804 }
31805
31806 int
31807 main ()
31808 {
31809
31810   int result = 0;
31811   {
31812     /* In some old versions of Linux (2000 or before), strtod mis-parses
31813        strings with leading '+'.  */
31814     const char *string = " +69";
31815     char *term;
31816     double value = strtod (string, &term);
31817     if (value != 69 || term != (string + 4))
31818       result |= 1;
31819   }
31820   {
31821     /* Under Solaris 2.4, strtod returns the wrong value for the
31822        terminating character under some conditions.  */
31823     const char *string = "NaN";
31824     char *term;
31825     strtod (string, &term);
31826     if (term != string && *(term - 1) == 0)
31827       result |= 2;
31828   }
31829   {
31830     /* Older glibc and Cygwin mis-parse "-0x".  */
31831     const char *string = "-0x";
31832     char *term;
31833     double value = strtod (string, &term);
31834     double zero = 0.0;
31835     if (1.0 / value != -1.0 / zero || term != (string + 2))
31836       result |= 4;
31837   }
31838   {
31839     /* Many platforms do not parse hex floats.  */
31840     const char *string = "0XaP+1";
31841     char *term;
31842     double value = strtod (string, &term);
31843     if (value != 20.0 || term != (string + 6))
31844       result |= 8;
31845   }
31846   {
31847     /* Many platforms do not parse infinities.  HP-UX 11.31 parses inf,
31848        but mistakenly sets errno.  */
31849     const char *string = "inf";
31850     char *term;
31851     double value;
31852     errno = 0;
31853     value = strtod (string, &term);
31854     if (value != HUGE_VAL || term != (string + 3) || errno)
31855       result |= 16;
31856   }
31857   {
31858     /* glibc 2.7 and cygwin 1.5.24 misparse "nan()".  */
31859     const char *string = "nan()";
31860     char *term;
31861     double value = strtod (string, &term);
31862     if (numeric_equal (value, value) || term != (string + 5))
31863       result |= 32;
31864   }
31865   {
31866     /* darwin 10.6.1 misparses "nan(".  */
31867     const char *string = "nan(";
31868     char *term;
31869     double value = strtod (string, &term);
31870     if (numeric_equal (value, value) || term != (string + 3))
31871       result |= 64;
31872   }
31873   return result;
31874
31875   ;
31876   return 0;
31877 }
31878 _ACEOF
31879 if ac_fn_c_try_run "$LINENO"; then :
31880   gl_cv_func_strtod_works=yes
31881 else
31882   gl_cv_func_strtod_works=no
31883 fi
31884 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31885   conftest.$ac_objext conftest.beam conftest.$ac_ext
31886 fi
31887
31888 fi
31889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
31890 $as_echo "$gl_cv_func_strtod_works" >&6; }
31891     case "$gl_cv_func_strtod_works" in
31892       *yes) ;;
31893       *)
31894         REPLACE_STRTOD=1
31895         ;;
31896     esac
31897   fi
31898
31899   if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
31900
31901
31902
31903
31904
31905
31906
31907
31908   M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
31909
31910
31911
31912   if test $gl_cv_func_ldexp_no_libm = yes; then
31913
31914 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
31915
31916   fi
31917
31918   fi
31919
31920
31921
31922
31923
31924           GNULIB_STRTOD=1
31925
31926
31927
31928
31929
31930 $as_echo "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948      if test $gl_cv_have_include_next = yes; then
31949        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31950      else
31951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
31952 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
31953 if ${gl_cv_next_sys_stat_h+:} false; then :
31954   $as_echo_n "(cached) " >&6
31955 else
31956
31957              if test $ac_cv_header_sys_stat_h = yes; then
31958
31959
31960                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31961 /* end confdefs.h.  */
31962 #include <sys/stat.h>
31963
31964 _ACEOF
31965                                                                                                                         case "$host_os" in
31966                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
31967                  *)    gl_absname_cpp="$ac_cpp" ;;
31968                esac
31969
31970                case "$host_os" in
31971                  mingw*)
31972                                                                                                                                      gl_dirsep_regex='[/\\]'
31973                    ;;
31974                  *)
31975                    gl_dirsep_regex='\/'
31976                    ;;
31977                esac
31978                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31979
31980                gl_header_literal_regex=`echo 'sys/stat.h' \
31981                                         | sed -e "$gl_make_literal_regex_sed"`
31982                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31983                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31984                    s|^/[^/]|//&|
31985                    p
31986                    q
31987                  }'
31988                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31989                       sed -n "$gl_absolute_header_sed"`'"'
31990           else
31991                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31992              fi
31993
31994
31995 fi
31996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
31997 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
31998      fi
31999      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
32000
32001      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32002        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32003        gl_next_as_first_directive='<'sys/stat.h'>'
32004      else
32005        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32006        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
32007      fi
32008      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020   if test $WINDOWS_64_BIT_ST_SIZE = 1; then
32021
32022 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
32023
32024   fi
32025
32026       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
32027      #include <sys/stat.h>
32028 "
32029 if test "x$ac_cv_type_nlink_t" = xyes; then :
32030
32031 else
32032
32033 $as_echo "#define nlink_t int" >>confdefs.h
32034
32035 fi
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059      if test $gl_cv_have_include_next = yes; then
32060        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
32061      else
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
32063 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
32064 if ${gl_cv_next_sys_wait_h+:} false; then :
32065   $as_echo_n "(cached) " >&6
32066 else
32067
32068              if test $ac_cv_header_sys_wait_h = yes; then
32069
32070
32071                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32072 /* end confdefs.h.  */
32073 #include <sys/wait.h>
32074
32075 _ACEOF
32076                                                                                                                         case "$host_os" in
32077                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
32078                  *)    gl_absname_cpp="$ac_cpp" ;;
32079                esac
32080
32081                case "$host_os" in
32082                  mingw*)
32083                                                                                                                                      gl_dirsep_regex='[/\\]'
32084                    ;;
32085                  *)
32086                    gl_dirsep_regex='\/'
32087                    ;;
32088                esac
32089                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32090
32091                gl_header_literal_regex=`echo 'sys/wait.h' \
32092                                         | sed -e "$gl_make_literal_regex_sed"`
32093                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32094                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32095                    s|^/[^/]|//&|
32096                    p
32097                    q
32098                  }'
32099                                                             gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32100                       sed -n "$gl_absolute_header_sed"`'"'
32101           else
32102                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
32103              fi
32104
32105
32106 fi
32107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
32108 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
32109      fi
32110      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
32111
32112      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32113        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32114        gl_next_as_first_directive='<'sys/wait.h'>'
32115      else
32116        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32117        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
32118      fi
32119      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132   :
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145   :
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158      if test $gl_cv_have_include_next = yes; then
32159        gl_cv_next_unistd_h='<'unistd.h'>'
32160      else
32161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
32162 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
32163 if ${gl_cv_next_unistd_h+:} false; then :
32164   $as_echo_n "(cached) " >&6
32165 else
32166
32167              if test $ac_cv_header_unistd_h = yes; then
32168
32169
32170                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32171 /* end confdefs.h.  */
32172 #include <unistd.h>
32173
32174 _ACEOF
32175                                                                                                                         case "$host_os" in
32176                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
32177                  *)    gl_absname_cpp="$ac_cpp" ;;
32178                esac
32179
32180                case "$host_os" in
32181                  mingw*)
32182                                                                                                                                      gl_dirsep_regex='[/\\]'
32183                    ;;
32184                  *)
32185                    gl_dirsep_regex='\/'
32186                    ;;
32187                esac
32188                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32189
32190                gl_header_literal_regex=`echo 'unistd.h' \
32191                                         | sed -e "$gl_make_literal_regex_sed"`
32192                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32193                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32194                    s|^/[^/]|//&|
32195                    p
32196                    q
32197                  }'
32198                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32199                       sed -n "$gl_absolute_header_sed"`'"'
32200           else
32201                gl_cv_next_unistd_h='<'unistd.h'>'
32202              fi
32203
32204
32205 fi
32206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
32207 $as_echo "$gl_cv_next_unistd_h" >&6; }
32208      fi
32209      NEXT_UNISTD_H=$gl_cv_next_unistd_h
32210
32211      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32212        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32213        gl_next_as_first_directive='<'unistd.h'>'
32214      else
32215        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32216        gl_next_as_first_directive=$gl_cv_next_unistd_h
32217      fi
32218      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
32219
32220
32221
32222
32223   if test $ac_cv_header_unistd_h = yes; then
32224     HAVE_UNISTD_H=1
32225   else
32226     HAVE_UNISTD_H=0
32227   fi
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262   if test $ac_cv_func_vasnprintf = no; then
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273   M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283   M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293   M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303   M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
32304
32305   if test $ac_cv_func_vasnprintf = yes; then
32306
32307 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32308
32309   fi
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32322 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32323
32324 else
32325
32326 $as_echo "#define ptrdiff_t long" >>confdefs.h
32327
32328
32329 fi
32330
32331
32332
32333
32334
32335
32336
32337   fi
32338
32339
32340   for ac_func in vasprintf
32341 do :
32342   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32343 if test "x$ac_cv_func_vasprintf" = xyes; then :
32344   cat >>confdefs.h <<_ACEOF
32345 #define HAVE_VASPRINTF 1
32346 _ACEOF
32347
32348 fi
32349 done
32350
32351   if test $ac_cv_func_vasprintf = no; then
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361   M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371   M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
32372
32373
32374   if test $ac_cv_func_vasprintf = yes; then
32375     REPLACE_VASPRINTF=1
32376   else
32377     HAVE_VASPRINTF=0
32378   fi
32379
32380
32381
32382
32383
32384
32385
32386
32387   fi
32388
32389
32390
32391
32392
32393
32394           GNULIB_VASPRINTF=1
32395
32396
32397
32398
32399
32400 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420   gl_cv_func_vasprintf_posix=no
32421   for ac_func in vasprintf
32422 do :
32423   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32424 if test "x$ac_cv_func_vasprintf" = xyes; then :
32425   cat >>confdefs.h <<_ACEOF
32426 #define HAVE_VASPRINTF 1
32427 _ACEOF
32428
32429 fi
32430 done
32431
32432   case "$gl_cv_func_printf_sizes_c99" in
32433     *yes)
32434       case "$gl_cv_func_printf_long_double" in
32435         *yes)
32436           case "$gl_cv_func_printf_infinite" in
32437             *yes)
32438               case "$gl_cv_func_printf_infinite_long_double" in
32439                 *yes)
32440                   case "$gl_cv_func_printf_directive_a" in
32441                     *yes)
32442                       case "$gl_cv_func_printf_directive_f" in
32443                         *yes)
32444                           case "$gl_cv_func_printf_directive_n" in
32445                             *yes)
32446                               case "$gl_cv_func_printf_directive_ls" in
32447                                 *yes)
32448                                   case "$gl_cv_func_printf_positions" in
32449                                     *yes)
32450                                       case "$gl_cv_func_printf_flag_grouping" in
32451                                         *yes)
32452                                           case "$gl_cv_func_printf_flag_leftadjust" in
32453                                             *yes)
32454                                               case "$gl_cv_func_printf_flag_zero" in
32455                                                 *yes)
32456                                                   case "$gl_cv_func_printf_precision" in
32457                                                     *yes)
32458                                                       case "$gl_cv_func_printf_enomem" in
32459                                                         *yes)
32460                                                           if test $ac_cv_func_vasprintf = yes; then
32461                                                             # vasprintf exists and is
32462                                                             # already POSIX compliant.
32463                                                             gl_cv_func_vasprintf_posix=yes
32464                                                           fi
32465                                                           ;;
32466                                                       esac
32467                                                       ;;
32468                                                   esac
32469                                                   ;;
32470                                               esac
32471                                               ;;
32472                                           esac
32473                                           ;;
32474                                       esac
32475                                       ;;
32476                                   esac
32477                                   ;;
32478                               esac
32479                               ;;
32480                           esac
32481                           ;;
32482                       esac
32483                       ;;
32484                   esac
32485                   ;;
32486               esac
32487               ;;
32488           esac
32489           ;;
32490       esac
32491       ;;
32492   esac
32493   if test $gl_cv_func_vasprintf_posix = no; then
32494
32495
32496
32497   case "$gl_cv_func_printf_infinite" in
32498     *yes)
32499       ;;
32500     *)
32501
32502 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
32503
32504       ;;
32505   esac
32506
32507
32508
32509
32510   case "$gl_cv_func_printf_long_double" in
32511     *yes)
32512       case "$gl_cv_func_printf_infinite_long_double" in
32513         *yes)
32514           ;;
32515         *)
32516
32517 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
32518
32519           ;;
32520       esac
32521       ;;
32522   esac
32523
32524
32525
32526   case "$gl_cv_func_printf_directive_a" in
32527     *yes)
32528       ;;
32529     *)
32530
32531 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
32532
32533       for ac_func in nl_langinfo
32534 do :
32535   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
32536 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
32537   cat >>confdefs.h <<_ACEOF
32538 #define HAVE_NL_LANGINFO 1
32539 _ACEOF
32540
32541 fi
32542 done
32543
32544       ;;
32545   esac
32546
32547
32548
32549   case "$gl_cv_func_printf_directive_f" in
32550     *yes)
32551       ;;
32552     *)
32553
32554 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
32555
32556       ;;
32557   esac
32558
32559
32560
32561   case "$gl_cv_func_printf_directive_ls" in
32562     *yes)
32563       ;;
32564     *)
32565
32566 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
32567
32568       ;;
32569   esac
32570
32571
32572
32573   case "$gl_cv_func_printf_flag_grouping" in
32574     *yes)
32575       ;;
32576     *)
32577
32578 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
32579
32580       ;;
32581   esac
32582
32583
32584
32585   case "$gl_cv_func_printf_flag_leftadjust" in
32586     *yes)
32587       ;;
32588     *)
32589
32590 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
32591
32592       ;;
32593   esac
32594
32595
32596
32597   case "$gl_cv_func_printf_flag_zero" in
32598     *yes)
32599       ;;
32600     *)
32601
32602 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
32603
32604       ;;
32605   esac
32606
32607
32608
32609   case "$gl_cv_func_printf_precision" in
32610     *yes)
32611       ;;
32612     *)
32613
32614 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
32615
32616
32617 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
32618
32619
32620 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
32621
32622       ;;
32623   esac
32624
32625
32626
32627   case "$gl_cv_func_printf_enomem" in
32628     *yes)
32629       ;;
32630     *)
32631
32632 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
32633
32634
32635 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
32636
32637
32638 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
32639
32640       ;;
32641   esac
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653   M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663   M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673   M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683   M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
32684
32685   if test $ac_cv_func_vasnprintf = yes; then
32686
32687 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32688
32689   fi
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32702 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32703
32704 else
32705
32706 $as_echo "#define ptrdiff_t long" >>confdefs.h
32707
32708
32709 fi
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726   M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736   M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
32737
32738
32739   if test $ac_cv_func_vasprintf = yes; then
32740     REPLACE_VASPRINTF=1
32741   else
32742     HAVE_VASPRINTF=0
32743   fi
32744
32745
32746
32747
32748
32749
32750
32751
32752   fi
32753
32754
32755
32756 # Check whether --with-packager was given.
32757 if test "${with_packager+set}" = set; then :
32758   withval=$with_packager;       case $withval in
32759         yes|no) ;;
32760         *)
32761 cat >>confdefs.h <<_ACEOF
32762 #define PACKAGE_PACKAGER "$withval"
32763 _ACEOF
32764  ;;
32765       esac
32766
32767 fi
32768
32769
32770
32771 # Check whether --with-packager-version was given.
32772 if test "${with_packager_version+set}" = set; then :
32773   withval=$with_packager_version;       case $withval in
32774         yes|no) ;;
32775         *)
32776 cat >>confdefs.h <<_ACEOF
32777 #define PACKAGE_PACKAGER_VERSION "$withval"
32778 _ACEOF
32779  ;;
32780       esac
32781
32782 fi
32783
32784
32785
32786 # Check whether --with-packager-bug-reports was given.
32787 if test "${with_packager_bug_reports+set}" = set; then :
32788   withval=$with_packager_bug_reports;       case $withval in
32789         yes|no) ;;
32790         *)
32791 cat >>confdefs.h <<_ACEOF
32792 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
32793 _ACEOF
32794  ;;
32795       esac
32796
32797 fi
32798
32799
32800   if test "X$with_packager" = "X" && \
32801      test "X$with_packager_version$with_packager_bug_reports" != "X"
32802   then
32803     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
32804   fi
32805
32806
32807
32808   for ac_func in waitid
32809 do :
32810   ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
32811 if test "x$ac_cv_func_waitid" = xyes; then :
32812   cat >>confdefs.h <<_ACEOF
32813 #define HAVE_WAITID 1
32814 _ACEOF
32815
32816 fi
32817 done
32818
32819
32820
32821
32822   HAVE_WAITPID=1
32823   case $host_os in
32824     mingw*) HAVE_WAITPID=0 ;;
32825   esac
32826
32827   if test $HAVE_WAITPID = 0; then
32828
32829
32830
32831
32832
32833
32834
32835
32836   M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
32837
32838   fi
32839
32840
32841
32842
32843
32844           GNULIB_WAITPID=1
32845
32846
32847
32848
32849
32850 $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866      if test $gl_cv_have_include_next = yes; then
32867        gl_cv_next_wchar_h='<'wchar.h'>'
32868      else
32869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
32870 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
32871 if ${gl_cv_next_wchar_h+:} false; then :
32872   $as_echo_n "(cached) " >&6
32873 else
32874
32875              if test $ac_cv_header_wchar_h = yes; then
32876
32877
32878                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32879 /* end confdefs.h.  */
32880 #include <wchar.h>
32881
32882 _ACEOF
32883                                                                                                                         case "$host_os" in
32884                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
32885                  *)    gl_absname_cpp="$ac_cpp" ;;
32886                esac
32887
32888                case "$host_os" in
32889                  mingw*)
32890                                                                                                                                      gl_dirsep_regex='[/\\]'
32891                    ;;
32892                  *)
32893                    gl_dirsep_regex='\/'
32894                    ;;
32895                esac
32896                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32897
32898                gl_header_literal_regex=`echo 'wchar.h' \
32899                                         | sed -e "$gl_make_literal_regex_sed"`
32900                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32901                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32902                    s|^/[^/]|//&|
32903                    p
32904                    q
32905                  }'
32906                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32907                       sed -n "$gl_absolute_header_sed"`'"'
32908           else
32909                gl_cv_next_wchar_h='<'wchar.h'>'
32910              fi
32911
32912
32913 fi
32914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
32915 $as_echo "$gl_cv_next_wchar_h" >&6; }
32916      fi
32917      NEXT_WCHAR_H=$gl_cv_next_wchar_h
32918
32919      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32920        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32921        gl_next_as_first_directive='<'wchar.h'>'
32922      else
32923        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32924        gl_next_as_first_directive=$gl_cv_next_wchar_h
32925      fi
32926      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
32927
32928
32929
32930
32931   if test $ac_cv_header_wchar_h = yes; then
32932     HAVE_WCHAR_H=1
32933   else
32934     HAVE_WCHAR_H=0
32935   fi
32936
32937
32938
32939
32940
32941   if test $gt_cv_c_wint_t = yes; then
32942     HAVE_WINT_T=1
32943   else
32944     HAVE_WINT_T=0
32945   fi
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
32961
32962
32963
32964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
32965 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
32966 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
32967   $as_echo_n "(cached) " >&6
32968 else
32969
32970                   case "$host_os" in
32971                      # Guess no on AIX and OSF/1.
32972         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
32973                      # Guess yes otherwise.
32974         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
32975       esac
32976       if test $LOCALE_JA != none; then
32977         if test "$cross_compiling" = yes; then :
32978   :
32979 else
32980   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32981 /* end confdefs.h.  */
32982
32983 #include <locale.h>
32984 #include <string.h>
32985 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32986    <wchar.h>.
32987    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32988    included before <wchar.h>.  */
32989 #include <stddef.h>
32990 #include <stdio.h>
32991 #include <time.h>
32992 #include <wchar.h>
32993 int main ()
32994 {
32995   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32996     {
32997       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
32998       mbstate_t state;
32999       wchar_t wc;
33000
33001       memset (&state, '\0', sizeof (mbstate_t));
33002       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33003         if (mbsinit (&state))
33004           return 1;
33005     }
33006   return 0;
33007 }
33008 _ACEOF
33009 if ac_fn_c_try_run "$LINENO"; then :
33010   gl_cv_func_mbrtowc_incomplete_state=yes
33011 else
33012   gl_cv_func_mbrtowc_incomplete_state=no
33013 fi
33014 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33015   conftest.$ac_objext conftest.beam conftest.$ac_ext
33016 fi
33017
33018       fi
33019
33020 fi
33021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
33022 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
33023
33024
33025
33026
33027      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
33028 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
33029 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
33030   $as_echo_n "(cached) " >&6
33031 else
33032
33033                   case "$host_os" in
33034                     # Guess no on Solaris 8.
33035         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
33036                     # Guess yes otherwise.
33037         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
33038       esac
33039       if test $LOCALE_ZH_CN != none; then
33040         if test "$cross_compiling" = yes; then :
33041   :
33042 else
33043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33044 /* end confdefs.h.  */
33045
33046 #include <locale.h>
33047 #include <stdlib.h>
33048 #include <string.h>
33049 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33050    <wchar.h>.
33051    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33052    included before <wchar.h>.  */
33053 #include <stddef.h>
33054 #include <stdio.h>
33055 #include <time.h>
33056 #include <wchar.h>
33057 int main ()
33058 {
33059   /* This fails on Solaris 8:
33060      mbrtowc returns 2, and sets wc to 0x00F0.
33061      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
33062   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33063     {
33064       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
33065       mbstate_t state;
33066       wchar_t wc;
33067
33068       memset (&state, '\0', sizeof (mbstate_t));
33069       if (mbrtowc (&wc, input + 3, 6, &state) != 4
33070           && mbtowc (&wc, input + 3, 6) == 4)
33071         return 1;
33072     }
33073   return 0;
33074 }
33075 _ACEOF
33076 if ac_fn_c_try_run "$LINENO"; then :
33077   gl_cv_func_mbrtowc_sanitycheck=yes
33078 else
33079   gl_cv_func_mbrtowc_sanitycheck=no
33080 fi
33081 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33082   conftest.$ac_objext conftest.beam conftest.$ac_ext
33083 fi
33084
33085       fi
33086
33087 fi
33088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
33089 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
33090
33091     REPLACE_MBSTATE_T=0
33092     case "$gl_cv_func_mbrtowc_incomplete_state" in
33093       *yes) ;;
33094       *) REPLACE_MBSTATE_T=1 ;;
33095     esac
33096     case "$gl_cv_func_mbrtowc_sanitycheck" in
33097       *yes) ;;
33098       *) REPLACE_MBSTATE_T=1 ;;
33099     esac
33100   else
33101     REPLACE_MBSTATE_T=1
33102   fi
33103
33104
33105
33106   if test $ac_cv_func_wcrtomb = no; then
33107     HAVE_WCRTOMB=0
33108     ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
33109 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33110    <wchar.h>.
33111    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33112    included before <wchar.h>.  */
33113 #include <stddef.h>
33114 #include <stdio.h>
33115 #include <time.h>
33116 #include <wchar.h>
33117
33118 "
33119 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
33120   ac_have_decl=1
33121 else
33122   ac_have_decl=0
33123 fi
33124
33125 cat >>confdefs.h <<_ACEOF
33126 #define HAVE_DECL_WCRTOMB $ac_have_decl
33127 _ACEOF
33128
33129     if test $ac_cv_have_decl_wcrtomb = yes; then
33130                         REPLACE_WCRTOMB=1
33131     fi
33132   else
33133     if test $REPLACE_MBSTATE_T = 1; then
33134       REPLACE_WCRTOMB=1
33135     else
33136
33137
33138
33139
33140
33141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
33142 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
33143 if ${gl_cv_func_wcrtomb_retval+:} false; then :
33144   $as_echo_n "(cached) " >&6
33145 else
33146
33147                               case "$host_os" in
33148                                      # Guess no on AIX 4, OSF/1 and Solaris.
33149             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
33150                                      # Guess yes otherwise.
33151             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
33152           esac
33153           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
33154             if test "$cross_compiling" = yes; then :
33155   :
33156 else
33157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33158 /* end confdefs.h.  */
33159
33160 #include <locale.h>
33161 #include <string.h>
33162 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33163    <wchar.h>.
33164    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33165    included before <wchar.h>.  */
33166 #include <stddef.h>
33167 #include <stdio.h>
33168 #include <time.h>
33169 #include <wchar.h>
33170 int main ()
33171 {
33172   int result = 0;
33173   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33174     {
33175       if (wcrtomb (NULL, 0, NULL) != 1)
33176         result |= 1;
33177     }
33178   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33179     {
33180       if (wcrtomb (NULL, 0, NULL) != 1)
33181         result |= 2;
33182     }
33183   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33184     {
33185       if (wcrtomb (NULL, 0, NULL) != 1)
33186         result |= 4;
33187     }
33188   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33189     {
33190       if (wcrtomb (NULL, 0, NULL) != 1)
33191         result |= 8;
33192     }
33193   return result;
33194 }
33195 _ACEOF
33196 if ac_fn_c_try_run "$LINENO"; then :
33197   gl_cv_func_wcrtomb_retval=yes
33198 else
33199   gl_cv_func_wcrtomb_retval=no
33200 fi
33201 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33202   conftest.$ac_objext conftest.beam conftest.$ac_ext
33203 fi
33204
33205           fi
33206
33207 fi
33208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
33209 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
33210       case "$gl_cv_func_wcrtomb_retval" in
33211         *yes) ;;
33212         *) REPLACE_WCRTOMB=1 ;;
33213       esac
33214     fi
33215   fi
33216
33217   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
33218
33219
33220
33221
33222
33223
33224
33225
33226   M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
33227
33228
33229   :
33230
33231   fi
33232
33233
33234
33235
33236
33237           GNULIB_WCRTOMB=1
33238
33239
33240
33241
33242
33243 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
33244
33245
33246
33247
33248
33249
33250
33251
33252   if test $ac_cv_func_iswcntrl = yes; then
33253     HAVE_ISWCNTRL=1
33254   else
33255     HAVE_ISWCNTRL=0
33256   fi
33257
33258
33259
33260   if test $gt_cv_c_wint_t = yes; then
33261     HAVE_WINT_T=1
33262   else
33263     HAVE_WINT_T=0
33264   fi
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276      if test $gl_cv_have_include_next = yes; then
33277        gl_cv_next_wctype_h='<'wctype.h'>'
33278      else
33279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
33280 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
33281 if ${gl_cv_next_wctype_h+:} false; then :
33282   $as_echo_n "(cached) " >&6
33283 else
33284
33285              if test $ac_cv_header_wctype_h = yes; then
33286
33287
33288                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33289 /* end confdefs.h.  */
33290 #include <wctype.h>
33291
33292 _ACEOF
33293                                                                                                                         case "$host_os" in
33294                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
33295                  *)    gl_absname_cpp="$ac_cpp" ;;
33296                esac
33297
33298                case "$host_os" in
33299                  mingw*)
33300                                                                                                                                      gl_dirsep_regex='[/\\]'
33301                    ;;
33302                  *)
33303                    gl_dirsep_regex='\/'
33304                    ;;
33305                esac
33306                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33307
33308                gl_header_literal_regex=`echo 'wctype.h' \
33309                                         | sed -e "$gl_make_literal_regex_sed"`
33310                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33311                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33312                    s|^/[^/]|//&|
33313                    p
33314                    q
33315                  }'
33316                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33317                       sed -n "$gl_absolute_header_sed"`'"'
33318           else
33319                gl_cv_next_wctype_h='<'wctype.h'>'
33320              fi
33321
33322
33323 fi
33324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
33325 $as_echo "$gl_cv_next_wctype_h" >&6; }
33326      fi
33327      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
33328
33329      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33330        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33331        gl_next_as_first_directive='<'wctype.h'>'
33332      else
33333        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33334        gl_next_as_first_directive=$gl_cv_next_wctype_h
33335      fi
33336      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
33337
33338
33339
33340
33341   if test $ac_cv_header_wctype_h = yes; then
33342     if test $ac_cv_func_iswcntrl = yes; then
33343                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
33344 $as_echo_n "checking whether iswcntrl works... " >&6; }
33345 if ${gl_cv_func_iswcntrl_works+:} false; then :
33346   $as_echo_n "(cached) " >&6
33347 else
33348
33349           if test "$cross_compiling" = yes; then :
33350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33351 /* end confdefs.h.  */
33352 #include <stdlib.h>
33353                           #if __GNU_LIBRARY__ == 1
33354                           Linux libc5 i18n is broken.
33355                           #endif
33356 int
33357 main ()
33358 {
33359
33360   ;
33361   return 0;
33362 }
33363 _ACEOF
33364 if ac_fn_c_try_compile "$LINENO"; then :
33365   gl_cv_func_iswcntrl_works="guessing yes"
33366 else
33367   gl_cv_func_iswcntrl_works="guessing no"
33368 fi
33369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33370
33371 else
33372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33373 /* end confdefs.h.  */
33374
33375                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33376                   included before <wchar.h>.
33377                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33378                   must be included before <wchar.h>.  */
33379                #include <stddef.h>
33380                #include <stdio.h>
33381                #include <time.h>
33382                #include <wchar.h>
33383                #include <wctype.h>
33384                int main () { return iswprint ('x') == 0; }
33385
33386 _ACEOF
33387 if ac_fn_c_try_run "$LINENO"; then :
33388   gl_cv_func_iswcntrl_works=yes
33389 else
33390   gl_cv_func_iswcntrl_works=no
33391 fi
33392 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33393   conftest.$ac_objext conftest.beam conftest.$ac_ext
33394 fi
33395
33396
33397 fi
33398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
33399 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
33400     fi
33401     HAVE_WCTYPE_H=1
33402   else
33403     HAVE_WCTYPE_H=0
33404   fi
33405
33406
33407   case "$gl_cv_func_iswcntrl_works" in
33408     *yes) REPLACE_ISWCNTRL=0 ;;
33409     *)    REPLACE_ISWCNTRL=1 ;;
33410   esac
33411
33412
33413   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
33414         :
33415   fi
33416
33417   if test $REPLACE_ISWCNTRL = 1; then
33418     REPLACE_TOWLOWER=1
33419   else
33420     for ac_func in towlower
33421 do :
33422   ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
33423 if test "x$ac_cv_func_towlower" = xyes; then :
33424   cat >>confdefs.h <<_ACEOF
33425 #define HAVE_TOWLOWER 1
33426 _ACEOF
33427
33428 fi
33429 done
33430
33431     if test $ac_cv_func_towlower = yes; then
33432       REPLACE_TOWLOWER=0
33433     else
33434       ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33435              included before <wchar.h>.
33436              BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33437              must be included before <wchar.h>.  */
33438           #include <stddef.h>
33439           #include <stdio.h>
33440           #include <time.h>
33441           #include <wchar.h>
33442           #if HAVE_WCTYPE_H
33443           # include <wctype.h>
33444           #endif
33445
33446 "
33447 if test "x$ac_cv_have_decl_towlower" = xyes; then :
33448   ac_have_decl=1
33449 else
33450   ac_have_decl=0
33451 fi
33452
33453 cat >>confdefs.h <<_ACEOF
33454 #define HAVE_DECL_TOWLOWER $ac_have_decl
33455 _ACEOF
33456
33457       if test $ac_cv_have_decl_towlower = yes; then
33458                                 REPLACE_TOWLOWER=1
33459       else
33460         REPLACE_TOWLOWER=0
33461       fi
33462     fi
33463   fi
33464
33465
33466   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
33467         :
33468   fi
33469
33470           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
33471 $as_echo_n "checking for wctype_t... " >&6; }
33472 if ${gl_cv_type_wctype_t+:} false; then :
33473   $as_echo_n "(cached) " >&6
33474 else
33475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33476 /* end confdefs.h.  */
33477 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33478                included before <wchar.h>.
33479                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33480                must be included before <wchar.h>.  */
33481             #include <stddef.h>
33482             #include <stdio.h>
33483             #include <time.h>
33484             #include <wchar.h>
33485             #if HAVE_WCTYPE_H
33486             # include <wctype.h>
33487             #endif
33488             wctype_t a;
33489
33490 int
33491 main ()
33492 {
33493
33494   ;
33495   return 0;
33496 }
33497 _ACEOF
33498 if ac_fn_c_try_compile "$LINENO"; then :
33499   gl_cv_type_wctype_t=yes
33500 else
33501   gl_cv_type_wctype_t=no
33502 fi
33503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33504
33505 fi
33506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
33507 $as_echo "$gl_cv_type_wctype_t" >&6; }
33508   if test $gl_cv_type_wctype_t = no; then
33509     HAVE_WCTYPE_T=0
33510   fi
33511
33512       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
33513 $as_echo_n "checking for wctrans_t... " >&6; }
33514 if ${gl_cv_type_wctrans_t+:} false; then :
33515   $as_echo_n "(cached) " >&6
33516 else
33517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33518 /* end confdefs.h.  */
33519 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33520                included before <wchar.h>.
33521                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33522                must be included before <wchar.h>.  */
33523             #include <stddef.h>
33524             #include <stdio.h>
33525             #include <time.h>
33526             #include <wchar.h>
33527             #include <wctype.h>
33528             wctrans_t a;
33529
33530 int
33531 main ()
33532 {
33533
33534   ;
33535   return 0;
33536 }
33537 _ACEOF
33538 if ac_fn_c_try_compile "$LINENO"; then :
33539   gl_cv_type_wctrans_t=yes
33540 else
33541   gl_cv_type_wctrans_t=no
33542 fi
33543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33544
33545 fi
33546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
33547 $as_echo "$gl_cv_type_wctrans_t" >&6; }
33548   if test $gl_cv_type_wctrans_t = no; then
33549     HAVE_WCTRANS_T=0
33550   fi
33551
33552
33553
33554   :
33555
33556
33557
33558   for ac_header in stdint.h
33559 do :
33560   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33561 if test "x$ac_cv_header_stdint_h" = xyes; then :
33562   cat >>confdefs.h <<_ACEOF
33563 #define HAVE_STDINT_H 1
33564 _ACEOF
33565
33566 fi
33567
33568 done
33569
33570
33571
33572
33573   :
33574
33575
33576   :
33577
33578   # End of code from modules
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588   gltests_libdeps=
33589   gltests_ltlibdeps=
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599   gl_source_base='tests'
33600   M4tests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
33601
33602   gl_module_indicator_condition=$M4tests_WITNESS
33603
33604
33605
33606
33607   if test "$CXX_CHOICE" = no; then
33608     CXX=no
33609   fi
33610   if test -z "$CXX"; then
33611     if test -n "$CCC"; then
33612       CXX="$CCC"
33613     else
33614       if test -n "$ac_tool_prefix"; then
33615   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
33616   do
33617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33620 $as_echo_n "checking for $ac_word... " >&6; }
33621 if ${ac_cv_prog_CXX+:} false; then :
33622   $as_echo_n "(cached) " >&6
33623 else
33624   if test -n "$CXX"; then
33625   ac_cv_prog_CXX="$CXX" # Let the user override the test.
33626 else
33627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33628 for as_dir in $PATH
33629 do
33630   IFS=$as_save_IFS
33631   test -z "$as_dir" && as_dir=.
33632     for ac_exec_ext in '' $ac_executable_extensions; do
33633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33634     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33636     break 2
33637   fi
33638 done
33639   done
33640 IFS=$as_save_IFS
33641
33642 fi
33643 fi
33644 CXX=$ac_cv_prog_CXX
33645 if test -n "$CXX"; then
33646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33647 $as_echo "$CXX" >&6; }
33648 else
33649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33650 $as_echo "no" >&6; }
33651 fi
33652
33653
33654     test -n "$CXX" && break
33655   done
33656 fi
33657 if test -z "$CXX"; then
33658   ac_ct_CXX=$CXX
33659   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
33660 do
33661   # Extract the first word of "$ac_prog", so it can be a program name with args.
33662 set dummy $ac_prog; ac_word=$2
33663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33664 $as_echo_n "checking for $ac_word... " >&6; }
33665 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33666   $as_echo_n "(cached) " >&6
33667 else
33668   if test -n "$ac_ct_CXX"; then
33669   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33670 else
33671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33672 for as_dir in $PATH
33673 do
33674   IFS=$as_save_IFS
33675   test -z "$as_dir" && as_dir=.
33676     for ac_exec_ext in '' $ac_executable_extensions; do
33677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33678     ac_cv_prog_ac_ct_CXX="$ac_prog"
33679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33680     break 2
33681   fi
33682 done
33683   done
33684 IFS=$as_save_IFS
33685
33686 fi
33687 fi
33688 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33689 if test -n "$ac_ct_CXX"; then
33690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33691 $as_echo "$ac_ct_CXX" >&6; }
33692 else
33693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33694 $as_echo "no" >&6; }
33695 fi
33696
33697
33698   test -n "$ac_ct_CXX" && break
33699 done
33700
33701   if test "x$ac_ct_CXX" = x; then
33702     CXX=":"
33703   else
33704     case $cross_compiling:$ac_tool_warned in
33705 yes:)
33706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33707 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33708 ac_tool_warned=yes ;;
33709 esac
33710     CXX=$ac_ct_CXX
33711   fi
33712 fi
33713
33714     fi
33715   fi
33716   if test "$CXX" != no; then
33717             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
33718 $as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
33719     ac_ext=cpp
33720 ac_cpp='$CXXCPP $CPPFLAGS'
33721 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33722 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33723 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33724
33725
33726
33727     echo 'int main () { return 0; }' > conftest.$ac_ext
33728     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33729   (eval $ac_link) 2>&5
33730   ac_status=$?
33731   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33732   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33733       gl_cv_prog_ansicxx_works=yes
33734       if (./conftest; exit) 2>/dev/null; then
33735         gl_cv_prog_ansicxx_cross=no
33736       else
33737         gl_cv_prog_ansicxx_cross=yes
33738       fi
33739     else
33740       gl_cv_prog_ansicxx_works=no
33741     fi
33742     rm -fr conftest*
33743     ac_ext=c
33744 ac_cpp='$CPP $CPPFLAGS'
33745 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33746 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33747 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33748
33749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
33750 $as_echo "$gl_cv_prog_ansicxx_works" >&6; }
33751     if test $gl_cv_prog_ansicxx_works = no; then
33752       CXX=no
33753     else
33754                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
33755 $as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
33756       ac_ext=cpp
33757 ac_cpp='$CXXCPP $CPPFLAGS'
33758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33761
33762       cat <<EOF > conftest.$ac_ext
33763 #include <iostream>
33764 namespace test { using namespace std; }
33765 std::ostream* ptr;
33766 int main () { return 0; }
33767 EOF
33768       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33769   (eval $ac_link) 2>&5
33770   ac_status=$?
33771   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33772   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33773         gl_cv_prog_ansicxx_namespaces=yes
33774       else
33775         gl_cv_prog_ansicxx_namespaces=no
33776       fi
33777       rm -fr conftest*
33778       ac_ext=c
33779 ac_cpp='$CPP $CPPFLAGS'
33780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33783
33784       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
33785 $as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
33786       if test $gl_cv_prog_ansicxx_namespaces = no; then
33787         CXX=no
33788       fi
33789     fi
33790   fi
33791
33792
33793
33794    if test "$CXX" != no; then
33795   ANSICXX_TRUE=
33796   ANSICXX_FALSE='#'
33797 else
33798   ANSICXX_TRUE='#'
33799   ANSICXX_FALSE=
33800 fi
33801
33802
33803   if test "$CXX" != no; then
33804
33805 depcc="$CXX"  am_compiler_list=
33806
33807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
33808 $as_echo_n "checking dependency style of $depcc... " >&6; }
33809 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
33810   $as_echo_n "(cached) " >&6
33811 else
33812   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
33813   # We make a subdir and do the tests there.  Otherwise we can end up
33814   # making bogus files that we don't know about and never remove.  For
33815   # instance it was reported that on HP-UX the gcc test will end up
33816   # making a dummy file named 'D' -- because '-MD' means "put the output
33817   # in D".
33818   rm -rf conftest.dir
33819   mkdir conftest.dir
33820   # Copy depcomp to subdir because otherwise we won't find it if we're
33821   # using a relative directory.
33822   cp "$am_depcomp" conftest.dir
33823   cd conftest.dir
33824   # We will build objects and dependencies in a subdirectory because
33825   # it helps to detect inapplicable dependency modes.  For instance
33826   # both Tru64's cc and ICC support -MD to output dependencies as a
33827   # side effect of compilation, but ICC will put the dependencies in
33828   # the current directory while Tru64 will put them in the object
33829   # directory.
33830   mkdir sub
33831
33832   am_cv_CXX_dependencies_compiler_type=none
33833   if test "$am_compiler_list" = ""; then
33834      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
33835   fi
33836   am__universal=false
33837   case " $depcc " in #(
33838      *\ -arch\ *\ -arch\ *) am__universal=true ;;
33839      esac
33840
33841   for depmode in $am_compiler_list; do
33842     # Setup a source with many dependencies, because some compilers
33843     # like to wrap large dependency lists on column 80 (with \), and
33844     # we should not choose a depcomp mode which is confused by this.
33845     #
33846     # We need to recreate these files for each test, as the compiler may
33847     # overwrite some of them when testing with obscure command lines.
33848     # This happens at least with the AIX C compiler.
33849     : > sub/conftest.c
33850     for i in 1 2 3 4 5 6; do
33851       echo '#include "conftst'$i'.h"' >> sub/conftest.c
33852       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
33853       # Solaris 10 /bin/sh.
33854       echo '/* dummy */' > sub/conftst$i.h
33855     done
33856     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
33857
33858     # We check with '-c' and '-o' for the sake of the "dashmstdout"
33859     # mode.  It turns out that the SunPro C++ compiler does not properly
33860     # handle '-M -o', and we need to detect this.  Also, some Intel
33861     # versions had trouble with output in subdirs.
33862     am__obj=sub/conftest.${OBJEXT-o}
33863     am__minus_obj="-o $am__obj"
33864     case $depmode in
33865     gcc)
33866       # This depmode causes a compiler race in universal mode.
33867       test "$am__universal" = false || continue
33868       ;;
33869     nosideeffect)
33870       # After this tag, mechanisms are not by side-effect, so they'll
33871       # only be used when explicitly requested.
33872       if test "x$enable_dependency_tracking" = xyes; then
33873         continue
33874       else
33875         break
33876       fi
33877       ;;
33878     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
33879       # This compiler won't grok '-c -o', but also, the minuso test has
33880       # not run yet.  These depmodes are late enough in the game, and
33881       # so weak that their functioning should not be impacted.
33882       am__obj=conftest.${OBJEXT-o}
33883       am__minus_obj=
33884       ;;
33885     none) break ;;
33886     esac
33887     if depmode=$depmode \
33888        source=sub/conftest.c object=$am__obj \
33889        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
33890        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
33891          >/dev/null 2>conftest.err &&
33892        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
33893        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
33894        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
33895        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
33896       # icc doesn't choke on unknown options, it will just issue warnings
33897       # or remarks (even with -Werror).  So we grep stderr for any message
33898       # that says an option was ignored or not supported.
33899       # When given -MP, icc 7.0 and 7.1 complain thusly:
33900       #   icc: Command line warning: ignoring option '-M'; no argument required
33901       # The diagnosis changed in icc 8.0:
33902       #   icc: Command line remark: option '-MP' not supported
33903       if (grep 'ignoring option' conftest.err ||
33904           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
33905         am_cv_CXX_dependencies_compiler_type=$depmode
33906         break
33907       fi
33908     fi
33909   done
33910
33911   cd ..
33912   rm -rf conftest.dir
33913 else
33914   am_cv_CXX_dependencies_compiler_type=none
33915 fi
33916
33917 fi
33918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
33919 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
33920 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
33921
33922  if
33923   test "x$enable_dependency_tracking" != xno \
33924   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
33925   am__fastdepCXX_TRUE=
33926   am__fastdepCXX_FALSE='#'
33927 else
33928   am__fastdepCXX_TRUE='#'
33929   am__fastdepCXX_FALSE=
33930 fi
33931
33932
33933   else
33934      if false; then
33935   am__fastdepCXX_TRUE=
33936   am__fastdepCXX_FALSE='#'
33937 else
33938   am__fastdepCXX_TRUE='#'
33939   am__fastdepCXX_FALSE=
33940 fi
33941
33942   fi
33943
33944
33945
33946
33947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
33948 $as_echo_n "checking for a traditional french locale... " >&6; }
33949 if ${gt_cv_locale_fr+:} false; then :
33950   $as_echo_n "(cached) " >&6
33951 else
33952
33953     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33954 /* end confdefs.h.  */
33955
33956 #include <locale.h>
33957 #include <time.h>
33958 #if HAVE_LANGINFO_CODESET
33959 # include <langinfo.h>
33960 #endif
33961 #include <stdlib.h>
33962 #include <string.h>
33963 struct tm t;
33964 char buf[16];
33965 int main () {
33966   /* Check whether the given locale name is recognized by the system.  */
33967 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33968   /* On native Windows, setlocale(category, "") looks at the system settings,
33969      not at the environment variables.  Also, when an encoding suffix such
33970      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33971      category of the locale to "C".  */
33972   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33973       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33974     return 1;
33975 #else
33976   if (setlocale (LC_ALL, "") == NULL) return 1;
33977 #endif
33978   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33979      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33980      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33981      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33982      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33983      some unit tests fail.
33984      On MirBSD 10, when an unsupported locale is specified, setlocale()
33985      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33986 #if HAVE_LANGINFO_CODESET
33987   {
33988     const char *cs = nl_langinfo (CODESET);
33989     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33990         || strcmp (cs, "UTF-8") == 0)
33991       return 1;
33992   }
33993 #endif
33994 #ifdef __CYGWIN__
33995   /* On Cygwin, avoid locale names without encoding suffix, because the
33996      locale_charset() function relies on the encoding suffix.  Note that
33997      LC_ALL is set on the command line.  */
33998   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33999 #endif
34000   /* Check whether in the abbreviation of the second month, the second
34001      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34002      one byte long. This excludes the UTF-8 encoding.  */
34003   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34004   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34005 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
34006   /* Check whether the decimal separator is a comma.
34007      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34008      are nl_langinfo(RADIXCHAR) are both ".".  */
34009   if (localeconv () ->decimal_point[0] != ',') return 1;
34010 #endif
34011   return 0;
34012 }
34013
34014 _ACEOF
34015     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34016   (eval $ac_link) 2>&5
34017   ac_status=$?
34018   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34019   test $ac_status = 0; } && test -s conftest$ac_exeext; then
34020       case "$host_os" in
34021         # Handle native Windows specially, because there setlocale() interprets
34022         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34023         # "fr" or "fra" as "French" or "French_France.1252",
34024         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34025         # "ja" as "Japanese" or "Japanese_Japan.932",
34026         # and similar.
34027         mingw*)
34028           # Test for the native Windows locale name.
34029           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34030             gt_cv_locale_fr=French_France.1252
34031           else
34032             # None found.
34033             gt_cv_locale_fr=none
34034           fi
34035           ;;
34036         *)
34037           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34038           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34039           # configure script would override the LC_ALL setting. Likewise for
34040           # LC_CTYPE, which is also set at the beginning of the configure script.
34041           # Test for the usual locale name.
34042           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34043             gt_cv_locale_fr=fr_FR
34044           else
34045             # Test for the locale name with explicit encoding suffix.
34046             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34047               gt_cv_locale_fr=fr_FR.ISO-8859-1
34048             else
34049               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34050               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34051                 gt_cv_locale_fr=fr_FR.ISO8859-1
34052               else
34053                 # Test for the HP-UX locale name.
34054                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34055                   gt_cv_locale_fr=fr_FR.iso88591
34056                 else
34057                   # Test for the Solaris 7 locale name.
34058                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34059                     gt_cv_locale_fr=fr
34060                   else
34061                     # None found.
34062                     gt_cv_locale_fr=none
34063                   fi
34064                 fi
34065               fi
34066             fi
34067           fi
34068           ;;
34069       esac
34070     fi
34071     rm -fr conftest*
34072
34073 fi
34074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34075 $as_echo "$gt_cv_locale_fr" >&6; }
34076   LOCALE_FR=$gt_cv_locale_fr
34077
34078
34079
34080
34081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
34082 $as_echo_n "checking for a french Unicode locale... " >&6; }
34083 if ${gt_cv_locale_fr_utf8+:} false; then :
34084   $as_echo_n "(cached) " >&6
34085 else
34086
34087     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34088 /* end confdefs.h.  */
34089
34090 #include <locale.h>
34091 #include <time.h>
34092 #if HAVE_LANGINFO_CODESET
34093 # include <langinfo.h>
34094 #endif
34095 #include <stdlib.h>
34096 #include <string.h>
34097 struct tm t;
34098 char buf[16];
34099 int main () {
34100   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
34101      imitates locale dependent behaviour by looking at the environment
34102      variables, and all locales use the UTF-8 encoding.  */
34103 #if !(defined __BEOS__ || defined __HAIKU__)
34104   /* Check whether the given locale name is recognized by the system.  */
34105 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
34106   /* On native Windows, setlocale(category, "") looks at the system settings,
34107      not at the environment variables.  Also, when an encoding suffix such
34108      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34109      category of the locale to "C".  */
34110   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34111       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34112     return 1;
34113 # else
34114   if (setlocale (LC_ALL, "") == NULL) return 1;
34115 # endif
34116   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34117      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34118      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34119      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34120      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34121      some unit tests fail.  */
34122 # if HAVE_LANGINFO_CODESET
34123   {
34124     const char *cs = nl_langinfo (CODESET);
34125     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34126       return 1;
34127   }
34128 # endif
34129 # ifdef __CYGWIN__
34130   /* On Cygwin, avoid locale names without encoding suffix, because the
34131      locale_charset() function relies on the encoding suffix.  Note that
34132      LC_ALL is set on the command line.  */
34133   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34134 # endif
34135   /* Check whether in the abbreviation of the second month, the second
34136      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
34137      two bytes long, with UTF-8 encoding.  */
34138   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34139   if (strftime (buf, sizeof (buf), "%b", &t) < 4
34140       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
34141     return 1;
34142 #endif
34143 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
34144   /* Check whether the decimal separator is a comma.
34145      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34146      are nl_langinfo(RADIXCHAR) are both ".".  */
34147   if (localeconv () ->decimal_point[0] != ',') return 1;
34148 #endif
34149   return 0;
34150 }
34151
34152 _ACEOF
34153     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34154   (eval $ac_link) 2>&5
34155   ac_status=$?
34156   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34157   test $ac_status = 0; } && test -s conftest$ac_exeext; then
34158       case "$host_os" in
34159         # Handle native Windows specially, because there setlocale() interprets
34160         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34161         # "fr" or "fra" as "French" or "French_France.1252",
34162         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34163         # "ja" as "Japanese" or "Japanese_Japan.932",
34164         # and similar.
34165         mingw*)
34166           # Test for the hypothetical native Windows locale name.
34167           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34168             gt_cv_locale_fr_utf8=French_France.65001
34169           else
34170             # None found.
34171             gt_cv_locale_fr_utf8=none
34172           fi
34173           ;;
34174         *)
34175           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34176           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34177           # configure script would override the LC_ALL setting. Likewise for
34178           # LC_CTYPE, which is also set at the beginning of the configure script.
34179           # Test for the usual locale name.
34180           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34181             gt_cv_locale_fr_utf8=fr_FR
34182           else
34183             # Test for the locale name with explicit encoding suffix.
34184             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34185               gt_cv_locale_fr_utf8=fr_FR.UTF-8
34186             else
34187               # Test for the Solaris 7 locale name.
34188               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34189                 gt_cv_locale_fr_utf8=fr.UTF-8
34190               else
34191                 # None found.
34192                 gt_cv_locale_fr_utf8=none
34193               fi
34194             fi
34195           fi
34196           ;;
34197       esac
34198     fi
34199     rm -fr conftest*
34200
34201 fi
34202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
34203 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
34204   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
34205
34206
34207
34208
34209
34210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
34211 $as_echo_n "checking for a traditional french locale... " >&6; }
34212 if ${gt_cv_locale_fr+:} false; then :
34213   $as_echo_n "(cached) " >&6
34214 else
34215
34216     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34217 /* end confdefs.h.  */
34218
34219 #include <locale.h>
34220 #include <time.h>
34221 #if HAVE_LANGINFO_CODESET
34222 # include <langinfo.h>
34223 #endif
34224 #include <stdlib.h>
34225 #include <string.h>
34226 struct tm t;
34227 char buf[16];
34228 int main () {
34229   /* Check whether the given locale name is recognized by the system.  */
34230 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
34231   /* On native Windows, setlocale(category, "") looks at the system settings,
34232      not at the environment variables.  Also, when an encoding suffix such
34233      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34234      category of the locale to "C".  */
34235   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34236       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34237     return 1;
34238 #else
34239   if (setlocale (LC_ALL, "") == NULL) return 1;
34240 #endif
34241   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34242      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34243      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34244      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34245      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34246      some unit tests fail.
34247      On MirBSD 10, when an unsupported locale is specified, setlocale()
34248      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
34249 #if HAVE_LANGINFO_CODESET
34250   {
34251     const char *cs = nl_langinfo (CODESET);
34252     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
34253         || strcmp (cs, "UTF-8") == 0)
34254       return 1;
34255   }
34256 #endif
34257 #ifdef __CYGWIN__
34258   /* On Cygwin, avoid locale names without encoding suffix, because the
34259      locale_charset() function relies on the encoding suffix.  Note that
34260      LC_ALL is set on the command line.  */
34261   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34262 #endif
34263   /* Check whether in the abbreviation of the second month, the second
34264      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34265      one byte long. This excludes the UTF-8 encoding.  */
34266   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34267   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34268 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
34269   /* Check whether the decimal separator is a comma.
34270      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34271      are nl_langinfo(RADIXCHAR) are both ".".  */
34272   if (localeconv () ->decimal_point[0] != ',') return 1;
34273 #endif
34274   return 0;
34275 }
34276
34277 _ACEOF
34278     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34279   (eval $ac_link) 2>&5
34280   ac_status=$?
34281   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34282   test $ac_status = 0; } && test -s conftest$ac_exeext; then
34283       case "$host_os" in
34284         # Handle native Windows specially, because there setlocale() interprets
34285         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34286         # "fr" or "fra" as "French" or "French_France.1252",
34287         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34288         # "ja" as "Japanese" or "Japanese_Japan.932",
34289         # and similar.
34290         mingw*)
34291           # Test for the native Windows locale name.
34292           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34293             gt_cv_locale_fr=French_France.1252
34294           else
34295             # None found.
34296             gt_cv_locale_fr=none
34297           fi
34298           ;;
34299         *)
34300           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34301           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34302           # configure script would override the LC_ALL setting. Likewise for
34303           # LC_CTYPE, which is also set at the beginning of the configure script.
34304           # Test for the usual locale name.
34305           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34306             gt_cv_locale_fr=fr_FR
34307           else
34308             # Test for the locale name with explicit encoding suffix.
34309             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34310               gt_cv_locale_fr=fr_FR.ISO-8859-1
34311             else
34312               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34313               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34314                 gt_cv_locale_fr=fr_FR.ISO8859-1
34315               else
34316                 # Test for the HP-UX locale name.
34317                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34318                   gt_cv_locale_fr=fr_FR.iso88591
34319                 else
34320                   # Test for the Solaris 7 locale name.
34321                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34322                     gt_cv_locale_fr=fr
34323                   else
34324                     # None found.
34325                     gt_cv_locale_fr=none
34326                   fi
34327                 fi
34328               fi
34329             fi
34330           fi
34331           ;;
34332       esac
34333     fi
34334     rm -fr conftest*
34335
34336 fi
34337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34338 $as_echo "$gt_cv_locale_fr" >&6; }
34339   LOCALE_FR=$gt_cv_locale_fr
34340
34341
34342
34343
34344
34345   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
34346 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
34347 if ${gt_cv_locale_tr_utf8+:} false; then :
34348   $as_echo_n "(cached) " >&6
34349 else
34350
34351     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34352 /* end confdefs.h.  */
34353
34354 #include <locale.h>
34355 #include <time.h>
34356 #if HAVE_LANGINFO_CODESET
34357 # include <langinfo.h>
34358 #endif
34359 #include <stdlib.h>
34360 #include <string.h>
34361 struct tm t;
34362 char buf[16];
34363 int main () {
34364   /* On BeOS, locales are not implemented in libc.  Rather, libintl
34365      imitates locale dependent behaviour by looking at the environment
34366      variables, and all locales use the UTF-8 encoding.  But BeOS does not
34367      implement the Turkish upper-/lowercase mappings.  Therefore, let this
34368      program return 1 on BeOS.  */
34369   /* Check whether the given locale name is recognized by the system.  */
34370 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
34371   /* On native Windows, setlocale(category, "") looks at the system settings,
34372      not at the environment variables.  Also, when an encoding suffix such
34373      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34374      category of the locale to "C".  */
34375   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34376       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34377     return 1;
34378 #else
34379   if (setlocale (LC_ALL, "") == NULL) return 1;
34380 #endif
34381   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34382      On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
34383      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34384      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34385      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34386      some unit tests fail.  */
34387 #if HAVE_LANGINFO_CODESET
34388   {
34389     const char *cs = nl_langinfo (CODESET);
34390     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34391       return 1;
34392   }
34393 #endif
34394 #ifdef __CYGWIN__
34395   /* On Cygwin, avoid locale names without encoding suffix, because the
34396      locale_charset() function relies on the encoding suffix.  Note that
34397      LC_ALL is set on the command line.  */
34398   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34399 #endif
34400   /* Check whether in the abbreviation of the eighth month, the second
34401      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
34402      two bytes long, with UTF-8 encoding.  */
34403   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
34404   if (strftime (buf, sizeof (buf), "%b", &t) < 4
34405       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
34406     return 1;
34407   /* Check whether the upper-/lowercase mappings are as expected for
34408      Turkish.  */
34409   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
34410       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
34411     return 1;
34412   return 0;
34413 }
34414
34415 _ACEOF
34416     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34417   (eval $ac_link) 2>&5
34418   ac_status=$?
34419   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34420   test $ac_status = 0; } && test -s conftest$ac_exeext; then
34421       case "$host_os" in
34422         # Handle native Windows specially, because there setlocale() interprets
34423         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34424         # "fr" or "fra" as "French" or "French_France.1252",
34425         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34426         # "ja" as "Japanese" or "Japanese_Japan.932",
34427         # and similar.
34428         mingw*)
34429           # Test for the hypothetical native Windows locale name.
34430           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34431             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
34432           else
34433             # None found.
34434             gt_cv_locale_tr_utf8=none
34435           fi
34436           ;;
34437         *)
34438           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34439           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34440           # configure script would override the LC_ALL setting. Likewise for
34441           # LC_CTYPE, which is also set at the beginning of the configure script.
34442           # Test for the usual locale name.
34443           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34444             gt_cv_locale_tr_utf8=tr_TR
34445           else
34446             # Test for the locale name with explicit encoding suffix.
34447             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34448               gt_cv_locale_tr_utf8=tr_TR.UTF-8
34449             else
34450               # Test for the Solaris 7 locale name.
34451               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34452                 gt_cv_locale_tr_utf8=tr.UTF-8
34453               else
34454                 # None found.
34455                 gt_cv_locale_tr_utf8=none
34456               fi
34457             fi
34458           fi
34459           ;;
34460       esac
34461     else
34462       gt_cv_locale_tr_utf8=none
34463     fi
34464     rm -fr conftest*
34465
34466 fi
34467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
34468 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
34469   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
34470
34471
34472
34473
34474
34475   for ac_func in closedir
34476 do :
34477   ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
34478 if test "x$ac_cv_func_closedir" = xyes; then :
34479   cat >>confdefs.h <<_ACEOF
34480 #define HAVE_CLOSEDIR 1
34481 _ACEOF
34482
34483 fi
34484 done
34485
34486   if test $ac_cv_func_closedir = no; then
34487     HAVE_CLOSEDIR=0
34488   fi
34489
34490
34491   if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
34492
34493
34494
34495
34496
34497
34498
34499
34500   M4tests_LIBOBJS="$M4tests_LIBOBJS closedir.$ac_objext"
34501
34502   fi
34503
34504
34505
34506
34507
34508     if test "$GNULIB_CLOSEDIR" != 1; then
34509         if test "$GNULIB_CLOSEDIR" = 0; then
34510       GNULIB_CLOSEDIR=$gl_module_indicator_condition
34511     else
34512       GNULIB_CLOSEDIR="($GNULIB_CLOSEDIR || $gl_module_indicator_condition)"
34513     fi
34514   fi
34515
34516
34517
34518
34519
34520 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
34536      if test $gl_cv_have_include_next = yes; then
34537        gl_cv_next_dirent_h='<'dirent.h'>'
34538      else
34539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
34540 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
34541 if ${gl_cv_next_dirent_h+:} false; then :
34542   $as_echo_n "(cached) " >&6
34543 else
34544
34545              if test $ac_cv_header_dirent_h = yes; then
34546
34547
34548                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34549 /* end confdefs.h.  */
34550 #include <dirent.h>
34551
34552 _ACEOF
34553                                                                                                                         case "$host_os" in
34554                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
34555                  *)    gl_absname_cpp="$ac_cpp" ;;
34556                esac
34557
34558                case "$host_os" in
34559                  mingw*)
34560                                                                                                                                      gl_dirsep_regex='[/\\]'
34561                    ;;
34562                  *)
34563                    gl_dirsep_regex='\/'
34564                    ;;
34565                esac
34566                                              gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34567
34568                gl_header_literal_regex=`echo 'dirent.h' \
34569                                         | sed -e "$gl_make_literal_regex_sed"`
34570                gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34571                    s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34572                    s|^/[^/]|//&|
34573                    p
34574                    q
34575                  }'
34576                                                             gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34577                       sed -n "$gl_absolute_header_sed"`'"'
34578           else
34579                gl_cv_next_dirent_h='<'dirent.h'>'
34580              fi
34581
34582
34583 fi
34584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
34585 $as_echo "$gl_cv_next_dirent_h" >&6; }
34586      fi
34587      NEXT_DIRENT_H=$gl_cv_next_dirent_h
34588
34589      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34590        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34591        gl_next_as_first_directive='<'dirent.h'>'
34592      else
34593        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34594        gl_next_as_first_directive=$gl_cv_next_dirent_h
34595      fi
34596      NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
34597
34598
34599
34600
34601   if test $ac_cv_header_dirent_h = yes; then
34602     HAVE_DIRENT_H=1
34603   else
34604     HAVE_DIRENT_H=0
34605   fi
34606
34607
34608
34609
34610
34611
34612
34613   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
34614     REPLACE_DUP=1
34615   fi
34616
34617
34618   if test $REPLACE_DUP = 1; then
34619
34620
34621
34622
34623
34624
34625
34626
34627   M4tests_LIBOBJS="$M4tests_LIBOBJS dup.$ac_objext"
34628
34629     :
34630   fi
34631
34632
34633
34634
34635
34636     if test "$GNULIB_DUP" != 1; then
34637         if test "$GNULIB_DUP" = 0; then
34638       GNULIB_DUP=$gl_module_indicator_condition
34639     else
34640       GNULIB_DUP="($GNULIB_DUP || $gl_module_indicator_condition)"
34641     fi
34642   fi
34643
34644
34645
34646
34647
34648 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
34649
34650
34651
34652
34653
34654
34655   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
34656     REPLACE_FDOPEN=1
34657   else
34658         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
34659 $as_echo_n "checking whether fdopen sets errno... " >&6; }
34660 if ${gl_cv_func_fdopen_works+:} false; then :
34661   $as_echo_n "(cached) " >&6
34662 else
34663
34664         if test "$cross_compiling" = yes; then :
34665   case "$host_os" in
34666              mingw*) gl_cv_func_fdopen_works="guessing no" ;;
34667              *)      gl_cv_func_fdopen_works="guessing yes" ;;
34668            esac
34669
34670 else
34671   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34672 /* end confdefs.h.  */
34673
34674 #include <stdio.h>
34675 #include <errno.h>
34676 int
34677 main (void)
34678 {
34679   FILE *fp;
34680   errno = 0;
34681   fp = fdopen (-1, "r");
34682   if (fp == NULL && errno == 0)
34683     return 1;
34684   return 0;
34685 }
34686 _ACEOF
34687 if ac_fn_c_try_run "$LINENO"; then :
34688   gl_cv_func_fdopen_works=yes
34689 else
34690   gl_cv_func_fdopen_works=no
34691 fi
34692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34693   conftest.$ac_objext conftest.beam conftest.$ac_ext
34694 fi
34695
34696
34697 fi
34698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
34699 $as_echo "$gl_cv_func_fdopen_works" >&6; }
34700     case "$gl_cv_func_fdopen_works" in
34701       *no) REPLACE_FDOPEN=1 ;;
34702     esac
34703   fi
34704
34705   if test $REPLACE_FDOPEN = 1; then
34706
34707
34708
34709
34710
34711
34712
34713
34714   M4tests_LIBOBJS="$M4tests_LIBOBJS fdopen.$ac_objext"
34715
34716
34717   fi
34718
34719
34720
34721
34722
34723     if test "$GNULIB_FDOPEN" != 1; then
34724         if test "$GNULIB_FDOPEN" = 0; then
34725       GNULIB_FDOPEN=$gl_module_indicator_condition
34726     else
34727       GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
34728     fi
34729   fi
34730
34731
34732
34733
34734
34735 $as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
34749   *yes,yes) ;;
34750   *)
34751         REPLACE_GETCWD=1
34752     ;;
34753   esac
34754
34755   if test $REPLACE_GETCWD = 1; then
34756
34757
34758
34759
34760
34761
34762
34763
34764   M4tests_LIBOBJS="$M4tests_LIBOBJS getcwd-lgpl.$ac_objext"
34765
34766   fi
34767
34768
34769
34770
34771
34772     if test "$GNULIB_GETCWD" != 1; then
34773         if test "$GNULIB_GETCWD" = 0; then
34774       GNULIB_GETCWD=$gl_module_indicator_condition
34775     else
34776       GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
34777     fi
34778   fi
34779
34780
34781
34782
34783
34784 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
34785
34786
34787
34788
34789
34790
34791   for ac_func in getpagesize
34792 do :
34793   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
34794 if test "x$ac_cv_func_getpagesize" = xyes; then :
34795   cat >>confdefs.h <<_ACEOF
34796 #define HAVE_GETPAGESIZE 1
34797 _ACEOF
34798
34799 fi
34800 done
34801
34802   if test $ac_cv_func_getpagesize = no; then
34803     HAVE_GETPAGESIZE=0
34804     for ac_header in OS.h
34805 do :
34806   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
34807 if test "x$ac_cv_header_OS_h" = xyes; then :
34808   cat >>confdefs.h <<_ACEOF
34809 #define HAVE_OS_H 1
34810 _ACEOF
34811
34812 fi
34813
34814 done
34815
34816     if test $ac_cv_header_OS_h = yes; then
34817       HAVE_OS_H=1
34818     fi
34819     for ac_header in sys/param.h
34820 do :
34821   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
34822 if test "x$ac_cv_header_sys_param_h" = xyes; then :
34823   cat >>confdefs.h <<_ACEOF
34824 #define HAVE_SYS_PARAM_H 1
34825 _ACEOF
34826
34827 fi
34828
34829 done
34830
34831     if test $ac_cv_header_sys_param_h = yes; then
34832       HAVE_SYS_PARAM_H=1
34833     fi
34834   fi
34835   case "$host_os" in
34836     mingw*)
34837       REPLACE_GETPAGESIZE=1
34838       ;;
34839   esac
34840       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
34841 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
34842
34843 else
34844   HAVE_DECL_GETPAGESIZE=0
34845 fi
34846
34847
34848   if test $REPLACE_GETPAGESIZE = 1; then
34849
34850
34851
34852
34853
34854
34855
34856
34857   M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
34858
34859   fi
34860
34861
34862
34863
34864
34865     if test "$GNULIB_GETPAGESIZE" != 1; then
34866         if test "$GNULIB_GETPAGESIZE" = 0; then
34867       GNULIB_GETPAGESIZE=$gl_module_indicator_condition
34868     else
34869       GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
34870     fi
34871   fi
34872
34873
34874
34875
34876
34877 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
34878
34879
34880
34881
34882
34883
34884
34885
34886   PRIPTR_PREFIX=
34887   if test -n "$STDINT_H"; then
34888         PRIPTR_PREFIX='"l"'
34889   else
34890         for glpfx in '' l ll I64; do
34891       case $glpfx in
34892         '')  gltype1='int';;
34893         l)   gltype1='long int';;
34894         ll)  gltype1='long long int';;
34895         I64) gltype1='__int64';;
34896       esac
34897       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34898 /* end confdefs.h.  */
34899 #include <stdint.h>
34900            extern intptr_t foo;
34901            extern $gltype1 foo;
34902 int
34903 main ()
34904 {
34905
34906   ;
34907   return 0;
34908 }
34909 _ACEOF
34910 if ac_fn_c_try_compile "$LINENO"; then :
34911   PRIPTR_PREFIX='"'$glpfx'"'
34912 fi
34913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34914       test -n "$PRIPTR_PREFIX" && break
34915     done
34916   fi
34917
34918
34919
34920   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
34921 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
34922 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
34923   $as_echo_n "(cached) " >&6
34924 else
34925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34926 /* end confdefs.h.  */
34927 /* Work also in C++ mode.  */
34928             #define __STDC_LIMIT_MACROS 1
34929
34930             /* Work if build is not clean.  */
34931             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
34932
34933             #include <limits.h>
34934             #if HAVE_STDINT_H
34935              #include <stdint.h>
34936             #endif
34937
34938             #if defined INT32_MAX && defined INTMAX_MAX
34939              #define CONDITION (INT32_MAX < INTMAX_MAX)
34940             #elif HAVE_LONG_LONG_INT
34941              #define CONDITION (sizeof (int) < sizeof (long long int))
34942             #else
34943              #define CONDITION 0
34944             #endif
34945             int test[CONDITION ? 1 : -1];
34946 int
34947 main ()
34948 {
34949
34950   ;
34951   return 0;
34952 }
34953 _ACEOF
34954 if ac_fn_c_try_compile "$LINENO"; then :
34955   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
34956 else
34957   gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
34958 fi
34959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34960 fi
34961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
34962 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
34963   if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
34964     INT32_MAX_LT_INTMAX_MAX=1;
34965   else
34966     INT32_MAX_LT_INTMAX_MAX=0;
34967   fi
34968
34969
34970   if test $APPLE_UNIVERSAL_BUILD = 0; then
34971
34972   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
34973 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
34974 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
34975   $as_echo_n "(cached) " >&6
34976 else
34977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34978 /* end confdefs.h.  */
34979 /* Work also in C++ mode.  */
34980             #define __STDC_LIMIT_MACROS 1
34981
34982             /* Work if build is not clean.  */
34983             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
34984
34985             #include <limits.h>
34986             #if HAVE_STDINT_H
34987              #include <stdint.h>
34988             #endif
34989
34990             #if defined INT64_MAX
34991              #define CONDITION (INT64_MAX == LONG_MAX)
34992             #elif HAVE_LONG_LONG_INT
34993              #define CONDITION (sizeof (long long int) == sizeof (long int))
34994             #else
34995              #define CONDITION 0
34996             #endif
34997             int test[CONDITION ? 1 : -1];
34998 int
34999 main ()
35000 {
35001
35002   ;
35003   return 0;
35004 }
35005 _ACEOF
35006 if ac_fn_c_try_compile "$LINENO"; then :
35007   gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
35008 else
35009   gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
35010 fi
35011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35012 fi
35013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
35014 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
35015   if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
35016     INT64_MAX_EQ_LONG_MAX=1;
35017   else
35018     INT64_MAX_EQ_LONG_MAX=0;
35019   fi
35020
35021
35022   else
35023     INT64_MAX_EQ_LONG_MAX=-1
35024   fi
35025
35026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
35027 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
35028 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
35029   $as_echo_n "(cached) " >&6
35030 else
35031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35032 /* end confdefs.h.  */
35033 /* Work also in C++ mode.  */
35034             #define __STDC_LIMIT_MACROS 1
35035
35036             /* Work if build is not clean.  */
35037             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
35038
35039             #include <limits.h>
35040             #if HAVE_STDINT_H
35041              #include <stdint.h>
35042             #endif
35043
35044             #if defined UINT32_MAX && defined UINTMAX_MAX
35045              #define CONDITION (UINT32_MAX < UINTMAX_MAX)
35046             #elif HAVE_LONG_LONG_INT
35047              #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
35048             #else
35049              #define CONDITION 0
35050             #endif
35051             int test[CONDITION ? 1 : -1];
35052 int
35053 main ()
35054 {
35055
35056   ;
35057   return 0;
35058 }
35059 _ACEOF
35060 if ac_fn_c_try_compile "$LINENO"; then :
35061   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
35062 else
35063   gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
35064 fi
35065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35066 fi
35067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
35068 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
35069   if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
35070     UINT32_MAX_LT_UINTMAX_MAX=1;
35071   else
35072     UINT32_MAX_LT_UINTMAX_MAX=0;
35073   fi
35074
35075
35076   if test $APPLE_UNIVERSAL_BUILD = 0; then
35077
35078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
35079 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
35080 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
35081   $as_echo_n "(cached) " >&6
35082 else
35083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35084 /* end confdefs.h.  */
35085 /* Work also in C++ mode.  */
35086             #define __STDC_LIMIT_MACROS 1
35087
35088             /* Work if build is not clean.  */
35089             #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
35090
35091             #include <limits.h>
35092             #if HAVE_STDINT_H
35093              #include <stdint.h>
35094             #endif
35095
35096             #if defined UINT64_MAX
35097              #define CONDITION (UINT64_MAX == ULONG_MAX)
35098             #elif HAVE_LONG_LONG_INT
35099              #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
35100             #else
35101              #define CONDITION 0
35102             #endif
35103             int test[CONDITION ? 1 : -1];
35104 int
35105 main ()
35106 {
35107
35108   ;
35109   return 0;
35110 }
35111 _ACEOF
35112 if ac_fn_c_try_compile "$LINENO"; then :
35113   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
35114 else
35115   gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
35116 fi
35117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35118 fi
35119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
35120 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
35121   if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
35122     UINT64_MAX_EQ_ULONG_MAX=1;
35123   else
35124     UINT64_MAX_EQ_ULONG_MAX=0;
35125   fi
35126
35127
35128   else
35129     UINT64_MAX_EQ_ULONG_MAX=-1
35130   fi
35131
35132
35133
35134
35135   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
35136 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
35137 if ${gl_cv_cc_double_expbit0+:} false; then :
35138   $as_echo_n "(cached) " >&6
35139 else
35140
35141       if test "$cross_compiling" = yes; then :
35142
35143                                                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35144 /* end confdefs.h.  */
35145
35146 #if defined arm || defined __arm || defined __arm__
35147   mixed_endianness
35148 #endif
35149
35150 _ACEOF
35151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35152   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
35153   gl_cv_cc_double_expbit0="unknown"
35154 else
35155
35156                                                          :
35157 if ${ac_cv_c_bigendian+:} false; then :
35158   $as_echo_n "(cached) " >&6
35159 else
35160   ac_cv_c_bigendian=unknown
35161     # See if we're dealing with a universal compiler.
35162     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35163 /* end confdefs.h.  */
35164 #ifndef __APPLE_CC__
35165                not a universal capable compiler
35166              #endif
35167              typedef int dummy;
35168
35169 _ACEOF
35170 if ac_fn_c_try_compile "$LINENO"; then :
35171
35172         # Check for potential -arch flags.  It is not universal unless
35173         # there are at least two -arch flags with different values.
35174         ac_arch=
35175         ac_prev=
35176         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
35177          if test -n "$ac_prev"; then
35178            case $ac_word in
35179              i?86 | x86_64 | ppc | ppc64)
35180                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
35181                  ac_arch=$ac_word
35182                else
35183                  ac_cv_c_bigendian=universal
35184                  break
35185                fi
35186                ;;
35187            esac
35188            ac_prev=
35189          elif test "x$ac_word" = "x-arch"; then
35190            ac_prev=arch
35191          fi
35192        done
35193 fi
35194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35195     if test $ac_cv_c_bigendian = unknown; then
35196       # See if sys/param.h defines the BYTE_ORDER macro.
35197       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35198 /* end confdefs.h.  */
35199 #include <sys/types.h>
35200              #include <sys/param.h>
35201
35202 int
35203 main ()
35204 {
35205 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
35206                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
35207                      && LITTLE_ENDIAN)
35208               bogus endian macros
35209              #endif
35210
35211   ;
35212   return 0;
35213 }
35214 _ACEOF
35215 if ac_fn_c_try_compile "$LINENO"; then :
35216   # It does; now see whether it defined to BIG_ENDIAN or not.
35217          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218 /* end confdefs.h.  */
35219 #include <sys/types.h>
35220                 #include <sys/param.h>
35221
35222 int
35223 main ()
35224 {
35225 #if BYTE_ORDER != BIG_ENDIAN
35226                  not big endian
35227                 #endif
35228
35229   ;
35230   return 0;
35231 }
35232 _ACEOF
35233 if ac_fn_c_try_compile "$LINENO"; then :
35234   ac_cv_c_bigendian=yes
35235 else
35236   ac_cv_c_bigendian=no
35237 fi
35238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35239 fi
35240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35241     fi
35242     if test $ac_cv_c_bigendian = unknown; then
35243       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
35244       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35245 /* end confdefs.h.  */
35246 #include <limits.h>
35247
35248 int
35249 main ()
35250 {
35251 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
35252               bogus endian macros
35253              #endif
35254
35255   ;
35256   return 0;
35257 }
35258 _ACEOF
35259 if ac_fn_c_try_compile "$LINENO"; then :
35260   # It does; now see whether it defined to _BIG_ENDIAN or not.
35261          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35262 /* end confdefs.h.  */
35263 #include <limits.h>
35264
35265 int
35266 main ()
35267 {
35268 #ifndef _BIG_ENDIAN
35269                  not big endian
35270                 #endif
35271
35272   ;
35273   return 0;
35274 }
35275 _ACEOF
35276 if ac_fn_c_try_compile "$LINENO"; then :
35277   ac_cv_c_bigendian=yes
35278 else
35279   ac_cv_c_bigendian=no
35280 fi
35281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35282 fi
35283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35284     fi
35285     if test $ac_cv_c_bigendian = unknown; then
35286       # Compile a test program.
35287       if test "$cross_compiling" = yes; then :
35288   # Try to guess by grepping values from an object file.
35289          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35290 /* end confdefs.h.  */
35291 short int ascii_mm[] =
35292                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
35293                 short int ascii_ii[] =
35294                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
35295                 int use_ascii (int i) {
35296                   return ascii_mm[i] + ascii_ii[i];
35297                 }
35298                 short int ebcdic_ii[] =
35299                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
35300                 short int ebcdic_mm[] =
35301                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
35302                 int use_ebcdic (int i) {
35303                   return ebcdic_mm[i] + ebcdic_ii[i];
35304                 }
35305                 extern int foo;
35306
35307 int
35308 main ()
35309 {
35310 return use_ascii (foo) == use_ebcdic (foo);
35311   ;
35312   return 0;
35313 }
35314 _ACEOF
35315 if ac_fn_c_try_compile "$LINENO"; then :
35316   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
35317               ac_cv_c_bigendian=yes
35318             fi
35319             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
35320               if test "$ac_cv_c_bigendian" = unknown; then
35321                 ac_cv_c_bigendian=no
35322               else
35323                 # finding both strings is unlikely to happen, but who knows?
35324                 ac_cv_c_bigendian=unknown
35325               fi
35326             fi
35327 fi
35328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35329 else
35330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35331 /* end confdefs.h.  */
35332 $ac_includes_default
35333 int
35334 main ()
35335 {
35336
35337              /* Are we little or big endian?  From Harbison&Steele.  */
35338              union
35339              {
35340                long int l;
35341                char c[sizeof (long int)];
35342              } u;
35343              u.l = 1;
35344              return u.c[sizeof (long int) - 1] == 1;
35345
35346   ;
35347   return 0;
35348 }
35349 _ACEOF
35350 if ac_fn_c_try_run "$LINENO"; then :
35351   ac_cv_c_bigendian=no
35352 else
35353   ac_cv_c_bigendian=yes
35354 fi
35355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35356   conftest.$ac_objext conftest.beam conftest.$ac_ext
35357 fi
35358
35359     fi
35360 fi
35361 :
35362  case $ac_cv_c_bigendian in #(
35363    yes)
35364      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
35365    no)
35366      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
35367    universal)
35368
35369 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
35370
35371      ;; #(
35372    *)
35373      gl_cv_cc_double_expbit0="unknown" ;;
35374  esac
35375
35376
35377 fi
35378 rm -f conftest*
35379
35380
35381 else
35382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35383 /* end confdefs.h.  */
35384
35385 #include <float.h>
35386 #include <stddef.h>
35387 #include <stdio.h>
35388 #include <string.h>
35389 #define NWORDS \
35390   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35391 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
35392 static unsigned int ored_words[NWORDS];
35393 static unsigned int anded_words[NWORDS];
35394 static void add_to_ored_words (double x)
35395 {
35396   memory_double m;
35397   size_t i;
35398   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
35399   memset (&m, 0, sizeof (memory_double));
35400   m.value = x;
35401   for (i = 0; i < NWORDS; i++)
35402     {
35403       ored_words[i] |= m.word[i];
35404       anded_words[i] &= m.word[i];
35405     }
35406 }
35407 int main ()
35408 {
35409   size_t j;
35410   FILE *fp = fopen ("conftest.out", "w");
35411   if (fp == NULL)
35412     return 1;
35413   for (j = 0; j < NWORDS; j++)
35414     anded_words[j] = ~ (unsigned int) 0;
35415   add_to_ored_words (0.25);
35416   add_to_ored_words (0.5);
35417   add_to_ored_words (1.0);
35418   add_to_ored_words (2.0);
35419   add_to_ored_words (4.0);
35420   /* Remove bits that are common (e.g. if representation of the first mantissa
35421      bit is explicit).  */
35422   for (j = 0; j < NWORDS; j++)
35423     ored_words[j] &= ~anded_words[j];
35424   /* Now find the nonzero word.  */
35425   for (j = 0; j < NWORDS; j++)
35426     if (ored_words[j] != 0)
35427       break;
35428   if (j < NWORDS)
35429     {
35430       size_t i;
35431       for (i = j + 1; i < NWORDS; i++)
35432         if (ored_words[i] != 0)
35433           {
35434             fprintf (fp, "unknown");
35435             return (fclose (fp) != 0);
35436           }
35437       for (i = 0; ; i++)
35438         if ((ored_words[j] >> i) & 1)
35439           {
35440             fprintf (fp, "word %d bit %d", (int) j, (int) i);
35441             return (fclose (fp) != 0);
35442           }
35443     }
35444   fprintf (fp, "unknown");
35445   return (fclose (fp) != 0);
35446 }
35447
35448 _ACEOF
35449 if ac_fn_c_try_run "$LINENO"; then :
35450   gl_cv_cc_double_expbit0=`cat conftest.out`
35451 else
35452   gl_cv_cc_double_expbit0="unknown"
35453 fi
35454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35455   conftest.$ac_objext conftest.beam conftest.$ac_ext
35456 fi
35457
35458       rm -f conftest.out
35459
35460 fi
35461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
35462 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
35463   case "$gl_cv_cc_double_expbit0" in
35464     word*bit*)
35465       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
35466       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
35467
35468 cat >>confdefs.h <<_ACEOF
35469 #define DBL_EXPBIT0_WORD $word
35470 _ACEOF
35471
35472
35473 cat >>confdefs.h <<_ACEOF
35474 #define DBL_EXPBIT0_BIT $bit
35475 _ACEOF
35476
35477       ;;
35478   esac
35479
35480
35481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
35482 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
35483 if ${gl_cv_cc_float_expbit0+:} false; then :
35484   $as_echo_n "(cached) " >&6
35485 else
35486
35487       if test "$cross_compiling" = yes; then :
35488   gl_cv_cc_float_expbit0="word 0 bit 23"
35489 else
35490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35491 /* end confdefs.h.  */
35492
35493 #include <float.h>
35494 #include <stddef.h>
35495 #include <stdio.h>
35496 #include <string.h>
35497 #define NWORDS \
35498   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35499 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
35500 static unsigned int ored_words[NWORDS];
35501 static unsigned int anded_words[NWORDS];
35502 static void add_to_ored_words (float x)
35503 {
35504   memory_float m;
35505   size_t i;
35506   /* Clear it first, in case
35507      sizeof (float) < sizeof (memory_float).  */
35508   memset (&m, 0, sizeof (memory_float));
35509   m.value = x;
35510   for (i = 0; i < NWORDS; i++)
35511     {
35512       ored_words[i] |= m.word[i];
35513       anded_words[i] &= m.word[i];
35514     }
35515 }
35516 int main ()
35517 {
35518   size_t j;
35519   FILE *fp = fopen ("conftest.out", "w");
35520   if (fp == NULL)
35521     return 1;
35522   for (j = 0; j < NWORDS; j++)
35523     anded_words[j] = ~ (unsigned int) 0;
35524   add_to_ored_words (0.25f);
35525   add_to_ored_words (0.5f);
35526   add_to_ored_words (1.0f);
35527   add_to_ored_words (2.0f);
35528   add_to_ored_words (4.0f);
35529   /* Remove bits that are common (e.g. if representation of the first mantissa
35530      bit is explicit).  */
35531   for (j = 0; j < NWORDS; j++)
35532     ored_words[j] &= ~anded_words[j];
35533   /* Now find the nonzero word.  */
35534   for (j = 0; j < NWORDS; j++)
35535     if (ored_words[j] != 0)
35536       break;
35537   if (j < NWORDS)
35538     {
35539       size_t i;
35540       for (i = j + 1; i < NWORDS; i++)
35541         if (ored_words[i] != 0)
35542           {
35543             fprintf (fp, "unknown");
35544             return (fclose (fp) != 0);
35545           }
35546       for (i = 0; ; i++)
35547         if ((ored_words[j] >> i) & 1)
35548           {
35549             fprintf (fp, "word %d bit %d", (int) j, (int) i);
35550             return (fclose (fp) != 0);
35551           }
35552     }
35553   fprintf (fp, "unknown");
35554   return (fclose (fp) != 0);
35555 }
35556
35557 _ACEOF
35558 if ac_fn_c_try_run "$LINENO"; then :
35559   gl_cv_cc_float_expbit0=`cat conftest.out`
35560 else
35561   gl_cv_cc_float_expbit0="unknown"
35562 fi
35563 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35564   conftest.$ac_objext conftest.beam conftest.$ac_ext
35565 fi
35566
35567       rm -f conftest.out
35568
35569 fi
35570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
35571 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
35572   case "$gl_cv_cc_float_expbit0" in
35573     word*bit*)
35574       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
35575       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
35576
35577 cat >>confdefs.h <<_ACEOF
35578 #define FLT_EXPBIT0_WORD $word
35579 _ACEOF
35580
35581
35582 cat >>confdefs.h <<_ACEOF
35583 #define FLT_EXPBIT0_BIT $bit
35584 _ACEOF
35585
35586       ;;
35587   esac
35588
35589
35590
35591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
35592 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
35593 if ${gl_cv_cc_long_double_expbit0+:} false; then :
35594   $as_echo_n "(cached) " >&6
35595 else
35596
35597       if test "$cross_compiling" = yes; then :
35598
35599                               gl_cv_cc_long_double_expbit0="unknown"
35600
35601 else
35602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35603 /* end confdefs.h.  */
35604
35605 #include <float.h>
35606 #include <stddef.h>
35607 #include <stdio.h>
35608 #include <string.h>
35609 #define NWORDS \
35610   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35611 typedef union { long double value; unsigned int word[NWORDS]; }
35612         memory_long_double;
35613 static unsigned int ored_words[NWORDS];
35614 static unsigned int anded_words[NWORDS];
35615 static void add_to_ored_words (long double x)
35616 {
35617   memory_long_double m;
35618   size_t i;
35619   /* Clear it first, in case
35620      sizeof (long double) < sizeof (memory_long_double).  */
35621   memset (&m, 0, sizeof (memory_long_double));
35622   m.value = x;
35623   for (i = 0; i < NWORDS; i++)
35624     {
35625       ored_words[i] |= m.word[i];
35626       anded_words[i] &= m.word[i];
35627     }
35628 }
35629 int main ()
35630 {
35631   size_t j;
35632   FILE *fp = fopen ("conftest.out", "w");
35633   if (fp == NULL)
35634     return 1;
35635   for (j = 0; j < NWORDS; j++)
35636     anded_words[j] = ~ (unsigned int) 0;
35637   add_to_ored_words (0.25L);
35638   add_to_ored_words (0.5L);
35639   add_to_ored_words (1.0L);
35640   add_to_ored_words (2.0L);
35641   add_to_ored_words (4.0L);
35642   /* Remove bits that are common (e.g. if representation of the first mantissa
35643      bit is explicit).  */
35644   for (j = 0; j < NWORDS; j++)
35645     ored_words[j] &= ~anded_words[j];
35646   /* Now find the nonzero word.  */
35647   for (j = 0; j < NWORDS; j++)
35648     if (ored_words[j] != 0)
35649       break;
35650   if (j < NWORDS)
35651     {
35652       size_t i;
35653       for (i = j + 1; i < NWORDS; i++)
35654         if (ored_words[i] != 0)
35655           {
35656             fprintf (fp, "unknown");
35657             return (fclose (fp) != 0);
35658           }
35659       for (i = 0; ; i++)
35660         if ((ored_words[j] >> i) & 1)
35661           {
35662             fprintf (fp, "word %d bit %d", (int) j, (int) i);
35663             return (fclose (fp) != 0);
35664           }
35665     }
35666   fprintf (fp, "unknown");
35667   return (fclose (fp) != 0);
35668 }
35669
35670 _ACEOF
35671 if ac_fn_c_try_run "$LINENO"; then :
35672   gl_cv_cc_long_double_expbit0=`cat conftest.out`
35673 else
35674   gl_cv_cc_long_double_expbit0="unknown"
35675 fi
35676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35677   conftest.$ac_objext conftest.beam conftest.$ac_ext
35678 fi
35679
35680       rm -f conftest.out
35681
35682 fi
35683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
35684 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
35685   case "$gl_cv_cc_long_double_expbit0" in
35686     word*bit*)
35687       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
35688       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
35689
35690 cat >>confdefs.h <<_ACEOF
35691 #define LDBL_EXPBIT0_WORD $word
35692 _ACEOF
35693
35694
35695 cat >>confdefs.h <<_ACEOF
35696 #define LDBL_EXPBIT0_BIT $bit
35697 _ACEOF
35698
35699       ;;
35700   esac
35701
35702
35703
35704
35705
35706   if test $ac_cv_func_link = no; then
35707     HAVE_LINK=0
35708   else
35709     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
35710 $as_echo_n "checking whether link obeys POSIX... " >&6; }
35711 if ${gl_cv_func_link_works+:} false; then :
35712   $as_echo_n "(cached) " >&6
35713 else
35714   touch conftest.a
35715        # Assume that if we have lstat, we can also check symlinks.
35716        if test $ac_cv_func_lstat = yes; then
35717          ln -s conftest.a conftest.lnk
35718        fi
35719        if test "$cross_compiling" = yes; then :
35720   case "$host_os" in
35721                     # Guess yes on glibc systems.
35722             *-gnu*) gl_cv_func_link_works="guessing yes" ;;
35723                     # If we don't know, assume the worst.
35724             *)      gl_cv_func_link_works="guessing no" ;;
35725           esac
35726
35727 else
35728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35729 /* end confdefs.h.  */
35730 #include <unistd.h>
35731
35732 int
35733 main ()
35734 {
35735 int result = 0;
35736              if (!link ("conftest.a", "conftest.b/"))
35737                result |= 1;
35738 #if HAVE_LSTAT
35739              if (!link ("conftest.lnk/", "conftest.b"))
35740                result |= 2;
35741              if (rename ("conftest.a", "conftest.b"))
35742                result |= 4;
35743              if (!link ("conftest.b", "conftest.lnk"))
35744                result |= 8;
35745 #endif
35746              return result;
35747
35748   ;
35749   return 0;
35750 }
35751 _ACEOF
35752 if ac_fn_c_try_run "$LINENO"; then :
35753   gl_cv_func_link_works=yes
35754 else
35755   gl_cv_func_link_works=no
35756 fi
35757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35758   conftest.$ac_objext conftest.beam conftest.$ac_ext
35759 fi
35760
35761        rm -f conftest.a conftest.b conftest.lnk
35762 fi
35763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
35764 $as_echo "$gl_cv_func_link_works" >&6; }
35765     case "$gl_cv_func_link_works" in
35766       *yes) ;;
35767       *)
35768         REPLACE_LINK=1
35769         ;;
35770     esac
35771   fi
35772
35773   if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
35774
35775
35776
35777
35778
35779
35780
35781
35782   M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
35783
35784   fi
35785
35786
35787
35788
35789
35790     if test "$GNULIB_LINK" != 1; then
35791         if test "$GNULIB_LINK" = 0; then
35792       GNULIB_LINK=$gl_module_indicator_condition
35793     else
35794       GNULIB_LINK="($GNULIB_LINK || $gl_module_indicator_condition)"
35795     fi
35796   fi
35797
35798
35799
35800
35801
35802 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
35803
35804
35805
35806
35807
35808
35809
35810   for ac_func in setlocale uselocale
35811 do :
35812   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
35813 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
35814 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
35815   cat >>confdefs.h <<_ACEOF
35816 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
35817 _ACEOF
35818
35819 fi
35820 done
35821
35822
35823
35824
35825
35826
35827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
35828 $as_echo_n "checking for a traditional french locale... " >&6; }
35829 if ${gt_cv_locale_fr+:} false; then :
35830   $as_echo_n "(cached) " >&6
35831 else
35832
35833     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35834 /* end confdefs.h.  */
35835
35836 #include <locale.h>
35837 #include <time.h>
35838 #if HAVE_LANGINFO_CODESET
35839 # include <langinfo.h>
35840 #endif
35841 #include <stdlib.h>
35842 #include <string.h>
35843 struct tm t;
35844 char buf[16];
35845 int main () {
35846   /* Check whether the given locale name is recognized by the system.  */
35847 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
35848   /* On native Windows, setlocale(category, "") looks at the system settings,
35849      not at the environment variables.  Also, when an encoding suffix such
35850      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35851      category of the locale to "C".  */
35852   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35853       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35854     return 1;
35855 #else
35856   if (setlocale (LC_ALL, "") == NULL) return 1;
35857 #endif
35858   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35859      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35860      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35861      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35862      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35863      some unit tests fail.
35864      On MirBSD 10, when an unsupported locale is specified, setlocale()
35865      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
35866 #if HAVE_LANGINFO_CODESET
35867   {
35868     const char *cs = nl_langinfo (CODESET);
35869     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35870         || strcmp (cs, "UTF-8") == 0)
35871       return 1;
35872   }
35873 #endif
35874 #ifdef __CYGWIN__
35875   /* On Cygwin, avoid locale names without encoding suffix, because the
35876      locale_charset() function relies on the encoding suffix.  Note that
35877      LC_ALL is set on the command line.  */
35878   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35879 #endif
35880   /* Check whether in the abbreviation of the second month, the second
35881      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
35882      one byte long. This excludes the UTF-8 encoding.  */
35883   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35884   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
35885 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
35886   /* Check whether the decimal separator is a comma.
35887      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
35888      are nl_langinfo(RADIXCHAR) are both ".".  */
35889   if (localeconv () ->decimal_point[0] != ',') return 1;
35890 #endif
35891   return 0;
35892 }
35893
35894 _ACEOF
35895     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35896   (eval $ac_link) 2>&5
35897   ac_status=$?
35898   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35899   test $ac_status = 0; } && test -s conftest$ac_exeext; then
35900       case "$host_os" in
35901         # Handle native Windows specially, because there setlocale() interprets
35902         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35903         # "fr" or "fra" as "French" or "French_France.1252",
35904         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35905         # "ja" as "Japanese" or "Japanese_Japan.932",
35906         # and similar.
35907         mingw*)
35908           # Test for the native Windows locale name.
35909           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35910             gt_cv_locale_fr=French_France.1252
35911           else
35912             # None found.
35913             gt_cv_locale_fr=none
35914           fi
35915           ;;
35916         *)
35917           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35918           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35919           # configure script would override the LC_ALL setting. Likewise for
35920           # LC_CTYPE, which is also set at the beginning of the configure script.
35921           # Test for the usual locale name.
35922           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35923             gt_cv_locale_fr=fr_FR
35924           else
35925             # Test for the locale name with explicit encoding suffix.
35926             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35927               gt_cv_locale_fr=fr_FR.ISO-8859-1
35928             else
35929               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
35930               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35931                 gt_cv_locale_fr=fr_FR.ISO8859-1
35932               else
35933                 # Test for the HP-UX locale name.
35934                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35935                   gt_cv_locale_fr=fr_FR.iso88591
35936                 else
35937                   # Test for the Solaris 7 locale name.
35938                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35939                     gt_cv_locale_fr=fr
35940                   else
35941                     # None found.
35942                     gt_cv_locale_fr=none
35943                   fi
35944                 fi
35945               fi
35946             fi
35947           fi
35948           ;;
35949       esac
35950     fi
35951     rm -fr conftest*
35952
35953 fi
35954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
35955 $as_echo "$gt_cv_locale_fr" >&6; }
35956   LOCALE_FR=$gt_cv_locale_fr
35957
35958
35959
35960
35961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
35962 $as_echo_n "checking for a french Unicode locale... " >&6; }
35963 if ${gt_cv_locale_fr_utf8+:} false; then :
35964   $as_echo_n "(cached) " >&6
35965 else
35966
35967     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35968 /* end confdefs.h.  */
35969
35970 #include <locale.h>
35971 #include <time.h>
35972 #if HAVE_LANGINFO_CODESET
35973 # include <langinfo.h>
35974 #endif
35975 #include <stdlib.h>
35976 #include <string.h>
35977 struct tm t;
35978 char buf[16];
35979 int main () {
35980   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
35981      imitates locale dependent behaviour by looking at the environment
35982      variables, and all locales use the UTF-8 encoding.  */
35983 #if !(defined __BEOS__ || defined __HAIKU__)
35984   /* Check whether the given locale name is recognized by the system.  */
35985 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
35986   /* On native Windows, setlocale(category, "") looks at the system settings,
35987      not at the environment variables.  Also, when an encoding suffix such
35988      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35989      category of the locale to "C".  */
35990   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35991       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35992     return 1;
35993 # else
35994   if (setlocale (LC_ALL, "") == NULL) return 1;
35995 # endif
35996   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35997      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35998      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35999      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36000      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36001      some unit tests fail.  */
36002 # if HAVE_LANGINFO_CODESET
36003   {
36004     const char *cs = nl_langinfo (CODESET);
36005     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36006       return 1;
36007   }
36008 # endif
36009 # ifdef __CYGWIN__
36010   /* On Cygwin, avoid locale names without encoding suffix, because the
36011      locale_charset() function relies on the encoding suffix.  Note that
36012      LC_ALL is set on the command line.  */
36013   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36014 # endif
36015   /* Check whether in the abbreviation of the second month, the second
36016      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36017      two bytes long, with UTF-8 encoding.  */
36018   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36019   if (strftime (buf, sizeof (buf), "%b", &t) < 4
36020       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36021     return 1;
36022 #endif
36023 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
36024   /* Check whether the decimal separator is a comma.
36025      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36026      are nl_langinfo(RADIXCHAR) are both ".".  */
36027   if (localeconv () ->decimal_point[0] != ',') return 1;
36028 #endif
36029   return 0;
36030 }
36031
36032 _ACEOF
36033     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36034   (eval $ac_link) 2>&5
36035   ac_status=$?
36036   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36037   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36038       case "$host_os" in
36039         # Handle native Windows specially, because there setlocale() interprets
36040         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36041         # "fr" or "fra" as "French" or "French_France.1252",
36042         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36043         # "ja" as "Japanese" or "Japanese_Japan.932",
36044         # and similar.
36045         mingw*)
36046           # Test for the hypothetical native Windows locale name.
36047           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36048             gt_cv_locale_fr_utf8=French_France.65001
36049           else
36050             # None found.
36051             gt_cv_locale_fr_utf8=none
36052           fi
36053           ;;
36054         *)
36055           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36056           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36057           # configure script would override the LC_ALL setting. Likewise for
36058           # LC_CTYPE, which is also set at the beginning of the configure script.
36059           # Test for the usual locale name.
36060           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36061             gt_cv_locale_fr_utf8=fr_FR
36062           else
36063             # Test for the locale name with explicit encoding suffix.
36064             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36065               gt_cv_locale_fr_utf8=fr_FR.UTF-8
36066             else
36067               # Test for the Solaris 7 locale name.
36068               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36069                 gt_cv_locale_fr_utf8=fr.UTF-8
36070               else
36071                 # None found.
36072                 gt_cv_locale_fr_utf8=none
36073               fi
36074             fi
36075           fi
36076           ;;
36077       esac
36078     fi
36079     rm -fr conftest*
36080
36081 fi
36082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36083 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
36084   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36085
36086
36087
36088
36089
36090   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
36091 $as_echo_n "checking for a traditional japanese locale... " >&6; }
36092 if ${gt_cv_locale_ja+:} false; then :
36093   $as_echo_n "(cached) " >&6
36094 else
36095
36096     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36097 /* end confdefs.h.  */
36098
36099 #include <locale.h>
36100 #include <time.h>
36101 #if HAVE_LANGINFO_CODESET
36102 # include <langinfo.h>
36103 #endif
36104 #include <stdlib.h>
36105 #include <string.h>
36106 struct tm t;
36107 char buf[16];
36108 int main ()
36109 {
36110   const char *p;
36111   /* Check whether the given locale name is recognized by the system.  */
36112 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36113   /* On native Windows, setlocale(category, "") looks at the system settings,
36114      not at the environment variables.  Also, when an encoding suffix such
36115      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36116      category of the locale to "C".  */
36117   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36118       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36119     return 1;
36120 #else
36121   if (setlocale (LC_ALL, "") == NULL) return 1;
36122 #endif
36123   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36124      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36125      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36126      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36127      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36128      some unit tests fail.
36129      On MirBSD 10, when an unsupported locale is specified, setlocale()
36130      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
36131 #if HAVE_LANGINFO_CODESET
36132   {
36133     const char *cs = nl_langinfo (CODESET);
36134     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36135         || strcmp (cs, "UTF-8") == 0)
36136       return 1;
36137   }
36138 #endif
36139 #ifdef __CYGWIN__
36140   /* On Cygwin, avoid locale names without encoding suffix, because the
36141      locale_charset() function relies on the encoding suffix.  Note that
36142      LC_ALL is set on the command line.  */
36143   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36144 #endif
36145   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
36146      on Cygwin 1.5.x.  */
36147   if (MB_CUR_MAX == 1)
36148     return 1;
36149   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
36150      This excludes the UTF-8 encoding (except on MirBSD).  */
36151   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36152   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
36153   for (p = buf; *p != '\0'; p++)
36154     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
36155       return 1;
36156   return 0;
36157 }
36158
36159 _ACEOF
36160     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36161   (eval $ac_link) 2>&5
36162   ac_status=$?
36163   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36164   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36165       case "$host_os" in
36166         # Handle native Windows specially, because there setlocale() interprets
36167         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36168         # "fr" or "fra" as "French" or "French_France.1252",
36169         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36170         # "ja" as "Japanese" or "Japanese_Japan.932",
36171         # and similar.
36172         mingw*)
36173           # Note that on native Windows, the Japanese locale is
36174           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
36175           # cannot use it here.
36176           gt_cv_locale_ja=none
36177           ;;
36178         *)
36179           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36180           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36181           # configure script would override the LC_ALL setting. Likewise for
36182           # LC_CTYPE, which is also set at the beginning of the configure script.
36183           # Test for the AIX locale name.
36184           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36185             gt_cv_locale_ja=ja_JP
36186           else
36187             # Test for the locale name with explicit encoding suffix.
36188             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36189               gt_cv_locale_ja=ja_JP.EUC-JP
36190             else
36191               # Test for the HP-UX, OSF/1, NetBSD locale name.
36192               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36193                 gt_cv_locale_ja=ja_JP.eucJP
36194               else
36195                 # Test for the IRIX, FreeBSD locale name.
36196                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36197                   gt_cv_locale_ja=ja_JP.EUC
36198                 else
36199                   # Test for the Solaris 7 locale name.
36200                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36201                     gt_cv_locale_ja=ja
36202                   else
36203                     # Special test for NetBSD 1.6.
36204                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
36205                       gt_cv_locale_ja=ja_JP.eucJP
36206                     else
36207                       # None found.
36208                       gt_cv_locale_ja=none
36209                     fi
36210                   fi
36211                 fi
36212               fi
36213             fi
36214           fi
36215           ;;
36216       esac
36217     fi
36218     rm -fr conftest*
36219
36220 fi
36221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
36222 $as_echo "$gt_cv_locale_ja" >&6; }
36223   LOCALE_JA=$gt_cv_locale_ja
36224
36225
36226
36227
36228
36229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
36230 $as_echo_n "checking for a transitional chinese locale... " >&6; }
36231 if ${gt_cv_locale_zh_CN+:} false; then :
36232   $as_echo_n "(cached) " >&6
36233 else
36234
36235     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36236 /* end confdefs.h.  */
36237
36238 #include <locale.h>
36239 #include <stdlib.h>
36240 #include <time.h>
36241 #if HAVE_LANGINFO_CODESET
36242 # include <langinfo.h>
36243 #endif
36244 #include <stdlib.h>
36245 #include <string.h>
36246 struct tm t;
36247 char buf[16];
36248 int main ()
36249 {
36250   const char *p;
36251   /* Check whether the given locale name is recognized by the system.  */
36252 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36253   /* On native Windows, setlocale(category, "") looks at the system settings,
36254      not at the environment variables.  Also, when an encoding suffix such
36255      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36256      category of the locale to "C".  */
36257   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36258       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36259     return 1;
36260 #else
36261   if (setlocale (LC_ALL, "") == NULL) return 1;
36262 #endif
36263   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36264      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36265      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36266      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36267      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36268      some unit tests fail.
36269      On MirBSD 10, when an unsupported locale is specified, setlocale()
36270      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
36271 #if HAVE_LANGINFO_CODESET
36272   {
36273     const char *cs = nl_langinfo (CODESET);
36274     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36275         || strcmp (cs, "UTF-8") == 0)
36276       return 1;
36277   }
36278 #endif
36279 #ifdef __CYGWIN__
36280   /* On Cygwin, avoid locale names without encoding suffix, because the
36281      locale_charset() function relies on the encoding suffix.  Note that
36282      LC_ALL is set on the command line.  */
36283   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36284 #endif
36285   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
36286      This excludes the UTF-8 encoding (except on MirBSD).  */
36287   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36288   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
36289   for (p = buf; *p != '\0'; p++)
36290     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
36291       return 1;
36292   /* Check whether a typical GB18030 multibyte sequence is recognized as a
36293      single wide character.  This excludes the GB2312 and GBK encodings.  */
36294   if (mblen ("\203\062\332\066", 5) != 4)
36295     return 1;
36296   return 0;
36297 }
36298
36299 _ACEOF
36300     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36301   (eval $ac_link) 2>&5
36302   ac_status=$?
36303   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36304   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36305       case "$host_os" in
36306         # Handle native Windows specially, because there setlocale() interprets
36307         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36308         # "fr" or "fra" as "French" or "French_France.1252",
36309         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36310         # "ja" as "Japanese" or "Japanese_Japan.932",
36311         # and similar.
36312         mingw*)
36313           # Test for the hypothetical native Windows locale name.
36314           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36315             gt_cv_locale_zh_CN=Chinese_China.54936
36316           else
36317             # None found.
36318             gt_cv_locale_zh_CN=none
36319           fi
36320           ;;
36321         solaris2.8)
36322           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
36323           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
36324           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
36325           gt_cv_locale_zh_CN=none
36326           ;;
36327         *)
36328           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36329           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36330           # configure script would override the LC_ALL setting. Likewise for
36331           # LC_CTYPE, which is also set at the beginning of the configure script.
36332           # Test for the locale name without encoding suffix.
36333           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36334             gt_cv_locale_zh_CN=zh_CN
36335           else
36336             # Test for the locale name with explicit encoding suffix.
36337             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36338               gt_cv_locale_zh_CN=zh_CN.GB18030
36339             else
36340               # None found.
36341               gt_cv_locale_zh_CN=none
36342             fi
36343           fi
36344           ;;
36345       esac
36346     else
36347       # If there was a link error, due to mblen(), the system is so old that
36348       # it certainly doesn't have a chinese locale.
36349       gt_cv_locale_zh_CN=none
36350     fi
36351     rm -fr conftest*
36352
36353 fi
36354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
36355 $as_echo "$gt_cv_locale_zh_CN" >&6; }
36356   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
36357
36358
36359
36360
36361   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
36362 $as_echo_n "checking for a french Unicode locale... " >&6; }
36363 if ${gt_cv_locale_fr_utf8+:} false; then :
36364   $as_echo_n "(cached) " >&6
36365 else
36366
36367     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36368 /* end confdefs.h.  */
36369
36370 #include <locale.h>
36371 #include <time.h>
36372 #if HAVE_LANGINFO_CODESET
36373 # include <langinfo.h>
36374 #endif
36375 #include <stdlib.h>
36376 #include <string.h>
36377 struct tm t;
36378 char buf[16];
36379 int main () {
36380   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
36381      imitates locale dependent behaviour by looking at the environment
36382      variables, and all locales use the UTF-8 encoding.  */
36383 #if !(defined __BEOS__ || defined __HAIKU__)
36384   /* Check whether the given locale name is recognized by the system.  */
36385 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36386   /* On native Windows, setlocale(category, "") looks at the system settings,
36387      not at the environment variables.  Also, when an encoding suffix such
36388      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36389      category of the locale to "C".  */
36390   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36391       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36392     return 1;
36393 # else
36394   if (setlocale (LC_ALL, "") == NULL) return 1;
36395 # endif
36396   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36397      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36398      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36399      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36400      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36401      some unit tests fail.  */
36402 # if HAVE_LANGINFO_CODESET
36403   {
36404     const char *cs = nl_langinfo (CODESET);
36405     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36406       return 1;
36407   }
36408 # endif
36409 # ifdef __CYGWIN__
36410   /* On Cygwin, avoid locale names without encoding suffix, because the
36411      locale_charset() function relies on the encoding suffix.  Note that
36412      LC_ALL is set on the command line.  */
36413   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36414 # endif
36415   /* Check whether in the abbreviation of the second month, the second
36416      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36417      two bytes long, with UTF-8 encoding.  */
36418   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36419   if (strftime (buf, sizeof (buf), "%b", &t) < 4
36420       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36421     return 1;
36422 #endif
36423 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
36424   /* Check whether the decimal separator is a comma.
36425      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36426      are nl_langinfo(RADIXCHAR) are both ".".  */
36427   if (localeconv () ->decimal_point[0] != ',') return 1;
36428 #endif
36429   return 0;
36430 }
36431
36432 _ACEOF
36433     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36434   (eval $ac_link) 2>&5
36435   ac_status=$?
36436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36437   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36438       case "$host_os" in
36439         # Handle native Windows specially, because there setlocale() interprets
36440         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36441         # "fr" or "fra" as "French" or "French_France.1252",
36442         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36443         # "ja" as "Japanese" or "Japanese_Japan.932",
36444         # and similar.
36445         mingw*)
36446           # Test for the hypothetical native Windows locale name.
36447           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36448             gt_cv_locale_fr_utf8=French_France.65001
36449           else
36450             # None found.
36451             gt_cv_locale_fr_utf8=none
36452           fi
36453           ;;
36454         *)
36455           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36456           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36457           # configure script would override the LC_ALL setting. Likewise for
36458           # LC_CTYPE, which is also set at the beginning of the configure script.
36459           # Test for the usual locale name.
36460           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36461             gt_cv_locale_fr_utf8=fr_FR
36462           else
36463             # Test for the locale name with explicit encoding suffix.
36464             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36465               gt_cv_locale_fr_utf8=fr_FR.UTF-8
36466             else
36467               # Test for the Solaris 7 locale name.
36468               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36469                 gt_cv_locale_fr_utf8=fr.UTF-8
36470               else
36471                 # None found.
36472                 gt_cv_locale_fr_utf8=none
36473               fi
36474             fi
36475           fi
36476           ;;
36477       esac
36478     fi
36479     rm -fr conftest*
36480
36481 fi
36482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36483 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
36484   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36485
36486
36487
36488
36489
36490   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
36491   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
36492   # irrelevant for anonymous mappings.
36493   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
36494 if test "x$ac_cv_func_mmap" = xyes; then :
36495   gl_have_mmap=yes
36496 else
36497   gl_have_mmap=no
36498 fi
36499
36500
36501   # Try to allow MAP_ANONYMOUS.
36502   gl_have_mmap_anonymous=no
36503   if test $gl_have_mmap = yes; then
36504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
36505 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
36506     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36507 /* end confdefs.h.  */
36508
36509 #include <sys/mman.h>
36510 #ifdef MAP_ANONYMOUS
36511     I cannot identify this map
36512 #endif
36513
36514 _ACEOF
36515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36516   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36517   gl_have_mmap_anonymous=yes
36518 fi
36519 rm -f conftest*
36520
36521     if test $gl_have_mmap_anonymous != yes; then
36522       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36523 /* end confdefs.h.  */
36524
36525 #include <sys/mman.h>
36526 #ifdef MAP_ANON
36527     I cannot identify this map
36528 #endif
36529
36530 _ACEOF
36531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36532   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36533
36534 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
36535
36536          gl_have_mmap_anonymous=yes
36537 fi
36538 rm -f conftest*
36539
36540     fi
36541     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
36542 $as_echo "$gl_have_mmap_anonymous" >&6; }
36543     if test $gl_have_mmap_anonymous = yes; then
36544
36545 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
36546
36547     fi
36548   fi
36549
36550
36551
36552
36553
36554
36555   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
36556   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
36557   # irrelevant for anonymous mappings.
36558   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
36559 if test "x$ac_cv_func_mmap" = xyes; then :
36560   gl_have_mmap=yes
36561 else
36562   gl_have_mmap=no
36563 fi
36564
36565
36566   # Try to allow MAP_ANONYMOUS.
36567   gl_have_mmap_anonymous=no
36568   if test $gl_have_mmap = yes; then
36569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
36570 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
36571     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36572 /* end confdefs.h.  */
36573
36574 #include <sys/mman.h>
36575 #ifdef MAP_ANONYMOUS
36576     I cannot identify this map
36577 #endif
36578
36579 _ACEOF
36580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36581   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36582   gl_have_mmap_anonymous=yes
36583 fi
36584 rm -f conftest*
36585
36586     if test $gl_have_mmap_anonymous != yes; then
36587       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36588 /* end confdefs.h.  */
36589
36590 #include <sys/mman.h>
36591 #ifdef MAP_ANON
36592     I cannot identify this map
36593 #endif
36594
36595 _ACEOF
36596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36597   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
36598
36599 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
36600
36601          gl_have_mmap_anonymous=yes
36602 fi
36603 rm -f conftest*
36604
36605     fi
36606     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
36607 $as_echo "$gl_have_mmap_anonymous" >&6; }
36608     if test $gl_have_mmap_anonymous = yes; then
36609
36610 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
36611
36612     fi
36613   fi
36614
36615
36616
36617
36618
36619
36620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
36621 $as_echo_n "checking for a traditional french locale... " >&6; }
36622 if ${gt_cv_locale_fr+:} false; then :
36623   $as_echo_n "(cached) " >&6
36624 else
36625
36626     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36627 /* end confdefs.h.  */
36628
36629 #include <locale.h>
36630 #include <time.h>
36631 #if HAVE_LANGINFO_CODESET
36632 # include <langinfo.h>
36633 #endif
36634 #include <stdlib.h>
36635 #include <string.h>
36636 struct tm t;
36637 char buf[16];
36638 int main () {
36639   /* Check whether the given locale name is recognized by the system.  */
36640 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36641   /* On native Windows, setlocale(category, "") looks at the system settings,
36642      not at the environment variables.  Also, when an encoding suffix such
36643      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36644      category of the locale to "C".  */
36645   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36646       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36647     return 1;
36648 #else
36649   if (setlocale (LC_ALL, "") == NULL) return 1;
36650 #endif
36651   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36652      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36653      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36654      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36655      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36656      some unit tests fail.
36657      On MirBSD 10, when an unsupported locale is specified, setlocale()
36658      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
36659 #if HAVE_LANGINFO_CODESET
36660   {
36661     const char *cs = nl_langinfo (CODESET);
36662     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36663         || strcmp (cs, "UTF-8") == 0)
36664       return 1;
36665   }
36666 #endif
36667 #ifdef __CYGWIN__
36668   /* On Cygwin, avoid locale names without encoding suffix, because the
36669      locale_charset() function relies on the encoding suffix.  Note that
36670      LC_ALL is set on the command line.  */
36671   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36672 #endif
36673   /* Check whether in the abbreviation of the second month, the second
36674      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
36675      one byte long. This excludes the UTF-8 encoding.  */
36676   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36677   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
36678 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
36679   /* Check whether the decimal separator is a comma.
36680      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36681      are nl_langinfo(RADIXCHAR) are both ".".  */
36682   if (localeconv () ->decimal_point[0] != ',') return 1;
36683 #endif
36684   return 0;
36685 }
36686
36687 _ACEOF
36688     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36689   (eval $ac_link) 2>&5
36690   ac_status=$?
36691   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36692   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36693       case "$host_os" in
36694         # Handle native Windows specially, because there setlocale() interprets
36695         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36696         # "fr" or "fra" as "French" or "French_France.1252",
36697         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36698         # "ja" as "Japanese" or "Japanese_Japan.932",
36699         # and similar.
36700         mingw*)
36701           # Test for the native Windows locale name.
36702           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36703             gt_cv_locale_fr=French_France.1252
36704           else
36705             # None found.
36706             gt_cv_locale_fr=none
36707           fi
36708           ;;
36709         *)
36710           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36711           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36712           # configure script would override the LC_ALL setting. Likewise for
36713           # LC_CTYPE, which is also set at the beginning of the configure script.
36714           # Test for the usual locale name.
36715           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36716             gt_cv_locale_fr=fr_FR
36717           else
36718             # Test for the locale name with explicit encoding suffix.
36719             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36720               gt_cv_locale_fr=fr_FR.ISO-8859-1
36721             else
36722               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
36723               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36724                 gt_cv_locale_fr=fr_FR.ISO8859-1
36725               else
36726                 # Test for the HP-UX locale name.
36727                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36728                   gt_cv_locale_fr=fr_FR.iso88591
36729                 else
36730                   # Test for the Solaris 7 locale name.
36731                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36732                     gt_cv_locale_fr=fr
36733                   else
36734                     # None found.
36735                     gt_cv_locale_fr=none
36736                   fi
36737                 fi
36738               fi
36739             fi
36740           fi
36741           ;;
36742       esac
36743     fi
36744     rm -fr conftest*
36745
36746 fi
36747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
36748 $as_echo "$gt_cv_locale_fr" >&6; }
36749   LOCALE_FR=$gt_cv_locale_fr
36750
36751
36752
36753
36754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
36755 $as_echo_n "checking for a french Unicode locale... " >&6; }
36756 if ${gt_cv_locale_fr_utf8+:} false; then :
36757   $as_echo_n "(cached) " >&6
36758 else
36759
36760     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36761 /* end confdefs.h.  */
36762
36763 #include <locale.h>
36764 #include <time.h>
36765 #if HAVE_LANGINFO_CODESET
36766 # include <langinfo.h>
36767 #endif
36768 #include <stdlib.h>
36769 #include <string.h>
36770 struct tm t;
36771 char buf[16];
36772 int main () {
36773   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
36774      imitates locale dependent behaviour by looking at the environment
36775      variables, and all locales use the UTF-8 encoding.  */
36776 #if !(defined __BEOS__ || defined __HAIKU__)
36777   /* Check whether the given locale name is recognized by the system.  */
36778 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
36779   /* On native Windows, setlocale(category, "") looks at the system settings,
36780      not at the environment variables.  Also, when an encoding suffix such
36781      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36782      category of the locale to "C".  */
36783   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36784       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36785     return 1;
36786 # else
36787   if (setlocale (LC_ALL, "") == NULL) return 1;
36788 # endif
36789   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36790      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36791      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36792      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36793      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36794      some unit tests fail.  */
36795 # if HAVE_LANGINFO_CODESET
36796   {
36797     const char *cs = nl_langinfo (CODESET);
36798     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36799       return 1;
36800   }
36801 # endif
36802 # ifdef __CYGWIN__
36803   /* On Cygwin, avoid locale names without encoding suffix, because the
36804      locale_charset() function relies on the encoding suffix.  Note that
36805      LC_ALL is set on the command line.  */
36806   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36807 # endif
36808   /* Check whether in the abbreviation of the second month, the second
36809      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36810      two bytes long, with UTF-8 encoding.  */
36811   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36812   if (strftime (buf, sizeof (buf), "%b", &t) < 4
36813       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36814     return 1;
36815 #endif
36816 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
36817   /* Check whether the decimal separator is a comma.
36818      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36819      are nl_langinfo(RADIXCHAR) are both ".".  */
36820   if (localeconv () ->decimal_point[0] != ',') return 1;
36821 #endif
36822   return 0;
36823 }
36824
36825 _ACEOF
36826     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36827   (eval $ac_link) 2>&5
36828   ac_status=$?
36829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36830   test $ac_status = 0; } && test -s conftest$ac_exeext; then
36831       case "$host_os" in
36832         # Handle native Windows specially, because there setlocale() interprets
36833         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36834         # "fr" or "fra" as "French" or "French_France.1252",
36835         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36836         # "ja" as "Japanese" or "Japanese_Japan.932",
36837         # and similar.
36838         mingw*)
36839           # Test for the hypothetical native Windows locale name.
36840           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36841             gt_cv_locale_fr_utf8=French_France.65001
36842           else
36843             # None found.
36844             gt_cv_locale_fr_utf8=none
36845           fi
36846           ;;
36847         *)
36848           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36849           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36850           # configure script would override the LC_ALL setting. Likewise for
36851           # LC_CTYPE, which is also set at the beginning of the configure script.
36852           # Test for the usual locale name.
36853           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36854             gt_cv_locale_fr_utf8=fr_FR
36855           else
36856             # Test for the locale name with explicit encoding suffix.
36857             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36858               gt_cv_locale_fr_utf8=fr_FR.UTF-8
36859             else
36860               # Test for the Solaris 7 locale name.
36861               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36862                 gt_cv_locale_fr_utf8=fr.UTF-8
36863               else
36864                 # None found.
36865                 gt_cv_locale_fr_utf8=none
36866               fi
36867             fi
36868           fi
36869           ;;
36870       esac
36871     fi
36872     rm -fr conftest*
36873
36874 fi
36875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36876 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
36877   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36878
36879
36880
36881
36882
36883   for ac_func in opendir
36884 do :
36885   ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
36886 if test "x$ac_cv_func_opendir" = xyes; then :
36887   cat >>confdefs.h <<_ACEOF
36888 #define HAVE_OPENDIR 1
36889 _ACEOF
36890
36891 fi
36892 done
36893
36894   if test $ac_cv_func_opendir = no; then
36895     HAVE_OPENDIR=0
36896   fi
36897
36898
36899   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
36900
36901
36902
36903
36904
36905
36906
36907
36908   M4tests_LIBOBJS="$M4tests_LIBOBJS opendir.$ac_objext"
36909
36910   fi
36911
36912
36913
36914
36915
36916     if test "$GNULIB_OPENDIR" != 1; then
36917         if test "$GNULIB_OPENDIR" = 0; then
36918       GNULIB_OPENDIR=$gl_module_indicator_condition
36919     else
36920       GNULIB_OPENDIR="($GNULIB_OPENDIR || $gl_module_indicator_condition)"
36921     fi
36922   fi
36923
36924
36925
36926
36927
36928 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
36929
36930
36931
36932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36933 /* end confdefs.h.  */
36934 [
36935   #if defined _MSC_VER || defined __MINGW32__
36936     notposix
36937   #endif
36938     ]
36939 _ACEOF
36940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36941   $EGREP "notposix" >/dev/null 2>&1; then :
36942   posix_spawn_ported=no
36943 else
36944   posix_spawn_ported=yes
36945 fi
36946 rm -f conftest*
36947
36948    if test $posix_spawn_ported = yes; then
36949   POSIX_SPAWN_PORTED_TRUE=
36950   POSIX_SPAWN_PORTED_FALSE='#'
36951 else
36952   POSIX_SPAWN_PORTED_TRUE='#'
36953   POSIX_SPAWN_PORTED_FALSE=
36954 fi
36955
36956
36957
36958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
36959 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
36960 if ${gl_cv_func_svid_putenv+:} false; then :
36961   $as_echo_n "(cached) " >&6
36962 else
36963   if test "$cross_compiling" = yes; then :
36964                case "$host_os" in
36965                         # Guess yes on glibc systems.
36966                 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
36967                         # If we don't know, assume the worst.
36968                 *)      gl_cv_func_svid_putenv="guessing no" ;;
36969               esac
36970
36971 else
36972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36973 /* end confdefs.h.  */
36974 $ac_includes_default
36975 int
36976 main ()
36977 {
36978
36979     /* Put it in env.  */
36980     if (putenv ("CONFTEST_putenv=val"))
36981       return 1;
36982
36983     /* Try to remove it.  */
36984     if (putenv ("CONFTEST_putenv"))
36985       return 2;
36986
36987     /* Make sure it was deleted.  */
36988     if (getenv ("CONFTEST_putenv") != 0)
36989       return 3;
36990
36991     return 0;
36992
36993   ;
36994   return 0;
36995 }
36996 _ACEOF
36997 if ac_fn_c_try_run "$LINENO"; then :
36998   gl_cv_func_svid_putenv=yes
36999 else
37000   gl_cv_func_svid_putenv=no
37001 fi
37002 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37003   conftest.$ac_objext conftest.beam conftest.$ac_ext
37004 fi
37005
37006
37007 fi
37008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
37009 $as_echo "$gl_cv_func_svid_putenv" >&6; }
37010   case "$gl_cv_func_svid_putenv" in
37011     *yes) ;;
37012     *)
37013       REPLACE_PUTENV=1
37014       ;;
37015   esac
37016
37017   if test $REPLACE_PUTENV = 1; then
37018
37019
37020
37021
37022
37023
37024
37025
37026   M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
37027
37028
37029   ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
37030 if test "x$ac_cv_have_decl__putenv" = xyes; then :
37031   ac_have_decl=1
37032 else
37033   ac_have_decl=0
37034 fi
37035
37036 cat >>confdefs.h <<_ACEOF
37037 #define HAVE_DECL__PUTENV $ac_have_decl
37038 _ACEOF
37039
37040
37041   fi
37042
37043
37044
37045
37046
37047     if test "$GNULIB_PUTENV" != 1; then
37048         if test "$GNULIB_PUTENV" = 0; then
37049       GNULIB_PUTENV=$gl_module_indicator_condition
37050     else
37051       GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
37052     fi
37053   fi
37054
37055
37056
37057
37058
37059 $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
37060
37061
37062
37063
37064
37065
37066   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
37067   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
37068   # irrelevant for anonymous mappings.
37069   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
37070 if test "x$ac_cv_func_mmap" = xyes; then :
37071   gl_have_mmap=yes
37072 else
37073   gl_have_mmap=no
37074 fi
37075
37076
37077   # Try to allow MAP_ANONYMOUS.
37078   gl_have_mmap_anonymous=no
37079   if test $gl_have_mmap = yes; then
37080     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
37081 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
37082     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37083 /* end confdefs.h.  */
37084
37085 #include <sys/mman.h>
37086 #ifdef MAP_ANONYMOUS
37087     I cannot identify this map
37088 #endif
37089
37090 _ACEOF
37091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37092   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37093   gl_have_mmap_anonymous=yes
37094 fi
37095 rm -f conftest*
37096
37097     if test $gl_have_mmap_anonymous != yes; then
37098       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37099 /* end confdefs.h.  */
37100
37101 #include <sys/mman.h>
37102 #ifdef MAP_ANON
37103     I cannot identify this map
37104 #endif
37105
37106 _ACEOF
37107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37108   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37109
37110 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
37111
37112          gl_have_mmap_anonymous=yes
37113 fi
37114 rm -f conftest*
37115
37116     fi
37117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
37118 $as_echo "$gl_have_mmap_anonymous" >&6; }
37119     if test $gl_have_mmap_anonymous = yes; then
37120
37121 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
37122
37123     fi
37124   fi
37125
37126
37127
37128
37129
37130
37131   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
37132   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
37133   # irrelevant for anonymous mappings.
37134   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
37135 if test "x$ac_cv_func_mmap" = xyes; then :
37136   gl_have_mmap=yes
37137 else
37138   gl_have_mmap=no
37139 fi
37140
37141
37142   # Try to allow MAP_ANONYMOUS.
37143   gl_have_mmap_anonymous=no
37144   if test $gl_have_mmap = yes; then
37145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
37146 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
37147     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37148 /* end confdefs.h.  */
37149
37150 #include <sys/mman.h>
37151 #ifdef MAP_ANONYMOUS
37152     I cannot identify this map
37153 #endif
37154
37155 _ACEOF
37156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37157   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37158   gl_have_mmap_anonymous=yes
37159 fi
37160 rm -f conftest*
37161
37162     if test $gl_have_mmap_anonymous != yes; then
37163       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37164 /* end confdefs.h.  */
37165
37166 #include <sys/mman.h>
37167 #ifdef MAP_ANON
37168     I cannot identify this map
37169 #endif
37170
37171 _ACEOF
37172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37173   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
37174
37175 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
37176
37177          gl_have_mmap_anonymous=yes
37178 fi
37179 rm -f conftest*
37180
37181     fi
37182     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
37183 $as_echo "$gl_have_mmap_anonymous" >&6; }
37184     if test $gl_have_mmap_anonymous = yes; then
37185
37186 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
37187
37188     fi
37189   fi
37190
37191
37192
37193
37194
37195
37196   for ac_func in readdir
37197 do :
37198   ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
37199 if test "x$ac_cv_func_readdir" = xyes; then :
37200   cat >>confdefs.h <<_ACEOF
37201 #define HAVE_READDIR 1
37202 _ACEOF
37203
37204 fi
37205 done
37206
37207   if test $ac_cv_func_readdir = no; then
37208     HAVE_READDIR=0
37209   fi
37210
37211   if test $HAVE_READDIR = 0; then
37212
37213
37214
37215
37216
37217
37218
37219
37220   M4tests_LIBOBJS="$M4tests_LIBOBJS readdir.$ac_objext"
37221
37222   fi
37223
37224
37225
37226
37227
37228     if test "$GNULIB_READDIR" != 1; then
37229         if test "$GNULIB_READDIR" = 0; then
37230       GNULIB_READDIR=$gl_module_indicator_condition
37231     else
37232       GNULIB_READDIR="($GNULIB_READDIR || $gl_module_indicator_condition)"
37233     fi
37234   fi
37235
37236
37237
37238
37239
37240 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
37241
37242
37243
37244
37245
37246      if test $ac_cv_func_setenv = no; then
37247     HAVE_SETENV=0
37248   else
37249     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
37250 $as_echo_n "checking whether setenv validates arguments... " >&6; }
37251 if ${gl_cv_func_setenv_works+:} false; then :
37252   $as_echo_n "(cached) " >&6
37253 else
37254   if test "$cross_compiling" = yes; then :
37255   case "$host_os" in
37256                  # Guess yes on glibc systems.
37257          *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
37258                  # If we don't know, assume the worst.
37259          *)      gl_cv_func_setenv_works="guessing no" ;;
37260        esac
37261
37262 else
37263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37264 /* end confdefs.h.  */
37265
37266        #include <stdlib.h>
37267        #include <errno.h>
37268        #include <string.h>
37269
37270 int
37271 main ()
37272 {
37273
37274        int result = 0;
37275        {
37276          if (setenv ("", "", 0) != -1)
37277            result |= 1;
37278          else if (errno != EINVAL)
37279            result |= 2;
37280        }
37281        {
37282          if (setenv ("a", "=", 1) != 0)
37283            result |= 4;
37284          else if (strcmp (getenv ("a"), "=") != 0)
37285            result |= 8;
37286        }
37287        return result;
37288
37289   ;
37290   return 0;
37291 }
37292 _ACEOF
37293 if ac_fn_c_try_run "$LINENO"; then :
37294   gl_cv_func_setenv_works=yes
37295 else
37296   gl_cv_func_setenv_works=no
37297 fi
37298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37299   conftest.$ac_objext conftest.beam conftest.$ac_ext
37300 fi
37301
37302 fi
37303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
37304 $as_echo "$gl_cv_func_setenv_works" >&6; }
37305     case "$gl_cv_func_setenv_works" in
37306       *yes) ;;
37307       *)
37308         REPLACE_SETENV=1
37309         ;;
37310     esac
37311   fi
37312
37313   if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
37314
37315
37316
37317
37318
37319
37320
37321
37322   M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
37323
37324   fi
37325
37326
37327
37328
37329
37330     if test "$GNULIB_SETENV" != 1; then
37331         if test "$GNULIB_SETENV" = 0; then
37332       GNULIB_SETENV=$gl_module_indicator_condition
37333     else
37334       GNULIB_SETENV="($GNULIB_SETENV || $gl_module_indicator_condition)"
37335     fi
37336   fi
37337
37338
37339
37340
37341
37342 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
37343
37344
37345
37346
37347
37348
37349   case "$host_os" in
37350             mingw*) REPLACE_SETLOCALE=1 ;;
37351             cygwin*)
37352       case `uname -r` in
37353         1.5.*) REPLACE_SETLOCALE=1 ;;
37354       esac
37355       ;;
37356   esac
37357
37358   if test $REPLACE_SETLOCALE = 1; then
37359
37360
37361
37362
37363
37364
37365
37366
37367   M4tests_LIBOBJS="$M4tests_LIBOBJS setlocale.$ac_objext"
37368
37369
37370   :
37371
37372   fi
37373
37374
37375
37376
37377
37378     if test "$GNULIB_SETLOCALE" != 1; then
37379         if test "$GNULIB_SETLOCALE" = 0; then
37380       GNULIB_SETLOCALE=$gl_module_indicator_condition
37381     else
37382       GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
37383     fi
37384   fi
37385
37386
37387
37388
37389
37390 $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
37391
37392
37393
37394
37395
37396
37397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
37398 $as_echo_n "checking for a traditional french locale... " >&6; }
37399 if ${gt_cv_locale_fr+:} false; then :
37400   $as_echo_n "(cached) " >&6
37401 else
37402
37403     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37404 /* end confdefs.h.  */
37405
37406 #include <locale.h>
37407 #include <time.h>
37408 #if HAVE_LANGINFO_CODESET
37409 # include <langinfo.h>
37410 #endif
37411 #include <stdlib.h>
37412 #include <string.h>
37413 struct tm t;
37414 char buf[16];
37415 int main () {
37416   /* Check whether the given locale name is recognized by the system.  */
37417 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37418   /* On native Windows, setlocale(category, "") looks at the system settings,
37419      not at the environment variables.  Also, when an encoding suffix such
37420      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37421      category of the locale to "C".  */
37422   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37423       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37424     return 1;
37425 #else
37426   if (setlocale (LC_ALL, "") == NULL) return 1;
37427 #endif
37428   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37429      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37430      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37431      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37432      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37433      some unit tests fail.
37434      On MirBSD 10, when an unsupported locale is specified, setlocale()
37435      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
37436 #if HAVE_LANGINFO_CODESET
37437   {
37438     const char *cs = nl_langinfo (CODESET);
37439     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37440         || strcmp (cs, "UTF-8") == 0)
37441       return 1;
37442   }
37443 #endif
37444 #ifdef __CYGWIN__
37445   /* On Cygwin, avoid locale names without encoding suffix, because the
37446      locale_charset() function relies on the encoding suffix.  Note that
37447      LC_ALL is set on the command line.  */
37448   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37449 #endif
37450   /* Check whether in the abbreviation of the second month, the second
37451      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
37452      one byte long. This excludes the UTF-8 encoding.  */
37453   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37454   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
37455 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
37456   /* Check whether the decimal separator is a comma.
37457      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
37458      are nl_langinfo(RADIXCHAR) are both ".".  */
37459   if (localeconv () ->decimal_point[0] != ',') return 1;
37460 #endif
37461   return 0;
37462 }
37463
37464 _ACEOF
37465     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37466   (eval $ac_link) 2>&5
37467   ac_status=$?
37468   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37469   test $ac_status = 0; } && test -s conftest$ac_exeext; then
37470       case "$host_os" in
37471         # Handle native Windows specially, because there setlocale() interprets
37472         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37473         # "fr" or "fra" as "French" or "French_France.1252",
37474         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37475         # "ja" as "Japanese" or "Japanese_Japan.932",
37476         # and similar.
37477         mingw*)
37478           # Test for the native Windows locale name.
37479           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37480             gt_cv_locale_fr=French_France.1252
37481           else
37482             # None found.
37483             gt_cv_locale_fr=none
37484           fi
37485           ;;
37486         *)
37487           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37488           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37489           # configure script would override the LC_ALL setting. Likewise for
37490           # LC_CTYPE, which is also set at the beginning of the configure script.
37491           # Test for the usual locale name.
37492           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37493             gt_cv_locale_fr=fr_FR
37494           else
37495             # Test for the locale name with explicit encoding suffix.
37496             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37497               gt_cv_locale_fr=fr_FR.ISO-8859-1
37498             else
37499               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
37500               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37501                 gt_cv_locale_fr=fr_FR.ISO8859-1
37502               else
37503                 # Test for the HP-UX locale name.
37504                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37505                   gt_cv_locale_fr=fr_FR.iso88591
37506                 else
37507                   # Test for the Solaris 7 locale name.
37508                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37509                     gt_cv_locale_fr=fr
37510                   else
37511                     # None found.
37512                     gt_cv_locale_fr=none
37513                   fi
37514                 fi
37515               fi
37516             fi
37517           fi
37518           ;;
37519       esac
37520     fi
37521     rm -fr conftest*
37522
37523 fi
37524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
37525 $as_echo "$gt_cv_locale_fr" >&6; }
37526   LOCALE_FR=$gt_cv_locale_fr
37527
37528
37529
37530
37531   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
37532 $as_echo_n "checking for a french Unicode locale... " >&6; }
37533 if ${gt_cv_locale_fr_utf8+:} false; then :
37534   $as_echo_n "(cached) " >&6
37535 else
37536
37537     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37538 /* end confdefs.h.  */
37539
37540 #include <locale.h>
37541 #include <time.h>
37542 #if HAVE_LANGINFO_CODESET
37543 # include <langinfo.h>
37544 #endif
37545 #include <stdlib.h>
37546 #include <string.h>
37547 struct tm t;
37548 char buf[16];
37549 int main () {
37550   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
37551      imitates locale dependent behaviour by looking at the environment
37552      variables, and all locales use the UTF-8 encoding.  */
37553 #if !(defined __BEOS__ || defined __HAIKU__)
37554   /* Check whether the given locale name is recognized by the system.  */
37555 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37556   /* On native Windows, setlocale(category, "") looks at the system settings,
37557      not at the environment variables.  Also, when an encoding suffix such
37558      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37559      category of the locale to "C".  */
37560   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37561       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37562     return 1;
37563 # else
37564   if (setlocale (LC_ALL, "") == NULL) return 1;
37565 # endif
37566   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37567      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37568      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37569      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37570      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37571      some unit tests fail.  */
37572 # if HAVE_LANGINFO_CODESET
37573   {
37574     const char *cs = nl_langinfo (CODESET);
37575     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
37576       return 1;
37577   }
37578 # endif
37579 # ifdef __CYGWIN__
37580   /* On Cygwin, avoid locale names without encoding suffix, because the
37581      locale_charset() function relies on the encoding suffix.  Note that
37582      LC_ALL is set on the command line.  */
37583   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37584 # endif
37585   /* Check whether in the abbreviation of the second month, the second
37586      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
37587      two bytes long, with UTF-8 encoding.  */
37588   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37589   if (strftime (buf, sizeof (buf), "%b", &t) < 4
37590       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
37591     return 1;
37592 #endif
37593 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
37594   /* Check whether the decimal separator is a comma.
37595      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
37596      are nl_langinfo(RADIXCHAR) are both ".".  */
37597   if (localeconv () ->decimal_point[0] != ',') return 1;
37598 #endif
37599   return 0;
37600 }
37601
37602 _ACEOF
37603     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37604   (eval $ac_link) 2>&5
37605   ac_status=$?
37606   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37607   test $ac_status = 0; } && test -s conftest$ac_exeext; then
37608       case "$host_os" in
37609         # Handle native Windows specially, because there setlocale() interprets
37610         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37611         # "fr" or "fra" as "French" or "French_France.1252",
37612         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37613         # "ja" as "Japanese" or "Japanese_Japan.932",
37614         # and similar.
37615         mingw*)
37616           # Test for the hypothetical native Windows locale name.
37617           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37618             gt_cv_locale_fr_utf8=French_France.65001
37619           else
37620             # None found.
37621             gt_cv_locale_fr_utf8=none
37622           fi
37623           ;;
37624         *)
37625           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37626           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37627           # configure script would override the LC_ALL setting. Likewise for
37628           # LC_CTYPE, which is also set at the beginning of the configure script.
37629           # Test for the usual locale name.
37630           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37631             gt_cv_locale_fr_utf8=fr_FR
37632           else
37633             # Test for the locale name with explicit encoding suffix.
37634             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37635               gt_cv_locale_fr_utf8=fr_FR.UTF-8
37636             else
37637               # Test for the Solaris 7 locale name.
37638               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37639                 gt_cv_locale_fr_utf8=fr.UTF-8
37640               else
37641                 # None found.
37642                 gt_cv_locale_fr_utf8=none
37643               fi
37644             fi
37645           fi
37646           ;;
37647       esac
37648     fi
37649     rm -fr conftest*
37650
37651 fi
37652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
37653 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
37654   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
37655
37656
37657
37658
37659
37660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
37661 $as_echo_n "checking for a traditional japanese locale... " >&6; }
37662 if ${gt_cv_locale_ja+:} false; then :
37663   $as_echo_n "(cached) " >&6
37664 else
37665
37666     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37667 /* end confdefs.h.  */
37668
37669 #include <locale.h>
37670 #include <time.h>
37671 #if HAVE_LANGINFO_CODESET
37672 # include <langinfo.h>
37673 #endif
37674 #include <stdlib.h>
37675 #include <string.h>
37676 struct tm t;
37677 char buf[16];
37678 int main ()
37679 {
37680   const char *p;
37681   /* Check whether the given locale name is recognized by the system.  */
37682 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37683   /* On native Windows, setlocale(category, "") looks at the system settings,
37684      not at the environment variables.  Also, when an encoding suffix such
37685      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37686      category of the locale to "C".  */
37687   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37688       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37689     return 1;
37690 #else
37691   if (setlocale (LC_ALL, "") == NULL) return 1;
37692 #endif
37693   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37694      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37695      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37696      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37697      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37698      some unit tests fail.
37699      On MirBSD 10, when an unsupported locale is specified, setlocale()
37700      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
37701 #if HAVE_LANGINFO_CODESET
37702   {
37703     const char *cs = nl_langinfo (CODESET);
37704     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37705         || strcmp (cs, "UTF-8") == 0)
37706       return 1;
37707   }
37708 #endif
37709 #ifdef __CYGWIN__
37710   /* On Cygwin, avoid locale names without encoding suffix, because the
37711      locale_charset() function relies on the encoding suffix.  Note that
37712      LC_ALL is set on the command line.  */
37713   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37714 #endif
37715   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
37716      on Cygwin 1.5.x.  */
37717   if (MB_CUR_MAX == 1)
37718     return 1;
37719   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
37720      This excludes the UTF-8 encoding (except on MirBSD).  */
37721   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37722   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
37723   for (p = buf; *p != '\0'; p++)
37724     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
37725       return 1;
37726   return 0;
37727 }
37728
37729 _ACEOF
37730     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37731   (eval $ac_link) 2>&5
37732   ac_status=$?
37733   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37734   test $ac_status = 0; } && test -s conftest$ac_exeext; then
37735       case "$host_os" in
37736         # Handle native Windows specially, because there setlocale() interprets
37737         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37738         # "fr" or "fra" as "French" or "French_France.1252",
37739         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37740         # "ja" as "Japanese" or "Japanese_Japan.932",
37741         # and similar.
37742         mingw*)
37743           # Note that on native Windows, the Japanese locale is
37744           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
37745           # cannot use it here.
37746           gt_cv_locale_ja=none
37747           ;;
37748         *)
37749           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37750           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37751           # configure script would override the LC_ALL setting. Likewise for
37752           # LC_CTYPE, which is also set at the beginning of the configure script.
37753           # Test for the AIX locale name.
37754           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37755             gt_cv_locale_ja=ja_JP
37756           else
37757             # Test for the locale name with explicit encoding suffix.
37758             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37759               gt_cv_locale_ja=ja_JP.EUC-JP
37760             else
37761               # Test for the HP-UX, OSF/1, NetBSD locale name.
37762               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37763                 gt_cv_locale_ja=ja_JP.eucJP
37764               else
37765                 # Test for the IRIX, FreeBSD locale name.
37766                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37767                   gt_cv_locale_ja=ja_JP.EUC
37768                 else
37769                   # Test for the Solaris 7 locale name.
37770                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37771                     gt_cv_locale_ja=ja
37772                   else
37773                     # Special test for NetBSD 1.6.
37774                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
37775                       gt_cv_locale_ja=ja_JP.eucJP
37776                     else
37777                       # None found.
37778                       gt_cv_locale_ja=none
37779                     fi
37780                   fi
37781                 fi
37782               fi
37783             fi
37784           fi
37785           ;;
37786       esac
37787     fi
37788     rm -fr conftest*
37789
37790 fi
37791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
37792 $as_echo "$gt_cv_locale_ja" >&6; }
37793   LOCALE_JA=$gt_cv_locale_ja
37794
37795
37796
37797
37798
37799   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
37800 $as_echo_n "checking for a transitional chinese locale... " >&6; }
37801 if ${gt_cv_locale_zh_CN+:} false; then :
37802   $as_echo_n "(cached) " >&6
37803 else
37804
37805     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37806 /* end confdefs.h.  */
37807
37808 #include <locale.h>
37809 #include <stdlib.h>
37810 #include <time.h>
37811 #if HAVE_LANGINFO_CODESET
37812 # include <langinfo.h>
37813 #endif
37814 #include <stdlib.h>
37815 #include <string.h>
37816 struct tm t;
37817 char buf[16];
37818 int main ()
37819 {
37820   const char *p;
37821   /* Check whether the given locale name is recognized by the system.  */
37822 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
37823   /* On native Windows, setlocale(category, "") looks at the system settings,
37824      not at the environment variables.  Also, when an encoding suffix such
37825      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37826      category of the locale to "C".  */
37827   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37828       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37829     return 1;
37830 #else
37831   if (setlocale (LC_ALL, "") == NULL) return 1;
37832 #endif
37833   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37834      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37835      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37836      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37837      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37838      some unit tests fail.
37839      On MirBSD 10, when an unsupported locale is specified, setlocale()
37840      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
37841 #if HAVE_LANGINFO_CODESET
37842   {
37843     const char *cs = nl_langinfo (CODESET);
37844     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37845         || strcmp (cs, "UTF-8") == 0)
37846       return 1;
37847   }
37848 #endif
37849 #ifdef __CYGWIN__
37850   /* On Cygwin, avoid locale names without encoding suffix, because the
37851      locale_charset() function relies on the encoding suffix.  Note that
37852      LC_ALL is set on the command line.  */
37853   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37854 #endif
37855   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
37856      This excludes the UTF-8 encoding (except on MirBSD).  */
37857   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37858   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
37859   for (p = buf; *p != '\0'; p++)
37860     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
37861       return 1;
37862   /* Check whether a typical GB18030 multibyte sequence is recognized as a
37863      single wide character.  This excludes the GB2312 and GBK encodings.  */
37864   if (mblen ("\203\062\332\066", 5) != 4)
37865     return 1;
37866   return 0;
37867 }
37868
37869 _ACEOF
37870     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37871   (eval $ac_link) 2>&5
37872   ac_status=$?
37873   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37874   test $ac_status = 0; } && test -s conftest$ac_exeext; then
37875       case "$host_os" in
37876         # Handle native Windows specially, because there setlocale() interprets
37877         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37878         # "fr" or "fra" as "French" or "French_France.1252",
37879         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37880         # "ja" as "Japanese" or "Japanese_Japan.932",
37881         # and similar.
37882         mingw*)
37883           # Test for the hypothetical native Windows locale name.
37884           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37885             gt_cv_locale_zh_CN=Chinese_China.54936
37886           else
37887             # None found.
37888             gt_cv_locale_zh_CN=none
37889           fi
37890           ;;
37891         solaris2.8)
37892           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
37893           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
37894           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
37895           gt_cv_locale_zh_CN=none
37896           ;;
37897         *)
37898           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37899           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37900           # configure script would override the LC_ALL setting. Likewise for
37901           # LC_CTYPE, which is also set at the beginning of the configure script.
37902           # Test for the locale name without encoding suffix.
37903           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37904             gt_cv_locale_zh_CN=zh_CN
37905           else
37906             # Test for the locale name with explicit encoding suffix.
37907             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37908               gt_cv_locale_zh_CN=zh_CN.GB18030
37909             else
37910               # None found.
37911               gt_cv_locale_zh_CN=none
37912             fi
37913           fi
37914           ;;
37915       esac
37916     else
37917       # If there was a link error, due to mblen(), the system is so old that
37918       # it certainly doesn't have a chinese locale.
37919       gt_cv_locale_zh_CN=none
37920     fi
37921     rm -fr conftest*
37922
37923 fi
37924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
37925 $as_echo "$gt_cv_locale_zh_CN" >&6; }
37926   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
37927
37928
37929
37930
37931
37932
37933
37934                ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
37935 "
37936 if test "x$ac_cv_have_decl_sleep" = xyes; then :
37937   ac_have_decl=1
37938 else
37939   ac_have_decl=0
37940 fi
37941
37942 cat >>confdefs.h <<_ACEOF
37943 #define HAVE_DECL_SLEEP $ac_have_decl
37944 _ACEOF
37945
37946
37947   if test $ac_cv_have_decl_sleep != yes; then
37948     HAVE_SLEEP=0
37949   else
37950         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
37951 $as_echo_n "checking for working sleep... " >&6; }
37952 if ${gl_cv_func_sleep_works+:} false; then :
37953   $as_echo_n "(cached) " >&6
37954 else
37955   if test "$cross_compiling" = yes; then :
37956   case "$host_os" in
37957                  # Guess yes on glibc systems.
37958          *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
37959                  # If we don't know, assume the worst.
37960          *)      gl_cv_func_sleep_works="guessing no" ;;
37961        esac
37962
37963 else
37964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37965 /* end confdefs.h.  */
37966
37967 #include <errno.h>
37968 #include <unistd.h>
37969 #include <signal.h>
37970 static void
37971 handle_alarm (int sig)
37972 {
37973   if (sig != SIGALRM)
37974     _exit (2);
37975 }
37976
37977 int
37978 main ()
37979 {
37980
37981     /* Failure to compile this test due to missing alarm is okay,
37982        since all such platforms (mingw) also lack sleep.  */
37983     unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
37984     unsigned int remaining;
37985     signal (SIGALRM, handle_alarm);
37986     alarm (1);
37987     remaining = sleep (pentecost);
37988     if (remaining > pentecost)
37989       return 3;
37990     if (remaining <= pentecost - 10)
37991       return 4;
37992     return 0;
37993
37994   ;
37995   return 0;
37996 }
37997 _ACEOF
37998 if ac_fn_c_try_run "$LINENO"; then :
37999   gl_cv_func_sleep_works=yes
38000 else
38001   gl_cv_func_sleep_works=no
38002 fi
38003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38004   conftest.$ac_objext conftest.beam conftest.$ac_ext
38005 fi
38006
38007 fi
38008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
38009 $as_echo "$gl_cv_func_sleep_works" >&6; }
38010     case "$gl_cv_func_sleep_works" in
38011       *yes) ;;
38012       *)
38013         REPLACE_SLEEP=1
38014         ;;
38015     esac
38016   fi
38017
38018   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
38019
38020
38021
38022
38023
38024
38025
38026
38027   M4tests_LIBOBJS="$M4tests_LIBOBJS sleep.$ac_objext"
38028
38029   fi
38030
38031
38032
38033
38034
38035     if test "$GNULIB_SLEEP" != 1; then
38036         if test "$GNULIB_SLEEP" = 0; then
38037       GNULIB_SLEEP=$gl_module_indicator_condition
38038     else
38039       GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
38040     fi
38041   fi
38042
38043
38044
38045
38046
38047 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
38048
38049
38050
38051
38052
38053
38054
38055
38056
38057
38058   if test $ac_cv_func_strdup = yes; then
38059     if test $gl_cv_func_malloc_posix != yes; then
38060       REPLACE_STRDUP=1
38061     fi
38062   fi
38063
38064   if test $ac_cv_have_decl_strdup = no; then
38065     HAVE_DECL_STRDUP=0
38066   fi
38067
38068   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
38069
38070
38071
38072
38073
38074
38075
38076
38077   M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
38078
38079     :
38080   fi
38081
38082
38083
38084
38085
38086     if test "$GNULIB_STRDUP" != 1; then
38087         if test "$GNULIB_STRDUP" = 0; then
38088       GNULIB_STRDUP=$gl_module_indicator_condition
38089     else
38090       GNULIB_STRDUP="($GNULIB_STRDUP || $gl_module_indicator_condition)"
38091     fi
38092   fi
38093
38094
38095
38096
38097
38098 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
38099
38100
38101
38102
38103
38104
38105   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
38106   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
38107   # irrelevant for anonymous mappings.
38108   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
38109 if test "x$ac_cv_func_mmap" = xyes; then :
38110   gl_have_mmap=yes
38111 else
38112   gl_have_mmap=no
38113 fi
38114
38115
38116   # Try to allow MAP_ANONYMOUS.
38117   gl_have_mmap_anonymous=no
38118   if test $gl_have_mmap = yes; then
38119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
38120 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
38121     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38122 /* end confdefs.h.  */
38123
38124 #include <sys/mman.h>
38125 #ifdef MAP_ANONYMOUS
38126     I cannot identify this map
38127 #endif
38128
38129 _ACEOF
38130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38131   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38132   gl_have_mmap_anonymous=yes
38133 fi
38134 rm -f conftest*
38135
38136     if test $gl_have_mmap_anonymous != yes; then
38137       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38138 /* end confdefs.h.  */
38139
38140 #include <sys/mman.h>
38141 #ifdef MAP_ANON
38142     I cannot identify this map
38143 #endif
38144
38145 _ACEOF
38146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38147   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38148
38149 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
38150
38151          gl_have_mmap_anonymous=yes
38152 fi
38153 rm -f conftest*
38154
38155     fi
38156     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
38157 $as_echo "$gl_have_mmap_anonymous" >&6; }
38158     if test $gl_have_mmap_anonymous = yes; then
38159
38160 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
38161
38162     fi
38163   fi
38164
38165
38166
38167
38168
38169
38170
38171   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
38172   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
38173   # irrelevant for anonymous mappings.
38174   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
38175 if test "x$ac_cv_func_mmap" = xyes; then :
38176   gl_have_mmap=yes
38177 else
38178   gl_have_mmap=no
38179 fi
38180
38181
38182   # Try to allow MAP_ANONYMOUS.
38183   gl_have_mmap_anonymous=no
38184   if test $gl_have_mmap = yes; then
38185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
38186 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
38187     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38188 /* end confdefs.h.  */
38189
38190 #include <sys/mman.h>
38191 #ifdef MAP_ANONYMOUS
38192     I cannot identify this map
38193 #endif
38194
38195 _ACEOF
38196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38197   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38198   gl_have_mmap_anonymous=yes
38199 fi
38200 rm -f conftest*
38201
38202     if test $gl_have_mmap_anonymous != yes; then
38203       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38204 /* end confdefs.h.  */
38205
38206 #include <sys/mman.h>
38207 #ifdef MAP_ANON
38208     I cannot identify this map
38209 #endif
38210
38211 _ACEOF
38212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38213   $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
38214
38215 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
38216
38217          gl_have_mmap_anonymous=yes
38218 fi
38219 rm -f conftest*
38220
38221     fi
38222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
38223 $as_echo "$gl_have_mmap_anonymous" >&6; }
38224     if test $gl_have_mmap_anonymous = yes; then
38225
38226 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
38227
38228     fi
38229   fi
38230
38231
38232
38233
38234
38235
38236         if test $ac_cv_func_symlink = no; then
38237     HAVE_SYMLINK=0
38238   else
38239     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
38240 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
38241 if ${gl_cv_func_symlink_works+:} false; then :
38242   $as_echo_n "(cached) " >&6
38243 else
38244   if test "$cross_compiling" = yes; then :
38245   case "$host_os" in
38246                     # Guess yes on glibc systems.
38247             *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
38248                     # If we don't know, assume the worst.
38249             *)      gl_cv_func_symlink_works="guessing no" ;;
38250           esac
38251
38252 else
38253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38254 /* end confdefs.h.  */
38255 #include <unistd.h>
38256
38257 int
38258 main ()
38259 {
38260 int result = 0;
38261              if (!symlink ("a", "conftest.link/"))
38262                result |= 1;
38263              if (symlink ("conftest.f", "conftest.lnk2"))
38264                result |= 2;
38265              else if (!symlink ("a", "conftest.lnk2/"))
38266                result |= 4;
38267              return result;
38268
38269   ;
38270   return 0;
38271 }
38272 _ACEOF
38273 if ac_fn_c_try_run "$LINENO"; then :
38274   gl_cv_func_symlink_works=yes
38275 else
38276   gl_cv_func_symlink_works=no
38277 fi
38278 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38279   conftest.$ac_objext conftest.beam conftest.$ac_ext
38280 fi
38281
38282       rm -f conftest.f conftest.link conftest.lnk2
38283 fi
38284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
38285 $as_echo "$gl_cv_func_symlink_works" >&6; }
38286     case "$gl_cv_func_symlink_works" in
38287       *yes) ;;
38288       *)
38289         REPLACE_SYMLINK=1
38290         ;;
38291     esac
38292   fi
38293
38294   if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
38295
38296
38297
38298
38299
38300
38301
38302
38303   M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
38304
38305   fi
38306
38307
38308
38309
38310
38311     if test "$GNULIB_SYMLINK" != 1; then
38312         if test "$GNULIB_SYMLINK" = 0; then
38313       GNULIB_SYMLINK=$gl_module_indicator_condition
38314     else
38315       GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
38316     fi
38317   fi
38318
38319
38320
38321
38322
38323 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
38324
38325
38326
38327
38328
38329
38330   if test $ac_cv_have_decl_unsetenv = no; then
38331     HAVE_DECL_UNSETENV=0
38332   fi
38333   for ac_func in unsetenv
38334 do :
38335   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
38336 if test "x$ac_cv_func_unsetenv" = xyes; then :
38337   cat >>confdefs.h <<_ACEOF
38338 #define HAVE_UNSETENV 1
38339 _ACEOF
38340
38341 fi
38342 done
38343
38344   if test $ac_cv_func_unsetenv = no; then
38345     HAVE_UNSETENV=0
38346   else
38347     HAVE_UNSETENV=1
38348         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
38349 $as_echo_n "checking for unsetenv() return type... " >&6; }
38350 if ${gt_cv_func_unsetenv_ret+:} false; then :
38351   $as_echo_n "(cached) " >&6
38352 else
38353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38354 /* end confdefs.h.  */
38355
38356 #undef _BSD
38357 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
38358 #include <stdlib.h>
38359 extern
38360 #ifdef __cplusplus
38361 "C"
38362 #endif
38363 int unsetenv (const char *name);
38364
38365 int
38366 main ()
38367 {
38368
38369   ;
38370   return 0;
38371 }
38372 _ACEOF
38373 if ac_fn_c_try_compile "$LINENO"; then :
38374   gt_cv_func_unsetenv_ret='int'
38375 else
38376   gt_cv_func_unsetenv_ret='void'
38377 fi
38378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38379 fi
38380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
38381 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
38382     if test $gt_cv_func_unsetenv_ret = 'void'; then
38383
38384 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
38385
38386       REPLACE_UNSETENV=1
38387     fi
38388
38389                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
38390 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
38391 if ${gl_cv_func_unsetenv_works+:} false; then :
38392   $as_echo_n "(cached) " >&6
38393 else
38394   if test "$cross_compiling" = yes; then :
38395   case "$host_os" in
38396                  # Guess yes on glibc systems.
38397          *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
38398                  # If we don't know, assume the worst.
38399          *)      gl_cv_func_unsetenv_works="guessing no" ;;
38400        esac
38401
38402 else
38403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38404 /* end confdefs.h.  */
38405
38406        #include <stdlib.h>
38407        #include <errno.h>
38408        extern char **environ;
38409
38410 int
38411 main ()
38412 {
38413
38414        char entry1[] = "a=1";
38415        char entry2[] = "b=2";
38416        char *env[] = { entry1, entry2, NULL };
38417        if (putenv ((char *) "a=1")) return 1;
38418        if (putenv (entry2)) return 2;
38419        entry2[0] = 'a';
38420        unsetenv ("a");
38421        if (getenv ("a")) return 3;
38422        if (!unsetenv ("") || errno != EINVAL) return 4;
38423        entry2[0] = 'b';
38424        environ = env;
38425        if (!getenv ("a")) return 5;
38426        entry2[0] = 'a';
38427        unsetenv ("a");
38428        if (getenv ("a")) return 6;
38429
38430   ;
38431   return 0;
38432 }
38433 _ACEOF
38434 if ac_fn_c_try_run "$LINENO"; then :
38435   gl_cv_func_unsetenv_works=yes
38436 else
38437   gl_cv_func_unsetenv_works=no
38438 fi
38439 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38440   conftest.$ac_objext conftest.beam conftest.$ac_ext
38441 fi
38442
38443 fi
38444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
38445 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
38446     case "$gl_cv_func_unsetenv_works" in
38447       *yes) ;;
38448       *)
38449         REPLACE_UNSETENV=1
38450         ;;
38451     esac
38452   fi
38453
38454   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
38455
38456
38457
38458
38459
38460
38461
38462
38463   M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
38464
38465
38466
38467
38468
38469   fi
38470
38471
38472
38473
38474
38475     if test "$GNULIB_UNSETENV" != 1; then
38476         if test "$GNULIB_UNSETENV" = 0; then
38477       GNULIB_UNSETENV=$gl_module_indicator_condition
38478     else
38479       GNULIB_UNSETENV="($GNULIB_UNSETENV || $gl_module_indicator_condition)"
38480     fi
38481   fi
38482
38483
38484
38485
38486
38487 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
38488
38489
38490
38491   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
38492
38493
38494   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
38495
38496
38497
38498
38499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
38500 $as_echo_n "checking for a traditional french locale... " >&6; }
38501 if ${gt_cv_locale_fr+:} false; then :
38502   $as_echo_n "(cached) " >&6
38503 else
38504
38505     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38506 /* end confdefs.h.  */
38507
38508 #include <locale.h>
38509 #include <time.h>
38510 #if HAVE_LANGINFO_CODESET
38511 # include <langinfo.h>
38512 #endif
38513 #include <stdlib.h>
38514 #include <string.h>
38515 struct tm t;
38516 char buf[16];
38517 int main () {
38518   /* Check whether the given locale name is recognized by the system.  */
38519 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38520   /* On native Windows, setlocale(category, "") looks at the system settings,
38521      not at the environment variables.  Also, when an encoding suffix such
38522      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38523      category of the locale to "C".  */
38524   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38525       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38526     return 1;
38527 #else
38528   if (setlocale (LC_ALL, "") == NULL) return 1;
38529 #endif
38530   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38531      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38532      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38533      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38534      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38535      some unit tests fail.
38536      On MirBSD 10, when an unsupported locale is specified, setlocale()
38537      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
38538 #if HAVE_LANGINFO_CODESET
38539   {
38540     const char *cs = nl_langinfo (CODESET);
38541     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38542         || strcmp (cs, "UTF-8") == 0)
38543       return 1;
38544   }
38545 #endif
38546 #ifdef __CYGWIN__
38547   /* On Cygwin, avoid locale names without encoding suffix, because the
38548      locale_charset() function relies on the encoding suffix.  Note that
38549      LC_ALL is set on the command line.  */
38550   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38551 #endif
38552   /* Check whether in the abbreviation of the second month, the second
38553      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
38554      one byte long. This excludes the UTF-8 encoding.  */
38555   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38556   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
38557 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
38558   /* Check whether the decimal separator is a comma.
38559      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38560      are nl_langinfo(RADIXCHAR) are both ".".  */
38561   if (localeconv () ->decimal_point[0] != ',') return 1;
38562 #endif
38563   return 0;
38564 }
38565
38566 _ACEOF
38567     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38568   (eval $ac_link) 2>&5
38569   ac_status=$?
38570   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38571   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38572       case "$host_os" in
38573         # Handle native Windows specially, because there setlocale() interprets
38574         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38575         # "fr" or "fra" as "French" or "French_France.1252",
38576         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38577         # "ja" as "Japanese" or "Japanese_Japan.932",
38578         # and similar.
38579         mingw*)
38580           # Test for the native Windows locale name.
38581           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38582             gt_cv_locale_fr=French_France.1252
38583           else
38584             # None found.
38585             gt_cv_locale_fr=none
38586           fi
38587           ;;
38588         *)
38589           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38590           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38591           # configure script would override the LC_ALL setting. Likewise for
38592           # LC_CTYPE, which is also set at the beginning of the configure script.
38593           # Test for the usual locale name.
38594           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38595             gt_cv_locale_fr=fr_FR
38596           else
38597             # Test for the locale name with explicit encoding suffix.
38598             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38599               gt_cv_locale_fr=fr_FR.ISO-8859-1
38600             else
38601               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
38602               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38603                 gt_cv_locale_fr=fr_FR.ISO8859-1
38604               else
38605                 # Test for the HP-UX locale name.
38606                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38607                   gt_cv_locale_fr=fr_FR.iso88591
38608                 else
38609                   # Test for the Solaris 7 locale name.
38610                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38611                     gt_cv_locale_fr=fr
38612                   else
38613                     # None found.
38614                     gt_cv_locale_fr=none
38615                   fi
38616                 fi
38617               fi
38618             fi
38619           fi
38620           ;;
38621       esac
38622     fi
38623     rm -fr conftest*
38624
38625 fi
38626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
38627 $as_echo "$gt_cv_locale_fr" >&6; }
38628   LOCALE_FR=$gt_cv_locale_fr
38629
38630
38631
38632
38633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
38634 $as_echo_n "checking for a french Unicode locale... " >&6; }
38635 if ${gt_cv_locale_fr_utf8+:} false; then :
38636   $as_echo_n "(cached) " >&6
38637 else
38638
38639     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38640 /* end confdefs.h.  */
38641
38642 #include <locale.h>
38643 #include <time.h>
38644 #if HAVE_LANGINFO_CODESET
38645 # include <langinfo.h>
38646 #endif
38647 #include <stdlib.h>
38648 #include <string.h>
38649 struct tm t;
38650 char buf[16];
38651 int main () {
38652   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
38653      imitates locale dependent behaviour by looking at the environment
38654      variables, and all locales use the UTF-8 encoding.  */
38655 #if !(defined __BEOS__ || defined __HAIKU__)
38656   /* Check whether the given locale name is recognized by the system.  */
38657 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38658   /* On native Windows, setlocale(category, "") looks at the system settings,
38659      not at the environment variables.  Also, when an encoding suffix such
38660      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38661      category of the locale to "C".  */
38662   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38663       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38664     return 1;
38665 # else
38666   if (setlocale (LC_ALL, "") == NULL) return 1;
38667 # endif
38668   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38669      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38670      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38671      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38672      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38673      some unit tests fail.  */
38674 # if HAVE_LANGINFO_CODESET
38675   {
38676     const char *cs = nl_langinfo (CODESET);
38677     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
38678       return 1;
38679   }
38680 # endif
38681 # ifdef __CYGWIN__
38682   /* On Cygwin, avoid locale names without encoding suffix, because the
38683      locale_charset() function relies on the encoding suffix.  Note that
38684      LC_ALL is set on the command line.  */
38685   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38686 # endif
38687   /* Check whether in the abbreviation of the second month, the second
38688      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
38689      two bytes long, with UTF-8 encoding.  */
38690   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38691   if (strftime (buf, sizeof (buf), "%b", &t) < 4
38692       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
38693     return 1;
38694 #endif
38695 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
38696   /* Check whether the decimal separator is a comma.
38697      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
38698      are nl_langinfo(RADIXCHAR) are both ".".  */
38699   if (localeconv () ->decimal_point[0] != ',') return 1;
38700 #endif
38701   return 0;
38702 }
38703
38704 _ACEOF
38705     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38706   (eval $ac_link) 2>&5
38707   ac_status=$?
38708   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38709   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38710       case "$host_os" in
38711         # Handle native Windows specially, because there setlocale() interprets
38712         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38713         # "fr" or "fra" as "French" or "French_France.1252",
38714         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38715         # "ja" as "Japanese" or "Japanese_Japan.932",
38716         # and similar.
38717         mingw*)
38718           # Test for the hypothetical native Windows locale name.
38719           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38720             gt_cv_locale_fr_utf8=French_France.65001
38721           else
38722             # None found.
38723             gt_cv_locale_fr_utf8=none
38724           fi
38725           ;;
38726         *)
38727           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38728           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38729           # configure script would override the LC_ALL setting. Likewise for
38730           # LC_CTYPE, which is also set at the beginning of the configure script.
38731           # Test for the usual locale name.
38732           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38733             gt_cv_locale_fr_utf8=fr_FR
38734           else
38735             # Test for the locale name with explicit encoding suffix.
38736             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38737               gt_cv_locale_fr_utf8=fr_FR.UTF-8
38738             else
38739               # Test for the Solaris 7 locale name.
38740               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38741                 gt_cv_locale_fr_utf8=fr.UTF-8
38742               else
38743                 # None found.
38744                 gt_cv_locale_fr_utf8=none
38745               fi
38746             fi
38747           fi
38748           ;;
38749       esac
38750     fi
38751     rm -fr conftest*
38752
38753 fi
38754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
38755 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
38756   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
38757
38758
38759
38760
38761
38762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
38763 $as_echo_n "checking for a traditional japanese locale... " >&6; }
38764 if ${gt_cv_locale_ja+:} false; then :
38765   $as_echo_n "(cached) " >&6
38766 else
38767
38768     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38769 /* end confdefs.h.  */
38770
38771 #include <locale.h>
38772 #include <time.h>
38773 #if HAVE_LANGINFO_CODESET
38774 # include <langinfo.h>
38775 #endif
38776 #include <stdlib.h>
38777 #include <string.h>
38778 struct tm t;
38779 char buf[16];
38780 int main ()
38781 {
38782   const char *p;
38783   /* Check whether the given locale name is recognized by the system.  */
38784 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38785   /* On native Windows, setlocale(category, "") looks at the system settings,
38786      not at the environment variables.  Also, when an encoding suffix such
38787      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38788      category of the locale to "C".  */
38789   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38790       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38791     return 1;
38792 #else
38793   if (setlocale (LC_ALL, "") == NULL) return 1;
38794 #endif
38795   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38796      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38797      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38798      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38799      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38800      some unit tests fail.
38801      On MirBSD 10, when an unsupported locale is specified, setlocale()
38802      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
38803 #if HAVE_LANGINFO_CODESET
38804   {
38805     const char *cs = nl_langinfo (CODESET);
38806     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38807         || strcmp (cs, "UTF-8") == 0)
38808       return 1;
38809   }
38810 #endif
38811 #ifdef __CYGWIN__
38812   /* On Cygwin, avoid locale names without encoding suffix, because the
38813      locale_charset() function relies on the encoding suffix.  Note that
38814      LC_ALL is set on the command line.  */
38815   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38816 #endif
38817   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
38818      on Cygwin 1.5.x.  */
38819   if (MB_CUR_MAX == 1)
38820     return 1;
38821   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
38822      This excludes the UTF-8 encoding (except on MirBSD).  */
38823   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38824   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
38825   for (p = buf; *p != '\0'; p++)
38826     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
38827       return 1;
38828   return 0;
38829 }
38830
38831 _ACEOF
38832     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38833   (eval $ac_link) 2>&5
38834   ac_status=$?
38835   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38836   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38837       case "$host_os" in
38838         # Handle native Windows specially, because there setlocale() interprets
38839         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38840         # "fr" or "fra" as "French" or "French_France.1252",
38841         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38842         # "ja" as "Japanese" or "Japanese_Japan.932",
38843         # and similar.
38844         mingw*)
38845           # Note that on native Windows, the Japanese locale is
38846           # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
38847           # cannot use it here.
38848           gt_cv_locale_ja=none
38849           ;;
38850         *)
38851           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
38852           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
38853           # configure script would override the LC_ALL setting. Likewise for
38854           # LC_CTYPE, which is also set at the beginning of the configure script.
38855           # Test for the AIX locale name.
38856           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38857             gt_cv_locale_ja=ja_JP
38858           else
38859             # Test for the locale name with explicit encoding suffix.
38860             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38861               gt_cv_locale_ja=ja_JP.EUC-JP
38862             else
38863               # Test for the HP-UX, OSF/1, NetBSD locale name.
38864               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38865                 gt_cv_locale_ja=ja_JP.eucJP
38866               else
38867                 # Test for the IRIX, FreeBSD locale name.
38868                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38869                   gt_cv_locale_ja=ja_JP.EUC
38870                 else
38871                   # Test for the Solaris 7 locale name.
38872                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38873                     gt_cv_locale_ja=ja
38874                   else
38875                     # Special test for NetBSD 1.6.
38876                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
38877                       gt_cv_locale_ja=ja_JP.eucJP
38878                     else
38879                       # None found.
38880                       gt_cv_locale_ja=none
38881                     fi
38882                   fi
38883                 fi
38884               fi
38885             fi
38886           fi
38887           ;;
38888       esac
38889     fi
38890     rm -fr conftest*
38891
38892 fi
38893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
38894 $as_echo "$gt_cv_locale_ja" >&6; }
38895   LOCALE_JA=$gt_cv_locale_ja
38896
38897
38898
38899
38900
38901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
38902 $as_echo_n "checking for a transitional chinese locale... " >&6; }
38903 if ${gt_cv_locale_zh_CN+:} false; then :
38904   $as_echo_n "(cached) " >&6
38905 else
38906
38907     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38908 /* end confdefs.h.  */
38909
38910 #include <locale.h>
38911 #include <stdlib.h>
38912 #include <time.h>
38913 #if HAVE_LANGINFO_CODESET
38914 # include <langinfo.h>
38915 #endif
38916 #include <stdlib.h>
38917 #include <string.h>
38918 struct tm t;
38919 char buf[16];
38920 int main ()
38921 {
38922   const char *p;
38923   /* Check whether the given locale name is recognized by the system.  */
38924 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
38925   /* On native Windows, setlocale(category, "") looks at the system settings,
38926      not at the environment variables.  Also, when an encoding suffix such
38927      as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
38928      category of the locale to "C".  */
38929   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
38930       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
38931     return 1;
38932 #else
38933   if (setlocale (LC_ALL, "") == NULL) return 1;
38934 #endif
38935   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
38936      On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
38937      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
38938      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
38939      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
38940      some unit tests fail.
38941      On MirBSD 10, when an unsupported locale is specified, setlocale()
38942      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
38943 #if HAVE_LANGINFO_CODESET
38944   {
38945     const char *cs = nl_langinfo (CODESET);
38946     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
38947         || strcmp (cs, "UTF-8") == 0)
38948       return 1;
38949   }
38950 #endif
38951 #ifdef __CYGWIN__
38952   /* On Cygwin, avoid locale names without encoding suffix, because the
38953      locale_charset() function relies on the encoding suffix.  Note that
38954      LC_ALL is set on the command line.  */
38955   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
38956 #endif
38957   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
38958      This excludes the UTF-8 encoding (except on MirBSD).  */
38959   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
38960   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
38961   for (p = buf; *p != '\0'; p++)
38962     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
38963       return 1;
38964   /* Check whether a typical GB18030 multibyte sequence is recognized as a
38965      single wide character.  This excludes the GB2312 and GBK encodings.  */
38966   if (mblen ("\203\062\332\066", 5) != 4)
38967     return 1;
38968   return 0;
38969 }
38970
38971 _ACEOF
38972     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
38973   (eval $ac_link) 2>&5
38974   ac_status=$?
38975   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38976   test $ac_status = 0; } && test -s conftest$ac_exeext; then
38977       case "$host_os" in
38978         # Handle native Windows specially, because there setlocale() interprets
38979         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
38980         # "fr" or "fra" as "French" or "French_France.1252",
38981         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
38982         # "ja" as "Japanese" or "Japanese_Japan.932",
38983         # and similar.
38984         mingw*)
38985           # Test for the hypothetical native Windows locale name.
38986           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
38987             gt_cv_locale_zh_CN=Chinese_China.54936
38988           else
38989             # None found.
38990             gt_cv_locale_zh_CN=none
38991           fi
38992           ;;
38993         solaris2.8)
38994           # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
38995           # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
38996           # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
38997           gt_cv_locale_zh_CN=none
38998           ;;
38999         *)
39000           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39001           # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39002           # configure script would override the LC_ALL setting. Likewise for
39003           # LC_CTYPE, which is also set at the beginning of the configure script.
39004           # Test for the locale name without encoding suffix.
39005           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39006             gt_cv_locale_zh_CN=zh_CN
39007           else
39008             # Test for the locale name with explicit encoding suffix.
39009             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39010               gt_cv_locale_zh_CN=zh_CN.GB18030
39011             else
39012               # None found.
39013               gt_cv_locale_zh_CN=none
39014             fi
39015           fi
39016           ;;
39017       esac
39018     else
39019       # If there was a link error, due to mblen(), the system is so old that
39020       # it certainly doesn't have a chinese locale.
39021       gt_cv_locale_zh_CN=none
39022     fi
39023     rm -fr conftest*
39024
39025 fi
39026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
39027 $as_echo "$gt_cv_locale_zh_CN" >&6; }
39028   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
39029
39030
39031
39032
39033
39034
39035   if test $ac_cv_func_wctob = no; then
39036     HAVE_WCTOB=0
39037     HAVE_DECL_WCTOB=0
39038   else
39039     HAVE_WCTOB=1
39040
39041
39042
39043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
39044 $as_echo_n "checking whether wctob works... " >&6; }
39045 if ${gl_cv_func_wctob_works+:} false; then :
39046   $as_echo_n "(cached) " >&6
39047 else
39048
39049                         case "$host_os" in
39050             # Guess no on Solaris <= 9 and Cygwin.
39051           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
39052             gl_cv_func_wctob_works="guessing no" ;;
39053             # Guess yes otherwise.
39054           *) gl_cv_func_wctob_works="guessing yes" ;;
39055         esac
39056         case "$host_os" in
39057           cygwin*)
39058             if test "$cross_compiling" = yes; then :
39059   :
39060 else
39061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39062 /* end confdefs.h.  */
39063
39064 #include <locale.h>
39065 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39066    <wchar.h>.
39067    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
39068    included before <wchar.h>.  */
39069 #include <stddef.h>
39070 #include <stdio.h>
39071 #include <time.h>
39072 #include <wchar.h>
39073
39074 register long global __asm__ ("%ebx");
39075
39076 int main ()
39077 {
39078   setlocale (LC_ALL, "en_US.UTF-8");
39079
39080   global = 0x12345678;
39081   if (wctob (0x00FC) != -1)
39082     return 1;
39083   if (global != 0x12345678)
39084     return 2;
39085   return 0;
39086 }
39087 _ACEOF
39088 if ac_fn_c_try_run "$LINENO"; then :
39089   :
39090 else
39091   gl_cv_func_wctob_works=no
39092 fi
39093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39094   conftest.$ac_objext conftest.beam conftest.$ac_ext
39095 fi
39096
39097             ;;
39098         esac
39099         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
39100           if test "$cross_compiling" = yes; then :
39101   :
39102 else
39103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39104 /* end confdefs.h.  */
39105
39106 #include <locale.h>
39107 #include <string.h>
39108 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39109    <wchar.h>.
39110    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
39111    included before <wchar.h>.  */
39112 #include <stddef.h>
39113 #include <stdio.h>
39114 #include <time.h>
39115 #include <wchar.h>
39116 int main ()
39117 {
39118   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
39119     {
39120       wchar_t wc;
39121
39122       if (mbtowc (&wc, "\374", 1) == 1)
39123         if (wctob (wc) != (unsigned char) '\374')
39124           return 1;
39125     }
39126   return 0;
39127 }
39128 _ACEOF
39129 if ac_fn_c_try_run "$LINENO"; then :
39130   gl_cv_func_wctob_works=yes
39131 else
39132   gl_cv_func_wctob_works=no
39133 fi
39134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39135   conftest.$ac_objext conftest.beam conftest.$ac_ext
39136 fi
39137
39138         fi
39139
39140 fi
39141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
39142 $as_echo "$gl_cv_func_wctob_works" >&6; }
39143     case "$gl_cv_func_wctob_works" in
39144       *yes) ;;
39145       *) REPLACE_WCTOB=1 ;;
39146     esac
39147     if test $REPLACE_WCTOB = 0; then
39148
39149             ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
39150 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39151    <wchar.h>.
39152    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
39153    before <wchar.h>.  */
39154 #include <stddef.h>
39155 #include <stdio.h>
39156 #include <time.h>
39157 #include <wchar.h>
39158
39159 "
39160 if test "x$ac_cv_have_decl_wctob" = xyes; then :
39161   ac_have_decl=1
39162 else
39163   ac_have_decl=0
39164 fi
39165
39166 cat >>confdefs.h <<_ACEOF
39167 #define HAVE_DECL_WCTOB $ac_have_decl
39168 _ACEOF
39169
39170       if test $ac_cv_have_decl_wctob != yes; then
39171         HAVE_DECL_WCTOB=0
39172       fi
39173     fi
39174   fi
39175
39176   if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
39177
39178
39179
39180
39181
39182
39183
39184
39185   M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
39186
39187
39188   :
39189
39190   fi
39191
39192
39193
39194
39195
39196     if test "$GNULIB_WCTOB" != 1; then
39197         if test "$GNULIB_WCTOB" = 0; then
39198       GNULIB_WCTOB=$gl_module_indicator_condition
39199     else
39200       GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
39201     fi
39202   fi
39203
39204
39205
39206
39207
39208 $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
39209
39210
39211
39212
39213
39214
39215   if false; then
39216     REPLACE_WCTOMB=1
39217   fi
39218
39219   if test $REPLACE_WCTOMB = 1; then
39220
39221
39222
39223
39224
39225
39226
39227
39228   M4tests_LIBOBJS="$M4tests_LIBOBJS wctomb.$ac_objext"
39229
39230
39231   :
39232
39233   fi
39234
39235
39236
39237
39238
39239     if test "$GNULIB_WCTOMB" != 1; then
39240         if test "$GNULIB_WCTOMB" = 0; then
39241       GNULIB_WCTOMB=$gl_module_indicator_condition
39242     else
39243       GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
39244     fi
39245   fi
39246
39247
39248
39249
39250
39251 $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
39252
39253
39254
39255
39256
39257
39258   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
39259     REPLACE_WRITE=1
39260   fi
39261
39262
39263
39264
39265     if test $gl_cv_header_signal_h_SIGPIPE != yes; then
39266       REPLACE_WRITE=1
39267     fi
39268
39269
39270
39271   if test $REPLACE_WRITE = 1; then
39272
39273
39274
39275
39276
39277
39278
39279
39280   M4tests_LIBOBJS="$M4tests_LIBOBJS write.$ac_objext"
39281
39282     :
39283   fi
39284
39285
39286
39287
39288
39289     if test "$GNULIB_WRITE" != 1; then
39290         if test "$GNULIB_WRITE" = 0; then
39291       GNULIB_WRITE=$gl_module_indicator_condition
39292     else
39293       GNULIB_WRITE="($GNULIB_WRITE || $gl_module_indicator_condition)"
39294     fi
39295   fi
39296
39297
39298
39299
39300
39301 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
39302
39303
39304
39305
39306
39307
39308
39309
39310
39311
39312
39313
39314
39315   LIBM4_LIBDEPS="$gl_libdeps"
39316
39317   LIBM4_LTLIBDEPS="$gl_ltlibdeps"
39318
39319   LIBTESTS_LIBDEPS="$gltests_libdeps"
39320
39321
39322
39323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
39324 $as_echo_n "checking whether an open file can be renamed... " >&6; }
39325 if ${M4_cv_func_rename_open_file_works+:} false; then :
39326   $as_echo_n "(cached) " >&6
39327 else
39328   if test "$cross_compiling" = yes; then :
39329   M4_cv_func_rename_open_file_works='guessing no'
39330 else
39331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39332 /* end confdefs.h.  */
39333 $ac_includes_default
39334 int
39335 main ()
39336 {
39337 FILE *f = fopen ("conftest.1", "w+");
39338        int result = rename ("conftest.1", "conftest.2");
39339        fclose (f); remove ("conftest.1"); remove ("conftest.2");
39340        return result;
39341   ;
39342   return 0;
39343 }
39344 _ACEOF
39345 if ac_fn_c_try_run "$LINENO"; then :
39346   M4_cv_func_rename_open_file_works=yes
39347 else
39348   M4_cv_func_rename_open_file_works=no
39349 fi
39350 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39351   conftest.$ac_objext conftest.beam conftest.$ac_ext
39352 fi
39353
39354 fi
39355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
39356 $as_echo "$M4_cv_func_rename_open_file_works" >&6; }
39357 if test "$M4_cv_func_rename_open_file_works" = yes ; then
39358   M4_rename_open_works=1
39359 else
39360   M4_rename_open_works=0
39361 fi
39362
39363 cat >>confdefs.h <<_ACEOF
39364 #define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
39365 _ACEOF
39366
39367
39368
39369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if changeword is wanted" >&5
39370 $as_echo_n "checking if changeword is wanted... " >&6; }
39371 # Check whether --enable-changeword was given.
39372 if test "${enable_changeword+set}" = set; then :
39373   enableval=$enable_changeword; if test "$enableval" = yes; then
39374     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39375 $as_echo "yes" >&6; }
39376
39377 $as_echo "#define ENABLE_CHANGEWORD 1" >>confdefs.h
39378
39379   else
39380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39381 $as_echo "no" >&6; }
39382   fi
39383 else
39384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39385 $as_echo "no" >&6; }
39386 fi
39387
39388
39389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
39390 $as_echo_n "checking which shell to use for syscmd... " >&6; }
39391
39392 # Check whether --with-syscmd-shell was given.
39393 if test "${with_syscmd_shell+set}" = set; then :
39394   withval=$with_syscmd_shell; case $withval in
39395     yes) with_syscmd_shell=no;;
39396    esac
39397 else
39398   with_syscmd_shell=no
39399 fi
39400
39401 if test "$with_syscmd_shell" = no ; then
39402   with_syscmd_shell=/bin/sh
39403   if test "$cross_compiling" != yes ; then
39404     if as_fn_executable_p /bin/sh; then :
39405
39406 else
39407   if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
39408 fi
39409     M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39410     for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
39411         command -p getconf PATH
39412       else
39413         echo "/bin$PATH_SEPARATOR$PATH"
39414       fi`
39415     do
39416       IFS=$M4_save_IFS
39417       test -z "$M4_dir" && continue
39418       as_fn_executable_p "$M4_dir/sh" \
39419         && { with_syscmd_shell=$M4_dir/sh; break; }
39420     done
39421     IFS=$M4_save_IFS
39422   fi
39423 fi
39424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
39425 $as_echo "$with_syscmd_shell" >&6; }
39426
39427 cat >>confdefs.h <<_ACEOF
39428 #define SYSCMD_SHELL "$with_syscmd_shell"
39429 _ACEOF
39430
39431
39432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
39433 $as_echo_n "checking if malloc debugging is wanted... " >&6; }
39434
39435 # Check whether --with-dmalloc was given.
39436 if test "${with_dmalloc+set}" = set; then :
39437   withval=$with_dmalloc; if test "$withval" = yes; then
39438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39439 $as_echo "yes" >&6; }
39440
39441 $as_echo "#define WITH_DMALLOC 1" >>confdefs.h
39442
39443   LIBS="$LIBS -ldmalloc"
39444   LDFLAGS="$LDFLAGS -g"
39445 else
39446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39447 $as_echo "no" >&6; }
39448 fi
39449 else
39450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39451 $as_echo "no" >&6; }
39452 fi
39453
39454
39455 ac_config_commands="$ac_config_commands stamp-h"
39456
39457
39458 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile checks/Makefile examples/Makefile"
39459
39460
39461 cat >confcache <<\_ACEOF
39462 # This file is a shell script that caches the results of configure
39463 # tests run on this system so they can be shared between configure
39464 # scripts and configure runs, see configure's option --config-cache.
39465 # It is not useful on other systems.  If it contains results you don't
39466 # want to keep, you may remove or edit it.
39467 #
39468 # config.status only pays attention to the cache file if you give it
39469 # the --recheck option to rerun configure.
39470 #
39471 # `ac_cv_env_foo' variables (set or unset) will be overridden when
39472 # loading this file, other *unset* `ac_cv_foo' will be assigned the
39473 # following values.
39474
39475 _ACEOF
39476
39477 # The following way of writing the cache mishandles newlines in values,
39478 # but we know of no workaround that is simple, portable, and efficient.
39479 # So, we kill variables containing newlines.
39480 # Ultrix sh set writes to stderr and can't be redirected directly,
39481 # and sets the high bit in the cache file unless we assign to the vars.
39482 (
39483   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
39484     eval ac_val=\$$ac_var
39485     case $ac_val in #(
39486     *${as_nl}*)
39487       case $ac_var in #(
39488       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
39489 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
39490       esac
39491       case $ac_var in #(
39492       _ | IFS | as_nl) ;; #(
39493       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
39494       *) { eval $ac_var=; unset $ac_var;} ;;
39495       esac ;;
39496     esac
39497   done
39498
39499   (set) 2>&1 |
39500     case $as_nl`(ac_space=' '; set) 2>&1` in #(
39501     *${as_nl}ac_space=\ *)
39502       # `set' does not quote correctly, so add quotes: double-quote
39503       # substitution turns \\\\ into \\, and sed turns \\ into \.
39504       sed -n \
39505         "s/'/'\\\\''/g;
39506           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
39507       ;; #(
39508     *)
39509       # `set' quotes correctly as required by POSIX, so do not add quotes.
39510       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
39511       ;;
39512     esac |
39513     sort
39514 ) |
39515   sed '
39516      /^ac_cv_env_/b end
39517      t clear
39518      :clear
39519      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
39520      t end
39521      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
39522      :end' >>confcache
39523 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
39524   if test -w "$cache_file"; then
39525     if test "x$cache_file" != "x/dev/null"; then
39526       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
39527 $as_echo "$as_me: updating cache $cache_file" >&6;}
39528       if test ! -f "$cache_file" || test -h "$cache_file"; then
39529         cat confcache >"$cache_file"
39530       else
39531         case $cache_file in #(
39532         */* | ?:*)
39533           mv -f confcache "$cache_file"$$ &&
39534           mv -f "$cache_file"$$ "$cache_file" ;; #(
39535         *)
39536           mv -f confcache "$cache_file" ;;
39537         esac
39538       fi
39539     fi
39540   else
39541     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
39542 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
39543   fi
39544 fi
39545 rm -f confcache
39546
39547 test "x$prefix" = xNONE && prefix=$ac_default_prefix
39548 # Let make expand exec_prefix.
39549 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
39550
39551 DEFS=-DHAVE_CONFIG_H
39552
39553 ac_libobjs=
39554 ac_ltlibobjs=
39555 U=
39556 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
39557   # 1. Remove the extension, and $U if already installed.
39558   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
39559   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
39560   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
39561   #    will be set to the directory where LIBOBJS objects are built.
39562   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
39563   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
39564 done
39565 LIBOBJS=$ac_libobjs
39566
39567 LTLIBOBJS=$ac_ltlibobjs
39568
39569
39570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
39571 $as_echo_n "checking that generated files are newer than configure... " >&6; }
39572    if test -n "$am_sleep_pid"; then
39573      # Hide warnings about reused PIDs.
39574      wait $am_sleep_pid 2>/dev/null
39575    fi
39576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
39577 $as_echo "done" >&6; }
39578  if test -n "$EXEEXT"; then
39579   am__EXEEXT_TRUE=
39580   am__EXEEXT_FALSE='#'
39581 else
39582   am__EXEEXT_TRUE='#'
39583   am__EXEEXT_FALSE=
39584 fi
39585
39586 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
39587   as_fn_error $? "conditional \"AMDEP\" was never defined.
39588 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39589 fi
39590 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
39591   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
39592 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39593 fi
39594 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
39595   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
39596 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39597 fi
39598 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
39599   as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
39600 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39601 fi
39602 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
39603 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
39604   as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
39605 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39606 fi
39607 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
39608   as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
39609 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39610 fi
39611
39612
39613 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
39614   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
39615 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39616 fi
39617 CONFIG_INCLUDE=lib/config.h
39618
39619 if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
39620   as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
39621 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39622 fi
39623 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
39624   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
39625 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39626 fi
39627 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
39628   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
39629 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39630 fi
39631 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
39632   as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
39633 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39634 fi
39635 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
39636   as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
39637 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39638 fi
39639
39640     M4_libobjs=
39641     M4_ltlibobjs=
39642     if test -n "$M4_LIBOBJS"; then
39643       # Remove the extension.
39644       sed_drop_objext='s/\.o$//;s/\.obj$//'
39645       for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39646         M4_libobjs="$M4_libobjs $i.$ac_objext"
39647         M4_ltlibobjs="$M4_ltlibobjs $i.lo"
39648       done
39649     fi
39650     M4_LIBOBJS=$M4_libobjs
39651
39652     M4_LTLIBOBJS=$M4_ltlibobjs
39653
39654
39655 if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
39656   as_fn_error $? "conditional \"ANSICXX\" was never defined.
39657 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39658 fi
39659 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
39660   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
39661 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39662 fi
39663 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
39664   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
39665 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39666 fi
39667
39668 if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
39669   as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
39670 Usually this means the macro was only invoked conditionally." "$LINENO" 5
39671 fi
39672
39673     M4tests_libobjs=
39674     M4tests_ltlibobjs=
39675     if test -n "$M4tests_LIBOBJS"; then
39676       # Remove the extension.
39677       sed_drop_objext='s/\.o$//;s/\.obj$//'
39678       for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
39679         M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
39680         M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
39681       done
39682     fi
39683     M4tests_LIBOBJS=$M4tests_libobjs
39684
39685     M4tests_LTLIBOBJS=$M4tests_ltlibobjs
39686
39687
39688
39689 : "${CONFIG_STATUS=./config.status}"
39690 ac_write_fail=0
39691 ac_clean_files_save=$ac_clean_files
39692 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
39693 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
39694 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
39695 as_write_fail=0
39696 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
39697 #! $SHELL
39698 # Generated by $as_me.
39699 # Run this file to recreate the current configuration.
39700 # Compiler output produced by configure, useful for debugging
39701 # configure, is in config.log if it exists.
39702
39703 debug=false
39704 ac_cs_recheck=false
39705 ac_cs_silent=false
39706
39707 SHELL=\${CONFIG_SHELL-$SHELL}
39708 export SHELL
39709 _ASEOF
39710 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
39711 ## -------------------- ##
39712 ## M4sh Initialization. ##
39713 ## -------------------- ##
39714
39715 # Be more Bourne compatible
39716 DUALCASE=1; export DUALCASE # for MKS sh
39717 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
39718   emulate sh
39719   NULLCMD=:
39720   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
39721   # is contrary to our usage.  Disable this feature.
39722   alias -g '${1+"$@"}'='"$@"'
39723   setopt NO_GLOB_SUBST
39724 else
39725   case `(set -o) 2>/dev/null` in #(
39726   *posix*) :
39727     set -o posix ;; #(
39728   *) :
39729      ;;
39730 esac
39731 fi
39732
39733
39734 as_nl='
39735 '
39736 export as_nl
39737 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39738 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39739 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
39740 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
39741 # Prefer a ksh shell builtin over an external printf program on Solaris,
39742 # but without wasting forks for bash or zsh.
39743 if test -z "$BASH_VERSION$ZSH_VERSION" \
39744     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
39745   as_echo='print -r --'
39746   as_echo_n='print -rn --'
39747 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
39748   as_echo='printf %s\n'
39749   as_echo_n='printf %s'
39750 else
39751   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
39752     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
39753     as_echo_n='/usr/ucb/echo -n'
39754   else
39755     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
39756     as_echo_n_body='eval
39757       arg=$1;
39758       case $arg in #(
39759       *"$as_nl"*)
39760         expr "X$arg" : "X\\(.*\\)$as_nl";
39761         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
39762       esac;
39763       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
39764     '
39765     export as_echo_n_body
39766     as_echo_n='sh -c $as_echo_n_body as_echo'
39767   fi
39768   export as_echo_body
39769   as_echo='sh -c $as_echo_body as_echo'
39770 fi
39771
39772 # The user is always right.
39773 if test "${PATH_SEPARATOR+set}" != set; then
39774   PATH_SEPARATOR=:
39775   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
39776     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
39777       PATH_SEPARATOR=';'
39778   }
39779 fi
39780
39781
39782 # IFS
39783 # We need space, tab and new line, in precisely that order.  Quoting is
39784 # there to prevent editors from complaining about space-tab.
39785 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
39786 # splitting by setting IFS to empty value.)
39787 IFS=" ""        $as_nl"
39788
39789 # Find who we are.  Look in the path if we contain no directory separator.
39790 as_myself=
39791 case $0 in #((
39792   *[\\/]* ) as_myself=$0 ;;
39793   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39794 for as_dir in $PATH
39795 do
39796   IFS=$as_save_IFS
39797   test -z "$as_dir" && as_dir=.
39798     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
39799   done
39800 IFS=$as_save_IFS
39801
39802      ;;
39803 esac
39804 # We did not find ourselves, most probably we were run as `sh COMMAND'
39805 # in which case we are not to be found in the path.
39806 if test "x$as_myself" = x; then
39807   as_myself=$0
39808 fi
39809 if test ! -f "$as_myself"; then
39810   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
39811   exit 1
39812 fi
39813
39814 # Unset variables that we do not need and which cause bugs (e.g. in
39815 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
39816 # suppresses any "Segmentation fault" message there.  '((' could
39817 # trigger a bug in pdksh 5.2.14.
39818 for as_var in BASH_ENV ENV MAIL MAILPATH
39819 do eval test x\${$as_var+set} = xset \
39820   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
39821 done
39822 PS1='$ '
39823 PS2='> '
39824 PS4='+ '
39825
39826 # NLS nuisances.
39827 LC_ALL=C
39828 export LC_ALL
39829 LANGUAGE=C
39830 export LANGUAGE
39831
39832 # CDPATH.
39833 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
39834
39835
39836 # as_fn_error STATUS ERROR [LINENO LOG_FD]
39837 # ----------------------------------------
39838 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
39839 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
39840 # script with STATUS, using 1 if that was 0.
39841 as_fn_error ()
39842 {
39843   as_status=$1; test $as_status -eq 0 && as_status=1
39844   if test "$4"; then
39845     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
39846     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
39847   fi
39848   $as_echo "$as_me: error: $2" >&2
39849   as_fn_exit $as_status
39850 } # as_fn_error
39851
39852
39853 # as_fn_set_status STATUS
39854 # -----------------------
39855 # Set $? to STATUS, without forking.
39856 as_fn_set_status ()
39857 {
39858   return $1
39859 } # as_fn_set_status
39860
39861 # as_fn_exit STATUS
39862 # -----------------
39863 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
39864 as_fn_exit ()
39865 {
39866   set +e
39867   as_fn_set_status $1
39868   exit $1
39869 } # as_fn_exit
39870
39871 # as_fn_unset VAR
39872 # ---------------
39873 # Portably unset VAR.
39874 as_fn_unset ()
39875 {
39876   { eval $1=; unset $1;}
39877 }
39878 as_unset=as_fn_unset
39879 # as_fn_append VAR VALUE
39880 # ----------------------
39881 # Append the text in VALUE to the end of the definition contained in VAR. Take
39882 # advantage of any shell optimizations that allow amortized linear growth over
39883 # repeated appends, instead of the typical quadratic growth present in naive
39884 # implementations.
39885 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
39886   eval 'as_fn_append ()
39887   {
39888     eval $1+=\$2
39889   }'
39890 else
39891   as_fn_append ()
39892   {
39893     eval $1=\$$1\$2
39894   }
39895 fi # as_fn_append
39896
39897 # as_fn_arith ARG...
39898 # ------------------
39899 # Perform arithmetic evaluation on the ARGs, and store the result in the
39900 # global $as_val. Take advantage of shells that can avoid forks. The arguments
39901 # must be portable across $(()) and expr.
39902 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
39903   eval 'as_fn_arith ()
39904   {
39905     as_val=$(( $* ))
39906   }'
39907 else
39908   as_fn_arith ()
39909   {
39910     as_val=`expr "$@" || test $? -eq 1`
39911   }
39912 fi # as_fn_arith
39913
39914
39915 if expr a : '\(a\)' >/dev/null 2>&1 &&
39916    test "X`expr 00001 : '.*\(...\)'`" = X001; then
39917   as_expr=expr
39918 else
39919   as_expr=false
39920 fi
39921
39922 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
39923   as_basename=basename
39924 else
39925   as_basename=false
39926 fi
39927
39928 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
39929   as_dirname=dirname
39930 else
39931   as_dirname=false
39932 fi
39933
39934 as_me=`$as_basename -- "$0" ||
39935 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
39936          X"$0" : 'X\(//\)$' \| \
39937          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
39938 $as_echo X/"$0" |
39939     sed '/^.*\/\([^/][^/]*\)\/*$/{
39940             s//\1/
39941             q
39942           }
39943           /^X\/\(\/\/\)$/{
39944             s//\1/
39945             q
39946           }
39947           /^X\/\(\/\).*/{
39948             s//\1/
39949             q
39950           }
39951           s/.*/./; q'`
39952
39953 # Avoid depending upon Character Ranges.
39954 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
39955 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39956 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
39957 as_cr_digits='0123456789'
39958 as_cr_alnum=$as_cr_Letters$as_cr_digits
39959
39960 ECHO_C= ECHO_N= ECHO_T=
39961 case `echo -n x` in #(((((
39962 -n*)
39963   case `echo 'xy\c'` in
39964   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
39965   xy)  ECHO_C='\c';;
39966   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
39967        ECHO_T=' ';;
39968   esac;;
39969 *)
39970   ECHO_N='-n';;
39971 esac
39972
39973 rm -f conf$$ conf$$.exe conf$$.file
39974 if test -d conf$$.dir; then
39975   rm -f conf$$.dir/conf$$.file
39976 else
39977   rm -f conf$$.dir
39978   mkdir conf$$.dir 2>/dev/null
39979 fi
39980 if (echo >conf$$.file) 2>/dev/null; then
39981   if ln -s conf$$.file conf$$ 2>/dev/null; then
39982     as_ln_s='ln -s'
39983     # ... but there are two gotchas:
39984     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
39985     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
39986     # In both cases, we have to default to `cp -pR'.
39987     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
39988       as_ln_s='cp -pR'
39989   elif ln conf$$.file conf$$ 2>/dev/null; then
39990     as_ln_s=ln
39991   else
39992     as_ln_s='cp -pR'
39993   fi
39994 else
39995   as_ln_s='cp -pR'
39996 fi
39997 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
39998 rmdir conf$$.dir 2>/dev/null
39999
40000
40001 # as_fn_mkdir_p
40002 # -------------
40003 # Create "$as_dir" as a directory, including parents if necessary.
40004 as_fn_mkdir_p ()
40005 {
40006
40007   case $as_dir in #(
40008   -*) as_dir=./$as_dir;;
40009   esac
40010   test -d "$as_dir" || eval $as_mkdir_p || {
40011     as_dirs=
40012     while :; do
40013       case $as_dir in #(
40014       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
40015       *) as_qdir=$as_dir;;
40016       esac
40017       as_dirs="'$as_qdir' $as_dirs"
40018       as_dir=`$as_dirname -- "$as_dir" ||
40019 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40020          X"$as_dir" : 'X\(//\)[^/]' \| \
40021          X"$as_dir" : 'X\(//\)$' \| \
40022          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
40023 $as_echo X"$as_dir" |
40024     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40025             s//\1/
40026             q
40027           }
40028           /^X\(\/\/\)[^/].*/{
40029             s//\1/
40030             q
40031           }
40032           /^X\(\/\/\)$/{
40033             s//\1/
40034             q
40035           }
40036           /^X\(\/\).*/{
40037             s//\1/
40038             q
40039           }
40040           s/.*/./; q'`
40041       test -d "$as_dir" && break
40042     done
40043     test -z "$as_dirs" || eval "mkdir $as_dirs"
40044   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
40045
40046
40047 } # as_fn_mkdir_p
40048 if mkdir -p . 2>/dev/null; then
40049   as_mkdir_p='mkdir -p "$as_dir"'
40050 else
40051   test -d ./-p && rmdir ./-p
40052   as_mkdir_p=false
40053 fi
40054
40055
40056 # as_fn_executable_p FILE
40057 # -----------------------
40058 # Test if FILE is an executable regular file.
40059 as_fn_executable_p ()
40060 {
40061   test -f "$1" && test -x "$1"
40062 } # as_fn_executable_p
40063 as_test_x='test -x'
40064 as_executable_p=as_fn_executable_p
40065
40066 # Sed expression to map a string onto a valid CPP name.
40067 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
40068
40069 # Sed expression to map a string onto a valid variable name.
40070 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
40071
40072
40073 exec 6>&1
40074 ## ----------------------------------- ##
40075 ## Main body of $CONFIG_STATUS script. ##
40076 ## ----------------------------------- ##
40077 _ASEOF
40078 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
40079
40080 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40081 # Save the log message, to keep $0 and so on meaningful, and to
40082 # report actual input values of CONFIG_FILES etc. instead of their
40083 # values after options handling.
40084 ac_log="
40085 This file was extended by GNU M4 $as_me 1.4.17, which was
40086 generated by GNU Autoconf 2.69.  Invocation command line was
40087
40088   CONFIG_FILES    = $CONFIG_FILES
40089   CONFIG_HEADERS  = $CONFIG_HEADERS
40090   CONFIG_LINKS    = $CONFIG_LINKS
40091   CONFIG_COMMANDS = $CONFIG_COMMANDS
40092   $ $0 $@
40093
40094 on `(hostname || uname -n) 2>/dev/null | sed 1q`
40095 "
40096
40097 _ACEOF
40098
40099 case $ac_config_files in *"
40100 "*) set x $ac_config_files; shift; ac_config_files=$*;;
40101 esac
40102
40103 case $ac_config_headers in *"
40104 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
40105 esac
40106
40107
40108 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40109 # Files that config.status was made for.
40110 config_files="$ac_config_files"
40111 config_headers="$ac_config_headers"
40112 config_links="$ac_config_links"
40113 config_commands="$ac_config_commands"
40114
40115 _ACEOF
40116
40117 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40118 ac_cs_usage="\
40119 \`$as_me' instantiates files and other configuration actions
40120 from templates according to the current configuration.  Unless the files
40121 and actions are specified as TAGs, all are instantiated by default.
40122
40123 Usage: $0 [OPTION]... [TAG]...
40124
40125   -h, --help       print this help, then exit
40126   -V, --version    print version number and configuration settings, then exit
40127       --config     print configuration, then exit
40128   -q, --quiet, --silent
40129                    do not print progress messages
40130   -d, --debug      don't remove temporary files
40131       --recheck    update $as_me by reconfiguring in the same conditions
40132       --file=FILE[:TEMPLATE]
40133                    instantiate the configuration file FILE
40134       --header=FILE[:TEMPLATE]
40135                    instantiate the configuration header FILE
40136
40137 Configuration files:
40138 $config_files
40139
40140 Configuration headers:
40141 $config_headers
40142
40143 Configuration links:
40144 $config_links
40145
40146 Configuration commands:
40147 $config_commands
40148
40149 Report bugs to <bug-m4@gnu.org>.
40150 GNU M4 home page: <http://www.gnu.org/software/m4/>.
40151 General help using GNU software: <http://www.gnu.org/gethelp/>."
40152
40153 _ACEOF
40154 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40155 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
40156 ac_cs_version="\\
40157 GNU M4 config.status 1.4.17
40158 configured by $0, generated by GNU Autoconf 2.69,
40159   with options \\"\$ac_cs_config\\"
40160
40161 Copyright (C) 2012 Free Software Foundation, Inc.
40162 This config.status script is free software; the Free Software Foundation
40163 gives unlimited permission to copy, distribute and modify it."
40164
40165 ac_pwd='$ac_pwd'
40166 srcdir='$srcdir'
40167 INSTALL='$INSTALL'
40168 MKDIR_P='$MKDIR_P'
40169 AWK='$AWK'
40170 test -n "\$AWK" || AWK=awk
40171 _ACEOF
40172
40173 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40174 # The default lists apply if the user does not specify any file.
40175 ac_need_defaults=:
40176 while test $# != 0
40177 do
40178   case $1 in
40179   --*=?*)
40180     ac_option=`expr "X$1" : 'X\([^=]*\)='`
40181     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
40182     ac_shift=:
40183     ;;
40184   --*=)
40185     ac_option=`expr "X$1" : 'X\([^=]*\)='`
40186     ac_optarg=
40187     ac_shift=:
40188     ;;
40189   *)
40190     ac_option=$1
40191     ac_optarg=$2
40192     ac_shift=shift
40193     ;;
40194   esac
40195
40196   case $ac_option in
40197   # Handling of the options.
40198   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
40199     ac_cs_recheck=: ;;
40200   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
40201     $as_echo "$ac_cs_version"; exit ;;
40202   --config | --confi | --conf | --con | --co | --c )
40203     $as_echo "$ac_cs_config"; exit ;;
40204   --debug | --debu | --deb | --de | --d | -d )
40205     debug=: ;;
40206   --file | --fil | --fi | --f )
40207     $ac_shift
40208     case $ac_optarg in
40209     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40210     '') as_fn_error $? "missing file argument" ;;
40211     esac
40212     as_fn_append CONFIG_FILES " '$ac_optarg'"
40213     ac_need_defaults=false;;
40214   --header | --heade | --head | --hea )
40215     $ac_shift
40216     case $ac_optarg in
40217     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
40218     esac
40219     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
40220     ac_need_defaults=false;;
40221   --he | --h)
40222     # Conflict between --help and --header
40223     as_fn_error $? "ambiguous option: \`$1'
40224 Try \`$0 --help' for more information.";;
40225   --help | --hel | -h )
40226     $as_echo "$ac_cs_usage"; exit ;;
40227   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
40228   | -silent | --silent | --silen | --sile | --sil | --si | --s)
40229     ac_cs_silent=: ;;
40230
40231   # This is an error.
40232   -*) as_fn_error $? "unrecognized option: \`$1'
40233 Try \`$0 --help' for more information." ;;
40234
40235   *) as_fn_append ac_config_targets " $1"
40236      ac_need_defaults=false ;;
40237
40238   esac
40239   shift
40240 done
40241
40242 ac_configure_extra_args=
40243
40244 if $ac_cs_silent; then
40245   exec 6>/dev/null
40246   ac_configure_extra_args="$ac_configure_extra_args --silent"
40247 fi
40248
40249 _ACEOF
40250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40251 if \$ac_cs_recheck; then
40252   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
40253   shift
40254   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
40255   CONFIG_SHELL='$SHELL'
40256   export CONFIG_SHELL
40257   exec "\$@"
40258 fi
40259
40260 _ACEOF
40261 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40262 exec 5>>config.log
40263 {
40264   echo
40265   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
40266 ## Running $as_me. ##
40267 _ASBOX
40268   $as_echo "$ac_log"
40269 } >&5
40270
40271 _ACEOF
40272 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40273 #
40274 # INIT-COMMANDS
40275 #
40276 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
40277 GNUmakefile=$GNUmakefile
40278
40279 _ACEOF
40280
40281 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40282
40283 # Handling of arguments.
40284 for ac_config_target in $ac_config_targets
40285 do
40286   case $ac_config_target in
40287     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
40288     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
40289     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
40290     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
40291     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
40292     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
40293     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
40294     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
40295     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
40296     "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;;
40297     "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
40298
40299   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
40300   esac
40301 done
40302
40303
40304 # If the user did not use the arguments to specify the items to instantiate,
40305 # then the envvar interface is used.  Set only those that are not.
40306 # We use the long form for the default assignment because of an extremely
40307 # bizarre bug on SunOS 4.1.3.
40308 if $ac_need_defaults; then
40309   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
40310   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
40311   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
40312   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
40313 fi
40314
40315 # Have a temporary directory for convenience.  Make it in the build tree
40316 # simply because there is no reason against having it here, and in addition,
40317 # creating and moving files from /tmp can sometimes cause problems.
40318 # Hook for its removal unless debugging.
40319 # Note that there is a small window in which the directory will not be cleaned:
40320 # after its creation but before its name has been assigned to `$tmp'.
40321 $debug ||
40322 {
40323   tmp= ac_tmp=
40324   trap 'exit_status=$?
40325   : "${ac_tmp:=$tmp}"
40326   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
40327 ' 0
40328   trap 'as_fn_exit 1' 1 2 13 15
40329 }
40330 # Create a (secure) tmp directory for tmp files.
40331
40332 {
40333   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
40334   test -d "$tmp"
40335 }  ||
40336 {
40337   tmp=./conf$$-$RANDOM
40338   (umask 077 && mkdir "$tmp")
40339 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
40340 ac_tmp=$tmp
40341
40342 # Set up the scripts for CONFIG_FILES section.
40343 # No need to generate them if there are no CONFIG_FILES.
40344 # This happens for instance with `./config.status config.h'.
40345 if test -n "$CONFIG_FILES"; then
40346
40347
40348 ac_cr=`echo X | tr X '\015'`
40349 # On cygwin, bash can eat \r inside `` if the user requested igncr.
40350 # But we know of no other shell where ac_cr would be empty at this
40351 # point, so we can use a bashism as a fallback.
40352 if test "x$ac_cr" = x; then
40353   eval ac_cr=\$\'\\r\'
40354 fi
40355 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
40356 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
40357   ac_cs_awk_cr='\\r'
40358 else
40359   ac_cs_awk_cr=$ac_cr
40360 fi
40361
40362 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
40363 _ACEOF
40364
40365
40366 {
40367   echo "cat >conf$$subs.awk <<_ACEOF" &&
40368   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
40369   echo "_ACEOF"
40370 } >conf$$subs.sh ||
40371   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40372 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
40373 ac_delim='%!_!# '
40374 for ac_last_try in false false false false false :; do
40375   . ./conf$$subs.sh ||
40376     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40377
40378   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
40379   if test $ac_delim_n = $ac_delim_num; then
40380     break
40381   elif $ac_last_try; then
40382     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
40383   else
40384     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40385   fi
40386 done
40387 rm -f conf$$subs.sh
40388
40389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40390 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
40391 _ACEOF
40392 sed -n '
40393 h
40394 s/^/S["/; s/!.*/"]=/
40395 p
40396 g
40397 s/^[^!]*!//
40398 :repl
40399 t repl
40400 s/'"$ac_delim"'$//
40401 t delim
40402 :nl
40403 h
40404 s/\(.\{148\}\)..*/\1/
40405 t more1
40406 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
40407 p
40408 n
40409 b repl
40410 :more1
40411 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40412 p
40413 g
40414 s/.\{148\}//
40415 t nl
40416 :delim
40417 h
40418 s/\(.\{148\}\)..*/\1/
40419 t more2
40420 s/["\\]/\\&/g; s/^/"/; s/$/"/
40421 p
40422 b
40423 :more2
40424 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
40425 p
40426 g
40427 s/.\{148\}//
40428 t delim
40429 ' <conf$$subs.awk | sed '
40430 /^[^""]/{
40431   N
40432   s/\n//
40433 }
40434 ' >>$CONFIG_STATUS || ac_write_fail=1
40435 rm -f conf$$subs.awk
40436 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40437 _ACAWK
40438 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
40439   for (key in S) S_is_set[key] = 1
40440   FS = "\a"
40441
40442 }
40443 {
40444   line = $ 0
40445   nfields = split(line, field, "@")
40446   substed = 0
40447   len = length(field[1])
40448   for (i = 2; i < nfields; i++) {
40449     key = field[i]
40450     keylen = length(key)
40451     if (S_is_set[key]) {
40452       value = S[key]
40453       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
40454       len += length(value) + length(field[++i])
40455       substed = 1
40456     } else
40457       len += 1 + keylen
40458   }
40459
40460   print line
40461 }
40462
40463 _ACAWK
40464 _ACEOF
40465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40466 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
40467   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
40468 else
40469   cat
40470 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
40471   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
40472 _ACEOF
40473
40474 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
40475 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
40476 # trailing colons and then remove the whole line if VPATH becomes empty
40477 # (actually we leave an empty line to preserve line numbers).
40478 if test "x$srcdir" = x.; then
40479   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
40480 h
40481 s///
40482 s/^/:/
40483 s/[      ]*$/:/
40484 s/:\$(srcdir):/:/g
40485 s/:\${srcdir}:/:/g
40486 s/:@srcdir@:/:/g
40487 s/^:*//
40488 s/:*$//
40489 x
40490 s/\(=[   ]*\).*/\1/
40491 G
40492 s/\n//
40493 s/^[^=]*=[       ]*$//
40494 }'
40495 fi
40496
40497 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40498 fi # test -n "$CONFIG_FILES"
40499
40500 # Set up the scripts for CONFIG_HEADERS section.
40501 # No need to generate them if there are no CONFIG_HEADERS.
40502 # This happens for instance with `./config.status Makefile'.
40503 if test -n "$CONFIG_HEADERS"; then
40504 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
40505 BEGIN {
40506 _ACEOF
40507
40508 # Transform confdefs.h into an awk script `defines.awk', embedded as
40509 # here-document in config.status, that substitutes the proper values into
40510 # config.h.in to produce config.h.
40511
40512 # Create a delimiter string that does not exist in confdefs.h, to ease
40513 # handling of long lines.
40514 ac_delim='%!_!# '
40515 for ac_last_try in false false :; do
40516   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
40517   if test -z "$ac_tt"; then
40518     break
40519   elif $ac_last_try; then
40520     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
40521   else
40522     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
40523   fi
40524 done
40525
40526 # For the awk script, D is an array of macro values keyed by name,
40527 # likewise P contains macro parameters if any.  Preserve backslash
40528 # newline sequences.
40529
40530 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
40531 sed -n '
40532 s/.\{148\}/&'"$ac_delim"'/g
40533 t rset
40534 :rset
40535 s/^[     ]*#[    ]*define[       ][      ]*/ /
40536 t def
40537 d
40538 :def
40539 s/\\$//
40540 t bsnl
40541 s/["\\]/\\&/g
40542 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
40543 D["\1"]=" \3"/p
40544 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
40545 d
40546 :bsnl
40547 s/["\\]/\\&/g
40548 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
40549 D["\1"]=" \3\\\\\\n"\\/p
40550 t cont
40551 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
40552 t cont
40553 d
40554 :cont
40555 n
40556 s/.\{148\}/&'"$ac_delim"'/g
40557 t clear
40558 :clear
40559 s/\\$//
40560 t bsnlc
40561 s/["\\]/\\&/g; s/^/"/; s/$/"/p
40562 d
40563 :bsnlc
40564 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
40565 b cont
40566 ' <confdefs.h | sed '
40567 s/'"$ac_delim"'/"\\\
40568 "/g' >>$CONFIG_STATUS || ac_write_fail=1
40569
40570 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40571   for (key in D) D_is_set[key] = 1
40572   FS = "\a"
40573 }
40574 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
40575   line = \$ 0
40576   split(line, arg, " ")
40577   if (arg[1] == "#") {
40578     defundef = arg[2]
40579     mac1 = arg[3]
40580   } else {
40581     defundef = substr(arg[1], 2)
40582     mac1 = arg[2]
40583   }
40584   split(mac1, mac2, "(") #)
40585   macro = mac2[1]
40586   prefix = substr(line, 1, index(line, defundef) - 1)
40587   if (D_is_set[macro]) {
40588     # Preserve the white space surrounding the "#".
40589     print prefix "define", macro P[macro] D[macro]
40590     next
40591   } else {
40592     # Replace #undef with comments.  This is necessary, for example,
40593     # in the case of _POSIX_SOURCE, which is predefined and required
40594     # on some systems where configure will not decide to define it.
40595     if (defundef == "undef") {
40596       print "/*", prefix defundef, macro, "*/"
40597       next
40598     }
40599   }
40600 }
40601 { print }
40602 _ACAWK
40603 _ACEOF
40604 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40605   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
40606 fi # test -n "$CONFIG_HEADERS"
40607
40608
40609 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
40610 shift
40611 for ac_tag
40612 do
40613   case $ac_tag in
40614   :[FHLC]) ac_mode=$ac_tag; continue;;
40615   esac
40616   case $ac_mode$ac_tag in
40617   :[FHL]*:*);;
40618   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
40619   :[FH]-) ac_tag=-:-;;
40620   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
40621   esac
40622   ac_save_IFS=$IFS
40623   IFS=:
40624   set x $ac_tag
40625   IFS=$ac_save_IFS
40626   shift
40627   ac_file=$1
40628   shift
40629
40630   case $ac_mode in
40631   :L) ac_source=$1;;
40632   :[FH])
40633     ac_file_inputs=
40634     for ac_f
40635     do
40636       case $ac_f in
40637       -) ac_f="$ac_tmp/stdin";;
40638       *) # Look for the file first in the build tree, then in the source tree
40639          # (if the path is not absolute).  The absolute path cannot be DOS-style,
40640          # because $ac_f cannot contain `:'.
40641          test -f "$ac_f" ||
40642            case $ac_f in
40643            [\\/$]*) false;;
40644            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
40645            esac ||
40646            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
40647       esac
40648       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
40649       as_fn_append ac_file_inputs " '$ac_f'"
40650     done
40651
40652     # Let's still pretend it is `configure' which instantiates (i.e., don't
40653     # use $as_me), people would be surprised to read:
40654     #    /* config.h.  Generated by config.status.  */
40655     configure_input='Generated from '`
40656           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
40657         `' by configure.'
40658     if test x"$ac_file" != x-; then
40659       configure_input="$ac_file.  $configure_input"
40660       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
40661 $as_echo "$as_me: creating $ac_file" >&6;}
40662     fi
40663     # Neutralize special characters interpreted by sed in replacement strings.
40664     case $configure_input in #(
40665     *\&* | *\|* | *\\* )
40666        ac_sed_conf_input=`$as_echo "$configure_input" |
40667        sed 's/[\\\\&|]/\\\\&/g'`;; #(
40668     *) ac_sed_conf_input=$configure_input;;
40669     esac
40670
40671     case $ac_tag in
40672     *:-:* | *:-) cat >"$ac_tmp/stdin" \
40673       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
40674     esac
40675     ;;
40676   esac
40677
40678   ac_dir=`$as_dirname -- "$ac_file" ||
40679 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40680          X"$ac_file" : 'X\(//\)[^/]' \| \
40681          X"$ac_file" : 'X\(//\)$' \| \
40682          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
40683 $as_echo X"$ac_file" |
40684     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40685             s//\1/
40686             q
40687           }
40688           /^X\(\/\/\)[^/].*/{
40689             s//\1/
40690             q
40691           }
40692           /^X\(\/\/\)$/{
40693             s//\1/
40694             q
40695           }
40696           /^X\(\/\).*/{
40697             s//\1/
40698             q
40699           }
40700           s/.*/./; q'`
40701   as_dir="$ac_dir"; as_fn_mkdir_p
40702   ac_builddir=.
40703
40704 case "$ac_dir" in
40705 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
40706 *)
40707   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
40708   # A ".." for each directory in $ac_dir_suffix.
40709   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
40710   case $ac_top_builddir_sub in
40711   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
40712   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
40713   esac ;;
40714 esac
40715 ac_abs_top_builddir=$ac_pwd
40716 ac_abs_builddir=$ac_pwd$ac_dir_suffix
40717 # for backward compatibility:
40718 ac_top_builddir=$ac_top_build_prefix
40719
40720 case $srcdir in
40721   .)  # We are building in place.
40722     ac_srcdir=.
40723     ac_top_srcdir=$ac_top_builddir_sub
40724     ac_abs_top_srcdir=$ac_pwd ;;
40725   [\\/]* | ?:[\\/]* )  # Absolute name.
40726     ac_srcdir=$srcdir$ac_dir_suffix;
40727     ac_top_srcdir=$srcdir
40728     ac_abs_top_srcdir=$srcdir ;;
40729   *) # Relative name.
40730     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
40731     ac_top_srcdir=$ac_top_build_prefix$srcdir
40732     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
40733 esac
40734 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
40735
40736
40737   case $ac_mode in
40738   :F)
40739   #
40740   # CONFIG_FILE
40741   #
40742
40743   case $INSTALL in
40744   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
40745   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
40746   esac
40747   ac_MKDIR_P=$MKDIR_P
40748   case $MKDIR_P in
40749   [\\/$]* | ?:[\\/]* ) ;;
40750   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
40751   esac
40752 _ACEOF
40753
40754 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40755 # If the template does not know about datarootdir, expand it.
40756 # FIXME: This hack should be removed a few years after 2.60.
40757 ac_datarootdir_hack=; ac_datarootdir_seen=
40758 ac_sed_dataroot='
40759 /datarootdir/ {
40760   p
40761   q
40762 }
40763 /@datadir@/p
40764 /@docdir@/p
40765 /@infodir@/p
40766 /@localedir@/p
40767 /@mandir@/p'
40768 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
40769 *datarootdir*) ac_datarootdir_seen=yes;;
40770 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
40771   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
40772 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
40773 _ACEOF
40774 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40775   ac_datarootdir_hack='
40776   s&@datadir@&$datadir&g
40777   s&@docdir@&$docdir&g
40778   s&@infodir@&$infodir&g
40779   s&@localedir@&$localedir&g
40780   s&@mandir@&$mandir&g
40781   s&\\\${datarootdir}&$datarootdir&g' ;;
40782 esac
40783 _ACEOF
40784
40785 # Neutralize VPATH when `$srcdir' = `.'.
40786 # Shell code in configure.ac might set extrasub.
40787 # FIXME: do we really want to maintain this feature?
40788 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40789 ac_sed_extra="$ac_vpsub
40790 $extrasub
40791 _ACEOF
40792 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40793 :t
40794 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
40795 s|@configure_input@|$ac_sed_conf_input|;t t
40796 s&@top_builddir@&$ac_top_builddir_sub&;t t
40797 s&@top_build_prefix@&$ac_top_build_prefix&;t t
40798 s&@srcdir@&$ac_srcdir&;t t
40799 s&@abs_srcdir@&$ac_abs_srcdir&;t t
40800 s&@top_srcdir@&$ac_top_srcdir&;t t
40801 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
40802 s&@builddir@&$ac_builddir&;t t
40803 s&@abs_builddir@&$ac_abs_builddir&;t t
40804 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
40805 s&@INSTALL@&$ac_INSTALL&;t t
40806 s&@MKDIR_P@&$ac_MKDIR_P&;t t
40807 $ac_datarootdir_hack
40808 "
40809 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
40810   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40811
40812 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
40813   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
40814   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
40815       "$ac_tmp/out"`; test -z "$ac_out"; } &&
40816   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
40817 which seems to be undefined.  Please make sure it is defined" >&5
40818 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
40819 which seems to be undefined.  Please make sure it is defined" >&2;}
40820
40821   rm -f "$ac_tmp/stdin"
40822   case $ac_file in
40823   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
40824   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
40825   esac \
40826   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40827  ;;
40828   :H)
40829   #
40830   # CONFIG_HEADER
40831   #
40832   if test x"$ac_file" != x-; then
40833     {
40834       $as_echo "/* $configure_input  */" \
40835       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
40836     } >"$ac_tmp/config.h" \
40837       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40838     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
40839       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
40840 $as_echo "$as_me: $ac_file is unchanged" >&6;}
40841     else
40842       rm -f "$ac_file"
40843       mv "$ac_tmp/config.h" "$ac_file" \
40844         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
40845     fi
40846   else
40847     $as_echo "/* $configure_input  */" \
40848       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
40849       || as_fn_error $? "could not create -" "$LINENO" 5
40850   fi
40851 # Compute "$ac_file"'s index in $config_headers.
40852 _am_arg="$ac_file"
40853 _am_stamp_count=1
40854 for _am_header in $config_headers :; do
40855   case $_am_header in
40856     $_am_arg | $_am_arg:* )
40857       break ;;
40858     * )
40859       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
40860   esac
40861 done
40862 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
40863 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40864          X"$_am_arg" : 'X\(//\)[^/]' \| \
40865          X"$_am_arg" : 'X\(//\)$' \| \
40866          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
40867 $as_echo X"$_am_arg" |
40868     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40869             s//\1/
40870             q
40871           }
40872           /^X\(\/\/\)[^/].*/{
40873             s//\1/
40874             q
40875           }
40876           /^X\(\/\/\)$/{
40877             s//\1/
40878             q
40879           }
40880           /^X\(\/\).*/{
40881             s//\1/
40882             q
40883           }
40884           s/.*/./; q'`/stamp-h$_am_stamp_count
40885  ;;
40886   :L)
40887   #
40888   # CONFIG_LINK
40889   #
40890
40891   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
40892     :
40893   else
40894     # Prefer the file from the source tree if names are identical.
40895     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
40896       ac_source=$srcdir/$ac_source
40897     fi
40898
40899     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
40900 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
40901
40902     if test ! -r "$ac_source"; then
40903       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
40904     fi
40905     rm -f "$ac_file"
40906
40907     # Try a relative symlink, then a hard link, then a copy.
40908     case $ac_source in
40909     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
40910         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
40911     esac
40912     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
40913       ln "$ac_source" "$ac_file" 2>/dev/null ||
40914       cp -p "$ac_source" "$ac_file" ||
40915       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
40916   fi
40917  ;;
40918   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
40919 $as_echo "$as_me: executing $ac_file commands" >&6;}
40920  ;;
40921   esac
40922
40923
40924   case $ac_file$ac_mode in
40925     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
40926   # Older Autoconf quotes --file arguments for eval, but not when files
40927   # are listed without --file.  Let's play safe and only enable the eval
40928   # if we detect the quoting.
40929   case $CONFIG_FILES in
40930   *\'*) eval set x "$CONFIG_FILES" ;;
40931   *)   set x $CONFIG_FILES ;;
40932   esac
40933   shift
40934   for mf
40935   do
40936     # Strip MF so we end up with the name of the file.
40937     mf=`echo "$mf" | sed -e 's/:.*$//'`
40938     # Check whether this is an Automake generated Makefile or not.
40939     # We used to match only the files named 'Makefile.in', but
40940     # some people rename them; so instead we look at the file content.
40941     # Grep'ing the first line is not enough: some people post-process
40942     # each Makefile.in and add a new line on top of each file to say so.
40943     # Grep'ing the whole file is not good either: AIX grep has a line
40944     # limit of 2048, but all sed's we know have understand at least 4000.
40945     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
40946       dirpart=`$as_dirname -- "$mf" ||
40947 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40948          X"$mf" : 'X\(//\)[^/]' \| \
40949          X"$mf" : 'X\(//\)$' \| \
40950          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
40951 $as_echo X"$mf" |
40952     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40953             s//\1/
40954             q
40955           }
40956           /^X\(\/\/\)[^/].*/{
40957             s//\1/
40958             q
40959           }
40960           /^X\(\/\/\)$/{
40961             s//\1/
40962             q
40963           }
40964           /^X\(\/\).*/{
40965             s//\1/
40966             q
40967           }
40968           s/.*/./; q'`
40969     else
40970       continue
40971     fi
40972     # Extract the definition of DEPDIR, am__include, and am__quote
40973     # from the Makefile without running 'make'.
40974     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
40975     test -z "$DEPDIR" && continue
40976     am__include=`sed -n 's/^am__include = //p' < "$mf"`
40977     test -z "$am__include" && continue
40978     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
40979     # Find all dependency output files, they are included files with
40980     # $(DEPDIR) in their names.  We invoke sed twice because it is the
40981     # simplest approach to changing $(DEPDIR) to its actual value in the
40982     # expansion.
40983     for file in `sed -n "
40984       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
40985          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
40986       # Make sure the directory exists.
40987       test -f "$dirpart/$file" && continue
40988       fdir=`$as_dirname -- "$file" ||
40989 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40990          X"$file" : 'X\(//\)[^/]' \| \
40991          X"$file" : 'X\(//\)$' \| \
40992          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
40993 $as_echo X"$file" |
40994     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40995             s//\1/
40996             q
40997           }
40998           /^X\(\/\/\)[^/].*/{
40999             s//\1/
41000             q
41001           }
41002           /^X\(\/\/\)$/{
41003             s//\1/
41004             q
41005           }
41006           /^X\(\/\).*/{
41007             s//\1/
41008             q
41009           }
41010           s/.*/./; q'`
41011       as_dir=$dirpart/$fdir; as_fn_mkdir_p
41012       # echo "creating $dirpart/$file"
41013       echo '# dummy' > "$dirpart/$file"
41014     done
41015   done
41016 }
41017  ;;
41018     "stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
41019
41020   esac
41021 done # for ac_tag
41022
41023
41024 as_fn_exit 0
41025 _ACEOF
41026 ac_clean_files=$ac_clean_files_save
41027
41028 test $ac_write_fail = 0 ||
41029   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
41030
41031
41032 # configure is writing to config.log, and then calls config.status.
41033 # config.status does its own redirection, appending to config.log.
41034 # Unfortunately, on DOS this fails, as config.log is still kept open
41035 # by configure, so config.status won't be able to write to it; its
41036 # output is simply discarded.  So we exec the FD to /dev/null,
41037 # effectively closing config.log, so it can be properly (re)opened and
41038 # appended to by config.status.  When coming back to configure, we
41039 # need to make the FD available again.
41040 if test "$no_create" != yes; then
41041   ac_cs_success=:
41042   ac_config_status_args=
41043   test "$silent" = yes &&
41044     ac_config_status_args="$ac_config_status_args --quiet"
41045   exec 5>/dev/null
41046   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
41047   exec 5>>config.log
41048   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
41049   # would make configure fail if this is the last instruction.
41050   $ac_cs_success || as_fn_exit 1
41051 fi
41052 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
41053   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
41054 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
41055 fi
41056