87a2a7120f2955e776e0beac314bb9b9c60f3700
[platform/upstream/m4.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.66 for GNU M4 1.4.16.
4 #
5 # Report bugs to <bug-m4@gnu.org>.
6 #
7 #
8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10 # Foundation, Inc.
11 #
12 #
13 # This configure script is free software; the Free Software Foundation
14 # gives unlimited permission to copy, distribute and modify it.
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 case $0 in #((
95   *[\\/]* ) as_myself=$0 ;;
96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 for as_dir in $PATH
98 do
99   IFS=$as_save_IFS
100   test -z "$as_dir" && as_dir=.
101     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102   done
103 IFS=$as_save_IFS
104
105      ;;
106 esac
107 # We did not find ourselves, most probably we were run as `sh COMMAND'
108 # in which case we are not to be found in the path.
109 if test "x$as_myself" = x; then
110   as_myself=$0
111 fi
112 if test ! -f "$as_myself"; then
113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114   exit 1
115 fi
116
117 # Unset variables that we do not need and which cause bugs (e.g. in
118 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119 # suppresses any "Segmentation fault" message there.  '((' could
120 # trigger a bug in pdksh 5.2.14.
121 for as_var in BASH_ENV ENV MAIL MAILPATH
122 do eval test x\${$as_var+set} = xset \
123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124 done
125 PS1='$ '
126 PS2='> '
127 PS4='+ '
128
129 # NLS nuisances.
130 LC_ALL=C
131 export LC_ALL
132 LANGUAGE=C
133 export LANGUAGE
134
135 # CDPATH.
136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138 if test "x$CONFIG_SHELL" = x; then
139   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140   emulate sh
141   NULLCMD=:
142   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143   # is contrary to our usage.  Disable this feature.
144   alias -g '\${1+\"\$@\"}'='\"\$@\"'
145   setopt NO_GLOB_SUBST
146 else
147   case \`(set -o) 2>/dev/null\` in #(
148   *posix*) :
149     set -o posix ;; #(
150   *) :
151      ;;
152 esac
153 fi
154 "
155   as_required="as_fn_return () { (exit \$1); }
156 as_fn_success () { as_fn_return 0; }
157 as_fn_failure () { as_fn_return 1; }
158 as_fn_ret_success () { return 0; }
159 as_fn_ret_failure () { return 1; }
160
161 exitcode=0
162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168 else
169   exitcode=1; echo positional parameters were not saved.
170 fi
171 test x\$exitcode = x0 || exit 1"
172   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176 test \$(( 1 + 1 )) = 2 || exit 1"
177   if (eval "$as_required") 2>/dev/null; then :
178   as_have_required=yes
179 else
180   as_have_required=no
181 fi
182   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184 else
185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 as_found=false
187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188 do
189   IFS=$as_save_IFS
190   test -z "$as_dir" && as_dir=.
191   as_found=:
192   case $as_dir in #(
193          /*)
194            for as_base in sh bash ksh sh5; do
195              # Try only shells that exist, to save several forks.
196              as_shell=$as_dir/$as_base
197              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199   CONFIG_SHELL=$as_shell as_have_required=yes
200                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201   break 2
202 fi
203 fi
204            done;;
205        esac
206   as_found=false
207 done
208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210   CONFIG_SHELL=$SHELL as_have_required=yes
211 fi; }
212 IFS=$as_save_IFS
213
214
215       if test "x$CONFIG_SHELL" != x; then :
216   # We cannot yet assume a decent shell, so we have to provide a
217         # neutralization value for shells without unset; and this also
218         # works around shells that cannot unset nonexistent variables.
219         BASH_ENV=/dev/null
220         ENV=/dev/null
221         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222         export CONFIG_SHELL
223         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224 fi
225
226     if test x$as_have_required = xno; then :
227   $as_echo "$0: This script requires a shell more modern than all"
228   $as_echo "$0: the shells that I found on your system."
229   if test x${ZSH_VERSION+set} = xset ; then
230     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232   else
233     $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
234 $0: about your system, including any error possibly output
235 $0: before this message. Then install a modern shell, or
236 $0: manually run the script under such a shell if you do
237 $0: have one."
238   fi
239   exit 1
240 fi
241 fi
242 fi
243 SHELL=${CONFIG_SHELL-/bin/sh}
244 export SHELL
245 # Unset more variables known to interfere with behavior of common tools.
246 CLICOLOR_FORCE= GREP_OPTIONS=
247 unset CLICOLOR_FORCE GREP_OPTIONS
248
249 ## --------------------- ##
250 ## M4sh Shell Functions. ##
251 ## --------------------- ##
252 # as_fn_unset VAR
253 # ---------------
254 # Portably unset VAR.
255 as_fn_unset ()
256 {
257   { eval $1=; unset $1;}
258 }
259 as_unset=as_fn_unset
260
261 # as_fn_set_status STATUS
262 # -----------------------
263 # Set $? to STATUS, without forking.
264 as_fn_set_status ()
265 {
266   return $1
267 } # as_fn_set_status
268
269 # as_fn_exit STATUS
270 # -----------------
271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272 as_fn_exit ()
273 {
274   set +e
275   as_fn_set_status $1
276   exit $1
277 } # as_fn_exit
278
279 # as_fn_mkdir_p
280 # -------------
281 # Create "$as_dir" as a directory, including parents if necessary.
282 as_fn_mkdir_p ()
283 {
284
285   case $as_dir in #(
286   -*) as_dir=./$as_dir;;
287   esac
288   test -d "$as_dir" || eval $as_mkdir_p || {
289     as_dirs=
290     while :; do
291       case $as_dir in #(
292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293       *) as_qdir=$as_dir;;
294       esac
295       as_dirs="'$as_qdir' $as_dirs"
296       as_dir=`$as_dirname -- "$as_dir" ||
297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298          X"$as_dir" : 'X\(//\)[^/]' \| \
299          X"$as_dir" : 'X\(//\)$' \| \
300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301 $as_echo X"$as_dir" |
302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303             s//\1/
304             q
305           }
306           /^X\(\/\/\)[^/].*/{
307             s//\1/
308             q
309           }
310           /^X\(\/\/\)$/{
311             s//\1/
312             q
313           }
314           /^X\(\/\).*/{
315             s//\1/
316             q
317           }
318           s/.*/./; q'`
319       test -d "$as_dir" && break
320     done
321     test -z "$as_dirs" || eval "mkdir $as_dirs"
322   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325 } # as_fn_mkdir_p
326 # as_fn_append VAR VALUE
327 # ----------------------
328 # Append the text in VALUE to the end of the definition contained in VAR. Take
329 # advantage of any shell optimizations that allow amortized linear growth over
330 # repeated appends, instead of the typical quadratic growth present in naive
331 # implementations.
332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333   eval 'as_fn_append ()
334   {
335     eval $1+=\$2
336   }'
337 else
338   as_fn_append ()
339   {
340     eval $1=\$$1\$2
341   }
342 fi # as_fn_append
343
344 # as_fn_arith ARG...
345 # ------------------
346 # Perform arithmetic evaluation on the ARGs, and store the result in the
347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
348 # must be portable across $(()) and expr.
349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350   eval 'as_fn_arith ()
351   {
352     as_val=$(( $* ))
353   }'
354 else
355   as_fn_arith ()
356   {
357     as_val=`expr "$@" || test $? -eq 1`
358   }
359 fi # as_fn_arith
360
361
362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
363 # ----------------------------------------
364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366 # script with STATUS, using 1 if that was 0.
367 as_fn_error ()
368 {
369   as_status=$1; test $as_status -eq 0 && as_status=1
370   if test "$4"; then
371     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373   fi
374   $as_echo "$as_me: error: $2" >&2
375   as_fn_exit $as_status
376 } # as_fn_error
377
378 if expr a : '\(a\)' >/dev/null 2>&1 &&
379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
380   as_expr=expr
381 else
382   as_expr=false
383 fi
384
385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386   as_basename=basename
387 else
388   as_basename=false
389 fi
390
391 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392   as_dirname=dirname
393 else
394   as_dirname=false
395 fi
396
397 as_me=`$as_basename -- "$0" ||
398 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399          X"$0" : 'X\(//\)$' \| \
400          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401 $as_echo X/"$0" |
402     sed '/^.*\/\([^/][^/]*\)\/*$/{
403             s//\1/
404             q
405           }
406           /^X\/\(\/\/\)$/{
407             s//\1/
408             q
409           }
410           /^X\/\(\/\).*/{
411             s//\1/
412             q
413           }
414           s/.*/./; q'`
415
416 # Avoid depending upon Character Ranges.
417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420 as_cr_digits='0123456789'
421 as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429   sed -n '
430     p
431     /[$]LINENO/=
432   ' <$as_myself |
433     sed '
434       s/[$]LINENO.*/&-/
435       t lineno
436       b
437       :lineno
438       N
439       :loop
440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441       t loop
442       s/-\n.*//
443     ' >$as_me.lineno &&
444   chmod +x "$as_me.lineno" ||
445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447   # Don't try to exec as it changes $[0], causing all sort of problems
448   # (the dirname of $[0] is not the place where we might find the
449   # original and so on.  Autoconf is especially sensitive to this).
450   . "./$as_me.lineno"
451   # Exit status is that of the last command.
452   exit
453 }
454
455 ECHO_C= ECHO_N= ECHO_T=
456 case `echo -n x` in #(((((
457 -n*)
458   case `echo 'xy\c'` in
459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
460   xy)  ECHO_C='\c';;
461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462        ECHO_T=' ';;
463   esac;;
464 *)
465   ECHO_N='-n';;
466 esac
467
468 rm -f conf$$ conf$$.exe conf$$.file
469 if test -d conf$$.dir; then
470   rm -f conf$$.dir/conf$$.file
471 else
472   rm -f conf$$.dir
473   mkdir conf$$.dir 2>/dev/null
474 fi
475 if (echo >conf$$.file) 2>/dev/null; then
476   if ln -s conf$$.file conf$$ 2>/dev/null; then
477     as_ln_s='ln -s'
478     # ... but there are two gotchas:
479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481     # In both cases, we have to default to `cp -p'.
482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483       as_ln_s='cp -p'
484   elif ln conf$$.file conf$$ 2>/dev/null; then
485     as_ln_s=ln
486   else
487     as_ln_s='cp -p'
488   fi
489 else
490   as_ln_s='cp -p'
491 fi
492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493 rmdir conf$$.dir 2>/dev/null
494
495 if mkdir -p . 2>/dev/null; then
496   as_mkdir_p='mkdir -p "$as_dir"'
497 else
498   test -d ./-p && rmdir ./-p
499   as_mkdir_p=false
500 fi
501
502 if test -x / >/dev/null 2>&1; then
503   as_test_x='test -x'
504 else
505   if ls -dL / >/dev/null 2>&1; then
506     as_ls_L_option=L
507   else
508     as_ls_L_option=
509   fi
510   as_test_x='
511     eval sh -c '\''
512       if test -d "$1"; then
513         test -d "$1/.";
514       else
515         case $1 in #(
516         -*)set "./$1";;
517         esac;
518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519         ???[sx]*):;;*)false;;esac;fi
520     '\'' sh
521   '
522 fi
523 as_executable_p=$as_test_x
524
525 # Sed expression to map a string onto a valid CPP name.
526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528 # Sed expression to map a string onto a valid variable name.
529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532 test -n "$DJDIR" || exec 7<&0 </dev/null
533 exec 6>&1
534
535 # Name of the host.
536 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537 # so uname gets run too.
538 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540 #
541 # Initializations.
542 #
543 ac_default_prefix=/usr/local
544 ac_clean_files=
545 ac_config_libobj_dir=.
546 LIBOBJS=
547 cross_compiling=no
548 subdirs=
549 MFLAGS=
550 MAKEFLAGS=
551
552 # Identity of this package.
553 PACKAGE_NAME='GNU M4'
554 PACKAGE_TARNAME='m4'
555 PACKAGE_VERSION='1.4.16'
556 PACKAGE_STRING='GNU M4 1.4.16'
557 PACKAGE_BUGREPORT='bug-m4@gnu.org'
558 PACKAGE_URL='http://www.gnu.org/software/m4/'
559
560 ac_unique_file="src/m4.h"
561 # Factoring default headers for most tests.
562 ac_includes_default="\
563 #include <stdio.h>
564 #ifdef HAVE_SYS_TYPES_H
565 # include <sys/types.h>
566 #endif
567 #ifdef HAVE_SYS_STAT_H
568 # include <sys/stat.h>
569 #endif
570 #ifdef STDC_HEADERS
571 # include <stdlib.h>
572 # include <stddef.h>
573 #else
574 # ifdef HAVE_STDLIB_H
575 #  include <stdlib.h>
576 # endif
577 #endif
578 #ifdef HAVE_STRING_H
579 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
580 #  include <memory.h>
581 # endif
582 # include <string.h>
583 #endif
584 #ifdef HAVE_STRINGS_H
585 # include <strings.h>
586 #endif
587 #ifdef HAVE_INTTYPES_H
588 # include <inttypes.h>
589 #endif
590 #ifdef HAVE_STDINT_H
591 # include <stdint.h>
592 #endif
593 #ifdef HAVE_UNISTD_H
594 # include <unistd.h>
595 #endif"
596
597 gl_use_threads_default=
598 ac_func_list=
599 ac_header_list=
600 gl_getopt_required=POSIX
601 gl_getopt_required=POSIX
602 ac_subst_vars='M4tests_LTLIBOBJS
603 M4tests_LIBOBJS
604 M4_LTLIBOBJS
605 M4_LIBOBJS
606 CONFIG_INCLUDE
607 am__EXEEXT_FALSE
608 am__EXEEXT_TRUE
609 LTLIBOBJS
610 LIBOBJS
611 LIBTESTS_LIBDEPS
612 LIBM4_LTLIBDEPS
613 LIBM4_LIBDEPS
614 abs_aux_dir
615 POSIX_SPAWN_PORTED_FALSE
616 POSIX_SPAWN_PORTED_TRUE
617 INTL_MACOSX_LIBS
618 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
619 NEXT_LOCALE_H
620 HAVE_XLOCALE_H
621 REPLACE_DUPLOCALE
622 REPLACE_SETLOCALE
623 HAVE_DUPLOCALE
624 GNULIB_DUPLOCALE
625 GNULIB_SETLOCALE
626 LOCALE_TR_UTF8
627 am__fastdepCXX_FALSE
628 am__fastdepCXX_TRUE
629 CXXDEPMODE
630 ANSICXX_FALSE
631 ANSICXX_TRUE
632 CXXFLAGS
633 ac_ct_CXX
634 CXX
635 CXX_CHOICE
636 M4tests_WITNESS
637 REPLACE_ISWCNTRL
638 HAVE_WCTYPE_H
639 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
640 NEXT_WCTYPE_H
641 HAVE_ISWCNTRL
642 REPLACE_ISWBLANK
643 HAVE_WCTRANS_T
644 HAVE_WCTYPE_T
645 HAVE_ISWBLANK
646 GNULIB_TOWCTRANS
647 GNULIB_WCTRANS
648 GNULIB_ISWCTYPE
649 GNULIB_WCTYPE
650 GNULIB_ISWBLANK
651 HAVE_WINT_T
652 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
653 NEXT_WCHAR_H
654 HAVE_FEATURES_H
655 HAVE_UNISTD_H
656 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
657 NEXT_UNISTD_H
658 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
659 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
660 TIME_H_DEFINES_STRUCT_TIMESPEC
661 NEXT_AS_FIRST_DIRECTIVE_TIME_H
662 NEXT_TIME_H
663 REPLACE_TIMEGM
664 REPLACE_NANOSLEEP
665 REPLACE_MKTIME
666 REPLACE_LOCALTIME_R
667 HAVE_TIMEGM
668 HAVE_STRPTIME
669 HAVE_NANOSLEEP
670 HAVE_DECL_LOCALTIME_R
671 GNULIB_TIME_R
672 GNULIB_TIMEGM
673 GNULIB_STRPTIME
674 GNULIB_NANOSLEEP
675 GNULIB_MKTIME
676 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
677 NEXT_SYS_WAIT_H
678 GNULIB_WAITPID
679 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
680 NEXT_SYS_STAT_H
681 NEXT_AS_FIRST_DIRECTIVE_STRING_H
682 NEXT_STRING_H
683 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
684 NEXT_STDLIB_H
685 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
686 NEXT_STDIO_H
687 STDINT_H
688 WINT_T_SUFFIX
689 WCHAR_T_SUFFIX
690 SIG_ATOMIC_T_SUFFIX
691 SIZE_T_SUFFIX
692 PTRDIFF_T_SUFFIX
693 HAVE_SIGNED_WINT_T
694 HAVE_SIGNED_WCHAR_T
695 HAVE_SIGNED_SIG_ATOMIC_T
696 BITSIZEOF_WINT_T
697 BITSIZEOF_WCHAR_T
698 BITSIZEOF_SIG_ATOMIC_T
699 BITSIZEOF_SIZE_T
700 BITSIZEOF_PTRDIFF_T
701 HAVE_SYS_BITYPES_H
702 HAVE_SYS_INTTYPES_H
703 HAVE_STDINT_H
704 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
705 NEXT_STDINT_H
706 HAVE_SYS_TYPES_H
707 HAVE_INTTYPES_H
708 HAVE_WCHAR_H
709 HAVE_UNSIGNED_LONG_LONG_INT
710 HAVE_LONG_LONG_INT
711 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
712 NEXT_STDDEF_H
713 STDDEF_H
714 HAVE_WCHAR_T
715 REPLACE_NULL
716 HAVE__BOOL
717 STDBOOL_H
718 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
719 NEXT_STDARG_H
720 STDARG_H
721 HAVE_SPAWN_H
722 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
723 NEXT_SPAWN_H
724 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
725 NEXT_SIGNAL_H
726 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
727 HAVE_STRUCT_SIGACTION_SA_SIGACTION
728 HAVE_SIGACTION
729 HAVE_SIGINFO_T
730 HAVE_SIGSET_T
731 HAVE_POSIX_SIGNALBLOCKING
732 GNULIB_SIGACTION
733 GNULIB_SIGPROCMASK
734 GNULIB_SIGNAL_H_SIGPIPE
735 SCHED_H
736 HAVE_STRUCT_SCHED_PARAM
737 HAVE_SCHED_H
738 NEXT_AS_FIRST_DIRECTIVE_SCHED_H
739 NEXT_SCHED_H
740 REPLACE_POSIX_SPAWN
741 HAVE_POSIX_SPAWN_FILE_ACTIONS_T
742 HAVE_POSIX_SPAWNATTR_T
743 HAVE_POSIX_SPAWN
744 GNULIB_POSIX_SPAWNATTR_DESTROY
745 GNULIB_POSIX_SPAWNATTR_SETSIGMASK
746 GNULIB_POSIX_SPAWNATTR_GETSIGMASK
747 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
748 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
749 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
750 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
751 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
752 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
753 GNULIB_POSIX_SPAWNATTR_SETPGROUP
754 GNULIB_POSIX_SPAWNATTR_GETPGROUP
755 GNULIB_POSIX_SPAWNATTR_SETFLAGS
756 GNULIB_POSIX_SPAWNATTR_GETFLAGS
757 GNULIB_POSIX_SPAWNATTR_INIT
758 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
759 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
760 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
761 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
762 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
763 GNULIB_POSIX_SPAWNP
764 GNULIB_POSIX_SPAWN
765 APPLE_UNIVERSAL_BUILD
766 UNDEFINE_STRTOK_R
767 REPLACE_STRTOK_R
768 REPLACE_STRSIGNAL
769 REPLACE_STRNLEN
770 REPLACE_STRNDUP
771 REPLACE_STRNCAT
772 REPLACE_STRERROR_R
773 REPLACE_STRERROR
774 REPLACE_STRCASESTR
775 REPLACE_STRSTR
776 REPLACE_STRDUP
777 REPLACE_STPNCPY
778 REPLACE_MEMMEM
779 REPLACE_MEMCHR
780 HAVE_STRVERSCMP
781 HAVE_DECL_STRSIGNAL
782 HAVE_DECL_STRERROR_R
783 HAVE_DECL_STRTOK_R
784 HAVE_STRCASESTR
785 HAVE_STRSEP
786 HAVE_STRPBRK
787 HAVE_DECL_STRNLEN
788 HAVE_DECL_STRNDUP
789 HAVE_DECL_STRDUP
790 HAVE_STRCHRNUL
791 HAVE_STPNCPY
792 HAVE_STPCPY
793 HAVE_RAWMEMCHR
794 HAVE_DECL_MEMRCHR
795 HAVE_MEMPCPY
796 HAVE_DECL_MEMMEM
797 HAVE_MEMCHR
798 HAVE_MBSLEN
799 GNULIB_STRVERSCMP
800 GNULIB_STRSIGNAL
801 GNULIB_STRERROR_R
802 GNULIB_STRERROR
803 GNULIB_MBSTOK_R
804 GNULIB_MBSSEP
805 GNULIB_MBSSPN
806 GNULIB_MBSPBRK
807 GNULIB_MBSCSPN
808 GNULIB_MBSCASESTR
809 GNULIB_MBSPCASECMP
810 GNULIB_MBSNCASECMP
811 GNULIB_MBSCASECMP
812 GNULIB_MBSSTR
813 GNULIB_MBSRCHR
814 GNULIB_MBSCHR
815 GNULIB_MBSNLEN
816 GNULIB_MBSLEN
817 GNULIB_STRTOK_R
818 GNULIB_STRCASESTR
819 GNULIB_STRSTR
820 GNULIB_STRSEP
821 GNULIB_STRPBRK
822 GNULIB_STRNLEN
823 GNULIB_STRNDUP
824 GNULIB_STRNCAT
825 GNULIB_STRDUP
826 GNULIB_STRCHRNUL
827 GNULIB_STPNCPY
828 GNULIB_STPCPY
829 GNULIB_RAWMEMCHR
830 GNULIB_MEMRCHR
831 GNULIB_MEMPCPY
832 GNULIB_MEMMEM
833 GNULIB_MEMCHR
834 LOCALE_FR_UTF8
835 LOCALE_ZH_CN
836 LOCALE_JA
837 NEXT_AS_FIRST_DIRECTIVE_MATH_H
838 NEXT_MATH_H
839 REPLACE_UTIMENSAT
840 REPLACE_STAT
841 REPLACE_MKNOD
842 REPLACE_MKFIFO
843 REPLACE_MKDIR
844 REPLACE_LSTAT
845 REPLACE_FUTIMENS
846 REPLACE_FSTATAT
847 REPLACE_FSTAT
848 HAVE_UTIMENSAT
849 HAVE_MKNODAT
850 HAVE_MKNOD
851 HAVE_MKFIFOAT
852 HAVE_MKFIFO
853 HAVE_MKDIRAT
854 HAVE_LSTAT
855 HAVE_LCHMOD
856 HAVE_FUTIMENS
857 HAVE_FSTATAT
858 HAVE_FCHMODAT
859 GNULIB_UTIMENSAT
860 GNULIB_STAT
861 GNULIB_MKNODAT
862 GNULIB_MKNOD
863 GNULIB_MKFIFOAT
864 GNULIB_MKFIFO
865 GNULIB_MKDIRAT
866 GNULIB_LSTAT
867 GNULIB_LCHMOD
868 GNULIB_FUTIMENS
869 GNULIB_FSTATAT
870 GNULIB_FCHMODAT
871 LTLIBMULTITHREAD
872 LIBMULTITHREAD
873 LTLIBTHREAD
874 LIBTHREAD
875 LIBPTH_PREFIX
876 LTLIBPTH
877 LIBPTH
878 LOCALCHARSET_TESTS_ENVIRONMENT
879 GLIBC21
880 HAVE_LANGINFO_YESEXPR
881 HAVE_LANGINFO_ERA
882 HAVE_LANGINFO_T_FMT_AMPM
883 HAVE_LANGINFO_CODESET
884 HAVE_LANGINFO_H
885 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
886 NEXT_LANGINFO_H
887 REPLACE_NL_LANGINFO
888 HAVE_NL_LANGINFO
889 GNULIB_NL_LANGINFO
890 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
891 NEXT_SYS_TIME_H
892 REPLACE_GETTIMEOFDAY
893 HAVE_SYS_TIME_H
894 HAVE_STRUCT_TIMEVAL
895 HAVE_GETTIMEOFDAY
896 GNULIB_GETTIMEOFDAY
897 LTLIBINTL
898 LIBINTL
899 GETOPT_H
900 HAVE_GETOPT_H
901 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
902 NEXT_GETOPT_H
903 REPLACE_TRUNCL
904 REPLACE_TRUNCF
905 REPLACE_TRUNC
906 REPLACE_SIGNBIT_USING_GCC
907 REPLACE_SIGNBIT
908 REPLACE_ROUNDL
909 REPLACE_ROUNDF
910 REPLACE_ROUND
911 REPLACE_NAN
912 REPLACE_LDEXPL
913 REPLACE_ISNAN
914 REPLACE_ISINF
915 REPLACE_ISFINITE
916 REPLACE_HUGE_VAL
917 REPLACE_FREXPL
918 REPLACE_FREXP
919 REPLACE_FLOORL
920 REPLACE_FLOORF
921 REPLACE_FLOOR
922 REPLACE_CEILL
923 REPLACE_CEILF
924 REPLACE_CEIL
925 HAVE_DECL_TRUNCL
926 HAVE_DECL_TRUNCF
927 HAVE_DECL_TRUNC
928 HAVE_DECL_TANL
929 HAVE_DECL_SQRTL
930 HAVE_DECL_SINL
931 HAVE_DECL_ROUNDL
932 HAVE_DECL_ROUNDF
933 HAVE_DECL_ROUND
934 HAVE_DECL_LOGL
935 HAVE_DECL_LOGB
936 HAVE_DECL_LDEXPL
937 HAVE_DECL_FREXPL
938 HAVE_DECL_FLOORL
939 HAVE_DECL_FLOORF
940 HAVE_DECL_EXPL
941 HAVE_DECL_COSL
942 HAVE_DECL_CEILL
943 HAVE_DECL_CEILF
944 HAVE_DECL_ATANL
945 HAVE_DECL_ASINL
946 HAVE_DECL_ACOSL
947 HAVE_TANL
948 HAVE_SQRTL
949 HAVE_SINL
950 HAVE_LOGL
951 HAVE_ISNANL
952 HAVE_ISNAND
953 HAVE_ISNANF
954 HAVE_EXPL
955 HAVE_COSL
956 HAVE_ATANL
957 HAVE_ASINL
958 HAVE_ACOSL
959 GNULIB_TRUNCL
960 GNULIB_TRUNCF
961 GNULIB_TRUNC
962 GNULIB_TANL
963 GNULIB_SQRTL
964 GNULIB_SINL
965 GNULIB_SIGNBIT
966 GNULIB_ROUNDL
967 GNULIB_ROUNDF
968 GNULIB_ROUND
969 GNULIB_LOGL
970 GNULIB_LOGB
971 GNULIB_LDEXPL
972 GNULIB_ISNANL
973 GNULIB_ISNAND
974 GNULIB_ISNANF
975 GNULIB_ISNAN
976 GNULIB_ISINF
977 GNULIB_ISFINITE
978 GNULIB_FREXPL
979 GNULIB_FREXP
980 GNULIB_FLOORL
981 GNULIB_FLOORF
982 GNULIB_FLOOR
983 GNULIB_EXPL
984 GNULIB_COSL
985 GNULIB_CEILL
986 GNULIB_CEILF
987 GNULIB_CEIL
988 GNULIB_ATANL
989 GNULIB_ASINL
990 GNULIB_ACOSL
991 FLOAT_H
992 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
993 NEXT_FLOAT_H
994 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
995 NEXT_FCNTL_H
996 REPLACE_OPENAT
997 REPLACE_OPEN
998 REPLACE_FCNTL
999 HAVE_OPENAT
1000 HAVE_FCNTL
1001 GNULIB_OPENAT
1002 GNULIB_OPEN
1003 GNULIB_FCNTL
1004 REPLACE_VSPRINTF
1005 REPLACE_VSNPRINTF
1006 REPLACE_VPRINTF
1007 REPLACE_VFPRINTF
1008 REPLACE_VDPRINTF
1009 REPLACE_VASPRINTF
1010 REPLACE_TMPFILE
1011 REPLACE_STDIO_WRITE_FUNCS
1012 REPLACE_SPRINTF
1013 REPLACE_SNPRINTF
1014 REPLACE_RENAMEAT
1015 REPLACE_RENAME
1016 REPLACE_REMOVE
1017 REPLACE_PRINTF
1018 REPLACE_POPEN
1019 REPLACE_PERROR
1020 REPLACE_OBSTACK_PRINTF
1021 REPLACE_GETLINE
1022 REPLACE_GETDELIM
1023 REPLACE_FTELLO
1024 REPLACE_FTELL
1025 REPLACE_FSEEKO
1026 REPLACE_FSEEK
1027 REPLACE_FREOPEN
1028 REPLACE_FPURGE
1029 REPLACE_FPRINTF
1030 REPLACE_FOPEN
1031 REPLACE_FFLUSH
1032 REPLACE_FCLOSE
1033 REPLACE_DPRINTF
1034 HAVE_VDPRINTF
1035 HAVE_VASPRINTF
1036 HAVE_RENAMEAT
1037 HAVE_FTELLO
1038 HAVE_FSEEKO
1039 HAVE_DPRINTF
1040 HAVE_DECL_VSNPRINTF
1041 HAVE_DECL_SNPRINTF
1042 HAVE_DECL_OBSTACK_PRINTF
1043 HAVE_DECL_GETLINE
1044 HAVE_DECL_GETDELIM
1045 HAVE_DECL_FTELLO
1046 HAVE_DECL_FSEEKO
1047 HAVE_DECL_FPURGE
1048 GNULIB_VSPRINTF_POSIX
1049 GNULIB_VSNPRINTF
1050 GNULIB_VPRINTF_POSIX
1051 GNULIB_VPRINTF
1052 GNULIB_VFPRINTF_POSIX
1053 GNULIB_VFPRINTF
1054 GNULIB_VDPRINTF
1055 GNULIB_VASPRINTF
1056 GNULIB_TMPFILE
1057 GNULIB_STDIO_H_SIGPIPE
1058 GNULIB_SPRINTF_POSIX
1059 GNULIB_SNPRINTF
1060 GNULIB_RENAMEAT
1061 GNULIB_RENAME
1062 GNULIB_REMOVE
1063 GNULIB_PUTS
1064 GNULIB_PUTCHAR
1065 GNULIB_PUTC
1066 GNULIB_PRINTF_POSIX
1067 GNULIB_PRINTF
1068 GNULIB_POPEN
1069 GNULIB_PERROR
1070 GNULIB_OBSTACK_PRINTF_POSIX
1071 GNULIB_OBSTACK_PRINTF
1072 GNULIB_GETLINE
1073 GNULIB_GETDELIM
1074 GNULIB_FWRITE
1075 GNULIB_FTELLO
1076 GNULIB_FTELL
1077 GNULIB_FSEEKO
1078 GNULIB_FSEEK
1079 GNULIB_FREOPEN
1080 GNULIB_FPUTS
1081 GNULIB_FPUTC
1082 GNULIB_FPURGE
1083 GNULIB_FPRINTF_POSIX
1084 GNULIB_FPRINTF
1085 GNULIB_FOPEN
1086 GNULIB_FFLUSH
1087 GNULIB_FCLOSE
1088 GNULIB_DPRINTF
1089 EOVERFLOW_VALUE
1090 EOVERFLOW_HIDDEN
1091 ENOLINK_VALUE
1092 ENOLINK_HIDDEN
1093 EMULTIHOP_VALUE
1094 EMULTIHOP_HIDDEN
1095 ERRNO_H
1096 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1097 NEXT_ERRNO_H
1098 PRAGMA_COLUMNS
1099 PRAGMA_SYSTEM_HEADER
1100 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1101 INCLUDE_NEXT
1102 pkglibexecdir
1103 lispdir
1104 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1105 UNISTD_H_HAVE_WINSOCK2_H
1106 REPLACE_WRITE
1107 REPLACE_USLEEP
1108 REPLACE_UNLINKAT
1109 REPLACE_UNLINK
1110 REPLACE_TTYNAME_R
1111 REPLACE_SYMLINK
1112 REPLACE_SLEEP
1113 REPLACE_RMDIR
1114 REPLACE_READLINK
1115 REPLACE_PWRITE
1116 REPLACE_PREAD
1117 REPLACE_LSEEK
1118 REPLACE_LINKAT
1119 REPLACE_LINK
1120 REPLACE_LCHOWN
1121 REPLACE_GETPAGESIZE
1122 REPLACE_GETGROUPS
1123 REPLACE_GETLOGIN_R
1124 REPLACE_GETDOMAINNAME
1125 REPLACE_GETCWD
1126 REPLACE_FCHOWNAT
1127 REPLACE_DUP2
1128 REPLACE_DUP
1129 REPLACE_CLOSE
1130 REPLACE_CHOWN
1131 HAVE_SYS_PARAM_H
1132 HAVE_OS_H
1133 HAVE_DECL_TTYNAME_R
1134 HAVE_DECL_GETUSERSHELL
1135 HAVE_DECL_GETPAGESIZE
1136 HAVE_DECL_GETLOGIN_R
1137 HAVE_DECL_GETDOMAINNAME
1138 HAVE_DECL_FCHDIR
1139 HAVE_DECL_ENVIRON
1140 HAVE_USLEEP
1141 HAVE_UNLINKAT
1142 HAVE_SYMLINKAT
1143 HAVE_SYMLINK
1144 HAVE_SLEEP
1145 HAVE_READLINKAT
1146 HAVE_READLINK
1147 HAVE_PWRITE
1148 HAVE_PREAD
1149 HAVE_PIPE2
1150 HAVE_PIPE
1151 HAVE_LINKAT
1152 HAVE_LINK
1153 HAVE_LCHOWN
1154 HAVE_GETPAGESIZE
1155 HAVE_GETLOGIN
1156 HAVE_GETHOSTNAME
1157 HAVE_GETGROUPS
1158 HAVE_GETDTABLESIZE
1159 HAVE_FTRUNCATE
1160 HAVE_FSYNC
1161 HAVE_FCHOWNAT
1162 HAVE_FCHDIR
1163 HAVE_FACCESSAT
1164 HAVE_EUIDACCESS
1165 HAVE_DUP3
1166 HAVE_DUP2
1167 HAVE_CHOWN
1168 GNULIB_WRITE
1169 GNULIB_USLEEP
1170 GNULIB_UNLINKAT
1171 GNULIB_UNLINK
1172 GNULIB_UNISTD_H_SIGPIPE
1173 GNULIB_UNISTD_H_GETOPT
1174 GNULIB_TTYNAME_R
1175 GNULIB_SYMLINKAT
1176 GNULIB_SYMLINK
1177 GNULIB_SLEEP
1178 GNULIB_RMDIR
1179 GNULIB_READLINKAT
1180 GNULIB_READLINK
1181 GNULIB_PWRITE
1182 GNULIB_PREAD
1183 GNULIB_PIPE2
1184 GNULIB_PIPE
1185 GNULIB_LSEEK
1186 GNULIB_LINKAT
1187 GNULIB_LINK
1188 GNULIB_LCHOWN
1189 GNULIB_GETUSERSHELL
1190 GNULIB_GETPAGESIZE
1191 GNULIB_GETLOGIN_R
1192 GNULIB_GETLOGIN
1193 GNULIB_GETHOSTNAME
1194 GNULIB_GETGROUPS
1195 GNULIB_GETDTABLESIZE
1196 GNULIB_GETDOMAINNAME
1197 GNULIB_GETCWD
1198 GNULIB_FTRUNCATE
1199 GNULIB_FSYNC
1200 GNULIB_FCHOWNAT
1201 GNULIB_FCHDIR
1202 GNULIB_FACCESSAT
1203 GNULIB_EUIDACCESS
1204 GNULIB_ENVIRON
1205 GNULIB_DUP3
1206 GNULIB_DUP2
1207 GNULIB_CLOSE
1208 GNULIB_CHOWN
1209 REPLACE_WCTOMB
1210 REPLACE_UNSETENV
1211 REPLACE_STRTOD
1212 REPLACE_SETENV
1213 REPLACE_REALPATH
1214 REPLACE_REALLOC
1215 REPLACE_PUTENV
1216 REPLACE_MKSTEMP
1217 REPLACE_MBTOWC
1218 REPLACE_MALLOC
1219 REPLACE_CANONICALIZE_FILE_NAME
1220 REPLACE_CALLOC
1221 HAVE_DECL_UNSETENV
1222 HAVE_UNLOCKPT
1223 HAVE_SYS_LOADAVG_H
1224 HAVE_STRUCT_RANDOM_DATA
1225 HAVE_STRTOULL
1226 HAVE_STRTOLL
1227 HAVE_STRTOD
1228 HAVE_DECL_SETENV
1229 HAVE_SETENV
1230 HAVE_RPMATCH
1231 HAVE_REALPATH
1232 HAVE_RANDOM_R
1233 HAVE_RANDOM_H
1234 HAVE_PTSNAME
1235 HAVE_MKSTEMPS
1236 HAVE_MKSTEMP
1237 HAVE_MKOSTEMPS
1238 HAVE_MKOSTEMP
1239 HAVE_MKDTEMP
1240 HAVE_GRANTPT
1241 HAVE_GETSUBOPT
1242 HAVE_DECL_GETLOADAVG
1243 HAVE_CANONICALIZE_FILE_NAME
1244 HAVE_ATOLL
1245 HAVE__EXIT
1246 GNULIB_WCTOMB
1247 GNULIB_UNSETENV
1248 GNULIB_UNLOCKPT
1249 GNULIB_SYSTEM_POSIX
1250 GNULIB_STRTOULL
1251 GNULIB_STRTOLL
1252 GNULIB_STRTOD
1253 GNULIB_SETENV
1254 GNULIB_RPMATCH
1255 GNULIB_REALPATH
1256 GNULIB_REALLOC_POSIX
1257 GNULIB_RANDOM_R
1258 GNULIB_PUTENV
1259 GNULIB_PTSNAME
1260 GNULIB_MKSTEMPS
1261 GNULIB_MKSTEMP
1262 GNULIB_MKOSTEMPS
1263 GNULIB_MKOSTEMP
1264 GNULIB_MKDTEMP
1265 GNULIB_MBTOWC
1266 GNULIB_MALLOC_POSIX
1267 GNULIB_GRANTPT
1268 GNULIB_GETSUBOPT
1269 GNULIB_GETLOADAVG
1270 GNULIB_CANONICALIZE_FILE_NAME
1271 GNULIB_CALLOC_POSIX
1272 GNULIB_ATOLL
1273 GNULIB__EXIT
1274 LTLIBCSTACK
1275 LIBCSTACK
1276 LIBSIGSEGV_PREFIX
1277 LTLIBSIGSEGV
1278 LIBSIGSEGV
1279 HAVE_LIBSIGSEGV
1280 LOCALE_FR
1281 REPLACE_WCSWIDTH
1282 REPLACE_WCWIDTH
1283 REPLACE_WCSNRTOMBS
1284 REPLACE_WCSRTOMBS
1285 REPLACE_WCRTOMB
1286 REPLACE_MBSNRTOWCS
1287 REPLACE_MBSRTOWCS
1288 REPLACE_MBRLEN
1289 REPLACE_MBRTOWC
1290 REPLACE_MBSINIT
1291 REPLACE_WCTOB
1292 REPLACE_BTOWC
1293 REPLACE_MBSTATE_T
1294 HAVE_DECL_WCWIDTH
1295 HAVE_DECL_WCTOB
1296 HAVE_WCSWIDTH
1297 HAVE_WCSTOK
1298 HAVE_WCSSTR
1299 HAVE_WCSPBRK
1300 HAVE_WCSSPN
1301 HAVE_WCSCSPN
1302 HAVE_WCSRCHR
1303 HAVE_WCSCHR
1304 HAVE_WCSDUP
1305 HAVE_WCSXFRM
1306 HAVE_WCSCOLL
1307 HAVE_WCSNCASECMP
1308 HAVE_WCSCASECMP
1309 HAVE_WCSNCMP
1310 HAVE_WCSCMP
1311 HAVE_WCSNCAT
1312 HAVE_WCSCAT
1313 HAVE_WCPNCPY
1314 HAVE_WCSNCPY
1315 HAVE_WCPCPY
1316 HAVE_WCSCPY
1317 HAVE_WCSNLEN
1318 HAVE_WCSLEN
1319 HAVE_WMEMSET
1320 HAVE_WMEMMOVE
1321 HAVE_WMEMCPY
1322 HAVE_WMEMCMP
1323 HAVE_WMEMCHR
1324 HAVE_WCSNRTOMBS
1325 HAVE_WCSRTOMBS
1326 HAVE_WCRTOMB
1327 HAVE_MBSNRTOWCS
1328 HAVE_MBSRTOWCS
1329 HAVE_MBRLEN
1330 HAVE_MBRTOWC
1331 HAVE_MBSINIT
1332 HAVE_BTOWC
1333 GNULIB_WCSWIDTH
1334 GNULIB_WCSTOK
1335 GNULIB_WCSSTR
1336 GNULIB_WCSPBRK
1337 GNULIB_WCSSPN
1338 GNULIB_WCSCSPN
1339 GNULIB_WCSRCHR
1340 GNULIB_WCSCHR
1341 GNULIB_WCSDUP
1342 GNULIB_WCSXFRM
1343 GNULIB_WCSCOLL
1344 GNULIB_WCSNCASECMP
1345 GNULIB_WCSCASECMP
1346 GNULIB_WCSNCMP
1347 GNULIB_WCSCMP
1348 GNULIB_WCSNCAT
1349 GNULIB_WCSCAT
1350 GNULIB_WCPNCPY
1351 GNULIB_WCSNCPY
1352 GNULIB_WCPCPY
1353 GNULIB_WCSCPY
1354 GNULIB_WCSNLEN
1355 GNULIB_WCSLEN
1356 GNULIB_WMEMSET
1357 GNULIB_WMEMMOVE
1358 GNULIB_WMEMCPY
1359 GNULIB_WMEMCMP
1360 GNULIB_WMEMCHR
1361 GNULIB_WCWIDTH
1362 GNULIB_WCSNRTOMBS
1363 GNULIB_WCSRTOMBS
1364 GNULIB_WCRTOMB
1365 GNULIB_MBSNRTOWCS
1366 GNULIB_MBSRTOWCS
1367 GNULIB_MBRLEN
1368 GNULIB_MBRTOWC
1369 GNULIB_MBSINIT
1370 GNULIB_WCTOB
1371 GNULIB_BTOWC
1372 ALLOCA_H
1373 ALLOCA
1374 GL_COND_LIBTOOL_FALSE
1375 GL_COND_LIBTOOL_TRUE
1376 WARN_CFLAGS
1377 WERROR_CFLAGS
1378 EGREP
1379 GREP
1380 CPP
1381 host_os
1382 host_vendor
1383 host_cpu
1384 host
1385 build_os
1386 build_vendor
1387 build_cpu
1388 build
1389 RANLIB
1390 am__fastdepCC_FALSE
1391 am__fastdepCC_TRUE
1392 CCDEPMODE
1393 AMDEPBACKSLASH
1394 AMDEP_FALSE
1395 AMDEP_TRUE
1396 am__quote
1397 am__include
1398 DEPDIR
1399 OBJEXT
1400 EXEEXT
1401 ac_ct_CC
1402 CPPFLAGS
1403 LDFLAGS
1404 CFLAGS
1405 CC
1406 AM_BACKSLASH
1407 AM_DEFAULT_VERBOSITY
1408 am__untar
1409 am__tar
1410 AMTAR
1411 am__leading_dot
1412 SET_MAKE
1413 AWK
1414 mkdir_p
1415 MKDIR_P
1416 INSTALL_STRIP_PROGRAM
1417 STRIP
1418 install_sh
1419 MAKEINFO
1420 AUTOHEADER
1421 AUTOMAKE
1422 AUTOCONF
1423 ACLOCAL
1424 VERSION
1425 PACKAGE
1426 CYGPATH_W
1427 am__isrc
1428 INSTALL_DATA
1429 INSTALL_SCRIPT
1430 INSTALL_PROGRAM
1431 target_alias
1432 host_alias
1433 build_alias
1434 LIBS
1435 ECHO_T
1436 ECHO_N
1437 ECHO_C
1438 DEFS
1439 mandir
1440 localedir
1441 libdir
1442 psdir
1443 pdfdir
1444 dvidir
1445 htmldir
1446 infodir
1447 docdir
1448 oldincludedir
1449 includedir
1450 localstatedir
1451 sharedstatedir
1452 sysconfdir
1453 datadir
1454 datarootdir
1455 libexecdir
1456 sbindir
1457 bindir
1458 program_transform_name
1459 prefix
1460 exec_prefix
1461 PACKAGE_URL
1462 PACKAGE_BUGREPORT
1463 PACKAGE_STRING
1464 PACKAGE_VERSION
1465 PACKAGE_TARNAME
1466 PACKAGE_NAME
1467 PATH_SEPARATOR
1468 SHELL'
1469 ac_subst_files=''
1470 ac_user_opts='
1471 enable_option_checking
1472 enable_silent_rules
1473 enable_dependency_tracking
1474 enable_threads
1475 enable_gcc_warnings
1476 enable_assert
1477 with_gnu_ld
1478 enable_rpath
1479 with_libsigsegv_prefix
1480 with_libpth_prefix
1481 enable_largefile
1482 with_included_regex
1483 with_packager
1484 with_packager_version
1485 with_packager_bug_reports
1486 enable_c__
1487 enable_changeword
1488 with_syscmd_shell
1489 with_dmalloc
1490 '
1491       ac_precious_vars='build_alias
1492 host_alias
1493 target_alias
1494 CC
1495 CFLAGS
1496 LDFLAGS
1497 LIBS
1498 CPPFLAGS
1499 CPP
1500 CXX
1501 CXXFLAGS'
1502
1503
1504 # Initialize some variables set by options.
1505 ac_init_help=
1506 ac_init_version=false
1507 ac_unrecognized_opts=
1508 ac_unrecognized_sep=
1509 # The variables have the same names as the options, with
1510 # dashes changed to underlines.
1511 cache_file=/dev/null
1512 exec_prefix=NONE
1513 no_create=
1514 no_recursion=
1515 prefix=NONE
1516 program_prefix=NONE
1517 program_suffix=NONE
1518 program_transform_name=s,x,x,
1519 silent=
1520 site=
1521 srcdir=
1522 verbose=
1523 x_includes=NONE
1524 x_libraries=NONE
1525
1526 # Installation directory options.
1527 # These are left unexpanded so users can "make install exec_prefix=/foo"
1528 # and all the variables that are supposed to be based on exec_prefix
1529 # by default will actually change.
1530 # Use braces instead of parens because sh, perl, etc. also accept them.
1531 # (The list follows the same order as the GNU Coding Standards.)
1532 bindir='${exec_prefix}/bin'
1533 sbindir='${exec_prefix}/sbin'
1534 libexecdir='${exec_prefix}/libexec'
1535 datarootdir='${prefix}/share'
1536 datadir='${datarootdir}'
1537 sysconfdir='${prefix}/etc'
1538 sharedstatedir='${prefix}/com'
1539 localstatedir='${prefix}/var'
1540 includedir='${prefix}/include'
1541 oldincludedir='/usr/include'
1542 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1543 infodir='${datarootdir}/info'
1544 htmldir='${docdir}'
1545 dvidir='${docdir}'
1546 pdfdir='${docdir}'
1547 psdir='${docdir}'
1548 libdir='${exec_prefix}/lib'
1549 localedir='${datarootdir}/locale'
1550 mandir='${datarootdir}/man'
1551
1552 ac_prev=
1553 ac_dashdash=
1554 for ac_option
1555 do
1556   # If the previous option needs an argument, assign it.
1557   if test -n "$ac_prev"; then
1558     eval $ac_prev=\$ac_option
1559     ac_prev=
1560     continue
1561   fi
1562
1563   case $ac_option in
1564   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1565   *)    ac_optarg=yes ;;
1566   esac
1567
1568   # Accept the important Cygnus configure options, so we can diagnose typos.
1569
1570   case $ac_dashdash$ac_option in
1571   --)
1572     ac_dashdash=yes ;;
1573
1574   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1575     ac_prev=bindir ;;
1576   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1577     bindir=$ac_optarg ;;
1578
1579   -build | --build | --buil | --bui | --bu)
1580     ac_prev=build_alias ;;
1581   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1582     build_alias=$ac_optarg ;;
1583
1584   -cache-file | --cache-file | --cache-fil | --cache-fi \
1585   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1586     ac_prev=cache_file ;;
1587   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1588   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1589     cache_file=$ac_optarg ;;
1590
1591   --config-cache | -C)
1592     cache_file=config.cache ;;
1593
1594   -datadir | --datadir | --datadi | --datad)
1595     ac_prev=datadir ;;
1596   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1597     datadir=$ac_optarg ;;
1598
1599   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1600   | --dataroo | --dataro | --datar)
1601     ac_prev=datarootdir ;;
1602   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1603   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1604     datarootdir=$ac_optarg ;;
1605
1606   -disable-* | --disable-*)
1607     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1608     # Reject names that are not valid shell variable names.
1609     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1610       as_fn_error $? "invalid feature name: $ac_useropt"
1611     ac_useropt_orig=$ac_useropt
1612     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1613     case $ac_user_opts in
1614       *"
1615 "enable_$ac_useropt"
1616 "*) ;;
1617       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1618          ac_unrecognized_sep=', ';;
1619     esac
1620     eval enable_$ac_useropt=no ;;
1621
1622   -docdir | --docdir | --docdi | --doc | --do)
1623     ac_prev=docdir ;;
1624   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1625     docdir=$ac_optarg ;;
1626
1627   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1628     ac_prev=dvidir ;;
1629   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1630     dvidir=$ac_optarg ;;
1631
1632   -enable-* | --enable-*)
1633     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1634     # Reject names that are not valid shell variable names.
1635     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1636       as_fn_error $? "invalid feature name: $ac_useropt"
1637     ac_useropt_orig=$ac_useropt
1638     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1639     case $ac_user_opts in
1640       *"
1641 "enable_$ac_useropt"
1642 "*) ;;
1643       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1644          ac_unrecognized_sep=', ';;
1645     esac
1646     eval enable_$ac_useropt=\$ac_optarg ;;
1647
1648   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1649   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1650   | --exec | --exe | --ex)
1651     ac_prev=exec_prefix ;;
1652   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1653   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1654   | --exec=* | --exe=* | --ex=*)
1655     exec_prefix=$ac_optarg ;;
1656
1657   -gas | --gas | --ga | --g)
1658     # Obsolete; use --with-gas.
1659     with_gas=yes ;;
1660
1661   -help | --help | --hel | --he | -h)
1662     ac_init_help=long ;;
1663   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1664     ac_init_help=recursive ;;
1665   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1666     ac_init_help=short ;;
1667
1668   -host | --host | --hos | --ho)
1669     ac_prev=host_alias ;;
1670   -host=* | --host=* | --hos=* | --ho=*)
1671     host_alias=$ac_optarg ;;
1672
1673   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1674     ac_prev=htmldir ;;
1675   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1676   | --ht=*)
1677     htmldir=$ac_optarg ;;
1678
1679   -includedir | --includedir | --includedi | --included | --include \
1680   | --includ | --inclu | --incl | --inc)
1681     ac_prev=includedir ;;
1682   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1683   | --includ=* | --inclu=* | --incl=* | --inc=*)
1684     includedir=$ac_optarg ;;
1685
1686   -infodir | --infodir | --infodi | --infod | --info | --inf)
1687     ac_prev=infodir ;;
1688   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1689     infodir=$ac_optarg ;;
1690
1691   -libdir | --libdir | --libdi | --libd)
1692     ac_prev=libdir ;;
1693   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1694     libdir=$ac_optarg ;;
1695
1696   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1697   | --libexe | --libex | --libe)
1698     ac_prev=libexecdir ;;
1699   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1700   | --libexe=* | --libex=* | --libe=*)
1701     libexecdir=$ac_optarg ;;
1702
1703   -localedir | --localedir | --localedi | --localed | --locale)
1704     ac_prev=localedir ;;
1705   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1706     localedir=$ac_optarg ;;
1707
1708   -localstatedir | --localstatedir | --localstatedi | --localstated \
1709   | --localstate | --localstat | --localsta | --localst | --locals)
1710     ac_prev=localstatedir ;;
1711   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1712   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1713     localstatedir=$ac_optarg ;;
1714
1715   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1716     ac_prev=mandir ;;
1717   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1718     mandir=$ac_optarg ;;
1719
1720   -nfp | --nfp | --nf)
1721     # Obsolete; use --without-fp.
1722     with_fp=no ;;
1723
1724   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1725   | --no-cr | --no-c | -n)
1726     no_create=yes ;;
1727
1728   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1729   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1730     no_recursion=yes ;;
1731
1732   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1733   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1734   | --oldin | --oldi | --old | --ol | --o)
1735     ac_prev=oldincludedir ;;
1736   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1737   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1738   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1739     oldincludedir=$ac_optarg ;;
1740
1741   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1742     ac_prev=prefix ;;
1743   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1744     prefix=$ac_optarg ;;
1745
1746   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1747   | --program-pre | --program-pr | --program-p)
1748     ac_prev=program_prefix ;;
1749   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1750   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1751     program_prefix=$ac_optarg ;;
1752
1753   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1754   | --program-suf | --program-su | --program-s)
1755     ac_prev=program_suffix ;;
1756   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1757   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1758     program_suffix=$ac_optarg ;;
1759
1760   -program-transform-name | --program-transform-name \
1761   | --program-transform-nam | --program-transform-na \
1762   | --program-transform-n | --program-transform- \
1763   | --program-transform | --program-transfor \
1764   | --program-transfo | --program-transf \
1765   | --program-trans | --program-tran \
1766   | --progr-tra | --program-tr | --program-t)
1767     ac_prev=program_transform_name ;;
1768   -program-transform-name=* | --program-transform-name=* \
1769   | --program-transform-nam=* | --program-transform-na=* \
1770   | --program-transform-n=* | --program-transform-=* \
1771   | --program-transform=* | --program-transfor=* \
1772   | --program-transfo=* | --program-transf=* \
1773   | --program-trans=* | --program-tran=* \
1774   | --progr-tra=* | --program-tr=* | --program-t=*)
1775     program_transform_name=$ac_optarg ;;
1776
1777   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1778     ac_prev=pdfdir ;;
1779   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1780     pdfdir=$ac_optarg ;;
1781
1782   -psdir | --psdir | --psdi | --psd | --ps)
1783     ac_prev=psdir ;;
1784   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1785     psdir=$ac_optarg ;;
1786
1787   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1788   | -silent | --silent | --silen | --sile | --sil)
1789     silent=yes ;;
1790
1791   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1792     ac_prev=sbindir ;;
1793   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1794   | --sbi=* | --sb=*)
1795     sbindir=$ac_optarg ;;
1796
1797   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1798   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1799   | --sharedst | --shareds | --shared | --share | --shar \
1800   | --sha | --sh)
1801     ac_prev=sharedstatedir ;;
1802   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1803   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1804   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1805   | --sha=* | --sh=*)
1806     sharedstatedir=$ac_optarg ;;
1807
1808   -site | --site | --sit)
1809     ac_prev=site ;;
1810   -site=* | --site=* | --sit=*)
1811     site=$ac_optarg ;;
1812
1813   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1814     ac_prev=srcdir ;;
1815   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1816     srcdir=$ac_optarg ;;
1817
1818   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1819   | --syscon | --sysco | --sysc | --sys | --sy)
1820     ac_prev=sysconfdir ;;
1821   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1822   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1823     sysconfdir=$ac_optarg ;;
1824
1825   -target | --target | --targe | --targ | --tar | --ta | --t)
1826     ac_prev=target_alias ;;
1827   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1828     target_alias=$ac_optarg ;;
1829
1830   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1831     verbose=yes ;;
1832
1833   -version | --version | --versio | --versi | --vers | -V)
1834     ac_init_version=: ;;
1835
1836   -with-* | --with-*)
1837     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1838     # Reject names that are not valid shell variable names.
1839     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1840       as_fn_error $? "invalid package name: $ac_useropt"
1841     ac_useropt_orig=$ac_useropt
1842     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1843     case $ac_user_opts in
1844       *"
1845 "with_$ac_useropt"
1846 "*) ;;
1847       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1848          ac_unrecognized_sep=', ';;
1849     esac
1850     eval with_$ac_useropt=\$ac_optarg ;;
1851
1852   -without-* | --without-*)
1853     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1854     # Reject names that are not valid shell variable names.
1855     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1856       as_fn_error $? "invalid package name: $ac_useropt"
1857     ac_useropt_orig=$ac_useropt
1858     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1859     case $ac_user_opts in
1860       *"
1861 "with_$ac_useropt"
1862 "*) ;;
1863       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1864          ac_unrecognized_sep=', ';;
1865     esac
1866     eval with_$ac_useropt=no ;;
1867
1868   --x)
1869     # Obsolete; use --with-x.
1870     with_x=yes ;;
1871
1872   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1873   | --x-incl | --x-inc | --x-in | --x-i)
1874     ac_prev=x_includes ;;
1875   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1876   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1877     x_includes=$ac_optarg ;;
1878
1879   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1880   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1881     ac_prev=x_libraries ;;
1882   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1883   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1884     x_libraries=$ac_optarg ;;
1885
1886   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1887 Try \`$0 --help' for more information"
1888     ;;
1889
1890   *=*)
1891     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1892     # Reject names that are not valid shell variable names.
1893     case $ac_envvar in #(
1894       '' | [0-9]* | *[!_$as_cr_alnum]* )
1895       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1896     esac
1897     eval $ac_envvar=\$ac_optarg
1898     export $ac_envvar ;;
1899
1900   *)
1901     # FIXME: should be removed in autoconf 3.0.
1902     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1903     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1904       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1905     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1906     ;;
1907
1908   esac
1909 done
1910
1911 if test -n "$ac_prev"; then
1912   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1913   as_fn_error $? "missing argument to $ac_option"
1914 fi
1915
1916 if test -n "$ac_unrecognized_opts"; then
1917   case $enable_option_checking in
1918     no) ;;
1919     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1920     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1921   esac
1922 fi
1923
1924 # Check all directory arguments for consistency.
1925 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1926                 datadir sysconfdir sharedstatedir localstatedir includedir \
1927                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1928                 libdir localedir mandir
1929 do
1930   eval ac_val=\$$ac_var
1931   # Remove trailing slashes.
1932   case $ac_val in
1933     */ )
1934       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1935       eval $ac_var=\$ac_val;;
1936   esac
1937   # Be sure to have absolute directory names.
1938   case $ac_val in
1939     [\\/$]* | ?:[\\/]* )  continue;;
1940     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1941   esac
1942   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1943 done
1944
1945 # There might be people who depend on the old broken behavior: `$host'
1946 # used to hold the argument of --host etc.
1947 # FIXME: To remove some day.
1948 build=$build_alias
1949 host=$host_alias
1950 target=$target_alias
1951
1952 # FIXME: To remove some day.
1953 if test "x$host_alias" != x; then
1954   if test "x$build_alias" = x; then
1955     cross_compiling=maybe
1956     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1957     If a cross compiler is detected then cross compile mode will be used" >&2
1958   elif test "x$build_alias" != "x$host_alias"; then
1959     cross_compiling=yes
1960   fi
1961 fi
1962
1963 ac_tool_prefix=
1964 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1965
1966 test "$silent" = yes && exec 6>/dev/null
1967
1968
1969 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1970 ac_ls_di=`ls -di .` &&
1971 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1972   as_fn_error $? "working directory cannot be determined"
1973 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1974   as_fn_error $? "pwd does not report name of working directory"
1975
1976
1977 # Find the source files, if location was not specified.
1978 if test -z "$srcdir"; then
1979   ac_srcdir_defaulted=yes
1980   # Try the directory containing this script, then the parent directory.
1981   ac_confdir=`$as_dirname -- "$as_myself" ||
1982 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1983          X"$as_myself" : 'X\(//\)[^/]' \| \
1984          X"$as_myself" : 'X\(//\)$' \| \
1985          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1986 $as_echo X"$as_myself" |
1987     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1988             s//\1/
1989             q
1990           }
1991           /^X\(\/\/\)[^/].*/{
1992             s//\1/
1993             q
1994           }
1995           /^X\(\/\/\)$/{
1996             s//\1/
1997             q
1998           }
1999           /^X\(\/\).*/{
2000             s//\1/
2001             q
2002           }
2003           s/.*/./; q'`
2004   srcdir=$ac_confdir
2005   if test ! -r "$srcdir/$ac_unique_file"; then
2006     srcdir=..
2007   fi
2008 else
2009   ac_srcdir_defaulted=no
2010 fi
2011 if test ! -r "$srcdir/$ac_unique_file"; then
2012   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2013   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2014 fi
2015 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2016 ac_abs_confdir=`(
2017         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2018         pwd)`
2019 # When building in place, set srcdir=.
2020 if test "$ac_abs_confdir" = "$ac_pwd"; then
2021   srcdir=.
2022 fi
2023 # Remove unnecessary trailing slashes from srcdir.
2024 # Double slashes in file names in object file debugging info
2025 # mess up M-x gdb in Emacs.
2026 case $srcdir in
2027 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2028 esac
2029 for ac_var in $ac_precious_vars; do
2030   eval ac_env_${ac_var}_set=\${${ac_var}+set}
2031   eval ac_env_${ac_var}_value=\$${ac_var}
2032   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2033   eval ac_cv_env_${ac_var}_value=\$${ac_var}
2034 done
2035
2036 #
2037 # Report the --help message.
2038 #
2039 if test "$ac_init_help" = "long"; then
2040   # Omit some internal or obsolete options to make the list less imposing.
2041   # This message is too long to be a string in the A/UX 3.1 sh.
2042   cat <<_ACEOF
2043 \`configure' configures GNU M4 1.4.16 to adapt to many kinds of systems.
2044
2045 Usage: $0 [OPTION]... [VAR=VALUE]...
2046
2047 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2048 VAR=VALUE.  See below for descriptions of some of the useful variables.
2049
2050 Defaults for the options are specified in brackets.
2051
2052 Configuration:
2053   -h, --help              display this help and exit
2054       --help=short        display options specific to this package
2055       --help=recursive    display the short help of all the included packages
2056   -V, --version           display version information and exit
2057   -q, --quiet, --silent   do not print \`checking ...' messages
2058       --cache-file=FILE   cache test results in FILE [disabled]
2059   -C, --config-cache      alias for \`--cache-file=config.cache'
2060   -n, --no-create         do not create output files
2061       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2062
2063 Installation directories:
2064   --prefix=PREFIX         install architecture-independent files in PREFIX
2065                           [$ac_default_prefix]
2066   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2067                           [PREFIX]
2068
2069 By default, \`make install' will install all the files in
2070 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2071 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2072 for instance \`--prefix=\$HOME'.
2073
2074 For better control, use the options below.
2075
2076 Fine tuning of the installation directories:
2077   --bindir=DIR            user executables [EPREFIX/bin]
2078   --sbindir=DIR           system admin executables [EPREFIX/sbin]
2079   --libexecdir=DIR        program executables [EPREFIX/libexec]
2080   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2081   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2082   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2083   --libdir=DIR            object code libraries [EPREFIX/lib]
2084   --includedir=DIR        C header files [PREFIX/include]
2085   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2086   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2087   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2088   --infodir=DIR           info documentation [DATAROOTDIR/info]
2089   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2090   --mandir=DIR            man documentation [DATAROOTDIR/man]
2091   --docdir=DIR            documentation root [DATAROOTDIR/doc/m4]
2092   --htmldir=DIR           html documentation [DOCDIR]
2093   --dvidir=DIR            dvi documentation [DOCDIR]
2094   --pdfdir=DIR            pdf documentation [DOCDIR]
2095   --psdir=DIR             ps documentation [DOCDIR]
2096 _ACEOF
2097
2098   cat <<\_ACEOF
2099
2100 Program names:
2101   --program-prefix=PREFIX            prepend PREFIX to installed program names
2102   --program-suffix=SUFFIX            append SUFFIX to installed program names
2103   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2104
2105 System types:
2106   --build=BUILD     configure for building on BUILD [guessed]
2107   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2108 _ACEOF
2109 fi
2110
2111 if test -n "$ac_init_help"; then
2112   case $ac_init_help in
2113      short | recursive ) echo "Configuration of GNU M4 1.4.16:";;
2114    esac
2115   cat <<\_ACEOF
2116
2117 Optional Features:
2118   --disable-option-checking  ignore unrecognized --enable/--with options
2119   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2120   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2121   --enable-silent-rules          less verbose build output (undo: `make V=1')
2122   --disable-silent-rules         verbose build output (undo: `make V=0')
2123   --disable-dependency-tracking  speeds up one-time build
2124   --enable-dependency-tracking   do not reject slow dependency extractors
2125   --enable-threads={posix|solaris|pth|win32}
2126                           specify multithreading API
2127   --disable-threads       build without multithread safety
2128   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2129   --disable-assert        turn off assertions
2130   --disable-rpath         do not hardcode runtime library paths
2131   --disable-largefile     omit support for large files
2132   --enable-c++            also build C++ sources
2133   --enable-changeword     enable -W and changeword() builtin
2134
2135 Optional Packages:
2136   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2137   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2138   --with-gnu-ld           assume the C compiler uses GNU ld default=no
2139   --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
2140   --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
2141   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2142   --without-libpth-prefix     don't search for libpth in includedir and libdir
2143   --without-included-regex
2144                           don't compile regex; this is the default on systems
2145                           with recent-enough versions of the GNU C Library
2146                           (use with caution on other systems).
2147   --with-packager         String identifying the packager of this software
2148   --with-packager-version Packager-specific version information
2149   --with-packager-bug-reports
2150                           Packager info for bug reports (URL/e-mail/...)
2151   --with-syscmd-shell     shell used by syscmd [/bin/sh]
2152   --with-dmalloc          use dmalloc, as in dmalloc.tar.gz from
2153                           @/ftp.antaire.com:antaire/src/dmalloc.
2154
2155 Some influential environment variables:
2156   CC          C compiler command
2157   CFLAGS      C compiler flags
2158   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2159               nonstandard directory <lib dir>
2160   LIBS        libraries to pass to the linker, e.g. -l<library>
2161   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2162               you have headers in a nonstandard directory <include dir>
2163   CPP         C preprocessor
2164   CXX         C++ compiler command
2165   CXXFLAGS    C++ compiler flags
2166
2167 Use these variables to override the choices made by `configure' or to help
2168 it to find libraries and programs with nonstandard names/locations.
2169
2170 Report bugs to <bug-m4@gnu.org>.
2171 GNU M4 home page: <http://www.gnu.org/software/m4/>.
2172 General help using GNU software: <http://www.gnu.org/gethelp/>.
2173 _ACEOF
2174 ac_status=$?
2175 fi
2176
2177 if test "$ac_init_help" = "recursive"; then
2178   # If there are subdirs, report their specific --help.
2179   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2180     test -d "$ac_dir" ||
2181       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2182       continue
2183     ac_builddir=.
2184
2185 case "$ac_dir" in
2186 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2187 *)
2188   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2189   # A ".." for each directory in $ac_dir_suffix.
2190   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2191   case $ac_top_builddir_sub in
2192   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2193   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2194   esac ;;
2195 esac
2196 ac_abs_top_builddir=$ac_pwd
2197 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2198 # for backward compatibility:
2199 ac_top_builddir=$ac_top_build_prefix
2200
2201 case $srcdir in
2202   .)  # We are building in place.
2203     ac_srcdir=.
2204     ac_top_srcdir=$ac_top_builddir_sub
2205     ac_abs_top_srcdir=$ac_pwd ;;
2206   [\\/]* | ?:[\\/]* )  # Absolute name.
2207     ac_srcdir=$srcdir$ac_dir_suffix;
2208     ac_top_srcdir=$srcdir
2209     ac_abs_top_srcdir=$srcdir ;;
2210   *) # Relative name.
2211     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2212     ac_top_srcdir=$ac_top_build_prefix$srcdir
2213     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2214 esac
2215 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2216
2217     cd "$ac_dir" || { ac_status=$?; continue; }
2218     # Check for guested configure.
2219     if test -f "$ac_srcdir/configure.gnu"; then
2220       echo &&
2221       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2222     elif test -f "$ac_srcdir/configure"; then
2223       echo &&
2224       $SHELL "$ac_srcdir/configure" --help=recursive
2225     else
2226       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2227     fi || ac_status=$?
2228     cd "$ac_pwd" || { ac_status=$?; break; }
2229   done
2230 fi
2231
2232 test -n "$ac_init_help" && exit $ac_status
2233 if $ac_init_version; then
2234   cat <<\_ACEOF
2235 GNU M4 configure 1.4.16
2236 generated by GNU Autoconf 2.66
2237
2238 Copyright (C) 2010 Free Software Foundation, Inc.
2239 This configure script is free software; the Free Software Foundation
2240 gives unlimited permission to copy, distribute and modify it.
2241 _ACEOF
2242   exit
2243 fi
2244
2245 ## ------------------------ ##
2246 ## Autoconf initialization. ##
2247 ## ------------------------ ##
2248
2249 # ac_fn_c_try_compile LINENO
2250 # --------------------------
2251 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2252 ac_fn_c_try_compile ()
2253 {
2254   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255   rm -f conftest.$ac_objext
2256   if { { ac_try="$ac_compile"
2257 case "(($ac_try" in
2258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2259   *) ac_try_echo=$ac_try;;
2260 esac
2261 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2262 $as_echo "$ac_try_echo"; } >&5
2263   (eval "$ac_compile") 2>conftest.err
2264   ac_status=$?
2265   if test -s conftest.err; then
2266     grep -v '^ *+' conftest.err >conftest.er1
2267     cat conftest.er1 >&5
2268     mv -f conftest.er1 conftest.err
2269   fi
2270   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2271   test $ac_status = 0; } && {
2272          test -z "$ac_c_werror_flag" ||
2273          test ! -s conftest.err
2274        } && test -s conftest.$ac_objext; then :
2275   ac_retval=0
2276 else
2277   $as_echo "$as_me: failed program was:" >&5
2278 sed 's/^/| /' conftest.$ac_ext >&5
2279
2280         ac_retval=1
2281 fi
2282   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2283   as_fn_set_status $ac_retval
2284
2285 } # ac_fn_c_try_compile
2286
2287 # ac_fn_c_try_cpp LINENO
2288 # ----------------------
2289 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2290 ac_fn_c_try_cpp ()
2291 {
2292   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293   if { { ac_try="$ac_cpp conftest.$ac_ext"
2294 case "(($ac_try" in
2295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2296   *) ac_try_echo=$ac_try;;
2297 esac
2298 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2299 $as_echo "$ac_try_echo"; } >&5
2300   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2301   ac_status=$?
2302   if test -s conftest.err; then
2303     grep -v '^ *+' conftest.err >conftest.er1
2304     cat conftest.er1 >&5
2305     mv -f conftest.er1 conftest.err
2306   fi
2307   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2308   test $ac_status = 0; } >/dev/null && {
2309          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2310          test ! -s conftest.err
2311        }; then :
2312   ac_retval=0
2313 else
2314   $as_echo "$as_me: failed program was:" >&5
2315 sed 's/^/| /' conftest.$ac_ext >&5
2316
2317     ac_retval=1
2318 fi
2319   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2320   as_fn_set_status $ac_retval
2321
2322 } # ac_fn_c_try_cpp
2323
2324 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2325 # -------------------------------------------------------
2326 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2327 # the include files in INCLUDES and setting the cache variable VAR
2328 # accordingly.
2329 ac_fn_c_check_header_mongrel ()
2330 {
2331   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332   if eval "test \"\${$3+set}\"" = set; then :
2333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2334 $as_echo_n "checking for $2... " >&6; }
2335 if eval "test \"\${$3+set}\"" = set; then :
2336   $as_echo_n "(cached) " >&6
2337 fi
2338 eval ac_res=\$$3
2339                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340 $as_echo "$ac_res" >&6; }
2341 else
2342   # Is the header compilable?
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2344 $as_echo_n "checking $2 usability... " >&6; }
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h.  */
2347 $4
2348 #include <$2>
2349 _ACEOF
2350 if ac_fn_c_try_compile "$LINENO"; then :
2351   ac_header_compiler=yes
2352 else
2353   ac_header_compiler=no
2354 fi
2355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2357 $as_echo "$ac_header_compiler" >&6; }
2358
2359 # Is the header present?
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2361 $as_echo_n "checking $2 presence... " >&6; }
2362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363 /* end confdefs.h.  */
2364 #include <$2>
2365 _ACEOF
2366 if ac_fn_c_try_cpp "$LINENO"; then :
2367   ac_header_preproc=yes
2368 else
2369   ac_header_preproc=no
2370 fi
2371 rm -f conftest.err conftest.$ac_ext
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2373 $as_echo "$ac_header_preproc" >&6; }
2374
2375 # So?  What about this header?
2376 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2377   yes:no: )
2378     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2379 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2380     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2381 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2382     ;;
2383   no:yes:* )
2384     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2385 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2386     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2387 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2388     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2389 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2390     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2391 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2392     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2393 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2394 ( $as_echo "## ----------------------------- ##
2395 ## Report this to bug-m4@gnu.org ##
2396 ## ----------------------------- ##"
2397      ) | sed "s/^/$as_me: WARNING:     /" >&2
2398     ;;
2399 esac
2400   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2401 $as_echo_n "checking for $2... " >&6; }
2402 if eval "test \"\${$3+set}\"" = set; then :
2403   $as_echo_n "(cached) " >&6
2404 else
2405   eval "$3=\$ac_header_compiler"
2406 fi
2407 eval ac_res=\$$3
2408                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409 $as_echo "$ac_res" >&6; }
2410 fi
2411   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2412
2413 } # ac_fn_c_check_header_mongrel
2414
2415 # ac_fn_c_try_run LINENO
2416 # ----------------------
2417 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2418 # that executables *can* be run.
2419 ac_fn_c_try_run ()
2420 {
2421   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422   if { { ac_try="$ac_link"
2423 case "(($ac_try" in
2424   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2425   *) ac_try_echo=$ac_try;;
2426 esac
2427 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2428 $as_echo "$ac_try_echo"; } >&5
2429   (eval "$ac_link") 2>&5
2430   ac_status=$?
2431   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2433   { { case "(($ac_try" in
2434   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435   *) ac_try_echo=$ac_try;;
2436 esac
2437 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438 $as_echo "$ac_try_echo"; } >&5
2439   (eval "$ac_try") 2>&5
2440   ac_status=$?
2441   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442   test $ac_status = 0; }; }; then :
2443   ac_retval=0
2444 else
2445   $as_echo "$as_me: program exited with status $ac_status" >&5
2446        $as_echo "$as_me: failed program was:" >&5
2447 sed 's/^/| /' conftest.$ac_ext >&5
2448
2449        ac_retval=$ac_status
2450 fi
2451   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2452   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2453   as_fn_set_status $ac_retval
2454
2455 } # ac_fn_c_try_run
2456
2457 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2458 # -------------------------------------------------------
2459 # Tests whether HEADER exists and can be compiled using the include files in
2460 # INCLUDES, setting the cache variable VAR accordingly.
2461 ac_fn_c_check_header_compile ()
2462 {
2463   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465 $as_echo_n "checking for $2... " >&6; }
2466 if eval "test \"\${$3+set}\"" = set; then :
2467   $as_echo_n "(cached) " >&6
2468 else
2469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2470 /* end confdefs.h.  */
2471 $4
2472 #include <$2>
2473 _ACEOF
2474 if ac_fn_c_try_compile "$LINENO"; then :
2475   eval "$3=yes"
2476 else
2477   eval "$3=no"
2478 fi
2479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2480 fi
2481 eval ac_res=\$$3
2482                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483 $as_echo "$ac_res" >&6; }
2484   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2485
2486 } # ac_fn_c_check_header_compile
2487
2488 # ac_fn_c_try_link LINENO
2489 # -----------------------
2490 # Try to link conftest.$ac_ext, and return whether this succeeded.
2491 ac_fn_c_try_link ()
2492 {
2493   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494   rm -f conftest.$ac_objext conftest$ac_exeext
2495   if { { ac_try="$ac_link"
2496 case "(($ac_try" in
2497   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498   *) ac_try_echo=$ac_try;;
2499 esac
2500 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501 $as_echo "$ac_try_echo"; } >&5
2502   (eval "$ac_link") 2>conftest.err
2503   ac_status=$?
2504   if test -s conftest.err; then
2505     grep -v '^ *+' conftest.err >conftest.er1
2506     cat conftest.er1 >&5
2507     mv -f conftest.er1 conftest.err
2508   fi
2509   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510   test $ac_status = 0; } && {
2511          test -z "$ac_c_werror_flag" ||
2512          test ! -s conftest.err
2513        } && test -s conftest$ac_exeext && {
2514          test "$cross_compiling" = yes ||
2515          $as_test_x conftest$ac_exeext
2516        }; then :
2517   ac_retval=0
2518 else
2519   $as_echo "$as_me: failed program was:" >&5
2520 sed 's/^/| /' conftest.$ac_ext >&5
2521
2522         ac_retval=1
2523 fi
2524   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2525   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2526   # interfere with the next link command; also delete a directory that is
2527   # left behind by Apple's compiler.  We do this before executing the actions.
2528   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2529   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2530   as_fn_set_status $ac_retval
2531
2532 } # ac_fn_c_try_link
2533
2534 # ac_fn_c_check_func LINENO FUNC VAR
2535 # ----------------------------------
2536 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2537 ac_fn_c_check_func ()
2538 {
2539   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2541 $as_echo_n "checking for $2... " >&6; }
2542 if eval "test \"\${$3+set}\"" = set; then :
2543   $as_echo_n "(cached) " >&6
2544 else
2545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546 /* end confdefs.h.  */
2547 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2548    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2549 #define $2 innocuous_$2
2550
2551 /* System header to define __stub macros and hopefully few prototypes,
2552     which can conflict with char $2 (); below.
2553     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2554     <limits.h> exists even on freestanding compilers.  */
2555
2556 #ifdef __STDC__
2557 # include <limits.h>
2558 #else
2559 # include <assert.h>
2560 #endif
2561
2562 #undef $2
2563
2564 /* Override any GCC internal prototype to avoid an error.
2565    Use char because int might match the return type of a GCC
2566    builtin and then its argument prototype would still apply.  */
2567 #ifdef __cplusplus
2568 extern "C"
2569 #endif
2570 char $2 ();
2571 /* The GNU C library defines this for functions which it implements
2572     to always fail with ENOSYS.  Some functions are actually named
2573     something starting with __ and the normal name is an alias.  */
2574 #if defined __stub_$2 || defined __stub___$2
2575 choke me
2576 #endif
2577
2578 int
2579 main ()
2580 {
2581 return $2 ();
2582   ;
2583   return 0;
2584 }
2585 _ACEOF
2586 if ac_fn_c_try_link "$LINENO"; then :
2587   eval "$3=yes"
2588 else
2589   eval "$3=no"
2590 fi
2591 rm -f core conftest.err conftest.$ac_objext \
2592     conftest$ac_exeext conftest.$ac_ext
2593 fi
2594 eval ac_res=\$$3
2595                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2596 $as_echo "$ac_res" >&6; }
2597   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2598
2599 } # ac_fn_c_check_func
2600
2601 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2602 # ---------------------------------------------
2603 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2604 # accordingly.
2605 ac_fn_c_check_decl ()
2606 {
2607   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608   as_decl_name=`echo $2|sed 's/ *(.*//'`
2609   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2611 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2612 if eval "test \"\${$3+set}\"" = set; then :
2613   $as_echo_n "(cached) " >&6
2614 else
2615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616 /* end confdefs.h.  */
2617 $4
2618 int
2619 main ()
2620 {
2621 #ifndef $as_decl_name
2622 #ifdef __cplusplus
2623   (void) $as_decl_use;
2624 #else
2625   (void) $as_decl_name;
2626 #endif
2627 #endif
2628
2629   ;
2630   return 0;
2631 }
2632 _ACEOF
2633 if ac_fn_c_try_compile "$LINENO"; then :
2634   eval "$3=yes"
2635 else
2636   eval "$3=no"
2637 fi
2638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2639 fi
2640 eval ac_res=\$$3
2641                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2642 $as_echo "$ac_res" >&6; }
2643   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2644
2645 } # ac_fn_c_check_decl
2646
2647 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2648 # -------------------------------------------
2649 # Tests whether TYPE exists after having included INCLUDES, setting cache
2650 # variable VAR accordingly.
2651 ac_fn_c_check_type ()
2652 {
2653   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2655 $as_echo_n "checking for $2... " >&6; }
2656 if eval "test \"\${$3+set}\"" = set; then :
2657   $as_echo_n "(cached) " >&6
2658 else
2659   eval "$3=no"
2660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2661 /* end confdefs.h.  */
2662 $4
2663 int
2664 main ()
2665 {
2666 if (sizeof ($2))
2667          return 0;
2668   ;
2669   return 0;
2670 }
2671 _ACEOF
2672 if ac_fn_c_try_compile "$LINENO"; then :
2673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2674 /* end confdefs.h.  */
2675 $4
2676 int
2677 main ()
2678 {
2679 if (sizeof (($2)))
2680             return 0;
2681   ;
2682   return 0;
2683 }
2684 _ACEOF
2685 if ac_fn_c_try_compile "$LINENO"; then :
2686
2687 else
2688   eval "$3=yes"
2689 fi
2690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2691 fi
2692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2693 fi
2694 eval ac_res=\$$3
2695                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2696 $as_echo "$ac_res" >&6; }
2697   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2698
2699 } # ac_fn_c_check_type
2700
2701 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2702 # --------------------------------------------
2703 # Tries to find the compile-time value of EXPR in a program that includes
2704 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2705 # computed
2706 ac_fn_c_compute_int ()
2707 {
2708   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2709   if test "$cross_compiling" = yes; then
2710     # Depending upon the size, compute the lo and hi bounds.
2711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712 /* end confdefs.h.  */
2713 $4
2714 int
2715 main ()
2716 {
2717 static int test_array [1 - 2 * !(($2) >= 0)];
2718 test_array [0] = 0
2719
2720   ;
2721   return 0;
2722 }
2723 _ACEOF
2724 if ac_fn_c_try_compile "$LINENO"; then :
2725   ac_lo=0 ac_mid=0
2726   while :; do
2727     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728 /* end confdefs.h.  */
2729 $4
2730 int
2731 main ()
2732 {
2733 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2734 test_array [0] = 0
2735
2736   ;
2737   return 0;
2738 }
2739 _ACEOF
2740 if ac_fn_c_try_compile "$LINENO"; then :
2741   ac_hi=$ac_mid; break
2742 else
2743   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2744                         if test $ac_lo -le $ac_mid; then
2745                           ac_lo= ac_hi=
2746                           break
2747                         fi
2748                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2749 fi
2750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2751   done
2752 else
2753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754 /* end confdefs.h.  */
2755 $4
2756 int
2757 main ()
2758 {
2759 static int test_array [1 - 2 * !(($2) < 0)];
2760 test_array [0] = 0
2761
2762   ;
2763   return 0;
2764 }
2765 _ACEOF
2766 if ac_fn_c_try_compile "$LINENO"; then :
2767   ac_hi=-1 ac_mid=-1
2768   while :; do
2769     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770 /* end confdefs.h.  */
2771 $4
2772 int
2773 main ()
2774 {
2775 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2776 test_array [0] = 0
2777
2778   ;
2779   return 0;
2780 }
2781 _ACEOF
2782 if ac_fn_c_try_compile "$LINENO"; then :
2783   ac_lo=$ac_mid; break
2784 else
2785   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2786                         if test $ac_mid -le $ac_hi; then
2787                           ac_lo= ac_hi=
2788                           break
2789                         fi
2790                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2791 fi
2792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2793   done
2794 else
2795   ac_lo= ac_hi=
2796 fi
2797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2798 fi
2799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800 # Binary search between lo and hi bounds.
2801 while test "x$ac_lo" != "x$ac_hi"; do
2802   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804 /* end confdefs.h.  */
2805 $4
2806 int
2807 main ()
2808 {
2809 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2810 test_array [0] = 0
2811
2812   ;
2813   return 0;
2814 }
2815 _ACEOF
2816 if ac_fn_c_try_compile "$LINENO"; then :
2817   ac_hi=$ac_mid
2818 else
2819   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2820 fi
2821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822 done
2823 case $ac_lo in #((
2824 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2825 '') ac_retval=1 ;;
2826 esac
2827   else
2828     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829 /* end confdefs.h.  */
2830 $4
2831 static long int longval () { return $2; }
2832 static unsigned long int ulongval () { return $2; }
2833 #include <stdio.h>
2834 #include <stdlib.h>
2835 int
2836 main ()
2837 {
2838
2839   FILE *f = fopen ("conftest.val", "w");
2840   if (! f)
2841     return 1;
2842   if (($2) < 0)
2843     {
2844       long int i = longval ();
2845       if (i != ($2))
2846         return 1;
2847       fprintf (f, "%ld", i);
2848     }
2849   else
2850     {
2851       unsigned long int i = ulongval ();
2852       if (i != ($2))
2853         return 1;
2854       fprintf (f, "%lu", i);
2855     }
2856   /* Do not output a trailing newline, as this causes \r\n confusion
2857      on some platforms.  */
2858   return ferror (f) || fclose (f) != 0;
2859
2860   ;
2861   return 0;
2862 }
2863 _ACEOF
2864 if ac_fn_c_try_run "$LINENO"; then :
2865   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2866 else
2867   ac_retval=1
2868 fi
2869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2870   conftest.$ac_objext conftest.beam conftest.$ac_ext
2871 rm -f conftest.val
2872
2873   fi
2874   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2875   as_fn_set_status $ac_retval
2876
2877 } # ac_fn_c_compute_int
2878
2879 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2880 # ----------------------------------------------------
2881 # Tries to find if the field MEMBER exists in type AGGR, after including
2882 # INCLUDES, setting cache variable VAR accordingly.
2883 ac_fn_c_check_member ()
2884 {
2885   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2887 $as_echo_n "checking for $2.$3... " >&6; }
2888 if eval "test \"\${$4+set}\"" = set; then :
2889   $as_echo_n "(cached) " >&6
2890 else
2891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892 /* end confdefs.h.  */
2893 $5
2894 int
2895 main ()
2896 {
2897 static $2 ac_aggr;
2898 if (ac_aggr.$3)
2899 return 0;
2900   ;
2901   return 0;
2902 }
2903 _ACEOF
2904 if ac_fn_c_try_compile "$LINENO"; then :
2905   eval "$4=yes"
2906 else
2907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908 /* end confdefs.h.  */
2909 $5
2910 int
2911 main ()
2912 {
2913 static $2 ac_aggr;
2914 if (sizeof ac_aggr.$3)
2915 return 0;
2916   ;
2917   return 0;
2918 }
2919 _ACEOF
2920 if ac_fn_c_try_compile "$LINENO"; then :
2921   eval "$4=yes"
2922 else
2923   eval "$4=no"
2924 fi
2925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2926 fi
2927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2928 fi
2929 eval ac_res=\$$4
2930                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2931 $as_echo "$ac_res" >&6; }
2932   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2933
2934 } # ac_fn_c_check_member
2935 cat >config.log <<_ACEOF
2936 This file contains any messages produced by compilers while
2937 running configure, to aid debugging if configure makes a mistake.
2938
2939 It was created by GNU M4 $as_me 1.4.16, which was
2940 generated by GNU Autoconf 2.66.  Invocation command line was
2941
2942   $ $0 $@
2943
2944 _ACEOF
2945 exec 5>>config.log
2946 {
2947 cat <<_ASUNAME
2948 ## --------- ##
2949 ## Platform. ##
2950 ## --------- ##
2951
2952 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2953 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2954 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2955 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2956 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2957
2958 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2959 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2960
2961 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2962 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2963 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2964 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2965 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2966 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2967 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2968
2969 _ASUNAME
2970
2971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2972 for as_dir in $PATH
2973 do
2974   IFS=$as_save_IFS
2975   test -z "$as_dir" && as_dir=.
2976     $as_echo "PATH: $as_dir"
2977   done
2978 IFS=$as_save_IFS
2979
2980 } >&5
2981
2982 cat >&5 <<_ACEOF
2983
2984
2985 ## ----------- ##
2986 ## Core tests. ##
2987 ## ----------- ##
2988
2989 _ACEOF
2990
2991
2992 # Keep a trace of the command line.
2993 # Strip out --no-create and --no-recursion so they do not pile up.
2994 # Strip out --silent because we don't want to record it for future runs.
2995 # Also quote any args containing shell meta-characters.
2996 # Make two passes to allow for proper duplicate-argument suppression.
2997 ac_configure_args=
2998 ac_configure_args0=
2999 ac_configure_args1=
3000 ac_must_keep_next=false
3001 for ac_pass in 1 2
3002 do
3003   for ac_arg
3004   do
3005     case $ac_arg in
3006     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3007     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3008     | -silent | --silent | --silen | --sile | --sil)
3009       continue ;;
3010     *\'*)
3011       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3012     esac
3013     case $ac_pass in
3014     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3015     2)
3016       as_fn_append ac_configure_args1 " '$ac_arg'"
3017       if test $ac_must_keep_next = true; then
3018         ac_must_keep_next=false # Got value, back to normal.
3019       else
3020         case $ac_arg in
3021           *=* | --config-cache | -C | -disable-* | --disable-* \
3022           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3023           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3024           | -with-* | --with-* | -without-* | --without-* | --x)
3025             case "$ac_configure_args0 " in
3026               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3027             esac
3028             ;;
3029           -* ) ac_must_keep_next=true ;;
3030         esac
3031       fi
3032       as_fn_append ac_configure_args " '$ac_arg'"
3033       ;;
3034     esac
3035   done
3036 done
3037 { ac_configure_args0=; unset ac_configure_args0;}
3038 { ac_configure_args1=; unset ac_configure_args1;}
3039
3040 # When interrupted or exit'd, cleanup temporary files, and complete
3041 # config.log.  We remove comments because anyway the quotes in there
3042 # would cause problems or look ugly.
3043 # WARNING: Use '\'' to represent an apostrophe within the trap.
3044 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3045 trap 'exit_status=$?
3046   # Save into config.log some information that might help in debugging.
3047   {
3048     echo
3049
3050     $as_echo "## ---------------- ##
3051 ## Cache variables. ##
3052 ## ---------------- ##"
3053     echo
3054     # The following way of writing the cache mishandles newlines in values,
3055 (
3056   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3057     eval ac_val=\$$ac_var
3058     case $ac_val in #(
3059     *${as_nl}*)
3060       case $ac_var in #(
3061       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3062 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3063       esac
3064       case $ac_var in #(
3065       _ | IFS | as_nl) ;; #(
3066       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3067       *) { eval $ac_var=; unset $ac_var;} ;;
3068       esac ;;
3069     esac
3070   done
3071   (set) 2>&1 |
3072     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3073     *${as_nl}ac_space=\ *)
3074       sed -n \
3075         "s/'\''/'\''\\\\'\'''\''/g;
3076           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3077       ;; #(
3078     *)
3079       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3080       ;;
3081     esac |
3082     sort
3083 )
3084     echo
3085
3086     $as_echo "## ----------------- ##
3087 ## Output variables. ##
3088 ## ----------------- ##"
3089     echo
3090     for ac_var in $ac_subst_vars
3091     do
3092       eval ac_val=\$$ac_var
3093       case $ac_val in
3094       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3095       esac
3096       $as_echo "$ac_var='\''$ac_val'\''"
3097     done | sort
3098     echo
3099
3100     if test -n "$ac_subst_files"; then
3101       $as_echo "## ------------------- ##
3102 ## File substitutions. ##
3103 ## ------------------- ##"
3104       echo
3105       for ac_var in $ac_subst_files
3106       do
3107         eval ac_val=\$$ac_var
3108         case $ac_val in
3109         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3110         esac
3111         $as_echo "$ac_var='\''$ac_val'\''"
3112       done | sort
3113       echo
3114     fi
3115
3116     if test -s confdefs.h; then
3117       $as_echo "## ----------- ##
3118 ## confdefs.h. ##
3119 ## ----------- ##"
3120       echo
3121       cat confdefs.h
3122       echo
3123     fi
3124     test "$ac_signal" != 0 &&
3125       $as_echo "$as_me: caught signal $ac_signal"
3126     $as_echo "$as_me: exit $exit_status"
3127   } >&5
3128   rm -f core *.core core.conftest.* &&
3129     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3130     exit $exit_status
3131 ' 0
3132 for ac_signal in 1 2 13 15; do
3133   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3134 done
3135 ac_signal=0
3136
3137 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3138 rm -f -r conftest* confdefs.h
3139
3140 $as_echo "/* confdefs.h */" > confdefs.h
3141
3142 # Predefined preprocessor variables.
3143
3144 cat >>confdefs.h <<_ACEOF
3145 #define PACKAGE_NAME "$PACKAGE_NAME"
3146 _ACEOF
3147
3148 cat >>confdefs.h <<_ACEOF
3149 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3150 _ACEOF
3151
3152 cat >>confdefs.h <<_ACEOF
3153 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3154 _ACEOF
3155
3156 cat >>confdefs.h <<_ACEOF
3157 #define PACKAGE_STRING "$PACKAGE_STRING"
3158 _ACEOF
3159
3160 cat >>confdefs.h <<_ACEOF
3161 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3162 _ACEOF
3163
3164 cat >>confdefs.h <<_ACEOF
3165 #define PACKAGE_URL "$PACKAGE_URL"
3166 _ACEOF
3167
3168
3169 # Let the site file select an alternate cache file if it wants to.
3170 # Prefer an explicitly selected file to automatically selected ones.
3171 ac_site_file1=NONE
3172 ac_site_file2=NONE
3173 if test -n "$CONFIG_SITE"; then
3174   # We do not want a PATH search for config.site.
3175   case $CONFIG_SITE in #((
3176     -*)  ac_site_file1=./$CONFIG_SITE;;
3177     */*) ac_site_file1=$CONFIG_SITE;;
3178     *)   ac_site_file1=./$CONFIG_SITE;;
3179   esac
3180 elif test "x$prefix" != xNONE; then
3181   ac_site_file1=$prefix/share/config.site
3182   ac_site_file2=$prefix/etc/config.site
3183 else
3184   ac_site_file1=$ac_default_prefix/share/config.site
3185   ac_site_file2=$ac_default_prefix/etc/config.site
3186 fi
3187 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3188 do
3189   test "x$ac_site_file" = xNONE && continue
3190   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3191     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3192 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3193     sed 's/^/| /' "$ac_site_file" >&5
3194     . "$ac_site_file" \
3195       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3196 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3197 as_fn_error $? "failed to load site script $ac_site_file
3198 See \`config.log' for more details" "$LINENO" 5; }
3199   fi
3200 done
3201
3202 if test -r "$cache_file"; then
3203   # Some versions of bash will fail to source /dev/null (special files
3204   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3205   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3206     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3207 $as_echo "$as_me: loading cache $cache_file" >&6;}
3208     case $cache_file in
3209       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3210       *)                      . "./$cache_file";;
3211     esac
3212   fi
3213 else
3214   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3215 $as_echo "$as_me: creating cache $cache_file" >&6;}
3216   >$cache_file
3217 fi
3218
3219 gl_use_threads_default=no
3220 as_fn_append ac_func_list " btowc"
3221 as_fn_append ac_func_list " setrlimit"
3222 as_fn_append ac_header_list " ucontext.h"
3223 as_fn_append ac_func_list " sigaltstack"
3224 as_fn_append ac_header_list " unistd.h"
3225 as_fn_append ac_func_list " canonicalize_file_name"
3226 as_fn_append ac_func_list " getcwd"
3227 as_fn_append ac_func_list " readlink"
3228 as_fn_append ac_func_list " realpath"
3229 as_fn_append ac_header_list " sys/param.h"
3230 as_fn_append ac_func_list " dup2"
3231 as_fn_append ac_func_list " fcntl"
3232 as_fn_append ac_func_list " mempcpy"
3233 as_fn_append ac_header_list " stdio_ext.h"
3234 as_fn_append ac_func_list " __fpending"
3235 as_fn_append ac_func_list " fpurge"
3236 as_fn_append ac_func_list " __fpurge"
3237 as_fn_append ac_func_list " __freading"
3238 as_fn_append ac_func_list " getdtablesize"
3239 gl_getopt_required=GNU
3240 as_fn_append ac_header_list " getopt.h"
3241 as_fn_append ac_header_list " sys/time.h"
3242 as_fn_append ac_func_list " gettimeofday"
3243 as_fn_append ac_header_list " langinfo.h"
3244 as_fn_append ac_func_list " lstat"
3245 as_fn_append ac_header_list " math.h"
3246 as_fn_append ac_func_list " mbsinit"
3247 as_fn_append ac_func_list " mbrtowc"
3248 as_fn_append ac_header_list " sys/mman.h"
3249 as_fn_append ac_func_list " mprotect"
3250 as_fn_append ac_func_list " memchr"
3251 as_fn_append ac_func_list " mkstemp"
3252 as_fn_append ac_func_list " nl_langinfo"
3253 as_fn_append ac_func_list " pathconf"
3254 as_fn_append ac_func_list " pipe2"
3255 as_fn_append ac_func_list " posix_spawn"
3256 gl_printf_safe=yes
3257 as_fn_append ac_func_list " isblank"
3258 as_fn_append ac_func_list " iswctype"
3259 as_fn_append ac_func_list " wcscoll"
3260 as_fn_append ac_header_list " sched.h"
3261 as_fn_append ac_func_list " sigaction"
3262 as_fn_append ac_func_list " siginterrupt"
3263 as_fn_append ac_header_list " spawn.h"
3264 as_fn_append ac_header_list " wchar.h"
3265 as_fn_append ac_header_list " stdint.h"
3266 as_fn_append ac_header_list " sys/socket.h"
3267 as_fn_append ac_func_list " strndup"
3268 as_fn_append ac_header_list " sys/stat.h"
3269 as_fn_append ac_header_list " sys/wait.h"
3270 as_fn_append ac_func_list " pipe"
3271 as_fn_append ac_func_list " vasnprintf"
3272 as_fn_append ac_header_list " features.h"
3273 as_fn_append ac_func_list " wcrtomb"
3274 as_fn_append ac_func_list " iswcntrl"
3275 as_fn_append ac_header_list " wctype.h"
3276 as_fn_append ac_func_list " link"
3277 as_fn_append ac_header_list " xlocale.h"
3278 as_fn_append ac_func_list " newlocale"
3279 as_fn_append ac_func_list " setenv"
3280 as_fn_append ac_func_list " strdup"
3281 as_fn_append ac_func_list " symlink"
3282 as_fn_append ac_func_list " wctob"
3283 # Check that the precious variables saved in the cache have kept the same
3284 # value.
3285 ac_cache_corrupted=false
3286 for ac_var in $ac_precious_vars; do
3287   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3288   eval ac_new_set=\$ac_env_${ac_var}_set
3289   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3290   eval ac_new_val=\$ac_env_${ac_var}_value
3291   case $ac_old_set,$ac_new_set in
3292     set,)
3293       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3294 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3295       ac_cache_corrupted=: ;;
3296     ,set)
3297       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3298 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3299       ac_cache_corrupted=: ;;
3300     ,);;
3301     *)
3302       if test "x$ac_old_val" != "x$ac_new_val"; then
3303         # differences in whitespace do not lead to failure.
3304         ac_old_val_w=`echo x $ac_old_val`
3305         ac_new_val_w=`echo x $ac_new_val`
3306         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3307           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3308 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3309           ac_cache_corrupted=:
3310         else
3311           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3312 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3313           eval $ac_var=\$ac_old_val
3314         fi
3315         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3316 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3317         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3318 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3319       fi;;
3320   esac
3321   # Pass precious variables to config.status.
3322   if test "$ac_new_set" = set; then
3323     case $ac_new_val in
3324     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3325     *) ac_arg=$ac_var=$ac_new_val ;;
3326     esac
3327     case " $ac_configure_args " in
3328       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3329       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3330     esac
3331   fi
3332 done
3333 if $ac_cache_corrupted; then
3334   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3335 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3336   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3337 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3338   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3339 fi
3340 ## -------------------- ##
3341 ## Main body of script. ##
3342 ## -------------------- ##
3343
3344 ac_ext=c
3345 ac_cpp='$CPP $CPPFLAGS'
3346 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3347 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3349
3350
3351 ac_aux_dir=
3352 for ac_dir in build-aux "$srcdir"/build-aux; do
3353   if test -f "$ac_dir/install-sh"; then
3354     ac_aux_dir=$ac_dir
3355     ac_install_sh="$ac_aux_dir/install-sh -c"
3356     break
3357   elif test -f "$ac_dir/install.sh"; then
3358     ac_aux_dir=$ac_dir
3359     ac_install_sh="$ac_aux_dir/install.sh -c"
3360     break
3361   elif test -f "$ac_dir/shtool"; then
3362     ac_aux_dir=$ac_dir
3363     ac_install_sh="$ac_aux_dir/shtool install -c"
3364     break
3365   fi
3366 done
3367 if test -z "$ac_aux_dir"; then
3368   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3369 fi
3370
3371 # These three variables are undocumented and unsupported,
3372 # and are intended to be withdrawn in a future Autoconf release.
3373 # They can cause serious problems if a builder's source tree is in a directory
3374 # whose full name contains unusual characters.
3375 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3376 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3377 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3378
3379
3380
3381 am__api_version='1.11'
3382
3383 # Find a good install program.  We prefer a C program (faster),
3384 # so one script is as good as another.  But avoid the broken or
3385 # incompatible versions:
3386 # SysV /etc/install, /usr/sbin/install
3387 # SunOS /usr/etc/install
3388 # IRIX /sbin/install
3389 # AIX /bin/install
3390 # AmigaOS /C/install, which installs bootblocks on floppy discs
3391 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3392 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3393 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3394 # OS/2's system install, which has a completely different semantic
3395 # ./install, which can be erroneously created by make from ./install.sh.
3396 # Reject install programs that cannot install multiple files.
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3398 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3399 if test -z "$INSTALL"; then
3400 if test "${ac_cv_path_install+set}" = set; then :
3401   $as_echo_n "(cached) " >&6
3402 else
3403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404 for as_dir in $PATH
3405 do
3406   IFS=$as_save_IFS
3407   test -z "$as_dir" && as_dir=.
3408     # Account for people who put trailing slashes in PATH elements.
3409 case $as_dir/ in #((
3410   ./ | .// | /[cC]/* | \
3411   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3412   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3413   /usr/ucb/* ) ;;
3414   *)
3415     # OSF1 and SCO ODT 3.0 have their own names for install.
3416     # Don't use installbsd from OSF since it installs stuff as root
3417     # by default.
3418     for ac_prog in ginstall scoinst install; do
3419       for ac_exec_ext in '' $ac_executable_extensions; do
3420         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3421           if test $ac_prog = install &&
3422             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3423             # AIX install.  It has an incompatible calling convention.
3424             :
3425           elif test $ac_prog = install &&
3426             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3427             # program-specific install script used by HP pwplus--don't use.
3428             :
3429           else
3430             rm -rf conftest.one conftest.two conftest.dir
3431             echo one > conftest.one
3432             echo two > conftest.two
3433             mkdir conftest.dir
3434             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3435               test -s conftest.one && test -s conftest.two &&
3436               test -s conftest.dir/conftest.one &&
3437               test -s conftest.dir/conftest.two
3438             then
3439               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3440               break 3
3441             fi
3442           fi
3443         fi
3444       done
3445     done
3446     ;;
3447 esac
3448
3449   done
3450 IFS=$as_save_IFS
3451
3452 rm -rf conftest.one conftest.two conftest.dir
3453
3454 fi
3455   if test "${ac_cv_path_install+set}" = set; then
3456     INSTALL=$ac_cv_path_install
3457   else
3458     # As a last resort, use the slow shell script.  Don't cache a
3459     # value for INSTALL within a source directory, because that will
3460     # break other packages using the cache if that directory is
3461     # removed, or if the value is a relative name.
3462     INSTALL=$ac_install_sh
3463   fi
3464 fi
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3466 $as_echo "$INSTALL" >&6; }
3467
3468 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3469 # It thinks the first close brace ends the variable substitution.
3470 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3471
3472 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3473
3474 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3475
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3477 $as_echo_n "checking whether build environment is sane... " >&6; }
3478 # Just in case
3479 sleep 1
3480 echo timestamp > conftest.file
3481 # Reject unsafe characters in $srcdir or the absolute working directory
3482 # name.  Accept space and tab only in the latter.
3483 am_lf='
3484 '
3485 case `pwd` in
3486   *[\\\"\#\$\&\'\`$am_lf]*)
3487     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3488 esac
3489 case $srcdir in
3490   *[\\\"\#\$\&\'\`$am_lf\ \     ]*)
3491     as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3492 esac
3493
3494 # Do `set' in a subshell so we don't clobber the current shell's
3495 # arguments.  Must try -L first in case configure is actually a
3496 # symlink; some systems play weird games with the mod time of symlinks
3497 # (eg FreeBSD returns the mod time of the symlink's containing
3498 # directory).
3499 if (
3500    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3501    if test "$*" = "X"; then
3502       # -L didn't work.
3503       set X `ls -t "$srcdir/configure" conftest.file`
3504    fi
3505    rm -f conftest.file
3506    if test "$*" != "X $srcdir/configure conftest.file" \
3507       && test "$*" != "X conftest.file $srcdir/configure"; then
3508
3509       # If neither matched, then we have a broken ls.  This can happen
3510       # if, for instance, CONFIG_SHELL is bash and it inherits a
3511       # broken ls alias from the environment.  This has actually
3512       # happened.  Such a system could not be considered "sane".
3513       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3514 alias in your environment" "$LINENO" 5
3515    fi
3516
3517    test "$2" = conftest.file
3518    )
3519 then
3520    # Ok.
3521    :
3522 else
3523    as_fn_error $? "newly created file is older than distributed files!
3524 Check your system clock" "$LINENO" 5
3525 fi
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3527 $as_echo "yes" >&6; }
3528 test "$program_prefix" != NONE &&
3529   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3530 # Use a double $ so make ignores it.
3531 test "$program_suffix" != NONE &&
3532   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3533 # Double any \ or $.
3534 # By default was `s,x,x', remove it if useless.
3535 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3536 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3537
3538 # expand $ac_aux_dir to an absolute path
3539 am_aux_dir=`cd $ac_aux_dir && pwd`
3540
3541 if test x"${MISSING+set}" != xset; then
3542   case $am_aux_dir in
3543   *\ * | *\     *)
3544     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3545   *)
3546     MISSING="\${SHELL} $am_aux_dir/missing" ;;
3547   esac
3548 fi
3549 # Use eval to expand $SHELL
3550 if eval "$MISSING --run true"; then
3551   am_missing_run="$MISSING --run "
3552 else
3553   am_missing_run=
3554   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3555 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3556 fi
3557
3558 if test x"${install_sh}" != xset; then
3559   case $am_aux_dir in
3560   *\ * | *\     *)
3561     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3562   *)
3563     install_sh="\${SHELL} $am_aux_dir/install-sh"
3564   esac
3565 fi
3566
3567 # Installed binaries are usually stripped using `strip' when the user
3568 # run `make install-strip'.  However `strip' might not be the right
3569 # tool to use in cross-compilation environments, therefore Automake
3570 # will honor the `STRIP' environment variable to overrule this program.
3571 if test "$cross_compiling" != no; then
3572   if test -n "$ac_tool_prefix"; then
3573   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3574 set dummy ${ac_tool_prefix}strip; ac_word=$2
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3576 $as_echo_n "checking for $ac_word... " >&6; }
3577 if test "${ac_cv_prog_STRIP+set}" = set; then :
3578   $as_echo_n "(cached) " >&6
3579 else
3580   if test -n "$STRIP"; then
3581   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3582 else
3583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3584 for as_dir in $PATH
3585 do
3586   IFS=$as_save_IFS
3587   test -z "$as_dir" && as_dir=.
3588     for ac_exec_ext in '' $ac_executable_extensions; do
3589   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3590     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3592     break 2
3593   fi
3594 done
3595   done
3596 IFS=$as_save_IFS
3597
3598 fi
3599 fi
3600 STRIP=$ac_cv_prog_STRIP
3601 if test -n "$STRIP"; then
3602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3603 $as_echo "$STRIP" >&6; }
3604 else
3605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3606 $as_echo "no" >&6; }
3607 fi
3608
3609
3610 fi
3611 if test -z "$ac_cv_prog_STRIP"; then
3612   ac_ct_STRIP=$STRIP
3613   # Extract the first word of "strip", so it can be a program name with args.
3614 set dummy strip; ac_word=$2
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616 $as_echo_n "checking for $ac_word... " >&6; }
3617 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3618   $as_echo_n "(cached) " >&6
3619 else
3620   if test -n "$ac_ct_STRIP"; then
3621   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3622 else
3623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624 for as_dir in $PATH
3625 do
3626   IFS=$as_save_IFS
3627   test -z "$as_dir" && as_dir=.
3628     for ac_exec_ext in '' $ac_executable_extensions; do
3629   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3630     ac_cv_prog_ac_ct_STRIP="strip"
3631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3632     break 2
3633   fi
3634 done
3635   done
3636 IFS=$as_save_IFS
3637
3638 fi
3639 fi
3640 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3641 if test -n "$ac_ct_STRIP"; then
3642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3643 $as_echo "$ac_ct_STRIP" >&6; }
3644 else
3645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646 $as_echo "no" >&6; }
3647 fi
3648
3649   if test "x$ac_ct_STRIP" = x; then
3650     STRIP=":"
3651   else
3652     case $cross_compiling:$ac_tool_warned in
3653 yes:)
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3655 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3656 ac_tool_warned=yes ;;
3657 esac
3658     STRIP=$ac_ct_STRIP
3659   fi
3660 else
3661   STRIP="$ac_cv_prog_STRIP"
3662 fi
3663
3664 fi
3665 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3666
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3668 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3669 if test -z "$MKDIR_P"; then
3670   if test "${ac_cv_path_mkdir+set}" = set; then :
3671   $as_echo_n "(cached) " >&6
3672 else
3673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3675 do
3676   IFS=$as_save_IFS
3677   test -z "$as_dir" && as_dir=.
3678     for ac_prog in mkdir gmkdir; do
3679          for ac_exec_ext in '' $ac_executable_extensions; do
3680            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3681            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3682              'mkdir (GNU coreutils) '* | \
3683              'mkdir (coreutils) '* | \
3684              'mkdir (fileutils) '4.1*)
3685                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3686                break 3;;
3687            esac
3688          done
3689        done
3690   done
3691 IFS=$as_save_IFS
3692
3693 fi
3694
3695   test -d ./--version && rmdir ./--version
3696   if test "${ac_cv_path_mkdir+set}" = set; then
3697     MKDIR_P="$ac_cv_path_mkdir -p"
3698   else
3699     # As a last resort, use the slow shell script.  Don't cache a
3700     # value for MKDIR_P within a source directory, because that will
3701     # break other packages using the cache if that directory is
3702     # removed, or if the value is a relative name.
3703     MKDIR_P="$ac_install_sh -d"
3704   fi
3705 fi
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3707 $as_echo "$MKDIR_P" >&6; }
3708
3709
3710 mkdir_p="$MKDIR_P"
3711 case $mkdir_p in
3712   [\\/$]* | ?:[\\/]*) ;;
3713   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3714 esac
3715
3716 for ac_prog in gawk mawk nawk awk
3717 do
3718   # Extract the first word of "$ac_prog", so it can be a program name with args.
3719 set dummy $ac_prog; ac_word=$2
3720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721 $as_echo_n "checking for $ac_word... " >&6; }
3722 if test "${ac_cv_prog_AWK+set}" = set; then :
3723   $as_echo_n "(cached) " >&6
3724 else
3725   if test -n "$AWK"; then
3726   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3727 else
3728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729 for as_dir in $PATH
3730 do
3731   IFS=$as_save_IFS
3732   test -z "$as_dir" && as_dir=.
3733     for ac_exec_ext in '' $ac_executable_extensions; do
3734   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3735     ac_cv_prog_AWK="$ac_prog"
3736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3737     break 2
3738   fi
3739 done
3740   done
3741 IFS=$as_save_IFS
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3748 $as_echo "$AWK" >&6; }
3749 else
3750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751 $as_echo "no" >&6; }
3752 fi
3753
3754
3755   test -n "$AWK" && break
3756 done
3757
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3759 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3760 set x ${MAKE-make}
3761 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3762 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
3763   $as_echo_n "(cached) " >&6
3764 else
3765   cat >conftest.make <<\_ACEOF
3766 SHELL = /bin/sh
3767 all:
3768         @echo '@@@%%%=$(MAKE)=@@@%%%'
3769 _ACEOF
3770 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3771 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3772   *@@@%%%=?*=@@@%%%*)
3773     eval ac_cv_prog_make_${ac_make}_set=yes;;
3774   *)
3775     eval ac_cv_prog_make_${ac_make}_set=no;;
3776 esac
3777 rm -f conftest.make
3778 fi
3779 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3781 $as_echo "yes" >&6; }
3782   SET_MAKE=
3783 else
3784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785 $as_echo "no" >&6; }
3786   SET_MAKE="MAKE=${MAKE-make}"
3787 fi
3788
3789 rm -rf .tst 2>/dev/null
3790 mkdir .tst 2>/dev/null
3791 if test -d .tst; then
3792   am__leading_dot=.
3793 else
3794   am__leading_dot=_
3795 fi
3796 rmdir .tst 2>/dev/null
3797
3798 # Check whether --enable-silent-rules was given.
3799 if test "${enable_silent_rules+set}" = set; then :
3800   enableval=$enable_silent_rules;
3801 fi
3802
3803 case $enable_silent_rules in
3804 yes) AM_DEFAULT_VERBOSITY=0;;
3805 no)  AM_DEFAULT_VERBOSITY=1;;
3806 *)   AM_DEFAULT_VERBOSITY=1;;
3807 esac
3808 AM_BACKSLASH='\'
3809
3810 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3811   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3812   # is not polluted with repeated "-I."
3813   am__isrc=' -I$(srcdir)'
3814   # test to see if srcdir already configured
3815   if test -f $srcdir/config.status; then
3816     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3817   fi
3818 fi
3819
3820 # test whether we have cygpath
3821 if test -z "$CYGPATH_W"; then
3822   if (cygpath --version) >/dev/null 2>/dev/null; then
3823     CYGPATH_W='cygpath -w'
3824   else
3825     CYGPATH_W=echo
3826   fi
3827 fi
3828
3829
3830 # Define the identity of the package.
3831  PACKAGE='m4'
3832  VERSION='1.4.16'
3833
3834
3835 cat >>confdefs.h <<_ACEOF
3836 #define PACKAGE "$PACKAGE"
3837 _ACEOF
3838
3839
3840 cat >>confdefs.h <<_ACEOF
3841 #define VERSION "$VERSION"
3842 _ACEOF
3843
3844 # Some tools Automake needs.
3845
3846 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3847
3848
3849 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3850
3851
3852 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3853
3854
3855 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3856
3857
3858 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3859
3860 # We need awk for the "check" target.  The system "awk" is bad on
3861 # some platforms.
3862 # Always define AMTAR for backward compatibility.
3863
3864 AMTAR=${AMTAR-"${am_missing_run}tar"}
3865
3866 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3877
3878
3879 ac_ext=c
3880 ac_cpp='$CPP $CPPFLAGS'
3881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3884 if test -n "$ac_tool_prefix"; then
3885   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3886 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3888 $as_echo_n "checking for $ac_word... " >&6; }
3889 if test "${ac_cv_prog_CC+set}" = set; then :
3890   $as_echo_n "(cached) " >&6
3891 else
3892   if test -n "$CC"; then
3893   ac_cv_prog_CC="$CC" # Let the user override the test.
3894 else
3895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896 for as_dir in $PATH
3897 do
3898   IFS=$as_save_IFS
3899   test -z "$as_dir" && as_dir=.
3900     for ac_exec_ext in '' $ac_executable_extensions; do
3901   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3902     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3904     break 2
3905   fi
3906 done
3907   done
3908 IFS=$as_save_IFS
3909
3910 fi
3911 fi
3912 CC=$ac_cv_prog_CC
3913 if test -n "$CC"; then
3914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3915 $as_echo "$CC" >&6; }
3916 else
3917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918 $as_echo "no" >&6; }
3919 fi
3920
3921
3922 fi
3923 if test -z "$ac_cv_prog_CC"; then
3924   ac_ct_CC=$CC
3925   # Extract the first word of "gcc", so it can be a program name with args.
3926 set dummy gcc; ac_word=$2
3927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3928 $as_echo_n "checking for $ac_word... " >&6; }
3929 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3930   $as_echo_n "(cached) " >&6
3931 else
3932   if test -n "$ac_ct_CC"; then
3933   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3934 else
3935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3936 for as_dir in $PATH
3937 do
3938   IFS=$as_save_IFS
3939   test -z "$as_dir" && as_dir=.
3940     for ac_exec_ext in '' $ac_executable_extensions; do
3941   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3942     ac_cv_prog_ac_ct_CC="gcc"
3943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3944     break 2
3945   fi
3946 done
3947   done
3948 IFS=$as_save_IFS
3949
3950 fi
3951 fi
3952 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3953 if test -n "$ac_ct_CC"; then
3954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3955 $as_echo "$ac_ct_CC" >&6; }
3956 else
3957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3958 $as_echo "no" >&6; }
3959 fi
3960
3961   if test "x$ac_ct_CC" = x; then
3962     CC=""
3963   else
3964     case $cross_compiling:$ac_tool_warned in
3965 yes:)
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3967 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3968 ac_tool_warned=yes ;;
3969 esac
3970     CC=$ac_ct_CC
3971   fi
3972 else
3973   CC="$ac_cv_prog_CC"
3974 fi
3975
3976 if test -z "$CC"; then
3977           if test -n "$ac_tool_prefix"; then
3978     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3979 set dummy ${ac_tool_prefix}cc; ac_word=$2
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3981 $as_echo_n "checking for $ac_word... " >&6; }
3982 if test "${ac_cv_prog_CC+set}" = set; then :
3983   $as_echo_n "(cached) " >&6
3984 else
3985   if test -n "$CC"; then
3986   ac_cv_prog_CC="$CC" # Let the user override the test.
3987 else
3988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3989 for as_dir in $PATH
3990 do
3991   IFS=$as_save_IFS
3992   test -z "$as_dir" && as_dir=.
3993     for ac_exec_ext in '' $ac_executable_extensions; do
3994   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3995     ac_cv_prog_CC="${ac_tool_prefix}cc"
3996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3997     break 2
3998   fi
3999 done
4000   done
4001 IFS=$as_save_IFS
4002
4003 fi
4004 fi
4005 CC=$ac_cv_prog_CC
4006 if test -n "$CC"; then
4007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4008 $as_echo "$CC" >&6; }
4009 else
4010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4011 $as_echo "no" >&6; }
4012 fi
4013
4014
4015   fi
4016 fi
4017 if test -z "$CC"; then
4018   # Extract the first word of "cc", so it can be a program name with args.
4019 set dummy cc; ac_word=$2
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021 $as_echo_n "checking for $ac_word... " >&6; }
4022 if test "${ac_cv_prog_CC+set}" = set; then :
4023   $as_echo_n "(cached) " >&6
4024 else
4025   if test -n "$CC"; then
4026   ac_cv_prog_CC="$CC" # Let the user override the test.
4027 else
4028   ac_prog_rejected=no
4029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4030 for as_dir in $PATH
4031 do
4032   IFS=$as_save_IFS
4033   test -z "$as_dir" && as_dir=.
4034     for ac_exec_ext in '' $ac_executable_extensions; do
4035   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4036     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4037        ac_prog_rejected=yes
4038        continue
4039      fi
4040     ac_cv_prog_CC="cc"
4041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4042     break 2
4043   fi
4044 done
4045   done
4046 IFS=$as_save_IFS
4047
4048 if test $ac_prog_rejected = yes; then
4049   # We found a bogon in the path, so make sure we never use it.
4050   set dummy $ac_cv_prog_CC
4051   shift
4052   if test $# != 0; then
4053     # We chose a different compiler from the bogus one.
4054     # However, it has the same basename, so the bogon will be chosen
4055     # first if we set CC to just the basename; use the full file name.
4056     shift
4057     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4058   fi
4059 fi
4060 fi
4061 fi
4062 CC=$ac_cv_prog_CC
4063 if test -n "$CC"; then
4064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4065 $as_echo "$CC" >&6; }
4066 else
4067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068 $as_echo "no" >&6; }
4069 fi
4070
4071
4072 fi
4073 if test -z "$CC"; then
4074   if test -n "$ac_tool_prefix"; then
4075   for ac_prog in cl.exe
4076   do
4077     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4078 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080 $as_echo_n "checking for $ac_word... " >&6; }
4081 if test "${ac_cv_prog_CC+set}" = set; then :
4082   $as_echo_n "(cached) " >&6
4083 else
4084   if test -n "$CC"; then
4085   ac_cv_prog_CC="$CC" # Let the user override the test.
4086 else
4087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4088 for as_dir in $PATH
4089 do
4090   IFS=$as_save_IFS
4091   test -z "$as_dir" && as_dir=.
4092     for ac_exec_ext in '' $ac_executable_extensions; do
4093   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4094     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4096     break 2
4097   fi
4098 done
4099   done
4100 IFS=$as_save_IFS
4101
4102 fi
4103 fi
4104 CC=$ac_cv_prog_CC
4105 if test -n "$CC"; then
4106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4107 $as_echo "$CC" >&6; }
4108 else
4109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4110 $as_echo "no" >&6; }
4111 fi
4112
4113
4114     test -n "$CC" && break
4115   done
4116 fi
4117 if test -z "$CC"; then
4118   ac_ct_CC=$CC
4119   for ac_prog in cl.exe
4120 do
4121   # Extract the first word of "$ac_prog", so it can be a program name with args.
4122 set dummy $ac_prog; ac_word=$2
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4124 $as_echo_n "checking for $ac_word... " >&6; }
4125 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4126   $as_echo_n "(cached) " >&6
4127 else
4128   if test -n "$ac_ct_CC"; then
4129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4130 else
4131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4132 for as_dir in $PATH
4133 do
4134   IFS=$as_save_IFS
4135   test -z "$as_dir" && as_dir=.
4136     for ac_exec_ext in '' $ac_executable_extensions; do
4137   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4138     ac_cv_prog_ac_ct_CC="$ac_prog"
4139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4140     break 2
4141   fi
4142 done
4143   done
4144 IFS=$as_save_IFS
4145
4146 fi
4147 fi
4148 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4149 if test -n "$ac_ct_CC"; then
4150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4151 $as_echo "$ac_ct_CC" >&6; }
4152 else
4153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154 $as_echo "no" >&6; }
4155 fi
4156
4157
4158   test -n "$ac_ct_CC" && break
4159 done
4160
4161   if test "x$ac_ct_CC" = x; then
4162     CC=""
4163   else
4164     case $cross_compiling:$ac_tool_warned in
4165 yes:)
4166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4168 ac_tool_warned=yes ;;
4169 esac
4170     CC=$ac_ct_CC
4171   fi
4172 fi
4173
4174 fi
4175
4176
4177 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4179 as_fn_error $? "no acceptable C compiler found in \$PATH
4180 See \`config.log' for more details" "$LINENO" 5; }
4181
4182 # Provide some information about the compiler.
4183 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4184 set X $ac_compile
4185 ac_compiler=$2
4186 for ac_option in --version -v -V -qversion; do
4187   { { ac_try="$ac_compiler $ac_option >&5"
4188 case "(($ac_try" in
4189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4190   *) ac_try_echo=$ac_try;;
4191 esac
4192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4193 $as_echo "$ac_try_echo"; } >&5
4194   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4195   ac_status=$?
4196   if test -s conftest.err; then
4197     sed '10a\
4198 ... rest of stderr output deleted ...
4199          10q' conftest.err >conftest.er1
4200     cat conftest.er1 >&5
4201   fi
4202   rm -f conftest.er1 conftest.err
4203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4204   test $ac_status = 0; }
4205 done
4206
4207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208 /* end confdefs.h.  */
4209
4210 int
4211 main ()
4212 {
4213
4214   ;
4215   return 0;
4216 }
4217 _ACEOF
4218 ac_clean_files_save=$ac_clean_files
4219 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4220 # Try to create an executable without -o first, disregard a.out.
4221 # It will help us diagnose broken compilers, and finding out an intuition
4222 # of exeext.
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4224 $as_echo_n "checking whether the C compiler works... " >&6; }
4225 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4226
4227 # The possible output files:
4228 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4229
4230 ac_rmfiles=
4231 for ac_file in $ac_files
4232 do
4233   case $ac_file in
4234     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4235     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4236   esac
4237 done
4238 rm -f $ac_rmfiles
4239
4240 if { { ac_try="$ac_link_default"
4241 case "(($ac_try" in
4242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4243   *) ac_try_echo=$ac_try;;
4244 esac
4245 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4246 $as_echo "$ac_try_echo"; } >&5
4247   (eval "$ac_link_default") 2>&5
4248   ac_status=$?
4249   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4250   test $ac_status = 0; }; then :
4251   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4252 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4253 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
4254 # so that the user can short-circuit this test for compilers unknown to
4255 # Autoconf.
4256 for ac_file in $ac_files ''
4257 do
4258   test -f "$ac_file" || continue
4259   case $ac_file in
4260     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4261         ;;
4262     [ab].out )
4263         # We found the default executable, but exeext='' is most
4264         # certainly right.
4265         break;;
4266     *.* )
4267         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4268         then :; else
4269            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4270         fi
4271         # We set ac_cv_exeext here because the later test for it is not
4272         # safe: cross compilers may not add the suffix if given an `-o'
4273         # argument, so we may need to know it at that point already.
4274         # Even if this section looks crufty: it has the advantage of
4275         # actually working.
4276         break;;
4277     * )
4278         break;;
4279   esac
4280 done
4281 test "$ac_cv_exeext" = no && ac_cv_exeext=
4282
4283 else
4284   ac_file=''
4285 fi
4286 if test -z "$ac_file"; then :
4287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4288 $as_echo "no" >&6; }
4289 $as_echo "$as_me: failed program was:" >&5
4290 sed 's/^/| /' conftest.$ac_ext >&5
4291
4292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4293 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4294 as_fn_error 77 "C compiler cannot create executables
4295 See \`config.log' for more details" "$LINENO" 5; }
4296 else
4297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4298 $as_echo "yes" >&6; }
4299 fi
4300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4301 $as_echo_n "checking for C compiler default output file name... " >&6; }
4302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4303 $as_echo "$ac_file" >&6; }
4304 ac_exeext=$ac_cv_exeext
4305
4306 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4307 ac_clean_files=$ac_clean_files_save
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4309 $as_echo_n "checking for suffix of executables... " >&6; }
4310 if { { ac_try="$ac_link"
4311 case "(($ac_try" in
4312   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4313   *) ac_try_echo=$ac_try;;
4314 esac
4315 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4316 $as_echo "$ac_try_echo"; } >&5
4317   (eval "$ac_link") 2>&5
4318   ac_status=$?
4319   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4320   test $ac_status = 0; }; then :
4321   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4322 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4323 # work properly (i.e., refer to `conftest.exe'), while it won't with
4324 # `rm'.
4325 for ac_file in conftest.exe conftest conftest.*; do
4326   test -f "$ac_file" || continue
4327   case $ac_file in
4328     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4329     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4330           break;;
4331     * ) break;;
4332   esac
4333 done
4334 else
4335   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4336 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4337 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4338 See \`config.log' for more details" "$LINENO" 5; }
4339 fi
4340 rm -f conftest conftest$ac_cv_exeext
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4342 $as_echo "$ac_cv_exeext" >&6; }
4343
4344 rm -f conftest.$ac_ext
4345 EXEEXT=$ac_cv_exeext
4346 ac_exeext=$EXEEXT
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348 /* end confdefs.h.  */
4349 #include <stdio.h>
4350 int
4351 main ()
4352 {
4353 FILE *f = fopen ("conftest.out", "w");
4354  return ferror (f) || fclose (f) != 0;
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 ac_clean_files="$ac_clean_files conftest.out"
4361 # Check that the compiler produces executables we can run.  If not, either
4362 # the compiler is broken, or we cross compile.
4363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4364 $as_echo_n "checking whether we are cross compiling... " >&6; }
4365 if test "$cross_compiling" != yes; then
4366   { { ac_try="$ac_link"
4367 case "(($ac_try" in
4368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4369   *) ac_try_echo=$ac_try;;
4370 esac
4371 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4372 $as_echo "$ac_try_echo"; } >&5
4373   (eval "$ac_link") 2>&5
4374   ac_status=$?
4375   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4376   test $ac_status = 0; }
4377   if { ac_try='./conftest$ac_cv_exeext'
4378   { { case "(($ac_try" in
4379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4380   *) ac_try_echo=$ac_try;;
4381 esac
4382 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4383 $as_echo "$ac_try_echo"; } >&5
4384   (eval "$ac_try") 2>&5
4385   ac_status=$?
4386   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4387   test $ac_status = 0; }; }; then
4388     cross_compiling=no
4389   else
4390     if test "$cross_compiling" = maybe; then
4391         cross_compiling=yes
4392     else
4393         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4394 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4395 as_fn_error $? "cannot run C compiled programs.
4396 If you meant to cross compile, use \`--host'.
4397 See \`config.log' for more details" "$LINENO" 5; }
4398     fi
4399   fi
4400 fi
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4402 $as_echo "$cross_compiling" >&6; }
4403
4404 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4405 ac_clean_files=$ac_clean_files_save
4406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4407 $as_echo_n "checking for suffix of object files... " >&6; }
4408 if test "${ac_cv_objext+set}" = set; then :
4409   $as_echo_n "(cached) " >&6
4410 else
4411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412 /* end confdefs.h.  */
4413
4414 int
4415 main ()
4416 {
4417
4418   ;
4419   return 0;
4420 }
4421 _ACEOF
4422 rm -f conftest.o conftest.obj
4423 if { { ac_try="$ac_compile"
4424 case "(($ac_try" in
4425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4426   *) ac_try_echo=$ac_try;;
4427 esac
4428 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4429 $as_echo "$ac_try_echo"; } >&5
4430   (eval "$ac_compile") 2>&5
4431   ac_status=$?
4432   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4433   test $ac_status = 0; }; then :
4434   for ac_file in conftest.o conftest.obj conftest.*; do
4435   test -f "$ac_file" || continue;
4436   case $ac_file in
4437     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4438     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4439        break;;
4440   esac
4441 done
4442 else
4443   $as_echo "$as_me: failed program was:" >&5
4444 sed 's/^/| /' conftest.$ac_ext >&5
4445
4446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4447 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4448 as_fn_error $? "cannot compute suffix of object files: cannot compile
4449 See \`config.log' for more details" "$LINENO" 5; }
4450 fi
4451 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4452 fi
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4454 $as_echo "$ac_cv_objext" >&6; }
4455 OBJEXT=$ac_cv_objext
4456 ac_objext=$OBJEXT
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4458 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4459 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4460   $as_echo_n "(cached) " >&6
4461 else
4462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463 /* end confdefs.h.  */
4464
4465 int
4466 main ()
4467 {
4468 #ifndef __GNUC__
4469        choke me
4470 #endif
4471
4472   ;
4473   return 0;
4474 }
4475 _ACEOF
4476 if ac_fn_c_try_compile "$LINENO"; then :
4477   ac_compiler_gnu=yes
4478 else
4479   ac_compiler_gnu=no
4480 fi
4481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4482 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4483
4484 fi
4485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4486 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4487 if test $ac_compiler_gnu = yes; then
4488   GCC=yes
4489 else
4490   GCC=
4491 fi
4492 ac_test_CFLAGS=${CFLAGS+set}
4493 ac_save_CFLAGS=$CFLAGS
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4495 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4496 if test "${ac_cv_prog_cc_g+set}" = set; then :
4497   $as_echo_n "(cached) " >&6
4498 else
4499   ac_save_c_werror_flag=$ac_c_werror_flag
4500    ac_c_werror_flag=yes
4501    ac_cv_prog_cc_g=no
4502    CFLAGS="-g"
4503    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504 /* end confdefs.h.  */
4505
4506 int
4507 main ()
4508 {
4509
4510   ;
4511   return 0;
4512 }
4513 _ACEOF
4514 if ac_fn_c_try_compile "$LINENO"; then :
4515   ac_cv_prog_cc_g=yes
4516 else
4517   CFLAGS=""
4518       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519 /* end confdefs.h.  */
4520
4521 int
4522 main ()
4523 {
4524
4525   ;
4526   return 0;
4527 }
4528 _ACEOF
4529 if ac_fn_c_try_compile "$LINENO"; then :
4530
4531 else
4532   ac_c_werror_flag=$ac_save_c_werror_flag
4533          CFLAGS="-g"
4534          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4535 /* end confdefs.h.  */
4536
4537 int
4538 main ()
4539 {
4540
4541   ;
4542   return 0;
4543 }
4544 _ACEOF
4545 if ac_fn_c_try_compile "$LINENO"; then :
4546   ac_cv_prog_cc_g=yes
4547 fi
4548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4549 fi
4550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4551 fi
4552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553    ac_c_werror_flag=$ac_save_c_werror_flag
4554 fi
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4556 $as_echo "$ac_cv_prog_cc_g" >&6; }
4557 if test "$ac_test_CFLAGS" = set; then
4558   CFLAGS=$ac_save_CFLAGS
4559 elif test $ac_cv_prog_cc_g = yes; then
4560   if test "$GCC" = yes; then
4561     CFLAGS="-g -O2"
4562   else
4563     CFLAGS="-g"
4564   fi
4565 else
4566   if test "$GCC" = yes; then
4567     CFLAGS="-O2"
4568   else
4569     CFLAGS=
4570   fi
4571 fi
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4573 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4574 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4575   $as_echo_n "(cached) " >&6
4576 else
4577   ac_cv_prog_cc_c89=no
4578 ac_save_CC=$CC
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580 /* end confdefs.h.  */
4581 #include <stdarg.h>
4582 #include <stdio.h>
4583 #include <sys/types.h>
4584 #include <sys/stat.h>
4585 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4586 struct buf { int x; };
4587 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4588 static char *e (p, i)
4589      char **p;
4590      int i;
4591 {
4592   return p[i];
4593 }
4594 static char *f (char * (*g) (char **, int), char **p, ...)
4595 {
4596   char *s;
4597   va_list v;
4598   va_start (v,p);
4599   s = g (p, va_arg (v,int));
4600   va_end (v);
4601   return s;
4602 }
4603
4604 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4605    function prototypes and stuff, but not '\xHH' hex character constants.
4606    These don't provoke an error unfortunately, instead are silently treated
4607    as 'x'.  The following induces an error, until -std is added to get
4608    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4609    array size at least.  It's necessary to write '\x00'==0 to get something
4610    that's true only with -std.  */
4611 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4612
4613 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4614    inside strings and character constants.  */
4615 #define FOO(x) 'x'
4616 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4617
4618 int test (int i, double x);
4619 struct s1 {int (*f) (int a);};
4620 struct s2 {int (*f) (double a);};
4621 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4622 int argc;
4623 char **argv;
4624 int
4625 main ()
4626 {
4627 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4628   ;
4629   return 0;
4630 }
4631 _ACEOF
4632 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4633         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4634 do
4635   CC="$ac_save_CC $ac_arg"
4636   if ac_fn_c_try_compile "$LINENO"; then :
4637   ac_cv_prog_cc_c89=$ac_arg
4638 fi
4639 rm -f core conftest.err conftest.$ac_objext
4640   test "x$ac_cv_prog_cc_c89" != "xno" && break
4641 done
4642 rm -f conftest.$ac_ext
4643 CC=$ac_save_CC
4644
4645 fi
4646 # AC_CACHE_VAL
4647 case "x$ac_cv_prog_cc_c89" in
4648   x)
4649     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4650 $as_echo "none needed" >&6; } ;;
4651   xno)
4652     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4653 $as_echo "unsupported" >&6; } ;;
4654   *)
4655     CC="$CC $ac_cv_prog_cc_c89"
4656     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4657 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4658 esac
4659 if test "x$ac_cv_prog_cc_c89" != xno; then :
4660
4661 fi
4662
4663 ac_ext=c
4664 ac_cpp='$CPP $CPPFLAGS'
4665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4668 DEPDIR="${am__leading_dot}deps"
4669
4670 ac_config_commands="$ac_config_commands depfiles"
4671
4672
4673 am_make=${MAKE-make}
4674 cat > confinc << 'END'
4675 am__doit:
4676         @echo this is the am__doit target
4677 .PHONY: am__doit
4678 END
4679 # If we don't find an include directive, just comment out the code.
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4681 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4682 am__include="#"
4683 am__quote=
4684 _am_result=none
4685 # First try GNU make style include.
4686 echo "include confinc" > confmf
4687 # Ignore all kinds of additional output from `make'.
4688 case `$am_make -s -f confmf 2> /dev/null` in #(
4689 *the\ am__doit\ target*)
4690   am__include=include
4691   am__quote=
4692   _am_result=GNU
4693   ;;
4694 esac
4695 # Now try BSD make style include.
4696 if test "$am__include" = "#"; then
4697    echo '.include "confinc"' > confmf
4698    case `$am_make -s -f confmf 2> /dev/null` in #(
4699    *the\ am__doit\ target*)
4700      am__include=.include
4701      am__quote="\""
4702      _am_result=BSD
4703      ;;
4704    esac
4705 fi
4706
4707
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4709 $as_echo "$_am_result" >&6; }
4710 rm -f confinc confmf
4711
4712 # Check whether --enable-dependency-tracking was given.
4713 if test "${enable_dependency_tracking+set}" = set; then :
4714   enableval=$enable_dependency_tracking;
4715 fi
4716
4717 if test "x$enable_dependency_tracking" != xno; then
4718   am_depcomp="$ac_aux_dir/depcomp"
4719   AMDEPBACKSLASH='\'
4720 fi
4721  if test "x$enable_dependency_tracking" != xno; then
4722   AMDEP_TRUE=
4723   AMDEP_FALSE='#'
4724 else
4725   AMDEP_TRUE='#'
4726   AMDEP_FALSE=
4727 fi
4728
4729
4730
4731 depcc="$CC"   am_compiler_list=
4732
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4734 $as_echo_n "checking dependency style of $depcc... " >&6; }
4735 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4736   $as_echo_n "(cached) " >&6
4737 else
4738   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4739   # We make a subdir and do the tests there.  Otherwise we can end up
4740   # making bogus files that we don't know about and never remove.  For
4741   # instance it was reported that on HP-UX the gcc test will end up
4742   # making a dummy file named `D' -- because `-MD' means `put the output
4743   # in D'.
4744   mkdir conftest.dir
4745   # Copy depcomp to subdir because otherwise we won't find it if we're
4746   # using a relative directory.
4747   cp "$am_depcomp" conftest.dir
4748   cd conftest.dir
4749   # We will build objects and dependencies in a subdirectory because
4750   # it helps to detect inapplicable dependency modes.  For instance
4751   # both Tru64's cc and ICC support -MD to output dependencies as a
4752   # side effect of compilation, but ICC will put the dependencies in
4753   # the current directory while Tru64 will put them in the object
4754   # directory.
4755   mkdir sub
4756
4757   am_cv_CC_dependencies_compiler_type=none
4758   if test "$am_compiler_list" = ""; then
4759      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4760   fi
4761   am__universal=false
4762   case " $depcc " in #(
4763      *\ -arch\ *\ -arch\ *) am__universal=true ;;
4764      esac
4765
4766   for depmode in $am_compiler_list; do
4767     # Setup a source with many dependencies, because some compilers
4768     # like to wrap large dependency lists on column 80 (with \), and
4769     # we should not choose a depcomp mode which is confused by this.
4770     #
4771     # We need to recreate these files for each test, as the compiler may
4772     # overwrite some of them when testing with obscure command lines.
4773     # This happens at least with the AIX C compiler.
4774     : > sub/conftest.c
4775     for i in 1 2 3 4 5 6; do
4776       echo '#include "conftst'$i'.h"' >> sub/conftest.c
4777       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4778       # Solaris 8's {/usr,}/bin/sh.
4779       touch sub/conftst$i.h
4780     done
4781     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4782
4783     # We check with `-c' and `-o' for the sake of the "dashmstdout"
4784     # mode.  It turns out that the SunPro C++ compiler does not properly
4785     # handle `-M -o', and we need to detect this.  Also, some Intel
4786     # versions had trouble with output in subdirs
4787     am__obj=sub/conftest.${OBJEXT-o}
4788     am__minus_obj="-o $am__obj"
4789     case $depmode in
4790     gcc)
4791       # This depmode causes a compiler race in universal mode.
4792       test "$am__universal" = false || continue
4793       ;;
4794     nosideeffect)
4795       # after this tag, mechanisms are not by side-effect, so they'll
4796       # only be used when explicitly requested
4797       if test "x$enable_dependency_tracking" = xyes; then
4798         continue
4799       else
4800         break
4801       fi
4802       ;;
4803     msvisualcpp | msvcmsys)
4804       # This compiler won't grok `-c -o', but also, the minuso test has
4805       # not run yet.  These depmodes are late enough in the game, and
4806       # so weak that their functioning should not be impacted.
4807       am__obj=conftest.${OBJEXT-o}
4808       am__minus_obj=
4809       ;;
4810     none) break ;;
4811     esac
4812     if depmode=$depmode \
4813        source=sub/conftest.c object=$am__obj \
4814        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4815        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4816          >/dev/null 2>conftest.err &&
4817        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4818        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4819        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4820        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4821       # icc doesn't choke on unknown options, it will just issue warnings
4822       # or remarks (even with -Werror).  So we grep stderr for any message
4823       # that says an option was ignored or not supported.
4824       # When given -MP, icc 7.0 and 7.1 complain thusly:
4825       #   icc: Command line warning: ignoring option '-M'; no argument required
4826       # The diagnosis changed in icc 8.0:
4827       #   icc: Command line remark: option '-MP' not supported
4828       if (grep 'ignoring option' conftest.err ||
4829           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4830         am_cv_CC_dependencies_compiler_type=$depmode
4831         break
4832       fi
4833     fi
4834   done
4835
4836   cd ..
4837   rm -rf conftest.dir
4838 else
4839   am_cv_CC_dependencies_compiler_type=none
4840 fi
4841
4842 fi
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4844 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4845 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4846
4847  if
4848   test "x$enable_dependency_tracking" != xno \
4849   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4850   am__fastdepCC_TRUE=
4851   am__fastdepCC_FALSE='#'
4852 else
4853   am__fastdepCC_TRUE='#'
4854   am__fastdepCC_FALSE=
4855 fi
4856
4857
4858
4859 if test -n "$ac_tool_prefix"; then
4860   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4861 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863 $as_echo_n "checking for $ac_word... " >&6; }
4864 if test "${ac_cv_prog_RANLIB+set}" = set; then :
4865   $as_echo_n "(cached) " >&6
4866 else
4867   if test -n "$RANLIB"; then
4868   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4869 else
4870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871 for as_dir in $PATH
4872 do
4873   IFS=$as_save_IFS
4874   test -z "$as_dir" && as_dir=.
4875     for ac_exec_ext in '' $ac_executable_extensions; do
4876   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4877     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879     break 2
4880   fi
4881 done
4882   done
4883 IFS=$as_save_IFS
4884
4885 fi
4886 fi
4887 RANLIB=$ac_cv_prog_RANLIB
4888 if test -n "$RANLIB"; then
4889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4890 $as_echo "$RANLIB" >&6; }
4891 else
4892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4893 $as_echo "no" >&6; }
4894 fi
4895
4896
4897 fi
4898 if test -z "$ac_cv_prog_RANLIB"; then
4899   ac_ct_RANLIB=$RANLIB
4900   # Extract the first word of "ranlib", so it can be a program name with args.
4901 set dummy ranlib; ac_word=$2
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903 $as_echo_n "checking for $ac_word... " >&6; }
4904 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4905   $as_echo_n "(cached) " >&6
4906 else
4907   if test -n "$ac_ct_RANLIB"; then
4908   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4909 else
4910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4911 for as_dir in $PATH
4912 do
4913   IFS=$as_save_IFS
4914   test -z "$as_dir" && as_dir=.
4915     for ac_exec_ext in '' $ac_executable_extensions; do
4916   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4917     ac_cv_prog_ac_ct_RANLIB="ranlib"
4918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4919     break 2
4920   fi
4921 done
4922   done
4923 IFS=$as_save_IFS
4924
4925 fi
4926 fi
4927 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4928 if test -n "$ac_ct_RANLIB"; then
4929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4930 $as_echo "$ac_ct_RANLIB" >&6; }
4931 else
4932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4933 $as_echo "no" >&6; }
4934 fi
4935
4936   if test "x$ac_ct_RANLIB" = x; then
4937     RANLIB=":"
4938   else
4939     case $cross_compiling:$ac_tool_warned in
4940 yes:)
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4942 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4943 ac_tool_warned=yes ;;
4944 esac
4945     RANLIB=$ac_ct_RANLIB
4946   fi
4947 else
4948   RANLIB="$ac_cv_prog_RANLIB"
4949 fi
4950
4951 if test "x$CC" != xcc; then
4952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4953 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
4954 else
4955   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4956 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4957 fi
4958 set dummy $CC; ac_cc=`$as_echo "$2" |
4959                       sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4960 if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
4961   $as_echo_n "(cached) " >&6
4962 else
4963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4964 /* end confdefs.h.  */
4965
4966 int
4967 main ()
4968 {
4969
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 # Make sure it works both with $CC and with simple cc.
4975 # We do the test twice because some compilers refuse to overwrite an
4976 # existing .o file with -o, though they will create one.
4977 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4978 rm -f conftest2.*
4979 if { { case "(($ac_try" in
4980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981   *) ac_try_echo=$ac_try;;
4982 esac
4983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4984 $as_echo "$ac_try_echo"; } >&5
4985   (eval "$ac_try") 2>&5
4986   ac_status=$?
4987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4988   test $ac_status = 0; } &&
4989    test -f conftest2.$ac_objext && { { case "(($ac_try" in
4990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4991   *) ac_try_echo=$ac_try;;
4992 esac
4993 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4994 $as_echo "$ac_try_echo"; } >&5
4995   (eval "$ac_try") 2>&5
4996   ac_status=$?
4997   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4998   test $ac_status = 0; };
4999 then
5000   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5001   if test "x$CC" != xcc; then
5002     # Test first that cc exists at all.
5003     if { ac_try='cc -c conftest.$ac_ext >&5'
5004   { { case "(($ac_try" in
5005   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5006   *) ac_try_echo=$ac_try;;
5007 esac
5008 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5009 $as_echo "$ac_try_echo"; } >&5
5010   (eval "$ac_try") 2>&5
5011   ac_status=$?
5012   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5013   test $ac_status = 0; }; }; then
5014       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5015       rm -f conftest2.*
5016       if { { case "(($ac_try" in
5017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5018   *) ac_try_echo=$ac_try;;
5019 esac
5020 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5021 $as_echo "$ac_try_echo"; } >&5
5022   (eval "$ac_try") 2>&5
5023   ac_status=$?
5024   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5025   test $ac_status = 0; } &&
5026          test -f conftest2.$ac_objext && { { case "(($ac_try" in
5027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5028   *) ac_try_echo=$ac_try;;
5029 esac
5030 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5031 $as_echo "$ac_try_echo"; } >&5
5032   (eval "$ac_try") 2>&5
5033   ac_status=$?
5034   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5035   test $ac_status = 0; };
5036       then
5037         # cc works too.
5038         :
5039       else
5040         # cc exists but doesn't like -o.
5041         eval ac_cv_prog_cc_${ac_cc}_c_o=no
5042       fi
5043     fi
5044   fi
5045 else
5046   eval ac_cv_prog_cc_${ac_cc}_c_o=no
5047 fi
5048 rm -f core conftest*
5049
5050 fi
5051 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5053 $as_echo "yes" >&6; }
5054 else
5055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056 $as_echo "no" >&6; }
5057
5058 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5059
5060 fi
5061
5062 # FIXME: we rely on the cache variable name because
5063 # there is no other way.
5064 set dummy $CC
5065 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5066 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5067 if test "$am_t" != yes; then
5068    # Losing compiler, so override with the script.
5069    # FIXME: It is wrong to rewrite CC.
5070    # But if we don't then we get into trouble of one sort or another.
5071    # A longer-term fix would be to have automake use am__CC in this case,
5072    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5073    CC="$am_aux_dir/compile $CC"
5074 fi
5075
5076
5077 # Make sure we can run config.sub.
5078 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5079   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5080
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5082 $as_echo_n "checking build system type... " >&6; }
5083 if test "${ac_cv_build+set}" = set; then :
5084   $as_echo_n "(cached) " >&6
5085 else
5086   ac_build_alias=$build_alias
5087 test "x$ac_build_alias" = x &&
5088   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5089 test "x$ac_build_alias" = x &&
5090   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5091 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5092   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5093
5094 fi
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5096 $as_echo "$ac_cv_build" >&6; }
5097 case $ac_cv_build in
5098 *-*-*) ;;
5099 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5100 esac
5101 build=$ac_cv_build
5102 ac_save_IFS=$IFS; IFS='-'
5103 set x $ac_cv_build
5104 shift
5105 build_cpu=$1
5106 build_vendor=$2
5107 shift; shift
5108 # Remember, the first character of IFS is used to create $*,
5109 # except with old shells:
5110 build_os=$*
5111 IFS=$ac_save_IFS
5112 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5113
5114
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5116 $as_echo_n "checking host system type... " >&6; }
5117 if test "${ac_cv_host+set}" = set; then :
5118   $as_echo_n "(cached) " >&6
5119 else
5120   if test "x$host_alias" = x; then
5121   ac_cv_host=$ac_cv_build
5122 else
5123   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5124     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5125 fi
5126
5127 fi
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5129 $as_echo "$ac_cv_host" >&6; }
5130 case $ac_cv_host in
5131 *-*-*) ;;
5132 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5133 esac
5134 host=$ac_cv_host
5135 ac_save_IFS=$IFS; IFS='-'
5136 set x $ac_cv_host
5137 shift
5138 host_cpu=$1
5139 host_vendor=$2
5140 shift; shift
5141 # Remember, the first character of IFS is used to create $*,
5142 # except with old shells:
5143 host_os=$*
5144 IFS=$ac_save_IFS
5145 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5146
5147
5148
5149 ac_ext=c
5150 ac_cpp='$CPP $CPPFLAGS'
5151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5155 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5156 # On Suns, sometimes $CPP names a directory.
5157 if test -n "$CPP" && test -d "$CPP"; then
5158   CPP=
5159 fi
5160 if test -z "$CPP"; then
5161   if test "${ac_cv_prog_CPP+set}" = set; then :
5162   $as_echo_n "(cached) " >&6
5163 else
5164       # Double quotes because CPP needs to be expanded
5165     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5166     do
5167       ac_preproc_ok=false
5168 for ac_c_preproc_warn_flag in '' yes
5169 do
5170   # Use a header file that comes with gcc, so configuring glibc
5171   # with a fresh cross-compiler works.
5172   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5173   # <limits.h> exists even on freestanding compilers.
5174   # On the NeXT, cc -E runs the code through the compiler's parser,
5175   # not just through cpp. "Syntax error" is here to catch this case.
5176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5177 /* end confdefs.h.  */
5178 #ifdef __STDC__
5179 # include <limits.h>
5180 #else
5181 # include <assert.h>
5182 #endif
5183                      Syntax error
5184 _ACEOF
5185 if ac_fn_c_try_cpp "$LINENO"; then :
5186
5187 else
5188   # Broken: fails on valid input.
5189 continue
5190 fi
5191 rm -f conftest.err conftest.$ac_ext
5192
5193   # OK, works on sane cases.  Now check whether nonexistent headers
5194   # can be detected and how.
5195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5196 /* end confdefs.h.  */
5197 #include <ac_nonexistent.h>
5198 _ACEOF
5199 if ac_fn_c_try_cpp "$LINENO"; then :
5200   # Broken: success on invalid input.
5201 continue
5202 else
5203   # Passes both tests.
5204 ac_preproc_ok=:
5205 break
5206 fi
5207 rm -f conftest.err conftest.$ac_ext
5208
5209 done
5210 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5211 rm -f conftest.err conftest.$ac_ext
5212 if $ac_preproc_ok; then :
5213   break
5214 fi
5215
5216     done
5217     ac_cv_prog_CPP=$CPP
5218
5219 fi
5220   CPP=$ac_cv_prog_CPP
5221 else
5222   ac_cv_prog_CPP=$CPP
5223 fi
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5225 $as_echo "$CPP" >&6; }
5226 ac_preproc_ok=false
5227 for ac_c_preproc_warn_flag in '' yes
5228 do
5229   # Use a header file that comes with gcc, so configuring glibc
5230   # with a fresh cross-compiler works.
5231   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5232   # <limits.h> exists even on freestanding compilers.
5233   # On the NeXT, cc -E runs the code through the compiler's parser,
5234   # not just through cpp. "Syntax error" is here to catch this case.
5235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5236 /* end confdefs.h.  */
5237 #ifdef __STDC__
5238 # include <limits.h>
5239 #else
5240 # include <assert.h>
5241 #endif
5242                      Syntax error
5243 _ACEOF
5244 if ac_fn_c_try_cpp "$LINENO"; then :
5245
5246 else
5247   # Broken: fails on valid input.
5248 continue
5249 fi
5250 rm -f conftest.err conftest.$ac_ext
5251
5252   # OK, works on sane cases.  Now check whether nonexistent headers
5253   # can be detected and how.
5254   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5255 /* end confdefs.h.  */
5256 #include <ac_nonexistent.h>
5257 _ACEOF
5258 if ac_fn_c_try_cpp "$LINENO"; then :
5259   # Broken: success on invalid input.
5260 continue
5261 else
5262   # Passes both tests.
5263 ac_preproc_ok=:
5264 break
5265 fi
5266 rm -f conftest.err conftest.$ac_ext
5267
5268 done
5269 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5270 rm -f conftest.err conftest.$ac_ext
5271 if $ac_preproc_ok; then :
5272
5273 else
5274   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5275 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5276 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5277 See \`config.log' for more details" "$LINENO" 5; }
5278 fi
5279
5280 ac_ext=c
5281 ac_cpp='$CPP $CPPFLAGS'
5282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5285
5286
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5288 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5289 if test "${ac_cv_path_GREP+set}" = set; then :
5290   $as_echo_n "(cached) " >&6
5291 else
5292   if test -z "$GREP"; then
5293   ac_path_GREP_found=false
5294   # Loop through the user's path and test for each of PROGNAME-LIST
5295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5296 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5297 do
5298   IFS=$as_save_IFS
5299   test -z "$as_dir" && as_dir=.
5300     for ac_prog in grep ggrep; do
5301     for ac_exec_ext in '' $ac_executable_extensions; do
5302       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5303       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5304 # Check for GNU ac_path_GREP and select it if it is found.
5305   # Check for GNU $ac_path_GREP
5306 case `"$ac_path_GREP" --version 2>&1` in
5307 *GNU*)
5308   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5309 *)
5310   ac_count=0
5311   $as_echo_n 0123456789 >"conftest.in"
5312   while :
5313   do
5314     cat "conftest.in" "conftest.in" >"conftest.tmp"
5315     mv "conftest.tmp" "conftest.in"
5316     cp "conftest.in" "conftest.nl"
5317     $as_echo 'GREP' >> "conftest.nl"
5318     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5319     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5320     as_fn_arith $ac_count + 1 && ac_count=$as_val
5321     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5322       # Best one so far, save it but keep looking for a better one
5323       ac_cv_path_GREP="$ac_path_GREP"
5324       ac_path_GREP_max=$ac_count
5325     fi
5326     # 10*(2^10) chars as input seems more than enough
5327     test $ac_count -gt 10 && break
5328   done
5329   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5330 esac
5331
5332       $ac_path_GREP_found && break 3
5333     done
5334   done
5335   done
5336 IFS=$as_save_IFS
5337   if test -z "$ac_cv_path_GREP"; then
5338     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5339   fi
5340 else
5341   ac_cv_path_GREP=$GREP
5342 fi
5343
5344 fi
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5346 $as_echo "$ac_cv_path_GREP" >&6; }
5347  GREP="$ac_cv_path_GREP"
5348
5349
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5351 $as_echo_n "checking for egrep... " >&6; }
5352 if test "${ac_cv_path_EGREP+set}" = set; then :
5353   $as_echo_n "(cached) " >&6
5354 else
5355   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5356    then ac_cv_path_EGREP="$GREP -E"
5357    else
5358      if test -z "$EGREP"; then
5359   ac_path_EGREP_found=false
5360   # Loop through the user's path and test for each of PROGNAME-LIST
5361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5362 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5363 do
5364   IFS=$as_save_IFS
5365   test -z "$as_dir" && as_dir=.
5366     for ac_prog in egrep; do
5367     for ac_exec_ext in '' $ac_executable_extensions; do
5368       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5369       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5370 # Check for GNU ac_path_EGREP and select it if it is found.
5371   # Check for GNU $ac_path_EGREP
5372 case `"$ac_path_EGREP" --version 2>&1` in
5373 *GNU*)
5374   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5375 *)
5376   ac_count=0
5377   $as_echo_n 0123456789 >"conftest.in"
5378   while :
5379   do
5380     cat "conftest.in" "conftest.in" >"conftest.tmp"
5381     mv "conftest.tmp" "conftest.in"
5382     cp "conftest.in" "conftest.nl"
5383     $as_echo 'EGREP' >> "conftest.nl"
5384     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5385     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5386     as_fn_arith $ac_count + 1 && ac_count=$as_val
5387     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5388       # Best one so far, save it but keep looking for a better one
5389       ac_cv_path_EGREP="$ac_path_EGREP"
5390       ac_path_EGREP_max=$ac_count
5391     fi
5392     # 10*(2^10) chars as input seems more than enough
5393     test $ac_count -gt 10 && break
5394   done
5395   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5396 esac
5397
5398       $ac_path_EGREP_found && break 3
5399     done
5400   done
5401   done
5402 IFS=$as_save_IFS
5403   if test -z "$ac_cv_path_EGREP"; then
5404     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5405   fi
5406 else
5407   ac_cv_path_EGREP=$EGREP
5408 fi
5409
5410    fi
5411 fi
5412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5413 $as_echo "$ac_cv_path_EGREP" >&6; }
5414  EGREP="$ac_cv_path_EGREP"
5415
5416
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5418 $as_echo_n "checking for ANSI C header files... " >&6; }
5419 if test "${ac_cv_header_stdc+set}" = set; then :
5420   $as_echo_n "(cached) " >&6
5421 else
5422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5423 /* end confdefs.h.  */
5424 #include <stdlib.h>
5425 #include <stdarg.h>
5426 #include <string.h>
5427 #include <float.h>
5428
5429 int
5430 main ()
5431 {
5432
5433   ;
5434   return 0;
5435 }
5436 _ACEOF
5437 if ac_fn_c_try_compile "$LINENO"; then :
5438   ac_cv_header_stdc=yes
5439 else
5440   ac_cv_header_stdc=no
5441 fi
5442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443
5444 if test $ac_cv_header_stdc = yes; then
5445   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447 /* end confdefs.h.  */
5448 #include <string.h>
5449
5450 _ACEOF
5451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5452   $EGREP "memchr" >/dev/null 2>&1; then :
5453
5454 else
5455   ac_cv_header_stdc=no
5456 fi
5457 rm -f conftest*
5458
5459 fi
5460
5461 if test $ac_cv_header_stdc = yes; then
5462   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464 /* end confdefs.h.  */
5465 #include <stdlib.h>
5466
5467 _ACEOF
5468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469   $EGREP "free" >/dev/null 2>&1; then :
5470
5471 else
5472   ac_cv_header_stdc=no
5473 fi
5474 rm -f conftest*
5475
5476 fi
5477
5478 if test $ac_cv_header_stdc = yes; then
5479   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5480   if test "$cross_compiling" = yes; then :
5481   :
5482 else
5483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484 /* end confdefs.h.  */
5485 #include <ctype.h>
5486 #include <stdlib.h>
5487 #if ((' ' & 0x0FF) == 0x020)
5488 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5489 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5490 #else
5491 # define ISLOWER(c) \
5492                    (('a' <= (c) && (c) <= 'i') \
5493                      || ('j' <= (c) && (c) <= 'r') \
5494                      || ('s' <= (c) && (c) <= 'z'))
5495 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5496 #endif
5497
5498 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5499 int
5500 main ()
5501 {
5502   int i;
5503   for (i = 0; i < 256; i++)
5504     if (XOR (islower (i), ISLOWER (i))
5505         || toupper (i) != TOUPPER (i))
5506       return 2;
5507   return 0;
5508 }
5509 _ACEOF
5510 if ac_fn_c_try_run "$LINENO"; then :
5511
5512 else
5513   ac_cv_header_stdc=no
5514 fi
5515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5516   conftest.$ac_objext conftest.beam conftest.$ac_ext
5517 fi
5518
5519 fi
5520 fi
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5522 $as_echo "$ac_cv_header_stdc" >&6; }
5523 if test $ac_cv_header_stdc = yes; then
5524
5525 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5526
5527 fi
5528
5529 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5530 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5531                   inttypes.h stdint.h unistd.h
5532 do :
5533   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5534 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5535 "
5536 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5537   cat >>confdefs.h <<_ACEOF
5538 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5539 _ACEOF
5540
5541 fi
5542
5543 done
5544
5545
5546
5547
5548
5549   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5550 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5551   MINIX=yes
5552 else
5553   MINIX=
5554 fi
5555
5556
5557   if test "$MINIX" = yes; then
5558
5559 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5560
5561
5562 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5563
5564
5565 $as_echo "#define _MINIX 1" >>confdefs.h
5566
5567   fi
5568
5569         case "$host_os" in
5570     hpux*)
5571
5572 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5573
5574       ;;
5575   esac
5576
5577
5578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5579 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5580 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5581   $as_echo_n "(cached) " >&6
5582 else
5583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584 /* end confdefs.h.  */
5585
5586 #         define __EXTENSIONS__ 1
5587           $ac_includes_default
5588 int
5589 main ()
5590 {
5591
5592   ;
5593   return 0;
5594 }
5595 _ACEOF
5596 if ac_fn_c_try_compile "$LINENO"; then :
5597   ac_cv_safe_to_define___extensions__=yes
5598 else
5599   ac_cv_safe_to_define___extensions__=no
5600 fi
5601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5602 fi
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5604 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5605   test $ac_cv_safe_to_define___extensions__ = yes &&
5606     $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5607
5608   $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5609
5610   $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5611
5612   $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5613
5614   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5615
5616
5617
5618
5619
5620
5621
5622
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5624 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5625 if test "${ac_cv_sys_largefile_source+set}" = set; then :
5626   $as_echo_n "(cached) " >&6
5627 else
5628   while :; do
5629   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630 /* end confdefs.h.  */
5631 #include <sys/types.h> /* for off_t */
5632      #include <stdio.h>
5633 int
5634 main ()
5635 {
5636 int (*fp) (FILE *, off_t, int) = fseeko;
5637      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5638   ;
5639   return 0;
5640 }
5641 _ACEOF
5642 if ac_fn_c_try_link "$LINENO"; then :
5643   ac_cv_sys_largefile_source=no; break
5644 fi
5645 rm -f core conftest.err conftest.$ac_objext \
5646     conftest$ac_exeext conftest.$ac_ext
5647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648 /* end confdefs.h.  */
5649 #define _LARGEFILE_SOURCE 1
5650 #include <sys/types.h> /* for off_t */
5651      #include <stdio.h>
5652 int
5653 main ()
5654 {
5655 int (*fp) (FILE *, off_t, int) = fseeko;
5656      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5657   ;
5658   return 0;
5659 }
5660 _ACEOF
5661 if ac_fn_c_try_link "$LINENO"; then :
5662   ac_cv_sys_largefile_source=1; break
5663 fi
5664 rm -f core conftest.err conftest.$ac_objext \
5665     conftest$ac_exeext conftest.$ac_ext
5666   ac_cv_sys_largefile_source=unknown
5667   break
5668 done
5669 fi
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
5671 $as_echo "$ac_cv_sys_largefile_source" >&6; }
5672 case $ac_cv_sys_largefile_source in #(
5673   no | unknown) ;;
5674   *)
5675 cat >>confdefs.h <<_ACEOF
5676 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5677 _ACEOF
5678 ;;
5679 esac
5680 rm -rf conftest*
5681
5682 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5683 # in glibc 2.1.3, but that breaks too many other things.
5684 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5685 if test $ac_cv_sys_largefile_source != unknown; then
5686
5687 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
5688
5689 fi
5690
5691
5692
5693
5694   # IEEE behaviour is the default on all CPUs except Alpha and SH
5695   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5696   # and the GCC 4.1.2 manual).
5697   case "$host_cpu" in
5698     alpha*)
5699       # On Alpha systems, a compiler option provides the behaviour.
5700       # See the ieee(3) manual page, also available at
5701       # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5702       if test -n "$GCC"; then
5703         # GCC has the option -mieee.
5704         CPPFLAGS="$CPPFLAGS -mieee"
5705       else
5706         # Compaq (ex-DEC) C has the option -ieee.
5707         CPPFLAGS="$CPPFLAGS -ieee"
5708       fi
5709       ;;
5710     sh*)
5711       if test -n "$GCC"; then
5712         # GCC has the option -mieee.
5713         CPPFLAGS="$CPPFLAGS -mieee"
5714       fi
5715       ;;
5716   esac
5717
5718    case $ac_cv_prog_cc_stdc in #(
5719   no) :
5720     ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5721   *) :
5722     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5723 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5724 if test "${ac_cv_prog_cc_c99+set}" = set; then :
5725   $as_echo_n "(cached) " >&6
5726 else
5727   ac_cv_prog_cc_c99=no
5728 ac_save_CC=$CC
5729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5730 /* end confdefs.h.  */
5731 #include <stdarg.h>
5732 #include <stdbool.h>
5733 #include <stdlib.h>
5734 #include <wchar.h>
5735 #include <stdio.h>
5736
5737 // Check varargs macros.  These examples are taken from C99 6.10.3.5.
5738 #define debug(...) fprintf (stderr, __VA_ARGS__)
5739 #define showlist(...) puts (#__VA_ARGS__)
5740 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5741 static void
5742 test_varargs_macros (void)
5743 {
5744   int x = 1234;
5745   int y = 5678;
5746   debug ("Flag");
5747   debug ("X = %d\n", x);
5748   showlist (The first, second, and third items.);
5749   report (x>y, "x is %d but y is %d", x, y);
5750 }
5751
5752 // Check long long types.
5753 #define BIG64 18446744073709551615ull
5754 #define BIG32 4294967295ul
5755 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5756 #if !BIG_OK
5757   your preprocessor is broken;
5758 #endif
5759 #if BIG_OK
5760 #else
5761   your preprocessor is broken;
5762 #endif
5763 static long long int bignum = -9223372036854775807LL;
5764 static unsigned long long int ubignum = BIG64;
5765
5766 struct incomplete_array
5767 {
5768   int datasize;
5769   double data[];
5770 };
5771
5772 struct named_init {
5773   int number;
5774   const wchar_t *name;
5775   double average;
5776 };
5777
5778 typedef const char *ccp;
5779
5780 static inline int
5781 test_restrict (ccp restrict text)
5782 {
5783   // See if C++-style comments work.
5784   // Iterate through items via the restricted pointer.
5785   // Also check for declarations in for loops.
5786   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5787     continue;
5788   return 0;
5789 }
5790
5791 // Check varargs and va_copy.
5792 static void
5793 test_varargs (const char *format, ...)
5794 {
5795   va_list args;
5796   va_start (args, format);
5797   va_list args_copy;
5798   va_copy (args_copy, args);
5799
5800   const char *str;
5801   int number;
5802   float fnumber;
5803
5804   while (*format)
5805     {
5806       switch (*format++)
5807         {
5808         case 's': // string
5809           str = va_arg (args_copy, const char *);
5810           break;
5811         case 'd': // int
5812           number = va_arg (args_copy, int);
5813           break;
5814         case 'f': // float
5815           fnumber = va_arg (args_copy, double);
5816           break;
5817         default:
5818           break;
5819         }
5820     }
5821   va_end (args_copy);
5822   va_end (args);
5823 }
5824
5825 int
5826 main ()
5827 {
5828
5829   // Check bool.
5830   _Bool success = false;
5831
5832   // Check restrict.
5833   if (test_restrict ("String literal") == 0)
5834     success = true;
5835   char *restrict newvar = "Another string";
5836
5837   // Check varargs.
5838   test_varargs ("s, d' f .", "string", 65, 34.234);
5839   test_varargs_macros ();
5840
5841   // Check flexible array members.
5842   struct incomplete_array *ia =
5843     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5844   ia->datasize = 10;
5845   for (int i = 0; i < ia->datasize; ++i)
5846     ia->data[i] = i * 1.234;
5847
5848   // Check named initializers.
5849   struct named_init ni = {
5850     .number = 34,
5851     .name = L"Test wide string",
5852     .average = 543.34343,
5853   };
5854
5855   ni.number = 58;
5856
5857   int dynamic_array[ni.number];
5858   dynamic_array[ni.number - 1] = 543;
5859
5860   // work around unused variable warnings
5861   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5862           || dynamic_array[ni.number - 1] != 543);
5863
5864   ;
5865   return 0;
5866 }
5867 _ACEOF
5868 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
5869 do
5870   CC="$ac_save_CC $ac_arg"
5871   if ac_fn_c_try_compile "$LINENO"; then :
5872   ac_cv_prog_cc_c99=$ac_arg
5873 fi
5874 rm -f core conftest.err conftest.$ac_objext
5875   test "x$ac_cv_prog_cc_c99" != "xno" && break
5876 done
5877 rm -f conftest.$ac_ext
5878 CC=$ac_save_CC
5879
5880 fi
5881 # AC_CACHE_VAL
5882 case "x$ac_cv_prog_cc_c99" in
5883   x)
5884     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5885 $as_echo "none needed" >&6; } ;;
5886   xno)
5887     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5888 $as_echo "unsupported" >&6; } ;;
5889   *)
5890     CC="$CC $ac_cv_prog_cc_c99"
5891     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5892 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5893 esac
5894 if test "x$ac_cv_prog_cc_c99" != xno; then :
5895   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5896 else
5897   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5898 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5899 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5900   $as_echo_n "(cached) " >&6
5901 else
5902   ac_cv_prog_cc_c89=no
5903 ac_save_CC=$CC
5904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5905 /* end confdefs.h.  */
5906 #include <stdarg.h>
5907 #include <stdio.h>
5908 #include <sys/types.h>
5909 #include <sys/stat.h>
5910 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5911 struct buf { int x; };
5912 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5913 static char *e (p, i)
5914      char **p;
5915      int i;
5916 {
5917   return p[i];
5918 }
5919 static char *f (char * (*g) (char **, int), char **p, ...)
5920 {
5921   char *s;
5922   va_list v;
5923   va_start (v,p);
5924   s = g (p, va_arg (v,int));
5925   va_end (v);
5926   return s;
5927 }
5928
5929 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5930    function prototypes and stuff, but not '\xHH' hex character constants.
5931    These don't provoke an error unfortunately, instead are silently treated
5932    as 'x'.  The following induces an error, until -std is added to get
5933    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5934    array size at least.  It's necessary to write '\x00'==0 to get something
5935    that's true only with -std.  */
5936 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5937
5938 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5939    inside strings and character constants.  */
5940 #define FOO(x) 'x'
5941 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5942
5943 int test (int i, double x);
5944 struct s1 {int (*f) (int a);};
5945 struct s2 {int (*f) (double a);};
5946 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5947 int argc;
5948 char **argv;
5949 int
5950 main ()
5951 {
5952 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5953   ;
5954   return 0;
5955 }
5956 _ACEOF
5957 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5958         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5959 do
5960   CC="$ac_save_CC $ac_arg"
5961   if ac_fn_c_try_compile "$LINENO"; then :
5962   ac_cv_prog_cc_c89=$ac_arg
5963 fi
5964 rm -f core conftest.err conftest.$ac_objext
5965   test "x$ac_cv_prog_cc_c89" != "xno" && break
5966 done
5967 rm -f conftest.$ac_ext
5968 CC=$ac_save_CC
5969
5970 fi
5971 # AC_CACHE_VAL
5972 case "x$ac_cv_prog_cc_c89" in
5973   x)
5974     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5975 $as_echo "none needed" >&6; } ;;
5976   xno)
5977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5978 $as_echo "unsupported" >&6; } ;;
5979   *)
5980     CC="$CC $ac_cv_prog_cc_c89"
5981     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5982 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5983 esac
5984 if test "x$ac_cv_prog_cc_c89" != xno; then :
5985   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5986 else
5987   ac_cv_prog_cc_stdc=no
5988 fi
5989
5990 fi
5991  ;;
5992 esac
5993   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5994 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5995   if test "${ac_cv_prog_cc_stdc+set}" = set; then :
5996   $as_echo_n "(cached) " >&6
5997 fi
5998
5999   case $ac_cv_prog_cc_stdc in #(
6000   no) :
6001     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6002 $as_echo "unsupported" >&6; } ;; #(
6003   '') :
6004     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6005 $as_echo "none needed" >&6; } ;; #(
6006   *) :
6007     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6008 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6009 esac
6010
6011
6012
6013
6014
6015
6016   # Check whether --enable-threads was given.
6017 if test "${enable_threads+set}" = set; then :
6018   enableval=$enable_threads; gl_use_threads=$enableval
6019 else
6020   if test -n "$gl_use_threads_default"; then
6021        gl_use_threads="$gl_use_threads_default"
6022      else
6023        case "$host_os" in
6024                                                                osf*) gl_use_threads=no ;;
6025          cygwin*)
6026                case `uname -r` in
6027                  1.[0-5].*) gl_use_threads=no ;;
6028                  *)         gl_use_threads=yes ;;
6029                esac
6030                ;;
6031          *)    gl_use_threads=yes ;;
6032        esac
6033      fi
6034
6035 fi
6036
6037   if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6038     # For using <pthread.h>:
6039     case "$host_os" in
6040       osf*)
6041         # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6042         # groks <pthread.h>. cc also understands the flag -pthread, but
6043         # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6044         # 2. putting a flag into CPPFLAGS that has an effect on the linker
6045         # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6046         # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6047         CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6048         ;;
6049     esac
6050     # Some systems optimize for single-threaded programs by default, and
6051     # need special flags to disable these optimizations. For example, the
6052     # definition of 'errno' in <errno.h>.
6053     case "$host_os" in
6054       aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6055       solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6056     esac
6057   fi
6058
6059
6060
6061
6062   # Code from module alloca-opt:
6063   # Code from module alloca-opt-tests:
6064   # Code from module announce-gen:
6065   # Code from module ansi-c++-opt:
6066   # Code from module arg-nonnull:
6067   # Code from module array-list:
6068   # Code from module array-list-tests:
6069   # Code from module array-oset:
6070   # Code from module array-oset-tests:
6071   # Code from module assert:
6072   # Code from module autobuild:
6073
6074
6075
6076
6077   if test -z "$AB_PACKAGE"; then
6078     AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
6079   fi
6080   { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
6081 $as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
6082
6083   if test -z "$AB_VERSION"; then
6084     AB_VERSION=${PACKAGE_VERSION:-$VERSION}
6085   fi
6086   { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
6087 $as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
6088
6089   hostname=`hostname`
6090   if test "$hostname"; then
6091     { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
6092 $as_echo "$as_me: autobuild hostname... $hostname" >&6;}
6093   fi
6094
6095
6096
6097   date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
6098   if test "$?" != 0; then
6099     date=`date`
6100   fi
6101   if test "$date"; then
6102     { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
6103 $as_echo "$as_me: autobuild timestamp... $date" >&6;}
6104   fi
6105
6106   # Code from module avltree-oset:
6107   # Code from module avltree-oset-tests:
6108   # Code from module binary-io:
6109   # Code from module binary-io-tests:
6110   # Code from module btowc:
6111   # Code from module btowc-tests:
6112   # Code from module c++defs:
6113   # Code from module c-ctype:
6114   # Code from module c-ctype-tests:
6115   # Code from module c-stack:
6116   # Code from module c-stack-tests:
6117   # Code from module c-strcase:
6118   # Code from module c-strcase-tests:
6119   # Code from module canonicalize-lgpl:
6120   # Code from module canonicalize-lgpl-tests:
6121   # Code from module clean-temp:
6122   # Code from module cloexec:
6123   # Code from module cloexec-tests:
6124   # Code from module close:
6125   # Code from module close-hook:
6126   # Code from module close-stream:
6127   # Code from module closein:
6128   # Code from module closein-tests:
6129   # Code from module closeout:
6130   # Code from module config-h:
6131   # Code from module configmake:
6132   # Code from module dirname:
6133   # Code from module dirname-lgpl:
6134   # Code from module dirname-tests:
6135   # Code from module dosname:
6136   # Code from module double-slash-root:
6137   # Code from module dup2:
6138   # Code from module dup2-tests:
6139   # Code from module environ:
6140   # Code from module environ-tests:
6141   # Code from module errno:
6142   # Code from module errno-tests:
6143   # Code from module error:
6144   # Code from module execute:
6145   # Code from module exitfail:
6146   # Code from module extensions:
6147
6148   # Code from module fatal-signal:
6149   # Code from module fclose:
6150   # Code from module fcntl:
6151   # Code from module fcntl-h:
6152   # Code from module fcntl-h-c++-tests:
6153   # Code from module fcntl-h-tests:
6154   # Code from module fcntl-tests:
6155   # Code from module fd-safer-flag:
6156   # Code from module fdl-1.3:
6157   # Code from module fflush:
6158
6159   # Code from module fflush-tests:
6160   # Code from module filenamecat:
6161   # Code from module filenamecat-lgpl:
6162   # Code from module filenamecat-tests:
6163   # Code from module float:
6164   # Code from module fopen:
6165   # Code from module fopen-safer:
6166   # Code from module fopen-safer-tests:
6167   # Code from module fopen-tests:
6168   # Code from module fpending:
6169   # Code from module fpending-tests:
6170   # Code from module fpieee:
6171
6172   # Code from module fpucw:
6173   # Code from module fpurge:
6174   # Code from module fpurge-tests:
6175   # Code from module freadahead:
6176   # Code from module freadahead-tests:
6177   # Code from module freading:
6178   # Code from module freading-tests:
6179   # Code from module frexp-nolibm:
6180   # Code from module frexp-nolibm-tests:
6181   # Code from module frexpl-nolibm:
6182   # Code from module frexpl-nolibm-tests:
6183   # Code from module fseeko:
6184
6185   # Code from module fseeko-tests:
6186   # Code from module ftell:
6187   # Code from module ftell-tests:
6188   # Code from module ftello:
6189
6190   # Code from module ftello-tests:
6191   # Code from module gendocs:
6192   # Code from module getdtablesize:
6193   # Code from module getdtablesize-tests:
6194   # Code from module getopt-gnu:
6195   # Code from module getopt-posix:
6196   # Code from module getopt-posix-tests:
6197   # Code from module getpagesize:
6198   # Code from module gettext-h:
6199   # Code from module gettimeofday:
6200   # Code from module gettimeofday-tests:
6201   # Code from module git-version-gen:
6202   # Code from module gnu-web-doc-update:
6203   # Code from module gnumakefile:
6204   # Code from module gnupload:
6205   # Code from module gpl-3.0:
6206   # Code from module havelib:
6207   # Code from module ignore-value:
6208   # Code from module ignore-value-tests:
6209   # Code from module include_next:
6210   # Code from module inline:
6211   # Code from module intprops:
6212   # Code from module isnand-nolibm:
6213   # Code from module isnand-nolibm-tests:
6214   # Code from module isnanf-nolibm:
6215   # Code from module isnanf-nolibm-tests:
6216   # Code from module isnanl-nolibm:
6217   # Code from module isnanl-nolibm-tests:
6218   # Code from module langinfo:
6219   # Code from module langinfo-c++-tests:
6220   # Code from module langinfo-tests:
6221   # Code from module libsigsegv:
6222   # Code from module link:
6223   # Code from module link-tests:
6224   # Code from module linkedhash-list:
6225   # Code from module linkedhash-list-tests:
6226   # Code from module list:
6227   # Code from module localcharset:
6228   # Code from module locale:
6229   # Code from module locale-c++-tests:
6230   # Code from module locale-tests:
6231   # Code from module localename:
6232   # Code from module localename-tests:
6233   # Code from module lock:
6234   # Code from module lseek:
6235   # Code from module lseek-tests:
6236   # Code from module lstat:
6237   # Code from module lstat-tests:
6238   # Code from module maintainer-makefile:
6239   # Code from module malloc-gnu:
6240   # Code from module malloc-gnu-tests:
6241   # Code from module malloc-posix:
6242   # Code from module malloca:
6243   # Code from module malloca-tests:
6244   # Code from module manywarnings:
6245   # Code from module math:
6246   # Code from module math-c++-tests:
6247   # Code from module math-tests:
6248   # Code from module mbrtowc:
6249   # Code from module mbrtowc-tests:
6250   # Code from module mbsinit:
6251   # Code from module mbsinit-tests:
6252   # Code from module mbtowc:
6253   # Code from module memchr:
6254   # Code from module memchr-tests:
6255   # Code from module memchr2:
6256   # Code from module memchr2-tests:
6257   # Code from module mkdtemp:
6258   # Code from module mkstemp:
6259   # Code from module multiarch:
6260   # Code from module nl_langinfo:
6261   # Code from module nl_langinfo-tests:
6262   # Code from module nocrash:
6263   # Code from module obstack:
6264   # Code from module open:
6265   # Code from module open-tests:
6266   # Code from module oset:
6267   # Code from module pathmax:
6268   # Code from module pipe2:
6269   # Code from module pipe2-safer:
6270   # Code from module pipe2-tests:
6271   # Code from module posix_spawn-internal:
6272   # Code from module posix_spawn_file_actions_addclose:
6273   # Code from module posix_spawn_file_actions_adddup2:
6274   # Code from module posix_spawn_file_actions_addopen:
6275   # Code from module posix_spawn_file_actions_destroy:
6276   # Code from module posix_spawn_file_actions_init:
6277   # Code from module posix_spawnattr_destroy:
6278   # Code from module posix_spawnattr_init:
6279   # Code from module posix_spawnattr_setflags:
6280   # Code from module posix_spawnattr_setsigmask:
6281   # Code from module posix_spawnp:
6282   # Code from module posix_spawnp-tests:
6283   # Code from module printf-frexp:
6284   # Code from module printf-frexp-tests:
6285   # Code from module printf-frexpl:
6286   # Code from module printf-frexpl-tests:
6287   # Code from module printf-safe:
6288   # Code from module progname:
6289   # Code from module putenv:
6290   # Code from module quotearg:
6291   # Code from module quotearg-simple:
6292   # Code from module quotearg-simple-tests:
6293   # Code from module rawmemchr:
6294   # Code from module rawmemchr-tests:
6295   # Code from module readlink:
6296   # Code from module readlink-tests:
6297   # Code from module regex:
6298   # Code from module rename:
6299   # Code from module rename-tests:
6300   # Code from module rmdir:
6301   # Code from module rmdir-tests:
6302   # Code from module same-inode:
6303   # Code from module sched:
6304   # Code from module sched-tests:
6305   # Code from module setenv:
6306   # Code from module setenv-tests:
6307   # Code from module setlocale:
6308   # Code from module setlocale-tests:
6309   # Code from module sigaction:
6310   # Code from module sigaction-tests:
6311   # Code from module signal:
6312   # Code from module signal-c++-tests:
6313   # Code from module signal-tests:
6314   # Code from module signbit:
6315   # Code from module signbit-tests:
6316   # Code from module sigprocmask:
6317   # Code from module size_max:
6318   # Code from module snprintf:
6319   # Code from module snprintf-tests:
6320   # Code from module spawn:
6321   # Code from module spawn-c++-tests:
6322   # Code from module spawn-pipe:
6323   # Code from module spawn-pipe-tests:
6324   # Code from module spawn-tests:
6325   # Code from module ssize_t:
6326   # Code from module stat:
6327   # Code from module stat-tests:
6328   # Code from module stdarg:
6329
6330   # Code from module stdbool:
6331   # Code from module stdbool-tests:
6332   # Code from module stddef:
6333   # Code from module stddef-tests:
6334   # Code from module stdint:
6335   # Code from module stdint-tests:
6336   # Code from module stdio:
6337   # Code from module stdio-c++-tests:
6338   # Code from module stdio-tests:
6339   # Code from module stdlib:
6340   # Code from module stdlib-c++-tests:
6341   # Code from module stdlib-safer:
6342   # Code from module stdlib-tests:
6343   # Code from module strchrnul:
6344   # Code from module strchrnul-tests:
6345   # Code from module strdup-posix:
6346   # Code from module streq:
6347   # Code from module strerror:
6348   # Code from module strerror-tests:
6349   # Code from module string:
6350   # Code from module string-c++-tests:
6351   # Code from module string-tests:
6352   # Code from module strndup:
6353   # Code from module strnlen:
6354   # Code from module strnlen-tests:
6355   # Code from module strsignal:
6356   # Code from module strsignal-tests:
6357   # Code from module strstr:
6358   # Code from module strstr-simple:
6359   # Code from module strstr-tests:
6360   # Code from module strtod:
6361   # Code from module strtod-tests:
6362   # Code from module strtol:
6363   # Code from module symlink:
6364   # Code from module symlink-tests:
6365   # Code from module sys_stat:
6366   # Code from module sys_stat-c++-tests:
6367   # Code from module sys_stat-tests:
6368   # Code from module sys_time:
6369   # Code from module sys_time-c++-tests:
6370   # Code from module sys_time-tests:
6371   # Code from module sys_wait:
6372   # Code from module sys_wait-c++-tests:
6373   # Code from module sys_wait-tests:
6374   # Code from module tempname:
6375   # Code from module threadlib:
6376
6377
6378
6379   # Code from module time:
6380   # Code from module time-c++-tests:
6381   # Code from module time-tests:
6382   # Code from module tls:
6383   # Code from module tmpdir:
6384   # Code from module unistd:
6385   # Code from module unistd-c++-tests:
6386   # Code from module unistd-safer:
6387   # Code from module unistd-safer-tests:
6388   # Code from module unistd-tests:
6389   # Code from module unlocked-io:
6390   # Code from module unsetenv:
6391   # Code from module unsetenv-tests:
6392   # Code from module update-copyright:
6393   # Code from module update-copyright-tests:
6394   # Code from module useless-if-before-free:
6395   # Code from module vasnprintf:
6396   # Code from module vasnprintf-tests:
6397   # Code from module vasprintf:
6398   # Code from module vasprintf-posix:
6399   # Code from module vasprintf-posix-tests:
6400   # Code from module vasprintf-tests:
6401   # Code from module vc-list-files:
6402   # Code from module vc-list-files-tests:
6403   # Code from module verify:
6404   # Code from module verify-tests:
6405   # Code from module verror:
6406   # Code from module version-etc:
6407   # Code from module version-etc-fsf:
6408   # Code from module version-etc-tests:
6409   # Code from module wait-process:
6410   # Code from module waitpid:
6411   # Code from module warn-on-use:
6412   # Code from module warnings:
6413   # Code from module wchar:
6414   # Code from module wchar-c++-tests:
6415   # Code from module wchar-tests:
6416   # Code from module wcrtomb:
6417   # Code from module wcrtomb-tests:
6418   # Code from module wctob:
6419   # Code from module wctomb:
6420   # Code from module wctype-h:
6421   # Code from module wctype-h-c++-tests:
6422   # Code from module wctype-h-tests:
6423   # Code from module xalloc:
6424   # Code from module xalloc-die:
6425   # Code from module xalloc-die-tests:
6426   # Code from module xlist:
6427   # Code from module xmalloca:
6428   # Code from module xoset:
6429   # Code from module xprintf:
6430   # Code from module xsize:
6431   # Code from module xstrndup:
6432   # Code from module xvasprintf:
6433   # Code from module xvasprintf-posix:
6434   # Code from module xvasprintf-tests:
6435
6436
6437 # Maintainer note - comment this line out if you plan to rerun
6438 # GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
6439 # Leave it uncommented for normal releases, for faster ./configure.
6440
6441
6442
6443
6444 # M4 is single-threaded; so we can optimize gnulib code by using this:
6445
6446
6447
6448
6449 # Check whether --enable-gcc-warnings was given.
6450 if test "${enable_gcc_warnings+set}" = set; then :
6451   enableval=$enable_gcc_warnings; case $enableval in
6452      yes|no) ;;
6453      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
6454    esac
6455    gl_gcc_warnings=$enableval
6456 else
6457   gl_gcc_warnings=no
6458
6459 fi
6460
6461
6462 if test "$gl_gcc_warnings" = yes; then
6463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
6464 $as_echo_n "checking whether compiler handles -Werror... " >&6; }
6465 if test "${gl_cv_warn__Werror+set}" = set; then :
6466   $as_echo_n "(cached) " >&6
6467 else
6468
6469   save_CPPFLAGS="$CPPFLAGS"
6470   CPPFLAGS="${CPPFLAGS} -Werror"
6471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472 /* end confdefs.h.  */
6473
6474 int
6475 main ()
6476 {
6477
6478   ;
6479   return 0;
6480 }
6481 _ACEOF
6482 if ac_fn_c_try_cpp "$LINENO"; then :
6483   gl_cv_warn__Werror=yes
6484 else
6485   gl_cv_warn__Werror=no
6486 fi
6487 rm -f conftest.err conftest.$ac_ext
6488   CPPFLAGS="$save_CPPFLAGS"
6489
6490 fi
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
6492 $as_echo "$gl_cv_warn__Werror" >&6; }
6493 if test "x$gl_cv_warn__Werror" = x""yes; then :
6494   as_fn_append WERROR_CFLAGS " -Werror"
6495 fi
6496
6497
6498
6499   nw=
6500   nw="$nw -Waggregate-return"       # C90 is anachronistic
6501   nw="$nw -Wlong-long"              # C90 is anachronistic
6502   nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
6503   nw="$nw -Wtraditional"            # Warns on #elif which we use often
6504   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
6505   nw="$nw -Wpadded"                 # Our structs are not packed
6506   nw="$nw -Wredundant-decls"        # Gnulib has multiple decls
6507   nw="$nw -Wformat-nonliteral"      # Needed in builtin.c
6508   nw="$nw -Wunreachable-code"       # Needed in output.c
6509   nw="$nw -Wconversion"             # Too many warnings for now
6510   nw="$nw -Wsign-conversion"        # Too many warnings for now
6511   nw="$nw -Wtraditional-conversion" # Too many warnings for now
6512   nw="$nw -Wcast-qual"              # Too many warnings for now
6513   nw="$nw -Wswitch-enum"            # Too many warnings for now
6514   # This, $nw, is the list of warnings we disable.
6515
6516
6517  gl_manywarn_set=
6518  for gl_manywarn_item in \
6519    -Wall \
6520    -W \
6521    -Wformat-y2k \
6522    -Wformat-nonliteral \
6523    -Wformat-security \
6524    -Winit-self \
6525    -Wmissing-include-dirs \
6526    -Wswitch-default \
6527    -Wswitch-enum \
6528    -Wunused \
6529    -Wunknown-pragmas \
6530    -Wstrict-aliasing \
6531    -Wstrict-overflow \
6532    -Wsystem-headers \
6533    -Wfloat-equal \
6534    -Wtraditional \
6535    -Wtraditional-conversion \
6536    -Wdeclaration-after-statement \
6537    -Wundef \
6538    -Wshadow \
6539    -Wunsafe-loop-optimizations \
6540    -Wpointer-arith \
6541    -Wbad-function-cast \
6542    -Wc++-compat \
6543    -Wcast-qual \
6544    -Wcast-align \
6545    -Wwrite-strings \
6546    -Wconversion \
6547    -Wsign-conversion \
6548    -Wlogical-op \
6549    -Waggregate-return \
6550    -Wstrict-prototypes \
6551    -Wold-style-definition \
6552    -Wmissing-prototypes \
6553    -Wmissing-declarations \
6554    -Wmissing-noreturn \
6555    -Wmissing-format-attribute \
6556    -Wpacked \
6557    -Wpadded \
6558    -Wredundant-decls \
6559    -Wnested-externs \
6560    -Wunreachable-code \
6561    -Winline \
6562    -Winvalid-pch \
6563    -Wlong-long \
6564    -Wvla \
6565    -Wvolatile-register-var \
6566    -Wdisabled-optimization \
6567    -Wstack-protector \
6568    -Woverlength-strings \
6569    -Wbuiltin-macro-redefined \
6570    -Wmudflap \
6571    -Wpacked-bitfield-compat \
6572    -Wsync-nand \
6573   ; do
6574     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
6575   done
6576  # The following are not documented in the manual but are included in
6577  # output from gcc --help=warnings.
6578  for gl_manywarn_item in \
6579    -Wattributes \
6580    -Wcoverage-mismatch \
6581    -Wmultichar \
6582    -Wunused-macros \
6583   ; do
6584     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
6585   done
6586   ws=$gl_manywarn_set
6587
6588
6589   gl_warn_set=
6590   set x $ws; shift
6591   for gl_warn_item
6592   do
6593     case " $nw " in
6594       *" $gl_warn_item "*)
6595         ;;
6596       *)
6597         gl_warn_set="$gl_warn_set $gl_warn_item"
6598         ;;
6599     esac
6600   done
6601   ws=$gl_warn_set
6602
6603   for w in $ws; do
6604     as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
6606 $as_echo_n "checking whether compiler handles $w... " >&6; }
6607 if eval "test \"\${$as_gl_Warn+set}\"" = set; then :
6608   $as_echo_n "(cached) " >&6
6609 else
6610
6611   save_CPPFLAGS="$CPPFLAGS"
6612   CPPFLAGS="${CPPFLAGS} $w"
6613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6614 /* end confdefs.h.  */
6615
6616 int
6617 main ()
6618 {
6619
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 if ac_fn_c_try_cpp "$LINENO"; then :
6625   eval "$as_gl_Warn=yes"
6626 else
6627   eval "$as_gl_Warn=no"
6628 fi
6629 rm -f conftest.err conftest.$ac_ext
6630   CPPFLAGS="$save_CPPFLAGS"
6631
6632 fi
6633 eval ac_res=\$$as_gl_Warn
6634                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6635 $as_echo "$ac_res" >&6; }
6636 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
6637   as_fn_append WARN_CFLAGS " $w"
6638 fi
6639
6640   done
6641
6642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
6643 $as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
6644 if test "${gl_cv_warn__fdiagnostics_show_option+set}" = set; then :
6645   $as_echo_n "(cached) " >&6
6646 else
6647
6648   save_CPPFLAGS="$CPPFLAGS"
6649   CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
6650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6651 /* end confdefs.h.  */
6652
6653 int
6654 main ()
6655 {
6656
6657   ;
6658   return 0;
6659 }
6660 _ACEOF
6661 if ac_fn_c_try_cpp "$LINENO"; then :
6662   gl_cv_warn__fdiagnostics_show_option=yes
6663 else
6664   gl_cv_warn__fdiagnostics_show_option=no
6665 fi
6666 rm -f conftest.err conftest.$ac_ext
6667   CPPFLAGS="$save_CPPFLAGS"
6668
6669 fi
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
6671 $as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
6672 if test "x$gl_cv_warn__fdiagnostics_show_option" = x""yes; then :
6673   as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
6674 fi
6675
6676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
6677 $as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
6678 if test "${gl_cv_warn__funit_at_a_time+set}" = set; then :
6679   $as_echo_n "(cached) " >&6
6680 else
6681
6682   save_CPPFLAGS="$CPPFLAGS"
6683   CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
6684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h.  */
6686
6687 int
6688 main ()
6689 {
6690
6691   ;
6692   return 0;
6693 }
6694 _ACEOF
6695 if ac_fn_c_try_cpp "$LINENO"; then :
6696   gl_cv_warn__funit_at_a_time=yes
6697 else
6698   gl_cv_warn__funit_at_a_time=no
6699 fi
6700 rm -f conftest.err conftest.$ac_ext
6701   CPPFLAGS="$save_CPPFLAGS"
6702
6703 fi
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
6705 $as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
6706 if test "x$gl_cv_warn__funit_at_a_time" = x""yes; then :
6707   as_fn_append WARN_CFLAGS " -funit-at-a-time"
6708 fi
6709
6710
6711
6712
6713
6714 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
6715
6716 fi
6717
6718 # Tandem/NSK is broken - it has 'long long int' but not
6719 # 'unsigned long long int', which confuses assumptions made by gnulib.
6720 # Simply pretend that neither type exists if both do not work.
6721
6722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6723 $as_echo_n "checking for unsigned long long int... " >&6; }
6724 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
6725   $as_echo_n "(cached) " >&6
6726 else
6727   ac_cv_type_unsigned_long_long_int=yes
6728      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6729        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6730 /* end confdefs.h.  */
6731
6732   /* For now, do not test the preprocessor; as of 2007 there are too many
6733          implementations with broken preprocessors.  Perhaps this can
6734          be revisited in 2012.  In the meantime, code should not expect
6735          #if to work with literals wider than 32 bits.  */
6736       /* Test literals.  */
6737       long long int ll = 9223372036854775807ll;
6738       long long int nll = -9223372036854775807LL;
6739       unsigned long long int ull = 18446744073709551615ULL;
6740       /* Test constant expressions.   */
6741       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6742                      ? 1 : -1)];
6743       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6744                      ? 1 : -1)];
6745       int i = 63;
6746 int
6747 main ()
6748 {
6749 /* Test availability of runtime routines for shift and division.  */
6750       long long int llmax = 9223372036854775807ll;
6751       unsigned long long int ullmax = 18446744073709551615ull;
6752       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6753               | (llmax / ll) | (llmax % ll)
6754               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6755               | (ullmax / ull) | (ullmax % ull));
6756   ;
6757   return 0;
6758 }
6759
6760 _ACEOF
6761 if ac_fn_c_try_link "$LINENO"; then :
6762
6763 else
6764   ac_cv_type_unsigned_long_long_int=no
6765 fi
6766 rm -f core conftest.err conftest.$ac_objext \
6767     conftest$ac_exeext conftest.$ac_ext
6768      fi
6769 fi
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6771 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6772   if test $ac_cv_type_unsigned_long_long_int = yes; then
6773
6774 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6775
6776   fi
6777
6778
6779
6780   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
6781 $as_echo_n "checking for long long int... " >&6; }
6782 if test "${ac_cv_type_long_long_int+set}" = set; then :
6783   $as_echo_n "(cached) " >&6
6784 else
6785   ac_cv_type_long_long_int=yes
6786       if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6787         ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
6788         if test $ac_cv_type_long_long_int = yes; then
6789                                         if test "$cross_compiling" = yes; then :
6790   :
6791 else
6792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6793 /* end confdefs.h.  */
6794 #include <limits.h>
6795                  #ifndef LLONG_MAX
6796                  # define HALF \
6797                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
6798                  # define LLONG_MAX (HALF - 1 + HALF)
6799                  #endif
6800 int
6801 main ()
6802 {
6803 long long int n = 1;
6804                  int i;
6805                  for (i = 0; ; i++)
6806                    {
6807                      long long int m = n << i;
6808                      if (m >> i != n)
6809                        return 1;
6810                      if (LLONG_MAX / 2 < m)
6811                        break;
6812                    }
6813                  return 0;
6814   ;
6815   return 0;
6816 }
6817 _ACEOF
6818 if ac_fn_c_try_run "$LINENO"; then :
6819
6820 else
6821   ac_cv_type_long_long_int=no
6822 fi
6823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6824   conftest.$ac_objext conftest.beam conftest.$ac_ext
6825 fi
6826
6827         fi
6828       fi
6829 fi
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
6831 $as_echo "$ac_cv_type_long_long_int" >&6; }
6832   if test $ac_cv_type_long_long_int = yes; then
6833
6834 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
6835
6836   fi
6837
6838
6839   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6840 $as_echo_n "checking for unsigned long long int... " >&6; }
6841 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
6842   $as_echo_n "(cached) " >&6
6843 else
6844   ac_cv_type_unsigned_long_long_int=yes
6845      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6846        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6847 /* end confdefs.h.  */
6848
6849   /* For now, do not test the preprocessor; as of 2007 there are too many
6850          implementations with broken preprocessors.  Perhaps this can
6851          be revisited in 2012.  In the meantime, code should not expect
6852          #if to work with literals wider than 32 bits.  */
6853       /* Test literals.  */
6854       long long int ll = 9223372036854775807ll;
6855       long long int nll = -9223372036854775807LL;
6856       unsigned long long int ull = 18446744073709551615ULL;
6857       /* Test constant expressions.   */
6858       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6859                      ? 1 : -1)];
6860       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6861                      ? 1 : -1)];
6862       int i = 63;
6863 int
6864 main ()
6865 {
6866 /* Test availability of runtime routines for shift and division.  */
6867       long long int llmax = 9223372036854775807ll;
6868       unsigned long long int ullmax = 18446744073709551615ull;
6869       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6870               | (llmax / ll) | (llmax % ll)
6871               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6872               | (ullmax / ull) | (ullmax % ull));
6873   ;
6874   return 0;
6875 }
6876
6877 _ACEOF
6878 if ac_fn_c_try_link "$LINENO"; then :
6879
6880 else
6881   ac_cv_type_unsigned_long_long_int=no
6882 fi
6883 rm -f core conftest.err conftest.$ac_objext \
6884     conftest$ac_exeext conftest.$ac_ext
6885      fi
6886 fi
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6888 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6889   if test $ac_cv_type_unsigned_long_long_int = yes; then
6890
6891 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6892
6893   fi
6894
6895 if test $ac_cv_type_long_long_int:$ac_cv_type_unsigned_long_long_int = yes:no
6896 then
6897   ac_cv_type_long_long_int=no
6898
6899 $as_echo "#define HAVE_LONG_LONG_INT 0" >>confdefs.h
6900
6901 fi
6902
6903
6904
6905
6906
6907           LIBC_FATAL_STDERR_=1
6908   export LIBC_FATAL_STDERR_
6909
6910 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6911 # for constant arguments.  Useless!
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6913 $as_echo_n "checking for working alloca.h... " >&6; }
6914 if test "${ac_cv_working_alloca_h+set}" = set; then :
6915   $as_echo_n "(cached) " >&6
6916 else
6917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918 /* end confdefs.h.  */
6919 #include <alloca.h>
6920 int
6921 main ()
6922 {
6923 char *p = (char *) alloca (2 * sizeof (int));
6924                           if (p) return 0;
6925   ;
6926   return 0;
6927 }
6928 _ACEOF
6929 if ac_fn_c_try_link "$LINENO"; then :
6930   ac_cv_working_alloca_h=yes
6931 else
6932   ac_cv_working_alloca_h=no
6933 fi
6934 rm -f core conftest.err conftest.$ac_objext \
6935     conftest$ac_exeext conftest.$ac_ext
6936 fi
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6938 $as_echo "$ac_cv_working_alloca_h" >&6; }
6939 if test $ac_cv_working_alloca_h = yes; then
6940
6941 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6942
6943 fi
6944
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6946 $as_echo_n "checking for alloca... " >&6; }
6947 if test "${ac_cv_func_alloca_works+set}" = set; then :
6948   $as_echo_n "(cached) " >&6
6949 else
6950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h.  */
6952 #ifdef __GNUC__
6953 # define alloca __builtin_alloca
6954 #else
6955 # ifdef _MSC_VER
6956 #  include <malloc.h>
6957 #  define alloca _alloca
6958 # else
6959 #  ifdef HAVE_ALLOCA_H
6960 #   include <alloca.h>
6961 #  else
6962 #   ifdef _AIX
6963  #pragma alloca
6964 #   else
6965 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6966 char *alloca ();
6967 #    endif
6968 #   endif
6969 #  endif
6970 # endif
6971 #endif
6972
6973 int
6974 main ()
6975 {
6976 char *p = (char *) alloca (1);
6977                                     if (p) return 0;
6978   ;
6979   return 0;
6980 }
6981 _ACEOF
6982 if ac_fn_c_try_link "$LINENO"; then :
6983   ac_cv_func_alloca_works=yes
6984 else
6985   ac_cv_func_alloca_works=no
6986 fi
6987 rm -f core conftest.err conftest.$ac_objext \
6988     conftest$ac_exeext conftest.$ac_ext
6989 fi
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6991 $as_echo "$ac_cv_func_alloca_works" >&6; }
6992
6993 if test $ac_cv_func_alloca_works = yes; then
6994
6995 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6996
6997 else
6998   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6999 # that cause trouble.  Some versions do not even contain alloca or
7000 # contain a buggy version.  If you still want to use their alloca,
7001 # use ar to extract alloca.o from them instead of compiling alloca.c.
7002
7003
7004
7005
7006
7007 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7008
7009 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7010
7011
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7013 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7014 if test "${ac_cv_os_cray+set}" = set; then :
7015   $as_echo_n "(cached) " >&6
7016 else
7017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h.  */
7019 #if defined CRAY && ! defined CRAY2
7020 webecray
7021 #else
7022 wenotbecray
7023 #endif
7024
7025 _ACEOF
7026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7027   $EGREP "webecray" >/dev/null 2>&1; then :
7028   ac_cv_os_cray=yes
7029 else
7030   ac_cv_os_cray=no
7031 fi
7032 rm -f conftest*
7033
7034 fi
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7036 $as_echo "$ac_cv_os_cray" >&6; }
7037 if test $ac_cv_os_cray = yes; then
7038   for ac_func in _getb67 GETB67 getb67; do
7039     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7040 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7041 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7042
7043 cat >>confdefs.h <<_ACEOF
7044 #define CRAY_STACKSEG_END $ac_func
7045 _ACEOF
7046
7047     break
7048 fi
7049
7050   done
7051 fi
7052
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7054 $as_echo_n "checking stack direction for C alloca... " >&6; }
7055 if test "${ac_cv_c_stack_direction+set}" = set; then :
7056   $as_echo_n "(cached) " >&6
7057 else
7058   if test "$cross_compiling" = yes; then :
7059   ac_cv_c_stack_direction=0
7060 else
7061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062 /* end confdefs.h.  */
7063 $ac_includes_default
7064 int
7065 find_stack_direction ()
7066 {
7067   static char *addr = 0;
7068   auto char dummy;
7069   if (addr == 0)
7070     {
7071       addr = &dummy;
7072       return find_stack_direction ();
7073     }
7074   else
7075     return (&dummy > addr) ? 1 : -1;
7076 }
7077
7078 int
7079 main ()
7080 {
7081   return find_stack_direction () < 0;
7082 }
7083 _ACEOF
7084 if ac_fn_c_try_run "$LINENO"; then :
7085   ac_cv_c_stack_direction=1
7086 else
7087   ac_cv_c_stack_direction=-1
7088 fi
7089 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7090   conftest.$ac_objext conftest.beam conftest.$ac_ext
7091 fi
7092
7093 fi
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7095 $as_echo "$ac_cv_c_stack_direction" >&6; }
7096 cat >>confdefs.h <<_ACEOF
7097 #define STACK_DIRECTION $ac_cv_c_stack_direction
7098 _ACEOF
7099
7100
7101 fi
7102
7103
7104   GNULIB_BTOWC=0;
7105   GNULIB_WCTOB=0;
7106   GNULIB_MBSINIT=0;
7107   GNULIB_MBRTOWC=0;
7108   GNULIB_MBRLEN=0;
7109   GNULIB_MBSRTOWCS=0;
7110   GNULIB_MBSNRTOWCS=0;
7111   GNULIB_WCRTOMB=0;
7112   GNULIB_WCSRTOMBS=0;
7113   GNULIB_WCSNRTOMBS=0;
7114   GNULIB_WCWIDTH=0;
7115   GNULIB_WMEMCHR=0;
7116   GNULIB_WMEMCMP=0;
7117   GNULIB_WMEMCPY=0;
7118   GNULIB_WMEMMOVE=0;
7119   GNULIB_WMEMSET=0;
7120   GNULIB_WCSLEN=0;
7121   GNULIB_WCSNLEN=0;
7122   GNULIB_WCSCPY=0;
7123   GNULIB_WCPCPY=0;
7124   GNULIB_WCSNCPY=0;
7125   GNULIB_WCPNCPY=0;
7126   GNULIB_WCSCAT=0;
7127   GNULIB_WCSNCAT=0;
7128   GNULIB_WCSCMP=0;
7129   GNULIB_WCSNCMP=0;
7130   GNULIB_WCSCASECMP=0;
7131   GNULIB_WCSNCASECMP=0;
7132   GNULIB_WCSCOLL=0;
7133   GNULIB_WCSXFRM=0;
7134   GNULIB_WCSDUP=0;
7135   GNULIB_WCSCHR=0;
7136   GNULIB_WCSRCHR=0;
7137   GNULIB_WCSCSPN=0;
7138   GNULIB_WCSSPN=0;
7139   GNULIB_WCSPBRK=0;
7140   GNULIB_WCSSTR=0;
7141   GNULIB_WCSTOK=0;
7142   GNULIB_WCSWIDTH=0;
7143     HAVE_BTOWC=1;
7144   HAVE_MBSINIT=1;
7145   HAVE_MBRTOWC=1;
7146   HAVE_MBRLEN=1;
7147   HAVE_MBSRTOWCS=1;
7148   HAVE_MBSNRTOWCS=1;
7149   HAVE_WCRTOMB=1;
7150   HAVE_WCSRTOMBS=1;
7151   HAVE_WCSNRTOMBS=1;
7152   HAVE_WMEMCHR=1;
7153   HAVE_WMEMCMP=1;
7154   HAVE_WMEMCPY=1;
7155   HAVE_WMEMMOVE=1;
7156   HAVE_WMEMSET=1;
7157   HAVE_WCSLEN=1;
7158   HAVE_WCSNLEN=1;
7159   HAVE_WCSCPY=1;
7160   HAVE_WCPCPY=1;
7161   HAVE_WCSNCPY=1;
7162   HAVE_WCPNCPY=1;
7163   HAVE_WCSCAT=1;
7164   HAVE_WCSNCAT=1;
7165   HAVE_WCSCMP=1;
7166   HAVE_WCSNCMP=1;
7167   HAVE_WCSCASECMP=1;
7168   HAVE_WCSNCASECMP=1;
7169   HAVE_WCSCOLL=1;
7170   HAVE_WCSXFRM=1;
7171   HAVE_WCSDUP=1;
7172   HAVE_WCSCHR=1;
7173   HAVE_WCSRCHR=1;
7174   HAVE_WCSCSPN=1;
7175   HAVE_WCSSPN=1;
7176   HAVE_WCSPBRK=1;
7177   HAVE_WCSSTR=1;
7178   HAVE_WCSTOK=1;
7179   HAVE_WCSWIDTH=1;
7180   HAVE_DECL_WCTOB=1;
7181   HAVE_DECL_WCWIDTH=1;
7182   REPLACE_MBSTATE_T=0;
7183   REPLACE_BTOWC=0;
7184   REPLACE_WCTOB=0;
7185   REPLACE_MBSINIT=0;
7186   REPLACE_MBRTOWC=0;
7187   REPLACE_MBRLEN=0;
7188   REPLACE_MBSRTOWCS=0;
7189   REPLACE_MBSNRTOWCS=0;
7190   REPLACE_WCRTOMB=0;
7191   REPLACE_WCSRTOMBS=0;
7192   REPLACE_WCSNRTOMBS=0;
7193   REPLACE_WCWIDTH=0;
7194   REPLACE_WCSWIDTH=0;
7195
7196
7197             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7198 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7199 if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
7200   $as_echo_n "(cached) " >&6
7201 else
7202   gl_cv_header_wchar_h_correct_inline=yes
7203      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204 /* end confdefs.h.  */
7205
7206        #define wcstod renamed_wcstod
7207 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7208    <wchar.h>.
7209    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7210    included before <wchar.h>.  */
7211 #include <stddef.h>
7212 #include <stdio.h>
7213 #include <time.h>
7214 #include <wchar.h>
7215 extern int zero (void);
7216 int main () { return zero(); }
7217
7218 _ACEOF
7219      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7220   (eval $ac_compile) 2>&5
7221   ac_status=$?
7222   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7223   test $ac_status = 0; }; then
7224        mv conftest.$ac_objext conftest1.$ac_objext
7225        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226 /* end confdefs.h.  */
7227
7228          #define wcstod renamed_wcstod
7229 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7230    <wchar.h>.
7231    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7232    included before <wchar.h>.  */
7233 #include <stddef.h>
7234 #include <stdio.h>
7235 #include <time.h>
7236 #include <wchar.h>
7237 int zero (void) { return 0; }
7238
7239 _ACEOF
7240        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7241   (eval $ac_compile) 2>&5
7242   ac_status=$?
7243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7244   test $ac_status = 0; }; then
7245          mv conftest.$ac_objext conftest2.$ac_objext
7246          if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7247            :
7248          else
7249            gl_cv_header_wchar_h_correct_inline=no
7250          fi
7251        fi
7252      fi
7253      rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
7254
7255 fi
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7257 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7258   if test $gl_cv_header_wchar_h_correct_inline = no; then
7259     as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7260 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7261 C99 mode. You have four options:
7262   - Add the flag -fgnu89-inline to CC and reconfigure, or
7263   - Fix your include files, using parts of
7264     <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7265   - Use a gcc version older than 4.3, or
7266   - Don't use the flags -std=c99 or -std=gnu99.
7267 Configuration aborted." "$LINENO" 5
7268   fi
7269
7270
7271
7272
7273   for ac_func in $ac_func_list
7274 do :
7275   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7276 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7277 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7278   cat >>confdefs.h <<_ACEOF
7279 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7280 _ACEOF
7281
7282 fi
7283 done
7284
7285
7286
7287
7288   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7289 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7290 if test "${am_cv_langinfo_codeset+set}" = set; then :
7291   $as_echo_n "(cached) " >&6
7292 else
7293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7294 /* end confdefs.h.  */
7295 #include <langinfo.h>
7296 int
7297 main ()
7298 {
7299 char* cs = nl_langinfo(CODESET); return !cs;
7300   ;
7301   return 0;
7302 }
7303 _ACEOF
7304 if ac_fn_c_try_link "$LINENO"; then :
7305   am_cv_langinfo_codeset=yes
7306 else
7307   am_cv_langinfo_codeset=no
7308 fi
7309 rm -f core conftest.err conftest.$ac_objext \
7310     conftest$ac_exeext conftest.$ac_ext
7311
7312 fi
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7314 $as_echo "$am_cv_langinfo_codeset" >&6; }
7315   if test $am_cv_langinfo_codeset = yes; then
7316
7317 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7318
7319   fi
7320
7321
7322
7323
7324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7325 $as_echo_n "checking for a traditional french locale... " >&6; }
7326 if test "${gt_cv_locale_fr+set}" = set; then :
7327   $as_echo_n "(cached) " >&6
7328 else
7329
7330     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7331 /* end confdefs.h.  */
7332
7333 #include <locale.h>
7334 #include <time.h>
7335 #if HAVE_LANGINFO_CODESET
7336 # include <langinfo.h>
7337 #endif
7338 #include <stdlib.h>
7339 #include <string.h>
7340 struct tm t;
7341 char buf[16];
7342 int main () {
7343   /* Check whether the given locale name is recognized by the system.  */
7344 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
7345   /* On native Win32, setlocale(category, "") looks at the system settings,
7346      not at the environment variables.  Also, when an encoding suffix such
7347      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
7348      category of the locale to "C".  */
7349   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7350       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7351     return 1;
7352 #else
7353   if (setlocale (LC_ALL, "") == NULL) return 1;
7354 #endif
7355   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7356      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7357      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7358      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7359      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7360      some unit tests fail.
7361      On MirBSD 10, when an unsupported locale is specified, setlocale()
7362      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
7363 #if HAVE_LANGINFO_CODESET
7364   {
7365     const char *cs = nl_langinfo (CODESET);
7366     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7367         || strcmp (cs, "UTF-8") == 0)
7368       return 1;
7369   }
7370 #endif
7371 #ifdef __CYGWIN__
7372   /* On Cygwin, avoid locale names without encoding suffix, because the
7373      locale_charset() function relies on the encoding suffix.  Note that
7374      LC_ALL is set on the command line.  */
7375   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7376 #endif
7377   /* Check whether in the abbreviation of the second month, the second
7378      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7379      one byte long. This excludes the UTF-8 encoding.  */
7380   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7381   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7382   /* Check whether the decimal separator is a comma.
7383      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7384      are nl_langinfo(RADIXCHAR) are both ".".  */
7385   if (localeconv () ->decimal_point[0] != ',') return 1;
7386   return 0;
7387 }
7388
7389 _ACEOF
7390     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7391   (eval $ac_link) 2>&5
7392   ac_status=$?
7393   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7394   test $ac_status = 0; } && test -s conftest$ac_exeext; then
7395       case "$host_os" in
7396         # Handle native Windows specially, because there setlocale() interprets
7397         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7398         # "fr" or "fra" as "French" or "French_France.1252",
7399         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7400         # "ja" as "Japanese" or "Japanese_Japan.932",
7401         # and similar.
7402         mingw*)
7403           # Test for the native Win32 locale name.
7404           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7405             gt_cv_locale_fr=French_France.1252
7406           else
7407             # None found.
7408             gt_cv_locale_fr=none
7409           fi
7410           ;;
7411         *)
7412           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7413           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
7414           # configure script would override the LC_ALL setting. Likewise for
7415           # LC_CTYPE, which is also set at the beginning of the configure script.
7416           # Test for the usual locale name.
7417           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7418             gt_cv_locale_fr=fr_FR
7419           else
7420             # Test for the locale name with explicit encoding suffix.
7421             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7422               gt_cv_locale_fr=fr_FR.ISO-8859-1
7423             else
7424               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7425               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7426                 gt_cv_locale_fr=fr_FR.ISO8859-1
7427               else
7428                 # Test for the HP-UX locale name.
7429                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7430                   gt_cv_locale_fr=fr_FR.iso88591
7431                 else
7432                   # Test for the Solaris 7 locale name.
7433                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7434                     gt_cv_locale_fr=fr
7435                   else
7436                     # None found.
7437                     gt_cv_locale_fr=none
7438                   fi
7439                 fi
7440               fi
7441             fi
7442           fi
7443           ;;
7444       esac
7445     fi
7446     rm -fr conftest*
7447
7448 fi
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7450 $as_echo "$gt_cv_locale_fr" >&6; }
7451   LOCALE_FR=$gt_cv_locale_fr
7452
7453
7454
7455
7456
7457
7458
7459   for ac_header in $ac_header_list
7460 do :
7461   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7462 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7463 "
7464 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7465   cat >>confdefs.h <<_ACEOF
7466 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7467 _ACEOF
7468
7469 fi
7470
7471 done
7472
7473
7474
7475 # for STACK_DIRECTION
7476
7477
7478
7479
7480
7481             case "$host_os" in
7482      sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
7483        FAULT_YIELDS_SIGBUS=1 ;;
7484      hpux*) # HP-UX
7485        FAULT_YIELDS_SIGBUS=1 ;;
7486      macos* | darwin*) # MacOS X
7487        FAULT_YIELDS_SIGBUS=1 ;;
7488      gnu*) # Hurd
7489        FAULT_YIELDS_SIGBUS=1 ;;
7490      *)
7491        FAULT_YIELDS_SIGBUS=0 ;;
7492    esac
7493
7494 cat >>confdefs.h <<_ACEOF
7495 #define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS
7496 _ACEOF
7497
7498
7499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
7500 $as_echo_n "checking for working C stack overflow detection... " >&6; }
7501 if test "${ac_cv_sys_stack_overflow_works+set}" = set; then :
7502   $as_echo_n "(cached) " >&6
7503 else
7504   if test "$cross_compiling" = yes; then :
7505   ac_cv_sys_stack_overflow_works=cross-compiling
7506 else
7507   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508 /* end confdefs.h.  */
7509
7510             #include <unistd.h>
7511             #include <signal.h>
7512             #if HAVE_SETRLIMIT
7513             # include <sys/types.h>
7514             # include <sys/time.h>
7515             # include <sys/resource.h>
7516             #endif
7517             #ifndef SIGSTKSZ
7518             # define SIGSTKSZ 16384
7519             #endif
7520
7521             static union
7522             {
7523               char buffer[2 * SIGSTKSZ];
7524               long double ld;
7525               long u;
7526               void *p;
7527             } alternate_signal_stack;
7528
7529             static void
7530             segv_handler (int signo)
7531             {
7532               _exit (0);
7533             }
7534
7535             static int
7536             c_stack_action ()
7537             {
7538               stack_t st;
7539               struct sigaction act;
7540               int r;
7541
7542               st.ss_flags = 0;
7543               /* Use the midpoint to avoid Irix sigaltstack bug.  */
7544               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
7545               st.ss_size = SIGSTKSZ;
7546               r = sigaltstack (&st, 0);
7547               if (r != 0)
7548                 return 1;
7549
7550               sigemptyset (&act.sa_mask);
7551               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
7552               act.sa_handler = segv_handler;
7553               #if FAULT_YIELDS_SIGBUS
7554               if (sigaction (SIGBUS, &act, 0) < 0)
7555                 return 2;
7556               #endif
7557               if (sigaction (SIGSEGV, &act, 0) < 0)
7558                 return 3;
7559               return 0;
7560             }
7561             static volatile int *
7562             recurse_1 (volatile int n, volatile int *p)
7563             {
7564               if (n >= 0)
7565                 *recurse_1 (n + 1, p) += n;
7566               return p;
7567             }
7568             static int
7569             recurse (volatile int n)
7570             {
7571               int sum = 0;
7572               return *recurse_1 (n, &sum);
7573             }
7574             int
7575             main ()
7576             {
7577               int result;
7578               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
7579               /* Before starting the endless recursion, try to be friendly
7580                  to the user's machine.  On some Linux 2.2.x systems, there
7581                  is no stack limit for user processes at all.  We don't want
7582                  to kill such systems.  */
7583               struct rlimit rl;
7584               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
7585               setrlimit (RLIMIT_STACK, &rl);
7586               #endif
7587
7588               result = c_stack_action ();
7589               if (result != 0)
7590                 return result;
7591               return recurse (0);
7592             }
7593
7594 _ACEOF
7595 if ac_fn_c_try_run "$LINENO"; then :
7596   ac_cv_sys_stack_overflow_works=yes
7597 else
7598   ac_cv_sys_stack_overflow_works=no
7599 fi
7600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7601   conftest.$ac_objext conftest.beam conftest.$ac_ext
7602 fi
7603
7604 fi
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
7606 $as_echo "$ac_cv_sys_stack_overflow_works" >&6; }
7607
7608   if test $ac_cv_sys_stack_overflow_works = yes; then
7609
7610 $as_echo "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
7611
7612
7613                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
7614 $as_echo_n "checking for correct stack_t interpretation... " >&6; }
7615 if test "${gl_cv_sigaltstack_low_base+set}" = set; then :
7616   $as_echo_n "(cached) " >&6
7617 else
7618
7619       if test "$cross_compiling" = yes; then :
7620   gl_cv_sigaltstack_low_base=cross-compiling
7621 else
7622   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7623 /* end confdefs.h.  */
7624
7625
7626 #include <stdlib.h>
7627 #include <signal.h>
7628 #if HAVE_SYS_SIGNAL_H
7629 # include <sys/signal.h>
7630 #endif
7631 #ifndef SIGSTKSZ
7632 # define SIGSTKSZ 16384
7633 #endif
7634 volatile char *stack_lower_bound;
7635 volatile char *stack_upper_bound;
7636 static void check_stack_location (volatile char *addr)
7637 {
7638   if (addr >= stack_lower_bound && addr <= stack_upper_bound)
7639     exit (0);
7640   else
7641     exit (1);
7642 }
7643 static void stackoverflow_handler (int sig)
7644 {
7645   char dummy;
7646   check_stack_location (&dummy);
7647 }
7648 int main ()
7649 {
7650   char mystack[2 * SIGSTKSZ];
7651   stack_t altstack;
7652   struct sigaction action;
7653   /* Install the alternate stack.  */
7654   altstack.ss_sp = mystack + SIGSTKSZ;
7655   altstack.ss_size = SIGSTKSZ;
7656   stack_lower_bound = (char *) altstack.ss_sp;
7657   stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
7658   altstack.ss_flags = 0; /* no SS_DISABLE */
7659   if (sigaltstack (&altstack, NULL) < 0)
7660     exit (2);
7661   /* Install the SIGSEGV handler.  */
7662   sigemptyset (&action.sa_mask);
7663   action.sa_handler = &stackoverflow_handler;
7664   action.sa_flags = SA_ONSTACK;
7665   if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
7666     exit(3);
7667   /* Provoke a SIGSEGV.  */
7668   raise (SIGSEGV);
7669   exit (4);
7670 }
7671 _ACEOF
7672 if ac_fn_c_try_run "$LINENO"; then :
7673   gl_cv_sigaltstack_low_base=yes
7674 else
7675   gl_cv_sigaltstack_low_base=no
7676 fi
7677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7678   conftest.$ac_objext conftest.beam conftest.$ac_ext
7679 fi
7680
7681 fi
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
7683 $as_echo "$gl_cv_sigaltstack_low_base" >&6; }
7684    if test "$gl_cv_sigaltstack_low_base" = no; then
7685
7686 $as_echo "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
7687
7688     fi
7689
7690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
7691 $as_echo_n "checking for precise C stack overflow detection... " >&6; }
7692 if test "${ac_cv_sys_xsi_stack_overflow_heuristic+set}" = set; then :
7693   $as_echo_n "(cached) " >&6
7694 else
7695   if test "$cross_compiling" = yes; then :
7696   ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
7697 else
7698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7699 /* end confdefs.h.  */
7700
7701             #include <unistd.h>
7702             #include <signal.h>
7703             #if HAVE_UCONTEXT_H
7704             # include <ucontext.h>
7705             #endif
7706             #if HAVE_SETRLIMIT
7707             # include <sys/types.h>
7708             # include <sys/time.h>
7709             # include <sys/resource.h>
7710             #endif
7711             #ifndef SIGSTKSZ
7712             # define SIGSTKSZ 16384
7713             #endif
7714
7715             static union
7716             {
7717               char buffer[2 * SIGSTKSZ];
7718               long double ld;
7719               long u;
7720               void *p;
7721             } alternate_signal_stack;
7722
7723             #if STACK_DIRECTION
7724             # define find_stack_direction(ptr) STACK_DIRECTION
7725             #else
7726             static int
7727             find_stack_direction (char const *addr)
7728             {
7729               char dummy;
7730               return (! addr ? find_stack_direction (&dummy)
7731                       : addr < &dummy ? 1 : -1);
7732             }
7733             #endif
7734
7735             static void
7736             segv_handler (int signo, siginfo_t *info, void *context)
7737             {
7738               if (0 < info->si_code)
7739                 {
7740                   /* For XSI heuristics to work, we need uc_stack to describe
7741                      the interrupted stack (as on Solaris), and not the
7742                      currently executing stack (as on Linux).  */
7743                   ucontext_t const *user_context = context;
7744                   char const *stack_min = user_context->uc_stack.ss_sp;
7745                   size_t stack_size = user_context->uc_stack.ss_size;
7746                   char const *faulting_address = info->si_addr;
7747                   size_t s = faulting_address - stack_min;
7748                   size_t page_size = sysconf (_SC_PAGESIZE);
7749                   if (find_stack_direction (0) < 0)
7750                     s += page_size;
7751                   if (s < stack_size + page_size)
7752                     _exit (0);
7753                   _exit (4);
7754                 }
7755               _exit (5);
7756             }
7757
7758             static int
7759             c_stack_action ()
7760             {
7761               stack_t st;
7762               struct sigaction act;
7763               int r;
7764
7765               st.ss_flags = 0;
7766               /* Use the midpoint to avoid Irix sigaltstack bug.  */
7767               st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
7768               st.ss_size = SIGSTKSZ;
7769               r = sigaltstack (&st, 0);
7770               if (r != 0)
7771                 return 1;
7772
7773               sigemptyset (&act.sa_mask);
7774               act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
7775               act.sa_sigaction = segv_handler;
7776               #if FAULT_YIELDS_SIGBUS
7777               if (sigaction (SIGBUS, &act, 0) < 0)
7778                 return 2;
7779               #endif
7780               if (sigaction (SIGSEGV, &act, 0) < 0)
7781                 return 3;
7782               return 0;
7783             }
7784             static volatile int *
7785             recurse_1 (volatile int n, volatile int *p)
7786             {
7787               if (n >= 0)
7788                 *recurse_1 (n + 1, p) += n;
7789               return p;
7790             }
7791             static int
7792             recurse (volatile int n)
7793             {
7794               int sum = 0;
7795               return *recurse_1 (n, &sum);
7796             }
7797             int
7798             main ()
7799             {
7800               int result;
7801               #if HAVE_SETRLIMIT && defined RLIMIT_STACK
7802               /* Before starting the endless recursion, try to be friendly
7803                  to the user's machine.  On some Linux 2.2.x systems, there
7804                  is no stack limit for user processes at all.  We don't want
7805                  to kill such systems.  */
7806               struct rlimit rl;
7807               rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
7808               setrlimit (RLIMIT_STACK, &rl);
7809               #endif
7810
7811               result = c_stack_action ();
7812               if (result != 0)
7813                 return result;
7814               return recurse (0);
7815             }
7816
7817 _ACEOF
7818 if ac_fn_c_try_run "$LINENO"; then :
7819   ac_cv_sys_xsi_stack_overflow_heuristic=yes
7820 else
7821   ac_cv_sys_xsi_stack_overflow_heuristic=no
7822 fi
7823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7824   conftest.$ac_objext conftest.beam conftest.$ac_ext
7825 fi
7826
7827 fi
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
7829 $as_echo "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
7830
7831    if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
7832
7833 $as_echo "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
7834
7835    fi
7836   fi
7837
7838       if test "X$prefix" = "XNONE"; then
7839     acl_final_prefix="$ac_default_prefix"
7840   else
7841     acl_final_prefix="$prefix"
7842   fi
7843   if test "X$exec_prefix" = "XNONE"; then
7844     acl_final_exec_prefix='${prefix}'
7845   else
7846     acl_final_exec_prefix="$exec_prefix"
7847   fi
7848   acl_save_prefix="$prefix"
7849   prefix="$acl_final_prefix"
7850   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7851   prefix="$acl_save_prefix"
7852
7853
7854 # Check whether --with-gnu-ld was given.
7855 if test "${with_gnu_ld+set}" = set; then :
7856   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
7857 else
7858   with_gnu_ld=no
7859 fi
7860
7861 # Prepare PATH_SEPARATOR.
7862 # The user is always right.
7863 if test "${PATH_SEPARATOR+set}" != set; then
7864   # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7865   # contains only /bin. Note that ksh looks also at the FPATH variable,
7866   # so we have to set that as well for the test.
7867   PATH_SEPARATOR=:
7868   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7869     && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7870            || PATH_SEPARATOR=';'
7871        }
7872 fi
7873 ac_prog=ld
7874 if test "$GCC" = yes; then
7875   # Check if gcc -print-prog-name=ld gives a path.
7876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
7877 $as_echo_n "checking for ld used by GCC... " >&6; }
7878   case $host in
7879   *-*-mingw*)
7880     # gcc leaves a trailing carriage return which upsets mingw
7881     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7882   *)
7883     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7884   esac
7885   case $ac_prog in
7886     # Accept absolute paths.
7887     [\\/]* | [A-Za-z]:[\\/]*)
7888       re_direlt='/[^/][^/]*/\.\./'
7889       # Canonicalize the path of ld
7890       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7891       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7892         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7893       done
7894       test -z "$LD" && LD="$ac_prog"
7895       ;;
7896   "")
7897     # If it fails, then pretend we aren't using GCC.
7898     ac_prog=ld
7899     ;;
7900   *)
7901     # If it is relative, then search for the first ld in PATH.
7902     with_gnu_ld=unknown
7903     ;;
7904   esac
7905 elif test "$with_gnu_ld" = yes; then
7906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7907 $as_echo_n "checking for GNU ld... " >&6; }
7908 else
7909   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7910 $as_echo_n "checking for non-GNU ld... " >&6; }
7911 fi
7912 if test "${acl_cv_path_LD+set}" = set; then :
7913   $as_echo_n "(cached) " >&6
7914 else
7915   if test -z "$LD"; then
7916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7917   for ac_dir in $PATH; do
7918     test -z "$ac_dir" && ac_dir=.
7919     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7920       acl_cv_path_LD="$ac_dir/$ac_prog"
7921       # Check to see if the program is GNU ld.  I'd rather use --version,
7922       # but apparently some GNU ld's only accept -v.
7923       # Break only if it was the GNU/non-GNU ld that we prefer.
7924       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
7925       *GNU* | *'with BFD'*)
7926         test "$with_gnu_ld" != no && break ;;
7927       *)
7928         test "$with_gnu_ld" != yes && break ;;
7929       esac
7930     fi
7931   done
7932   IFS="$ac_save_ifs"
7933 else
7934   acl_cv_path_LD="$LD" # Let the user override the test with a path.
7935 fi
7936 fi
7937
7938 LD="$acl_cv_path_LD"
7939 if test -n "$LD"; then
7940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7941 $as_echo "$LD" >&6; }
7942 else
7943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7944 $as_echo "no" >&6; }
7945 fi
7946 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7948 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7949 if test "${acl_cv_prog_gnu_ld+set}" = set; then :
7950   $as_echo_n "(cached) " >&6
7951 else
7952   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7953 case `$LD -v 2>&1 </dev/null` in
7954 *GNU* | *'with BFD'*)
7955   acl_cv_prog_gnu_ld=yes ;;
7956 *)
7957   acl_cv_prog_gnu_ld=no ;;
7958 esac
7959 fi
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
7961 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
7962 with_gnu_ld=$acl_cv_prog_gnu_ld
7963
7964
7965
7966
7967                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
7968 $as_echo_n "checking for shared library run path origin... " >&6; }
7969 if test "${acl_cv_rpath+set}" = set; then :
7970   $as_echo_n "(cached) " >&6
7971 else
7972
7973     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7974     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7975     . ./conftest.sh
7976     rm -f ./conftest.sh
7977     acl_cv_rpath=done
7978
7979 fi
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
7981 $as_echo "$acl_cv_rpath" >&6; }
7982   wl="$acl_cv_wl"
7983   acl_libext="$acl_cv_libext"
7984   acl_shlibext="$acl_cv_shlibext"
7985   acl_libname_spec="$acl_cv_libname_spec"
7986   acl_library_names_spec="$acl_cv_library_names_spec"
7987   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7988   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7989   acl_hardcode_direct="$acl_cv_hardcode_direct"
7990   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
7991     # Check whether --enable-rpath was given.
7992 if test "${enable_rpath+set}" = set; then :
7993   enableval=$enable_rpath; :
7994 else
7995   enable_rpath=yes
7996 fi
7997
7998
7999
8000
8001   acl_libdirstem=lib
8002   acl_libdirstem2=
8003   case "$host_os" in
8004     solaris*)
8005                                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
8006 $as_echo_n "checking for 64-bit host... " >&6; }
8007 if test "${gl_cv_solaris_64bit+set}" = set; then :
8008   $as_echo_n "(cached) " >&6
8009 else
8010   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8011 /* end confdefs.h.  */
8012
8013 #ifdef _LP64
8014 sixtyfour bits
8015 #endif
8016
8017 _ACEOF
8018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8019   $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
8020   gl_cv_solaris_64bit=yes
8021 else
8022   gl_cv_solaris_64bit=no
8023 fi
8024 rm -f conftest*
8025
8026
8027 fi
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
8029 $as_echo "$gl_cv_solaris_64bit" >&6; }
8030       if test $gl_cv_solaris_64bit = yes; then
8031         acl_libdirstem=lib/64
8032         case "$host_cpu" in
8033           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
8034           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
8035         esac
8036       fi
8037       ;;
8038     *)
8039       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
8040       if test -n "$searchpath"; then
8041         acl_save_IFS="${IFS=    }"; IFS=":"
8042         for searchdir in $searchpath; do
8043           if test -d "$searchdir"; then
8044             case "$searchdir" in
8045               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
8046               */../ | */.. )
8047                 # Better ignore directories of this form. They are misleading.
8048                 ;;
8049               *) searchdir=`cd "$searchdir" && pwd`
8050                  case "$searchdir" in
8051                    */lib64 ) acl_libdirstem=lib64 ;;
8052                  esac ;;
8053             esac
8054           fi
8055         done
8056         IFS="$acl_save_IFS"
8057       fi
8058       ;;
8059   esac
8060   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076     use_additional=yes
8077
8078   acl_save_prefix="$prefix"
8079   prefix="$acl_final_prefix"
8080   acl_save_exec_prefix="$exec_prefix"
8081   exec_prefix="$acl_final_exec_prefix"
8082
8083     eval additional_includedir=\"$includedir\"
8084     eval additional_libdir=\"$libdir\"
8085
8086   exec_prefix="$acl_save_exec_prefix"
8087   prefix="$acl_save_prefix"
8088
8089
8090 # Check whether --with-libsigsegv-prefix was given.
8091 if test "${with_libsigsegv_prefix+set}" = set; then :
8092   withval=$with_libsigsegv_prefix;
8093     if test "X$withval" = "Xno"; then
8094       use_additional=no
8095     else
8096       if test "X$withval" = "X"; then
8097
8098   acl_save_prefix="$prefix"
8099   prefix="$acl_final_prefix"
8100   acl_save_exec_prefix="$exec_prefix"
8101   exec_prefix="$acl_final_exec_prefix"
8102
8103           eval additional_includedir=\"$includedir\"
8104           eval additional_libdir=\"$libdir\"
8105
8106   exec_prefix="$acl_save_exec_prefix"
8107   prefix="$acl_save_prefix"
8108
8109       else
8110         additional_includedir="$withval/include"
8111         additional_libdir="$withval/$acl_libdirstem"
8112         if test "$acl_libdirstem2" != "$acl_libdirstem" \
8113            && ! test -d "$withval/$acl_libdirstem"; then
8114           additional_libdir="$withval/$acl_libdirstem2"
8115         fi
8116       fi
8117     fi
8118
8119 fi
8120
8121       LIBSIGSEGV=
8122   LTLIBSIGSEGV=
8123   INCSIGSEGV=
8124   LIBSIGSEGV_PREFIX=
8125       HAVE_LIBSIGSEGV=
8126   rpathdirs=
8127   ltrpathdirs=
8128   names_already_handled=
8129   names_next_round='sigsegv '
8130   while test -n "$names_next_round"; do
8131     names_this_round="$names_next_round"
8132     names_next_round=
8133     for name in $names_this_round; do
8134       already_handled=
8135       for n in $names_already_handled; do
8136         if test "$n" = "$name"; then
8137           already_handled=yes
8138           break
8139         fi
8140       done
8141       if test -z "$already_handled"; then
8142         names_already_handled="$names_already_handled $name"
8143                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
8144         eval value=\"\$HAVE_LIB$uppername\"
8145         if test -n "$value"; then
8146           if test "$value" = yes; then
8147             eval value=\"\$LIB$uppername\"
8148             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
8149             eval value=\"\$LTLIB$uppername\"
8150             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
8151           else
8152                                     :
8153           fi
8154         else
8155                               found_dir=
8156           found_la=
8157           found_so=
8158           found_a=
8159           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
8160           if test -n "$acl_shlibext"; then
8161             shrext=".$acl_shlibext"             # typically: shrext=.so
8162           else
8163             shrext=
8164           fi
8165           if test $use_additional = yes; then
8166             dir="$additional_libdir"
8167                                     if test -n "$acl_shlibext"; then
8168               if test -f "$dir/$libname$shrext"; then
8169                 found_dir="$dir"
8170                 found_so="$dir/$libname$shrext"
8171               else
8172                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8173                   ver=`(cd "$dir" && \
8174                         for f in "$libname$shrext".*; do echo "$f"; done \
8175                         | sed -e "s,^$libname$shrext\\\\.,," \
8176                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
8177                         | sed 1q ) 2>/dev/null`
8178                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
8179                     found_dir="$dir"
8180                     found_so="$dir/$libname$shrext.$ver"
8181                   fi
8182                 else
8183                   eval library_names=\"$acl_library_names_spec\"
8184                   for f in $library_names; do
8185                     if test -f "$dir/$f"; then
8186                       found_dir="$dir"
8187                       found_so="$dir/$f"
8188                       break
8189                     fi
8190                   done
8191                 fi
8192               fi
8193             fi
8194                         if test "X$found_dir" = "X"; then
8195               if test -f "$dir/$libname.$acl_libext"; then
8196                 found_dir="$dir"
8197                 found_a="$dir/$libname.$acl_libext"
8198               fi
8199             fi
8200             if test "X$found_dir" != "X"; then
8201               if test -f "$dir/$libname.la"; then
8202                 found_la="$dir/$libname.la"
8203               fi
8204             fi
8205           fi
8206           if test "X$found_dir" = "X"; then
8207             for x in $LDFLAGS $LTLIBSIGSEGV; do
8208
8209   acl_save_prefix="$prefix"
8210   prefix="$acl_final_prefix"
8211   acl_save_exec_prefix="$exec_prefix"
8212   exec_prefix="$acl_final_exec_prefix"
8213   eval x=\"$x\"
8214   exec_prefix="$acl_save_exec_prefix"
8215   prefix="$acl_save_prefix"
8216
8217               case "$x" in
8218                 -L*)
8219                   dir=`echo "X$x" | sed -e 's/^X-L//'`
8220                                     if test -n "$acl_shlibext"; then
8221                     if test -f "$dir/$libname$shrext"; then
8222                       found_dir="$dir"
8223                       found_so="$dir/$libname$shrext"
8224                     else
8225                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8226                         ver=`(cd "$dir" && \
8227                               for f in "$libname$shrext".*; do echo "$f"; done \
8228                               | sed -e "s,^$libname$shrext\\\\.,," \
8229                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
8230                               | sed 1q ) 2>/dev/null`
8231                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
8232                           found_dir="$dir"
8233                           found_so="$dir/$libname$shrext.$ver"
8234                         fi
8235                       else
8236                         eval library_names=\"$acl_library_names_spec\"
8237                         for f in $library_names; do
8238                           if test -f "$dir/$f"; then
8239                             found_dir="$dir"
8240                             found_so="$dir/$f"
8241                             break
8242                           fi
8243                         done
8244                       fi
8245                     fi
8246                   fi
8247                                     if test "X$found_dir" = "X"; then
8248                     if test -f "$dir/$libname.$acl_libext"; then
8249                       found_dir="$dir"
8250                       found_a="$dir/$libname.$acl_libext"
8251                     fi
8252                   fi
8253                   if test "X$found_dir" != "X"; then
8254                     if test -f "$dir/$libname.la"; then
8255                       found_la="$dir/$libname.la"
8256                     fi
8257                   fi
8258                   ;;
8259               esac
8260               if test "X$found_dir" != "X"; then
8261                 break
8262               fi
8263             done
8264           fi
8265           if test "X$found_dir" != "X"; then
8266                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
8267             if test "X$found_so" != "X"; then
8268                                                         if test "$enable_rpath" = no \
8269                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
8270                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
8271                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8272               else
8273                                                                                 haveit=
8274                 for x in $ltrpathdirs; do
8275                   if test "X$x" = "X$found_dir"; then
8276                     haveit=yes
8277                     break
8278                   fi
8279                 done
8280                 if test -z "$haveit"; then
8281                   ltrpathdirs="$ltrpathdirs $found_dir"
8282                 fi
8283                                 if test "$acl_hardcode_direct" = yes; then
8284                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8285                 else
8286                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
8287                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8288                                                             haveit=
8289                     for x in $rpathdirs; do
8290                       if test "X$x" = "X$found_dir"; then
8291                         haveit=yes
8292                         break
8293                       fi
8294                     done
8295                     if test -z "$haveit"; then
8296                       rpathdirs="$rpathdirs $found_dir"
8297                     fi
8298                   else
8299                                                                                 haveit=
8300                     for x in $LDFLAGS $LIBSIGSEGV; do
8301
8302   acl_save_prefix="$prefix"
8303   prefix="$acl_final_prefix"
8304   acl_save_exec_prefix="$exec_prefix"
8305   exec_prefix="$acl_final_exec_prefix"
8306   eval x=\"$x\"
8307   exec_prefix="$acl_save_exec_prefix"
8308   prefix="$acl_save_prefix"
8309
8310                       if test "X$x" = "X-L$found_dir"; then
8311                         haveit=yes
8312                         break
8313                       fi
8314                     done
8315                     if test -z "$haveit"; then
8316                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
8317                     fi
8318                     if test "$acl_hardcode_minus_L" != no; then
8319                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
8320                     else
8321                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
8322                     fi
8323                   fi
8324                 fi
8325               fi
8326             else
8327               if test "X$found_a" != "X"; then
8328                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
8329               else
8330                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
8331               fi
8332             fi
8333                         additional_includedir=
8334             case "$found_dir" in
8335               */$acl_libdirstem | */$acl_libdirstem/)
8336                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
8337                 if test "$name" = 'sigsegv'; then
8338                   LIBSIGSEGV_PREFIX="$basedir"
8339                 fi
8340                 additional_includedir="$basedir/include"
8341                 ;;
8342               */$acl_libdirstem2 | */$acl_libdirstem2/)
8343                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
8344                 if test "$name" = 'sigsegv'; then
8345                   LIBSIGSEGV_PREFIX="$basedir"
8346                 fi
8347                 additional_includedir="$basedir/include"
8348                 ;;
8349             esac
8350             if test "X$additional_includedir" != "X"; then
8351                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
8352                 haveit=
8353                 if test "X$additional_includedir" = "X/usr/local/include"; then
8354                   if test -n "$GCC"; then
8355                     case $host_os in
8356                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8357                     esac
8358                   fi
8359                 fi
8360                 if test -z "$haveit"; then
8361                   for x in $CPPFLAGS $INCSIGSEGV; do
8362
8363   acl_save_prefix="$prefix"
8364   prefix="$acl_final_prefix"
8365   acl_save_exec_prefix="$exec_prefix"
8366   exec_prefix="$acl_final_exec_prefix"
8367   eval x=\"$x\"
8368   exec_prefix="$acl_save_exec_prefix"
8369   prefix="$acl_save_prefix"
8370
8371                     if test "X$x" = "X-I$additional_includedir"; then
8372                       haveit=yes
8373                       break
8374                     fi
8375                   done
8376                   if test -z "$haveit"; then
8377                     if test -d "$additional_includedir"; then
8378                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
8379                     fi
8380                   fi
8381                 fi
8382               fi
8383             fi
8384                         if test -n "$found_la"; then
8385                                                         save_libdir="$libdir"
8386               case "$found_la" in
8387                 */* | *\\*) . "$found_la" ;;
8388                 *) . "./$found_la" ;;
8389               esac
8390               libdir="$save_libdir"
8391                             for dep in $dependency_libs; do
8392                 case "$dep" in
8393                   -L*)
8394                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8395                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
8396                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
8397                       haveit=
8398                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
8399                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
8400                         if test -n "$GCC"; then
8401                           case $host_os in
8402                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8403                           esac
8404                         fi
8405                       fi
8406                       if test -z "$haveit"; then
8407                         haveit=
8408                         for x in $LDFLAGS $LIBSIGSEGV; do
8409
8410   acl_save_prefix="$prefix"
8411   prefix="$acl_final_prefix"
8412   acl_save_exec_prefix="$exec_prefix"
8413   exec_prefix="$acl_final_exec_prefix"
8414   eval x=\"$x\"
8415   exec_prefix="$acl_save_exec_prefix"
8416   prefix="$acl_save_prefix"
8417
8418                           if test "X$x" = "X-L$additional_libdir"; then
8419                             haveit=yes
8420                             break
8421                           fi
8422                         done
8423                         if test -z "$haveit"; then
8424                           if test -d "$additional_libdir"; then
8425                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
8426                           fi
8427                         fi
8428                         haveit=
8429                         for x in $LDFLAGS $LTLIBSIGSEGV; do
8430
8431   acl_save_prefix="$prefix"
8432   prefix="$acl_final_prefix"
8433   acl_save_exec_prefix="$exec_prefix"
8434   exec_prefix="$acl_final_exec_prefix"
8435   eval x=\"$x\"
8436   exec_prefix="$acl_save_exec_prefix"
8437   prefix="$acl_save_prefix"
8438
8439                           if test "X$x" = "X-L$additional_libdir"; then
8440                             haveit=yes
8441                             break
8442                           fi
8443                         done
8444                         if test -z "$haveit"; then
8445                           if test -d "$additional_libdir"; then
8446                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
8447                           fi
8448                         fi
8449                       fi
8450                     fi
8451                     ;;
8452                   -R*)
8453                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
8454                     if test "$enable_rpath" != no; then
8455                                                                   haveit=
8456                       for x in $rpathdirs; do
8457                         if test "X$x" = "X$dir"; then
8458                           haveit=yes
8459                           break
8460                         fi
8461                       done
8462                       if test -z "$haveit"; then
8463                         rpathdirs="$rpathdirs $dir"
8464                       fi
8465                                                                   haveit=
8466                       for x in $ltrpathdirs; do
8467                         if test "X$x" = "X$dir"; then
8468                           haveit=yes
8469                           break
8470                         fi
8471                       done
8472                       if test -z "$haveit"; then
8473                         ltrpathdirs="$ltrpathdirs $dir"
8474                       fi
8475                     fi
8476                     ;;
8477                   -l*)
8478                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8479                     ;;
8480                   *.la)
8481                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8482                     ;;
8483                   *)
8484                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
8485                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
8486                     ;;
8487                 esac
8488               done
8489             fi
8490           else
8491                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
8492             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
8493           fi
8494         fi
8495       fi
8496     done
8497   done
8498   if test "X$rpathdirs" != "X"; then
8499     if test -n "$acl_hardcode_libdir_separator"; then
8500                         alldirs=
8501       for found_dir in $rpathdirs; do
8502         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
8503       done
8504             acl_save_libdir="$libdir"
8505       libdir="$alldirs"
8506       eval flag=\"$acl_hardcode_libdir_flag_spec\"
8507       libdir="$acl_save_libdir"
8508       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
8509     else
8510             for found_dir in $rpathdirs; do
8511         acl_save_libdir="$libdir"
8512         libdir="$found_dir"
8513         eval flag=\"$acl_hardcode_libdir_flag_spec\"
8514         libdir="$acl_save_libdir"
8515         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
8516       done
8517     fi
8518   fi
8519   if test "X$ltrpathdirs" != "X"; then
8520             for found_dir in $ltrpathdirs; do
8521       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
8522     done
8523   fi
8524
8525
8526
8527
8528
8529
8530
8531         ac_save_CPPFLAGS="$CPPFLAGS"
8532
8533   for element in $INCSIGSEGV; do
8534     haveit=
8535     for x in $CPPFLAGS; do
8536
8537   acl_save_prefix="$prefix"
8538   prefix="$acl_final_prefix"
8539   acl_save_exec_prefix="$exec_prefix"
8540   exec_prefix="$acl_final_exec_prefix"
8541   eval x=\"$x\"
8542   exec_prefix="$acl_save_exec_prefix"
8543   prefix="$acl_save_prefix"
8544
8545       if test "X$x" = "X$element"; then
8546         haveit=yes
8547         break
8548       fi
8549     done
8550     if test -z "$haveit"; then
8551       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8552     fi
8553   done
8554
8555
8556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
8557 $as_echo_n "checking for libsigsegv... " >&6; }
8558 if test "${ac_cv_libsigsegv+set}" = set; then :
8559   $as_echo_n "(cached) " >&6
8560 else
8561
8562     ac_save_LIBS="$LIBS"
8563                                 case " $LIBSIGSEGV" in
8564       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
8565       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
8566     esac
8567     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8568 /* end confdefs.h.  */
8569 #include <sigsegv.h>
8570 int
8571 main ()
8572 {
8573 sigsegv_deinstall_handler();
8574   ;
8575   return 0;
8576 }
8577 _ACEOF
8578 if ac_fn_c_try_link "$LINENO"; then :
8579   ac_cv_libsigsegv=yes
8580 else
8581   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
8582 fi
8583 rm -f core conftest.err conftest.$ac_objext \
8584     conftest$ac_exeext conftest.$ac_ext
8585     LIBS="$ac_save_LIBS"
8586
8587 fi
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
8589 $as_echo "$ac_cv_libsigsegv" >&6; }
8590   if test "$ac_cv_libsigsegv" = yes; then
8591     HAVE_LIBSIGSEGV=yes
8592
8593 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
8594
8595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
8596 $as_echo_n "checking how to link with libsigsegv... " >&6; }
8597     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
8598 $as_echo "$LIBSIGSEGV" >&6; }
8599   else
8600     HAVE_LIBSIGSEGV=no
8601             CPPFLAGS="$ac_save_CPPFLAGS"
8602     LIBSIGSEGV=
8603     LTLIBSIGSEGV=
8604     LIBSIGSEGV_PREFIX=
8605   fi
8606
8607
8608
8609
8610
8611
8612
8613     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8628 $as_echo_n "checking whether // is distinct from /... " >&6; }
8629 if test "${gl_cv_double_slash_root+set}" = set; then :
8630   $as_echo_n "(cached) " >&6
8631 else
8632    if test x"$cross_compiling" = xyes ; then
8633         # When cross-compiling, there is no way to tell whether // is special
8634         # short of a list of hosts.  However, the only known hosts to date
8635         # that have a distinct // are Apollo DomainOS (too old to port to),
8636         # Cygwin, and z/OS.  If anyone knows of another system for which // has
8637         # special semantics and is distinct from /, please report it to
8638         # <bug-gnulib@gnu.org>.
8639         case $host in
8640           *-cygwin | i370-ibm-openedition)
8641             gl_cv_double_slash_root=yes ;;
8642           *)
8643             # Be optimistic and assume that / and // are the same when we
8644             # don't know.
8645             gl_cv_double_slash_root='unknown, assuming no' ;;
8646         esac
8647       else
8648         set x `ls -di / // 2>/dev/null`
8649         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8650           gl_cv_double_slash_root=no
8651         else
8652           gl_cv_double_slash_root=yes
8653         fi
8654       fi
8655 fi
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8657 $as_echo "$gl_cv_double_slash_root" >&6; }
8658   if test "$gl_cv_double_slash_root" = yes; then
8659
8660 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8661
8662   fi
8663
8664
8665
8666
8667
8668   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8669 $as_echo_n "checking whether realpath works... " >&6; }
8670 if test "${gl_cv_func_realpath_works+set}" = set; then :
8671   $as_echo_n "(cached) " >&6
8672 else
8673
8674     touch conftest.a
8675     if test "$cross_compiling" = yes; then :
8676   gl_cv_func_realpath_works="guessing no"
8677 else
8678   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8679 /* end confdefs.h.  */
8680
8681
8682         #include <stdlib.h>
8683
8684 int
8685 main ()
8686 {
8687
8688         int result = 0;
8689         {
8690           char *name = realpath ("conftest.a", NULL);
8691           if (!(name && *name == '/'))
8692             result |= 1;
8693         }
8694         {
8695           char *name = realpath ("conftest.b/../conftest.a", NULL);
8696           if (name != NULL)
8697             result |= 2;
8698         }
8699         {
8700           char *name = realpath ("conftest.a/", NULL);
8701           if (name != NULL)
8702             result |= 4;
8703         }
8704         return result;
8705
8706   ;
8707   return 0;
8708 }
8709
8710 _ACEOF
8711 if ac_fn_c_try_run "$LINENO"; then :
8712   gl_cv_func_realpath_works=yes
8713 else
8714   gl_cv_func_realpath_works=no
8715 fi
8716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8717   conftest.$ac_objext conftest.beam conftest.$ac_ext
8718 fi
8719
8720
8721 fi
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8723 $as_echo "$gl_cv_func_realpath_works" >&6; }
8724   if test "$gl_cv_func_realpath_works" = yes; then
8725
8726 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8727
8728   fi
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740   GNULIB__EXIT=0;
8741   GNULIB_ATOLL=0;
8742   GNULIB_CALLOC_POSIX=0;
8743   GNULIB_CANONICALIZE_FILE_NAME=0;
8744   GNULIB_GETLOADAVG=0;
8745   GNULIB_GETSUBOPT=0;
8746   GNULIB_GRANTPT=0;
8747   GNULIB_MALLOC_POSIX=0;
8748   GNULIB_MBTOWC=0;
8749   GNULIB_MKDTEMP=0;
8750   GNULIB_MKOSTEMP=0;
8751   GNULIB_MKOSTEMPS=0;
8752   GNULIB_MKSTEMP=0;
8753   GNULIB_MKSTEMPS=0;
8754   GNULIB_PTSNAME=0;
8755   GNULIB_PUTENV=0;
8756   GNULIB_RANDOM_R=0;
8757   GNULIB_REALLOC_POSIX=0;
8758   GNULIB_REALPATH=0;
8759   GNULIB_RPMATCH=0;
8760   GNULIB_SETENV=0;
8761   GNULIB_STRTOD=0;
8762   GNULIB_STRTOLL=0;
8763   GNULIB_STRTOULL=0;
8764   GNULIB_SYSTEM_POSIX=0;
8765   GNULIB_UNLOCKPT=0;
8766   GNULIB_UNSETENV=0;
8767   GNULIB_WCTOMB=0;
8768     HAVE__EXIT=1;
8769   HAVE_ATOLL=1;
8770   HAVE_CANONICALIZE_FILE_NAME=1;
8771   HAVE_DECL_GETLOADAVG=1;
8772   HAVE_GETSUBOPT=1;
8773   HAVE_GRANTPT=1;
8774   HAVE_MKDTEMP=1;
8775   HAVE_MKOSTEMP=1;
8776   HAVE_MKOSTEMPS=1;
8777   HAVE_MKSTEMP=1;
8778   HAVE_MKSTEMPS=1;
8779   HAVE_PTSNAME=1;
8780   HAVE_RANDOM_H=1;
8781   HAVE_RANDOM_R=1;
8782   HAVE_REALPATH=1;
8783   HAVE_RPMATCH=1;
8784   HAVE_SETENV=1;
8785   HAVE_DECL_SETENV=1;
8786   HAVE_STRTOD=1;
8787   HAVE_STRTOLL=1;
8788   HAVE_STRTOULL=1;
8789   HAVE_STRUCT_RANDOM_DATA=1;
8790   HAVE_SYS_LOADAVG_H=0;
8791   HAVE_UNLOCKPT=1;
8792   HAVE_DECL_UNSETENV=1;
8793   REPLACE_CALLOC=0;
8794   REPLACE_CANONICALIZE_FILE_NAME=0;
8795   REPLACE_MALLOC=0;
8796   REPLACE_MBTOWC=0;
8797   REPLACE_MKSTEMP=0;
8798   REPLACE_PUTENV=0;
8799   REPLACE_REALLOC=0;
8800   REPLACE_REALPATH=0;
8801   REPLACE_SETENV=0;
8802   REPLACE_STRTOD=0;
8803   REPLACE_UNSETENV=0;
8804   REPLACE_WCTOMB=0;
8805
8806
8807   GNULIB_CHOWN=0;
8808   GNULIB_CLOSE=0;
8809   GNULIB_DUP2=0;
8810   GNULIB_DUP3=0;
8811   GNULIB_ENVIRON=0;
8812   GNULIB_EUIDACCESS=0;
8813   GNULIB_FACCESSAT=0;
8814   GNULIB_FCHDIR=0;
8815   GNULIB_FCHOWNAT=0;
8816   GNULIB_FSYNC=0;
8817   GNULIB_FTRUNCATE=0;
8818   GNULIB_GETCWD=0;
8819   GNULIB_GETDOMAINNAME=0;
8820   GNULIB_GETDTABLESIZE=0;
8821   GNULIB_GETGROUPS=0;
8822   GNULIB_GETHOSTNAME=0;
8823   GNULIB_GETLOGIN=0;
8824   GNULIB_GETLOGIN_R=0;
8825   GNULIB_GETPAGESIZE=0;
8826   GNULIB_GETUSERSHELL=0;
8827   GNULIB_LCHOWN=0;
8828   GNULIB_LINK=0;
8829   GNULIB_LINKAT=0;
8830   GNULIB_LSEEK=0;
8831   GNULIB_PIPE=0;
8832   GNULIB_PIPE2=0;
8833   GNULIB_PREAD=0;
8834   GNULIB_PWRITE=0;
8835   GNULIB_READLINK=0;
8836   GNULIB_READLINKAT=0;
8837   GNULIB_RMDIR=0;
8838   GNULIB_SLEEP=0;
8839   GNULIB_SYMLINK=0;
8840   GNULIB_SYMLINKAT=0;
8841   GNULIB_TTYNAME_R=0;
8842   GNULIB_UNISTD_H_GETOPT=0;
8843   GNULIB_UNISTD_H_SIGPIPE=0;
8844   GNULIB_UNLINK=0;
8845   GNULIB_UNLINKAT=0;
8846   GNULIB_USLEEP=0;
8847   GNULIB_WRITE=0;
8848     HAVE_CHOWN=1;
8849   HAVE_DUP2=1;
8850   HAVE_DUP3=1;
8851   HAVE_EUIDACCESS=1;
8852   HAVE_FACCESSAT=1;
8853   HAVE_FCHDIR=1;
8854   HAVE_FCHOWNAT=1;
8855   HAVE_FSYNC=1;
8856   HAVE_FTRUNCATE=1;
8857   HAVE_GETDTABLESIZE=1;
8858   HAVE_GETGROUPS=1;
8859   HAVE_GETHOSTNAME=1;
8860   HAVE_GETLOGIN=1;
8861   HAVE_GETPAGESIZE=1;
8862   HAVE_LCHOWN=1;
8863   HAVE_LINK=1;
8864   HAVE_LINKAT=1;
8865   HAVE_PIPE=1;
8866   HAVE_PIPE2=1;
8867   HAVE_PREAD=1;
8868   HAVE_PWRITE=1;
8869   HAVE_READLINK=1;
8870   HAVE_READLINKAT=1;
8871   HAVE_SLEEP=1;
8872   HAVE_SYMLINK=1;
8873   HAVE_SYMLINKAT=1;
8874   HAVE_UNLINKAT=1;
8875   HAVE_USLEEP=1;
8876   HAVE_DECL_ENVIRON=1;
8877   HAVE_DECL_FCHDIR=1;
8878   HAVE_DECL_GETDOMAINNAME=1;
8879   HAVE_DECL_GETLOGIN_R=1;
8880   HAVE_DECL_GETPAGESIZE=1;
8881   HAVE_DECL_GETUSERSHELL=1;
8882   HAVE_DECL_TTYNAME_R=1;
8883   HAVE_OS_H=0;
8884   HAVE_SYS_PARAM_H=0;
8885   REPLACE_CHOWN=0;
8886   REPLACE_CLOSE=0;
8887   REPLACE_DUP=0;
8888   REPLACE_DUP2=0;
8889   REPLACE_FCHOWNAT=0;
8890   REPLACE_GETCWD=0;
8891   REPLACE_GETDOMAINNAME=0;
8892   REPLACE_GETLOGIN_R=0;
8893   REPLACE_GETGROUPS=0;
8894   REPLACE_GETPAGESIZE=0;
8895   REPLACE_LCHOWN=0;
8896   REPLACE_LINK=0;
8897   REPLACE_LINKAT=0;
8898   REPLACE_LSEEK=0;
8899   REPLACE_PREAD=0;
8900   REPLACE_PWRITE=0;
8901   REPLACE_READLINK=0;
8902   REPLACE_RMDIR=0;
8903   REPLACE_SLEEP=0;
8904   REPLACE_SYMLINK=0;
8905   REPLACE_TTYNAME_R=0;
8906   REPLACE_UNLINK=0;
8907   REPLACE_UNLINKAT=0;
8908   REPLACE_USLEEP=0;
8909   REPLACE_WRITE=0;
8910   UNISTD_H_HAVE_WINSOCK2_H=0;
8911   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923   M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933   M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943   M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8959 $as_echo_n "checking if environ is properly declared... " >&6; }
8960   if test "${gt_cv_var_environ_declaration+set}" = set; then :
8961   $as_echo_n "(cached) " >&6
8962 else
8963
8964     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8965 /* end confdefs.h.  */
8966 #include <unistd.h>
8967            extern struct { int foo; } environ;
8968 int
8969 main ()
8970 {
8971 environ.foo = 1;
8972   ;
8973   return 0;
8974 }
8975 _ACEOF
8976 if ac_fn_c_try_compile "$LINENO"; then :
8977   gt_cv_var_environ_declaration=no
8978 else
8979   gt_cv_var_environ_declaration=yes
8980 fi
8981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8982 fi
8983
8984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8985 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8986   if test $gt_cv_var_environ_declaration = yes; then
8987
8988 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8989
8990   fi
8991
8992
8993   if test $gt_cv_var_environ_declaration != yes; then
8994     HAVE_DECL_ENVIRON=0
8995   fi
8996
8997
8998
8999   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9000 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9001 if test "${gl_cv_have_include_next+set}" = set; then :
9002   $as_echo_n "(cached) " >&6
9003 else
9004   rm -rf conftestd1a conftestd1b conftestd2
9005      mkdir conftestd1a conftestd1b conftestd2
9006                                                   cat <<EOF > conftestd1a/conftest.h
9007 #define DEFINED_IN_CONFTESTD1
9008 #include_next <conftest.h>
9009 #ifdef DEFINED_IN_CONFTESTD2
9010 int foo;
9011 #else
9012 #error "include_next doesn't work"
9013 #endif
9014 EOF
9015      cat <<EOF > conftestd1b/conftest.h
9016 #define DEFINED_IN_CONFTESTD1
9017 #include <stdio.h>
9018 #include_next <conftest.h>
9019 #ifdef DEFINED_IN_CONFTESTD2
9020 int foo;
9021 #else
9022 #error "include_next doesn't work"
9023 #endif
9024 EOF
9025      cat <<EOF > conftestd2/conftest.h
9026 #ifndef DEFINED_IN_CONFTESTD1
9027 #error "include_next test doesn't work"
9028 #endif
9029 #define DEFINED_IN_CONFTESTD2
9030 EOF
9031      gl_save_CPPFLAGS="$CPPFLAGS"
9032      CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9033      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034 /* end confdefs.h.  */
9035 #include <conftest.h>
9036 _ACEOF
9037 if ac_fn_c_try_compile "$LINENO"; then :
9038   gl_cv_have_include_next=yes
9039 else
9040   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9041         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9042 /* end confdefs.h.  */
9043 #include <conftest.h>
9044 _ACEOF
9045 if ac_fn_c_try_compile "$LINENO"; then :
9046   gl_cv_have_include_next=buggy
9047 else
9048   gl_cv_have_include_next=no
9049 fi
9050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9051
9052 fi
9053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9054      CPPFLAGS="$gl_save_CPPFLAGS"
9055      rm -rf conftestd1a conftestd1b conftestd2
9056
9057 fi
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9059 $as_echo "$gl_cv_have_include_next" >&6; }
9060   PRAGMA_SYSTEM_HEADER=
9061   if test $gl_cv_have_include_next = yes; then
9062     INCLUDE_NEXT=include_next
9063     INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9064     if test -n "$GCC"; then
9065       PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9066     fi
9067   else
9068     if test $gl_cv_have_include_next = buggy; then
9069       INCLUDE_NEXT=include
9070       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9071     else
9072       INCLUDE_NEXT=include
9073       INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9074     fi
9075   fi
9076
9077
9078
9079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9080 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9081 if test "${gl_cv_pragma_columns+set}" = set; then :
9082   $as_echo_n "(cached) " >&6
9083 else
9084        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h.  */
9086
9087 #ifdef __TANDEM
9088 choke me
9089 #endif
9090
9091 _ACEOF
9092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9093   $EGREP "choke me" >/dev/null 2>&1; then :
9094   gl_cv_pragma_columns=yes
9095 else
9096   gl_cv_pragma_columns=no
9097 fi
9098 rm -f conftest*
9099
9100
9101 fi
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9103 $as_echo "$gl_cv_pragma_columns" >&6; }
9104   if test $gl_cv_pragma_columns = yes; then
9105     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9106   else
9107     PRAGMA_COLUMNS=
9108   fi
9109
9110
9111
9112
9113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9114 $as_echo_n "checking for complete errno.h... " >&6; }
9115 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
9116   $as_echo_n "(cached) " >&6
9117 else
9118
9119     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9120 /* end confdefs.h.  */
9121
9122 #include <errno.h>
9123 #if !defined ENOMSG
9124 booboo
9125 #endif
9126 #if !defined EIDRM
9127 booboo
9128 #endif
9129 #if !defined ENOLINK
9130 booboo
9131 #endif
9132 #if !defined EPROTO
9133 booboo
9134 #endif
9135 #if !defined EMULTIHOP
9136 booboo
9137 #endif
9138 #if !defined EBADMSG
9139 booboo
9140 #endif
9141 #if !defined EOVERFLOW
9142 booboo
9143 #endif
9144 #if !defined ENOTSUP
9145 booboo
9146 #endif
9147 #if !defined ESTALE
9148 booboo
9149 #endif
9150 #if !defined EDQUOT
9151 booboo
9152 #endif
9153 #if !defined ECANCELED
9154 booboo
9155 #endif
9156
9157 _ACEOF
9158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9159   $EGREP "booboo" >/dev/null 2>&1; then :
9160   gl_cv_header_errno_h_complete=no
9161 else
9162   gl_cv_header_errno_h_complete=yes
9163 fi
9164 rm -f conftest*
9165
9166
9167 fi
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9169 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9170   if test $gl_cv_header_errno_h_complete = yes; then
9171     ERRNO_H=''
9172   else
9173
9174
9175
9176
9177
9178
9179
9180
9181      if test $gl_cv_have_include_next = yes; then
9182        gl_cv_next_errno_h='<'errno.h'>'
9183      else
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9185 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9186 if test "${gl_cv_next_errno_h+set}" = set; then :
9187   $as_echo_n "(cached) " >&6
9188 else
9189
9190                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191 /* end confdefs.h.  */
9192 #include <errno.h>
9193
9194 _ACEOF
9195                                                                                                                         case "$host_os" in
9196                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
9197                  *)    gl_absname_cpp="$ac_cpp" ;;
9198                esac
9199                                                             gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9200                   sed -n '\#/errno.h#{
9201                     s#.*"\(.*/errno.h\)".*#\1#
9202                     s#^/[^/]#//&#
9203                     p
9204                     q
9205                   }'`'"'
9206
9207
9208 fi
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9210 $as_echo "$gl_cv_next_errno_h" >&6; }
9211      fi
9212      NEXT_ERRNO_H=$gl_cv_next_errno_h
9213
9214      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9215        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9216        gl_next_as_first_directive='<'errno.h'>'
9217      else
9218        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9219        gl_next_as_first_directive=$gl_cv_next_errno_h
9220      fi
9221      NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9222
9223
9224
9225
9226     ERRNO_H='errno.h'
9227   fi
9228
9229
9230   if test -n "$ERRNO_H"; then
9231     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9232 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9233 if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
9234   $as_echo_n "(cached) " >&6
9235 else
9236
9237       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9238 /* end confdefs.h.  */
9239
9240 #include <errno.h>
9241 #ifdef EMULTIHOP
9242 yes
9243 #endif
9244
9245 _ACEOF
9246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9247   $EGREP "yes" >/dev/null 2>&1; then :
9248   gl_cv_header_errno_h_EMULTIHOP=yes
9249 else
9250   gl_cv_header_errno_h_EMULTIHOP=no
9251 fi
9252 rm -f conftest*
9253
9254       if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9255         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9256 /* end confdefs.h.  */
9257
9258 #define _XOPEN_SOURCE_EXTENDED 1
9259 #include <errno.h>
9260 #ifdef EMULTIHOP
9261 yes
9262 #endif
9263
9264 _ACEOF
9265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9266   $EGREP "yes" >/dev/null 2>&1; then :
9267   gl_cv_header_errno_h_EMULTIHOP=hidden
9268 fi
9269 rm -f conftest*
9270
9271         if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9272                               if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9273 #define _XOPEN_SOURCE_EXTENDED 1
9274 #include <errno.h>
9275 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9276 #include <stdio.h>
9277 #include <stdlib.h>
9278 "; then :
9279
9280 fi
9281
9282         fi
9283       fi
9284
9285 fi
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9287 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9288     case $gl_cv_header_errno_h_EMULTIHOP in
9289       yes | no)
9290         EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9291         ;;
9292       *)
9293         EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9294         ;;
9295     esac
9296
9297
9298   fi
9299
9300
9301   if test -n "$ERRNO_H"; then
9302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9303 $as_echo_n "checking for ENOLINK value... " >&6; }
9304 if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
9305   $as_echo_n "(cached) " >&6
9306 else
9307
9308       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9309 /* end confdefs.h.  */
9310
9311 #include <errno.h>
9312 #ifdef ENOLINK
9313 yes
9314 #endif
9315
9316 _ACEOF
9317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9318   $EGREP "yes" >/dev/null 2>&1; then :
9319   gl_cv_header_errno_h_ENOLINK=yes
9320 else
9321   gl_cv_header_errno_h_ENOLINK=no
9322 fi
9323 rm -f conftest*
9324
9325       if test $gl_cv_header_errno_h_ENOLINK = no; then
9326         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9327 /* end confdefs.h.  */
9328
9329 #define _XOPEN_SOURCE_EXTENDED 1
9330 #include <errno.h>
9331 #ifdef ENOLINK
9332 yes
9333 #endif
9334
9335 _ACEOF
9336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9337   $EGREP "yes" >/dev/null 2>&1; then :
9338   gl_cv_header_errno_h_ENOLINK=hidden
9339 fi
9340 rm -f conftest*
9341
9342         if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9343                               if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9344 #define _XOPEN_SOURCE_EXTENDED 1
9345 #include <errno.h>
9346 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9347 #include <stdio.h>
9348 #include <stdlib.h>
9349 "; then :
9350
9351 fi
9352
9353         fi
9354       fi
9355
9356 fi
9357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9358 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9359     case $gl_cv_header_errno_h_ENOLINK in
9360       yes | no)
9361         ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9362         ;;
9363       *)
9364         ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9365         ;;
9366     esac
9367
9368
9369   fi
9370
9371
9372   if test -n "$ERRNO_H"; then
9373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9374 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9375 if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
9376   $as_echo_n "(cached) " >&6
9377 else
9378
9379       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9380 /* end confdefs.h.  */
9381
9382 #include <errno.h>
9383 #ifdef EOVERFLOW
9384 yes
9385 #endif
9386
9387 _ACEOF
9388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9389   $EGREP "yes" >/dev/null 2>&1; then :
9390   gl_cv_header_errno_h_EOVERFLOW=yes
9391 else
9392   gl_cv_header_errno_h_EOVERFLOW=no
9393 fi
9394 rm -f conftest*
9395
9396       if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9397         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9398 /* end confdefs.h.  */
9399
9400 #define _XOPEN_SOURCE_EXTENDED 1
9401 #include <errno.h>
9402 #ifdef EOVERFLOW
9403 yes
9404 #endif
9405
9406 _ACEOF
9407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9408   $EGREP "yes" >/dev/null 2>&1; then :
9409   gl_cv_header_errno_h_EOVERFLOW=hidden
9410 fi
9411 rm -f conftest*
9412
9413         if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9414                               if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
9415 #define _XOPEN_SOURCE_EXTENDED 1
9416 #include <errno.h>
9417 /* The following two lines are a workaround against an autoconf-2.52 bug.  */
9418 #include <stdio.h>
9419 #include <stdlib.h>
9420 "; then :
9421
9422 fi
9423
9424         fi
9425       fi
9426
9427 fi
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9429 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9430     case $gl_cv_header_errno_h_EOVERFLOW in
9431       yes | no)
9432         EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9433         ;;
9434       *)
9435         EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9436         ;;
9437     esac
9438
9439
9440   fi
9441
9442
9443 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9444 if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
9445   ac_have_decl=1
9446 else
9447   ac_have_decl=0
9448 fi
9449
9450 cat >>confdefs.h <<_ACEOF
9451 #define HAVE_DECL_STRERROR_R $ac_have_decl
9452 _ACEOF
9453
9454 for ac_func in strerror_r
9455 do :
9456   ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9457 if test "x$ac_cv_func_strerror_r" = x""yes; then :
9458   cat >>confdefs.h <<_ACEOF
9459 #define HAVE_STRERROR_R 1
9460 _ACEOF
9461
9462 fi
9463 done
9464
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9466 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9467 if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
9468   $as_echo_n "(cached) " >&6
9469 else
9470
9471     ac_cv_func_strerror_r_char_p=no
9472     if test $ac_cv_have_decl_strerror_r = yes; then
9473       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9474 /* end confdefs.h.  */
9475 $ac_includes_default
9476 int
9477 main ()
9478 {
9479
9480           char buf[100];
9481           char x = *strerror_r (0, buf, sizeof buf);
9482           char *p = strerror_r (0, buf, sizeof buf);
9483           return !p || x;
9484
9485   ;
9486   return 0;
9487 }
9488 _ACEOF
9489 if ac_fn_c_try_compile "$LINENO"; then :
9490   ac_cv_func_strerror_r_char_p=yes
9491 fi
9492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9493     else
9494       # strerror_r is not declared.  Choose between
9495       # systems that have relatively inaccessible declarations for the
9496       # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
9497       # former has a strerror_r that returns char*, while the latter
9498       # has a strerror_r that returns `int'.
9499       # This test should segfault on the DEC system.
9500       if test "$cross_compiling" = yes; then :
9501   :
9502 else
9503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9504 /* end confdefs.h.  */
9505 $ac_includes_default
9506         extern char *strerror_r ();
9507 int
9508 main ()
9509 {
9510 char buf[100];
9511           char x = *strerror_r (0, buf, sizeof buf);
9512           return ! isalpha (x);
9513   ;
9514   return 0;
9515 }
9516 _ACEOF
9517 if ac_fn_c_try_run "$LINENO"; then :
9518   ac_cv_func_strerror_r_char_p=yes
9519 fi
9520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9521   conftest.$ac_objext conftest.beam conftest.$ac_ext
9522 fi
9523
9524     fi
9525
9526 fi
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9528 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9529 if test $ac_cv_func_strerror_r_char_p = yes; then
9530
9531 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9532
9533 fi
9534
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9536 $as_echo_n "checking for inline... " >&6; }
9537 if test "${ac_cv_c_inline+set}" = set; then :
9538   $as_echo_n "(cached) " >&6
9539 else
9540   ac_cv_c_inline=no
9541 for ac_kw in inline __inline__ __inline; do
9542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9543 /* end confdefs.h.  */
9544 #ifndef __cplusplus
9545 typedef int foo_t;
9546 static $ac_kw foo_t static_foo () {return 0; }
9547 $ac_kw foo_t foo () {return 0; }
9548 #endif
9549
9550 _ACEOF
9551 if ac_fn_c_try_compile "$LINENO"; then :
9552   ac_cv_c_inline=$ac_kw
9553 fi
9554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9555   test "$ac_cv_c_inline" != no && break
9556 done
9557
9558 fi
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9560 $as_echo "$ac_cv_c_inline" >&6; }
9561
9562 case $ac_cv_c_inline in
9563   inline | yes) ;;
9564   *)
9565     case $ac_cv_c_inline in
9566       no) ac_val=;;
9567       *) ac_val=$ac_cv_c_inline;;
9568     esac
9569     cat >>confdefs.h <<_ACEOF
9570 #ifndef __cplusplus
9571 #define inline $ac_val
9572 #endif
9573 _ACEOF
9574     ;;
9575 esac
9576
9577
9578   XGETTEXT_EXTRA_OPTIONS=
9579
9580 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9581 if test "x$ac_cv_type_mode_t" = x""yes; then :
9582
9583 else
9584
9585 cat >>confdefs.h <<_ACEOF
9586 #define mode_t int
9587 _ACEOF
9588
9589 fi
9590
9591
9592   ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
9593 "
9594 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
9595
9596 cat >>confdefs.h <<_ACEOF
9597 #define HAVE_SIG_ATOMIC_T 1
9598 _ACEOF
9599
9600
9601 else
9602
9603 $as_echo "#define sig_atomic_t int" >>confdefs.h
9604
9605 fi
9606
9607
9608
9609   GNULIB_DPRINTF=0;
9610   GNULIB_FCLOSE=0;
9611   GNULIB_FFLUSH=0;
9612   GNULIB_FOPEN=0;
9613   GNULIB_FPRINTF=0;
9614   GNULIB_FPRINTF_POSIX=0;
9615   GNULIB_FPURGE=0;
9616   GNULIB_FPUTC=0;
9617   GNULIB_FPUTS=0;
9618   GNULIB_FREOPEN=0;
9619   GNULIB_FSEEK=0;
9620   GNULIB_FSEEKO=0;
9621   GNULIB_FTELL=0;
9622   GNULIB_FTELLO=0;
9623   GNULIB_FWRITE=0;
9624   GNULIB_GETDELIM=0;
9625   GNULIB_GETLINE=0;
9626   GNULIB_OBSTACK_PRINTF=0;
9627   GNULIB_OBSTACK_PRINTF_POSIX=0;
9628   GNULIB_PERROR=0;
9629   GNULIB_POPEN=0;
9630   GNULIB_PRINTF=0;
9631   GNULIB_PRINTF_POSIX=0;
9632   GNULIB_PUTC=0;
9633   GNULIB_PUTCHAR=0;
9634   GNULIB_PUTS=0;
9635   GNULIB_REMOVE=0;
9636   GNULIB_RENAME=0;
9637   GNULIB_RENAMEAT=0;
9638   GNULIB_SNPRINTF=0;
9639   GNULIB_SPRINTF_POSIX=0;
9640   GNULIB_STDIO_H_SIGPIPE=0;
9641   GNULIB_TMPFILE=0;
9642   GNULIB_VASPRINTF=0;
9643   GNULIB_VDPRINTF=0;
9644   GNULIB_VFPRINTF=0;
9645   GNULIB_VFPRINTF_POSIX=0;
9646   GNULIB_VPRINTF=0;
9647   GNULIB_VPRINTF_POSIX=0;
9648   GNULIB_VSNPRINTF=0;
9649   GNULIB_VSPRINTF_POSIX=0;
9650     HAVE_DECL_FPURGE=1;
9651   HAVE_DECL_FSEEKO=1;
9652   HAVE_DECL_FTELLO=1;
9653   HAVE_DECL_GETDELIM=1;
9654   HAVE_DECL_GETLINE=1;
9655   HAVE_DECL_OBSTACK_PRINTF=1;
9656   HAVE_DECL_SNPRINTF=1;
9657   HAVE_DECL_VSNPRINTF=1;
9658   HAVE_DPRINTF=1;
9659   HAVE_FSEEKO=1;
9660   HAVE_FTELLO=1;
9661   HAVE_RENAMEAT=1;
9662   HAVE_VASPRINTF=1;
9663   HAVE_VDPRINTF=1;
9664   REPLACE_DPRINTF=0;
9665   REPLACE_FCLOSE=0;
9666   REPLACE_FFLUSH=0;
9667   REPLACE_FOPEN=0;
9668   REPLACE_FPRINTF=0;
9669   REPLACE_FPURGE=0;
9670   REPLACE_FREOPEN=0;
9671   REPLACE_FSEEK=0;
9672   REPLACE_FSEEKO=0;
9673   REPLACE_FTELL=0;
9674   REPLACE_FTELLO=0;
9675   REPLACE_GETDELIM=0;
9676   REPLACE_GETLINE=0;
9677   REPLACE_OBSTACK_PRINTF=0;
9678   REPLACE_PERROR=0;
9679   REPLACE_POPEN=0;
9680   REPLACE_PRINTF=0;
9681   REPLACE_REMOVE=0;
9682   REPLACE_RENAME=0;
9683   REPLACE_RENAMEAT=0;
9684   REPLACE_SNPRINTF=0;
9685   REPLACE_SPRINTF=0;
9686   REPLACE_STDIO_WRITE_FUNCS=0;
9687   REPLACE_TMPFILE=0;
9688   REPLACE_VASPRINTF=0;
9689   REPLACE_VDPRINTF=0;
9690   REPLACE_VFPRINTF=0;
9691   REPLACE_VPRINTF=0;
9692   REPLACE_VSNPRINTF=0;
9693   REPLACE_VSPRINTF=0;
9694
9695
9696   GNULIB_FCNTL=0;
9697   GNULIB_OPEN=0;
9698   GNULIB_OPENAT=0;
9699     HAVE_FCNTL=1;
9700   HAVE_OPENAT=1;
9701   REPLACE_FCNTL=0;
9702   REPLACE_OPEN=0;
9703   REPLACE_OPENAT=0;
9704
9705
9706
9707   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9708 $as_echo_n "checking for working fcntl.h... " >&6; }
9709 if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
9710   $as_echo_n "(cached) " >&6
9711 else
9712   if test "$cross_compiling" = yes; then :
9713   gl_cv_header_working_fcntl_h=cross-compiling
9714 else
9715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9716 /* end confdefs.h.  */
9717 #include <sys/types.h>
9718            #include <sys/stat.h>
9719            #include <unistd.h>
9720            #include <fcntl.h>
9721            #ifndef O_NOATIME
9722             #define O_NOATIME 0
9723            #endif
9724            #ifndef O_NOFOLLOW
9725             #define O_NOFOLLOW 0
9726            #endif
9727            static int const constants[] =
9728             {
9729               O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9730               O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9731             };
9732
9733 int
9734 main ()
9735 {
9736
9737             int result = !constants;
9738             {
9739               static char const sym[] = "conftest.sym";
9740               if (symlink (".", sym) != 0)
9741                 result |= 2;
9742               else
9743                 {
9744                   int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9745                   if (fd >= 0)
9746                     {
9747                       close (fd);
9748                       result |= 4;
9749                     }
9750                 }
9751               unlink (sym);
9752             }
9753             {
9754               static char const file[] = "confdefs.h";
9755               int fd = open (file, O_RDONLY | O_NOATIME);
9756               if (fd < 0)
9757                 result |= 8;
9758               else
9759                 {
9760                   struct stat st0;
9761                   if (fstat (fd, &st0) != 0)
9762                     result |= 16;
9763                   else
9764                     {
9765                       char c;
9766                       sleep (1);
9767                       if (read (fd, &c, 1) != 1)
9768                         result |= 24;
9769                       else
9770                         {
9771                           if (close (fd) != 0)
9772                             result |= 32;
9773                           else
9774                             {
9775                               struct stat st1;
9776                               if (stat (file, &st1) != 0)
9777                                 result |= 40;
9778                               else
9779                                 if (st0.st_atime != st1.st_atime)
9780                                   result |= 64;
9781                             }
9782                         }
9783                     }
9784                 }
9785             }
9786             return result;
9787   ;
9788   return 0;
9789 }
9790 _ACEOF
9791 if ac_fn_c_try_run "$LINENO"; then :
9792   gl_cv_header_working_fcntl_h=yes
9793 else
9794   case $? in #(
9795         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9796         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9797         68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9798          *) gl_cv_header_working_fcntl_h='no';;
9799         esac
9800 fi
9801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9802   conftest.$ac_objext conftest.beam conftest.$ac_ext
9803 fi
9804
9805 fi
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9807 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9808
9809   case $gl_cv_header_working_fcntl_h in #(
9810   *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9811   *) ac_val=1;;
9812   esac
9813
9814 cat >>confdefs.h <<_ACEOF
9815 #define HAVE_WORKING_O_NOATIME $ac_val
9816 _ACEOF
9817
9818
9819   case $gl_cv_header_working_fcntl_h in #(
9820   *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9821   *) ac_val=1;;
9822   esac
9823
9824 cat >>confdefs.h <<_ACEOF
9825 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9826 _ACEOF
9827
9828
9829
9830
9831
9832
9833
9834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
9835 $as_echo_n "checking for fseeko... " >&6; }
9836 if test "${gl_cv_func_fseeko+set}" = set; then :
9837   $as_echo_n "(cached) " >&6
9838 else
9839
9840       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841 /* end confdefs.h.  */
9842 #include <stdio.h>
9843
9844 int
9845 main ()
9846 {
9847 fseeko (stdin, 0, 0);
9848   ;
9849   return 0;
9850 }
9851 _ACEOF
9852 if ac_fn_c_try_link "$LINENO"; then :
9853   gl_cv_func_fseeko=yes
9854 else
9855   gl_cv_func_fseeko=no
9856 fi
9857 rm -f core conftest.err conftest.$ac_objext \
9858     conftest$ac_exeext conftest.$ac_ext
9859
9860 fi
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
9862 $as_echo "$gl_cv_func_fseeko" >&6; }
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875   M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891   GNULIB_ACOSL=0;
9892   GNULIB_ASINL=0;
9893   GNULIB_ATANL=0;
9894   GNULIB_CEIL=0;
9895   GNULIB_CEILF=0;
9896   GNULIB_CEILL=0;
9897   GNULIB_COSL=0;
9898   GNULIB_EXPL=0;
9899   GNULIB_FLOOR=0;
9900   GNULIB_FLOORF=0;
9901   GNULIB_FLOORL=0;
9902   GNULIB_FREXP=0;
9903   GNULIB_FREXPL=0;
9904   GNULIB_ISFINITE=0;
9905   GNULIB_ISINF=0;
9906   GNULIB_ISNAN=0;
9907   GNULIB_ISNANF=0;
9908   GNULIB_ISNAND=0;
9909   GNULIB_ISNANL=0;
9910   GNULIB_LDEXPL=0;
9911   GNULIB_LOGB=0;
9912   GNULIB_LOGL=0;
9913   GNULIB_ROUND=0;
9914   GNULIB_ROUNDF=0;
9915   GNULIB_ROUNDL=0;
9916   GNULIB_SIGNBIT=0;
9917   GNULIB_SINL=0;
9918   GNULIB_SQRTL=0;
9919   GNULIB_TANL=0;
9920   GNULIB_TRUNC=0;
9921   GNULIB_TRUNCF=0;
9922   GNULIB_TRUNCL=0;
9923     HAVE_ACOSL=1;
9924   HAVE_ASINL=1;
9925   HAVE_ATANL=1;
9926   HAVE_COSL=1;
9927   HAVE_EXPL=1;
9928   HAVE_ISNANF=1;
9929   HAVE_ISNAND=1;
9930   HAVE_ISNANL=1;
9931   HAVE_LOGL=1;
9932   HAVE_SINL=1;
9933   HAVE_SQRTL=1;
9934   HAVE_TANL=1;
9935   HAVE_DECL_ACOSL=1;
9936   HAVE_DECL_ASINL=1;
9937   HAVE_DECL_ATANL=1;
9938   HAVE_DECL_CEILF=1;
9939   HAVE_DECL_CEILL=1;
9940   HAVE_DECL_COSL=1;
9941   HAVE_DECL_EXPL=1;
9942   HAVE_DECL_FLOORF=1;
9943   HAVE_DECL_FLOORL=1;
9944   HAVE_DECL_FREXPL=1;
9945   HAVE_DECL_LDEXPL=1;
9946   HAVE_DECL_LOGB=1;
9947   HAVE_DECL_LOGL=1;
9948   HAVE_DECL_ROUND=1;
9949   HAVE_DECL_ROUNDF=1;
9950   HAVE_DECL_ROUNDL=1;
9951   HAVE_DECL_SINL=1;
9952   HAVE_DECL_SQRTL=1;
9953   HAVE_DECL_TANL=1;
9954   HAVE_DECL_TRUNC=1;
9955   HAVE_DECL_TRUNCF=1;
9956   HAVE_DECL_TRUNCL=1;
9957   REPLACE_CEIL=0;
9958   REPLACE_CEILF=0;
9959   REPLACE_CEILL=0;
9960   REPLACE_FLOOR=0;
9961   REPLACE_FLOORF=0;
9962   REPLACE_FLOORL=0;
9963   REPLACE_FREXP=0;
9964   REPLACE_FREXPL=0;
9965   REPLACE_HUGE_VAL=0;
9966   REPLACE_ISFINITE=0;
9967   REPLACE_ISINF=0;
9968   REPLACE_ISNAN=0;
9969   REPLACE_LDEXPL=0;
9970   REPLACE_NAN=0;
9971   REPLACE_ROUND=0;
9972   REPLACE_ROUNDF=0;
9973   REPLACE_ROUNDL=0;
9974   REPLACE_SIGNBIT=0;
9975   REPLACE_SIGNBIT_USING_GCC=0;
9976   REPLACE_TRUNC=0;
9977   REPLACE_TRUNCF=0;
9978   REPLACE_TRUNCL=0;
9979
9980
9981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9982 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9983 if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
9984   $as_echo_n "(cached) " >&6
9985 else
9986
9987       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9988 /* end confdefs.h.  */
9989 #include <math.h>
9990              double x;
9991 int
9992 main ()
9993 {
9994 int e; return frexp (x, &e) > 0;
9995   ;
9996   return 0;
9997 }
9998 _ACEOF
9999 if ac_fn_c_try_link "$LINENO"; then :
10000   gl_cv_func_frexp_no_libm=yes
10001 else
10002   gl_cv_func_frexp_no_libm=no
10003 fi
10004 rm -f core conftest.err conftest.$ac_objext \
10005     conftest$ac_exeext conftest.$ac_ext
10006
10007 fi
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
10009 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
10010
10011
10012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10013 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10014 if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
10015   $as_echo_n "(cached) " >&6
10016 else
10017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10018 /* end confdefs.h.  */
10019 #include <stdio.h>
10020 int
10021 main ()
10022 {
10023 #if defined __SL64 && defined __SCLE /* cygwin */
10024   /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10025      fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
10026      it is easier to do a version check than building a runtime test.  */
10027 # include <cygwin/version.h>
10028 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10029   choke me
10030 # endif
10031 #endif
10032   ;
10033   return 0;
10034 }
10035 _ACEOF
10036 if ac_fn_c_try_link "$LINENO"; then :
10037   gl_cv_var_stdin_large_offset=yes
10038 else
10039   gl_cv_var_stdin_large_offset=no
10040 fi
10041 rm -f core conftest.err conftest.$ac_objext \
10042     conftest$ac_exeext conftest.$ac_ext
10043 fi
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10045 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10046
10047 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10048 if test "x$ac_cv_have_decl_fseeko" = x""yes; then :
10049   ac_have_decl=1
10050 else
10051   ac_have_decl=0
10052 fi
10053
10054 cat >>confdefs.h <<_ACEOF
10055 #define HAVE_DECL_FSEEKO $ac_have_decl
10056 _ACEOF
10057
10058 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
10059 if test "x$ac_cv_have_decl_ftello" = x""yes; then :
10060   ac_have_decl=1
10061 else
10062   ac_have_decl=0
10063 fi
10064
10065 cat >>confdefs.h <<_ACEOF
10066 #define HAVE_DECL_FTELLO $ac_have_decl
10067 _ACEOF
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086      if test $gl_cv_have_include_next = yes; then
10087        gl_cv_next_getopt_h='<'getopt.h'>'
10088      else
10089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
10090 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
10091 if test "${gl_cv_next_getopt_h+set}" = set; then :
10092   $as_echo_n "(cached) " >&6
10093 else
10094
10095              if test $ac_cv_header_getopt_h = yes; then
10096
10097
10098                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10099 /* end confdefs.h.  */
10100 #include <getopt.h>
10101
10102 _ACEOF
10103                                                                                                                         case "$host_os" in
10104                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10105                  *)    gl_absname_cpp="$ac_cpp" ;;
10106                esac
10107                                                             gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10108                   sed -n '\#/getopt.h#{
10109                     s#.*"\(.*/getopt.h\)".*#\1#
10110                     s#^/[^/]#//&#
10111                     p
10112                     q
10113                   }'`'"'
10114           else
10115                gl_cv_next_getopt_h='<'getopt.h'>'
10116              fi
10117
10118
10119 fi
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10121 $as_echo "$gl_cv_next_getopt_h" >&6; }
10122      fi
10123      NEXT_GETOPT_H=$gl_cv_next_getopt_h
10124
10125      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10126        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10127        gl_next_as_first_directive='<'getopt.h'>'
10128      else
10129        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10130        gl_next_as_first_directive=$gl_cv_next_getopt_h
10131      fi
10132      NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10133
10134
10135
10136
10137   if test $ac_cv_header_getopt_h = yes; then
10138     HAVE_GETOPT_H=1
10139   else
10140     HAVE_GETOPT_H=0
10141   fi
10142
10143
10144   gl_replace_getopt=
10145
10146     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10147     for ac_header in getopt.h
10148 do :
10149   ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10150 if test "x$ac_cv_header_getopt_h" = x""yes; then :
10151   cat >>confdefs.h <<_ACEOF
10152 #define HAVE_GETOPT_H 1
10153 _ACEOF
10154
10155 else
10156   gl_replace_getopt=yes
10157 fi
10158
10159 done
10160
10161   fi
10162
10163     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10164     for ac_func in getopt_long_only
10165 do :
10166   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10167 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
10168   cat >>confdefs.h <<_ACEOF
10169 #define HAVE_GETOPT_LONG_ONLY 1
10170 _ACEOF
10171
10172 else
10173   gl_replace_getopt=yes
10174 fi
10175 done
10176
10177   fi
10178
10179                     if test -z "$gl_replace_getopt"; then
10180     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10181 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
10182 if test "${gl_cv_func_getopt_posix+set}" = set; then :
10183   $as_echo_n "(cached) " >&6
10184 else
10185
10186                                                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10187 /* end confdefs.h.  */
10188 #include <unistd.h>
10189 int
10190 main ()
10191 {
10192 int *p = &optreset; return optreset;
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 if ac_fn_c_try_compile "$LINENO"; then :
10198   gl_optind_min=1
10199 else
10200   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h.  */
10202 #include <getopt.h>
10203 int
10204 main ()
10205 {
10206 return !getopt_clip;
10207   ;
10208   return 0;
10209 }
10210 _ACEOF
10211 if ac_fn_c_try_compile "$LINENO"; then :
10212   gl_optind_min=1
10213 else
10214   gl_optind_min=0
10215 fi
10216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10217 fi
10218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10219
10220                 gl_save_CPPFLAGS=$CPPFLAGS
10221         CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
10222         if test "$cross_compiling" = yes; then :
10223   case "$host_os" in
10224              mingw*)         gl_cv_func_getopt_posix="guessing no";;
10225              darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
10226              *)              gl_cv_func_getopt_posix="guessing yes";;
10227            esac
10228
10229 else
10230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10231 /* end confdefs.h.  */
10232
10233 #include <unistd.h>
10234 #include <stdlib.h>
10235 #include <string.h>
10236
10237 int
10238 main ()
10239 {
10240   {
10241     int argc = 0;
10242     char *argv[10];
10243     int c;
10244
10245     argv[argc++] = "program";
10246     argv[argc++] = "-a";
10247     argv[argc++] = "foo";
10248     argv[argc++] = "bar";
10249     argv[argc] = NULL;
10250     optind = OPTIND_MIN;
10251     opterr = 0;
10252
10253     c = getopt (argc, argv, "ab");
10254     if (!(c == 'a'))
10255       return 1;
10256     c = getopt (argc, argv, "ab");
10257     if (!(c == -1))
10258       return 2;
10259     if (!(optind == 2))
10260       return 3;
10261   }
10262   /* Some internal state exists at this point.  */
10263   {
10264     int argc = 0;
10265     char *argv[10];
10266     int c;
10267
10268     argv[argc++] = "program";
10269     argv[argc++] = "donald";
10270     argv[argc++] = "-p";
10271     argv[argc++] = "billy";
10272     argv[argc++] = "duck";
10273     argv[argc++] = "-a";
10274     argv[argc++] = "bar";
10275     argv[argc] = NULL;
10276     optind = OPTIND_MIN;
10277     opterr = 0;
10278
10279     c = getopt (argc, argv, "+abp:q:");
10280     if (!(c == -1))
10281       return 4;
10282     if (!(strcmp (argv[0], "program") == 0))
10283       return 5;
10284     if (!(strcmp (argv[1], "donald") == 0))
10285       return 6;
10286     if (!(strcmp (argv[2], "-p") == 0))
10287       return 7;
10288     if (!(strcmp (argv[3], "billy") == 0))
10289       return 8;
10290     if (!(strcmp (argv[4], "duck") == 0))
10291       return 9;
10292     if (!(strcmp (argv[5], "-a") == 0))
10293       return 10;
10294     if (!(strcmp (argv[6], "bar") == 0))
10295       return 11;
10296     if (!(optind == 1))
10297       return 12;
10298   }
10299   /* Detect MacOS 10.5, AIX 7.1 bug.  */
10300   {
10301     char *argv[3] = { "program", "-ab", NULL };
10302     optind = OPTIND_MIN;
10303     opterr = 0;
10304     if (getopt (2, argv, "ab:") != 'a')
10305       return 13;
10306     if (getopt (2, argv, "ab:") != '?')
10307       return 14;
10308     if (optopt != 'b')
10309       return 15;
10310     if (optind != 2)
10311       return 16;
10312   }
10313
10314   return 0;
10315 }
10316
10317 _ACEOF
10318 if ac_fn_c_try_run "$LINENO"; then :
10319   gl_cv_func_getopt_posix=yes
10320 else
10321   gl_cv_func_getopt_posix=no
10322 fi
10323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10324   conftest.$ac_objext conftest.beam conftest.$ac_ext
10325 fi
10326
10327         CPPFLAGS=$gl_save_CPPFLAGS
10328
10329 fi
10330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
10331 $as_echo "$gl_cv_func_getopt_posix" >&6; }
10332     case "$gl_cv_func_getopt_posix" in
10333       *no) gl_replace_getopt=yes ;;
10334     esac
10335   fi
10336
10337   if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
10339 $as_echo_n "checking for working GNU getopt function... " >&6; }
10340 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
10341   $as_echo_n "(cached) " >&6
10342 else
10343   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
10344        # optstring is necessary for programs like m4 that have POSIX-mandated
10345        # semantics for supporting options interspersed with files.
10346        # Also, since getopt_long is a GNU extension, we require optind=0.
10347        # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
10348        # so take care to revert to the correct (non-)export state.
10349        gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
10350        case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
10351          xx) gl_had_POSIXLY_CORRECT=exported ;;
10352          x)  gl_had_POSIXLY_CORRECT=yes      ;;
10353          *)  gl_had_POSIXLY_CORRECT=         ;;
10354        esac
10355        POSIXLY_CORRECT=1
10356        export POSIXLY_CORRECT
10357        if test "$cross_compiling" = yes; then :
10358            case $host_os:$ac_cv_have_decl_optreset in
10359            *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
10360            *:yes)               gl_cv_func_getopt_gnu=no;;
10361            *)                   gl_cv_func_getopt_gnu=yes;;
10362          esac
10363
10364 else
10365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10366 /* end confdefs.h.  */
10367 #include <getopt.h>
10368                            #include <stddef.h>
10369                            #include <string.h>
10370
10371 int
10372 main ()
10373 {
10374
10375              int result = 0;
10376              /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
10377                 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
10378                 OSF/1 5.1, Solaris 10.  */
10379              {
10380                char *myargv[3];
10381                myargv[0] = "conftest";
10382                myargv[1] = "-+";
10383                myargv[2] = 0;
10384                opterr = 0;
10385                if (getopt (2, myargv, "+a") != '?')
10386                  result |= 1;
10387              }
10388              /* This code succeeds on glibc 2.8, mingw,
10389                 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
10390                 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
10391              {
10392                char *argv[] = { "program", "-p", "foo", "bar", NULL };
10393
10394                optind = 1;
10395                if (getopt (4, argv, "p::") != 'p')
10396                  result |= 2;
10397                else if (optarg != NULL)
10398                  result |= 4;
10399                else if (getopt (4, argv, "p::") != -1)
10400                  result |= 6;
10401                else if (optind != 2)
10402                  result |= 8;
10403              }
10404              /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
10405              {
10406                char *argv[] = { "program", "foo", "-p", NULL };
10407                optind = 0;
10408                if (getopt (3, argv, "-p") != 1)
10409                  result |= 16;
10410                else if (getopt (3, argv, "-p") != 'p')
10411                  result |= 32;
10412              }
10413              /* This code fails on glibc 2.11.  */
10414              {
10415                char *argv[] = { "program", "-b", "-a", NULL };
10416                optind = opterr = 0;
10417                if (getopt (3, argv, "+:a:b") != 'b')
10418                  result |= 64;
10419                else if (getopt (3, argv, "+:a:b") != ':')
10420                  result |= 64;
10421              }
10422              return result;
10423
10424   ;
10425   return 0;
10426 }
10427 _ACEOF
10428 if ac_fn_c_try_run "$LINENO"; then :
10429   gl_cv_func_getopt_gnu=yes
10430 else
10431   gl_cv_func_getopt_gnu=no
10432 fi
10433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10434   conftest.$ac_objext conftest.beam conftest.$ac_ext
10435 fi
10436
10437        case $gl_had_POSIXLY_CORRECT in
10438          exported) ;;
10439          yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
10440          *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
10441        esac
10442
10443 fi
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
10445 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
10446     if test "$gl_cv_func_getopt_gnu" = "no"; then
10447       gl_replace_getopt=yes
10448     fi
10449   fi
10450
10451 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
10452 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
10453   ac_have_decl=1
10454 else
10455   ac_have_decl=0
10456 fi
10457
10458 cat >>confdefs.h <<_ACEOF
10459 #define HAVE_DECL_GETENV $ac_have_decl
10460 _ACEOF
10461
10462
10463
10464
10465
10466
10467   if test -n "$gl_replace_getopt"; then :
10468
10469
10470
10471   GETOPT_H=getopt.h
10472
10473 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
10474
10475
10476
10477     GNULIB_UNISTD_H_GETOPT=1
10478
10479
10480
10481
10482
10483
10484
10485
10486   M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496   M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
10497
10498
10499
10500
10501
10502
10503 fi
10504
10505
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10507 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10508 if test "${ac_cv_c_restrict+set}" = set; then :
10509   $as_echo_n "(cached) " >&6
10510 else
10511   ac_cv_c_restrict=no
10512    # The order here caters to the fact that C++ does not require restrict.
10513    for ac_kw in __restrict __restrict__ _Restrict restrict; do
10514      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10515 /* end confdefs.h.  */
10516 typedef int * int_ptr;
10517         int foo (int_ptr $ac_kw ip) {
10518         return ip[0];
10519        }
10520 int
10521 main ()
10522 {
10523 int s[1];
10524         int * $ac_kw t = s;
10525         t[0] = 0;
10526         return foo(t)
10527   ;
10528   return 0;
10529 }
10530 _ACEOF
10531 if ac_fn_c_try_compile "$LINENO"; then :
10532   ac_cv_c_restrict=$ac_kw
10533 fi
10534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10535      test "$ac_cv_c_restrict" != no && break
10536    done
10537
10538 fi
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10540 $as_echo "$ac_cv_c_restrict" >&6; }
10541
10542  case $ac_cv_c_restrict in
10543    restrict) ;;
10544    no) $as_echo "#define restrict /**/" >>confdefs.h
10545  ;;
10546    *)  cat >>confdefs.h <<_ACEOF
10547 #define restrict $ac_cv_c_restrict
10548 _ACEOF
10549  ;;
10550  esac
10551
10552
10553   GNULIB_GETTIMEOFDAY=0;
10554     HAVE_GETTIMEOFDAY=1;
10555   HAVE_STRUCT_TIMEVAL=1;
10556   HAVE_SYS_TIME_H=1;
10557   REPLACE_GETTIMEOFDAY=0;
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574      if test $gl_cv_have_include_next = yes; then
10575        gl_cv_next_sys_time_h='<'sys/time.h'>'
10576      else
10577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10578 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
10579 if test "${gl_cv_next_sys_time_h+set}" = set; then :
10580   $as_echo_n "(cached) " >&6
10581 else
10582
10583              if test $ac_cv_header_sys_time_h = yes; then
10584
10585
10586                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10587 /* end confdefs.h.  */
10588 #include <sys/time.h>
10589
10590 _ACEOF
10591                                                                                                                         case "$host_os" in
10592                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
10593                  *)    gl_absname_cpp="$ac_cpp" ;;
10594                esac
10595                                                             gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10596                   sed -n '\#/sys/time.h#{
10597                     s#.*"\(.*/sys/time.h\)".*#\1#
10598                     s#^/[^/]#//&#
10599                     p
10600                     q
10601                   }'`'"'
10602           else
10603                gl_cv_next_sys_time_h='<'sys/time.h'>'
10604              fi
10605
10606
10607 fi
10608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10609 $as_echo "$gl_cv_next_sys_time_h" >&6; }
10610      fi
10611      NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10612
10613      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10614        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10615        gl_next_as_first_directive='<'sys/time.h'>'
10616      else
10617        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10618        gl_next_as_first_directive=$gl_cv_next_sys_time_h
10619      fi
10620      NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10621
10622
10623
10624
10625
10626   if test $ac_cv_header_sys_time_h != yes; then
10627     HAVE_SYS_TIME_H=0
10628   fi
10629
10630   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10631 $as_echo_n "checking for struct timeval... " >&6; }
10632 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
10633   $as_echo_n "(cached) " >&6
10634 else
10635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10636 /* end confdefs.h.  */
10637 #if HAVE_SYS_TIME_H
10638              #include <sys/time.h>
10639             #endif
10640             #include <time.h>
10641
10642 int
10643 main ()
10644 {
10645 static struct timeval x; x.tv_sec = x.tv_usec;
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 if ac_fn_c_try_compile "$LINENO"; then :
10651   gl_cv_sys_struct_timeval=yes
10652 else
10653   gl_cv_sys_struct_timeval=no
10654 fi
10655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10656 fi
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
10658 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
10659   if test $gl_cv_sys_struct_timeval != yes; then
10660     HAVE_STRUCT_TIMEVAL=0
10661   fi
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
10672 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
10673 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
10674   $as_echo_n "(cached) " >&6
10675 else
10676
10677       if test "$cross_compiling" = yes; then :
10678   gl_cv_cc_float_expbit0="word 0 bit 23"
10679 else
10680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10681 /* end confdefs.h.  */
10682
10683 #include <float.h>
10684 #include <stddef.h>
10685 #include <stdio.h>
10686 #include <string.h>
10687 #define NWORDS \
10688   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
10689 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
10690 static unsigned int ored_words[NWORDS];
10691 static unsigned int anded_words[NWORDS];
10692 static void add_to_ored_words (float x)
10693 {
10694   memory_float m;
10695   size_t i;
10696   /* Clear it first, in case
10697      sizeof (float) < sizeof (memory_float).  */
10698   memset (&m, 0, sizeof (memory_float));
10699   m.value = x;
10700   for (i = 0; i < NWORDS; i++)
10701     {
10702       ored_words[i] |= m.word[i];
10703       anded_words[i] &= m.word[i];
10704     }
10705 }
10706 int main ()
10707 {
10708   size_t j;
10709   FILE *fp = fopen ("conftest.out", "w");
10710   if (fp == NULL)
10711     return 1;
10712   for (j = 0; j < NWORDS; j++)
10713     anded_words[j] = ~ (unsigned int) 0;
10714   add_to_ored_words (0.25f);
10715   add_to_ored_words (0.5f);
10716   add_to_ored_words (1.0f);
10717   add_to_ored_words (2.0f);
10718   add_to_ored_words (4.0f);
10719   /* Remove bits that are common (e.g. if representation of the first mantissa
10720      bit is explicit).  */
10721   for (j = 0; j < NWORDS; j++)
10722     ored_words[j] &= ~anded_words[j];
10723   /* Now find the nonzero word.  */
10724   for (j = 0; j < NWORDS; j++)
10725     if (ored_words[j] != 0)
10726       break;
10727   if (j < NWORDS)
10728     {
10729       size_t i;
10730       for (i = j + 1; i < NWORDS; i++)
10731         if (ored_words[i] != 0)
10732           {
10733             fprintf (fp, "unknown");
10734             return (fclose (fp) != 0);
10735           }
10736       for (i = 0; ; i++)
10737         if ((ored_words[j] >> i) & 1)
10738           {
10739             fprintf (fp, "word %d bit %d", (int) j, (int) i);
10740             return (fclose (fp) != 0);
10741           }
10742     }
10743   fprintf (fp, "unknown");
10744   return (fclose (fp) != 0);
10745 }
10746
10747 _ACEOF
10748 if ac_fn_c_try_run "$LINENO"; then :
10749   gl_cv_cc_float_expbit0=`cat conftest.out`
10750 else
10751   gl_cv_cc_float_expbit0="unknown"
10752 fi
10753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10754   conftest.$ac_objext conftest.beam conftest.$ac_ext
10755 fi
10756
10757       rm -f conftest.out
10758
10759 fi
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
10761 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
10762   case "$gl_cv_cc_float_expbit0" in
10763     word*bit*)
10764       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
10765       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
10766
10767 cat >>confdefs.h <<_ACEOF
10768 #define FLT_EXPBIT0_WORD $word
10769 _ACEOF
10770
10771
10772 cat >>confdefs.h <<_ACEOF
10773 #define FLT_EXPBIT0_BIT $bit
10774 _ACEOF
10775
10776       ;;
10777   esac
10778
10779
10780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10781 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10782 if test "${ac_cv_c_bigendian+set}" = set; then :
10783   $as_echo_n "(cached) " >&6
10784 else
10785   ac_cv_c_bigendian=unknown
10786     # See if we're dealing with a universal compiler.
10787     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10788 /* end confdefs.h.  */
10789 #ifndef __APPLE_CC__
10790                not a universal capable compiler
10791              #endif
10792              typedef int dummy;
10793
10794 _ACEOF
10795 if ac_fn_c_try_compile "$LINENO"; then :
10796
10797         # Check for potential -arch flags.  It is not universal unless
10798         # there are at least two -arch flags with different values.
10799         ac_arch=
10800         ac_prev=
10801         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10802          if test -n "$ac_prev"; then
10803            case $ac_word in
10804              i?86 | x86_64 | ppc | ppc64)
10805                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10806                  ac_arch=$ac_word
10807                else
10808                  ac_cv_c_bigendian=universal
10809                  break
10810                fi
10811                ;;
10812            esac
10813            ac_prev=
10814          elif test "x$ac_word" = "x-arch"; then
10815            ac_prev=arch
10816          fi
10817        done
10818 fi
10819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10820     if test $ac_cv_c_bigendian = unknown; then
10821       # See if sys/param.h defines the BYTE_ORDER macro.
10822       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823 /* end confdefs.h.  */
10824 #include <sys/types.h>
10825              #include <sys/param.h>
10826
10827 int
10828 main ()
10829 {
10830 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10831                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10832                      && LITTLE_ENDIAN)
10833               bogus endian macros
10834              #endif
10835
10836   ;
10837   return 0;
10838 }
10839 _ACEOF
10840 if ac_fn_c_try_compile "$LINENO"; then :
10841   # It does; now see whether it defined to BIG_ENDIAN or not.
10842          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h.  */
10844 #include <sys/types.h>
10845                 #include <sys/param.h>
10846
10847 int
10848 main ()
10849 {
10850 #if BYTE_ORDER != BIG_ENDIAN
10851                  not big endian
10852                 #endif
10853
10854   ;
10855   return 0;
10856 }
10857 _ACEOF
10858 if ac_fn_c_try_compile "$LINENO"; then :
10859   ac_cv_c_bigendian=yes
10860 else
10861   ac_cv_c_bigendian=no
10862 fi
10863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10864 fi
10865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10866     fi
10867     if test $ac_cv_c_bigendian = unknown; then
10868       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10869       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870 /* end confdefs.h.  */
10871 #include <limits.h>
10872
10873 int
10874 main ()
10875 {
10876 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10877               bogus endian macros
10878              #endif
10879
10880   ;
10881   return 0;
10882 }
10883 _ACEOF
10884 if ac_fn_c_try_compile "$LINENO"; then :
10885   # It does; now see whether it defined to _BIG_ENDIAN or not.
10886          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887 /* end confdefs.h.  */
10888 #include <limits.h>
10889
10890 int
10891 main ()
10892 {
10893 #ifndef _BIG_ENDIAN
10894                  not big endian
10895                 #endif
10896
10897   ;
10898   return 0;
10899 }
10900 _ACEOF
10901 if ac_fn_c_try_compile "$LINENO"; then :
10902   ac_cv_c_bigendian=yes
10903 else
10904   ac_cv_c_bigendian=no
10905 fi
10906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907 fi
10908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909     fi
10910     if test $ac_cv_c_bigendian = unknown; then
10911       # Compile a test program.
10912       if test "$cross_compiling" = yes; then :
10913   # Try to guess by grepping values from an object file.
10914          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h.  */
10916 short int ascii_mm[] =
10917                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10918                 short int ascii_ii[] =
10919                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10920                 int use_ascii (int i) {
10921                   return ascii_mm[i] + ascii_ii[i];
10922                 }
10923                 short int ebcdic_ii[] =
10924                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10925                 short int ebcdic_mm[] =
10926                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10927                 int use_ebcdic (int i) {
10928                   return ebcdic_mm[i] + ebcdic_ii[i];
10929                 }
10930                 extern int foo;
10931
10932 int
10933 main ()
10934 {
10935 return use_ascii (foo) == use_ebcdic (foo);
10936   ;
10937   return 0;
10938 }
10939 _ACEOF
10940 if ac_fn_c_try_compile "$LINENO"; then :
10941   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
10942               ac_cv_c_bigendian=yes
10943             fi
10944             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10945               if test "$ac_cv_c_bigendian" = unknown; then
10946                 ac_cv_c_bigendian=no
10947               else
10948                 # finding both strings is unlikely to happen, but who knows?
10949                 ac_cv_c_bigendian=unknown
10950               fi
10951             fi
10952 fi
10953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10954 else
10955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956 /* end confdefs.h.  */
10957 $ac_includes_default
10958 int
10959 main ()
10960 {
10961
10962              /* Are we little or big endian?  From Harbison&Steele.  */
10963              union
10964              {
10965                long int l;
10966                char c[sizeof (long int)];
10967              } u;
10968              u.l = 1;
10969              return u.c[sizeof (long int) - 1] == 1;
10970
10971   ;
10972   return 0;
10973 }
10974 _ACEOF
10975 if ac_fn_c_try_run "$LINENO"; then :
10976   ac_cv_c_bigendian=no
10977 else
10978   ac_cv_c_bigendian=yes
10979 fi
10980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10981   conftest.$ac_objext conftest.beam conftest.$ac_ext
10982 fi
10983
10984     fi
10985 fi
10986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
10987 $as_echo "$ac_cv_c_bigendian" >&6; }
10988  case $ac_cv_c_bigendian in #(
10989    yes)
10990      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
10991 ;; #(
10992    no)
10993       ;; #(
10994    universal)
10995
10996 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
10997
10998      ;; #(
10999    *)
11000      as_fn_error $? "unknown endianness
11001  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11002  esac
11003
11004
11005
11006   GNULIB_NL_LANGINFO=0;
11007     HAVE_NL_LANGINFO=1;
11008   REPLACE_NL_LANGINFO=0;
11009
11010
11011
11012 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
11013 if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
11014   ac_have_decl=1
11015 else
11016   ac_have_decl=0
11017 fi
11018
11019 cat >>confdefs.h <<_ACEOF
11020 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
11021 _ACEOF
11022
11023
11024     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11025 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
11026 if test "${ac_cv_gnu_library_2_1+set}" = set; then :
11027   $as_echo_n "(cached) " >&6
11028 else
11029   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11030 /* end confdefs.h.  */
11031
11032 #include <features.h>
11033 #ifdef __GNU_LIBRARY__
11034  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11035   Lucky GNU user
11036  #endif
11037 #endif
11038 #ifdef __UCLIBC__
11039  Lucky user
11040 #endif
11041
11042 _ACEOF
11043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11044   $EGREP "Lucky" >/dev/null 2>&1; then :
11045   ac_cv_gnu_library_2_1=yes
11046 else
11047   ac_cv_gnu_library_2_1=no
11048 fi
11049 rm -f conftest*
11050
11051
11052
11053 fi
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11055 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
11056
11057     GLIBC21="$ac_cv_gnu_library_2_1"
11058
11059
11060
11061
11062   gl_threads_api=none
11063   LIBTHREAD=
11064   LTLIBTHREAD=
11065   LIBMULTITHREAD=
11066   LTLIBMULTITHREAD=
11067   if test "$gl_use_threads" != no; then
11068         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11069 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11070 if test "${gl_cv_have_weak+set}" = set; then :
11071   $as_echo_n "(cached) " >&6
11072 else
11073   gl_cv_have_weak=no
11074               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075 /* end confdefs.h.  */
11076 extern void xyzzy ();
11077 #pragma weak xyzzy
11078 int
11079 main ()
11080 {
11081 xyzzy();
11082   ;
11083   return 0;
11084 }
11085 _ACEOF
11086 if ac_fn_c_try_link "$LINENO"; then :
11087   gl_cv_have_weak=maybe
11088 fi
11089 rm -f core conftest.err conftest.$ac_objext \
11090     conftest$ac_exeext conftest.$ac_ext
11091        if test $gl_cv_have_weak = maybe; then
11092                            if test "$cross_compiling" = yes; then :
11093                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11094 /* end confdefs.h.  */
11095 #ifdef __ELF__
11096                Extensible Linking Format
11097                #endif
11098
11099 _ACEOF
11100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11101   $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11102   gl_cv_have_weak="guessing yes"
11103 else
11104   gl_cv_have_weak="guessing no"
11105 fi
11106 rm -f conftest*
11107
11108
11109 else
11110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111 /* end confdefs.h.  */
11112
11113 #include <stdio.h>
11114 #pragma weak fputs
11115 int main ()
11116 {
11117   return (fputs == NULL);
11118 }
11119 _ACEOF
11120 if ac_fn_c_try_run "$LINENO"; then :
11121   gl_cv_have_weak=yes
11122 else
11123   gl_cv_have_weak=no
11124 fi
11125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11126   conftest.$ac_objext conftest.beam conftest.$ac_ext
11127 fi
11128
11129        fi
11130
11131 fi
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11133 $as_echo "$gl_cv_have_weak" >&6; }
11134     if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
11135       # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11136       # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
11137       ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11138 if test "x$ac_cv_header_pthread_h" = x""yes; then :
11139   gl_have_pthread_h=yes
11140 else
11141   gl_have_pthread_h=no
11142 fi
11143
11144
11145       if test "$gl_have_pthread_h" = yes; then
11146         # Other possible tests:
11147         #   -lpthreads (FSU threads, PCthreads)
11148         #   -lgthreads
11149         gl_have_pthread=
11150         # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11151         # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11152         # the second one only in libpthread, and lock.c needs it.
11153         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11154 /* end confdefs.h.  */
11155 #include <pthread.h>
11156 int
11157 main ()
11158 {
11159 pthread_mutex_lock((pthread_mutex_t*)0);
11160                pthread_mutexattr_init((pthread_mutexattr_t*)0);
11161   ;
11162   return 0;
11163 }
11164 _ACEOF
11165 if ac_fn_c_try_link "$LINENO"; then :
11166   gl_have_pthread=yes
11167 fi
11168 rm -f core conftest.err conftest.$ac_objext \
11169     conftest$ac_exeext conftest.$ac_ext
11170         # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11171         # since it is defined as a macro on OSF/1.)
11172         if test -n "$gl_have_pthread"; then
11173           # The program links fine without libpthread. But it may actually
11174           # need to link with libpthread in order to create multiple threads.
11175           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11176 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11177 if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
11178   $as_echo_n "(cached) " >&6
11179 else
11180   ac_check_lib_save_LIBS=$LIBS
11181 LIBS="-lpthread  $LIBS"
11182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183 /* end confdefs.h.  */
11184
11185 /* Override any GCC internal prototype to avoid an error.
11186    Use char because int might match the return type of a GCC
11187    builtin and then its argument prototype would still apply.  */
11188 #ifdef __cplusplus
11189 extern "C"
11190 #endif
11191 char pthread_kill ();
11192 int
11193 main ()
11194 {
11195 return pthread_kill ();
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 if ac_fn_c_try_link "$LINENO"; then :
11201   ac_cv_lib_pthread_pthread_kill=yes
11202 else
11203   ac_cv_lib_pthread_pthread_kill=no
11204 fi
11205 rm -f core conftest.err conftest.$ac_objext \
11206     conftest$ac_exeext conftest.$ac_ext
11207 LIBS=$ac_check_lib_save_LIBS
11208 fi
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11210 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11211 if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
11212   LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
11213              # On Solaris and HP-UX, most pthread functions exist also in libc.
11214              # Therefore pthread_in_use() needs to actually try to create a
11215              # thread: pthread_create from libc will fail, whereas
11216              # pthread_create will actually create a thread.
11217              case "$host_os" in
11218                solaris* | hpux*)
11219
11220 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11221
11222              esac
11223
11224 fi
11225
11226         else
11227           # Some library is needed. Try libpthread and libc_r.
11228           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11229 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11230 if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
11231   $as_echo_n "(cached) " >&6
11232 else
11233   ac_check_lib_save_LIBS=$LIBS
11234 LIBS="-lpthread  $LIBS"
11235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236 /* end confdefs.h.  */
11237
11238 /* Override any GCC internal prototype to avoid an error.
11239    Use char because int might match the return type of a GCC
11240    builtin and then its argument prototype would still apply.  */
11241 #ifdef __cplusplus
11242 extern "C"
11243 #endif
11244 char pthread_kill ();
11245 int
11246 main ()
11247 {
11248 return pthread_kill ();
11249   ;
11250   return 0;
11251 }
11252 _ACEOF
11253 if ac_fn_c_try_link "$LINENO"; then :
11254   ac_cv_lib_pthread_pthread_kill=yes
11255 else
11256   ac_cv_lib_pthread_pthread_kill=no
11257 fi
11258 rm -f core conftest.err conftest.$ac_objext \
11259     conftest$ac_exeext conftest.$ac_ext
11260 LIBS=$ac_check_lib_save_LIBS
11261 fi
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11263 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11264 if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
11265   gl_have_pthread=yes
11266              LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
11267              LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
11268 fi
11269
11270           if test -z "$gl_have_pthread"; then
11271             # For FreeBSD 4.
11272             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11273 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11274 if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then :
11275   $as_echo_n "(cached) " >&6
11276 else
11277   ac_check_lib_save_LIBS=$LIBS
11278 LIBS="-lc_r  $LIBS"
11279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11280 /* end confdefs.h.  */
11281
11282 /* Override any GCC internal prototype to avoid an error.
11283    Use char because int might match the return type of a GCC
11284    builtin and then its argument prototype would still apply.  */
11285 #ifdef __cplusplus
11286 extern "C"
11287 #endif
11288 char pthread_kill ();
11289 int
11290 main ()
11291 {
11292 return pthread_kill ();
11293   ;
11294   return 0;
11295 }
11296 _ACEOF
11297 if ac_fn_c_try_link "$LINENO"; then :
11298   ac_cv_lib_c_r_pthread_kill=yes
11299 else
11300   ac_cv_lib_c_r_pthread_kill=no
11301 fi
11302 rm -f core conftest.err conftest.$ac_objext \
11303     conftest$ac_exeext conftest.$ac_ext
11304 LIBS=$ac_check_lib_save_LIBS
11305 fi
11306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11307 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11308 if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then :
11309   gl_have_pthread=yes
11310                LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
11311                LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
11312 fi
11313
11314           fi
11315         fi
11316         if test -n "$gl_have_pthread"; then
11317           gl_threads_api=posix
11318
11319 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
11320
11321           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
11322             if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11323
11324 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
11325
11326               LIBTHREAD=
11327               LTLIBTHREAD=
11328             fi
11329           fi
11330         fi
11331       fi
11332     fi
11333     if test -z "$gl_have_pthread"; then
11334       if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
11335         gl_have_solaristhread=
11336         gl_save_LIBS="$LIBS"
11337         LIBS="$LIBS -lthread"
11338         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339 /* end confdefs.h.  */
11340
11341 #include <thread.h>
11342 #include <synch.h>
11343
11344 int
11345 main ()
11346 {
11347 thr_self();
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 if ac_fn_c_try_link "$LINENO"; then :
11353   gl_have_solaristhread=yes
11354 fi
11355 rm -f core conftest.err conftest.$ac_objext \
11356     conftest$ac_exeext conftest.$ac_ext
11357         LIBS="$gl_save_LIBS"
11358         if test -n "$gl_have_solaristhread"; then
11359           gl_threads_api=solaris
11360           LIBTHREAD=-lthread
11361           LTLIBTHREAD=-lthread
11362           LIBMULTITHREAD="$LIBTHREAD"
11363           LTLIBMULTITHREAD="$LTLIBTHREAD"
11364
11365 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
11366
11367           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11368
11369 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
11370
11371             LIBTHREAD=
11372             LTLIBTHREAD=
11373           fi
11374         fi
11375       fi
11376     fi
11377     if test "$gl_use_threads" = pth; then
11378       gl_save_CPPFLAGS="$CPPFLAGS"
11379
11380
11381
11382
11383
11384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
11385 $as_echo_n "checking how to link with libpth... " >&6; }
11386 if test "${ac_cv_libpth_libs+set}" = set; then :
11387   $as_echo_n "(cached) " >&6
11388 else
11389
11390
11391
11392
11393
11394
11395
11396
11397     use_additional=yes
11398
11399   acl_save_prefix="$prefix"
11400   prefix="$acl_final_prefix"
11401   acl_save_exec_prefix="$exec_prefix"
11402   exec_prefix="$acl_final_exec_prefix"
11403
11404     eval additional_includedir=\"$includedir\"
11405     eval additional_libdir=\"$libdir\"
11406
11407   exec_prefix="$acl_save_exec_prefix"
11408   prefix="$acl_save_prefix"
11409
11410
11411 # Check whether --with-libpth-prefix was given.
11412 if test "${with_libpth_prefix+set}" = set; then :
11413   withval=$with_libpth_prefix;
11414     if test "X$withval" = "Xno"; then
11415       use_additional=no
11416     else
11417       if test "X$withval" = "X"; then
11418
11419   acl_save_prefix="$prefix"
11420   prefix="$acl_final_prefix"
11421   acl_save_exec_prefix="$exec_prefix"
11422   exec_prefix="$acl_final_exec_prefix"
11423
11424           eval additional_includedir=\"$includedir\"
11425           eval additional_libdir=\"$libdir\"
11426
11427   exec_prefix="$acl_save_exec_prefix"
11428   prefix="$acl_save_prefix"
11429
11430       else
11431         additional_includedir="$withval/include"
11432         additional_libdir="$withval/$acl_libdirstem"
11433         if test "$acl_libdirstem2" != "$acl_libdirstem" \
11434            && ! test -d "$withval/$acl_libdirstem"; then
11435           additional_libdir="$withval/$acl_libdirstem2"
11436         fi
11437       fi
11438     fi
11439
11440 fi
11441
11442       LIBPTH=
11443   LTLIBPTH=
11444   INCPTH=
11445   LIBPTH_PREFIX=
11446       HAVE_LIBPTH=
11447   rpathdirs=
11448   ltrpathdirs=
11449   names_already_handled=
11450   names_next_round='pth '
11451   while test -n "$names_next_round"; do
11452     names_this_round="$names_next_round"
11453     names_next_round=
11454     for name in $names_this_round; do
11455       already_handled=
11456       for n in $names_already_handled; do
11457         if test "$n" = "$name"; then
11458           already_handled=yes
11459           break
11460         fi
11461       done
11462       if test -z "$already_handled"; then
11463         names_already_handled="$names_already_handled $name"
11464                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11465         eval value=\"\$HAVE_LIB$uppername\"
11466         if test -n "$value"; then
11467           if test "$value" = yes; then
11468             eval value=\"\$LIB$uppername\"
11469             test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
11470             eval value=\"\$LTLIB$uppername\"
11471             test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
11472           else
11473                                     :
11474           fi
11475         else
11476                               found_dir=
11477           found_la=
11478           found_so=
11479           found_a=
11480           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
11481           if test -n "$acl_shlibext"; then
11482             shrext=".$acl_shlibext"             # typically: shrext=.so
11483           else
11484             shrext=
11485           fi
11486           if test $use_additional = yes; then
11487             dir="$additional_libdir"
11488                                     if test -n "$acl_shlibext"; then
11489               if test -f "$dir/$libname$shrext"; then
11490                 found_dir="$dir"
11491                 found_so="$dir/$libname$shrext"
11492               else
11493                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11494                   ver=`(cd "$dir" && \
11495                         for f in "$libname$shrext".*; do echo "$f"; done \
11496                         | sed -e "s,^$libname$shrext\\\\.,," \
11497                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11498                         | sed 1q ) 2>/dev/null`
11499                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11500                     found_dir="$dir"
11501                     found_so="$dir/$libname$shrext.$ver"
11502                   fi
11503                 else
11504                   eval library_names=\"$acl_library_names_spec\"
11505                   for f in $library_names; do
11506                     if test -f "$dir/$f"; then
11507                       found_dir="$dir"
11508                       found_so="$dir/$f"
11509                       break
11510                     fi
11511                   done
11512                 fi
11513               fi
11514             fi
11515                         if test "X$found_dir" = "X"; then
11516               if test -f "$dir/$libname.$acl_libext"; then
11517                 found_dir="$dir"
11518                 found_a="$dir/$libname.$acl_libext"
11519               fi
11520             fi
11521             if test "X$found_dir" != "X"; then
11522               if test -f "$dir/$libname.la"; then
11523                 found_la="$dir/$libname.la"
11524               fi
11525             fi
11526           fi
11527           if test "X$found_dir" = "X"; then
11528             for x in $LDFLAGS $LTLIBPTH; do
11529
11530   acl_save_prefix="$prefix"
11531   prefix="$acl_final_prefix"
11532   acl_save_exec_prefix="$exec_prefix"
11533   exec_prefix="$acl_final_exec_prefix"
11534   eval x=\"$x\"
11535   exec_prefix="$acl_save_exec_prefix"
11536   prefix="$acl_save_prefix"
11537
11538               case "$x" in
11539                 -L*)
11540                   dir=`echo "X$x" | sed -e 's/^X-L//'`
11541                                     if test -n "$acl_shlibext"; then
11542                     if test -f "$dir/$libname$shrext"; then
11543                       found_dir="$dir"
11544                       found_so="$dir/$libname$shrext"
11545                     else
11546                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11547                         ver=`(cd "$dir" && \
11548                               for f in "$libname$shrext".*; do echo "$f"; done \
11549                               | sed -e "s,^$libname$shrext\\\\.,," \
11550                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11551                               | sed 1q ) 2>/dev/null`
11552                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11553                           found_dir="$dir"
11554                           found_so="$dir/$libname$shrext.$ver"
11555                         fi
11556                       else
11557                         eval library_names=\"$acl_library_names_spec\"
11558                         for f in $library_names; do
11559                           if test -f "$dir/$f"; then
11560                             found_dir="$dir"
11561                             found_so="$dir/$f"
11562                             break
11563                           fi
11564                         done
11565                       fi
11566                     fi
11567                   fi
11568                                     if test "X$found_dir" = "X"; then
11569                     if test -f "$dir/$libname.$acl_libext"; then
11570                       found_dir="$dir"
11571                       found_a="$dir/$libname.$acl_libext"
11572                     fi
11573                   fi
11574                   if test "X$found_dir" != "X"; then
11575                     if test -f "$dir/$libname.la"; then
11576                       found_la="$dir/$libname.la"
11577                     fi
11578                   fi
11579                   ;;
11580               esac
11581               if test "X$found_dir" != "X"; then
11582                 break
11583               fi
11584             done
11585           fi
11586           if test "X$found_dir" != "X"; then
11587                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
11588             if test "X$found_so" != "X"; then
11589                                                         if test "$enable_rpath" = no \
11590                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11591                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
11592                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11593               else
11594                                                                                 haveit=
11595                 for x in $ltrpathdirs; do
11596                   if test "X$x" = "X$found_dir"; then
11597                     haveit=yes
11598                     break
11599                   fi
11600                 done
11601                 if test -z "$haveit"; then
11602                   ltrpathdirs="$ltrpathdirs $found_dir"
11603                 fi
11604                                 if test "$acl_hardcode_direct" = yes; then
11605                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11606                 else
11607                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11608                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11609                                                             haveit=
11610                     for x in $rpathdirs; do
11611                       if test "X$x" = "X$found_dir"; then
11612                         haveit=yes
11613                         break
11614                       fi
11615                     done
11616                     if test -z "$haveit"; then
11617                       rpathdirs="$rpathdirs $found_dir"
11618                     fi
11619                   else
11620                                                                                 haveit=
11621                     for x in $LDFLAGS $LIBPTH; do
11622
11623   acl_save_prefix="$prefix"
11624   prefix="$acl_final_prefix"
11625   acl_save_exec_prefix="$exec_prefix"
11626   exec_prefix="$acl_final_exec_prefix"
11627   eval x=\"$x\"
11628   exec_prefix="$acl_save_exec_prefix"
11629   prefix="$acl_save_prefix"
11630
11631                       if test "X$x" = "X-L$found_dir"; then
11632                         haveit=yes
11633                         break
11634                       fi
11635                     done
11636                     if test -z "$haveit"; then
11637                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
11638                     fi
11639                     if test "$acl_hardcode_minus_L" != no; then
11640                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
11641                     else
11642                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
11643                     fi
11644                   fi
11645                 fi
11646               fi
11647             else
11648               if test "X$found_a" != "X"; then
11649                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
11650               else
11651                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
11652               fi
11653             fi
11654                         additional_includedir=
11655             case "$found_dir" in
11656               */$acl_libdirstem | */$acl_libdirstem/)
11657                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11658                 if test "$name" = 'pth'; then
11659                   LIBPTH_PREFIX="$basedir"
11660                 fi
11661                 additional_includedir="$basedir/include"
11662                 ;;
11663               */$acl_libdirstem2 | */$acl_libdirstem2/)
11664                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11665                 if test "$name" = 'pth'; then
11666                   LIBPTH_PREFIX="$basedir"
11667                 fi
11668                 additional_includedir="$basedir/include"
11669                 ;;
11670             esac
11671             if test "X$additional_includedir" != "X"; then
11672                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
11673                 haveit=
11674                 if test "X$additional_includedir" = "X/usr/local/include"; then
11675                   if test -n "$GCC"; then
11676                     case $host_os in
11677                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11678                     esac
11679                   fi
11680                 fi
11681                 if test -z "$haveit"; then
11682                   for x in $CPPFLAGS $INCPTH; do
11683
11684   acl_save_prefix="$prefix"
11685   prefix="$acl_final_prefix"
11686   acl_save_exec_prefix="$exec_prefix"
11687   exec_prefix="$acl_final_exec_prefix"
11688   eval x=\"$x\"
11689   exec_prefix="$acl_save_exec_prefix"
11690   prefix="$acl_save_prefix"
11691
11692                     if test "X$x" = "X-I$additional_includedir"; then
11693                       haveit=yes
11694                       break
11695                     fi
11696                   done
11697                   if test -z "$haveit"; then
11698                     if test -d "$additional_includedir"; then
11699                                             INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
11700                     fi
11701                   fi
11702                 fi
11703               fi
11704             fi
11705                         if test -n "$found_la"; then
11706                                                         save_libdir="$libdir"
11707               case "$found_la" in
11708                 */* | *\\*) . "$found_la" ;;
11709                 *) . "./$found_la" ;;
11710               esac
11711               libdir="$save_libdir"
11712                             for dep in $dependency_libs; do
11713                 case "$dep" in
11714                   -L*)
11715                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11716                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11717                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11718                       haveit=
11719                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11720                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11721                         if test -n "$GCC"; then
11722                           case $host_os in
11723                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11724                           esac
11725                         fi
11726                       fi
11727                       if test -z "$haveit"; then
11728                         haveit=
11729                         for x in $LDFLAGS $LIBPTH; do
11730
11731   acl_save_prefix="$prefix"
11732   prefix="$acl_final_prefix"
11733   acl_save_exec_prefix="$exec_prefix"
11734   exec_prefix="$acl_final_exec_prefix"
11735   eval x=\"$x\"
11736   exec_prefix="$acl_save_exec_prefix"
11737   prefix="$acl_save_prefix"
11738
11739                           if test "X$x" = "X-L$additional_libdir"; then
11740                             haveit=yes
11741                             break
11742                           fi
11743                         done
11744                         if test -z "$haveit"; then
11745                           if test -d "$additional_libdir"; then
11746                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
11747                           fi
11748                         fi
11749                         haveit=
11750                         for x in $LDFLAGS $LTLIBPTH; do
11751
11752   acl_save_prefix="$prefix"
11753   prefix="$acl_final_prefix"
11754   acl_save_exec_prefix="$exec_prefix"
11755   exec_prefix="$acl_final_exec_prefix"
11756   eval x=\"$x\"
11757   exec_prefix="$acl_save_exec_prefix"
11758   prefix="$acl_save_prefix"
11759
11760                           if test "X$x" = "X-L$additional_libdir"; then
11761                             haveit=yes
11762                             break
11763                           fi
11764                         done
11765                         if test -z "$haveit"; then
11766                           if test -d "$additional_libdir"; then
11767                                                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
11768                           fi
11769                         fi
11770                       fi
11771                     fi
11772                     ;;
11773                   -R*)
11774                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
11775                     if test "$enable_rpath" != no; then
11776                                                                   haveit=
11777                       for x in $rpathdirs; do
11778                         if test "X$x" = "X$dir"; then
11779                           haveit=yes
11780                           break
11781                         fi
11782                       done
11783                       if test -z "$haveit"; then
11784                         rpathdirs="$rpathdirs $dir"
11785                       fi
11786                                                                   haveit=
11787                       for x in $ltrpathdirs; do
11788                         if test "X$x" = "X$dir"; then
11789                           haveit=yes
11790                           break
11791                         fi
11792                       done
11793                       if test -z "$haveit"; then
11794                         ltrpathdirs="$ltrpathdirs $dir"
11795                       fi
11796                     fi
11797                     ;;
11798                   -l*)
11799                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11800                     ;;
11801                   *.la)
11802                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11803                     ;;
11804                   *)
11805                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
11806                     LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
11807                     ;;
11808                 esac
11809               done
11810             fi
11811           else
11812                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
11813             LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
11814           fi
11815         fi
11816       fi
11817     done
11818   done
11819   if test "X$rpathdirs" != "X"; then
11820     if test -n "$acl_hardcode_libdir_separator"; then
11821                         alldirs=
11822       for found_dir in $rpathdirs; do
11823         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11824       done
11825             acl_save_libdir="$libdir"
11826       libdir="$alldirs"
11827       eval flag=\"$acl_hardcode_libdir_flag_spec\"
11828       libdir="$acl_save_libdir"
11829       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
11830     else
11831             for found_dir in $rpathdirs; do
11832         acl_save_libdir="$libdir"
11833         libdir="$found_dir"
11834         eval flag=\"$acl_hardcode_libdir_flag_spec\"
11835         libdir="$acl_save_libdir"
11836         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
11837       done
11838     fi
11839   fi
11840   if test "X$ltrpathdirs" != "X"; then
11841             for found_dir in $ltrpathdirs; do
11842       LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
11843     done
11844   fi
11845
11846
11847
11848
11849
11850
11851     ac_cv_libpth_libs="$LIBPTH"
11852     ac_cv_libpth_ltlibs="$LTLIBPTH"
11853     ac_cv_libpth_cppflags="$INCPTH"
11854     ac_cv_libpth_prefix="$LIBPTH_PREFIX"
11855
11856 fi
11857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
11858 $as_echo "$ac_cv_libpth_libs" >&6; }
11859   LIBPTH="$ac_cv_libpth_libs"
11860   LTLIBPTH="$ac_cv_libpth_ltlibs"
11861   INCPTH="$ac_cv_libpth_cppflags"
11862   LIBPTH_PREFIX="$ac_cv_libpth_prefix"
11863
11864   for element in $INCPTH; do
11865     haveit=
11866     for x in $CPPFLAGS; do
11867
11868   acl_save_prefix="$prefix"
11869   prefix="$acl_final_prefix"
11870   acl_save_exec_prefix="$exec_prefix"
11871   exec_prefix="$acl_final_exec_prefix"
11872   eval x=\"$x\"
11873   exec_prefix="$acl_save_exec_prefix"
11874   prefix="$acl_save_prefix"
11875
11876       if test "X$x" = "X$element"; then
11877         haveit=yes
11878         break
11879       fi
11880     done
11881     if test -z "$haveit"; then
11882       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11883     fi
11884   done
11885
11886
11887
11888
11889       HAVE_LIBPTH=yes
11890
11891
11892
11893       gl_have_pth=
11894       gl_save_LIBS="$LIBS"
11895       LIBS="$LIBS $LIBPTH"
11896       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897 /* end confdefs.h.  */
11898 #include <pth.h>
11899 int
11900 main ()
11901 {
11902 pth_self();
11903   ;
11904   return 0;
11905 }
11906 _ACEOF
11907 if ac_fn_c_try_link "$LINENO"; then :
11908   gl_have_pth=yes
11909 fi
11910 rm -f core conftest.err conftest.$ac_objext \
11911     conftest$ac_exeext conftest.$ac_ext
11912       LIBS="$gl_save_LIBS"
11913       if test -n "$gl_have_pth"; then
11914         gl_threads_api=pth
11915         LIBTHREAD="$LIBPTH"
11916         LTLIBTHREAD="$LTLIBPTH"
11917         LIBMULTITHREAD="$LIBTHREAD"
11918         LTLIBMULTITHREAD="$LTLIBTHREAD"
11919
11920 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
11921
11922         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
11923           if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11924
11925 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
11926
11927             LIBTHREAD=
11928             LTLIBTHREAD=
11929           fi
11930         fi
11931       else
11932         CPPFLAGS="$gl_save_CPPFLAGS"
11933       fi
11934     fi
11935     if test -z "$gl_have_pthread"; then
11936       if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
11937         if { case "$host_os" in
11938                mingw*) true;;
11939                *) false;;
11940              esac
11941            }; then
11942           gl_threads_api=win32
11943
11944 $as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h
11945
11946         fi
11947       fi
11948     fi
11949   fi
11950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
11951 $as_echo_n "checking for multithread API to use... " >&6; }
11952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
11953 $as_echo "$gl_threads_api" >&6; }
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964      GNULIB_FCHMODAT=0;
11965   GNULIB_FSTATAT=0;
11966   GNULIB_FUTIMENS=0;
11967   GNULIB_LCHMOD=0;
11968   GNULIB_LSTAT=0;
11969   GNULIB_MKDIRAT=0;
11970   GNULIB_MKFIFO=0;
11971   GNULIB_MKFIFOAT=0;
11972   GNULIB_MKNOD=0;
11973   GNULIB_MKNODAT=0;
11974   GNULIB_STAT=0;
11975   GNULIB_UTIMENSAT=0;
11976     HAVE_FCHMODAT=1;
11977   HAVE_FSTATAT=1;
11978   HAVE_FUTIMENS=1;
11979   HAVE_LCHMOD=1;
11980   HAVE_LSTAT=1;
11981   HAVE_MKDIRAT=1;
11982   HAVE_MKFIFO=1;
11983   HAVE_MKFIFOAT=1;
11984   HAVE_MKNOD=1;
11985   HAVE_MKNODAT=1;
11986   HAVE_UTIMENSAT=1;
11987   REPLACE_FSTAT=0;
11988   REPLACE_FSTATAT=0;
11989   REPLACE_FUTIMENS=0;
11990   REPLACE_LSTAT=0;
11991   REPLACE_MKDIR=0;
11992   REPLACE_MKFIFO=0;
11993   REPLACE_MKNOD=0;
11994   REPLACE_STAT=0;
11995   REPLACE_UTIMENSAT=0;
11996
11997
11998
11999
12000   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
12001 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
12002 if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
12003   $as_echo_n "(cached) " >&6
12004 else
12005   rm -f conftest.sym conftest.file
12006      echo >conftest.file
12007      if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
12008        if test "$cross_compiling" = yes; then :
12009   # When cross-compiling, be pessimistic so we will end up using the
12010           # replacement version of lstat that checks for trailing slashes and
12011           # calls lstat a second time when necessary.
12012           ac_cv_func_lstat_dereferences_slashed_symlink=no
12013
12014 else
12015   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016 /* end confdefs.h.  */
12017 $ac_includes_default
12018 int
12019 main ()
12020 {
12021 struct stat sbuf;
12022               /* Linux will dereference the symlink and fail, as required by
12023                  POSIX.  That is better in the sense that it means we will not
12024                  have to compile and use the lstat wrapper.  */
12025               return lstat ("conftest.sym/", &sbuf) == 0;
12026
12027   ;
12028   return 0;
12029 }
12030 _ACEOF
12031 if ac_fn_c_try_run "$LINENO"; then :
12032   ac_cv_func_lstat_dereferences_slashed_symlink=yes
12033 else
12034   ac_cv_func_lstat_dereferences_slashed_symlink=no
12035 fi
12036 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12037   conftest.$ac_objext conftest.beam conftest.$ac_ext
12038 fi
12039
12040      else
12041        # If the 'ln -s' command failed, then we probably don't even
12042        # have an lstat function.
12043        ac_cv_func_lstat_dereferences_slashed_symlink=no
12044      fi
12045      rm -f conftest.sym conftest.file
12046
12047 fi
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
12049 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12050   test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
12051
12052 cat >>confdefs.h <<_ACEOF
12053 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
12054 _ACEOF
12055
12056   if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
12057
12058
12059
12060
12061
12062
12063
12064
12065   M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
12066
12067   fi
12068
12069
12070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
12071 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
12072 if test "${gl_cv_func_malloc_posix+set}" = set; then :
12073   $as_echo_n "(cached) " >&6
12074 else
12075
12076                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 /* end confdefs.h.  */
12078
12079 int
12080 main ()
12081 {
12082 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
12083              choke me
12084              #endif
12085
12086   ;
12087   return 0;
12088 }
12089 _ACEOF
12090 if ac_fn_c_try_compile "$LINENO"; then :
12091   gl_cv_func_malloc_posix=yes
12092 else
12093   gl_cv_func_malloc_posix=no
12094 fi
12095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12096
12097 fi
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
12099 $as_echo "$gl_cv_func_malloc_posix" >&6; }
12100
12101
12102   for ac_header in stdlib.h
12103 do :
12104   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12105 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
12106   cat >>confdefs.h <<_ACEOF
12107 #define HAVE_STDLIB_H 1
12108 _ACEOF
12109
12110 fi
12111
12112 done
12113
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
12115 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
12116 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
12117   $as_echo_n "(cached) " >&6
12118 else
12119   if test "$cross_compiling" = yes; then :
12120   ac_cv_func_malloc_0_nonnull=no
12121 else
12122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h.  */
12124 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
12125 # include <stdlib.h>
12126 #else
12127 char *malloc ();
12128 #endif
12129
12130 int
12131 main ()
12132 {
12133 return ! malloc (0);
12134   ;
12135   return 0;
12136 }
12137 _ACEOF
12138 if ac_fn_c_try_run "$LINENO"; then :
12139   ac_cv_func_malloc_0_nonnull=yes
12140 else
12141   ac_cv_func_malloc_0_nonnull=no
12142 fi
12143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12144   conftest.$ac_objext conftest.beam conftest.$ac_ext
12145 fi
12146
12147 fi
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
12149 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
12150 if test $ac_cv_func_malloc_0_nonnull = yes; then :
12151   gl_cv_func_malloc_0_nonnull=1
12152 else
12153   gl_cv_func_malloc_0_nonnull=0
12154 fi
12155
12156
12157 cat >>confdefs.h <<_ACEOF
12158 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
12159 _ACEOF
12160
12161
12162
12163
12164
12165
12166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
12167 $as_echo_n "checking for mbstate_t... " >&6; }
12168 if test "${ac_cv_type_mbstate_t+set}" = set; then :
12169   $as_echo_n "(cached) " >&6
12170 else
12171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172 /* end confdefs.h.  */
12173 $ac_includes_default
12174 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12175    <wchar.h>.
12176    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12177    included before <wchar.h>.  */
12178 #include <stddef.h>
12179 #include <stdio.h>
12180 #include <time.h>
12181 #include <wchar.h>
12182 int
12183 main ()
12184 {
12185 mbstate_t x; return sizeof x;
12186   ;
12187   return 0;
12188 }
12189 _ACEOF
12190 if ac_fn_c_try_compile "$LINENO"; then :
12191   ac_cv_type_mbstate_t=yes
12192 else
12193   ac_cv_type_mbstate_t=no
12194 fi
12195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12196 fi
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
12198 $as_echo "$ac_cv_type_mbstate_t" >&6; }
12199    if test $ac_cv_type_mbstate_t = yes; then
12200
12201 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
12202
12203    else
12204
12205 $as_echo "#define mbstate_t int" >>confdefs.h
12206
12207    fi
12208
12209
12210
12211
12212
12213
12214
12215
12216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
12217 $as_echo_n "checking for a traditional japanese locale... " >&6; }
12218 if test "${gt_cv_locale_ja+set}" = set; then :
12219   $as_echo_n "(cached) " >&6
12220 else
12221
12222     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12223 /* end confdefs.h.  */
12224
12225 #include <locale.h>
12226 #include <time.h>
12227 #if HAVE_LANGINFO_CODESET
12228 # include <langinfo.h>
12229 #endif
12230 #include <stdlib.h>
12231 #include <string.h>
12232 struct tm t;
12233 char buf[16];
12234 int main ()
12235 {
12236   const char *p;
12237   /* Check whether the given locale name is recognized by the system.  */
12238 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12239   /* On native Win32, setlocale(category, "") looks at the system settings,
12240      not at the environment variables.  Also, when an encoding suffix such
12241      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
12242      category of the locale to "C".  */
12243   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12244       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12245     return 1;
12246 #else
12247   if (setlocale (LC_ALL, "") == NULL) return 1;
12248 #endif
12249   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12250      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12251      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12252      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12253      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12254      some unit tests fail.
12255      On MirBSD 10, when an unsupported locale is specified, setlocale()
12256      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
12257 #if HAVE_LANGINFO_CODESET
12258   {
12259     const char *cs = nl_langinfo (CODESET);
12260     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12261         || strcmp (cs, "UTF-8") == 0)
12262       return 1;
12263   }
12264 #endif
12265 #ifdef __CYGWIN__
12266   /* On Cygwin, avoid locale names without encoding suffix, because the
12267      locale_charset() function relies on the encoding suffix.  Note that
12268      LC_ALL is set on the command line.  */
12269   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12270 #endif
12271   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
12272      on Cygwin 1.5.x.  */
12273   if (MB_CUR_MAX == 1)
12274     return 1;
12275   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12276      This excludes the UTF-8 encoding (except on MirBSD).  */
12277   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12278   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12279   for (p = buf; *p != '\0'; p++)
12280     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12281       return 1;
12282   return 0;
12283 }
12284
12285 _ACEOF
12286     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12287   (eval $ac_link) 2>&5
12288   ac_status=$?
12289   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12290   test $ac_status = 0; } && test -s conftest$ac_exeext; then
12291       case "$host_os" in
12292         # Handle native Windows specially, because there setlocale() interprets
12293         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12294         # "fr" or "fra" as "French" or "French_France.1252",
12295         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12296         # "ja" as "Japanese" or "Japanese_Japan.932",
12297         # and similar.
12298         mingw*)
12299           # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
12300           # and CP932 is very different from EUC-JP, so we cannot use it here.
12301           gt_cv_locale_ja=none
12302           ;;
12303         *)
12304           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12305           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
12306           # configure script would override the LC_ALL setting. Likewise for
12307           # LC_CTYPE, which is also set at the beginning of the configure script.
12308           # Test for the AIX locale name.
12309           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12310             gt_cv_locale_ja=ja_JP
12311           else
12312             # Test for the locale name with explicit encoding suffix.
12313             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12314               gt_cv_locale_ja=ja_JP.EUC-JP
12315             else
12316               # Test for the HP-UX, OSF/1, NetBSD locale name.
12317               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12318                 gt_cv_locale_ja=ja_JP.eucJP
12319               else
12320                 # Test for the IRIX, FreeBSD locale name.
12321                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12322                   gt_cv_locale_ja=ja_JP.EUC
12323                 else
12324                   # Test for the Solaris 7 locale name.
12325                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12326                     gt_cv_locale_ja=ja
12327                   else
12328                     # Special test for NetBSD 1.6.
12329                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
12330                       gt_cv_locale_ja=ja_JP.eucJP
12331                     else
12332                       # None found.
12333                       gt_cv_locale_ja=none
12334                     fi
12335                   fi
12336                 fi
12337               fi
12338             fi
12339           fi
12340           ;;
12341       esac
12342     fi
12343     rm -fr conftest*
12344
12345 fi
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
12347 $as_echo "$gt_cv_locale_ja" >&6; }
12348   LOCALE_JA=$gt_cv_locale_ja
12349
12350
12351
12352
12353
12354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
12355 $as_echo_n "checking for a transitional chinese locale... " >&6; }
12356 if test "${gt_cv_locale_zh_CN+set}" = set; then :
12357   $as_echo_n "(cached) " >&6
12358 else
12359
12360     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12361 /* end confdefs.h.  */
12362
12363 #include <locale.h>
12364 #include <stdlib.h>
12365 #include <time.h>
12366 #if HAVE_LANGINFO_CODESET
12367 # include <langinfo.h>
12368 #endif
12369 #include <stdlib.h>
12370 #include <string.h>
12371 struct tm t;
12372 char buf[16];
12373 int main ()
12374 {
12375   const char *p;
12376   /* Check whether the given locale name is recognized by the system.  */
12377 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12378   /* On native Win32, setlocale(category, "") looks at the system settings,
12379      not at the environment variables.  Also, when an encoding suffix such
12380      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
12381      category of the locale to "C".  */
12382   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12383       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12384     return 1;
12385 #else
12386   if (setlocale (LC_ALL, "") == NULL) return 1;
12387 #endif
12388   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12389      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12390      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12391      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12392      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12393      some unit tests fail.
12394      On MirBSD 10, when an unsupported locale is specified, setlocale()
12395      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
12396 #if HAVE_LANGINFO_CODESET
12397   {
12398     const char *cs = nl_langinfo (CODESET);
12399     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12400         || strcmp (cs, "UTF-8") == 0)
12401       return 1;
12402   }
12403 #endif
12404 #ifdef __CYGWIN__
12405   /* On Cygwin, avoid locale names without encoding suffix, because the
12406      locale_charset() function relies on the encoding suffix.  Note that
12407      LC_ALL is set on the command line.  */
12408   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12409 #endif
12410   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12411      This excludes the UTF-8 encoding (except on MirBSD).  */
12412   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12413   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12414   for (p = buf; *p != '\0'; p++)
12415     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12416       return 1;
12417   /* Check whether a typical GB18030 multibyte sequence is recognized as a
12418      single wide character.  This excludes the GB2312 and GBK encodings.  */
12419   if (mblen ("\203\062\332\066", 5) != 4)
12420     return 1;
12421   return 0;
12422 }
12423
12424 _ACEOF
12425     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12426   (eval $ac_link) 2>&5
12427   ac_status=$?
12428   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12429   test $ac_status = 0; } && test -s conftest$ac_exeext; then
12430       case "$host_os" in
12431         # Handle native Windows specially, because there setlocale() interprets
12432         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12433         # "fr" or "fra" as "French" or "French_France.1252",
12434         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12435         # "ja" as "Japanese" or "Japanese_Japan.932",
12436         # and similar.
12437         mingw*)
12438           # Test for the hypothetical native Win32 locale name.
12439           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12440             gt_cv_locale_zh_CN=Chinese_China.54936
12441           else
12442             # None found.
12443             gt_cv_locale_zh_CN=none
12444           fi
12445           ;;
12446         *)
12447           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12448           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
12449           # configure script would override the LC_ALL setting. Likewise for
12450           # LC_CTYPE, which is also set at the beginning of the configure script.
12451           # Test for the locale name without encoding suffix.
12452           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12453             gt_cv_locale_zh_CN=zh_CN
12454           else
12455             # Test for the locale name with explicit encoding suffix.
12456             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12457               gt_cv_locale_zh_CN=zh_CN.GB18030
12458             else
12459               # None found.
12460               gt_cv_locale_zh_CN=none
12461             fi
12462           fi
12463           ;;
12464       esac
12465     else
12466       # If there was a link error, due to mblen(), the system is so old that
12467       # it certainly doesn't have a chinese locale.
12468       gt_cv_locale_zh_CN=none
12469     fi
12470     rm -fr conftest*
12471
12472 fi
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
12474 $as_echo "$gt_cv_locale_zh_CN" >&6; }
12475   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
12476
12477
12478
12479
12480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
12481 $as_echo_n "checking for a french Unicode locale... " >&6; }
12482 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
12483   $as_echo_n "(cached) " >&6
12484 else
12485
12486     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12487 /* end confdefs.h.  */
12488
12489 #include <locale.h>
12490 #include <time.h>
12491 #if HAVE_LANGINFO_CODESET
12492 # include <langinfo.h>
12493 #endif
12494 #include <stdlib.h>
12495 #include <string.h>
12496 struct tm t;
12497 char buf[16];
12498 int main () {
12499   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
12500      imitates locale dependent behaviour by looking at the environment
12501      variables, and all locales use the UTF-8 encoding.  */
12502 #if !(defined __BEOS__ || defined __HAIKU__)
12503   /* Check whether the given locale name is recognized by the system.  */
12504 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12505   /* On native Win32, setlocale(category, "") looks at the system settings,
12506      not at the environment variables.  Also, when an encoding suffix such
12507      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
12508      category of the locale to "C".  */
12509   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12510       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12511     return 1;
12512 # else
12513   if (setlocale (LC_ALL, "") == NULL) return 1;
12514 # endif
12515   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12516      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12517      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12518      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12519      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12520      some unit tests fail.  */
12521 # if HAVE_LANGINFO_CODESET
12522   {
12523     const char *cs = nl_langinfo (CODESET);
12524     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12525       return 1;
12526   }
12527 # endif
12528 # ifdef __CYGWIN__
12529   /* On Cygwin, avoid locale names without encoding suffix, because the
12530      locale_charset() function relies on the encoding suffix.  Note that
12531      LC_ALL is set on the command line.  */
12532   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12533 # endif
12534   /* Check whether in the abbreviation of the second month, the second
12535      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12536      two bytes long, with UTF-8 encoding.  */
12537   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12538   if (strftime (buf, sizeof (buf), "%b", &t) < 4
12539       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12540     return 1;
12541 #endif
12542   /* Check whether the decimal separator is a comma.
12543      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12544      are nl_langinfo(RADIXCHAR) are both ".".  */
12545   if (localeconv () ->decimal_point[0] != ',') return 1;
12546   return 0;
12547 }
12548
12549 _ACEOF
12550     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12551   (eval $ac_link) 2>&5
12552   ac_status=$?
12553   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12554   test $ac_status = 0; } && test -s conftest$ac_exeext; then
12555       case "$host_os" in
12556         # Handle native Windows specially, because there setlocale() interprets
12557         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12558         # "fr" or "fra" as "French" or "French_France.1252",
12559         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12560         # "ja" as "Japanese" or "Japanese_Japan.932",
12561         # and similar.
12562         mingw*)
12563           # Test for the hypothetical native Win32 locale name.
12564           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12565             gt_cv_locale_fr_utf8=French_France.65001
12566           else
12567             # None found.
12568             gt_cv_locale_fr_utf8=none
12569           fi
12570           ;;
12571         *)
12572           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12573           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
12574           # configure script would override the LC_ALL setting. Likewise for
12575           # LC_CTYPE, which is also set at the beginning of the configure script.
12576           # Test for the usual locale name.
12577           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12578             gt_cv_locale_fr_utf8=fr_FR
12579           else
12580             # Test for the locale name with explicit encoding suffix.
12581             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12582               gt_cv_locale_fr_utf8=fr_FR.UTF-8
12583             else
12584               # Test for the Solaris 7 locale name.
12585               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12586                 gt_cv_locale_fr_utf8=fr.UTF-8
12587               else
12588                 # None found.
12589                 gt_cv_locale_fr_utf8=none
12590               fi
12591             fi
12592           fi
12593           ;;
12594       esac
12595     fi
12596     rm -fr conftest*
12597
12598 fi
12599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12600 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
12601   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12602
12603
12604
12605
12606
12607
12608
12609   GNULIB_MEMCHR=0;
12610   GNULIB_MEMMEM=0;
12611   GNULIB_MEMPCPY=0;
12612   GNULIB_MEMRCHR=0;
12613   GNULIB_RAWMEMCHR=0;
12614   GNULIB_STPCPY=0;
12615   GNULIB_STPNCPY=0;
12616   GNULIB_STRCHRNUL=0;
12617   GNULIB_STRDUP=0;
12618   GNULIB_STRNCAT=0;
12619   GNULIB_STRNDUP=0;
12620   GNULIB_STRNLEN=0;
12621   GNULIB_STRPBRK=0;
12622   GNULIB_STRSEP=0;
12623   GNULIB_STRSTR=0;
12624   GNULIB_STRCASESTR=0;
12625   GNULIB_STRTOK_R=0;
12626   GNULIB_MBSLEN=0;
12627   GNULIB_MBSNLEN=0;
12628   GNULIB_MBSCHR=0;
12629   GNULIB_MBSRCHR=0;
12630   GNULIB_MBSSTR=0;
12631   GNULIB_MBSCASECMP=0;
12632   GNULIB_MBSNCASECMP=0;
12633   GNULIB_MBSPCASECMP=0;
12634   GNULIB_MBSCASESTR=0;
12635   GNULIB_MBSCSPN=0;
12636   GNULIB_MBSPBRK=0;
12637   GNULIB_MBSSPN=0;
12638   GNULIB_MBSSEP=0;
12639   GNULIB_MBSTOK_R=0;
12640   GNULIB_STRERROR=0;
12641   GNULIB_STRERROR_R=0;
12642   GNULIB_STRSIGNAL=0;
12643   GNULIB_STRVERSCMP=0;
12644   HAVE_MBSLEN=0;
12645     HAVE_MEMCHR=1;
12646   HAVE_DECL_MEMMEM=1;
12647   HAVE_MEMPCPY=1;
12648   HAVE_DECL_MEMRCHR=1;
12649   HAVE_RAWMEMCHR=1;
12650   HAVE_STPCPY=1;
12651   HAVE_STPNCPY=1;
12652   HAVE_STRCHRNUL=1;
12653   HAVE_DECL_STRDUP=1;
12654   HAVE_DECL_STRNDUP=1;
12655   HAVE_DECL_STRNLEN=1;
12656   HAVE_STRPBRK=1;
12657   HAVE_STRSEP=1;
12658   HAVE_STRCASESTR=1;
12659   HAVE_DECL_STRTOK_R=1;
12660   HAVE_DECL_STRERROR_R=1;
12661   HAVE_DECL_STRSIGNAL=1;
12662   HAVE_STRVERSCMP=1;
12663   REPLACE_MEMCHR=0;
12664   REPLACE_MEMMEM=0;
12665   REPLACE_STPNCPY=0;
12666   REPLACE_STRDUP=0;
12667   REPLACE_STRSTR=0;
12668   REPLACE_STRCASESTR=0;
12669   REPLACE_STRERROR=0;
12670   REPLACE_STRERROR_R=0;
12671   REPLACE_STRNCAT=0;
12672   REPLACE_STRNDUP=0;
12673   REPLACE_STRNLEN=0;
12674   REPLACE_STRSIGNAL=0;
12675   REPLACE_STRTOK_R=0;
12676   UNDEFINE_STRTOK_R=0;
12677
12678
12679
12680
12681
12682
12683
12684   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
12685   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
12686   # irrelevant for anonymous mappings.
12687   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
12688 if test "x$ac_cv_func_mmap" = x""yes; then :
12689   gl_have_mmap=yes
12690 else
12691   gl_have_mmap=no
12692 fi
12693
12694
12695   # Try to allow MAP_ANONYMOUS.
12696   gl_have_mmap_anonymous=no
12697   if test $gl_have_mmap = yes; then
12698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
12699 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
12700     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h.  */
12702
12703 #include <sys/mman.h>
12704 #ifdef MAP_ANONYMOUS
12705     I cant identify this map.
12706 #endif
12707
12708 _ACEOF
12709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12710   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
12711   gl_have_mmap_anonymous=yes
12712 fi
12713 rm -f conftest*
12714
12715     if test $gl_have_mmap_anonymous != yes; then
12716       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12717 /* end confdefs.h.  */
12718
12719 #include <sys/mman.h>
12720 #ifdef MAP_ANON
12721     I cant identify this map.
12722 #endif
12723
12724 _ACEOF
12725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12726   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
12727
12728 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
12729
12730          gl_have_mmap_anonymous=yes
12731 fi
12732 rm -f conftest*
12733
12734     fi
12735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
12736 $as_echo "$gl_have_mmap_anonymous" >&6; }
12737     if test $gl_have_mmap_anonymous = yes; then
12738
12739 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
12740
12741     fi
12742   fi
12743
12744
12745
12746
12747
12748
12749   if test $ac_cv_func_memchr = yes; then
12750     # Detect platform-specific bugs in some versions of glibc:
12751     # memchr should not dereference anything with length 0
12752     #   http://bugzilla.redhat.com/499689
12753     # memchr should not dereference overestimated length after a match
12754     #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
12755     #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
12756     # Assume that memchr works on platforms that lack mprotect.
12757     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
12758 $as_echo_n "checking whether memchr works... " >&6; }
12759 if test "${gl_cv_func_memchr_works+set}" = set; then :
12760   $as_echo_n "(cached) " >&6
12761 else
12762   if test "$cross_compiling" = yes; then :
12763          gl_cv_func_memchr_works="guessing no"
12764 else
12765   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h.  */
12767
12768 #include <string.h>
12769 #if HAVE_SYS_MMAN_H
12770 # include <fcntl.h>
12771 # include <unistd.h>
12772 # include <sys/types.h>
12773 # include <sys/mman.h>
12774 # ifndef MAP_FILE
12775 #  define MAP_FILE 0
12776 # endif
12777 #endif
12778
12779 int
12780 main ()
12781 {
12782
12783   int result = 0;
12784   char *fence = NULL;
12785 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
12786 # if HAVE_MAP_ANONYMOUS
12787   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
12788   const int fd = -1;
12789 # else /* !HAVE_MAP_ANONYMOUS */
12790   const int flags = MAP_FILE | MAP_PRIVATE;
12791   int fd = open ("/dev/zero", O_RDONLY, 0666);
12792   if (fd >= 0)
12793 # endif
12794     {
12795       int pagesize = getpagesize ();
12796       char *two_pages =
12797         (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
12798                        flags, fd, 0);
12799       if (two_pages != (char *)(-1)
12800           && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
12801         fence = two_pages + pagesize;
12802     }
12803 #endif
12804   if (fence)
12805     {
12806       if (memchr (fence, 0, 0))
12807         result |= 1;
12808       strcpy (fence - 9, "12345678");
12809       if (memchr (fence - 9, 0, 79) != fence - 1)
12810         result |= 2;
12811       if (memchr (fence - 1, 0, 3) != fence - 1)
12812         result |= 4;
12813     }
12814   return result;
12815
12816   ;
12817   return 0;
12818 }
12819 _ACEOF
12820 if ac_fn_c_try_run "$LINENO"; then :
12821   gl_cv_func_memchr_works=yes
12822 else
12823   gl_cv_func_memchr_works=no
12824 fi
12825 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12826   conftest.$ac_objext conftest.beam conftest.$ac_ext
12827 fi
12828
12829 fi
12830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
12831 $as_echo "$gl_cv_func_memchr_works" >&6; }
12832     if test "$gl_cv_func_memchr_works" != yes; then
12833       REPLACE_MEMCHR=1
12834     fi
12835   else
12836     HAVE_MEMCHR=0
12837   fi
12838   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
12839
12840
12841
12842
12843
12844
12845
12846
12847   M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
12848
12849
12850   for ac_header in bp-sym.h
12851 do :
12852   ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
12853 if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
12854   cat >>confdefs.h <<_ACEOF
12855 #define HAVE_BP_SYM_H 1
12856 _ACEOF
12857
12858 fi
12859
12860 done
12861
12862
12863   fi
12864
12865 # Check whether --enable-largefile was given.
12866 if test "${enable_largefile+set}" = set; then :
12867   enableval=$enable_largefile;
12868 fi
12869
12870 if test "$enable_largefile" != no; then
12871
12872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12873 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12874 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
12875   $as_echo_n "(cached) " >&6
12876 else
12877   ac_cv_sys_largefile_CC=no
12878      if test "$GCC" != yes; then
12879        ac_save_CC=$CC
12880        while :; do
12881          # IRIX 6.2 and later do not support large files by default,
12882          # so use the C compiler's -n32 option if that helps.
12883          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884 /* end confdefs.h.  */
12885 #include <sys/types.h>
12886  /* Check that off_t can represent 2**63 - 1 correctly.
12887     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12888     since some C++ compilers masquerading as C compilers
12889     incorrectly reject 9223372036854775807.  */
12890 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12891   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12892                        && LARGE_OFF_T % 2147483647 == 1)
12893                       ? 1 : -1];
12894 int
12895 main ()
12896 {
12897
12898   ;
12899   return 0;
12900 }
12901 _ACEOF
12902          if ac_fn_c_try_compile "$LINENO"; then :
12903   break
12904 fi
12905 rm -f core conftest.err conftest.$ac_objext
12906          CC="$CC -n32"
12907          if ac_fn_c_try_compile "$LINENO"; then :
12908   ac_cv_sys_largefile_CC=' -n32'; break
12909 fi
12910 rm -f core conftest.err conftest.$ac_objext
12911          break
12912        done
12913        CC=$ac_save_CC
12914        rm -f conftest.$ac_ext
12915     fi
12916 fi
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12918 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12919   if test "$ac_cv_sys_largefile_CC" != no; then
12920     CC=$CC$ac_cv_sys_largefile_CC
12921   fi
12922
12923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12924 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12925 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
12926   $as_echo_n "(cached) " >&6
12927 else
12928   while :; do
12929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930 /* end confdefs.h.  */
12931 #include <sys/types.h>
12932  /* Check that off_t can represent 2**63 - 1 correctly.
12933     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12934     since some C++ compilers masquerading as C compilers
12935     incorrectly reject 9223372036854775807.  */
12936 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12937   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12938                        && LARGE_OFF_T % 2147483647 == 1)
12939                       ? 1 : -1];
12940 int
12941 main ()
12942 {
12943
12944   ;
12945   return 0;
12946 }
12947 _ACEOF
12948 if ac_fn_c_try_compile "$LINENO"; then :
12949   ac_cv_sys_file_offset_bits=no; break
12950 fi
12951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953 /* end confdefs.h.  */
12954 #define _FILE_OFFSET_BITS 64
12955 #include <sys/types.h>
12956  /* Check that off_t can represent 2**63 - 1 correctly.
12957     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12958     since some C++ compilers masquerading as C compilers
12959     incorrectly reject 9223372036854775807.  */
12960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12961   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12962                        && LARGE_OFF_T % 2147483647 == 1)
12963                       ? 1 : -1];
12964 int
12965 main ()
12966 {
12967
12968   ;
12969   return 0;
12970 }
12971 _ACEOF
12972 if ac_fn_c_try_compile "$LINENO"; then :
12973   ac_cv_sys_file_offset_bits=64; break
12974 fi
12975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12976   ac_cv_sys_file_offset_bits=unknown
12977   break
12978 done
12979 fi
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12981 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12982 case $ac_cv_sys_file_offset_bits in #(
12983   no | unknown) ;;
12984   *)
12985 cat >>confdefs.h <<_ACEOF
12986 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12987 _ACEOF
12988 ;;
12989 esac
12990 rm -rf conftest*
12991   if test $ac_cv_sys_file_offset_bits = unknown; then
12992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12993 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12994 if test "${ac_cv_sys_large_files+set}" = set; then :
12995   $as_echo_n "(cached) " >&6
12996 else
12997   while :; do
12998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999 /* end confdefs.h.  */
13000 #include <sys/types.h>
13001  /* Check that off_t can represent 2**63 - 1 correctly.
13002     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13003     since some C++ compilers masquerading as C compilers
13004     incorrectly reject 9223372036854775807.  */
13005 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13006   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13007                        && LARGE_OFF_T % 2147483647 == 1)
13008                       ? 1 : -1];
13009 int
13010 main ()
13011 {
13012
13013   ;
13014   return 0;
13015 }
13016 _ACEOF
13017 if ac_fn_c_try_compile "$LINENO"; then :
13018   ac_cv_sys_large_files=no; break
13019 fi
13020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13022 /* end confdefs.h.  */
13023 #define _LARGE_FILES 1
13024 #include <sys/types.h>
13025  /* Check that off_t can represent 2**63 - 1 correctly.
13026     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13027     since some C++ compilers masquerading as C compilers
13028     incorrectly reject 9223372036854775807.  */
13029 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13030   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13031                        && LARGE_OFF_T % 2147483647 == 1)
13032                       ? 1 : -1];
13033 int
13034 main ()
13035 {
13036
13037   ;
13038   return 0;
13039 }
13040 _ACEOF
13041 if ac_fn_c_try_compile "$LINENO"; then :
13042   ac_cv_sys_large_files=1; break
13043 fi
13044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13045   ac_cv_sys_large_files=unknown
13046   break
13047 done
13048 fi
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13050 $as_echo "$ac_cv_sys_large_files" >&6; }
13051 case $ac_cv_sys_large_files in #(
13052   no | unknown) ;;
13053   *)
13054 cat >>confdefs.h <<_ACEOF
13055 #define _LARGE_FILES $ac_cv_sys_large_files
13056 _ACEOF
13057 ;;
13058 esac
13059 rm -rf conftest*
13060   fi
13061 fi
13062
13063
13064
13065
13066     gl_cv_c_multiarch=no
13067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13068 /* end confdefs.h.  */
13069 #ifndef __APPLE_CC__
13070          not a universal capable compiler
13071         #endif
13072         typedef int dummy;
13073
13074 _ACEOF
13075 if ac_fn_c_try_compile "$LINENO"; then :
13076
13077                arch=
13078      prev=
13079      for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
13080        if test -n "$prev"; then
13081          case $word in
13082            i?86 | x86_64 | ppc | ppc64)
13083              if test -z "$arch" || test "$arch" = "$word"; then
13084                arch="$word"
13085              else
13086                gl_cv_c_multiarch=yes
13087              fi
13088              ;;
13089          esac
13090          prev=
13091        else
13092          if test "x$word" = "x-arch"; then
13093            prev=arch
13094          fi
13095        fi
13096      done
13097
13098 fi
13099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13100   if test $gl_cv_c_multiarch = yes; then
13101     APPLE_UNIVERSAL_BUILD=1
13102   else
13103     APPLE_UNIVERSAL_BUILD=0
13104   fi
13105
13106
13107
13108
13109
13110
13111   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
13112 $as_echo_n "checking for promoted mode_t type... " >&6; }
13113 if test "${gl_cv_promoted_mode_t+set}" = set; then :
13114   $as_echo_n "(cached) " >&6
13115 else
13116
13117                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13118 /* end confdefs.h.  */
13119 #include <sys/types.h>
13120 int
13121 main ()
13122 {
13123 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
13124   ;
13125   return 0;
13126 }
13127 _ACEOF
13128 if ac_fn_c_try_compile "$LINENO"; then :
13129   gl_cv_promoted_mode_t='int'
13130 else
13131   gl_cv_promoted_mode_t='mode_t'
13132 fi
13133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13134
13135 fi
13136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
13137 $as_echo "$gl_cv_promoted_mode_t" >&6; }
13138
13139 cat >>confdefs.h <<_ACEOF
13140 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
13141 _ACEOF
13142
13143
13144
13145
13146
13147
13148
13149   GNULIB_POSIX_SPAWN=0;
13150   GNULIB_POSIX_SPAWNP=0;
13151   GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
13152   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
13153   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
13154   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
13155   GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
13156   GNULIB_POSIX_SPAWNATTR_INIT=0;
13157   GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
13158   GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
13159   GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
13160   GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
13161   GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
13162   GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
13163   GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
13164   GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
13165   GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
13166   GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
13167   GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
13168   GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
13169   GNULIB_POSIX_SPAWNATTR_DESTROY=0;
13170     HAVE_POSIX_SPAWN=1;
13171   HAVE_POSIX_SPAWNATTR_T=1;
13172   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
13173
13174   REPLACE_POSIX_SPAWN=0;
13175
13176
13177
13178
13179
13180
13181
13182   if test $ac_cv_func_posix_spawn != yes; then
13183     HAVE_POSIX_SPAWN=0
13184   fi
13185
13186
13187
13188
13189                                       if test $ac_cv_func_posix_spawn = yes; then
13190
13191
13192      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
13193 $as_echo_n "checking whether posix_spawn works... " >&6; }
13194 if test "${gl_cv_func_posix_spawn_works+set}" = set; then :
13195   $as_echo_n "(cached) " >&6
13196 else
13197   if test $cross_compiling = no; then
13198        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13199 /* end confdefs.h.  */
13200
13201 #include <errno.h>
13202 #include <fcntl.h>
13203 #include <signal.h>
13204 #include <spawn.h>
13205 #include <stdbool.h>
13206 #include <stdio.h>
13207 #include <stdlib.h>
13208 #include <string.h>
13209 #include <unistd.h>
13210 #include <sys/types.h>
13211 #include <sys/wait.h>
13212
13213 extern char **environ;
13214
13215 #ifndef STDIN_FILENO
13216 # define STDIN_FILENO 0
13217 #endif
13218 #ifndef STDOUT_FILENO
13219 # define STDOUT_FILENO 1
13220 #endif
13221 #ifndef STDERR_FILENO
13222 # define STDERR_FILENO 2
13223 #endif
13224
13225 #ifndef WTERMSIG
13226 # define WTERMSIG(x) ((x) & 0x7f)
13227 #endif
13228 #ifndef WIFEXITED
13229 # define WIFEXITED(x) (WTERMSIG (x) == 0)
13230 #endif
13231 #ifndef WEXITSTATUS
13232 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
13233 #endif
13234
13235 #define CHILD_PROGRAM_FILENAME "/non/exist/ent"
13236
13237 static int
13238 fd_safer (int fd)
13239 {
13240   if (0 <= fd && fd <= 2)
13241     {
13242       int f = fd_safer (dup (fd));
13243       int e = errno;
13244       close (fd);
13245       errno = e;
13246       fd = f;
13247     }
13248
13249   return fd;
13250 }
13251
13252 int
13253 main ()
13254 {
13255   char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
13256   int ofd[2];
13257   sigset_t blocked_signals;
13258   sigset_t fatal_signal_set;
13259   posix_spawn_file_actions_t actions;
13260   bool actions_allocated;
13261   posix_spawnattr_t attrs;
13262   bool attrs_allocated;
13263   int err;
13264   pid_t child;
13265   int status;
13266   int exitstatus;
13267
13268   setvbuf (stdout, NULL, _IOFBF, 0);
13269   puts ("This should be seen only once.");
13270   if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
13271     {
13272       perror ("cannot create pipe");
13273       exit (1);
13274     }
13275   sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
13276   sigemptyset (&fatal_signal_set);
13277   sigaddset (&fatal_signal_set, SIGINT);
13278   sigaddset (&fatal_signal_set, SIGTERM);
13279   sigaddset (&fatal_signal_set, SIGHUP);
13280   sigaddset (&fatal_signal_set, SIGPIPE);
13281   sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
13282   actions_allocated = false;
13283   attrs_allocated = false;
13284   if ((err = posix_spawn_file_actions_init (&actions)) != 0
13285       || (actions_allocated = true,
13286           (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
13287           || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
13288           || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
13289           || (err = posix_spawnattr_init (&attrs)) != 0
13290           || (attrs_allocated = true,
13291               (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
13292               || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
13293           || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
13294     {
13295       if (actions_allocated)
13296         posix_spawn_file_actions_destroy (&actions);
13297       if (attrs_allocated)
13298         posix_spawnattr_destroy (&attrs);
13299       sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
13300       if (err == ENOENT)
13301         return 0;
13302       else
13303         {
13304           errno = err;
13305           perror ("subprocess failed");
13306           exit (1);
13307         }
13308     }
13309   posix_spawn_file_actions_destroy (&actions);
13310   posix_spawnattr_destroy (&attrs);
13311   sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
13312   close (ofd[0]);
13313   close (ofd[1]);
13314   status = 0;
13315   while (waitpid (child, &status, 0) != child)
13316     ;
13317   if (!WIFEXITED (status))
13318     {
13319       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
13320       exit (1);
13321     }
13322   exitstatus = WEXITSTATUS (status);
13323   if (exitstatus != 127)
13324     {
13325       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
13326       exit (1);
13327     }
13328   return 0;
13329 }
13330
13331 _ACEOF
13332 if ac_fn_c_try_link "$LINENO"; then :
13333   if test -s conftest$ac_exeext \
13334              && ./conftest$ac_exeext > conftest.out \
13335              && echo 'This should be seen only once.' > conftest.ok \
13336              && cmp conftest.out conftest.ok > /dev/null; then
13337             gl_cv_func_posix_spawn_works=yes
13338           else
13339             gl_cv_func_posix_spawn_works=no
13340           fi
13341 else
13342   gl_cv_func_posix_spawn_works=no
13343 fi
13344 rm -f core conftest.err conftest.$ac_objext \
13345     conftest$ac_exeext conftest.$ac_ext
13346        if test $gl_cv_func_posix_spawn_works = yes; then
13347          if test "$cross_compiling" = yes; then :
13348   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13350 as_fn_error $? "cannot run test program while cross compiling
13351 See \`config.log' for more details" "$LINENO" 5; }
13352 else
13353   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354 /* end confdefs.h.  */
13355
13356 /* Test whether posix_spawn_file_actions_addopen supports filename arguments
13357    that contain special characters such as '*'.  */
13358
13359 #include <errno.h>
13360 #include <fcntl.h>
13361 #include <signal.h>
13362 #include <spawn.h>
13363 #include <stdbool.h>
13364 #include <stdio.h>
13365 #include <string.h>
13366 #include <unistd.h>
13367 #include <sys/types.h>
13368 #include <sys/wait.h>
13369
13370 extern char **environ;
13371
13372 #ifndef STDIN_FILENO
13373 # define STDIN_FILENO 0
13374 #endif
13375 #ifndef STDOUT_FILENO
13376 # define STDOUT_FILENO 1
13377 #endif
13378 #ifndef STDERR_FILENO
13379 # define STDERR_FILENO 2
13380 #endif
13381
13382 #ifndef WTERMSIG
13383 # define WTERMSIG(x) ((x) & 0x7f)
13384 #endif
13385 #ifndef WIFEXITED
13386 # define WIFEXITED(x) (WTERMSIG (x) == 0)
13387 #endif
13388 #ifndef WEXITSTATUS
13389 # define WEXITSTATUS(x) (((x) >> 8) & 0xff)
13390 #endif
13391
13392 #define CHILD_PROGRAM_FILENAME "conftest"
13393 #define DATA_FILENAME "conftest%=*#?"
13394
13395 static int
13396 parent_main (void)
13397 {
13398   FILE *fp;
13399   char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
13400   posix_spawn_file_actions_t actions;
13401   bool actions_allocated;
13402   int err;
13403   pid_t child;
13404   int status;
13405   int exitstatus;
13406
13407   /* Create a data file with specific contents.  */
13408   fp = fopen (DATA_FILENAME, "wb");
13409   if (fp == NULL)
13410     {
13411       perror ("cannot create data file");
13412       return 1;
13413     }
13414   fwrite ("Halle Potta", 1, 11, fp);
13415   if (fflush (fp) || fclose (fp))
13416     {
13417       perror ("cannot prepare data file");
13418       return 2;
13419     }
13420
13421   /* Avoid reading from our stdin, as it could block.  */
13422   freopen ("/dev/null", "rb", stdin);
13423
13424   /* Test whether posix_spawn_file_actions_addopen with this file name
13425      actually works, but spawning a child that reads from this file.  */
13426   actions_allocated = false;
13427   if ((err = posix_spawn_file_actions_init (&actions)) != 0
13428       || (actions_allocated = true,
13429           (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
13430           || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
13431     {
13432       if (actions_allocated)
13433         posix_spawn_file_actions_destroy (&actions);
13434       errno = err;
13435       perror ("subprocess failed");
13436       return 3;
13437     }
13438   posix_spawn_file_actions_destroy (&actions);
13439   status = 0;
13440   while (waitpid (child, &status, 0) != child)
13441     ;
13442   if (!WIFEXITED (status))
13443     {
13444       fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
13445       return 4;
13446     }
13447   exitstatus = WEXITSTATUS (status);
13448   if (exitstatus != 0)
13449     {
13450       fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
13451       return 5;
13452     }
13453   return 0;
13454 }
13455
13456 static int
13457 child_main (void)
13458 {
13459   char buf[1024];
13460
13461   /* See if reading from STDIN_FILENO yields the expected contents.  */
13462   if (fread (buf, 1, sizeof (buf), stdin) == 11
13463       && memcmp (buf, "Halle Potta", 11) == 0)
13464     return 0;
13465   else
13466     return 8;
13467 }
13468
13469 static void
13470 cleanup_then_die (int sig)
13471 {
13472   /* Clean up data file.  */
13473   unlink (DATA_FILENAME);
13474
13475   /* Re-raise the signal and die from it.  */
13476   signal (sig, SIG_DFL);
13477   raise (sig);
13478 }
13479
13480 int
13481 main (int argc, char *argv[])
13482 {
13483   int exitstatus;
13484
13485   if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
13486     {
13487       /* This is the parent process.  */
13488       signal (SIGINT, cleanup_then_die);
13489       signal (SIGTERM, cleanup_then_die);
13490       #ifdef SIGHUP
13491       signal (SIGHUP, cleanup_then_die);
13492       #endif
13493
13494       exitstatus = parent_main ();
13495     }
13496   else
13497     {
13498       /* This is the child process.  */
13499
13500       exitstatus = child_main ();
13501     }
13502   unlink (DATA_FILENAME);
13503   return exitstatus;
13504 }
13505
13506 _ACEOF
13507 if ac_fn_c_try_run "$LINENO"; then :
13508
13509 else
13510   gl_cv_func_posix_spawn_works=no
13511 fi
13512 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13513   conftest.$ac_objext conftest.beam conftest.$ac_ext
13514 fi
13515
13516        fi
13517      else
13518        case "$host_os" in
13519          aix*) gl_cv_func_posix_spawn_works="guessing no";;
13520          *)    gl_cv_func_posix_spawn_works="guessing yes";;
13521        esac
13522      fi
13523
13524 fi
13525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
13526 $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
13527
13528     case "$gl_cv_func_posix_spawn_works" in
13529       *yes)
13530                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
13531 $as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
13532 if test "${gl_cv_func_spawnattr_setschedpolicy+set}" = set; then :
13533   $as_echo_n "(cached) " >&6
13534 else
13535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13536 /* end confdefs.h.  */
13537
13538 #include <spawn.h>
13539 #if POSIX_SPAWN_SETSCHEDULER
13540  POSIX scheduling supported
13541 #endif
13542
13543 _ACEOF
13544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13545   $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
13546   gl_cv_func_spawnattr_setschedpolicy=yes
13547 else
13548   gl_cv_func_spawnattr_setschedpolicy=no
13549 fi
13550 rm -f conftest*
13551
13552
13553 fi
13554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
13555 $as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
13556                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
13557 $as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
13558 if test "${gl_cv_func_spawnattr_setschedparam+set}" = set; then :
13559   $as_echo_n "(cached) " >&6
13560 else
13561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13562 /* end confdefs.h.  */
13563
13564 #include <spawn.h>
13565 #if POSIX_SPAWN_SETSCHEDPARAM
13566  POSIX scheduling supported
13567 #endif
13568
13569 _ACEOF
13570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13571   $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
13572   gl_cv_func_spawnattr_setschedparam=yes
13573 else
13574   gl_cv_func_spawnattr_setschedparam=no
13575 fi
13576 rm -f conftest*
13577
13578
13579 fi
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
13581 $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
13582         ;;
13583       *) REPLACE_POSIX_SPAWN=1 ;;
13584     esac
13585   fi
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596   GNULIB_SIGNAL_H_SIGPIPE=0;
13597   GNULIB_SIGPROCMASK=0;
13598   GNULIB_SIGACTION=0;
13599     HAVE_POSIX_SIGNALBLOCKING=1;
13600   HAVE_SIGSET_T=1;
13601   HAVE_SIGINFO_T=1;
13602   HAVE_SIGACTION=1;
13603   HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
13604
13605   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
13606
13607
13608
13609
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13611 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
13612 if test "${ac_cv_type_uid_t+set}" = set; then :
13613   $as_echo_n "(cached) " >&6
13614 else
13615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13616 /* end confdefs.h.  */
13617 #include <sys/types.h>
13618
13619 _ACEOF
13620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13621   $EGREP "uid_t" >/dev/null 2>&1; then :
13622   ac_cv_type_uid_t=yes
13623 else
13624   ac_cv_type_uid_t=no
13625 fi
13626 rm -f conftest*
13627
13628 fi
13629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13630 $as_echo "$ac_cv_type_uid_t" >&6; }
13631 if test $ac_cv_type_uid_t = no; then
13632
13633 $as_echo "#define uid_t int" >>confdefs.h
13634
13635
13636 $as_echo "#define gid_t int" >>confdefs.h
13637
13638 fi
13639
13640
13641
13642
13643
13644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
13645 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
13646 if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
13647   $as_echo_n "(cached) " >&6
13648 else
13649
13650       if test "$cross_compiling" = yes; then :
13651
13652          case "$host_os" in
13653                                  # Guess yes on glibc systems.
13654            *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
13655                                  # Guess yes on FreeBSD >= 5.
13656            freebsd[1-4]*)        gl_cv_func_snprintf_retval_c99="guessing no";;
13657            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
13658                                  # Guess yes on MacOS X >= 10.3.
13659            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
13660            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
13661                                  # Guess yes on OpenBSD >= 3.9.
13662            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
13663                                  gl_cv_func_snprintf_retval_c99="guessing no";;
13664            openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
13665                                  # Guess yes on Solaris >= 2.10.
13666            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
13667            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
13668                                  # Guess yes on AIX >= 4.
13669            aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
13670            aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
13671                                  # Guess yes on NetBSD >= 3.
13672            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
13673                                  gl_cv_func_snprintf_retval_c99="guessing no";;
13674            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
13675                                  # Guess yes on BeOS.
13676            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
13677                                  # If we don't know, assume the worst.
13678            *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
13679          esac
13680
13681 else
13682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13683 /* end confdefs.h.  */
13684
13685 #include <stdio.h>
13686 #include <string.h>
13687 static char buf[100];
13688 int main ()
13689 {
13690   strcpy (buf, "ABCDEF");
13691   if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
13692     return 1;
13693   if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
13694     return 2;
13695   if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
13696     return 3;
13697   return 0;
13698 }
13699 _ACEOF
13700 if ac_fn_c_try_run "$LINENO"; then :
13701   gl_cv_func_snprintf_retval_c99=yes
13702 else
13703   gl_cv_func_snprintf_retval_c99=no
13704 fi
13705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13706   conftest.$ac_objext conftest.beam conftest.$ac_ext
13707 fi
13708
13709
13710 fi
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
13712 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
13713
13714 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13715 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
13716   ac_have_decl=1
13717 else
13718   ac_have_decl=0
13719 fi
13720
13721 cat >>confdefs.h <<_ACEOF
13722 #define HAVE_DECL_SNPRINTF $ac_have_decl
13723 _ACEOF
13724
13725
13726
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13728 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13729 if test "${ac_cv_header_stdbool_h+set}" = set; then :
13730   $as_echo_n "(cached) " >&6
13731 else
13732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733 /* end confdefs.h.  */
13734
13735              #include <stdbool.h>
13736              #ifndef bool
13737               "error: bool is not defined"
13738              #endif
13739              #ifndef false
13740               "error: false is not defined"
13741              #endif
13742              #if false
13743               "error: false is not 0"
13744              #endif
13745              #ifndef true
13746               "error: true is not defined"
13747              #endif
13748              #if true != 1
13749               "error: true is not 1"
13750              #endif
13751              #ifndef __bool_true_false_are_defined
13752               "error: __bool_true_false_are_defined is not defined"
13753              #endif
13754
13755              struct s { _Bool s: 1; _Bool t; } s;
13756
13757              char a[true == 1 ? 1 : -1];
13758              char b[false == 0 ? 1 : -1];
13759              char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13760              char d[(bool) 0.5 == true ? 1 : -1];
13761              /* See body of main program for 'e'.  */
13762              char f[(_Bool) 0.0 == false ? 1 : -1];
13763              char g[true];
13764              char h[sizeof (_Bool)];
13765              char i[sizeof s.t];
13766              enum { j = false, k = true, l = false * true, m = true * 256 };
13767              /* The following fails for
13768                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13769              _Bool n[m];
13770              char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13771              char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13772              /* Catch a bug in an HP-UX C compiler.  See
13773                 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13774                 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13775               */
13776              _Bool q = true;
13777              _Bool *pq = &q;
13778
13779 int
13780 main ()
13781 {
13782
13783              bool e = &s;
13784              *pq |= q;
13785              *pq |= ! q;
13786              /* Refer to every declared value, to avoid compiler optimizations.  */
13787              return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13788                      + !m + !n + !o + !p + !q + !pq);
13789
13790   ;
13791   return 0;
13792 }
13793 _ACEOF
13794 if ac_fn_c_try_compile "$LINENO"; then :
13795   ac_cv_header_stdbool_h=yes
13796 else
13797   ac_cv_header_stdbool_h=no
13798 fi
13799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13800 fi
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13802 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13803    ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13804 if test "x$ac_cv_type__Bool" = x""yes; then :
13805
13806 cat >>confdefs.h <<_ACEOF
13807 #define HAVE__BOOL 1
13808 _ACEOF
13809
13810
13811 fi
13812
13813
13814
13815     REPLACE_NULL=0;
13816   HAVE_WCHAR_T=1;
13817   STDDEF_H='';
13818
13819
13820   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13821 $as_echo_n "checking for wchar_t... " >&6; }
13822 if test "${gt_cv_c_wchar_t+set}" = set; then :
13823   $as_echo_n "(cached) " >&6
13824 else
13825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13826 /* end confdefs.h.  */
13827 #include <stddef.h>
13828             wchar_t foo = (wchar_t)'\0';
13829 int
13830 main ()
13831 {
13832
13833   ;
13834   return 0;
13835 }
13836 _ACEOF
13837 if ac_fn_c_try_compile "$LINENO"; then :
13838   gt_cv_c_wchar_t=yes
13839 else
13840   gt_cv_c_wchar_t=no
13841 fi
13842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13843 fi
13844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13845 $as_echo "$gt_cv_c_wchar_t" >&6; }
13846   if test $gt_cv_c_wchar_t = yes; then
13847
13848 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13849
13850   fi
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861   if test -z "$ERRNO_H"; then
13862     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
13863 $as_echo_n "checking for working strerror function... " >&6; }
13864 if test "${gl_cv_func_working_strerror+set}" = set; then :
13865   $as_echo_n "(cached) " >&6
13866 else
13867   if test "$cross_compiling" = yes; then :
13868            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13869 /* end confdefs.h.  */
13870 #include <string.h>
13871
13872 int
13873 main ()
13874 {
13875 return !*strerror (-2);
13876   ;
13877   return 0;
13878 }
13879 _ACEOF
13880 if ac_fn_c_try_compile "$LINENO"; then :
13881   gl_cv_func_working_strerror=yes
13882 else
13883   gl_cv_func_working_strerror=no
13884 fi
13885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13886
13887 else
13888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h.  */
13890 #include <string.h>
13891
13892 int
13893 main ()
13894 {
13895 return !*strerror (-2);
13896   ;
13897   return 0;
13898 }
13899 _ACEOF
13900 if ac_fn_c_try_run "$LINENO"; then :
13901   gl_cv_func_working_strerror=yes
13902 else
13903   gl_cv_func_working_strerror=no
13904 fi
13905 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13906   conftest.$ac_objext conftest.beam conftest.$ac_ext
13907 fi
13908
13909
13910 fi
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
13912 $as_echo "$gl_cv_func_working_strerror" >&6; }
13913     if test $gl_cv_func_working_strerror = no; then
13914                   REPLACE_STRERROR=1
13915     fi
13916   else
13917             REPLACE_STRERROR=1
13918   fi
13919   if test $REPLACE_STRERROR = 1; then
13920
13921   ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13922 if test "x$ac_cv_have_decl_strerror" = x""yes; then :
13923   ac_have_decl=1
13924 else
13925   ac_have_decl=0
13926 fi
13927
13928 cat >>confdefs.h <<_ACEOF
13929 #define HAVE_DECL_STRERROR $ac_have_decl
13930 _ACEOF
13931
13932
13933   if test $ac_cv_header_sys_socket_h != yes; then
13934                     for ac_header in winsock2.h
13935 do :
13936   ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13937 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
13938   cat >>confdefs.h <<_ACEOF
13939 #define HAVE_WINSOCK2_H 1
13940 _ACEOF
13941
13942 fi
13943
13944 done
13945
13946   fi
13947
13948   fi
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961      if test $gl_cv_have_include_next = yes; then
13962        gl_cv_next_string_h='<'string.h'>'
13963      else
13964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13965 $as_echo_n "checking absolute name of <string.h>... " >&6; }
13966 if test "${gl_cv_next_string_h+set}" = set; then :
13967   $as_echo_n "(cached) " >&6
13968 else
13969
13970                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13971 /* end confdefs.h.  */
13972 #include <string.h>
13973
13974 _ACEOF
13975                                                                                                                         case "$host_os" in
13976                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
13977                  *)    gl_absname_cpp="$ac_cpp" ;;
13978                esac
13979                                                             gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13980                   sed -n '\#/string.h#{
13981                     s#.*"\(.*/string.h\)".*#\1#
13982                     s#^/[^/]#//&#
13983                     p
13984                     q
13985                   }'`'"'
13986
13987
13988 fi
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13990 $as_echo "$gl_cv_next_string_h" >&6; }
13991      fi
13992      NEXT_STRING_H=$gl_cv_next_string_h
13993
13994      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13995        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13996        gl_next_as_first_directive='<'string.h'>'
13997      else
13998        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13999        gl_next_as_first_directive=$gl_cv_next_string_h
14000      fi
14001      NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
14002
14003
14004
14005
14006
14007
14008
14009 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
14010 if test "x$ac_cv_have_decl_strndup" = x""yes; then :
14011   ac_have_decl=1
14012 else
14013   ac_have_decl=0
14014 fi
14015
14016 cat >>confdefs.h <<_ACEOF
14017 #define HAVE_DECL_STRNDUP $ac_have_decl
14018 _ACEOF
14019
14020
14021
14022 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
14023 if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
14024   ac_have_decl=1
14025 else
14026   ac_have_decl=0
14027 fi
14028
14029 cat >>confdefs.h <<_ACEOF
14030 #define HAVE_DECL_STRNLEN $ac_have_decl
14031 _ACEOF
14032
14033 ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
14034 if test "x$ac_cv_have_decl_strsignal" = x""yes; then :
14035   ac_have_decl=1
14036 else
14037   ac_have_decl=0
14038 fi
14039
14040 cat >>confdefs.h <<_ACEOF
14041 #define HAVE_DECL_STRSIGNAL $ac_have_decl
14042 _ACEOF
14043
14044 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
14045 /* NetBSD declares sys_siglist in unistd.h.  */
14046 #ifdef HAVE_UNISTD_H
14047 # include <unistd.h>
14048 #endif
14049
14050 "
14051 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
14052   ac_have_decl=1
14053 else
14054   ac_have_decl=0
14055 fi
14056
14057 cat >>confdefs.h <<_ACEOF
14058 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
14059 _ACEOF
14060
14061
14062
14063
14064
14065   if test "$gl_cv_func_memchr_works" != yes; then
14066     REPLACE_STRSTR=1
14067
14068
14069
14070
14071
14072
14073
14074
14075   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
14076
14077   else
14078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
14079 $as_echo_n "checking whether strstr works... " >&6; }
14080 if test "${gl_cv_func_strstr_works_always+set}" = set; then :
14081   $as_echo_n "(cached) " >&6
14082 else
14083   if test "$cross_compiling" = yes; then :
14084                                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h.  */
14086
14087 #ifdef __GNU_LIBRARY__
14088  #include <features.h>
14089  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
14090      || defined __UCLIBC__
14091   Lucky user
14092  #endif
14093 #elif defined __CYGWIN__
14094  #include <cygwin/version.h>
14095  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14096   Lucky user
14097  #endif
14098 #else
14099   Lucky user
14100 #endif
14101
14102 _ACEOF
14103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14104   $EGREP "Lucky user" >/dev/null 2>&1; then :
14105   gl_cv_func_strstr_works_always=yes
14106 else
14107   gl_cv_func_strstr_works_always="guessing no"
14108 fi
14109 rm -f conftest*
14110
14111
14112 else
14113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14114 /* end confdefs.h.  */
14115
14116 #include <string.h> /* for strstr */
14117 #define P "_EF_BF_BD"
14118 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14119 #define NEEDLE P P P P P
14120
14121 int
14122 main ()
14123 {
14124 return !!strstr (HAYSTACK, NEEDLE);
14125
14126   ;
14127   return 0;
14128 }
14129 _ACEOF
14130 if ac_fn_c_try_run "$LINENO"; then :
14131   gl_cv_func_strstr_works_always=yes
14132 else
14133   gl_cv_func_strstr_works_always=no
14134 fi
14135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14136   conftest.$ac_objext conftest.beam conftest.$ac_ext
14137 fi
14138
14139
14140 fi
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
14142 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
14143     if test "$gl_cv_func_strstr_works_always" != yes; then
14144       REPLACE_STRSTR=1
14145
14146
14147
14148
14149
14150
14151
14152
14153   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
14154
14155     fi
14156   fi
14157
14158 ac_fn_c_check_decl "$LINENO" "strtod" "ac_cv_have_decl_strtod" "$ac_includes_default"
14159 if test "x$ac_cv_have_decl_strtod" = x""yes; then :
14160   ac_have_decl=1
14161 else
14162   ac_have_decl=0
14163 fi
14164
14165 cat >>confdefs.h <<_ACEOF
14166 #define HAVE_DECL_STRTOD $ac_have_decl
14167 _ACEOF
14168
14169
14170   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
14171 $as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
14172 if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
14173   $as_echo_n "(cached) " >&6
14174 else
14175
14176       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14177 /* end confdefs.h.  */
14178 #ifndef __NO_MATH_INLINES
14179                            # define __NO_MATH_INLINES 1 /* for glibc */
14180                            #endif
14181                            #include <math.h>
14182                            double (*funcptr) (double, int) = ldexp;
14183                            double x;
14184 int
14185 main ()
14186 {
14187 return ldexp (x, -1) > 0;
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 if ac_fn_c_try_link "$LINENO"; then :
14193   gl_cv_func_ldexp_no_libm=yes
14194 else
14195   gl_cv_func_ldexp_no_libm=no
14196 fi
14197 rm -f core conftest.err conftest.$ac_objext \
14198     conftest$ac_exeext conftest.$ac_ext
14199
14200 fi
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
14202 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
14203
14204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
14205 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
14206 if test "${ac_cv_header_stat_broken+set}" = set; then :
14207   $as_echo_n "(cached) " >&6
14208 else
14209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14210 /* end confdefs.h.  */
14211 #include <sys/types.h>
14212 #include <sys/stat.h>
14213
14214 #if defined S_ISBLK && defined S_IFDIR
14215 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
14216 #endif
14217
14218 #if defined S_ISBLK && defined S_IFCHR
14219 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
14220 #endif
14221
14222 #if defined S_ISLNK && defined S_IFREG
14223 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
14224 #endif
14225
14226 #if defined S_ISSOCK && defined S_IFREG
14227 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
14228 #endif
14229
14230 _ACEOF
14231 if ac_fn_c_try_compile "$LINENO"; then :
14232   ac_cv_header_stat_broken=no
14233 else
14234   ac_cv_header_stat_broken=yes
14235 fi
14236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14237 fi
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
14239 $as_echo "$ac_cv_header_stat_broken" >&6; }
14240 if test $ac_cv_header_stat_broken = yes; then
14241
14242 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
14243
14244 fi
14245
14246
14247
14248
14249   GNULIB_WAITPID=0;
14250
14251
14252
14253
14254   GNULIB_MKTIME=0;
14255   GNULIB_NANOSLEEP=0;
14256   GNULIB_STRPTIME=0;
14257   GNULIB_TIMEGM=0;
14258   GNULIB_TIME_R=0;
14259     HAVE_DECL_LOCALTIME_R=1;
14260   HAVE_NANOSLEEP=1;
14261   HAVE_STRPTIME=1;
14262   HAVE_TIMEGM=1;
14263         REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14264   REPLACE_MKTIME=GNULIB_PORTCHECK;
14265   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14266   REPLACE_TIMEGM=GNULIB_PORTCHECK;
14267
14268
14269
14270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14271 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
14272 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
14273   $as_echo_n "(cached) " >&6
14274 else
14275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14276 /* end confdefs.h.  */
14277 #include <time.h>
14278
14279 int
14280 main ()
14281 {
14282 static struct timespec x; x.tv_sec = x.tv_nsec;
14283   ;
14284   return 0;
14285 }
14286 _ACEOF
14287 if ac_fn_c_try_compile "$LINENO"; then :
14288   gl_cv_sys_struct_timespec_in_time_h=yes
14289 else
14290   gl_cv_sys_struct_timespec_in_time_h=no
14291 fi
14292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14293 fi
14294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14295 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14296
14297   TIME_H_DEFINES_STRUCT_TIMESPEC=0
14298   SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14299   PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14300   if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14301     TIME_H_DEFINES_STRUCT_TIMESPEC=1
14302   else
14303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14304 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
14305 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
14306   $as_echo_n "(cached) " >&6
14307 else
14308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309 /* end confdefs.h.  */
14310 #include <sys/time.h>
14311
14312 int
14313 main ()
14314 {
14315 static struct timespec x; x.tv_sec = x.tv_nsec;
14316   ;
14317   return 0;
14318 }
14319 _ACEOF
14320 if ac_fn_c_try_compile "$LINENO"; then :
14321   gl_cv_sys_struct_timespec_in_sys_time_h=yes
14322 else
14323   gl_cv_sys_struct_timespec_in_sys_time_h=no
14324 fi
14325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14326 fi
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14328 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14329     if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14330       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14331     else
14332       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14333 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
14334 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
14335   $as_echo_n "(cached) " >&6
14336 else
14337   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338 /* end confdefs.h.  */
14339 #include <pthread.h>
14340
14341 int
14342 main ()
14343 {
14344 static struct timespec x; x.tv_sec = x.tv_nsec;
14345   ;
14346   return 0;
14347 }
14348 _ACEOF
14349 if ac_fn_c_try_compile "$LINENO"; then :
14350   gl_cv_sys_struct_timespec_in_pthread_h=yes
14351 else
14352   gl_cv_sys_struct_timespec_in_pthread_h=no
14353 fi
14354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14355 fi
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14357 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14358       if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14359         PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14360       fi
14361     fi
14362   fi
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378      if test $gl_cv_have_include_next = yes; then
14379        gl_cv_next_time_h='<'time.h'>'
14380      else
14381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14382 $as_echo_n "checking absolute name of <time.h>... " >&6; }
14383 if test "${gl_cv_next_time_h+set}" = set; then :
14384   $as_echo_n "(cached) " >&6
14385 else
14386
14387                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388 /* end confdefs.h.  */
14389 #include <time.h>
14390
14391 _ACEOF
14392                                                                                                                         case "$host_os" in
14393                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
14394                  *)    gl_absname_cpp="$ac_cpp" ;;
14395                esac
14396                                                             gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14397                   sed -n '\#/time.h#{
14398                     s#.*"\(.*/time.h\)".*#\1#
14399                     s#^/[^/]#//&#
14400                     p
14401                     q
14402                   }'`'"'
14403
14404
14405 fi
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14407 $as_echo "$gl_cv_next_time_h" >&6; }
14408      fi
14409      NEXT_TIME_H=$gl_cv_next_time_h
14410
14411      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14412        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14413        gl_next_as_first_directive='<'time.h'>'
14414      else
14415        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14416        gl_next_as_first_directive=$gl_cv_next_time_h
14417      fi
14418      NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14419
14420
14421
14422
14423
14424
14425
14426
14427 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
14428 if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
14429   ac_have_decl=1
14430 else
14431   ac_have_decl=0
14432 fi
14433
14434 cat >>confdefs.h <<_ACEOF
14435 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
14436 _ACEOF
14437
14438 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
14439 if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
14440   ac_have_decl=1
14441 else
14442   ac_have_decl=0
14443 fi
14444
14445 cat >>confdefs.h <<_ACEOF
14446 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
14447 _ACEOF
14448
14449 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
14450 if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
14451   ac_have_decl=1
14452 else
14453   ac_have_decl=0
14454 fi
14455
14456 cat >>confdefs.h <<_ACEOF
14457 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
14458 _ACEOF
14459
14460 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
14461 if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
14462   ac_have_decl=1
14463 else
14464   ac_have_decl=0
14465 fi
14466
14467 cat >>confdefs.h <<_ACEOF
14468 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
14469 _ACEOF
14470
14471 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
14472 if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
14473   ac_have_decl=1
14474 else
14475   ac_have_decl=0
14476 fi
14477
14478 cat >>confdefs.h <<_ACEOF
14479 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
14480 _ACEOF
14481
14482 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
14483 if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
14484   ac_have_decl=1
14485 else
14486   ac_have_decl=0
14487 fi
14488
14489 cat >>confdefs.h <<_ACEOF
14490 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
14491 _ACEOF
14492
14493 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
14494 if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
14495   ac_have_decl=1
14496 else
14497   ac_have_decl=0
14498 fi
14499
14500 cat >>confdefs.h <<_ACEOF
14501 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
14502 _ACEOF
14503
14504 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
14505 if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
14506   ac_have_decl=1
14507 else
14508   ac_have_decl=0
14509 fi
14510
14511 cat >>confdefs.h <<_ACEOF
14512 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
14513 _ACEOF
14514
14515 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
14516 if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
14517   ac_have_decl=1
14518 else
14519   ac_have_decl=0
14520 fi
14521
14522 cat >>confdefs.h <<_ACEOF
14523 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
14524 _ACEOF
14525
14526 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
14527 if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
14528   ac_have_decl=1
14529 else
14530   ac_have_decl=0
14531 fi
14532
14533 cat >>confdefs.h <<_ACEOF
14534 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
14535 _ACEOF
14536
14537 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
14538 if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
14539   ac_have_decl=1
14540 else
14541   ac_have_decl=0
14542 fi
14543
14544 cat >>confdefs.h <<_ACEOF
14545 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
14546 _ACEOF
14547
14548 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
14549 if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
14550   ac_have_decl=1
14551 else
14552   ac_have_decl=0
14553 fi
14554
14555 cat >>confdefs.h <<_ACEOF
14556 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
14557 _ACEOF
14558
14559
14560
14561
14562   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14563 $as_echo_n "checking for wint_t... " >&6; }
14564 if test "${gt_cv_c_wint_t+set}" = set; then :
14565   $as_echo_n "(cached) " >&6
14566 else
14567   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568 /* end confdefs.h.  */
14569
14570 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14571    <wchar.h>.
14572    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14573    before <wchar.h>.  */
14574 #include <stddef.h>
14575 #include <stdio.h>
14576 #include <time.h>
14577 #include <wchar.h>
14578             wint_t foo = (wchar_t)'\0';
14579 int
14580 main ()
14581 {
14582
14583   ;
14584   return 0;
14585 }
14586 _ACEOF
14587 if ac_fn_c_try_compile "$LINENO"; then :
14588   gt_cv_c_wint_t=yes
14589 else
14590   gt_cv_c_wint_t=no
14591 fi
14592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14593 fi
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14595 $as_echo "$gt_cv_c_wint_t" >&6; }
14596   if test $gt_cv_c_wint_t = yes; then
14597
14598 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
14599
14600   fi
14601
14602
14603
14604
14605
14606   if test $ac_cv_header_features_h = yes; then
14607     HAVE_FEATURES_H=1
14608   else
14609     HAVE_FEATURES_H=0
14610   fi
14611
14612
14613 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14614 if test "x$ac_cv_type_size_t" = x""yes; then :
14615
14616 else
14617
14618 cat >>confdefs.h <<_ACEOF
14619 #define size_t unsigned int
14620 _ACEOF
14621
14622 fi
14623
14624
14625   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
14626 $as_echo_n "checking for inttypes.h... " >&6; }
14627 if test "${gl_cv_header_inttypes_h+set}" = set; then :
14628   $as_echo_n "(cached) " >&6
14629 else
14630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14631 /* end confdefs.h.  */
14632
14633 #include <sys/types.h>
14634 #include <inttypes.h>
14635
14636 int
14637 main ()
14638 {
14639 uintmax_t i = (uintmax_t) -1; return !i;
14640   ;
14641   return 0;
14642 }
14643 _ACEOF
14644 if ac_fn_c_try_compile "$LINENO"; then :
14645   gl_cv_header_inttypes_h=yes
14646 else
14647   gl_cv_header_inttypes_h=no
14648 fi
14649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14650 fi
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
14652 $as_echo "$gl_cv_header_inttypes_h" >&6; }
14653   if test $gl_cv_header_inttypes_h = yes; then
14654
14655 cat >>confdefs.h <<_ACEOF
14656 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
14657 _ACEOF
14658
14659   fi
14660
14661
14662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
14663 $as_echo_n "checking for stdint.h... " >&6; }
14664 if test "${gl_cv_header_stdint_h+set}" = set; then :
14665   $as_echo_n "(cached) " >&6
14666 else
14667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14668 /* end confdefs.h.  */
14669 #include <sys/types.h>
14670             #include <stdint.h>
14671 int
14672 main ()
14673 {
14674 uintmax_t i = (uintmax_t) -1; return !i;
14675   ;
14676   return 0;
14677 }
14678 _ACEOF
14679 if ac_fn_c_try_compile "$LINENO"; then :
14680   gl_cv_header_stdint_h=yes
14681 else
14682   gl_cv_header_stdint_h=no
14683 fi
14684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685 fi
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
14687 $as_echo "$gl_cv_header_stdint_h" >&6; }
14688   if test $gl_cv_header_stdint_h = yes; then
14689
14690 cat >>confdefs.h <<_ACEOF
14691 #define HAVE_STDINT_H_WITH_UINTMAX 1
14692 _ACEOF
14693
14694   fi
14695
14696
14697
14698
14699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
14700 $as_echo_n "checking for intmax_t... " >&6; }
14701 if test "${gt_cv_c_intmax_t+set}" = set; then :
14702   $as_echo_n "(cached) " >&6
14703 else
14704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14705 /* end confdefs.h.  */
14706
14707 #include <stddef.h>
14708 #include <stdlib.h>
14709 #if HAVE_STDINT_H_WITH_UINTMAX
14710 #include <stdint.h>
14711 #endif
14712 #if HAVE_INTTYPES_H_WITH_UINTMAX
14713 #include <inttypes.h>
14714 #endif
14715
14716 int
14717 main ()
14718 {
14719 intmax_t x = -1; return !x;
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 if ac_fn_c_try_compile "$LINENO"; then :
14725   gt_cv_c_intmax_t=yes
14726 else
14727   gt_cv_c_intmax_t=no
14728 fi
14729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14730 fi
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
14732 $as_echo "$gt_cv_c_intmax_t" >&6; }
14733   if test $gt_cv_c_intmax_t = yes; then
14734
14735 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
14736
14737   else
14738
14739     test $ac_cv_type_long_long_int = yes \
14740       && ac_type='long long' \
14741       || ac_type='long'
14742
14743 cat >>confdefs.h <<_ACEOF
14744 #define intmax_t $ac_type
14745 _ACEOF
14746
14747   fi
14748
14749
14750
14751
14752
14753
14754
14755   for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
14756 do :
14757   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14758 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14759 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14760   cat >>confdefs.h <<_ACEOF
14761 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14762 _ACEOF
14763
14764 fi
14765 done
14766
14767       ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
14768 "
14769 if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
14770   ac_have_decl=1
14771 else
14772   ac_have_decl=0
14773 fi
14774
14775 cat >>confdefs.h <<_ACEOF
14776 #define HAVE_DECL__SNPRINTF $ac_have_decl
14777 _ACEOF
14778
14779
14780   case "$gl_cv_func_snprintf_retval_c99" in
14781     *yes)
14782
14783 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
14784
14785       ;;
14786   esac
14787
14788
14789
14790
14791
14792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
14793 $as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
14794 if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
14795   $as_echo_n "(cached) " >&6
14796 else
14797
14798       if test "$cross_compiling" = yes; then :
14799
14800          case "$host_os" in
14801                                  # Guess yes on glibc systems.
14802            *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
14803                                  # Guess yes on FreeBSD >= 5.
14804            freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
14805            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
14806                                  # Guess yes on MacOS X >= 10.3.
14807            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
14808            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
14809                                  # Guess yes on OpenBSD >= 3.9.
14810            openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
14811                                  gl_cv_func_printf_sizes_c99="guessing no";;
14812            openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
14813                                  # Guess yes on Solaris >= 2.10.
14814            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
14815            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
14816                                  # Guess yes on NetBSD >= 3.
14817            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
14818                                  gl_cv_func_printf_sizes_c99="guessing no";;
14819            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
14820                                  # If we don't know, assume the worst.
14821            *)                    gl_cv_func_printf_sizes_c99="guessing no";;
14822          esac
14823
14824 else
14825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14826 /* end confdefs.h.  */
14827
14828 #include <stddef.h>
14829 #include <stdio.h>
14830 #include <string.h>
14831 #include <sys/types.h>
14832 #if HAVE_STDINT_H_WITH_UINTMAX
14833 # include <stdint.h>
14834 #endif
14835 #if HAVE_INTTYPES_H_WITH_UINTMAX
14836 # include <inttypes.h>
14837 #endif
14838 static char buf[100];
14839 int main ()
14840 {
14841   int result = 0;
14842 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
14843   buf[0] = '\0';
14844   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
14845       || strcmp (buf, "12345671 33") != 0)
14846     result |= 1;
14847 #endif
14848   buf[0] = '\0';
14849   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
14850       || strcmp (buf, "12345672 33") != 0)
14851     result |= 2;
14852   buf[0] = '\0';
14853   if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
14854       || strcmp (buf, "12345673 33") != 0)
14855     result |= 4;
14856   buf[0] = '\0';
14857   if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
14858       || strcmp (buf, "1.5 33") != 0)
14859     result |= 8;
14860   return result;
14861 }
14862 _ACEOF
14863 if ac_fn_c_try_run "$LINENO"; then :
14864   gl_cv_func_printf_sizes_c99=yes
14865 else
14866   gl_cv_func_printf_sizes_c99=no
14867 fi
14868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14869   conftest.$ac_objext conftest.beam conftest.$ac_ext
14870 fi
14871
14872
14873 fi
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
14875 $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
14876
14877
14878
14879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
14880 $as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
14881 if test "${gl_cv_func_printf_long_double+set}" = set; then :
14882   $as_echo_n "(cached) " >&6
14883 else
14884
14885       if test "$cross_compiling" = yes; then :
14886
14887          case "$host_os" in
14888            beos*)        gl_cv_func_printf_long_double="guessing no";;
14889            mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
14890            *)            gl_cv_func_printf_long_double="guessing yes";;
14891          esac
14892
14893 else
14894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h.  */
14896
14897 #include <stdio.h>
14898 #include <string.h>
14899 static char buf[10000];
14900 int main ()
14901 {
14902   int result = 0;
14903   buf[0] = '\0';
14904   if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
14905       || strcmp (buf, "1.750000 33") != 0)
14906     result |= 1;
14907   buf[0] = '\0';
14908   if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
14909       || strcmp (buf, "1.750000e+00 33") != 0)
14910     result |= 2;
14911   buf[0] = '\0';
14912   if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
14913       || strcmp (buf, "1.75 33") != 0)
14914     result |= 4;
14915   return result;
14916 }
14917 _ACEOF
14918 if ac_fn_c_try_run "$LINENO"; then :
14919   gl_cv_func_printf_long_double=yes
14920 else
14921   gl_cv_func_printf_long_double=no
14922 fi
14923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14924   conftest.$ac_objext conftest.beam conftest.$ac_ext
14925 fi
14926
14927
14928 fi
14929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
14930 $as_echo "$gl_cv_func_printf_long_double" >&6; }
14931
14932
14933
14934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
14935 $as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
14936 if test "${gl_cv_func_printf_infinite+set}" = set; then :
14937   $as_echo_n "(cached) " >&6
14938 else
14939
14940       if test "$cross_compiling" = yes; then :
14941
14942          case "$host_os" in
14943                                  # Guess yes on glibc systems.
14944            *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
14945                                  # Guess yes on FreeBSD >= 6.
14946            freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
14947            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
14948                                  # Guess yes on MacOS X >= 10.3.
14949            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
14950            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
14951                                  # Guess yes on HP-UX >= 11.
14952            hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
14953            hpux*)                gl_cv_func_printf_infinite="guessing yes";;
14954                                  # Guess yes on NetBSD >= 3.
14955            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
14956                                  gl_cv_func_printf_infinite="guessing no";;
14957            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
14958                                  # Guess yes on BeOS.
14959            beos*)                gl_cv_func_printf_infinite="guessing yes";;
14960                                  # If we don't know, assume the worst.
14961            *)                    gl_cv_func_printf_infinite="guessing no";;
14962          esac
14963
14964 else
14965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14966 /* end confdefs.h.  */
14967
14968 #include <stdio.h>
14969 #include <string.h>
14970 static int
14971 strisnan (const char *string, size_t start_index, size_t end_index)
14972 {
14973   if (start_index < end_index)
14974     {
14975       if (string[start_index] == '-')
14976         start_index++;
14977       if (start_index + 3 <= end_index
14978           && memcmp (string + start_index, "nan", 3) == 0)
14979         {
14980           start_index += 3;
14981           if (start_index == end_index
14982               || (string[start_index] == '(' && string[end_index - 1] == ')'))
14983             return 1;
14984         }
14985     }
14986   return 0;
14987 }
14988 static int
14989 have_minus_zero ()
14990 {
14991   static double plus_zero = 0.0;
14992   double minus_zero = - plus_zero;
14993   return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
14994 }
14995 static char buf[10000];
14996 static double zero = 0.0;
14997 int main ()
14998 {
14999   int result = 0;
15000   if (sprintf (buf, "%f", 1.0 / 0.0) < 0
15001       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15002     result |= 1;
15003   if (sprintf (buf, "%f", -1.0 / 0.0) < 0
15004       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15005     result |= 1;
15006   if (sprintf (buf, "%f", zero / zero) < 0
15007       || !strisnan (buf, 0, strlen (buf)))
15008     result |= 2;
15009   if (sprintf (buf, "%e", 1.0 / 0.0) < 0
15010       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15011     result |= 4;
15012   if (sprintf (buf, "%e", -1.0 / 0.0) < 0
15013       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15014     result |= 4;
15015   if (sprintf (buf, "%e", zero / zero) < 0
15016       || !strisnan (buf, 0, strlen (buf)))
15017     result |= 8;
15018   if (sprintf (buf, "%g", 1.0 / 0.0) < 0
15019       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15020     result |= 16;
15021   if (sprintf (buf, "%g", -1.0 / 0.0) < 0
15022       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15023     result |= 16;
15024   if (sprintf (buf, "%g", zero / zero) < 0
15025       || !strisnan (buf, 0, strlen (buf)))
15026     result |= 32;
15027   /* This test fails on HP-UX 10.20.  */
15028   if (have_minus_zero ())
15029     if (sprintf (buf, "%g", - zero) < 0
15030         || strcmp (buf, "-0") != 0)
15031     result |= 64;
15032   return result;
15033 }
15034 _ACEOF
15035 if ac_fn_c_try_run "$LINENO"; then :
15036   gl_cv_func_printf_infinite=yes
15037 else
15038   gl_cv_func_printf_infinite=no
15039 fi
15040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15041   conftest.$ac_objext conftest.beam conftest.$ac_ext
15042 fi
15043
15044
15045 fi
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
15047 $as_echo "$gl_cv_func_printf_infinite" >&6; }
15048
15049
15050
15051
15052
15053          if test -n "$gl_printf_safe"; then
15054
15055 $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
15056
15057   fi
15058   case "$gl_cv_func_printf_long_double" in
15059     *yes)
15060       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
15061 $as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
15062 if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
15063   $as_echo_n "(cached) " >&6
15064 else
15065
15066           if test "$cross_compiling" = yes; then :
15067
15068              case "$host_cpu" in
15069                                      # Guess no on ia64, x86_64, i386.
15070                ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
15071                *)
15072                  case "$host_os" in
15073                                          # Guess yes on glibc systems.
15074                    *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
15075                                          # Guess yes on FreeBSD >= 6.
15076                    freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
15077                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
15078                                          # Guess yes on HP-UX >= 11.
15079                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
15080                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
15081                                          # If we don't know, assume the worst.
15082                    *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
15083                  esac
15084                  ;;
15085              esac
15086
15087 else
15088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15089 /* end confdefs.h.  */
15090
15091
15092 #include <stdlib.h>
15093 #if defined __MACH__ && defined __APPLE__
15094 /* Avoid a crash on MacOS X.  */
15095 #include <mach/mach.h>
15096 #include <mach/mach_error.h>
15097 #include <mach/thread_status.h>
15098 #include <mach/exception.h>
15099 #include <mach/task.h>
15100 #include <pthread.h>
15101 /* The exception port on which our thread listens.  */
15102 static mach_port_t our_exception_port;
15103 /* The main function of the thread listening for exceptions of type
15104    EXC_BAD_ACCESS.  */
15105 static void *
15106 mach_exception_thread (void *arg)
15107 {
15108   /* Buffer for a message to be received.  */
15109   struct {
15110     mach_msg_header_t head;
15111     mach_msg_body_t msgh_body;
15112     char data[1024];
15113   } msg;
15114   mach_msg_return_t retval;
15115   /* Wait for a message on the exception port.  */
15116   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15117                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15118   if (retval != MACH_MSG_SUCCESS)
15119     abort ();
15120   exit (1);
15121 }
15122 static void
15123 nocrash_init (void)
15124 {
15125   mach_port_t self = mach_task_self ();
15126   /* Allocate a port on which the thread shall listen for exceptions.  */
15127   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15128       == KERN_SUCCESS) {
15129     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
15130     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15131                                 MACH_MSG_TYPE_MAKE_SEND)
15132         == KERN_SUCCESS) {
15133       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
15134          for us.  */
15135       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15136       /* Create the thread listening on the exception port.  */
15137       pthread_attr_t attr;
15138       pthread_t thread;
15139       if (pthread_attr_init (&attr) == 0
15140           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15141           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15142         pthread_attr_destroy (&attr);
15143         /* Replace the exception port info for these exceptions with our own.
15144            Note that we replace the exception port for the entire task, not only
15145            for a particular thread.  This has the effect that when our exception
15146            port gets the message, the thread specific exception port has already
15147            been asked, and we don't need to bother about it.
15148            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
15149         task_set_exception_ports (self, mask, our_exception_port,
15150                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15151       }
15152     }
15153   }
15154 }
15155 #else
15156 /* Avoid a crash on POSIX systems.  */
15157 #include <signal.h>
15158 /* A POSIX signal handler.  */
15159 static void
15160 exception_handler (int sig)
15161 {
15162   exit (1);
15163 }
15164 static void
15165 nocrash_init (void)
15166 {
15167 #ifdef SIGSEGV
15168   signal (SIGSEGV, exception_handler);
15169 #endif
15170 #ifdef SIGBUS
15171   signal (SIGBUS, exception_handler);
15172 #endif
15173 }
15174 #endif
15175
15176 #include <float.h>
15177 #include <stdio.h>
15178 #include <string.h>
15179 static int
15180 strisnan (const char *string, size_t start_index, size_t end_index)
15181 {
15182   if (start_index < end_index)
15183     {
15184       if (string[start_index] == '-')
15185         start_index++;
15186       if (start_index + 3 <= end_index
15187           && memcmp (string + start_index, "nan", 3) == 0)
15188         {
15189           start_index += 3;
15190           if (start_index == end_index
15191               || (string[start_index] == '(' && string[end_index - 1] == ')'))
15192             return 1;
15193         }
15194     }
15195   return 0;
15196 }
15197 static char buf[10000];
15198 static long double zeroL = 0.0L;
15199 int main ()
15200 {
15201   int result = 0;
15202   nocrash_init();
15203   if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
15204       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15205     result |= 1;
15206   if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
15207       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15208     result |= 1;
15209   if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
15210       || !strisnan (buf, 0, strlen (buf)))
15211     result |= 1;
15212   if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
15213       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15214     result |= 1;
15215   if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
15216       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15217     result |= 1;
15218   if (sprintf (buf, "%Le", zeroL / zeroL) < 0
15219       || !strisnan (buf, 0, strlen (buf)))
15220     result |= 1;
15221   if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
15222       || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
15223     result |= 1;
15224   if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
15225       || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
15226     result |= 1;
15227   if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
15228       || !strisnan (buf, 0, strlen (buf)))
15229     result |= 1;
15230 #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_))
15231 /* Representation of an 80-bit 'long double' as an initializer for a sequence
15232    of 'unsigned int' words.  */
15233 # ifdef WORDS_BIGENDIAN
15234 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
15235      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
15236        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
15237        (unsigned int) (mantlo) << 16                                        \
15238      }
15239 # else
15240 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
15241      { mantlo, manthi, exponent }
15242 # endif
15243   { /* Quiet NaN.  */
15244     static union { unsigned int word[4]; long double value; } x =
15245       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
15246     if (sprintf (buf, "%Lf", x.value) < 0
15247         || !strisnan (buf, 0, strlen (buf)))
15248       result |= 2;
15249     if (sprintf (buf, "%Le", x.value) < 0
15250         || !strisnan (buf, 0, strlen (buf)))
15251       result |= 2;
15252     if (sprintf (buf, "%Lg", x.value) < 0
15253         || !strisnan (buf, 0, strlen (buf)))
15254       result |= 2;
15255   }
15256   {
15257     /* Signalling NaN.  */
15258     static union { unsigned int word[4]; long double value; } x =
15259       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
15260     if (sprintf (buf, "%Lf", x.value) < 0
15261         || !strisnan (buf, 0, strlen (buf)))
15262       result |= 2;
15263     if (sprintf (buf, "%Le", x.value) < 0
15264         || !strisnan (buf, 0, strlen (buf)))
15265       result |= 2;
15266     if (sprintf (buf, "%Lg", x.value) < 0
15267         || !strisnan (buf, 0, strlen (buf)))
15268       result |= 2;
15269   }
15270   { /* Pseudo-NaN.  */
15271     static union { unsigned int word[4]; long double value; } x =
15272       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
15273     if (sprintf (buf, "%Lf", x.value) < 0
15274         || !strisnan (buf, 0, strlen (buf)))
15275       result |= 4;
15276     if (sprintf (buf, "%Le", x.value) < 0
15277         || !strisnan (buf, 0, strlen (buf)))
15278       result |= 4;
15279     if (sprintf (buf, "%Lg", x.value) < 0
15280         || !strisnan (buf, 0, strlen (buf)))
15281       result |= 4;
15282   }
15283   { /* Pseudo-Infinity.  */
15284     static union { unsigned int word[4]; long double value; } x =
15285       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
15286     if (sprintf (buf, "%Lf", x.value) < 0
15287         || !strisnan (buf, 0, strlen (buf)))
15288       result |= 8;
15289     if (sprintf (buf, "%Le", x.value) < 0
15290         || !strisnan (buf, 0, strlen (buf)))
15291       result |= 8;
15292     if (sprintf (buf, "%Lg", x.value) < 0
15293         || !strisnan (buf, 0, strlen (buf)))
15294       result |= 8;
15295   }
15296   { /* Pseudo-Zero.  */
15297     static union { unsigned int word[4]; long double value; } x =
15298       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
15299     if (sprintf (buf, "%Lf", x.value) < 0
15300         || !strisnan (buf, 0, strlen (buf)))
15301       result |= 16;
15302     if (sprintf (buf, "%Le", x.value) < 0
15303         || !strisnan (buf, 0, strlen (buf)))
15304       result |= 16;
15305     if (sprintf (buf, "%Lg", x.value) < 0
15306         || !strisnan (buf, 0, strlen (buf)))
15307       result |= 16;
15308   }
15309   { /* Unnormalized number.  */
15310     static union { unsigned int word[4]; long double value; } x =
15311       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
15312     if (sprintf (buf, "%Lf", x.value) < 0
15313         || !strisnan (buf, 0, strlen (buf)))
15314       result |= 32;
15315     if (sprintf (buf, "%Le", x.value) < 0
15316         || !strisnan (buf, 0, strlen (buf)))
15317       result |= 32;
15318     if (sprintf (buf, "%Lg", x.value) < 0
15319         || !strisnan (buf, 0, strlen (buf)))
15320       result |= 32;
15321   }
15322   { /* Pseudo-Denormal.  */
15323     static union { unsigned int word[4]; long double value; } x =
15324       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
15325     if (sprintf (buf, "%Lf", x.value) < 0
15326         || !strisnan (buf, 0, strlen (buf)))
15327       result |= 64;
15328     if (sprintf (buf, "%Le", x.value) < 0
15329         || !strisnan (buf, 0, strlen (buf)))
15330       result |= 64;
15331     if (sprintf (buf, "%Lg", x.value) < 0
15332         || !strisnan (buf, 0, strlen (buf)))
15333       result |= 64;
15334   }
15335 #endif
15336   return result;
15337 }
15338 _ACEOF
15339 if ac_fn_c_try_run "$LINENO"; then :
15340   gl_cv_func_printf_infinite_long_double=yes
15341 else
15342   gl_cv_func_printf_infinite_long_double=no
15343 fi
15344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15345   conftest.$ac_objext conftest.beam conftest.$ac_ext
15346 fi
15347
15348
15349 fi
15350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
15351 $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
15352       ;;
15353     *)
15354       gl_cv_func_printf_infinite_long_double="irrelevant"
15355       ;;
15356   esac
15357
15358
15359
15360      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
15361 $as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
15362 if test "${gl_cv_func_printf_directive_a+set}" = set; then :
15363   $as_echo_n "(cached) " >&6
15364 else
15365
15366       if test "$cross_compiling" = yes; then :
15367
15368          case "$host_os" in
15369                                  # Guess yes on glibc >= 2.5 systems.
15370            *-gnu*)
15371              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372 /* end confdefs.h.  */
15373
15374                #include <features.h>
15375                #ifdef __GNU_LIBRARY__
15376                 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
15377                  BZ2908
15378                 #endif
15379                #endif
15380
15381 _ACEOF
15382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15383   $EGREP "BZ2908" >/dev/null 2>&1; then :
15384   gl_cv_func_printf_directive_a="guessing yes"
15385 else
15386   gl_cv_func_printf_directive_a="guessing no"
15387 fi
15388 rm -f conftest*
15389
15390              ;;
15391                                  # If we don't know, assume the worst.
15392            *)                    gl_cv_func_printf_directive_a="guessing no";;
15393          esac
15394
15395 else
15396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15397 /* end confdefs.h.  */
15398
15399 #include <stdio.h>
15400 #include <string.h>
15401 static char buf[100];
15402 int main ()
15403 {
15404   int result = 0;
15405   if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
15406       || (strcmp (buf, "0x1.922p+1 33") != 0
15407           && strcmp (buf, "0x3.244p+0 33") != 0
15408           && strcmp (buf, "0x6.488p-1 33") != 0
15409           && strcmp (buf, "0xc.91p-2 33") != 0))
15410     result |= 1;
15411   if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
15412       || (strcmp (buf, "-0X1.922P+1 33") != 0
15413           && strcmp (buf, "-0X3.244P+0 33") != 0
15414           && strcmp (buf, "-0X6.488P-1 33") != 0
15415           && strcmp (buf, "-0XC.91P-2 33") != 0))
15416     result |= 2;
15417   /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
15418   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
15419       || (strcmp (buf, "0x1.83p+0 33") != 0
15420           && strcmp (buf, "0x3.05p-1 33") != 0
15421           && strcmp (buf, "0x6.0ap-2 33") != 0
15422           && strcmp (buf, "0xc.14p-3 33") != 0))
15423     result |= 4;
15424   /* This catches a FreeBSD 6.1 bug.  See
15425      <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
15426   if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
15427       || buf[0] == '0')
15428     result |= 8;
15429   /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
15430   if (sprintf (buf, "%.1a", 1.999) < 0
15431       || (strcmp (buf, "0x1.0p+1") != 0
15432           && strcmp (buf, "0x2.0p+0") != 0
15433           && strcmp (buf, "0x4.0p-1") != 0
15434           && strcmp (buf, "0x8.0p-2") != 0))
15435     result |= 16;
15436   /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
15437      glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
15438   if (sprintf (buf, "%.1La", 1.999L) < 0
15439       || (strcmp (buf, "0x1.0p+1") != 0
15440           && strcmp (buf, "0x2.0p+0") != 0
15441           && strcmp (buf, "0x4.0p-1") != 0
15442           && strcmp (buf, "0x8.0p-2") != 0))
15443     result |= 32;
15444   return result;
15445 }
15446 _ACEOF
15447 if ac_fn_c_try_run "$LINENO"; then :
15448   gl_cv_func_printf_directive_a=yes
15449 else
15450   gl_cv_func_printf_directive_a=no
15451 fi
15452 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15453   conftest.$ac_objext conftest.beam conftest.$ac_ext
15454 fi
15455
15456
15457 fi
15458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
15459 $as_echo "$gl_cv_func_printf_directive_a" >&6; }
15460
15461
15462
15463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
15464 $as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
15465 if test "${gl_cv_func_printf_directive_f+set}" = set; then :
15466   $as_echo_n "(cached) " >&6
15467 else
15468
15469       if test "$cross_compiling" = yes; then :
15470
15471          case "$host_os" in
15472                                  # Guess yes on glibc systems.
15473            *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
15474                                  # Guess yes on FreeBSD >= 6.
15475            freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
15476            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
15477                                  # Guess yes on MacOS X >= 10.3.
15478            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
15479            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
15480                                  # Guess yes on Solaris >= 2.10.
15481            solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15482            solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
15483                                  # If we don't know, assume the worst.
15484            *)                    gl_cv_func_printf_directive_f="guessing no";;
15485          esac
15486
15487 else
15488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15489 /* end confdefs.h.  */
15490
15491 #include <stdio.h>
15492 #include <string.h>
15493 static char buf[100];
15494 int main ()
15495 {
15496   int result = 0;
15497   if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
15498       || strcmp (buf, "1234567.000000 33") != 0)
15499     result |= 1;
15500   if (sprintf (buf, "%F", 1.0 / 0.0) < 0
15501       || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
15502     result |= 2;
15503   /* This catches a Cygwin 1.5.x bug.  */
15504   if (sprintf (buf, "%.F", 1234.0) < 0
15505       || strcmp (buf, "1234") != 0)
15506     result |= 4;
15507   return result;
15508 }
15509 _ACEOF
15510 if ac_fn_c_try_run "$LINENO"; then :
15511   gl_cv_func_printf_directive_f=yes
15512 else
15513   gl_cv_func_printf_directive_f=no
15514 fi
15515 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15516   conftest.$ac_objext conftest.beam conftest.$ac_ext
15517 fi
15518
15519
15520 fi
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
15522 $as_echo "$gl_cv_func_printf_directive_f" >&6; }
15523
15524
15525
15526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
15527 $as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
15528 if test "${gl_cv_func_printf_directive_n+set}" = set; then :
15529   $as_echo_n "(cached) " >&6
15530 else
15531
15532       if test "$cross_compiling" = yes; then :
15533
15534          case "$host_os" in
15535            *)     gl_cv_func_printf_directive_n="guessing yes";;
15536          esac
15537
15538 else
15539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15540 /* end confdefs.h.  */
15541
15542 #include <stdio.h>
15543 #include <string.h>
15544 static char fmtstring[10];
15545 static char buf[100];
15546 int main ()
15547 {
15548   int count = -1;
15549   /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
15550      support %n in format strings in read-only memory but not in writable
15551      memory.  */
15552   strcpy (fmtstring, "%d %n");
15553   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
15554       || strcmp (buf, "123 ") != 0
15555       || count != 4)
15556     return 1;
15557   return 0;
15558 }
15559 _ACEOF
15560 if ac_fn_c_try_run "$LINENO"; then :
15561   gl_cv_func_printf_directive_n=yes
15562 else
15563   gl_cv_func_printf_directive_n=no
15564 fi
15565 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15566   conftest.$ac_objext conftest.beam conftest.$ac_ext
15567 fi
15568
15569
15570 fi
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
15572 $as_echo "$gl_cv_func_printf_directive_n" >&6; }
15573
15574
15575
15576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
15577 $as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
15578 if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
15579   $as_echo_n "(cached) " >&6
15580 else
15581
15582       if test "$cross_compiling" = yes; then :
15583
15584          case "$host_os" in
15585            openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
15586            irix*)           gl_cv_func_printf_directive_ls="guessing no";;
15587            solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
15588            cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
15589            beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
15590            *)               gl_cv_func_printf_directive_ls="guessing yes";;
15591          esac
15592
15593 else
15594   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15595 /* end confdefs.h.  */
15596
15597 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15598    <wchar.h>.
15599    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15600    included before <wchar.h>.  */
15601 #include <stddef.h>
15602 #include <stdio.h>
15603 #include <time.h>
15604 #include <wchar.h>
15605 #include <string.h>
15606 int main ()
15607 {
15608   int result = 0;
15609   char buf[100];
15610   /* Test whether %ls works at all.
15611      This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
15612      Cygwin 1.5.  */
15613   {
15614     static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
15615     buf[0] = '\0';
15616     if (sprintf (buf, "%ls", wstring) < 0
15617         || strcmp (buf, "abc") != 0)
15618       result |= 1;
15619   }
15620   /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
15621      assertion failure inside libc), but not on OpenBSD 4.0.  */
15622   {
15623     static const wchar_t wstring[] = { 'a', 0 };
15624     buf[0] = '\0';
15625     if (sprintf (buf, "%ls", wstring) < 0
15626         || strcmp (buf, "a") != 0)
15627       result |= 2;
15628   }
15629   /* Test whether precisions in %ls are supported as specified in ISO C 99
15630      section 7.19.6.1:
15631        "If a precision is specified, no more than that many bytes are written
15632         (including shift sequences, if any), and the array shall contain a
15633         null wide character if, to equal the multibyte character sequence
15634         length given by the precision, the function would need to access a
15635         wide character one past the end of the array."
15636      This test fails on Solaris 10.  */
15637   {
15638     static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
15639     buf[0] = '\0';
15640     if (sprintf (buf, "%.2ls", wstring) < 0
15641         || strcmp (buf, "ab") != 0)
15642       result |= 8;
15643   }
15644   return result;
15645 }
15646 _ACEOF
15647 if ac_fn_c_try_run "$LINENO"; then :
15648   gl_cv_func_printf_directive_ls=yes
15649 else
15650   gl_cv_func_printf_directive_ls=no
15651 fi
15652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15653   conftest.$ac_objext conftest.beam conftest.$ac_ext
15654 fi
15655
15656
15657 fi
15658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
15659 $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
15660
15661
15662
15663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
15664 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
15665 if test "${gl_cv_func_printf_positions+set}" = set; then :
15666   $as_echo_n "(cached) " >&6
15667 else
15668
15669       if test "$cross_compiling" = yes; then :
15670
15671          case "$host_os" in
15672            netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
15673                          gl_cv_func_printf_positions="guessing no";;
15674            beos*)        gl_cv_func_printf_positions="guessing no";;
15675            mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
15676            *)            gl_cv_func_printf_positions="guessing yes";;
15677          esac
15678
15679 else
15680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15681 /* end confdefs.h.  */
15682
15683 #include <stdio.h>
15684 #include <string.h>
15685 /* The string "%2$d %1$d", with dollar characters protected from the shell's
15686    dollar expansion (possibly an autoconf bug).  */
15687 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
15688 static char buf[100];
15689 int main ()
15690 {
15691   sprintf (buf, format, 33, 55);
15692   return (strcmp (buf, "55 33") != 0);
15693 }
15694 _ACEOF
15695 if ac_fn_c_try_run "$LINENO"; then :
15696   gl_cv_func_printf_positions=yes
15697 else
15698   gl_cv_func_printf_positions=no
15699 fi
15700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15701   conftest.$ac_objext conftest.beam conftest.$ac_ext
15702 fi
15703
15704
15705 fi
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
15707 $as_echo "$gl_cv_func_printf_positions" >&6; }
15708
15709
15710
15711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
15712 $as_echo_n "checking whether printf supports the grouping flag... " >&6; }
15713 if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
15714   $as_echo_n "(cached) " >&6
15715 else
15716
15717       if test "$cross_compiling" = yes; then :
15718
15719          case "$host_os" in
15720            cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
15721            netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
15722            mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
15723            *)            gl_cv_func_printf_flag_grouping="guessing yes";;
15724          esac
15725
15726 else
15727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15728 /* end confdefs.h.  */
15729
15730 #include <stdio.h>
15731 #include <string.h>
15732 static char buf[100];
15733 int main ()
15734 {
15735   if (sprintf (buf, "%'d %d", 1234567, 99) < 0
15736       || buf[strlen (buf) - 1] != '9')
15737     return 1;
15738   return 0;
15739 }
15740 _ACEOF
15741 if ac_fn_c_try_run "$LINENO"; then :
15742   gl_cv_func_printf_flag_grouping=yes
15743 else
15744   gl_cv_func_printf_flag_grouping=no
15745 fi
15746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15747   conftest.$ac_objext conftest.beam conftest.$ac_ext
15748 fi
15749
15750
15751 fi
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
15753 $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
15754
15755
15756
15757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
15758 $as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
15759 if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
15760   $as_echo_n "(cached) " >&6
15761 else
15762
15763       if test "$cross_compiling" = yes; then :
15764
15765          case "$host_os" in
15766                     # Guess yes on HP-UX 11.
15767            hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
15768                     # Guess no on HP-UX 10 and older.
15769            hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
15770                     # Guess yes otherwise.
15771            *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
15772          esac
15773
15774 else
15775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776 /* end confdefs.h.  */
15777
15778 #include <stdio.h>
15779 #include <string.h>
15780 static char buf[100];
15781 int main ()
15782 {
15783   /* Check that a '-' flag is not annihilated by a negative width.  */
15784   if (sprintf (buf, "a%-*sc", -3, "b") < 0
15785       || strcmp (buf, "ab  c") != 0)
15786     return 1;
15787   return 0;
15788 }
15789 _ACEOF
15790 if ac_fn_c_try_run "$LINENO"; then :
15791   gl_cv_func_printf_flag_leftadjust=yes
15792 else
15793   gl_cv_func_printf_flag_leftadjust=no
15794 fi
15795 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15796   conftest.$ac_objext conftest.beam conftest.$ac_ext
15797 fi
15798
15799
15800 fi
15801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
15802 $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
15803
15804
15805
15806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
15807 $as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
15808 if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
15809   $as_echo_n "(cached) " >&6
15810 else
15811
15812       if test "$cross_compiling" = yes; then :
15813
15814          case "$host_os" in
15815                    # Guess yes on glibc systems.
15816            *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
15817                    # Guess yes on BeOS.
15818            beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
15819                    # If we don't know, assume the worst.
15820            *)      gl_cv_func_printf_flag_zero="guessing no";;
15821          esac
15822
15823 else
15824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15825 /* end confdefs.h.  */
15826
15827 #include <stdio.h>
15828 #include <string.h>
15829 static char buf[100];
15830 int main ()
15831 {
15832   if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
15833       || (strcmp (buf, "       inf") != 0
15834           && strcmp (buf, "  infinity") != 0))
15835     return 1;
15836   return 0;
15837 }
15838 _ACEOF
15839 if ac_fn_c_try_run "$LINENO"; then :
15840   gl_cv_func_printf_flag_zero=yes
15841 else
15842   gl_cv_func_printf_flag_zero=no
15843 fi
15844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15845   conftest.$ac_objext conftest.beam conftest.$ac_ext
15846 fi
15847
15848
15849 fi
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
15851 $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
15852
15853
15854
15855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
15856 $as_echo_n "checking whether printf supports large precisions... " >&6; }
15857 if test "${gl_cv_func_printf_precision+set}" = set; then :
15858   $as_echo_n "(cached) " >&6
15859 else
15860
15861       if test "$cross_compiling" = yes; then :
15862
15863          case "$host_os" in
15864            # Guess no only on Solaris, native Win32, and BeOS systems.
15865            solaris*)     gl_cv_func_printf_precision="guessing no" ;;
15866            mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
15867            beos*)        gl_cv_func_printf_precision="guessing no" ;;
15868            *)            gl_cv_func_printf_precision="guessing yes" ;;
15869          esac
15870
15871 else
15872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15873 /* end confdefs.h.  */
15874
15875 #include <stdio.h>
15876 #include <string.h>
15877 static char buf[5000];
15878 int main ()
15879 {
15880   int result = 0;
15881 #ifdef __BEOS__
15882   /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
15883   return 1;
15884 #endif
15885   if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
15886     result |= 1;
15887   if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
15888     result |= 2;
15889   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
15890       || buf[0] != '1')
15891     result |= 4;
15892   return result;
15893 }
15894 _ACEOF
15895 if ac_fn_c_try_run "$LINENO"; then :
15896   gl_cv_func_printf_precision=yes
15897 else
15898   gl_cv_func_printf_precision=no
15899 fi
15900 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15901   conftest.$ac_objext conftest.beam conftest.$ac_ext
15902 fi
15903
15904
15905 fi
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
15907 $as_echo "$gl_cv_func_printf_precision" >&6; }
15908
15909
15910
15911
15912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
15913 $as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
15914 if test "${gl_cv_func_printf_enomem+set}" = set; then :
15915   $as_echo_n "(cached) " >&6
15916 else
15917
15918       gl_cv_func_printf_enomem="guessing no"
15919       if test "$cross_compiling" = no; then
15920         if test $APPLE_UNIVERSAL_BUILD = 0; then
15921           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15922 /* end confdefs.h.  */
15923
15924
15925 #include <stdlib.h>
15926 #if defined __MACH__ && defined __APPLE__
15927 /* Avoid a crash on MacOS X.  */
15928 #include <mach/mach.h>
15929 #include <mach/mach_error.h>
15930 #include <mach/thread_status.h>
15931 #include <mach/exception.h>
15932 #include <mach/task.h>
15933 #include <pthread.h>
15934 /* The exception port on which our thread listens.  */
15935 static mach_port_t our_exception_port;
15936 /* The main function of the thread listening for exceptions of type
15937    EXC_BAD_ACCESS.  */
15938 static void *
15939 mach_exception_thread (void *arg)
15940 {
15941   /* Buffer for a message to be received.  */
15942   struct {
15943     mach_msg_header_t head;
15944     mach_msg_body_t msgh_body;
15945     char data1024;
15946   } msg;
15947   mach_msg_return_t retval;
15948   /* Wait for a message on the exception port.  */
15949   retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
15950                      our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
15951   if (retval != MACH_MSG_SUCCESS)
15952     abort ();
15953   exit (1);
15954 }
15955 static void
15956 nocrash_init (void)
15957 {
15958   mach_port_t self = mach_task_self ();
15959   /* Allocate a port on which the thread shall listen for exceptions.  */
15960   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
15961       == KERN_SUCCESS) {
15962     /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
15963     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
15964                                 MACH_MSG_TYPE_MAKE_SEND)
15965         == KERN_SUCCESS) {
15966       /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
15967          for us.  */
15968       exception_mask_t mask = EXC_MASK_BAD_ACCESS;
15969       /* Create the thread listening on the exception port.  */
15970       pthread_attr_t attr;
15971       pthread_t thread;
15972       if (pthread_attr_init (&attr) == 0
15973           && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
15974           && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
15975         pthread_attr_destroy (&attr);
15976         /* Replace the exception port info for these exceptions with our own.
15977            Note that we replace the exception port for the entire task, not only
15978            for a particular thread.  This has the effect that when our exception
15979            port gets the message, the thread specific exception port has already
15980            been asked, and we don't need to bother about it.
15981            See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
15982         task_set_exception_ports (self, mask, our_exception_port,
15983                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
15984       }
15985     }
15986   }
15987 }
15988 #else
15989 /* Avoid a crash on POSIX systems.  */
15990 #include <signal.h>
15991 /* A POSIX signal handler.  */
15992 static void
15993 exception_handler (int sig)
15994 {
15995   exit (1);
15996 }
15997 static void
15998 nocrash_init (void)
15999 {
16000 #ifdef SIGSEGV
16001   signal (SIGSEGV, exception_handler);
16002 #endif
16003 #ifdef SIGBUS
16004   signal (SIGBUS, exception_handler);
16005 #endif
16006 }
16007 #endif
16008
16009 #include <stdio.h>
16010 #include <sys/types.h>
16011 #include <sys/time.h>
16012 #include <sys/resource.h>
16013 #include <errno.h>
16014 int main()
16015 {
16016   struct rlimit limit;
16017   int ret;
16018   nocrash_init ();
16019   /* Some printf implementations allocate temporary space with malloc.  */
16020   /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
16021 #ifdef RLIMIT_DATA
16022   if (getrlimit (RLIMIT_DATA, &limit) < 0)
16023     return 77;
16024   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
16025     limit.rlim_max = 5000000;
16026   limit.rlim_cur = limit.rlim_max;
16027   if (setrlimit (RLIMIT_DATA, &limit) < 0)
16028     return 77;
16029 #endif
16030   /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
16031 #ifdef RLIMIT_AS
16032   if (getrlimit (RLIMIT_AS, &limit) < 0)
16033     return 77;
16034   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
16035     limit.rlim_max = 5000000;
16036   limit.rlim_cur = limit.rlim_max;
16037   if (setrlimit (RLIMIT_AS, &limit) < 0)
16038     return 77;
16039 #endif
16040   /* Some printf implementations allocate temporary space on the stack.  */
16041 #ifdef RLIMIT_STACK
16042   if (getrlimit (RLIMIT_STACK, &limit) < 0)
16043     return 77;
16044   if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
16045     limit.rlim_max = 5000000;
16046   limit.rlim_cur = limit.rlim_max;
16047   if (setrlimit (RLIMIT_STACK, &limit) < 0)
16048     return 77;
16049 #endif
16050   ret = printf ("%.5000000f", 1.0);
16051   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
16052 }
16053
16054 _ACEOF
16055           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16056   (eval $ac_link) 2>&5
16057   ac_status=$?
16058   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16059   test $ac_status = 0; } && test -s conftest$ac_exeext; then
16060             (./conftest
16061              result=$?
16062              if test $result != 0 && test $result != 77; then result=1; fi
16063              exit $result
16064             ) >/dev/null 2>/dev/null
16065             case $? in
16066               0) gl_cv_func_printf_enomem="yes" ;;
16067               77) gl_cv_func_printf_enomem="guessing no" ;;
16068               *) gl_cv_func_printf_enomem="no" ;;
16069             esac
16070           else
16071             gl_cv_func_printf_enomem="guessing no"
16072           fi
16073           rm -fr conftest*
16074         else
16075                                         gl_cv_func_printf_enomem="guessing no"
16076         fi
16077       fi
16078       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
16079         case "$host_os" in
16080                     # Guess yes on glibc systems.
16081           *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
16082                     # Guess yes on Solaris.
16083           solaris*) gl_cv_func_printf_enomem="guessing yes";;
16084                     # Guess yes on AIX.
16085           aix*)     gl_cv_func_printf_enomem="guessing yes";;
16086                     # Guess yes on HP-UX/hppa.
16087           hpux*)    case "$host_cpu" in
16088                       hppa*) gl_cv_func_printf_enomem="guessing yes";;
16089                       *)     gl_cv_func_printf_enomem="guessing no";;
16090                     esac
16091                     ;;
16092                     # Guess yes on IRIX.
16093           irix*)    gl_cv_func_printf_enomem="guessing yes";;
16094                     # Guess yes on OSF/1.
16095           osf*)     gl_cv_func_printf_enomem="guessing yes";;
16096                     # Guess yes on BeOS.
16097           beos*)    gl_cv_func_printf_enomem="guessing yes";;
16098                     # Guess yes on Haiku.
16099           haiku*)   gl_cv_func_printf_enomem="guessing yes";;
16100                     # If we don't know, assume the worst.
16101           *)        gl_cv_func_printf_enomem="guessing no";;
16102         esac
16103       fi
16104
16105 fi
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
16107 $as_echo "$gl_cv_func_printf_enomem" >&6; }
16108
16109
16110
16111   case "$gl_cv_func_printf_long_double" in
16112     *yes)
16113       ;;
16114     *)
16115
16116 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
16117
16118       ;;
16119   esac
16120
16121
16122
16123
16124   GNULIB_ISWBLANK=0;
16125   GNULIB_WCTYPE=0;
16126   GNULIB_ISWCTYPE=0;
16127   GNULIB_WCTRANS=0;
16128   GNULIB_TOWCTRANS=0;
16129     HAVE_ISWBLANK=1;
16130   HAVE_WCTYPE_T=1;
16131   HAVE_WCTRANS_T=1;
16132   REPLACE_ISWBLANK=0;
16133
16134
16135
16136
16137
16138
16139   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
16140 $as_echo_n "checking whether to use C++... " >&6; }
16141     # Check whether --enable-c++ was given.
16142 if test "${enable_c__+set}" = set; then :
16143   enableval=$enable_c__; CXX_CHOICE="$enableval"
16144 else
16145   CXX_CHOICE=no
16146 fi
16147
16148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
16149 $as_echo "$CXX_CHOICE" >&6; }
16150
16151
16152
16153
16154
16155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
16156 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
16157 if test "${gl_cv_func_ungetc_works+set}" = set; then :
16158   $as_echo_n "(cached) " >&6
16159 else
16160   if test "$cross_compiling" = yes; then :
16161   gl_cv_func_ungetc_works='guessing no'
16162 else
16163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16164 /* end confdefs.h.  */
16165
16166 #include <stdio.h>
16167
16168 int
16169 main ()
16170 {
16171 FILE *f;
16172            if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
16173            if (fputs ("abc", f) < 0) return 2;
16174            rewind (f);
16175            if (fgetc (f) != 'a') return 3;
16176            if (fgetc (f) != 'b') return 4;
16177            if (ungetc ('d', f) != 'd') return 5;
16178            if (ftell (f) != 1) return 6;
16179            if (fgetc (f) != 'd') return 7;
16180            if (ftell (f) != 2) return 8;
16181            if (fseek (f, 0, SEEK_CUR) != 0) return 9;
16182            if (ftell (f) != 2) return 10;
16183            if (fgetc (f) != 'c') return 11;
16184            fclose (f); remove ("conftest.tmp");
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 if ac_fn_c_try_run "$LINENO"; then :
16190   gl_cv_func_ungetc_works=yes
16191 else
16192   gl_cv_func_ungetc_works=no
16193 fi
16194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16195   conftest.$ac_objext conftest.beam conftest.$ac_ext
16196 fi
16197
16198
16199 fi
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
16201 $as_echo "$gl_cv_func_ungetc_works" >&6; }
16202   if test "$gl_cv_func_ungetc_works" != yes; then
16203
16204 $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
16205
16206   fi
16207
16208
16209
16210
16211   GNULIB_SETLOCALE=0;
16212   GNULIB_DUPLOCALE=0;
16213     HAVE_DUPLOCALE=1;
16214   REPLACE_SETLOCALE=0;
16215   REPLACE_DUPLOCALE=0;
16216
16217
16218
16219
16220
16221
16222   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
16223 $as_echo_n "checking for LC_MESSAGES... " >&6; }
16224 if test "${gt_cv_val_LC_MESSAGES+set}" = set; then :
16225   $as_echo_n "(cached) " >&6
16226 else
16227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228 /* end confdefs.h.  */
16229 #include <locale.h>
16230 int
16231 main ()
16232 {
16233 return LC_MESSAGES
16234   ;
16235   return 0;
16236 }
16237 _ACEOF
16238 if ac_fn_c_try_link "$LINENO"; then :
16239   gt_cv_val_LC_MESSAGES=yes
16240 else
16241   gt_cv_val_LC_MESSAGES=no
16242 fi
16243 rm -f core conftest.err conftest.$ac_objext \
16244     conftest$ac_exeext conftest.$ac_ext
16245 fi
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
16247 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
16248   if test $gt_cv_val_LC_MESSAGES = yes; then
16249
16250 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
16251
16252   fi
16253
16254
16255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
16256 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
16257 if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
16258   $as_echo_n "(cached) " >&6
16259 else
16260   gt_save_LIBS="$LIBS"
16261      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
16262      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16263 /* end confdefs.h.  */
16264 #include <CoreFoundation/CFPreferences.h>
16265 int
16266 main ()
16267 {
16268 CFPreferencesCopyAppValue(NULL, NULL)
16269   ;
16270   return 0;
16271 }
16272 _ACEOF
16273 if ac_fn_c_try_link "$LINENO"; then :
16274   gt_cv_func_CFPreferencesCopyAppValue=yes
16275 else
16276   gt_cv_func_CFPreferencesCopyAppValue=no
16277 fi
16278 rm -f core conftest.err conftest.$ac_objext \
16279     conftest$ac_exeext conftest.$ac_ext
16280      LIBS="$gt_save_LIBS"
16281 fi
16282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
16283 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
16284   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
16285
16286 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
16287
16288   fi
16289     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
16290 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
16291 if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
16292   $as_echo_n "(cached) " >&6
16293 else
16294   gt_save_LIBS="$LIBS"
16295      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
16296      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16297 /* end confdefs.h.  */
16298 #include <CoreFoundation/CFLocale.h>
16299 int
16300 main ()
16301 {
16302 CFLocaleCopyCurrent();
16303   ;
16304   return 0;
16305 }
16306 _ACEOF
16307 if ac_fn_c_try_link "$LINENO"; then :
16308   gt_cv_func_CFLocaleCopyCurrent=yes
16309 else
16310   gt_cv_func_CFLocaleCopyCurrent=no
16311 fi
16312 rm -f core conftest.err conftest.$ac_objext \
16313     conftest$ac_exeext conftest.$ac_ext
16314      LIBS="$gt_save_LIBS"
16315 fi
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
16317 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
16318   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
16319
16320 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
16321
16322   fi
16323   INTL_MACOSX_LIBS=
16324   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
16325     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
16326   fi
16327
16328
16329 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16330 if test "x$ac_cv_have_decl_setenv" = x""yes; then :
16331   ac_have_decl=1
16332 else
16333   ac_have_decl=0
16334 fi
16335
16336 cat >>confdefs.h <<_ACEOF
16337 #define HAVE_DECL_SETENV $ac_have_decl
16338 _ACEOF
16339
16340
16341
16342
16343
16344
16345   if test $ac_cv_have_decl_setenv = no; then
16346     HAVE_DECL_SETENV=0
16347   fi
16348
16349   if test $ac_cv_func_setenv = no; then
16350     HAVE_SETENV=0
16351   else
16352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
16353 $as_echo_n "checking whether setenv validates arguments... " >&6; }
16354 if test "${gl_cv_func_setenv_works+set}" = set; then :
16355   $as_echo_n "(cached) " >&6
16356 else
16357   if test "$cross_compiling" = yes; then :
16358   gl_cv_func_setenv_works="guessing no"
16359 else
16360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361 /* end confdefs.h.  */
16362
16363        #include <stdlib.h>
16364        #include <errno.h>
16365        #include <string.h>
16366
16367 int
16368 main ()
16369 {
16370
16371        int result = 0;
16372        {
16373          if (setenv ("", "", 0) != -1)
16374            result |= 1;
16375          else if (errno != EINVAL)
16376            result |= 2;
16377        }
16378        {
16379          if (setenv ("a", "=", 1) != 0)
16380            result |= 4;
16381          else if (strcmp (getenv ("a"), "=") != 0)
16382            result |= 8;
16383        }
16384        return result;
16385
16386   ;
16387   return 0;
16388 }
16389 _ACEOF
16390 if ac_fn_c_try_run "$LINENO"; then :
16391   gl_cv_func_setenv_works=yes
16392 else
16393   gl_cv_func_setenv_works=no
16394 fi
16395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16396   conftest.$ac_objext conftest.beam conftest.$ac_ext
16397 fi
16398
16399 fi
16400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
16401 $as_echo "$gl_cv_func_setenv_works" >&6; }
16402     if test "$gl_cv_func_setenv_works" != yes; then
16403       REPLACE_SETENV=1
16404
16405
16406
16407
16408
16409
16410
16411
16412   M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
16413
16414     fi
16415   fi
16416
16417
16418
16419
16420   for ac_header in search.h
16421 do :
16422   ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16423 if test "x$ac_cv_header_search_h" = x""yes; then :
16424   cat >>confdefs.h <<_ACEOF
16425 #define HAVE_SEARCH_H 1
16426 _ACEOF
16427
16428 fi
16429
16430 done
16431
16432   for ac_func in tsearch
16433 do :
16434   ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16435 if test "x$ac_cv_func_tsearch" = x""yes; then :
16436   cat >>confdefs.h <<_ACEOF
16437 #define HAVE_TSEARCH 1
16438 _ACEOF
16439
16440 fi
16441 done
16442
16443
16444
16445
16446
16447 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16448 if test "x$ac_cv_have_decl_strdup" = x""yes; then :
16449   ac_have_decl=1
16450 else
16451   ac_have_decl=0
16452 fi
16453
16454 cat >>confdefs.h <<_ACEOF
16455 #define HAVE_DECL_STRDUP $ac_have_decl
16456 _ACEOF
16457
16458 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
16459 if test "x$ac_cv_have_decl_alarm" = x""yes; then :
16460   ac_have_decl=1
16461 else
16462   ac_have_decl=0
16463 fi
16464
16465 cat >>confdefs.h <<_ACEOF
16466 #define HAVE_DECL_ALARM $ac_have_decl
16467 _ACEOF
16468
16469
16470
16471 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
16472 if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
16473   ac_have_decl=1
16474 else
16475   ac_have_decl=0
16476 fi
16477
16478 cat >>confdefs.h <<_ACEOF
16479 #define HAVE_DECL_UNSETENV $ac_have_decl
16480 _ACEOF
16481
16482
16483
16484
16485    if false; then
16486   GL_COND_LIBTOOL_TRUE=
16487   GL_COND_LIBTOOL_FALSE='#'
16488 else
16489   GL_COND_LIBTOOL_TRUE='#'
16490   GL_COND_LIBTOOL_FALSE=
16491 fi
16492
16493   gl_cond_libtool=false
16494   gl_libdeps=
16495   gl_ltlibdeps=
16496   gl_m4_base='m4'
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506   gl_source_base='lib'
16507   # Code from module alloca-opt:
16508
16509
16510   if test $ac_cv_func_alloca_works = no; then
16511     :
16512   fi
16513
16514   # Define an additional variable used in the Makefile substitution.
16515   if test $ac_cv_working_alloca_h = yes; then
16516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16517 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16518 if test "${gl_cv_rpl_alloca+set}" = set; then :
16519   $as_echo_n "(cached) " >&6
16520 else
16521
16522       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16523 /* end confdefs.h.  */
16524
16525 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16526         Need own alloca
16527 #endif
16528
16529 _ACEOF
16530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16531   $EGREP "Need own alloca" >/dev/null 2>&1; then :
16532   gl_cv_rpl_alloca=yes
16533 else
16534   gl_cv_rpl_alloca=no
16535 fi
16536 rm -f conftest*
16537
16538
16539 fi
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16541 $as_echo "$gl_cv_rpl_alloca" >&6; }
16542     if test $gl_cv_rpl_alloca = yes; then
16543
16544 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16545
16546       ALLOCA_H=alloca.h
16547     else
16548                   ALLOCA_H=
16549     fi
16550   else
16551     ALLOCA_H=alloca.h
16552   fi
16553
16554
16555   # Code from module announce-gen:
16556   # Code from module arg-nonnull:
16557   # Code from module assert:
16558
16559   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
16560 $as_echo_n "checking whether to enable assertions... " >&6; }
16561   # Check whether --enable-assert was given.
16562 if test "${enable_assert+set}" = set; then :
16563   enableval=$enable_assert; if test "x$enableval" = xno; then :
16564
16565 $as_echo "#define NDEBUG 1" >>confdefs.h
16566
16567 elif test "x$enableval" != xyes; then :
16568   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
16569 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
16570       enable_assert=yes
16571 fi
16572 else
16573   enable_assert=yes
16574 fi
16575
16576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
16577 $as_echo "$enable_assert" >&6; }
16578
16579   # Code from module autobuild:
16580   # Code from module avltree-oset:
16581   # Code from module binary-io:
16582   # Code from module btowc:
16583
16584
16585
16586
16587
16588
16589   if test $ac_cv_func_btowc = no; then
16590     HAVE_BTOWC=0
16591   else
16592
16593
16594
16595
16596         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16597 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16598 if test "${gl_cv_func_btowc_nul+set}" = set; then :
16599   $as_echo_n "(cached) " >&6
16600 else
16601
16602         if test "$cross_compiling" = yes; then :
16603
16604            case "$host_os" in
16605                       # Guess no on Cygwin.
16606              cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16607                       # Guess yes otherwise.
16608              *)       gl_cv_func_btowc_nul="guessing yes" ;;
16609            esac
16610
16611 else
16612   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16613 /* end confdefs.h.  */
16614
16615 #include <string.h>
16616 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16617    <wchar.h>.
16618    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16619    included before <wchar.h>.  */
16620 #include <stddef.h>
16621 #include <stdio.h>
16622 #include <time.h>
16623 #include <wchar.h>
16624 int main ()
16625 {
16626   if (btowc ('\0') != 0)
16627     return 1;
16628   return 0;
16629 }
16630 _ACEOF
16631 if ac_fn_c_try_run "$LINENO"; then :
16632   gl_cv_func_btowc_nul=yes
16633 else
16634   gl_cv_func_btowc_nul=no
16635 fi
16636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16637   conftest.$ac_objext conftest.beam conftest.$ac_ext
16638 fi
16639
16640
16641 fi
16642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16643 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16644
16645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16646 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16647 if test "${gl_cv_func_btowc_eof+set}" = set; then :
16648   $as_echo_n "(cached) " >&6
16649 else
16650
16651                         case "$host_os" in
16652                  # Guess no on IRIX.
16653           irix*) gl_cv_func_btowc_eof="guessing no" ;;
16654                  # Guess yes otherwise.
16655           *)     gl_cv_func_btowc_eof="guessing yes" ;;
16656         esac
16657         if test $LOCALE_FR != none; then
16658           if test "$cross_compiling" = yes; then :
16659   :
16660 else
16661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16662 /* end confdefs.h.  */
16663
16664 #include <locale.h>
16665 #include <string.h>
16666 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16667    <wchar.h>.
16668    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16669    included before <wchar.h>.  */
16670 #include <stddef.h>
16671 #include <stdio.h>
16672 #include <time.h>
16673 #include <wchar.h>
16674 int main ()
16675 {
16676   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16677     {
16678       if (btowc (EOF) != WEOF)
16679         return 1;
16680     }
16681   return 0;
16682 }
16683 _ACEOF
16684 if ac_fn_c_try_run "$LINENO"; then :
16685   gl_cv_func_btowc_eof=yes
16686 else
16687   gl_cv_func_btowc_eof=no
16688 fi
16689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16690   conftest.$ac_objext conftest.beam conftest.$ac_ext
16691 fi
16692
16693         fi
16694
16695 fi
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16697 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16698
16699     case "$gl_cv_func_btowc_nul" in
16700       *yes) ;;
16701       *) REPLACE_BTOWC=1 ;;
16702     esac
16703     case "$gl_cv_func_btowc_eof" in
16704       *yes) ;;
16705       *) REPLACE_BTOWC=1 ;;
16706     esac
16707   fi
16708   if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16709
16710     :
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720   M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
16721
16722
16723   :
16724
16725   fi
16726
16727
16728
16729
16730   GNULIB_BTOWC=1
16731
16732
16733
16734 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
16735
16736
16737
16738   # Code from module c++defs:
16739   # Code from module c-ctype:
16740   # Code from module c-stack:
16741
16742
16743
16744
16745    # for STACK_DIRECTION
16746
16747
16748
16749    ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
16750 "
16751 if test "x$ac_cv_have_decl_sigaltstack" = x""yes; then :
16752   ac_have_decl=1
16753 else
16754   ac_have_decl=0
16755 fi
16756
16757 cat >>confdefs.h <<_ACEOF
16758 #define HAVE_DECL_SIGALTSTACK $ac_have_decl
16759 _ACEOF
16760
16761
16762
16763
16764    ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
16765 "
16766 if test "x$ac_cv_type_stack_t" = x""yes; then :
16767
16768 cat >>confdefs.h <<_ACEOF
16769 #define HAVE_STACK_T 1
16770 _ACEOF
16771
16772
16773 fi
16774
16775
16776       if test "$gl_cv_lib_sigsegv" = yes \
16777        && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
16778      LIBCSTACK=$LIBSIGSEGV
16779
16780      LTLIBCSTACK=$LTLIBSIGSEGV
16781
16782    fi
16783
16784
16785   # Code from module canonicalize-lgpl:
16786
16787
16788   if test $ac_cv_func_canonicalize_file_name = no; then
16789     HAVE_CANONICALIZE_FILE_NAME=0
16790
16791
16792
16793
16794
16795
16796
16797
16798   M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
16799
16800     if test $ac_cv_func_realpath = no; then
16801       HAVE_REALPATH=0
16802     elif test "$gl_cv_func_realpath_works" != yes; then
16803       REPLACE_REALPATH=1
16804     fi
16805   elif test "$gl_cv_func_realpath_works" != yes; then
16806
16807
16808
16809
16810
16811
16812
16813
16814   M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
16815
16816     REPLACE_REALPATH=1
16817     REPLACE_CANONICALIZE_FILE_NAME=1
16818   fi
16819
16820
16821
16822 cat >>confdefs.h <<_ACEOF
16823 #define GNULIB_CANONICALIZE_LGPL 1
16824 _ACEOF
16825
16826
16827
16828
16829
16830   GNULIB_CANONICALIZE_FILE_NAME=1
16831
16832
16833
16834 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16835
16836
16837
16838
16839
16840
16841   GNULIB_REALPATH=1
16842
16843
16844
16845 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16846
16847
16848
16849   # Code from module clean-temp:
16850
16851 $as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
16852
16853   # Code from module cloexec:
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863   M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext"
16864
16865
16866
16867
16868 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16869
16870
16871   # Code from module close:
16872
16873
16874
16875
16876
16877
16878   GNULIB_CLOSE=1
16879
16880
16881
16882 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16883
16884
16885
16886   # Code from module close-hook:
16887   # Code from module close-stream:
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897   M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext"
16898
16899
16900     :
16901
16902
16903
16904 cat >>confdefs.h <<_ACEOF
16905 #define GNULIB_CLOSE_STREAM 1
16906 _ACEOF
16907
16908
16909   # Code from module closein:
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919   M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext"
16920
16921
16922     :
16923
16924   # Code from module closeout:
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934   M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext"
16935
16936
16937     :
16938
16939   # Code from module config-h:
16940
16941   # Code from module configmake:
16942
16943           if test "x$datarootdir" = x; then
16944     datarootdir='${datadir}'
16945
16946   fi
16947     if test "x$docdir" = x; then
16948     docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16949
16950   fi
16951     if test "x$htmldir" = x; then
16952     htmldir='${docdir}'
16953
16954   fi
16955   if test "x$dvidir" = x; then
16956     dvidir='${docdir}'
16957
16958   fi
16959   if test "x$pdfdir" = x; then
16960     pdfdir='${docdir}'
16961
16962   fi
16963   if test "x$psdir" = x; then
16964     psdir='${docdir}'
16965
16966   fi
16967   if test "x$lispdir" = x; then
16968     lispdir='${datarootdir}/emacs/site-lisp'
16969
16970   fi
16971   if test "x$localedir" = x; then
16972     localedir='${datarootdir}/locale'
16973
16974   fi
16975
16976       pkglibexecdir='${libexecdir}/${PACKAGE}'
16977
16978
16979   # Code from module dirname:
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990   M4_LIBOBJS="$M4_LIBOBJS basename.$ac_objext"
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000   M4_LIBOBJS="$M4_LIBOBJS dirname.$ac_objext"
17001
17002
17003
17004
17005 cat >>confdefs.h <<_ACEOF
17006 #define GNULIB_DIRNAME 1
17007 _ACEOF
17008
17009
17010   # Code from module dirname-lgpl:
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020   M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030   M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040   M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
17041
17042
17043
17044
17045
17046   # Code from module dosname:
17047   # Code from module double-slash-root:
17048
17049
17050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17051 $as_echo_n "checking whether // is distinct from /... " >&6; }
17052 if test "${gl_cv_double_slash_root+set}" = set; then :
17053   $as_echo_n "(cached) " >&6
17054 else
17055    if test x"$cross_compiling" = xyes ; then
17056         # When cross-compiling, there is no way to tell whether // is special
17057         # short of a list of hosts.  However, the only known hosts to date
17058         # that have a distinct // are Apollo DomainOS (too old to port to),
17059         # Cygwin, and z/OS.  If anyone knows of another system for which // has
17060         # special semantics and is distinct from /, please report it to
17061         # <bug-gnulib@gnu.org>.
17062         case $host in
17063           *-cygwin | i370-ibm-openedition)
17064             gl_cv_double_slash_root=yes ;;
17065           *)
17066             # Be optimistic and assume that / and // are the same when we
17067             # don't know.
17068             gl_cv_double_slash_root='unknown, assuming no' ;;
17069         esac
17070       else
17071         set x `ls -di / // 2>/dev/null`
17072         if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17073           gl_cv_double_slash_root=no
17074         else
17075           gl_cv_double_slash_root=yes
17076         fi
17077       fi
17078 fi
17079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17080 $as_echo "$gl_cv_double_slash_root" >&6; }
17081   if test "$gl_cv_double_slash_root" = yes; then
17082
17083 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17084
17085   fi
17086
17087   # Code from module dup2:
17088
17089
17090
17091
17092   if test $ac_cv_func_dup2 = no; then
17093     HAVE_DUP2=0
17094
17095
17096
17097
17098
17099
17100
17101
17102   M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
17103
17104   else
17105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17106 $as_echo_n "checking whether dup2 works... " >&6; }
17107 if test "${gl_cv_func_dup2_works+set}" = set; then :
17108   $as_echo_n "(cached) " >&6
17109 else
17110   if test "$cross_compiling" = yes; then :
17111   case "$host_os" in
17112            mingw*) # on this platform, dup2 always returns 0 for success
17113              gl_cv_func_dup2_works=no;;
17114            cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17115              gl_cv_func_dup2_works=no;;
17116            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17117                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17118              gl_cv_func_dup2_works=no;;
17119            freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17120              gl_cv_func_dup2_works=no;;
17121            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17122              gl_cv_func_dup2_works=no;;
17123            *) gl_cv_func_dup2_works=yes;;
17124          esac
17125 else
17126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17127 /* end confdefs.h.  */
17128
17129          #include <unistd.h>
17130 #include <fcntl.h>
17131 #include <errno.h>
17132 int
17133 main ()
17134 {
17135 int result = 0;
17136 #if HAVE_FCNTL
17137             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17138               result |= 1;
17139 #endif HAVE_FCNTL
17140             if (dup2 (1, 1) == 0)
17141               result |= 2;
17142 #if HAVE_FCNTL
17143             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17144               result |= 4;
17145 #endif
17146             close (0);
17147             if (dup2 (0, 0) != -1)
17148               result |= 8;
17149             /* Many gnulib modules require POSIX conformance of EBADF.  */
17150             if (dup2 (2, 1000000) == -1 && errno != EBADF)
17151               result |= 16;
17152             return result;
17153
17154   ;
17155   return 0;
17156 }
17157
17158 _ACEOF
17159 if ac_fn_c_try_run "$LINENO"; then :
17160   gl_cv_func_dup2_works=yes
17161 else
17162   gl_cv_func_dup2_works=no
17163 fi
17164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17165   conftest.$ac_objext conftest.beam conftest.$ac_ext
17166 fi
17167
17168
17169 fi
17170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17171 $as_echo "$gl_cv_func_dup2_works" >&6; }
17172     if test "$gl_cv_func_dup2_works" = no; then
17173
17174
17175   if test $ac_cv_func_dup2 = yes; then
17176     REPLACE_DUP2=1
17177   fi
17178
17179
17180
17181
17182
17183
17184
17185
17186   M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
17187
17188
17189     fi
17190   fi
17191
17192
17193
17194
17195   GNULIB_DUP2=1
17196
17197
17198
17199 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17200
17201
17202
17203   # Code from module environ:
17204
17205
17206
17207
17208   GNULIB_ENVIRON=1
17209
17210
17211
17212 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17213
17214
17215
17216   # Code from module errno:
17217
17218   # Code from module error:
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17234 $as_echo_n "checking for error_at_line... " >&6; }
17235 if test "${ac_cv_lib_error_at_line+set}" = set; then :
17236   $as_echo_n "(cached) " >&6
17237 else
17238   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17239 /* end confdefs.h.  */
17240 #include <error.h>
17241 int
17242 main ()
17243 {
17244 error_at_line (0, 0, "", 0, "an error occurred");
17245   ;
17246   return 0;
17247 }
17248 _ACEOF
17249 if ac_fn_c_try_link "$LINENO"; then :
17250   ac_cv_lib_error_at_line=yes
17251 else
17252   ac_cv_lib_error_at_line=no
17253 fi
17254 rm -f core conftest.err conftest.$ac_objext \
17255     conftest$ac_exeext conftest.$ac_ext
17256 fi
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17258 $as_echo "$ac_cv_lib_error_at_line" >&6; }
17259   if test $ac_cv_lib_error_at_line = no; then
17260
17261
17262
17263
17264
17265
17266
17267
17268   M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
17269
17270   fi
17271
17272
17273
17274
17275   :
17276
17277
17278
17279
17280   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17281
17282
17283
17284   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17285
17286   # Code from module execute:
17287
17288
17289
17290
17291   # Code from module exitfail:
17292   # Code from module extensions:
17293   # Code from module fatal-signal:
17294
17295
17296
17297
17298
17299
17300
17301
17302   # Code from module fclose:
17303
17304
17305
17306
17307
17308   GNULIB_FCLOSE=1
17309
17310
17311
17312 $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
17313
17314
17315
17316   # Code from module fcntl:
17317
17318
17319
17320
17321
17322   if test $ac_cv_func_fcntl = no; then
17323
17324
17325
17326   if test $ac_cv_func_fcntl = no; then
17327     HAVE_FCNTL=0
17328   else
17329     REPLACE_FCNTL=1
17330   fi
17331
17332
17333
17334
17335
17336
17337
17338
17339   M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
17340
17341
17342   else
17343             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17344 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17345 if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
17346   $as_echo_n "(cached) " >&6
17347 else
17348   if test "$cross_compiling" = yes; then :
17349   # Guess that it works on glibc systems
17350           case $host_os in #((
17351             *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
17352             *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
17353           esac
17354 else
17355   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17356 /* end confdefs.h.  */
17357
17358 #include <fcntl.h>
17359 #include <errno.h>
17360
17361 int
17362 main ()
17363 {
17364 int result = 0;
17365       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17366       if (errno != EINVAL) result |= 2;
17367       return result;
17368
17369   ;
17370   return 0;
17371 }
17372 _ACEOF
17373 if ac_fn_c_try_run "$LINENO"; then :
17374   gl_cv_func_fcntl_f_dupfd_works=yes
17375 else
17376   gl_cv_func_fcntl_f_dupfd_works=no
17377 fi
17378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17379   conftest.$ac_objext conftest.beam conftest.$ac_ext
17380 fi
17381
17382 fi
17383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17384 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17385     case $gl_cv_func_fcntl_f_dupfd_works in
17386       *yes) ;;
17387       *)
17388
17389
17390   if test $ac_cv_func_fcntl = no; then
17391     HAVE_FCNTL=0
17392   else
17393     REPLACE_FCNTL=1
17394   fi
17395
17396
17397
17398
17399
17400
17401
17402
17403   M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
17404
17405
17406
17407 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17408  ;;
17409     esac
17410
17411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17412 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17413 if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
17414   $as_echo_n "(cached) " >&6
17415 else
17416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17417 /* end confdefs.h.  */
17418
17419 #include <fcntl.h>
17420 #ifndef F_DUPFD_CLOEXEC
17421 choke me
17422 #endif
17423
17424 int
17425 main ()
17426 {
17427
17428   ;
17429   return 0;
17430 }
17431 _ACEOF
17432 if ac_fn_c_try_compile "$LINENO"; then :
17433   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17434 /* end confdefs.h.  */
17435
17436 #ifdef __linux__
17437 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17438    it to support the semantics on older kernels that failed with EINVAL.  */
17439 choke me
17440 #endif
17441
17442 int
17443 main ()
17444 {
17445
17446   ;
17447   return 0;
17448 }
17449 _ACEOF
17450 if ac_fn_c_try_compile "$LINENO"; then :
17451   gl_cv_func_fcntl_f_dupfd_cloexec=yes
17452 else
17453   gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17454 fi
17455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17456 else
17457   gl_cv_func_fcntl_f_dupfd_cloexec=no
17458 fi
17459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17460 fi
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17462 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17463     if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17464
17465
17466
17467   if test $ac_cv_func_fcntl = no; then
17468     HAVE_FCNTL=0
17469   else
17470     REPLACE_FCNTL=1
17471   fi
17472
17473
17474
17475
17476
17477
17478
17479
17480   M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
17481
17482
17483           fi
17484   fi
17485
17486
17487
17488
17489   GNULIB_FCNTL=1
17490
17491
17492
17493 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17494
17495
17496
17497   # Code from module fcntl-h:
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509      if test $gl_cv_have_include_next = yes; then
17510        gl_cv_next_fcntl_h='<'fcntl.h'>'
17511      else
17512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17513 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
17514 if test "${gl_cv_next_fcntl_h+set}" = set; then :
17515   $as_echo_n "(cached) " >&6
17516 else
17517
17518                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17519 /* end confdefs.h.  */
17520 #include <fcntl.h>
17521
17522 _ACEOF
17523                                                                                                                         case "$host_os" in
17524                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17525                  *)    gl_absname_cpp="$ac_cpp" ;;
17526                esac
17527                                                             gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17528                   sed -n '\#/fcntl.h#{
17529                     s#.*"\(.*/fcntl.h\)".*#\1#
17530                     s#^/[^/]#//&#
17531                     p
17532                     q
17533                   }'`'"'
17534
17535
17536 fi
17537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17538 $as_echo "$gl_cv_next_fcntl_h" >&6; }
17539      fi
17540      NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17541
17542      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17543        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17544        gl_next_as_first_directive='<'fcntl.h'>'
17545      else
17546        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17547        gl_next_as_first_directive=$gl_cv_next_fcntl_h
17548      fi
17549      NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
17550
17551
17552
17553
17554
17555
17556
17557   # Code from module fd-safer-flag:
17558
17559
17560 cat >>confdefs.h <<_ACEOF
17561 #define GNULIB_FD_SAFER_FLAG 1
17562 _ACEOF
17563
17564
17565   # Code from module fdl-1.3:
17566   # Code from module fflush:
17567
17568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
17569 $as_echo_n "checking whether fflush works on input streams... " >&6; }
17570 if test "${gl_cv_func_fflush_stdin+set}" = set; then :
17571   $as_echo_n "(cached) " >&6
17572 else
17573   echo hello world > conftest.txt
17574      if test "$cross_compiling" = yes; then :
17575         gl_cv_func_fflush_stdin=no
17576 else
17577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17578 /* end confdefs.h.  */
17579
17580 #include <stdio.h>
17581 #include <unistd.h>
17582
17583 int
17584 main ()
17585 {
17586 FILE *f = fopen ("conftest.txt", "r");
17587          char buffer[10];
17588          int fd;
17589          int c;
17590          if (f == NULL)
17591            return 1;
17592          fd = fileno (f);
17593          if (fd < 0 || fread (buffer, 1, 5, f) != 5)
17594            return 2;
17595          /* For deterministic results, ensure f read a bigger buffer.  */
17596          if (lseek (fd, 0, SEEK_CUR) == 5)
17597            return 3;
17598          /* POSIX requires fflush-fseek to set file offset of fd.  This fails
17599             on BSD systems and on mingw.  */
17600          if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
17601            return 4;
17602          if (lseek (fd, 0, SEEK_CUR) != 5)
17603            return 5;
17604          /* Verify behaviour of fflush after ungetc. See
17605             <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
17606          /* Verify behaviour of fflush after a backup ungetc.  This fails on
17607             mingw.  */
17608          c = fgetc (f);
17609          ungetc (c, f);
17610          fflush (f);
17611          if (fgetc (f) != c)
17612            return 6;
17613          /* Verify behaviour of fflush after a non-backup ungetc.  This fails
17614             on glibc 2.8 and on BSD systems.  */
17615          c = fgetc (f);
17616          ungetc ('@', f);
17617          fflush (f);
17618          if (fgetc (f) != c)
17619            return 7;
17620          return 0;
17621
17622   ;
17623   return 0;
17624 }
17625 _ACEOF
17626 if ac_fn_c_try_run "$LINENO"; then :
17627   gl_cv_func_fflush_stdin=yes
17628 else
17629   gl_cv_func_fflush_stdin=no
17630 fi
17631 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17632   conftest.$ac_objext conftest.beam conftest.$ac_ext
17633 fi
17634
17635      rm conftest.txt
17636
17637 fi
17638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
17639 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
17640   if test $gl_cv_func_fflush_stdin = no; then
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650   M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
17651
17652
17653   REPLACE_FFLUSH=1
17654
17655
17656   :
17657
17658
17659
17660
17661   if test $gl_cv_func_fseeko = yes; then
17662     REPLACE_FSEEKO=1
17663   fi
17664
17665
17666
17667
17668
17669
17670
17671
17672   M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
17673
17674
17675
17676
17677   fi
17678
17679
17680
17681
17682   GNULIB_FFLUSH=1
17683
17684
17685
17686 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
17687
17688
17689
17690   # Code from module filenamecat:
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701   M4_LIBOBJS="$M4_LIBOBJS filenamecat.$ac_objext"
17702
17703
17704
17705
17706 cat >>confdefs.h <<_ACEOF
17707 #define GNULIB_FILENAMECAT 1
17708 _ACEOF
17709
17710
17711   # Code from module filenamecat-lgpl:
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721   M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
17722
17723
17724
17725
17726   # Code from module float:
17727
17728
17729
17730   FLOAT_H=
17731   case "$host_os" in
17732     beos* | openbsd* | mirbsd*)
17733       FLOAT_H=float.h
17734
17735
17736
17737
17738
17739
17740
17741
17742      if test $gl_cv_have_include_next = yes; then
17743        gl_cv_next_float_h='<'float.h'>'
17744      else
17745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
17746 $as_echo_n "checking absolute name of <float.h>... " >&6; }
17747 if test "${gl_cv_next_float_h+set}" = set; then :
17748   $as_echo_n "(cached) " >&6
17749 else
17750
17751                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17752 /* end confdefs.h.  */
17753 #include <float.h>
17754
17755 _ACEOF
17756                                                                                                                         case "$host_os" in
17757                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
17758                  *)    gl_absname_cpp="$ac_cpp" ;;
17759                esac
17760                                                             gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17761                   sed -n '\#/float.h#{
17762                     s#.*"\(.*/float.h\)".*#\1#
17763                     s#^/[^/]#//&#
17764                     p
17765                     q
17766                   }'`'"'
17767
17768
17769 fi
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
17771 $as_echo "$gl_cv_next_float_h" >&6; }
17772      fi
17773      NEXT_FLOAT_H=$gl_cv_next_float_h
17774
17775      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17776        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17777        gl_next_as_first_directive='<'float.h'>'
17778      else
17779        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17780        gl_next_as_first_directive=$gl_cv_next_float_h
17781      fi
17782      NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
17783
17784
17785
17786
17787       ;;
17788   esac
17789
17790
17791   # Code from module fopen:
17792
17793
17794
17795   case "$host_os" in
17796     mingw* | pw*)
17797             REPLACE_FOPEN=1
17798             gl_cv_func_fopen_slash="guessing no"
17799       ;;
17800     *)
17801                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
17802 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
17803 if test "${gl_cv_func_fopen_slash+set}" = set; then :
17804   $as_echo_n "(cached) " >&6
17805 else
17806
17807           if test "$cross_compiling" = yes; then :
17808
17809              case "$host_os" in
17810                aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
17811                  gl_cv_func_fopen_slash="guessing no" ;;
17812                *)
17813                  gl_cv_func_fopen_slash="guessing yes" ;;
17814              esac
17815
17816 else
17817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17818 /* end confdefs.h.  */
17819
17820 #include <stddef.h>
17821 #include <stdio.h>
17822 int main ()
17823 {
17824   return fopen ("conftest.sl/", "w") != NULL;
17825 }
17826 _ACEOF
17827 if ac_fn_c_try_run "$LINENO"; then :
17828   gl_cv_func_fopen_slash=yes
17829 else
17830   gl_cv_func_fopen_slash=no
17831 fi
17832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17833   conftest.$ac_objext conftest.beam conftest.$ac_ext
17834 fi
17835
17836           rm -f conftest.sl
17837
17838 fi
17839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
17840 $as_echo "$gl_cv_func_fopen_slash" >&6; }
17841       ;;
17842   esac
17843   case "$gl_cv_func_fopen_slash" in
17844     *no)
17845
17846 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
17847
17848       REPLACE_FOPEN=1
17849       ;;
17850   esac
17851   if test $REPLACE_FOPEN = 1; then
17852
17853
17854
17855
17856
17857
17858
17859
17860   M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
17861
17862
17863
17864
17865   fi
17866
17867
17868
17869
17870   GNULIB_FOPEN=1
17871
17872
17873
17874 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
17875
17876
17877
17878   # Code from module fopen-safer:
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888   M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext"
17889
17890
17891
17892
17893 cat >>confdefs.h <<_ACEOF
17894 #define GNULIB_FOPEN_SAFER 1
17895 _ACEOF
17896
17897
17898   # Code from module fpending:
17899
17900
17901
17902   fp_headers='
17903 #     include <stdio.h>
17904 #     if HAVE_STDIO_EXT_H
17905 #      include <stdio_ext.h>
17906 #     endif
17907 '
17908   ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
17909 "
17910 if test "x$ac_cv_have_decl___fpending" = x""yes; then :
17911   ac_have_decl=1
17912 else
17913   ac_have_decl=0
17914 fi
17915
17916 cat >>confdefs.h <<_ACEOF
17917 #define HAVE_DECL___FPENDING $ac_have_decl
17918 _ACEOF
17919
17920   if test $ac_cv_func___fpending = no; then
17921     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
17922 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
17923 if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
17924   $as_echo_n "(cached) " >&6
17925 else
17926
17927         for ac_expr in                                                    \
17928                                                                           \
17929             '# glibc2'                                                    \
17930             'fp->_IO_write_ptr - fp->_IO_write_base'                      \
17931                                                                           \
17932             '# traditional Unix'                                          \
17933             'fp->_ptr - fp->_base'                                        \
17934                                                                           \
17935             '# BSD'                                                       \
17936             'fp->_p - fp->_bf._base'                                      \
17937                                                                           \
17938             '# SCO, Unixware'                                             \
17939             '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
17940                                                                           \
17941             '# QNX'                                                       \
17942             '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
17943                                                                           \
17944             '# old glibc?'                                                \
17945             'fp->__bufp - fp->__buffer'                                   \
17946                                                                           \
17947             '# old glibc iostream?'                                       \
17948             'fp->_pptr - fp->_pbase'                                      \
17949                                                                           \
17950             '# emx+gcc'                                                   \
17951             'fp->_ptr - fp->_buffer'                                      \
17952                                                                           \
17953             '# VMS'                                                       \
17954             '(*fp)->_ptr - (*fp)->_base'                                  \
17955                                                                           \
17956             '# e.g., DGUX R4.11; the info is not available'               \
17957             1                                                             \
17958             ; do
17959
17960           # Skip each embedded comment.
17961           case "$ac_expr" in '#'*) continue;; esac
17962
17963           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17964 /* end confdefs.h.  */
17965 #include <stdio.h>
17966 int
17967 main ()
17968 {
17969 FILE *fp = stdin; (void) ($ac_expr);
17970   ;
17971   return 0;
17972 }
17973 _ACEOF
17974 if ac_fn_c_try_compile "$LINENO"; then :
17975   fp_done=yes
17976
17977 fi
17978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17979           test "$fp_done" = yes && break
17980         done
17981
17982         ac_cv_sys_pending_output_n_bytes=$ac_expr
17983
17984
17985 fi
17986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
17987 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
17988
17989 cat >>confdefs.h <<_ACEOF
17990 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
17991 _ACEOF
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001   M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
18002
18003   fi
18004
18005   # Code from module fpieee:
18006   # Code from module fpucw:
18007   # Code from module fpurge:
18008
18009
18010
18011
18012   ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
18013 "
18014 if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
18015   ac_have_decl=1
18016 else
18017   ac_have_decl=0
18018 fi
18019
18020 cat >>confdefs.h <<_ACEOF
18021 #define HAVE_DECL_FPURGE $ac_have_decl
18022 _ACEOF
18023
18024   if test "x$ac_cv_func_fpurge" = xyes; then
18025     # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
18026     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
18027 $as_echo_n "checking whether fpurge works... " >&6; }
18028 if test "${gl_cv_func_fpurge_works+set}" = set; then :
18029   $as_echo_n "(cached) " >&6
18030 else
18031   if test "$cross_compiling" = yes; then :
18032   gl_cv_func_fpurge_works='guessing no'
18033 else
18034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18035 /* end confdefs.h.  */
18036 #include <stdio.h>
18037
18038 int
18039 main ()
18040 {
18041 FILE *f = fopen ("conftest.txt", "w+");
18042         if (!f) return 1;
18043         if (fputc ('a', f) != 'a') return 2;
18044         rewind (f);
18045         if (fgetc (f) != 'a') return 3;
18046         if (fgetc (f) != EOF) return 4;
18047         if (fpurge (f) != 0) return 5;
18048         if (putc ('b', f) != 'b') return 6;
18049         if (fclose (f) != 0) return 7;
18050         if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
18051         if (fgetc (f) != 'a') return 9;
18052         if (fgetc (f) != 'b') return 10;
18053         if (fgetc (f) != EOF) return 11;
18054         if (fclose (f) != 0) return 12;
18055         if (remove ("conftest.txt") != 0) return 13;
18056         return 0;
18057   ;
18058   return 0;
18059 }
18060 _ACEOF
18061 if ac_fn_c_try_run "$LINENO"; then :
18062   gl_cv_func_fpurge_works=yes
18063 else
18064   gl_cv_func_fpurge_works=no
18065 fi
18066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18067   conftest.$ac_objext conftest.beam conftest.$ac_ext
18068 fi
18069
18070 fi
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
18072 $as_echo "$gl_cv_func_fpurge_works" >&6; }
18073     if test "x$gl_cv_func_fpurge_works" != xyes; then
18074       REPLACE_FPURGE=1
18075
18076
18077
18078
18079
18080
18081
18082
18083   M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
18084
18085     fi
18086   else
18087
18088
18089
18090
18091
18092
18093
18094
18095   M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
18096
18097   fi
18098   if test "x$ac_cv_have_decl_fpurge" = xno; then
18099     HAVE_DECL_FPURGE=0
18100   fi
18101
18102
18103
18104
18105   GNULIB_FPURGE=1
18106
18107
18108
18109 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
18110
18111
18112
18113   # Code from module freadahead:
18114   # Code from module freading:
18115
18116
18117
18118   # Code from module frexp-nolibm:
18119
18120
18121
18122   if test $gl_cv_func_frexp_no_libm = yes; then
18123
18124
18125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18126 $as_echo_n "checking whether frexp works... " >&6; }
18127 if test "${gl_cv_func_frexp_works+set}" = set; then :
18128   $as_echo_n "(cached) " >&6
18129 else
18130
18131       if test "$cross_compiling" = yes; then :
18132   case "$host_os" in
18133            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18134            *)                        gl_cv_func_frexp_works="guessing yes";;
18135          esac
18136
18137 else
18138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139 /* end confdefs.h.  */
18140
18141 #include <float.h>
18142 #include <math.h>
18143 #include <string.h>
18144 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18145    ICC 10.0 has a bug when optimizing the expression -zero.
18146    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18147    to PowerPC on MacOS X 10.5.  */
18148 #if defined __hpux || defined __sgi || defined __ICC
18149 static double
18150 compute_minus_zero (void)
18151 {
18152   return -DBL_MIN * DBL_MIN;
18153 }
18154 # define minus_zero compute_minus_zero ()
18155 #else
18156 double minus_zero = -0.0;
18157 #endif
18158 int main()
18159 {
18160   int result = 0;
18161   int i;
18162   volatile double x;
18163   double zero = 0.0;
18164   /* Test on denormalized numbers.  */
18165   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18166     ;
18167   if (x > 0.0)
18168     {
18169       int exp;
18170       double y = frexp (x, &exp);
18171       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18172          On NetBSD: y = 0.75. Correct: y = 0.5.  */
18173       if (y != 0.5)
18174         result |= 1;
18175     }
18176   /* Test on infinite numbers.  */
18177   x = 1.0 / 0.0;
18178   {
18179     int exp;
18180     double y = frexp (x, &exp);
18181     if (y != x)
18182       result |= 2;
18183   }
18184   /* Test on negative zero.  */
18185   x = minus_zero;
18186   {
18187     int exp;
18188     double y = frexp (x, &exp);
18189     if (memcmp (&y, &x, sizeof x))
18190       result |= 4;
18191   }
18192   return result;
18193 }
18194 _ACEOF
18195 if ac_fn_c_try_run "$LINENO"; then :
18196   gl_cv_func_frexp_works=yes
18197 else
18198   gl_cv_func_frexp_works=no
18199 fi
18200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18201   conftest.$ac_objext conftest.beam conftest.$ac_ext
18202 fi
18203
18204
18205 fi
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18207 $as_echo "$gl_cv_func_frexp_works" >&6; }
18208
18209     case "$gl_cv_func_frexp_works" in
18210       *yes) gl_func_frexp_no_libm=yes ;;
18211       *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
18212     esac
18213   else
18214     gl_func_frexp_no_libm=no
18215         REPLACE_FREXP=1
18216   fi
18217   if test $gl_func_frexp_no_libm = yes; then
18218
18219 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
18220
18221   else
18222
18223
18224
18225
18226
18227
18228
18229
18230   M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
18231
18232   fi
18233
18234
18235
18236
18237   GNULIB_FREXP=1
18238
18239
18240
18241 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
18242
18243
18244
18245   # Code from module frexpl-nolibm:
18246
18247
18248       ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18249 "
18250 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
18251
18252 else
18253   HAVE_DECL_FREXPL=0
18254 fi
18255
18256   if test $HAVE_DECL_FREXPL = 1; then
18257
18258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18259 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18260 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
18261   $as_echo_n "(cached) " >&6
18262 else
18263
18264       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18265 /* end confdefs.h.  */
18266 #include <math.h>
18267              long double x;
18268 int
18269 main ()
18270 {
18271 int e; return frexpl (x, &e) > 0;
18272   ;
18273   return 0;
18274 }
18275 _ACEOF
18276 if ac_fn_c_try_link "$LINENO"; then :
18277   gl_cv_func_frexpl_no_libm=yes
18278 else
18279   gl_cv_func_frexpl_no_libm=no
18280 fi
18281 rm -f core conftest.err conftest.$ac_objext \
18282     conftest$ac_exeext conftest.$ac_ext
18283
18284 fi
18285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18286 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
18287
18288     if test $gl_cv_func_frexpl_no_libm = yes; then
18289
18290
18291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
18292 $as_echo_n "checking whether frexpl works... " >&6; }
18293 if test "${gl_cv_func_frexpl_works+set}" = set; then :
18294   $as_echo_n "(cached) " >&6
18295 else
18296
18297       if test "$cross_compiling" = yes; then :
18298
18299          case "$host_os" in
18300            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
18301               gl_cv_func_frexpl_works="guessing no";;
18302            *) gl_cv_func_frexpl_works="guessing yes";;
18303          esac
18304
18305 else
18306   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18307 /* end confdefs.h.  */
18308
18309 #include <float.h>
18310 #include <math.h>
18311 /* Override the values of <float.h>, like done in float.in.h.  */
18312 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
18313 # undef LDBL_MIN_EXP
18314 # define LDBL_MIN_EXP    (-16381)
18315 #endif
18316 extern long double frexpl (long double, int *);
18317 int main()
18318 {
18319   int result = 0;
18320   volatile long double x;
18321   /* Test on finite numbers that fails on AIX 5.1.  */
18322   x = 16.0L;
18323   {
18324     int exp = -9999;
18325     frexpl (x, &exp);
18326     if (exp != 5)
18327       result |= 1;
18328   }
18329   /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
18330      function returns an invalid (incorrectly normalized) value: it returns
18331                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
18332      but the correct result is
18333           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
18334   x = 1.01L;
18335   {
18336     int exp = -9999;
18337     long double y = frexpl (x, &exp);
18338     if (!(exp == 1 && y == 0.505L))
18339       result |= 2;
18340   }
18341   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
18342      LDBL_MAX_EXP = 16384.
18343      In the loop end test, we test x against Infinity, rather than comparing
18344      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
18345   {
18346     int i;
18347     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
18348       {
18349         int exp = -9999;
18350         frexpl (x, &exp);
18351         if (exp != i)
18352           {
18353             result |= 4;
18354             break;
18355           }
18356       }
18357   }
18358   /* Test on denormalized numbers.  */
18359   {
18360     int i;
18361     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
18362       ;
18363     if (x > 0.0L)
18364       {
18365         int exp;
18366         long double y = frexpl (x, &exp);
18367         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
18368            exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
18369         if (exp != LDBL_MIN_EXP - 1)
18370           result |= 8;
18371       }
18372   }
18373   /* Test on infinite numbers.  */
18374   x = 1.0L / 0.0L;
18375   {
18376     int exp;
18377     long double y = frexpl (x, &exp);
18378     if (y != x)
18379       result |= 16;
18380   }
18381   return result;
18382 }
18383 _ACEOF
18384 if ac_fn_c_try_run "$LINENO"; then :
18385   gl_cv_func_frexpl_works=yes
18386 else
18387   gl_cv_func_frexpl_works=no
18388 fi
18389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18390   conftest.$ac_objext conftest.beam conftest.$ac_ext
18391 fi
18392
18393
18394 fi
18395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
18396 $as_echo "$gl_cv_func_frexpl_works" >&6; }
18397
18398       case "$gl_cv_func_frexpl_works" in
18399         *yes) gl_func_frexpl_no_libm=yes ;;
18400         *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
18401       esac
18402     else
18403       gl_func_frexpl_no_libm=no
18404             REPLACE_FREXPL=1
18405     fi
18406     if test $gl_func_frexpl_no_libm = yes; then
18407
18408 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
18409
18410     fi
18411   fi
18412   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
18413
18414
18415
18416
18417
18418
18419
18420
18421   M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
18422
18423   fi
18424
18425
18426
18427
18428   GNULIB_FREXPL=1
18429
18430
18431
18432 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18433
18434
18435
18436   # Code from module fseeko:
18437
18438
18439
18440
18441
18442
18443   if test $ac_cv_have_decl_fseeko = no; then
18444     HAVE_DECL_FSEEKO=0
18445   fi
18446
18447   if test $gl_cv_func_fseeko = no; then
18448     HAVE_FSEEKO=0
18449
18450
18451
18452   if test $gl_cv_func_fseeko = yes; then
18453     REPLACE_FSEEKO=1
18454   fi
18455
18456
18457
18458
18459
18460
18461
18462
18463   M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
18464
18465
18466
18467   else
18468     if test $gl_cv_var_stdin_large_offset = no; then
18469
18470
18471
18472   if test $gl_cv_func_fseeko = yes; then
18473     REPLACE_FSEEKO=1
18474   fi
18475
18476
18477
18478
18479
18480
18481
18482
18483   M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
18484
18485
18486
18487     fi
18488   fi
18489
18490
18491
18492
18493   GNULIB_FSEEKO=1
18494
18495
18496
18497 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
18498
18499
18500
18501   # Code from module ftello:
18502
18503
18504
18505
18506
18507
18508
18509
18510   if test $ac_cv_have_decl_ftello = no; then
18511     HAVE_DECL_FTELLO=0
18512   fi
18513
18514   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
18515 $as_echo_n "checking for ftello... " >&6; }
18516 if test "${gl_cv_func_ftello+set}" = set; then :
18517   $as_echo_n "(cached) " >&6
18518 else
18519
18520       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18521 /* end confdefs.h.  */
18522 #include <stdio.h>
18523 int
18524 main ()
18525 {
18526 ftello (stdin);
18527   ;
18528   return 0;
18529 }
18530 _ACEOF
18531 if ac_fn_c_try_link "$LINENO"; then :
18532   gl_cv_func_ftello=yes
18533 else
18534   gl_cv_func_ftello=no
18535 fi
18536 rm -f core conftest.err conftest.$ac_objext \
18537     conftest$ac_exeext conftest.$ac_ext
18538
18539 fi
18540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
18541 $as_echo "$gl_cv_func_ftello" >&6; }
18542   if test $gl_cv_func_ftello = no; then
18543     HAVE_FTELLO=0
18544   else
18545     if test $gl_cv_var_stdin_large_offset = no; then
18546       REPLACE_FTELLO=1
18547     else
18548
18549       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
18550 $as_echo_n "checking whether ftello works... " >&6; }
18551 if test "${gl_cv_func_ftello_works+set}" = set; then :
18552   $as_echo_n "(cached) " >&6
18553 else
18554
18555                               case "$host_os" in
18556                       # Guess no on Solaris.
18557             solaris*) gl_cv_func_ftello_works="guessing no" ;;
18558                       # Guess yes otherwise.
18559             *)        gl_cv_func_ftello_works="guessing yes" ;;
18560           esac
18561           if test "$cross_compiling" = yes; then :
18562   :
18563 else
18564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18565 /* end confdefs.h.  */
18566
18567 #include <stdio.h>
18568 #include <stdlib.h>
18569 #include <string.h>
18570 #define TESTFILE "conftest.tmp"
18571 int
18572 main (void)
18573 {
18574   FILE *fp;
18575
18576   /* Create a file with some contents.  */
18577   fp = fopen (TESTFILE, "w");
18578   if (fp == NULL)
18579     return 70;
18580   if (fwrite ("foogarsh", 1, 8, fp) < 8)
18581     return 71;
18582   if (fclose (fp))
18583     return 72;
18584
18585   /* The file's contents is now "foogarsh".  */
18586
18587   /* Try writing after reading to EOF.  */
18588   fp = fopen (TESTFILE, "r+");
18589   if (fp == NULL)
18590     return 73;
18591   if (fseek (fp, -1, SEEK_END))
18592     return 74;
18593   if (!(getc (fp) == 'h'))
18594     return 1;
18595   if (!(getc (fp) == EOF))
18596     return 2;
18597   if (!(ftell (fp) == 8))
18598     return 3;
18599   if (!(ftell (fp) == 8))
18600     return 4;
18601   if (!(putc ('!', fp) == '!'))
18602     return 5;
18603   if (!(ftell (fp) == 9))
18604     return 6;
18605   if (!(fclose (fp) == 0))
18606     return 7;
18607   fp = fopen (TESTFILE, "r");
18608   if (fp == NULL)
18609     return 75;
18610   {
18611     char buf[10];
18612     if (!(fread (buf, 1, 10, fp) == 9))
18613       return 10;
18614     if (!(memcmp (buf, "foogarsh!", 9) == 0))
18615       return 11;
18616   }
18617   if (!(fclose (fp) == 0))
18618     return 12;
18619
18620   /* The file's contents is now "foogarsh!".  */
18621
18622   return 0;
18623 }
18624 _ACEOF
18625 if ac_fn_c_try_run "$LINENO"; then :
18626   gl_cv_func_ftello_works=yes
18627 else
18628   gl_cv_func_ftello_works=no
18629 fi
18630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18631   conftest.$ac_objext conftest.beam conftest.$ac_ext
18632 fi
18633
18634
18635 fi
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
18637 $as_echo "$gl_cv_func_ftello_works" >&6; }
18638       case "$gl_cv_func_ftello_works" in
18639         *yes) ;;
18640         *)
18641           REPLACE_FTELLO=1
18642
18643 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
18644
18645           ;;
18646       esac
18647     fi
18648   fi
18649   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659   M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
18660
18661
18662   fi
18663
18664
18665
18666
18667   GNULIB_FTELLO=1
18668
18669
18670
18671 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
18672
18673
18674
18675   # Code from module gendocs:
18676   # Code from module getdtablesize:
18677
18678
18679
18680   if test $ac_cv_func_getdtablesize != yes; then
18681     HAVE_GETDTABLESIZE=0
18682
18683
18684
18685
18686
18687
18688
18689
18690   M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
18691
18692   fi
18693
18694
18695
18696
18697   GNULIB_GETDTABLESIZE=1
18698
18699
18700
18701 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
18702
18703
18704
18705   # Code from module getopt-gnu:
18706
18707
18708
18709
18710
18711
18712
18713 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
18714
18715
18716   # Code from module getopt-posix:
18717
18718
18719
18720
18721
18722   if test -n "$gl_replace_getopt"; then :
18723
18724
18725
18726   GETOPT_H=getopt.h
18727
18728 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
18729
18730
18731
18732     GNULIB_UNISTD_H_GETOPT=1
18733
18734
18735
18736
18737
18738
18739
18740
18741   M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751   M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
18752
18753
18754
18755
18756
18757
18758 fi
18759
18760
18761   # Code from module gettext-h:
18762
18763
18764   # Code from module gettimeofday:
18765
18766
18767
18768
18769
18770
18771   gl_gettimeofday_timezone=void
18772   if test $ac_cv_func_gettimeofday != yes; then
18773     HAVE_GETTIMEOFDAY=0
18774
18775
18776
18777
18778
18779
18780
18781
18782   M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
18783
18784
18785   for ac_header in sys/timeb.h
18786 do :
18787   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18788 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
18789   cat >>confdefs.h <<_ACEOF
18790 #define HAVE_SYS_TIMEB_H 1
18791 _ACEOF
18792
18793 fi
18794
18795 done
18796
18797   for ac_func in _ftime
18798 do :
18799   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18800 if test "x$ac_cv_func__ftime" = x""yes; then :
18801   cat >>confdefs.h <<_ACEOF
18802 #define HAVE__FTIME 1
18803 _ACEOF
18804
18805 fi
18806 done
18807
18808
18809   else
18810
18811
18812
18813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18814 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
18815 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
18816   $as_echo_n "(cached) " >&6
18817 else
18818   if test "$cross_compiling" = yes; then :
18819        gl_cv_func_gettimeofday_clobber=yes
18820 else
18821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18822 /* end confdefs.h.  */
18823 #include <string.h>
18824           #include <sys/time.h>
18825           #include <time.h>
18826           #include <stdlib.h>
18827
18828 int
18829 main ()
18830 {
18831
18832           time_t t = 0;
18833           struct tm *lt;
18834           struct tm saved_lt;
18835           struct timeval tv;
18836           lt = localtime (&t);
18837           saved_lt = *lt;
18838           gettimeofday (&tv, NULL);
18839           return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18840
18841   ;
18842   return 0;
18843 }
18844 _ACEOF
18845 if ac_fn_c_try_run "$LINENO"; then :
18846   gl_cv_func_gettimeofday_clobber=no
18847 else
18848   gl_cv_func_gettimeofday_clobber=yes
18849 fi
18850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18851   conftest.$ac_objext conftest.beam conftest.$ac_ext
18852 fi
18853
18854 fi
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18856 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
18857
18858  if test $gl_cv_func_gettimeofday_clobber = yes; then
18859    REPLACE_GETTIMEOFDAY=1
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869   M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
18870
18871
18872   for ac_header in sys/timeb.h
18873 do :
18874   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18875 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
18876   cat >>confdefs.h <<_ACEOF
18877 #define HAVE_SYS_TIMEB_H 1
18878 _ACEOF
18879
18880 fi
18881
18882 done
18883
18884   for ac_func in _ftime
18885 do :
18886   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18887 if test "x$ac_cv_func__ftime" = x""yes; then :
18888   cat >>confdefs.h <<_ACEOF
18889 #define HAVE__FTIME 1
18890 _ACEOF
18891
18892 fi
18893 done
18894
18895
18896
18897 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
18898
18899
18900 $as_echo "#define localtime rpl_localtime" >>confdefs.h
18901
18902
18903
18904 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
18905
18906  fi
18907
18908     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18909 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
18910 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
18911   $as_echo_n "(cached) " >&6
18912 else
18913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18914 /* end confdefs.h.  */
18915 #include <sys/time.h>
18916               struct timeval c;
18917               int gettimeofday (struct timeval *restrict, void *restrict);
18918
18919 int
18920 main ()
18921 {
18922 /* glibc uses struct timezone * rather than the POSIX void *
18923                  if _GNU_SOURCE is defined.  However, since the only portable
18924                  use of gettimeofday uses NULL as the second parameter, and
18925                  since the glibc definition is actually more typesafe, it is
18926                  not worth wrapping this to get a compliant signature.  */
18927               int (*f) (struct timeval *restrict, void *restrict)
18928                 = gettimeofday;
18929               int x = f (&c, 0);
18930               return !(x | c.tv_sec | c.tv_usec);
18931
18932   ;
18933   return 0;
18934 }
18935 _ACEOF
18936 if ac_fn_c_try_compile "$LINENO"; then :
18937   gl_cv_func_gettimeofday_posix_signature=yes
18938 else
18939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18940 /* end confdefs.h.  */
18941 #include <sys/time.h>
18942 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
18943
18944 int
18945 main ()
18946 {
18947
18948   ;
18949   return 0;
18950 }
18951 _ACEOF
18952 if ac_fn_c_try_compile "$LINENO"; then :
18953   gl_cv_func_gettimeofday_posix_signature=almost
18954 else
18955   gl_cv_func_gettimeofday_posix_signature=no
18956 fi
18957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18958 fi
18959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18960 fi
18961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
18962 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
18963     if test $gl_cv_func_gettimeofday_posix_signature = almost; then
18964       gl_gettimeofday_timezone='struct timezone'
18965     elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
18966       REPLACE_GETTIMEOFDAY=1
18967
18968
18969
18970
18971
18972
18973
18974
18975   M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
18976
18977
18978   for ac_header in sys/timeb.h
18979 do :
18980   ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
18981 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
18982   cat >>confdefs.h <<_ACEOF
18983 #define HAVE_SYS_TIMEB_H 1
18984 _ACEOF
18985
18986 fi
18987
18988 done
18989
18990   for ac_func in _ftime
18991 do :
18992   ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
18993 if test "x$ac_cv_func__ftime" = x""yes; then :
18994   cat >>confdefs.h <<_ACEOF
18995 #define HAVE__FTIME 1
18996 _ACEOF
18997
18998 fi
18999 done
19000
19001
19002     fi
19003   fi
19004
19005 cat >>confdefs.h <<_ACEOF
19006 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
19007 _ACEOF
19008
19009
19010
19011
19012
19013   GNULIB_GETTIMEOFDAY=1
19014
19015
19016
19017 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
19018
19019
19020
19021   # Code from module git-version-gen:
19022   # Code from module gnu-web-doc-update:
19023   # Code from module gnumakefile:
19024   # Autoconf 2.61a.99 and earlier don't support linking a file only
19025   # in VPATH builds.  But since GNUmakefile is for maintainer use
19026   # only, it does not matter if we skip the link with older autoconf.
19027   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
19028   # builds, so use a shell variable to bypass this.
19029   GNUmakefile=GNUmakefile
19030   ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
19031
19032   # Code from module gnupload:
19033   # Code from module gpl-3.0:
19034   # Code from module havelib:
19035   # Code from module ignore-value:
19036
19037   # Code from module include_next:
19038   # Code from module inline:
19039
19040
19041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
19042 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
19043 if test "${gl_cv_c_inline_effective+set}" = set; then :
19044   $as_echo_n "(cached) " >&6
19045 else
19046   if test $ac_cv_c_inline = no; then
19047        gl_cv_c_inline_effective=no
19048      else
19049                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19050 /* end confdefs.h.  */
19051
19052 int
19053 main ()
19054 {
19055 #ifdef __NO_INLINE__
19056                #error "inline is not effective"
19057              #endif
19058   ;
19059   return 0;
19060 }
19061 _ACEOF
19062 if ac_fn_c_try_compile "$LINENO"; then :
19063   gl_cv_c_inline_effective=yes
19064 else
19065   gl_cv_c_inline_effective=no
19066 fi
19067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19068      fi
19069
19070 fi
19071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
19072 $as_echo "$gl_cv_c_inline_effective" >&6; }
19073   if test $gl_cv_c_inline_effective = yes; then
19074
19075 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
19076
19077   fi
19078
19079   # Code from module intprops:
19080   # Code from module isnand-nolibm:
19081
19082
19083   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
19084 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
19085 if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
19086   $as_echo_n "(cached) " >&6
19087 else
19088
19089       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19090 /* end confdefs.h.  */
19091 #include <math.h>
19092              #if __GNUC__ >= 4
19093              # undef isnand
19094              # define isnand(x) __builtin_isnan ((double)(x))
19095              #else
19096              # undef isnand
19097              # define isnand(x) isnan ((double)(x))
19098              #endif
19099              double x;
19100 int
19101 main ()
19102 {
19103 return isnand (x);
19104   ;
19105   return 0;
19106 }
19107 _ACEOF
19108 if ac_fn_c_try_link "$LINENO"; then :
19109   gl_cv_func_isnand_no_libm=yes
19110 else
19111   gl_cv_func_isnand_no_libm=no
19112 fi
19113 rm -f core conftest.err conftest.$ac_objext \
19114     conftest$ac_exeext conftest.$ac_ext
19115
19116 fi
19117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
19118 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
19119
19120   if test $gl_cv_func_isnand_no_libm = yes; then
19121
19122 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
19123
19124   else
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134   M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
19135
19136
19137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
19138 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
19139 if test "${gl_cv_cc_double_expbit0+set}" = set; then :
19140   $as_echo_n "(cached) " >&6
19141 else
19142
19143       if test "$cross_compiling" = yes; then :
19144
19145                                                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19146 /* end confdefs.h.  */
19147
19148 #if defined arm || defined __arm || defined __arm__
19149   mixed_endianness
19150 #endif
19151
19152 _ACEOF
19153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19154   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
19155   gl_cv_cc_double_expbit0="unknown"
19156 else
19157
19158                                                          :
19159 if test "${ac_cv_c_bigendian+set}" = set; then :
19160   $as_echo_n "(cached) " >&6
19161 else
19162   ac_cv_c_bigendian=unknown
19163     # See if we're dealing with a universal compiler.
19164     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165 /* end confdefs.h.  */
19166 #ifndef __APPLE_CC__
19167                not a universal capable compiler
19168              #endif
19169              typedef int dummy;
19170
19171 _ACEOF
19172 if ac_fn_c_try_compile "$LINENO"; then :
19173
19174         # Check for potential -arch flags.  It is not universal unless
19175         # there are at least two -arch flags with different values.
19176         ac_arch=
19177         ac_prev=
19178         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19179          if test -n "$ac_prev"; then
19180            case $ac_word in
19181              i?86 | x86_64 | ppc | ppc64)
19182                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19183                  ac_arch=$ac_word
19184                else
19185                  ac_cv_c_bigendian=universal
19186                  break
19187                fi
19188                ;;
19189            esac
19190            ac_prev=
19191          elif test "x$ac_word" = "x-arch"; then
19192            ac_prev=arch
19193          fi
19194        done
19195 fi
19196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19197     if test $ac_cv_c_bigendian = unknown; then
19198       # See if sys/param.h defines the BYTE_ORDER macro.
19199       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19200 /* end confdefs.h.  */
19201 #include <sys/types.h>
19202              #include <sys/param.h>
19203
19204 int
19205 main ()
19206 {
19207 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
19208                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
19209                      && LITTLE_ENDIAN)
19210               bogus endian macros
19211              #endif
19212
19213   ;
19214   return 0;
19215 }
19216 _ACEOF
19217 if ac_fn_c_try_compile "$LINENO"; then :
19218   # It does; now see whether it defined to BIG_ENDIAN or not.
19219          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19220 /* end confdefs.h.  */
19221 #include <sys/types.h>
19222                 #include <sys/param.h>
19223
19224 int
19225 main ()
19226 {
19227 #if BYTE_ORDER != BIG_ENDIAN
19228                  not big endian
19229                 #endif
19230
19231   ;
19232   return 0;
19233 }
19234 _ACEOF
19235 if ac_fn_c_try_compile "$LINENO"; then :
19236   ac_cv_c_bigendian=yes
19237 else
19238   ac_cv_c_bigendian=no
19239 fi
19240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19241 fi
19242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19243     fi
19244     if test $ac_cv_c_bigendian = unknown; then
19245       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
19246       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19247 /* end confdefs.h.  */
19248 #include <limits.h>
19249
19250 int
19251 main ()
19252 {
19253 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
19254               bogus endian macros
19255              #endif
19256
19257   ;
19258   return 0;
19259 }
19260 _ACEOF
19261 if ac_fn_c_try_compile "$LINENO"; then :
19262   # It does; now see whether it defined to _BIG_ENDIAN or not.
19263          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19264 /* end confdefs.h.  */
19265 #include <limits.h>
19266
19267 int
19268 main ()
19269 {
19270 #ifndef _BIG_ENDIAN
19271                  not big endian
19272                 #endif
19273
19274   ;
19275   return 0;
19276 }
19277 _ACEOF
19278 if ac_fn_c_try_compile "$LINENO"; then :
19279   ac_cv_c_bigendian=yes
19280 else
19281   ac_cv_c_bigendian=no
19282 fi
19283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19284 fi
19285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19286     fi
19287     if test $ac_cv_c_bigendian = unknown; then
19288       # Compile a test program.
19289       if test "$cross_compiling" = yes; then :
19290   # Try to guess by grepping values from an object file.
19291          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19292 /* end confdefs.h.  */
19293 short int ascii_mm[] =
19294                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19295                 short int ascii_ii[] =
19296                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19297                 int use_ascii (int i) {
19298                   return ascii_mm[i] + ascii_ii[i];
19299                 }
19300                 short int ebcdic_ii[] =
19301                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19302                 short int ebcdic_mm[] =
19303                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19304                 int use_ebcdic (int i) {
19305                   return ebcdic_mm[i] + ebcdic_ii[i];
19306                 }
19307                 extern int foo;
19308
19309 int
19310 main ()
19311 {
19312 return use_ascii (foo) == use_ebcdic (foo);
19313   ;
19314   return 0;
19315 }
19316 _ACEOF
19317 if ac_fn_c_try_compile "$LINENO"; then :
19318   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
19319               ac_cv_c_bigendian=yes
19320             fi
19321             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
19322               if test "$ac_cv_c_bigendian" = unknown; then
19323                 ac_cv_c_bigendian=no
19324               else
19325                 # finding both strings is unlikely to happen, but who knows?
19326                 ac_cv_c_bigendian=unknown
19327               fi
19328             fi
19329 fi
19330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19331 else
19332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19333 /* end confdefs.h.  */
19334 $ac_includes_default
19335 int
19336 main ()
19337 {
19338
19339              /* Are we little or big endian?  From Harbison&Steele.  */
19340              union
19341              {
19342                long int l;
19343                char c[sizeof (long int)];
19344              } u;
19345              u.l = 1;
19346              return u.c[sizeof (long int) - 1] == 1;
19347
19348   ;
19349   return 0;
19350 }
19351 _ACEOF
19352 if ac_fn_c_try_run "$LINENO"; then :
19353   ac_cv_c_bigendian=no
19354 else
19355   ac_cv_c_bigendian=yes
19356 fi
19357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19358   conftest.$ac_objext conftest.beam conftest.$ac_ext
19359 fi
19360
19361     fi
19362 fi
19363 :
19364  case $ac_cv_c_bigendian in #(
19365    yes)
19366      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
19367    no)
19368      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
19369    universal)
19370
19371 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
19372
19373      ;; #(
19374    *)
19375      gl_cv_cc_double_expbit0="unknown" ;;
19376  esac
19377
19378
19379 fi
19380 rm -f conftest*
19381
19382
19383 else
19384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19385 /* end confdefs.h.  */
19386
19387 #include <float.h>
19388 #include <stddef.h>
19389 #include <stdio.h>
19390 #include <string.h>
19391 #define NWORDS \
19392   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19393 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
19394 static unsigned int ored_words[NWORDS];
19395 static unsigned int anded_words[NWORDS];
19396 static void add_to_ored_words (double x)
19397 {
19398   memory_double m;
19399   size_t i;
19400   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
19401   memset (&m, 0, sizeof (memory_double));
19402   m.value = x;
19403   for (i = 0; i < NWORDS; i++)
19404     {
19405       ored_words[i] |= m.word[i];
19406       anded_words[i] &= m.word[i];
19407     }
19408 }
19409 int main ()
19410 {
19411   size_t j;
19412   FILE *fp = fopen ("conftest.out", "w");
19413   if (fp == NULL)
19414     return 1;
19415   for (j = 0; j < NWORDS; j++)
19416     anded_words[j] = ~ (unsigned int) 0;
19417   add_to_ored_words (0.25);
19418   add_to_ored_words (0.5);
19419   add_to_ored_words (1.0);
19420   add_to_ored_words (2.0);
19421   add_to_ored_words (4.0);
19422   /* Remove bits that are common (e.g. if representation of the first mantissa
19423      bit is explicit).  */
19424   for (j = 0; j < NWORDS; j++)
19425     ored_words[j] &= ~anded_words[j];
19426   /* Now find the nonzero word.  */
19427   for (j = 0; j < NWORDS; j++)
19428     if (ored_words[j] != 0)
19429       break;
19430   if (j < NWORDS)
19431     {
19432       size_t i;
19433       for (i = j + 1; i < NWORDS; i++)
19434         if (ored_words[i] != 0)
19435           {
19436             fprintf (fp, "unknown");
19437             return (fclose (fp) != 0);
19438           }
19439       for (i = 0; ; i++)
19440         if ((ored_words[j] >> i) & 1)
19441           {
19442             fprintf (fp, "word %d bit %d", (int) j, (int) i);
19443             return (fclose (fp) != 0);
19444           }
19445     }
19446   fprintf (fp, "unknown");
19447   return (fclose (fp) != 0);
19448 }
19449
19450 _ACEOF
19451 if ac_fn_c_try_run "$LINENO"; then :
19452   gl_cv_cc_double_expbit0=`cat conftest.out`
19453 else
19454   gl_cv_cc_double_expbit0="unknown"
19455 fi
19456 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19457   conftest.$ac_objext conftest.beam conftest.$ac_ext
19458 fi
19459
19460       rm -f conftest.out
19461
19462 fi
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
19464 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
19465   case "$gl_cv_cc_double_expbit0" in
19466     word*bit*)
19467       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19468       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
19469
19470 cat >>confdefs.h <<_ACEOF
19471 #define DBL_EXPBIT0_WORD $word
19472 _ACEOF
19473
19474
19475 cat >>confdefs.h <<_ACEOF
19476 #define DBL_EXPBIT0_BIT $bit
19477 _ACEOF
19478
19479       ;;
19480   esac
19481
19482
19483   fi
19484
19485   # Code from module isnanf-nolibm:
19486
19487
19488   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
19489 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
19490 if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
19491   $as_echo_n "(cached) " >&6
19492 else
19493
19494       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19495 /* end confdefs.h.  */
19496 #include <math.h>
19497              #if __GNUC__ >= 4
19498              # undef isnanf
19499              # define isnanf(x) __builtin_isnanf ((float)(x))
19500              #elif defined isnan
19501              # undef isnanf
19502              # define isnanf(x) isnan ((float)(x))
19503              #endif
19504              float x;
19505 int
19506 main ()
19507 {
19508 return isnanf (x);
19509   ;
19510   return 0;
19511 }
19512 _ACEOF
19513 if ac_fn_c_try_link "$LINENO"; then :
19514   gl_cv_func_isnanf_no_libm=yes
19515 else
19516   gl_cv_func_isnanf_no_libm=no
19517 fi
19518 rm -f core conftest.err conftest.$ac_objext \
19519     conftest$ac_exeext conftest.$ac_ext
19520
19521 fi
19522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
19523 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
19524
19525   if test $gl_cv_func_isnanf_no_libm = yes; then
19526
19527
19528
19529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
19530 $as_echo_n "checking whether isnan(float) works... " >&6; }
19531 if test "${gl_cv_func_isnanf_works+set}" = set; then :
19532   $as_echo_n "(cached) " >&6
19533 else
19534
19535       if test "$cross_compiling" = yes; then :
19536   case "$host_os" in
19537            irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
19538            *)                gl_cv_func_isnanf_works="guessing yes";;
19539          esac
19540
19541 else
19542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19543 /* end confdefs.h.  */
19544
19545 #include <math.h>
19546 #if __GNUC__ >= 4
19547 # undef isnanf
19548 # define isnanf(x) __builtin_isnanf ((float)(x))
19549 #elif defined isnan
19550 # undef isnanf
19551 # define isnanf(x) isnan ((float)(x))
19552 #endif
19553 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
19554 #ifdef __DECC
19555 static float
19556 NaN ()
19557 {
19558   static float zero = 0.0f;
19559   return zero / zero;
19560 }
19561 #else
19562 # define NaN() (0.0f / 0.0f)
19563 #endif
19564 #define NWORDS \
19565   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19566 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
19567 int main()
19568 {
19569   int result = 0;
19570
19571   if (isnanf (1.0f / 0.0f))
19572     result |= 1;
19573
19574   if (!isnanf (NaN ()))
19575     result |= 2;
19576
19577 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
19578   /* The isnanf function should be immune against changes in the sign bit and
19579      in the mantissa bits.  The xor operation twiddles a bit that can only be
19580      a sign bit or a mantissa bit.  */
19581   if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
19582     {
19583       memory_float m;
19584
19585       m.value = NaN ();
19586       /* Set the bits below the exponent to 01111...111.  */
19587       m.word[0] &= -1U << FLT_EXPBIT0_BIT;
19588       m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
19589       if (!isnanf (m.value))
19590         result |= 4;
19591     }
19592 #endif
19593
19594   return result;
19595 }
19596 _ACEOF
19597 if ac_fn_c_try_run "$LINENO"; then :
19598   gl_cv_func_isnanf_works=yes
19599 else
19600   gl_cv_func_isnanf_works=no
19601 fi
19602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19603   conftest.$ac_objext conftest.beam conftest.$ac_ext
19604 fi
19605
19606
19607 fi
19608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
19609 $as_echo "$gl_cv_func_isnanf_works" >&6; }
19610
19611   fi
19612   if test $gl_cv_func_isnanf_no_libm = yes \
19613      && { case "$gl_cv_func_isnanf_works" in
19614             *yes) true;;
19615             *) false;;
19616           esac
19617         }; then
19618
19619 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
19620
19621   else
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631   M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
19632
19633
19634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
19635 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
19636 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
19637   $as_echo_n "(cached) " >&6
19638 else
19639
19640       if test "$cross_compiling" = yes; then :
19641   gl_cv_cc_float_expbit0="word 0 bit 23"
19642 else
19643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19644 /* end confdefs.h.  */
19645
19646 #include <float.h>
19647 #include <stddef.h>
19648 #include <stdio.h>
19649 #include <string.h>
19650 #define NWORDS \
19651   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19652 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
19653 static unsigned int ored_words[NWORDS];
19654 static unsigned int anded_words[NWORDS];
19655 static void add_to_ored_words (float x)
19656 {
19657   memory_float m;
19658   size_t i;
19659   /* Clear it first, in case
19660      sizeof (float) < sizeof (memory_float).  */
19661   memset (&m, 0, sizeof (memory_float));
19662   m.value = x;
19663   for (i = 0; i < NWORDS; i++)
19664     {
19665       ored_words[i] |= m.word[i];
19666       anded_words[i] &= m.word[i];
19667     }
19668 }
19669 int main ()
19670 {
19671   size_t j;
19672   FILE *fp = fopen ("conftest.out", "w");
19673   if (fp == NULL)
19674     return 1;
19675   for (j = 0; j < NWORDS; j++)
19676     anded_words[j] = ~ (unsigned int) 0;
19677   add_to_ored_words (0.25f);
19678   add_to_ored_words (0.5f);
19679   add_to_ored_words (1.0f);
19680   add_to_ored_words (2.0f);
19681   add_to_ored_words (4.0f);
19682   /* Remove bits that are common (e.g. if representation of the first mantissa
19683      bit is explicit).  */
19684   for (j = 0; j < NWORDS; j++)
19685     ored_words[j] &= ~anded_words[j];
19686   /* Now find the nonzero word.  */
19687   for (j = 0; j < NWORDS; j++)
19688     if (ored_words[j] != 0)
19689       break;
19690   if (j < NWORDS)
19691     {
19692       size_t i;
19693       for (i = j + 1; i < NWORDS; i++)
19694         if (ored_words[i] != 0)
19695           {
19696             fprintf (fp, "unknown");
19697             return (fclose (fp) != 0);
19698           }
19699       for (i = 0; ; i++)
19700         if ((ored_words[j] >> i) & 1)
19701           {
19702             fprintf (fp, "word %d bit %d", (int) j, (int) i);
19703             return (fclose (fp) != 0);
19704           }
19705     }
19706   fprintf (fp, "unknown");
19707   return (fclose (fp) != 0);
19708 }
19709
19710 _ACEOF
19711 if ac_fn_c_try_run "$LINENO"; then :
19712   gl_cv_cc_float_expbit0=`cat conftest.out`
19713 else
19714   gl_cv_cc_float_expbit0="unknown"
19715 fi
19716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19717   conftest.$ac_objext conftest.beam conftest.$ac_ext
19718 fi
19719
19720       rm -f conftest.out
19721
19722 fi
19723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
19724 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
19725   case "$gl_cv_cc_float_expbit0" in
19726     word*bit*)
19727       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
19728       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
19729
19730 cat >>confdefs.h <<_ACEOF
19731 #define FLT_EXPBIT0_WORD $word
19732 _ACEOF
19733
19734
19735 cat >>confdefs.h <<_ACEOF
19736 #define FLT_EXPBIT0_BIT $bit
19737 _ACEOF
19738
19739       ;;
19740   esac
19741
19742
19743   fi
19744
19745   # Code from module isnanl-nolibm:
19746
19747
19748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
19749 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
19750 if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
19751   $as_echo_n "(cached) " >&6
19752 else
19753
19754       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19755 /* end confdefs.h.  */
19756 #include <math.h>
19757              #if __GNUC__ >= 4
19758              # undef isnanl
19759              # define isnanl(x) __builtin_isnanl ((long double)(x))
19760              #elif defined isnan
19761              # undef isnanl
19762              # define isnanl(x) isnan ((long double)(x))
19763              #endif
19764              long double x;
19765 int
19766 main ()
19767 {
19768 return isnanl (x);
19769   ;
19770   return 0;
19771 }
19772 _ACEOF
19773 if ac_fn_c_try_link "$LINENO"; then :
19774   gl_cv_func_isnanl_no_libm=yes
19775 else
19776   gl_cv_func_isnanl_no_libm=no
19777 fi
19778 rm -f core conftest.err conftest.$ac_objext \
19779     conftest$ac_exeext conftest.$ac_ext
19780
19781 fi
19782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
19783 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
19784
19785   gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
19786   if test $gl_func_isnanl_no_libm = yes; then
19787
19788
19789
19790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
19791 $as_echo_n "checking whether isnanl works... " >&6; }
19792 if test "${gl_cv_func_isnanl_works+set}" = set; then :
19793   $as_echo_n "(cached) " >&6
19794 else
19795
19796       if test "$cross_compiling" = yes; then :
19797   case "$host_cpu" in
19798                                  # Guess no on ia64, x86_64, i386.
19799            ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
19800            *)
19801              case "$host_os" in
19802                netbsd*) gl_cv_func_isnanl_works="guessing no";;
19803                *)       gl_cv_func_isnanl_works="guessing yes";;
19804              esac
19805              ;;
19806          esac
19807
19808 else
19809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19810 /* end confdefs.h.  */
19811
19812 #include <float.h>
19813 #include <limits.h>
19814 #include <math.h>
19815 #if __GNUC__ >= 4
19816 # undef isnanl
19817 # define isnanl(x) __builtin_isnanl ((long double)(x))
19818 #elif defined isnan
19819 # undef isnanl
19820 # define isnanl(x) isnan ((long double)(x))
19821 #endif
19822 #define NWORDS \
19823   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19824 typedef union { unsigned int word[NWORDS]; long double value; }
19825         memory_long_double;
19826 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
19827    runtime type conversion.  */
19828 #ifdef __sgi
19829 static long double NaNl ()
19830 {
19831   double zero = 0.0;
19832   return zero / zero;
19833 }
19834 #else
19835 # define NaNl() (0.0L / 0.0L)
19836 #endif
19837 int main ()
19838 {
19839   int result = 0;
19840
19841   if (!isnanl (NaNl ()))
19842     result |= 1;
19843
19844   {
19845     memory_long_double m;
19846     unsigned int i;
19847
19848     /* The isnanl function should be immune against changes in the sign bit and
19849        in the mantissa bits.  The xor operation twiddles a bit that can only be
19850        a sign bit or a mantissa bit (since the exponent never extends to
19851        bit 31).  */
19852     m.value = NaNl ();
19853     m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
19854     for (i = 0; i < NWORDS; i++)
19855       m.word[i] |= 1;
19856     if (!isnanl (m.value))
19857       result |= 1;
19858   }
19859
19860 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
19861 /* Representation of an 80-bit 'long double' as an initializer for a sequence
19862    of 'unsigned int' words.  */
19863 # ifdef WORDS_BIGENDIAN
19864 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
19865      { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
19866        ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
19867        (unsigned int) (mantlo) << 16                                        \
19868      }
19869 # else
19870 #  define LDBL80_WORDS(exponent,manthi,mantlo) \
19871      { mantlo, manthi, exponent }
19872 # endif
19873   { /* Quiet NaN.  */
19874     static memory_long_double x =
19875       { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
19876     if (!isnanl (x.value))
19877       result |= 2;
19878   }
19879   {
19880     /* Signalling NaN.  */
19881     static memory_long_double x =
19882       { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
19883     if (!isnanl (x.value))
19884       result |= 2;
19885   }
19886   /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
19887      Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
19888        Intel IA-64 Architecture Software Developer's Manual, Volume 1:
19889        Application Architecture.
19890        Table 5-2 "Floating-Point Register Encodings"
19891        Figure 5-6 "Memory to Floating-Point Register Data Translation"
19892    */
19893   { /* Pseudo-NaN.  */
19894     static memory_long_double x =
19895       { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
19896     if (!isnanl (x.value))
19897       result |= 4;
19898   }
19899   { /* Pseudo-Infinity.  */
19900     static memory_long_double x =
19901       { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
19902     if (!isnanl (x.value))
19903       result |= 8;
19904   }
19905   { /* Pseudo-Zero.  */
19906     static memory_long_double x =
19907       { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
19908     if (!isnanl (x.value))
19909       result |= 16;
19910   }
19911   { /* Unnormalized number.  */
19912     static memory_long_double x =
19913       { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
19914     if (!isnanl (x.value))
19915       result |= 32;
19916   }
19917   { /* Pseudo-Denormal.  */
19918     static memory_long_double x =
19919       { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
19920     if (!isnanl (x.value))
19921       result |= 64;
19922   }
19923 #endif
19924
19925   return result;
19926 }
19927 _ACEOF
19928 if ac_fn_c_try_run "$LINENO"; then :
19929   gl_cv_func_isnanl_works=yes
19930 else
19931   gl_cv_func_isnanl_works=no
19932 fi
19933 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19934   conftest.$ac_objext conftest.beam conftest.$ac_ext
19935 fi
19936
19937
19938 fi
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
19940 $as_echo "$gl_cv_func_isnanl_works" >&6; }
19941
19942     case "$gl_cv_func_isnanl_works" in
19943       *yes) ;;
19944       *)    gl_func_isnanl_no_libm=no ;;
19945     esac
19946   fi
19947   if test $gl_func_isnanl_no_libm = yes; then
19948
19949 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
19950
19951   else
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961   M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
19962
19963
19964
19965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
19966 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
19967 if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
19968   $as_echo_n "(cached) " >&6
19969 else
19970
19971       if test "$cross_compiling" = yes; then :
19972
19973                               gl_cv_cc_long_double_expbit0="unknown"
19974
19975 else
19976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19977 /* end confdefs.h.  */
19978
19979 #include <float.h>
19980 #include <stddef.h>
19981 #include <stdio.h>
19982 #include <string.h>
19983 #define NWORDS \
19984   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19985 typedef union { long double value; unsigned int word[NWORDS]; }
19986         memory_long_double;
19987 static unsigned int ored_words[NWORDS];
19988 static unsigned int anded_words[NWORDS];
19989 static void add_to_ored_words (long double x)
19990 {
19991   memory_long_double m;
19992   size_t i;
19993   /* Clear it first, in case
19994      sizeof (long double) < sizeof (memory_long_double).  */
19995   memset (&m, 0, sizeof (memory_long_double));
19996   m.value = x;
19997   for (i = 0; i < NWORDS; i++)
19998     {
19999       ored_words[i] |= m.word[i];
20000       anded_words[i] &= m.word[i];
20001     }
20002 }
20003 int main ()
20004 {
20005   size_t j;
20006   FILE *fp = fopen ("conftest.out", "w");
20007   if (fp == NULL)
20008     return 1;
20009   for (j = 0; j < NWORDS; j++)
20010     anded_words[j] = ~ (unsigned int) 0;
20011   add_to_ored_words (0.25L);
20012   add_to_ored_words (0.5L);
20013   add_to_ored_words (1.0L);
20014   add_to_ored_words (2.0L);
20015   add_to_ored_words (4.0L);
20016   /* Remove bits that are common (e.g. if representation of the first mantissa
20017      bit is explicit).  */
20018   for (j = 0; j < NWORDS; j++)
20019     ored_words[j] &= ~anded_words[j];
20020   /* Now find the nonzero word.  */
20021   for (j = 0; j < NWORDS; j++)
20022     if (ored_words[j] != 0)
20023       break;
20024   if (j < NWORDS)
20025     {
20026       size_t i;
20027       for (i = j + 1; i < NWORDS; i++)
20028         if (ored_words[i] != 0)
20029           {
20030             fprintf (fp, "unknown");
20031             return (fclose (fp) != 0);
20032           }
20033       for (i = 0; ; i++)
20034         if ((ored_words[j] >> i) & 1)
20035           {
20036             fprintf (fp, "word %d bit %d", (int) j, (int) i);
20037             return (fclose (fp) != 0);
20038           }
20039     }
20040   fprintf (fp, "unknown");
20041   return (fclose (fp) != 0);
20042 }
20043
20044 _ACEOF
20045 if ac_fn_c_try_run "$LINENO"; then :
20046   gl_cv_cc_long_double_expbit0=`cat conftest.out`
20047 else
20048   gl_cv_cc_long_double_expbit0="unknown"
20049 fi
20050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20051   conftest.$ac_objext conftest.beam conftest.$ac_ext
20052 fi
20053
20054       rm -f conftest.out
20055
20056 fi
20057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
20058 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
20059   case "$gl_cv_cc_long_double_expbit0" in
20060     word*bit*)
20061       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
20062       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
20063
20064 cat >>confdefs.h <<_ACEOF
20065 #define LDBL_EXPBIT0_WORD $word
20066 _ACEOF
20067
20068
20069 cat >>confdefs.h <<_ACEOF
20070 #define LDBL_EXPBIT0_BIT $bit
20071 _ACEOF
20072
20073       ;;
20074   esac
20075
20076
20077   fi
20078
20079   # Code from module langinfo:
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094      if test $gl_cv_have_include_next = yes; then
20095        gl_cv_next_langinfo_h='<'langinfo.h'>'
20096      else
20097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
20098 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
20099 if test "${gl_cv_next_langinfo_h+set}" = set; then :
20100   $as_echo_n "(cached) " >&6
20101 else
20102
20103              if test $ac_cv_header_langinfo_h = yes; then
20104
20105
20106                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20107 /* end confdefs.h.  */
20108 #include <langinfo.h>
20109
20110 _ACEOF
20111                                                                                                                         case "$host_os" in
20112                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
20113                  *)    gl_absname_cpp="$ac_cpp" ;;
20114                esac
20115                                                             gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20116                   sed -n '\#/langinfo.h#{
20117                     s#.*"\(.*/langinfo.h\)".*#\1#
20118                     s#^/[^/]#//&#
20119                     p
20120                     q
20121                   }'`'"'
20122           else
20123                gl_cv_next_langinfo_h='<'langinfo.h'>'
20124              fi
20125
20126
20127 fi
20128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
20129 $as_echo "$gl_cv_next_langinfo_h" >&6; }
20130      fi
20131      NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
20132
20133      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20134        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20135        gl_next_as_first_directive='<'langinfo.h'>'
20136      else
20137        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20138        gl_next_as_first_directive=$gl_cv_next_langinfo_h
20139      fi
20140      NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
20141
20142
20143
20144
20145
20146     HAVE_LANGINFO_CODESET=0
20147   HAVE_LANGINFO_T_FMT_AMPM=0
20148   HAVE_LANGINFO_ERA=0
20149   HAVE_LANGINFO_YESEXPR=0
20150
20151   if test $ac_cv_header_langinfo_h = yes; then
20152     HAVE_LANGINFO_H=1
20153             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
20154 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
20155 if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
20156   $as_echo_n "(cached) " >&6
20157 else
20158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20159 /* end confdefs.h.  */
20160 #include <langinfo.h>
20161 int a = CODESET;
20162
20163 int
20164 main ()
20165 {
20166
20167   ;
20168   return 0;
20169 }
20170 _ACEOF
20171 if ac_fn_c_try_compile "$LINENO"; then :
20172   gl_cv_header_langinfo_codeset=yes
20173 else
20174   gl_cv_header_langinfo_codeset=no
20175 fi
20176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20177
20178 fi
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
20180 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
20181     if test $gl_cv_header_langinfo_codeset = yes; then
20182       HAVE_LANGINFO_CODESET=1
20183     fi
20184     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
20185 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
20186 if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then :
20187   $as_echo_n "(cached) " >&6
20188 else
20189   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20190 /* end confdefs.h.  */
20191 #include <langinfo.h>
20192 int a = T_FMT_AMPM;
20193
20194 int
20195 main ()
20196 {
20197
20198   ;
20199   return 0;
20200 }
20201 _ACEOF
20202 if ac_fn_c_try_compile "$LINENO"; then :
20203   gl_cv_header_langinfo_t_fmt_ampm=yes
20204 else
20205   gl_cv_header_langinfo_t_fmt_ampm=no
20206 fi
20207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20208
20209 fi
20210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
20211 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
20212     if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
20213       HAVE_LANGINFO_T_FMT_AMPM=1
20214     fi
20215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
20216 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
20217 if test "${gl_cv_header_langinfo_era+set}" = set; then :
20218   $as_echo_n "(cached) " >&6
20219 else
20220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20221 /* end confdefs.h.  */
20222 #include <langinfo.h>
20223 int a = ERA;
20224
20225 int
20226 main ()
20227 {
20228
20229   ;
20230   return 0;
20231 }
20232 _ACEOF
20233 if ac_fn_c_try_compile "$LINENO"; then :
20234   gl_cv_header_langinfo_era=yes
20235 else
20236   gl_cv_header_langinfo_era=no
20237 fi
20238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20239
20240 fi
20241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
20242 $as_echo "$gl_cv_header_langinfo_era" >&6; }
20243     if test $gl_cv_header_langinfo_era = yes; then
20244       HAVE_LANGINFO_ERA=1
20245     fi
20246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
20247 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
20248 if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then :
20249   $as_echo_n "(cached) " >&6
20250 else
20251   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20252 /* end confdefs.h.  */
20253 #include <langinfo.h>
20254 int a = YESEXPR;
20255
20256 int
20257 main ()
20258 {
20259
20260   ;
20261   return 0;
20262 }
20263 _ACEOF
20264 if ac_fn_c_try_compile "$LINENO"; then :
20265   gl_cv_header_langinfo_yesexpr=yes
20266 else
20267   gl_cv_header_langinfo_yesexpr=no
20268 fi
20269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20270
20271 fi
20272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
20273 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
20274     if test $gl_cv_header_langinfo_yesexpr = yes; then
20275       HAVE_LANGINFO_YESEXPR=1
20276     fi
20277   else
20278     HAVE_LANGINFO_H=0
20279   fi
20280
20281
20282
20283
20284
20285
20286
20287
20288   # Code from module libsigsegv:
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303     use_additional=yes
20304
20305   acl_save_prefix="$prefix"
20306   prefix="$acl_final_prefix"
20307   acl_save_exec_prefix="$exec_prefix"
20308   exec_prefix="$acl_final_exec_prefix"
20309
20310     eval additional_includedir=\"$includedir\"
20311     eval additional_libdir=\"$libdir\"
20312
20313   exec_prefix="$acl_save_exec_prefix"
20314   prefix="$acl_save_prefix"
20315
20316
20317 # Check whether --with-libsigsegv-prefix was given.
20318 if test "${with_libsigsegv_prefix+set}" = set; then :
20319   withval=$with_libsigsegv_prefix;
20320     if test "X$withval" = "Xno"; then
20321       use_additional=no
20322     else
20323       if test "X$withval" = "X"; then
20324
20325   acl_save_prefix="$prefix"
20326   prefix="$acl_final_prefix"
20327   acl_save_exec_prefix="$exec_prefix"
20328   exec_prefix="$acl_final_exec_prefix"
20329
20330           eval additional_includedir=\"$includedir\"
20331           eval additional_libdir=\"$libdir\"
20332
20333   exec_prefix="$acl_save_exec_prefix"
20334   prefix="$acl_save_prefix"
20335
20336       else
20337         additional_includedir="$withval/include"
20338         additional_libdir="$withval/$acl_libdirstem"
20339         if test "$acl_libdirstem2" != "$acl_libdirstem" \
20340            && ! test -d "$withval/$acl_libdirstem"; then
20341           additional_libdir="$withval/$acl_libdirstem2"
20342         fi
20343       fi
20344     fi
20345
20346 fi
20347
20348       LIBSIGSEGV=
20349   LTLIBSIGSEGV=
20350   INCSIGSEGV=
20351   LIBSIGSEGV_PREFIX=
20352       HAVE_LIBSIGSEGV=
20353   rpathdirs=
20354   ltrpathdirs=
20355   names_already_handled=
20356   names_next_round='sigsegv '
20357   while test -n "$names_next_round"; do
20358     names_this_round="$names_next_round"
20359     names_next_round=
20360     for name in $names_this_round; do
20361       already_handled=
20362       for n in $names_already_handled; do
20363         if test "$n" = "$name"; then
20364           already_handled=yes
20365           break
20366         fi
20367       done
20368       if test -z "$already_handled"; then
20369         names_already_handled="$names_already_handled $name"
20370                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
20371         eval value=\"\$HAVE_LIB$uppername\"
20372         if test -n "$value"; then
20373           if test "$value" = yes; then
20374             eval value=\"\$LIB$uppername\"
20375             test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
20376             eval value=\"\$LTLIB$uppername\"
20377             test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
20378           else
20379                                     :
20380           fi
20381         else
20382                               found_dir=
20383           found_la=
20384           found_so=
20385           found_a=
20386           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
20387           if test -n "$acl_shlibext"; then
20388             shrext=".$acl_shlibext"             # typically: shrext=.so
20389           else
20390             shrext=
20391           fi
20392           if test $use_additional = yes; then
20393             dir="$additional_libdir"
20394                                     if test -n "$acl_shlibext"; then
20395               if test -f "$dir/$libname$shrext"; then
20396                 found_dir="$dir"
20397                 found_so="$dir/$libname$shrext"
20398               else
20399                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
20400                   ver=`(cd "$dir" && \
20401                         for f in "$libname$shrext".*; do echo "$f"; done \
20402                         | sed -e "s,^$libname$shrext\\\\.,," \
20403                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
20404                         | sed 1q ) 2>/dev/null`
20405                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
20406                     found_dir="$dir"
20407                     found_so="$dir/$libname$shrext.$ver"
20408                   fi
20409                 else
20410                   eval library_names=\"$acl_library_names_spec\"
20411                   for f in $library_names; do
20412                     if test -f "$dir/$f"; then
20413                       found_dir="$dir"
20414                       found_so="$dir/$f"
20415                       break
20416                     fi
20417                   done
20418                 fi
20419               fi
20420             fi
20421                         if test "X$found_dir" = "X"; then
20422               if test -f "$dir/$libname.$acl_libext"; then
20423                 found_dir="$dir"
20424                 found_a="$dir/$libname.$acl_libext"
20425               fi
20426             fi
20427             if test "X$found_dir" != "X"; then
20428               if test -f "$dir/$libname.la"; then
20429                 found_la="$dir/$libname.la"
20430               fi
20431             fi
20432           fi
20433           if test "X$found_dir" = "X"; then
20434             for x in $LDFLAGS $LTLIBSIGSEGV; do
20435
20436   acl_save_prefix="$prefix"
20437   prefix="$acl_final_prefix"
20438   acl_save_exec_prefix="$exec_prefix"
20439   exec_prefix="$acl_final_exec_prefix"
20440   eval x=\"$x\"
20441   exec_prefix="$acl_save_exec_prefix"
20442   prefix="$acl_save_prefix"
20443
20444               case "$x" in
20445                 -L*)
20446                   dir=`echo "X$x" | sed -e 's/^X-L//'`
20447                                     if test -n "$acl_shlibext"; then
20448                     if test -f "$dir/$libname$shrext"; then
20449                       found_dir="$dir"
20450                       found_so="$dir/$libname$shrext"
20451                     else
20452                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
20453                         ver=`(cd "$dir" && \
20454                               for f in "$libname$shrext".*; do echo "$f"; done \
20455                               | sed -e "s,^$libname$shrext\\\\.,," \
20456                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
20457                               | sed 1q ) 2>/dev/null`
20458                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
20459                           found_dir="$dir"
20460                           found_so="$dir/$libname$shrext.$ver"
20461                         fi
20462                       else
20463                         eval library_names=\"$acl_library_names_spec\"
20464                         for f in $library_names; do
20465                           if test -f "$dir/$f"; then
20466                             found_dir="$dir"
20467                             found_so="$dir/$f"
20468                             break
20469                           fi
20470                         done
20471                       fi
20472                     fi
20473                   fi
20474                                     if test "X$found_dir" = "X"; then
20475                     if test -f "$dir/$libname.$acl_libext"; then
20476                       found_dir="$dir"
20477                       found_a="$dir/$libname.$acl_libext"
20478                     fi
20479                   fi
20480                   if test "X$found_dir" != "X"; then
20481                     if test -f "$dir/$libname.la"; then
20482                       found_la="$dir/$libname.la"
20483                     fi
20484                   fi
20485                   ;;
20486               esac
20487               if test "X$found_dir" != "X"; then
20488                 break
20489               fi
20490             done
20491           fi
20492           if test "X$found_dir" != "X"; then
20493                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
20494             if test "X$found_so" != "X"; then
20495                                                         if test "$enable_rpath" = no \
20496                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
20497                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
20498                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20499               else
20500                                                                                 haveit=
20501                 for x in $ltrpathdirs; do
20502                   if test "X$x" = "X$found_dir"; then
20503                     haveit=yes
20504                     break
20505                   fi
20506                 done
20507                 if test -z "$haveit"; then
20508                   ltrpathdirs="$ltrpathdirs $found_dir"
20509                 fi
20510                                 if test "$acl_hardcode_direct" = yes; then
20511                                                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20512                 else
20513                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
20514                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20515                                                             haveit=
20516                     for x in $rpathdirs; do
20517                       if test "X$x" = "X$found_dir"; then
20518                         haveit=yes
20519                         break
20520                       fi
20521                     done
20522                     if test -z "$haveit"; then
20523                       rpathdirs="$rpathdirs $found_dir"
20524                     fi
20525                   else
20526                                                                                 haveit=
20527                     for x in $LDFLAGS $LIBSIGSEGV; do
20528
20529   acl_save_prefix="$prefix"
20530   prefix="$acl_final_prefix"
20531   acl_save_exec_prefix="$exec_prefix"
20532   exec_prefix="$acl_final_exec_prefix"
20533   eval x=\"$x\"
20534   exec_prefix="$acl_save_exec_prefix"
20535   prefix="$acl_save_prefix"
20536
20537                       if test "X$x" = "X-L$found_dir"; then
20538                         haveit=yes
20539                         break
20540                       fi
20541                     done
20542                     if test -z "$haveit"; then
20543                       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
20544                     fi
20545                     if test "$acl_hardcode_minus_L" != no; then
20546                                                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
20547                     else
20548                                                                                                                                                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
20549                     fi
20550                   fi
20551                 fi
20552               fi
20553             else
20554               if test "X$found_a" != "X"; then
20555                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
20556               else
20557                                                 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
20558               fi
20559             fi
20560                         additional_includedir=
20561             case "$found_dir" in
20562               */$acl_libdirstem | */$acl_libdirstem/)
20563                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
20564                 if test "$name" = 'sigsegv'; then
20565                   LIBSIGSEGV_PREFIX="$basedir"
20566                 fi
20567                 additional_includedir="$basedir/include"
20568                 ;;
20569               */$acl_libdirstem2 | */$acl_libdirstem2/)
20570                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
20571                 if test "$name" = 'sigsegv'; then
20572                   LIBSIGSEGV_PREFIX="$basedir"
20573                 fi
20574                 additional_includedir="$basedir/include"
20575                 ;;
20576             esac
20577             if test "X$additional_includedir" != "X"; then
20578                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
20579                 haveit=
20580                 if test "X$additional_includedir" = "X/usr/local/include"; then
20581                   if test -n "$GCC"; then
20582                     case $host_os in
20583                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
20584                     esac
20585                   fi
20586                 fi
20587                 if test -z "$haveit"; then
20588                   for x in $CPPFLAGS $INCSIGSEGV; do
20589
20590   acl_save_prefix="$prefix"
20591   prefix="$acl_final_prefix"
20592   acl_save_exec_prefix="$exec_prefix"
20593   exec_prefix="$acl_final_exec_prefix"
20594   eval x=\"$x\"
20595   exec_prefix="$acl_save_exec_prefix"
20596   prefix="$acl_save_prefix"
20597
20598                     if test "X$x" = "X-I$additional_includedir"; then
20599                       haveit=yes
20600                       break
20601                     fi
20602                   done
20603                   if test -z "$haveit"; then
20604                     if test -d "$additional_includedir"; then
20605                                             INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
20606                     fi
20607                   fi
20608                 fi
20609               fi
20610             fi
20611                         if test -n "$found_la"; then
20612                                                         save_libdir="$libdir"
20613               case "$found_la" in
20614                 */* | *\\*) . "$found_la" ;;
20615                 *) . "./$found_la" ;;
20616               esac
20617               libdir="$save_libdir"
20618                             for dep in $dependency_libs; do
20619                 case "$dep" in
20620                   -L*)
20621                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
20622                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
20623                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
20624                       haveit=
20625                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
20626                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
20627                         if test -n "$GCC"; then
20628                           case $host_os in
20629                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
20630                           esac
20631                         fi
20632                       fi
20633                       if test -z "$haveit"; then
20634                         haveit=
20635                         for x in $LDFLAGS $LIBSIGSEGV; do
20636
20637   acl_save_prefix="$prefix"
20638   prefix="$acl_final_prefix"
20639   acl_save_exec_prefix="$exec_prefix"
20640   exec_prefix="$acl_final_exec_prefix"
20641   eval x=\"$x\"
20642   exec_prefix="$acl_save_exec_prefix"
20643   prefix="$acl_save_prefix"
20644
20645                           if test "X$x" = "X-L$additional_libdir"; then
20646                             haveit=yes
20647                             break
20648                           fi
20649                         done
20650                         if test -z "$haveit"; then
20651                           if test -d "$additional_libdir"; then
20652                                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
20653                           fi
20654                         fi
20655                         haveit=
20656                         for x in $LDFLAGS $LTLIBSIGSEGV; do
20657
20658   acl_save_prefix="$prefix"
20659   prefix="$acl_final_prefix"
20660   acl_save_exec_prefix="$exec_prefix"
20661   exec_prefix="$acl_final_exec_prefix"
20662   eval x=\"$x\"
20663   exec_prefix="$acl_save_exec_prefix"
20664   prefix="$acl_save_prefix"
20665
20666                           if test "X$x" = "X-L$additional_libdir"; then
20667                             haveit=yes
20668                             break
20669                           fi
20670                         done
20671                         if test -z "$haveit"; then
20672                           if test -d "$additional_libdir"; then
20673                                                         LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
20674                           fi
20675                         fi
20676                       fi
20677                     fi
20678                     ;;
20679                   -R*)
20680                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
20681                     if test "$enable_rpath" != no; then
20682                                                                   haveit=
20683                       for x in $rpathdirs; do
20684                         if test "X$x" = "X$dir"; then
20685                           haveit=yes
20686                           break
20687                         fi
20688                       done
20689                       if test -z "$haveit"; then
20690                         rpathdirs="$rpathdirs $dir"
20691                       fi
20692                                                                   haveit=
20693                       for x in $ltrpathdirs; do
20694                         if test "X$x" = "X$dir"; then
20695                           haveit=yes
20696                           break
20697                         fi
20698                       done
20699                       if test -z "$haveit"; then
20700                         ltrpathdirs="$ltrpathdirs $dir"
20701                       fi
20702                     fi
20703                     ;;
20704                   -l*)
20705                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
20706                     ;;
20707                   *.la)
20708                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
20709                     ;;
20710                   *)
20711                                         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
20712                     LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
20713                     ;;
20714                 esac
20715               done
20716             fi
20717           else
20718                                                             LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
20719             LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
20720           fi
20721         fi
20722       fi
20723     done
20724   done
20725   if test "X$rpathdirs" != "X"; then
20726     if test -n "$acl_hardcode_libdir_separator"; then
20727                         alldirs=
20728       for found_dir in $rpathdirs; do
20729         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
20730       done
20731             acl_save_libdir="$libdir"
20732       libdir="$alldirs"
20733       eval flag=\"$acl_hardcode_libdir_flag_spec\"
20734       libdir="$acl_save_libdir"
20735       LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
20736     else
20737             for found_dir in $rpathdirs; do
20738         acl_save_libdir="$libdir"
20739         libdir="$found_dir"
20740         eval flag=\"$acl_hardcode_libdir_flag_spec\"
20741         libdir="$acl_save_libdir"
20742         LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
20743       done
20744     fi
20745   fi
20746   if test "X$ltrpathdirs" != "X"; then
20747             for found_dir in $ltrpathdirs; do
20748       LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
20749     done
20750   fi
20751
20752
20753
20754
20755
20756
20757
20758         ac_save_CPPFLAGS="$CPPFLAGS"
20759
20760   for element in $INCSIGSEGV; do
20761     haveit=
20762     for x in $CPPFLAGS; do
20763
20764   acl_save_prefix="$prefix"
20765   prefix="$acl_final_prefix"
20766   acl_save_exec_prefix="$exec_prefix"
20767   exec_prefix="$acl_final_exec_prefix"
20768   eval x=\"$x\"
20769   exec_prefix="$acl_save_exec_prefix"
20770   prefix="$acl_save_prefix"
20771
20772       if test "X$x" = "X$element"; then
20773         haveit=yes
20774         break
20775       fi
20776     done
20777     if test -z "$haveit"; then
20778       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
20779     fi
20780   done
20781
20782
20783   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
20784 $as_echo_n "checking for libsigsegv... " >&6; }
20785 if test "${ac_cv_libsigsegv+set}" = set; then :
20786   $as_echo_n "(cached) " >&6
20787 else
20788
20789     ac_save_LIBS="$LIBS"
20790                                 case " $LIBSIGSEGV" in
20791       *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
20792       *)       LIBS="$LIBSIGSEGV $LIBS" ;;
20793     esac
20794     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795 /* end confdefs.h.  */
20796 #include <sigsegv.h>
20797 int
20798 main ()
20799 {
20800 sigsegv_deinstall_handler();
20801   ;
20802   return 0;
20803 }
20804 _ACEOF
20805 if ac_fn_c_try_link "$LINENO"; then :
20806   ac_cv_libsigsegv=yes
20807 else
20808   ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
20809 fi
20810 rm -f core conftest.err conftest.$ac_objext \
20811     conftest$ac_exeext conftest.$ac_ext
20812     LIBS="$ac_save_LIBS"
20813
20814 fi
20815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
20816 $as_echo "$ac_cv_libsigsegv" >&6; }
20817   if test "$ac_cv_libsigsegv" = yes; then
20818     HAVE_LIBSIGSEGV=yes
20819
20820 $as_echo "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
20821
20822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
20823 $as_echo_n "checking how to link with libsigsegv... " >&6; }
20824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
20825 $as_echo "$LIBSIGSEGV" >&6; }
20826   else
20827     HAVE_LIBSIGSEGV=no
20828             CPPFLAGS="$ac_save_CPPFLAGS"
20829     LIBSIGSEGV=
20830     LTLIBSIGSEGV=
20831     LIBSIGSEGV_PREFIX=
20832   fi
20833
20834
20835
20836
20837
20838
20839
20840     gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
20841
20842   # Code from module linkedhash-list:
20843   # Code from module list:
20844
20845
20846
20847   # Code from module localcharset:
20848
20849
20850
20851
20852
20853
20854
20855
20856   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
20857
20858   # Code from module lock:
20859
20860
20861   if test "$gl_threads_api" = posix; then
20862     # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
20863     # pthread_rwlock_* functions.
20864     ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
20865 "
20866 if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then :
20867
20868 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
20869
20870 fi
20871
20872     # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
20873     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20874 /* end confdefs.h.  */
20875
20876       #include <pthread.h>
20877 int
20878 main ()
20879 {
20880
20881 #if __FreeBSD__ == 4
20882 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
20883 #else
20884 int x = (int)PTHREAD_MUTEX_RECURSIVE;
20885 return !x;
20886 #endif
20887
20888   ;
20889   return 0;
20890 }
20891 _ACEOF
20892 if ac_fn_c_try_compile "$LINENO"; then :
20893
20894 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
20895
20896 fi
20897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20898   fi
20899
20900
20901
20902
20903   # Code from module lseek:
20904
20905
20906
20907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
20908 $as_echo_n "checking whether lseek detects pipes... " >&6; }
20909 if test "${gl_cv_func_lseek_pipe+set}" = set; then :
20910   $as_echo_n "(cached) " >&6
20911 else
20912   if test $cross_compiling = no; then
20913        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20914 /* end confdefs.h.  */
20915
20916 #include <sys/types.h> /* for off_t */
20917 #include <stdio.h> /* for SEEK_CUR */
20918 #include <unistd.h>
20919 int
20920 main ()
20921 {
20922
20923   /* Exit with success only if stdin is seekable.  */
20924   return lseek (0, (off_t)0, SEEK_CUR) < 0;
20925
20926   ;
20927   return 0;
20928 }
20929 _ACEOF
20930 if ac_fn_c_try_link "$LINENO"; then :
20931   if test -s conftest$ac_exeext \
20932              && ./conftest$ac_exeext < conftest.$ac_ext \
20933              && test 1 = "`echo hi \
20934                | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
20935             gl_cv_func_lseek_pipe=yes
20936           else
20937             gl_cv_func_lseek_pipe=no
20938           fi
20939 else
20940   gl_cv_func_lseek_pipe=no
20941 fi
20942 rm -f core conftest.err conftest.$ac_objext \
20943     conftest$ac_exeext conftest.$ac_ext
20944      else
20945        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20946 /* end confdefs.h.  */
20947
20948 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
20949 /* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
20950   Choke me.
20951 #endif
20952 _ACEOF
20953 if ac_fn_c_try_compile "$LINENO"; then :
20954   gl_cv_func_lseek_pipe=yes
20955 else
20956   gl_cv_func_lseek_pipe=no
20957 fi
20958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20959      fi
20960 fi
20961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
20962 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
20963   if test $gl_cv_func_lseek_pipe = no; then
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973   M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
20974
20975
20976   REPLACE_LSEEK=1
20977
20978 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
20979
20980
20981   fi
20982
20983
20984
20985
20986   GNULIB_LSEEK=1
20987
20988
20989
20990 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
20991
20992
20993
20994   # Code from module lstat:
20995
20996
20997
20998   if test $ac_cv_func_lstat = yes; then
20999
21000     if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
21001             REPLACE_LSTAT=1
21002     fi
21003     # Prerequisites of lib/lstat.c.
21004
21005   else
21006     HAVE_LSTAT=0
21007   fi
21008
21009
21010
21011
21012   GNULIB_LSTAT=1
21013
21014
21015
21016 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21017
21018
21019
21020   # Code from module maintainer-makefile:
21021
21022   # Code from module malloc-gnu:
21023
21024
21025     for ac_header in stdlib.h
21026 do :
21027   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
21028 if test "x$ac_cv_header_stdlib_h" = x""yes; then :
21029   cat >>confdefs.h <<_ACEOF
21030 #define HAVE_STDLIB_H 1
21031 _ACEOF
21032
21033 fi
21034
21035 done
21036
21037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
21038 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
21039 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
21040   $as_echo_n "(cached) " >&6
21041 else
21042   if test "$cross_compiling" = yes; then :
21043   ac_cv_func_malloc_0_nonnull=no
21044 else
21045   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21046 /* end confdefs.h.  */
21047 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
21048 # include <stdlib.h>
21049 #else
21050 char *malloc ();
21051 #endif
21052
21053 int
21054 main ()
21055 {
21056 return ! malloc (0);
21057   ;
21058   return 0;
21059 }
21060 _ACEOF
21061 if ac_fn_c_try_run "$LINENO"; then :
21062   ac_cv_func_malloc_0_nonnull=yes
21063 else
21064   ac_cv_func_malloc_0_nonnull=no
21065 fi
21066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21067   conftest.$ac_objext conftest.beam conftest.$ac_ext
21068 fi
21069
21070 fi
21071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
21072 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
21073 if test $ac_cv_func_malloc_0_nonnull = yes; then :
21074
21075 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
21076
21077 else
21078   $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089   M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
21090
21091   REPLACE_MALLOC=1
21092
21093
21094 fi
21095
21096
21097
21098
21099 cat >>confdefs.h <<_ACEOF
21100 #define GNULIB_MALLOC_GNU 1
21101 _ACEOF
21102
21103
21104   # Code from module malloc-posix:
21105
21106
21107
21108   if test $gl_cv_func_malloc_posix = yes; then
21109
21110 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21111
21112   else
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122   M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
21123
21124   REPLACE_MALLOC=1
21125
21126   fi
21127
21128
21129
21130
21131   GNULIB_MALLOC_POSIX=1
21132
21133
21134
21135 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21136
21137
21138
21139   # Code from module malloca:
21140
21141
21142
21143
21144   # Code from module manywarnings:
21145   # Code from module math:
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157      if test $gl_cv_have_include_next = yes; then
21158        gl_cv_next_math_h='<'math.h'>'
21159      else
21160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21161 $as_echo_n "checking absolute name of <math.h>... " >&6; }
21162 if test "${gl_cv_next_math_h+set}" = set; then :
21163   $as_echo_n "(cached) " >&6
21164 else
21165
21166              if test $ac_cv_header_math_h = yes; then
21167
21168
21169                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21170 /* end confdefs.h.  */
21171 #include <math.h>
21172
21173 _ACEOF
21174                                                                                                                         case "$host_os" in
21175                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
21176                  *)    gl_absname_cpp="$ac_cpp" ;;
21177                esac
21178                                                             gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21179                   sed -n '\#/math.h#{
21180                     s#.*"\(.*/math.h\)".*#\1#
21181                     s#^/[^/]#//&#
21182                     p
21183                     q
21184                   }'`'"'
21185           else
21186                gl_cv_next_math_h='<'math.h'>'
21187              fi
21188
21189
21190 fi
21191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21192 $as_echo "$gl_cv_next_math_h" >&6; }
21193      fi
21194      NEXT_MATH_H=$gl_cv_next_math_h
21195
21196      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21197        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21198        gl_next_as_first_directive='<'math.h'>'
21199      else
21200        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21201        gl_next_as_first_directive=$gl_cv_next_math_h
21202      fi
21203      NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
21204
21205
21206
21207
21208
21209
21210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21211 $as_echo_n "checking whether NAN macro works... " >&6; }
21212 if test "${gl_cv_header_math_nan_works+set}" = set; then :
21213   $as_echo_n "(cached) " >&6
21214 else
21215   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21216 /* end confdefs.h.  */
21217 #include <math.h>
21218 int
21219 main ()
21220 {
21221 /* Solaris 10 has a broken definition of NAN.  Other platforms
21222         fail to provide NAN, or provide it only in C99 mode; this
21223         test only needs to fail when NAN is provided but wrong.  */
21224          float f = 1.0f;
21225 #ifdef NAN
21226          f = NAN;
21227 #endif
21228          return f == 0;
21229   ;
21230   return 0;
21231 }
21232 _ACEOF
21233 if ac_fn_c_try_compile "$LINENO"; then :
21234   gl_cv_header_math_nan_works=yes
21235 else
21236   gl_cv_header_math_nan_works=no
21237 fi
21238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21239 fi
21240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21241 $as_echo "$gl_cv_header_math_nan_works" >&6; }
21242   if test $gl_cv_header_math_nan_works = no; then
21243     REPLACE_NAN=1
21244   fi
21245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21246 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
21247 if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
21248   $as_echo_n "(cached) " >&6
21249 else
21250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21251 /* end confdefs.h.  */
21252 #include <math.h>
21253 int
21254 main ()
21255 {
21256 /* Solaris 10 has a broken definition of HUGE_VAL.  */
21257          double d = HUGE_VAL;
21258          return d == 0;
21259   ;
21260   return 0;
21261 }
21262 _ACEOF
21263 if ac_fn_c_try_compile "$LINENO"; then :
21264   gl_cv_header_math_huge_val_works=yes
21265 else
21266   gl_cv_header_math_huge_val_works=no
21267 fi
21268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21269 fi
21270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21271 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21272   if test $gl_cv_header_math_huge_val_works = no; then
21273     REPLACE_HUGE_VAL=1
21274   fi
21275
21276
21277
21278   # Code from module mbrtowc:
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21290
21291
21292
21293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21294 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21295 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
21296   $as_echo_n "(cached) " >&6
21297 else
21298
21299                   case "$host_os" in
21300                      # Guess no on AIX and OSF/1.
21301         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21302                      # Guess yes otherwise.
21303         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21304       esac
21305       if test $LOCALE_JA != none; then
21306         if test "$cross_compiling" = yes; then :
21307   :
21308 else
21309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21310 /* end confdefs.h.  */
21311
21312 #include <locale.h>
21313 #include <string.h>
21314 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21315    <wchar.h>.
21316    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21317    included before <wchar.h>.  */
21318 #include <stddef.h>
21319 #include <stdio.h>
21320 #include <time.h>
21321 #include <wchar.h>
21322 int main ()
21323 {
21324   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21325     {
21326       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21327       mbstate_t state;
21328       wchar_t wc;
21329
21330       memset (&state, '\0', sizeof (mbstate_t));
21331       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21332         if (mbsinit (&state))
21333           return 1;
21334     }
21335   return 0;
21336 }
21337 _ACEOF
21338 if ac_fn_c_try_run "$LINENO"; then :
21339   gl_cv_func_mbrtowc_incomplete_state=yes
21340 else
21341   gl_cv_func_mbrtowc_incomplete_state=no
21342 fi
21343 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21344   conftest.$ac_objext conftest.beam conftest.$ac_ext
21345 fi
21346
21347       fi
21348
21349 fi
21350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21351 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21352
21353
21354
21355
21356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21357 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21358 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
21359   $as_echo_n "(cached) " >&6
21360 else
21361
21362                   case "$host_os" in
21363                     # Guess no on Solaris 8.
21364         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21365                     # Guess yes otherwise.
21366         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21367       esac
21368       if test $LOCALE_ZH_CN != none; then
21369         if test "$cross_compiling" = yes; then :
21370   :
21371 else
21372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21373 /* end confdefs.h.  */
21374
21375 #include <locale.h>
21376 #include <stdlib.h>
21377 #include <string.h>
21378 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21379    <wchar.h>.
21380    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21381    included before <wchar.h>.  */
21382 #include <stddef.h>
21383 #include <stdio.h>
21384 #include <time.h>
21385 #include <wchar.h>
21386 int main ()
21387 {
21388   /* This fails on Solaris 8:
21389      mbrtowc returns 2, and sets wc to 0x00F0.
21390      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
21391   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21392     {
21393       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21394       mbstate_t state;
21395       wchar_t wc;
21396
21397       memset (&state, '\0', sizeof (mbstate_t));
21398       if (mbrtowc (&wc, input + 3, 6, &state) != 4
21399           && mbtowc (&wc, input + 3, 6) == 4)
21400         return 1;
21401     }
21402   return 0;
21403 }
21404 _ACEOF
21405 if ac_fn_c_try_run "$LINENO"; then :
21406   gl_cv_func_mbrtowc_sanitycheck=yes
21407 else
21408   gl_cv_func_mbrtowc_sanitycheck=no
21409 fi
21410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21411   conftest.$ac_objext conftest.beam conftest.$ac_ext
21412 fi
21413
21414       fi
21415
21416 fi
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21418 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21419
21420     REPLACE_MBSTATE_T=0
21421     case "$gl_cv_func_mbrtowc_incomplete_state" in
21422       *yes) ;;
21423       *) REPLACE_MBSTATE_T=1 ;;
21424     esac
21425     case "$gl_cv_func_mbrtowc_sanitycheck" in
21426       *yes) ;;
21427       *) REPLACE_MBSTATE_T=1 ;;
21428     esac
21429   else
21430     REPLACE_MBSTATE_T=1
21431   fi
21432   if test $REPLACE_MBSTATE_T = 1; then
21433
21434     :
21435
21436   fi
21437
21438
21439
21440   if test $ac_cv_func_mbrtowc = no; then
21441     HAVE_MBRTOWC=0
21442   else
21443     if test $REPLACE_MBSTATE_T = 1; then
21444       REPLACE_MBRTOWC=1
21445     else
21446
21447
21448
21449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21450 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
21451 if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
21452   $as_echo_n "(cached) " >&6
21453 else
21454
21455                   case "$host_os" in
21456                   # Guess no on Solaris.
21457         solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
21458                   # Guess yes otherwise.
21459         *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
21460       esac
21461       if test $LOCALE_FR_UTF8 != none; then
21462         if test "$cross_compiling" = yes; then :
21463   :
21464 else
21465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21466 /* end confdefs.h.  */
21467
21468 #include <locale.h>
21469 #include <stdlib.h>
21470 #include <string.h>
21471 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21472    <wchar.h>.
21473    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21474    included before <wchar.h>.  */
21475 #include <stddef.h>
21476 #include <stdio.h>
21477 #include <time.h>
21478 #include <wchar.h>
21479 int main ()
21480 {
21481   int result = 0;
21482
21483   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21484     {
21485       char input[] = "\303\237er";
21486       mbstate_t state;
21487       wchar_t wc;
21488       size_t ret;
21489
21490       memset (&state, '\0', sizeof (mbstate_t));
21491       wc = (wchar_t) 0xBADFACE;
21492       ret = mbrtowc (&wc, input, 5, &state);
21493       if (ret != 2)
21494         result |= 1;
21495       if (!mbsinit (&state))
21496         result |= 2;
21497
21498       memset (&state, '\0', sizeof (mbstate_t));
21499       ret = mbrtowc (NULL, input, 5, &state);
21500       if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
21501         result |= 4;
21502       if (!mbsinit (&state))
21503         result |= 8;
21504     }
21505   return result;
21506 }
21507 _ACEOF
21508 if ac_fn_c_try_run "$LINENO"; then :
21509   gl_cv_func_mbrtowc_null_arg1=yes
21510 else
21511   gl_cv_func_mbrtowc_null_arg1=no
21512 fi
21513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21514   conftest.$ac_objext conftest.beam conftest.$ac_ext
21515 fi
21516
21517       fi
21518
21519 fi
21520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
21521 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
21522
21523
21524
21525
21526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
21527 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
21528 if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
21529   $as_echo_n "(cached) " >&6
21530 else
21531
21532                   case "$host_os" in
21533               # Guess no on OSF/1.
21534         osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
21535               # Guess yes otherwise.
21536         *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
21537       esac
21538       if test $LOCALE_FR_UTF8 != none; then
21539         if test "$cross_compiling" = yes; then :
21540   :
21541 else
21542   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21543 /* end confdefs.h.  */
21544
21545 #include <locale.h>
21546 #include <string.h>
21547 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21548    <wchar.h>.
21549    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21550    included before <wchar.h>.  */
21551 #include <stddef.h>
21552 #include <stdio.h>
21553 #include <time.h>
21554 #include <wchar.h>
21555 int main ()
21556 {
21557   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21558     {
21559       mbstate_t state;
21560       wchar_t wc;
21561       int ret;
21562
21563       memset (&state, '\0', sizeof (mbstate_t));
21564       wc = (wchar_t) 0xBADFACE;
21565       mbrtowc (&wc, NULL, 5, &state);
21566       /* Check that wc was not modified.  */
21567       if (wc != (wchar_t) 0xBADFACE)
21568         return 1;
21569     }
21570   return 0;
21571 }
21572 _ACEOF
21573 if ac_fn_c_try_run "$LINENO"; then :
21574   gl_cv_func_mbrtowc_null_arg2=yes
21575 else
21576   gl_cv_func_mbrtowc_null_arg2=no
21577 fi
21578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21579   conftest.$ac_objext conftest.beam conftest.$ac_ext
21580 fi
21581
21582       fi
21583
21584 fi
21585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
21586 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
21587
21588
21589
21590
21591
21592
21593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
21594 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
21595 if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
21596   $as_echo_n "(cached) " >&6
21597 else
21598
21599                   case "$host_os" in
21600                                    # Guess no on HP-UX, Solaris, native Windows.
21601         hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
21602                                    # Guess yes otherwise.
21603         *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
21604       esac
21605       if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
21606          || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
21607         if test "$cross_compiling" = yes; then :
21608   :
21609 else
21610   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21611 /* end confdefs.h.  */
21612
21613 #include <locale.h>
21614 #include <string.h>
21615 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21616    <wchar.h>.
21617    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21618    included before <wchar.h>.  */
21619 #include <stddef.h>
21620 #include <stdio.h>
21621 #include <time.h>
21622 #include <wchar.h>
21623 int main ()
21624 {
21625   int result = 0;
21626   int found_some_locale = 0;
21627   /* This fails on Solaris.  */
21628   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21629     {
21630       char input[] = "B\303\274\303\237er"; /* "Büßer" */
21631       mbstate_t state;
21632       wchar_t wc;
21633
21634       memset (&state, '\0', sizeof (mbstate_t));
21635       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21636         {
21637           input[1] = '\0';
21638           if (mbrtowc (&wc, input + 2, 5, &state) != 1)
21639             result |= 1;
21640         }
21641       found_some_locale = 1;
21642     }
21643   /* This fails on HP-UX 11.11.  */
21644   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21645     {
21646       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21647       mbstate_t state;
21648       wchar_t wc;
21649
21650       memset (&state, '\0', sizeof (mbstate_t));
21651       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21652         {
21653           input[1] = '\0';
21654           if (mbrtowc (&wc, input + 2, 5, &state) != 2)
21655             result |= 2;
21656         }
21657       found_some_locale = 1;
21658     }
21659   /* This fails on native Windows.  */
21660   if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
21661     {
21662       char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
21663       mbstate_t state;
21664       wchar_t wc;
21665
21666       memset (&state, '\0', sizeof (mbstate_t));
21667       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21668         {
21669           input[3] = '\0';
21670           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21671             result |= 4;
21672         }
21673       found_some_locale = 1;
21674     }
21675   if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
21676     {
21677       char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
21678       mbstate_t state;
21679       wchar_t wc;
21680
21681       memset (&state, '\0', sizeof (mbstate_t));
21682       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21683         {
21684           input[3] = '\0';
21685           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21686             result |= 8;
21687         }
21688       found_some_locale = 1;
21689     }
21690   if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
21691     {
21692       char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
21693       mbstate_t state;
21694       wchar_t wc;
21695
21696       memset (&state, '\0', sizeof (mbstate_t));
21697       if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21698         {
21699           input[3] = '\0';
21700           if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21701             result |= 16;
21702         }
21703       found_some_locale = 1;
21704     }
21705   return (found_some_locale ? result : 77);
21706 }
21707 _ACEOF
21708 if ac_fn_c_try_run "$LINENO"; then :
21709   gl_cv_func_mbrtowc_retval=yes
21710 else
21711   if test $? != 77; then
21712              gl_cv_func_mbrtowc_retval=no
21713            fi
21714
21715 fi
21716 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21717   conftest.$ac_objext conftest.beam conftest.$ac_ext
21718 fi
21719
21720       fi
21721
21722 fi
21723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
21724 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
21725
21726
21727
21728
21729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
21730 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
21731 if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
21732   $as_echo_n "(cached) " >&6
21733 else
21734
21735                   case "$host_os" in
21736                        # Guess no on Solaris 8 and 9.
21737         solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
21738                        # Guess yes otherwise.
21739         *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
21740       esac
21741       if test $LOCALE_ZH_CN != none; then
21742         if test "$cross_compiling" = yes; then :
21743   :
21744 else
21745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21746 /* end confdefs.h.  */
21747
21748 #include <locale.h>
21749 #include <string.h>
21750 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21751    <wchar.h>.
21752    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21753    included before <wchar.h>.  */
21754 #include <stddef.h>
21755 #include <stdio.h>
21756 #include <time.h>
21757 #include <wchar.h>
21758 int main ()
21759 {
21760   /* This fails on Solaris 8 and 9.  */
21761   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21762     {
21763       mbstate_t state;
21764       wchar_t wc;
21765
21766       memset (&state, '\0', sizeof (mbstate_t));
21767       if (mbrtowc (&wc, "", 1, &state) != 0)
21768         return 1;
21769     }
21770   return 0;
21771 }
21772 _ACEOF
21773 if ac_fn_c_try_run "$LINENO"; then :
21774   gl_cv_func_mbrtowc_nul_retval=yes
21775 else
21776   gl_cv_func_mbrtowc_nul_retval=no
21777 fi
21778 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21779   conftest.$ac_objext conftest.beam conftest.$ac_ext
21780 fi
21781
21782       fi
21783
21784 fi
21785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
21786 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
21787
21788       case "$gl_cv_func_mbrtowc_null_arg1" in
21789         *yes) ;;
21790         *)
21791 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
21792
21793            REPLACE_MBRTOWC=1
21794            ;;
21795       esac
21796       case "$gl_cv_func_mbrtowc_null_arg2" in
21797         *yes) ;;
21798         *)
21799 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
21800
21801            REPLACE_MBRTOWC=1
21802            ;;
21803       esac
21804       case "$gl_cv_func_mbrtowc_retval" in
21805         *yes) ;;
21806         *)
21807 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
21808
21809            REPLACE_MBRTOWC=1
21810            ;;
21811       esac
21812       case "$gl_cv_func_mbrtowc_nul_retval" in
21813         *yes) ;;
21814         *)
21815 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
21816
21817            REPLACE_MBRTOWC=1
21818            ;;
21819       esac
21820     fi
21821   fi
21822   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
21823
21824     :
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834   M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
21835
21836
21837   :
21838
21839   fi
21840
21841
21842
21843
21844   GNULIB_MBRTOWC=1
21845
21846
21847
21848 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
21849
21850
21851
21852   # Code from module mbsinit:
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21865
21866
21867
21868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21869 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21870 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
21871   $as_echo_n "(cached) " >&6
21872 else
21873
21874                   case "$host_os" in
21875                      # Guess no on AIX and OSF/1.
21876         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21877                      # Guess yes otherwise.
21878         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21879       esac
21880       if test $LOCALE_JA != none; then
21881         if test "$cross_compiling" = yes; then :
21882   :
21883 else
21884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21885 /* end confdefs.h.  */
21886
21887 #include <locale.h>
21888 #include <string.h>
21889 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21890    <wchar.h>.
21891    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21892    included before <wchar.h>.  */
21893 #include <stddef.h>
21894 #include <stdio.h>
21895 #include <time.h>
21896 #include <wchar.h>
21897 int main ()
21898 {
21899   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21900     {
21901       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21902       mbstate_t state;
21903       wchar_t wc;
21904
21905       memset (&state, '\0', sizeof (mbstate_t));
21906       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21907         if (mbsinit (&state))
21908           return 1;
21909     }
21910   return 0;
21911 }
21912 _ACEOF
21913 if ac_fn_c_try_run "$LINENO"; then :
21914   gl_cv_func_mbrtowc_incomplete_state=yes
21915 else
21916   gl_cv_func_mbrtowc_incomplete_state=no
21917 fi
21918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21919   conftest.$ac_objext conftest.beam conftest.$ac_ext
21920 fi
21921
21922       fi
21923
21924 fi
21925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21926 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21927
21928
21929
21930
21931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21932 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21933 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
21934   $as_echo_n "(cached) " >&6
21935 else
21936
21937                   case "$host_os" in
21938                     # Guess no on Solaris 8.
21939         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21940                     # Guess yes otherwise.
21941         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21942       esac
21943       if test $LOCALE_ZH_CN != none; then
21944         if test "$cross_compiling" = yes; then :
21945   :
21946 else
21947   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21948 /* end confdefs.h.  */
21949
21950 #include <locale.h>
21951 #include <stdlib.h>
21952 #include <string.h>
21953 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21954    <wchar.h>.
21955    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21956    included before <wchar.h>.  */
21957 #include <stddef.h>
21958 #include <stdio.h>
21959 #include <time.h>
21960 #include <wchar.h>
21961 int main ()
21962 {
21963   /* This fails on Solaris 8:
21964      mbrtowc returns 2, and sets wc to 0x00F0.
21965      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
21966   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21967     {
21968       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21969       mbstate_t state;
21970       wchar_t wc;
21971
21972       memset (&state, '\0', sizeof (mbstate_t));
21973       if (mbrtowc (&wc, input + 3, 6, &state) != 4
21974           && mbtowc (&wc, input + 3, 6) == 4)
21975         return 1;
21976     }
21977   return 0;
21978 }
21979 _ACEOF
21980 if ac_fn_c_try_run "$LINENO"; then :
21981   gl_cv_func_mbrtowc_sanitycheck=yes
21982 else
21983   gl_cv_func_mbrtowc_sanitycheck=no
21984 fi
21985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21986   conftest.$ac_objext conftest.beam conftest.$ac_ext
21987 fi
21988
21989       fi
21990
21991 fi
21992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21993 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21994
21995     REPLACE_MBSTATE_T=0
21996     case "$gl_cv_func_mbrtowc_incomplete_state" in
21997       *yes) ;;
21998       *) REPLACE_MBSTATE_T=1 ;;
21999     esac
22000     case "$gl_cv_func_mbrtowc_sanitycheck" in
22001       *yes) ;;
22002       *) REPLACE_MBSTATE_T=1 ;;
22003     esac
22004   else
22005     REPLACE_MBSTATE_T=1
22006   fi
22007   if test $REPLACE_MBSTATE_T = 1; then
22008
22009     :
22010
22011   fi
22012
22013
22014
22015   if test $ac_cv_func_mbsinit = no; then
22016     HAVE_MBSINIT=0
22017   else
22018     if test $REPLACE_MBSTATE_T = 1; then
22019       REPLACE_MBSINIT=1
22020     else
22021                         case "$host_os" in
22022         mingw*) REPLACE_MBSINIT=1 ;;
22023       esac
22024     fi
22025   fi
22026   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
22027
22028     :
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038   M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
22039
22040
22041   :
22042
22043   fi
22044
22045
22046
22047
22048   GNULIB_MBSINIT=1
22049
22050
22051
22052 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
22053
22054
22055
22056   # Code from module mbtowc:
22057
22058
22059
22060   if false; then
22061     REPLACE_MBTOWC=1
22062   fi
22063   if test $REPLACE_MBTOWC = 1; then
22064
22065
22066
22067
22068
22069
22070
22071
22072   M4_LIBOBJS="$M4_LIBOBJS mbtowc.$ac_objext"
22073
22074
22075   :
22076
22077   fi
22078
22079
22080
22081
22082   GNULIB_MBTOWC=1
22083
22084
22085
22086 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
22087
22088
22089
22090   # Code from module memchr:
22091
22092
22093
22094
22095   GNULIB_MEMCHR=1
22096
22097
22098
22099 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
22100
22101
22102
22103   # Code from module memchr2:
22104   # Code from module mkdtemp:
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115   for ac_func in mkdtemp
22116 do :
22117   ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
22118 if test "x$ac_cv_func_mkdtemp" = x""yes; then :
22119   cat >>confdefs.h <<_ACEOF
22120 #define HAVE_MKDTEMP 1
22121 _ACEOF
22122
22123 else
22124
22125     M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
22126
22127 fi
22128 done
22129
22130
22131   if test $ac_cv_func_mkdtemp = no; then
22132     HAVE_MKDTEMP=0
22133     :
22134
22135   fi
22136
22137
22138
22139
22140   GNULIB_MKDTEMP=1
22141
22142
22143
22144 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
22145
22146
22147
22148   # Code from module mkstemp:
22149
22150
22151
22152
22153
22154   if test $ac_cv_func_mkstemp = yes; then
22155     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
22156 $as_echo_n "checking for working mkstemp... " >&6; }
22157 if test "${gl_cv_func_working_mkstemp+set}" = set; then :
22158   $as_echo_n "(cached) " >&6
22159 else
22160
22161         mkdir conftest.mkstemp
22162         if test "$cross_compiling" = yes; then :
22163   gl_cv_func_working_mkstemp=no
22164 else
22165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22166 /* end confdefs.h.  */
22167 $ac_includes_default
22168 int
22169 main ()
22170 {
22171 int result = 0;
22172               int i;
22173               off_t large = (off_t) 4294967295u;
22174               if (large < 0)
22175                 large = 2147483647;
22176               for (i = 0; i < 70; i++)
22177                 {
22178                   char templ[] = "conftest.mkstemp/coXXXXXX";
22179                   int (*mkstemp_function) (char *) = mkstemp;
22180                   int fd = mkstemp_function (templ);
22181                   if (fd < 0)
22182                     result |= 1;
22183                   else
22184                     {
22185                       if (lseek (fd, large, SEEK_SET) != large)
22186                         result |= 2;
22187                       close (fd);
22188                     }
22189                 }
22190               return result;
22191   ;
22192   return 0;
22193 }
22194 _ACEOF
22195 if ac_fn_c_try_run "$LINENO"; then :
22196   gl_cv_func_working_mkstemp=yes
22197 else
22198   gl_cv_func_working_mkstemp=no
22199 fi
22200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22201   conftest.$ac_objext conftest.beam conftest.$ac_ext
22202 fi
22203
22204         rm -rf conftest.mkstemp
22205
22206 fi
22207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
22208 $as_echo "$gl_cv_func_working_mkstemp" >&6; }
22209     if test $gl_cv_func_working_mkstemp != yes; then
22210       REPLACE_MKSTEMP=1
22211
22212
22213
22214
22215
22216
22217
22218
22219   M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
22220
22221
22222
22223     fi
22224   else
22225     HAVE_MKSTEMP=0
22226
22227
22228
22229
22230
22231
22232
22233
22234   M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
22235
22236
22237
22238   fi
22239
22240
22241
22242
22243   GNULIB_MKSTEMP=1
22244
22245
22246
22247 $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
22248
22249
22250
22251   # Code from module multiarch:
22252
22253   # Code from module nl_langinfo:
22254
22255
22256
22257
22258      if test $ac_cv_func_nl_langinfo = yes; then
22259     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
22260     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
22261 $as_echo_n "checking whether YESEXPR works... " >&6; }
22262 if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then :
22263   $as_echo_n "(cached) " >&6
22264 else
22265   if test "$cross_compiling" = yes; then :
22266
22267          case "$host_os" in
22268                    # Guess no on irix systems.
22269            irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
22270                    # Guess yes elsewhere.
22271            *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
22272          esac
22273
22274 else
22275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22276 /* end confdefs.h.  */
22277 #include <langinfo.h>
22278
22279 int
22280 main ()
22281 {
22282 return !*nl_langinfo(YESEXPR);
22283
22284   ;
22285   return 0;
22286 }
22287 _ACEOF
22288 if ac_fn_c_try_run "$LINENO"; then :
22289   gl_cv_func_nl_langinfo_yesexpr_works=yes
22290 else
22291   gl_cv_func_nl_langinfo_yesexpr_works=no
22292 fi
22293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22294   conftest.$ac_objext conftest.beam conftest.$ac_ext
22295 fi
22296
22297
22298 fi
22299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
22300 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
22301     case $gl_cv_func_nl_langinfo_yesexpr_works in
22302       *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
22303       *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
22304     esac
22305
22306 cat >>confdefs.h <<_ACEOF
22307 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
22308 _ACEOF
22309
22310     if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
22311         && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
22312       :
22313     else
22314       REPLACE_NL_LANGINFO=1
22315
22316 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326   M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
22327
22328     fi
22329   else
22330     HAVE_NL_LANGINFO=0
22331
22332
22333
22334
22335
22336
22337
22338
22339   M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
22340
22341   fi
22342
22343
22344
22345
22346   GNULIB_NL_LANGINFO=1
22347
22348
22349
22350 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
22351
22352
22353
22354   # Code from module nocrash:
22355   # Code from module obstack:
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
22369 $as_echo_n "checking for obstacks... " >&6; }
22370 if test "${ac_cv_func_obstack+set}" = set; then :
22371   $as_echo_n "(cached) " >&6
22372 else
22373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22374 /* end confdefs.h.  */
22375 $ac_includes_default
22376                       #include "obstack.h"
22377 int
22378 main ()
22379 {
22380 struct obstack mem;
22381                        #define obstack_chunk_alloc malloc
22382                        #define obstack_chunk_free free
22383                        obstack_init (&mem);
22384                        obstack_free (&mem, 0);
22385   ;
22386   return 0;
22387 }
22388 _ACEOF
22389 if ac_fn_c_try_link "$LINENO"; then :
22390   ac_cv_func_obstack=yes
22391 else
22392   ac_cv_func_obstack=no
22393 fi
22394 rm -f core conftest.err conftest.$ac_objext \
22395     conftest$ac_exeext conftest.$ac_ext
22396 fi
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
22398 $as_echo "$ac_cv_func_obstack" >&6; }
22399 if test $ac_cv_func_obstack = yes; then
22400
22401 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
22402
22403 else
22404
22405
22406
22407
22408
22409
22410
22411
22412   M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
22413
22414 fi
22415
22416     # Code from module open:
22417
22418
22419   case "$host_os" in
22420     mingw* | pw*)
22421
22422
22423   REPLACE_OPEN=1
22424
22425
22426
22427
22428
22429
22430
22431
22432   M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
22433
22434
22435
22436
22437   :
22438
22439
22440       ;;
22441     *)
22442
22443       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22444 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
22445 if test "${gl_cv_func_open_slash+set}" = set; then :
22446   $as_echo_n "(cached) " >&6
22447 else
22448   # Assume that if we have lstat, we can also check symlinks.
22449           if test $ac_cv_func_lstat = yes; then
22450             touch conftest.tmp
22451             ln -s conftest.tmp conftest.lnk
22452           fi
22453           if test "$cross_compiling" = yes; then :
22454
22455              case "$host_os" in
22456                freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22457                  gl_cv_func_open_slash="guessing no" ;;
22458                *)
22459                  gl_cv_func_open_slash="guessing yes" ;;
22460              esac
22461
22462 else
22463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22464 /* end confdefs.h.  */
22465
22466 #include <fcntl.h>
22467 #if HAVE_UNISTD_H
22468 # include <unistd.h>
22469 #endif
22470 int main ()
22471 {
22472   int result = 0;
22473 #if HAVE_LSTAT
22474   if (open ("conftest.lnk/", O_RDONLY) != -1)
22475     result |= 1;
22476 #endif
22477   if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22478     result |= 2;
22479   return result;
22480 }
22481 _ACEOF
22482 if ac_fn_c_try_run "$LINENO"; then :
22483   gl_cv_func_open_slash=yes
22484 else
22485   gl_cv_func_open_slash=no
22486 fi
22487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22488   conftest.$ac_objext conftest.beam conftest.$ac_ext
22489 fi
22490
22491           rm -f conftest.sl conftest.tmp conftest.lnk
22492
22493 fi
22494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22495 $as_echo "$gl_cv_func_open_slash" >&6; }
22496       case "$gl_cv_func_open_slash" in
22497         *no)
22498
22499 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22500
22501
22502
22503   REPLACE_OPEN=1
22504
22505
22506
22507
22508
22509
22510
22511
22512   M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
22513
22514
22515
22516
22517   :
22518
22519
22520           ;;
22521       esac
22522       ;;
22523   esac
22524
22525
22526
22527
22528   GNULIB_OPEN=1
22529
22530
22531
22532 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
22533
22534
22535
22536   # Code from module oset:
22537
22538
22539
22540   # Code from module pathmax:
22541
22542
22543
22544
22545   # Code from module pipe2:
22546
22547
22548
22549
22550
22551
22552   if test $ac_cv_func_pipe2 != yes; then
22553     HAVE_PIPE2=0
22554   fi
22555
22556
22557
22558
22559   GNULIB_PIPE2=1
22560
22561
22562
22563 $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
22564
22565
22566
22567   # Code from module pipe2-safer:
22568
22569
22570 cat >>confdefs.h <<_ACEOF
22571 #define GNULIB_PIPE2_SAFER 1
22572 _ACEOF
22573
22574
22575   # Code from module posix_spawn-internal:
22576   # Code from module posix_spawn_file_actions_addclose:
22577
22578
22579
22580   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22581
22582     :
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
22593
22594   fi
22595
22596
22597
22598   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
22599
22600
22601
22602 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
22603
22604
22605
22606   # Code from module posix_spawn_file_actions_adddup2:
22607
22608
22609
22610   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22611
22612     :
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
22623
22624   fi
22625
22626
22627
22628   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
22629
22630
22631
22632 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
22633
22634
22635
22636   # Code from module posix_spawn_file_actions_addopen:
22637
22638
22639
22640   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22641
22642     :
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
22653
22654   fi
22655
22656
22657
22658   GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
22659
22660
22661
22662 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
22663
22664
22665
22666   # Code from module posix_spawn_file_actions_destroy:
22667
22668
22669
22670   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22671
22672     :
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
22683
22684   fi
22685
22686
22687
22688   GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
22689
22690
22691
22692 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
22693
22694
22695
22696   # Code from module posix_spawn_file_actions_init:
22697
22698
22699
22700   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22701
22702     :
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712   M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
22713
22714   fi
22715
22716
22717
22718   GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
22719
22720
22721
22722 $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
22723
22724
22725
22726   # Code from module posix_spawnattr_destroy:
22727
22728
22729
22730   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22731
22732     :
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742   M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
22743
22744   fi
22745
22746
22747
22748   GNULIB_POSIX_SPAWNATTR_DESTROY=1
22749
22750
22751
22752 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
22753
22754
22755
22756   # Code from module posix_spawnattr_init:
22757
22758
22759
22760   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22761
22762     :
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772   M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
22773
22774   fi
22775
22776
22777
22778   GNULIB_POSIX_SPAWNATTR_INIT=1
22779
22780
22781
22782 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
22783
22784
22785
22786   # Code from module posix_spawnattr_setflags:
22787
22788
22789
22790   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22791
22792     :
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
22803
22804   fi
22805
22806
22807
22808   GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
22809
22810
22811
22812 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
22813
22814
22815
22816   # Code from module posix_spawnattr_setsigmask:
22817
22818
22819
22820   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22821
22822     :
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832   M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
22833
22834   fi
22835
22836
22837
22838   GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
22839
22840
22841
22842 $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
22843
22844
22845
22846   # Code from module posix_spawnp:
22847
22848
22849
22850   if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
22851
22852     :
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862   M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873   M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
22874
22875     for ac_header in paths.h
22876 do :
22877   ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
22878 if test "x$ac_cv_header_paths_h" = x""yes; then :
22879   cat >>confdefs.h <<_ACEOF
22880 #define HAVE_PATHS_H 1
22881 _ACEOF
22882
22883 fi
22884
22885 done
22886
22887   for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
22888 do :
22889   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22890 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22891 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22892   cat >>confdefs.h <<_ACEOF
22893 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22894 _ACEOF
22895
22896 fi
22897 done
22898
22899
22900   fi
22901
22902
22903
22904   GNULIB_POSIX_SPAWNP=1
22905
22906
22907
22908 $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
22909
22910
22911
22912   # Code from module printf-frexp:
22913
22914
22915   if test $gl_cv_func_frexp_no_libm = yes; then
22916
22917
22918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
22919 $as_echo_n "checking whether frexp works... " >&6; }
22920 if test "${gl_cv_func_frexp_works+set}" = set; then :
22921   $as_echo_n "(cached) " >&6
22922 else
22923
22924       if test "$cross_compiling" = yes; then :
22925   case "$host_os" in
22926            netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
22927            *)                        gl_cv_func_frexp_works="guessing yes";;
22928          esac
22929
22930 else
22931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22932 /* end confdefs.h.  */
22933
22934 #include <float.h>
22935 #include <math.h>
22936 #include <string.h>
22937 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
22938    ICC 10.0 has a bug when optimizing the expression -zero.
22939    The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
22940    to PowerPC on MacOS X 10.5.  */
22941 #if defined __hpux || defined __sgi || defined __ICC
22942 static double
22943 compute_minus_zero (void)
22944 {
22945   return -DBL_MIN * DBL_MIN;
22946 }
22947 # define minus_zero compute_minus_zero ()
22948 #else
22949 double minus_zero = -0.0;
22950 #endif
22951 int main()
22952 {
22953   int result = 0;
22954   int i;
22955   volatile double x;
22956   double zero = 0.0;
22957   /* Test on denormalized numbers.  */
22958   for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
22959     ;
22960   if (x > 0.0)
22961     {
22962       int exp;
22963       double y = frexp (x, &exp);
22964       /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
22965          On NetBSD: y = 0.75. Correct: y = 0.5.  */
22966       if (y != 0.5)
22967         result |= 1;
22968     }
22969   /* Test on infinite numbers.  */
22970   x = 1.0 / 0.0;
22971   {
22972     int exp;
22973     double y = frexp (x, &exp);
22974     if (y != x)
22975       result |= 2;
22976   }
22977   /* Test on negative zero.  */
22978   x = minus_zero;
22979   {
22980     int exp;
22981     double y = frexp (x, &exp);
22982     if (memcmp (&y, &x, sizeof x))
22983       result |= 4;
22984   }
22985   return result;
22986 }
22987 _ACEOF
22988 if ac_fn_c_try_run "$LINENO"; then :
22989   gl_cv_func_frexp_works=yes
22990 else
22991   gl_cv_func_frexp_works=no
22992 fi
22993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22994   conftest.$ac_objext conftest.beam conftest.$ac_ext
22995 fi
22996
22997
22998 fi
22999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
23000 $as_echo "$gl_cv_func_frexp_works" >&6; }
23001
23002     case "$gl_cv_func_frexp_works" in
23003       *yes)
23004
23005 $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
23006
23007         ;;
23008     esac
23009   fi
23010
23011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
23012 $as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
23013 if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
23014   $as_echo_n "(cached) " >&6
23015 else
23016
23017       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23018 /* end confdefs.h.  */
23019 #include <math.h>
23020              double x;
23021              int y;
23022 int
23023 main ()
23024 {
23025 return ldexp (x, y) < 1;
23026   ;
23027   return 0;
23028 }
23029 _ACEOF
23030 if ac_fn_c_try_link "$LINENO"; then :
23031   gl_cv_func_ldexp_no_libm=yes
23032 else
23033   gl_cv_func_ldexp_no_libm=no
23034 fi
23035 rm -f core conftest.err conftest.$ac_objext \
23036     conftest$ac_exeext conftest.$ac_ext
23037
23038 fi
23039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
23040 $as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
23041   if test $gl_cv_func_ldexp_no_libm = yes; then
23042
23043 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
23044
23045   fi
23046
23047   # Code from module printf-frexpl:
23048
23049
23050
23051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
23052 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
23053 if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
23054   $as_echo_n "(cached) " >&6
23055 else
23056
23057       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23058 /* end confdefs.h.  */
23059 #include <math.h>
23060              long double x;
23061 int
23062 main ()
23063 {
23064 int e; return frexpl (x, &e) > 0;
23065   ;
23066   return 0;
23067 }
23068 _ACEOF
23069 if ac_fn_c_try_link "$LINENO"; then :
23070   gl_cv_func_frexpl_no_libm=yes
23071 else
23072   gl_cv_func_frexpl_no_libm=no
23073 fi
23074 rm -f core conftest.err conftest.$ac_objext \
23075     conftest$ac_exeext conftest.$ac_ext
23076
23077 fi
23078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
23079 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
23080
23081   if test $gl_cv_func_frexpl_no_libm = yes; then
23082
23083
23084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
23085 $as_echo_n "checking whether frexpl works... " >&6; }
23086 if test "${gl_cv_func_frexpl_works+set}" = set; then :
23087   $as_echo_n "(cached) " >&6
23088 else
23089
23090       if test "$cross_compiling" = yes; then :
23091
23092          case "$host_os" in
23093            aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
23094               gl_cv_func_frexpl_works="guessing no";;
23095            *) gl_cv_func_frexpl_works="guessing yes";;
23096          esac
23097
23098 else
23099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100 /* end confdefs.h.  */
23101
23102 #include <float.h>
23103 #include <math.h>
23104 /* Override the values of <float.h>, like done in float.in.h.  */
23105 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
23106 # undef LDBL_MIN_EXP
23107 # define LDBL_MIN_EXP    (-16381)
23108 #endif
23109 extern long double frexpl (long double, int *);
23110 int main()
23111 {
23112   int result = 0;
23113   volatile long double x;
23114   /* Test on finite numbers that fails on AIX 5.1.  */
23115   x = 16.0L;
23116   {
23117     int exp = -9999;
23118     frexpl (x, &exp);
23119     if (exp != 5)
23120       result |= 1;
23121   }
23122   /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
23123      function returns an invalid (incorrectly normalized) value: it returns
23124                y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
23125      but the correct result is
23126           0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
23127   x = 1.01L;
23128   {
23129     int exp = -9999;
23130     long double y = frexpl (x, &exp);
23131     if (!(exp == 1 && y == 0.505L))
23132       result |= 2;
23133   }
23134   /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
23135      LDBL_MAX_EXP = 16384.
23136      In the loop end test, we test x against Infinity, rather than comparing
23137      i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
23138   {
23139     int i;
23140     for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
23141       {
23142         int exp = -9999;
23143         frexpl (x, &exp);
23144         if (exp != i)
23145           {
23146             result |= 4;
23147             break;
23148           }
23149       }
23150   }
23151   /* Test on denormalized numbers.  */
23152   {
23153     int i;
23154     for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
23155       ;
23156     if (x > 0.0L)
23157       {
23158         int exp;
23159         long double y = frexpl (x, &exp);
23160         /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
23161            exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
23162         if (exp != LDBL_MIN_EXP - 1)
23163           result |= 8;
23164       }
23165   }
23166   /* Test on infinite numbers.  */
23167   x = 1.0L / 0.0L;
23168   {
23169     int exp;
23170     long double y = frexpl (x, &exp);
23171     if (y != x)
23172       result |= 16;
23173   }
23174   return result;
23175 }
23176 _ACEOF
23177 if ac_fn_c_try_run "$LINENO"; then :
23178   gl_cv_func_frexpl_works=yes
23179 else
23180   gl_cv_func_frexpl_works=no
23181 fi
23182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23183   conftest.$ac_objext conftest.beam conftest.$ac_ext
23184 fi
23185
23186
23187 fi
23188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
23189 $as_echo "$gl_cv_func_frexpl_works" >&6; }
23190
23191     case "$gl_cv_func_frexpl_works" in
23192       *yes) gl_func_frexpl_no_libm=yes ;;
23193       *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
23194     esac
23195   else
23196     gl_func_frexpl_no_libm=no
23197         REPLACE_FREXPL=1
23198   fi
23199   if test $gl_func_frexpl_no_libm = yes; then
23200
23201 $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
23202
23203             ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
23204 "
23205 if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
23206
23207 else
23208   HAVE_DECL_FREXPL=0
23209 fi
23210
23211   fi
23212
23213
23214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
23215 $as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
23216 if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
23217   $as_echo_n "(cached) " >&6
23218 else
23219
23220       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23221 /* end confdefs.h.  */
23222 #include <math.h>
23223              long double x;
23224 int
23225 main ()
23226 {
23227 return ldexpl (x, -1) > 0;
23228   ;
23229   return 0;
23230 }
23231 _ACEOF
23232 if ac_fn_c_try_link "$LINENO"; then :
23233   gl_cv_func_ldexpl_no_libm=yes
23234 else
23235   gl_cv_func_ldexpl_no_libm=no
23236 fi
23237 rm -f core conftest.err conftest.$ac_objext \
23238     conftest$ac_exeext conftest.$ac_ext
23239
23240 fi
23241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
23242 $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
23243
23244   if test $gl_cv_func_ldexpl_no_libm = yes; then
23245
23246
23247      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
23248 $as_echo_n "checking whether ldexpl works... " >&6; }
23249 if test "${gl_cv_func_ldexpl_works+set}" = set; then :
23250   $as_echo_n "(cached) " >&6
23251 else
23252
23253       if test "$cross_compiling" = yes; then :
23254
23255          case "$host_os" in
23256            aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";;
23257            *)               gl_cv_func_ldexpl_works="guessing yes";;
23258          esac
23259
23260 else
23261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23262 /* end confdefs.h.  */
23263
23264 #include <math.h>
23265 extern long double ldexpl (long double, int);
23266 int main()
23267 {
23268   int result = 0;
23269   {
23270     volatile long double x = 1.0;
23271     volatile long double y = ldexpl (x, -1);
23272     if (y != 0.5L)
23273       result |= 1;
23274   }
23275   {
23276     volatile long double x = 1.73205L;
23277     volatile long double y = ldexpl (x, 0);
23278     if (y != x)
23279       result |= 2;
23280   }
23281   return result;
23282 }
23283 _ACEOF
23284 if ac_fn_c_try_run "$LINENO"; then :
23285   gl_cv_func_ldexpl_works=yes
23286 else
23287   gl_cv_func_ldexpl_works=no
23288 fi
23289 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23290   conftest.$ac_objext conftest.beam conftest.$ac_ext
23291 fi
23292
23293
23294 fi
23295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
23296 $as_echo "$gl_cv_func_ldexpl_works" >&6; }
23297
23298     case "$gl_cv_func_ldexpl_works" in
23299       *yes)
23300
23301 $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
23302
23303                         ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
23304 "
23305 if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
23306
23307 else
23308   HAVE_DECL_LDEXPL=0
23309 fi
23310
23311         ;;
23312     esac
23313   fi
23314
23315   # Code from module printf-safe:
23316
23317   # Code from module progname:
23318   ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23319 "
23320 if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
23321   ac_have_decl=1
23322 else
23323   ac_have_decl=0
23324 fi
23325
23326 cat >>confdefs.h <<_ACEOF
23327 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23328 _ACEOF
23329
23330   ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23331 "
23332 if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
23333   ac_have_decl=1
23334 else
23335   ac_have_decl=0
23336 fi
23337
23338 cat >>confdefs.h <<_ACEOF
23339 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23340 _ACEOF
23341
23342   # Code from module quotearg:
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352   M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext"
23353
23354
23355   # Code from module quotearg-simple:
23356   # Code from module rawmemchr:
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369   for ac_func in rawmemchr
23370 do :
23371   ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
23372 if test "x$ac_cv_func_rawmemchr" = x""yes; then :
23373   cat >>confdefs.h <<_ACEOF
23374 #define HAVE_RAWMEMCHR 1
23375 _ACEOF
23376
23377 else
23378
23379     M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
23380
23381 fi
23382 done
23383
23384
23385   if test $ac_cv_func_rawmemchr = no; then
23386     HAVE_RAWMEMCHR=0
23387     :
23388   fi
23389
23390
23391
23392
23393   GNULIB_RAWMEMCHR=1
23394
23395
23396
23397 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
23398
23399
23400
23401   # Code from module readlink:
23402
23403
23404
23405   if test $ac_cv_func_readlink = no; then
23406     HAVE_READLINK=0
23407
23408
23409
23410
23411
23412
23413
23414
23415   M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
23416
23417
23418   :
23419
23420   else
23421     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
23422 $as_echo_n "checking whether readlink signature is correct... " >&6; }
23423 if test "${gl_cv_decl_readlink_works+set}" = set; then :
23424   $as_echo_n "(cached) " >&6
23425 else
23426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23427 /* end confdefs.h.  */
23428 #include <unistd.h>
23429       /* Cause compilation failure if original declaration has wrong type.  */
23430       ssize_t readlink (const char *, char *, size_t);
23431 int
23432 main ()
23433 {
23434
23435   ;
23436   return 0;
23437 }
23438 _ACEOF
23439 if ac_fn_c_try_compile "$LINENO"; then :
23440   gl_cv_decl_readlink_works=yes
23441 else
23442   gl_cv_decl_readlink_works=no
23443 fi
23444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23445 fi
23446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
23447 $as_echo "$gl_cv_decl_readlink_works" >&6; }
23448             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
23449 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
23450 if test "${gl_cv_func_readlink_works+set}" = set; then :
23451   $as_echo_n "(cached) " >&6
23452 else
23453   # We have readlink, so assume ln -s works.
23454        ln -s conftest.no-such conftest.link
23455        ln -s conftest.link conftest.lnk2
23456        if test "$cross_compiling" = yes; then :
23457   gl_cv_func_readlink_works="guessing no"
23458 else
23459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23460 /* end confdefs.h.  */
23461 #include <unistd.h>
23462
23463 int
23464 main ()
23465 {
23466 char buf[20];
23467       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
23468   ;
23469   return 0;
23470 }
23471 _ACEOF
23472 if ac_fn_c_try_run "$LINENO"; then :
23473   gl_cv_func_readlink_works=yes
23474 else
23475   gl_cv_func_readlink_works=no
23476 fi
23477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23478   conftest.$ac_objext conftest.beam conftest.$ac_ext
23479 fi
23480
23481       rm -f conftest.link conftest.lnk2
23482 fi
23483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
23484 $as_echo "$gl_cv_func_readlink_works" >&6; }
23485     if test "$gl_cv_func_readlink_works" != yes; then
23486
23487 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
23488
23489       REPLACE_READLINK=1
23490
23491
23492
23493
23494
23495
23496
23497
23498   M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
23499
23500     elif test "$gl_cv_decl_readlink_works" != yes; then
23501       REPLACE_READLINK=1
23502
23503
23504
23505
23506
23507
23508
23509
23510   M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
23511
23512     fi
23513   fi
23514
23515
23516
23517
23518   GNULIB_READLINK=1
23519
23520
23521
23522 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
23523
23524
23525
23526   # Code from module regex:
23527
23528
23529 # Check whether --with-included-regex was given.
23530 if test "${with_included_regex+set}" = set; then :
23531   withval=$with_included_regex;
23532 fi
23533
23534
23535   case $with_included_regex in #(
23536   yes|no) ac_use_included_regex=$with_included_regex
23537         ;;
23538   '')
23539     # If the system regex support is good enough that it passes the
23540     # following run test, then default to *not* using the included regex.c.
23541     # If cross compiling, assume the test would fail and use the included
23542     # regex.c.
23543     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
23544 $as_echo_n "checking for working re_compile_pattern... " >&6; }
23545 if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
23546   $as_echo_n "(cached) " >&6
23547 else
23548   if test "$cross_compiling" = yes; then :
23549          gl_cv_func_re_compile_pattern_working=no
23550 else
23551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23552 /* end confdefs.h.  */
23553 $ac_includes_default
23554            #include <locale.h>
23555            #include <limits.h>
23556            #include <regex.h>
23557
23558 int
23559 main ()
23560 {
23561 int result = 0;
23562             static struct re_pattern_buffer regex;
23563             unsigned char folded_chars[UCHAR_MAX + 1];
23564             int i;
23565             const char *s;
23566             struct re_registers regs;
23567
23568             /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
23569                This test needs valgrind to catch the bug on Debian
23570                GNU/Linux 3.1 x86, but it might catch the bug better
23571                on other platforms and it shouldn't hurt to try the
23572                test here.  */
23573             if (setlocale (LC_ALL, "en_US.UTF-8"))
23574               {
23575                 static char const pat[] = "insert into";
23576                 static char const data[] =
23577                   "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
23578                 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
23579                                | RE_ICASE);
23580                 memset (&regex, 0, sizeof regex);
23581                 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
23582                 if (s)
23583                   result |= 1;
23584                 else if (re_search (&regex, data, sizeof data - 1,
23585                                     0, sizeof data - 1, &regs)
23586                          != -1)
23587                   result |= 1;
23588                 if (! setlocale (LC_ALL, "C"))
23589                   return 1;
23590               }
23591
23592             /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
23593             re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
23594             memset (&regex, 0, sizeof regex);
23595             s = re_compile_pattern ("a[^x]b", 6, &regex);
23596             if (s)
23597               result |= 2;
23598             /* This should fail, but succeeds for glibc-2.5.  */
23599             else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
23600               result |= 2;
23601
23602             /* This regular expression is from Spencer ere test number 75
23603                in grep-2.3.  */
23604             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
23605             memset (&regex, 0, sizeof regex);
23606             for (i = 0; i <= UCHAR_MAX; i++)
23607               folded_chars[i] = i;
23608             regex.translate = folded_chars;
23609             s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
23610             /* This should fail with _Invalid character class name_ error.  */
23611             if (!s)
23612               result |= 4;
23613
23614             /* Ensure that [b-a] is diagnosed as invalid, when
23615                using RE_NO_EMPTY_RANGES. */
23616             re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
23617             memset (&regex, 0, sizeof regex);
23618             s = re_compile_pattern ("a[b-a]", 6, &regex);
23619             if (s == 0)
23620               result |= 8;
23621
23622             /* This should succeed, but does not for glibc-2.1.3.  */
23623             memset (&regex, 0, sizeof regex);
23624             s = re_compile_pattern ("{1", 2, &regex);
23625             if (s)
23626               result |= 8;
23627
23628             /* The following example is derived from a problem report
23629                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
23630             memset (&regex, 0, sizeof regex);
23631             s = re_compile_pattern ("[an\371]*n", 7, &regex);
23632             if (s)
23633               result |= 8;
23634             /* This should match, but does not for glibc-2.2.1.  */
23635             else if (re_match (&regex, "an", 2, 0, &regs) != 2)
23636               result |= 8;
23637
23638             memset (&regex, 0, sizeof regex);
23639             s = re_compile_pattern ("x", 1, &regex);
23640             if (s)
23641               result |= 8;
23642             /* glibc-2.2.93 does not work with a negative RANGE argument.  */
23643             else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
23644               result |= 8;
23645
23646             /* The version of regex.c in older versions of gnulib
23647                ignored RE_ICASE.  Detect that problem too.  */
23648             re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
23649             memset (&regex, 0, sizeof regex);
23650             s = re_compile_pattern ("x", 1, &regex);
23651             if (s)
23652               result |= 16;
23653             else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
23654               result |= 16;
23655
23656             /* Catch a bug reported by Vin Shelton in
23657                http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
23658                */
23659             re_set_syntax (RE_SYNTAX_POSIX_BASIC
23660                            & ~RE_CONTEXT_INVALID_DUP
23661                            & ~RE_NO_EMPTY_RANGES);
23662             memset (&regex, 0, sizeof regex);
23663             s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
23664             if (s)
23665               result |= 32;
23666
23667             /* REG_STARTEND was added to glibc on 2004-01-15.
23668                Reject older versions.  */
23669             if (! REG_STARTEND)
23670               result |= 64;
23671
23672 #if 0
23673             /* It would be nice to reject hosts whose regoff_t values are too
23674                narrow (including glibc on hosts with 64-bit ptrdiff_t and
23675                32-bit int), but we should wait until glibc implements this
23676                feature.  Otherwise, support for equivalence classes and
23677                multibyte collation symbols would always be broken except
23678                when compiling --without-included-regex.   */
23679             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
23680                 || sizeof (regoff_t) < sizeof (ssize_t))
23681               result |= 64;
23682 #endif
23683
23684             return result;
23685
23686   ;
23687   return 0;
23688 }
23689 _ACEOF
23690 if ac_fn_c_try_run "$LINENO"; then :
23691   gl_cv_func_re_compile_pattern_working=yes
23692 else
23693   gl_cv_func_re_compile_pattern_working=no
23694 fi
23695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23696   conftest.$ac_objext conftest.beam conftest.$ac_ext
23697 fi
23698
23699 fi
23700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
23701 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
23702     case $gl_cv_func_re_compile_pattern_working in #(
23703     yes) ac_use_included_regex=no;; #(
23704     no) ac_use_included_regex=yes;;
23705     esac
23706     ;;
23707   *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
23708     ;;
23709   esac
23710
23711   if test $ac_use_included_regex = yes; then
23712
23713 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
23714
23715
23716 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
23717
23718
23719 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
23720
23721
23722 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
23723
23724
23725 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
23726
23727
23728 $as_echo "#define re_search rpl_re_search" >>confdefs.h
23729
23730
23731 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
23732
23733
23734 $as_echo "#define re_match rpl_re_match" >>confdefs.h
23735
23736
23737 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
23738
23739
23740 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
23741
23742
23743 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
23744
23745
23746 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
23747
23748
23749 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
23750
23751
23752 $as_echo "#define regexec rpl_regexec" >>confdefs.h
23753
23754
23755 $as_echo "#define regerror rpl_regerror" >>confdefs.h
23756
23757
23758 $as_echo "#define regfree rpl_regfree" >>confdefs.h
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768   M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
23769
23770
23771
23772
23773
23774
23775   for ac_header in libintl.h
23776 do :
23777   ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
23778 if test "x$ac_cv_header_libintl_h" = x""yes; then :
23779   cat >>confdefs.h <<_ACEOF
23780 #define HAVE_LIBINTL_H 1
23781 _ACEOF
23782
23783 fi
23784
23785 done
23786
23787
23788   ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
23789 "
23790 if test "x$ac_cv_have_decl_isblank" = x""yes; then :
23791   ac_have_decl=1
23792 else
23793   ac_have_decl=0
23794 fi
23795
23796 cat >>confdefs.h <<_ACEOF
23797 #define HAVE_DECL_ISBLANK $ac_have_decl
23798 _ACEOF
23799
23800
23801   fi
23802
23803   # Code from module rename:
23804
23805
23806
23807
23808
23809                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
23810 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
23811 if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
23812   $as_echo_n "(cached) " >&6
23813 else
23814   rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
23815     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
23816       as_fn_error $? "cannot create temporary files" "$LINENO" 5
23817     # Assume that if we have lstat, we can also check symlinks.
23818     if test $ac_cv_func_lstat = yes; then
23819       ln -s conftest.f conftest.lnk
23820     fi
23821     if test "$cross_compiling" = yes; then :
23822         gl_cv_func_rename_slash_dst_works="guessing no"
23823 else
23824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23825 /* end confdefs.h.  */
23826
23827 #        include <stdio.h>
23828 #        include <stdlib.h>
23829
23830 int
23831 main ()
23832 {
23833 int result = 0;
23834            if (rename ("conftest.f1", "conftest.f2/") == 0)
23835              result |= 1;
23836            if (rename ("conftest.d1", "conftest.d2/") != 0)
23837              result |= 2;
23838 #if HAVE_LSTAT
23839            if (rename ("conftest.f", "conftest.lnk/") == 0)
23840              result |= 4;
23841 #endif
23842            return result;
23843
23844   ;
23845   return 0;
23846 }
23847 _ACEOF
23848 if ac_fn_c_try_run "$LINENO"; then :
23849   gl_cv_func_rename_slash_dst_works=yes
23850 else
23851   gl_cv_func_rename_slash_dst_works=no
23852 fi
23853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23854   conftest.$ac_objext conftest.beam conftest.$ac_ext
23855 fi
23856
23857     rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
23858
23859 fi
23860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
23861 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
23862   if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
23863
23864
23865
23866
23867
23868
23869
23870
23871   M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
23872
23873     REPLACE_RENAME=1
23874
23875 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
23876
23877   fi
23878
23879             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
23880 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
23881 if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
23882   $as_echo_n "(cached) " >&6
23883 else
23884   rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
23885     touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
23886       as_fn_error $? "cannot create temporary files" "$LINENO" 5
23887     # Assume that if we have lstat, we can also check symlinks.
23888     if test $ac_cv_func_lstat = yes; then
23889       ln -s conftest.f conftest.lnk
23890     fi
23891     if test "$cross_compiling" = yes; then :
23892         gl_cv_func_rename_slash_src_works="guessing no"
23893 else
23894   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23895 /* end confdefs.h.  */
23896
23897 #        include <stdio.h>
23898 #        include <stdlib.h>
23899
23900 int
23901 main ()
23902 {
23903 int result = 0;
23904            if (rename ("conftest.f1/", "conftest.d3") == 0)
23905              result |= 1;
23906            if (rename ("conftest.d1/", "conftest.d2") != 0)
23907              result |= 2;
23908 #if HAVE_LSTAT
23909            if (rename ("conftest.lnk/", "conftest.f") == 0)
23910              result |= 4;
23911 #endif
23912            return result;
23913
23914   ;
23915   return 0;
23916 }
23917 _ACEOF
23918 if ac_fn_c_try_run "$LINENO"; then :
23919   gl_cv_func_rename_slash_src_works=yes
23920 else
23921   gl_cv_func_rename_slash_src_works=no
23922 fi
23923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23924   conftest.$ac_objext conftest.beam conftest.$ac_ext
23925 fi
23926
23927     rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
23928
23929 fi
23930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
23931 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
23932   if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
23933
23934
23935
23936
23937
23938
23939
23940
23941   M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
23942
23943     REPLACE_RENAME=1
23944
23945 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
23946
23947   fi
23948
23949         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
23950 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
23951 if test "${gl_cv_func_rename_link_works+set}" = set; then :
23952   $as_echo_n "(cached) " >&6
23953 else
23954   rm -rf conftest.f conftest.f1
23955     if touch conftest.f && ln conftest.f conftest.f1 &&
23956         set x `ls -i conftest.f conftest.f1` && test "" = ""; then
23957       if test "$cross_compiling" = yes; then :
23958           gl_cv_func_rename_link_works="guessing no"
23959 else
23960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23961 /* end confdefs.h.  */
23962
23963 #          include <stdio.h>
23964 #          include <stdlib.h>
23965 #          include <unistd.h>
23966
23967 int
23968 main ()
23969 {
23970 int result = 0;
23971              if (rename ("conftest.f", "conftest.f1"))
23972                result |= 1;
23973              if (unlink ("conftest.f1"))
23974                result |= 2;
23975              if (rename ("conftest.f", "conftest.f"))
23976                result |= 4;
23977              if (rename ("conftest.f1", "conftest.f1") == 0)
23978                result |= 8;
23979              return result;
23980
23981   ;
23982   return 0;
23983 }
23984 _ACEOF
23985 if ac_fn_c_try_run "$LINENO"; then :
23986   gl_cv_func_rename_link_works=yes
23987 else
23988   gl_cv_func_rename_link_works=no
23989 fi
23990 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23991   conftest.$ac_objext conftest.beam conftest.$ac_ext
23992 fi
23993
23994     else
23995       gl_cv_func_rename_link_works="guessing no"
23996     fi
23997     rm -rf conftest.f conftest.f1
23998
23999 fi
24000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24001 $as_echo "$gl_cv_func_rename_link_works" >&6; }
24002   if test "x$gl_cv_func_rename_link_works" != xyes; then
24003
24004
24005
24006
24007
24008
24009
24010
24011   M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
24012
24013     REPLACE_RENAME=1
24014
24015 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24016
24017   fi
24018
24019           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24020 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
24021 if test "${gl_cv_func_rename_dest_works+set}" = set; then :
24022   $as_echo_n "(cached) " >&6
24023 else
24024   rm -rf conftest.f conftest.d1 conftest.d2
24025     touch conftest.f && mkdir conftest.d1 conftest.d2 ||
24026       as_fn_error $? "cannot create temporary files" "$LINENO" 5
24027     if test "$cross_compiling" = yes; then :
24028         gl_cv_func_rename_dest_works="guessing no"
24029 else
24030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24031 /* end confdefs.h.  */
24032
24033 #        include <stdio.h>
24034 #        include <stdlib.h>
24035
24036 int
24037 main ()
24038 {
24039 int result = 0;
24040            if (rename ("conftest.d1", "conftest.d2") != 0)
24041              result |= 1;
24042            if (rename ("conftest.d2", "conftest.f") == 0)
24043              result |= 2;
24044            return result;
24045
24046   ;
24047   return 0;
24048 }
24049 _ACEOF
24050 if ac_fn_c_try_run "$LINENO"; then :
24051   gl_cv_func_rename_dest_works=yes
24052 else
24053   gl_cv_func_rename_dest_works=no
24054 fi
24055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24056   conftest.$ac_objext conftest.beam conftest.$ac_ext
24057 fi
24058
24059     rm -rf conftest.f conftest.d1 conftest.d2
24060
24061 fi
24062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24063 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
24064   if test "x$gl_cv_func_rename_dest_works" != xyes; then
24065
24066
24067
24068
24069
24070
24071
24072
24073   M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
24074
24075     REPLACE_RENAME=1
24076
24077 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24078
24079   fi
24080
24081
24082
24083
24084   GNULIB_RENAME=1
24085
24086
24087
24088 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24089
24090
24091
24092   # Code from module rmdir:
24093
24094
24095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24096 $as_echo_n "checking whether rmdir works... " >&6; }
24097 if test "${gl_cv_func_rmdir_works+set}" = set; then :
24098   $as_echo_n "(cached) " >&6
24099 else
24100   mkdir conftest.dir
24101      touch conftest.file
24102      if test "$cross_compiling" = yes; then :
24103   gl_cv_func_rmdir_works="guessing no"
24104 else
24105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24106 /* end confdefs.h.  */
24107 #include <stdio.h>
24108            #include <errno.h>
24109            #include <unistd.h>
24110
24111 int
24112 main ()
24113 {
24114 int result = 0;
24115       if (!rmdir ("conftest.file/"))
24116         result |= 1;
24117       else if (errno != ENOTDIR)
24118         result |= 2;
24119       if (!rmdir ("conftest.dir/./"))
24120         result |= 4;
24121       return result;
24122
24123   ;
24124   return 0;
24125 }
24126 _ACEOF
24127 if ac_fn_c_try_run "$LINENO"; then :
24128   gl_cv_func_rmdir_works=yes
24129 else
24130   gl_cv_func_rmdir_works=no
24131 fi
24132 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24133   conftest.$ac_objext conftest.beam conftest.$ac_ext
24134 fi
24135
24136      rm -rf conftest.dir conftest.file
24137 fi
24138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24139 $as_echo "$gl_cv_func_rmdir_works" >&6; }
24140   if test x"$gl_cv_func_rmdir_works" != xyes; then
24141     REPLACE_RMDIR=1
24142
24143
24144
24145
24146
24147
24148
24149
24150   M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
24151
24152   fi
24153
24154
24155
24156
24157   GNULIB_RMDIR=1
24158
24159
24160
24161 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24162
24163
24164
24165   # Code from module same-inode:
24166   # Code from module sched:
24167
24168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24169 /* end confdefs.h.  */
24170
24171        #include <sched.h>
24172        struct sched_param a;
24173        int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
24174
24175 int
24176 main ()
24177 {
24178
24179   ;
24180   return 0;
24181 }
24182 _ACEOF
24183 if ac_fn_c_try_compile "$LINENO"; then :
24184   SCHED_H=''
24185 else
24186   SCHED_H='sched.h'
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197      if test $gl_cv_have_include_next = yes; then
24198        gl_cv_next_sched_h='<'sched.h'>'
24199      else
24200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
24201 $as_echo_n "checking absolute name of <sched.h>... " >&6; }
24202 if test "${gl_cv_next_sched_h+set}" = set; then :
24203   $as_echo_n "(cached) " >&6
24204 else
24205
24206              if test $ac_cv_header_sched_h = yes; then
24207
24208
24209                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24210 /* end confdefs.h.  */
24211 #include <sched.h>
24212
24213 _ACEOF
24214                                                                                                                         case "$host_os" in
24215                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
24216                  *)    gl_absname_cpp="$ac_cpp" ;;
24217                esac
24218                                                             gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24219                   sed -n '\#/sched.h#{
24220                     s#.*"\(.*/sched.h\)".*#\1#
24221                     s#^/[^/]#//&#
24222                     p
24223                     q
24224                   }'`'"'
24225           else
24226                gl_cv_next_sched_h='<'sched.h'>'
24227              fi
24228
24229
24230 fi
24231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
24232 $as_echo "$gl_cv_next_sched_h" >&6; }
24233      fi
24234      NEXT_SCHED_H=$gl_cv_next_sched_h
24235
24236      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24237        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24238        gl_next_as_first_directive='<'sched.h'>'
24239      else
24240        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24241        gl_next_as_first_directive=$gl_cv_next_sched_h
24242      fi
24243      NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
24244
24245
24246
24247
24248
24249      if test $ac_cv_header_sched_h = yes; then
24250        HAVE_SCHED_H=1
24251      else
24252        HAVE_SCHED_H=0
24253      fi
24254
24255
24256      ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
24257 "
24258 if test "x$ac_cv_type_struct_sched_param" = x""yes; then :
24259   HAVE_STRUCT_SCHED_PARAM=1
24260 else
24261   HAVE_STRUCT_SCHED_PARAM=0
24262 fi
24263
24264
24265
24266 fi
24267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24268
24269
24270   # Code from module sigaction:
24271
24272
24273
24274   if test $ac_cv_func_sigaction = yes; then
24275     ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
24276 "
24277 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
24278
24279 cat >>confdefs.h <<_ACEOF
24280 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
24281 _ACEOF
24282
24283
24284 fi
24285
24286     if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
24287       HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
24288     fi
24289   else
24290     HAVE_SIGACTION=0
24291
24292
24293
24294
24295
24296
24297
24298
24299   M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
24300
24301
24302
24303
24304
24305
24306
24307   ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
24308 #include <signal.h>
24309
24310 "
24311 if test "x$ac_cv_type_siginfo_t" = x""yes; then :
24312
24313 cat >>confdefs.h <<_ACEOF
24314 #define HAVE_SIGINFO_T 1
24315 _ACEOF
24316
24317
24318 fi
24319
24320   if test $ac_cv_type_siginfo_t = no; then
24321     HAVE_SIGINFO_T=0
24322   fi
24323
24324   fi
24325
24326
24327
24328
24329   GNULIB_SIGACTION=1
24330
24331
24332
24333 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
24334
24335
24336
24337   # Code from module signal:
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348      if test $gl_cv_have_include_next = yes; then
24349        gl_cv_next_signal_h='<'signal.h'>'
24350      else
24351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
24352 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
24353 if test "${gl_cv_next_signal_h+set}" = set; then :
24354   $as_echo_n "(cached) " >&6
24355 else
24356
24357                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24358 /* end confdefs.h.  */
24359 #include <signal.h>
24360
24361 _ACEOF
24362                                                                                                                         case "$host_os" in
24363                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
24364                  *)    gl_absname_cpp="$ac_cpp" ;;
24365                esac
24366                                                             gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24367                   sed -n '\#/signal.h#{
24368                     s#.*"\(.*/signal.h\)".*#\1#
24369                     s#^/[^/]#//&#
24370                     p
24371                     q
24372                   }'`'"'
24373
24374
24375 fi
24376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
24377 $as_echo "$gl_cv_next_signal_h" >&6; }
24378      fi
24379      NEXT_SIGNAL_H=$gl_cv_next_signal_h
24380
24381      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24382        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24383        gl_next_as_first_directive='<'signal.h'>'
24384      else
24385        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24386        gl_next_as_first_directive=$gl_cv_next_signal_h
24387      fi
24388      NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
24389
24390
24391
24392
24393 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
24394 # then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
24395   ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
24396 #include <signal.h>
24397
24398 "
24399 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
24400
24401 else
24402   HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
24403 fi
24404
24405
24406
24407
24408
24409   # Code from module signbit:
24410
24411
24412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
24413 $as_echo_n "checking for signbit macro... " >&6; }
24414 if test "${gl_cv_func_signbit+set}" = set; then :
24415   $as_echo_n "(cached) " >&6
24416 else
24417
24418       if test "$cross_compiling" = yes; then :
24419   gl_cv_func_signbit="guessing no"
24420 else
24421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24422 /* end confdefs.h.  */
24423
24424 #include <math.h>
24425 /* If signbit is defined as a function, don't use it, since calling it for
24426    'float' or 'long double' arguments would involve conversions.
24427    If signbit is not declared at all but exists as a library function, don't
24428    use it, since the prototype may not match.
24429    If signbit is not declared at all but exists as a compiler built-in, don't
24430    use it, since it's preferable to use __builtin_signbit* (no warnings,
24431    no conversions).  */
24432 #ifndef signbit
24433 # error "signbit should be a macro"
24434 #endif
24435 #include <string.h>
24436
24437 /* Global variables.
24438    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24439    but cannot constant-fold            __builtin_signbitl (variable).  */
24440 float vf;
24441 double vd;
24442 long double vl;
24443 int main ()
24444 {
24445 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24446    So we use -p0f and -p0d instead.  */
24447 float p0f = 0.0f;
24448 float m0f = -p0f;
24449 double p0d = 0.0;
24450 double m0d = -p0d;
24451 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24452    So we use another constant expression instead.
24453    But that expression does not work on other platforms, such as when
24454    cross-compiling to PowerPC on MacOS X 10.5.  */
24455 long double p0l = 0.0L;
24456 #if defined __hpux || defined __sgi
24457 long double m0l = -LDBL_MIN * LDBL_MIN;
24458 #else
24459 long double m0l = -p0l;
24460 #endif
24461   int result = 0;
24462   if (signbit (vf)) /* link check */
24463     vf++;
24464   {
24465     float plus_inf = 1.0f / p0f;
24466     float minus_inf = -1.0f / p0f;
24467     if (!(!signbit (255.0f)
24468           && signbit (-255.0f)
24469           && !signbit (p0f)
24470           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24471           && !signbit (plus_inf)
24472           && signbit (minus_inf)))
24473       result |= 1;
24474   }
24475   if (signbit (vd)) /* link check */
24476     vd++;
24477   {
24478     double plus_inf = 1.0 / p0d;
24479     double minus_inf = -1.0 / p0d;
24480     if (!(!signbit (255.0)
24481           && signbit (-255.0)
24482           && !signbit (p0d)
24483           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24484           && !signbit (plus_inf)
24485           && signbit (minus_inf)))
24486       result |= 2;
24487   }
24488   if (signbit (vl)) /* link check */
24489     vl++;
24490   {
24491     long double plus_inf = 1.0L / p0l;
24492     long double minus_inf = -1.0L / p0l;
24493     if (signbit (255.0L))
24494       result |= 4;
24495     if (!signbit (-255.0L))
24496       result |= 4;
24497     if (signbit (p0l))
24498       result |= 8;
24499     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24500       result |= 16;
24501     if (signbit (plus_inf))
24502       result |= 32;
24503     if (!signbit (minus_inf))
24504       result |= 64;
24505   }
24506   return result;
24507 }
24508
24509
24510 _ACEOF
24511 if ac_fn_c_try_run "$LINENO"; then :
24512   gl_cv_func_signbit=yes
24513 else
24514   gl_cv_func_signbit=no
24515 fi
24516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24517   conftest.$ac_objext conftest.beam conftest.$ac_ext
24518 fi
24519
24520
24521 fi
24522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
24523 $as_echo "$gl_cv_func_signbit" >&6; }
24524           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
24525 $as_echo_n "checking for signbit compiler built-ins... " >&6; }
24526 if test "${gl_cv_func_signbit_gcc+set}" = set; then :
24527   $as_echo_n "(cached) " >&6
24528 else
24529
24530       if test "$cross_compiling" = yes; then :
24531   gl_cv_func_signbit_gcc="guessing no"
24532 else
24533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24534 /* end confdefs.h.  */
24535
24536 #if __GNUC__ >= 4
24537 # define signbit(x) \
24538    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
24539     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
24540     __builtin_signbitf (x))
24541 #else
24542 # error "signbit should be three compiler built-ins"
24543 #endif
24544 #include <string.h>
24545
24546 /* Global variables.
24547    Needed because GCC 4 constant-folds __builtin_signbitl (literal)
24548    but cannot constant-fold            __builtin_signbitl (variable).  */
24549 float vf;
24550 double vd;
24551 long double vl;
24552 int main ()
24553 {
24554 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
24555    So we use -p0f and -p0d instead.  */
24556 float p0f = 0.0f;
24557 float m0f = -p0f;
24558 double p0d = 0.0;
24559 double m0d = -p0d;
24560 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
24561    So we use another constant expression instead.
24562    But that expression does not work on other platforms, such as when
24563    cross-compiling to PowerPC on MacOS X 10.5.  */
24564 long double p0l = 0.0L;
24565 #if defined __hpux || defined __sgi
24566 long double m0l = -LDBL_MIN * LDBL_MIN;
24567 #else
24568 long double m0l = -p0l;
24569 #endif
24570   int result = 0;
24571   if (signbit (vf)) /* link check */
24572     vf++;
24573   {
24574     float plus_inf = 1.0f / p0f;
24575     float minus_inf = -1.0f / p0f;
24576     if (!(!signbit (255.0f)
24577           && signbit (-255.0f)
24578           && !signbit (p0f)
24579           && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
24580           && !signbit (plus_inf)
24581           && signbit (minus_inf)))
24582       result |= 1;
24583   }
24584   if (signbit (vd)) /* link check */
24585     vd++;
24586   {
24587     double plus_inf = 1.0 / p0d;
24588     double minus_inf = -1.0 / p0d;
24589     if (!(!signbit (255.0)
24590           && signbit (-255.0)
24591           && !signbit (p0d)
24592           && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
24593           && !signbit (plus_inf)
24594           && signbit (minus_inf)))
24595       result |= 2;
24596   }
24597   if (signbit (vl)) /* link check */
24598     vl++;
24599   {
24600     long double plus_inf = 1.0L / p0l;
24601     long double minus_inf = -1.0L / p0l;
24602     if (signbit (255.0L))
24603       result |= 4;
24604     if (!signbit (-255.0L))
24605       result |= 4;
24606     if (signbit (p0l))
24607       result |= 8;
24608     if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
24609       result |= 16;
24610     if (signbit (plus_inf))
24611       result |= 32;
24612     if (!signbit (minus_inf))
24613       result |= 64;
24614   }
24615   return result;
24616 }
24617
24618
24619 _ACEOF
24620 if ac_fn_c_try_run "$LINENO"; then :
24621   gl_cv_func_signbit_gcc=yes
24622 else
24623   gl_cv_func_signbit_gcc=no
24624 fi
24625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24626   conftest.$ac_objext conftest.beam conftest.$ac_ext
24627 fi
24628
24629
24630 fi
24631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
24632 $as_echo "$gl_cv_func_signbit_gcc" >&6; }
24633       if test "$gl_cv_func_signbit_gcc" = yes; then
24634     REPLACE_SIGNBIT_USING_GCC=1
24635   else
24636     if test "$gl_cv_func_signbit" != yes; then
24637       REPLACE_SIGNBIT=1
24638
24639
24640
24641
24642
24643
24644
24645
24646   M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656   M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666   M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
24667
24668
24669
24670   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
24671 $as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
24672 if test "${gl_cv_cc_float_signbit+set}" = set; then :
24673   $as_echo_n "(cached) " >&6
24674 else
24675
24676       if test "$cross_compiling" = yes; then :
24677
24678                               gl_cv_cc_float_signbit="unknown"
24679
24680 else
24681   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24682 /* end confdefs.h.  */
24683
24684 #include <stddef.h>
24685 #include <stdio.h>
24686 #define NWORDS \
24687   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24688 typedef union { float value; unsigned int word[NWORDS]; }
24689         memory_float;
24690 static memory_float plus = { 1.0f };
24691 static memory_float minus = { -1.0f };
24692 int main ()
24693 {
24694   size_t j, k, i;
24695   unsigned int m;
24696   FILE *fp = fopen ("conftest.out", "w");
24697   if (fp == NULL)
24698     return 1;
24699   /* Find the different bit.  */
24700   k = 0; m = 0;
24701   for (j = 0; j < NWORDS; j++)
24702     {
24703       unsigned int x = plus.word[j] ^ minus.word[j];
24704       if ((x & (x - 1)) || (x && m))
24705         {
24706           /* More than one bit difference.  */
24707           fprintf (fp, "unknown");
24708           return 2;
24709         }
24710       if (x)
24711         {
24712           k = j;
24713           m = x;
24714         }
24715     }
24716   if (m == 0)
24717     {
24718       /* No difference.  */
24719       fprintf (fp, "unknown");
24720       return 3;
24721     }
24722   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24723   if (plus.word[k] & ~minus.word[k])
24724     {
24725       /* Oh? The sign bit is set in the positive and cleared in the negative
24726          numbers?  */
24727       fprintf (fp, "unknown");
24728       return 4;
24729     }
24730   for (i = 0; ; i++)
24731     if ((m >> i) & 1)
24732       break;
24733   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24734   if (fclose (fp) != 0)
24735     return 5;
24736   return 0;
24737 }
24738
24739 _ACEOF
24740 if ac_fn_c_try_run "$LINENO"; then :
24741   gl_cv_cc_float_signbit=`cat conftest.out`
24742 else
24743   gl_cv_cc_float_signbit="unknown"
24744 fi
24745 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24746   conftest.$ac_objext conftest.beam conftest.$ac_ext
24747 fi
24748
24749       rm -f conftest.out
24750
24751 fi
24752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
24753 $as_echo "$gl_cv_cc_float_signbit" >&6; }
24754   case "$gl_cv_cc_float_signbit" in
24755     word*bit*)
24756       word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24757       bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
24758
24759 cat >>confdefs.h <<_ACEOF
24760 #define FLT_SIGNBIT_WORD $word
24761 _ACEOF
24762
24763
24764 cat >>confdefs.h <<_ACEOF
24765 #define FLT_SIGNBIT_BIT $bit
24766 _ACEOF
24767
24768       ;;
24769   esac
24770
24771
24772
24773
24774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
24775 $as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
24776 if test "${gl_cv_cc_double_signbit+set}" = set; then :
24777   $as_echo_n "(cached) " >&6
24778 else
24779
24780       if test "$cross_compiling" = yes; then :
24781
24782                               gl_cv_cc_double_signbit="unknown"
24783
24784 else
24785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24786 /* end confdefs.h.  */
24787
24788 #include <stddef.h>
24789 #include <stdio.h>
24790 #define NWORDS \
24791   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24792 typedef union { double value; unsigned int word[NWORDS]; }
24793         memory_float;
24794 static memory_float plus = { 1.0 };
24795 static memory_float minus = { -1.0 };
24796 int main ()
24797 {
24798   size_t j, k, i;
24799   unsigned int m;
24800   FILE *fp = fopen ("conftest.out", "w");
24801   if (fp == NULL)
24802     return 1;
24803   /* Find the different bit.  */
24804   k = 0; m = 0;
24805   for (j = 0; j < NWORDS; j++)
24806     {
24807       unsigned int x = plus.word[j] ^ minus.word[j];
24808       if ((x & (x - 1)) || (x && m))
24809         {
24810           /* More than one bit difference.  */
24811           fprintf (fp, "unknown");
24812           return 2;
24813         }
24814       if (x)
24815         {
24816           k = j;
24817           m = x;
24818         }
24819     }
24820   if (m == 0)
24821     {
24822       /* No difference.  */
24823       fprintf (fp, "unknown");
24824       return 3;
24825     }
24826   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24827   if (plus.word[k] & ~minus.word[k])
24828     {
24829       /* Oh? The sign bit is set in the positive and cleared in the negative
24830          numbers?  */
24831       fprintf (fp, "unknown");
24832       return 4;
24833     }
24834   for (i = 0; ; i++)
24835     if ((m >> i) & 1)
24836       break;
24837   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24838   if (fclose (fp) != 0)
24839     return 5;
24840   return 0;
24841 }
24842
24843 _ACEOF
24844 if ac_fn_c_try_run "$LINENO"; then :
24845   gl_cv_cc_double_signbit=`cat conftest.out`
24846 else
24847   gl_cv_cc_double_signbit="unknown"
24848 fi
24849 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24850   conftest.$ac_objext conftest.beam conftest.$ac_ext
24851 fi
24852
24853       rm -f conftest.out
24854
24855 fi
24856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
24857 $as_echo "$gl_cv_cc_double_signbit" >&6; }
24858   case "$gl_cv_cc_double_signbit" in
24859     word*bit*)
24860       word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24861       bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
24862
24863 cat >>confdefs.h <<_ACEOF
24864 #define DBL_SIGNBIT_WORD $word
24865 _ACEOF
24866
24867
24868 cat >>confdefs.h <<_ACEOF
24869 #define DBL_SIGNBIT_BIT $bit
24870 _ACEOF
24871
24872       ;;
24873   esac
24874
24875
24876
24877
24878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
24879 $as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
24880 if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
24881   $as_echo_n "(cached) " >&6
24882 else
24883
24884       if test "$cross_compiling" = yes; then :
24885
24886                               gl_cv_cc_long_double_signbit="unknown"
24887
24888 else
24889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24890 /* end confdefs.h.  */
24891
24892 #include <stddef.h>
24893 #include <stdio.h>
24894 #define NWORDS \
24895   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
24896 typedef union { long double value; unsigned int word[NWORDS]; }
24897         memory_float;
24898 static memory_float plus = { 1.0L };
24899 static memory_float minus = { -1.0L };
24900 int main ()
24901 {
24902   size_t j, k, i;
24903   unsigned int m;
24904   FILE *fp = fopen ("conftest.out", "w");
24905   if (fp == NULL)
24906     return 1;
24907   /* Find the different bit.  */
24908   k = 0; m = 0;
24909   for (j = 0; j < NWORDS; j++)
24910     {
24911       unsigned int x = plus.word[j] ^ minus.word[j];
24912       if ((x & (x - 1)) || (x && m))
24913         {
24914           /* More than one bit difference.  */
24915           fprintf (fp, "unknown");
24916           return 2;
24917         }
24918       if (x)
24919         {
24920           k = j;
24921           m = x;
24922         }
24923     }
24924   if (m == 0)
24925     {
24926       /* No difference.  */
24927       fprintf (fp, "unknown");
24928       return 3;
24929     }
24930   /* Now m = plus.word[k] ^ ~minus.word[k].  */
24931   if (plus.word[k] & ~minus.word[k])
24932     {
24933       /* Oh? The sign bit is set in the positive and cleared in the negative
24934          numbers?  */
24935       fprintf (fp, "unknown");
24936       return 4;
24937     }
24938   for (i = 0; ; i++)
24939     if ((m >> i) & 1)
24940       break;
24941   fprintf (fp, "word %d bit %d", (int) k, (int) i);
24942   if (fclose (fp) != 0)
24943     return 5;
24944   return 0;
24945 }
24946
24947 _ACEOF
24948 if ac_fn_c_try_run "$LINENO"; then :
24949   gl_cv_cc_long_double_signbit=`cat conftest.out`
24950 else
24951   gl_cv_cc_long_double_signbit="unknown"
24952 fi
24953 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24954   conftest.$ac_objext conftest.beam conftest.$ac_ext
24955 fi
24956
24957       rm -f conftest.out
24958
24959 fi
24960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
24961 $as_echo "$gl_cv_cc_long_double_signbit" >&6; }
24962   case "$gl_cv_cc_long_double_signbit" in
24963     word*bit*)
24964       word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
24965       bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
24966
24967 cat >>confdefs.h <<_ACEOF
24968 #define LDBL_SIGNBIT_WORD $word
24969 _ACEOF
24970
24971
24972 cat >>confdefs.h <<_ACEOF
24973 #define LDBL_SIGNBIT_BIT $bit
24974 _ACEOF
24975
24976       ;;
24977   esac
24978
24979
24980       if test "$gl_cv_cc_float_signbit" = unknown; then
24981                 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
24982 "
24983 if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
24984   ac_have_decl=1
24985 else
24986   ac_have_decl=0
24987 fi
24988
24989 cat >>confdefs.h <<_ACEOF
24990 #define HAVE_DECL_COPYSIGNF $ac_have_decl
24991 _ACEOF
24992
24993         if test "$ac_cv_have_decl_copysignf" = yes; then
24994                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
24995 $as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
24996 if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
24997   $as_echo_n "(cached) " >&6
24998 else
24999
25000               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25001 /* end confdefs.h.  */
25002 #include <math.h>
25003                      float x, y;
25004 int
25005 main ()
25006 {
25007 return copysignf (x, y) < 0;
25008   ;
25009   return 0;
25010 }
25011 _ACEOF
25012 if ac_fn_c_try_link "$LINENO"; then :
25013   gl_cv_func_copysignf_no_libm=yes
25014 else
25015   gl_cv_func_copysignf_no_libm=no
25016 fi
25017 rm -f core conftest.err conftest.$ac_objext \
25018     conftest$ac_exeext conftest.$ac_ext
25019
25020 fi
25021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
25022 $as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
25023           if test $gl_cv_func_copysignf_no_libm = yes; then
25024
25025 $as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
25026
25027           fi
25028         fi
25029       fi
25030       if test "$gl_cv_cc_double_signbit" = unknown; then
25031                 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
25032 "
25033 if test "x$ac_cv_have_decl_copysign" = x""yes; then :
25034   ac_have_decl=1
25035 else
25036   ac_have_decl=0
25037 fi
25038
25039 cat >>confdefs.h <<_ACEOF
25040 #define HAVE_DECL_COPYSIGN $ac_have_decl
25041 _ACEOF
25042
25043         if test "$ac_cv_have_decl_copysign" = yes; then
25044                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
25045 $as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
25046 if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
25047   $as_echo_n "(cached) " >&6
25048 else
25049
25050               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25051 /* end confdefs.h.  */
25052 #include <math.h>
25053                      double x, y;
25054 int
25055 main ()
25056 {
25057 return copysign (x, y) < 0;
25058   ;
25059   return 0;
25060 }
25061 _ACEOF
25062 if ac_fn_c_try_link "$LINENO"; then :
25063   gl_cv_func_copysign_no_libm=yes
25064 else
25065   gl_cv_func_copysign_no_libm=no
25066 fi
25067 rm -f core conftest.err conftest.$ac_objext \
25068     conftest$ac_exeext conftest.$ac_ext
25069
25070 fi
25071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
25072 $as_echo "$gl_cv_func_copysign_no_libm" >&6; }
25073           if test $gl_cv_func_copysign_no_libm = yes; then
25074
25075 $as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
25076
25077           fi
25078         fi
25079       fi
25080       if test "$gl_cv_cc_long_double_signbit" = unknown; then
25081                 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
25082 "
25083 if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
25084   ac_have_decl=1
25085 else
25086   ac_have_decl=0
25087 fi
25088
25089 cat >>confdefs.h <<_ACEOF
25090 #define HAVE_DECL_COPYSIGNL $ac_have_decl
25091 _ACEOF
25092
25093         if test "$ac_cv_have_decl_copysignl" = yes; then
25094                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
25095 $as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
25096 if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
25097   $as_echo_n "(cached) " >&6
25098 else
25099
25100               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25101 /* end confdefs.h.  */
25102 #include <math.h>
25103                      long double x, y;
25104 int
25105 main ()
25106 {
25107 return copysignl (x, y) < 0;
25108   ;
25109   return 0;
25110 }
25111 _ACEOF
25112 if ac_fn_c_try_link "$LINENO"; then :
25113   gl_cv_func_copysignl_no_libm=yes
25114 else
25115   gl_cv_func_copysignl_no_libm=no
25116 fi
25117 rm -f core conftest.err conftest.$ac_objext \
25118     conftest$ac_exeext conftest.$ac_ext
25119
25120 fi
25121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
25122 $as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
25123           if test $gl_cv_func_copysignl_no_libm = yes; then
25124
25125 $as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
25126
25127           fi
25128         fi
25129       fi
25130     fi
25131   fi
25132
25133
25134
25135
25136   GNULIB_SIGNBIT=1
25137
25138
25139
25140 $as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
25141
25142
25143
25144   # Code from module sigprocmask:
25145
25146
25147   signals_not_posix=
25148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25149 /* end confdefs.h.  */
25150 #include <signal.h>
25151
25152 _ACEOF
25153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25154   $EGREP "sigset_t" >/dev/null 2>&1; then :
25155
25156 else
25157   signals_not_posix=1
25158 fi
25159 rm -f conftest*
25160
25161   if test -z "$signals_not_posix"; then
25162     ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
25163 if test "x$ac_cv_func_sigprocmask" = x""yes; then :
25164   gl_cv_func_sigprocmask=1
25165 fi
25166
25167   fi
25168   if test -z "$gl_cv_func_sigprocmask"; then
25169     HAVE_POSIX_SIGNALBLOCKING=0
25170
25171
25172
25173
25174
25175
25176
25177
25178   M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
25179
25180
25181
25182   ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
25183 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
25184 #include <sys/types.h>
25185 "
25186 if test "x$ac_cv_type_sigset_t" = x""yes; then :
25187
25188 cat >>confdefs.h <<_ACEOF
25189 #define HAVE_SIGSET_T 1
25190 _ACEOF
25191
25192 gl_cv_type_sigset_t=yes
25193 else
25194   gl_cv_type_sigset_t=no
25195 fi
25196
25197   if test $gl_cv_type_sigset_t != yes; then
25198     HAVE_SIGSET_T=0
25199   fi
25200
25201
25202   fi
25203
25204
25205
25206
25207   GNULIB_SIGPROCMASK=1
25208
25209
25210
25211 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
25212
25213
25214
25215   # Code from module size_max:
25216
25217   for ac_header in stdint.h
25218 do :
25219   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
25220 if test "x$ac_cv_header_stdint_h" = x""yes; then :
25221   cat >>confdefs.h <<_ACEOF
25222 #define HAVE_STDINT_H 1
25223 _ACEOF
25224
25225 fi
25226
25227 done
25228
25229     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
25230 $as_echo_n "checking for SIZE_MAX... " >&6; }
25231 if test "${gl_cv_size_max+set}" = set; then :
25232   $as_echo_n "(cached) " >&6
25233 else
25234
25235     gl_cv_size_max=
25236     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25237 /* end confdefs.h.  */
25238
25239 #include <limits.h>
25240 #if HAVE_STDINT_H
25241 #include <stdint.h>
25242 #endif
25243 #ifdef SIZE_MAX
25244 Found it
25245 #endif
25246
25247 _ACEOF
25248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25249   $EGREP "Found it" >/dev/null 2>&1; then :
25250   gl_cv_size_max=yes
25251 fi
25252 rm -f conftest*
25253
25254     if test -z "$gl_cv_size_max"; then
25255                         if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
25256 #include <limits.h>"; then :
25257
25258 else
25259   size_t_bits_minus_1=
25260 fi
25261
25262       if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
25263
25264 else
25265   fits_in_uint=
25266 fi
25267
25268       if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
25269         if test $fits_in_uint = 1; then
25270                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25271 /* end confdefs.h.  */
25272 #include <stddef.h>
25273                  extern size_t foo;
25274                  extern unsigned long foo;
25275
25276 int
25277 main ()
25278 {
25279
25280   ;
25281   return 0;
25282 }
25283 _ACEOF
25284 if ac_fn_c_try_compile "$LINENO"; then :
25285   fits_in_uint=0
25286 fi
25287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25288         fi
25289                                 if test $fits_in_uint = 1; then
25290           gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
25291         else
25292           gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
25293         fi
25294       else
25295                 gl_cv_size_max='((size_t)~(size_t)0)'
25296       fi
25297     fi
25298
25299 fi
25300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
25301 $as_echo "$gl_cv_size_max" >&6; }
25302   if test "$gl_cv_size_max" != yes; then
25303
25304 cat >>confdefs.h <<_ACEOF
25305 #define SIZE_MAX $gl_cv_size_max
25306 _ACEOF
25307
25308   fi
25309
25310
25311   # Code from module snprintf:
25312
25313
25314   gl_cv_func_snprintf_usable=no
25315   for ac_func in snprintf
25316 do :
25317   ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
25318 if test "x$ac_cv_func_snprintf" = x""yes; then :
25319   cat >>confdefs.h <<_ACEOF
25320 #define HAVE_SNPRINTF 1
25321 _ACEOF
25322
25323 fi
25324 done
25325
25326   if test $ac_cv_func_snprintf = yes; then
25327
25328
25329   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
25330 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
25331 if test "${gl_cv_func_snprintf_size1+set}" = set; then :
25332   $as_echo_n "(cached) " >&6
25333 else
25334
25335       if test "$cross_compiling" = yes; then :
25336   gl_cv_func_snprintf_size1="guessing yes"
25337 else
25338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25339 /* end confdefs.h.  */
25340
25341 #include <stdio.h>
25342 int main()
25343 {
25344   static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
25345   snprintf (buf, 1, "%d", 12345);
25346   return buf[1] != 'E';
25347 }
25348 _ACEOF
25349 if ac_fn_c_try_run "$LINENO"; then :
25350   gl_cv_func_snprintf_size1=yes
25351 else
25352   gl_cv_func_snprintf_size1=no
25353 fi
25354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25355   conftest.$ac_objext conftest.beam conftest.$ac_ext
25356 fi
25357
25358
25359 fi
25360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
25361 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
25362
25363     case "$gl_cv_func_snprintf_size1" in
25364       *yes)
25365
25366         case "$gl_cv_func_snprintf_retval_c99" in
25367           *yes)
25368             gl_cv_func_snprintf_usable=yes
25369             ;;
25370         esac
25371         ;;
25372     esac
25373   fi
25374   if test $gl_cv_func_snprintf_usable = no; then
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385   M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
25386
25387   if test $ac_cv_func_snprintf = yes; then
25388     REPLACE_SNPRINTF=1
25389   fi
25390   :
25391
25392   fi
25393
25394   if test $ac_cv_have_decl_snprintf = no; then
25395     HAVE_DECL_SNPRINTF=0
25396   fi
25397
25398
25399
25400
25401   GNULIB_SNPRINTF=1
25402
25403
25404
25405 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
25406
25407
25408
25409
25410
25411 cat >>confdefs.h <<_ACEOF
25412 #define GNULIB_SNPRINTF 1
25413 _ACEOF
25414
25415
25416   # Code from module spawn:
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429      if test $gl_cv_have_include_next = yes; then
25430        gl_cv_next_spawn_h='<'spawn.h'>'
25431      else
25432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
25433 $as_echo_n "checking absolute name of <spawn.h>... " >&6; }
25434 if test "${gl_cv_next_spawn_h+set}" = set; then :
25435   $as_echo_n "(cached) " >&6
25436 else
25437
25438              if test $ac_cv_header_spawn_h = yes; then
25439
25440
25441                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25442 /* end confdefs.h.  */
25443 #include <spawn.h>
25444
25445 _ACEOF
25446                                                                                                                         case "$host_os" in
25447                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25448                  *)    gl_absname_cpp="$ac_cpp" ;;
25449                esac
25450                                                             gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25451                   sed -n '\#/spawn.h#{
25452                     s#.*"\(.*/spawn.h\)".*#\1#
25453                     s#^/[^/]#//&#
25454                     p
25455                     q
25456                   }'`'"'
25457           else
25458                gl_cv_next_spawn_h='<'spawn.h'>'
25459              fi
25460
25461
25462 fi
25463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
25464 $as_echo "$gl_cv_next_spawn_h" >&6; }
25465      fi
25466      NEXT_SPAWN_H=$gl_cv_next_spawn_h
25467
25468      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25469        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25470        gl_next_as_first_directive='<'spawn.h'>'
25471      else
25472        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25473        gl_next_as_first_directive=$gl_cv_next_spawn_h
25474      fi
25475      NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
25476
25477
25478
25479
25480
25481   if test $ac_cv_header_spawn_h = yes; then
25482     HAVE_SPAWN_H=1
25483     ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
25484 #include <spawn.h>
25485
25486 "
25487 if test "x$ac_cv_type_posix_spawnattr_t" = x""yes; then :
25488
25489 cat >>confdefs.h <<_ACEOF
25490 #define HAVE_POSIX_SPAWNATTR_T 1
25491 _ACEOF
25492
25493
25494 else
25495   HAVE_POSIX_SPAWNATTR_T=0
25496 fi
25497
25498     ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
25499 #include <spawn.h>
25500
25501 "
25502 if test "x$ac_cv_type_posix_spawn_file_actions_t" = x""yes; then :
25503
25504 cat >>confdefs.h <<_ACEOF
25505 #define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
25506 _ACEOF
25507
25508
25509 else
25510   HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25511 fi
25512
25513   else
25514     HAVE_SPAWN_H=0
25515     HAVE_POSIX_SPAWNATTR_T=0
25516     HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
25517
25518     :
25519
25520   fi
25521
25522
25523
25524
25525
25526
25527
25528
25529   # Code from module spawn-pipe:
25530
25531
25532
25533
25534   # Code from module ssize_t:
25535
25536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25537 $as_echo_n "checking for ssize_t... " >&6; }
25538 if test "${gt_cv_ssize_t+set}" = set; then :
25539   $as_echo_n "(cached) " >&6
25540 else
25541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25542 /* end confdefs.h.  */
25543 #include <sys/types.h>
25544 int
25545 main ()
25546 {
25547 int x = sizeof (ssize_t *) + sizeof (ssize_t);
25548             return !x;
25549   ;
25550   return 0;
25551 }
25552 _ACEOF
25553 if ac_fn_c_try_compile "$LINENO"; then :
25554   gt_cv_ssize_t=yes
25555 else
25556   gt_cv_ssize_t=no
25557 fi
25558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25559 fi
25560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25561 $as_echo "$gt_cv_ssize_t" >&6; }
25562   if test $gt_cv_ssize_t = no; then
25563
25564 $as_echo "#define ssize_t int" >>confdefs.h
25565
25566   fi
25567
25568   # Code from module stat:
25569
25570
25571
25572     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25573 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25574 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
25575   $as_echo_n "(cached) " >&6
25576 else
25577   if test "$cross_compiling" = yes; then :
25578   case $host_os in
25579             mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25580             *) gl_cv_func_stat_dir_slash="guessing yes";;
25581           esac
25582 else
25583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25584 /* end confdefs.h.  */
25585 #include <sys/stat.h>
25586
25587 int
25588 main ()
25589 {
25590 struct stat st; return stat (".", &st) != stat ("./", &st);
25591   ;
25592   return 0;
25593 }
25594 _ACEOF
25595 if ac_fn_c_try_run "$LINENO"; then :
25596   gl_cv_func_stat_dir_slash=yes
25597 else
25598   gl_cv_func_stat_dir_slash=no
25599 fi
25600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25601   conftest.$ac_objext conftest.beam conftest.$ac_ext
25602 fi
25603
25604 fi
25605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25606 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25607       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25608 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25609 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
25610   $as_echo_n "(cached) " >&6
25611 else
25612   touch conftest.tmp
25613        # Assume that if we have lstat, we can also check symlinks.
25614        if test $ac_cv_func_lstat = yes; then
25615          ln -s conftest.tmp conftest.lnk
25616        fi
25617        if test "$cross_compiling" = yes; then :
25618   gl_cv_func_stat_file_slash="guessing no"
25619 else
25620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25621 /* end confdefs.h.  */
25622 #include <sys/stat.h>
25623
25624 int
25625 main ()
25626 {
25627 int result = 0;
25628       struct stat st;
25629       if (!stat ("conftest.tmp/", &st))
25630         result |= 1;
25631 #if HAVE_LSTAT
25632       if (!stat ("conftest.lnk/", &st))
25633         result |= 2;
25634 #endif
25635       return result;
25636
25637   ;
25638   return 0;
25639 }
25640 _ACEOF
25641 if ac_fn_c_try_run "$LINENO"; then :
25642   gl_cv_func_stat_file_slash=yes
25643 else
25644   gl_cv_func_stat_file_slash=no
25645 fi
25646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25647   conftest.$ac_objext conftest.beam conftest.$ac_ext
25648 fi
25649
25650        rm -f conftest.tmp conftest.lnk
25651 fi
25652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25653 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
25654   case $gl_cv_func_stat_dir_slash in
25655     *no) REPLACE_STAT=1
25656
25657 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25658 ;;
25659   esac
25660   case $gl_cv_func_stat_file_slash in
25661     *no) REPLACE_STAT=1
25662
25663 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25664 ;;
25665   esac
25666   if test $REPLACE_STAT = 1; then
25667
25668
25669
25670
25671
25672
25673
25674
25675   M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
25676
25677
25678   fi
25679
25680
25681
25682
25683   GNULIB_STAT=1
25684
25685
25686
25687 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25688
25689
25690
25691   # Code from module stdarg:
25692
25693   STDARG_H='';
25694   NEXT_STDARG_H='<stdarg.h>';
25695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25696 $as_echo_n "checking for va_copy... " >&6; }
25697   if test "${gl_cv_func_va_copy+set}" = set; then :
25698   $as_echo_n "(cached) " >&6
25699 else
25700
25701     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25702 /* end confdefs.h.  */
25703 #include <stdarg.h>
25704 int
25705 main ()
25706 {
25707
25708 #ifndef va_copy
25709 void (*func) (va_list, va_list) = va_copy;
25710 #endif
25711
25712   ;
25713   return 0;
25714 }
25715 _ACEOF
25716 if ac_fn_c_try_compile "$LINENO"; then :
25717   gl_cv_func_va_copy=yes
25718 else
25719   gl_cv_func_va_copy=no
25720 fi
25721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25722 fi
25723
25724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25725 $as_echo "$gl_cv_func_va_copy" >&6; }
25726   if test $gl_cv_func_va_copy = no; then
25727                                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25728 /* end confdefs.h.  */
25729 #if defined _AIX && !defined __GNUC__
25730         AIX vaccine
25731        #endif
25732
25733 _ACEOF
25734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25735   $EGREP "vaccine" >/dev/null 2>&1; then :
25736   gl_aixcc=yes
25737 else
25738   gl_aixcc=no
25739 fi
25740 rm -f conftest*
25741
25742     if test $gl_aixcc = yes; then
25743             STDARG_H=stdarg.h
25744
25745
25746
25747
25748
25749
25750
25751
25752      if test $gl_cv_have_include_next = yes; then
25753        gl_cv_next_stdarg_h='<'stdarg.h'>'
25754      else
25755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25756 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25757 if test "${gl_cv_next_stdarg_h+set}" = set; then :
25758   $as_echo_n "(cached) " >&6
25759 else
25760
25761                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25762 /* end confdefs.h.  */
25763 #include <stdarg.h>
25764
25765 _ACEOF
25766                                                                                                                         case "$host_os" in
25767                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25768                  *)    gl_absname_cpp="$ac_cpp" ;;
25769                esac
25770                                                             gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25771                   sed -n '\#/stdarg.h#{
25772                     s#.*"\(.*/stdarg.h\)".*#\1#
25773                     s#^/[^/]#//&#
25774                     p
25775                     q
25776                   }'`'"'
25777
25778
25779 fi
25780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25781 $as_echo "$gl_cv_next_stdarg_h" >&6; }
25782      fi
25783      NEXT_STDARG_H=$gl_cv_next_stdarg_h
25784
25785      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25786        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25787        gl_next_as_first_directive='<'stdarg.h'>'
25788      else
25789        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25790        gl_next_as_first_directive=$gl_cv_next_stdarg_h
25791      fi
25792      NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
25793
25794
25795
25796
25797             if test "$gl_cv_next_stdarg_h" = '""'; then
25798         gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25799         NEXT_STDARG_H="$gl_cv_next_stdarg_h"
25800       fi
25801     else
25802
25803   saved_as_echo_n="$as_echo_n"
25804   as_echo_n=':'
25805   if test "${gl_cv_func___va_copy+set}" = set; then :
25806   $as_echo_n "(cached) " >&6
25807 else
25808
25809         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25810 /* end confdefs.h.  */
25811 #include <stdarg.h>
25812 int
25813 main ()
25814 {
25815
25816 #ifndef __va_copy
25817 error, bail out
25818 #endif
25819
25820   ;
25821   return 0;
25822 }
25823 _ACEOF
25824 if ac_fn_c_try_compile "$LINENO"; then :
25825   gl_cv_func___va_copy=yes
25826 else
25827   gl_cv_func___va_copy=no
25828 fi
25829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25830 fi
25831
25832   as_echo_n="$saved_as_echo_n"
25833
25834       if test $gl_cv_func___va_copy = yes; then
25835
25836 $as_echo "#define va_copy __va_copy" >>confdefs.h
25837
25838       else
25839
25840
25841 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
25842
25843       fi
25844     fi
25845   fi
25846
25847   # Code from module stdbool:
25848
25849
25850
25851   # Define two additional variables used in the Makefile substitution.
25852
25853   if test "$ac_cv_header_stdbool_h" = yes; then
25854     STDBOOL_H=''
25855   else
25856     STDBOOL_H='stdbool.h'
25857   fi
25858
25859
25860   if test "$ac_cv_type__Bool" = yes; then
25861     HAVE__BOOL=1
25862   else
25863     HAVE__BOOL=0
25864   fi
25865
25866
25867   # Code from module stddef:
25868
25869
25870
25871   if test $gt_cv_c_wchar_t = no; then
25872     HAVE_WCHAR_T=0
25873     STDDEF_H=stddef.h
25874   fi
25875   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25876 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25877 if test "${gl_cv_decl_null_works+set}" = set; then :
25878   $as_echo_n "(cached) " >&6
25879 else
25880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25881 /* end confdefs.h.  */
25882 #include <stddef.h>
25883       int test[2 * (sizeof NULL == sizeof (void *)) -1];
25884
25885 int
25886 main ()
25887 {
25888
25889   ;
25890   return 0;
25891 }
25892 _ACEOF
25893 if ac_fn_c_try_compile "$LINENO"; then :
25894   gl_cv_decl_null_works=yes
25895 else
25896   gl_cv_decl_null_works=no
25897 fi
25898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25899 fi
25900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25901 $as_echo "$gl_cv_decl_null_works" >&6; }
25902   if test $gl_cv_decl_null_works = no; then
25903     REPLACE_NULL=1
25904     STDDEF_H=stddef.h
25905   fi
25906   if test -n "$STDDEF_H"; then
25907
25908
25909
25910
25911
25912
25913
25914
25915      if test $gl_cv_have_include_next = yes; then
25916        gl_cv_next_stddef_h='<'stddef.h'>'
25917      else
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25919 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25920 if test "${gl_cv_next_stddef_h+set}" = set; then :
25921   $as_echo_n "(cached) " >&6
25922 else
25923
25924                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25925 /* end confdefs.h.  */
25926 #include <stddef.h>
25927
25928 _ACEOF
25929                                                                                                                         case "$host_os" in
25930                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
25931                  *)    gl_absname_cpp="$ac_cpp" ;;
25932                esac
25933                                                             gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25934                   sed -n '\#/stddef.h#{
25935                     s#.*"\(.*/stddef.h\)".*#\1#
25936                     s#^/[^/]#//&#
25937                     p
25938                     q
25939                   }'`'"'
25940
25941
25942 fi
25943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25944 $as_echo "$gl_cv_next_stddef_h" >&6; }
25945      fi
25946      NEXT_STDDEF_H=$gl_cv_next_stddef_h
25947
25948      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25949        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25950        gl_next_as_first_directive='<'stddef.h'>'
25951      else
25952        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25953        gl_next_as_first_directive=$gl_cv_next_stddef_h
25954      fi
25955      NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25956
25957
25958
25959
25960   fi
25961
25962   # Code from module stdint:
25963
25964
25965
25966   if test $ac_cv_type_long_long_int = yes; then
25967     HAVE_LONG_LONG_INT=1
25968   else
25969     HAVE_LONG_LONG_INT=0
25970   fi
25971
25972
25973   if test $ac_cv_type_unsigned_long_long_int = yes; then
25974     HAVE_UNSIGNED_LONG_LONG_INT=1
25975   else
25976     HAVE_UNSIGNED_LONG_LONG_INT=0
25977   fi
25978
25979
25980
25981   if test $ac_cv_header_wchar_h = yes; then
25982     HAVE_WCHAR_H=1
25983   else
25984     HAVE_WCHAR_H=0
25985   fi
25986
25987
25988       if test $ac_cv_header_inttypes_h = yes; then
25989     HAVE_INTTYPES_H=1
25990   else
25991     HAVE_INTTYPES_H=0
25992   fi
25993
25994
25995       if test $ac_cv_header_sys_types_h = yes; then
25996     HAVE_SYS_TYPES_H=1
25997   else
25998     HAVE_SYS_TYPES_H=0
25999   fi
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011      if test $gl_cv_have_include_next = yes; then
26012        gl_cv_next_stdint_h='<'stdint.h'>'
26013      else
26014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
26015 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
26016 if test "${gl_cv_next_stdint_h+set}" = set; then :
26017   $as_echo_n "(cached) " >&6
26018 else
26019
26020              if test $ac_cv_header_stdint_h = yes; then
26021
26022
26023                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26024 /* end confdefs.h.  */
26025 #include <stdint.h>
26026
26027 _ACEOF
26028                                                                                                                         case "$host_os" in
26029                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26030                  *)    gl_absname_cpp="$ac_cpp" ;;
26031                esac
26032                                                             gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26033                   sed -n '\#/stdint.h#{
26034                     s#.*"\(.*/stdint.h\)".*#\1#
26035                     s#^/[^/]#//&#
26036                     p
26037                     q
26038                   }'`'"'
26039           else
26040                gl_cv_next_stdint_h='<'stdint.h'>'
26041              fi
26042
26043
26044 fi
26045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
26046 $as_echo "$gl_cv_next_stdint_h" >&6; }
26047      fi
26048      NEXT_STDINT_H=$gl_cv_next_stdint_h
26049
26050      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26051        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26052        gl_next_as_first_directive='<'stdint.h'>'
26053      else
26054        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26055        gl_next_as_first_directive=$gl_cv_next_stdint_h
26056      fi
26057      NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
26058
26059
26060
26061
26062   if test $ac_cv_header_stdint_h = yes; then
26063     HAVE_STDINT_H=1
26064   else
26065     HAVE_STDINT_H=0
26066   fi
26067
26068
26069     if test $ac_cv_header_stdint_h = yes; then
26070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
26071 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
26072 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
26073   $as_echo_n "(cached) " >&6
26074 else
26075   gl_cv_header_working_stdint_h=no
26076        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26077 /* end confdefs.h.  */
26078
26079
26080 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
26081 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
26082 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
26083 #include <stdint.h>
26084 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
26085 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
26086 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
26087 #endif
26088
26089
26090   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26091      included before <wchar.h>.  */
26092   #include <stddef.h>
26093   #include <signal.h>
26094   #if HAVE_WCHAR_H
26095   # include <stdio.h>
26096   # include <time.h>
26097   # include <wchar.h>
26098   #endif
26099
26100
26101 #ifdef INT8_MAX
26102 int8_t a1 = INT8_MAX;
26103 int8_t a1min = INT8_MIN;
26104 #endif
26105 #ifdef INT16_MAX
26106 int16_t a2 = INT16_MAX;
26107 int16_t a2min = INT16_MIN;
26108 #endif
26109 #ifdef INT32_MAX
26110 int32_t a3 = INT32_MAX;
26111 int32_t a3min = INT32_MIN;
26112 #endif
26113 #ifdef INT64_MAX
26114 int64_t a4 = INT64_MAX;
26115 int64_t a4min = INT64_MIN;
26116 #endif
26117 #ifdef UINT8_MAX
26118 uint8_t b1 = UINT8_MAX;
26119 #else
26120 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
26121 #endif
26122 #ifdef UINT16_MAX
26123 uint16_t b2 = UINT16_MAX;
26124 #endif
26125 #ifdef UINT32_MAX
26126 uint32_t b3 = UINT32_MAX;
26127 #endif
26128 #ifdef UINT64_MAX
26129 uint64_t b4 = UINT64_MAX;
26130 #endif
26131 int_least8_t c1 = INT8_C (0x7f);
26132 int_least8_t c1max = INT_LEAST8_MAX;
26133 int_least8_t c1min = INT_LEAST8_MIN;
26134 int_least16_t c2 = INT16_C (0x7fff);
26135 int_least16_t c2max = INT_LEAST16_MAX;
26136 int_least16_t c2min = INT_LEAST16_MIN;
26137 int_least32_t c3 = INT32_C (0x7fffffff);
26138 int_least32_t c3max = INT_LEAST32_MAX;
26139 int_least32_t c3min = INT_LEAST32_MIN;
26140 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
26141 int_least64_t c4max = INT_LEAST64_MAX;
26142 int_least64_t c4min = INT_LEAST64_MIN;
26143 uint_least8_t d1 = UINT8_C (0xff);
26144 uint_least8_t d1max = UINT_LEAST8_MAX;
26145 uint_least16_t d2 = UINT16_C (0xffff);
26146 uint_least16_t d2max = UINT_LEAST16_MAX;
26147 uint_least32_t d3 = UINT32_C (0xffffffff);
26148 uint_least32_t d3max = UINT_LEAST32_MAX;
26149 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
26150 uint_least64_t d4max = UINT_LEAST64_MAX;
26151 int_fast8_t e1 = INT_FAST8_MAX;
26152 int_fast8_t e1min = INT_FAST8_MIN;
26153 int_fast16_t e2 = INT_FAST16_MAX;
26154 int_fast16_t e2min = INT_FAST16_MIN;
26155 int_fast32_t e3 = INT_FAST32_MAX;
26156 int_fast32_t e3min = INT_FAST32_MIN;
26157 int_fast64_t e4 = INT_FAST64_MAX;
26158 int_fast64_t e4min = INT_FAST64_MIN;
26159 uint_fast8_t f1 = UINT_FAST8_MAX;
26160 uint_fast16_t f2 = UINT_FAST16_MAX;
26161 uint_fast32_t f3 = UINT_FAST32_MAX;
26162 uint_fast64_t f4 = UINT_FAST64_MAX;
26163 #ifdef INTPTR_MAX
26164 intptr_t g = INTPTR_MAX;
26165 intptr_t gmin = INTPTR_MIN;
26166 #endif
26167 #ifdef UINTPTR_MAX
26168 uintptr_t h = UINTPTR_MAX;
26169 #endif
26170 intmax_t i = INTMAX_MAX;
26171 uintmax_t j = UINTMAX_MAX;
26172
26173 #include <limits.h> /* for CHAR_BIT */
26174 #define TYPE_MINIMUM(t) \
26175   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
26176 #define TYPE_MAXIMUM(t) \
26177   ((t) ((t) 0 < (t) -1 \
26178         ? (t) -1 \
26179         : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
26180 struct s {
26181   int check_PTRDIFF:
26182       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
26183       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
26184       ? 1 : -1;
26185   /* Detect bug in FreeBSD 6.0 / ia64.  */
26186   int check_SIG_ATOMIC:
26187       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
26188       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
26189       ? 1 : -1;
26190   int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
26191   int check_WCHAR:
26192       WCHAR_MIN == TYPE_MINIMUM (wchar_t)
26193       && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
26194       ? 1 : -1;
26195   /* Detect bug in mingw.  */
26196   int check_WINT:
26197       WINT_MIN == TYPE_MINIMUM (wint_t)
26198       && WINT_MAX == TYPE_MAXIMUM (wint_t)
26199       ? 1 : -1;
26200
26201   /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
26202   int check_UINT8_C:
26203         (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
26204   int check_UINT16_C:
26205         (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
26206
26207   /* Detect bugs in OpenBSD 3.9 stdint.h.  */
26208 #ifdef UINT8_MAX
26209   int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
26210 #endif
26211 #ifdef UINT16_MAX
26212   int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
26213 #endif
26214 #ifdef UINT32_MAX
26215   int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
26216 #endif
26217 #ifdef UINT64_MAX
26218   int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
26219 #endif
26220   int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
26221   int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
26222   int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
26223   int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
26224   int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
26225   int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
26226   int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
26227   int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
26228   int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
26229   int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
26230   int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
26231 };
26232
26233 int
26234 main ()
26235 {
26236
26237   ;
26238   return 0;
26239 }
26240 _ACEOF
26241 if ac_fn_c_try_compile "$LINENO"; then :
26242                                                     if test "$cross_compiling" = yes; then :
26243                  gl_cv_header_working_stdint_h=yes
26244
26245 else
26246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26247 /* end confdefs.h.  */
26248
26249
26250 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
26251 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
26252 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
26253 #include <stdint.h>
26254
26255
26256   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26257      included before <wchar.h>.  */
26258   #include <stddef.h>
26259   #include <signal.h>
26260   #if HAVE_WCHAR_H
26261   # include <stdio.h>
26262   # include <time.h>
26263   # include <wchar.h>
26264   #endif
26265
26266
26267 #include <stdio.h>
26268 #include <string.h>
26269 #define MVAL(macro) MVAL1(macro)
26270 #define MVAL1(expression) #expression
26271 static const char *macro_values[] =
26272   {
26273 #ifdef INT8_MAX
26274     MVAL (INT8_MAX),
26275 #endif
26276 #ifdef INT16_MAX
26277     MVAL (INT16_MAX),
26278 #endif
26279 #ifdef INT32_MAX
26280     MVAL (INT32_MAX),
26281 #endif
26282 #ifdef INT64_MAX
26283     MVAL (INT64_MAX),
26284 #endif
26285 #ifdef UINT8_MAX
26286     MVAL (UINT8_MAX),
26287 #endif
26288 #ifdef UINT16_MAX
26289     MVAL (UINT16_MAX),
26290 #endif
26291 #ifdef UINT32_MAX
26292     MVAL (UINT32_MAX),
26293 #endif
26294 #ifdef UINT64_MAX
26295     MVAL (UINT64_MAX),
26296 #endif
26297     NULL
26298   };
26299
26300 int
26301 main ()
26302 {
26303
26304   const char **mv;
26305   for (mv = macro_values; *mv != NULL; mv++)
26306     {
26307       const char *value = *mv;
26308       /* Test whether it looks like a cast expression.  */
26309       if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
26310           || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
26311           || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
26312           || strncmp (value, "((int)"/*)*/, 6) == 0
26313           || strncmp (value, "((signed short)"/*)*/, 15) == 0
26314           || strncmp (value, "((signed char)"/*)*/, 14) == 0)
26315         return mv - macro_values + 1;
26316     }
26317   return 0;
26318
26319   ;
26320   return 0;
26321 }
26322 _ACEOF
26323 if ac_fn_c_try_run "$LINENO"; then :
26324   gl_cv_header_working_stdint_h=yes
26325 fi
26326 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26327   conftest.$ac_objext conftest.beam conftest.$ac_ext
26328 fi
26329
26330
26331 fi
26332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26333
26334 fi
26335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
26336 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
26337   fi
26338   if test "$gl_cv_header_working_stdint_h" = yes; then
26339     STDINT_H=
26340   else
26341             for ac_header in sys/inttypes.h sys/bitypes.h
26342 do :
26343   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26344 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
26345 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26346   cat >>confdefs.h <<_ACEOF
26347 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26348 _ACEOF
26349
26350 fi
26351
26352 done
26353
26354     if test $ac_cv_header_sys_inttypes_h = yes; then
26355       HAVE_SYS_INTTYPES_H=1
26356     else
26357       HAVE_SYS_INTTYPES_H=0
26358     fi
26359
26360     if test $ac_cv_header_sys_bitypes_h = yes; then
26361       HAVE_SYS_BITYPES_H=1
26362     else
26363       HAVE_SYS_BITYPES_H=0
26364     fi
26365
26366
26367
26368
26369   if test $APPLE_UNIVERSAL_BUILD = 0; then
26370
26371
26372   for gltype in ptrdiff_t size_t ; do
26373     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
26374 $as_echo_n "checking for bit size of $gltype... " >&6; }
26375 if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
26376   $as_echo_n "(cached) " >&6
26377 else
26378   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
26379   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26380      included before <wchar.h>.  */
26381   #include <stddef.h>
26382   #include <signal.h>
26383   #if HAVE_WCHAR_H
26384   # include <stdio.h>
26385   # include <time.h>
26386   # include <wchar.h>
26387   #endif
26388
26389 #include <limits.h>"; then :
26390
26391 else
26392   result=unknown
26393 fi
26394
26395        eval gl_cv_bitsizeof_${gltype}=\$result
26396
26397 fi
26398 eval ac_res=\$gl_cv_bitsizeof_${gltype}
26399                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26400 $as_echo "$ac_res" >&6; }
26401     eval result=\$gl_cv_bitsizeof_${gltype}
26402     if test $result = unknown; then
26403                                                 result=0
26404     fi
26405     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26406     cat >>confdefs.h <<_ACEOF
26407 #define BITSIZEOF_${GLTYPE} $result
26408 _ACEOF
26409
26410     eval BITSIZEOF_${GLTYPE}=\$result
26411   done
26412
26413
26414   fi
26415
26416
26417   for gltype in sig_atomic_t wchar_t wint_t ; do
26418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
26419 $as_echo_n "checking for bit size of $gltype... " >&6; }
26420 if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
26421   $as_echo_n "(cached) " >&6
26422 else
26423   if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
26424   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26425      included before <wchar.h>.  */
26426   #include <stddef.h>
26427   #include <signal.h>
26428   #if HAVE_WCHAR_H
26429   # include <stdio.h>
26430   # include <time.h>
26431   # include <wchar.h>
26432   #endif
26433
26434 #include <limits.h>"; then :
26435
26436 else
26437   result=unknown
26438 fi
26439
26440        eval gl_cv_bitsizeof_${gltype}=\$result
26441
26442 fi
26443 eval ac_res=\$gl_cv_bitsizeof_${gltype}
26444                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26445 $as_echo "$ac_res" >&6; }
26446     eval result=\$gl_cv_bitsizeof_${gltype}
26447     if test $result = unknown; then
26448                                                 result=0
26449     fi
26450     GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26451     cat >>confdefs.h <<_ACEOF
26452 #define BITSIZEOF_${GLTYPE} $result
26453 _ACEOF
26454
26455     eval BITSIZEOF_${GLTYPE}=\$result
26456   done
26457
26458
26459
26460
26461   for gltype in sig_atomic_t wchar_t wint_t ; do
26462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
26463 $as_echo_n "checking whether $gltype is signed... " >&6; }
26464 if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
26465   $as_echo_n "(cached) " >&6
26466 else
26467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26468 /* end confdefs.h.  */
26469
26470   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26471      included before <wchar.h>.  */
26472   #include <stddef.h>
26473   #include <signal.h>
26474   #if HAVE_WCHAR_H
26475   # include <stdio.h>
26476   # include <time.h>
26477   # include <wchar.h>
26478   #endif
26479
26480             int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
26481 int
26482 main ()
26483 {
26484
26485   ;
26486   return 0;
26487 }
26488 _ACEOF
26489 if ac_fn_c_try_compile "$LINENO"; then :
26490   result=yes
26491 else
26492   result=no
26493 fi
26494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26495        eval gl_cv_type_${gltype}_signed=\$result
26496
26497 fi
26498 eval ac_res=\$gl_cv_type_${gltype}_signed
26499                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26500 $as_echo "$ac_res" >&6; }
26501     eval result=\$gl_cv_type_${gltype}_signed
26502     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26503     if test "$result" = yes; then
26504       cat >>confdefs.h <<_ACEOF
26505 #define HAVE_SIGNED_${GLTYPE} 1
26506 _ACEOF
26507
26508       eval HAVE_SIGNED_${GLTYPE}=1
26509     else
26510       eval HAVE_SIGNED_${GLTYPE}=0
26511     fi
26512   done
26513
26514
26515   gl_cv_type_ptrdiff_t_signed=yes
26516   gl_cv_type_size_t_signed=no
26517   if test $APPLE_UNIVERSAL_BUILD = 0; then
26518
26519
26520   for gltype in ptrdiff_t size_t ; do
26521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
26522 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
26523 if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
26524   $as_echo_n "(cached) " >&6
26525 else
26526   eval gl_cv_type_${gltype}_suffix=no
26527        eval result=\$gl_cv_type_${gltype}_signed
26528        if test "$result" = yes; then
26529          glsufu=
26530        else
26531          glsufu=u
26532        fi
26533        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
26534          case $glsuf in
26535            '')  gltype1='int';;
26536            l)   gltype1='long int';;
26537            ll)  gltype1='long long int';;
26538            i64) gltype1='__int64';;
26539            u)   gltype1='unsigned int';;
26540            ul)  gltype1='unsigned long int';;
26541            ull) gltype1='unsigned long long int';;
26542            ui64)gltype1='unsigned __int64';;
26543          esac
26544          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26545 /* end confdefs.h.  */
26546
26547   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26548      included before <wchar.h>.  */
26549   #include <stddef.h>
26550   #include <signal.h>
26551   #if HAVE_WCHAR_H
26552   # include <stdio.h>
26553   # include <time.h>
26554   # include <wchar.h>
26555   #endif
26556
26557               extern $gltype foo;
26558               extern $gltype1 foo;
26559 int
26560 main ()
26561 {
26562
26563   ;
26564   return 0;
26565 }
26566 _ACEOF
26567 if ac_fn_c_try_compile "$LINENO"; then :
26568   eval gl_cv_type_${gltype}_suffix=\$glsuf
26569 fi
26570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26571          eval result=\$gl_cv_type_${gltype}_suffix
26572          test "$result" != no && break
26573        done
26574 fi
26575 eval ac_res=\$gl_cv_type_${gltype}_suffix
26576                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26577 $as_echo "$ac_res" >&6; }
26578     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26579     eval result=\$gl_cv_type_${gltype}_suffix
26580     test "$result" = no && result=
26581     eval ${GLTYPE}_SUFFIX=\$result
26582     cat >>confdefs.h <<_ACEOF
26583 #define ${GLTYPE}_SUFFIX $result
26584 _ACEOF
26585
26586   done
26587
26588
26589   fi
26590
26591
26592   for gltype in sig_atomic_t wchar_t wint_t ; do
26593     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
26594 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
26595 if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
26596   $as_echo_n "(cached) " >&6
26597 else
26598   eval gl_cv_type_${gltype}_suffix=no
26599        eval result=\$gl_cv_type_${gltype}_signed
26600        if test "$result" = yes; then
26601          glsufu=
26602        else
26603          glsufu=u
26604        fi
26605        for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
26606          case $glsuf in
26607            '')  gltype1='int';;
26608            l)   gltype1='long int';;
26609            ll)  gltype1='long long int';;
26610            i64) gltype1='__int64';;
26611            u)   gltype1='unsigned int';;
26612            ul)  gltype1='unsigned long int';;
26613            ull) gltype1='unsigned long long int';;
26614            ui64)gltype1='unsigned __int64';;
26615          esac
26616          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26617 /* end confdefs.h.  */
26618
26619   /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26620      included before <wchar.h>.  */
26621   #include <stddef.h>
26622   #include <signal.h>
26623   #if HAVE_WCHAR_H
26624   # include <stdio.h>
26625   # include <time.h>
26626   # include <wchar.h>
26627   #endif
26628
26629               extern $gltype foo;
26630               extern $gltype1 foo;
26631 int
26632 main ()
26633 {
26634
26635   ;
26636   return 0;
26637 }
26638 _ACEOF
26639 if ac_fn_c_try_compile "$LINENO"; then :
26640   eval gl_cv_type_${gltype}_suffix=\$glsuf
26641 fi
26642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26643          eval result=\$gl_cv_type_${gltype}_suffix
26644          test "$result" != no && break
26645        done
26646 fi
26647 eval ac_res=\$gl_cv_type_${gltype}_suffix
26648                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26649 $as_echo "$ac_res" >&6; }
26650     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
26651     eval result=\$gl_cv_type_${gltype}_suffix
26652     test "$result" = no && result=
26653     eval ${GLTYPE}_SUFFIX=\$result
26654     cat >>confdefs.h <<_ACEOF
26655 #define ${GLTYPE}_SUFFIX $result
26656 _ACEOF
26657
26658   done
26659
26660
26661
26662     STDINT_H=stdint.h
26663   fi
26664
26665
26666   # Code from module stdio:
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678      if test $gl_cv_have_include_next = yes; then
26679        gl_cv_next_stdio_h='<'stdio.h'>'
26680      else
26681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26682 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26683 if test "${gl_cv_next_stdio_h+set}" = set; then :
26684   $as_echo_n "(cached) " >&6
26685 else
26686
26687                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26688 /* end confdefs.h.  */
26689 #include <stdio.h>
26690
26691 _ACEOF
26692                                                                                                                         case "$host_os" in
26693                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26694                  *)    gl_absname_cpp="$ac_cpp" ;;
26695                esac
26696                                                             gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26697                   sed -n '\#/stdio.h#{
26698                     s#.*"\(.*/stdio.h\)".*#\1#
26699                     s#^/[^/]#//&#
26700                     p
26701                     q
26702                   }'`'"'
26703
26704
26705 fi
26706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26707 $as_echo "$gl_cv_next_stdio_h" >&6; }
26708      fi
26709      NEXT_STDIO_H=$gl_cv_next_stdio_h
26710
26711      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26712        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26713        gl_next_as_first_directive='<'stdio.h'>'
26714      else
26715        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26716        gl_next_as_first_directive=$gl_cv_next_stdio_h
26717      fi
26718      NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26719
26720
26721
26722
26723       GNULIB_FPRINTF=1
26724   GNULIB_PRINTF=1
26725   GNULIB_VFPRINTF=1
26726   GNULIB_VPRINTF=1
26727   GNULIB_FPUTC=1
26728   GNULIB_PUTC=1
26729   GNULIB_PUTCHAR=1
26730   GNULIB_FPUTS=1
26731   GNULIB_PUTS=1
26732   GNULIB_FWRITE=1
26733
26734
26735
26736
26737   # Code from module stdlib:
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748      if test $gl_cv_have_include_next = yes; then
26749        gl_cv_next_stdlib_h='<'stdlib.h'>'
26750      else
26751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26752 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26753 if test "${gl_cv_next_stdlib_h+set}" = set; then :
26754   $as_echo_n "(cached) " >&6
26755 else
26756
26757                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26758 /* end confdefs.h.  */
26759 #include <stdlib.h>
26760
26761 _ACEOF
26762                                                                                                                         case "$host_os" in
26763                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
26764                  *)    gl_absname_cpp="$ac_cpp" ;;
26765                esac
26766                                                             gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26767                   sed -n '\#/stdlib.h#{
26768                     s#.*"\(.*/stdlib.h\)".*#\1#
26769                     s#^/[^/]#//&#
26770                     p
26771                     q
26772                   }'`'"'
26773
26774
26775 fi
26776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26777 $as_echo "$gl_cv_next_stdlib_h" >&6; }
26778      fi
26779      NEXT_STDLIB_H=$gl_cv_next_stdlib_h
26780
26781      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26782        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26783        gl_next_as_first_directive='<'stdlib.h'>'
26784      else
26785        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26786        gl_next_as_first_directive=$gl_cv_next_stdlib_h
26787      fi
26788      NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
26789
26790
26791
26792
26793
26794
26795
26796   # Code from module stdlib-safer:
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806   M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext"
26807
26808
26809   # Code from module strchrnul:
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822   for ac_func in strchrnul
26823 do :
26824   ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
26825 if test "x$ac_cv_func_strchrnul" = x""yes; then :
26826   cat >>confdefs.h <<_ACEOF
26827 #define HAVE_STRCHRNUL 1
26828 _ACEOF
26829
26830 else
26831
26832     M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
26833
26834 fi
26835 done
26836
26837
26838   if test $ac_cv_func_strchrnul = no; then
26839     HAVE_STRCHRNUL=0
26840     :
26841   fi
26842
26843
26844
26845
26846   GNULIB_STRCHRNUL=1
26847
26848
26849
26850 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26851
26852
26853
26854   # Code from module streq:
26855   # Code from module strerror:
26856
26857
26858   if test $REPLACE_STRERROR = 1; then
26859
26860
26861
26862
26863
26864
26865
26866
26867   M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
26868
26869
26870 cat >>confdefs.h <<_ACEOF
26871 #define REPLACE_STRERROR $REPLACE_STRERROR
26872 _ACEOF
26873
26874   fi
26875
26876
26877
26878
26879   GNULIB_STRERROR=1
26880
26881
26882
26883 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26884
26885
26886
26887   # Code from module string:
26888
26889
26890
26891   # Code from module strndup:
26892
26893
26894
26895
26896
26897
26898   if test $ac_cv_have_decl_strndup = no; then
26899     HAVE_DECL_STRNDUP=0
26900   fi
26901
26902   if test $ac_cv_func_strndup = yes; then
26903     # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
26904     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
26905 $as_echo_n "checking for working strndup... " >&6; }
26906 if test "${gl_cv_func_strndup_works+set}" = set; then :
26907   $as_echo_n "(cached) " >&6
26908 else
26909   if test "$cross_compiling" = yes; then :
26910
26911           case $host_os in
26912             aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
26913             *)               gl_cv_func_strndup_works="guessing yes";;
26914           esac
26915
26916 else
26917   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26918 /* end confdefs.h.  */
26919
26920          #include <string.h>
26921                            #include <stdlib.h>
26922 int
26923 main ()
26924 {
26925
26926 #ifndef HAVE_DECL_STRNDUP
26927   extern char *strndup (const char *, size_t);
26928 #endif
26929   char *s;
26930   s = strndup ("some longer string", 15);
26931   free (s);
26932   s = strndup ("shorter string", 13);
26933   return s[13] != '\0';
26934   ;
26935   return 0;
26936 }
26937 _ACEOF
26938 if ac_fn_c_try_run "$LINENO"; then :
26939   gl_cv_func_strndup_works=yes
26940 else
26941   gl_cv_func_strndup_works=no
26942 fi
26943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26944   conftest.$ac_objext conftest.beam conftest.$ac_ext
26945 fi
26946
26947 fi
26948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
26949 $as_echo "$gl_cv_func_strndup_works" >&6; }
26950     case $gl_cv_func_strndup_works in
26951       *no)
26952         REPLACE_STRNDUP=1
26953
26954
26955
26956
26957
26958
26959
26960
26961   M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
26962
26963         ;;
26964     esac
26965   else
26966
26967
26968
26969
26970
26971
26972
26973
26974   M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
26975
26976   fi
26977
26978
26979
26980
26981   GNULIB_STRNDUP=1
26982
26983
26984
26985 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
26986
26987
26988
26989   # Code from module strnlen:
26990
26991
26992
26993
26994
26995
26996   if test $ac_cv_have_decl_strnlen = no; then
26997     HAVE_DECL_STRNLEN=0
26998   else
26999     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
27000 $as_echo_n "checking for working strnlen... " >&6; }
27001 if test "${ac_cv_func_strnlen_working+set}" = set; then :
27002   $as_echo_n "(cached) " >&6
27003 else
27004   if test "$cross_compiling" = yes; then :
27005   ac_cv_func_strnlen_working=no
27006 else
27007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27008 /* end confdefs.h.  */
27009 $ac_includes_default
27010 int
27011 main ()
27012 {
27013
27014 #define S "foobar"
27015 #define S_LEN (sizeof S - 1)
27016
27017   /* At least one implementation is buggy: that of AIX 4.3 would
27018      give strnlen (S, 1) == 3.  */
27019
27020   int i;
27021   for (i = 0; i < S_LEN + 1; ++i)
27022     {
27023       int expected = i <= S_LEN ? i : S_LEN;
27024       if (strnlen (S, i) != expected)
27025         return 1;
27026     }
27027   return 0;
27028
27029   ;
27030   return 0;
27031 }
27032 _ACEOF
27033 if ac_fn_c_try_run "$LINENO"; then :
27034   ac_cv_func_strnlen_working=yes
27035 else
27036   ac_cv_func_strnlen_working=no
27037 fi
27038 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27039   conftest.$ac_objext conftest.beam conftest.$ac_ext
27040 fi
27041
27042 fi
27043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
27044 $as_echo "$ac_cv_func_strnlen_working" >&6; }
27045 test $ac_cv_func_strnlen_working = no &&
27046
27047
27048
27049
27050
27051
27052
27053   M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
27054
27055
27056         if test $ac_cv_func_strnlen_working = no; then
27057       REPLACE_STRNLEN=1
27058     fi
27059   fi
27060   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
27061
27062
27063
27064
27065
27066
27067
27068
27069   M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
27070
27071     :
27072   fi
27073
27074
27075
27076
27077   GNULIB_STRNLEN=1
27078
27079
27080
27081 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
27082
27083
27084
27085   # Code from module strsignal:
27086
27087
27088
27089
27090
27091
27092   if test $ac_cv_have_decl_strsignal = no; then
27093     HAVE_DECL_STRSIGNAL=0
27094   fi
27095
27096   for ac_func in strsignal
27097 do :
27098   ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
27099 if test "x$ac_cv_func_strsignal" = x""yes; then :
27100   cat >>confdefs.h <<_ACEOF
27101 #define HAVE_STRSIGNAL 1
27102 _ACEOF
27103
27104 fi
27105 done
27106
27107   if test $ac_cv_func_strsignal = yes; then
27108             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
27109 $as_echo_n "checking whether strsignal always returns a string... " >&6; }
27110 if test "${gl_cv_func_working_strsignal+set}" = set; then :
27111   $as_echo_n "(cached) " >&6
27112 else
27113   if test "$cross_compiling" = yes; then :
27114   case "$host_os" in
27115             solaris* | aix*) gl_cv_func_working_strsignal=no;;
27116             *)               gl_cv_func_working_strsignal="guessing yes";;
27117           esac
27118 else
27119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27120 /* end confdefs.h.  */
27121 #include <string.h>
27122 #include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
27123
27124 int
27125 main ()
27126 {
27127 int result = 0;
27128               char *s = strsignal (-1);
27129               if (s == (char *) 0)
27130                 result |= 1;
27131               if (s == (char *) -1)
27132                 result |= 2;
27133               return result;
27134
27135   ;
27136   return 0;
27137 }
27138 _ACEOF
27139 if ac_fn_c_try_run "$LINENO"; then :
27140   gl_cv_func_working_strsignal=yes
27141 else
27142   gl_cv_func_working_strsignal=no
27143 fi
27144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27145   conftest.$ac_objext conftest.beam conftest.$ac_ext
27146 fi
27147
27148 fi
27149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
27150 $as_echo "$gl_cv_func_working_strsignal" >&6; }
27151   else
27152     gl_cv_func_working_strsignal=no
27153   fi
27154
27155   if test "$gl_cv_func_working_strsignal" = no; then
27156     if test $ac_cv_func_strsignal = yes; then
27157       REPLACE_STRSIGNAL=1
27158     fi
27159
27160
27161
27162
27163
27164
27165
27166
27167   M4_LIBOBJS="$M4_LIBOBJS strsignal.$ac_objext"
27168
27169
27170
27171   ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
27172 "
27173 if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then :
27174   ac_have_decl=1
27175 else
27176   ac_have_decl=0
27177 fi
27178
27179 cat >>confdefs.h <<_ACEOF
27180 #define HAVE_DECL__SYS_SIGLIST $ac_have_decl
27181 _ACEOF
27182
27183
27184   fi
27185
27186
27187
27188
27189   GNULIB_STRSIGNAL=1
27190
27191
27192
27193 $as_echo "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
27194
27195
27196
27197   # Code from module strstr:
27198
27199
27200   if test $REPLACE_STRSTR = 0; then
27201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
27202 $as_echo_n "checking whether strstr works in linear time... " >&6; }
27203 if test "${gl_cv_func_strstr_linear+set}" = set; then :
27204   $as_echo_n "(cached) " >&6
27205 else
27206   if test "$cross_compiling" = yes; then :
27207                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27208 /* end confdefs.h.  */
27209
27210 #include <features.h>
27211 #ifdef __GNU_LIBRARY__
27212  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
27213      && !defined __UCLIBC__
27214   Lucky user
27215  #endif
27216 #endif
27217 #ifdef __CYGWIN__
27218  #include <cygwin/version.h>
27219  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
27220   Lucky user
27221  #endif
27222 #endif
27223
27224 _ACEOF
27225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27226   $EGREP "Lucky user" >/dev/null 2>&1; then :
27227   gl_cv_func_strstr_linear=yes
27228 else
27229   gl_cv_func_strstr_linear="guessing no"
27230 fi
27231 rm -f conftest*
27232
27233
27234 else
27235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27236 /* end confdefs.h.  */
27237
27238 #include <signal.h> /* for signal */
27239 #include <string.h> /* for strstr */
27240 #include <stdlib.h> /* for malloc */
27241 #include <unistd.h> /* for alarm */
27242 static void quit (int sig) { exit (sig + 128); }
27243
27244 int
27245 main ()
27246 {
27247
27248     int result = 0;
27249     size_t m = 1000000;
27250     char *haystack = (char *) malloc (2 * m + 2);
27251     char *needle = (char *) malloc (m + 2);
27252     /* Failure to compile this test due to missing alarm is okay,
27253        since all such platforms (mingw) also have quadratic strstr.  */
27254     signal (SIGALRM, quit);
27255     alarm (5);
27256     /* Check for quadratic performance.  */
27257     if (haystack && needle)
27258       {
27259         memset (haystack, 'A', 2 * m);
27260         haystack[2 * m] = 'B';
27261         haystack[2 * m + 1] = 0;
27262         memset (needle, 'A', m);
27263         needle[m] = 'B';
27264         needle[m + 1] = 0;
27265         if (!strstr (haystack, needle))
27266           result |= 1;
27267       }
27268     return result;
27269
27270   ;
27271   return 0;
27272 }
27273 _ACEOF
27274 if ac_fn_c_try_run "$LINENO"; then :
27275   gl_cv_func_strstr_linear=yes
27276 else
27277   gl_cv_func_strstr_linear=no
27278 fi
27279 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27280   conftest.$ac_objext conftest.beam conftest.$ac_ext
27281 fi
27282
27283
27284 fi
27285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
27286 $as_echo "$gl_cv_func_strstr_linear" >&6; }
27287     if test "$gl_cv_func_strstr_linear" != yes; then
27288       REPLACE_STRSTR=1
27289     fi
27290   fi
27291   if test $REPLACE_STRSTR = 1; then
27292
27293
27294
27295
27296
27297
27298
27299
27300   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
27301
27302   fi
27303
27304   # Code from module strstr-simple:
27305
27306
27307
27308   if test "$gl_cv_func_memchr_works" != yes; then
27309     REPLACE_STRSTR=1
27310
27311
27312
27313
27314
27315
27316
27317
27318   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
27319
27320   else
27321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
27322 $as_echo_n "checking whether strstr works... " >&6; }
27323 if test "${gl_cv_func_strstr_works_always+set}" = set; then :
27324   $as_echo_n "(cached) " >&6
27325 else
27326   if test "$cross_compiling" = yes; then :
27327                                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27328 /* end confdefs.h.  */
27329
27330 #ifdef __GNU_LIBRARY__
27331  #include <features.h>
27332  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
27333      || defined __UCLIBC__
27334   Lucky user
27335  #endif
27336 #elif defined __CYGWIN__
27337  #include <cygwin/version.h>
27338  #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
27339   Lucky user
27340  #endif
27341 #else
27342   Lucky user
27343 #endif
27344
27345 _ACEOF
27346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27347   $EGREP "Lucky user" >/dev/null 2>&1; then :
27348   gl_cv_func_strstr_works_always=yes
27349 else
27350   gl_cv_func_strstr_works_always="guessing no"
27351 fi
27352 rm -f conftest*
27353
27354
27355 else
27356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27357 /* end confdefs.h.  */
27358
27359 #include <string.h> /* for strstr */
27360 #define P "_EF_BF_BD"
27361 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
27362 #define NEEDLE P P P P P
27363
27364 int
27365 main ()
27366 {
27367 return !!strstr (HAYSTACK, NEEDLE);
27368
27369   ;
27370   return 0;
27371 }
27372 _ACEOF
27373 if ac_fn_c_try_run "$LINENO"; then :
27374   gl_cv_func_strstr_works_always=yes
27375 else
27376   gl_cv_func_strstr_works_always=no
27377 fi
27378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27379   conftest.$ac_objext conftest.beam conftest.$ac_ext
27380 fi
27381
27382
27383 fi
27384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
27385 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
27386     if test "$gl_cv_func_strstr_works_always" != yes; then
27387       REPLACE_STRSTR=1
27388
27389
27390
27391
27392
27393
27394
27395
27396   M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
27397
27398     fi
27399   fi
27400
27401
27402
27403
27404   GNULIB_STRSTR=1
27405
27406
27407
27408 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
27409
27410
27411
27412   # Code from module strtod:
27413
27414
27415
27416   if test $ac_cv_have_decl_strtod != yes; then
27417     HAVE_STRTOD=0
27418   else
27419     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
27420 $as_echo_n "checking whether strtod obeys C99... " >&6; }
27421 if test "${gl_cv_func_strtod_works+set}" = set; then :
27422   $as_echo_n "(cached) " >&6
27423 else
27424   if test "$cross_compiling" = yes; then :
27425                   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27426 /* end confdefs.h.  */
27427
27428 #include <features.h>
27429 #ifdef __GNU_LIBRARY__
27430  #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2)) \
27431      && !defined __UCLIBC__
27432   Lucky user
27433  #endif
27434 #endif
27435
27436 _ACEOF
27437 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27438   $EGREP "Lucky user" >/dev/null 2>&1; then :
27439   gl_cv_func_strtod_works=yes
27440 else
27441   gl_cv_func_strtod_works="guessing no"
27442 fi
27443 rm -f conftest*
27444
27445 else
27446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27447 /* end confdefs.h.  */
27448
27449 #include <stdlib.h>
27450 #include <math.h>
27451 #include <errno.h>
27452 /* Compare two numbers with ==.
27453    This is a separate function because IRIX 6.5 "cc -O" miscompiles an
27454    'x == x' test.  */
27455 static int
27456 numeric_equal (double x, double y)
27457 {
27458   return x == y;
27459 }
27460
27461 int
27462 main ()
27463 {
27464
27465   int result = 0;
27466   {
27467     /* In some old versions of Linux (2000 or before), strtod mis-parses
27468        strings with leading '+'.  */
27469     const char *string = " +69";
27470     char *term;
27471     double value = strtod (string, &term);
27472     if (value != 69 || term != (string + 4))
27473       result |= 1;
27474   }
27475   {
27476     /* Under Solaris 2.4, strtod returns the wrong value for the
27477        terminating character under some conditions.  */
27478     const char *string = "NaN";
27479     char *term;
27480     strtod (string, &term);
27481     if (term != string && *(term - 1) == 0)
27482       result |= 2;
27483   }
27484   {
27485     /* Older glibc and Cygwin mis-parse "-0x".  */
27486     const char *string = "-0x";
27487     char *term;
27488     double value = strtod (string, &term);
27489     double zero = 0.0;
27490     if (1.0 / value != -1.0 / zero || term != (string + 2))
27491       result |= 4;
27492   }
27493   {
27494     /* Many platforms do not parse hex floats.  */
27495     const char *string = "0XaP+1";
27496     char *term;
27497     double value = strtod (string, &term);
27498     if (value != 20.0 || term != (string + 6))
27499       result |= 8;
27500   }
27501   {
27502     /* Many platforms do not parse infinities.  HP-UX 11.31 parses inf,
27503        but mistakenly sets errno.  */
27504     const char *string = "inf";
27505     char *term;
27506     double value;
27507     errno = 0;
27508     value = strtod (string, &term);
27509     if (value != HUGE_VAL || term != (string + 3) || errno)
27510       result |= 16;
27511   }
27512   {
27513     /* glibc 2.7 and cygwin 1.5.24 misparse "nan()".  */
27514     const char *string = "nan()";
27515     char *term;
27516     double value = strtod (string, &term);
27517     if (numeric_equal (value, value) || term != (string + 5))
27518       result |= 32;
27519   }
27520   {
27521     /* darwin 10.6.1 misparses "nan(".  */
27522     const char *string = "nan(";
27523     char *term;
27524     double value = strtod (string, &term);
27525     if (numeric_equal (value, value) || term != (string + 3))
27526       result |= 64;
27527   }
27528   return result;
27529
27530   ;
27531   return 0;
27532 }
27533 _ACEOF
27534 if ac_fn_c_try_run "$LINENO"; then :
27535   gl_cv_func_strtod_works=yes
27536 else
27537   gl_cv_func_strtod_works=no
27538 fi
27539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27540   conftest.$ac_objext conftest.beam conftest.$ac_ext
27541 fi
27542
27543 fi
27544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
27545 $as_echo "$gl_cv_func_strtod_works" >&6; }
27546     if test "$gl_cv_func_strtod_works" != yes; then
27547       REPLACE_STRTOD=1
27548     fi
27549   fi
27550   if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
27551
27552
27553
27554
27555
27556
27557
27558
27559   M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
27560
27561
27562
27563   if test $gl_cv_func_ldexp_no_libm = yes; then
27564
27565 $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
27566
27567   fi
27568
27569   fi
27570
27571
27572
27573
27574   GNULIB_STRTOD=1
27575
27576
27577
27578 $as_echo "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
27579
27580
27581
27582   # Code from module strtol:
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592   for ac_func in strtol
27593 do :
27594   ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
27595 if test "x$ac_cv_func_strtol" = x""yes; then :
27596   cat >>confdefs.h <<_ACEOF
27597 #define HAVE_STRTOL 1
27598 _ACEOF
27599
27600 else
27601
27602     M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
27603
27604 fi
27605 done
27606
27607
27608
27609   # Code from module sys_stat:
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626      if test $gl_cv_have_include_next = yes; then
27627        gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27628      else
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27630 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27631 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27632   $as_echo_n "(cached) " >&6
27633 else
27634
27635              if test $ac_cv_header_sys_stat_h = yes; then
27636
27637
27638                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27639 /* end confdefs.h.  */
27640 #include <sys/stat.h>
27641
27642 _ACEOF
27643                                                                                                                         case "$host_os" in
27644                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27645                  *)    gl_absname_cpp="$ac_cpp" ;;
27646                esac
27647                                                             gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27648                   sed -n '\#/sys/stat.h#{
27649                     s#.*"\(.*/sys/stat.h\)".*#\1#
27650                     s#^/[^/]#//&#
27651                     p
27652                     q
27653                   }'`'"'
27654           else
27655                gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27656              fi
27657
27658
27659 fi
27660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27661 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
27662      fi
27663      NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27664
27665      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27666        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27667        gl_next_as_first_directive='<'sys/stat.h'>'
27668      else
27669        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27670        gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27671      fi
27672      NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27673
27674
27675
27676
27677
27678       ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27679      #include <sys/stat.h>
27680 "
27681 if test "x$ac_cv_type_nlink_t" = x""yes; then :
27682
27683 else
27684
27685 $as_echo "#define nlink_t int" >>confdefs.h
27686
27687 fi
27688
27689
27690
27691
27692
27693   # Code from module sys_time:
27694
27695
27696
27697
27698   # Code from module sys_wait:
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711      if test $gl_cv_have_include_next = yes; then
27712        gl_cv_next_sys_wait_h='<'sys/wait.h'>'
27713      else
27714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
27715 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
27716 if test "${gl_cv_next_sys_wait_h+set}" = set; then :
27717   $as_echo_n "(cached) " >&6
27718 else
27719
27720              if test $ac_cv_header_sys_wait_h = yes; then
27721
27722
27723                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27724 /* end confdefs.h.  */
27725 #include <sys/wait.h>
27726
27727 _ACEOF
27728                                                                                                                         case "$host_os" in
27729                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27730                  *)    gl_absname_cpp="$ac_cpp" ;;
27731                esac
27732                                                             gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27733                   sed -n '\#/sys/wait.h#{
27734                     s#.*"\(.*/sys/wait.h\)".*#\1#
27735                     s#^/[^/]#//&#
27736                     p
27737                     q
27738                   }'`'"'
27739           else
27740                gl_cv_next_sys_wait_h='<'sys/wait.h'>'
27741              fi
27742
27743
27744 fi
27745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
27746 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
27747      fi
27748      NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
27749
27750      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27751        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27752        gl_next_as_first_directive='<'sys/wait.h'>'
27753      else
27754        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27755        gl_next_as_first_directive=$gl_cv_next_sys_wait_h
27756      fi
27757      NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
27758
27759
27760
27761
27762
27763
27764
27765
27766   # Code from module tempname:
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778   M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext"
27779
27780
27781   :
27782
27783
27784   # Code from module threadlib:
27785
27786
27787
27788
27789   # Code from module time:
27790
27791
27792
27793   # Code from module tls:
27794
27795
27796
27797   # Code from module tmpdir:
27798
27799   for ac_func in __secure_getenv
27800 do :
27801   ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27802 if test "x$ac_cv_func___secure_getenv" = x""yes; then :
27803   cat >>confdefs.h <<_ACEOF
27804 #define HAVE___SECURE_GETENV 1
27805 _ACEOF
27806
27807 fi
27808 done
27809
27810
27811   # Code from module unistd:
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825      if test $gl_cv_have_include_next = yes; then
27826        gl_cv_next_unistd_h='<'unistd.h'>'
27827      else
27828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27829 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27830 if test "${gl_cv_next_unistd_h+set}" = set; then :
27831   $as_echo_n "(cached) " >&6
27832 else
27833
27834              if test $ac_cv_header_unistd_h = yes; then
27835
27836
27837                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27838 /* end confdefs.h.  */
27839 #include <unistd.h>
27840
27841 _ACEOF
27842                                                                                                                         case "$host_os" in
27843                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
27844                  *)    gl_absname_cpp="$ac_cpp" ;;
27845                esac
27846                                                             gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27847                   sed -n '\#/unistd.h#{
27848                     s#.*"\(.*/unistd.h\)".*#\1#
27849                     s#^/[^/]#//&#
27850                     p
27851                     q
27852                   }'`'"'
27853           else
27854                gl_cv_next_unistd_h='<'unistd.h'>'
27855              fi
27856
27857
27858 fi
27859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27860 $as_echo "$gl_cv_next_unistd_h" >&6; }
27861      fi
27862      NEXT_UNISTD_H=$gl_cv_next_unistd_h
27863
27864      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27865        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27866        gl_next_as_first_directive='<'unistd.h'>'
27867      else
27868        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27869        gl_next_as_first_directive=$gl_cv_next_unistd_h
27870      fi
27871      NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27872
27873
27874
27875
27876   if test $ac_cv_header_unistd_h = yes; then
27877     HAVE_UNISTD_H=1
27878   else
27879     HAVE_UNISTD_H=0
27880   fi
27881
27882
27883
27884
27885   # Code from module unistd-safer:
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896   M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext"
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906   M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext"
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916   M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext"
27917
27918
27919   # Code from module unlocked-io:
27920
27921
27922 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941   # Code from module update-copyright:
27942   # Code from module useless-if-before-free:
27943   # Code from module vasnprintf:
27944
27945
27946   if test $ac_cv_func_vasnprintf = no; then
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957   M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967   M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977   M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987   M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
27988
27989   if test $ac_cv_func_vasnprintf = yes; then
27990
27991 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
27992
27993   fi
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28006 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
28007
28008 else
28009
28010 $as_echo "#define ptrdiff_t long" >>confdefs.h
28011
28012
28013 fi
28014
28015
28016
28017
28018
28019
28020
28021   fi
28022
28023   # Code from module vasprintf:
28024
28025   for ac_func in vasprintf
28026 do :
28027   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
28028 if test "x$ac_cv_func_vasprintf" = x""yes; then :
28029   cat >>confdefs.h <<_ACEOF
28030 #define HAVE_VASPRINTF 1
28031 _ACEOF
28032
28033 fi
28034 done
28035
28036   if test $ac_cv_func_vasprintf = no; then
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046   M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056   M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
28057
28058
28059   if test $ac_cv_func_vasprintf = yes; then
28060     REPLACE_VASPRINTF=1
28061   else
28062     HAVE_VASPRINTF=0
28063   fi
28064
28065
28066
28067
28068
28069
28070
28071
28072   fi
28073
28074
28075
28076
28077   GNULIB_VASPRINTF=1
28078
28079
28080
28081 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
28082
28083
28084
28085
28086
28087   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
28088
28089
28090
28091   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
28092
28093   # Code from module vasprintf-posix:
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109   gl_cv_func_vasprintf_posix=no
28110   for ac_func in vasprintf
28111 do :
28112   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
28113 if test "x$ac_cv_func_vasprintf" = x""yes; then :
28114   cat >>confdefs.h <<_ACEOF
28115 #define HAVE_VASPRINTF 1
28116 _ACEOF
28117
28118 fi
28119 done
28120
28121   case "$gl_cv_func_printf_sizes_c99" in
28122     *yes)
28123       case "$gl_cv_func_printf_long_double" in
28124         *yes)
28125           case "$gl_cv_func_printf_infinite" in
28126             *yes)
28127               case "$gl_cv_func_printf_infinite_long_double" in
28128                 *yes)
28129                   case "$gl_cv_func_printf_directive_a" in
28130                     *yes)
28131                       case "$gl_cv_func_printf_directive_f" in
28132                         *yes)
28133                           case "$gl_cv_func_printf_directive_n" in
28134                             *yes)
28135                               case "$gl_cv_func_printf_directive_ls" in
28136                                 *yes)
28137                                   case "$gl_cv_func_printf_positions" in
28138                                     *yes)
28139                                       case "$gl_cv_func_printf_flag_grouping" in
28140                                         *yes)
28141                                           case "$gl_cv_func_printf_flag_leftadjust" in
28142                                             *yes)
28143                                               case "$gl_cv_func_printf_flag_zero" in
28144                                                 *yes)
28145                                                   case "$gl_cv_func_printf_precision" in
28146                                                     *yes)
28147                                                       case "$gl_cv_func_printf_enomem" in
28148                                                         *yes)
28149                                                           if test $ac_cv_func_vasprintf = yes; then
28150                                                             # vasprintf exists and is
28151                                                             # already POSIX compliant.
28152                                                             gl_cv_func_vasprintf_posix=yes
28153                                                           fi
28154                                                           ;;
28155                                                       esac
28156                                                       ;;
28157                                                   esac
28158                                                   ;;
28159                                               esac
28160                                               ;;
28161                                           esac
28162                                           ;;
28163                                       esac
28164                                       ;;
28165                                   esac
28166                                   ;;
28167                               esac
28168                               ;;
28169                           esac
28170                           ;;
28171                       esac
28172                       ;;
28173                   esac
28174                   ;;
28175               esac
28176               ;;
28177           esac
28178           ;;
28179       esac
28180       ;;
28181   esac
28182   if test $gl_cv_func_vasprintf_posix = no; then
28183
28184
28185
28186   case "$gl_cv_func_printf_infinite" in
28187     *yes)
28188       ;;
28189     *)
28190
28191 $as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
28192
28193       ;;
28194   esac
28195
28196
28197
28198
28199   case "$gl_cv_func_printf_long_double" in
28200     *yes)
28201       case "$gl_cv_func_printf_infinite_long_double" in
28202         *yes)
28203           ;;
28204         *)
28205
28206 $as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
28207
28208           ;;
28209       esac
28210       ;;
28211   esac
28212
28213
28214
28215   case "$gl_cv_func_printf_directive_a" in
28216     *yes)
28217       ;;
28218     *)
28219
28220 $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
28221
28222       for ac_func in nl_langinfo
28223 do :
28224   ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
28225 if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
28226   cat >>confdefs.h <<_ACEOF
28227 #define HAVE_NL_LANGINFO 1
28228 _ACEOF
28229
28230 fi
28231 done
28232
28233       ;;
28234   esac
28235
28236
28237
28238   case "$gl_cv_func_printf_directive_f" in
28239     *yes)
28240       ;;
28241     *)
28242
28243 $as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
28244
28245       ;;
28246   esac
28247
28248
28249
28250   case "$gl_cv_func_printf_directive_ls" in
28251     *yes)
28252       ;;
28253     *)
28254
28255 $as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
28256
28257       ;;
28258   esac
28259
28260
28261
28262   case "$gl_cv_func_printf_flag_grouping" in
28263     *yes)
28264       ;;
28265     *)
28266
28267 $as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
28268
28269       ;;
28270   esac
28271
28272
28273
28274   case "$gl_cv_func_printf_flag_leftadjust" in
28275     *yes)
28276       ;;
28277     *)
28278
28279 $as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
28280
28281       ;;
28282   esac
28283
28284
28285
28286   case "$gl_cv_func_printf_flag_zero" in
28287     *yes)
28288       ;;
28289     *)
28290
28291 $as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
28292
28293       ;;
28294   esac
28295
28296
28297
28298   case "$gl_cv_func_printf_precision" in
28299     *yes)
28300       ;;
28301     *)
28302
28303 $as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
28304
28305
28306 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28307
28308
28309 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28310
28311       ;;
28312   esac
28313
28314
28315
28316   case "$gl_cv_func_printf_enomem" in
28317     *yes)
28318       ;;
28319     *)
28320
28321 $as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
28322
28323
28324 $as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
28325
28326
28327 $as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
28328
28329       ;;
28330   esac
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342   M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352   M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362   M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372   M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
28373
28374   if test $ac_cv_func_vasnprintf = yes; then
28375
28376 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
28377
28378   fi
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
28391 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
28392
28393 else
28394
28395 $as_echo "#define ptrdiff_t long" >>confdefs.h
28396
28397
28398 fi
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415   M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425   M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
28426
28427
28428   if test $ac_cv_func_vasprintf = yes; then
28429     REPLACE_VASPRINTF=1
28430   else
28431     HAVE_VASPRINTF=0
28432   fi
28433
28434
28435
28436
28437
28438
28439
28440
28441   fi
28442
28443   # Code from module vc-list-files:
28444   # Code from module verify:
28445   # Code from module verror:
28446
28447
28448   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
28449
28450
28451
28452   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
28453
28454   # Code from module version-etc:
28455
28456 # Check whether --with-packager was given.
28457 if test "${with_packager+set}" = set; then :
28458   withval=$with_packager;       case $withval in
28459         yes|no) ;;
28460         *)
28461 cat >>confdefs.h <<_ACEOF
28462 #define PACKAGE_PACKAGER "$withval"
28463 _ACEOF
28464  ;;
28465       esac
28466
28467 fi
28468
28469
28470
28471 # Check whether --with-packager-version was given.
28472 if test "${with_packager_version+set}" = set; then :
28473   withval=$with_packager_version;       case $withval in
28474         yes|no) ;;
28475         *)
28476 cat >>confdefs.h <<_ACEOF
28477 #define PACKAGE_PACKAGER_VERSION "$withval"
28478 _ACEOF
28479  ;;
28480       esac
28481
28482 fi
28483
28484
28485
28486 # Check whether --with-packager-bug-reports was given.
28487 if test "${with_packager_bug_reports+set}" = set; then :
28488   withval=$with_packager_bug_reports;       case $withval in
28489         yes|no) ;;
28490         *)
28491 cat >>confdefs.h <<_ACEOF
28492 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
28493 _ACEOF
28494  ;;
28495       esac
28496
28497 fi
28498
28499
28500   if test "X$with_packager" = "X" && \
28501      test "X$with_packager_version$with_packager_bug_reports" != "X"
28502   then
28503     as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
28504   fi
28505
28506   # Code from module version-etc-fsf:
28507   # Code from module wait-process:
28508
28509
28510
28511   for ac_func in waitid
28512 do :
28513   ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
28514 if test "x$ac_cv_func_waitid" = x""yes; then :
28515   cat >>confdefs.h <<_ACEOF
28516 #define HAVE_WAITID 1
28517 _ACEOF
28518
28519 fi
28520 done
28521
28522
28523   # Code from module waitpid:
28524
28525
28526   case $host_os in
28527     mingw*)
28528
28529
28530
28531
28532
28533
28534
28535
28536   M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
28537
28538       ;;
28539   esac
28540
28541
28542
28543
28544   GNULIB_WAITPID=1
28545
28546
28547
28548 $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
28549
28550
28551
28552   # Code from module warn-on-use:
28553   # Code from module warnings:
28554
28555   # Code from module wchar:
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568      if test $gl_cv_have_include_next = yes; then
28569        gl_cv_next_wchar_h='<'wchar.h'>'
28570      else
28571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
28572 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
28573 if test "${gl_cv_next_wchar_h+set}" = set; then :
28574   $as_echo_n "(cached) " >&6
28575 else
28576
28577              if test $ac_cv_header_wchar_h = yes; then
28578
28579
28580                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28581 /* end confdefs.h.  */
28582 #include <wchar.h>
28583
28584 _ACEOF
28585                                                                                                                         case "$host_os" in
28586                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28587                  *)    gl_absname_cpp="$ac_cpp" ;;
28588                esac
28589                                                             gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28590                   sed -n '\#/wchar.h#{
28591                     s#.*"\(.*/wchar.h\)".*#\1#
28592                     s#^/[^/]#//&#
28593                     p
28594                     q
28595                   }'`'"'
28596           else
28597                gl_cv_next_wchar_h='<'wchar.h'>'
28598              fi
28599
28600
28601 fi
28602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
28603 $as_echo "$gl_cv_next_wchar_h" >&6; }
28604      fi
28605      NEXT_WCHAR_H=$gl_cv_next_wchar_h
28606
28607      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28608        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28609        gl_next_as_first_directive='<'wchar.h'>'
28610      else
28611        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28612        gl_next_as_first_directive=$gl_cv_next_wchar_h
28613      fi
28614      NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
28615
28616
28617
28618
28619   if test $ac_cv_header_wchar_h = yes; then
28620     HAVE_WCHAR_H=1
28621   else
28622     HAVE_WCHAR_H=0
28623   fi
28624
28625
28626
28627
28628
28629   if test $gt_cv_c_wint_t = yes; then
28630     HAVE_WINT_T=1
28631   else
28632     HAVE_WINT_T=0
28633   fi
28634
28635
28636
28637
28638   # Code from module wcrtomb:
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649   if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
28650
28651
28652
28653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
28654 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
28655 if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
28656   $as_echo_n "(cached) " >&6
28657 else
28658
28659                   case "$host_os" in
28660                      # Guess no on AIX and OSF/1.
28661         aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
28662                      # Guess yes otherwise.
28663         *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
28664       esac
28665       if test $LOCALE_JA != none; then
28666         if test "$cross_compiling" = yes; then :
28667   :
28668 else
28669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28670 /* end confdefs.h.  */
28671
28672 #include <locale.h>
28673 #include <string.h>
28674 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28675    <wchar.h>.
28676    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
28677    included before <wchar.h>.  */
28678 #include <stddef.h>
28679 #include <stdio.h>
28680 #include <time.h>
28681 #include <wchar.h>
28682 int main ()
28683 {
28684   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28685     {
28686       const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
28687       mbstate_t state;
28688       wchar_t wc;
28689
28690       memset (&state, '\0', sizeof (mbstate_t));
28691       if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
28692         if (mbsinit (&state))
28693           return 1;
28694     }
28695   return 0;
28696 }
28697 _ACEOF
28698 if ac_fn_c_try_run "$LINENO"; then :
28699   gl_cv_func_mbrtowc_incomplete_state=yes
28700 else
28701   gl_cv_func_mbrtowc_incomplete_state=no
28702 fi
28703 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28704   conftest.$ac_objext conftest.beam conftest.$ac_ext
28705 fi
28706
28707       fi
28708
28709 fi
28710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
28711 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
28712
28713
28714
28715
28716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
28717 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
28718 if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
28719   $as_echo_n "(cached) " >&6
28720 else
28721
28722                   case "$host_os" in
28723                     # Guess no on Solaris 8.
28724         solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
28725                     # Guess yes otherwise.
28726         *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
28727       esac
28728       if test $LOCALE_ZH_CN != none; then
28729         if test "$cross_compiling" = yes; then :
28730   :
28731 else
28732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28733 /* end confdefs.h.  */
28734
28735 #include <locale.h>
28736 #include <stdlib.h>
28737 #include <string.h>
28738 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28739    <wchar.h>.
28740    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
28741    included before <wchar.h>.  */
28742 #include <stddef.h>
28743 #include <stdio.h>
28744 #include <time.h>
28745 #include <wchar.h>
28746 int main ()
28747 {
28748   /* This fails on Solaris 8:
28749      mbrtowc returns 2, and sets wc to 0x00F0.
28750      mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
28751   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28752     {
28753       char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
28754       mbstate_t state;
28755       wchar_t wc;
28756
28757       memset (&state, '\0', sizeof (mbstate_t));
28758       if (mbrtowc (&wc, input + 3, 6, &state) != 4
28759           && mbtowc (&wc, input + 3, 6) == 4)
28760         return 1;
28761     }
28762   return 0;
28763 }
28764 _ACEOF
28765 if ac_fn_c_try_run "$LINENO"; then :
28766   gl_cv_func_mbrtowc_sanitycheck=yes
28767 else
28768   gl_cv_func_mbrtowc_sanitycheck=no
28769 fi
28770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28771   conftest.$ac_objext conftest.beam conftest.$ac_ext
28772 fi
28773
28774       fi
28775
28776 fi
28777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
28778 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
28779
28780     REPLACE_MBSTATE_T=0
28781     case "$gl_cv_func_mbrtowc_incomplete_state" in
28782       *yes) ;;
28783       *) REPLACE_MBSTATE_T=1 ;;
28784     esac
28785     case "$gl_cv_func_mbrtowc_sanitycheck" in
28786       *yes) ;;
28787       *) REPLACE_MBSTATE_T=1 ;;
28788     esac
28789   else
28790     REPLACE_MBSTATE_T=1
28791   fi
28792   if test $REPLACE_MBSTATE_T = 1; then
28793
28794     :
28795
28796   fi
28797
28798
28799
28800   if test $ac_cv_func_wcrtomb = no; then
28801     HAVE_WCRTOMB=0
28802   else
28803     if test $REPLACE_MBSTATE_T = 1; then
28804       REPLACE_WCRTOMB=1
28805     else
28806
28807
28808
28809
28810
28811              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
28812 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
28813 if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
28814   $as_echo_n "(cached) " >&6
28815 else
28816
28817                               case "$host_os" in
28818                                      # Guess no on AIX 4, OSF/1 and Solaris.
28819             aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
28820                                      # Guess yes otherwise.
28821             *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
28822           esac
28823           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
28824             if test "$cross_compiling" = yes; then :
28825   :
28826 else
28827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28828 /* end confdefs.h.  */
28829
28830 #include <locale.h>
28831 #include <string.h>
28832 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28833    <wchar.h>.
28834    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
28835    included before <wchar.h>.  */
28836 #include <stddef.h>
28837 #include <stdio.h>
28838 #include <time.h>
28839 #include <wchar.h>
28840 int main ()
28841 {
28842   int result = 0;
28843   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
28844     {
28845       if (wcrtomb (NULL, 0, NULL) != 1)
28846         result |= 1;
28847     }
28848   if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
28849     {
28850       if (wcrtomb (NULL, 0, NULL) != 1)
28851         result |= 2;
28852     }
28853   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
28854     {
28855       if (wcrtomb (NULL, 0, NULL) != 1)
28856         result |= 4;
28857     }
28858   if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
28859     {
28860       if (wcrtomb (NULL, 0, NULL) != 1)
28861         result |= 8;
28862     }
28863   return result;
28864 }
28865 _ACEOF
28866 if ac_fn_c_try_run "$LINENO"; then :
28867   gl_cv_func_wcrtomb_retval=yes
28868 else
28869   gl_cv_func_wcrtomb_retval=no
28870 fi
28871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28872   conftest.$ac_objext conftest.beam conftest.$ac_ext
28873 fi
28874
28875           fi
28876
28877 fi
28878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
28879 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
28880       case "$gl_cv_func_wcrtomb_retval" in
28881         *yes) ;;
28882         *) REPLACE_WCRTOMB=1 ;;
28883       esac
28884     fi
28885   fi
28886   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
28887
28888     :
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898   M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
28899
28900
28901   :
28902
28903   fi
28904
28905
28906
28907
28908   GNULIB_WCRTOMB=1
28909
28910
28911
28912 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
28913
28914
28915
28916   # Code from module wctype-h:
28917
28918
28919
28920
28921
28922   if test $ac_cv_func_iswcntrl = yes; then
28923     HAVE_ISWCNTRL=1
28924   else
28925     HAVE_ISWCNTRL=0
28926   fi
28927
28928
28929
28930
28931
28932   if test $gt_cv_c_wint_t = yes; then
28933     HAVE_WINT_T=1
28934   else
28935     HAVE_WINT_T=0
28936   fi
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948      if test $gl_cv_have_include_next = yes; then
28949        gl_cv_next_wctype_h='<'wctype.h'>'
28950      else
28951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
28952 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
28953 if test "${gl_cv_next_wctype_h+set}" = set; then :
28954   $as_echo_n "(cached) " >&6
28955 else
28956
28957              if test $ac_cv_header_wctype_h = yes; then
28958
28959
28960                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28961 /* end confdefs.h.  */
28962 #include <wctype.h>
28963
28964 _ACEOF
28965                                                                                                                         case "$host_os" in
28966                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
28967                  *)    gl_absname_cpp="$ac_cpp" ;;
28968                esac
28969                                                             gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28970                   sed -n '\#/wctype.h#{
28971                     s#.*"\(.*/wctype.h\)".*#\1#
28972                     s#^/[^/]#//&#
28973                     p
28974                     q
28975                   }'`'"'
28976           else
28977                gl_cv_next_wctype_h='<'wctype.h'>'
28978              fi
28979
28980
28981 fi
28982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
28983 $as_echo "$gl_cv_next_wctype_h" >&6; }
28984      fi
28985      NEXT_WCTYPE_H=$gl_cv_next_wctype_h
28986
28987      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28988        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28989        gl_next_as_first_directive='<'wctype.h'>'
28990      else
28991        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28992        gl_next_as_first_directive=$gl_cv_next_wctype_h
28993      fi
28994      NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
28995
28996
28997
28998
28999   if test $ac_cv_header_wctype_h = yes; then
29000     if test $ac_cv_func_iswcntrl = yes; then
29001                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
29002 $as_echo_n "checking whether iswcntrl works... " >&6; }
29003 if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
29004   $as_echo_n "(cached) " >&6
29005 else
29006
29007           if test "$cross_compiling" = yes; then :
29008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29009 /* end confdefs.h.  */
29010 #include <stdlib.h>
29011                           #if __GNU_LIBRARY__ == 1
29012                           Linux libc5 i18n is broken.
29013                           #endif
29014 int
29015 main ()
29016 {
29017
29018   ;
29019   return 0;
29020 }
29021 _ACEOF
29022 if ac_fn_c_try_compile "$LINENO"; then :
29023   gl_cv_func_iswcntrl_works=yes
29024 else
29025   gl_cv_func_iswcntrl_works=no
29026 fi
29027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29028
29029 else
29030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29031 /* end confdefs.h.  */
29032
29033                /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29034                   included before <wchar.h>.
29035                   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29036                   must be included before <wchar.h>.  */
29037                #include <stddef.h>
29038                #include <stdio.h>
29039                #include <time.h>
29040                #include <wchar.h>
29041                #include <wctype.h>
29042                int main () { return iswprint ('x') == 0; }
29043
29044 _ACEOF
29045 if ac_fn_c_try_run "$LINENO"; then :
29046   gl_cv_func_iswcntrl_works=yes
29047 else
29048   gl_cv_func_iswcntrl_works=no
29049 fi
29050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29051   conftest.$ac_objext conftest.beam conftest.$ac_ext
29052 fi
29053
29054
29055 fi
29056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
29057 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
29058     fi
29059     HAVE_WCTYPE_H=1
29060   else
29061     HAVE_WCTYPE_H=0
29062   fi
29063
29064
29065   if test "$gl_cv_func_iswcntrl_works" = no; then
29066     REPLACE_ISWCNTRL=1
29067   else
29068     REPLACE_ISWCNTRL=0
29069   fi
29070
29071
29072   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
29073         :
29074   fi
29075
29076           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
29077 $as_echo_n "checking for wctype_t... " >&6; }
29078 if test "${gl_cv_type_wctype_t+set}" = set; then :
29079   $as_echo_n "(cached) " >&6
29080 else
29081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29082 /* end confdefs.h.  */
29083 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29084                included before <wchar.h>.
29085                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29086                must be included before <wchar.h>.  */
29087             #include <stddef.h>
29088             #include <stdio.h>
29089             #include <time.h>
29090             #include <wchar.h>
29091             #if HAVE_WCTYPE_H
29092             # include <wctype.h>
29093             #endif
29094             wctype_t a;
29095
29096 int
29097 main ()
29098 {
29099
29100   ;
29101   return 0;
29102 }
29103 _ACEOF
29104 if ac_fn_c_try_compile "$LINENO"; then :
29105   gl_cv_type_wctype_t=yes
29106 else
29107   gl_cv_type_wctype_t=no
29108 fi
29109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29110
29111 fi
29112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
29113 $as_echo "$gl_cv_type_wctype_t" >&6; }
29114   if test $gl_cv_type_wctype_t = no; then
29115     HAVE_WCTYPE_T=0
29116   fi
29117
29118       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
29119 $as_echo_n "checking for wctrans_t... " >&6; }
29120 if test "${gl_cv_type_wctrans_t+set}" = set; then :
29121   $as_echo_n "(cached) " >&6
29122 else
29123   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124 /* end confdefs.h.  */
29125 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
29126                included before <wchar.h>.
29127                BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
29128                must be included before <wchar.h>.  */
29129             #include <stddef.h>
29130             #include <stdio.h>
29131             #include <time.h>
29132             #include <wchar.h>
29133             #include <wctype.h>
29134             wctrans_t a;
29135
29136 int
29137 main ()
29138 {
29139
29140   ;
29141   return 0;
29142 }
29143 _ACEOF
29144 if ac_fn_c_try_compile "$LINENO"; then :
29145   gl_cv_type_wctrans_t=yes
29146 else
29147   gl_cv_type_wctrans_t=no
29148 fi
29149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29150
29151 fi
29152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
29153 $as_echo "$gl_cv_type_wctrans_t" >&6; }
29154   if test $gl_cv_type_wctrans_t = no; then
29155     HAVE_WCTRANS_T=0
29156   fi
29157
29158
29159
29160   # Code from module xalloc:
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170   M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext"
29171
29172
29173
29174
29175   :
29176
29177
29178   :
29179
29180
29181   # Code from module xalloc-die:
29182   # Code from module xlist:
29183
29184
29185
29186   # Code from module xmalloca:
29187   # Code from module xoset:
29188
29189
29190
29191   # Code from module xprintf:
29192
29193
29194   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
29195
29196
29197
29198   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
29199
29200
29201
29202   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
29203
29204
29205
29206   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
29207
29208   # Code from module xsize:
29209
29210
29211
29212   for ac_header in stdint.h
29213 do :
29214   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29215 if test "x$ac_cv_header_stdint_h" = x""yes; then :
29216   cat >>confdefs.h <<_ACEOF
29217 #define HAVE_STDINT_H 1
29218 _ACEOF
29219
29220 fi
29221
29222 done
29223
29224
29225   # Code from module xstrndup:
29226
29227
29228   :
29229
29230
29231   # Code from module xvasprintf:
29232
29233
29234
29235
29236
29237   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
29238
29239   # Code from module xvasprintf-posix:
29240   # End of code from modules
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250   gltests_libdeps=
29251   gltests_ltlibdeps=
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261   gl_source_base='tests'
29262   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
29263
29264   gl_module_indicator_condition=$M4tests_WITNESS
29265
29266
29267
29268
29269   if test "$CXX_CHOICE" = no; then
29270     CXX=":"
29271   fi
29272   if test -z "$CXX"; then
29273     if test -n "$CCC"; then
29274       CXX="$CCC"
29275     else
29276       if test -n "$ac_tool_prefix"; then
29277   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
29278   do
29279     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29280 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29282 $as_echo_n "checking for $ac_word... " >&6; }
29283 if test "${ac_cv_prog_CXX+set}" = set; then :
29284   $as_echo_n "(cached) " >&6
29285 else
29286   if test -n "$CXX"; then
29287   ac_cv_prog_CXX="$CXX" # Let the user override the test.
29288 else
29289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29290 for as_dir in $PATH
29291 do
29292   IFS=$as_save_IFS
29293   test -z "$as_dir" && as_dir=.
29294     for ac_exec_ext in '' $ac_executable_extensions; do
29295   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29296     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29298     break 2
29299   fi
29300 done
29301   done
29302 IFS=$as_save_IFS
29303
29304 fi
29305 fi
29306 CXX=$ac_cv_prog_CXX
29307 if test -n "$CXX"; then
29308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29309 $as_echo "$CXX" >&6; }
29310 else
29311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29312 $as_echo "no" >&6; }
29313 fi
29314
29315
29316     test -n "$CXX" && break
29317   done
29318 fi
29319 if test -z "$CXX"; then
29320   ac_ct_CXX=$CXX
29321   for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
29322 do
29323   # Extract the first word of "$ac_prog", so it can be a program name with args.
29324 set dummy $ac_prog; ac_word=$2
29325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29326 $as_echo_n "checking for $ac_word... " >&6; }
29327 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
29328   $as_echo_n "(cached) " >&6
29329 else
29330   if test -n "$ac_ct_CXX"; then
29331   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29332 else
29333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29334 for as_dir in $PATH
29335 do
29336   IFS=$as_save_IFS
29337   test -z "$as_dir" && as_dir=.
29338     for ac_exec_ext in '' $ac_executable_extensions; do
29339   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29340     ac_cv_prog_ac_ct_CXX="$ac_prog"
29341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29342     break 2
29343   fi
29344 done
29345   done
29346 IFS=$as_save_IFS
29347
29348 fi
29349 fi
29350 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29351 if test -n "$ac_ct_CXX"; then
29352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29353 $as_echo "$ac_ct_CXX" >&6; }
29354 else
29355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29356 $as_echo "no" >&6; }
29357 fi
29358
29359
29360   test -n "$ac_ct_CXX" && break
29361 done
29362
29363   if test "x$ac_ct_CXX" = x; then
29364     CXX=":"
29365   else
29366     case $cross_compiling:$ac_tool_warned in
29367 yes:)
29368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29369 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29370 ac_tool_warned=yes ;;
29371 esac
29372     CXX=$ac_ct_CXX
29373   fi
29374 fi
29375
29376     fi
29377   fi
29378   if test "$CXX" != ":"; then
29379             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
29380 $as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
29381     ac_ext=cpp
29382 ac_cpp='$CXXCPP $CPPFLAGS'
29383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29386
29387
29388
29389     echo 'int main () { return 0; }' > conftest.$ac_ext
29390     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29391   (eval $ac_link) 2>&5
29392   ac_status=$?
29393   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29394   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29395       gl_cv_prog_ansicxx_works=yes
29396       if (./conftest; exit) 2>/dev/null; then
29397         gl_cv_prog_ansicxx_cross=no
29398       else
29399         gl_cv_prog_ansicxx_cross=yes
29400       fi
29401     else
29402       gl_cv_prog_ansicxx_works=no
29403     fi
29404     rm -fr conftest*
29405     ac_ext=c
29406 ac_cpp='$CPP $CPPFLAGS'
29407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29410
29411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
29412 $as_echo "$gl_cv_prog_ansicxx_works" >&6; }
29413     if test $gl_cv_prog_ansicxx_works = no; then
29414       CXX=:
29415     else
29416                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
29417 $as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
29418       ac_ext=cpp
29419 ac_cpp='$CXXCPP $CPPFLAGS'
29420 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29421 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29422 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29423
29424       cat <<EOF > conftest.$ac_ext
29425 #include <iostream>
29426 namespace test { using namespace std; }
29427 std::ostream* ptr;
29428 int main () { return 0; }
29429 EOF
29430       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29431   (eval $ac_link) 2>&5
29432   ac_status=$?
29433   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29434   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29435         gl_cv_prog_ansicxx_namespaces=yes
29436       else
29437         gl_cv_prog_ansicxx_namespaces=no
29438       fi
29439       rm -fr conftest*
29440       ac_ext=c
29441 ac_cpp='$CPP $CPPFLAGS'
29442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29445
29446       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
29447 $as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
29448       if test $gl_cv_prog_ansicxx_namespaces = no; then
29449         CXX=:
29450       fi
29451     fi
29452   fi
29453
29454
29455
29456    if test "$CXX" != ":"; then
29457   ANSICXX_TRUE=
29458   ANSICXX_FALSE='#'
29459 else
29460   ANSICXX_TRUE='#'
29461   ANSICXX_FALSE=
29462 fi
29463
29464
29465   if test "$CXX" != ":"; then
29466
29467 depcc="$CXX"  am_compiler_list=
29468
29469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
29470 $as_echo_n "checking dependency style of $depcc... " >&6; }
29471 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
29472   $as_echo_n "(cached) " >&6
29473 else
29474   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
29475   # We make a subdir and do the tests there.  Otherwise we can end up
29476   # making bogus files that we don't know about and never remove.  For
29477   # instance it was reported that on HP-UX the gcc test will end up
29478   # making a dummy file named `D' -- because `-MD' means `put the output
29479   # in D'.
29480   mkdir conftest.dir
29481   # Copy depcomp to subdir because otherwise we won't find it if we're
29482   # using a relative directory.
29483   cp "$am_depcomp" conftest.dir
29484   cd conftest.dir
29485   # We will build objects and dependencies in a subdirectory because
29486   # it helps to detect inapplicable dependency modes.  For instance
29487   # both Tru64's cc and ICC support -MD to output dependencies as a
29488   # side effect of compilation, but ICC will put the dependencies in
29489   # the current directory while Tru64 will put them in the object
29490   # directory.
29491   mkdir sub
29492
29493   am_cv_CXX_dependencies_compiler_type=none
29494   if test "$am_compiler_list" = ""; then
29495      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
29496   fi
29497   am__universal=false
29498   case " $depcc " in #(
29499      *\ -arch\ *\ -arch\ *) am__universal=true ;;
29500      esac
29501
29502   for depmode in $am_compiler_list; do
29503     # Setup a source with many dependencies, because some compilers
29504     # like to wrap large dependency lists on column 80 (with \), and
29505     # we should not choose a depcomp mode which is confused by this.
29506     #
29507     # We need to recreate these files for each test, as the compiler may
29508     # overwrite some of them when testing with obscure command lines.
29509     # This happens at least with the AIX C compiler.
29510     : > sub/conftest.c
29511     for i in 1 2 3 4 5 6; do
29512       echo '#include "conftst'$i'.h"' >> sub/conftest.c
29513       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
29514       # Solaris 8's {/usr,}/bin/sh.
29515       touch sub/conftst$i.h
29516     done
29517     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
29518
29519     # We check with `-c' and `-o' for the sake of the "dashmstdout"
29520     # mode.  It turns out that the SunPro C++ compiler does not properly
29521     # handle `-M -o', and we need to detect this.  Also, some Intel
29522     # versions had trouble with output in subdirs
29523     am__obj=sub/conftest.${OBJEXT-o}
29524     am__minus_obj="-o $am__obj"
29525     case $depmode in
29526     gcc)
29527       # This depmode causes a compiler race in universal mode.
29528       test "$am__universal" = false || continue
29529       ;;
29530     nosideeffect)
29531       # after this tag, mechanisms are not by side-effect, so they'll
29532       # only be used when explicitly requested
29533       if test "x$enable_dependency_tracking" = xyes; then
29534         continue
29535       else
29536         break
29537       fi
29538       ;;
29539     msvisualcpp | msvcmsys)
29540       # This compiler won't grok `-c -o', but also, the minuso test has
29541       # not run yet.  These depmodes are late enough in the game, and
29542       # so weak that their functioning should not be impacted.
29543       am__obj=conftest.${OBJEXT-o}
29544       am__minus_obj=
29545       ;;
29546     none) break ;;
29547     esac
29548     if depmode=$depmode \
29549        source=sub/conftest.c object=$am__obj \
29550        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
29551        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
29552          >/dev/null 2>conftest.err &&
29553        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
29554        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
29555        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
29556        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
29557       # icc doesn't choke on unknown options, it will just issue warnings
29558       # or remarks (even with -Werror).  So we grep stderr for any message
29559       # that says an option was ignored or not supported.
29560       # When given -MP, icc 7.0 and 7.1 complain thusly:
29561       #   icc: Command line warning: ignoring option '-M'; no argument required
29562       # The diagnosis changed in icc 8.0:
29563       #   icc: Command line remark: option '-MP' not supported
29564       if (grep 'ignoring option' conftest.err ||
29565           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
29566         am_cv_CXX_dependencies_compiler_type=$depmode
29567         break
29568       fi
29569     fi
29570   done
29571
29572   cd ..
29573   rm -rf conftest.dir
29574 else
29575   am_cv_CXX_dependencies_compiler_type=none
29576 fi
29577
29578 fi
29579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
29580 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
29581 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
29582
29583  if
29584   test "x$enable_dependency_tracking" != xno \
29585   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
29586   am__fastdepCXX_TRUE=
29587   am__fastdepCXX_FALSE='#'
29588 else
29589   am__fastdepCXX_TRUE='#'
29590   am__fastdepCXX_FALSE=
29591 fi
29592
29593
29594   else
29595      if false; then
29596   am__fastdepCXX_TRUE=
29597   am__fastdepCXX_FALSE='#'
29598 else
29599   am__fastdepCXX_TRUE='#'
29600   am__fastdepCXX_FALSE=
29601 fi
29602
29603   fi
29604
29605
29606
29607
29608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
29609 $as_echo_n "checking for a traditional french locale... " >&6; }
29610 if test "${gt_cv_locale_fr+set}" = set; then :
29611   $as_echo_n "(cached) " >&6
29612 else
29613
29614     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29615 /* end confdefs.h.  */
29616
29617 #include <locale.h>
29618 #include <time.h>
29619 #if HAVE_LANGINFO_CODESET
29620 # include <langinfo.h>
29621 #endif
29622 #include <stdlib.h>
29623 #include <string.h>
29624 struct tm t;
29625 char buf[16];
29626 int main () {
29627   /* Check whether the given locale name is recognized by the system.  */
29628 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29629   /* On native Win32, setlocale(category, "") looks at the system settings,
29630      not at the environment variables.  Also, when an encoding suffix such
29631      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
29632      category of the locale to "C".  */
29633   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29634       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29635     return 1;
29636 #else
29637   if (setlocale (LC_ALL, "") == NULL) return 1;
29638 #endif
29639   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29640      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29641      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29642      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29643      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29644      some unit tests fail.
29645      On MirBSD 10, when an unsupported locale is specified, setlocale()
29646      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
29647 #if HAVE_LANGINFO_CODESET
29648   {
29649     const char *cs = nl_langinfo (CODESET);
29650     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29651         || strcmp (cs, "UTF-8") == 0)
29652       return 1;
29653   }
29654 #endif
29655 #ifdef __CYGWIN__
29656   /* On Cygwin, avoid locale names without encoding suffix, because the
29657      locale_charset() function relies on the encoding suffix.  Note that
29658      LC_ALL is set on the command line.  */
29659   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29660 #endif
29661   /* Check whether in the abbreviation of the second month, the second
29662      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
29663      one byte long. This excludes the UTF-8 encoding.  */
29664   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29665   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
29666   /* Check whether the decimal separator is a comma.
29667      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29668      are nl_langinfo(RADIXCHAR) are both ".".  */
29669   if (localeconv () ->decimal_point[0] != ',') return 1;
29670   return 0;
29671 }
29672
29673 _ACEOF
29674     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29675   (eval $ac_link) 2>&5
29676   ac_status=$?
29677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29678   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29679       case "$host_os" in
29680         # Handle native Windows specially, because there setlocale() interprets
29681         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29682         # "fr" or "fra" as "French" or "French_France.1252",
29683         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29684         # "ja" as "Japanese" or "Japanese_Japan.932",
29685         # and similar.
29686         mingw*)
29687           # Test for the native Win32 locale name.
29688           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29689             gt_cv_locale_fr=French_France.1252
29690           else
29691             # None found.
29692             gt_cv_locale_fr=none
29693           fi
29694           ;;
29695         *)
29696           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29697           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
29698           # configure script would override the LC_ALL setting. Likewise for
29699           # LC_CTYPE, which is also set at the beginning of the configure script.
29700           # Test for the usual locale name.
29701           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29702             gt_cv_locale_fr=fr_FR
29703           else
29704             # Test for the locale name with explicit encoding suffix.
29705             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29706               gt_cv_locale_fr=fr_FR.ISO-8859-1
29707             else
29708               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
29709               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29710                 gt_cv_locale_fr=fr_FR.ISO8859-1
29711               else
29712                 # Test for the HP-UX locale name.
29713                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29714                   gt_cv_locale_fr=fr_FR.iso88591
29715                 else
29716                   # Test for the Solaris 7 locale name.
29717                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29718                     gt_cv_locale_fr=fr
29719                   else
29720                     # None found.
29721                     gt_cv_locale_fr=none
29722                   fi
29723                 fi
29724               fi
29725             fi
29726           fi
29727           ;;
29728       esac
29729     fi
29730     rm -fr conftest*
29731
29732 fi
29733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
29734 $as_echo "$gt_cv_locale_fr" >&6; }
29735   LOCALE_FR=$gt_cv_locale_fr
29736
29737
29738
29739
29740   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
29741 $as_echo_n "checking for a french Unicode locale... " >&6; }
29742 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
29743   $as_echo_n "(cached) " >&6
29744 else
29745
29746     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29747 /* end confdefs.h.  */
29748
29749 #include <locale.h>
29750 #include <time.h>
29751 #if HAVE_LANGINFO_CODESET
29752 # include <langinfo.h>
29753 #endif
29754 #include <stdlib.h>
29755 #include <string.h>
29756 struct tm t;
29757 char buf[16];
29758 int main () {
29759   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
29760      imitates locale dependent behaviour by looking at the environment
29761      variables, and all locales use the UTF-8 encoding.  */
29762 #if !(defined __BEOS__ || defined __HAIKU__)
29763   /* Check whether the given locale name is recognized by the system.  */
29764 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29765   /* On native Win32, setlocale(category, "") looks at the system settings,
29766      not at the environment variables.  Also, when an encoding suffix such
29767      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
29768      category of the locale to "C".  */
29769   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29770       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29771     return 1;
29772 # else
29773   if (setlocale (LC_ALL, "") == NULL) return 1;
29774 # endif
29775   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29776      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29777      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29778      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29779      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29780      some unit tests fail.  */
29781 # if HAVE_LANGINFO_CODESET
29782   {
29783     const char *cs = nl_langinfo (CODESET);
29784     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
29785       return 1;
29786   }
29787 # endif
29788 # ifdef __CYGWIN__
29789   /* On Cygwin, avoid locale names without encoding suffix, because the
29790      locale_charset() function relies on the encoding suffix.  Note that
29791      LC_ALL is set on the command line.  */
29792   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29793 # endif
29794   /* Check whether in the abbreviation of the second month, the second
29795      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
29796      two bytes long, with UTF-8 encoding.  */
29797   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29798   if (strftime (buf, sizeof (buf), "%b", &t) < 4
29799       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
29800     return 1;
29801 #endif
29802   /* Check whether the decimal separator is a comma.
29803      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29804      are nl_langinfo(RADIXCHAR) are both ".".  */
29805   if (localeconv () ->decimal_point[0] != ',') return 1;
29806   return 0;
29807 }
29808
29809 _ACEOF
29810     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29811   (eval $ac_link) 2>&5
29812   ac_status=$?
29813   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29814   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29815       case "$host_os" in
29816         # Handle native Windows specially, because there setlocale() interprets
29817         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29818         # "fr" or "fra" as "French" or "French_France.1252",
29819         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29820         # "ja" as "Japanese" or "Japanese_Japan.932",
29821         # and similar.
29822         mingw*)
29823           # Test for the hypothetical native Win32 locale name.
29824           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29825             gt_cv_locale_fr_utf8=French_France.65001
29826           else
29827             # None found.
29828             gt_cv_locale_fr_utf8=none
29829           fi
29830           ;;
29831         *)
29832           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29833           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
29834           # configure script would override the LC_ALL setting. Likewise for
29835           # LC_CTYPE, which is also set at the beginning of the configure script.
29836           # Test for the usual locale name.
29837           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29838             gt_cv_locale_fr_utf8=fr_FR
29839           else
29840             # Test for the locale name with explicit encoding suffix.
29841             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29842               gt_cv_locale_fr_utf8=fr_FR.UTF-8
29843             else
29844               # Test for the Solaris 7 locale name.
29845               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29846                 gt_cv_locale_fr_utf8=fr.UTF-8
29847               else
29848                 # None found.
29849                 gt_cv_locale_fr_utf8=none
29850               fi
29851             fi
29852           fi
29853           ;;
29854       esac
29855     fi
29856     rm -fr conftest*
29857
29858 fi
29859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
29860 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
29861   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
29862
29863
29864
29865
29866
29867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
29868 $as_echo_n "checking for a traditional french locale... " >&6; }
29869 if test "${gt_cv_locale_fr+set}" = set; then :
29870   $as_echo_n "(cached) " >&6
29871 else
29872
29873     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29874 /* end confdefs.h.  */
29875
29876 #include <locale.h>
29877 #include <time.h>
29878 #if HAVE_LANGINFO_CODESET
29879 # include <langinfo.h>
29880 #endif
29881 #include <stdlib.h>
29882 #include <string.h>
29883 struct tm t;
29884 char buf[16];
29885 int main () {
29886   /* Check whether the given locale name is recognized by the system.  */
29887 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
29888   /* On native Win32, setlocale(category, "") looks at the system settings,
29889      not at the environment variables.  Also, when an encoding suffix such
29890      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
29891      category of the locale to "C".  */
29892   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
29893       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
29894     return 1;
29895 #else
29896   if (setlocale (LC_ALL, "") == NULL) return 1;
29897 #endif
29898   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
29899      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
29900      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
29901      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
29902      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
29903      some unit tests fail.
29904      On MirBSD 10, when an unsupported locale is specified, setlocale()
29905      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
29906 #if HAVE_LANGINFO_CODESET
29907   {
29908     const char *cs = nl_langinfo (CODESET);
29909     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
29910         || strcmp (cs, "UTF-8") == 0)
29911       return 1;
29912   }
29913 #endif
29914 #ifdef __CYGWIN__
29915   /* On Cygwin, avoid locale names without encoding suffix, because the
29916      locale_charset() function relies on the encoding suffix.  Note that
29917      LC_ALL is set on the command line.  */
29918   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
29919 #endif
29920   /* Check whether in the abbreviation of the second month, the second
29921      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
29922      one byte long. This excludes the UTF-8 encoding.  */
29923   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
29924   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
29925   /* Check whether the decimal separator is a comma.
29926      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
29927      are nl_langinfo(RADIXCHAR) are both ".".  */
29928   if (localeconv () ->decimal_point[0] != ',') return 1;
29929   return 0;
29930 }
29931
29932 _ACEOF
29933     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
29934   (eval $ac_link) 2>&5
29935   ac_status=$?
29936   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29937   test $ac_status = 0; } && test -s conftest$ac_exeext; then
29938       case "$host_os" in
29939         # Handle native Windows specially, because there setlocale() interprets
29940         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
29941         # "fr" or "fra" as "French" or "French_France.1252",
29942         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
29943         # "ja" as "Japanese" or "Japanese_Japan.932",
29944         # and similar.
29945         mingw*)
29946           # Test for the native Win32 locale name.
29947           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29948             gt_cv_locale_fr=French_France.1252
29949           else
29950             # None found.
29951             gt_cv_locale_fr=none
29952           fi
29953           ;;
29954         *)
29955           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
29956           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
29957           # configure script would override the LC_ALL setting. Likewise for
29958           # LC_CTYPE, which is also set at the beginning of the configure script.
29959           # Test for the usual locale name.
29960           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29961             gt_cv_locale_fr=fr_FR
29962           else
29963             # Test for the locale name with explicit encoding suffix.
29964             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29965               gt_cv_locale_fr=fr_FR.ISO-8859-1
29966             else
29967               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
29968               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29969                 gt_cv_locale_fr=fr_FR.ISO8859-1
29970               else
29971                 # Test for the HP-UX locale name.
29972                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29973                   gt_cv_locale_fr=fr_FR.iso88591
29974                 else
29975                   # Test for the Solaris 7 locale name.
29976                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
29977                     gt_cv_locale_fr=fr
29978                   else
29979                     # None found.
29980                     gt_cv_locale_fr=none
29981                   fi
29982                 fi
29983               fi
29984             fi
29985           fi
29986           ;;
29987       esac
29988     fi
29989     rm -fr conftest*
29990
29991 fi
29992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
29993 $as_echo "$gt_cv_locale_fr" >&6; }
29994   LOCALE_FR=$gt_cv_locale_fr
29995
29996
29997
29998
29999
30000   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
30001 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
30002 if test "${gt_cv_locale_tr_utf8+set}" = set; then :
30003   $as_echo_n "(cached) " >&6
30004 else
30005
30006     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30007 /* end confdefs.h.  */
30008
30009 #include <locale.h>
30010 #include <time.h>
30011 #if HAVE_LANGINFO_CODESET
30012 # include <langinfo.h>
30013 #endif
30014 #include <stdlib.h>
30015 #include <string.h>
30016 struct tm t;
30017 char buf[16];
30018 int main () {
30019   /* On BeOS, locales are not implemented in libc.  Rather, libintl
30020      imitates locale dependent behaviour by looking at the environment
30021      variables, and all locales use the UTF-8 encoding.  But BeOS does not
30022      implement the Turkish upper-/lowercase mappings.  Therefore, let this
30023      program return 1 on BeOS.  */
30024   /* Check whether the given locale name is recognized by the system.  */
30025 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
30026   /* On native Win32, setlocale(category, "") looks at the system settings,
30027      not at the environment variables.  Also, when an encoding suffix such
30028      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
30029      category of the locale to "C".  */
30030   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30031       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30032     return 1;
30033 #else
30034   if (setlocale (LC_ALL, "") == NULL) return 1;
30035 #endif
30036   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30037      On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
30038      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30039      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30040      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30041      some unit tests fail.  */
30042 #if HAVE_LANGINFO_CODESET
30043   {
30044     const char *cs = nl_langinfo (CODESET);
30045     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
30046       return 1;
30047   }
30048 #endif
30049 #ifdef __CYGWIN__
30050   /* On Cygwin, avoid locale names without encoding suffix, because the
30051      locale_charset() function relies on the encoding suffix.  Note that
30052      LC_ALL is set on the command line.  */
30053   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30054 #endif
30055   /* Check whether in the abbreviation of the eighth month, the second
30056      character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
30057      two bytes long, with UTF-8 encoding.  */
30058   t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
30059   if (strftime (buf, sizeof (buf), "%b", &t) < 4
30060       || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
30061     return 1;
30062   /* Check whether the upper-/lowercase mappings are as expected for
30063      Turkish.  */
30064   if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
30065       || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
30066     return 1;
30067   return 0;
30068 }
30069
30070 _ACEOF
30071     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30072   (eval $ac_link) 2>&5
30073   ac_status=$?
30074   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30075   test $ac_status = 0; } && test -s conftest$ac_exeext; then
30076       case "$host_os" in
30077         # Handle native Windows specially, because there setlocale() interprets
30078         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30079         # "fr" or "fra" as "French" or "French_France.1252",
30080         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30081         # "ja" as "Japanese" or "Japanese_Japan.932",
30082         # and similar.
30083         mingw*)
30084           # Test for the hypothetical native Win32 locale name.
30085           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30086             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
30087           else
30088             # None found.
30089             gt_cv_locale_tr_utf8=none
30090           fi
30091           ;;
30092         *)
30093           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30094           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
30095           # configure script would override the LC_ALL setting. Likewise for
30096           # LC_CTYPE, which is also set at the beginning of the configure script.
30097           # Test for the usual locale name.
30098           if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30099             gt_cv_locale_tr_utf8=tr_TR
30100           else
30101             # Test for the locale name with explicit encoding suffix.
30102             if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30103               gt_cv_locale_tr_utf8=tr_TR.UTF-8
30104             else
30105               # Test for the Solaris 7 locale name.
30106               if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30107                 gt_cv_locale_tr_utf8=tr.UTF-8
30108               else
30109                 # None found.
30110                 gt_cv_locale_tr_utf8=none
30111               fi
30112             fi
30113           fi
30114           ;;
30115       esac
30116     else
30117       gt_cv_locale_tr_utf8=none
30118     fi
30119     rm -fr conftest*
30120
30121 fi
30122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
30123 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
30124   LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
30125
30126
30127
30128
30129
30130
30131     if test $REPLACE_FTELLO != 0; then
30132
30133
30134
30135
30136
30137
30138
30139
30140   M4tests_LIBOBJS="$M4tests_LIBOBJS ftell.$ac_objext"
30141
30142     REPLACE_FTELL=1
30143   fi
30144
30145
30146
30147
30148   GNULIB_FTELL=$gl_module_indicator_condition
30149
30150
30151
30152 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
30153
30154
30155
30156
30157
30158
30159
30160
30161   for ac_func in getpagesize
30162 do :
30163   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
30164 if test "x$ac_cv_func_getpagesize" = x""yes; then :
30165   cat >>confdefs.h <<_ACEOF
30166 #define HAVE_GETPAGESIZE 1
30167 _ACEOF
30168
30169 fi
30170 done
30171
30172   if test $ac_cv_func_getpagesize = no; then
30173     HAVE_GETPAGESIZE=0
30174     for ac_header in OS.h
30175 do :
30176   ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
30177 if test "x$ac_cv_header_OS_h" = x""yes; then :
30178   cat >>confdefs.h <<_ACEOF
30179 #define HAVE_OS_H 1
30180 _ACEOF
30181
30182 fi
30183
30184 done
30185
30186     if test $ac_cv_header_OS_h = yes; then
30187       HAVE_OS_H=1
30188     fi
30189     for ac_header in sys/param.h
30190 do :
30191   ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
30192 if test "x$ac_cv_header_sys_param_h" = x""yes; then :
30193   cat >>confdefs.h <<_ACEOF
30194 #define HAVE_SYS_PARAM_H 1
30195 _ACEOF
30196
30197 fi
30198
30199 done
30200
30201     if test $ac_cv_header_sys_param_h = yes; then
30202       HAVE_SYS_PARAM_H=1
30203     fi
30204   fi
30205   case "$host_os" in
30206     mingw*)
30207       REPLACE_GETPAGESIZE=1
30208
30209
30210
30211
30212
30213
30214
30215
30216   M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
30217
30218       ;;
30219   esac
30220       ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
30221 if test "x$ac_cv_have_decl_getpagesize" = x""yes; then :
30222
30223 else
30224   HAVE_DECL_GETPAGESIZE=0
30225 fi
30226
30227
30228
30229
30230
30231   GNULIB_GETPAGESIZE=$gl_module_indicator_condition
30232
30233
30234
30235 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
30236
30237
30238
30239
30240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
30241 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
30242 if test "${gl_cv_cc_double_expbit0+set}" = set; then :
30243   $as_echo_n "(cached) " >&6
30244 else
30245
30246       if test "$cross_compiling" = yes; then :
30247
30248                                                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30249 /* end confdefs.h.  */
30250
30251 #if defined arm || defined __arm || defined __arm__
30252   mixed_endianness
30253 #endif
30254
30255 _ACEOF
30256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30257   $EGREP "mixed_endianness" >/dev/null 2>&1; then :
30258   gl_cv_cc_double_expbit0="unknown"
30259 else
30260
30261                                                          :
30262 if test "${ac_cv_c_bigendian+set}" = set; then :
30263   $as_echo_n "(cached) " >&6
30264 else
30265   ac_cv_c_bigendian=unknown
30266     # See if we're dealing with a universal compiler.
30267     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30268 /* end confdefs.h.  */
30269 #ifndef __APPLE_CC__
30270                not a universal capable compiler
30271              #endif
30272              typedef int dummy;
30273
30274 _ACEOF
30275 if ac_fn_c_try_compile "$LINENO"; then :
30276
30277         # Check for potential -arch flags.  It is not universal unless
30278         # there are at least two -arch flags with different values.
30279         ac_arch=
30280         ac_prev=
30281         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
30282          if test -n "$ac_prev"; then
30283            case $ac_word in
30284              i?86 | x86_64 | ppc | ppc64)
30285                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
30286                  ac_arch=$ac_word
30287                else
30288                  ac_cv_c_bigendian=universal
30289                  break
30290                fi
30291                ;;
30292            esac
30293            ac_prev=
30294          elif test "x$ac_word" = "x-arch"; then
30295            ac_prev=arch
30296          fi
30297        done
30298 fi
30299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30300     if test $ac_cv_c_bigendian = unknown; then
30301       # See if sys/param.h defines the BYTE_ORDER macro.
30302       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30303 /* end confdefs.h.  */
30304 #include <sys/types.h>
30305              #include <sys/param.h>
30306
30307 int
30308 main ()
30309 {
30310 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
30311                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
30312                      && LITTLE_ENDIAN)
30313               bogus endian macros
30314              #endif
30315
30316   ;
30317   return 0;
30318 }
30319 _ACEOF
30320 if ac_fn_c_try_compile "$LINENO"; then :
30321   # It does; now see whether it defined to BIG_ENDIAN or not.
30322          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30323 /* end confdefs.h.  */
30324 #include <sys/types.h>
30325                 #include <sys/param.h>
30326
30327 int
30328 main ()
30329 {
30330 #if BYTE_ORDER != BIG_ENDIAN
30331                  not big endian
30332                 #endif
30333
30334   ;
30335   return 0;
30336 }
30337 _ACEOF
30338 if ac_fn_c_try_compile "$LINENO"; then :
30339   ac_cv_c_bigendian=yes
30340 else
30341   ac_cv_c_bigendian=no
30342 fi
30343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30344 fi
30345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30346     fi
30347     if test $ac_cv_c_bigendian = unknown; then
30348       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
30349       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30350 /* end confdefs.h.  */
30351 #include <limits.h>
30352
30353 int
30354 main ()
30355 {
30356 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
30357               bogus endian macros
30358              #endif
30359
30360   ;
30361   return 0;
30362 }
30363 _ACEOF
30364 if ac_fn_c_try_compile "$LINENO"; then :
30365   # It does; now see whether it defined to _BIG_ENDIAN or not.
30366          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30367 /* end confdefs.h.  */
30368 #include <limits.h>
30369
30370 int
30371 main ()
30372 {
30373 #ifndef _BIG_ENDIAN
30374                  not big endian
30375                 #endif
30376
30377   ;
30378   return 0;
30379 }
30380 _ACEOF
30381 if ac_fn_c_try_compile "$LINENO"; then :
30382   ac_cv_c_bigendian=yes
30383 else
30384   ac_cv_c_bigendian=no
30385 fi
30386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30387 fi
30388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30389     fi
30390     if test $ac_cv_c_bigendian = unknown; then
30391       # Compile a test program.
30392       if test "$cross_compiling" = yes; then :
30393   # Try to guess by grepping values from an object file.
30394          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30395 /* end confdefs.h.  */
30396 short int ascii_mm[] =
30397                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
30398                 short int ascii_ii[] =
30399                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
30400                 int use_ascii (int i) {
30401                   return ascii_mm[i] + ascii_ii[i];
30402                 }
30403                 short int ebcdic_ii[] =
30404                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
30405                 short int ebcdic_mm[] =
30406                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
30407                 int use_ebcdic (int i) {
30408                   return ebcdic_mm[i] + ebcdic_ii[i];
30409                 }
30410                 extern int foo;
30411
30412 int
30413 main ()
30414 {
30415 return use_ascii (foo) == use_ebcdic (foo);
30416   ;
30417   return 0;
30418 }
30419 _ACEOF
30420 if ac_fn_c_try_compile "$LINENO"; then :
30421   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
30422               ac_cv_c_bigendian=yes
30423             fi
30424             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
30425               if test "$ac_cv_c_bigendian" = unknown; then
30426                 ac_cv_c_bigendian=no
30427               else
30428                 # finding both strings is unlikely to happen, but who knows?
30429                 ac_cv_c_bigendian=unknown
30430               fi
30431             fi
30432 fi
30433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30434 else
30435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30436 /* end confdefs.h.  */
30437 $ac_includes_default
30438 int
30439 main ()
30440 {
30441
30442              /* Are we little or big endian?  From Harbison&Steele.  */
30443              union
30444              {
30445                long int l;
30446                char c[sizeof (long int)];
30447              } u;
30448              u.l = 1;
30449              return u.c[sizeof (long int) - 1] == 1;
30450
30451   ;
30452   return 0;
30453 }
30454 _ACEOF
30455 if ac_fn_c_try_run "$LINENO"; then :
30456   ac_cv_c_bigendian=no
30457 else
30458   ac_cv_c_bigendian=yes
30459 fi
30460 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30461   conftest.$ac_objext conftest.beam conftest.$ac_ext
30462 fi
30463
30464     fi
30465 fi
30466 :
30467  case $ac_cv_c_bigendian in #(
30468    yes)
30469      gl_cv_cc_double_expbit0="word 0 bit 20";; #(
30470    no)
30471      gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
30472    universal)
30473
30474 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
30475
30476      ;; #(
30477    *)
30478      gl_cv_cc_double_expbit0="unknown" ;;
30479  esac
30480
30481
30482 fi
30483 rm -f conftest*
30484
30485
30486 else
30487   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30488 /* end confdefs.h.  */
30489
30490 #include <float.h>
30491 #include <stddef.h>
30492 #include <stdio.h>
30493 #include <string.h>
30494 #define NWORDS \
30495   ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30496 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
30497 static unsigned int ored_words[NWORDS];
30498 static unsigned int anded_words[NWORDS];
30499 static void add_to_ored_words (double x)
30500 {
30501   memory_double m;
30502   size_t i;
30503   /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
30504   memset (&m, 0, sizeof (memory_double));
30505   m.value = x;
30506   for (i = 0; i < NWORDS; i++)
30507     {
30508       ored_words[i] |= m.word[i];
30509       anded_words[i] &= m.word[i];
30510     }
30511 }
30512 int main ()
30513 {
30514   size_t j;
30515   FILE *fp = fopen ("conftest.out", "w");
30516   if (fp == NULL)
30517     return 1;
30518   for (j = 0; j < NWORDS; j++)
30519     anded_words[j] = ~ (unsigned int) 0;
30520   add_to_ored_words (0.25);
30521   add_to_ored_words (0.5);
30522   add_to_ored_words (1.0);
30523   add_to_ored_words (2.0);
30524   add_to_ored_words (4.0);
30525   /* Remove bits that are common (e.g. if representation of the first mantissa
30526      bit is explicit).  */
30527   for (j = 0; j < NWORDS; j++)
30528     ored_words[j] &= ~anded_words[j];
30529   /* Now find the nonzero word.  */
30530   for (j = 0; j < NWORDS; j++)
30531     if (ored_words[j] != 0)
30532       break;
30533   if (j < NWORDS)
30534     {
30535       size_t i;
30536       for (i = j + 1; i < NWORDS; i++)
30537         if (ored_words[i] != 0)
30538           {
30539             fprintf (fp, "unknown");
30540             return (fclose (fp) != 0);
30541           }
30542       for (i = 0; ; i++)
30543         if ((ored_words[j] >> i) & 1)
30544           {
30545             fprintf (fp, "word %d bit %d", (int) j, (int) i);
30546             return (fclose (fp) != 0);
30547           }
30548     }
30549   fprintf (fp, "unknown");
30550   return (fclose (fp) != 0);
30551 }
30552
30553 _ACEOF
30554 if ac_fn_c_try_run "$LINENO"; then :
30555   gl_cv_cc_double_expbit0=`cat conftest.out`
30556 else
30557   gl_cv_cc_double_expbit0="unknown"
30558 fi
30559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30560   conftest.$ac_objext conftest.beam conftest.$ac_ext
30561 fi
30562
30563       rm -f conftest.out
30564
30565 fi
30566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
30567 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
30568   case "$gl_cv_cc_double_expbit0" in
30569     word*bit*)
30570       word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
30571       bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
30572
30573 cat >>confdefs.h <<_ACEOF
30574 #define DBL_EXPBIT0_WORD $word
30575 _ACEOF
30576
30577
30578 cat >>confdefs.h <<_ACEOF
30579 #define DBL_EXPBIT0_BIT $bit
30580 _ACEOF
30581
30582       ;;
30583   esac
30584
30585
30586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
30587 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
30588 if test "${gl_cv_cc_float_expbit0+set}" = set; then :
30589   $as_echo_n "(cached) " >&6
30590 else
30591
30592       if test "$cross_compiling" = yes; then :
30593   gl_cv_cc_float_expbit0="word 0 bit 23"
30594 else
30595   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30596 /* end confdefs.h.  */
30597
30598 #include <float.h>
30599 #include <stddef.h>
30600 #include <stdio.h>
30601 #include <string.h>
30602 #define NWORDS \
30603   ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30604 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
30605 static unsigned int ored_words[NWORDS];
30606 static unsigned int anded_words[NWORDS];
30607 static void add_to_ored_words (float x)
30608 {
30609   memory_float m;
30610   size_t i;
30611   /* Clear it first, in case
30612      sizeof (float) < sizeof (memory_float).  */
30613   memset (&m, 0, sizeof (memory_float));
30614   m.value = x;
30615   for (i = 0; i < NWORDS; i++)
30616     {
30617       ored_words[i] |= m.word[i];
30618       anded_words[i] &= m.word[i];
30619     }
30620 }
30621 int main ()
30622 {
30623   size_t j;
30624   FILE *fp = fopen ("conftest.out", "w");
30625   if (fp == NULL)
30626     return 1;
30627   for (j = 0; j < NWORDS; j++)
30628     anded_words[j] = ~ (unsigned int) 0;
30629   add_to_ored_words (0.25f);
30630   add_to_ored_words (0.5f);
30631   add_to_ored_words (1.0f);
30632   add_to_ored_words (2.0f);
30633   add_to_ored_words (4.0f);
30634   /* Remove bits that are common (e.g. if representation of the first mantissa
30635      bit is explicit).  */
30636   for (j = 0; j < NWORDS; j++)
30637     ored_words[j] &= ~anded_words[j];
30638   /* Now find the nonzero word.  */
30639   for (j = 0; j < NWORDS; j++)
30640     if (ored_words[j] != 0)
30641       break;
30642   if (j < NWORDS)
30643     {
30644       size_t i;
30645       for (i = j + 1; i < NWORDS; i++)
30646         if (ored_words[i] != 0)
30647           {
30648             fprintf (fp, "unknown");
30649             return (fclose (fp) != 0);
30650           }
30651       for (i = 0; ; i++)
30652         if ((ored_words[j] >> i) & 1)
30653           {
30654             fprintf (fp, "word %d bit %d", (int) j, (int) i);
30655             return (fclose (fp) != 0);
30656           }
30657     }
30658   fprintf (fp, "unknown");
30659   return (fclose (fp) != 0);
30660 }
30661
30662 _ACEOF
30663 if ac_fn_c_try_run "$LINENO"; then :
30664   gl_cv_cc_float_expbit0=`cat conftest.out`
30665 else
30666   gl_cv_cc_float_expbit0="unknown"
30667 fi
30668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30669   conftest.$ac_objext conftest.beam conftest.$ac_ext
30670 fi
30671
30672       rm -f conftest.out
30673
30674 fi
30675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
30676 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
30677   case "$gl_cv_cc_float_expbit0" in
30678     word*bit*)
30679       word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
30680       bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
30681
30682 cat >>confdefs.h <<_ACEOF
30683 #define FLT_EXPBIT0_WORD $word
30684 _ACEOF
30685
30686
30687 cat >>confdefs.h <<_ACEOF
30688 #define FLT_EXPBIT0_BIT $bit
30689 _ACEOF
30690
30691       ;;
30692   esac
30693
30694
30695
30696   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
30697 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
30698 if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
30699   $as_echo_n "(cached) " >&6
30700 else
30701
30702       if test "$cross_compiling" = yes; then :
30703
30704                               gl_cv_cc_long_double_expbit0="unknown"
30705
30706 else
30707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30708 /* end confdefs.h.  */
30709
30710 #include <float.h>
30711 #include <stddef.h>
30712 #include <stdio.h>
30713 #include <string.h>
30714 #define NWORDS \
30715   ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
30716 typedef union { long double value; unsigned int word[NWORDS]; }
30717         memory_long_double;
30718 static unsigned int ored_words[NWORDS];
30719 static unsigned int anded_words[NWORDS];
30720 static void add_to_ored_words (long double x)
30721 {
30722   memory_long_double m;
30723   size_t i;
30724   /* Clear it first, in case
30725      sizeof (long double) < sizeof (memory_long_double).  */
30726   memset (&m, 0, sizeof (memory_long_double));
30727   m.value = x;
30728   for (i = 0; i < NWORDS; i++)
30729     {
30730       ored_words[i] |= m.word[i];
30731       anded_words[i] &= m.word[i];
30732     }
30733 }
30734 int main ()
30735 {
30736   size_t j;
30737   FILE *fp = fopen ("conftest.out", "w");
30738   if (fp == NULL)
30739     return 1;
30740   for (j = 0; j < NWORDS; j++)
30741     anded_words[j] = ~ (unsigned int) 0;
30742   add_to_ored_words (0.25L);
30743   add_to_ored_words (0.5L);
30744   add_to_ored_words (1.0L);
30745   add_to_ored_words (2.0L);
30746   add_to_ored_words (4.0L);
30747   /* Remove bits that are common (e.g. if representation of the first mantissa
30748      bit is explicit).  */
30749   for (j = 0; j < NWORDS; j++)
30750     ored_words[j] &= ~anded_words[j];
30751   /* Now find the nonzero word.  */
30752   for (j = 0; j < NWORDS; j++)
30753     if (ored_words[j] != 0)
30754       break;
30755   if (j < NWORDS)
30756     {
30757       size_t i;
30758       for (i = j + 1; i < NWORDS; i++)
30759         if (ored_words[i] != 0)
30760           {
30761             fprintf (fp, "unknown");
30762             return (fclose (fp) != 0);
30763           }
30764       for (i = 0; ; i++)
30765         if ((ored_words[j] >> i) & 1)
30766           {
30767             fprintf (fp, "word %d bit %d", (int) j, (int) i);
30768             return (fclose (fp) != 0);
30769           }
30770     }
30771   fprintf (fp, "unknown");
30772   return (fclose (fp) != 0);
30773 }
30774
30775 _ACEOF
30776 if ac_fn_c_try_run "$LINENO"; then :
30777   gl_cv_cc_long_double_expbit0=`cat conftest.out`
30778 else
30779   gl_cv_cc_long_double_expbit0="unknown"
30780 fi
30781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30782   conftest.$ac_objext conftest.beam conftest.$ac_ext
30783 fi
30784
30785       rm -f conftest.out
30786
30787 fi
30788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
30789 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
30790   case "$gl_cv_cc_long_double_expbit0" in
30791     word*bit*)
30792       word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
30793       bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
30794
30795 cat >>confdefs.h <<_ACEOF
30796 #define LDBL_EXPBIT0_WORD $word
30797 _ACEOF
30798
30799
30800 cat >>confdefs.h <<_ACEOF
30801 #define LDBL_EXPBIT0_BIT $bit
30802 _ACEOF
30803
30804       ;;
30805   esac
30806
30807
30808
30809
30810   if test $ac_cv_func_link = no; then
30811     HAVE_LINK=0
30812
30813
30814
30815
30816
30817
30818
30819
30820   M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
30821
30822   else
30823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
30824 $as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
30825 if test "${gl_cv_func_link_works+set}" = set; then :
30826   $as_echo_n "(cached) " >&6
30827 else
30828   touch conftest.a
30829        # Assume that if we have lstat, we can also check symlinks.
30830        if test $ac_cv_func_lstat = yes; then
30831          ln -s conftest.a conftest.lnk
30832        fi
30833        if test "$cross_compiling" = yes; then :
30834   gl_cv_func_link_works="guessing no"
30835 else
30836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30837 /* end confdefs.h.  */
30838 #include <unistd.h>
30839
30840 int
30841 main ()
30842 {
30843 int result = 0;
30844              if (!link ("conftest.a", "conftest.b/"))
30845                result |= 1;
30846 #if HAVE_LSTAT
30847              if (!link ("conftest.lnk/", "conftest.b"))
30848                result |= 2;
30849 #endif
30850              return result;
30851
30852   ;
30853   return 0;
30854 }
30855 _ACEOF
30856 if ac_fn_c_try_run "$LINENO"; then :
30857   gl_cv_func_link_works=yes
30858 else
30859   gl_cv_func_link_works=no
30860 fi
30861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30862   conftest.$ac_objext conftest.beam conftest.$ac_ext
30863 fi
30864
30865        rm -f conftest.a conftest.b conftest.lnk
30866 fi
30867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
30868 $as_echo "$gl_cv_func_link_works" >&6; }
30869     if test "$gl_cv_func_link_works" != yes; then
30870       REPLACE_LINK=1
30871
30872
30873
30874
30875
30876
30877
30878
30879   M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
30880
30881     fi
30882   fi
30883
30884
30885
30886
30887   GNULIB_LINK=$gl_module_indicator_condition
30888
30889
30890
30891 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
30903 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
30904 if test "${gl_cv_header_locale_h_posix2001+set}" = set; then :
30905   $as_echo_n "(cached) " >&6
30906 else
30907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30908 /* end confdefs.h.  */
30909 #include <locale.h>
30910             int x = LC_MESSAGES;
30911 int
30912 main ()
30913 {
30914
30915   ;
30916   return 0;
30917 }
30918 _ACEOF
30919 if ac_fn_c_try_compile "$LINENO"; then :
30920   gl_cv_header_locale_h_posix2001=yes
30921 else
30922   gl_cv_header_locale_h_posix2001=no
30923 fi
30924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30925 fi
30926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
30927 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
30928
30929
30930   if test $ac_cv_header_xlocale_h = yes; then
30931     HAVE_XLOCALE_H=1
30932                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
30933 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
30934 if test "${gl_cv_header_locale_has_locale_t+set}" = set; then :
30935   $as_echo_n "(cached) " >&6
30936 else
30937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30938 /* end confdefs.h.  */
30939 #include <locale.h>
30940               locale_t x;
30941 int
30942 main ()
30943 {
30944
30945   ;
30946   return 0;
30947 }
30948 _ACEOF
30949 if ac_fn_c_try_compile "$LINENO"; then :
30950   gl_cv_header_locale_has_locale_t=yes
30951 else
30952   gl_cv_header_locale_has_locale_t=no
30953 fi
30954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30955
30956 fi
30957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
30958 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
30959     if test $gl_cv_header_locale_has_locale_t = yes; then
30960       gl_cv_header_locale_h_needs_xlocale_h=no
30961     else
30962       gl_cv_header_locale_h_needs_xlocale_h=yes
30963     fi
30964   else
30965     HAVE_XLOCALE_H=0
30966     gl_cv_header_locale_h_needs_xlocale_h=no
30967   fi
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978      if test $gl_cv_have_include_next = yes; then
30979        gl_cv_next_locale_h='<'locale.h'>'
30980      else
30981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
30982 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
30983 if test "${gl_cv_next_locale_h+set}" = set; then :
30984   $as_echo_n "(cached) " >&6
30985 else
30986
30987                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30988 /* end confdefs.h.  */
30989 #include <locale.h>
30990
30991 _ACEOF
30992                                                                                                                         case "$host_os" in
30993                  aix*) gl_absname_cpp="$ac_cpp -C" ;;
30994                  *)    gl_absname_cpp="$ac_cpp" ;;
30995                esac
30996                                                             gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30997                   sed -n '\#/locale.h#{
30998                     s#.*"\(.*/locale.h\)".*#\1#
30999                     s#^/[^/]#//&#
31000                     p
31001                     q
31002                   }'`'"'
31003
31004
31005 fi
31006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
31007 $as_echo "$gl_cv_next_locale_h" >&6; }
31008      fi
31009      NEXT_LOCALE_H=$gl_cv_next_locale_h
31010
31011      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31012        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31013        gl_next_as_first_directive='<'locale.h'>'
31014      else
31015        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31016        gl_next_as_first_directive=$gl_cv_next_locale_h
31017      fi
31018      NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
31019
31020
31021
31022
31023
31024   if test -n "$STDDEF_H" \
31025      || test $gl_cv_header_locale_h_posix2001 = no \
31026      || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
31027
31028     :
31029
31030   fi
31031
31032
31033
31034
31035
31036
31037
31038   for ac_func in setlocale uselocale
31039 do :
31040   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31041 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31042 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31043   cat >>confdefs.h <<_ACEOF
31044 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31045 _ACEOF
31046
31047 fi
31048 done
31049
31050
31051
31052
31053
31054
31055   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
31056 $as_echo_n "checking for a traditional french locale... " >&6; }
31057 if test "${gt_cv_locale_fr+set}" = set; then :
31058   $as_echo_n "(cached) " >&6
31059 else
31060
31061     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31062 /* end confdefs.h.  */
31063
31064 #include <locale.h>
31065 #include <time.h>
31066 #if HAVE_LANGINFO_CODESET
31067 # include <langinfo.h>
31068 #endif
31069 #include <stdlib.h>
31070 #include <string.h>
31071 struct tm t;
31072 char buf[16];
31073 int main () {
31074   /* Check whether the given locale name is recognized by the system.  */
31075 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31076   /* On native Win32, setlocale(category, "") looks at the system settings,
31077      not at the environment variables.  Also, when an encoding suffix such
31078      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31079      category of the locale to "C".  */
31080   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31081       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31082     return 1;
31083 #else
31084   if (setlocale (LC_ALL, "") == NULL) return 1;
31085 #endif
31086   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31087      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31088      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31089      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31090      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31091      some unit tests fail.
31092      On MirBSD 10, when an unsupported locale is specified, setlocale()
31093      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
31094 #if HAVE_LANGINFO_CODESET
31095   {
31096     const char *cs = nl_langinfo (CODESET);
31097     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31098         || strcmp (cs, "UTF-8") == 0)
31099       return 1;
31100   }
31101 #endif
31102 #ifdef __CYGWIN__
31103   /* On Cygwin, avoid locale names without encoding suffix, because the
31104      locale_charset() function relies on the encoding suffix.  Note that
31105      LC_ALL is set on the command line.  */
31106   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31107 #endif
31108   /* Check whether in the abbreviation of the second month, the second
31109      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
31110      one byte long. This excludes the UTF-8 encoding.  */
31111   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31112   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
31113   /* Check whether the decimal separator is a comma.
31114      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31115      are nl_langinfo(RADIXCHAR) are both ".".  */
31116   if (localeconv () ->decimal_point[0] != ',') return 1;
31117   return 0;
31118 }
31119
31120 _ACEOF
31121     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31122   (eval $ac_link) 2>&5
31123   ac_status=$?
31124   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31125   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31126       case "$host_os" in
31127         # Handle native Windows specially, because there setlocale() interprets
31128         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31129         # "fr" or "fra" as "French" or "French_France.1252",
31130         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31131         # "ja" as "Japanese" or "Japanese_Japan.932",
31132         # and similar.
31133         mingw*)
31134           # Test for the native Win32 locale name.
31135           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31136             gt_cv_locale_fr=French_France.1252
31137           else
31138             # None found.
31139             gt_cv_locale_fr=none
31140           fi
31141           ;;
31142         *)
31143           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31144           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31145           # configure script would override the LC_ALL setting. Likewise for
31146           # LC_CTYPE, which is also set at the beginning of the configure script.
31147           # Test for the usual locale name.
31148           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31149             gt_cv_locale_fr=fr_FR
31150           else
31151             # Test for the locale name with explicit encoding suffix.
31152             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31153               gt_cv_locale_fr=fr_FR.ISO-8859-1
31154             else
31155               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
31156               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31157                 gt_cv_locale_fr=fr_FR.ISO8859-1
31158               else
31159                 # Test for the HP-UX locale name.
31160                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31161                   gt_cv_locale_fr=fr_FR.iso88591
31162                 else
31163                   # Test for the Solaris 7 locale name.
31164                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31165                     gt_cv_locale_fr=fr
31166                   else
31167                     # None found.
31168                     gt_cv_locale_fr=none
31169                   fi
31170                 fi
31171               fi
31172             fi
31173           fi
31174           ;;
31175       esac
31176     fi
31177     rm -fr conftest*
31178
31179 fi
31180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
31181 $as_echo "$gt_cv_locale_fr" >&6; }
31182   LOCALE_FR=$gt_cv_locale_fr
31183
31184
31185
31186
31187   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
31188 $as_echo_n "checking for a french Unicode locale... " >&6; }
31189 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
31190   $as_echo_n "(cached) " >&6
31191 else
31192
31193     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31194 /* end confdefs.h.  */
31195
31196 #include <locale.h>
31197 #include <time.h>
31198 #if HAVE_LANGINFO_CODESET
31199 # include <langinfo.h>
31200 #endif
31201 #include <stdlib.h>
31202 #include <string.h>
31203 struct tm t;
31204 char buf[16];
31205 int main () {
31206   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
31207      imitates locale dependent behaviour by looking at the environment
31208      variables, and all locales use the UTF-8 encoding.  */
31209 #if !(defined __BEOS__ || defined __HAIKU__)
31210   /* Check whether the given locale name is recognized by the system.  */
31211 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31212   /* On native Win32, setlocale(category, "") looks at the system settings,
31213      not at the environment variables.  Also, when an encoding suffix such
31214      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31215      category of the locale to "C".  */
31216   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31217       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31218     return 1;
31219 # else
31220   if (setlocale (LC_ALL, "") == NULL) return 1;
31221 # endif
31222   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31223      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31224      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31225      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31226      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31227      some unit tests fail.  */
31228 # if HAVE_LANGINFO_CODESET
31229   {
31230     const char *cs = nl_langinfo (CODESET);
31231     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
31232       return 1;
31233   }
31234 # endif
31235 # ifdef __CYGWIN__
31236   /* On Cygwin, avoid locale names without encoding suffix, because the
31237      locale_charset() function relies on the encoding suffix.  Note that
31238      LC_ALL is set on the command line.  */
31239   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31240 # endif
31241   /* Check whether in the abbreviation of the second month, the second
31242      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
31243      two bytes long, with UTF-8 encoding.  */
31244   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31245   if (strftime (buf, sizeof (buf), "%b", &t) < 4
31246       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
31247     return 1;
31248 #endif
31249   /* Check whether the decimal separator is a comma.
31250      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31251      are nl_langinfo(RADIXCHAR) are both ".".  */
31252   if (localeconv () ->decimal_point[0] != ',') return 1;
31253   return 0;
31254 }
31255
31256 _ACEOF
31257     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31258   (eval $ac_link) 2>&5
31259   ac_status=$?
31260   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31261   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31262       case "$host_os" in
31263         # Handle native Windows specially, because there setlocale() interprets
31264         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31265         # "fr" or "fra" as "French" or "French_France.1252",
31266         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31267         # "ja" as "Japanese" or "Japanese_Japan.932",
31268         # and similar.
31269         mingw*)
31270           # Test for the hypothetical native Win32 locale name.
31271           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31272             gt_cv_locale_fr_utf8=French_France.65001
31273           else
31274             # None found.
31275             gt_cv_locale_fr_utf8=none
31276           fi
31277           ;;
31278         *)
31279           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31280           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31281           # configure script would override the LC_ALL setting. Likewise for
31282           # LC_CTYPE, which is also set at the beginning of the configure script.
31283           # Test for the usual locale name.
31284           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31285             gt_cv_locale_fr_utf8=fr_FR
31286           else
31287             # Test for the locale name with explicit encoding suffix.
31288             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31289               gt_cv_locale_fr_utf8=fr_FR.UTF-8
31290             else
31291               # Test for the Solaris 7 locale name.
31292               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31293                 gt_cv_locale_fr_utf8=fr.UTF-8
31294               else
31295                 # None found.
31296                 gt_cv_locale_fr_utf8=none
31297               fi
31298             fi
31299           fi
31300           ;;
31301       esac
31302     fi
31303     rm -fr conftest*
31304
31305 fi
31306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
31307 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
31308   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
31309
31310
31311
31312
31313
31314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
31315 $as_echo_n "checking for a traditional japanese locale... " >&6; }
31316 if test "${gt_cv_locale_ja+set}" = set; then :
31317   $as_echo_n "(cached) " >&6
31318 else
31319
31320     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31321 /* end confdefs.h.  */
31322
31323 #include <locale.h>
31324 #include <time.h>
31325 #if HAVE_LANGINFO_CODESET
31326 # include <langinfo.h>
31327 #endif
31328 #include <stdlib.h>
31329 #include <string.h>
31330 struct tm t;
31331 char buf[16];
31332 int main ()
31333 {
31334   const char *p;
31335   /* Check whether the given locale name is recognized by the system.  */
31336 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31337   /* On native Win32, setlocale(category, "") looks at the system settings,
31338      not at the environment variables.  Also, when an encoding suffix such
31339      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31340      category of the locale to "C".  */
31341   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31342       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31343     return 1;
31344 #else
31345   if (setlocale (LC_ALL, "") == NULL) return 1;
31346 #endif
31347   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31348      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31349      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31350      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31351      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31352      some unit tests fail.
31353      On MirBSD 10, when an unsupported locale is specified, setlocale()
31354      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
31355 #if HAVE_LANGINFO_CODESET
31356   {
31357     const char *cs = nl_langinfo (CODESET);
31358     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31359         || strcmp (cs, "UTF-8") == 0)
31360       return 1;
31361   }
31362 #endif
31363 #ifdef __CYGWIN__
31364   /* On Cygwin, avoid locale names without encoding suffix, because the
31365      locale_charset() function relies on the encoding suffix.  Note that
31366      LC_ALL is set on the command line.  */
31367   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31368 #endif
31369   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
31370      on Cygwin 1.5.x.  */
31371   if (MB_CUR_MAX == 1)
31372     return 1;
31373   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
31374      This excludes the UTF-8 encoding (except on MirBSD).  */
31375   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31376   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
31377   for (p = buf; *p != '\0'; p++)
31378     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
31379       return 1;
31380   return 0;
31381 }
31382
31383 _ACEOF
31384     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31385   (eval $ac_link) 2>&5
31386   ac_status=$?
31387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31388   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31389       case "$host_os" in
31390         # Handle native Windows specially, because there setlocale() interprets
31391         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31392         # "fr" or "fra" as "French" or "French_France.1252",
31393         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31394         # "ja" as "Japanese" or "Japanese_Japan.932",
31395         # and similar.
31396         mingw*)
31397           # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
31398           # and CP932 is very different from EUC-JP, so we cannot use it here.
31399           gt_cv_locale_ja=none
31400           ;;
31401         *)
31402           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31403           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31404           # configure script would override the LC_ALL setting. Likewise for
31405           # LC_CTYPE, which is also set at the beginning of the configure script.
31406           # Test for the AIX locale name.
31407           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31408             gt_cv_locale_ja=ja_JP
31409           else
31410             # Test for the locale name with explicit encoding suffix.
31411             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31412               gt_cv_locale_ja=ja_JP.EUC-JP
31413             else
31414               # Test for the HP-UX, OSF/1, NetBSD locale name.
31415               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31416                 gt_cv_locale_ja=ja_JP.eucJP
31417               else
31418                 # Test for the IRIX, FreeBSD locale name.
31419                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31420                   gt_cv_locale_ja=ja_JP.EUC
31421                 else
31422                   # Test for the Solaris 7 locale name.
31423                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31424                     gt_cv_locale_ja=ja
31425                   else
31426                     # Special test for NetBSD 1.6.
31427                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
31428                       gt_cv_locale_ja=ja_JP.eucJP
31429                     else
31430                       # None found.
31431                       gt_cv_locale_ja=none
31432                     fi
31433                   fi
31434                 fi
31435               fi
31436             fi
31437           fi
31438           ;;
31439       esac
31440     fi
31441     rm -fr conftest*
31442
31443 fi
31444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
31445 $as_echo "$gt_cv_locale_ja" >&6; }
31446   LOCALE_JA=$gt_cv_locale_ja
31447
31448
31449
31450
31451
31452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
31453 $as_echo_n "checking for a transitional chinese locale... " >&6; }
31454 if test "${gt_cv_locale_zh_CN+set}" = set; then :
31455   $as_echo_n "(cached) " >&6
31456 else
31457
31458     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31459 /* end confdefs.h.  */
31460
31461 #include <locale.h>
31462 #include <stdlib.h>
31463 #include <time.h>
31464 #if HAVE_LANGINFO_CODESET
31465 # include <langinfo.h>
31466 #endif
31467 #include <stdlib.h>
31468 #include <string.h>
31469 struct tm t;
31470 char buf[16];
31471 int main ()
31472 {
31473   const char *p;
31474   /* Check whether the given locale name is recognized by the system.  */
31475 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31476   /* On native Win32, setlocale(category, "") looks at the system settings,
31477      not at the environment variables.  Also, when an encoding suffix such
31478      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31479      category of the locale to "C".  */
31480   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31481       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31482     return 1;
31483 #else
31484   if (setlocale (LC_ALL, "") == NULL) return 1;
31485 #endif
31486   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31487      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31488      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31489      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31490      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31491      some unit tests fail.
31492      On MirBSD 10, when an unsupported locale is specified, setlocale()
31493      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
31494 #if HAVE_LANGINFO_CODESET
31495   {
31496     const char *cs = nl_langinfo (CODESET);
31497     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31498         || strcmp (cs, "UTF-8") == 0)
31499       return 1;
31500   }
31501 #endif
31502 #ifdef __CYGWIN__
31503   /* On Cygwin, avoid locale names without encoding suffix, because the
31504      locale_charset() function relies on the encoding suffix.  Note that
31505      LC_ALL is set on the command line.  */
31506   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31507 #endif
31508   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
31509      This excludes the UTF-8 encoding (except on MirBSD).  */
31510   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31511   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
31512   for (p = buf; *p != '\0'; p++)
31513     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
31514       return 1;
31515   /* Check whether a typical GB18030 multibyte sequence is recognized as a
31516      single wide character.  This excludes the GB2312 and GBK encodings.  */
31517   if (mblen ("\203\062\332\066", 5) != 4)
31518     return 1;
31519   return 0;
31520 }
31521
31522 _ACEOF
31523     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31524   (eval $ac_link) 2>&5
31525   ac_status=$?
31526   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31527   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31528       case "$host_os" in
31529         # Handle native Windows specially, because there setlocale() interprets
31530         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31531         # "fr" or "fra" as "French" or "French_France.1252",
31532         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31533         # "ja" as "Japanese" or "Japanese_Japan.932",
31534         # and similar.
31535         mingw*)
31536           # Test for the hypothetical native Win32 locale name.
31537           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31538             gt_cv_locale_zh_CN=Chinese_China.54936
31539           else
31540             # None found.
31541             gt_cv_locale_zh_CN=none
31542           fi
31543           ;;
31544         *)
31545           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31546           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31547           # configure script would override the LC_ALL setting. Likewise for
31548           # LC_CTYPE, which is also set at the beginning of the configure script.
31549           # Test for the locale name without encoding suffix.
31550           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31551             gt_cv_locale_zh_CN=zh_CN
31552           else
31553             # Test for the locale name with explicit encoding suffix.
31554             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31555               gt_cv_locale_zh_CN=zh_CN.GB18030
31556             else
31557               # None found.
31558               gt_cv_locale_zh_CN=none
31559             fi
31560           fi
31561           ;;
31562       esac
31563     else
31564       # If there was a link error, due to mblen(), the system is so old that
31565       # it certainly doesn't have a chinese locale.
31566       gt_cv_locale_zh_CN=none
31567     fi
31568     rm -fr conftest*
31569
31570 fi
31571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
31572 $as_echo "$gt_cv_locale_zh_CN" >&6; }
31573   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
31574
31575
31576
31577
31578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
31579 $as_echo_n "checking for a french Unicode locale... " >&6; }
31580 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
31581   $as_echo_n "(cached) " >&6
31582 else
31583
31584     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31585 /* end confdefs.h.  */
31586
31587 #include <locale.h>
31588 #include <time.h>
31589 #if HAVE_LANGINFO_CODESET
31590 # include <langinfo.h>
31591 #endif
31592 #include <stdlib.h>
31593 #include <string.h>
31594 struct tm t;
31595 char buf[16];
31596 int main () {
31597   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
31598      imitates locale dependent behaviour by looking at the environment
31599      variables, and all locales use the UTF-8 encoding.  */
31600 #if !(defined __BEOS__ || defined __HAIKU__)
31601   /* Check whether the given locale name is recognized by the system.  */
31602 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31603   /* On native Win32, setlocale(category, "") looks at the system settings,
31604      not at the environment variables.  Also, when an encoding suffix such
31605      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31606      category of the locale to "C".  */
31607   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31608       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31609     return 1;
31610 # else
31611   if (setlocale (LC_ALL, "") == NULL) return 1;
31612 # endif
31613   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31614      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31615      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31616      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31617      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31618      some unit tests fail.  */
31619 # if HAVE_LANGINFO_CODESET
31620   {
31621     const char *cs = nl_langinfo (CODESET);
31622     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
31623       return 1;
31624   }
31625 # endif
31626 # ifdef __CYGWIN__
31627   /* On Cygwin, avoid locale names without encoding suffix, because the
31628      locale_charset() function relies on the encoding suffix.  Note that
31629      LC_ALL is set on the command line.  */
31630   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31631 # endif
31632   /* Check whether in the abbreviation of the second month, the second
31633      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
31634      two bytes long, with UTF-8 encoding.  */
31635   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31636   if (strftime (buf, sizeof (buf), "%b", &t) < 4
31637       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
31638     return 1;
31639 #endif
31640   /* Check whether the decimal separator is a comma.
31641      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31642      are nl_langinfo(RADIXCHAR) are both ".".  */
31643   if (localeconv () ->decimal_point[0] != ',') return 1;
31644   return 0;
31645 }
31646
31647 _ACEOF
31648     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31649   (eval $ac_link) 2>&5
31650   ac_status=$?
31651   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31652   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31653       case "$host_os" in
31654         # Handle native Windows specially, because there setlocale() interprets
31655         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31656         # "fr" or "fra" as "French" or "French_France.1252",
31657         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31658         # "ja" as "Japanese" or "Japanese_Japan.932",
31659         # and similar.
31660         mingw*)
31661           # Test for the hypothetical native Win32 locale name.
31662           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31663             gt_cv_locale_fr_utf8=French_France.65001
31664           else
31665             # None found.
31666             gt_cv_locale_fr_utf8=none
31667           fi
31668           ;;
31669         *)
31670           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31671           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31672           # configure script would override the LC_ALL setting. Likewise for
31673           # LC_CTYPE, which is also set at the beginning of the configure script.
31674           # Test for the usual locale name.
31675           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31676             gt_cv_locale_fr_utf8=fr_FR
31677           else
31678             # Test for the locale name with explicit encoding suffix.
31679             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31680               gt_cv_locale_fr_utf8=fr_FR.UTF-8
31681             else
31682               # Test for the Solaris 7 locale name.
31683               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31684                 gt_cv_locale_fr_utf8=fr.UTF-8
31685               else
31686                 # None found.
31687                 gt_cv_locale_fr_utf8=none
31688               fi
31689             fi
31690           fi
31691           ;;
31692       esac
31693     fi
31694     rm -fr conftest*
31695
31696 fi
31697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
31698 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
31699   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
31700
31701
31702
31703
31704
31705   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
31706   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
31707   # irrelevant for anonymous mappings.
31708   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
31709 if test "x$ac_cv_func_mmap" = x""yes; then :
31710   gl_have_mmap=yes
31711 else
31712   gl_have_mmap=no
31713 fi
31714
31715
31716   # Try to allow MAP_ANONYMOUS.
31717   gl_have_mmap_anonymous=no
31718   if test $gl_have_mmap = yes; then
31719     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
31720 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
31721     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31722 /* end confdefs.h.  */
31723
31724 #include <sys/mman.h>
31725 #ifdef MAP_ANONYMOUS
31726     I cant identify this map.
31727 #endif
31728
31729 _ACEOF
31730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31731   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31732   gl_have_mmap_anonymous=yes
31733 fi
31734 rm -f conftest*
31735
31736     if test $gl_have_mmap_anonymous != yes; then
31737       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31738 /* end confdefs.h.  */
31739
31740 #include <sys/mman.h>
31741 #ifdef MAP_ANON
31742     I cant identify this map.
31743 #endif
31744
31745 _ACEOF
31746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31747   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31748
31749 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
31750
31751          gl_have_mmap_anonymous=yes
31752 fi
31753 rm -f conftest*
31754
31755     fi
31756     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
31757 $as_echo "$gl_have_mmap_anonymous" >&6; }
31758     if test $gl_have_mmap_anonymous = yes; then
31759
31760 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
31761
31762     fi
31763   fi
31764
31765
31766
31767
31768
31769
31770   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
31771   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
31772   # irrelevant for anonymous mappings.
31773   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
31774 if test "x$ac_cv_func_mmap" = x""yes; then :
31775   gl_have_mmap=yes
31776 else
31777   gl_have_mmap=no
31778 fi
31779
31780
31781   # Try to allow MAP_ANONYMOUS.
31782   gl_have_mmap_anonymous=no
31783   if test $gl_have_mmap = yes; then
31784     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
31785 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
31786     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31787 /* end confdefs.h.  */
31788
31789 #include <sys/mman.h>
31790 #ifdef MAP_ANONYMOUS
31791     I cant identify this map.
31792 #endif
31793
31794 _ACEOF
31795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31796   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31797   gl_have_mmap_anonymous=yes
31798 fi
31799 rm -f conftest*
31800
31801     if test $gl_have_mmap_anonymous != yes; then
31802       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803 /* end confdefs.h.  */
31804
31805 #include <sys/mman.h>
31806 #ifdef MAP_ANON
31807     I cant identify this map.
31808 #endif
31809
31810 _ACEOF
31811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31812   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
31813
31814 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
31815
31816          gl_have_mmap_anonymous=yes
31817 fi
31818 rm -f conftest*
31819
31820     fi
31821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
31822 $as_echo "$gl_have_mmap_anonymous" >&6; }
31823     if test $gl_have_mmap_anonymous = yes; then
31824
31825 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
31826
31827     fi
31828   fi
31829
31830
31831
31832
31833
31834
31835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
31836 $as_echo_n "checking for a traditional french locale... " >&6; }
31837 if test "${gt_cv_locale_fr+set}" = set; then :
31838   $as_echo_n "(cached) " >&6
31839 else
31840
31841     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31842 /* end confdefs.h.  */
31843
31844 #include <locale.h>
31845 #include <time.h>
31846 #if HAVE_LANGINFO_CODESET
31847 # include <langinfo.h>
31848 #endif
31849 #include <stdlib.h>
31850 #include <string.h>
31851 struct tm t;
31852 char buf[16];
31853 int main () {
31854   /* Check whether the given locale name is recognized by the system.  */
31855 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31856   /* On native Win32, setlocale(category, "") looks at the system settings,
31857      not at the environment variables.  Also, when an encoding suffix such
31858      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31859      category of the locale to "C".  */
31860   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31861       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31862     return 1;
31863 #else
31864   if (setlocale (LC_ALL, "") == NULL) return 1;
31865 #endif
31866   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31867      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
31868      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31869      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31870      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31871      some unit tests fail.
31872      On MirBSD 10, when an unsupported locale is specified, setlocale()
31873      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
31874 #if HAVE_LANGINFO_CODESET
31875   {
31876     const char *cs = nl_langinfo (CODESET);
31877     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
31878         || strcmp (cs, "UTF-8") == 0)
31879       return 1;
31880   }
31881 #endif
31882 #ifdef __CYGWIN__
31883   /* On Cygwin, avoid locale names without encoding suffix, because the
31884      locale_charset() function relies on the encoding suffix.  Note that
31885      LC_ALL is set on the command line.  */
31886   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31887 #endif
31888   /* Check whether in the abbreviation of the second month, the second
31889      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
31890      one byte long. This excludes the UTF-8 encoding.  */
31891   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
31892   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
31893   /* Check whether the decimal separator is a comma.
31894      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
31895      are nl_langinfo(RADIXCHAR) are both ".".  */
31896   if (localeconv () ->decimal_point[0] != ',') return 1;
31897   return 0;
31898 }
31899
31900 _ACEOF
31901     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31902   (eval $ac_link) 2>&5
31903   ac_status=$?
31904   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31905   test $ac_status = 0; } && test -s conftest$ac_exeext; then
31906       case "$host_os" in
31907         # Handle native Windows specially, because there setlocale() interprets
31908         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31909         # "fr" or "fra" as "French" or "French_France.1252",
31910         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31911         # "ja" as "Japanese" or "Japanese_Japan.932",
31912         # and similar.
31913         mingw*)
31914           # Test for the native Win32 locale name.
31915           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31916             gt_cv_locale_fr=French_France.1252
31917           else
31918             # None found.
31919             gt_cv_locale_fr=none
31920           fi
31921           ;;
31922         *)
31923           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31924           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
31925           # configure script would override the LC_ALL setting. Likewise for
31926           # LC_CTYPE, which is also set at the beginning of the configure script.
31927           # Test for the usual locale name.
31928           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31929             gt_cv_locale_fr=fr_FR
31930           else
31931             # Test for the locale name with explicit encoding suffix.
31932             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31933               gt_cv_locale_fr=fr_FR.ISO-8859-1
31934             else
31935               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
31936               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31937                 gt_cv_locale_fr=fr_FR.ISO8859-1
31938               else
31939                 # Test for the HP-UX locale name.
31940                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31941                   gt_cv_locale_fr=fr_FR.iso88591
31942                 else
31943                   # Test for the Solaris 7 locale name.
31944                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31945                     gt_cv_locale_fr=fr
31946                   else
31947                     # None found.
31948                     gt_cv_locale_fr=none
31949                   fi
31950                 fi
31951               fi
31952             fi
31953           fi
31954           ;;
31955       esac
31956     fi
31957     rm -fr conftest*
31958
31959 fi
31960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
31961 $as_echo "$gt_cv_locale_fr" >&6; }
31962   LOCALE_FR=$gt_cv_locale_fr
31963
31964
31965
31966
31967   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
31968 $as_echo_n "checking for a french Unicode locale... " >&6; }
31969 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
31970   $as_echo_n "(cached) " >&6
31971 else
31972
31973     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31974 /* end confdefs.h.  */
31975
31976 #include <locale.h>
31977 #include <time.h>
31978 #if HAVE_LANGINFO_CODESET
31979 # include <langinfo.h>
31980 #endif
31981 #include <stdlib.h>
31982 #include <string.h>
31983 struct tm t;
31984 char buf[16];
31985 int main () {
31986   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
31987      imitates locale dependent behaviour by looking at the environment
31988      variables, and all locales use the UTF-8 encoding.  */
31989 #if !(defined __BEOS__ || defined __HAIKU__)
31990   /* Check whether the given locale name is recognized by the system.  */
31991 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
31992   /* On native Win32, setlocale(category, "") looks at the system settings,
31993      not at the environment variables.  Also, when an encoding suffix such
31994      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
31995      category of the locale to "C".  */
31996   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31997       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31998     return 1;
31999 # else
32000   if (setlocale (LC_ALL, "") == NULL) return 1;
32001 # endif
32002   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32003      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32004      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32005      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32006      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32007      some unit tests fail.  */
32008 # if HAVE_LANGINFO_CODESET
32009   {
32010     const char *cs = nl_langinfo (CODESET);
32011     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32012       return 1;
32013   }
32014 # endif
32015 # ifdef __CYGWIN__
32016   /* On Cygwin, avoid locale names without encoding suffix, because the
32017      locale_charset() function relies on the encoding suffix.  Note that
32018      LC_ALL is set on the command line.  */
32019   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32020 # endif
32021   /* Check whether in the abbreviation of the second month, the second
32022      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32023      two bytes long, with UTF-8 encoding.  */
32024   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32025   if (strftime (buf, sizeof (buf), "%b", &t) < 4
32026       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32027     return 1;
32028 #endif
32029   /* Check whether the decimal separator is a comma.
32030      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32031      are nl_langinfo(RADIXCHAR) are both ".".  */
32032   if (localeconv () ->decimal_point[0] != ',') return 1;
32033   return 0;
32034 }
32035
32036 _ACEOF
32037     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32038   (eval $ac_link) 2>&5
32039   ac_status=$?
32040   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32041   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32042       case "$host_os" in
32043         # Handle native Windows specially, because there setlocale() interprets
32044         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32045         # "fr" or "fra" as "French" or "French_France.1252",
32046         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32047         # "ja" as "Japanese" or "Japanese_Japan.932",
32048         # and similar.
32049         mingw*)
32050           # Test for the hypothetical native Win32 locale name.
32051           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32052             gt_cv_locale_fr_utf8=French_France.65001
32053           else
32054             # None found.
32055             gt_cv_locale_fr_utf8=none
32056           fi
32057           ;;
32058         *)
32059           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32060           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32061           # configure script would override the LC_ALL setting. Likewise for
32062           # LC_CTYPE, which is also set at the beginning of the configure script.
32063           # Test for the usual locale name.
32064           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32065             gt_cv_locale_fr_utf8=fr_FR
32066           else
32067             # Test for the locale name with explicit encoding suffix.
32068             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32069               gt_cv_locale_fr_utf8=fr_FR.UTF-8
32070             else
32071               # Test for the Solaris 7 locale name.
32072               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32073                 gt_cv_locale_fr_utf8=fr.UTF-8
32074               else
32075                 # None found.
32076                 gt_cv_locale_fr_utf8=none
32077               fi
32078             fi
32079           fi
32080           ;;
32081       esac
32082     fi
32083     rm -fr conftest*
32084
32085 fi
32086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32087 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
32088   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32089
32090
32091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32092 /* end confdefs.h.  */
32093 [
32094   #if defined _MSC_VER || defined __MINGW32__
32095     notposix
32096   #endif
32097     ]
32098 _ACEOF
32099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32100   $EGREP "notposix" >/dev/null 2>&1; then :
32101   posix_spawn_ported=no
32102 else
32103   posix_spawn_ported=yes
32104 fi
32105 rm -f conftest*
32106
32107    if test $posix_spawn_ported = yes; then
32108   POSIX_SPAWN_PORTED_TRUE=
32109   POSIX_SPAWN_PORTED_FALSE='#'
32110 else
32111   POSIX_SPAWN_PORTED_TRUE='#'
32112   POSIX_SPAWN_PORTED_FALSE=
32113 fi
32114
32115
32116
32117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
32118 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
32119 if test "${gl_cv_func_svid_putenv+set}" = set; then :
32120   $as_echo_n "(cached) " >&6
32121 else
32122   if test "$cross_compiling" = yes; then :
32123                gl_cv_func_svid_putenv=no
32124 else
32125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32126 /* end confdefs.h.  */
32127 $ac_includes_default
32128 int
32129 main ()
32130 {
32131
32132     /* Put it in env.  */
32133     if (putenv ("CONFTEST_putenv=val"))
32134       return 1;
32135
32136     /* Try to remove it.  */
32137     if (putenv ("CONFTEST_putenv"))
32138       return 2;
32139
32140     /* Make sure it was deleted.  */
32141     if (getenv ("CONFTEST_putenv") != 0)
32142       return 3;
32143
32144     return 0;
32145
32146   ;
32147   return 0;
32148 }
32149 _ACEOF
32150 if ac_fn_c_try_run "$LINENO"; then :
32151   gl_cv_func_svid_putenv=yes
32152 else
32153   gl_cv_func_svid_putenv=no
32154 fi
32155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32156   conftest.$ac_objext conftest.beam conftest.$ac_ext
32157 fi
32158
32159
32160 fi
32161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
32162 $as_echo "$gl_cv_func_svid_putenv" >&6; }
32163   if test $gl_cv_func_svid_putenv = no; then
32164     REPLACE_PUTENV=1
32165
32166
32167
32168
32169
32170
32171
32172
32173   M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
32174
32175   fi
32176
32177
32178
32179
32180   GNULIB_PUTENV=$gl_module_indicator_condition
32181
32182
32183
32184 $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
32185
32186
32187
32188
32189
32190
32191   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
32192   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
32193   # irrelevant for anonymous mappings.
32194   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
32195 if test "x$ac_cv_func_mmap" = x""yes; then :
32196   gl_have_mmap=yes
32197 else
32198   gl_have_mmap=no
32199 fi
32200
32201
32202   # Try to allow MAP_ANONYMOUS.
32203   gl_have_mmap_anonymous=no
32204   if test $gl_have_mmap = yes; then
32205     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
32206 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
32207     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208 /* end confdefs.h.  */
32209
32210 #include <sys/mman.h>
32211 #ifdef MAP_ANONYMOUS
32212     I cant identify this map.
32213 #endif
32214
32215 _ACEOF
32216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32217   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
32218   gl_have_mmap_anonymous=yes
32219 fi
32220 rm -f conftest*
32221
32222     if test $gl_have_mmap_anonymous != yes; then
32223       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32224 /* end confdefs.h.  */
32225
32226 #include <sys/mman.h>
32227 #ifdef MAP_ANON
32228     I cant identify this map.
32229 #endif
32230
32231 _ACEOF
32232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32233   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
32234
32235 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
32236
32237          gl_have_mmap_anonymous=yes
32238 fi
32239 rm -f conftest*
32240
32241     fi
32242     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
32243 $as_echo "$gl_have_mmap_anonymous" >&6; }
32244     if test $gl_have_mmap_anonymous = yes; then
32245
32246 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
32247
32248     fi
32249   fi
32250
32251
32252
32253
32254
32255   if test $HAVE_SETENV$REPLACE_SETENV != 10; then
32256
32257
32258
32259
32260
32261
32262
32263
32264   M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
32265
32266   fi
32267
32268
32269
32270
32271   GNULIB_SETENV=$gl_module_indicator_condition
32272
32273
32274
32275 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
32276
32277
32278
32279
32280
32281
32282   case "$host_os" in
32283             mingw*) REPLACE_SETLOCALE=1 ;;
32284   esac
32285   if test $REPLACE_SETLOCALE = 1; then
32286
32287     :
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297   M4tests_LIBOBJS="$M4tests_LIBOBJS setlocale.$ac_objext"
32298
32299
32300   :
32301
32302   fi
32303
32304
32305
32306
32307   GNULIB_SETLOCALE=$gl_module_indicator_condition
32308
32309
32310
32311 $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
32312
32313
32314
32315
32316
32317
32318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
32319 $as_echo_n "checking for a traditional french locale... " >&6; }
32320 if test "${gt_cv_locale_fr+set}" = set; then :
32321   $as_echo_n "(cached) " >&6
32322 else
32323
32324     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32325 /* end confdefs.h.  */
32326
32327 #include <locale.h>
32328 #include <time.h>
32329 #if HAVE_LANGINFO_CODESET
32330 # include <langinfo.h>
32331 #endif
32332 #include <stdlib.h>
32333 #include <string.h>
32334 struct tm t;
32335 char buf[16];
32336 int main () {
32337   /* Check whether the given locale name is recognized by the system.  */
32338 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32339   /* On native Win32, setlocale(category, "") looks at the system settings,
32340      not at the environment variables.  Also, when an encoding suffix such
32341      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32342      category of the locale to "C".  */
32343   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32344       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32345     return 1;
32346 #else
32347   if (setlocale (LC_ALL, "") == NULL) return 1;
32348 #endif
32349   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32350      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32351      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32352      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32353      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32354      some unit tests fail.
32355      On MirBSD 10, when an unsupported locale is specified, setlocale()
32356      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32357 #if HAVE_LANGINFO_CODESET
32358   {
32359     const char *cs = nl_langinfo (CODESET);
32360     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32361         || strcmp (cs, "UTF-8") == 0)
32362       return 1;
32363   }
32364 #endif
32365 #ifdef __CYGWIN__
32366   /* On Cygwin, avoid locale names without encoding suffix, because the
32367      locale_charset() function relies on the encoding suffix.  Note that
32368      LC_ALL is set on the command line.  */
32369   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32370 #endif
32371   /* Check whether in the abbreviation of the second month, the second
32372      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
32373      one byte long. This excludes the UTF-8 encoding.  */
32374   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32375   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
32376   /* Check whether the decimal separator is a comma.
32377      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32378      are nl_langinfo(RADIXCHAR) are both ".".  */
32379   if (localeconv () ->decimal_point[0] != ',') return 1;
32380   return 0;
32381 }
32382
32383 _ACEOF
32384     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32385   (eval $ac_link) 2>&5
32386   ac_status=$?
32387   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32388   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32389       case "$host_os" in
32390         # Handle native Windows specially, because there setlocale() interprets
32391         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32392         # "fr" or "fra" as "French" or "French_France.1252",
32393         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32394         # "ja" as "Japanese" or "Japanese_Japan.932",
32395         # and similar.
32396         mingw*)
32397           # Test for the native Win32 locale name.
32398           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32399             gt_cv_locale_fr=French_France.1252
32400           else
32401             # None found.
32402             gt_cv_locale_fr=none
32403           fi
32404           ;;
32405         *)
32406           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32407           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32408           # configure script would override the LC_ALL setting. Likewise for
32409           # LC_CTYPE, which is also set at the beginning of the configure script.
32410           # Test for the usual locale name.
32411           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32412             gt_cv_locale_fr=fr_FR
32413           else
32414             # Test for the locale name with explicit encoding suffix.
32415             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32416               gt_cv_locale_fr=fr_FR.ISO-8859-1
32417             else
32418               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
32419               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32420                 gt_cv_locale_fr=fr_FR.ISO8859-1
32421               else
32422                 # Test for the HP-UX locale name.
32423                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32424                   gt_cv_locale_fr=fr_FR.iso88591
32425                 else
32426                   # Test for the Solaris 7 locale name.
32427                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32428                     gt_cv_locale_fr=fr
32429                   else
32430                     # None found.
32431                     gt_cv_locale_fr=none
32432                   fi
32433                 fi
32434               fi
32435             fi
32436           fi
32437           ;;
32438       esac
32439     fi
32440     rm -fr conftest*
32441
32442 fi
32443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
32444 $as_echo "$gt_cv_locale_fr" >&6; }
32445   LOCALE_FR=$gt_cv_locale_fr
32446
32447
32448
32449
32450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32451 $as_echo_n "checking for a french Unicode locale... " >&6; }
32452 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
32453   $as_echo_n "(cached) " >&6
32454 else
32455
32456     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32457 /* end confdefs.h.  */
32458
32459 #include <locale.h>
32460 #include <time.h>
32461 #if HAVE_LANGINFO_CODESET
32462 # include <langinfo.h>
32463 #endif
32464 #include <stdlib.h>
32465 #include <string.h>
32466 struct tm t;
32467 char buf[16];
32468 int main () {
32469   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32470      imitates locale dependent behaviour by looking at the environment
32471      variables, and all locales use the UTF-8 encoding.  */
32472 #if !(defined __BEOS__ || defined __HAIKU__)
32473   /* Check whether the given locale name is recognized by the system.  */
32474 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32475   /* On native Win32, setlocale(category, "") looks at the system settings,
32476      not at the environment variables.  Also, when an encoding suffix such
32477      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32478      category of the locale to "C".  */
32479   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32480       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32481     return 1;
32482 # else
32483   if (setlocale (LC_ALL, "") == NULL) return 1;
32484 # endif
32485   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32486      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32487      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32488      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32489      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32490      some unit tests fail.  */
32491 # if HAVE_LANGINFO_CODESET
32492   {
32493     const char *cs = nl_langinfo (CODESET);
32494     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32495       return 1;
32496   }
32497 # endif
32498 # ifdef __CYGWIN__
32499   /* On Cygwin, avoid locale names without encoding suffix, because the
32500      locale_charset() function relies on the encoding suffix.  Note that
32501      LC_ALL is set on the command line.  */
32502   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32503 # endif
32504   /* Check whether in the abbreviation of the second month, the second
32505      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32506      two bytes long, with UTF-8 encoding.  */
32507   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32508   if (strftime (buf, sizeof (buf), "%b", &t) < 4
32509       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32510     return 1;
32511 #endif
32512   /* Check whether the decimal separator is a comma.
32513      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32514      are nl_langinfo(RADIXCHAR) are both ".".  */
32515   if (localeconv () ->decimal_point[0] != ',') return 1;
32516   return 0;
32517 }
32518
32519 _ACEOF
32520     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32521   (eval $ac_link) 2>&5
32522   ac_status=$?
32523   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32524   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32525       case "$host_os" in
32526         # Handle native Windows specially, because there setlocale() interprets
32527         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32528         # "fr" or "fra" as "French" or "French_France.1252",
32529         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32530         # "ja" as "Japanese" or "Japanese_Japan.932",
32531         # and similar.
32532         mingw*)
32533           # Test for the hypothetical native Win32 locale name.
32534           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32535             gt_cv_locale_fr_utf8=French_France.65001
32536           else
32537             # None found.
32538             gt_cv_locale_fr_utf8=none
32539           fi
32540           ;;
32541         *)
32542           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32543           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32544           # configure script would override the LC_ALL setting. Likewise for
32545           # LC_CTYPE, which is also set at the beginning of the configure script.
32546           # Test for the usual locale name.
32547           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32548             gt_cv_locale_fr_utf8=fr_FR
32549           else
32550             # Test for the locale name with explicit encoding suffix.
32551             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32552               gt_cv_locale_fr_utf8=fr_FR.UTF-8
32553             else
32554               # Test for the Solaris 7 locale name.
32555               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32556                 gt_cv_locale_fr_utf8=fr.UTF-8
32557               else
32558                 # None found.
32559                 gt_cv_locale_fr_utf8=none
32560               fi
32561             fi
32562           fi
32563           ;;
32564       esac
32565     fi
32566     rm -fr conftest*
32567
32568 fi
32569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32570 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
32571   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32572
32573
32574
32575
32576
32577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
32578 $as_echo_n "checking for a traditional japanese locale... " >&6; }
32579 if test "${gt_cv_locale_ja+set}" = set; then :
32580   $as_echo_n "(cached) " >&6
32581 else
32582
32583     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32584 /* end confdefs.h.  */
32585
32586 #include <locale.h>
32587 #include <time.h>
32588 #if HAVE_LANGINFO_CODESET
32589 # include <langinfo.h>
32590 #endif
32591 #include <stdlib.h>
32592 #include <string.h>
32593 struct tm t;
32594 char buf[16];
32595 int main ()
32596 {
32597   const char *p;
32598   /* Check whether the given locale name is recognized by the system.  */
32599 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32600   /* On native Win32, setlocale(category, "") looks at the system settings,
32601      not at the environment variables.  Also, when an encoding suffix such
32602      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32603      category of the locale to "C".  */
32604   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32605       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32606     return 1;
32607 #else
32608   if (setlocale (LC_ALL, "") == NULL) return 1;
32609 #endif
32610   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32611      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32612      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32613      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32614      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32615      some unit tests fail.
32616      On MirBSD 10, when an unsupported locale is specified, setlocale()
32617      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32618 #if HAVE_LANGINFO_CODESET
32619   {
32620     const char *cs = nl_langinfo (CODESET);
32621     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32622         || strcmp (cs, "UTF-8") == 0)
32623       return 1;
32624   }
32625 #endif
32626 #ifdef __CYGWIN__
32627   /* On Cygwin, avoid locale names without encoding suffix, because the
32628      locale_charset() function relies on the encoding suffix.  Note that
32629      LC_ALL is set on the command line.  */
32630   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32631 #endif
32632   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
32633      on Cygwin 1.5.x.  */
32634   if (MB_CUR_MAX == 1)
32635     return 1;
32636   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32637      This excludes the UTF-8 encoding (except on MirBSD).  */
32638   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32639   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32640   for (p = buf; *p != '\0'; p++)
32641     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32642       return 1;
32643   return 0;
32644 }
32645
32646 _ACEOF
32647     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32648   (eval $ac_link) 2>&5
32649   ac_status=$?
32650   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32651   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32652       case "$host_os" in
32653         # Handle native Windows specially, because there setlocale() interprets
32654         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32655         # "fr" or "fra" as "French" or "French_France.1252",
32656         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32657         # "ja" as "Japanese" or "Japanese_Japan.932",
32658         # and similar.
32659         mingw*)
32660           # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
32661           # and CP932 is very different from EUC-JP, so we cannot use it here.
32662           gt_cv_locale_ja=none
32663           ;;
32664         *)
32665           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32666           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32667           # configure script would override the LC_ALL setting. Likewise for
32668           # LC_CTYPE, which is also set at the beginning of the configure script.
32669           # Test for the AIX locale name.
32670           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32671             gt_cv_locale_ja=ja_JP
32672           else
32673             # Test for the locale name with explicit encoding suffix.
32674             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32675               gt_cv_locale_ja=ja_JP.EUC-JP
32676             else
32677               # Test for the HP-UX, OSF/1, NetBSD locale name.
32678               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32679                 gt_cv_locale_ja=ja_JP.eucJP
32680               else
32681                 # Test for the IRIX, FreeBSD locale name.
32682                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32683                   gt_cv_locale_ja=ja_JP.EUC
32684                 else
32685                   # Test for the Solaris 7 locale name.
32686                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32687                     gt_cv_locale_ja=ja
32688                   else
32689                     # Special test for NetBSD 1.6.
32690                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
32691                       gt_cv_locale_ja=ja_JP.eucJP
32692                     else
32693                       # None found.
32694                       gt_cv_locale_ja=none
32695                     fi
32696                   fi
32697                 fi
32698               fi
32699             fi
32700           fi
32701           ;;
32702       esac
32703     fi
32704     rm -fr conftest*
32705
32706 fi
32707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
32708 $as_echo "$gt_cv_locale_ja" >&6; }
32709   LOCALE_JA=$gt_cv_locale_ja
32710
32711
32712
32713
32714
32715   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
32716 $as_echo_n "checking for a transitional chinese locale... " >&6; }
32717 if test "${gt_cv_locale_zh_CN+set}" = set; then :
32718   $as_echo_n "(cached) " >&6
32719 else
32720
32721     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32722 /* end confdefs.h.  */
32723
32724 #include <locale.h>
32725 #include <stdlib.h>
32726 #include <time.h>
32727 #if HAVE_LANGINFO_CODESET
32728 # include <langinfo.h>
32729 #endif
32730 #include <stdlib.h>
32731 #include <string.h>
32732 struct tm t;
32733 char buf[16];
32734 int main ()
32735 {
32736   const char *p;
32737   /* Check whether the given locale name is recognized by the system.  */
32738 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
32739   /* On native Win32, setlocale(category, "") looks at the system settings,
32740      not at the environment variables.  Also, when an encoding suffix such
32741      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
32742      category of the locale to "C".  */
32743   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32744       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32745     return 1;
32746 #else
32747   if (setlocale (LC_ALL, "") == NULL) return 1;
32748 #endif
32749   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32750      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32751      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32752      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32753      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32754      some unit tests fail.
32755      On MirBSD 10, when an unsupported locale is specified, setlocale()
32756      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32757 #if HAVE_LANGINFO_CODESET
32758   {
32759     const char *cs = nl_langinfo (CODESET);
32760     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32761         || strcmp (cs, "UTF-8") == 0)
32762       return 1;
32763   }
32764 #endif
32765 #ifdef __CYGWIN__
32766   /* On Cygwin, avoid locale names without encoding suffix, because the
32767      locale_charset() function relies on the encoding suffix.  Note that
32768      LC_ALL is set on the command line.  */
32769   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32770 #endif
32771   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32772      This excludes the UTF-8 encoding (except on MirBSD).  */
32773   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32774   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32775   for (p = buf; *p != '\0'; p++)
32776     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32777       return 1;
32778   /* Check whether a typical GB18030 multibyte sequence is recognized as a
32779      single wide character.  This excludes the GB2312 and GBK encodings.  */
32780   if (mblen ("\203\062\332\066", 5) != 4)
32781     return 1;
32782   return 0;
32783 }
32784
32785 _ACEOF
32786     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32787   (eval $ac_link) 2>&5
32788   ac_status=$?
32789   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32790   test $ac_status = 0; } && test -s conftest$ac_exeext; then
32791       case "$host_os" in
32792         # Handle native Windows specially, because there setlocale() interprets
32793         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32794         # "fr" or "fra" as "French" or "French_France.1252",
32795         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32796         # "ja" as "Japanese" or "Japanese_Japan.932",
32797         # and similar.
32798         mingw*)
32799           # Test for the hypothetical native Win32 locale name.
32800           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32801             gt_cv_locale_zh_CN=Chinese_China.54936
32802           else
32803             # None found.
32804             gt_cv_locale_zh_CN=none
32805           fi
32806           ;;
32807         *)
32808           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32809           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
32810           # configure script would override the LC_ALL setting. Likewise for
32811           # LC_CTYPE, which is also set at the beginning of the configure script.
32812           # Test for the locale name without encoding suffix.
32813           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32814             gt_cv_locale_zh_CN=zh_CN
32815           else
32816             # Test for the locale name with explicit encoding suffix.
32817             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32818               gt_cv_locale_zh_CN=zh_CN.GB18030
32819             else
32820               # None found.
32821               gt_cv_locale_zh_CN=none
32822             fi
32823           fi
32824           ;;
32825       esac
32826     else
32827       # If there was a link error, due to mblen(), the system is so old that
32828       # it certainly doesn't have a chinese locale.
32829       gt_cv_locale_zh_CN=none
32830     fi
32831     rm -fr conftest*
32832
32833 fi
32834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
32835 $as_echo "$gt_cv_locale_zh_CN" >&6; }
32836   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
32837
32838
32839
32840
32841
32842
32843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
32844 $as_echo_n "checking for wchar_t... " >&6; }
32845 if test "${gt_cv_c_wchar_t+set}" = set; then :
32846   $as_echo_n "(cached) " >&6
32847 else
32848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32849 /* end confdefs.h.  */
32850 #include <stddef.h>
32851             wchar_t foo = (wchar_t)'\0';
32852 int
32853 main ()
32854 {
32855
32856   ;
32857   return 0;
32858 }
32859 _ACEOF
32860 if ac_fn_c_try_compile "$LINENO"; then :
32861   gt_cv_c_wchar_t=yes
32862 else
32863   gt_cv_c_wchar_t=no
32864 fi
32865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32866 fi
32867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
32868 $as_echo "$gt_cv_c_wchar_t" >&6; }
32869   if test $gt_cv_c_wchar_t = yes; then
32870
32871 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
32872
32873   fi
32874
32875
32876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
32877 $as_echo_n "checking for wint_t... " >&6; }
32878 if test "${gt_cv_c_wint_t+set}" = set; then :
32879   $as_echo_n "(cached) " >&6
32880 else
32881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32882 /* end confdefs.h.  */
32883
32884 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32885    <wchar.h>.
32886    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32887    before <wchar.h>.  */
32888 #include <stddef.h>
32889 #include <stdio.h>
32890 #include <time.h>
32891 #include <wchar.h>
32892             wint_t foo = (wchar_t)'\0';
32893 int
32894 main ()
32895 {
32896
32897   ;
32898   return 0;
32899 }
32900 _ACEOF
32901 if ac_fn_c_try_compile "$LINENO"; then :
32902   gt_cv_c_wint_t=yes
32903 else
32904   gt_cv_c_wint_t=no
32905 fi
32906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32907 fi
32908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
32909 $as_echo "$gt_cv_c_wint_t" >&6; }
32910   if test $gt_cv_c_wint_t = yes; then
32911
32912 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
32913
32914   fi
32915
32916
32917
32918
32919
32920   if test $ac_cv_func_strdup = yes; then
32921     if test $gl_cv_func_malloc_posix != yes; then
32922       REPLACE_STRDUP=1
32923
32924
32925
32926
32927
32928
32929
32930
32931   M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
32932
32933       :
32934     fi
32935   else
32936
32937
32938
32939
32940
32941
32942
32943
32944   M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
32945
32946     :
32947   fi
32948
32949   if test $ac_cv_have_decl_strdup = no; then
32950     HAVE_DECL_STRDUP=0
32951   fi
32952
32953
32954
32955
32956   GNULIB_STRDUP=$gl_module_indicator_condition
32957
32958
32959
32960 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
32961
32962
32963
32964
32965
32966
32967   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
32968   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
32969   # irrelevant for anonymous mappings.
32970   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
32971 if test "x$ac_cv_func_mmap" = x""yes; then :
32972   gl_have_mmap=yes
32973 else
32974   gl_have_mmap=no
32975 fi
32976
32977
32978   # Try to allow MAP_ANONYMOUS.
32979   gl_have_mmap_anonymous=no
32980   if test $gl_have_mmap = yes; then
32981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
32982 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
32983     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32984 /* end confdefs.h.  */
32985
32986 #include <sys/mman.h>
32987 #ifdef MAP_ANONYMOUS
32988     I cant identify this map.
32989 #endif
32990
32991 _ACEOF
32992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32993   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
32994   gl_have_mmap_anonymous=yes
32995 fi
32996 rm -f conftest*
32997
32998     if test $gl_have_mmap_anonymous != yes; then
32999       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33000 /* end confdefs.h.  */
33001
33002 #include <sys/mman.h>
33003 #ifdef MAP_ANON
33004     I cant identify this map.
33005 #endif
33006
33007 _ACEOF
33008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33009   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
33010
33011 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
33012
33013          gl_have_mmap_anonymous=yes
33014 fi
33015 rm -f conftest*
33016
33017     fi
33018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
33019 $as_echo "$gl_have_mmap_anonymous" >&6; }
33020     if test $gl_have_mmap_anonymous = yes; then
33021
33022 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
33023
33024     fi
33025   fi
33026
33027
33028
33029
33030
33031
33032
33033   # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
33034   # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
33035   # irrelevant for anonymous mappings.
33036   ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
33037 if test "x$ac_cv_func_mmap" = x""yes; then :
33038   gl_have_mmap=yes
33039 else
33040   gl_have_mmap=no
33041 fi
33042
33043
33044   # Try to allow MAP_ANONYMOUS.
33045   gl_have_mmap_anonymous=no
33046   if test $gl_have_mmap = yes; then
33047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
33048 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
33049     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33050 /* end confdefs.h.  */
33051
33052 #include <sys/mman.h>
33053 #ifdef MAP_ANONYMOUS
33054     I cant identify this map.
33055 #endif
33056
33057 _ACEOF
33058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33059   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
33060   gl_have_mmap_anonymous=yes
33061 fi
33062 rm -f conftest*
33063
33064     if test $gl_have_mmap_anonymous != yes; then
33065       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33066 /* end confdefs.h.  */
33067
33068 #include <sys/mman.h>
33069 #ifdef MAP_ANON
33070     I cant identify this map.
33071 #endif
33072
33073 _ACEOF
33074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33075   $EGREP "I cant identify this map." >/dev/null 2>&1; then :
33076
33077 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
33078
33079          gl_have_mmap_anonymous=yes
33080 fi
33081 rm -f conftest*
33082
33083     fi
33084     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
33085 $as_echo "$gl_have_mmap_anonymous" >&6; }
33086     if test $gl_have_mmap_anonymous = yes; then
33087
33088 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
33089
33090     fi
33091   fi
33092
33093
33094
33095
33096
33097
33098         if test $ac_cv_func_symlink = no; then
33099     HAVE_SYMLINK=0
33100
33101
33102
33103
33104
33105
33106
33107
33108   M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
33109
33110   else
33111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
33112 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
33113 if test "${gl_cv_func_symlink_works+set}" = set; then :
33114   $as_echo_n "(cached) " >&6
33115 else
33116   if test "$cross_compiling" = yes; then :
33117   gl_cv_func_symlink_works="guessing no"
33118 else
33119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33120 /* end confdefs.h.  */
33121 #include <unistd.h>
33122
33123 int
33124 main ()
33125 {
33126 int result = 0;
33127              if (!symlink ("a", "conftest.link/"))
33128                result |= 1;
33129              if (symlink ("conftest.f", "conftest.lnk2"))
33130                result |= 2;
33131              else if (!symlink ("a", "conftest.lnk2/"))
33132                result |= 4;
33133              return result;
33134
33135   ;
33136   return 0;
33137 }
33138 _ACEOF
33139 if ac_fn_c_try_run "$LINENO"; then :
33140   gl_cv_func_symlink_works=yes
33141 else
33142   gl_cv_func_symlink_works=no
33143 fi
33144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33145   conftest.$ac_objext conftest.beam conftest.$ac_ext
33146 fi
33147
33148       rm -f conftest.f conftest.link conftest.lnk2
33149 fi
33150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
33151 $as_echo "$gl_cv_func_symlink_works" >&6; }
33152     if test "$gl_cv_func_symlink_works" != yes; then
33153       REPLACE_SYMLINK=1
33154
33155
33156
33157
33158
33159
33160
33161
33162   M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
33163
33164     fi
33165   fi
33166
33167
33168
33169
33170   GNULIB_SYMLINK=$gl_module_indicator_condition
33171
33172
33173
33174 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
33175
33176
33177
33178
33179
33180
33181   if test $ac_cv_have_decl_unsetenv = no; then
33182     HAVE_DECL_UNSETENV=0
33183   fi
33184   for ac_func in unsetenv
33185 do :
33186   ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
33187 if test "x$ac_cv_func_unsetenv" = x""yes; then :
33188   cat >>confdefs.h <<_ACEOF
33189 #define HAVE_UNSETENV 1
33190 _ACEOF
33191
33192 fi
33193 done
33194
33195   if test $ac_cv_func_unsetenv = no; then
33196
33197
33198
33199
33200
33201
33202
33203
33204   M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
33205
33206
33207
33208
33209
33210   else
33211         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
33212 $as_echo_n "checking for unsetenv() return type... " >&6; }
33213 if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
33214   $as_echo_n "(cached) " >&6
33215 else
33216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33217 /* end confdefs.h.  */
33218
33219 #undef _BSD
33220 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
33221 #include <stdlib.h>
33222 extern
33223 #ifdef __cplusplus
33224 "C"
33225 #endif
33226 #if defined(__STDC__) || defined(__cplusplus)
33227 int unsetenv (const char *name);
33228 #else
33229 int unsetenv();
33230 #endif
33231
33232 int
33233 main ()
33234 {
33235
33236   ;
33237   return 0;
33238 }
33239 _ACEOF
33240 if ac_fn_c_try_compile "$LINENO"; then :
33241   gt_cv_func_unsetenv_ret='int'
33242 else
33243   gt_cv_func_unsetenv_ret='void'
33244 fi
33245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33246 fi
33247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
33248 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
33249     if test $gt_cv_func_unsetenv_ret = 'void'; then
33250
33251 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
33252
33253       REPLACE_UNSETENV=1
33254
33255
33256
33257
33258
33259
33260
33261
33262   M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
33263
33264     fi
33265
33266                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
33267 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
33268 if test "${gl_cv_func_unsetenv_works+set}" = set; then :
33269   $as_echo_n "(cached) " >&6
33270 else
33271   if test "$cross_compiling" = yes; then :
33272   gl_cv_func_unsetenv_works="guessing no"
33273 else
33274   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33275 /* end confdefs.h.  */
33276
33277        #include <stdlib.h>
33278        #include <errno.h>
33279        extern char **environ;
33280
33281 int
33282 main ()
33283 {
33284
33285        char entry1[] = "a=1";
33286        char entry2[] = "b=2";
33287        char *env[] = { entry1, entry2, NULL };
33288        if (putenv ((char *) "a=1")) return 1;
33289        if (putenv (entry2)) return 2;
33290        entry2[0] = 'a';
33291        unsetenv ("a");
33292        if (getenv ("a")) return 3;
33293        if (!unsetenv ("") || errno != EINVAL) return 4;
33294        entry2[0] = 'b';
33295        environ = env;
33296        if (!getenv ("a")) return 5;
33297        entry2[0] = 'a';
33298        unsetenv ("a");
33299        if (getenv ("a")) return 6;
33300
33301   ;
33302   return 0;
33303 }
33304 _ACEOF
33305 if ac_fn_c_try_run "$LINENO"; then :
33306   gl_cv_func_unsetenv_works=yes
33307 else
33308   gl_cv_func_unsetenv_works=no
33309 fi
33310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33311   conftest.$ac_objext conftest.beam conftest.$ac_ext
33312 fi
33313
33314 fi
33315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
33316 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
33317     if test "$gl_cv_func_unsetenv_works" != yes; then
33318       REPLACE_UNSETENV=1
33319
33320
33321
33322
33323
33324
33325
33326
33327   M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
33328
33329     fi
33330   fi
33331
33332
33333
33334
33335   GNULIB_UNSETENV=$gl_module_indicator_condition
33336
33337
33338
33339 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
33340
33341
33342
33343   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
33344
33345   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
33346
33347
33348
33349
33350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
33351 $as_echo_n "checking for a traditional french locale... " >&6; }
33352 if test "${gt_cv_locale_fr+set}" = set; then :
33353   $as_echo_n "(cached) " >&6
33354 else
33355
33356     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33357 /* end confdefs.h.  */
33358
33359 #include <locale.h>
33360 #include <time.h>
33361 #if HAVE_LANGINFO_CODESET
33362 # include <langinfo.h>
33363 #endif
33364 #include <stdlib.h>
33365 #include <string.h>
33366 struct tm t;
33367 char buf[16];
33368 int main () {
33369   /* Check whether the given locale name is recognized by the system.  */
33370 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33371   /* On native Win32, setlocale(category, "") looks at the system settings,
33372      not at the environment variables.  Also, when an encoding suffix such
33373      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33374      category of the locale to "C".  */
33375   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33376       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33377     return 1;
33378 #else
33379   if (setlocale (LC_ALL, "") == NULL) return 1;
33380 #endif
33381   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33382      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33383      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33384      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33385      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33386      some unit tests fail.
33387      On MirBSD 10, when an unsupported locale is specified, setlocale()
33388      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33389 #if HAVE_LANGINFO_CODESET
33390   {
33391     const char *cs = nl_langinfo (CODESET);
33392     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33393         || strcmp (cs, "UTF-8") == 0)
33394       return 1;
33395   }
33396 #endif
33397 #ifdef __CYGWIN__
33398   /* On Cygwin, avoid locale names without encoding suffix, because the
33399      locale_charset() function relies on the encoding suffix.  Note that
33400      LC_ALL is set on the command line.  */
33401   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33402 #endif
33403   /* Check whether in the abbreviation of the second month, the second
33404      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
33405      one byte long. This excludes the UTF-8 encoding.  */
33406   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33407   if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
33408   /* Check whether the decimal separator is a comma.
33409      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33410      are nl_langinfo(RADIXCHAR) are both ".".  */
33411   if (localeconv () ->decimal_point[0] != ',') return 1;
33412   return 0;
33413 }
33414
33415 _ACEOF
33416     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33417   (eval $ac_link) 2>&5
33418   ac_status=$?
33419   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33420   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33421       case "$host_os" in
33422         # Handle native Windows specially, because there setlocale() interprets
33423         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33424         # "fr" or "fra" as "French" or "French_France.1252",
33425         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33426         # "ja" as "Japanese" or "Japanese_Japan.932",
33427         # and similar.
33428         mingw*)
33429           # Test for the native Win32 locale name.
33430           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33431             gt_cv_locale_fr=French_France.1252
33432           else
33433             # None found.
33434             gt_cv_locale_fr=none
33435           fi
33436           ;;
33437         *)
33438           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33439           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33440           # configure script would override the LC_ALL setting. Likewise for
33441           # LC_CTYPE, which is also set at the beginning of the configure script.
33442           # Test for the usual locale name.
33443           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33444             gt_cv_locale_fr=fr_FR
33445           else
33446             # Test for the locale name with explicit encoding suffix.
33447             if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33448               gt_cv_locale_fr=fr_FR.ISO-8859-1
33449             else
33450               # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
33451               if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33452                 gt_cv_locale_fr=fr_FR.ISO8859-1
33453               else
33454                 # Test for the HP-UX locale name.
33455                 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33456                   gt_cv_locale_fr=fr_FR.iso88591
33457                 else
33458                   # Test for the Solaris 7 locale name.
33459                   if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33460                     gt_cv_locale_fr=fr
33461                   else
33462                     # None found.
33463                     gt_cv_locale_fr=none
33464                   fi
33465                 fi
33466               fi
33467             fi
33468           fi
33469           ;;
33470       esac
33471     fi
33472     rm -fr conftest*
33473
33474 fi
33475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
33476 $as_echo "$gt_cv_locale_fr" >&6; }
33477   LOCALE_FR=$gt_cv_locale_fr
33478
33479
33480
33481
33482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
33483 $as_echo_n "checking for a french Unicode locale... " >&6; }
33484 if test "${gt_cv_locale_fr_utf8+set}" = set; then :
33485   $as_echo_n "(cached) " >&6
33486 else
33487
33488     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33489 /* end confdefs.h.  */
33490
33491 #include <locale.h>
33492 #include <time.h>
33493 #if HAVE_LANGINFO_CODESET
33494 # include <langinfo.h>
33495 #endif
33496 #include <stdlib.h>
33497 #include <string.h>
33498 struct tm t;
33499 char buf[16];
33500 int main () {
33501   /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
33502      imitates locale dependent behaviour by looking at the environment
33503      variables, and all locales use the UTF-8 encoding.  */
33504 #if !(defined __BEOS__ || defined __HAIKU__)
33505   /* Check whether the given locale name is recognized by the system.  */
33506 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33507   /* On native Win32, setlocale(category, "") looks at the system settings,
33508      not at the environment variables.  Also, when an encoding suffix such
33509      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33510      category of the locale to "C".  */
33511   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33512       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33513     return 1;
33514 # else
33515   if (setlocale (LC_ALL, "") == NULL) return 1;
33516 # endif
33517   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33518      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33519      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33520      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33521      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33522      some unit tests fail.  */
33523 # if HAVE_LANGINFO_CODESET
33524   {
33525     const char *cs = nl_langinfo (CODESET);
33526     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
33527       return 1;
33528   }
33529 # endif
33530 # ifdef __CYGWIN__
33531   /* On Cygwin, avoid locale names without encoding suffix, because the
33532      locale_charset() function relies on the encoding suffix.  Note that
33533      LC_ALL is set on the command line.  */
33534   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33535 # endif
33536   /* Check whether in the abbreviation of the second month, the second
33537      character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
33538      two bytes long, with UTF-8 encoding.  */
33539   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33540   if (strftime (buf, sizeof (buf), "%b", &t) < 4
33541       || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
33542     return 1;
33543 #endif
33544   /* Check whether the decimal separator is a comma.
33545      On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33546      are nl_langinfo(RADIXCHAR) are both ".".  */
33547   if (localeconv () ->decimal_point[0] != ',') return 1;
33548   return 0;
33549 }
33550
33551 _ACEOF
33552     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33553   (eval $ac_link) 2>&5
33554   ac_status=$?
33555   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33556   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33557       case "$host_os" in
33558         # Handle native Windows specially, because there setlocale() interprets
33559         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33560         # "fr" or "fra" as "French" or "French_France.1252",
33561         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33562         # "ja" as "Japanese" or "Japanese_Japan.932",
33563         # and similar.
33564         mingw*)
33565           # Test for the hypothetical native Win32 locale name.
33566           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33567             gt_cv_locale_fr_utf8=French_France.65001
33568           else
33569             # None found.
33570             gt_cv_locale_fr_utf8=none
33571           fi
33572           ;;
33573         *)
33574           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33575           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33576           # configure script would override the LC_ALL setting. Likewise for
33577           # LC_CTYPE, which is also set at the beginning of the configure script.
33578           # Test for the usual locale name.
33579           if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33580             gt_cv_locale_fr_utf8=fr_FR
33581           else
33582             # Test for the locale name with explicit encoding suffix.
33583             if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33584               gt_cv_locale_fr_utf8=fr_FR.UTF-8
33585             else
33586               # Test for the Solaris 7 locale name.
33587               if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33588                 gt_cv_locale_fr_utf8=fr.UTF-8
33589               else
33590                 # None found.
33591                 gt_cv_locale_fr_utf8=none
33592               fi
33593             fi
33594           fi
33595           ;;
33596       esac
33597     fi
33598     rm -fr conftest*
33599
33600 fi
33601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
33602 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
33603   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
33604
33605
33606
33607
33608
33609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
33610 $as_echo_n "checking for a traditional japanese locale... " >&6; }
33611 if test "${gt_cv_locale_ja+set}" = set; then :
33612   $as_echo_n "(cached) " >&6
33613 else
33614
33615     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33616 /* end confdefs.h.  */
33617
33618 #include <locale.h>
33619 #include <time.h>
33620 #if HAVE_LANGINFO_CODESET
33621 # include <langinfo.h>
33622 #endif
33623 #include <stdlib.h>
33624 #include <string.h>
33625 struct tm t;
33626 char buf[16];
33627 int main ()
33628 {
33629   const char *p;
33630   /* Check whether the given locale name is recognized by the system.  */
33631 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33632   /* On native Win32, setlocale(category, "") looks at the system settings,
33633      not at the environment variables.  Also, when an encoding suffix such
33634      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33635      category of the locale to "C".  */
33636   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33637       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33638     return 1;
33639 #else
33640   if (setlocale (LC_ALL, "") == NULL) return 1;
33641 #endif
33642   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33643      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33644      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33645      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33646      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33647      some unit tests fail.
33648      On MirBSD 10, when an unsupported locale is specified, setlocale()
33649      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33650 #if HAVE_LANGINFO_CODESET
33651   {
33652     const char *cs = nl_langinfo (CODESET);
33653     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33654         || strcmp (cs, "UTF-8") == 0)
33655       return 1;
33656   }
33657 #endif
33658 #ifdef __CYGWIN__
33659   /* On Cygwin, avoid locale names without encoding suffix, because the
33660      locale_charset() function relies on the encoding suffix.  Note that
33661      LC_ALL is set on the command line.  */
33662   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33663 #endif
33664   /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
33665      on Cygwin 1.5.x.  */
33666   if (MB_CUR_MAX == 1)
33667     return 1;
33668   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33669      This excludes the UTF-8 encoding (except on MirBSD).  */
33670   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33671   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33672   for (p = buf; *p != '\0'; p++)
33673     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33674       return 1;
33675   return 0;
33676 }
33677
33678 _ACEOF
33679     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33680   (eval $ac_link) 2>&5
33681   ac_status=$?
33682   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33683   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33684       case "$host_os" in
33685         # Handle native Windows specially, because there setlocale() interprets
33686         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33687         # "fr" or "fra" as "French" or "French_France.1252",
33688         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33689         # "ja" as "Japanese" or "Japanese_Japan.932",
33690         # and similar.
33691         mingw*)
33692           # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
33693           # and CP932 is very different from EUC-JP, so we cannot use it here.
33694           gt_cv_locale_ja=none
33695           ;;
33696         *)
33697           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33698           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33699           # configure script would override the LC_ALL setting. Likewise for
33700           # LC_CTYPE, which is also set at the beginning of the configure script.
33701           # Test for the AIX locale name.
33702           if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33703             gt_cv_locale_ja=ja_JP
33704           else
33705             # Test for the locale name with explicit encoding suffix.
33706             if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33707               gt_cv_locale_ja=ja_JP.EUC-JP
33708             else
33709               # Test for the HP-UX, OSF/1, NetBSD locale name.
33710               if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33711                 gt_cv_locale_ja=ja_JP.eucJP
33712               else
33713                 # Test for the IRIX, FreeBSD locale name.
33714                 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33715                   gt_cv_locale_ja=ja_JP.EUC
33716                 else
33717                   # Test for the Solaris 7 locale name.
33718                   if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33719                     gt_cv_locale_ja=ja
33720                   else
33721                     # Special test for NetBSD 1.6.
33722                     if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
33723                       gt_cv_locale_ja=ja_JP.eucJP
33724                     else
33725                       # None found.
33726                       gt_cv_locale_ja=none
33727                     fi
33728                   fi
33729                 fi
33730               fi
33731             fi
33732           fi
33733           ;;
33734       esac
33735     fi
33736     rm -fr conftest*
33737
33738 fi
33739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
33740 $as_echo "$gt_cv_locale_ja" >&6; }
33741   LOCALE_JA=$gt_cv_locale_ja
33742
33743
33744
33745
33746
33747   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
33748 $as_echo_n "checking for a transitional chinese locale... " >&6; }
33749 if test "${gt_cv_locale_zh_CN+set}" = set; then :
33750   $as_echo_n "(cached) " >&6
33751 else
33752
33753     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33754 /* end confdefs.h.  */
33755
33756 #include <locale.h>
33757 #include <stdlib.h>
33758 #include <time.h>
33759 #if HAVE_LANGINFO_CODESET
33760 # include <langinfo.h>
33761 #endif
33762 #include <stdlib.h>
33763 #include <string.h>
33764 struct tm t;
33765 char buf[16];
33766 int main ()
33767 {
33768   const char *p;
33769   /* Check whether the given locale name is recognized by the system.  */
33770 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
33771   /* On native Win32, setlocale(category, "") looks at the system settings,
33772      not at the environment variables.  Also, when an encoding suffix such
33773      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
33774      category of the locale to "C".  */
33775   if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33776       || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33777     return 1;
33778 #else
33779   if (setlocale (LC_ALL, "") == NULL) return 1;
33780 #endif
33781   /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33782      On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33783      is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33784      On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33785      succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33786      some unit tests fail.
33787      On MirBSD 10, when an unsupported locale is specified, setlocale()
33788      succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
33789 #if HAVE_LANGINFO_CODESET
33790   {
33791     const char *cs = nl_langinfo (CODESET);
33792     if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33793         || strcmp (cs, "UTF-8") == 0)
33794       return 1;
33795   }
33796 #endif
33797 #ifdef __CYGWIN__
33798   /* On Cygwin, avoid locale names without encoding suffix, because the
33799      locale_charset() function relies on the encoding suffix.  Note that
33800      LC_ALL is set on the command line.  */
33801   if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33802 #endif
33803   /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33804      This excludes the UTF-8 encoding (except on MirBSD).  */
33805   t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33806   if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33807   for (p = buf; *p != '\0'; p++)
33808     if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33809       return 1;
33810   /* Check whether a typical GB18030 multibyte sequence is recognized as a
33811      single wide character.  This excludes the GB2312 and GBK encodings.  */
33812   if (mblen ("\203\062\332\066", 5) != 4)
33813     return 1;
33814   return 0;
33815 }
33816
33817 _ACEOF
33818     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33819   (eval $ac_link) 2>&5
33820   ac_status=$?
33821   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33822   test $ac_status = 0; } && test -s conftest$ac_exeext; then
33823       case "$host_os" in
33824         # Handle native Windows specially, because there setlocale() interprets
33825         # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33826         # "fr" or "fra" as "French" or "French_France.1252",
33827         # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33828         # "ja" as "Japanese" or "Japanese_Japan.932",
33829         # and similar.
33830         mingw*)
33831           # Test for the hypothetical native Win32 locale name.
33832           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33833             gt_cv_locale_zh_CN=Chinese_China.54936
33834           else
33835             # None found.
33836             gt_cv_locale_zh_CN=none
33837           fi
33838           ;;
33839         *)
33840           # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33841           # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
33842           # configure script would override the LC_ALL setting. Likewise for
33843           # LC_CTYPE, which is also set at the beginning of the configure script.
33844           # Test for the locale name without encoding suffix.
33845           if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33846             gt_cv_locale_zh_CN=zh_CN
33847           else
33848             # Test for the locale name with explicit encoding suffix.
33849             if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33850               gt_cv_locale_zh_CN=zh_CN.GB18030
33851             else
33852               # None found.
33853               gt_cv_locale_zh_CN=none
33854             fi
33855           fi
33856           ;;
33857       esac
33858     else
33859       # If there was a link error, due to mblen(), the system is so old that
33860       # it certainly doesn't have a chinese locale.
33861       gt_cv_locale_zh_CN=none
33862     fi
33863     rm -fr conftest*
33864
33865 fi
33866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
33867 $as_echo "$gt_cv_locale_zh_CN" >&6; }
33868   LOCALE_ZH_CN=$gt_cv_locale_zh_CN
33869
33870
33871
33872
33873
33874
33875   if test $ac_cv_func_wctob = no; then
33876     HAVE_DECL_WCTOB=0
33877
33878     :
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888   M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
33889
33890
33891   :
33892
33893   else
33894
33895
33896
33897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
33898 $as_echo_n "checking whether wctob works... " >&6; }
33899 if test "${gl_cv_func_wctob_works+set}" = set; then :
33900   $as_echo_n "(cached) " >&6
33901 else
33902
33903                         case "$host_os" in
33904             # Guess no on Solaris <= 9 and Cygwin.
33905           solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
33906             gl_cv_func_wctob_works="guessing no" ;;
33907             # Guess yes otherwise.
33908           *) gl_cv_func_wctob_works="guessing yes" ;;
33909         esac
33910         case "$host_os" in
33911           cygwin*)
33912             if test "$cross_compiling" = yes; then :
33913   :
33914 else
33915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33916 /* end confdefs.h.  */
33917
33918 #include <locale.h>
33919 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33920    <wchar.h>.
33921    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33922    included before <wchar.h>.  */
33923 #include <stddef.h>
33924 #include <stdio.h>
33925 #include <time.h>
33926 #include <wchar.h>
33927
33928 register long global __asm__ ("%ebx");
33929
33930 int main ()
33931 {
33932   setlocale (LC_ALL, "en_US.UTF-8");
33933
33934   global = 0x12345678;
33935   if (wctob (0x00FC) != -1)
33936     return 1;
33937   if (global != 0x12345678)
33938     return 2;
33939   return 0;
33940 }
33941 _ACEOF
33942 if ac_fn_c_try_run "$LINENO"; then :
33943   :
33944 else
33945   gl_cv_func_wctob_works=no
33946 fi
33947 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33948   conftest.$ac_objext conftest.beam conftest.$ac_ext
33949 fi
33950
33951             ;;
33952         esac
33953         if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
33954           if test "$cross_compiling" = yes; then :
33955   :
33956 else
33957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33958 /* end confdefs.h.  */
33959
33960 #include <locale.h>
33961 #include <string.h>
33962 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33963    <wchar.h>.
33964    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33965    included before <wchar.h>.  */
33966 #include <stddef.h>
33967 #include <stdio.h>
33968 #include <time.h>
33969 #include <wchar.h>
33970 int main ()
33971 {
33972   if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33973     {
33974       wchar_t wc;
33975
33976       if (mbtowc (&wc, "\374", 1) == 1)
33977         if (wctob (wc) != (unsigned char) '\374')
33978           return 1;
33979     }
33980   return 0;
33981 }
33982 _ACEOF
33983 if ac_fn_c_try_run "$LINENO"; then :
33984   gl_cv_func_wctob_works=yes
33985 else
33986   gl_cv_func_wctob_works=no
33987 fi
33988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33989   conftest.$ac_objext conftest.beam conftest.$ac_ext
33990 fi
33991
33992         fi
33993
33994 fi
33995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
33996 $as_echo "$gl_cv_func_wctob_works" >&6; }
33997     case "$gl_cv_func_wctob_works" in
33998       *yes) ;;
33999       *) REPLACE_WCTOB=1 ;;
34000     esac
34001     if test $REPLACE_WCTOB = 1; then
34002
34003     :
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013   M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
34014
34015
34016   :
34017
34018     else
34019
34020             ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
34021 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
34022    <wchar.h>.
34023    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
34024    before <wchar.h>.  */
34025 #include <stddef.h>
34026 #include <stdio.h>
34027 #include <time.h>
34028 #include <wchar.h>
34029
34030 "
34031 if test "x$ac_cv_have_decl_wctob" = x""yes; then :
34032   ac_have_decl=1
34033 else
34034   ac_have_decl=0
34035 fi
34036
34037 cat >>confdefs.h <<_ACEOF
34038 #define HAVE_DECL_WCTOB $ac_have_decl
34039 _ACEOF
34040
34041       if test $ac_cv_have_decl_wctob != yes; then
34042         HAVE_DECL_WCTOB=0
34043
34044     :
34045
34046       fi
34047     fi
34048   fi
34049
34050
34051
34052
34053   GNULIB_WCTOB=$gl_module_indicator_condition
34054
34055
34056
34057 $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
34058
34059
34060
34061
34062
34063
34064   if false; then
34065     REPLACE_WCTOMB=1
34066   fi
34067   if test $REPLACE_WCTOMB = 1; then
34068
34069
34070
34071
34072
34073
34074
34075
34076   M4tests_LIBOBJS="$M4tests_LIBOBJS wctomb.$ac_objext"
34077
34078
34079   :
34080
34081   fi
34082
34083
34084
34085
34086   GNULIB_WCTOMB=$gl_module_indicator_condition
34087
34088
34089
34090 $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104   LIBM4_LIBDEPS="$gl_libdeps"
34105
34106   LIBM4_LTLIBDEPS="$gl_ltlibdeps"
34107
34108   LIBTESTS_LIBDEPS="$gltests_libdeps"
34109
34110
34111
34112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
34113 $as_echo_n "checking whether an open file can be renamed... " >&6; }
34114 if test "${M4_cv_func_rename_open_file_works+set}" = set; then :
34115   $as_echo_n "(cached) " >&6
34116 else
34117   if test "$cross_compiling" = yes; then :
34118   M4_cv_func_rename_open_file_works='guessing no'
34119 else
34120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34121 /* end confdefs.h.  */
34122 $ac_includes_default
34123 int
34124 main ()
34125 {
34126 FILE *f = fopen ("conftest.1", "w+");
34127        int result = rename ("conftest.1", "conftest.2");
34128        fclose (f); remove ("conftest.1"); remove ("conftest.2");
34129        return result;
34130   ;
34131   return 0;
34132 }
34133 _ACEOF
34134 if ac_fn_c_try_run "$LINENO"; then :
34135   M4_cv_func_rename_open_file_works=yes
34136 else
34137   M4_cv_func_rename_open_file_works=no
34138 fi
34139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34140   conftest.$ac_objext conftest.beam conftest.$ac_ext
34141 fi
34142
34143 fi
34144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
34145 $as_echo "$M4_cv_func_rename_open_file_works" >&6; }
34146 if test "$M4_cv_func_rename_open_file_works" = yes ; then
34147   M4_rename_open_works=1
34148 else
34149   M4_rename_open_works=0
34150 fi
34151
34152 cat >>confdefs.h <<_ACEOF
34153 #define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
34154 _ACEOF
34155
34156
34157
34158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if changeword is wanted" >&5
34159 $as_echo_n "checking if changeword is wanted... " >&6; }
34160 # Check whether --enable-changeword was given.
34161 if test "${enable_changeword+set}" = set; then :
34162   enableval=$enable_changeword; if test "$enableval" = yes; then
34163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34164 $as_echo "yes" >&6; }
34165
34166 $as_echo "#define ENABLE_CHANGEWORD 1" >>confdefs.h
34167
34168   else
34169     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34170 $as_echo "no" >&6; }
34171   fi
34172 else
34173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34174 $as_echo "no" >&6; }
34175 fi
34176
34177
34178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
34179 $as_echo_n "checking which shell to use for syscmd... " >&6; }
34180
34181 # Check whether --with-syscmd-shell was given.
34182 if test "${with_syscmd_shell+set}" = set; then :
34183   withval=$with_syscmd_shell; case $withval in
34184     yes) with_syscmd_shell=no;;
34185    esac
34186 else
34187   with_syscmd_shell=no
34188 fi
34189
34190 if test "$with_syscmd_shell" = no ; then
34191   with_syscmd_shell=/bin/sh
34192   if test "$cross_compiling" != yes ; then
34193     if { test -f /bin/sh && $as_test_x /bin/sh; }; then :
34194
34195 else
34196   if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
34197 fi
34198     M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34199     for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
34200         command -p getconf PATH
34201       else
34202         echo "/bin$PATH_SEPARATOR$PATH"
34203       fi`
34204     do
34205       IFS=$M4_save_IFS
34206       test -z "$M4_dir" && continue
34207       { test -f "$M4_dir/sh" && $as_test_x "$M4_dir/sh"; } \
34208         && { with_syscmd_shell=$M4_dir/sh; break; }
34209     done
34210     IFS=$M4_save_IFS
34211   fi
34212 fi
34213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
34214 $as_echo "$with_syscmd_shell" >&6; }
34215
34216 cat >>confdefs.h <<_ACEOF
34217 #define SYSCMD_SHELL "$with_syscmd_shell"
34218 _ACEOF
34219
34220
34221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
34222 $as_echo_n "checking if malloc debugging is wanted... " >&6; }
34223
34224 # Check whether --with-dmalloc was given.
34225 if test "${with_dmalloc+set}" = set; then :
34226   withval=$with_dmalloc; if test "$withval" = yes; then
34227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34228 $as_echo "yes" >&6; }
34229
34230 $as_echo "#define WITH_DMALLOC 1" >>confdefs.h
34231
34232   LIBS="$LIBS -ldmalloc"
34233   LDFLAGS="$LDFLAGS -g"
34234 else
34235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34236 $as_echo "no" >&6; }
34237 fi
34238 else
34239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34240 $as_echo "no" >&6; }
34241 fi
34242
34243
34244 ac_config_commands="$ac_config_commands stamp-h"
34245
34246
34247 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile checks/Makefile examples/Makefile"
34248
34249
34250 cat >confcache <<\_ACEOF
34251 # This file is a shell script that caches the results of configure
34252 # tests run on this system so they can be shared between configure
34253 # scripts and configure runs, see configure's option --config-cache.
34254 # It is not useful on other systems.  If it contains results you don't
34255 # want to keep, you may remove or edit it.
34256 #
34257 # config.status only pays attention to the cache file if you give it
34258 # the --recheck option to rerun configure.
34259 #
34260 # `ac_cv_env_foo' variables (set or unset) will be overridden when
34261 # loading this file, other *unset* `ac_cv_foo' will be assigned the
34262 # following values.
34263
34264 _ACEOF
34265
34266 # The following way of writing the cache mishandles newlines in values,
34267 # but we know of no workaround that is simple, portable, and efficient.
34268 # So, we kill variables containing newlines.
34269 # Ultrix sh set writes to stderr and can't be redirected directly,
34270 # and sets the high bit in the cache file unless we assign to the vars.
34271 (
34272   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
34273     eval ac_val=\$$ac_var
34274     case $ac_val in #(
34275     *${as_nl}*)
34276       case $ac_var in #(
34277       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
34278 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
34279       esac
34280       case $ac_var in #(
34281       _ | IFS | as_nl) ;; #(
34282       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
34283       *) { eval $ac_var=; unset $ac_var;} ;;
34284       esac ;;
34285     esac
34286   done
34287
34288   (set) 2>&1 |
34289     case $as_nl`(ac_space=' '; set) 2>&1` in #(
34290     *${as_nl}ac_space=\ *)
34291       # `set' does not quote correctly, so add quotes: double-quote
34292       # substitution turns \\\\ into \\, and sed turns \\ into \.
34293       sed -n \
34294         "s/'/'\\\\''/g;
34295           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
34296       ;; #(
34297     *)
34298       # `set' quotes correctly as required by POSIX, so do not add quotes.
34299       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
34300       ;;
34301     esac |
34302     sort
34303 ) |
34304   sed '
34305      /^ac_cv_env_/b end
34306      t clear
34307      :clear
34308      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
34309      t end
34310      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
34311      :end' >>confcache
34312 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
34313   if test -w "$cache_file"; then
34314     test "x$cache_file" != "x/dev/null" &&
34315       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
34316 $as_echo "$as_me: updating cache $cache_file" >&6;}
34317     cat confcache >$cache_file
34318   else
34319     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
34320 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
34321   fi
34322 fi
34323 rm -f confcache
34324
34325 test "x$prefix" = xNONE && prefix=$ac_default_prefix
34326 # Let make expand exec_prefix.
34327 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34328
34329 DEFS=-DHAVE_CONFIG_H
34330
34331 ac_libobjs=
34332 ac_ltlibobjs=
34333 U=
34334 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34335   # 1. Remove the extension, and $U if already installed.
34336   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34337   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
34338   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34339   #    will be set to the directory where LIBOBJS objects are built.
34340   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34341   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
34342 done
34343 LIBOBJS=$ac_libobjs
34344
34345 LTLIBOBJS=$ac_ltlibobjs
34346
34347
34348  if test -n "$EXEEXT"; then
34349   am__EXEEXT_TRUE=
34350   am__EXEEXT_FALSE='#'
34351 else
34352   am__EXEEXT_TRUE='#'
34353   am__EXEEXT_FALSE=
34354 fi
34355
34356 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
34357   as_fn_error $? "conditional \"AMDEP\" was never defined.
34358 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34359 fi
34360 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
34361   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
34362 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34363 fi
34364 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
34365   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
34366 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34367 fi
34368 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
34369
34370
34371 CONFIG_INCLUDE=lib/config.h
34372
34373
34374     M4_libobjs=
34375     M4_ltlibobjs=
34376     if test -n "$M4_LIBOBJS"; then
34377       # Remove the extension.
34378       sed_drop_objext='s/\.o$//;s/\.obj$//'
34379       for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
34380         M4_libobjs="$M4_libobjs $i.$ac_objext"
34381         M4_ltlibobjs="$M4_ltlibobjs $i.lo"
34382       done
34383     fi
34384     M4_LIBOBJS=$M4_libobjs
34385
34386     M4_LTLIBOBJS=$M4_ltlibobjs
34387
34388
34389 if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
34390   as_fn_error $? "conditional \"ANSICXX\" was never defined.
34391 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34392 fi
34393 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
34394   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
34395 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34396 fi
34397 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
34398   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
34399 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34400 fi
34401
34402 if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
34403   as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
34404 Usually this means the macro was only invoked conditionally." "$LINENO" 5
34405 fi
34406
34407     M4tests_libobjs=
34408     M4tests_ltlibobjs=
34409     if test -n "$M4tests_LIBOBJS"; then
34410       # Remove the extension.
34411       sed_drop_objext='s/\.o$//;s/\.obj$//'
34412       for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
34413         M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
34414         M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
34415       done
34416     fi
34417     M4tests_LIBOBJS=$M4tests_libobjs
34418
34419     M4tests_LTLIBOBJS=$M4tests_ltlibobjs
34420
34421
34422
34423 : ${CONFIG_STATUS=./config.status}
34424 ac_write_fail=0
34425 ac_clean_files_save=$ac_clean_files
34426 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34427 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
34428 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
34429 as_write_fail=0
34430 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
34431 #! $SHELL
34432 # Generated by $as_me.
34433 # Run this file to recreate the current configuration.
34434 # Compiler output produced by configure, useful for debugging
34435 # configure, is in config.log if it exists.
34436
34437 debug=false
34438 ac_cs_recheck=false
34439 ac_cs_silent=false
34440
34441 SHELL=\${CONFIG_SHELL-$SHELL}
34442 export SHELL
34443 _ASEOF
34444 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
34445 ## -------------------- ##
34446 ## M4sh Initialization. ##
34447 ## -------------------- ##
34448
34449 # Be more Bourne compatible
34450 DUALCASE=1; export DUALCASE # for MKS sh
34451 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
34452   emulate sh
34453   NULLCMD=:
34454   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34455   # is contrary to our usage.  Disable this feature.
34456   alias -g '${1+"$@"}'='"$@"'
34457   setopt NO_GLOB_SUBST
34458 else
34459   case `(set -o) 2>/dev/null` in #(
34460   *posix*) :
34461     set -o posix ;; #(
34462   *) :
34463      ;;
34464 esac
34465 fi
34466
34467
34468 as_nl='
34469 '
34470 export as_nl
34471 # Printing a long string crashes Solaris 7 /usr/bin/printf.
34472 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
34473 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
34474 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
34475 # Prefer a ksh shell builtin over an external printf program on Solaris,
34476 # but without wasting forks for bash or zsh.
34477 if test -z "$BASH_VERSION$ZSH_VERSION" \
34478     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
34479   as_echo='print -r --'
34480   as_echo_n='print -rn --'
34481 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
34482   as_echo='printf %s\n'
34483   as_echo_n='printf %s'
34484 else
34485   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
34486     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
34487     as_echo_n='/usr/ucb/echo -n'
34488   else
34489     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
34490     as_echo_n_body='eval
34491       arg=$1;
34492       case $arg in #(
34493       *"$as_nl"*)
34494         expr "X$arg" : "X\\(.*\\)$as_nl";
34495         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
34496       esac;
34497       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
34498     '
34499     export as_echo_n_body
34500     as_echo_n='sh -c $as_echo_n_body as_echo'
34501   fi
34502   export as_echo_body
34503   as_echo='sh -c $as_echo_body as_echo'
34504 fi
34505
34506 # The user is always right.
34507 if test "${PATH_SEPARATOR+set}" != set; then
34508   PATH_SEPARATOR=:
34509   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
34510     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
34511       PATH_SEPARATOR=';'
34512   }
34513 fi
34514
34515
34516 # IFS
34517 # We need space, tab and new line, in precisely that order.  Quoting is
34518 # there to prevent editors from complaining about space-tab.
34519 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
34520 # splitting by setting IFS to empty value.)
34521 IFS=" ""        $as_nl"
34522
34523 # Find who we are.  Look in the path if we contain no directory separator.
34524 case $0 in #((
34525   *[\\/]* ) as_myself=$0 ;;
34526   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34527 for as_dir in $PATH
34528 do
34529   IFS=$as_save_IFS
34530   test -z "$as_dir" && as_dir=.
34531     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
34532   done
34533 IFS=$as_save_IFS
34534
34535      ;;
34536 esac
34537 # We did not find ourselves, most probably we were run as `sh COMMAND'
34538 # in which case we are not to be found in the path.
34539 if test "x$as_myself" = x; then
34540   as_myself=$0
34541 fi
34542 if test ! -f "$as_myself"; then
34543   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
34544   exit 1
34545 fi
34546
34547 # Unset variables that we do not need and which cause bugs (e.g. in
34548 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
34549 # suppresses any "Segmentation fault" message there.  '((' could
34550 # trigger a bug in pdksh 5.2.14.
34551 for as_var in BASH_ENV ENV MAIL MAILPATH
34552 do eval test x\${$as_var+set} = xset \
34553   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
34554 done
34555 PS1='$ '
34556 PS2='> '
34557 PS4='+ '
34558
34559 # NLS nuisances.
34560 LC_ALL=C
34561 export LC_ALL
34562 LANGUAGE=C
34563 export LANGUAGE
34564
34565 # CDPATH.
34566 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
34567
34568
34569 # as_fn_error STATUS ERROR [LINENO LOG_FD]
34570 # ----------------------------------------
34571 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
34572 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
34573 # script with STATUS, using 1 if that was 0.
34574 as_fn_error ()
34575 {
34576   as_status=$1; test $as_status -eq 0 && as_status=1
34577   if test "$4"; then
34578     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
34579     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
34580   fi
34581   $as_echo "$as_me: error: $2" >&2
34582   as_fn_exit $as_status
34583 } # as_fn_error
34584
34585
34586 # as_fn_set_status STATUS
34587 # -----------------------
34588 # Set $? to STATUS, without forking.
34589 as_fn_set_status ()
34590 {
34591   return $1
34592 } # as_fn_set_status
34593
34594 # as_fn_exit STATUS
34595 # -----------------
34596 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
34597 as_fn_exit ()
34598 {
34599   set +e
34600   as_fn_set_status $1
34601   exit $1
34602 } # as_fn_exit
34603
34604 # as_fn_unset VAR
34605 # ---------------
34606 # Portably unset VAR.
34607 as_fn_unset ()
34608 {
34609   { eval $1=; unset $1;}
34610 }
34611 as_unset=as_fn_unset
34612 # as_fn_append VAR VALUE
34613 # ----------------------
34614 # Append the text in VALUE to the end of the definition contained in VAR. Take
34615 # advantage of any shell optimizations that allow amortized linear growth over
34616 # repeated appends, instead of the typical quadratic growth present in naive
34617 # implementations.
34618 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
34619   eval 'as_fn_append ()
34620   {
34621     eval $1+=\$2
34622   }'
34623 else
34624   as_fn_append ()
34625   {
34626     eval $1=\$$1\$2
34627   }
34628 fi # as_fn_append
34629
34630 # as_fn_arith ARG...
34631 # ------------------
34632 # Perform arithmetic evaluation on the ARGs, and store the result in the
34633 # global $as_val. Take advantage of shells that can avoid forks. The arguments
34634 # must be portable across $(()) and expr.
34635 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
34636   eval 'as_fn_arith ()
34637   {
34638     as_val=$(( $* ))
34639   }'
34640 else
34641   as_fn_arith ()
34642   {
34643     as_val=`expr "$@" || test $? -eq 1`
34644   }
34645 fi # as_fn_arith
34646
34647
34648 if expr a : '\(a\)' >/dev/null 2>&1 &&
34649    test "X`expr 00001 : '.*\(...\)'`" = X001; then
34650   as_expr=expr
34651 else
34652   as_expr=false
34653 fi
34654
34655 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
34656   as_basename=basename
34657 else
34658   as_basename=false
34659 fi
34660
34661 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
34662   as_dirname=dirname
34663 else
34664   as_dirname=false
34665 fi
34666
34667 as_me=`$as_basename -- "$0" ||
34668 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34669          X"$0" : 'X\(//\)$' \| \
34670          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
34671 $as_echo X/"$0" |
34672     sed '/^.*\/\([^/][^/]*\)\/*$/{
34673             s//\1/
34674             q
34675           }
34676           /^X\/\(\/\/\)$/{
34677             s//\1/
34678             q
34679           }
34680           /^X\/\(\/\).*/{
34681             s//\1/
34682             q
34683           }
34684           s/.*/./; q'`
34685
34686 # Avoid depending upon Character Ranges.
34687 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34688 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34689 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
34690 as_cr_digits='0123456789'
34691 as_cr_alnum=$as_cr_Letters$as_cr_digits
34692
34693 ECHO_C= ECHO_N= ECHO_T=
34694 case `echo -n x` in #(((((
34695 -n*)
34696   case `echo 'xy\c'` in
34697   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
34698   xy)  ECHO_C='\c';;
34699   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
34700        ECHO_T=' ';;
34701   esac;;
34702 *)
34703   ECHO_N='-n';;
34704 esac
34705
34706 rm -f conf$$ conf$$.exe conf$$.file
34707 if test -d conf$$.dir; then
34708   rm -f conf$$.dir/conf$$.file
34709 else
34710   rm -f conf$$.dir
34711   mkdir conf$$.dir 2>/dev/null
34712 fi
34713 if (echo >conf$$.file) 2>/dev/null; then
34714   if ln -s conf$$.file conf$$ 2>/dev/null; then
34715     as_ln_s='ln -s'
34716     # ... but there are two gotchas:
34717     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
34718     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
34719     # In both cases, we have to default to `cp -p'.
34720     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
34721       as_ln_s='cp -p'
34722   elif ln conf$$.file conf$$ 2>/dev/null; then
34723     as_ln_s=ln
34724   else
34725     as_ln_s='cp -p'
34726   fi
34727 else
34728   as_ln_s='cp -p'
34729 fi
34730 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
34731 rmdir conf$$.dir 2>/dev/null
34732
34733
34734 # as_fn_mkdir_p
34735 # -------------
34736 # Create "$as_dir" as a directory, including parents if necessary.
34737 as_fn_mkdir_p ()
34738 {
34739
34740   case $as_dir in #(
34741   -*) as_dir=./$as_dir;;
34742   esac
34743   test -d "$as_dir" || eval $as_mkdir_p || {
34744     as_dirs=
34745     while :; do
34746       case $as_dir in #(
34747       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34748       *) as_qdir=$as_dir;;
34749       esac
34750       as_dirs="'$as_qdir' $as_dirs"
34751       as_dir=`$as_dirname -- "$as_dir" ||
34752 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34753          X"$as_dir" : 'X\(//\)[^/]' \| \
34754          X"$as_dir" : 'X\(//\)$' \| \
34755          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34756 $as_echo X"$as_dir" |
34757     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34758             s//\1/
34759             q
34760           }
34761           /^X\(\/\/\)[^/].*/{
34762             s//\1/
34763             q
34764           }
34765           /^X\(\/\/\)$/{
34766             s//\1/
34767             q
34768           }
34769           /^X\(\/\).*/{
34770             s//\1/
34771             q
34772           }
34773           s/.*/./; q'`
34774       test -d "$as_dir" && break
34775     done
34776     test -z "$as_dirs" || eval "mkdir $as_dirs"
34777   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34778
34779
34780 } # as_fn_mkdir_p
34781 if mkdir -p . 2>/dev/null; then
34782   as_mkdir_p='mkdir -p "$as_dir"'
34783 else
34784   test -d ./-p && rmdir ./-p
34785   as_mkdir_p=false
34786 fi
34787
34788 if test -x / >/dev/null 2>&1; then
34789   as_test_x='test -x'
34790 else
34791   if ls -dL / >/dev/null 2>&1; then
34792     as_ls_L_option=L
34793   else
34794     as_ls_L_option=
34795   fi
34796   as_test_x='
34797     eval sh -c '\''
34798       if test -d "$1"; then
34799         test -d "$1/.";
34800       else
34801         case $1 in #(
34802         -*)set "./$1";;
34803         esac;
34804         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34805         ???[sx]*):;;*)false;;esac;fi
34806     '\'' sh
34807   '
34808 fi
34809 as_executable_p=$as_test_x
34810
34811 # Sed expression to map a string onto a valid CPP name.
34812 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34813
34814 # Sed expression to map a string onto a valid variable name.
34815 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34816
34817
34818 exec 6>&1
34819 ## ----------------------------------- ##
34820 ## Main body of $CONFIG_STATUS script. ##
34821 ## ----------------------------------- ##
34822 _ASEOF
34823 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34824
34825 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34826 # Save the log message, to keep $0 and so on meaningful, and to
34827 # report actual input values of CONFIG_FILES etc. instead of their
34828 # values after options handling.
34829 ac_log="
34830 This file was extended by GNU M4 $as_me 1.4.16, which was
34831 generated by GNU Autoconf 2.66.  Invocation command line was
34832
34833   CONFIG_FILES    = $CONFIG_FILES
34834   CONFIG_HEADERS  = $CONFIG_HEADERS
34835   CONFIG_LINKS    = $CONFIG_LINKS
34836   CONFIG_COMMANDS = $CONFIG_COMMANDS
34837   $ $0 $@
34838
34839 on `(hostname || uname -n) 2>/dev/null | sed 1q`
34840 "
34841
34842 _ACEOF
34843
34844 case $ac_config_files in *"
34845 "*) set x $ac_config_files; shift; ac_config_files=$*;;
34846 esac
34847
34848 case $ac_config_headers in *"
34849 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34850 esac
34851
34852
34853 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34854 # Files that config.status was made for.
34855 config_files="$ac_config_files"
34856 config_headers="$ac_config_headers"
34857 config_links="$ac_config_links"
34858 config_commands="$ac_config_commands"
34859
34860 _ACEOF
34861
34862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34863 ac_cs_usage="\
34864 \`$as_me' instantiates files and other configuration actions
34865 from templates according to the current configuration.  Unless the files
34866 and actions are specified as TAGs, all are instantiated by default.
34867
34868 Usage: $0 [OPTION]... [TAG]...
34869
34870   -h, --help       print this help, then exit
34871   -V, --version    print version number and configuration settings, then exit
34872       --config     print configuration, then exit
34873   -q, --quiet, --silent
34874                    do not print progress messages
34875   -d, --debug      don't remove temporary files
34876       --recheck    update $as_me by reconfiguring in the same conditions
34877       --file=FILE[:TEMPLATE]
34878                    instantiate the configuration file FILE
34879       --header=FILE[:TEMPLATE]
34880                    instantiate the configuration header FILE
34881
34882 Configuration files:
34883 $config_files
34884
34885 Configuration headers:
34886 $config_headers
34887
34888 Configuration links:
34889 $config_links
34890
34891 Configuration commands:
34892 $config_commands
34893
34894 Report bugs to <bug-m4@gnu.org>.
34895 GNU M4 home page: <http://www.gnu.org/software/m4/>.
34896 General help using GNU software: <http://www.gnu.org/gethelp/>."
34897
34898 _ACEOF
34899 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34900 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34901 ac_cs_version="\\
34902 GNU M4 config.status 1.4.16
34903 configured by $0, generated by GNU Autoconf 2.66,
34904   with options \\"\$ac_cs_config\\"
34905
34906 Copyright (C) 2010 Free Software Foundation, Inc.
34907 This config.status script is free software; the Free Software Foundation
34908 gives unlimited permission to copy, distribute and modify it."
34909
34910 ac_pwd='$ac_pwd'
34911 srcdir='$srcdir'
34912 INSTALL='$INSTALL'
34913 MKDIR_P='$MKDIR_P'
34914 AWK='$AWK'
34915 test -n "\$AWK" || AWK=awk
34916 _ACEOF
34917
34918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34919 # The default lists apply if the user does not specify any file.
34920 ac_need_defaults=:
34921 while test $# != 0
34922 do
34923   case $1 in
34924   --*=*)
34925     ac_option=`expr "X$1" : 'X\([^=]*\)='`
34926     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34927     ac_shift=:
34928     ;;
34929   *)
34930     ac_option=$1
34931     ac_optarg=$2
34932     ac_shift=shift
34933     ;;
34934   esac
34935
34936   case $ac_option in
34937   # Handling of the options.
34938   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34939     ac_cs_recheck=: ;;
34940   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34941     $as_echo "$ac_cs_version"; exit ;;
34942   --config | --confi | --conf | --con | --co | --c )
34943     $as_echo "$ac_cs_config"; exit ;;
34944   --debug | --debu | --deb | --de | --d | -d )
34945     debug=: ;;
34946   --file | --fil | --fi | --f )
34947     $ac_shift
34948     case $ac_optarg in
34949     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34950     esac
34951     as_fn_append CONFIG_FILES " '$ac_optarg'"
34952     ac_need_defaults=false;;
34953   --header | --heade | --head | --hea )
34954     $ac_shift
34955     case $ac_optarg in
34956     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34957     esac
34958     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34959     ac_need_defaults=false;;
34960   --he | --h)
34961     # Conflict between --help and --header
34962     as_fn_error $? "ambiguous option: \`$1'
34963 Try \`$0 --help' for more information.";;
34964   --help | --hel | -h )
34965     $as_echo "$ac_cs_usage"; exit ;;
34966   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34967   | -silent | --silent | --silen | --sile | --sil | --si | --s)
34968     ac_cs_silent=: ;;
34969
34970   # This is an error.
34971   -*) as_fn_error $? "unrecognized option: \`$1'
34972 Try \`$0 --help' for more information." ;;
34973
34974   *) as_fn_append ac_config_targets " $1"
34975      ac_need_defaults=false ;;
34976
34977   esac
34978   shift
34979 done
34980
34981 ac_configure_extra_args=
34982
34983 if $ac_cs_silent; then
34984   exec 6>/dev/null
34985   ac_configure_extra_args="$ac_configure_extra_args --silent"
34986 fi
34987
34988 _ACEOF
34989 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34990 if \$ac_cs_recheck; then
34991   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34992   shift
34993   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34994   CONFIG_SHELL='$SHELL'
34995   export CONFIG_SHELL
34996   exec "\$@"
34997 fi
34998
34999 _ACEOF
35000 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35001 exec 5>>config.log
35002 {
35003   echo
35004   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
35005 ## Running $as_me. ##
35006 _ASBOX
35007   $as_echo "$ac_log"
35008 } >&5
35009
35010 _ACEOF
35011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35012 #
35013 # INIT-COMMANDS
35014 #
35015 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
35016 GNUmakefile=$GNUmakefile
35017
35018 _ACEOF
35019
35020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35021
35022 # Handling of arguments.
35023 for ac_config_target in $ac_config_targets
35024 do
35025   case $ac_config_target in
35026     "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
35027     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
35028     "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
35029     "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
35030     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
35031     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
35032     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
35033     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
35034     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
35035     "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;;
35036     "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
35037
35038   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
35039   esac
35040 done
35041
35042
35043 # If the user did not use the arguments to specify the items to instantiate,
35044 # then the envvar interface is used.  Set only those that are not.
35045 # We use the long form for the default assignment because of an extremely
35046 # bizarre bug on SunOS 4.1.3.
35047 if $ac_need_defaults; then
35048   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
35049   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
35050   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
35051   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
35052 fi
35053
35054 # Have a temporary directory for convenience.  Make it in the build tree
35055 # simply because there is no reason against having it here, and in addition,
35056 # creating and moving files from /tmp can sometimes cause problems.
35057 # Hook for its removal unless debugging.
35058 # Note that there is a small window in which the directory will not be cleaned:
35059 # after its creation but before its name has been assigned to `$tmp'.
35060 $debug ||
35061 {
35062   tmp=
35063   trap 'exit_status=$?
35064   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
35065 ' 0
35066   trap 'as_fn_exit 1' 1 2 13 15
35067 }
35068 # Create a (secure) tmp directory for tmp files.
35069
35070 {
35071   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
35072   test -n "$tmp" && test -d "$tmp"
35073 }  ||
35074 {
35075   tmp=./conf$$-$RANDOM
35076   (umask 077 && mkdir "$tmp")
35077 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
35078
35079 # Set up the scripts for CONFIG_FILES section.
35080 # No need to generate them if there are no CONFIG_FILES.
35081 # This happens for instance with `./config.status config.h'.
35082 if test -n "$CONFIG_FILES"; then
35083
35084
35085 ac_cr=`echo X | tr X '\015'`
35086 # On cygwin, bash can eat \r inside `` if the user requested igncr.
35087 # But we know of no other shell where ac_cr would be empty at this
35088 # point, so we can use a bashism as a fallback.
35089 if test "x$ac_cr" = x; then
35090   eval ac_cr=\$\'\\r\'
35091 fi
35092 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
35093 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
35094   ac_cs_awk_cr='\\r'
35095 else
35096   ac_cs_awk_cr=$ac_cr
35097 fi
35098
35099 echo 'BEGIN {' >"$tmp/subs1.awk" &&
35100 _ACEOF
35101
35102
35103 {
35104   echo "cat >conf$$subs.awk <<_ACEOF" &&
35105   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
35106   echo "_ACEOF"
35107 } >conf$$subs.sh ||
35108   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35109 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
35110 ac_delim='%!_!# '
35111 for ac_last_try in false false false false false :; do
35112   . ./conf$$subs.sh ||
35113     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35114
35115   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
35116   if test $ac_delim_n = $ac_delim_num; then
35117     break
35118   elif $ac_last_try; then
35119     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35120   else
35121     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35122   fi
35123 done
35124 rm -f conf$$subs.sh
35125
35126 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35127 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
35128 _ACEOF
35129 sed -n '
35130 h
35131 s/^/S["/; s/!.*/"]=/
35132 p
35133 g
35134 s/^[^!]*!//
35135 :repl
35136 t repl
35137 s/'"$ac_delim"'$//
35138 t delim
35139 :nl
35140 h
35141 s/\(.\{148\}\)..*/\1/
35142 t more1
35143 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
35144 p
35145 n
35146 b repl
35147 :more1
35148 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35149 p
35150 g
35151 s/.\{148\}//
35152 t nl
35153 :delim
35154 h
35155 s/\(.\{148\}\)..*/\1/
35156 t more2
35157 s/["\\]/\\&/g; s/^/"/; s/$/"/
35158 p
35159 b
35160 :more2
35161 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
35162 p
35163 g
35164 s/.\{148\}//
35165 t delim
35166 ' <conf$$subs.awk | sed '
35167 /^[^""]/{
35168   N
35169   s/\n//
35170 }
35171 ' >>$CONFIG_STATUS || ac_write_fail=1
35172 rm -f conf$$subs.awk
35173 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35174 _ACAWK
35175 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
35176   for (key in S) S_is_set[key] = 1
35177   FS = "\a"
35178
35179 }
35180 {
35181   line = $ 0
35182   nfields = split(line, field, "@")
35183   substed = 0
35184   len = length(field[1])
35185   for (i = 2; i < nfields; i++) {
35186     key = field[i]
35187     keylen = length(key)
35188     if (S_is_set[key]) {
35189       value = S[key]
35190       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
35191       len += length(value) + length(field[++i])
35192       substed = 1
35193     } else
35194       len += 1 + keylen
35195   }
35196
35197   print line
35198 }
35199
35200 _ACAWK
35201 _ACEOF
35202 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35203 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
35204   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
35205 else
35206   cat
35207 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
35208   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
35209 _ACEOF
35210
35211 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
35212 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
35213 # trailing colons and then remove the whole line if VPATH becomes empty
35214 # (actually we leave an empty line to preserve line numbers).
35215 if test "x$srcdir" = x.; then
35216   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
35217 h
35218 s///
35219 s/^/:/
35220 s/[      ]*$/:/
35221 s/:\$(srcdir):/:/g
35222 s/:\${srcdir}:/:/g
35223 s/:@srcdir@:/:/g
35224 s/^:*//
35225 s/:*$//
35226 x
35227 s/\(=[   ]*\).*/\1/
35228 G
35229 s/\n//
35230 s/^[^=]*=[       ]*$//
35231 }'
35232 fi
35233
35234 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35235 fi # test -n "$CONFIG_FILES"
35236
35237 # Set up the scripts for CONFIG_HEADERS section.
35238 # No need to generate them if there are no CONFIG_HEADERS.
35239 # This happens for instance with `./config.status Makefile'.
35240 if test -n "$CONFIG_HEADERS"; then
35241 cat >"$tmp/defines.awk" <<\_ACAWK ||
35242 BEGIN {
35243 _ACEOF
35244
35245 # Transform confdefs.h into an awk script `defines.awk', embedded as
35246 # here-document in config.status, that substitutes the proper values into
35247 # config.h.in to produce config.h.
35248
35249 # Create a delimiter string that does not exist in confdefs.h, to ease
35250 # handling of long lines.
35251 ac_delim='%!_!# '
35252 for ac_last_try in false false :; do
35253   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
35254   if test -z "$ac_t"; then
35255     break
35256   elif $ac_last_try; then
35257     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
35258   else
35259     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
35260   fi
35261 done
35262
35263 # For the awk script, D is an array of macro values keyed by name,
35264 # likewise P contains macro parameters if any.  Preserve backslash
35265 # newline sequences.
35266
35267 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
35268 sed -n '
35269 s/.\{148\}/&'"$ac_delim"'/g
35270 t rset
35271 :rset
35272 s/^[     ]*#[    ]*define[       ][      ]*/ /
35273 t def
35274 d
35275 :def
35276 s/\\$//
35277 t bsnl
35278 s/["\\]/\\&/g
35279 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
35280 D["\1"]=" \3"/p
35281 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
35282 d
35283 :bsnl
35284 s/["\\]/\\&/g
35285 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
35286 D["\1"]=" \3\\\\\\n"\\/p
35287 t cont
35288 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
35289 t cont
35290 d
35291 :cont
35292 n
35293 s/.\{148\}/&'"$ac_delim"'/g
35294 t clear
35295 :clear
35296 s/\\$//
35297 t bsnlc
35298 s/["\\]/\\&/g; s/^/"/; s/$/"/p
35299 d
35300 :bsnlc
35301 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
35302 b cont
35303 ' <confdefs.h | sed '
35304 s/'"$ac_delim"'/"\\\
35305 "/g' >>$CONFIG_STATUS || ac_write_fail=1
35306
35307 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35308   for (key in D) D_is_set[key] = 1
35309   FS = "\a"
35310 }
35311 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
35312   line = \$ 0
35313   split(line, arg, " ")
35314   if (arg[1] == "#") {
35315     defundef = arg[2]
35316     mac1 = arg[3]
35317   } else {
35318     defundef = substr(arg[1], 2)
35319     mac1 = arg[2]
35320   }
35321   split(mac1, mac2, "(") #)
35322   macro = mac2[1]
35323   prefix = substr(line, 1, index(line, defundef) - 1)
35324   if (D_is_set[macro]) {
35325     # Preserve the white space surrounding the "#".
35326     print prefix "define", macro P[macro] D[macro]
35327     next
35328   } else {
35329     # Replace #undef with comments.  This is necessary, for example,
35330     # in the case of _POSIX_SOURCE, which is predefined and required
35331     # on some systems where configure will not decide to define it.
35332     if (defundef == "undef") {
35333       print "/*", prefix defundef, macro, "*/"
35334       next
35335     }
35336   }
35337 }
35338 { print }
35339 _ACAWK
35340 _ACEOF
35341 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35342   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
35343 fi # test -n "$CONFIG_HEADERS"
35344
35345
35346 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
35347 shift
35348 for ac_tag
35349 do
35350   case $ac_tag in
35351   :[FHLC]) ac_mode=$ac_tag; continue;;
35352   esac
35353   case $ac_mode$ac_tag in
35354   :[FHL]*:*);;
35355   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
35356   :[FH]-) ac_tag=-:-;;
35357   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
35358   esac
35359   ac_save_IFS=$IFS
35360   IFS=:
35361   set x $ac_tag
35362   IFS=$ac_save_IFS
35363   shift
35364   ac_file=$1
35365   shift
35366
35367   case $ac_mode in
35368   :L) ac_source=$1;;
35369   :[FH])
35370     ac_file_inputs=
35371     for ac_f
35372     do
35373       case $ac_f in
35374       -) ac_f="$tmp/stdin";;
35375       *) # Look for the file first in the build tree, then in the source tree
35376          # (if the path is not absolute).  The absolute path cannot be DOS-style,
35377          # because $ac_f cannot contain `:'.
35378          test -f "$ac_f" ||
35379            case $ac_f in
35380            [\\/$]*) false;;
35381            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
35382            esac ||
35383            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
35384       esac
35385       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
35386       as_fn_append ac_file_inputs " '$ac_f'"
35387     done
35388
35389     # Let's still pretend it is `configure' which instantiates (i.e., don't
35390     # use $as_me), people would be surprised to read:
35391     #    /* config.h.  Generated by config.status.  */
35392     configure_input='Generated from '`
35393           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
35394         `' by configure.'
35395     if test x"$ac_file" != x-; then
35396       configure_input="$ac_file.  $configure_input"
35397       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
35398 $as_echo "$as_me: creating $ac_file" >&6;}
35399     fi
35400     # Neutralize special characters interpreted by sed in replacement strings.
35401     case $configure_input in #(
35402     *\&* | *\|* | *\\* )
35403        ac_sed_conf_input=`$as_echo "$configure_input" |
35404        sed 's/[\\\\&|]/\\\\&/g'`;; #(
35405     *) ac_sed_conf_input=$configure_input;;
35406     esac
35407
35408     case $ac_tag in
35409     *:-:* | *:-) cat >"$tmp/stdin" \
35410       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
35411     esac
35412     ;;
35413   esac
35414
35415   ac_dir=`$as_dirname -- "$ac_file" ||
35416 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35417          X"$ac_file" : 'X\(//\)[^/]' \| \
35418          X"$ac_file" : 'X\(//\)$' \| \
35419          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
35420 $as_echo X"$ac_file" |
35421     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35422             s//\1/
35423             q
35424           }
35425           /^X\(\/\/\)[^/].*/{
35426             s//\1/
35427             q
35428           }
35429           /^X\(\/\/\)$/{
35430             s//\1/
35431             q
35432           }
35433           /^X\(\/\).*/{
35434             s//\1/
35435             q
35436           }
35437           s/.*/./; q'`
35438   as_dir="$ac_dir"; as_fn_mkdir_p
35439   ac_builddir=.
35440
35441 case "$ac_dir" in
35442 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
35443 *)
35444   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
35445   # A ".." for each directory in $ac_dir_suffix.
35446   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
35447   case $ac_top_builddir_sub in
35448   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
35449   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
35450   esac ;;
35451 esac
35452 ac_abs_top_builddir=$ac_pwd
35453 ac_abs_builddir=$ac_pwd$ac_dir_suffix
35454 # for backward compatibility:
35455 ac_top_builddir=$ac_top_build_prefix
35456
35457 case $srcdir in
35458   .)  # We are building in place.
35459     ac_srcdir=.
35460     ac_top_srcdir=$ac_top_builddir_sub
35461     ac_abs_top_srcdir=$ac_pwd ;;
35462   [\\/]* | ?:[\\/]* )  # Absolute name.
35463     ac_srcdir=$srcdir$ac_dir_suffix;
35464     ac_top_srcdir=$srcdir
35465     ac_abs_top_srcdir=$srcdir ;;
35466   *) # Relative name.
35467     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
35468     ac_top_srcdir=$ac_top_build_prefix$srcdir
35469     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
35470 esac
35471 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
35472
35473
35474   case $ac_mode in
35475   :F)
35476   #
35477   # CONFIG_FILE
35478   #
35479
35480   case $INSTALL in
35481   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
35482   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
35483   esac
35484   ac_MKDIR_P=$MKDIR_P
35485   case $MKDIR_P in
35486   [\\/$]* | ?:[\\/]* ) ;;
35487   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
35488   esac
35489 _ACEOF
35490
35491 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35492 # If the template does not know about datarootdir, expand it.
35493 # FIXME: This hack should be removed a few years after 2.60.
35494 ac_datarootdir_hack=; ac_datarootdir_seen=
35495 ac_sed_dataroot='
35496 /datarootdir/ {
35497   p
35498   q
35499 }
35500 /@datadir@/p
35501 /@docdir@/p
35502 /@infodir@/p
35503 /@localedir@/p
35504 /@mandir@/p'
35505 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
35506 *datarootdir*) ac_datarootdir_seen=yes;;
35507 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
35508   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
35509 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
35510 _ACEOF
35511 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35512   ac_datarootdir_hack='
35513   s&@datadir@&$datadir&g
35514   s&@docdir@&$docdir&g
35515   s&@infodir@&$infodir&g
35516   s&@localedir@&$localedir&g
35517   s&@mandir@&$mandir&g
35518   s&\\\${datarootdir}&$datarootdir&g' ;;
35519 esac
35520 _ACEOF
35521
35522 # Neutralize VPATH when `$srcdir' = `.'.
35523 # Shell code in configure.ac might set extrasub.
35524 # FIXME: do we really want to maintain this feature?
35525 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35526 ac_sed_extra="$ac_vpsub
35527 $extrasub
35528 _ACEOF
35529 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35530 :t
35531 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
35532 s|@configure_input@|$ac_sed_conf_input|;t t
35533 s&@top_builddir@&$ac_top_builddir_sub&;t t
35534 s&@top_build_prefix@&$ac_top_build_prefix&;t t
35535 s&@srcdir@&$ac_srcdir&;t t
35536 s&@abs_srcdir@&$ac_abs_srcdir&;t t
35537 s&@top_srcdir@&$ac_top_srcdir&;t t
35538 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
35539 s&@builddir@&$ac_builddir&;t t
35540 s&@abs_builddir@&$ac_abs_builddir&;t t
35541 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
35542 s&@INSTALL@&$ac_INSTALL&;t t
35543 s&@MKDIR_P@&$ac_MKDIR_P&;t t
35544 $ac_datarootdir_hack
35545 "
35546 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
35547   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35548
35549 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
35550   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
35551   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
35552   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35553 which seems to be undefined.  Please make sure it is defined" >&5
35554 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
35555 which seems to be undefined.  Please make sure it is defined" >&2;}
35556
35557   rm -f "$tmp/stdin"
35558   case $ac_file in
35559   -) cat "$tmp/out" && rm -f "$tmp/out";;
35560   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
35561   esac \
35562   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35563  ;;
35564   :H)
35565   #
35566   # CONFIG_HEADER
35567   #
35568   if test x"$ac_file" != x-; then
35569     {
35570       $as_echo "/* $configure_input  */" \
35571       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
35572     } >"$tmp/config.h" \
35573       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35574     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
35575       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
35576 $as_echo "$as_me: $ac_file is unchanged" >&6;}
35577     else
35578       rm -f "$ac_file"
35579       mv "$tmp/config.h" "$ac_file" \
35580         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
35581     fi
35582   else
35583     $as_echo "/* $configure_input  */" \
35584       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
35585       || as_fn_error $? "could not create -" "$LINENO" 5
35586   fi
35587 # Compute "$ac_file"'s index in $config_headers.
35588 _am_arg="$ac_file"
35589 _am_stamp_count=1
35590 for _am_header in $config_headers :; do
35591   case $_am_header in
35592     $_am_arg | $_am_arg:* )
35593       break ;;
35594     * )
35595       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
35596   esac
35597 done
35598 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
35599 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35600          X"$_am_arg" : 'X\(//\)[^/]' \| \
35601          X"$_am_arg" : 'X\(//\)$' \| \
35602          X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
35603 $as_echo X"$_am_arg" |
35604     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35605             s//\1/
35606             q
35607           }
35608           /^X\(\/\/\)[^/].*/{
35609             s//\1/
35610             q
35611           }
35612           /^X\(\/\/\)$/{
35613             s//\1/
35614             q
35615           }
35616           /^X\(\/\).*/{
35617             s//\1/
35618             q
35619           }
35620           s/.*/./; q'`/stamp-h$_am_stamp_count
35621  ;;
35622   :L)
35623   #
35624   # CONFIG_LINK
35625   #
35626
35627   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
35628     :
35629   else
35630     # Prefer the file from the source tree if names are identical.
35631     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
35632       ac_source=$srcdir/$ac_source
35633     fi
35634
35635     { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
35636 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
35637
35638     if test ! -r "$ac_source"; then
35639       as_fn_error $? "$ac_source: file not found" "$LINENO" 5
35640     fi
35641     rm -f "$ac_file"
35642
35643     # Try a relative symlink, then a hard link, then a copy.
35644     case $ac_source in
35645     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
35646         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
35647     esac
35648     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
35649       ln "$ac_source" "$ac_file" 2>/dev/null ||
35650       cp -p "$ac_source" "$ac_file" ||
35651       as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
35652   fi
35653  ;;
35654   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
35655 $as_echo "$as_me: executing $ac_file commands" >&6;}
35656  ;;
35657   esac
35658
35659
35660   case $ac_file$ac_mode in
35661     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
35662   # Autoconf 2.62 quotes --file arguments for eval, but not when files
35663   # are listed without --file.  Let's play safe and only enable the eval
35664   # if we detect the quoting.
35665   case $CONFIG_FILES in
35666   *\'*) eval set x "$CONFIG_FILES" ;;
35667   *)   set x $CONFIG_FILES ;;
35668   esac
35669   shift
35670   for mf
35671   do
35672     # Strip MF so we end up with the name of the file.
35673     mf=`echo "$mf" | sed -e 's/:.*$//'`
35674     # Check whether this is an Automake generated Makefile or not.
35675     # We used to match only the files named `Makefile.in', but
35676     # some people rename them; so instead we look at the file content.
35677     # Grep'ing the first line is not enough: some people post-process
35678     # each Makefile.in and add a new line on top of each file to say so.
35679     # Grep'ing the whole file is not good either: AIX grep has a line
35680     # limit of 2048, but all sed's we know have understand at least 4000.
35681     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
35682       dirpart=`$as_dirname -- "$mf" ||
35683 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35684          X"$mf" : 'X\(//\)[^/]' \| \
35685          X"$mf" : 'X\(//\)$' \| \
35686          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
35687 $as_echo X"$mf" |
35688     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35689             s//\1/
35690             q
35691           }
35692           /^X\(\/\/\)[^/].*/{
35693             s//\1/
35694             q
35695           }
35696           /^X\(\/\/\)$/{
35697             s//\1/
35698             q
35699           }
35700           /^X\(\/\).*/{
35701             s//\1/
35702             q
35703           }
35704           s/.*/./; q'`
35705     else
35706       continue
35707     fi
35708     # Extract the definition of DEPDIR, am__include, and am__quote
35709     # from the Makefile without running `make'.
35710     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
35711     test -z "$DEPDIR" && continue
35712     am__include=`sed -n 's/^am__include = //p' < "$mf"`
35713     test -z "am__include" && continue
35714     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
35715     # When using ansi2knr, U may be empty or an underscore; expand it
35716     U=`sed -n 's/^U = //p' < "$mf"`
35717     # Find all dependency output files, they are included files with
35718     # $(DEPDIR) in their names.  We invoke sed twice because it is the
35719     # simplest approach to changing $(DEPDIR) to its actual value in the
35720     # expansion.
35721     for file in `sed -n "
35722       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
35723          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
35724       # Make sure the directory exists.
35725       test -f "$dirpart/$file" && continue
35726       fdir=`$as_dirname -- "$file" ||
35727 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35728          X"$file" : 'X\(//\)[^/]' \| \
35729          X"$file" : 'X\(//\)$' \| \
35730          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
35731 $as_echo X"$file" |
35732     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35733             s//\1/
35734             q
35735           }
35736           /^X\(\/\/\)[^/].*/{
35737             s//\1/
35738             q
35739           }
35740           /^X\(\/\/\)$/{
35741             s//\1/
35742             q
35743           }
35744           /^X\(\/\).*/{
35745             s//\1/
35746             q
35747           }
35748           s/.*/./; q'`
35749       as_dir=$dirpart/$fdir; as_fn_mkdir_p
35750       # echo "creating $dirpart/$file"
35751       echo '# dummy' > "$dirpart/$file"
35752     done
35753   done
35754 }
35755  ;;
35756     "stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
35757
35758   esac
35759 done # for ac_tag
35760
35761
35762 as_fn_exit 0
35763 _ACEOF
35764 ac_clean_files=$ac_clean_files_save
35765
35766 test $ac_write_fail = 0 ||
35767   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
35768
35769
35770 # configure is writing to config.log, and then calls config.status.
35771 # config.status does its own redirection, appending to config.log.
35772 # Unfortunately, on DOS this fails, as config.log is still kept open
35773 # by configure, so config.status won't be able to write to it; its
35774 # output is simply discarded.  So we exec the FD to /dev/null,
35775 # effectively closing config.log, so it can be properly (re)opened and
35776 # appended to by config.status.  When coming back to configure, we
35777 # need to make the FD available again.
35778 if test "$no_create" != yes; then
35779   ac_cs_success=:
35780   ac_config_status_args=
35781   test "$silent" = yes &&
35782     ac_config_status_args="$ac_config_status_args --quiet"
35783   exec 5>/dev/null
35784   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
35785   exec 5>>config.log
35786   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
35787   # would make configure fail if this is the last instruction.
35788   $ac_cs_success || as_fn_exit 1
35789 fi
35790 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
35791   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
35792 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
35793 fi
35794