Handle "p S::method()::static_var" in the C++ parser
[deliverable/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
184do
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
228 else
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
233 fi
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
263
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
372
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
375 as_expr=expr
376else
377 as_expr=false
378fi
379
380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
381 as_basename=basename
382else
383 as_basename=false
384fi
385
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
391
392as_me=`$as_basename -- "$0" ||
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
410
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
417
418
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
428 sed '
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
433 N
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
436 t loop
437 s/-\n.*//
438 ' >$as_me.lineno &&
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
446 # Exit status is that of the last command.
447 exit
448}
449
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
461esac
462
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
466else
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
469fi
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
472 as_ln_s='ln -s'
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
483 fi
484else
485 as_ln_s='cp -p'
486fi
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
489
490if mkdir -p . 2>/dev/null; then
491 as_mkdir_p='mkdir -p "$as_dir"'
492else
493 test -d ./-p && rmdir ./-p
494 as_mkdir_p=false
495fi
496
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
519
520# Sed expression to map a string onto a valid CPP name.
521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
522
523# Sed expression to map a string onto a valid variable name.
524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
525
526
527exec 7<&0 </dev/null 6>&1
528
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
534#
535# Initializations.
536#
537ac_default_prefix=/usr/local
538ac_clean_files=
539ac_config_libobj_dir=.
540LIBOBJS=
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
545
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
552PACKAGE_URL=
553
8690e634 554ac_unique_file="import/memmem.c"
c971b7fa
PA
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
558#ifdef HAVE_SYS_TYPES_H
559# include <sys/types.h>
560#endif
561#ifdef HAVE_SYS_STAT_H
562# include <sys/stat.h>
563#endif
564#ifdef STDC_HEADERS
565# include <stdlib.h>
566# include <stddef.h>
567#else
568# ifdef HAVE_STDLIB_H
569# include <stdlib.h>
570# endif
571#endif
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
578#ifdef HAVE_STRINGS_H
579# include <strings.h>
580#endif
581#ifdef HAVE_INTTYPES_H
582# include <inttypes.h>
583#endif
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
588# include <unistd.h>
589#endif"
590
98399780 591ac_func_list=
e26b6bb0 592ac_header_list=
8690e634 593gl_fnmatch_required=POSIX
c971b7fa
PA
594ac_subst_vars='am__EXEEXT_FALSE
595am__EXEEXT_TRUE
596gltests_LTLIBOBJS
597gltests_LIBOBJS
598gl_LTLIBOBJS
599gl_LIBOBJS
600LTLIBOBJS
601LIBOBJS
602LN_S
603am__fastdepCC_FALSE
604am__fastdepCC_TRUE
605CCDEPMODE
606AMDEPBACKSLASH
607AMDEP_FALSE
608AMDEP_TRUE
609am__quote
610am__include
611DEPDIR
612am__untar
613am__tar
614AMTAR
615am__leading_dot
616SET_MAKE
617AWK
618mkdir_p
c971b7fa
PA
619INSTALL_STRIP_PROGRAM
620STRIP
621install_sh
622MAKEINFO
623AUTOHEADER
624AUTOMAKE
625AUTOCONF
626ACLOCAL
627VERSION
628PACKAGE
629CYGPATH_W
630am__isrc
631INSTALL_DATA
632INSTALL_SCRIPT
633INSTALL_PROGRAM
634LIBGNU_LTLIBDEPS
635LIBGNU_LIBDEPS
636gltests_WITNESS
8690e634
JK
637REPLACE_TOWLOWER
638REPLACE_ISWCNTRL
639HAVE_WCTYPE_H
640NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
641NEXT_WCTYPE_H
642HAVE_ISWCNTRL
643REPLACE_ISWBLANK
644HAVE_WCTRANS_T
645HAVE_WCTYPE_T
646HAVE_ISWBLANK
647GNULIB_TOWCTRANS
648GNULIB_WCTRANS
649GNULIB_ISWCTYPE
650GNULIB_WCTYPE
651GNULIB_ISWBLANK
652HAVE_WINT_T
653HAVE_FEATURES_H
654NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
655NEXT_WCHAR_H
8839a007
PA
656HAVE_UNISTD_H
657NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
658NEXT_UNISTD_H
4a626d0a 659UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
660PTHREAD_H_DEFINES_STRUCT_TIMESPEC
661SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
662TIME_H_DEFINES_STRUCT_TIMESPEC
663NEXT_AS_FIRST_DIRECTIVE_TIME_H
664NEXT_TIME_H
4a626d0a
PA
665REPLACE_LOCALTIME
666REPLACE_GMTIME
09607c9e
TT
667REPLACE_TIMEGM
668REPLACE_NANOSLEEP
669REPLACE_MKTIME
670REPLACE_LOCALTIME_R
671HAVE_TIMEGM
672HAVE_STRPTIME
673HAVE_NANOSLEEP
674HAVE_DECL_LOCALTIME_R
4a626d0a 675GNULIB_TIME_RZ
09607c9e
TT
676GNULIB_TIME_R
677GNULIB_TIMEGM
678GNULIB_STRPTIME
679GNULIB_NANOSLEEP
680GNULIB_MKTIME
63ce7108
TT
681WINDOWS_64_BIT_OFF_T
682NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
683NEXT_SYS_TYPES_H
09607c9e
TT
684MKDIR_P
685WINDOWS_64_BIT_ST_SIZE
686NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
687NEXT_SYS_STAT_H
2196f55f
YQ
688NEXT_AS_FIRST_DIRECTIVE_STRING_H
689NEXT_STRING_H
98399780
YQ
690NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
691NEXT_STDLIB_H
6a29c58e
YQ
692NEXT_AS_FIRST_DIRECTIVE_STDIO_H
693NEXT_STDIO_H
2196f55f
YQ
694NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
695NEXT_STDDEF_H
696GL_GENERATE_STDDEF_H_FALSE
697GL_GENERATE_STDDEF_H_TRUE
698STDDEF_H
699HAVE_WCHAR_T
4a626d0a 700HAVE_MAX_ALIGN_T
2196f55f
YQ
701REPLACE_NULL
702HAVE__BOOL
703GL_GENERATE_STDBOOL_H_FALSE
704GL_GENERATE_STDBOOL_H_TRUE
705STDBOOL_H
0750520d
PA
706NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
707NEXT_SIGNAL_H
708REPLACE_RAISE
709REPLACE_PTHREAD_SIGMASK
710HAVE_SIGHANDLER_T
711HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
712HAVE_STRUCT_SIGACTION_SA_SIGACTION
713HAVE_SIGACTION
714HAVE_SIGINFO_T
715HAVE_SIGSET_T
716HAVE_RAISE
717HAVE_PTHREAD_SIGMASK
718HAVE_POSIX_SIGNALBLOCKING
719GNULIB_SIGACTION
720GNULIB_SIGPROCMASK
721GNULIB_SIGNAL_H_SIGPIPE
722GNULIB_RAISE
723GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
724REPLACE_VSPRINTF
725REPLACE_VSNPRINTF
726REPLACE_VPRINTF
727REPLACE_VFPRINTF
728REPLACE_VDPRINTF
729REPLACE_VASPRINTF
730REPLACE_TMPFILE
731REPLACE_STDIO_WRITE_FUNCS
732REPLACE_STDIO_READ_FUNCS
733REPLACE_SPRINTF
734REPLACE_SNPRINTF
735REPLACE_RENAMEAT
736REPLACE_RENAME
737REPLACE_REMOVE
738REPLACE_PRINTF
739REPLACE_POPEN
740REPLACE_PERROR
741REPLACE_OBSTACK_PRINTF
742REPLACE_GETLINE
743REPLACE_GETDELIM
744REPLACE_FTELLO
745REPLACE_FTELL
746REPLACE_FSEEKO
747REPLACE_FSEEK
748REPLACE_FREOPEN
749REPLACE_FPURGE
750REPLACE_FPRINTF
751REPLACE_FOPEN
752REPLACE_FFLUSH
753REPLACE_FDOPEN
754REPLACE_FCLOSE
755REPLACE_DPRINTF
756HAVE_VDPRINTF
757HAVE_VASPRINTF
758HAVE_RENAMEAT
759HAVE_POPEN
760HAVE_PCLOSE
761HAVE_FTELLO
762HAVE_FSEEKO
763HAVE_DPRINTF
764HAVE_DECL_VSNPRINTF
765HAVE_DECL_SNPRINTF
766HAVE_DECL_OBSTACK_PRINTF
767HAVE_DECL_GETLINE
768HAVE_DECL_GETDELIM
769HAVE_DECL_FTELLO
770HAVE_DECL_FSEEKO
771HAVE_DECL_FPURGE
772GNULIB_VSPRINTF_POSIX
773GNULIB_VSNPRINTF
774GNULIB_VPRINTF_POSIX
775GNULIB_VPRINTF
776GNULIB_VFPRINTF_POSIX
777GNULIB_VFPRINTF
778GNULIB_VDPRINTF
779GNULIB_VSCANF
780GNULIB_VFSCANF
781GNULIB_VASPRINTF
782GNULIB_TMPFILE
783GNULIB_STDIO_H_SIGPIPE
784GNULIB_STDIO_H_NONBLOCKING
785GNULIB_SPRINTF_POSIX
786GNULIB_SNPRINTF
787GNULIB_SCANF
788GNULIB_RENAMEAT
789GNULIB_RENAME
790GNULIB_REMOVE
791GNULIB_PUTS
792GNULIB_PUTCHAR
793GNULIB_PUTC
794GNULIB_PRINTF_POSIX
795GNULIB_PRINTF
796GNULIB_POPEN
797GNULIB_PERROR
798GNULIB_PCLOSE
799GNULIB_OBSTACK_PRINTF_POSIX
800GNULIB_OBSTACK_PRINTF
801GNULIB_GETLINE
802GNULIB_GETDELIM
803GNULIB_GETCHAR
804GNULIB_GETC
805GNULIB_FWRITE
806GNULIB_FTELLO
807GNULIB_FTELL
808GNULIB_FSEEKO
809GNULIB_FSEEK
810GNULIB_FSCANF
811GNULIB_FREOPEN
812GNULIB_FREAD
813GNULIB_FPUTS
814GNULIB_FPUTC
815GNULIB_FPURGE
816GNULIB_FPRINTF_POSIX
817GNULIB_FPRINTF
818GNULIB_FOPEN
819GNULIB_FGETS
820GNULIB_FGETC
821GNULIB_FFLUSH
822GNULIB_FDOPEN
823GNULIB_FCLOSE
824GNULIB_DPRINTF
c971b7fa
PA
825UNDEFINE_STRTOK_R
826REPLACE_STRTOK_R
827REPLACE_STRSIGNAL
828REPLACE_STRNLEN
829REPLACE_STRNDUP
830REPLACE_STRNCAT
831REPLACE_STRERROR_R
832REPLACE_STRERROR
833REPLACE_STRCHRNUL
834REPLACE_STRCASESTR
835REPLACE_STRSTR
836REPLACE_STRDUP
837REPLACE_STPNCPY
838REPLACE_MEMMEM
839REPLACE_MEMCHR
840HAVE_STRVERSCMP
841HAVE_DECL_STRSIGNAL
842HAVE_DECL_STRERROR_R
843HAVE_DECL_STRTOK_R
844HAVE_STRCASESTR
845HAVE_STRSEP
846HAVE_STRPBRK
847HAVE_DECL_STRNLEN
848HAVE_DECL_STRNDUP
849HAVE_DECL_STRDUP
850HAVE_STRCHRNUL
851HAVE_STPNCPY
852HAVE_STPCPY
853HAVE_RAWMEMCHR
854HAVE_DECL_MEMRCHR
855HAVE_MEMPCPY
856HAVE_DECL_MEMMEM
857HAVE_MEMCHR
858HAVE_FFSLL
859HAVE_FFSL
860HAVE_MBSLEN
861GNULIB_STRVERSCMP
862GNULIB_STRSIGNAL
863GNULIB_STRERROR_R
864GNULIB_STRERROR
865GNULIB_MBSTOK_R
866GNULIB_MBSSEP
867GNULIB_MBSSPN
868GNULIB_MBSPBRK
869GNULIB_MBSCSPN
870GNULIB_MBSCASESTR
871GNULIB_MBSPCASECMP
872GNULIB_MBSNCASECMP
873GNULIB_MBSCASECMP
874GNULIB_MBSSTR
875GNULIB_MBSRCHR
876GNULIB_MBSCHR
877GNULIB_MBSNLEN
878GNULIB_MBSLEN
879GNULIB_STRTOK_R
880GNULIB_STRCASESTR
881GNULIB_STRSTR
882GNULIB_STRSEP
883GNULIB_STRPBRK
884GNULIB_STRNLEN
885GNULIB_STRNDUP
886GNULIB_STRNCAT
887GNULIB_STRDUP
888GNULIB_STRCHRNUL
889GNULIB_STPNCPY
890GNULIB_STPCPY
891GNULIB_RAWMEMCHR
892GNULIB_MEMRCHR
893GNULIB_MEMPCPY
894GNULIB_MEMMEM
895GNULIB_MEMCHR
896GNULIB_FFSLL
897GNULIB_FFSL
8690e634
JK
898LOCALE_FR
899LOCALE_FR_UTF8
900LOCALE_ZH_CN
901LOCALE_JA
902REPLACE_WCSWIDTH
903REPLACE_WCWIDTH
904REPLACE_WCSNRTOMBS
905REPLACE_WCSRTOMBS
906REPLACE_WCRTOMB
907REPLACE_MBSNRTOWCS
908REPLACE_MBSRTOWCS
909REPLACE_MBRLEN
910REPLACE_MBRTOWC
911REPLACE_MBSINIT
912REPLACE_WCTOB
913REPLACE_BTOWC
914REPLACE_MBSTATE_T
915HAVE_DECL_WCWIDTH
916HAVE_DECL_WCTOB
917HAVE_WCSWIDTH
918HAVE_WCSTOK
919HAVE_WCSSTR
920HAVE_WCSPBRK
921HAVE_WCSSPN
922HAVE_WCSCSPN
923HAVE_WCSRCHR
924HAVE_WCSCHR
925HAVE_WCSDUP
926HAVE_WCSXFRM
927HAVE_WCSCOLL
928HAVE_WCSNCASECMP
929HAVE_WCSCASECMP
930HAVE_WCSNCMP
931HAVE_WCSCMP
932HAVE_WCSNCAT
933HAVE_WCSCAT
934HAVE_WCPNCPY
935HAVE_WCSNCPY
936HAVE_WCPCPY
937HAVE_WCSCPY
938HAVE_WCSNLEN
939HAVE_WCSLEN
940HAVE_WMEMSET
941HAVE_WMEMMOVE
942HAVE_WMEMCPY
943HAVE_WMEMCMP
944HAVE_WMEMCHR
945HAVE_WCSNRTOMBS
946HAVE_WCSRTOMBS
947HAVE_WCRTOMB
948HAVE_MBSNRTOWCS
949HAVE_MBSRTOWCS
950HAVE_MBRLEN
951HAVE_MBRTOWC
952HAVE_MBSINIT
953HAVE_BTOWC
954GNULIB_WCSWIDTH
955GNULIB_WCSTOK
956GNULIB_WCSSTR
957GNULIB_WCSPBRK
958GNULIB_WCSSPN
959GNULIB_WCSCSPN
960GNULIB_WCSRCHR
961GNULIB_WCSCHR
962GNULIB_WCSDUP
963GNULIB_WCSXFRM
964GNULIB_WCSCOLL
965GNULIB_WCSNCASECMP
966GNULIB_WCSCASECMP
967GNULIB_WCSNCMP
968GNULIB_WCSCMP
969GNULIB_WCSNCAT
970GNULIB_WCSCAT
971GNULIB_WCPNCPY
972GNULIB_WCSNCPY
973GNULIB_WCPCPY
974GNULIB_WCSCPY
975GNULIB_WCSNLEN
976GNULIB_WCSLEN
977GNULIB_WMEMSET
978GNULIB_WMEMMOVE
979GNULIB_WMEMCPY
980GNULIB_WMEMCMP
981GNULIB_WMEMCHR
982GNULIB_WCWIDTH
983GNULIB_WCSNRTOMBS
984GNULIB_WCSRTOMBS
985GNULIB_WCRTOMB
986GNULIB_MBSNRTOWCS
987GNULIB_MBSRTOWCS
988GNULIB_MBRLEN
989GNULIB_MBRTOWC
990GNULIB_MBSINIT
991GNULIB_WCTOB
992GNULIB_BTOWC
88b48903
WN
993NEXT_AS_FIRST_DIRECTIVE_MATH_H
994NEXT_MATH_H
f45c62c4
YQ
995REPLACE_UTIMENSAT
996REPLACE_STAT
997REPLACE_MKNOD
998REPLACE_MKFIFO
999REPLACE_MKDIR
1000REPLACE_LSTAT
1001REPLACE_FUTIMENS
1002REPLACE_FSTATAT
1003REPLACE_FSTAT
1004HAVE_UTIMENSAT
1005HAVE_MKNODAT
1006HAVE_MKNOD
1007HAVE_MKFIFOAT
1008HAVE_MKFIFO
1009HAVE_MKDIRAT
1010HAVE_LSTAT
1011HAVE_LCHMOD
1012HAVE_FUTIMENS
1013HAVE_FSTATAT
1014HAVE_FCHMODAT
1015GNULIB_UTIMENSAT
1016GNULIB_STAT
1017GNULIB_MKNODAT
1018GNULIB_MKNOD
1019GNULIB_MKFIFOAT
1020GNULIB_MKFIFO
1021GNULIB_MKDIRAT
1022GNULIB_LSTAT
1023GNULIB_LCHMOD
1024GNULIB_FUTIMENS
1025GNULIB_FSTATAT
1026GNULIB_FSTAT
1027GNULIB_FCHMODAT
8690e634
JK
1028LOCALCHARSET_TESTS_ENVIRONMENT
1029GLIBC21
c971b7fa
PA
1030NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1031NEXT_INTTYPES_H
1032UINT64_MAX_EQ_ULONG_MAX
1033UINT32_MAX_LT_UINTMAX_MAX
1034PRIPTR_PREFIX
1035PRI_MACROS_BROKEN
1036INT64_MAX_EQ_LONG_MAX
1037INT32_MAX_LT_INTMAX_MAX
4a626d0a 1038REPLACE_STRTOUMAX
c971b7fa
PA
1039REPLACE_STRTOIMAX
1040HAVE_DECL_STRTOUMAX
1041HAVE_DECL_STRTOIMAX
1042HAVE_DECL_IMAXDIV
1043HAVE_DECL_IMAXABS
1044GNULIB_STRTOUMAX
1045GNULIB_STRTOIMAX
1046GNULIB_IMAXDIV
1047GNULIB_IMAXABS
1048GL_GENERATE_STDINT_H_FALSE
1049GL_GENERATE_STDINT_H_TRUE
1050STDINT_H
49e4877c
PA
1051HAVE_SYS_INTTYPES_H
1052HAVE_SYS_BITYPES_H
1053HAVE_C99_STDINT_H
c971b7fa
PA
1054WINT_T_SUFFIX
1055WCHAR_T_SUFFIX
1056SIG_ATOMIC_T_SUFFIX
1057SIZE_T_SUFFIX
1058PTRDIFF_T_SUFFIX
1059HAVE_SIGNED_WINT_T
1060HAVE_SIGNED_WCHAR_T
1061HAVE_SIGNED_SIG_ATOMIC_T
1062BITSIZEOF_WINT_T
1063BITSIZEOF_WCHAR_T
1064BITSIZEOF_SIG_ATOMIC_T
1065BITSIZEOF_SIZE_T
1066BITSIZEOF_PTRDIFF_T
1067APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1068HAVE_STDINT_H
1069NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1070NEXT_STDINT_H
c971b7fa
PA
1071HAVE_SYS_TYPES_H
1072HAVE_INTTYPES_H
1073HAVE_WCHAR_H
1074HAVE_UNSIGNED_LONG_LONG_INT
1075HAVE_LONG_LONG_INT
49e4877c
PA
1076GL_GENERATE_LIMITS_H_FALSE
1077GL_GENERATE_LIMITS_H_TRUE
1078LIMITS_H
1079NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1080NEXT_LIMITS_H
4a626d0a
PA
1081HAVE_WINSOCK2_H
1082NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1083NEXT_SYS_TIME_H
1084REPLACE_STRUCT_TIMEVAL
1085REPLACE_GETTIMEOFDAY
1086HAVE_TIMEZONE_T
1087HAVE_SYS_TIME_H
1088HAVE_STRUCT_TIMEVAL
1089HAVE_GETTIMEOFDAY
1090GNULIB_GETTIMEOFDAY
88b48903
WN
1091FREXPL_LIBM
1092HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1093FREXP_LIBM
1094REPLACE_TRUNCL
1095REPLACE_TRUNCF
1096REPLACE_TRUNC
1097REPLACE_SQRTL
1098REPLACE_SIGNBIT_USING_GCC
1099REPLACE_SIGNBIT
1100REPLACE_ROUNDL
1101REPLACE_ROUNDF
1102REPLACE_ROUND
1103REPLACE_REMAINDERL
1104REPLACE_REMAINDERF
1105REPLACE_REMAINDER
1106REPLACE_NAN
1107REPLACE_MODFL
1108REPLACE_MODFF
1109REPLACE_MODF
1110REPLACE_LOGBL
1111REPLACE_LOGBF
1112REPLACE_LOGB
1113REPLACE_LOG2L
1114REPLACE_LOG2F
1115REPLACE_LOG2
1116REPLACE_LOG1PL
1117REPLACE_LOG1PF
1118REPLACE_LOG1P
1119REPLACE_LOG10L
1120REPLACE_LOG10F
1121REPLACE_LOG10
1122REPLACE_LOGL
1123REPLACE_LOGF
1124REPLACE_LOG
1125REPLACE_LDEXPL
1126REPLACE_ISNAN
1127REPLACE_ISINF
1128REPLACE_ISFINITE
1129REPLACE_ILOGBF
1130REPLACE_ILOGB
1131REPLACE_HYPOTL
1132REPLACE_HYPOTF
1133REPLACE_HYPOT
1134REPLACE_HUGE_VAL
1135REPLACE_FREXPL
1136REPLACE_FREXP
1137REPLACE_FREXPF
1138REPLACE_FMODL
1139REPLACE_FMODF
1140REPLACE_FMOD
1141REPLACE_FMAL
1142REPLACE_FMAF
1143REPLACE_FMA
1144REPLACE_FLOORL
1145REPLACE_FLOORF
1146REPLACE_FLOOR
1147REPLACE_FABSL
1148REPLACE_EXP2L
1149REPLACE_EXP2
1150REPLACE_EXPM1F
1151REPLACE_EXPM1
1152REPLACE_CEILL
1153REPLACE_CEILF
1154REPLACE_CEIL
1155REPLACE_CBRTL
1156REPLACE_CBRTF
1157HAVE_DECL_TRUNCL
1158HAVE_DECL_TRUNCF
1159HAVE_DECL_TRUNC
1160HAVE_DECL_TANL
1161HAVE_DECL_SQRTL
1162HAVE_DECL_SINL
1163HAVE_DECL_ROUNDL
1164HAVE_DECL_ROUNDF
1165HAVE_DECL_ROUND
1166HAVE_DECL_RINTF
1167HAVE_DECL_REMAINDERL
1168HAVE_DECL_REMAINDER
1169HAVE_DECL_LOGB
1170HAVE_DECL_LOG2L
1171HAVE_DECL_LOG2F
1172HAVE_DECL_LOG2
1173HAVE_DECL_LOG10L
1174HAVE_DECL_LOGL
1175HAVE_DECL_LDEXPL
1176HAVE_DECL_FREXPL
1177HAVE_DECL_FLOORL
1178HAVE_DECL_FLOORF
1179HAVE_DECL_EXPM1L
1180HAVE_DECL_EXP2L
1181HAVE_DECL_EXP2F
1182HAVE_DECL_EXP2
1183HAVE_DECL_EXPL
1184HAVE_DECL_COSL
1185HAVE_DECL_COPYSIGNF
1186HAVE_DECL_CEILL
1187HAVE_DECL_CEILF
1188HAVE_DECL_CBRTL
1189HAVE_DECL_CBRTF
1190HAVE_DECL_ATANL
1191HAVE_DECL_ASINL
1192HAVE_DECL_ACOSL
1193HAVE_TANHF
1194HAVE_TANL
1195HAVE_TANF
1196HAVE_SQRTL
1197HAVE_SQRTF
1198HAVE_SINHF
1199HAVE_SINL
1200HAVE_SINF
1201HAVE_RINTL
1202HAVE_RINT
1203HAVE_REMAINDERF
1204HAVE_REMAINDER
1205HAVE_POWF
1206HAVE_MODFL
1207HAVE_MODFF
1208HAVE_LOGBL
1209HAVE_LOGBF
1210HAVE_LOG1PL
1211HAVE_LOG1PF
1212HAVE_LOG1P
1213HAVE_LOG10L
1214HAVE_LOG10F
1215HAVE_LOGL
1216HAVE_LOGF
1217HAVE_LDEXPF
1218HAVE_ISNANL
1219HAVE_ISNAND
1220HAVE_ISNANF
1221HAVE_ILOGBL
1222HAVE_ILOGBF
1223HAVE_ILOGB
1224HAVE_HYPOTL
1225HAVE_HYPOTF
1226HAVE_FREXPF
1227HAVE_FMODL
1228HAVE_FMODF
1229HAVE_FMAL
1230HAVE_FMAF
1231HAVE_FMA
1232HAVE_FABSL
1233HAVE_FABSF
1234HAVE_EXPM1F
1235HAVE_EXPM1
1236HAVE_EXPL
1237HAVE_EXPF
1238HAVE_COSHF
1239HAVE_COSL
1240HAVE_COSF
1241HAVE_COPYSIGNL
1242HAVE_COPYSIGN
1243HAVE_CBRTL
1244HAVE_CBRTF
1245HAVE_CBRT
1246HAVE_ATAN2F
1247HAVE_ATANL
1248HAVE_ATANF
1249HAVE_ASINL
1250HAVE_ASINF
1251HAVE_ACOSL
1252HAVE_ACOSF
1253GNULIB_TRUNCL
1254GNULIB_TRUNCF
1255GNULIB_TRUNC
1256GNULIB_TANHF
1257GNULIB_TANL
1258GNULIB_TANF
1259GNULIB_SQRTL
1260GNULIB_SQRTF
1261GNULIB_SINHF
1262GNULIB_SINL
1263GNULIB_SINF
1264GNULIB_SIGNBIT
1265GNULIB_ROUNDL
1266GNULIB_ROUNDF
1267GNULIB_ROUND
1268GNULIB_RINTL
1269GNULIB_RINTF
1270GNULIB_RINT
1271GNULIB_REMAINDERL
1272GNULIB_REMAINDERF
1273GNULIB_REMAINDER
1274GNULIB_POWF
1275GNULIB_MODFL
1276GNULIB_MODFF
1277GNULIB_MODF
1278GNULIB_LOGBL
1279GNULIB_LOGBF
1280GNULIB_LOGB
1281GNULIB_LOG2L
1282GNULIB_LOG2F
1283GNULIB_LOG2
1284GNULIB_LOG1PL
1285GNULIB_LOG1PF
1286GNULIB_LOG1P
1287GNULIB_LOG10L
1288GNULIB_LOG10F
1289GNULIB_LOG10
1290GNULIB_LOGL
1291GNULIB_LOGF
1292GNULIB_LOG
1293GNULIB_LDEXPL
1294GNULIB_LDEXPF
1295GNULIB_ISNANL
1296GNULIB_ISNAND
1297GNULIB_ISNANF
1298GNULIB_ISNAN
1299GNULIB_ISINF
1300GNULIB_ISFINITE
1301GNULIB_ILOGBL
1302GNULIB_ILOGBF
1303GNULIB_ILOGB
1304GNULIB_HYPOTL
1305GNULIB_HYPOTF
1306GNULIB_HYPOT
1307GNULIB_FREXPL
1308GNULIB_FREXP
1309GNULIB_FREXPF
1310GNULIB_FMODL
1311GNULIB_FMODF
1312GNULIB_FMOD
1313GNULIB_FMAL
1314GNULIB_FMAF
1315GNULIB_FMA
1316GNULIB_FLOORL
1317GNULIB_FLOORF
1318GNULIB_FLOOR
1319GNULIB_FABSL
1320GNULIB_FABSF
1321GNULIB_EXPM1L
1322GNULIB_EXPM1F
1323GNULIB_EXPM1
1324GNULIB_EXP2L
1325GNULIB_EXP2F
1326GNULIB_EXP2
1327GNULIB_EXPL
1328GNULIB_EXPF
1329GNULIB_COSHF
1330GNULIB_COSL
1331GNULIB_COSF
1332GNULIB_COPYSIGNL
1333GNULIB_COPYSIGNF
1334GNULIB_COPYSIGN
1335GNULIB_CEILL
1336GNULIB_CEILF
1337GNULIB_CEIL
1338GNULIB_CBRTL
1339GNULIB_CBRTF
1340GNULIB_CBRT
1341GNULIB_ATAN2F
1342GNULIB_ATANL
1343GNULIB_ATANF
1344GNULIB_ASINL
1345GNULIB_ASINF
1346GNULIB_ACOSL
1347GNULIB_ACOSF
8690e634
JK
1348GL_GENERATE_FNMATCH_H_FALSE
1349GL_GENERATE_FNMATCH_H_TRUE
1350FNMATCH_H
88b48903
WN
1351REPLACE_ITOLD
1352GL_GENERATE_FLOAT_H_FALSE
1353GL_GENERATE_FLOAT_H_TRUE
1354FLOAT_H
1355NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1356NEXT_FLOAT_H
18848e28
GF
1357EOVERFLOW_VALUE
1358EOVERFLOW_HIDDEN
1359ENOLINK_VALUE
1360ENOLINK_HIDDEN
1361EMULTIHOP_VALUE
1362EMULTIHOP_HIDDEN
1363GL_GENERATE_ERRNO_H_FALSE
1364GL_GENERATE_ERRNO_H_TRUE
1365ERRNO_H
1366NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1367NEXT_ERRNO_H
e26b6bb0
TT
1368HAVE_DIRENT_H
1369NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1370NEXT_DIRENT_H
88b48903
WN
1371PRAGMA_COLUMNS
1372PRAGMA_SYSTEM_HEADER
1373INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1374INCLUDE_NEXT
e26b6bb0
TT
1375REPLACE_FDOPENDIR
1376REPLACE_DIRFD
1377REPLACE_CLOSEDIR
1378REPLACE_OPENDIR
1379HAVE_ALPHASORT
1380HAVE_SCANDIR
1381HAVE_FDOPENDIR
1382HAVE_DECL_FDOPENDIR
1383HAVE_DECL_DIRFD
1384HAVE_CLOSEDIR
1385HAVE_REWINDDIR
1386HAVE_READDIR
1387HAVE_OPENDIR
1388GNULIB_ALPHASORT
1389GNULIB_SCANDIR
1390GNULIB_FDOPENDIR
1391GNULIB_DIRFD
1392GNULIB_CLOSEDIR
1393GNULIB_REWINDDIR
1394GNULIB_READDIR
1395GNULIB_OPENDIR
6a29c58e 1396pkglibexecdir
4a626d0a 1397runstatedir
6a29c58e 1398lispdir
e26b6bb0
TT
1399UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1400UNISTD_H_HAVE_WINSOCK2_H
1401REPLACE_WRITE
1402REPLACE_USLEEP
1403REPLACE_UNLINKAT
1404REPLACE_UNLINK
1405REPLACE_TTYNAME_R
4a626d0a 1406REPLACE_SYMLINKAT
e26b6bb0
TT
1407REPLACE_SYMLINK
1408REPLACE_SLEEP
1409REPLACE_RMDIR
4a626d0a 1410REPLACE_READLINKAT
e26b6bb0
TT
1411REPLACE_READLINK
1412REPLACE_READ
1413REPLACE_PWRITE
1414REPLACE_PREAD
1415REPLACE_LSEEK
1416REPLACE_LINKAT
1417REPLACE_LINK
1418REPLACE_LCHOWN
1419REPLACE_ISATTY
1420REPLACE_GETPAGESIZE
1421REPLACE_GETGROUPS
1422REPLACE_GETLOGIN_R
4a626d0a 1423REPLACE_GETDTABLESIZE
e26b6bb0
TT
1424REPLACE_GETDOMAINNAME
1425REPLACE_GETCWD
1426REPLACE_FTRUNCATE
1427REPLACE_FCHOWNAT
1428REPLACE_DUP2
1429REPLACE_DUP
1430REPLACE_CLOSE
1431REPLACE_CHOWN
1432HAVE_SYS_PARAM_H
1433HAVE_OS_H
1434HAVE_DECL_TTYNAME_R
1435HAVE_DECL_SETHOSTNAME
1436HAVE_DECL_GETUSERSHELL
1437HAVE_DECL_GETPAGESIZE
1438HAVE_DECL_GETLOGIN_R
1439HAVE_DECL_GETDOMAINNAME
1440HAVE_DECL_FDATASYNC
1441HAVE_DECL_FCHDIR
1442HAVE_DECL_ENVIRON
1443HAVE_USLEEP
1444HAVE_UNLINKAT
1445HAVE_SYMLINKAT
1446HAVE_SYMLINK
1447HAVE_SLEEP
1448HAVE_SETHOSTNAME
1449HAVE_READLINKAT
1450HAVE_READLINK
1451HAVE_PWRITE
1452HAVE_PREAD
1453HAVE_PIPE2
1454HAVE_PIPE
1455HAVE_LINKAT
1456HAVE_LINK
1457HAVE_LCHOWN
1458HAVE_GROUP_MEMBER
1459HAVE_GETPAGESIZE
1460HAVE_GETLOGIN
1461HAVE_GETHOSTNAME
1462HAVE_GETGROUPS
1463HAVE_GETDTABLESIZE
1464HAVE_FTRUNCATE
1465HAVE_FSYNC
1466HAVE_FDATASYNC
1467HAVE_FCHOWNAT
1468HAVE_FCHDIR
1469HAVE_FACCESSAT
1470HAVE_EUIDACCESS
1471HAVE_DUP3
1472HAVE_DUP2
1473HAVE_CHOWN
1474GNULIB_WRITE
1475GNULIB_USLEEP
1476GNULIB_UNLINKAT
1477GNULIB_UNLINK
1478GNULIB_UNISTD_H_SIGPIPE
1479GNULIB_UNISTD_H_NONBLOCKING
1480GNULIB_TTYNAME_R
1481GNULIB_SYMLINKAT
1482GNULIB_SYMLINK
1483GNULIB_SLEEP
1484GNULIB_SETHOSTNAME
1485GNULIB_RMDIR
1486GNULIB_READLINKAT
1487GNULIB_READLINK
1488GNULIB_READ
1489GNULIB_PWRITE
1490GNULIB_PREAD
1491GNULIB_PIPE2
1492GNULIB_PIPE
1493GNULIB_LSEEK
1494GNULIB_LINKAT
1495GNULIB_LINK
1496GNULIB_LCHOWN
1497GNULIB_ISATTY
1498GNULIB_GROUP_MEMBER
1499GNULIB_GETUSERSHELL
1500GNULIB_GETPAGESIZE
1501GNULIB_GETLOGIN_R
1502GNULIB_GETLOGIN
1503GNULIB_GETHOSTNAME
1504GNULIB_GETGROUPS
1505GNULIB_GETDTABLESIZE
1506GNULIB_GETDOMAINNAME
1507GNULIB_GETCWD
1508GNULIB_FTRUNCATE
1509GNULIB_FSYNC
1510GNULIB_FDATASYNC
1511GNULIB_FCHOWNAT
1512GNULIB_FCHDIR
1513GNULIB_FACCESSAT
1514GNULIB_EUIDACCESS
1515GNULIB_ENVIRON
1516GNULIB_DUP3
1517GNULIB_DUP2
1518GNULIB_DUP
1519GNULIB_CLOSE
1520GNULIB_CHOWN
1521GNULIB_CHDIR
98399780
YQ
1522REPLACE_WCTOMB
1523REPLACE_UNSETENV
1524REPLACE_STRTOD
1525REPLACE_SETENV
1526REPLACE_REALPATH
1527REPLACE_REALLOC
1528REPLACE_RANDOM_R
4a626d0a 1529REPLACE_QSORT_R
98399780
YQ
1530REPLACE_PUTENV
1531REPLACE_PTSNAME_R
1532REPLACE_PTSNAME
1533REPLACE_MKSTEMP
1534REPLACE_MBTOWC
1535REPLACE_MALLOC
1536REPLACE_CANONICALIZE_FILE_NAME
1537REPLACE_CALLOC
1538HAVE_DECL_UNSETENV
1539HAVE_UNLOCKPT
1540HAVE_SYS_LOADAVG_H
1541HAVE_STRUCT_RANDOM_DATA
1542HAVE_STRTOULL
1543HAVE_STRTOLL
1544HAVE_STRTOD
1545HAVE_DECL_SETENV
1546HAVE_SETENV
4a626d0a 1547HAVE_SECURE_GETENV
98399780
YQ
1548HAVE_RPMATCH
1549HAVE_REALPATH
1550HAVE_RANDOM_R
1551HAVE_RANDOM_H
1552HAVE_RANDOM
4c62b19f 1553HAVE_QSORT_R
98399780
YQ
1554HAVE_PTSNAME_R
1555HAVE_PTSNAME
1556HAVE_POSIX_OPENPT
1557HAVE_MKSTEMPS
1558HAVE_MKSTEMP
1559HAVE_MKOSTEMPS
1560HAVE_MKOSTEMP
1561HAVE_MKDTEMP
1562HAVE_GRANTPT
1563HAVE_GETSUBOPT
1564HAVE_DECL_GETLOADAVG
1565HAVE_CANONICALIZE_FILE_NAME
1566HAVE_ATOLL
1567HAVE__EXIT
1568GNULIB_WCTOMB
1569GNULIB_UNSETENV
1570GNULIB_UNLOCKPT
1571GNULIB_SYSTEM_POSIX
1572GNULIB_STRTOULL
1573GNULIB_STRTOLL
1574GNULIB_STRTOD
1575GNULIB_SETENV
4a626d0a 1576GNULIB_SECURE_GETENV
98399780
YQ
1577GNULIB_RPMATCH
1578GNULIB_REALPATH
1579GNULIB_REALLOC_POSIX
1580GNULIB_RANDOM_R
1581GNULIB_RANDOM
4a626d0a 1582GNULIB_QSORT_R
98399780
YQ
1583GNULIB_PUTENV
1584GNULIB_PTSNAME_R
1585GNULIB_PTSNAME
1586GNULIB_POSIX_OPENPT
1587GNULIB_MKSTEMPS
1588GNULIB_MKSTEMP
1589GNULIB_MKOSTEMPS
1590GNULIB_MKOSTEMP
1591GNULIB_MKDTEMP
1592GNULIB_MBTOWC
1593GNULIB_MALLOC_POSIX
1594GNULIB_GRANTPT
1595GNULIB_GETSUBOPT
1596GNULIB_GETLOADAVG
1597GNULIB_CANONICALIZE_FILE_NAME
1598GNULIB_CALLOC_POSIX
1599GNULIB_ATOLL
1600GNULIB__EXIT
8690e634
JK
1601GL_GENERATE_ALLOCA_H_FALSE
1602GL_GENERATE_ALLOCA_H_TRUE
1603ALLOCA_H
1604ALLOCA
c971b7fa
PA
1605GL_COND_LIBTOOL_FALSE
1606GL_COND_LIBTOOL_TRUE
1607target_os
1608target_vendor
1609target_cpu
1610target
c971b7fa
PA
1611host_os
1612host_vendor
1613host_cpu
1614host
1615build_os
1616build_vendor
1617build_cpu
1618build
4a626d0a
PA
1619RANLIB
1620ARFLAGS
1621AR
1622EGREP
1623GREP
1624CPP
c971b7fa
PA
1625OBJEXT
1626EXEEXT
1627ac_ct_CC
1628CPPFLAGS
1629LDFLAGS
1630CFLAGS
1631CC
1632MAINT
1633MAINTAINER_MODE_FALSE
1634MAINTAINER_MODE_TRUE
1635target_alias
1636host_alias
1637build_alias
1638LIBS
1639ECHO_T
1640ECHO_N
1641ECHO_C
1642DEFS
1643mandir
1644localedir
1645libdir
1646psdir
1647pdfdir
1648dvidir
1649htmldir
1650infodir
1651docdir
1652oldincludedir
1653includedir
1654localstatedir
1655sharedstatedir
1656sysconfdir
1657datadir
1658datarootdir
1659libexecdir
1660sbindir
1661bindir
1662program_transform_name
1663prefix
1664exec_prefix
1665PACKAGE_URL
1666PACKAGE_BUGREPORT
1667PACKAGE_STRING
1668PACKAGE_VERSION
1669PACKAGE_TARNAME
1670PACKAGE_NAME
1671PATH_SEPARATOR
1672SHELL'
1673ac_subst_files=''
1674ac_user_opts='
1675enable_option_checking
1676enable_maintainer_mode
2196f55f 1677enable_largefile
c971b7fa
PA
1678enable_dependency_tracking
1679'
1680 ac_precious_vars='build_alias
1681host_alias
1682target_alias
1683CC
1684CFLAGS
1685LDFLAGS
1686LIBS
1687CPPFLAGS
1688CPP'
1689
1690
1691# Initialize some variables set by options.
1692ac_init_help=
1693ac_init_version=false
1694ac_unrecognized_opts=
1695ac_unrecognized_sep=
1696# The variables have the same names as the options, with
1697# dashes changed to underlines.
1698cache_file=/dev/null
1699exec_prefix=NONE
1700no_create=
1701no_recursion=
1702prefix=NONE
1703program_prefix=NONE
1704program_suffix=NONE
1705program_transform_name=s,x,x,
1706silent=
1707site=
1708srcdir=
1709verbose=
1710x_includes=NONE
1711x_libraries=NONE
1712
1713# Installation directory options.
1714# These are left unexpanded so users can "make install exec_prefix=/foo"
1715# and all the variables that are supposed to be based on exec_prefix
1716# by default will actually change.
1717# Use braces instead of parens because sh, perl, etc. also accept them.
1718# (The list follows the same order as the GNU Coding Standards.)
1719bindir='${exec_prefix}/bin'
1720sbindir='${exec_prefix}/sbin'
1721libexecdir='${exec_prefix}/libexec'
1722datarootdir='${prefix}/share'
1723datadir='${datarootdir}'
1724sysconfdir='${prefix}/etc'
1725sharedstatedir='${prefix}/com'
1726localstatedir='${prefix}/var'
1727includedir='${prefix}/include'
1728oldincludedir='/usr/include'
1729docdir='${datarootdir}/doc/${PACKAGE}'
1730infodir='${datarootdir}/info'
1731htmldir='${docdir}'
1732dvidir='${docdir}'
1733pdfdir='${docdir}'
1734psdir='${docdir}'
1735libdir='${exec_prefix}/lib'
1736localedir='${datarootdir}/locale'
1737mandir='${datarootdir}/man'
1738
1739ac_prev=
1740ac_dashdash=
1741for ac_option
1742do
1743 # If the previous option needs an argument, assign it.
1744 if test -n "$ac_prev"; then
1745 eval $ac_prev=\$ac_option
1746 ac_prev=
1747 continue
1748 fi
1749
1750 case $ac_option in
1751 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1752 *) ac_optarg=yes ;;
1753 esac
1754
1755 # Accept the important Cygnus configure options, so we can diagnose typos.
1756
1757 case $ac_dashdash$ac_option in
1758 --)
1759 ac_dashdash=yes ;;
1760
1761 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1762 ac_prev=bindir ;;
1763 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1764 bindir=$ac_optarg ;;
1765
1766 -build | --build | --buil | --bui | --bu)
1767 ac_prev=build_alias ;;
1768 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1769 build_alias=$ac_optarg ;;
1770
1771 -cache-file | --cache-file | --cache-fil | --cache-fi \
1772 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1773 ac_prev=cache_file ;;
1774 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1775 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1776 cache_file=$ac_optarg ;;
1777
1778 --config-cache | -C)
1779 cache_file=config.cache ;;
1780
1781 -datadir | --datadir | --datadi | --datad)
1782 ac_prev=datadir ;;
1783 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1784 datadir=$ac_optarg ;;
1785
1786 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1787 | --dataroo | --dataro | --datar)
1788 ac_prev=datarootdir ;;
1789 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1790 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1791 datarootdir=$ac_optarg ;;
1792
1793 -disable-* | --disable-*)
1794 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1795 # Reject names that are not valid shell variable names.
1796 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1797 as_fn_error "invalid feature name: $ac_useropt"
1798 ac_useropt_orig=$ac_useropt
1799 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1800 case $ac_user_opts in
1801 *"
1802"enable_$ac_useropt"
1803"*) ;;
1804 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1805 ac_unrecognized_sep=', ';;
1806 esac
1807 eval enable_$ac_useropt=no ;;
1808
1809 -docdir | --docdir | --docdi | --doc | --do)
1810 ac_prev=docdir ;;
1811 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1812 docdir=$ac_optarg ;;
1813
1814 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1815 ac_prev=dvidir ;;
1816 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1817 dvidir=$ac_optarg ;;
1818
1819 -enable-* | --enable-*)
1820 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1821 # Reject names that are not valid shell variable names.
1822 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1823 as_fn_error "invalid feature name: $ac_useropt"
1824 ac_useropt_orig=$ac_useropt
1825 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1826 case $ac_user_opts in
1827 *"
1828"enable_$ac_useropt"
1829"*) ;;
1830 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1831 ac_unrecognized_sep=', ';;
1832 esac
1833 eval enable_$ac_useropt=\$ac_optarg ;;
1834
1835 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1836 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1837 | --exec | --exe | --ex)
1838 ac_prev=exec_prefix ;;
1839 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1840 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1841 | --exec=* | --exe=* | --ex=*)
1842 exec_prefix=$ac_optarg ;;
1843
1844 -gas | --gas | --ga | --g)
1845 # Obsolete; use --with-gas.
1846 with_gas=yes ;;
1847
1848 -help | --help | --hel | --he | -h)
1849 ac_init_help=long ;;
1850 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1851 ac_init_help=recursive ;;
1852 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1853 ac_init_help=short ;;
1854
1855 -host | --host | --hos | --ho)
1856 ac_prev=host_alias ;;
1857 -host=* | --host=* | --hos=* | --ho=*)
1858 host_alias=$ac_optarg ;;
1859
1860 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1861 ac_prev=htmldir ;;
1862 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1863 | --ht=*)
1864 htmldir=$ac_optarg ;;
1865
1866 -includedir | --includedir | --includedi | --included | --include \
1867 | --includ | --inclu | --incl | --inc)
1868 ac_prev=includedir ;;
1869 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1870 | --includ=* | --inclu=* | --incl=* | --inc=*)
1871 includedir=$ac_optarg ;;
1872
1873 -infodir | --infodir | --infodi | --infod | --info | --inf)
1874 ac_prev=infodir ;;
1875 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1876 infodir=$ac_optarg ;;
1877
1878 -libdir | --libdir | --libdi | --libd)
1879 ac_prev=libdir ;;
1880 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1881 libdir=$ac_optarg ;;
1882
1883 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1884 | --libexe | --libex | --libe)
1885 ac_prev=libexecdir ;;
1886 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1887 | --libexe=* | --libex=* | --libe=*)
1888 libexecdir=$ac_optarg ;;
1889
1890 -localedir | --localedir | --localedi | --localed | --locale)
1891 ac_prev=localedir ;;
1892 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1893 localedir=$ac_optarg ;;
1894
1895 -localstatedir | --localstatedir | --localstatedi | --localstated \
1896 | --localstate | --localstat | --localsta | --localst | --locals)
1897 ac_prev=localstatedir ;;
1898 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1899 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1900 localstatedir=$ac_optarg ;;
1901
1902 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1903 ac_prev=mandir ;;
1904 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1905 mandir=$ac_optarg ;;
1906
1907 -nfp | --nfp | --nf)
1908 # Obsolete; use --without-fp.
1909 with_fp=no ;;
1910
1911 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1912 | --no-cr | --no-c | -n)
1913 no_create=yes ;;
1914
1915 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1916 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1917 no_recursion=yes ;;
1918
1919 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1920 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1921 | --oldin | --oldi | --old | --ol | --o)
1922 ac_prev=oldincludedir ;;
1923 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1924 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1925 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1926 oldincludedir=$ac_optarg ;;
1927
1928 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1929 ac_prev=prefix ;;
1930 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1931 prefix=$ac_optarg ;;
1932
1933 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1934 | --program-pre | --program-pr | --program-p)
1935 ac_prev=program_prefix ;;
1936 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1937 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1938 program_prefix=$ac_optarg ;;
1939
1940 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1941 | --program-suf | --program-su | --program-s)
1942 ac_prev=program_suffix ;;
1943 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1944 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1945 program_suffix=$ac_optarg ;;
1946
1947 -program-transform-name | --program-transform-name \
1948 | --program-transform-nam | --program-transform-na \
1949 | --program-transform-n | --program-transform- \
1950 | --program-transform | --program-transfor \
1951 | --program-transfo | --program-transf \
1952 | --program-trans | --program-tran \
1953 | --progr-tra | --program-tr | --program-t)
1954 ac_prev=program_transform_name ;;
1955 -program-transform-name=* | --program-transform-name=* \
1956 | --program-transform-nam=* | --program-transform-na=* \
1957 | --program-transform-n=* | --program-transform-=* \
1958 | --program-transform=* | --program-transfor=* \
1959 | --program-transfo=* | --program-transf=* \
1960 | --program-trans=* | --program-tran=* \
1961 | --progr-tra=* | --program-tr=* | --program-t=*)
1962 program_transform_name=$ac_optarg ;;
1963
1964 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1965 ac_prev=pdfdir ;;
1966 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1967 pdfdir=$ac_optarg ;;
1968
1969 -psdir | --psdir | --psdi | --psd | --ps)
1970 ac_prev=psdir ;;
1971 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1972 psdir=$ac_optarg ;;
1973
1974 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1975 | -silent | --silent | --silen | --sile | --sil)
1976 silent=yes ;;
1977
1978 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1979 ac_prev=sbindir ;;
1980 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1981 | --sbi=* | --sb=*)
1982 sbindir=$ac_optarg ;;
1983
1984 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1985 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1986 | --sharedst | --shareds | --shared | --share | --shar \
1987 | --sha | --sh)
1988 ac_prev=sharedstatedir ;;
1989 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1990 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1991 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1992 | --sha=* | --sh=*)
1993 sharedstatedir=$ac_optarg ;;
1994
1995 -site | --site | --sit)
1996 ac_prev=site ;;
1997 -site=* | --site=* | --sit=*)
1998 site=$ac_optarg ;;
1999
2000 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2001 ac_prev=srcdir ;;
2002 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2003 srcdir=$ac_optarg ;;
2004
2005 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2006 | --syscon | --sysco | --sysc | --sys | --sy)
2007 ac_prev=sysconfdir ;;
2008 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2009 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2010 sysconfdir=$ac_optarg ;;
2011
2012 -target | --target | --targe | --targ | --tar | --ta | --t)
2013 ac_prev=target_alias ;;
2014 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2015 target_alias=$ac_optarg ;;
2016
2017 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2018 verbose=yes ;;
2019
2020 -version | --version | --versio | --versi | --vers | -V)
2021 ac_init_version=: ;;
2022
2023 -with-* | --with-*)
2024 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2025 # Reject names that are not valid shell variable names.
2026 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2027 as_fn_error "invalid package name: $ac_useropt"
2028 ac_useropt_orig=$ac_useropt
2029 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2030 case $ac_user_opts in
2031 *"
2032"with_$ac_useropt"
2033"*) ;;
2034 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2035 ac_unrecognized_sep=', ';;
2036 esac
2037 eval with_$ac_useropt=\$ac_optarg ;;
2038
2039 -without-* | --without-*)
2040 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2041 # Reject names that are not valid shell variable names.
2042 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2043 as_fn_error "invalid package name: $ac_useropt"
2044 ac_useropt_orig=$ac_useropt
2045 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2046 case $ac_user_opts in
2047 *"
2048"with_$ac_useropt"
2049"*) ;;
2050 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2051 ac_unrecognized_sep=', ';;
2052 esac
2053 eval with_$ac_useropt=no ;;
2054
2055 --x)
2056 # Obsolete; use --with-x.
2057 with_x=yes ;;
2058
2059 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2060 | --x-incl | --x-inc | --x-in | --x-i)
2061 ac_prev=x_includes ;;
2062 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2063 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2064 x_includes=$ac_optarg ;;
2065
2066 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2067 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2068 ac_prev=x_libraries ;;
2069 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2070 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2071 x_libraries=$ac_optarg ;;
2072
2073 -*) as_fn_error "unrecognized option: \`$ac_option'
2074Try \`$0 --help' for more information."
2075 ;;
2076
2077 *=*)
2078 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2079 # Reject names that are not valid shell variable names.
2080 case $ac_envvar in #(
2081 '' | [0-9]* | *[!_$as_cr_alnum]* )
2082 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
2083 esac
2084 eval $ac_envvar=\$ac_optarg
2085 export $ac_envvar ;;
2086
2087 *)
2088 # FIXME: should be removed in autoconf 3.0.
2089 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2090 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2091 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2092 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
2093 ;;
2094
2095 esac
2096done
2097
2098if test -n "$ac_prev"; then
2099 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2100 as_fn_error "missing argument to $ac_option"
2101fi
2102
2103if test -n "$ac_unrecognized_opts"; then
2104 case $enable_option_checking in
2105 no) ;;
2106 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
2107 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2108 esac
2109fi
2110
2111# Check all directory arguments for consistency.
2112for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2113 datadir sysconfdir sharedstatedir localstatedir includedir \
2114 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2115 libdir localedir mandir
2116do
2117 eval ac_val=\$$ac_var
2118 # Remove trailing slashes.
2119 case $ac_val in
2120 */ )
2121 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2122 eval $ac_var=\$ac_val;;
2123 esac
2124 # Be sure to have absolute directory names.
2125 case $ac_val in
2126 [\\/$]* | ?:[\\/]* ) continue;;
2127 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2128 esac
2129 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
2130done
2131
2132# There might be people who depend on the old broken behavior: `$host'
2133# used to hold the argument of --host etc.
2134# FIXME: To remove some day.
2135build=$build_alias
2136host=$host_alias
2137target=$target_alias
2138
2139# FIXME: To remove some day.
2140if test "x$host_alias" != x; then
2141 if test "x$build_alias" = x; then
2142 cross_compiling=maybe
2143 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2144 If a cross compiler is detected then cross compile mode will be used." >&2
2145 elif test "x$build_alias" != "x$host_alias"; then
2146 cross_compiling=yes
2147 fi
2148fi
2149
2150ac_tool_prefix=
2151test -n "$host_alias" && ac_tool_prefix=$host_alias-
2152
2153test "$silent" = yes && exec 6>/dev/null
2154
2155
2156ac_pwd=`pwd` && test -n "$ac_pwd" &&
2157ac_ls_di=`ls -di .` &&
2158ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2159 as_fn_error "working directory cannot be determined"
2160test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2161 as_fn_error "pwd does not report name of working directory"
2162
2163
2164# Find the source files, if location was not specified.
2165if test -z "$srcdir"; then
2166 ac_srcdir_defaulted=yes
2167 # Try the directory containing this script, then the parent directory.
2168 ac_confdir=`$as_dirname -- "$as_myself" ||
2169$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2170 X"$as_myself" : 'X\(//\)[^/]' \| \
2171 X"$as_myself" : 'X\(//\)$' \| \
2172 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2173$as_echo X"$as_myself" |
2174 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2175 s//\1/
2176 q
2177 }
2178 /^X\(\/\/\)[^/].*/{
2179 s//\1/
2180 q
2181 }
2182 /^X\(\/\/\)$/{
2183 s//\1/
2184 q
2185 }
2186 /^X\(\/\).*/{
2187 s//\1/
2188 q
2189 }
2190 s/.*/./; q'`
2191 srcdir=$ac_confdir
2192 if test ! -r "$srcdir/$ac_unique_file"; then
2193 srcdir=..
2194 fi
2195else
2196 ac_srcdir_defaulted=no
2197fi
2198if test ! -r "$srcdir/$ac_unique_file"; then
2199 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2200 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
2201fi
2202ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2203ac_abs_confdir=`(
2204 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
2205 pwd)`
2206# When building in place, set srcdir=.
2207if test "$ac_abs_confdir" = "$ac_pwd"; then
2208 srcdir=.
2209fi
2210# Remove unnecessary trailing slashes from srcdir.
2211# Double slashes in file names in object file debugging info
2212# mess up M-x gdb in Emacs.
2213case $srcdir in
2214*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2215esac
2216for ac_var in $ac_precious_vars; do
2217 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2218 eval ac_env_${ac_var}_value=\$${ac_var}
2219 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2220 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2221done
2222
2223#
2224# Report the --help message.
2225#
2226if test "$ac_init_help" = "long"; then
2227 # Omit some internal or obsolete options to make the list less imposing.
2228 # This message is too long to be a string in the A/UX 3.1 sh.
2229 cat <<_ACEOF
2230\`configure' configures this package to adapt to many kinds of systems.
2231
2232Usage: $0 [OPTION]... [VAR=VALUE]...
2233
2234To assign environment variables (e.g., CC, CFLAGS...), specify them as
2235VAR=VALUE. See below for descriptions of some of the useful variables.
2236
2237Defaults for the options are specified in brackets.
2238
2239Configuration:
2240 -h, --help display this help and exit
2241 --help=short display options specific to this package
2242 --help=recursive display the short help of all the included packages
2243 -V, --version display version information and exit
2244 -q, --quiet, --silent do not print \`checking...' messages
2245 --cache-file=FILE cache test results in FILE [disabled]
2246 -C, --config-cache alias for \`--cache-file=config.cache'
2247 -n, --no-create do not create output files
2248 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2249
2250Installation directories:
2251 --prefix=PREFIX install architecture-independent files in PREFIX
2252 [$ac_default_prefix]
2253 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2254 [PREFIX]
2255
2256By default, \`make install' will install all the files in
2257\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2258an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2259for instance \`--prefix=\$HOME'.
2260
2261For better control, use the options below.
2262
2263Fine tuning of the installation directories:
2264 --bindir=DIR user executables [EPREFIX/bin]
2265 --sbindir=DIR system admin executables [EPREFIX/sbin]
2266 --libexecdir=DIR program executables [EPREFIX/libexec]
2267 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2268 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2269 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2270 --libdir=DIR object code libraries [EPREFIX/lib]
2271 --includedir=DIR C header files [PREFIX/include]
2272 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2273 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2274 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2275 --infodir=DIR info documentation [DATAROOTDIR/info]
2276 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2277 --mandir=DIR man documentation [DATAROOTDIR/man]
2278 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
2279 --htmldir=DIR html documentation [DOCDIR]
2280 --dvidir=DIR dvi documentation [DOCDIR]
2281 --pdfdir=DIR pdf documentation [DOCDIR]
2282 --psdir=DIR ps documentation [DOCDIR]
2283_ACEOF
2284
2285 cat <<\_ACEOF
2286
2287Program names:
2288 --program-prefix=PREFIX prepend PREFIX to installed program names
2289 --program-suffix=SUFFIX append SUFFIX to installed program names
2290 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2291
2292System types:
2293 --build=BUILD configure for building on BUILD [guessed]
2294 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2295 --target=TARGET configure for building compilers for TARGET [HOST]
2296_ACEOF
2297fi
2298
2299if test -n "$ac_init_help"; then
2300
2301 cat <<\_ACEOF
2302
2303Optional Features:
2304 --disable-option-checking ignore unrecognized --enable/--with options
2305 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2306 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2307 --enable-maintainer-mode enable make rules and dependencies not useful
2308 (and sometimes confusing) to the casual installer
2196f55f 2309 --disable-largefile omit support for large files
c971b7fa
PA
2310 --disable-dependency-tracking speeds up one-time build
2311 --enable-dependency-tracking do not reject slow dependency extractors
2312
2313Some influential environment variables:
2314 CC C compiler command
2315 CFLAGS C compiler flags
2316 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2317 nonstandard directory <lib dir>
2318 LIBS libraries to pass to the linker, e.g. -l<library>
2319 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
2320 you have headers in a nonstandard directory <include dir>
2321 CPP C preprocessor
2322
2323Use these variables to override the choices made by `configure' or to help
2324it to find libraries and programs with nonstandard names/locations.
2325
2326Report bugs to the package provider.
2327_ACEOF
2328ac_status=$?
2329fi
2330
2331if test "$ac_init_help" = "recursive"; then
2332 # If there are subdirs, report their specific --help.
2333 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2334 test -d "$ac_dir" ||
2335 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2336 continue
2337 ac_builddir=.
2338
2339case "$ac_dir" in
2340.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2341*)
2342 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2343 # A ".." for each directory in $ac_dir_suffix.
2344 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2345 case $ac_top_builddir_sub in
2346 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2348 esac ;;
2349esac
2350ac_abs_top_builddir=$ac_pwd
2351ac_abs_builddir=$ac_pwd$ac_dir_suffix
2352# for backward compatibility:
2353ac_top_builddir=$ac_top_build_prefix
2354
2355case $srcdir in
2356 .) # We are building in place.
2357 ac_srcdir=.
2358 ac_top_srcdir=$ac_top_builddir_sub
2359 ac_abs_top_srcdir=$ac_pwd ;;
2360 [\\/]* | ?:[\\/]* ) # Absolute name.
2361 ac_srcdir=$srcdir$ac_dir_suffix;
2362 ac_top_srcdir=$srcdir
2363 ac_abs_top_srcdir=$srcdir ;;
2364 *) # Relative name.
2365 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2366 ac_top_srcdir=$ac_top_build_prefix$srcdir
2367 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2368esac
2369ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2370
2371 cd "$ac_dir" || { ac_status=$?; continue; }
2372 # Check for guested configure.
2373 if test -f "$ac_srcdir/configure.gnu"; then
2374 echo &&
2375 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2376 elif test -f "$ac_srcdir/configure"; then
2377 echo &&
2378 $SHELL "$ac_srcdir/configure" --help=recursive
2379 else
2380 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2381 fi || ac_status=$?
2382 cd "$ac_pwd" || { ac_status=$?; break; }
2383 done
2384fi
2385
2386test -n "$ac_init_help" && exit $ac_status
2387if $ac_init_version; then
2388 cat <<\_ACEOF
2389configure
2390generated by GNU Autoconf 2.64
2391
2392Copyright (C) 2009 Free Software Foundation, Inc.
2393This configure script is free software; the Free Software Foundation
2394gives unlimited permission to copy, distribute and modify it.
2395_ACEOF
2396 exit
2397fi
2398
2399## ------------------------ ##
2400## Autoconf initialization. ##
2401## ------------------------ ##
2402
2403# ac_fn_c_try_compile LINENO
2404# --------------------------
2405# Try to compile conftest.$ac_ext, and return whether this succeeded.
2406ac_fn_c_try_compile ()
2407{
2408 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2409 rm -f conftest.$ac_objext
2410 if { { ac_try="$ac_compile"
2411case "(($ac_try" in
2412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2413 *) ac_try_echo=$ac_try;;
2414esac
2415eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2416$as_echo "$ac_try_echo"; } >&5
2417 (eval "$ac_compile") 2>conftest.err
2418 ac_status=$?
2419 if test -s conftest.err; then
2420 grep -v '^ *+' conftest.err >conftest.er1
2421 cat conftest.er1 >&5
2422 mv -f conftest.er1 conftest.err
2423 fi
2424 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2425 test $ac_status = 0; } && {
2426 test -z "$ac_c_werror_flag" ||
2427 test ! -s conftest.err
2428 } && test -s conftest.$ac_objext; then :
2429 ac_retval=0
2430else
2431 $as_echo "$as_me: failed program was:" >&5
2432sed 's/^/| /' conftest.$ac_ext >&5
2433
2434 ac_retval=1
2435fi
2436 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2437 return $ac_retval
2438
2439} # ac_fn_c_try_compile
2440
2441# ac_fn_c_try_cpp LINENO
2442# ----------------------
2443# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2444ac_fn_c_try_cpp ()
2445{
2446 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447 if { { ac_try="$ac_cpp conftest.$ac_ext"
2448case "(($ac_try" in
2449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450 *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2455 ac_status=$?
2456 if test -s conftest.err; then
2457 grep -v '^ *+' conftest.err >conftest.er1
2458 cat conftest.er1 >&5
2459 mv -f conftest.er1 conftest.err
2460 fi
2461 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462 test $ac_status = 0; } >/dev/null && {
2463 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2464 test ! -s conftest.err
2465 }; then :
2466 ac_retval=0
2467else
2468 $as_echo "$as_me: failed program was:" >&5
2469sed 's/^/| /' conftest.$ac_ext >&5
2470
2471 ac_retval=1
2472fi
2473 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2474 return $ac_retval
2475
2476} # ac_fn_c_try_cpp
2477
2478# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2479# -------------------------------------------------------
2480# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2481# the include files in INCLUDES and setting the cache variable VAR
2482# accordingly.
2483ac_fn_c_check_header_mongrel ()
2484{
2485 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2486 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2488$as_echo_n "checking for $2... " >&6; }
2489if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2490 $as_echo_n "(cached) " >&6
2491fi
2492eval ac_res=\$$3
2493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2494$as_echo "$ac_res" >&6; }
2495else
2496 # Is the header compilable?
2497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2498$as_echo_n "checking $2 usability... " >&6; }
2499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500/* end confdefs.h. */
2501$4
2502#include <$2>
2503_ACEOF
2504if ac_fn_c_try_compile "$LINENO"; then :
2505 ac_header_compiler=yes
2506else
2507 ac_header_compiler=no
2508fi
2509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2511$as_echo "$ac_header_compiler" >&6; }
2512
2513# Is the header present?
2514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2515$as_echo_n "checking $2 presence... " >&6; }
2516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2517/* end confdefs.h. */
2518#include <$2>
2519_ACEOF
2520if ac_fn_c_try_cpp "$LINENO"; then :
2521 ac_header_preproc=yes
2522else
2523 ac_header_preproc=no
2524fi
2525rm -f conftest.err conftest.$ac_ext
2526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2527$as_echo "$ac_header_preproc" >&6; }
2528
2529# So? What about this header?
2530case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2531 yes:no: )
2532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2533$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2535$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2536 ;;
2537 no:yes:* )
2538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2539$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2541$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2543$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2545$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2547$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2548 ;;
2549esac
2550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2551$as_echo_n "checking for $2... " >&6; }
2552if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2553 $as_echo_n "(cached) " >&6
2554else
2555 eval "$3=\$ac_header_compiler"
2556fi
2557eval ac_res=\$$3
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2559$as_echo "$ac_res" >&6; }
2560fi
2561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2562
2563} # ac_fn_c_check_header_mongrel
2564
2565# ac_fn_c_try_run LINENO
2566# ----------------------
2567# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2568# that executables *can* be run.
2569ac_fn_c_try_run ()
2570{
2571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2572 if { { ac_try="$ac_link"
2573case "(($ac_try" in
2574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2575 *) ac_try_echo=$ac_try;;
2576esac
2577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2578$as_echo "$ac_try_echo"; } >&5
2579 (eval "$ac_link") 2>&5
2580 ac_status=$?
2581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2582 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2583 { { case "(($ac_try" in
2584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2585 *) ac_try_echo=$ac_try;;
2586esac
2587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2588$as_echo "$ac_try_echo"; } >&5
2589 (eval "$ac_try") 2>&5
2590 ac_status=$?
2591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2592 test $ac_status = 0; }; }; then :
2593 ac_retval=0
2594else
2595 $as_echo "$as_me: program exited with status $ac_status" >&5
2596 $as_echo "$as_me: failed program was:" >&5
2597sed 's/^/| /' conftest.$ac_ext >&5
2598
2599 ac_retval=$ac_status
2600fi
2601 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2602 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2603 return $ac_retval
2604
2605} # ac_fn_c_try_run
2606
2607# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2608# -------------------------------------------------------
2609# Tests whether HEADER exists and can be compiled using the include files in
2610# INCLUDES, setting the cache variable VAR accordingly.
2611ac_fn_c_check_header_compile ()
2612{
2613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2617 $as_echo_n "(cached) " >&6
2618else
2619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620/* end confdefs.h. */
2621$4
2622#include <$2>
2623_ACEOF
2624if ac_fn_c_try_compile "$LINENO"; then :
2625 eval "$3=yes"
2626else
2627 eval "$3=no"
2628fi
2629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630fi
2631eval ac_res=\$$3
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2633$as_echo "$ac_res" >&6; }
2634 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2635
2636} # ac_fn_c_check_header_compile
2637
2638# ac_fn_c_try_link LINENO
2639# -----------------------
2640# Try to link conftest.$ac_ext, and return whether this succeeded.
2641ac_fn_c_try_link ()
2642{
2643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2644 rm -f conftest.$ac_objext conftest$ac_exeext
2645 if { { ac_try="$ac_link"
2646case "(($ac_try" in
2647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2648 *) ac_try_echo=$ac_try;;
2649esac
2650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2651$as_echo "$ac_try_echo"; } >&5
2652 (eval "$ac_link") 2>conftest.err
2653 ac_status=$?
2654 if test -s conftest.err; then
2655 grep -v '^ *+' conftest.err >conftest.er1
2656 cat conftest.er1 >&5
2657 mv -f conftest.er1 conftest.err
2658 fi
2659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2660 test $ac_status = 0; } && {
2661 test -z "$ac_c_werror_flag" ||
2662 test ! -s conftest.err
2663 } && test -s conftest$ac_exeext && {
2664 test "$cross_compiling" = yes ||
2665 $as_test_x conftest$ac_exeext
2666 }; then :
2667 ac_retval=0
2668else
2669 $as_echo "$as_me: failed program was:" >&5
2670sed 's/^/| /' conftest.$ac_ext >&5
2671
2672 ac_retval=1
2673fi
2674 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2675 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2676 # interfere with the next link command; also delete a directory that is
2677 # left behind by Apple's compiler. We do this before executing the actions.
2678 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2679 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2680 return $ac_retval
2681
2682} # ac_fn_c_try_link
2683
8690e634
JK
2684# ac_fn_c_check_func LINENO FUNC VAR
2685# ----------------------------------
2686# Tests whether FUNC exists, setting the cache variable VAR accordingly
2687ac_fn_c_check_func ()
2688{
2689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2691$as_echo_n "checking for $2... " >&6; }
2692if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2693 $as_echo_n "(cached) " >&6
2694else
2695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2696/* end confdefs.h. */
2697/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2698 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2699#define $2 innocuous_$2
2700
2701/* System header to define __stub macros and hopefully few prototypes,
2702 which can conflict with char $2 (); below.
2703 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2704 <limits.h> exists even on freestanding compilers. */
2705
2706#ifdef __STDC__
2707# include <limits.h>
2708#else
2709# include <assert.h>
2710#endif
2711
2712#undef $2
2713
2714/* Override any GCC internal prototype to avoid an error.
2715 Use char because int might match the return type of a GCC
2716 builtin and then its argument prototype would still apply. */
2717#ifdef __cplusplus
2718extern "C"
2719#endif
2720char $2 ();
2721/* The GNU C library defines this for functions which it implements
2722 to always fail with ENOSYS. Some functions are actually named
2723 something starting with __ and the normal name is an alias. */
2724#if defined __stub_$2 || defined __stub___$2
2725choke me
2726#endif
2727
2728int
2729main ()
2730{
2731return $2 ();
2732 ;
2733 return 0;
2734}
2735_ACEOF
2736if ac_fn_c_try_link "$LINENO"; then :
2737 eval "$3=yes"
2738else
2739 eval "$3=no"
2740fi
2741rm -f core conftest.err conftest.$ac_objext \
2742 conftest$ac_exeext conftest.$ac_ext
2743fi
2744eval ac_res=\$$3
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746$as_echo "$ac_res" >&6; }
2747 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2748
2749} # ac_fn_c_check_func
2750
8986e351
TT
2751# ac_fn_c_check_decl LINENO SYMBOL VAR
2752# ------------------------------------
2753# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2754ac_fn_c_check_decl ()
2755{
2756 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2758$as_echo_n "checking whether $2 is declared... " >&6; }
2759if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2760 $as_echo_n "(cached) " >&6
2761else
2762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2763/* end confdefs.h. */
2764$4
2765int
2766main ()
2767{
2768#ifndef $2
2769 (void) $2;
2770#endif
2771
2772 ;
2773 return 0;
2774}
2775_ACEOF
2776if ac_fn_c_try_compile "$LINENO"; then :
2777 eval "$3=yes"
2778else
2779 eval "$3=no"
2780fi
2781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2782fi
2783eval ac_res=\$$3
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2785$as_echo "$ac_res" >&6; }
2786 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2787
2788} # ac_fn_c_check_decl
2789
c971b7fa
PA
2790# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2791# --------------------------------------------
2792# Tries to find the compile-time value of EXPR in a program that includes
2793# INCLUDES, setting VAR accordingly. Returns whether the value could be
2794# computed
2795ac_fn_c_compute_int ()
2796{
2797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2798 if test "$cross_compiling" = yes; then
2799 # Depending upon the size, compute the lo and hi bounds.
2800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h. */
2802$4
2803int
2804main ()
2805{
2806static int test_array [1 - 2 * !(($2) >= 0)];
2807test_array [0] = 0
2808
2809 ;
2810 return 0;
2811}
2812_ACEOF
2813if ac_fn_c_try_compile "$LINENO"; then :
2814 ac_lo=0 ac_mid=0
2815 while :; do
2816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817/* end confdefs.h. */
2818$4
2819int
2820main ()
2821{
2822static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2823test_array [0] = 0
2824
2825 ;
2826 return 0;
2827}
2828_ACEOF
2829if ac_fn_c_try_compile "$LINENO"; then :
2830 ac_hi=$ac_mid; break
2831else
2832 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2833 if test $ac_lo -le $ac_mid; then
2834 ac_lo= ac_hi=
2835 break
2836 fi
2837 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2838fi
2839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2840 done
2841else
2842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2843/* end confdefs.h. */
2844$4
2845int
2846main ()
2847{
2848static int test_array [1 - 2 * !(($2) < 0)];
2849test_array [0] = 0
2850
2851 ;
2852 return 0;
2853}
2854_ACEOF
2855if ac_fn_c_try_compile "$LINENO"; then :
2856 ac_hi=-1 ac_mid=-1
2857 while :; do
2858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2859/* end confdefs.h. */
2860$4
2861int
2862main ()
2863{
2864static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2865test_array [0] = 0
2866
2867 ;
2868 return 0;
2869}
2870_ACEOF
2871if ac_fn_c_try_compile "$LINENO"; then :
2872 ac_lo=$ac_mid; break
2873else
2874 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2875 if test $ac_mid -le $ac_hi; then
2876 ac_lo= ac_hi=
2877 break
2878 fi
2879 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2880fi
2881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2882 done
2883else
2884 ac_lo= ac_hi=
2885fi
2886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887fi
2888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2889# Binary search between lo and hi bounds.
2890while test "x$ac_lo" != "x$ac_hi"; do
2891 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2893/* end confdefs.h. */
2894$4
2895int
2896main ()
2897{
2898static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2899test_array [0] = 0
2900
2901 ;
2902 return 0;
2903}
2904_ACEOF
2905if ac_fn_c_try_compile "$LINENO"; then :
2906 ac_hi=$ac_mid
2907else
2908 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2909fi
2910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2911done
2912case $ac_lo in #((
2913?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2914'') ac_retval=1 ;;
2915esac
2916 else
2917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2918/* end confdefs.h. */
2919$4
2920static long int longval () { return $2; }
2921static unsigned long int ulongval () { return $2; }
2922#include <stdio.h>
2923#include <stdlib.h>
2924int
2925main ()
2926{
2927
2928 FILE *f = fopen ("conftest.val", "w");
2929 if (! f)
2930 return 1;
2931 if (($2) < 0)
2932 {
2933 long int i = longval ();
2934 if (i != ($2))
2935 return 1;
2936 fprintf (f, "%ld", i);
2937 }
2938 else
2939 {
2940 unsigned long int i = ulongval ();
2941 if (i != ($2))
2942 return 1;
2943 fprintf (f, "%lu", i);
2944 }
2945 /* Do not output a trailing newline, as this causes \r\n confusion
2946 on some platforms. */
2947 return ferror (f) || fclose (f) != 0;
2948
2949 ;
2950 return 0;
2951}
2952_ACEOF
2953if ac_fn_c_try_run "$LINENO"; then :
2954 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2955else
2956 ac_retval=1
2957fi
2958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2959 conftest.$ac_objext conftest.beam conftest.$ac_ext
2960rm -f conftest.val
2961
2962 fi
2963 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2964 return $ac_retval
2965
2966} # ac_fn_c_compute_int
2967
8690e634
JK
2968# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2969# -------------------------------------------
2970# Tests whether TYPE exists after having included INCLUDES, setting cache
2971# variable VAR accordingly.
2972ac_fn_c_check_type ()
c971b7fa
PA
2973{
2974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2976$as_echo_n "checking for $2... " >&6; }
2977if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2978 $as_echo_n "(cached) " >&6
2979else
8690e634 2980 eval "$3=no"
c971b7fa
PA
2981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2982/* end confdefs.h. */
8690e634 2983$4
c971b7fa
PA
2984int
2985main ()
2986{
8690e634
JK
2987if (sizeof ($2))
2988 return 0;
c971b7fa
PA
2989 ;
2990 return 0;
2991}
2992_ACEOF
8690e634 2993if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa
PA
2994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2995/* end confdefs.h. */
2996$4
2997int
2998main ()
2999{
8690e634
JK
3000if (sizeof (($2)))
3001 return 0;
c971b7fa
PA
3002 ;
3003 return 0;
3004}
3005_ACEOF
3006if ac_fn_c_try_compile "$LINENO"; then :
8690e634 3007
c971b7fa 3008else
8690e634
JK
3009 eval "$3=yes"
3010fi
3011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa
PA
3012fi
3013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3014fi
3015eval ac_res=\$$3
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3017$as_echo "$ac_res" >&6; }
3018 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3019
8690e634 3020} # ac_fn_c_check_type
c971b7fa
PA
3021cat >config.log <<_ACEOF
3022This file contains any messages produced by compilers while
3023running configure, to aid debugging if configure makes a mistake.
3024
3025It was created by $as_me, which was
3026generated by GNU Autoconf 2.64. Invocation command line was
3027
3028 $ $0 $@
3029
3030_ACEOF
3031exec 5>>config.log
3032{
3033cat <<_ASUNAME
3034## --------- ##
3035## Platform. ##
3036## --------- ##
3037
3038hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3039uname -m = `(uname -m) 2>/dev/null || echo unknown`
3040uname -r = `(uname -r) 2>/dev/null || echo unknown`
3041uname -s = `(uname -s) 2>/dev/null || echo unknown`
3042uname -v = `(uname -v) 2>/dev/null || echo unknown`
3043
3044/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3045/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3046
3047/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3048/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3049/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3050/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3051/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3052/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3053/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3054
3055_ASUNAME
3056
3057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3058for as_dir in $PATH
3059do
3060 IFS=$as_save_IFS
3061 test -z "$as_dir" && as_dir=.
3062 $as_echo "PATH: $as_dir"
3063 done
3064IFS=$as_save_IFS
3065
3066} >&5
3067
3068cat >&5 <<_ACEOF
3069
3070
3071## ----------- ##
3072## Core tests. ##
3073## ----------- ##
3074
3075_ACEOF
3076
3077
3078# Keep a trace of the command line.
3079# Strip out --no-create and --no-recursion so they do not pile up.
3080# Strip out --silent because we don't want to record it for future runs.
3081# Also quote any args containing shell meta-characters.
3082# Make two passes to allow for proper duplicate-argument suppression.
3083ac_configure_args=
3084ac_configure_args0=
3085ac_configure_args1=
3086ac_must_keep_next=false
3087for ac_pass in 1 2
3088do
3089 for ac_arg
3090 do
3091 case $ac_arg in
3092 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3093 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3094 | -silent | --silent | --silen | --sile | --sil)
3095 continue ;;
3096 *\'*)
3097 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3098 esac
3099 case $ac_pass in
3100 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3101 2)
3102 as_fn_append ac_configure_args1 " '$ac_arg'"
3103 if test $ac_must_keep_next = true; then
3104 ac_must_keep_next=false # Got value, back to normal.
3105 else
3106 case $ac_arg in
3107 *=* | --config-cache | -C | -disable-* | --disable-* \
3108 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3109 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3110 | -with-* | --with-* | -without-* | --without-* | --x)
3111 case "$ac_configure_args0 " in
3112 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3113 esac
3114 ;;
3115 -* ) ac_must_keep_next=true ;;
3116 esac
3117 fi
3118 as_fn_append ac_configure_args " '$ac_arg'"
3119 ;;
3120 esac
3121 done
3122done
3123{ ac_configure_args0=; unset ac_configure_args0;}
3124{ ac_configure_args1=; unset ac_configure_args1;}
3125
3126# When interrupted or exit'd, cleanup temporary files, and complete
3127# config.log. We remove comments because anyway the quotes in there
3128# would cause problems or look ugly.
3129# WARNING: Use '\'' to represent an apostrophe within the trap.
3130# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3131trap 'exit_status=$?
3132 # Save into config.log some information that might help in debugging.
3133 {
3134 echo
3135
3136 cat <<\_ASBOX
3137## ---------------- ##
3138## Cache variables. ##
3139## ---------------- ##
3140_ASBOX
3141 echo
3142 # The following way of writing the cache mishandles newlines in values,
3143(
3144 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3145 eval ac_val=\$$ac_var
3146 case $ac_val in #(
3147 *${as_nl}*)
3148 case $ac_var in #(
3149 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3150$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3151 esac
3152 case $ac_var in #(
3153 _ | IFS | as_nl) ;; #(
3154 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3155 *) { eval $ac_var=; unset $ac_var;} ;;
3156 esac ;;
3157 esac
3158 done
3159 (set) 2>&1 |
3160 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3161 *${as_nl}ac_space=\ *)
3162 sed -n \
3163 "s/'\''/'\''\\\\'\'''\''/g;
3164 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3165 ;; #(
3166 *)
3167 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3168 ;;
3169 esac |
3170 sort
3171)
3172 echo
3173
3174 cat <<\_ASBOX
3175## ----------------- ##
3176## Output variables. ##
3177## ----------------- ##
3178_ASBOX
3179 echo
3180 for ac_var in $ac_subst_vars
3181 do
3182 eval ac_val=\$$ac_var
3183 case $ac_val in
3184 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3185 esac
3186 $as_echo "$ac_var='\''$ac_val'\''"
3187 done | sort
3188 echo
3189
3190 if test -n "$ac_subst_files"; then
3191 cat <<\_ASBOX
3192## ------------------- ##
3193## File substitutions. ##
3194## ------------------- ##
3195_ASBOX
3196 echo
3197 for ac_var in $ac_subst_files
3198 do
3199 eval ac_val=\$$ac_var
3200 case $ac_val in
3201 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3202 esac
3203 $as_echo "$ac_var='\''$ac_val'\''"
3204 done | sort
3205 echo
3206 fi
3207
3208 if test -s confdefs.h; then
3209 cat <<\_ASBOX
3210## ----------- ##
3211## confdefs.h. ##
3212## ----------- ##
3213_ASBOX
3214 echo
3215 cat confdefs.h
3216 echo
3217 fi
3218 test "$ac_signal" != 0 &&
3219 $as_echo "$as_me: caught signal $ac_signal"
3220 $as_echo "$as_me: exit $exit_status"
3221 } >&5
3222 rm -f core *.core core.conftest.* &&
3223 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3224 exit $exit_status
3225' 0
3226for ac_signal in 1 2 13 15; do
3227 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3228done
3229ac_signal=0
3230
3231# confdefs.h avoids OS command line length limits that DEFS can exceed.
3232rm -f -r conftest* confdefs.h
3233
3234$as_echo "/* confdefs.h */" > confdefs.h
3235
3236# Predefined preprocessor variables.
3237
3238cat >>confdefs.h <<_ACEOF
3239#define PACKAGE_NAME "$PACKAGE_NAME"
3240_ACEOF
3241
3242cat >>confdefs.h <<_ACEOF
3243#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3244_ACEOF
3245
3246cat >>confdefs.h <<_ACEOF
3247#define PACKAGE_VERSION "$PACKAGE_VERSION"
3248_ACEOF
3249
3250cat >>confdefs.h <<_ACEOF
3251#define PACKAGE_STRING "$PACKAGE_STRING"
3252_ACEOF
3253
3254cat >>confdefs.h <<_ACEOF
3255#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3256_ACEOF
3257
3258cat >>confdefs.h <<_ACEOF
3259#define PACKAGE_URL "$PACKAGE_URL"
3260_ACEOF
3261
3262
3263# Let the site file select an alternate cache file if it wants to.
3264# Prefer an explicitly selected file to automatically selected ones.
3265ac_site_file1=NONE
3266ac_site_file2=NONE
3267if test -n "$CONFIG_SITE"; then
3268 ac_site_file1=$CONFIG_SITE
3269elif test "x$prefix" != xNONE; then
3270 ac_site_file1=$prefix/share/config.site
3271 ac_site_file2=$prefix/etc/config.site
3272else
3273 ac_site_file1=$ac_default_prefix/share/config.site
3274 ac_site_file2=$ac_default_prefix/etc/config.site
3275fi
3276for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3277do
3278 test "x$ac_site_file" = xNONE && continue
3279 if test -r "$ac_site_file"; then
3280 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3281$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3282 sed 's/^/| /' "$ac_site_file" >&5
3283 . "$ac_site_file"
3284 fi
3285done
3286
3287if test -r "$cache_file"; then
3288 # Some versions of bash will fail to source /dev/null (special
3289 # files actually), so we avoid doing that.
3290 if test -f "$cache_file"; then
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3292$as_echo "$as_me: loading cache $cache_file" >&6;}
3293 case $cache_file in
3294 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3295 *) . "./$cache_file";;
3296 esac
3297 fi
3298else
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3300$as_echo "$as_me: creating cache $cache_file" >&6;}
3301 >$cache_file
3302fi
3303
98399780
YQ
3304as_fn_append ac_func_list " canonicalize_file_name"
3305as_fn_append ac_func_list " getcwd"
3306as_fn_append ac_func_list " readlink"
3307as_fn_append ac_func_list " realpath"
3308as_fn_append ac_header_list " sys/param.h"
e26b6bb0 3309as_fn_append ac_header_list " dirent.h"
3d99e817 3310as_fn_append ac_header_list " unistd.h"
3574124b
PA
3311as_fn_append ac_func_list " btowc"
3312as_fn_append ac_func_list " isblank"
3313as_fn_append ac_func_list " iswctype"
3314as_fn_append ac_func_list " mbsrtowcs"
3315as_fn_append ac_func_list " mempcpy"
3316as_fn_append ac_func_list " wmemchr"
3317as_fn_append ac_func_list " wmemcpy"
3318as_fn_append ac_func_list " wmempcpy"
3319as_fn_append ac_header_list " wctype.h"
8690e634 3320gl_fnmatch_required=GNU
4a626d0a
PA
3321as_fn_append ac_header_list " sys/time.h"
3322as_fn_append ac_header_list " sys/socket.h"
3323as_fn_append ac_func_list " gettimeofday"
49e4877c 3324as_fn_append ac_header_list " limits.h"
3574124b
PA
3325as_fn_append ac_header_list " wchar.h"
3326as_fn_append ac_header_list " stdint.h"
3327as_fn_append ac_header_list " inttypes.h"
3574124b 3328as_fn_append ac_func_list " symlink"
f45c62c4 3329as_fn_append ac_func_list " lstat"
3574124b
PA
3330as_fn_append ac_header_list " math.h"
3331as_fn_append ac_func_list " mbsinit"
3332as_fn_append ac_func_list " mbrtowc"
3333as_fn_append ac_header_list " sys/mman.h"
3334as_fn_append ac_func_list " mprotect"
6a29c58e 3335as_fn_append ac_func_list " link"
3d99e817 3336as_fn_append ac_func_list " setenv"
09607c9e 3337as_fn_append ac_header_list " sys/stat.h"
3574124b
PA
3338as_fn_append ac_header_list " features.h"
3339as_fn_append ac_func_list " iswcntrl"
c971b7fa
PA
3340# Check that the precious variables saved in the cache have kept the same
3341# value.
3342ac_cache_corrupted=false
3343for ac_var in $ac_precious_vars; do
3344 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3345 eval ac_new_set=\$ac_env_${ac_var}_set
3346 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3347 eval ac_new_val=\$ac_env_${ac_var}_value
3348 case $ac_old_set,$ac_new_set in
3349 set,)
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3351$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3352 ac_cache_corrupted=: ;;
3353 ,set)
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3355$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3356 ac_cache_corrupted=: ;;
3357 ,);;
3358 *)
3359 if test "x$ac_old_val" != "x$ac_new_val"; then
3360 # differences in whitespace do not lead to failure.
3361 ac_old_val_w=`echo x $ac_old_val`
3362 ac_new_val_w=`echo x $ac_new_val`
3363 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3364 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3365$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3366 ac_cache_corrupted=:
3367 else
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3369$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3370 eval $ac_var=\$ac_old_val
3371 fi
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3373$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3374 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3375$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3376 fi;;
3377 esac
3378 # Pass precious variables to config.status.
3379 if test "$ac_new_set" = set; then
3380 case $ac_new_val in
3381 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3382 *) ac_arg=$ac_var=$ac_new_val ;;
3383 esac
3384 case " $ac_configure_args " in
3385 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3386 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3387 esac
3388 fi
3389done
3390if $ac_cache_corrupted; then
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3394$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3395 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3396fi
3397## -------------------- ##
3398## Main body of script. ##
3399## -------------------- ##
3400
3401ac_ext=c
3402ac_cpp='$CPP $CPPFLAGS'
3403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3405ac_compiler_gnu=$ac_cv_c_compiler_gnu
3406
3407
3408ac_config_headers="$ac_config_headers config.h:config.in"
3409
3410
3411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3412$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3413 # Check whether --enable-maintainer-mode was given.
3414if test "${enable_maintainer_mode+set}" = set; then :
3415 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3416else
3417 USE_MAINTAINER_MODE=no
3418fi
3419
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3421$as_echo "$USE_MAINTAINER_MODE" >&6; }
3422 if test $USE_MAINTAINER_MODE = yes; then
3423 MAINTAINER_MODE_TRUE=
3424 MAINTAINER_MODE_FALSE='#'
3425else
3426 MAINTAINER_MODE_TRUE='#'
3427 MAINTAINER_MODE_FALSE=
3428fi
3429
3430 MAINT=$MAINTAINER_MODE_TRUE
3431
3432
3433
3434ac_ext=c
3435ac_cpp='$CPP $CPPFLAGS'
3436ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3437ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3438ac_compiler_gnu=$ac_cv_c_compiler_gnu
3439if test -n "$ac_tool_prefix"; then
3440 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3441set dummy ${ac_tool_prefix}gcc; ac_word=$2
3442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3443$as_echo_n "checking for $ac_word... " >&6; }
3444if test "${ac_cv_prog_CC+set}" = set; then :
3445 $as_echo_n "(cached) " >&6
3446else
3447 if test -n "$CC"; then
3448 ac_cv_prog_CC="$CC" # Let the user override the test.
3449else
3450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
3455 for ac_exec_ext in '' $ac_executable_extensions; do
3456 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3457 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3459 break 2
3460 fi
3461done
3462 done
3463IFS=$as_save_IFS
3464
3465fi
3466fi
3467CC=$ac_cv_prog_CC
3468if test -n "$CC"; then
3469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3470$as_echo "$CC" >&6; }
3471else
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; }
3474fi
3475
3476
3477fi
3478if test -z "$ac_cv_prog_CC"; then
3479 ac_ct_CC=$CC
3480 # Extract the first word of "gcc", so it can be a program name with args.
3481set dummy gcc; ac_word=$2
3482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3483$as_echo_n "checking for $ac_word... " >&6; }
3484if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3485 $as_echo_n "(cached) " >&6
3486else
3487 if test -n "$ac_ct_CC"; then
3488 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3489else
3490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3491for as_dir in $PATH
3492do
3493 IFS=$as_save_IFS
3494 test -z "$as_dir" && as_dir=.
3495 for ac_exec_ext in '' $ac_executable_extensions; do
3496 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3497 ac_cv_prog_ac_ct_CC="gcc"
3498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3499 break 2
3500 fi
3501done
3502 done
3503IFS=$as_save_IFS
3504
3505fi
3506fi
3507ac_ct_CC=$ac_cv_prog_ac_ct_CC
3508if test -n "$ac_ct_CC"; then
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3510$as_echo "$ac_ct_CC" >&6; }
3511else
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3513$as_echo "no" >&6; }
3514fi
3515
3516 if test "x$ac_ct_CC" = x; then
3517 CC=""
3518 else
3519 case $cross_compiling:$ac_tool_warned in
3520yes:)
3521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3523ac_tool_warned=yes ;;
3524esac
3525 CC=$ac_ct_CC
3526 fi
3527else
3528 CC="$ac_cv_prog_CC"
3529fi
3530
3531if test -z "$CC"; then
3532 if test -n "$ac_tool_prefix"; then
3533 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3534set dummy ${ac_tool_prefix}cc; ac_word=$2
3535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3536$as_echo_n "checking for $ac_word... " >&6; }
3537if test "${ac_cv_prog_CC+set}" = set; then :
3538 $as_echo_n "(cached) " >&6
3539else
3540 if test -n "$CC"; then
3541 ac_cv_prog_CC="$CC" # Let the user override the test.
3542else
3543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3544for as_dir in $PATH
3545do
3546 IFS=$as_save_IFS
3547 test -z "$as_dir" && as_dir=.
3548 for ac_exec_ext in '' $ac_executable_extensions; do
3549 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3550 ac_cv_prog_CC="${ac_tool_prefix}cc"
3551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3552 break 2
3553 fi
3554done
3555 done
3556IFS=$as_save_IFS
3557
3558fi
3559fi
3560CC=$ac_cv_prog_CC
3561if test -n "$CC"; then
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3563$as_echo "$CC" >&6; }
3564else
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3566$as_echo "no" >&6; }
3567fi
3568
3569
3570 fi
3571fi
3572if test -z "$CC"; then
3573 # Extract the first word of "cc", so it can be a program name with args.
3574set dummy cc; 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; }
3577if test "${ac_cv_prog_CC+set}" = set; then :
3578 $as_echo_n "(cached) " >&6
3579else
3580 if test -n "$CC"; then
3581 ac_cv_prog_CC="$CC" # Let the user override the test.
3582else
3583 ac_prog_rejected=no
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_exec_ext in '' $ac_executable_extensions; do
3590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3591 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3592 ac_prog_rejected=yes
3593 continue
3594 fi
3595 ac_cv_prog_CC="cc"
3596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3597 break 2
3598 fi
3599done
3600 done
3601IFS=$as_save_IFS
3602
3603if test $ac_prog_rejected = yes; then
3604 # We found a bogon in the path, so make sure we never use it.
3605 set dummy $ac_cv_prog_CC
3606 shift
3607 if test $# != 0; then
3608 # We chose a different compiler from the bogus one.
3609 # However, it has the same basename, so the bogon will be chosen
3610 # first if we set CC to just the basename; use the full file name.
3611 shift
3612 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3613 fi
3614fi
3615fi
3616fi
3617CC=$ac_cv_prog_CC
3618if test -n "$CC"; then
3619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3620$as_echo "$CC" >&6; }
3621else
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3623$as_echo "no" >&6; }
3624fi
3625
3626
3627fi
3628if test -z "$CC"; then
3629 if test -n "$ac_tool_prefix"; then
3630 for ac_prog in cl.exe
3631 do
3632 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3635$as_echo_n "checking for $ac_word... " >&6; }
3636if test "${ac_cv_prog_CC+set}" = set; then :
3637 $as_echo_n "(cached) " >&6
3638else
3639 if test -n "$CC"; then
3640 ac_cv_prog_CC="$CC" # Let the user override the test.
3641else
3642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643for as_dir in $PATH
3644do
3645 IFS=$as_save_IFS
3646 test -z "$as_dir" && as_dir=.
3647 for ac_exec_ext in '' $ac_executable_extensions; do
3648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3649 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3651 break 2
3652 fi
3653done
3654 done
3655IFS=$as_save_IFS
3656
3657fi
3658fi
3659CC=$ac_cv_prog_CC
3660if test -n "$CC"; then
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3662$as_echo "$CC" >&6; }
3663else
3664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3665$as_echo "no" >&6; }
3666fi
3667
3668
3669 test -n "$CC" && break
3670 done
3671fi
3672if test -z "$CC"; then
3673 ac_ct_CC=$CC
3674 for ac_prog in cl.exe
3675do
3676 # Extract the first word of "$ac_prog", so it can be a program name with args.
3677set dummy $ac_prog; ac_word=$2
3678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3679$as_echo_n "checking for $ac_word... " >&6; }
3680if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3681 $as_echo_n "(cached) " >&6
3682else
3683 if test -n "$ac_ct_CC"; then
3684 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3685else
3686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3687for as_dir in $PATH
3688do
3689 IFS=$as_save_IFS
3690 test -z "$as_dir" && as_dir=.
3691 for ac_exec_ext in '' $ac_executable_extensions; do
3692 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3693 ac_cv_prog_ac_ct_CC="$ac_prog"
3694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3695 break 2
3696 fi
3697done
3698 done
3699IFS=$as_save_IFS
3700
3701fi
3702fi
3703ac_ct_CC=$ac_cv_prog_ac_ct_CC
3704if test -n "$ac_ct_CC"; then
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3706$as_echo "$ac_ct_CC" >&6; }
3707else
3708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709$as_echo "no" >&6; }
3710fi
3711
3712
3713 test -n "$ac_ct_CC" && break
3714done
3715
3716 if test "x$ac_ct_CC" = x; then
3717 CC=""
3718 else
3719 case $cross_compiling:$ac_tool_warned in
3720yes:)
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3723ac_tool_warned=yes ;;
3724esac
3725 CC=$ac_ct_CC
3726 fi
3727fi
3728
3729fi
3730
3731
3732test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3734as_fn_error "no acceptable C compiler found in \$PATH
3735See \`config.log' for more details." "$LINENO" 5; }
3736
3737# Provide some information about the compiler.
3738$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3739set X $ac_compile
3740ac_compiler=$2
3741for ac_option in --version -v -V -qversion; do
3742 { { ac_try="$ac_compiler $ac_option >&5"
3743case "(($ac_try" in
3744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3745 *) ac_try_echo=$ac_try;;
3746esac
3747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3748$as_echo "$ac_try_echo"; } >&5
3749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3750 ac_status=$?
3751 if test -s conftest.err; then
3752 sed '10a\
3753... rest of stderr output deleted ...
3754 10q' conftest.err >conftest.er1
3755 cat conftest.er1 >&5
3756 rm -f conftest.er1 conftest.err
3757 fi
3758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3759 test $ac_status = 0; }
3760done
3761
3762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3763/* end confdefs.h. */
3764#include <stdio.h>
3765int
3766main ()
3767{
3768FILE *f = fopen ("conftest.out", "w");
3769 return ferror (f) || fclose (f) != 0;
3770
3771 ;
3772 return 0;
3773}
3774_ACEOF
3775ac_clean_files_save=$ac_clean_files
3776ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
3777# Try to create an executable without -o first, disregard a.out.
3778# It will help us diagnose broken compilers, and finding out an intuition
3779# of exeext.
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3781$as_echo_n "checking for C compiler default output file name... " >&6; }
3782ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3783
3784# The possible output files:
3785ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3786
3787ac_rmfiles=
3788for ac_file in $ac_files
3789do
3790 case $ac_file in
3791 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3792 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3793 esac
3794done
3795rm -f $ac_rmfiles
3796
3797if { { ac_try="$ac_link_default"
3798case "(($ac_try" in
3799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3800 *) ac_try_echo=$ac_try;;
3801esac
3802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3803$as_echo "$ac_try_echo"; } >&5
3804 (eval "$ac_link_default") 2>&5
3805 ac_status=$?
3806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3807 test $ac_status = 0; }; then :
3808 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3809# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3810# in a Makefile. We should not override ac_cv_exeext if it was cached,
3811# so that the user can short-circuit this test for compilers unknown to
3812# Autoconf.
3813for ac_file in $ac_files ''
3814do
3815 test -f "$ac_file" || continue
3816 case $ac_file in
3817 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3818 ;;
3819 [ab].out )
3820 # We found the default executable, but exeext='' is most
3821 # certainly right.
3822 break;;
3823 *.* )
3824 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3825 then :; else
3826 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3827 fi
3828 # We set ac_cv_exeext here because the later test for it is not
3829 # safe: cross compilers may not add the suffix if given an `-o'
3830 # argument, so we may need to know it at that point already.
3831 # Even if this section looks crufty: it has the advantage of
3832 # actually working.
3833 break;;
3834 * )
3835 break;;
3836 esac
3837done
3838test "$ac_cv_exeext" = no && ac_cv_exeext=
3839
3840else
3841 ac_file=''
3842fi
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3844$as_echo "$ac_file" >&6; }
3845if test -z "$ac_file"; then :
3846 $as_echo "$as_me: failed program was:" >&5
3847sed 's/^/| /' conftest.$ac_ext >&5
3848
3849{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3851{ as_fn_set_status 77
3852as_fn_error "C compiler cannot create executables
3853See \`config.log' for more details." "$LINENO" 5; }; }
3854fi
3855ac_exeext=$ac_cv_exeext
3856
3857# Check that the compiler produces executables we can run. If not, either
3858# the compiler is broken, or we cross compile.
3859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3860$as_echo_n "checking whether the C compiler works... " >&6; }
3861# If not cross compiling, check that we can run a simple program.
3862if test "$cross_compiling" != yes; then
3863 if { ac_try='./$ac_file'
3864 { { case "(($ac_try" in
3865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3866 *) ac_try_echo=$ac_try;;
3867esac
3868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3869$as_echo "$ac_try_echo"; } >&5
3870 (eval "$ac_try") 2>&5
3871 ac_status=$?
3872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3873 test $ac_status = 0; }; }; then
3874 cross_compiling=no
3875 else
3876 if test "$cross_compiling" = maybe; then
3877 cross_compiling=yes
3878 else
3879 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3881as_fn_error "cannot run C compiled programs.
3882If you meant to cross compile, use \`--host'.
3883See \`config.log' for more details." "$LINENO" 5; }
3884 fi
3885 fi
3886fi
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3888$as_echo "yes" >&6; }
3889
3890rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3891ac_clean_files=$ac_clean_files_save
3892# Check that the compiler produces executables we can run. If not, either
3893# the compiler is broken, or we cross compile.
3894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3895$as_echo_n "checking whether we are cross compiling... " >&6; }
3896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3897$as_echo "$cross_compiling" >&6; }
3898
3899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3900$as_echo_n "checking for suffix of executables... " >&6; }
3901if { { ac_try="$ac_link"
3902case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
3906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_link") 2>&5
3909 ac_status=$?
3910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3911 test $ac_status = 0; }; then :
3912 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3913# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3914# work properly (i.e., refer to `conftest.exe'), while it won't with
3915# `rm'.
3916for ac_file in conftest.exe conftest conftest.*; do
3917 test -f "$ac_file" || continue
3918 case $ac_file in
3919 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3920 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3921 break;;
3922 * ) break;;
3923 esac
3924done
3925else
3926 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3928as_fn_error "cannot compute suffix of executables: cannot compile and link
3929See \`config.log' for more details." "$LINENO" 5; }
3930fi
3931rm -f conftest$ac_cv_exeext
3932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3933$as_echo "$ac_cv_exeext" >&6; }
3934
3935rm -f conftest.$ac_ext
3936EXEEXT=$ac_cv_exeext
3937ac_exeext=$EXEEXT
3938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3939$as_echo_n "checking for suffix of object files... " >&6; }
3940if test "${ac_cv_objext+set}" = set; then :
3941 $as_echo_n "(cached) " >&6
3942else
3943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3944/* end confdefs.h. */
3945
3946int
3947main ()
3948{
3949
3950 ;
3951 return 0;
3952}
3953_ACEOF
3954rm -f conftest.o conftest.obj
3955if { { ac_try="$ac_compile"
3956case "(($ac_try" in
3957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3958 *) ac_try_echo=$ac_try;;
3959esac
3960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3961$as_echo "$ac_try_echo"; } >&5
3962 (eval "$ac_compile") 2>&5
3963 ac_status=$?
3964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3965 test $ac_status = 0; }; then :
3966 for ac_file in conftest.o conftest.obj conftest.*; do
3967 test -f "$ac_file" || continue;
3968 case $ac_file in
3969 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3970 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3971 break;;
3972 esac
3973done
3974else
3975 $as_echo "$as_me: failed program was:" >&5
3976sed 's/^/| /' conftest.$ac_ext >&5
3977
3978{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3980as_fn_error "cannot compute suffix of object files: cannot compile
3981See \`config.log' for more details." "$LINENO" 5; }
3982fi
3983rm -f conftest.$ac_cv_objext conftest.$ac_ext
3984fi
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3986$as_echo "$ac_cv_objext" >&6; }
3987OBJEXT=$ac_cv_objext
3988ac_objext=$OBJEXT
3989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3990$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3991if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3992 $as_echo_n "(cached) " >&6
3993else
3994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3995/* end confdefs.h. */
3996
3997int
3998main ()
3999{
4000#ifndef __GNUC__
4001 choke me
4002#endif
4003
4004 ;
4005 return 0;
4006}
4007_ACEOF
4008if ac_fn_c_try_compile "$LINENO"; then :
4009 ac_compiler_gnu=yes
4010else
4011 ac_compiler_gnu=no
4012fi
4013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4014ac_cv_c_compiler_gnu=$ac_compiler_gnu
4015
4016fi
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4018$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4019if test $ac_compiler_gnu = yes; then
4020 GCC=yes
4021else
4022 GCC=
4023fi
4024ac_test_CFLAGS=${CFLAGS+set}
4025ac_save_CFLAGS=$CFLAGS
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4027$as_echo_n "checking whether $CC accepts -g... " >&6; }
4028if test "${ac_cv_prog_cc_g+set}" = set; then :
4029 $as_echo_n "(cached) " >&6
4030else
4031 ac_save_c_werror_flag=$ac_c_werror_flag
4032 ac_c_werror_flag=yes
4033 ac_cv_prog_cc_g=no
4034 CFLAGS="-g"
4035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4036/* end confdefs.h. */
4037
4038int
4039main ()
4040{
4041
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046if ac_fn_c_try_compile "$LINENO"; then :
4047 ac_cv_prog_cc_g=yes
4048else
4049 CFLAGS=""
4050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
4052
4053int
4054main ()
4055{
4056
4057 ;
4058 return 0;
4059}
4060_ACEOF
4061if ac_fn_c_try_compile "$LINENO"; then :
4062
4063else
4064 ac_c_werror_flag=$ac_save_c_werror_flag
4065 CFLAGS="-g"
4066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4067/* end confdefs.h. */
4068
4069int
4070main ()
4071{
4072
4073 ;
4074 return 0;
4075}
4076_ACEOF
4077if ac_fn_c_try_compile "$LINENO"; then :
4078 ac_cv_prog_cc_g=yes
4079fi
4080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4081fi
4082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4083fi
4084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4085 ac_c_werror_flag=$ac_save_c_werror_flag
4086fi
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4088$as_echo "$ac_cv_prog_cc_g" >&6; }
4089if test "$ac_test_CFLAGS" = set; then
4090 CFLAGS=$ac_save_CFLAGS
4091elif test $ac_cv_prog_cc_g = yes; then
4092 if test "$GCC" = yes; then
4093 CFLAGS="-g -O2"
4094 else
4095 CFLAGS="-g"
4096 fi
4097else
4098 if test "$GCC" = yes; then
4099 CFLAGS="-O2"
4100 else
4101 CFLAGS=
4102 fi
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4105$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4106if test "${ac_cv_prog_cc_c89+set}" = set; then :
4107 $as_echo_n "(cached) " >&6
4108else
4109 ac_cv_prog_cc_c89=no
4110ac_save_CC=$CC
4111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4112/* end confdefs.h. */
4113#include <stdarg.h>
4114#include <stdio.h>
4115#include <sys/types.h>
4116#include <sys/stat.h>
4117/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4118struct buf { int x; };
4119FILE * (*rcsopen) (struct buf *, struct stat *, int);
4120static char *e (p, i)
4121 char **p;
4122 int i;
4123{
4124 return p[i];
4125}
4126static char *f (char * (*g) (char **, int), char **p, ...)
4127{
4128 char *s;
4129 va_list v;
4130 va_start (v,p);
4131 s = g (p, va_arg (v,int));
4132 va_end (v);
4133 return s;
4134}
4135
4136/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4137 function prototypes and stuff, but not '\xHH' hex character constants.
4138 These don't provoke an error unfortunately, instead are silently treated
4139 as 'x'. The following induces an error, until -std is added to get
4140 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4141 array size at least. It's necessary to write '\x00'==0 to get something
4142 that's true only with -std. */
4143int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4144
4145/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4146 inside strings and character constants. */
4147#define FOO(x) 'x'
4148int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4149
4150int test (int i, double x);
4151struct s1 {int (*f) (int a);};
4152struct s2 {int (*f) (double a);};
4153int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4154int argc;
4155char **argv;
4156int
4157main ()
4158{
4159return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4160 ;
4161 return 0;
4162}
4163_ACEOF
4164for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4165 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4166do
4167 CC="$ac_save_CC $ac_arg"
4168 if ac_fn_c_try_compile "$LINENO"; then :
4169 ac_cv_prog_cc_c89=$ac_arg
4170fi
4171rm -f core conftest.err conftest.$ac_objext
4172 test "x$ac_cv_prog_cc_c89" != "xno" && break
4173done
4174rm -f conftest.$ac_ext
4175CC=$ac_save_CC
4176
4177fi
4178# AC_CACHE_VAL
4179case "x$ac_cv_prog_cc_c89" in
4180 x)
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4182$as_echo "none needed" >&6; } ;;
4183 xno)
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4185$as_echo "unsupported" >&6; } ;;
4186 *)
4187 CC="$CC $ac_cv_prog_cc_c89"
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4189$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4190esac
4191if test "x$ac_cv_prog_cc_c89" != xno; then :
4192
4193fi
4194
4195ac_ext=c
4196ac_cpp='$CPP $CPPFLAGS'
4197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4199ac_compiler_gnu=$ac_cv_c_compiler_gnu
4200
c971b7fa
PA
4201
4202ac_ext=c
4203ac_cpp='$CPP $CPPFLAGS'
4204ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4205ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4206ac_compiler_gnu=$ac_cv_c_compiler_gnu
4207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4208$as_echo_n "checking how to run the C preprocessor... " >&6; }
4209# On Suns, sometimes $CPP names a directory.
4210if test -n "$CPP" && test -d "$CPP"; then
4211 CPP=
4212fi
4213if test -z "$CPP"; then
4214 if test "${ac_cv_prog_CPP+set}" = set; then :
4215 $as_echo_n "(cached) " >&6
4216else
4217 # Double quotes because CPP needs to be expanded
4218 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4219 do
4220 ac_preproc_ok=false
4221for ac_c_preproc_warn_flag in '' yes
4222do
4223 # Use a header file that comes with gcc, so configuring glibc
4224 # with a fresh cross-compiler works.
4225 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4226 # <limits.h> exists even on freestanding compilers.
4227 # On the NeXT, cc -E runs the code through the compiler's parser,
4228 # not just through cpp. "Syntax error" is here to catch this case.
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4230/* end confdefs.h. */
4231#ifdef __STDC__
4232# include <limits.h>
4233#else
4234# include <assert.h>
4235#endif
4236 Syntax error
4237_ACEOF
4238if ac_fn_c_try_cpp "$LINENO"; then :
4239
4240else
4241 # Broken: fails on valid input.
4242continue
4243fi
4244rm -f conftest.err conftest.$ac_ext
4245
4246 # OK, works on sane cases. Now check whether nonexistent headers
4247 # can be detected and how.
4248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4249/* end confdefs.h. */
4250#include <ac_nonexistent.h>
4251_ACEOF
4252if ac_fn_c_try_cpp "$LINENO"; then :
4253 # Broken: success on invalid input.
4254continue
4255else
4256 # Passes both tests.
4257ac_preproc_ok=:
4258break
4259fi
4260rm -f conftest.err conftest.$ac_ext
4261
4262done
4263# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4264rm -f conftest.err conftest.$ac_ext
4265if $ac_preproc_ok; then :
4266 break
4267fi
4268
4269 done
4270 ac_cv_prog_CPP=$CPP
4271
4272fi
4273 CPP=$ac_cv_prog_CPP
4274else
4275 ac_cv_prog_CPP=$CPP
4276fi
4277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4278$as_echo "$CPP" >&6; }
4279ac_preproc_ok=false
4280for ac_c_preproc_warn_flag in '' yes
4281do
4282 # Use a header file that comes with gcc, so configuring glibc
4283 # with a fresh cross-compiler works.
4284 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4285 # <limits.h> exists even on freestanding compilers.
4286 # On the NeXT, cc -E runs the code through the compiler's parser,
4287 # not just through cpp. "Syntax error" is here to catch this case.
4288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4289/* end confdefs.h. */
4290#ifdef __STDC__
4291# include <limits.h>
4292#else
4293# include <assert.h>
4294#endif
4295 Syntax error
4296_ACEOF
4297if ac_fn_c_try_cpp "$LINENO"; then :
4298
4299else
4300 # Broken: fails on valid input.
4301continue
4302fi
4303rm -f conftest.err conftest.$ac_ext
4304
4305 # OK, works on sane cases. Now check whether nonexistent headers
4306 # can be detected and how.
4307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308/* end confdefs.h. */
4309#include <ac_nonexistent.h>
4310_ACEOF
4311if ac_fn_c_try_cpp "$LINENO"; then :
4312 # Broken: success on invalid input.
4313continue
4314else
4315 # Passes both tests.
4316ac_preproc_ok=:
4317break
4318fi
4319rm -f conftest.err conftest.$ac_ext
4320
4321done
4322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4323rm -f conftest.err conftest.$ac_ext
4324if $ac_preproc_ok; then :
4325
4326else
4327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4329as_fn_error "C preprocessor \"$CPP\" fails sanity check
4330See \`config.log' for more details." "$LINENO" 5; }
4331fi
4332
4333ac_ext=c
4334ac_cpp='$CPP $CPPFLAGS'
4335ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4336ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4337ac_compiler_gnu=$ac_cv_c_compiler_gnu
4338
4339
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4341$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4342if test "${ac_cv_path_GREP+set}" = set; then :
4343 $as_echo_n "(cached) " >&6
4344else
4345 if test -z "$GREP"; then
4346 ac_path_GREP_found=false
4347 # Loop through the user's path and test for each of PROGNAME-LIST
4348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4349for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4350do
4351 IFS=$as_save_IFS
4352 test -z "$as_dir" && as_dir=.
4353 for ac_prog in grep ggrep; do
4354 for ac_exec_ext in '' $ac_executable_extensions; do
4355 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4356 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4357# Check for GNU ac_path_GREP and select it if it is found.
4358 # Check for GNU $ac_path_GREP
4359case `"$ac_path_GREP" --version 2>&1` in
4360*GNU*)
4361 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4362*)
4363 ac_count=0
4364 $as_echo_n 0123456789 >"conftest.in"
4365 while :
4366 do
4367 cat "conftest.in" "conftest.in" >"conftest.tmp"
4368 mv "conftest.tmp" "conftest.in"
4369 cp "conftest.in" "conftest.nl"
4370 $as_echo 'GREP' >> "conftest.nl"
4371 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4372 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4373 as_fn_arith $ac_count + 1 && ac_count=$as_val
4374 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4375 # Best one so far, save it but keep looking for a better one
4376 ac_cv_path_GREP="$ac_path_GREP"
4377 ac_path_GREP_max=$ac_count
4378 fi
4379 # 10*(2^10) chars as input seems more than enough
4380 test $ac_count -gt 10 && break
4381 done
4382 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4383esac
4384
4385 $ac_path_GREP_found && break 3
4386 done
4387 done
4388 done
4389IFS=$as_save_IFS
4390 if test -z "$ac_cv_path_GREP"; then
4391 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4392 fi
4393else
4394 ac_cv_path_GREP=$GREP
4395fi
4396
4397fi
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4399$as_echo "$ac_cv_path_GREP" >&6; }
4400 GREP="$ac_cv_path_GREP"
4401
4402
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4404$as_echo_n "checking for egrep... " >&6; }
4405if test "${ac_cv_path_EGREP+set}" = set; then :
4406 $as_echo_n "(cached) " >&6
4407else
4408 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4409 then ac_cv_path_EGREP="$GREP -E"
4410 else
4411 if test -z "$EGREP"; then
4412 ac_path_EGREP_found=false
4413 # Loop through the user's path and test for each of PROGNAME-LIST
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4416do
4417 IFS=$as_save_IFS
4418 test -z "$as_dir" && as_dir=.
4419 for ac_prog in egrep; do
4420 for ac_exec_ext in '' $ac_executable_extensions; do
4421 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4422 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4423# Check for GNU ac_path_EGREP and select it if it is found.
4424 # Check for GNU $ac_path_EGREP
4425case `"$ac_path_EGREP" --version 2>&1` in
4426*GNU*)
4427 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4428*)
4429 ac_count=0
4430 $as_echo_n 0123456789 >"conftest.in"
4431 while :
4432 do
4433 cat "conftest.in" "conftest.in" >"conftest.tmp"
4434 mv "conftest.tmp" "conftest.in"
4435 cp "conftest.in" "conftest.nl"
4436 $as_echo 'EGREP' >> "conftest.nl"
4437 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4438 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4439 as_fn_arith $ac_count + 1 && ac_count=$as_val
4440 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4441 # Best one so far, save it but keep looking for a better one
4442 ac_cv_path_EGREP="$ac_path_EGREP"
4443 ac_path_EGREP_max=$ac_count
4444 fi
4445 # 10*(2^10) chars as input seems more than enough
4446 test $ac_count -gt 10 && break
4447 done
4448 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4449esac
4450
4451 $ac_path_EGREP_found && break 3
4452 done
4453 done
4454 done
4455IFS=$as_save_IFS
4456 if test -z "$ac_cv_path_EGREP"; then
4457 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4458 fi
4459else
4460 ac_cv_path_EGREP=$EGREP
4461fi
4462
4463 fi
4464fi
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4466$as_echo "$ac_cv_path_EGREP" >&6; }
4467 EGREP="$ac_cv_path_EGREP"
4468
4469
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4471$as_echo_n "checking for ANSI C header files... " >&6; }
4472if test "${ac_cv_header_stdc+set}" = set; then :
4473 $as_echo_n "(cached) " >&6
4474else
4475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476/* end confdefs.h. */
4477#include <stdlib.h>
4478#include <stdarg.h>
4479#include <string.h>
4480#include <float.h>
4481
4482int
4483main ()
4484{
4485
4486 ;
4487 return 0;
4488}
4489_ACEOF
4490if ac_fn_c_try_compile "$LINENO"; then :
4491 ac_cv_header_stdc=yes
4492else
4493 ac_cv_header_stdc=no
4494fi
4495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4496
4497if test $ac_cv_header_stdc = yes; then
4498 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500/* end confdefs.h. */
4501#include <string.h>
4502
4503_ACEOF
4504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4505 $EGREP "memchr" >/dev/null 2>&1; then :
4506
4507else
4508 ac_cv_header_stdc=no
4509fi
4510rm -f conftest*
4511
4512fi
4513
4514if test $ac_cv_header_stdc = yes; then
4515 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517/* end confdefs.h. */
4518#include <stdlib.h>
4519
4520_ACEOF
4521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4522 $EGREP "free" >/dev/null 2>&1; then :
4523
4524else
4525 ac_cv_header_stdc=no
4526fi
4527rm -f conftest*
4528
4529fi
4530
4531if test $ac_cv_header_stdc = yes; then
4532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4533 if test "$cross_compiling" = yes; then :
4534 :
4535else
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#include <ctype.h>
4539#include <stdlib.h>
4540#if ((' ' & 0x0FF) == 0x020)
4541# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4542# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4543#else
4544# define ISLOWER(c) \
4545 (('a' <= (c) && (c) <= 'i') \
4546 || ('j' <= (c) && (c) <= 'r') \
4547 || ('s' <= (c) && (c) <= 'z'))
4548# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4549#endif
4550
4551#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4552int
4553main ()
4554{
4555 int i;
4556 for (i = 0; i < 256; i++)
4557 if (XOR (islower (i), ISLOWER (i))
4558 || toupper (i) != TOUPPER (i))
4559 return 2;
4560 return 0;
4561}
4562_ACEOF
4563if ac_fn_c_try_run "$LINENO"; then :
4564
4565else
4566 ac_cv_header_stdc=no
4567fi
4568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4569 conftest.$ac_objext conftest.beam conftest.$ac_ext
4570fi
4571
4572fi
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4575$as_echo "$ac_cv_header_stdc" >&6; }
4576if test $ac_cv_header_stdc = yes; then
4577
4578$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4579
4580fi
4581
4582# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4583for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4584 inttypes.h stdint.h unistd.h
4585do :
4586 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4587ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4588"
4589eval as_val=\$$as_ac_Header
4590 if test "x$as_val" = x""yes; then :
4591 cat >>confdefs.h <<_ACEOF
4592#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4593_ACEOF
4594
4595fi
4596
4597done
4598
4599
4600
c971b7fa
PA
4601 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4602if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4603 MINIX=yes
4604else
4605 MINIX=
4606fi
4607
4608
4609 if test "$MINIX" = yes; then
4610
4611$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4612
4613
4614$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4615
4616
4617$as_echo "#define _MINIX 1" >>confdefs.h
4618
c971b7fa 4619
4a626d0a 4620$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4621
4a626d0a 4622 fi
c971b7fa
PA
4623
4624
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4626$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4627if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4628 $as_echo_n "(cached) " >&6
4629else
4630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4631/* end confdefs.h. */
4632
4633# define __EXTENSIONS__ 1
4634 $ac_includes_default
4635int
4636main ()
4637{
4638
4639 ;
4640 return 0;
4641}
4642_ACEOF
4643if ac_fn_c_try_compile "$LINENO"; then :
4644 ac_cv_safe_to_define___extensions__=yes
4645else
4646 ac_cv_safe_to_define___extensions__=no
4647fi
4648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4649fi
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4651$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4652 test $ac_cv_safe_to_define___extensions__ = yes &&
4653 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4654
4655 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4656
4657 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4658
4659 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4660
4661 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4662
49e4877c
PA
4663 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4664
4665 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4666
4667 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4668
4669 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4670
4671 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4672
4673 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4674
4675 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4676
c971b7fa
PA
4677 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4678
4a626d0a
PA
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4680$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4681if test "${ac_cv_should_define__xopen_source+set}" = set; then :
4682 $as_echo_n "(cached) " >&6
4683else
4684 ac_cv_should_define__xopen_source=no
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687
4688 #include <wchar.h>
4689 mbstate_t x;
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698if ac_fn_c_try_compile "$LINENO"; then :
4699
4700else
4701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4702/* end confdefs.h. */
4703
4704 #define _XOPEN_SOURCE 500
4705 #include <wchar.h>
4706 mbstate_t x;
4707int
4708main ()
4709{
4710
4711 ;
4712 return 0;
4713}
4714_ACEOF
4715if ac_fn_c_try_compile "$LINENO"; then :
4716 ac_cv_should_define__xopen_source=yes
4717fi
4718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4719fi
4720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4721fi
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4723$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4724 test $ac_cv_should_define__xopen_source = yes &&
4725 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4726
c971b7fa
PA
4727
4728
4729
49e4877c
PA
4730
4731
4732
4733
4734
4735
4736
c971b7fa
PA
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4738$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4739if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
4740 $as_echo_n "(cached) " >&6
4741else
4742
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744/* end confdefs.h. */
4745
4746#ifdef __ACK__
4747Amsterdam
4748#endif
4749
4750_ACEOF
4751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4752 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4753 gl_cv_c_amsterdam_compiler=yes
4754else
4755 gl_cv_c_amsterdam_compiler=no
4756fi
4757rm -f conftest*
4758
4759
4760fi
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4762$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
49e4877c
PA
4763
4764 if test $gl_cv_c_amsterdam_compiler = yes; then
4765 if test -z "$AR"; then
c971b7fa 4766 AR='cc -c.a'
49e4877c
PA
4767 fi
4768 if test -z "$ARFLAGS"; then
4769 ARFLAGS='-o'
4770 fi
4771 else
4772 :
4773 fi
4774
4775 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
4776 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4777set dummy ${ac_tool_prefix}ar; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
4780if test "${ac_cv_prog_AR+set}" = set; then :
4781 $as_echo_n "(cached) " >&6
4782else
4783 if test -n "$AR"; then
4784 ac_cv_prog_AR="$AR" # Let the user override the test.
4785else
4786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4787for as_dir in $PATH
4788do
4789 IFS=$as_save_IFS
4790 test -z "$as_dir" && as_dir=.
4791 for ac_exec_ext in '' $ac_executable_extensions; do
4792 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4793 ac_cv_prog_AR="${ac_tool_prefix}ar"
4794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4795 break 2
4796 fi
4797done
4798 done
4799IFS=$as_save_IFS
4800
4801fi
4802fi
4803AR=$ac_cv_prog_AR
4804if test -n "$AR"; then
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4806$as_echo "$AR" >&6; }
4807else
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
4810fi
4811
4812
4813fi
4814if test -z "$ac_cv_prog_AR"; then
4815 ac_ct_AR=$AR
4816 # Extract the first word of "ar", so it can be a program name with args.
4817set dummy ar; ac_word=$2
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
4820if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
4821 $as_echo_n "(cached) " >&6
4822else
4823 if test -n "$ac_ct_AR"; then
4824 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4825else
4826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in $PATH
4828do
4829 IFS=$as_save_IFS
4830 test -z "$as_dir" && as_dir=.
4831 for ac_exec_ext in '' $ac_executable_extensions; do
4832 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4833 ac_cv_prog_ac_ct_AR="ar"
4834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835 break 2
4836 fi
4837done
4838 done
4839IFS=$as_save_IFS
4840
4841fi
4842fi
4843ac_ct_AR=$ac_cv_prog_ac_ct_AR
4844if test -n "$ac_ct_AR"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4846$as_echo "$ac_ct_AR" >&6; }
4847else
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852 if test "x$ac_ct_AR" = x; then
4853 AR="ar"
4854 else
4855 case $cross_compiling:$ac_tool_warned in
4856yes:)
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4859ac_tool_warned=yes ;;
4860esac
4861 AR=$ac_ct_AR
4862 fi
4863else
4864 AR="$ac_cv_prog_AR"
4865fi
4866
49e4877c
PA
4867 if test -z "$ARFLAGS"; then
4868 ARFLAGS='cr'
c971b7fa
PA
4869 fi
4870
4871
49e4877c 4872
c971b7fa
PA
4873 if test -z "$RANLIB"; then
4874 if test $gl_cv_c_amsterdam_compiler = yes; then
4875 RANLIB=':'
4876 else
4877 if test -n "$ac_tool_prefix"; then
4878 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4879set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4881$as_echo_n "checking for $ac_word... " >&6; }
4882if test "${ac_cv_prog_RANLIB+set}" = set; then :
4883 $as_echo_n "(cached) " >&6
4884else
4885 if test -n "$RANLIB"; then
4886 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4887else
4888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889for as_dir in $PATH
4890do
4891 IFS=$as_save_IFS
4892 test -z "$as_dir" && as_dir=.
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4895 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897 break 2
4898 fi
4899done
4900 done
4901IFS=$as_save_IFS
4902
4903fi
4904fi
4905RANLIB=$ac_cv_prog_RANLIB
4906if test -n "$RANLIB"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4908$as_echo "$RANLIB" >&6; }
4909else
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
4912fi
4913
4914
4915fi
4916if test -z "$ac_cv_prog_RANLIB"; then
4917 ac_ct_RANLIB=$RANLIB
4918 # Extract the first word of "ranlib", so it can be a program name with args.
4919set dummy ranlib; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 if test -n "$ac_ct_RANLIB"; then
4926 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4927else
4928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4929for as_dir in $PATH
4930do
4931 IFS=$as_save_IFS
4932 test -z "$as_dir" && as_dir=.
4933 for ac_exec_ext in '' $ac_executable_extensions; do
4934 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4935 ac_cv_prog_ac_ct_RANLIB="ranlib"
4936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4937 break 2
4938 fi
4939done
4940 done
4941IFS=$as_save_IFS
4942
4943fi
4944fi
4945ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4946if test -n "$ac_ct_RANLIB"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4948$as_echo "$ac_ct_RANLIB" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954 if test "x$ac_ct_RANLIB" = x; then
4955 RANLIB=":"
4956 else
4957 case $cross_compiling:$ac_tool_warned in
4958yes:)
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4960$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4961ac_tool_warned=yes ;;
4962esac
4963 RANLIB=$ac_ct_RANLIB
4964 fi
4965else
4966 RANLIB="$ac_cv_prog_RANLIB"
4967fi
4968
4969 fi
4970 fi
4971
4972
4a626d0a
PA
4973ac_aux_dir=
4974for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4975 for ac_t in install-sh install.sh shtool; do
4976 if test -f "$ac_dir/$ac_t"; then
4977 ac_aux_dir=$ac_dir
4978 ac_install_sh="$ac_aux_dir/$ac_t -c"
4979 break 2
4980 fi
4981 done
4982done
4983if test -z "$ac_aux_dir"; then
4984 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4985fi
4986
4987# These three variables are undocumented and unsupported,
4988# and are intended to be withdrawn in a future Autoconf release.
4989# They can cause serious problems if a builder's source tree is in a directory
4990# whose full name contains unusual characters.
4991ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4992ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4993ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4994
4995
4996# Make sure we can run config.sub.
4997$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4998 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4999
5000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5001$as_echo_n "checking build system type... " >&6; }
5002if test "${ac_cv_build+set}" = set; then :
5003 $as_echo_n "(cached) " >&6
5004else
5005 ac_build_alias=$build_alias
5006test "x$ac_build_alias" = x &&
5007 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5008test "x$ac_build_alias" = x &&
5009 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5010ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5011 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5012
5013fi
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5015$as_echo "$ac_cv_build" >&6; }
5016case $ac_cv_build in
5017*-*-*) ;;
5018*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5019esac
5020build=$ac_cv_build
5021ac_save_IFS=$IFS; IFS='-'
5022set x $ac_cv_build
5023shift
5024build_cpu=$1
5025build_vendor=$2
5026shift; shift
5027# Remember, the first character of IFS is used to create $*,
5028# except with old shells:
5029build_os=$*
5030IFS=$ac_save_IFS
5031case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5032
5033
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5035$as_echo_n "checking host system type... " >&6; }
5036if test "${ac_cv_host+set}" = set; then :
5037 $as_echo_n "(cached) " >&6
5038else
5039 if test "x$host_alias" = x; then
5040 ac_cv_host=$ac_cv_build
5041else
5042 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5043 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5044fi
5045
5046fi
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5048$as_echo "$ac_cv_host" >&6; }
5049case $ac_cv_host in
5050*-*-*) ;;
5051*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5052esac
5053host=$ac_cv_host
5054ac_save_IFS=$IFS; IFS='-'
5055set x $ac_cv_host
5056shift
5057host_cpu=$1
5058host_vendor=$2
5059shift; shift
5060# Remember, the first character of IFS is used to create $*,
5061# except with old shells:
5062host_os=$*
5063IFS=$ac_save_IFS
5064case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5065
5066
c971b7fa
PA
5067
5068
88b48903
WN
5069
5070 # IEEE behaviour is the default on all CPUs except Alpha and SH
5071 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5072 # and the GCC 4.1.2 manual).
5073 case "$host_cpu" in
5074 alpha*)
5075 # On Alpha systems, a compiler option provides the behaviour.
5076 # See the ieee(3) manual page, also available at
5077 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5078 if test -n "$GCC"; then
5079 # GCC has the option -mieee.
5080 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5081 CPPFLAGS="$CPPFLAGS -mieee"
5082 else
5083 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5084 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5085 CPPFLAGS="$CPPFLAGS -ieee"
5086 fi
5087 ;;
5088 sh*)
5089 if test -n "$GCC"; then
5090 # GCC has the option -mieee.
5091 CPPFLAGS="$CPPFLAGS -mieee"
5092 fi
5093 ;;
5094 esac
5095
2196f55f
YQ
5096# Check whether --enable-largefile was given.
5097if test "${enable_largefile+set}" = set; then :
5098 enableval=$enable_largefile;
5099fi
5100
5101if test "$enable_largefile" != no; then
5102
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5104$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5105if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5106 $as_echo_n "(cached) " >&6
5107else
5108 ac_cv_sys_largefile_CC=no
5109 if test "$GCC" != yes; then
5110 ac_save_CC=$CC
5111 while :; do
5112 # IRIX 6.2 and later do not support large files by default,
5113 # so use the C compiler's -n32 option if that helps.
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115/* end confdefs.h. */
5116#include <sys/types.h>
5117 /* Check that off_t can represent 2**63 - 1 correctly.
5118 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5119 since some C++ compilers masquerading as C compilers
5120 incorrectly reject 9223372036854775807. */
5121#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5122 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5123 && LARGE_OFF_T % 2147483647 == 1)
5124 ? 1 : -1];
5125int
5126main ()
5127{
5128
5129 ;
5130 return 0;
5131}
5132_ACEOF
5133 if ac_fn_c_try_compile "$LINENO"; then :
5134 break
5135fi
5136rm -f core conftest.err conftest.$ac_objext
5137 CC="$CC -n32"
5138 if ac_fn_c_try_compile "$LINENO"; then :
5139 ac_cv_sys_largefile_CC=' -n32'; break
5140fi
5141rm -f core conftest.err conftest.$ac_objext
5142 break
5143 done
5144 CC=$ac_save_CC
5145 rm -f conftest.$ac_ext
5146 fi
5147fi
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5149$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5150 if test "$ac_cv_sys_largefile_CC" != no; then
5151 CC=$CC$ac_cv_sys_largefile_CC
5152 fi
5153
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5155$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5156if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5157 $as_echo_n "(cached) " >&6
5158else
5159 while :; do
5160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5161/* end confdefs.h. */
5162#include <sys/types.h>
5163 /* Check that off_t can represent 2**63 - 1 correctly.
5164 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5165 since some C++ compilers masquerading as C compilers
5166 incorrectly reject 9223372036854775807. */
5167#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5168 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5169 && LARGE_OFF_T % 2147483647 == 1)
5170 ? 1 : -1];
5171int
5172main ()
5173{
5174
5175 ;
5176 return 0;
5177}
5178_ACEOF
5179if ac_fn_c_try_compile "$LINENO"; then :
5180 ac_cv_sys_file_offset_bits=no; break
5181fi
5182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184/* end confdefs.h. */
5185#define _FILE_OFFSET_BITS 64
5186#include <sys/types.h>
5187 /* Check that off_t can represent 2**63 - 1 correctly.
5188 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5189 since some C++ compilers masquerading as C compilers
5190 incorrectly reject 9223372036854775807. */
5191#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5192 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5193 && LARGE_OFF_T % 2147483647 == 1)
5194 ? 1 : -1];
5195int
5196main ()
5197{
5198
5199 ;
5200 return 0;
5201}
5202_ACEOF
5203if ac_fn_c_try_compile "$LINENO"; then :
5204 ac_cv_sys_file_offset_bits=64; break
5205fi
5206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5207 ac_cv_sys_file_offset_bits=unknown
5208 break
5209done
5210fi
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5212$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5213case $ac_cv_sys_file_offset_bits in #(
5214 no | unknown) ;;
5215 *)
5216cat >>confdefs.h <<_ACEOF
5217#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5218_ACEOF
5219;;
5220esac
5221rm -rf conftest*
5222 if test $ac_cv_sys_file_offset_bits = unknown; then
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5224$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5225if test "${ac_cv_sys_large_files+set}" = set; then :
5226 $as_echo_n "(cached) " >&6
5227else
5228 while :; do
5229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5230/* end confdefs.h. */
5231#include <sys/types.h>
5232 /* Check that off_t can represent 2**63 - 1 correctly.
5233 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5234 since some C++ compilers masquerading as C compilers
5235 incorrectly reject 9223372036854775807. */
5236#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5237 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5238 && LARGE_OFF_T % 2147483647 == 1)
5239 ? 1 : -1];
5240int
5241main ()
5242{
5243
5244 ;
5245 return 0;
5246}
5247_ACEOF
5248if ac_fn_c_try_compile "$LINENO"; then :
5249 ac_cv_sys_large_files=no; break
5250fi
5251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5253/* end confdefs.h. */
5254#define _LARGE_FILES 1
5255#include <sys/types.h>
5256 /* Check that off_t can represent 2**63 - 1 correctly.
5257 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5258 since some C++ compilers masquerading as C compilers
5259 incorrectly reject 9223372036854775807. */
5260#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5261 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5262 && LARGE_OFF_T % 2147483647 == 1)
5263 ? 1 : -1];
5264int
5265main ()
5266{
5267
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272if ac_fn_c_try_compile "$LINENO"; then :
5273 ac_cv_sys_large_files=1; break
5274fi
5275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5276 ac_cv_sys_large_files=unknown
5277 break
5278done
5279fi
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5281$as_echo "$ac_cv_sys_large_files" >&6; }
5282case $ac_cv_sys_large_files in #(
5283 no | unknown) ;;
5284 *)
5285cat >>confdefs.h <<_ACEOF
5286#define _LARGE_FILES $ac_cv_sys_large_files
5287_ACEOF
5288;;
5289esac
5290rm -rf conftest*
5291 fi
5292
5293
4a626d0a
PA
5294$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5295
2196f55f
YQ
5296fi
5297
88b48903
WN
5298
5299
49e4877c
PA
5300 # Pre-early section.
5301
5302
5303
4a626d0a 5304 # Code from module absolute-header:
8690e634
JK
5305 # Code from module alloca:
5306 # Code from module alloca-opt:
98399780 5307 # Code from module canonicalize-lgpl:
6a29c58e 5308 # Code from module chdir:
8690e634 5309 # Code from module configmake:
e26b6bb0 5310 # Code from module dirent:
18848e28 5311 # Code from module dirfd:
6a29c58e 5312 # Code from module dirname-lgpl:
2196f55f 5313 # Code from module dosname:
6a29c58e 5314 # Code from module double-slash-root:
3d99e817 5315 # Code from module environ:
18848e28 5316 # Code from module errno:
c971b7fa 5317 # Code from module extensions:
a512b375 5318 # Code from module extern-inline:
49e4877c 5319 # Code from module flexmember:
88b48903 5320 # Code from module float:
8690e634
JK
5321 # Code from module fnmatch:
5322 # Code from module fnmatch-gnu:
88b48903
WN
5323 # Code from module fpieee:
5324
5325 # Code from module fpucw:
5326 # Code from module frexp:
5327 # Code from module frexpl:
4a626d0a 5328 # Code from module gettimeofday:
49e4877c 5329 # Code from module hard-locale:
c971b7fa
PA
5330 # Code from module include_next:
5331 # Code from module inttypes:
5332 # Code from module inttypes-incomplete:
88b48903
WN
5333 # Code from module isnand-nolibm:
5334 # Code from module isnanl-nolibm:
2196f55f
YQ
5335 # Code from module largefile:
5336
49e4877c 5337 # Code from module limits-h:
8690e634 5338 # Code from module localcharset:
f45c62c4 5339 # Code from module lstat:
6a29c58e 5340 # Code from module malloc-posix:
98399780 5341 # Code from module malloca:
88b48903 5342 # Code from module math:
8690e634
JK
5343 # Code from module mbrtowc:
5344 # Code from module mbsinit:
5345 # Code from module mbsrtowcs:
c971b7fa
PA
5346 # Code from module memchr:
5347 # Code from module memmem:
5348 # Code from module memmem-simple:
5349 # Code from module multiarch:
98399780 5350 # Code from module nocrash:
38ec2207 5351 # Code from module pathmax:
8424cc97 5352 # Code from module rawmemchr:
2196f55f 5353 # Code from module readlink:
6a29c58e
YQ
5354 # Code from module rename:
5355 # Code from module rmdir:
5356 # Code from module same-inode:
3d99e817 5357 # Code from module setenv:
0750520d 5358 # Code from module signal-h:
98399780 5359 # Code from module snippet/_Noreturn:
c971b7fa
PA
5360 # Code from module snippet/arg-nonnull:
5361 # Code from module snippet/c++defs:
5362 # Code from module snippet/warn-on-use:
8839a007 5363 # Code from module ssize_t:
2196f55f 5364 # Code from module stat:
8690e634 5365 # Code from module stdbool:
c971b7fa
PA
5366 # Code from module stddef:
5367 # Code from module stdint:
6a29c58e 5368 # Code from module stdio:
98399780 5369 # Code from module stdlib:
8424cc97 5370 # Code from module strchrnul:
8690e634 5371 # Code from module streq:
c971b7fa 5372 # Code from module string:
8690e634 5373 # Code from module strnlen1:
63ce7108
TT
5374 # Code from module strstr:
5375 # Code from module strstr-simple:
421693b0 5376 # Code from module strtok_r:
09607c9e 5377 # Code from module sys_stat:
4a626d0a 5378 # Code from module sys_time:
8839a007 5379 # Code from module sys_types:
09607c9e 5380 # Code from module time:
8839a007 5381 # Code from module unistd:
3d99e817 5382 # Code from module unsetenv:
c971b7fa 5383 # Code from module update-copyright:
8690e634
JK
5384 # Code from module verify:
5385 # Code from module wchar:
5386 # Code from module wctype-h:
c971b7fa
PA
5387
5388ac_ext=c
5389ac_cpp='$CPP $CPPFLAGS'
5390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5392ac_compiler_gnu=$ac_cv_c_compiler_gnu
5393if test -n "$ac_tool_prefix"; then
5394 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5395set dummy ${ac_tool_prefix}gcc; ac_word=$2
5396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5397$as_echo_n "checking for $ac_word... " >&6; }
5398if test "${ac_cv_prog_CC+set}" = set; then :
5399 $as_echo_n "(cached) " >&6
5400else
5401 if test -n "$CC"; then
5402 ac_cv_prog_CC="$CC" # Let the user override the test.
5403else
5404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407 IFS=$as_save_IFS
5408 test -z "$as_dir" && as_dir=.
5409 for ac_exec_ext in '' $ac_executable_extensions; do
5410 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5411 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413 break 2
5414 fi
5415done
5416 done
5417IFS=$as_save_IFS
5418
5419fi
5420fi
5421CC=$ac_cv_prog_CC
5422if test -n "$CC"; then
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5424$as_echo "$CC" >&6; }
5425else
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
5429
5430
5431fi
5432if test -z "$ac_cv_prog_CC"; then
5433 ac_ct_CC=$CC
5434 # Extract the first word of "gcc", so it can be a program name with args.
5435set dummy gcc; ac_word=$2
5436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5437$as_echo_n "checking for $ac_word... " >&6; }
5438if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5439 $as_echo_n "(cached) " >&6
5440else
5441 if test -n "$ac_ct_CC"; then
5442 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5443else
5444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5445for as_dir in $PATH
5446do
5447 IFS=$as_save_IFS
5448 test -z "$as_dir" && as_dir=.
5449 for ac_exec_ext in '' $ac_executable_extensions; do
5450 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5451 ac_cv_prog_ac_ct_CC="gcc"
5452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5453 break 2
5454 fi
5455done
5456 done
5457IFS=$as_save_IFS
5458
5459fi
5460fi
5461ac_ct_CC=$ac_cv_prog_ac_ct_CC
5462if test -n "$ac_ct_CC"; then
5463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5464$as_echo "$ac_ct_CC" >&6; }
5465else
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468fi
5469
5470 if test "x$ac_ct_CC" = x; then
5471 CC=""
5472 else
5473 case $cross_compiling:$ac_tool_warned in
5474yes:)
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5477ac_tool_warned=yes ;;
5478esac
5479 CC=$ac_ct_CC
5480 fi
5481else
5482 CC="$ac_cv_prog_CC"
5483fi
5484
5485if test -z "$CC"; then
5486 if test -n "$ac_tool_prefix"; then
5487 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5488set dummy ${ac_tool_prefix}cc; ac_word=$2
5489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490$as_echo_n "checking for $ac_word... " >&6; }
5491if test "${ac_cv_prog_CC+set}" = set; then :
5492 $as_echo_n "(cached) " >&6
5493else
5494 if test -n "$CC"; then
5495 ac_cv_prog_CC="$CC" # Let the user override the test.
5496else
5497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5498for as_dir in $PATH
5499do
5500 IFS=$as_save_IFS
5501 test -z "$as_dir" && as_dir=.
5502 for ac_exec_ext in '' $ac_executable_extensions; do
5503 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5504 ac_cv_prog_CC="${ac_tool_prefix}cc"
5505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5506 break 2
5507 fi
5508done
5509 done
5510IFS=$as_save_IFS
5511
5512fi
5513fi
5514CC=$ac_cv_prog_CC
5515if test -n "$CC"; then
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5517$as_echo "$CC" >&6; }
5518else
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524 fi
5525fi
5526if test -z "$CC"; then
5527 # Extract the first word of "cc", so it can be a program name with args.
5528set dummy cc; ac_word=$2
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530$as_echo_n "checking for $ac_word... " >&6; }
5531if test "${ac_cv_prog_CC+set}" = set; then :
5532 $as_echo_n "(cached) " >&6
5533else
5534 if test -n "$CC"; then
5535 ac_cv_prog_CC="$CC" # Let the user override the test.
5536else
5537 ac_prog_rejected=no
5538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5539for as_dir in $PATH
5540do
5541 IFS=$as_save_IFS
5542 test -z "$as_dir" && as_dir=.
5543 for ac_exec_ext in '' $ac_executable_extensions; do
5544 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5545 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5546 ac_prog_rejected=yes
5547 continue
5548 fi
5549 ac_cv_prog_CC="cc"
5550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551 break 2
5552 fi
5553done
5554 done
5555IFS=$as_save_IFS
5556
5557if test $ac_prog_rejected = yes; then
5558 # We found a bogon in the path, so make sure we never use it.
5559 set dummy $ac_cv_prog_CC
5560 shift
5561 if test $# != 0; then
5562 # We chose a different compiler from the bogus one.
5563 # However, it has the same basename, so the bogon will be chosen
5564 # first if we set CC to just the basename; use the full file name.
5565 shift
5566 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5567 fi
5568fi
5569fi
5570fi
5571CC=$ac_cv_prog_CC
5572if test -n "$CC"; then
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5574$as_echo "$CC" >&6; }
5575else
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5577$as_echo "no" >&6; }
5578fi
5579
5580
5581fi
5582if test -z "$CC"; then
5583 if test -n "$ac_tool_prefix"; then
5584 for ac_prog in cl.exe
5585 do
5586 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if test "${ac_cv_prog_CC+set}" = set; then :
5591 $as_echo_n "(cached) " >&6
5592else
5593 if test -n "$CC"; then
5594 ac_cv_prog_CC="$CC" # Let the user override the test.
5595else
5596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597for as_dir in $PATH
5598do
5599 IFS=$as_save_IFS
5600 test -z "$as_dir" && as_dir=.
5601 for ac_exec_ext in '' $ac_executable_extensions; do
5602 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5603 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5605 break 2
5606 fi
5607done
5608 done
5609IFS=$as_save_IFS
5610
5611fi
5612fi
5613CC=$ac_cv_prog_CC
5614if test -n "$CC"; then
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5616$as_echo "$CC" >&6; }
5617else
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623 test -n "$CC" && break
5624 done
5625fi
5626if test -z "$CC"; then
5627 ac_ct_CC=$CC
5628 for ac_prog in cl.exe
5629do
5630 # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5635 $as_echo_n "(cached) " >&6
5636else
5637 if test -n "$ac_ct_CC"; then
5638 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5639else
5640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643 IFS=$as_save_IFS
5644 test -z "$as_dir" && as_dir=.
5645 for ac_exec_ext in '' $ac_executable_extensions; do
5646 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5647 ac_cv_prog_ac_ct_CC="$ac_prog"
5648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649 break 2
5650 fi
5651done
5652 done
5653IFS=$as_save_IFS
5654
5655fi
5656fi
5657ac_ct_CC=$ac_cv_prog_ac_ct_CC
5658if test -n "$ac_ct_CC"; then
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5660$as_echo "$ac_ct_CC" >&6; }
5661else
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667 test -n "$ac_ct_CC" && break
5668done
5669
5670 if test "x$ac_ct_CC" = x; then
5671 CC=""
5672 else
5673 case $cross_compiling:$ac_tool_warned in
5674yes:)
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5677ac_tool_warned=yes ;;
5678esac
5679 CC=$ac_ct_CC
5680 fi
5681fi
5682
5683fi
5684
5685
5686test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5688as_fn_error "no acceptable C compiler found in \$PATH
5689See \`config.log' for more details." "$LINENO" 5; }
5690
5691# Provide some information about the compiler.
5692$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5693set X $ac_compile
5694ac_compiler=$2
5695for ac_option in --version -v -V -qversion; do
5696 { { ac_try="$ac_compiler $ac_option >&5"
5697case "(($ac_try" in
5698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5699 *) ac_try_echo=$ac_try;;
5700esac
5701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5702$as_echo "$ac_try_echo"; } >&5
5703 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5704 ac_status=$?
5705 if test -s conftest.err; then
5706 sed '10a\
5707... rest of stderr output deleted ...
5708 10q' conftest.err >conftest.er1
5709 cat conftest.er1 >&5
5710 rm -f conftest.er1 conftest.err
5711 fi
5712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5713 test $ac_status = 0; }
5714done
5715
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5717$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5718if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5719 $as_echo_n "(cached) " >&6
5720else
5721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5722/* end confdefs.h. */
5723
5724int
5725main ()
5726{
5727#ifndef __GNUC__
5728 choke me
5729#endif
5730
5731 ;
5732 return 0;
5733}
5734_ACEOF
5735if ac_fn_c_try_compile "$LINENO"; then :
5736 ac_compiler_gnu=yes
5737else
5738 ac_compiler_gnu=no
5739fi
5740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5741ac_cv_c_compiler_gnu=$ac_compiler_gnu
5742
5743fi
5744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5745$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5746if test $ac_compiler_gnu = yes; then
5747 GCC=yes
5748else
5749 GCC=
5750fi
5751ac_test_CFLAGS=${CFLAGS+set}
5752ac_save_CFLAGS=$CFLAGS
5753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5754$as_echo_n "checking whether $CC accepts -g... " >&6; }
5755if test "${ac_cv_prog_cc_g+set}" = set; then :
5756 $as_echo_n "(cached) " >&6
5757else
5758 ac_save_c_werror_flag=$ac_c_werror_flag
5759 ac_c_werror_flag=yes
5760 ac_cv_prog_cc_g=no
5761 CFLAGS="-g"
5762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5763/* end confdefs.h. */
5764
5765int
5766main ()
5767{
5768
5769 ;
5770 return 0;
5771}
5772_ACEOF
5773if ac_fn_c_try_compile "$LINENO"; then :
5774 ac_cv_prog_cc_g=yes
5775else
5776 CFLAGS=""
5777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5778/* end confdefs.h. */
5779
5780int
5781main ()
5782{
5783
5784 ;
5785 return 0;
5786}
5787_ACEOF
5788if ac_fn_c_try_compile "$LINENO"; then :
5789
5790else
5791 ac_c_werror_flag=$ac_save_c_werror_flag
5792 CFLAGS="-g"
5793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5794/* end confdefs.h. */
5795
5796int
5797main ()
5798{
5799
5800 ;
5801 return 0;
5802}
5803_ACEOF
5804if ac_fn_c_try_compile "$LINENO"; then :
5805 ac_cv_prog_cc_g=yes
5806fi
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5808fi
5809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5810fi
5811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5812 ac_c_werror_flag=$ac_save_c_werror_flag
5813fi
5814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5815$as_echo "$ac_cv_prog_cc_g" >&6; }
5816if test "$ac_test_CFLAGS" = set; then
5817 CFLAGS=$ac_save_CFLAGS
5818elif test $ac_cv_prog_cc_g = yes; then
5819 if test "$GCC" = yes; then
5820 CFLAGS="-g -O2"
5821 else
5822 CFLAGS="-g"
5823 fi
5824else
5825 if test "$GCC" = yes; then
5826 CFLAGS="-O2"
5827 else
5828 CFLAGS=
5829 fi
5830fi
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5832$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5833if test "${ac_cv_prog_cc_c89+set}" = set; then :
5834 $as_echo_n "(cached) " >&6
5835else
5836 ac_cv_prog_cc_c89=no
5837ac_save_CC=$CC
5838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839/* end confdefs.h. */
5840#include <stdarg.h>
5841#include <stdio.h>
5842#include <sys/types.h>
5843#include <sys/stat.h>
5844/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5845struct buf { int x; };
5846FILE * (*rcsopen) (struct buf *, struct stat *, int);
5847static char *e (p, i)
5848 char **p;
5849 int i;
5850{
5851 return p[i];
5852}
5853static char *f (char * (*g) (char **, int), char **p, ...)
5854{
5855 char *s;
5856 va_list v;
5857 va_start (v,p);
5858 s = g (p, va_arg (v,int));
5859 va_end (v);
5860 return s;
5861}
5862
5863/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5864 function prototypes and stuff, but not '\xHH' hex character constants.
5865 These don't provoke an error unfortunately, instead are silently treated
5866 as 'x'. The following induces an error, until -std is added to get
5867 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5868 array size at least. It's necessary to write '\x00'==0 to get something
5869 that's true only with -std. */
5870int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5871
5872/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5873 inside strings and character constants. */
5874#define FOO(x) 'x'
5875int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5876
5877int test (int i, double x);
5878struct s1 {int (*f) (int a);};
5879struct s2 {int (*f) (double a);};
5880int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5881int argc;
5882char **argv;
5883int
5884main ()
5885{
5886return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5892 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5893do
5894 CC="$ac_save_CC $ac_arg"
5895 if ac_fn_c_try_compile "$LINENO"; then :
5896 ac_cv_prog_cc_c89=$ac_arg
5897fi
5898rm -f core conftest.err conftest.$ac_objext
5899 test "x$ac_cv_prog_cc_c89" != "xno" && break
5900done
5901rm -f conftest.$ac_ext
5902CC=$ac_save_CC
5903
5904fi
5905# AC_CACHE_VAL
5906case "x$ac_cv_prog_cc_c89" in
5907 x)
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5909$as_echo "none needed" >&6; } ;;
5910 xno)
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5912$as_echo "unsupported" >&6; } ;;
5913 *)
5914 CC="$CC $ac_cv_prog_cc_c89"
5915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5916$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5917esac
5918if test "x$ac_cv_prog_cc_c89" != xno; then :
5919
5920fi
5921
5922ac_ext=c
5923ac_cpp='$CPP $CPPFLAGS'
5924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5926ac_compiler_gnu=$ac_cv_c_compiler_gnu
5927
5928
5929am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
5930
5931
5932ac_aux_dir=
5933for ac_dir in ../.. "$srcdir"/../..; do
5934 for ac_t in install-sh install.sh shtool; do
5935 if test -f "$ac_dir/$ac_t"; then
5936 ac_aux_dir=$ac_dir
5937 ac_install_sh="$ac_aux_dir/$ac_t -c"
5938 break 2
5939 fi
5940 done
5941done
5942if test -z "$ac_aux_dir"; then
5943 as_fn_error "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
5944fi
5945
5946# These three variables are undocumented and unsupported,
5947# and are intended to be withdrawn in a future Autoconf release.
5948# They can cause serious problems if a builder's source tree is in a directory
5949# whose full name contains unusual characters.
5950ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5951ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5952ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5953
5954
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5956$as_echo_n "checking target system type... " >&6; }
5957if test "${ac_cv_target+set}" = set; then :
5958 $as_echo_n "(cached) " >&6
5959else
5960 if test "x$target_alias" = x; then
5961 ac_cv_target=$ac_cv_host
5962else
5963 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5964 as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5965fi
5966
5967fi
5968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5969$as_echo "$ac_cv_target" >&6; }
5970case $ac_cv_target in
5971*-*-*) ;;
5972*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
5973esac
5974target=$ac_cv_target
5975ac_save_IFS=$IFS; IFS='-'
5976set x $ac_cv_target
5977shift
5978target_cpu=$1
5979target_vendor=$2
5980shift; shift
5981# Remember, the first character of IFS is used to create $*,
5982# except with old shells:
5983target_os=$*
5984IFS=$ac_save_IFS
5985case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5986
5987
5988# The aliases save the names the user supplied, while $host etc.
5989# will get canonicalized.
5990test -n "$target_alias" &&
5991 test "$program_prefix$program_suffix$program_transform_name" = \
5992 NONENONEs,x,x, &&
5993 program_prefix=${target_alias}-
5994
5995
5996
5997
5998
5999
6000
6001 LIBC_FATAL_STDERR_=1
6002 export LIBC_FATAL_STDERR_
6003
8690e634
JK
6004# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6005# for constant arguments. Useless!
6006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6007$as_echo_n "checking for working alloca.h... " >&6; }
6008if test "${ac_cv_working_alloca_h+set}" = set; then :
c971b7fa
PA
6009 $as_echo_n "(cached) " >&6
6010else
8690e634 6011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6012/* end confdefs.h. */
8690e634 6013#include <alloca.h>
c971b7fa
PA
6014int
6015main ()
6016{
8690e634
JK
6017char *p = (char *) alloca (2 * sizeof (int));
6018 if (p) return 0;
c971b7fa
PA
6019 ;
6020 return 0;
6021}
c971b7fa
PA
6022_ACEOF
6023if ac_fn_c_try_link "$LINENO"; then :
8690e634 6024 ac_cv_working_alloca_h=yes
c971b7fa 6025else
8690e634 6026 ac_cv_working_alloca_h=no
c971b7fa
PA
6027fi
6028rm -f core conftest.err conftest.$ac_objext \
6029 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6030fi
8690e634
JK
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6032$as_echo "$ac_cv_working_alloca_h" >&6; }
6033if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6034
8690e634 6035$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6036
8690e634 6037fi
c971b7fa 6038
8690e634
JK
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6040$as_echo_n "checking for alloca... " >&6; }
6041if test "${ac_cv_func_alloca_works+set}" = set; then :
c971b7fa 6042 $as_echo_n "(cached) " >&6
c971b7fa
PA
6043else
6044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6045/* end confdefs.h. */
8690e634
JK
6046#ifdef __GNUC__
6047# define alloca __builtin_alloca
6048#else
6049# ifdef _MSC_VER
6050# include <malloc.h>
6051# define alloca _alloca
6052# else
6053# ifdef HAVE_ALLOCA_H
6054# include <alloca.h>
6055# else
6056# ifdef _AIX
6057 #pragma alloca
6058# else
6059# ifndef alloca /* predefined by HP cc +Olibcalls */
6060char *alloca ();
6061# endif
6062# endif
6063# endif
6064# endif
6065#endif
6066
c971b7fa
PA
6067int
6068main ()
6069{
8690e634
JK
6070char *p = (char *) alloca (1);
6071 if (p) return 0;
c971b7fa
PA
6072 ;
6073 return 0;
6074}
6075_ACEOF
8690e634
JK
6076if ac_fn_c_try_link "$LINENO"; then :
6077 ac_cv_func_alloca_works=yes
c971b7fa 6078else
8690e634 6079 ac_cv_func_alloca_works=no
c971b7fa 6080fi
8690e634
JK
6081rm -f core conftest.err conftest.$ac_objext \
6082 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6083fi
a143c6de
JB
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6085$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6086
a143c6de 6087if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6088
a143c6de 6089$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6090
a143c6de
JB
6091else
6092 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6093# that cause trouble. Some versions do not even contain alloca or
6094# contain a buggy version. If you still want to use their alloca,
6095# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6096
6097
6098
6099
6100
a143c6de 6101ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6102
a143c6de 6103$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6104
c971b7fa 6105
a143c6de
JB
6106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6107$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6108if test "${ac_cv_os_cray+set}" = set; then :
8690e634
JK
6109 $as_echo_n "(cached) " >&6
6110else
a143c6de 6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6112/* end confdefs.h. */
a143c6de
JB
6113#if defined CRAY && ! defined CRAY2
6114webecray
6115#else
6116wenotbecray
8690e634 6117#endif
c971b7fa 6118
8690e634
JK
6119_ACEOF
6120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6121 $EGREP "webecray" >/dev/null 2>&1; then :
6122 ac_cv_os_cray=yes
8690e634 6123else
a143c6de 6124 ac_cv_os_cray=no
8690e634
JK
6125fi
6126rm -f conftest*
c971b7fa 6127
c0fc7f8b 6128fi
a143c6de
JB
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6130$as_echo "$ac_cv_os_cray" >&6; }
6131if test $ac_cv_os_cray = yes; then
6132 for ac_func in _getb67 GETB67 getb67; do
6133 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6134ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6135eval as_val=\$$as_ac_var
6136 if test "x$as_val" = x""yes; then :
c0fc7f8b 6137
a143c6de
JB
6138cat >>confdefs.h <<_ACEOF
6139#define CRAY_STACKSEG_END $ac_func
6140_ACEOF
c971b7fa 6141
a143c6de 6142 break
8690e634 6143fi
c971b7fa 6144
a143c6de 6145 done
8690e634 6146fi
c0fc7f8b 6147
a143c6de
JB
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6149$as_echo_n "checking stack direction for C alloca... " >&6; }
6150if test "${ac_cv_c_stack_direction+set}" = set; then :
c971b7fa
PA
6151 $as_echo_n "(cached) " >&6
6152else
a143c6de
JB
6153 if test "$cross_compiling" = yes; then :
6154 ac_cv_c_stack_direction=0
6155else
6156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6157/* end confdefs.h. */
a143c6de
JB
6158$ac_includes_default
6159int
6160find_stack_direction (int *addr, int depth)
6161{
6162 int dir, dummy = 0;
6163 if (! addr)
6164 addr = &dummy;
6165 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6166 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6167 return dir + dummy;
6168}
8690e634 6169
a143c6de
JB
6170int
6171main (int argc, char **argv)
6172{
6173 return find_stack_direction (0, argc + !argv + 20) < 0;
6174}
c971b7fa 6175_ACEOF
a143c6de
JB
6176if ac_fn_c_try_run "$LINENO"; then :
6177 ac_cv_c_stack_direction=1
c971b7fa 6178else
a143c6de 6179 ac_cv_c_stack_direction=-1
8690e634 6180fi
a143c6de
JB
6181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6182 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6183fi
c971b7fa
PA
6184
6185fi
a143c6de
JB
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6187$as_echo "$ac_cv_c_stack_direction" >&6; }
6188cat >>confdefs.h <<_ACEOF
6189#define STACK_DIRECTION $ac_cv_c_stack_direction
6190_ACEOF
8690e634 6191
c971b7fa
PA
6192
6193fi
c971b7fa
PA
6194
6195
98399780
YQ
6196 GNULIB__EXIT=0;
6197 GNULIB_ATOLL=0;
6198 GNULIB_CALLOC_POSIX=0;
6199 GNULIB_CANONICALIZE_FILE_NAME=0;
6200 GNULIB_GETLOADAVG=0;
6201 GNULIB_GETSUBOPT=0;
6202 GNULIB_GRANTPT=0;
6203 GNULIB_MALLOC_POSIX=0;
6204 GNULIB_MBTOWC=0;
6205 GNULIB_MKDTEMP=0;
6206 GNULIB_MKOSTEMP=0;
6207 GNULIB_MKOSTEMPS=0;
6208 GNULIB_MKSTEMP=0;
6209 GNULIB_MKSTEMPS=0;
6210 GNULIB_POSIX_OPENPT=0;
6211 GNULIB_PTSNAME=0;
6212 GNULIB_PTSNAME_R=0;
6213 GNULIB_PUTENV=0;
4a626d0a 6214 GNULIB_QSORT_R=0;
98399780
YQ
6215 GNULIB_RANDOM=0;
6216 GNULIB_RANDOM_R=0;
6217 GNULIB_REALLOC_POSIX=0;
6218 GNULIB_REALPATH=0;
6219 GNULIB_RPMATCH=0;
4a626d0a 6220 GNULIB_SECURE_GETENV=0;
98399780
YQ
6221 GNULIB_SETENV=0;
6222 GNULIB_STRTOD=0;
6223 GNULIB_STRTOLL=0;
6224 GNULIB_STRTOULL=0;
6225 GNULIB_SYSTEM_POSIX=0;
6226 GNULIB_UNLOCKPT=0;
6227 GNULIB_UNSETENV=0;
6228 GNULIB_WCTOMB=0;
6229 HAVE__EXIT=1;
6230 HAVE_ATOLL=1;
6231 HAVE_CANONICALIZE_FILE_NAME=1;
6232 HAVE_DECL_GETLOADAVG=1;
6233 HAVE_GETSUBOPT=1;
6234 HAVE_GRANTPT=1;
6235 HAVE_MKDTEMP=1;
6236 HAVE_MKOSTEMP=1;
6237 HAVE_MKOSTEMPS=1;
6238 HAVE_MKSTEMP=1;
6239 HAVE_MKSTEMPS=1;
6240 HAVE_POSIX_OPENPT=1;
6241 HAVE_PTSNAME=1;
6242 HAVE_PTSNAME_R=1;
4c62b19f 6243 HAVE_QSORT_R=1;
98399780
YQ
6244 HAVE_RANDOM=1;
6245 HAVE_RANDOM_H=1;
6246 HAVE_RANDOM_R=1;
6247 HAVE_REALPATH=1;
6248 HAVE_RPMATCH=1;
4a626d0a 6249 HAVE_SECURE_GETENV=1;
98399780
YQ
6250 HAVE_SETENV=1;
6251 HAVE_DECL_SETENV=1;
6252 HAVE_STRTOD=1;
6253 HAVE_STRTOLL=1;
6254 HAVE_STRTOULL=1;
6255 HAVE_STRUCT_RANDOM_DATA=1;
6256 HAVE_SYS_LOADAVG_H=0;
6257 HAVE_UNLOCKPT=1;
6258 HAVE_DECL_UNSETENV=1;
6259 REPLACE_CALLOC=0;
6260 REPLACE_CANONICALIZE_FILE_NAME=0;
6261 REPLACE_MALLOC=0;
6262 REPLACE_MBTOWC=0;
6263 REPLACE_MKSTEMP=0;
6264 REPLACE_PTSNAME=0;
6265 REPLACE_PTSNAME_R=0;
6266 REPLACE_PUTENV=0;
4a626d0a 6267 REPLACE_QSORT_R=0;
98399780
YQ
6268 REPLACE_RANDOM_R=0;
6269 REPLACE_REALLOC=0;
6270 REPLACE_REALPATH=0;
6271 REPLACE_SETENV=0;
6272 REPLACE_STRTOD=0;
6273 REPLACE_UNSETENV=0;
6274 REPLACE_WCTOMB=0;
6275
6276
6277
6278
6279 for ac_func in $ac_func_list
6280do :
6281 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6282ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6283eval as_val=\$$as_ac_var
6284 if test "x$as_val" = x""yes; then :
6285 cat >>confdefs.h <<_ACEOF
6286#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6287_ACEOF
6288
6289fi
6290done
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6301$as_echo_n "checking whether // is distinct from /... " >&6; }
6302if test "${gl_cv_double_slash_root+set}" = set; then :
6303 $as_echo_n "(cached) " >&6
6304else
6305 if test x"$cross_compiling" = xyes ; then
6306 # When cross-compiling, there is no way to tell whether // is special
6307 # short of a list of hosts. However, the only known hosts to date
6308 # that have a distinct // are Apollo DomainOS (too old to port to),
6309 # Cygwin, and z/OS. If anyone knows of another system for which // has
6310 # special semantics and is distinct from /, please report it to
6311 # <bug-gnulib@gnu.org>.
6312 case $host in
6313 *-cygwin | i370-ibm-openedition)
6314 gl_cv_double_slash_root=yes ;;
6315 *)
6316 # Be optimistic and assume that / and // are the same when we
6317 # don't know.
6318 gl_cv_double_slash_root='unknown, assuming no' ;;
6319 esac
6320 else
6321 set x `ls -di / // 2>/dev/null`
6322 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6323 gl_cv_double_slash_root=no
6324 else
6325 gl_cv_double_slash_root=yes
6326 fi
6327 fi
6328fi
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6330$as_echo "$gl_cv_double_slash_root" >&6; }
6331 if test "$gl_cv_double_slash_root" = yes; then
6332
6333$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6334
6335 fi
6336
6337
6338
6339
6340
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6342$as_echo_n "checking whether realpath works... " >&6; }
6343if test "${gl_cv_func_realpath_works+set}" = set; then :
6344 $as_echo_n "(cached) " >&6
6345else
6346
6347 touch conftest.a
6348 mkdir conftest.d
6349 if test "$cross_compiling" = yes; then :
6350 case "$host_os" in
6351 # Guess yes on glibc systems.
6352 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6353 # If we don't know, assume the worst.
6354 *) gl_cv_func_realpath_works="guessing no" ;;
6355 esac
6356
6357else
6358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6359/* end confdefs.h. */
6360
6361
6362
6363#include <stdlib.h>
6364#if defined __MACH__ && defined __APPLE__
6365/* Avoid a crash on Mac OS X. */
6366#include <mach/mach.h>
6367#include <mach/mach_error.h>
6368#include <mach/thread_status.h>
6369#include <mach/exception.h>
6370#include <mach/task.h>
6371#include <pthread.h>
6372/* The exception port on which our thread listens. */
6373static mach_port_t our_exception_port;
6374/* The main function of the thread listening for exceptions of type
6375 EXC_BAD_ACCESS. */
6376static void *
6377mach_exception_thread (void *arg)
6378{
6379 /* Buffer for a message to be received. */
6380 struct {
6381 mach_msg_header_t head;
6382 mach_msg_body_t msgh_body;
6383 char data[1024];
6384 } msg;
6385 mach_msg_return_t retval;
6386 /* Wait for a message on the exception port. */
6387 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6388 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6389 if (retval != MACH_MSG_SUCCESS)
6390 abort ();
6391 exit (1);
6392}
6393static void
6394nocrash_init (void)
6395{
6396 mach_port_t self = mach_task_self ();
6397 /* Allocate a port on which the thread shall listen for exceptions. */
6398 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6399 == KERN_SUCCESS) {
6400 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6401 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6402 MACH_MSG_TYPE_MAKE_SEND)
6403 == KERN_SUCCESS) {
6404 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6405 for us. */
6406 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6407 /* Create the thread listening on the exception port. */
6408 pthread_attr_t attr;
6409 pthread_t thread;
6410 if (pthread_attr_init (&attr) == 0
6411 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6412 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6413 pthread_attr_destroy (&attr);
6414 /* Replace the exception port info for these exceptions with our own.
6415 Note that we replace the exception port for the entire task, not only
6416 for a particular thread. This has the effect that when our exception
6417 port gets the message, the thread specific exception port has already
6418 been asked, and we don't need to bother about it.
6419 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6420 task_set_exception_ports (self, mask, our_exception_port,
6421 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6422 }
6423 }
6424 }
6425}
6426#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6427/* Avoid a crash on native Windows. */
6428#define WIN32_LEAN_AND_MEAN
6429#include <windows.h>
6430#include <winerror.h>
6431static LONG WINAPI
6432exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6433{
6434 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6435 {
6436 case EXCEPTION_ACCESS_VIOLATION:
6437 case EXCEPTION_IN_PAGE_ERROR:
6438 case EXCEPTION_STACK_OVERFLOW:
6439 case EXCEPTION_GUARD_PAGE:
6440 case EXCEPTION_PRIV_INSTRUCTION:
6441 case EXCEPTION_ILLEGAL_INSTRUCTION:
6442 case EXCEPTION_DATATYPE_MISALIGNMENT:
6443 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6444 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6445 exit (1);
6446 }
6447 return EXCEPTION_CONTINUE_SEARCH;
6448}
6449static void
6450nocrash_init (void)
6451{
6452 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6453}
6454#else
6455/* Avoid a crash on POSIX systems. */
6456#include <signal.h>
49e4877c 6457#include <unistd.h>
98399780
YQ
6458/* A POSIX signal handler. */
6459static void
6460exception_handler (int sig)
6461{
49e4877c 6462 _exit (1);
98399780
YQ
6463}
6464static void
6465nocrash_init (void)
6466{
6467#ifdef SIGSEGV
6468 signal (SIGSEGV, exception_handler);
6469#endif
6470#ifdef SIGBUS
6471 signal (SIGBUS, exception_handler);
6472#endif
6473}
6474#endif
6475
6476 #include <stdlib.h>
6477 #include <string.h>
6478
6479int
6480main ()
6481{
6482
6483 int result = 0;
6484 {
6485 char *name = realpath ("conftest.a", NULL);
6486 if (!(name && *name == '/'))
6487 result |= 1;
49e4877c 6488 free (name);
98399780
YQ
6489 }
6490 {
6491 char *name = realpath ("conftest.b/../conftest.a", NULL);
6492 if (name != NULL)
6493 result |= 2;
49e4877c 6494 free (name);
98399780
YQ
6495 }
6496 {
6497 char *name = realpath ("conftest.a/", NULL);
6498 if (name != NULL)
6499 result |= 4;
49e4877c 6500 free (name);
98399780
YQ
6501 }
6502 {
6503 char *name1 = realpath (".", NULL);
6504 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6505 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 6506 result |= 8;
49e4877c
PA
6507 free (name1);
6508 free (name2);
98399780
YQ
6509 }
6510 return result;
6511
6512 ;
6513 return 0;
6514}
6515
6516_ACEOF
6517if ac_fn_c_try_run "$LINENO"; then :
6518 gl_cv_func_realpath_works=yes
6519else
6520 gl_cv_func_realpath_works=no
6521fi
6522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6523 conftest.$ac_objext conftest.beam conftest.$ac_ext
6524fi
6525
6526 rm -rf conftest.a conftest.d
6527
6528fi
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
6530$as_echo "$gl_cv_func_realpath_works" >&6; }
6531 case "$gl_cv_func_realpath_works" in
6532 *yes)
6533
6534$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
6535
6536 ;;
6537 esac
6538
6539
6540
6541
6542 for ac_header in $ac_header_list
6543do :
6544 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6545ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6546"
6547eval as_val=\$$as_ac_Header
6548 if test "x$as_val" = x""yes; then :
6549 cat >>confdefs.h <<_ACEOF
6550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6551_ACEOF
6552
6553fi
6554
6555done
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
e26b6bb0
TT
6567 GNULIB_CHDIR=0;
6568 GNULIB_CHOWN=0;
6569 GNULIB_CLOSE=0;
6570 GNULIB_DUP=0;
6571 GNULIB_DUP2=0;
6572 GNULIB_DUP3=0;
6573 GNULIB_ENVIRON=0;
6574 GNULIB_EUIDACCESS=0;
6575 GNULIB_FACCESSAT=0;
6576 GNULIB_FCHDIR=0;
6577 GNULIB_FCHOWNAT=0;
6578 GNULIB_FDATASYNC=0;
6579 GNULIB_FSYNC=0;
6580 GNULIB_FTRUNCATE=0;
6581 GNULIB_GETCWD=0;
6582 GNULIB_GETDOMAINNAME=0;
6583 GNULIB_GETDTABLESIZE=0;
6584 GNULIB_GETGROUPS=0;
6585 GNULIB_GETHOSTNAME=0;
6586 GNULIB_GETLOGIN=0;
6587 GNULIB_GETLOGIN_R=0;
6588 GNULIB_GETPAGESIZE=0;
6589 GNULIB_GETUSERSHELL=0;
6590 GNULIB_GROUP_MEMBER=0;
6591 GNULIB_ISATTY=0;
6592 GNULIB_LCHOWN=0;
6593 GNULIB_LINK=0;
6594 GNULIB_LINKAT=0;
6595 GNULIB_LSEEK=0;
6596 GNULIB_PIPE=0;
6597 GNULIB_PIPE2=0;
6598 GNULIB_PREAD=0;
6599 GNULIB_PWRITE=0;
6600 GNULIB_READ=0;
6601 GNULIB_READLINK=0;
6602 GNULIB_READLINKAT=0;
6603 GNULIB_RMDIR=0;
6604 GNULIB_SETHOSTNAME=0;
6605 GNULIB_SLEEP=0;
6606 GNULIB_SYMLINK=0;
6607 GNULIB_SYMLINKAT=0;
6608 GNULIB_TTYNAME_R=0;
6609 GNULIB_UNISTD_H_NONBLOCKING=0;
6610 GNULIB_UNISTD_H_SIGPIPE=0;
6611 GNULIB_UNLINK=0;
6612 GNULIB_UNLINKAT=0;
6613 GNULIB_USLEEP=0;
6614 GNULIB_WRITE=0;
6615 HAVE_CHOWN=1;
6616 HAVE_DUP2=1;
6617 HAVE_DUP3=1;
6618 HAVE_EUIDACCESS=1;
6619 HAVE_FACCESSAT=1;
6620 HAVE_FCHDIR=1;
6621 HAVE_FCHOWNAT=1;
6622 HAVE_FDATASYNC=1;
6623 HAVE_FSYNC=1;
6624 HAVE_FTRUNCATE=1;
6625 HAVE_GETDTABLESIZE=1;
6626 HAVE_GETGROUPS=1;
6627 HAVE_GETHOSTNAME=1;
6628 HAVE_GETLOGIN=1;
6629 HAVE_GETPAGESIZE=1;
6630 HAVE_GROUP_MEMBER=1;
6631 HAVE_LCHOWN=1;
6632 HAVE_LINK=1;
6633 HAVE_LINKAT=1;
6634 HAVE_PIPE=1;
6635 HAVE_PIPE2=1;
6636 HAVE_PREAD=1;
6637 HAVE_PWRITE=1;
6638 HAVE_READLINK=1;
6639 HAVE_READLINKAT=1;
6640 HAVE_SETHOSTNAME=1;
6641 HAVE_SLEEP=1;
6642 HAVE_SYMLINK=1;
6643 HAVE_SYMLINKAT=1;
6644 HAVE_UNLINKAT=1;
6645 HAVE_USLEEP=1;
6646 HAVE_DECL_ENVIRON=1;
6647 HAVE_DECL_FCHDIR=1;
6648 HAVE_DECL_FDATASYNC=1;
6649 HAVE_DECL_GETDOMAINNAME=1;
6650 HAVE_DECL_GETLOGIN_R=1;
6651 HAVE_DECL_GETPAGESIZE=1;
6652 HAVE_DECL_GETUSERSHELL=1;
6653 HAVE_DECL_SETHOSTNAME=1;
6654 HAVE_DECL_TTYNAME_R=1;
6655 HAVE_OS_H=0;
6656 HAVE_SYS_PARAM_H=0;
6657 REPLACE_CHOWN=0;
6658 REPLACE_CLOSE=0;
6659 REPLACE_DUP=0;
6660 REPLACE_DUP2=0;
6661 REPLACE_FCHOWNAT=0;
6662 REPLACE_FTRUNCATE=0;
6663 REPLACE_GETCWD=0;
6664 REPLACE_GETDOMAINNAME=0;
4a626d0a 6665 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
6666 REPLACE_GETLOGIN_R=0;
6667 REPLACE_GETGROUPS=0;
6668 REPLACE_GETPAGESIZE=0;
6669 REPLACE_ISATTY=0;
6670 REPLACE_LCHOWN=0;
6671 REPLACE_LINK=0;
6672 REPLACE_LINKAT=0;
6673 REPLACE_LSEEK=0;
6674 REPLACE_PREAD=0;
6675 REPLACE_PWRITE=0;
6676 REPLACE_READ=0;
6677 REPLACE_READLINK=0;
4a626d0a 6678 REPLACE_READLINKAT=0;
e26b6bb0
TT
6679 REPLACE_RMDIR=0;
6680 REPLACE_SLEEP=0;
6681 REPLACE_SYMLINK=0;
4a626d0a 6682 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
6683 REPLACE_TTYNAME_R=0;
6684 REPLACE_UNLINK=0;
6685 REPLACE_UNLINKAT=0;
6686 REPLACE_USLEEP=0;
6687 REPLACE_WRITE=0;
6688 UNISTD_H_HAVE_WINSOCK2_H=0;
6689 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
6690
6691
6692
6693 GNULIB_OPENDIR=0;
6694 GNULIB_READDIR=0;
6695 GNULIB_REWINDDIR=0;
6696 GNULIB_CLOSEDIR=0;
6697 GNULIB_DIRFD=0;
6698 GNULIB_FDOPENDIR=0;
6699 GNULIB_SCANDIR=0;
6700 GNULIB_ALPHASORT=0;
6701 HAVE_OPENDIR=1;
6702 HAVE_READDIR=1;
6703 HAVE_REWINDDIR=1;
6704 HAVE_CLOSEDIR=1;
6705 HAVE_DECL_DIRFD=1;
6706 HAVE_DECL_FDOPENDIR=1;
6707 HAVE_FDOPENDIR=1;
6708 HAVE_SCANDIR=1;
6709 HAVE_ALPHASORT=1;
6710 REPLACE_OPENDIR=0;
6711 REPLACE_CLOSEDIR=0;
6712 REPLACE_DIRFD=0;
6713 REPLACE_FDOPENDIR=0;
6714
6715
6716
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6718$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6719if test "${gl_cv_have_include_next+set}" = set; then :
6720 $as_echo_n "(cached) " >&6
6721else
6722 rm -rf conftestd1a conftestd1b conftestd2
6723 mkdir conftestd1a conftestd1b conftestd2
6724 cat <<EOF > conftestd1a/conftest.h
6725#define DEFINED_IN_CONFTESTD1
6726#include_next <conftest.h>
6727#ifdef DEFINED_IN_CONFTESTD2
6728int foo;
6729#else
88b48903
WN
6730#error "include_next doesn't work"
6731#endif
6732EOF
6733 cat <<EOF > conftestd1b/conftest.h
6734#define DEFINED_IN_CONFTESTD1
6735#include <stdio.h>
6736#include_next <conftest.h>
6737#ifdef DEFINED_IN_CONFTESTD2
6738int foo;
6739#else
6740#error "include_next doesn't work"
6741#endif
6742EOF
6743 cat <<EOF > conftestd2/conftest.h
6744#ifndef DEFINED_IN_CONFTESTD1
6745#error "include_next test doesn't work"
6746#endif
6747#define DEFINED_IN_CONFTESTD2
6748EOF
6749 gl_save_CPPFLAGS="$CPPFLAGS"
6750 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6752/* end confdefs.h. */
6753#include <conftest.h>
6754_ACEOF
6755if ac_fn_c_try_compile "$LINENO"; then :
6756 gl_cv_have_include_next=yes
6757else
6758 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760/* end confdefs.h. */
6761#include <conftest.h>
6762_ACEOF
6763if ac_fn_c_try_compile "$LINENO"; then :
6764 gl_cv_have_include_next=buggy
6765else
6766 gl_cv_have_include_next=no
6767fi
6768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6769
6770fi
6771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6772 CPPFLAGS="$gl_save_CPPFLAGS"
6773 rm -rf conftestd1a conftestd1b conftestd2
6774
6775fi
6776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6777$as_echo "$gl_cv_have_include_next" >&6; }
6778 PRAGMA_SYSTEM_HEADER=
6779 if test $gl_cv_have_include_next = yes; then
6780 INCLUDE_NEXT=include_next
6781 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6782 if test -n "$GCC"; then
6783 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6784 fi
6785 else
6786 if test $gl_cv_have_include_next = buggy; then
6787 INCLUDE_NEXT=include
6788 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6789 else
6790 INCLUDE_NEXT=include
6791 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6792 fi
6793 fi
6794
6795
6796
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
6798$as_echo_n "checking whether system header files limit the line length... " >&6; }
6799if test "${gl_cv_pragma_columns+set}" = set; then :
6800 $as_echo_n "(cached) " >&6
6801else
6802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6803/* end confdefs.h. */
6804
6805#ifdef __TANDEM
6806choke me
6807#endif
6808
6809_ACEOF
6810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6811 $EGREP "choke me" >/dev/null 2>&1; then :
6812 gl_cv_pragma_columns=yes
6813else
6814 gl_cv_pragma_columns=no
6815fi
6816rm -f conftest*
6817
6818
6819fi
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
6821$as_echo "$gl_cv_pragma_columns" >&6; }
6822 if test $gl_cv_pragma_columns = yes; then
6823 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
6824 else
6825 PRAGMA_COLUMNS=
6826 fi
6827
6828
6829
6830
e26b6bb0 6831
e26b6bb0 6832
3d99e817
AK
6833
6834
6835
6836
6837
6838
6839
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
6841$as_echo_n "checking if environ is properly declared... " >&6; }
6842 if test "${gt_cv_var_environ_declaration+set}" = set; then :
6843 $as_echo_n "(cached) " >&6
6844else
6845
6846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6847/* end confdefs.h. */
6848#if HAVE_UNISTD_H
6849 #include <unistd.h>
6850 #endif
6851 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
6852 #include <stdlib.h>
6853
6854 extern struct { int foo; } environ;
6855int
6856main ()
6857{
6858environ.foo = 1;
6859 ;
6860 return 0;
6861}
6862_ACEOF
6863if ac_fn_c_try_compile "$LINENO"; then :
6864 gt_cv_var_environ_declaration=no
6865else
6866 gt_cv_var_environ_declaration=yes
6867fi
6868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6869fi
6870
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
6872$as_echo "$gt_cv_var_environ_declaration" >&6; }
6873 if test $gt_cv_var_environ_declaration = yes; then
6874
6875$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
6876
6877 fi
6878
6879
6880 if test $gt_cv_var_environ_declaration != yes; then
6881 HAVE_DECL_ENVIRON=0
6882 fi
6883
6884
6885
18848e28
GF
6886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
6887$as_echo_n "checking for complete errno.h... " >&6; }
6888if test "${gl_cv_header_errno_h_complete+set}" = set; then :
6889 $as_echo_n "(cached) " >&6
6890else
6891
6892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6893/* end confdefs.h. */
6894
6895#include <errno.h>
6896#if !defined ETXTBSY
6897booboo
6898#endif
6899#if !defined ENOMSG
6900booboo
6901#endif
6902#if !defined EIDRM
6903booboo
6904#endif
6905#if !defined ENOLINK
6906booboo
6907#endif
6908#if !defined EPROTO
6909booboo
6910#endif
6911#if !defined EMULTIHOP
6912booboo
6913#endif
6914#if !defined EBADMSG
6915booboo
6916#endif
6917#if !defined EOVERFLOW
6918booboo
6919#endif
6920#if !defined ENOTSUP
6921booboo
6922#endif
6923#if !defined ENETRESET
6924booboo
6925#endif
6926#if !defined ECONNABORTED
6927booboo
6928#endif
6929#if !defined ESTALE
6930booboo
6931#endif
6932#if !defined EDQUOT
6933booboo
6934#endif
6935#if !defined ECANCELED
6936booboo
6937#endif
6938#if !defined EOWNERDEAD
6939booboo
6940#endif
6941#if !defined ENOTRECOVERABLE
6942booboo
6943#endif
6944#if !defined EILSEQ
6945booboo
6946#endif
6947
6948_ACEOF
6949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6950 $EGREP "booboo" >/dev/null 2>&1; then :
6951 gl_cv_header_errno_h_complete=no
6952else
6953 gl_cv_header_errno_h_complete=yes
6954fi
6955rm -f conftest*
6956
6957
6958fi
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
6960$as_echo "$gl_cv_header_errno_h_complete" >&6; }
6961 if test $gl_cv_header_errno_h_complete = yes; then
6962 ERRNO_H=''
6963 else
6964
6965
6966
6967
6968
6969
6970
6971
6972 if test $gl_cv_have_include_next = yes; then
6973 gl_cv_next_errno_h='<'errno.h'>'
6974 else
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
6976$as_echo_n "checking absolute name of <errno.h>... " >&6; }
6977if test "${gl_cv_next_errno_h+set}" = set; then :
6978 $as_echo_n "(cached) " >&6
6979else
6980
4a626d0a
PA
6981
6982
6983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
6984/* end confdefs.h. */
6985#include <errno.h>
18848e28 6986_ACEOF
4a626d0a
PA
6987 case "$host_os" in
6988 aix*) gl_absname_cpp="$ac_cpp -C" ;;
6989 *) gl_absname_cpp="$ac_cpp" ;;
6990 esac
18848e28 6991
4a626d0a
PA
6992 case "$host_os" in
6993 mingw*)
6994 gl_dirsep_regex='[/\\]'
6995 ;;
6996 *)
6997 gl_dirsep_regex='\/'
6998 ;;
6999 esac
7000 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7001 gl_header_literal_regex=`echo 'errno.h' \
7002 | sed -e "$gl_make_literal_regex_sed"`
7003 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7004 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7005 s|^/[^/]|//&|
7006 p
7007 q
7008 }'
7009
7010 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7011 sed -n "$gl_absolute_header_sed"`
7012
7013 gl_header=$gl_cv_absolute_errno_h
7014 gl_cv_next_errno_h='"'$gl_header'"'
7015
7016
7017fi
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7019$as_echo "$gl_cv_next_errno_h" >&6; }
7020 fi
7021 NEXT_ERRNO_H=$gl_cv_next_errno_h
7022
7023 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7024 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7025 gl_next_as_first_directive='<'errno.h'>'
7026 else
7027 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7028 gl_next_as_first_directive=$gl_cv_next_errno_h
7029 fi
7030 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7031
7032
7033
7034
7035 ERRNO_H='errno.h'
7036 fi
7037
7038 if test -n "$ERRNO_H"; then
7039 GL_GENERATE_ERRNO_H_TRUE=
7040 GL_GENERATE_ERRNO_H_FALSE='#'
7041else
7042 GL_GENERATE_ERRNO_H_TRUE='#'
7043 GL_GENERATE_ERRNO_H_FALSE=
7044fi
7045
7046
7047 if test -n "$ERRNO_H"; then
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7049$as_echo_n "checking for EMULTIHOP value... " >&6; }
7050if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
7051 $as_echo_n "(cached) " >&6
7052else
7053
7054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7055/* end confdefs.h. */
7056
7057#include <errno.h>
7058#ifdef EMULTIHOP
7059yes
7060#endif
7061
7062_ACEOF
7063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7064 $EGREP "yes" >/dev/null 2>&1; then :
7065 gl_cv_header_errno_h_EMULTIHOP=yes
7066else
7067 gl_cv_header_errno_h_EMULTIHOP=no
7068fi
7069rm -f conftest*
7070
7071 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073/* end confdefs.h. */
7074
7075#define _XOPEN_SOURCE_EXTENDED 1
7076#include <errno.h>
7077#ifdef EMULTIHOP
7078yes
7079#endif
7080
7081_ACEOF
7082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7083 $EGREP "yes" >/dev/null 2>&1; then :
7084 gl_cv_header_errno_h_EMULTIHOP=hidden
7085fi
7086rm -f conftest*
7087
7088 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7089 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7090#define _XOPEN_SOURCE_EXTENDED 1
7091#include <errno.h>
7092/* The following two lines are a workaround against an autoconf-2.52 bug. */
7093#include <stdio.h>
7094#include <stdlib.h>
7095"; then :
7096
7097fi
7098
7099 fi
7100 fi
7101
7102fi
7103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7104$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7105 case $gl_cv_header_errno_h_EMULTIHOP in
7106 yes | no)
7107 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7108 ;;
7109 *)
7110 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7111 ;;
7112 esac
7113
7114
7115 fi
7116
7117
7118 if test -n "$ERRNO_H"; then
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7120$as_echo_n "checking for ENOLINK value... " >&6; }
7121if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
7122 $as_echo_n "(cached) " >&6
7123else
7124
7125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126/* end confdefs.h. */
7127
7128#include <errno.h>
7129#ifdef ENOLINK
7130yes
7131#endif
7132
7133_ACEOF
7134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7135 $EGREP "yes" >/dev/null 2>&1; then :
7136 gl_cv_header_errno_h_ENOLINK=yes
7137else
7138 gl_cv_header_errno_h_ENOLINK=no
7139fi
7140rm -f conftest*
7141
7142 if test $gl_cv_header_errno_h_ENOLINK = no; then
7143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7144/* end confdefs.h. */
7145
7146#define _XOPEN_SOURCE_EXTENDED 1
7147#include <errno.h>
7148#ifdef ENOLINK
7149yes
7150#endif
7151
7152_ACEOF
7153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7154 $EGREP "yes" >/dev/null 2>&1; then :
7155 gl_cv_header_errno_h_ENOLINK=hidden
7156fi
7157rm -f conftest*
7158
7159 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7160 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7161#define _XOPEN_SOURCE_EXTENDED 1
7162#include <errno.h>
7163/* The following two lines are a workaround against an autoconf-2.52 bug. */
7164#include <stdio.h>
7165#include <stdlib.h>
7166"; then :
7167
7168fi
7169
7170 fi
7171 fi
7172
7173fi
7174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7175$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7176 case $gl_cv_header_errno_h_ENOLINK in
7177 yes | no)
7178 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7179 ;;
7180 *)
7181 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7182 ;;
7183 esac
7184
7185
7186 fi
7187
7188
7189 if test -n "$ERRNO_H"; then
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7191$as_echo_n "checking for EOVERFLOW value... " >&6; }
7192if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
7193 $as_echo_n "(cached) " >&6
7194else
7195
7196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7197/* end confdefs.h. */
7198
7199#include <errno.h>
7200#ifdef EOVERFLOW
7201yes
7202#endif
7203
7204_ACEOF
7205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7206 $EGREP "yes" >/dev/null 2>&1; then :
7207 gl_cv_header_errno_h_EOVERFLOW=yes
7208else
7209 gl_cv_header_errno_h_EOVERFLOW=no
7210fi
7211rm -f conftest*
7212
7213 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215/* end confdefs.h. */
7216
7217#define _XOPEN_SOURCE_EXTENDED 1
7218#include <errno.h>
7219#ifdef EOVERFLOW
7220yes
7221#endif
7222
7223_ACEOF
7224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7225 $EGREP "yes" >/dev/null 2>&1; then :
7226 gl_cv_header_errno_h_EOVERFLOW=hidden
7227fi
7228rm -f conftest*
7229
7230 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7231 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7232#define _XOPEN_SOURCE_EXTENDED 1
7233#include <errno.h>
7234/* The following two lines are a workaround against an autoconf-2.52 bug. */
7235#include <stdio.h>
7236#include <stdlib.h>
7237"; then :
7238
7239fi
7240
7241 fi
7242 fi
7243
7244fi
7245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7246$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7247 case $gl_cv_header_errno_h_EOVERFLOW in
7248 yes | no)
7249 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7250 ;;
7251 *)
7252 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7253 ;;
7254 esac
7255
7256
7257 fi
7258
7259
7260
7261
63ce7108
TT
7262
7263
7264
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
7266$as_echo_n "checking for mbstate_t... " >&6; }
7267if test "${ac_cv_type_mbstate_t+set}" = set; then :
7268 $as_echo_n "(cached) " >&6
7269else
7270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7271/* end confdefs.h. */
7272$ac_includes_default
7273/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7274 <wchar.h>.
7275 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7276 included before <wchar.h>. */
7277#include <stddef.h>
7278#include <stdio.h>
7279#include <time.h>
7280#include <wchar.h>
7281int
7282main ()
7283{
7284mbstate_t x; return sizeof x;
7285 ;
7286 return 0;
7287}
7288_ACEOF
7289if ac_fn_c_try_compile "$LINENO"; then :
7290 ac_cv_type_mbstate_t=yes
7291else
7292 ac_cv_type_mbstate_t=no
7293fi
7294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7295fi
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
7297$as_echo "$ac_cv_type_mbstate_t" >&6; }
7298 if test $ac_cv_type_mbstate_t = yes; then
7299
7300$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7301
7302 else
7303
7304$as_echo "#define mbstate_t int" >>confdefs.h
7305
7306 fi
7307
7308
7309
7310
63ce7108
TT
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
63ce7108
TT
7327 GNULIB_ACOSF=0;
7328 GNULIB_ACOSL=0;
7329 GNULIB_ASINF=0;
7330 GNULIB_ASINL=0;
7331 GNULIB_ATANF=0;
7332 GNULIB_ATANL=0;
7333 GNULIB_ATAN2F=0;
7334 GNULIB_CBRT=0;
7335 GNULIB_CBRTF=0;
7336 GNULIB_CBRTL=0;
7337 GNULIB_CEIL=0;
7338 GNULIB_CEILF=0;
7339 GNULIB_CEILL=0;
7340 GNULIB_COPYSIGN=0;
7341 GNULIB_COPYSIGNF=0;
88b48903
WN
7342 GNULIB_COPYSIGNL=0;
7343 GNULIB_COSF=0;
7344 GNULIB_COSL=0;
7345 GNULIB_COSHF=0;
7346 GNULIB_EXPF=0;
7347 GNULIB_EXPL=0;
7348 GNULIB_EXP2=0;
7349 GNULIB_EXP2F=0;
7350 GNULIB_EXP2L=0;
7351 GNULIB_EXPM1=0;
7352 GNULIB_EXPM1F=0;
7353 GNULIB_EXPM1L=0;
7354 GNULIB_FABSF=0;
7355 GNULIB_FABSL=0;
7356 GNULIB_FLOOR=0;
7357 GNULIB_FLOORF=0;
7358 GNULIB_FLOORL=0;
7359 GNULIB_FMA=0;
7360 GNULIB_FMAF=0;
7361 GNULIB_FMAL=0;
7362 GNULIB_FMOD=0;
7363 GNULIB_FMODF=0;
7364 GNULIB_FMODL=0;
7365 GNULIB_FREXPF=0;
7366 GNULIB_FREXP=0;
7367 GNULIB_FREXPL=0;
7368 GNULIB_HYPOT=0;
7369 GNULIB_HYPOTF=0;
7370 GNULIB_HYPOTL=0;
7371 GNULIB_ILOGB=0;
7372 GNULIB_ILOGBF=0;
7373 GNULIB_ILOGBL=0;
7374 GNULIB_ISFINITE=0;
7375 GNULIB_ISINF=0;
7376 GNULIB_ISNAN=0;
7377 GNULIB_ISNANF=0;
7378 GNULIB_ISNAND=0;
7379 GNULIB_ISNANL=0;
7380 GNULIB_LDEXPF=0;
7381 GNULIB_LDEXPL=0;
7382 GNULIB_LOG=0;
7383 GNULIB_LOGF=0;
7384 GNULIB_LOGL=0;
7385 GNULIB_LOG10=0;
7386 GNULIB_LOG10F=0;
7387 GNULIB_LOG10L=0;
7388 GNULIB_LOG1P=0;
7389 GNULIB_LOG1PF=0;
7390 GNULIB_LOG1PL=0;
7391 GNULIB_LOG2=0;
7392 GNULIB_LOG2F=0;
7393 GNULIB_LOG2L=0;
7394 GNULIB_LOGB=0;
7395 GNULIB_LOGBF=0;
7396 GNULIB_LOGBL=0;
7397 GNULIB_MODF=0;
7398 GNULIB_MODFF=0;
7399 GNULIB_MODFL=0;
7400 GNULIB_POWF=0;
7401 GNULIB_REMAINDER=0;
7402 GNULIB_REMAINDERF=0;
7403 GNULIB_REMAINDERL=0;
7404 GNULIB_RINT=0;
7405 GNULIB_RINTF=0;
7406 GNULIB_RINTL=0;
7407 GNULIB_ROUND=0;
7408 GNULIB_ROUNDF=0;
7409 GNULIB_ROUNDL=0;
7410 GNULIB_SIGNBIT=0;
7411 GNULIB_SINF=0;
7412 GNULIB_SINL=0;
7413 GNULIB_SINHF=0;
7414 GNULIB_SQRTF=0;
7415 GNULIB_SQRTL=0;
7416 GNULIB_TANF=0;
7417 GNULIB_TANL=0;
7418 GNULIB_TANHF=0;
7419 GNULIB_TRUNC=0;
7420 GNULIB_TRUNCF=0;
7421 GNULIB_TRUNCL=0;
7422 HAVE_ACOSF=1;
7423 HAVE_ACOSL=1;
7424 HAVE_ASINF=1;
7425 HAVE_ASINL=1;
7426 HAVE_ATANF=1;
7427 HAVE_ATANL=1;
7428 HAVE_ATAN2F=1;
7429 HAVE_CBRT=1;
7430 HAVE_CBRTF=1;
7431 HAVE_CBRTL=1;
7432 HAVE_COPYSIGN=1;
7433 HAVE_COPYSIGNL=1;
7434 HAVE_COSF=1;
7435 HAVE_COSL=1;
7436 HAVE_COSHF=1;
7437 HAVE_EXPF=1;
7438 HAVE_EXPL=1;
7439 HAVE_EXPM1=1;
7440 HAVE_EXPM1F=1;
7441 HAVE_FABSF=1;
7442 HAVE_FABSL=1;
7443 HAVE_FMA=1;
7444 HAVE_FMAF=1;
7445 HAVE_FMAL=1;
7446 HAVE_FMODF=1;
7447 HAVE_FMODL=1;
7448 HAVE_FREXPF=1;
7449 HAVE_HYPOTF=1;
7450 HAVE_HYPOTL=1;
7451 HAVE_ILOGB=1;
7452 HAVE_ILOGBF=1;
7453 HAVE_ILOGBL=1;
7454 HAVE_ISNANF=1;
7455 HAVE_ISNAND=1;
7456 HAVE_ISNANL=1;
7457 HAVE_LDEXPF=1;
7458 HAVE_LOGF=1;
7459 HAVE_LOGL=1;
7460 HAVE_LOG10F=1;
7461 HAVE_LOG10L=1;
7462 HAVE_LOG1P=1;
7463 HAVE_LOG1PF=1;
7464 HAVE_LOG1PL=1;
7465 HAVE_LOGBF=1;
7466 HAVE_LOGBL=1;
7467 HAVE_MODFF=1;
7468 HAVE_MODFL=1;
7469 HAVE_POWF=1;
7470 HAVE_REMAINDER=1;
7471 HAVE_REMAINDERF=1;
7472 HAVE_RINT=1;
7473 HAVE_RINTL=1;
7474 HAVE_SINF=1;
7475 HAVE_SINL=1;
7476 HAVE_SINHF=1;
7477 HAVE_SQRTF=1;
7478 HAVE_SQRTL=1;
7479 HAVE_TANF=1;
7480 HAVE_TANL=1;
7481 HAVE_TANHF=1;
7482 HAVE_DECL_ACOSL=1;
7483 HAVE_DECL_ASINL=1;
7484 HAVE_DECL_ATANL=1;
7485 HAVE_DECL_CBRTF=1;
7486 HAVE_DECL_CBRTL=1;
7487 HAVE_DECL_CEILF=1;
7488 HAVE_DECL_CEILL=1;
7489 HAVE_DECL_COPYSIGNF=1;
7490 HAVE_DECL_COSL=1;
7491 HAVE_DECL_EXPL=1;
7492 HAVE_DECL_EXP2=1;
7493 HAVE_DECL_EXP2F=1;
7494 HAVE_DECL_EXP2L=1;
7495 HAVE_DECL_EXPM1L=1;
7496 HAVE_DECL_FLOORF=1;
7497 HAVE_DECL_FLOORL=1;
7498 HAVE_DECL_FREXPL=1;
7499 HAVE_DECL_LDEXPL=1;
7500 HAVE_DECL_LOGL=1;
7501 HAVE_DECL_LOG10L=1;
7502 HAVE_DECL_LOG2=1;
7503 HAVE_DECL_LOG2F=1;
7504 HAVE_DECL_LOG2L=1;
7505 HAVE_DECL_LOGB=1;
7506 HAVE_DECL_REMAINDER=1;
7507 HAVE_DECL_REMAINDERL=1;
7508 HAVE_DECL_RINTF=1;
7509 HAVE_DECL_ROUND=1;
7510 HAVE_DECL_ROUNDF=1;
7511 HAVE_DECL_ROUNDL=1;
7512 HAVE_DECL_SINL=1;
7513 HAVE_DECL_SQRTL=1;
7514 HAVE_DECL_TANL=1;
7515 HAVE_DECL_TRUNC=1;
7516 HAVE_DECL_TRUNCF=1;
7517 HAVE_DECL_TRUNCL=1;
7518 REPLACE_CBRTF=0;
7519 REPLACE_CBRTL=0;
7520 REPLACE_CEIL=0;
7521 REPLACE_CEILF=0;
7522 REPLACE_CEILL=0;
7523 REPLACE_EXPM1=0;
7524 REPLACE_EXPM1F=0;
7525 REPLACE_EXP2=0;
7526 REPLACE_EXP2L=0;
7527 REPLACE_FABSL=0;
7528 REPLACE_FLOOR=0;
7529 REPLACE_FLOORF=0;
7530 REPLACE_FLOORL=0;
7531 REPLACE_FMA=0;
7532 REPLACE_FMAF=0;
7533 REPLACE_FMAL=0;
7534 REPLACE_FMOD=0;
7535 REPLACE_FMODF=0;
7536 REPLACE_FMODL=0;
7537 REPLACE_FREXPF=0;
7538 REPLACE_FREXP=0;
7539 REPLACE_FREXPL=0;
7540 REPLACE_HUGE_VAL=0;
7541 REPLACE_HYPOT=0;
7542 REPLACE_HYPOTF=0;
7543 REPLACE_HYPOTL=0;
7544 REPLACE_ILOGB=0;
7545 REPLACE_ILOGBF=0;
7546 REPLACE_ISFINITE=0;
7547 REPLACE_ISINF=0;
7548 REPLACE_ISNAN=0;
7549 REPLACE_LDEXPL=0;
7550 REPLACE_LOG=0;
7551 REPLACE_LOGF=0;
7552 REPLACE_LOGL=0;
7553 REPLACE_LOG10=0;
7554 REPLACE_LOG10F=0;
7555 REPLACE_LOG10L=0;
7556 REPLACE_LOG1P=0;
7557 REPLACE_LOG1PF=0;
7558 REPLACE_LOG1PL=0;
7559 REPLACE_LOG2=0;
7560 REPLACE_LOG2F=0;
7561 REPLACE_LOG2L=0;
7562 REPLACE_LOGB=0;
7563 REPLACE_LOGBF=0;
7564 REPLACE_LOGBL=0;
7565 REPLACE_MODF=0;
7566 REPLACE_MODFF=0;
7567 REPLACE_MODFL=0;
7568 REPLACE_NAN=0;
7569 REPLACE_REMAINDER=0;
7570 REPLACE_REMAINDERF=0;
7571 REPLACE_REMAINDERL=0;
7572 REPLACE_ROUND=0;
7573 REPLACE_ROUNDF=0;
7574 REPLACE_ROUNDL=0;
7575 REPLACE_SIGNBIT=0;
7576 REPLACE_SIGNBIT_USING_GCC=0;
7577 REPLACE_SQRTL=0;
7578 REPLACE_TRUNC=0;
7579 REPLACE_TRUNCF=0;
7580 REPLACE_TRUNCL=0;
7581
7582
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
7584$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
7585if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
7586 $as_echo_n "(cached) " >&6
7587else
7588
7589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590/* end confdefs.h. */
7591#include <math.h>
7592 double x;
7593int
7594main ()
7595{
7596int e; return frexp (x, &e) > 0;
7597 ;
7598 return 0;
7599}
7600_ACEOF
7601if ac_fn_c_try_link "$LINENO"; then :
7602 gl_cv_func_frexp_no_libm=yes
7603else
7604 gl_cv_func_frexp_no_libm=no
7605fi
7606rm -f core conftest.err conftest.$ac_objext \
7607 conftest$ac_exeext conftest.$ac_ext
7608
7609fi
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
7611$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
7612
4a626d0a
PA
7613ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
7614if test "x$ac_cv_have_decl_alarm" = x""yes; then :
7615 ac_have_decl=1
7616else
7617 ac_have_decl=0
7618fi
88b48903 7619
4a626d0a
PA
7620cat >>confdefs.h <<_ACEOF
7621#define HAVE_DECL_ALARM $ac_have_decl
7622_ACEOF
88b48903
WN
7623
7624
88b48903
WN
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
7626$as_echo_n "checking whether long double and double are the same... " >&6; }
7627if test "${gl_cv_long_double_equals_double+set}" = set; then :
7628 $as_echo_n "(cached) " >&6
7629else
7630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7631/* end confdefs.h. */
7632#include <float.h>
7633int
7634main ()
7635{
7636typedef int check[sizeof (long double) == sizeof (double)
7637 && LDBL_MANT_DIG == DBL_MANT_DIG
7638 && LDBL_MAX_EXP == DBL_MAX_EXP
7639 && LDBL_MIN_EXP == DBL_MIN_EXP
7640 ? 1 : -1];
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646if ac_fn_c_try_compile "$LINENO"; then :
7647 gl_cv_long_double_equals_double=yes
7648else
7649 gl_cv_long_double_equals_double=no
7650fi
7651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7652
7653fi
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
7655$as_echo "$gl_cv_long_double_equals_double" >&6; }
7656 if test $gl_cv_long_double_equals_double = yes; then
7657
7658$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7659
7660 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
7661 else
7662 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
7663 fi
7664
7665
4a626d0a
PA
7666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
7667$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
7668if test "${ac_cv_c_restrict+set}" = set; then :
7669 $as_echo_n "(cached) " >&6
7670else
7671 ac_cv_c_restrict=no
7672 # The order here caters to the fact that C++ does not require restrict.
7673 for ac_kw in __restrict __restrict__ _Restrict restrict; do
7674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7675/* end confdefs.h. */
7676typedef int *int_ptr;
7677 int foo (int_ptr $ac_kw ip) { return ip[0]; }
7678 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
7679 int bar (int ip[$ac_kw]) { return ip[0]; }
7680
7681int
7682main ()
7683{
7684int s[1];
7685 int *$ac_kw t = s;
7686 t[0] = 0;
7687 return foo (t) + bar (t);
7688
7689 ;
7690 return 0;
7691}
7692_ACEOF
7693if ac_fn_c_try_compile "$LINENO"; then :
7694 ac_cv_c_restrict=$ac_kw
7695fi
7696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7697 test "$ac_cv_c_restrict" != no && break
7698 done
7699
7700fi
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
7702$as_echo "$ac_cv_c_restrict" >&6; }
7703
7704 case $ac_cv_c_restrict in
7705 restrict) ;;
7706 no) $as_echo "#define restrict /**/" >>confdefs.h
7707 ;;
7708 *) cat >>confdefs.h <<_ACEOF
7709#define restrict $ac_cv_c_restrict
7710_ACEOF
7711 ;;
7712 esac
7713
7714
7715 GNULIB_GETTIMEOFDAY=0;
7716 HAVE_GETTIMEOFDAY=1;
7717 HAVE_STRUCT_TIMEVAL=1;
7718 HAVE_SYS_TIME_H=1;
7719 HAVE_TIMEZONE_T=0;
7720 REPLACE_GETTIMEOFDAY=0;
7721 REPLACE_STRUCT_TIMEVAL=0;
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740 if test $gl_cv_have_include_next = yes; then
7741 gl_cv_next_sys_time_h='<'sys/time.h'>'
7742 else
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
7744$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
7745if test "${gl_cv_next_sys_time_h+set}" = set; then :
7746 $as_echo_n "(cached) " >&6
7747else
7748
7749 if test $ac_cv_header_sys_time_h = yes; then
7750
7751
7752
7753
7754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7755/* end confdefs.h. */
7756#include <sys/time.h>
7757_ACEOF
7758 case "$host_os" in
7759 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7760 *) gl_absname_cpp="$ac_cpp" ;;
7761 esac
7762
7763 case "$host_os" in
7764 mingw*)
7765 gl_dirsep_regex='[/\\]'
7766 ;;
7767 *)
7768 gl_dirsep_regex='\/'
7769 ;;
7770 esac
7771 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7772 gl_header_literal_regex=`echo 'sys/time.h' \
7773 | sed -e "$gl_make_literal_regex_sed"`
7774 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7775 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7776 s|^/[^/]|//&|
7777 p
7778 q
7779 }'
7780
7781 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7782 sed -n "$gl_absolute_header_sed"`
7783
7784 gl_header=$gl_cv_absolute_sys_time_h
7785 gl_cv_next_sys_time_h='"'$gl_header'"'
7786 else
7787 gl_cv_next_sys_time_h='<'sys/time.h'>'
7788 fi
7789
7790
7791fi
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
7793$as_echo "$gl_cv_next_sys_time_h" >&6; }
7794 fi
7795 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
7796
7797 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7798 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7799 gl_next_as_first_directive='<'sys/time.h'>'
7800 else
7801 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7802 gl_next_as_first_directive=$gl_cv_next_sys_time_h
7803 fi
7804 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
7805
7806
7807
7808
7809
7810 if test $ac_cv_header_sys_time_h != yes; then
7811 HAVE_SYS_TIME_H=0
7812 fi
7813
7814
7815
7816
7817
7818 if test $ac_cv_header_sys_socket_h != yes; then
7819 for ac_header in winsock2.h
7820do :
7821 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
7822if test "x$ac_cv_header_winsock2_h" = x""yes; then :
7823 cat >>confdefs.h <<_ACEOF
7824#define HAVE_WINSOCK2_H 1
7825_ACEOF
7826
7827fi
7828
7829done
7830
7831 fi
7832 if test "$ac_cv_header_winsock2_h" = yes; then
7833 HAVE_WINSOCK2_H=1
7834 UNISTD_H_HAVE_WINSOCK2_H=1
7835 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
7836 else
7837 HAVE_WINSOCK2_H=0
7838 fi
7839
7840
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
7842$as_echo_n "checking for struct timeval... " >&6; }
7843if test "${gl_cv_sys_struct_timeval+set}" = set; then :
7844 $as_echo_n "(cached) " >&6
7845else
7846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7847/* end confdefs.h. */
7848#if HAVE_SYS_TIME_H
7849 #include <sys/time.h>
7850 #endif
7851 #include <time.h>
7852 #if HAVE_WINSOCK2_H
7853 # include <winsock2.h>
7854 #endif
7855
7856int
7857main ()
7858{
7859static struct timeval x; x.tv_sec = x.tv_usec;
7860 ;
7861 return 0;
7862}
7863_ACEOF
7864if ac_fn_c_try_compile "$LINENO"; then :
7865 gl_cv_sys_struct_timeval=yes
7866else
7867 gl_cv_sys_struct_timeval=no
7868fi
7869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7870
7871fi
7872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
7873$as_echo "$gl_cv_sys_struct_timeval" >&6; }
7874 if test $gl_cv_sys_struct_timeval != yes; then
7875 HAVE_STRUCT_TIMEVAL=0
7876 else
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
7878$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
7879if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
7880 $as_echo_n "(cached) " >&6
7881else
7882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7883/* end confdefs.h. */
7884#if HAVE_SYS_TIME_H
7885 #include <sys/time.h>
7886 #endif
7887 #include <time.h>
7888 #if HAVE_WINSOCK2_H
7889 # include <winsock2.h>
7890 #endif
7891
7892int
7893main ()
7894{
7895static struct timeval x;
7896 typedef int verify_tv_sec_type[
7897 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
7898 ];
7899
7900 ;
7901 return 0;
7902}
7903_ACEOF
7904if ac_fn_c_try_compile "$LINENO"; then :
7905 gl_cv_sys_struct_timeval_tv_sec=yes
7906else
7907 gl_cv_sys_struct_timeval_tv_sec=no
7908fi
7909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7910
7911fi
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
7913$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
7914 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
7915 REPLACE_STRUCT_TIMEVAL=1
7916 fi
7917 fi
7918
7919
7920 for gl_func in gettimeofday; do
7921 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
7922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
7923$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
7924if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
7925 $as_echo_n "(cached) " >&6
7926else
7927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7928/* end confdefs.h. */
7929
7930#if HAVE_SYS_TIME_H
7931# include <sys/time.h>
7932#endif
7933#include <time.h>
7934
7935int
7936main ()
7937{
7938#undef $gl_func
7939 (void) $gl_func;
7940 ;
7941 return 0;
7942}
7943_ACEOF
7944if ac_fn_c_try_compile "$LINENO"; then :
7945 eval "$as_gl_Symbol=yes"
7946else
7947 eval "$as_gl_Symbol=no"
7948fi
7949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7950fi
7951eval ac_res=\$$as_gl_Symbol
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7953$as_echo "$ac_res" >&6; }
7954 eval as_val=\$$as_gl_Symbol
7955 if test "x$as_val" = x""yes; then :
7956 cat >>confdefs.h <<_ACEOF
7957#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7958_ACEOF
7959
7960 eval ac_cv_have_decl_$gl_func=yes
7961fi
7962 done
7963
7964
7965
7966
7967
7968
7969
88b48903 7970
49e4877c
PA
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982 if test $gl_cv_have_include_next = yes; then
7983 gl_cv_next_limits_h='<'limits.h'>'
7984 else
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
7986$as_echo_n "checking absolute name of <limits.h>... " >&6; }
7987if test "${gl_cv_next_limits_h+set}" = set; then :
7988 $as_echo_n "(cached) " >&6
7989else
7990
7991 if test $ac_cv_header_limits_h = yes; then
7992
7993
7994
7995
7996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7997/* end confdefs.h. */
7998#include <limits.h>
7999_ACEOF
8000 case "$host_os" in
8001 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8002 *) gl_absname_cpp="$ac_cpp" ;;
8003 esac
8004
8005 case "$host_os" in
8006 mingw*)
8007 gl_dirsep_regex='[/\\]'
8008 ;;
8009 *)
8010 gl_dirsep_regex='\/'
8011 ;;
8012 esac
8013 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8014 gl_header_literal_regex=`echo 'limits.h' \
8015 | sed -e "$gl_make_literal_regex_sed"`
8016 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8017 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8018 s|^/[^/]|//&|
8019 p
8020 q
8021 }'
8022
8023 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8024 sed -n "$gl_absolute_header_sed"`
8025
8026 gl_header=$gl_cv_absolute_limits_h
8027 gl_cv_next_limits_h='"'$gl_header'"'
8028 else
8029 gl_cv_next_limits_h='<'limits.h'>'
8030 fi
8031
8032
8033fi
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
8035$as_echo "$gl_cv_next_limits_h" >&6; }
8036 fi
8037 NEXT_LIMITS_H=$gl_cv_next_limits_h
8038
8039 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8040 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8041 gl_next_as_first_directive='<'limits.h'>'
8042 else
8043 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8044 gl_next_as_first_directive=$gl_cv_next_limits_h
8045 fi
8046 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8047
8048
8049
8050
8051
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
8053$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
8054if test "${gl_cv_header_limits_width+set}" = set; then :
8055 $as_echo_n "(cached) " >&6
8056else
8057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8058/* end confdefs.h. */
8059#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8060 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8061 #endif
8062 #include <limits.h>
8063 int ullw = ULLONG_WIDTH;
8064int
8065main ()
8066{
8067
8068 ;
8069 return 0;
8070}
8071_ACEOF
8072if ac_fn_c_try_compile "$LINENO"; then :
8073 gl_cv_header_limits_width=yes
8074else
8075 gl_cv_header_limits_width=no
8076fi
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8078fi
8079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
8080$as_echo "$gl_cv_header_limits_width" >&6; }
8081 if test "$gl_cv_header_limits_width" = yes; then
8082 LIMITS_H=
8083 else
8084 LIMITS_H=limits.h
8085 fi
8086
8087 if test -n "$LIMITS_H"; then
8088 GL_GENERATE_LIMITS_H_TRUE=
8089 GL_GENERATE_LIMITS_H_FALSE='#'
8090else
8091 GL_GENERATE_LIMITS_H_TRUE='#'
8092 GL_GENERATE_LIMITS_H_FALSE=
8093fi
8094
8095
8096
8690e634
JK
8097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8098$as_echo_n "checking for unsigned long long int... " >&6; }
8099if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
8100 $as_echo_n "(cached) " >&6
8101else
8102 ac_cv_type_unsigned_long_long_int=yes
8103 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105/* end confdefs.h. */
8106
8107 /* For now, do not test the preprocessor; as of 2007 there are too many
8108 implementations with broken preprocessors. Perhaps this can
8109 be revisited in 2012. In the meantime, code should not expect
8110 #if to work with literals wider than 32 bits. */
8111 /* Test literals. */
8112 long long int ll = 9223372036854775807ll;
8113 long long int nll = -9223372036854775807LL;
8114 unsigned long long int ull = 18446744073709551615ULL;
8115 /* Test constant expressions. */
8116 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8117 ? 1 : -1)];
8118 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8119 ? 1 : -1)];
8120 int i = 63;
8121int
8122main ()
8123{
8124/* Test availability of runtime routines for shift and division. */
8125 long long int llmax = 9223372036854775807ll;
8126 unsigned long long int ullmax = 18446744073709551615ull;
8127 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8128 | (llmax / ll) | (llmax % ll)
8129 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8130 | (ullmax / ull) | (ullmax % ull));
8131 ;
8132 return 0;
8133}
8134
8135_ACEOF
8136if ac_fn_c_try_link "$LINENO"; then :
8137
8138else
8139 ac_cv_type_unsigned_long_long_int=no
8140fi
8141rm -f core conftest.err conftest.$ac_objext \
8142 conftest$ac_exeext conftest.$ac_ext
8143 fi
8144fi
8145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8146$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8147 if test $ac_cv_type_unsigned_long_long_int = yes; then
8148
8149$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8150
8151 fi
8152
8153
8154
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
8156$as_echo_n "checking for long long int... " >&6; }
8157if test "${ac_cv_type_long_long_int+set}" = set; then :
8158 $as_echo_n "(cached) " >&6
8159else
8160 ac_cv_type_long_long_int=yes
8161 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8162 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
8163 if test $ac_cv_type_long_long_int = yes; then
8164 if test "$cross_compiling" = yes; then :
8165 :
8166else
8167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8168/* end confdefs.h. */
8169#include <limits.h>
8170 #ifndef LLONG_MAX
8171 # define HALF \
8172 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
8173 # define LLONG_MAX (HALF - 1 + HALF)
8174 #endif
8175int
8176main ()
8177{
8178long long int n = 1;
8179 int i;
8180 for (i = 0; ; i++)
8181 {
8182 long long int m = n << i;
8183 if (m >> i != n)
8184 return 1;
8185 if (LLONG_MAX / 2 < m)
8186 break;
8187 }
8188 return 0;
8189 ;
8190 return 0;
8191}
8192_ACEOF
8193if ac_fn_c_try_run "$LINENO"; then :
8194
8195else
8196 ac_cv_type_long_long_int=no
8197fi
8198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8199 conftest.$ac_objext conftest.beam conftest.$ac_ext
8200fi
8201
8202 fi
8203 fi
8204fi
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
8206$as_echo "$ac_cv_type_long_long_int" >&6; }
8207 if test $ac_cv_type_long_long_int = yes; then
8208
8209$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
8210
8211 fi
8212
8213
8214
8215
8216
8217
88b48903
WN
8218 gl_cv_c_multiarch=no
8219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a143c6de 8220/* end confdefs.h. */
88b48903
WN
8221#ifndef __APPLE_CC__
8222 not a universal capable compiler
8223 #endif
8224 typedef int dummy;
8225
8690e634
JK
8226_ACEOF
8227if ac_fn_c_try_compile "$LINENO"; then :
8228
8229 arch=
8230 prev=
8231 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
8232 if test -n "$prev"; then
8233 case $word in
8234 i?86 | x86_64 | ppc | ppc64)
8235 if test -z "$arch" || test "$arch" = "$word"; then
8236 arch="$word"
8237 else
8238 gl_cv_c_multiarch=yes
8239 fi
8240 ;;
8241 esac
8242 prev=
8243 else
8244 if test "x$word" = "x-arch"; then
8245 prev=arch
8246 fi
8247 fi
8248 done
8249
8250fi
8251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8252 if test $gl_cv_c_multiarch = yes; then
8253 APPLE_UNIVERSAL_BUILD=1
8254 else
8255 APPLE_UNIVERSAL_BUILD=0
8256 fi
8257
8258
8259
8260
8261
49e4877c
PA
8262
8263
8690e634
JK
8264 if test $ac_cv_type_long_long_int = yes; then
8265 HAVE_LONG_LONG_INT=1
8266 else
8267 HAVE_LONG_LONG_INT=0
8268 fi
8269
8270
8271 if test $ac_cv_type_unsigned_long_long_int = yes; then
8272 HAVE_UNSIGNED_LONG_LONG_INT=1
8273 else
8274 HAVE_UNSIGNED_LONG_LONG_INT=0
8275 fi
8276
8277
8278
8690e634
JK
8279 if test $ac_cv_header_wchar_h = yes; then
8280 HAVE_WCHAR_H=1
8281 else
8282 HAVE_WCHAR_H=0
8283 fi
8284
8285
8286 if test $ac_cv_header_inttypes_h = yes; then
8287 HAVE_INTTYPES_H=1
8288 else
8289 HAVE_INTTYPES_H=0
8290 fi
8291
8292
8293 if test $ac_cv_header_sys_types_h = yes; then
8294 HAVE_SYS_TYPES_H=1
8295 else
8296 HAVE_SYS_TYPES_H=0
8297 fi
8298
8299
8300
8301
8302
8303
8304
8305
8690e634
JK
8306
8307
8308
8309 if test $gl_cv_have_include_next = yes; then
8310 gl_cv_next_stdint_h='<'stdint.h'>'
8311 else
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
8313$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
8314if test "${gl_cv_next_stdint_h+set}" = set; then :
8315 $as_echo_n "(cached) " >&6
8316else
8317
8318 if test $ac_cv_header_stdint_h = yes; then
8319
8320
4a626d0a
PA
8321
8322
8323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
8324/* end confdefs.h. */
8325#include <stdint.h>
8690e634 8326_ACEOF
4a626d0a
PA
8327 case "$host_os" in
8328 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8329 *) gl_absname_cpp="$ac_cpp" ;;
8330 esac
8331
8332 case "$host_os" in
8333 mingw*)
8334 gl_dirsep_regex='[/\\]'
8335 ;;
8336 *)
8337 gl_dirsep_regex='\/'
8338 ;;
8339 esac
8340 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8341 gl_header_literal_regex=`echo 'stdint.h' \
8342 | sed -e "$gl_make_literal_regex_sed"`
8343 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8344 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8345 s|^/[^/]|//&|
8346 p
8347 q
8348 }'
8349
8350 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8351 sed -n "$gl_absolute_header_sed"`
8352
8353 gl_header=$gl_cv_absolute_stdint_h
8354 gl_cv_next_stdint_h='"'$gl_header'"'
8690e634
JK
8355 else
8356 gl_cv_next_stdint_h='<'stdint.h'>'
8357 fi
8358
8359
8360fi
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
8362$as_echo "$gl_cv_next_stdint_h" >&6; }
8363 fi
8364 NEXT_STDINT_H=$gl_cv_next_stdint_h
8365
8366 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8367 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8368 gl_next_as_first_directive='<'stdint.h'>'
8369 else
8370 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8371 gl_next_as_first_directive=$gl_cv_next_stdint_h
8372 fi
8373 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8374
8375
8376
8377
8378 if test $ac_cv_header_stdint_h = yes; then
8379 HAVE_STDINT_H=1
8380 else
8381 HAVE_STDINT_H=0
8382 fi
8383
8384
8385 if test $ac_cv_header_stdint_h = yes; then
8386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
8387$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
8388if test "${gl_cv_header_working_stdint_h+set}" = set; then :
8389 $as_echo_n "(cached) " >&6
8390else
8391 gl_cv_header_working_stdint_h=no
8392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8393/* end confdefs.h. */
8394
8395
8396#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
49e4877c
PA
8397#define __STDC_CONSTANT_MACROS 1
8398#define __STDC_LIMIT_MACROS 1
8690e634
JK
8399#include <stdint.h>
8400/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
8401#if !(defined WCHAR_MIN && defined WCHAR_MAX)
8402#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
8403#endif
8404
8405
8406 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8407 included before <wchar.h>. */
8408 #include <stddef.h>
8409 #include <signal.h>
8410 #if HAVE_WCHAR_H
8411 # include <stdio.h>
8412 # include <time.h>
8413 # include <wchar.h>
8414 #endif
8415
8416
8417#ifdef INT8_MAX
8418int8_t a1 = INT8_MAX;
8419int8_t a1min = INT8_MIN;
8420#endif
8421#ifdef INT16_MAX
8422int16_t a2 = INT16_MAX;
8423int16_t a2min = INT16_MIN;
8424#endif
8425#ifdef INT32_MAX
8426int32_t a3 = INT32_MAX;
8427int32_t a3min = INT32_MIN;
8428#endif
8429#ifdef INT64_MAX
8430int64_t a4 = INT64_MAX;
8431int64_t a4min = INT64_MIN;
8432#endif
8433#ifdef UINT8_MAX
8434uint8_t b1 = UINT8_MAX;
8435#else
8436typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
8437#endif
8438#ifdef UINT16_MAX
8439uint16_t b2 = UINT16_MAX;
8440#endif
8441#ifdef UINT32_MAX
8442uint32_t b3 = UINT32_MAX;
8443#endif
8444#ifdef UINT64_MAX
8445uint64_t b4 = UINT64_MAX;
8446#endif
8447int_least8_t c1 = INT8_C (0x7f);
8448int_least8_t c1max = INT_LEAST8_MAX;
8449int_least8_t c1min = INT_LEAST8_MIN;
8450int_least16_t c2 = INT16_C (0x7fff);
8451int_least16_t c2max = INT_LEAST16_MAX;
8452int_least16_t c2min = INT_LEAST16_MIN;
8453int_least32_t c3 = INT32_C (0x7fffffff);
8454int_least32_t c3max = INT_LEAST32_MAX;
8455int_least32_t c3min = INT_LEAST32_MIN;
8456int_least64_t c4 = INT64_C (0x7fffffffffffffff);
8457int_least64_t c4max = INT_LEAST64_MAX;
8458int_least64_t c4min = INT_LEAST64_MIN;
8459uint_least8_t d1 = UINT8_C (0xff);
8460uint_least8_t d1max = UINT_LEAST8_MAX;
8461uint_least16_t d2 = UINT16_C (0xffff);
8462uint_least16_t d2max = UINT_LEAST16_MAX;
8463uint_least32_t d3 = UINT32_C (0xffffffff);
8464uint_least32_t d3max = UINT_LEAST32_MAX;
8465uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
8466uint_least64_t d4max = UINT_LEAST64_MAX;
8467int_fast8_t e1 = INT_FAST8_MAX;
8468int_fast8_t e1min = INT_FAST8_MIN;
8469int_fast16_t e2 = INT_FAST16_MAX;
8470int_fast16_t e2min = INT_FAST16_MIN;
8471int_fast32_t e3 = INT_FAST32_MAX;
8472int_fast32_t e3min = INT_FAST32_MIN;
8473int_fast64_t e4 = INT_FAST64_MAX;
8474int_fast64_t e4min = INT_FAST64_MIN;
8475uint_fast8_t f1 = UINT_FAST8_MAX;
8476uint_fast16_t f2 = UINT_FAST16_MAX;
8477uint_fast32_t f3 = UINT_FAST32_MAX;
8478uint_fast64_t f4 = UINT_FAST64_MAX;
8479#ifdef INTPTR_MAX
8480intptr_t g = INTPTR_MAX;
8481intptr_t gmin = INTPTR_MIN;
8482#endif
8483#ifdef UINTPTR_MAX
8484uintptr_t h = UINTPTR_MAX;
8485#endif
8486intmax_t i = INTMAX_MAX;
8487uintmax_t j = UINTMAX_MAX;
8488
4c62b19f
PA
8489/* Check that SIZE_MAX has the correct type, if possible. */
8490#if 201112 <= __STDC_VERSION__
8491int k = _Generic (SIZE_MAX, size_t: 0);
8492#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
8493 || (0x5110 <= __SUNPRO_C && !__STDC__))
8494extern size_t k;
8495extern __typeof__ (SIZE_MAX) k;
8496#endif
8497
8690e634
JK
8498#include <limits.h> /* for CHAR_BIT */
8499#define TYPE_MINIMUM(t) \
8500 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
8501#define TYPE_MAXIMUM(t) \
8502 ((t) ((t) 0 < (t) -1 \
8503 ? (t) -1 \
8504 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
8505struct s {
8506 int check_PTRDIFF:
8507 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
8508 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
8509 ? 1 : -1;
8510 /* Detect bug in FreeBSD 6.0 / ia64. */
8511 int check_SIG_ATOMIC:
8512 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
8513 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
8514 ? 1 : -1;
8515 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
8516 int check_WCHAR:
8517 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
8518 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
8519 ? 1 : -1;
8520 /* Detect bug in mingw. */
8521 int check_WINT:
8522 WINT_MIN == TYPE_MINIMUM (wint_t)
8523 && WINT_MAX == TYPE_MAXIMUM (wint_t)
8524 ? 1 : -1;
8525
8526 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
8527 int check_UINT8_C:
8528 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
8529 int check_UINT16_C:
8530 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8531
8532 /* Detect bugs in OpenBSD 3.9 stdint.h. */
8533#ifdef UINT8_MAX
8534 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
8535#endif
8536#ifdef UINT16_MAX
8537 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
8538#endif
8539#ifdef UINT32_MAX
8540 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
8541#endif
8542#ifdef UINT64_MAX
8543 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
8544#endif
8545 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
8546 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
8547 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
8548 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
8549 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
8550 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
8551 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
8552 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
8553 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
8554 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
8555 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
8556};
8557
8558int
8559main ()
8560{
8561
8562 ;
8563 return 0;
8564}
8565_ACEOF
8566if ac_fn_c_try_compile "$LINENO"; then :
8567 if test "$cross_compiling" = yes; then :
8568 gl_cv_header_working_stdint_h=yes
8569
8570else
8571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8572/* end confdefs.h. */
8573
8574
8575#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
49e4877c
PA
8576#define __STDC_CONSTANT_MACROS 1
8577#define __STDC_LIMIT_MACROS 1
8690e634
JK
8578#include <stdint.h>
8579
8580
8581 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8582 included before <wchar.h>. */
8583 #include <stddef.h>
8584 #include <signal.h>
8585 #if HAVE_WCHAR_H
8586 # include <stdio.h>
8587 # include <time.h>
8588 # include <wchar.h>
8589 #endif
8590
8591
8592#include <stdio.h>
8593#include <string.h>
8594#define MVAL(macro) MVAL1(macro)
8595#define MVAL1(expression) #expression
8596static const char *macro_values[] =
8597 {
8598#ifdef INT8_MAX
8599 MVAL (INT8_MAX),
8600#endif
8601#ifdef INT16_MAX
8602 MVAL (INT16_MAX),
8603#endif
8604#ifdef INT32_MAX
8605 MVAL (INT32_MAX),
8606#endif
8607#ifdef INT64_MAX
8608 MVAL (INT64_MAX),
8609#endif
8610#ifdef UINT8_MAX
8611 MVAL (UINT8_MAX),
8612#endif
8613#ifdef UINT16_MAX
8614 MVAL (UINT16_MAX),
8615#endif
8616#ifdef UINT32_MAX
8617 MVAL (UINT32_MAX),
8618#endif
8619#ifdef UINT64_MAX
8620 MVAL (UINT64_MAX),
8621#endif
8622 NULL
8623 };
8624
8625int
8626main ()
8627{
8628
8629 const char **mv;
8630 for (mv = macro_values; *mv != NULL; mv++)
8631 {
8632 const char *value = *mv;
8633 /* Test whether it looks like a cast expression. */
8634 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
8635 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
8636 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
8637 || strncmp (value, "((int)"/*)*/, 6) == 0
8638 || strncmp (value, "((signed short)"/*)*/, 15) == 0
8639 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
8640 return mv - macro_values + 1;
8641 }
8642 return 0;
8643
8644 ;
8645 return 0;
8646}
8647_ACEOF
8648if ac_fn_c_try_run "$LINENO"; then :
8649 gl_cv_header_working_stdint_h=yes
8650fi
8651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8652 conftest.$ac_objext conftest.beam conftest.$ac_ext
8653fi
8654
8655
8656fi
8657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8658
8659fi
8660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
8661$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8662 fi
49e4877c
PA
8663
8664 HAVE_C99_STDINT_H=0
8665 HAVE_SYS_BITYPES_H=0
8666 HAVE_SYS_INTTYPES_H=0
8667 STDINT_H=stdint.h
8690e634 8668 if test "$gl_cv_header_working_stdint_h" = yes; then
49e4877c
PA
8669 HAVE_C99_STDINT_H=1
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
8671$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
8672if test "${gl_cv_header_stdint_predates_cxx11_h+set}" = set; then :
8673 $as_echo_n "(cached) " >&6
8674else
8675 gl_cv_header_stdint_predates_cxx11_h=yes
8676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8677/* end confdefs.h. */
8678
8679
8680#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
8681#include <stdint.h>
8682
8683
8684 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8685 included before <wchar.h>. */
8686 #include <stddef.h>
8687 #include <signal.h>
8688 #if HAVE_WCHAR_H
8689 # include <stdio.h>
8690 # include <time.h>
8691 # include <wchar.h>
8692 #endif
8693
8694
8695intmax_t im = INTMAX_MAX;
8696int32_t i32 = INT32_C (0x7fffffff);
8697
8698int
8699main ()
8700{
8701
8702 ;
8703 return 0;
8704}
8705_ACEOF
8706if ac_fn_c_try_compile "$LINENO"; then :
8707 gl_cv_header_stdint_predates_cxx11_h=no
8708fi
8709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8710fi
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
8712$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8713
8714 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8715
8716$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8717
8718
8719$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8720
8721 fi
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
8723$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
8724if test "${gl_cv_header_stdint_width+set}" = set; then :
8725 $as_echo_n "(cached) " >&6
8726else
8727 gl_cv_header_stdint_width=no
8728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8729/* end confdefs.h. */
8730
8731 /* Work if build is not clean. */
8732 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
8733 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
8734 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
8735 #endif
8736 #include <stdint.h>
8737
8738 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8739 included before <wchar.h>. */
8740 #include <stddef.h>
8741 #include <signal.h>
8742 #if HAVE_WCHAR_H
8743 # include <stdio.h>
8744 # include <time.h>
8745 # include <wchar.h>
8746 #endif
8747
8748 int iw = UINTMAX_WIDTH;
8749
8750int
8751main ()
8752{
8753
8754 ;
8755 return 0;
8756}
8757_ACEOF
8758if ac_fn_c_try_compile "$LINENO"; then :
8759 gl_cv_header_stdint_width=yes
8760fi
8761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8762fi
8763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
8764$as_echo "$gl_cv_header_stdint_width" >&6; }
8765 if test "$gl_cv_header_stdint_width" = yes; then
8766 STDINT_H=
8767 fi
8690e634
JK
8768 else
8769 for ac_header in sys/inttypes.h sys/bitypes.h
8770do :
8771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8772ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8773eval as_val=\$$as_ac_Header
8774 if test "x$as_val" = x""yes; then :
8775 cat >>confdefs.h <<_ACEOF
8776#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8777_ACEOF
8778
8779fi
8780
8781done
8782
8783 if test $ac_cv_header_sys_inttypes_h = yes; then
8784 HAVE_SYS_INTTYPES_H=1
8690e634 8785 fi
8690e634
JK
8786 if test $ac_cv_header_sys_bitypes_h = yes; then
8787 HAVE_SYS_BITYPES_H=1
8690e634
JK
8788 fi
8789
8790
8690e634
JK
8791 if test $APPLE_UNIVERSAL_BUILD = 0; then
8792
8793
8794 for gltype in ptrdiff_t size_t ; do
8795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8796$as_echo_n "checking for bit size of $gltype... " >&6; }
8797if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8798 $as_echo_n "(cached) " >&6
8799else
8800 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8801 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8802 included before <wchar.h>. */
8803 #include <stddef.h>
8804 #include <signal.h>
8805 #if HAVE_WCHAR_H
8806 # include <stdio.h>
8807 # include <time.h>
8808 # include <wchar.h>
8809 #endif
8810
8811#include <limits.h>"; then :
8812
8813else
8814 result=unknown
8815fi
8816
8817 eval gl_cv_bitsizeof_${gltype}=\$result
8818
8819fi
8820eval ac_res=\$gl_cv_bitsizeof_${gltype}
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8822$as_echo "$ac_res" >&6; }
8823 eval result=\$gl_cv_bitsizeof_${gltype}
8824 if test $result = unknown; then
8825 result=0
8826 fi
8827 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8828 cat >>confdefs.h <<_ACEOF
8829#define BITSIZEOF_${GLTYPE} $result
8830_ACEOF
8831
8832 eval BITSIZEOF_${GLTYPE}=\$result
8833 done
8834
8835
8836 fi
8837
8838
8839 for gltype in sig_atomic_t wchar_t wint_t ; do
8840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
8841$as_echo_n "checking for bit size of $gltype... " >&6; }
8842if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
8843 $as_echo_n "(cached) " >&6
8844else
8845 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
8846 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8847 included before <wchar.h>. */
8848 #include <stddef.h>
8849 #include <signal.h>
8850 #if HAVE_WCHAR_H
8851 # include <stdio.h>
8852 # include <time.h>
8853 # include <wchar.h>
8854 #endif
8855
8856#include <limits.h>"; then :
8857
8858else
8859 result=unknown
8860fi
8861
8862 eval gl_cv_bitsizeof_${gltype}=\$result
8863
8864fi
8865eval ac_res=\$gl_cv_bitsizeof_${gltype}
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8867$as_echo "$ac_res" >&6; }
8868 eval result=\$gl_cv_bitsizeof_${gltype}
8869 if test $result = unknown; then
8870 result=0
8871 fi
8872 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8873 cat >>confdefs.h <<_ACEOF
8874#define BITSIZEOF_${GLTYPE} $result
8875_ACEOF
8876
8877 eval BITSIZEOF_${GLTYPE}=\$result
8878 done
8879
8880
8881
8882
8883 for gltype in sig_atomic_t wchar_t wint_t ; do
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
8885$as_echo_n "checking whether $gltype is signed... " >&6; }
8886if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
8887 $as_echo_n "(cached) " >&6
8888else
8889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8890/* end confdefs.h. */
8891
8892 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8893 included before <wchar.h>. */
8894 #include <stddef.h>
8895 #include <signal.h>
8896 #if HAVE_WCHAR_H
8897 # include <stdio.h>
8898 # include <time.h>
8899 # include <wchar.h>
8900 #endif
8901
8902 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8903int
8904main ()
8905{
8906
8907 ;
8908 return 0;
8909}
8910_ACEOF
8911if ac_fn_c_try_compile "$LINENO"; then :
8912 result=yes
8913else
8914 result=no
8915fi
8916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8917 eval gl_cv_type_${gltype}_signed=\$result
8918
8919fi
8920eval ac_res=\$gl_cv_type_${gltype}_signed
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8922$as_echo "$ac_res" >&6; }
8923 eval result=\$gl_cv_type_${gltype}_signed
8924 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
8925 if test "$result" = yes; then
8926 cat >>confdefs.h <<_ACEOF
8927#define HAVE_SIGNED_${GLTYPE} 1
8928_ACEOF
8929
8930 eval HAVE_SIGNED_${GLTYPE}=1
8931 else
8932 eval HAVE_SIGNED_${GLTYPE}=0
8933 fi
8934 done
8935
8936
8937 gl_cv_type_ptrdiff_t_signed=yes
8938 gl_cv_type_size_t_signed=no
8939 if test $APPLE_UNIVERSAL_BUILD = 0; then
8940
8941
8942 for gltype in ptrdiff_t size_t ; do
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
8944$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
8945if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
8946 $as_echo_n "(cached) " >&6
8947else
8948 eval gl_cv_type_${gltype}_suffix=no
8949 eval result=\$gl_cv_type_${gltype}_signed
8950 if test "$result" = yes; then
8951 glsufu=
8952 else
8953 glsufu=u
8954 fi
8955 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
8956 case $glsuf in
8957 '') gltype1='int';;
8958 l) gltype1='long int';;
8959 ll) gltype1='long long int';;
8960 i64) gltype1='__int64';;
8961 u) gltype1='unsigned int';;
8962 ul) gltype1='unsigned long int';;
8963 ull) gltype1='unsigned long long int';;
8964 ui64)gltype1='unsigned __int64';;
8965 esac
8966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8967/* end confdefs.h. */
8968
8969 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8970 included before <wchar.h>. */
8971 #include <stddef.h>
8972 #include <signal.h>
8973 #if HAVE_WCHAR_H
8974 # include <stdio.h>
8975 # include <time.h>
8976 # include <wchar.h>
8977 #endif
8978
8979 extern $gltype foo;
8980 extern $gltype1 foo;
8981int
8982main ()
8983{
8984
8985 ;
8986 return 0;
8987}
8988_ACEOF
8989if ac_fn_c_try_compile "$LINENO"; then :
8990 eval gl_cv_type_${gltype}_suffix=\$glsuf
8991fi
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8993 eval result=\$gl_cv_type_${gltype}_suffix
8994 test "$result" != no && break
8995 done
8996fi
8997eval ac_res=\$gl_cv_type_${gltype}_suffix
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8999$as_echo "$ac_res" >&6; }
9000 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9001 eval result=\$gl_cv_type_${gltype}_suffix
9002 test "$result" = no && result=
9003 eval ${GLTYPE}_SUFFIX=\$result
9004 cat >>confdefs.h <<_ACEOF
9005#define ${GLTYPE}_SUFFIX $result
9006_ACEOF
9007
9008 done
9009
9010
9011 fi
9012
9013
9014 for gltype in sig_atomic_t wchar_t wint_t ; do
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
9016$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
9017if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
9018 $as_echo_n "(cached) " >&6
9019else
9020 eval gl_cv_type_${gltype}_suffix=no
9021 eval result=\$gl_cv_type_${gltype}_signed
9022 if test "$result" = yes; then
9023 glsufu=
9024 else
9025 glsufu=u
9026 fi
9027 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
9028 case $glsuf in
9029 '') gltype1='int';;
9030 l) gltype1='long int';;
9031 ll) gltype1='long long int';;
9032 i64) gltype1='__int64';;
9033 u) gltype1='unsigned int';;
9034 ul) gltype1='unsigned long int';;
9035 ull) gltype1='unsigned long long int';;
9036 ui64)gltype1='unsigned __int64';;
9037 esac
9038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9039/* end confdefs.h. */
9040
9041 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9042 included before <wchar.h>. */
9043 #include <stddef.h>
9044 #include <signal.h>
9045 #if HAVE_WCHAR_H
9046 # include <stdio.h>
9047 # include <time.h>
9048 # include <wchar.h>
9049 #endif
9050
9051 extern $gltype foo;
9052 extern $gltype1 foo;
9053int
9054main ()
9055{
9056
9057 ;
9058 return 0;
9059}
9060_ACEOF
9061if ac_fn_c_try_compile "$LINENO"; then :
9062 eval gl_cv_type_${gltype}_suffix=\$glsuf
9063fi
9064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9065 eval result=\$gl_cv_type_${gltype}_suffix
9066 test "$result" != no && break
9067 done
9068fi
9069eval ac_res=\$gl_cv_type_${gltype}_suffix
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9071$as_echo "$ac_res" >&6; }
9072 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
9073 eval result=\$gl_cv_type_${gltype}_suffix
9074 test "$result" = no && result=
9075 eval ${GLTYPE}_SUFFIX=\$result
9076 cat >>confdefs.h <<_ACEOF
9077#define ${GLTYPE}_SUFFIX $result
9078_ACEOF
9079
9080 done
9081
9082
9083
9084 if test $BITSIZEOF_WINT_T -lt 32; then
9085 BITSIZEOF_WINT_T=32
9086 fi
9087
8690e634
JK
9088 fi
9089
49e4877c
PA
9090 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
9091 LIMITS_H=limits.h
9092 if test -n "$LIMITS_H"; then
9093 GL_GENERATE_LIMITS_H_TRUE=
9094 GL_GENERATE_LIMITS_H_FALSE='#'
9095else
9096 GL_GENERATE_LIMITS_H_TRUE='#'
9097 GL_GENERATE_LIMITS_H_FALSE=
9098fi
9099
9100
9101
9102
9103
9104
8690e634
JK
9105 if test -n "$STDINT_H"; then
9106 GL_GENERATE_STDINT_H_TRUE=
9107 GL_GENERATE_STDINT_H_FALSE='#'
9108else
9109 GL_GENERATE_STDINT_H_TRUE='#'
9110 GL_GENERATE_STDINT_H_FALSE=
9111fi
9112
9113
9114
9115
9116
8690e634
JK
9117 GNULIB_IMAXABS=0;
9118 GNULIB_IMAXDIV=0;
9119 GNULIB_STRTOIMAX=0;
9120 GNULIB_STRTOUMAX=0;
9121 HAVE_DECL_IMAXABS=1;
9122 HAVE_DECL_IMAXDIV=1;
9123 HAVE_DECL_STRTOIMAX=1;
9124 HAVE_DECL_STRTOUMAX=1;
9125 REPLACE_STRTOIMAX=0;
4a626d0a 9126 REPLACE_STRTOUMAX=0;
8690e634
JK
9127 INT32_MAX_LT_INTMAX_MAX=1;
9128 INT64_MAX_EQ_LONG_MAX='defined _LP64';
9129 PRI_MACROS_BROKEN=0;
9130 PRIPTR_PREFIX=__PRIPTR_PREFIX;
9131 UINT32_MAX_LT_UINTMAX_MAX=1;
9132 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
9133
9134
9135
9136
8690e634
JK
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
8690e634
JK
9148 if test $gl_cv_have_include_next = yes; then
9149 gl_cv_next_inttypes_h='<'inttypes.h'>'
9150 else
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
9152$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
9153if test "${gl_cv_next_inttypes_h+set}" = set; then :
9154 $as_echo_n "(cached) " >&6
9155else
9156
9157 if test $ac_cv_header_inttypes_h = yes; then
9158
9159
4a626d0a
PA
9160
9161
9162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9163/* end confdefs.h. */
9164#include <inttypes.h>
8690e634 9165_ACEOF
4a626d0a
PA
9166 case "$host_os" in
9167 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9168 *) gl_absname_cpp="$ac_cpp" ;;
9169 esac
9170
9171 case "$host_os" in
9172 mingw*)
9173 gl_dirsep_regex='[/\\]'
9174 ;;
9175 *)
9176 gl_dirsep_regex='\/'
9177 ;;
9178 esac
9179 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9180 gl_header_literal_regex=`echo 'inttypes.h' \
9181 | sed -e "$gl_make_literal_regex_sed"`
9182 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9183 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9184 s|^/[^/]|//&|
9185 p
9186 q
9187 }'
9188
9189 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9190 sed -n "$gl_absolute_header_sed"`
9191
9192 gl_header=$gl_cv_absolute_inttypes_h
9193 gl_cv_next_inttypes_h='"'$gl_header'"'
8690e634
JK
9194 else
9195 gl_cv_next_inttypes_h='<'inttypes.h'>'
9196 fi
9197
9198
9199fi
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
9201$as_echo "$gl_cv_next_inttypes_h" >&6; }
9202 fi
9203 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
9204
9205 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9206 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9207 gl_next_as_first_directive='<'inttypes.h'>'
9208 else
9209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9210 gl_next_as_first_directive=$gl_cv_next_inttypes_h
9211 fi
9212 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
9213
9214
9215
9216
9217
9218
9219
9220
9221 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
9222 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9224$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9225if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
9226 $as_echo_n "(cached) " >&6
9227else
9228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9229/* end confdefs.h. */
9230#include <inttypes.h>
9231
9232int
9233main ()
9234{
9235#undef $gl_func
9236 (void) $gl_func;
9237 ;
9238 return 0;
9239}
9240_ACEOF
9241if ac_fn_c_try_compile "$LINENO"; then :
9242 eval "$as_gl_Symbol=yes"
9243else
9244 eval "$as_gl_Symbol=no"
9245fi
9246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9247fi
9248eval ac_res=\$$as_gl_Symbol
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9250$as_echo "$ac_res" >&6; }
9251 eval as_val=\$$as_gl_Symbol
9252 if test "x$as_val" = x""yes; then :
9253 cat >>confdefs.h <<_ACEOF
9254#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9255_ACEOF
9256
9257 eval ac_cv_have_decl_$gl_func=yes
9258fi
9259 done
9260
9261
9262
9263 for ac_header in inttypes.h
9264do :
9265 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
9266if test "x$ac_cv_header_inttypes_h" = x""yes; then :
9267 cat >>confdefs.h <<_ACEOF
9268#define HAVE_INTTYPES_H 1
9269_ACEOF
9270
9271fi
9272
9273done
9274
9275 if test $ac_cv_header_inttypes_h = yes; then
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
9277$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
9278if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
9279 $as_echo_n "(cached) " >&6
9280else
9281
9282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9283/* end confdefs.h. */
9284
9285#include <inttypes.h>
9286#ifdef PRId32
9287char *p = PRId32;
9288#endif
9289
9290int
9291main ()
9292{
9293
9294 ;
9295 return 0;
9296}
9297_ACEOF
9298if ac_fn_c_try_compile "$LINENO"; then :
9299 gt_cv_inttypes_pri_broken=no
9300else
9301 gt_cv_inttypes_pri_broken=yes
9302fi
9303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9304
9305fi
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
9307$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
9308 fi
9309 if test "$gt_cv_inttypes_pri_broken" = yes; then
9310
9311cat >>confdefs.h <<_ACEOF
9312#define PRI_MACROS_BROKEN 1
9313_ACEOF
9314
9315 PRI_MACROS_BROKEN=1
9316 else
9317 PRI_MACROS_BROKEN=0
9318 fi
9319
9320
9321
88b48903
WN
9322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
9323$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
9324if test "${gl_cv_cc_double_expbit0+set}" = set; then :
8690e634
JK
9325 $as_echo_n "(cached) " >&6
9326else
88b48903
WN
9327
9328 if test "$cross_compiling" = yes; then :
9329
9330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9331/* end confdefs.h. */
88b48903
WN
9332
9333#if defined arm || defined __arm || defined __arm__
9334 mixed_endianness
9335#endif
9336
9337_ACEOF
9338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9339 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
9340 gl_cv_cc_double_expbit0="unknown"
9341else
9342
9343 :
9344if test "${ac_cv_c_bigendian+set}" = set; then :
9345 $as_echo_n "(cached) " >&6
9346else
9347 ac_cv_c_bigendian=unknown
9348 # See if we're dealing with a universal compiler.
9349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9350/* end confdefs.h. */
9351#ifndef __APPLE_CC__
9352 not a universal capable compiler
9353 #endif
9354 typedef int dummy;
9355
9356_ACEOF
9357if ac_fn_c_try_compile "$LINENO"; then :
9358
9359 # Check for potential -arch flags. It is not universal unless
9360 # there are at least two -arch flags with different values.
9361 ac_arch=
9362 ac_prev=
9363 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9364 if test -n "$ac_prev"; then
9365 case $ac_word in
9366 i?86 | x86_64 | ppc | ppc64)
9367 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9368 ac_arch=$ac_word
9369 else
9370 ac_cv_c_bigendian=universal
9371 break
9372 fi
9373 ;;
9374 esac
9375 ac_prev=
9376 elif test "x$ac_word" = "x-arch"; then
9377 ac_prev=arch
9378 fi
9379 done
9380fi
9381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9382 if test $ac_cv_c_bigendian = unknown; then
9383 # See if sys/param.h defines the BYTE_ORDER macro.
9384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9385/* end confdefs.h. */
9386#include <sys/types.h>
9387 #include <sys/param.h>
9388
8690e634
JK
9389int
9390main ()
9391{
88b48903
WN
9392#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9393 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9394 && LITTLE_ENDIAN)
9395 bogus endian macros
9396 #endif
9397
8690e634
JK
9398 ;
9399 return 0;
9400}
9401_ACEOF
88b48903
WN
9402if ac_fn_c_try_compile "$LINENO"; then :
9403 # It does; now see whether it defined to BIG_ENDIAN or not.
9404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9405/* end confdefs.h. */
9406#include <sys/types.h>
9407 #include <sys/param.h>
9408
9409int
9410main ()
9411{
9412#if BYTE_ORDER != BIG_ENDIAN
9413 not big endian
9414 #endif
9415
9416 ;
9417 return 0;
9418}
9419_ACEOF
9420if ac_fn_c_try_compile "$LINENO"; then :
9421 ac_cv_c_bigendian=yes
8690e634 9422else
88b48903 9423 ac_cv_c_bigendian=no
8690e634 9424fi
88b48903 9425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9426fi
88b48903
WN
9427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9428 fi
9429 if test $ac_cv_c_bigendian = unknown; then
9430 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9432/* end confdefs.h. */
9433#include <limits.h>
8690e634 9434
88b48903
WN
9435int
9436main ()
9437{
9438#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9439 bogus endian macros
9440 #endif
8690e634 9441
88b48903
WN
9442 ;
9443 return 0;
9444}
9445_ACEOF
9446if ac_fn_c_try_compile "$LINENO"; then :
9447 # It does; now see whether it defined to _BIG_ENDIAN or not.
9448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9449/* end confdefs.h. */
9450#include <limits.h>
8690e634 9451
88b48903
WN
9452int
9453main ()
9454{
9455#ifndef _BIG_ENDIAN
9456 not big endian
9457 #endif
8690e634 9458
88b48903
WN
9459 ;
9460 return 0;
9461}
9462_ACEOF
9463if ac_fn_c_try_compile "$LINENO"; then :
9464 ac_cv_c_bigendian=yes
9465else
9466 ac_cv_c_bigendian=no
9467fi
9468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9469fi
9470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9471 fi
9472 if test $ac_cv_c_bigendian = unknown; then
9473 # Compile a test program.
9474 if test "$cross_compiling" = yes; then :
9475 # Try to guess by grepping values from an object file.
9476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9477/* end confdefs.h. */
9478short int ascii_mm[] =
9479 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9480 short int ascii_ii[] =
9481 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9482 int use_ascii (int i) {
9483 return ascii_mm[i] + ascii_ii[i];
9484 }
9485 short int ebcdic_ii[] =
9486 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9487 short int ebcdic_mm[] =
9488 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9489 int use_ebcdic (int i) {
9490 return ebcdic_mm[i] + ebcdic_ii[i];
9491 }
9492 extern int foo;
8690e634 9493
88b48903
WN
9494int
9495main ()
9496{
9497return use_ascii (foo) == use_ebcdic (foo);
9498 ;
9499 return 0;
9500}
9501_ACEOF
9502if ac_fn_c_try_compile "$LINENO"; then :
9503 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9504 ac_cv_c_bigendian=yes
9505 fi
9506 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9507 if test "$ac_cv_c_bigendian" = unknown; then
9508 ac_cv_c_bigendian=no
9509 else
9510 # finding both strings is unlikely to happen, but who knows?
9511 ac_cv_c_bigendian=unknown
9512 fi
9513 fi
9514fi
9515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9516else
9517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9518/* end confdefs.h. */
9519$ac_includes_default
9520int
9521main ()
9522{
8690e634 9523
88b48903
WN
9524 /* Are we little or big endian? From Harbison&Steele. */
9525 union
9526 {
9527 long int l;
9528 char c[sizeof (long int)];
9529 } u;
9530 u.l = 1;
9531 return u.c[sizeof (long int) - 1] == 1;
8690e634 9532
88b48903
WN
9533 ;
9534 return 0;
9535}
9536_ACEOF
9537if ac_fn_c_try_run "$LINENO"; then :
9538 ac_cv_c_bigendian=no
9539else
9540 ac_cv_c_bigendian=yes
9541fi
9542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9543 conftest.$ac_objext conftest.beam conftest.$ac_ext
9544fi
8690e634 9545
88b48903
WN
9546 fi
9547fi
9548:
9549 case $ac_cv_c_bigendian in #(
9550 yes)
9551 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
9552 no)
9553 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
9554 universal)
8690e634 9555
88b48903 9556$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 9557
88b48903
WN
9558 ;; #(
9559 *)
9560 gl_cv_cc_double_expbit0="unknown" ;;
9561 esac
8690e634
JK
9562
9563
88b48903
WN
9564fi
9565rm -f conftest*
8690e634 9566
8690e634 9567
88b48903
WN
9568else
9569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9570/* end confdefs.h. */
8690e634 9571
88b48903
WN
9572#include <float.h>
9573#include <stddef.h>
9574#include <stdio.h>
9575#include <string.h>
9576#define NWORDS \
9577 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
9578typedef union { double value; unsigned int word[NWORDS]; } memory_double;
9579static unsigned int ored_words[NWORDS];
9580static unsigned int anded_words[NWORDS];
9581static void add_to_ored_words (double x)
9582{
9583 memory_double m;
9584 size_t i;
9585 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
9586 memset (&m, 0, sizeof (memory_double));
9587 m.value = x;
9588 for (i = 0; i < NWORDS; i++)
9589 {
9590 ored_words[i] |= m.word[i];
9591 anded_words[i] &= m.word[i];
9592 }
9593}
9594int main ()
9595{
9596 size_t j;
9597 FILE *fp = fopen ("conftest.out", "w");
9598 if (fp == NULL)
9599 return 1;
9600 for (j = 0; j < NWORDS; j++)
9601 anded_words[j] = ~ (unsigned int) 0;
9602 add_to_ored_words (0.25);
9603 add_to_ored_words (0.5);
9604 add_to_ored_words (1.0);
9605 add_to_ored_words (2.0);
9606 add_to_ored_words (4.0);
9607 /* Remove bits that are common (e.g. if representation of the first mantissa
9608 bit is explicit). */
9609 for (j = 0; j < NWORDS; j++)
9610 ored_words[j] &= ~anded_words[j];
9611 /* Now find the nonzero word. */
9612 for (j = 0; j < NWORDS; j++)
9613 if (ored_words[j] != 0)
9614 break;
9615 if (j < NWORDS)
9616 {
9617 size_t i;
9618 for (i = j + 1; i < NWORDS; i++)
9619 if (ored_words[i] != 0)
9620 {
9621 fprintf (fp, "unknown");
9622 return (fclose (fp) != 0);
9623 }
9624 for (i = 0; ; i++)
9625 if ((ored_words[j] >> i) & 1)
9626 {
9627 fprintf (fp, "word %d bit %d", (int) j, (int) i);
9628 return (fclose (fp) != 0);
9629 }
9630 }
9631 fprintf (fp, "unknown");
9632 return (fclose (fp) != 0);
9633}
8690e634 9634
88b48903
WN
9635_ACEOF
9636if ac_fn_c_try_run "$LINENO"; then :
9637 gl_cv_cc_double_expbit0=`cat conftest.out`
9638else
9639 gl_cv_cc_double_expbit0="unknown"
9640fi
9641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9642 conftest.$ac_objext conftest.beam conftest.$ac_ext
9643fi
8690e634 9644
88b48903 9645 rm -f conftest.out
8690e634 9646
88b48903
WN
9647fi
9648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
9649$as_echo "$gl_cv_cc_double_expbit0" >&6; }
9650 case "$gl_cv_cc_double_expbit0" in
9651 word*bit*)
9652 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
9653 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
8690e634 9654
88b48903
WN
9655cat >>confdefs.h <<_ACEOF
9656#define DBL_EXPBIT0_WORD $word
9657_ACEOF
8690e634
JK
9658
9659
88b48903
WN
9660cat >>confdefs.h <<_ACEOF
9661#define DBL_EXPBIT0_BIT $bit
9662_ACEOF
8690e634 9663
88b48903
WN
9664 ;;
9665 esac
8690e634
JK
9666
9667
88b48903
WN
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
9669$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
9670if test "${ac_cv_c_bigendian+set}" = set; then :
8690e634
JK
9671 $as_echo_n "(cached) " >&6
9672else
88b48903
WN
9673 ac_cv_c_bigendian=unknown
9674 # See if we're dealing with a universal compiler.
9675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9676/* end confdefs.h. */
9677#ifndef __APPLE_CC__
9678 not a universal capable compiler
9679 #endif
9680 typedef int dummy;
9681
9682_ACEOF
9683if ac_fn_c_try_compile "$LINENO"; then :
9684
9685 # Check for potential -arch flags. It is not universal unless
9686 # there are at least two -arch flags with different values.
9687 ac_arch=
9688 ac_prev=
9689 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
9690 if test -n "$ac_prev"; then
9691 case $ac_word in
9692 i?86 | x86_64 | ppc | ppc64)
9693 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
9694 ac_arch=$ac_word
9695 else
9696 ac_cv_c_bigendian=universal
9697 break
9698 fi
9699 ;;
9700 esac
9701 ac_prev=
9702 elif test "x$ac_word" = "x-arch"; then
9703 ac_prev=arch
9704 fi
9705 done
9706fi
9707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9708 if test $ac_cv_c_bigendian = unknown; then
9709 # See if sys/param.h defines the BYTE_ORDER macro.
9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9711/* end confdefs.h. */
9712#include <sys/types.h>
88b48903
WN
9713 #include <sys/param.h>
9714
9715int
9716main ()
9717{
9718#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
9719 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
9720 && LITTLE_ENDIAN)
9721 bogus endian macros
9722 #endif
9723
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728if ac_fn_c_try_compile "$LINENO"; then :
9729 # It does; now see whether it defined to BIG_ENDIAN or not.
9730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9731/* end confdefs.h. */
9732#include <sys/types.h>
9733 #include <sys/param.h>
9734
9735int
9736main ()
9737{
9738#if BYTE_ORDER != BIG_ENDIAN
9739 not big endian
9740 #endif
9741
9742 ;
9743 return 0;
9744}
9745_ACEOF
9746if ac_fn_c_try_compile "$LINENO"; then :
9747 ac_cv_c_bigendian=yes
9748else
9749 ac_cv_c_bigendian=no
9750fi
9751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9752fi
9753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9754 fi
9755 if test $ac_cv_c_bigendian = unknown; then
9756 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
9757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9758/* end confdefs.h. */
9759#include <limits.h>
9760
9761int
9762main ()
9763{
9764#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
9765 bogus endian macros
9766 #endif
9767
9768 ;
9769 return 0;
9770}
9771_ACEOF
9772if ac_fn_c_try_compile "$LINENO"; then :
9773 # It does; now see whether it defined to _BIG_ENDIAN or not.
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775/* end confdefs.h. */
9776#include <limits.h>
9777
9778int
9779main ()
9780{
9781#ifndef _BIG_ENDIAN
9782 not big endian
9783 #endif
9784
9785 ;
9786 return 0;
9787}
9788_ACEOF
9789if ac_fn_c_try_compile "$LINENO"; then :
9790 ac_cv_c_bigendian=yes
9791else
9792 ac_cv_c_bigendian=no
9793fi
9794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9795fi
9796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9797 fi
9798 if test $ac_cv_c_bigendian = unknown; then
9799 # Compile a test program.
9800 if test "$cross_compiling" = yes; then :
9801 # Try to guess by grepping values from an object file.
9802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9803/* end confdefs.h. */
9804short int ascii_mm[] =
9805 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9806 short int ascii_ii[] =
9807 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9808 int use_ascii (int i) {
9809 return ascii_mm[i] + ascii_ii[i];
9810 }
9811 short int ebcdic_ii[] =
9812 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9813 short int ebcdic_mm[] =
9814 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9815 int use_ebcdic (int i) {
9816 return ebcdic_mm[i] + ebcdic_ii[i];
9817 }
9818 extern int foo;
9819
9820int
9821main ()
9822{
9823return use_ascii (foo) == use_ebcdic (foo);
9824 ;
9825 return 0;
9826}
9827_ACEOF
9828if ac_fn_c_try_compile "$LINENO"; then :
9829 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
9830 ac_cv_c_bigendian=yes
9831 fi
9832 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9833 if test "$ac_cv_c_bigendian" = unknown; then
9834 ac_cv_c_bigendian=no
9835 else
9836 # finding both strings is unlikely to happen, but who knows?
9837 ac_cv_c_bigendian=unknown
9838 fi
9839 fi
9840fi
9841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9842else
9843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9844/* end confdefs.h. */
9845$ac_includes_default
9846int
9847main ()
9848{
9849
9850 /* Are we little or big endian? From Harbison&Steele. */
9851 union
9852 {
9853 long int l;
9854 char c[sizeof (long int)];
9855 } u;
9856 u.l = 1;
9857 return u.c[sizeof (long int) - 1] == 1;
9858
9859 ;
9860 return 0;
9861}
9862_ACEOF
9863if ac_fn_c_try_run "$LINENO"; then :
9864 ac_cv_c_bigendian=no
9865else
9866 ac_cv_c_bigendian=yes
9867fi
9868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9869 conftest.$ac_objext conftest.beam conftest.$ac_ext
9870fi
9871
9872 fi
9873fi
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9875$as_echo "$ac_cv_c_bigendian" >&6; }
9876 case $ac_cv_c_bigendian in #(
9877 yes)
9878 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9879;; #(
9880 no)
9881 ;; #(
9882 universal)
9883
9884$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9885
9886 ;; #(
9887 *)
9888 as_fn_error "unknown endianness
9889 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
9890 esac
9891
9892
9893
2196f55f
YQ
9894
9895 case "$host_os" in
9896 mingw*)
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9898$as_echo_n "checking for 64-bit off_t... " >&6; }
9899if test "${gl_cv_type_off_t_64+set}" = set; then :
9900 $as_echo_n "(cached) " >&6
9901else
9902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9903/* end confdefs.h. */
9904#include <sys/types.h>
9905 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9906
9907int
9908main ()
9909{
9910
9911 ;
9912 return 0;
9913}
9914_ACEOF
9915if ac_fn_c_try_compile "$LINENO"; then :
9916 gl_cv_type_off_t_64=yes
9917else
9918 gl_cv_type_off_t_64=no
9919fi
9920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9921
9922fi
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9924$as_echo "$gl_cv_type_off_t_64" >&6; }
9925 if test $gl_cv_type_off_t_64 = no; then
9926 WINDOWS_64_BIT_OFF_T=1
9927 else
9928 WINDOWS_64_BIT_OFF_T=0
9929 fi
9930 WINDOWS_64_BIT_ST_SIZE=1
9931 ;;
9932 *)
9933 WINDOWS_64_BIT_OFF_T=0
9934 WINDOWS_64_BIT_ST_SIZE=0
9935 ;;
9936 esac
9937
9938
88b48903
WN
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
9940$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
9941if test "${am_cv_langinfo_codeset+set}" = set; then :
9942 $as_echo_n "(cached) " >&6
9943else
9944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9945/* end confdefs.h. */
9946#include <langinfo.h>
9947int
9948main ()
9949{
9950char* cs = nl_langinfo(CODESET); return !cs;
9951 ;
9952 return 0;
9953}
9954_ACEOF
9955if ac_fn_c_try_link "$LINENO"; then :
9956 am_cv_langinfo_codeset=yes
9957else
9958 am_cv_langinfo_codeset=no
9959fi
9960rm -f core conftest.err conftest.$ac_objext \
9961 conftest$ac_exeext conftest.$ac_ext
9962
9963fi
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
9965$as_echo "$am_cv_langinfo_codeset" >&6; }
9966 if test $am_cv_langinfo_codeset = yes; then
9967
9968$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
9969
9970 fi
9971
9972
9973
9974
9975
9976
9977
9978
88b48903
WN
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9980$as_echo_n "checking for working fcntl.h... " >&6; }
9981if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
9982 $as_echo_n "(cached) " >&6
9983else
9984 if test "$cross_compiling" = yes; then :
9985 gl_cv_header_working_fcntl_h=cross-compiling
9986else
9987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9988/* end confdefs.h. */
9989#include <sys/types.h>
9990 #include <sys/stat.h>
9991 #if HAVE_UNISTD_H
9992 # include <unistd.h>
9993 #else /* on Windows with MSVC */
9994 # include <io.h>
9995 # include <stdlib.h>
8690e634
JK
9996 # defined sleep(n) _sleep ((n) * 1000)
9997 #endif
9998 #include <fcntl.h>
9999 #ifndef O_NOATIME
10000 #define O_NOATIME 0
10001 #endif
10002 #ifndef O_NOFOLLOW
10003 #define O_NOFOLLOW 0
10004 #endif
10005 static int const constants[] =
10006 {
10007 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10008 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10009 };
10010
10011int
10012main ()
10013{
10014
10015 int result = !constants;
10016 #if HAVE_SYMLINK
10017 {
10018 static char const sym[] = "conftest.sym";
a512b375
JB
10019 if (symlink ("/dev/null", sym) != 0)
10020 result |= 2;
10021 else
10022 {
10023 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10024 if (fd >= 0)
10025 {
10026 close (fd);
10027 result |= 4;
10028 }
10029 }
10030 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8690e634
JK
10031 result |= 2;
10032 else
10033 {
10034 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10035 if (fd >= 0)
10036 {
10037 close (fd);
10038 result |= 4;
10039 }
10040 }
10041 unlink (sym);
10042 }
10043 #endif
10044 {
10045 static char const file[] = "confdefs.h";
10046 int fd = open (file, O_RDONLY | O_NOATIME);
10047 if (fd < 0)
10048 result |= 8;
10049 else
10050 {
10051 struct stat st0;
10052 if (fstat (fd, &st0) != 0)
10053 result |= 16;
10054 else
10055 {
10056 char c;
10057 sleep (1);
10058 if (read (fd, &c, 1) != 1)
10059 result |= 24;
10060 else
10061 {
10062 if (close (fd) != 0)
10063 result |= 32;
10064 else
10065 {
10066 struct stat st1;
10067 if (stat (file, &st1) != 0)
10068 result |= 40;
10069 else
10070 if (st0.st_atime != st1.st_atime)
10071 result |= 64;
10072 }
10073 }
10074 }
10075 }
10076 }
10077 return result;
10078 ;
10079 return 0;
10080}
10081_ACEOF
10082if ac_fn_c_try_run "$LINENO"; then :
10083 gl_cv_header_working_fcntl_h=yes
10084else
10085 case $? in #(
10086 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10087 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10088 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10089 *) gl_cv_header_working_fcntl_h='no';;
10090 esac
10091fi
10092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10093 conftest.$ac_objext conftest.beam conftest.$ac_ext
10094fi
10095
10096fi
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10098$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10099
10100 case $gl_cv_header_working_fcntl_h in #(
10101 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10102 *) ac_val=1;;
10103 esac
10104
10105cat >>confdefs.h <<_ACEOF
10106#define HAVE_WORKING_O_NOATIME $ac_val
10107_ACEOF
10108
10109
10110 case $gl_cv_header_working_fcntl_h in #(
10111 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10112 *) ac_val=1;;
10113 esac
10114
10115cat >>confdefs.h <<_ACEOF
10116#define HAVE_WORKING_O_NOFOLLOW $ac_val
10117_ACEOF
10118
10119
3574124b 10120ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8690e634
JK
10121if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
10122 ac_have_decl=1
10123else
10124 ac_have_decl=0
10125fi
10126
10127cat >>confdefs.h <<_ACEOF
10128#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
10129_ACEOF
10130
10131
8690e634
JK
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
10133$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
10134if test "${ac_cv_gnu_library_2_1+set}" = set; then :
10135 $as_echo_n "(cached) " >&6
10136else
10137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10138/* end confdefs.h. */
10139
10140#include <features.h>
10141#ifdef __GNU_LIBRARY__
10142 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
10143 Lucky GNU user
10144 #endif
10145#endif
10146#ifdef __UCLIBC__
10147 Lucky user
10148#endif
10149
10150_ACEOF
10151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10152 $EGREP "Lucky" >/dev/null 2>&1; then :
10153 ac_cv_gnu_library_2_1=yes
10154else
10155 ac_cv_gnu_library_2_1=no
10156fi
10157rm -f conftest*
10158
10159
10160
10161fi
10162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
10163$as_echo "$ac_cv_gnu_library_2_1" >&6; }
10164
10165 GLIBC21="$ac_cv_gnu_library_2_1"
10166
10167
10168
f45c62c4
YQ
10169 GNULIB_FCHMODAT=0;
10170 GNULIB_FSTAT=0;
10171 GNULIB_FSTATAT=0;
10172 GNULIB_FUTIMENS=0;
10173 GNULIB_LCHMOD=0;
10174 GNULIB_LSTAT=0;
10175 GNULIB_MKDIRAT=0;
10176 GNULIB_MKFIFO=0;
10177 GNULIB_MKFIFOAT=0;
10178 GNULIB_MKNOD=0;
10179 GNULIB_MKNODAT=0;
10180 GNULIB_STAT=0;
10181 GNULIB_UTIMENSAT=0;
10182 HAVE_FCHMODAT=1;
10183 HAVE_FSTATAT=1;
10184 HAVE_FUTIMENS=1;
10185 HAVE_LCHMOD=1;
10186 HAVE_LSTAT=1;
10187 HAVE_MKDIRAT=1;
10188 HAVE_MKFIFO=1;
10189 HAVE_MKFIFOAT=1;
10190 HAVE_MKNOD=1;
10191 HAVE_MKNODAT=1;
10192 HAVE_UTIMENSAT=1;
10193 REPLACE_FSTAT=0;
10194 REPLACE_FSTATAT=0;
10195 REPLACE_FUTIMENS=0;
10196 REPLACE_LSTAT=0;
10197 REPLACE_MKDIR=0;
10198 REPLACE_MKFIFO=0;
10199 REPLACE_MKNOD=0;
10200 REPLACE_STAT=0;
10201 REPLACE_UTIMENSAT=0;
10202
10203
10204
10205
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10207$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10208if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
10209 $as_echo_n "(cached) " >&6
10210else
10211 rm -f conftest.sym conftest.file
10212 echo >conftest.file
4a626d0a 10213 if test "$cross_compiling" = yes; then :
f45c62c4 10214 case "$host_os" in
4a626d0a
PA
10215 *-gnu*)
10216 # Guess yes on glibc systems.
10217 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10218 *)
10219 # If we don't know, assume the worst.
10220 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
10221 esac
f45c62c4
YQ
10222
10223else
10224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225/* end confdefs.h. */
10226$ac_includes_default
10227int
10228main ()
10229{
10230struct stat sbuf;
4a626d0a
PA
10231 if (symlink ("conftest.file", "conftest.sym") != 0)
10232 return 1;
10233 /* Linux will dereference the symlink and fail, as required by
10234 POSIX. That is better in the sense that it means we will not
10235 have to compile and use the lstat wrapper. */
10236 return lstat ("conftest.sym/", &sbuf) == 0;
f45c62c4
YQ
10237
10238 ;
10239 return 0;
10240}
10241_ACEOF
10242if ac_fn_c_try_run "$LINENO"; then :
10243 gl_cv_func_lstat_dereferences_slashed_symlink=yes
10244else
10245 gl_cv_func_lstat_dereferences_slashed_symlink=no
10246fi
10247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10248 conftest.$ac_objext conftest.beam conftest.$ac_ext
10249fi
10250
f45c62c4
YQ
10251 rm -f conftest.sym conftest.file
10252
10253fi
10254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
10255$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10256 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
10257 *yes)
10258
10259cat >>confdefs.h <<_ACEOF
10260#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10261_ACEOF
10262
10263 ;;
10264 esac
10265
10266
6a29c58e
YQ
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10268$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10269if test "${gl_cv_func_malloc_posix+set}" = set; then :
10270 $as_echo_n "(cached) " >&6
10271else
10272
10273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10274/* end confdefs.h. */
10275
10276int
10277main ()
10278{
10279#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10280 choke me
10281 #endif
10282
10283 ;
10284 return 0;
10285}
10286_ACEOF
10287if ac_fn_c_try_compile "$LINENO"; then :
10288 gl_cv_func_malloc_posix=yes
10289else
10290 gl_cv_func_malloc_posix=no
10291fi
10292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10293
10294fi
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10296$as_echo "$gl_cv_func_malloc_posix" >&6; }
10297
10298
10299
10300 for ac_header in stdlib.h
98399780
YQ
10301do :
10302 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10303if test "x$ac_cv_header_stdlib_h" = x""yes; then :
10304 cat >>confdefs.h <<_ACEOF
10305#define HAVE_STDLIB_H 1
10306_ACEOF
10307
10308fi
10309
10310done
10311
6a29c58e 10312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780
YQ
10313$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10314if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
10315 $as_echo_n "(cached) " >&6
10316else
10317 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
10318 case "$host_os" in
10319 # Guess yes on platforms where we know the result.
10320 *-gnu* | freebsd* | netbsd* | openbsd* \
10321 | hpux* | solaris* | cygwin* | mingw*)
10322 ac_cv_func_malloc_0_nonnull=yes ;;
10323 # If we don't know, assume the worst.
10324 *) ac_cv_func_malloc_0_nonnull=no ;;
10325 esac
10326
98399780
YQ
10327else
10328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329/* end confdefs.h. */
10330#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
10331 # include <stdlib.h>
10332 #else
10333 char *malloc ();
10334 #endif
98399780
YQ
10335
10336int
10337main ()
10338{
49e4877c
PA
10339char *p = malloc (0);
10340 int result = !p;
10341 free (p);
10342 return result;
98399780
YQ
10343 ;
10344 return 0;
10345}
6a29c58e 10346
98399780
YQ
10347_ACEOF
10348if ac_fn_c_try_run "$LINENO"; then :
10349 ac_cv_func_malloc_0_nonnull=yes
10350else
10351 ac_cv_func_malloc_0_nonnull=no
10352fi
10353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10354 conftest.$ac_objext conftest.beam conftest.$ac_ext
10355fi
10356
6a29c58e 10357
98399780
YQ
10358fi
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10360$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 10361 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
10362 gl_cv_func_malloc_0_nonnull=1
10363else
10364 gl_cv_func_malloc_0_nonnull=0
10365fi
10366
10367
10368cat >>confdefs.h <<_ACEOF
10369#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
10370_ACEOF
10371
10372
10373
88b48903
WN
10374
10375
8690e634
JK
10376 GNULIB_BTOWC=0;
10377 GNULIB_WCTOB=0;
10378 GNULIB_MBSINIT=0;
10379 GNULIB_MBRTOWC=0;
10380 GNULIB_MBRLEN=0;
10381 GNULIB_MBSRTOWCS=0;
10382 GNULIB_MBSNRTOWCS=0;
10383 GNULIB_WCRTOMB=0;
10384 GNULIB_WCSRTOMBS=0;
10385 GNULIB_WCSNRTOMBS=0;
10386 GNULIB_WCWIDTH=0;
10387 GNULIB_WMEMCHR=0;
10388 GNULIB_WMEMCMP=0;
10389 GNULIB_WMEMCPY=0;
10390 GNULIB_WMEMMOVE=0;
10391 GNULIB_WMEMSET=0;
10392 GNULIB_WCSLEN=0;
10393 GNULIB_WCSNLEN=0;
10394 GNULIB_WCSCPY=0;
10395 GNULIB_WCPCPY=0;
10396 GNULIB_WCSNCPY=0;
10397 GNULIB_WCPNCPY=0;
10398 GNULIB_WCSCAT=0;
10399 GNULIB_WCSNCAT=0;
10400 GNULIB_WCSCMP=0;
10401 GNULIB_WCSNCMP=0;
10402 GNULIB_WCSCASECMP=0;
10403 GNULIB_WCSNCASECMP=0;
10404 GNULIB_WCSCOLL=0;
10405 GNULIB_WCSXFRM=0;
10406 GNULIB_WCSDUP=0;
10407 GNULIB_WCSCHR=0;
10408 GNULIB_WCSRCHR=0;
10409 GNULIB_WCSCSPN=0;
10410 GNULIB_WCSSPN=0;
10411 GNULIB_WCSPBRK=0;
10412 GNULIB_WCSSTR=0;
10413 GNULIB_WCSTOK=0;
10414 GNULIB_WCSWIDTH=0;
10415 HAVE_BTOWC=1;
10416 HAVE_MBSINIT=1;
10417 HAVE_MBRTOWC=1;
10418 HAVE_MBRLEN=1;
10419 HAVE_MBSRTOWCS=1;
10420 HAVE_MBSNRTOWCS=1;
10421 HAVE_WCRTOMB=1;
10422 HAVE_WCSRTOMBS=1;
10423 HAVE_WCSNRTOMBS=1;
10424 HAVE_WMEMCHR=1;
10425 HAVE_WMEMCMP=1;
10426 HAVE_WMEMCPY=1;
10427 HAVE_WMEMMOVE=1;
10428 HAVE_WMEMSET=1;
10429 HAVE_WCSLEN=1;
10430 HAVE_WCSNLEN=1;
10431 HAVE_WCSCPY=1;
10432 HAVE_WCPCPY=1;
10433 HAVE_WCSNCPY=1;
10434 HAVE_WCPNCPY=1;
10435 HAVE_WCSCAT=1;
10436 HAVE_WCSNCAT=1;
10437 HAVE_WCSCMP=1;
10438 HAVE_WCSNCMP=1;
10439 HAVE_WCSCASECMP=1;
10440 HAVE_WCSNCASECMP=1;
10441 HAVE_WCSCOLL=1;
10442 HAVE_WCSXFRM=1;
10443 HAVE_WCSDUP=1;
10444 HAVE_WCSCHR=1;
10445 HAVE_WCSRCHR=1;
10446 HAVE_WCSCSPN=1;
10447 HAVE_WCSSPN=1;
10448 HAVE_WCSPBRK=1;
10449 HAVE_WCSSTR=1;
10450 HAVE_WCSTOK=1;
10451 HAVE_WCSWIDTH=1;
10452 HAVE_DECL_WCTOB=1;
10453 HAVE_DECL_WCWIDTH=1;
10454 REPLACE_MBSTATE_T=0;
10455 REPLACE_BTOWC=0;
10456 REPLACE_WCTOB=0;
10457 REPLACE_MBSINIT=0;
10458 REPLACE_MBRTOWC=0;
10459 REPLACE_MBRLEN=0;
10460 REPLACE_MBSRTOWCS=0;
10461 REPLACE_MBSNRTOWCS=0;
10462 REPLACE_WCRTOMB=0;
10463 REPLACE_WCSRTOMBS=0;
10464 REPLACE_WCSNRTOMBS=0;
10465 REPLACE_WCWIDTH=0;
10466 REPLACE_WCSWIDTH=0;
10467
10468
10469
10470
10471
10472
10473
10474
8690e634
JK
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
10476$as_echo_n "checking for a traditional japanese locale... " >&6; }
10477if test "${gt_cv_locale_ja+set}" = set; then :
10478 $as_echo_n "(cached) " >&6
10479else
10480
10481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10482/* end confdefs.h. */
10483
10484#include <locale.h>
10485#include <time.h>
10486#if HAVE_LANGINFO_CODESET
10487# include <langinfo.h>
10488#endif
10489#include <stdlib.h>
10490#include <string.h>
10491struct tm t;
10492char buf[16];
10493int main ()
10494{
10495 const char *p;
10496 /* Check whether the given locale name is recognized by the system. */
10497#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10498 /* On native Windows, setlocale(category, "") looks at the system settings,
10499 not at the environment variables. Also, when an encoding suffix such
10500 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10501 category of the locale to "C". */
10502 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10503 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10504 return 1;
10505#else
10506 if (setlocale (LC_ALL, "") == NULL) return 1;
10507#endif
10508 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10509 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10510 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10511 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10512 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10513 some unit tests fail.
10514 On MirBSD 10, when an unsupported locale is specified, setlocale()
10515 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10516#if HAVE_LANGINFO_CODESET
10517 {
10518 const char *cs = nl_langinfo (CODESET);
10519 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10520 || strcmp (cs, "UTF-8") == 0)
10521 return 1;
10522 }
10523#endif
10524#ifdef __CYGWIN__
10525 /* On Cygwin, avoid locale names without encoding suffix, because the
10526 locale_charset() function relies on the encoding suffix. Note that
10527 LC_ALL is set on the command line. */
10528 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10529#endif
10530 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
10531 on Cygwin 1.5.x. */
10532 if (MB_CUR_MAX == 1)
10533 return 1;
10534 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
10535 This excludes the UTF-8 encoding (except on MirBSD). */
10536 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10537 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
10538 for (p = buf; *p != '\0'; p++)
10539 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
10540 return 1;
10541 return 0;
10542}
10543
10544_ACEOF
10545 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10546 (eval $ac_link) 2>&5
10547 ac_status=$?
10548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10549 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10550 case "$host_os" in
10551 # Handle native Windows specially, because there setlocale() interprets
10552 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10553 # "fr" or "fra" as "French" or "French_France.1252",
10554 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10555 # "ja" as "Japanese" or "Japanese_Japan.932",
10556 # and similar.
10557 mingw*)
10558 # Note that on native Windows, the Japanese locale is
10559 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
10560 # cannot use it here.
10561 gt_cv_locale_ja=none
10562 ;;
10563 *)
10564 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10565 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10566 # configure script would override the LC_ALL setting. Likewise for
10567 # LC_CTYPE, which is also set at the beginning of the configure script.
10568 # Test for the AIX locale name.
10569 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10570 gt_cv_locale_ja=ja_JP
10571 else
10572 # Test for the locale name with explicit encoding suffix.
10573 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10574 gt_cv_locale_ja=ja_JP.EUC-JP
10575 else
10576 # Test for the HP-UX, OSF/1, NetBSD locale name.
10577 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10578 gt_cv_locale_ja=ja_JP.eucJP
10579 else
10580 # Test for the IRIX, FreeBSD locale name.
10581 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10582 gt_cv_locale_ja=ja_JP.EUC
10583 else
10584 # Test for the Solaris 7 locale name.
10585 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10586 gt_cv_locale_ja=ja
10587 else
10588 # Special test for NetBSD 1.6.
10589 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
10590 gt_cv_locale_ja=ja_JP.eucJP
10591 else
10592 # None found.
10593 gt_cv_locale_ja=none
10594 fi
10595 fi
10596 fi
10597 fi
10598 fi
10599 fi
10600 ;;
10601 esac
10602 fi
10603 rm -fr conftest*
10604
10605fi
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
10607$as_echo "$gt_cv_locale_ja" >&6; }
10608 LOCALE_JA=$gt_cv_locale_ja
10609
10610
10611
10612
10613
10614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
10615$as_echo_n "checking for a transitional chinese locale... " >&6; }
10616if test "${gt_cv_locale_zh_CN+set}" = set; then :
10617 $as_echo_n "(cached) " >&6
10618else
10619
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621/* end confdefs.h. */
10622
10623#include <locale.h>
10624#include <stdlib.h>
10625#include <time.h>
10626#if HAVE_LANGINFO_CODESET
10627# include <langinfo.h>
10628#endif
10629#include <stdlib.h>
10630#include <string.h>
10631struct tm t;
10632char buf[16];
10633int main ()
10634{
10635 const char *p;
10636 /* Check whether the given locale name is recognized by the system. */
10637#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10638 /* On native Windows, setlocale(category, "") looks at the system settings,
10639 not at the environment variables. Also, when an encoding suffix such
10640 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10641 category of the locale to "C". */
10642 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10643 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10644 return 1;
10645#else
10646 if (setlocale (LC_ALL, "") == NULL) return 1;
10647#endif
10648 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10649 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10650 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10651 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10652 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10653 some unit tests fail.
10654 On MirBSD 10, when an unsupported locale is specified, setlocale()
10655 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10656#if HAVE_LANGINFO_CODESET
10657 {
10658 const char *cs = nl_langinfo (CODESET);
10659 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10660 || strcmp (cs, "UTF-8") == 0)
10661 return 1;
10662 }
10663#endif
10664#ifdef __CYGWIN__
10665 /* On Cygwin, avoid locale names without encoding suffix, because the
10666 locale_charset() function relies on the encoding suffix. Note that
10667 LC_ALL is set on the command line. */
10668 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10669#endif
10670 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
10671 This excludes the UTF-8 encoding (except on MirBSD). */
10672 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10673 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
10674 for (p = buf; *p != '\0'; p++)
10675 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
10676 return 1;
10677 /* Check whether a typical GB18030 multibyte sequence is recognized as a
10678 single wide character. This excludes the GB2312 and GBK encodings. */
10679 if (mblen ("\203\062\332\066", 5) != 4)
10680 return 1;
10681 return 0;
10682}
10683
10684_ACEOF
10685 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10686 (eval $ac_link) 2>&5
10687 ac_status=$?
10688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10689 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10690 case "$host_os" in
10691 # Handle native Windows specially, because there setlocale() interprets
10692 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10693 # "fr" or "fra" as "French" or "French_France.1252",
10694 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10695 # "ja" as "Japanese" or "Japanese_Japan.932",
10696 # and similar.
10697 mingw*)
10698 # Test for the hypothetical native Windows locale name.
10699 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10700 gt_cv_locale_zh_CN=Chinese_China.54936
10701 else
10702 # None found.
10703 gt_cv_locale_zh_CN=none
10704 fi
10705 ;;
10706 solaris2.8)
10707 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
10708 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
10709 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
10710 gt_cv_locale_zh_CN=none
10711 ;;
10712 *)
10713 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10714 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10715 # configure script would override the LC_ALL setting. Likewise for
10716 # LC_CTYPE, which is also set at the beginning of the configure script.
10717 # Test for the locale name without encoding suffix.
10718 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10719 gt_cv_locale_zh_CN=zh_CN
10720 else
10721 # Test for the locale name with explicit encoding suffix.
10722 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10723 gt_cv_locale_zh_CN=zh_CN.GB18030
10724 else
10725 # None found.
10726 gt_cv_locale_zh_CN=none
10727 fi
10728 fi
10729 ;;
10730 esac
10731 else
10732 # If there was a link error, due to mblen(), the system is so old that
10733 # it certainly doesn't have a chinese locale.
10734 gt_cv_locale_zh_CN=none
10735 fi
10736 rm -fr conftest*
10737
10738fi
10739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
10740$as_echo "$gt_cv_locale_zh_CN" >&6; }
10741 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
10742
10743
10744
10745
10746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
10747$as_echo_n "checking for a french Unicode locale... " >&6; }
10748if test "${gt_cv_locale_fr_utf8+set}" = set; then :
10749 $as_echo_n "(cached) " >&6
10750else
10751
10752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10753/* end confdefs.h. */
10754
10755#include <locale.h>
10756#include <time.h>
10757#if HAVE_LANGINFO_CODESET
10758# include <langinfo.h>
10759#endif
10760#include <stdlib.h>
10761#include <string.h>
10762struct tm t;
10763char buf[16];
10764int main () {
10765 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
10766 imitates locale dependent behaviour by looking at the environment
10767 variables, and all locales use the UTF-8 encoding. */
10768#if !(defined __BEOS__ || defined __HAIKU__)
10769 /* Check whether the given locale name is recognized by the system. */
10770# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10771 /* On native Windows, setlocale(category, "") looks at the system settings,
10772 not at the environment variables. Also, when an encoding suffix such
10773 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10774 category of the locale to "C". */
10775 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10776 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10777 return 1;
10778# else
10779 if (setlocale (LC_ALL, "") == NULL) return 1;
10780# endif
10781 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10782 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10783 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10784 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10785 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10786 some unit tests fail. */
10787# if HAVE_LANGINFO_CODESET
10788 {
10789 const char *cs = nl_langinfo (CODESET);
10790 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
10791 return 1;
10792 }
10793# endif
10794# ifdef __CYGWIN__
10795 /* On Cygwin, avoid locale names without encoding suffix, because the
10796 locale_charset() function relies on the encoding suffix. Note that
10797 LC_ALL is set on the command line. */
10798 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10799# endif
10800 /* Check whether in the abbreviation of the second month, the second
10801 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
10802 two bytes long, with UTF-8 encoding. */
10803 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10804 if (strftime (buf, sizeof (buf), "%b", &t) < 4
10805 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
10806 return 1;
10807#endif
10808#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10809 /* Check whether the decimal separator is a comma.
10810 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10811 are nl_langinfo(RADIXCHAR) are both ".". */
10812 if (localeconv () ->decimal_point[0] != ',') return 1;
10813#endif
10814 return 0;
10815}
10816
10817_ACEOF
10818 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10819 (eval $ac_link) 2>&5
10820 ac_status=$?
10821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10822 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10823 case "$host_os" in
10824 # Handle native Windows specially, because there setlocale() interprets
10825 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10826 # "fr" or "fra" as "French" or "French_France.1252",
10827 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10828 # "ja" as "Japanese" or "Japanese_Japan.932",
10829 # and similar.
10830 mingw*)
10831 # Test for the hypothetical native Windows locale name.
10832 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10833 gt_cv_locale_fr_utf8=French_France.65001
10834 else
10835 # None found.
10836 gt_cv_locale_fr_utf8=none
10837 fi
10838 ;;
10839 *)
10840 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10841 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10842 # configure script would override the LC_ALL setting. Likewise for
10843 # LC_CTYPE, which is also set at the beginning of the configure script.
10844 # Test for the usual locale name.
10845 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10846 gt_cv_locale_fr_utf8=fr_FR
10847 else
10848 # Test for the locale name with explicit encoding suffix.
10849 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10850 gt_cv_locale_fr_utf8=fr_FR.UTF-8
10851 else
10852 # Test for the Solaris 7 locale name.
10853 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10854 gt_cv_locale_fr_utf8=fr.UTF-8
10855 else
10856 # None found.
10857 gt_cv_locale_fr_utf8=none
10858 fi
10859 fi
10860 fi
10861 ;;
10862 esac
10863 fi
10864 rm -fr conftest*
10865
10866fi
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
10868$as_echo "$gt_cv_locale_fr_utf8" >&6; }
10869 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
10870
10871
10872
10873
10874
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10876$as_echo_n "checking for a traditional french locale... " >&6; }
10877if test "${gt_cv_locale_fr+set}" = set; then :
10878 $as_echo_n "(cached) " >&6
10879else
10880
10881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10882/* end confdefs.h. */
10883
10884#include <locale.h>
10885#include <time.h>
10886#if HAVE_LANGINFO_CODESET
10887# include <langinfo.h>
10888#endif
10889#include <stdlib.h>
10890#include <string.h>
10891struct tm t;
10892char buf[16];
10893int main () {
10894 /* Check whether the given locale name is recognized by the system. */
10895#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10896 /* On native Windows, setlocale(category, "") looks at the system settings,
10897 not at the environment variables. Also, when an encoding suffix such
10898 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10899 category of the locale to "C". */
10900 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10901 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10902 return 1;
10903#else
10904 if (setlocale (LC_ALL, "") == NULL) return 1;
10905#endif
10906 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10907 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10908 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10909 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10910 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10911 some unit tests fail.
10912 On MirBSD 10, when an unsupported locale is specified, setlocale()
10913 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10914#if HAVE_LANGINFO_CODESET
10915 {
10916 const char *cs = nl_langinfo (CODESET);
10917 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10918 || strcmp (cs, "UTF-8") == 0)
10919 return 1;
10920 }
10921#endif
10922#ifdef __CYGWIN__
10923 /* On Cygwin, avoid locale names without encoding suffix, because the
10924 locale_charset() function relies on the encoding suffix. Note that
10925 LC_ALL is set on the command line. */
10926 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10927#endif
10928 /* Check whether in the abbreviation of the second month, the second
10929 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10930 one byte long. This excludes the UTF-8 encoding. */
10931 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10932 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10933#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10934 /* Check whether the decimal separator is a comma.
10935 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10936 are nl_langinfo(RADIXCHAR) are both ".". */
10937 if (localeconv () ->decimal_point[0] != ',') return 1;
10938#endif
10939 return 0;
10940}
10941
10942_ACEOF
10943 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10944 (eval $ac_link) 2>&5
10945 ac_status=$?
10946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10947 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10948 case "$host_os" in
10949 # Handle native Windows specially, because there setlocale() interprets
10950 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10951 # "fr" or "fra" as "French" or "French_France.1252",
10952 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10953 # "ja" as "Japanese" or "Japanese_Japan.932",
10954 # and similar.
10955 mingw*)
10956 # Test for the native Windows locale name.
10957 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10958 gt_cv_locale_fr=French_France.1252
10959 else
10960 # None found.
10961 gt_cv_locale_fr=none
10962 fi
10963 ;;
10964 *)
10965 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10966 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10967 # configure script would override the LC_ALL setting. Likewise for
10968 # LC_CTYPE, which is also set at the beginning of the configure script.
10969 # Test for the usual locale name.
10970 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10971 gt_cv_locale_fr=fr_FR
10972 else
10973 # Test for the locale name with explicit encoding suffix.
10974 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10975 gt_cv_locale_fr=fr_FR.ISO-8859-1
10976 else
10977 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10978 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10979 gt_cv_locale_fr=fr_FR.ISO8859-1
10980 else
10981 # Test for the HP-UX locale name.
10982 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10983 gt_cv_locale_fr=fr_FR.iso88591
10984 else
10985 # Test for the Solaris 7 locale name.
10986 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10987 gt_cv_locale_fr=fr
10988 else
10989 # None found.
10990 gt_cv_locale_fr=none
10991 fi
10992 fi
10993 fi
10994 fi
10995 fi
10996 ;;
10997 esac
10998 fi
10999 rm -fr conftest*
11000
11001fi
11002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
11003$as_echo "$gt_cv_locale_fr" >&6; }
11004 LOCALE_FR=$gt_cv_locale_fr
11005
11006
11007
11008
11009
11010
11011
8690e634
JK
11012 GNULIB_FFSL=0;
11013 GNULIB_FFSLL=0;
11014 GNULIB_MEMCHR=0;
11015 GNULIB_MEMMEM=0;
11016 GNULIB_MEMPCPY=0;
11017 GNULIB_MEMRCHR=0;
11018 GNULIB_RAWMEMCHR=0;
11019 GNULIB_STPCPY=0;
11020 GNULIB_STPNCPY=0;
11021 GNULIB_STRCHRNUL=0;
11022 GNULIB_STRDUP=0;
11023 GNULIB_STRNCAT=0;
11024 GNULIB_STRNDUP=0;
11025 GNULIB_STRNLEN=0;
11026 GNULIB_STRPBRK=0;
11027 GNULIB_STRSEP=0;
11028 GNULIB_STRSTR=0;
11029 GNULIB_STRCASESTR=0;
11030 GNULIB_STRTOK_R=0;
11031 GNULIB_MBSLEN=0;
11032 GNULIB_MBSNLEN=0;
11033 GNULIB_MBSCHR=0;
11034 GNULIB_MBSRCHR=0;
11035 GNULIB_MBSSTR=0;
11036 GNULIB_MBSCASECMP=0;
11037 GNULIB_MBSNCASECMP=0;
11038 GNULIB_MBSPCASECMP=0;
11039 GNULIB_MBSCASESTR=0;
11040 GNULIB_MBSCSPN=0;
11041 GNULIB_MBSPBRK=0;
11042 GNULIB_MBSSPN=0;
11043 GNULIB_MBSSEP=0;
11044 GNULIB_MBSTOK_R=0;
11045 GNULIB_STRERROR=0;
11046 GNULIB_STRERROR_R=0;
11047 GNULIB_STRSIGNAL=0;
11048 GNULIB_STRVERSCMP=0;
11049 HAVE_MBSLEN=0;
11050 HAVE_FFSL=1;
11051 HAVE_FFSLL=1;
11052 HAVE_MEMCHR=1;
11053 HAVE_DECL_MEMMEM=1;
11054 HAVE_MEMPCPY=1;
11055 HAVE_DECL_MEMRCHR=1;
11056 HAVE_RAWMEMCHR=1;
11057 HAVE_STPCPY=1;
11058 HAVE_STPNCPY=1;
11059 HAVE_STRCHRNUL=1;
11060 HAVE_DECL_STRDUP=1;
11061 HAVE_DECL_STRNDUP=1;
11062 HAVE_DECL_STRNLEN=1;
11063 HAVE_STRPBRK=1;
11064 HAVE_STRSEP=1;
11065 HAVE_STRCASESTR=1;
11066 HAVE_DECL_STRTOK_R=1;
11067 HAVE_DECL_STRERROR_R=1;
11068 HAVE_DECL_STRSIGNAL=1;
11069 HAVE_STRVERSCMP=1;
11070 REPLACE_MEMCHR=0;
11071 REPLACE_MEMMEM=0;
11072 REPLACE_STPNCPY=0;
11073 REPLACE_STRDUP=0;
11074 REPLACE_STRSTR=0;
11075 REPLACE_STRCASESTR=0;
11076 REPLACE_STRCHRNUL=0;
11077 REPLACE_STRERROR=0;
11078 REPLACE_STRERROR_R=0;
11079 REPLACE_STRNCAT=0;
11080 REPLACE_STRNDUP=0;
11081 REPLACE_STRNLEN=0;
11082 REPLACE_STRSIGNAL=0;
11083 REPLACE_STRTOK_R=0;
11084 UNDEFINE_STRTOK_R=0;
11085
11086
11087
11088
11089
11090 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
11091 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
11092 # irrelevant for anonymous mappings.
11093 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
11094if test "x$ac_cv_func_mmap" = x""yes; then :
11095 gl_have_mmap=yes
11096else
11097 gl_have_mmap=no
11098fi
11099
11100
11101 # Try to allow MAP_ANONYMOUS.
11102 gl_have_mmap_anonymous=no
11103 if test $gl_have_mmap = yes; then
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
11105$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
11106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11107/* end confdefs.h. */
11108
11109#include <sys/mman.h>
11110#ifdef MAP_ANONYMOUS
11111 I cannot identify this map
11112#endif
11113
11114_ACEOF
11115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11116 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11117 gl_have_mmap_anonymous=yes
11118fi
11119rm -f conftest*
11120
11121 if test $gl_have_mmap_anonymous != yes; then
11122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11123/* end confdefs.h. */
11124
11125#include <sys/mman.h>
11126#ifdef MAP_ANON
11127 I cannot identify this map
11128#endif
11129
11130_ACEOF
11131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11132 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
11133
11134$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
11135
11136 gl_have_mmap_anonymous=yes
11137fi
11138rm -f conftest*
11139
11140 fi
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
11142$as_echo "$gl_have_mmap_anonymous" >&6; }
11143 if test $gl_have_mmap_anonymous = yes; then
11144
11145$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
11146
11147 fi
11148 fi
11149
11150
8690e634
JK
11151
11152
11153
11154
11155 if test $HAVE_MEMCHR = 1; then
11156 # Detect platform-specific bugs in some versions of glibc:
11157 # memchr should not dereference anything with length 0
11158 # http://bugzilla.redhat.com/499689
11159 # memchr should not dereference overestimated length after a match
11160 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
11161 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
11162 # Assume that memchr works on platforms that lack mprotect.
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
11164$as_echo_n "checking whether memchr works... " >&6; }
11165if test "${gl_cv_func_memchr_works+set}" = set; then :
11166 $as_echo_n "(cached) " >&6
11167else
11168 if test "$cross_compiling" = yes; then :
11169 gl_cv_func_memchr_works="guessing no"
11170else
11171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11172/* end confdefs.h. */
11173
11174#include <string.h>
11175#if HAVE_SYS_MMAN_H
11176# include <fcntl.h>
11177# include <unistd.h>
11178# include <sys/types.h>
11179# include <sys/mman.h>
11180# ifndef MAP_FILE
11181# define MAP_FILE 0
11182# endif
11183#endif
11184
11185int
11186main ()
11187{
11188
11189 int result = 0;
11190 char *fence = NULL;
11191#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
11192# if HAVE_MAP_ANONYMOUS
11193 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
11194 const int fd = -1;
11195# else /* !HAVE_MAP_ANONYMOUS */
11196 const int flags = MAP_FILE | MAP_PRIVATE;
11197 int fd = open ("/dev/zero", O_RDONLY, 0666);
11198 if (fd >= 0)
11199# endif
11200 {
11201 int pagesize = getpagesize ();
11202 char *two_pages =
11203 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
11204 flags, fd, 0);
11205 if (two_pages != (char *)(-1)
11206 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
11207 fence = two_pages + pagesize;
11208 }
11209#endif
11210 if (fence)
11211 {
11212 if (memchr (fence, 0, 0))
11213 result |= 1;
11214 strcpy (fence - 9, "12345678");
11215 if (memchr (fence - 9, 0, 79) != fence - 1)
11216 result |= 2;
11217 if (memchr (fence - 1, 0, 3) != fence - 1)
11218 result |= 4;
11219 }
11220 return result;
11221
11222 ;
11223 return 0;
11224}
11225_ACEOF
11226if ac_fn_c_try_run "$LINENO"; then :
11227 gl_cv_func_memchr_works=yes
11228else
11229 gl_cv_func_memchr_works=no
11230fi
11231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11232 conftest.$ac_objext conftest.beam conftest.$ac_ext
11233fi
11234
11235fi
11236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
11237$as_echo "$gl_cv_func_memchr_works" >&6; }
11238 if test "$gl_cv_func_memchr_works" != yes; then
11239 REPLACE_MEMCHR=1
11240 fi
11241 fi
11242
3574124b 11243ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
8690e634
JK
11244if test "x$ac_cv_have_decl_memmem" = x""yes; then :
11245 ac_have_decl=1
11246else
11247 ac_have_decl=0
11248fi
11249
11250cat >>confdefs.h <<_ACEOF
11251#define HAVE_DECL_MEMMEM $ac_have_decl
11252_ACEOF
11253
11254
11255
11256
11257
8690e634
JK
11258 for ac_func in memmem
11259do :
11260 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
11261if test "x$ac_cv_func_memmem" = x""yes; then :
11262 cat >>confdefs.h <<_ACEOF
11263#define HAVE_MEMMEM 1
11264_ACEOF
11265
11266fi
11267done
11268
11269 if test $ac_cv_func_memmem = yes; then
11270 HAVE_MEMMEM=1
11271 else
11272 HAVE_MEMMEM=0
11273 fi
11274
8690e634
JK
11275 if test $ac_cv_have_decl_memmem = no; then
11276 HAVE_DECL_MEMMEM=0
11277 else
11278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
11279$as_echo_n "checking whether memmem works... " >&6; }
11280if test "${gl_cv_func_memmem_works_always+set}" = set; then :
11281 $as_echo_n "(cached) " >&6
11282else
11283 if test "$cross_compiling" = yes; then :
11284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11285/* end confdefs.h. */
11286
11287#ifdef __GNU_LIBRARY__
11288 #include <features.h>
11289 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
11290 || __GLIBC_MINOR__ > 12)) \
11291 || (__GLIBC__ > 2)) \
11292 || defined __UCLIBC__
11293 Lucky user
11294 #endif
11295#elif defined __CYGWIN__
11296 #include <cygwin/version.h>
11297 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11298 Lucky user
11299 #endif
11300#else
11301 Lucky user
11302#endif
11303
11304_ACEOF
11305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11306 $EGREP "Lucky user" >/dev/null 2>&1; then :
11307 gl_cv_func_memmem_works_always="guessing yes"
11308else
11309 gl_cv_func_memmem_works_always="guessing no"
11310fi
11311rm -f conftest*
11312
11313
11314else
11315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11316/* end confdefs.h. */
11317
11318#include <string.h> /* for memmem */
11319#define P "_EF_BF_BD"
11320#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11321#define NEEDLE P P P P P
11322
11323int
11324main ()
11325{
11326
11327 int result = 0;
11328 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
11329 result |= 1;
11330 /* Check for empty needle behavior. */
11331 {
11332 const char *haystack = "AAA";
11333 if (memmem (haystack, 3, NULL, 0) != haystack)
11334 result |= 2;
11335 }
11336 return result;
11337
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342if ac_fn_c_try_run "$LINENO"; then :
11343 gl_cv_func_memmem_works_always=yes
11344else
11345 gl_cv_func_memmem_works_always=no
11346fi
11347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11348 conftest.$ac_objext conftest.beam conftest.$ac_ext
11349fi
11350
11351
11352fi
11353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
11354$as_echo "$gl_cv_func_memmem_works_always" >&6; }
11355 case "$gl_cv_func_memmem_works_always" in
11356 *yes) ;;
11357 *)
11358 REPLACE_MEMMEM=1
11359 ;;
11360 esac
11361 fi
11362 :
11363
6a29c58e
YQ
11364
11365 GNULIB_DPRINTF=0;
11366 GNULIB_FCLOSE=0;
11367 GNULIB_FDOPEN=0;
11368 GNULIB_FFLUSH=0;
11369 GNULIB_FGETC=0;
11370 GNULIB_FGETS=0;
11371 GNULIB_FOPEN=0;
11372 GNULIB_FPRINTF=0;
11373 GNULIB_FPRINTF_POSIX=0;
11374 GNULIB_FPURGE=0;
11375 GNULIB_FPUTC=0;
11376 GNULIB_FPUTS=0;
11377 GNULIB_FREAD=0;
11378 GNULIB_FREOPEN=0;
11379 GNULIB_FSCANF=0;
11380 GNULIB_FSEEK=0;
11381 GNULIB_FSEEKO=0;
11382 GNULIB_FTELL=0;
11383 GNULIB_FTELLO=0;
11384 GNULIB_FWRITE=0;
11385 GNULIB_GETC=0;
11386 GNULIB_GETCHAR=0;
11387 GNULIB_GETDELIM=0;
11388 GNULIB_GETLINE=0;
11389 GNULIB_OBSTACK_PRINTF=0;
11390 GNULIB_OBSTACK_PRINTF_POSIX=0;
11391 GNULIB_PCLOSE=0;
11392 GNULIB_PERROR=0;
11393 GNULIB_POPEN=0;
11394 GNULIB_PRINTF=0;
11395 GNULIB_PRINTF_POSIX=0;
11396 GNULIB_PUTC=0;
11397 GNULIB_PUTCHAR=0;
11398 GNULIB_PUTS=0;
11399 GNULIB_REMOVE=0;
11400 GNULIB_RENAME=0;
11401 GNULIB_RENAMEAT=0;
11402 GNULIB_SCANF=0;
11403 GNULIB_SNPRINTF=0;
11404 GNULIB_SPRINTF_POSIX=0;
11405 GNULIB_STDIO_H_NONBLOCKING=0;
11406 GNULIB_STDIO_H_SIGPIPE=0;
11407 GNULIB_TMPFILE=0;
11408 GNULIB_VASPRINTF=0;
11409 GNULIB_VFSCANF=0;
11410 GNULIB_VSCANF=0;
11411 GNULIB_VDPRINTF=0;
11412 GNULIB_VFPRINTF=0;
11413 GNULIB_VFPRINTF_POSIX=0;
11414 GNULIB_VPRINTF=0;
11415 GNULIB_VPRINTF_POSIX=0;
11416 GNULIB_VSNPRINTF=0;
11417 GNULIB_VSPRINTF_POSIX=0;
11418 HAVE_DECL_FPURGE=1;
11419 HAVE_DECL_FSEEKO=1;
11420 HAVE_DECL_FTELLO=1;
11421 HAVE_DECL_GETDELIM=1;
11422 HAVE_DECL_GETLINE=1;
11423 HAVE_DECL_OBSTACK_PRINTF=1;
11424 HAVE_DECL_SNPRINTF=1;
11425 HAVE_DECL_VSNPRINTF=1;
11426 HAVE_DPRINTF=1;
11427 HAVE_FSEEKO=1;
11428 HAVE_FTELLO=1;
11429 HAVE_PCLOSE=1;
11430 HAVE_POPEN=1;
11431 HAVE_RENAMEAT=1;
11432 HAVE_VASPRINTF=1;
11433 HAVE_VDPRINTF=1;
11434 REPLACE_DPRINTF=0;
11435 REPLACE_FCLOSE=0;
11436 REPLACE_FDOPEN=0;
11437 REPLACE_FFLUSH=0;
11438 REPLACE_FOPEN=0;
11439 REPLACE_FPRINTF=0;
11440 REPLACE_FPURGE=0;
11441 REPLACE_FREOPEN=0;
11442 REPLACE_FSEEK=0;
11443 REPLACE_FSEEKO=0;
11444 REPLACE_FTELL=0;
11445 REPLACE_FTELLO=0;
11446 REPLACE_GETDELIM=0;
11447 REPLACE_GETLINE=0;
11448 REPLACE_OBSTACK_PRINTF=0;
11449 REPLACE_PERROR=0;
11450 REPLACE_POPEN=0;
11451 REPLACE_PRINTF=0;
11452 REPLACE_REMOVE=0;
11453 REPLACE_RENAME=0;
11454 REPLACE_RENAMEAT=0;
11455 REPLACE_SNPRINTF=0;
11456 REPLACE_SPRINTF=0;
11457 REPLACE_STDIO_READ_FUNCS=0;
11458 REPLACE_STDIO_WRITE_FUNCS=0;
11459 REPLACE_TMPFILE=0;
11460 REPLACE_VASPRINTF=0;
11461 REPLACE_VDPRINTF=0;
11462 REPLACE_VFPRINTF=0;
11463 REPLACE_VPRINTF=0;
11464 REPLACE_VSNPRINTF=0;
11465 REPLACE_VSPRINTF=0;
11466
11467
11468
3d99e817
AK
11469ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
11470if test "x$ac_cv_have_decl_setenv" = x""yes; then :
11471 ac_have_decl=1
11472else
11473 ac_have_decl=0
11474fi
11475
11476cat >>confdefs.h <<_ACEOF
11477#define HAVE_DECL_SETENV $ac_have_decl
11478_ACEOF
11479
11480
11481
11482
11483
11484
11485 if test $ac_cv_have_decl_setenv = no; then
11486 HAVE_DECL_SETENV=0
11487 fi
11488
11489
11490
11491
11492
11493 for ac_header in search.h
11494do :
11495 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
11496if test "x$ac_cv_header_search_h" = x""yes; then :
11497 cat >>confdefs.h <<_ACEOF
11498#define HAVE_SEARCH_H 1
11499_ACEOF
11500
11501fi
11502
11503done
11504
11505 for ac_func in tsearch
11506do :
11507 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
11508if test "x$ac_cv_func_tsearch" = x""yes; then :
11509 cat >>confdefs.h <<_ACEOF
11510#define HAVE_TSEARCH 1
11511_ACEOF
11512
11513fi
11514done
11515
11516
11517
0750520d
PA
11518
11519 GNULIB_PTHREAD_SIGMASK=0;
11520 GNULIB_RAISE=0;
11521 GNULIB_SIGNAL_H_SIGPIPE=0;
11522 GNULIB_SIGPROCMASK=0;
11523 GNULIB_SIGACTION=0;
11524 HAVE_POSIX_SIGNALBLOCKING=1;
11525 HAVE_PTHREAD_SIGMASK=1;
11526 HAVE_RAISE=1;
11527 HAVE_SIGSET_T=1;
11528 HAVE_SIGINFO_T=1;
11529 HAVE_SIGACTION=1;
11530 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
11531
11532 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
11533
11534 HAVE_SIGHANDLER_T=1;
11535 REPLACE_PTHREAD_SIGMASK=0;
11536 REPLACE_RAISE=0;
11537
11538
11539 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
11540 #include <signal.h>
11541 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
11542 #include <sys/types.h>
11543
11544"
11545if test "x$ac_cv_type_sigset_t" = x""yes; then :
11546
11547cat >>confdefs.h <<_ACEOF
11548#define HAVE_SIGSET_T 1
11549_ACEOF
11550
11551gl_cv_type_sigset_t=yes
11552else
11553 gl_cv_type_sigset_t=no
11554fi
11555
11556 if test $gl_cv_type_sigset_t != yes; then
11557 HAVE_SIGSET_T=0
11558 fi
11559
11560ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11561if test "x$ac_cv_type_pid_t" = x""yes; then :
11562
11563else
11564
11565cat >>confdefs.h <<_ACEOF
11566#define pid_t int
11567_ACEOF
11568
11569fi
11570
11571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11572$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11573if test "${ac_cv_type_uid_t+set}" = set; then :
11574 $as_echo_n "(cached) " >&6
11575else
11576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577/* end confdefs.h. */
11578#include <sys/types.h>
11579
11580_ACEOF
11581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11582 $EGREP "uid_t" >/dev/null 2>&1; then :
11583 ac_cv_type_uid_t=yes
11584else
11585 ac_cv_type_uid_t=no
11586fi
11587rm -f conftest*
11588
11589fi
11590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11591$as_echo "$ac_cv_type_uid_t" >&6; }
11592if test $ac_cv_type_uid_t = no; then
11593
11594$as_echo "#define uid_t int" >>confdefs.h
11595
11596
11597$as_echo "#define gid_t int" >>confdefs.h
11598
11599fi
11600
8690e634
JK
11601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
11602$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
11603if test "${ac_cv_header_stdbool_h+set}" = set; then :
11604 $as_echo_n "(cached) " >&6
11605else
11606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11607/* end confdefs.h. */
11608
11609 #include <stdbool.h>
49e4877c
PA
11610
11611 #ifdef __cplusplus
11612 typedef bool Bool;
11613 #else
11614 typedef _Bool Bool;
11615 #ifndef bool
11616 "error: bool is not defined"
11617 #endif
11618 #ifndef false
11619 "error: false is not defined"
11620 #endif
11621 #if false
11622 "error: false is not 0"
11623 #endif
11624 #ifndef true
11625 "error: true is not defined"
11626 #endif
11627 #if true != 1
11628 "error: true is not 1"
11629 #endif
8690e634 11630 #endif
49e4877c 11631
8690e634
JK
11632 #ifndef __bool_true_false_are_defined
11633 "error: __bool_true_false_are_defined is not defined"
11634 #endif
11635
49e4877c 11636 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
8690e634
JK
11637
11638 char a[true == 1 ? 1 : -1];
11639 char b[false == 0 ? 1 : -1];
11640 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
11641 char d[(bool) 0.5 == true ? 1 : -1];
11642 /* See body of main program for 'e'. */
49e4877c 11643 char f[(Bool) 0.0 == false ? 1 : -1];
8690e634 11644 char g[true];
49e4877c 11645 char h[sizeof (Bool)];
8690e634
JK
11646 char i[sizeof s.t];
11647 enum { j = false, k = true, l = false * true, m = true * 256 };
11648 /* The following fails for
11649 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
49e4877c 11650 Bool n[m];
8690e634 11651 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
49e4877c 11652 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
8690e634
JK
11653 /* Catch a bug in an HP-UX C compiler. See
11654 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
11655 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
11656 */
49e4877c
PA
11657 Bool q = true;
11658 Bool *pq = &q;
11659 bool *qq = &q;
8690e634
JK
11660
11661int
11662main ()
11663{
11664
11665 bool e = &s;
49e4877c
PA
11666 *pq |= q; *pq |= ! q;
11667 *qq |= q; *qq |= ! q;
8690e634
JK
11668 /* Refer to every declared value, to avoid compiler optimizations. */
11669 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
49e4877c 11670 + !m + !n + !o + !p + !q + !pq + !qq);
8690e634
JK
11671
11672 ;
11673 return 0;
11674}
11675_ACEOF
11676if ac_fn_c_try_compile "$LINENO"; then :
11677 ac_cv_header_stdbool_h=yes
11678else
11679 ac_cv_header_stdbool_h=no
11680fi
11681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11682fi
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
11684$as_echo "$ac_cv_header_stdbool_h" >&6; }
11685 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
11686if test "x$ac_cv_type__Bool" = x""yes; then :
11687
11688cat >>confdefs.h <<_ACEOF
11689#define HAVE__BOOL 1
11690_ACEOF
11691
11692
11693fi
11694
11695
11696
11697 REPLACE_NULL=0;
4a626d0a 11698 HAVE_MAX_ALIGN_T=1;
8690e634
JK
11699 HAVE_WCHAR_T=1;
11700
11701
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
11703$as_echo_n "checking for wchar_t... " >&6; }
11704if test "${gt_cv_c_wchar_t+set}" = set; then :
11705 $as_echo_n "(cached) " >&6
11706else
11707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11708/* end confdefs.h. */
11709#include <stddef.h>
11710 wchar_t foo = (wchar_t)'\0';
11711int
11712main ()
11713{
11714
11715 ;
11716 return 0;
11717}
11718_ACEOF
11719if ac_fn_c_try_compile "$LINENO"; then :
11720 gt_cv_c_wchar_t=yes
11721else
11722 gt_cv_c_wchar_t=no
11723fi
11724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11725fi
11726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11727$as_echo "$gt_cv_c_wchar_t" >&6; }
11728 if test $gt_cv_c_wchar_t = yes; then
11729
11730$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
11731
11732 fi
11733
63ce7108
TT
11734
11735
11736
11737
8690e634
JK
11738
11739
11740
11741
11742
11743
11744
11745 if test $gl_cv_have_include_next = yes; then
11746 gl_cv_next_string_h='<'string.h'>'
11747 else
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
11749$as_echo_n "checking absolute name of <string.h>... " >&6; }
11750if test "${gl_cv_next_string_h+set}" = set; then :
11751 $as_echo_n "(cached) " >&6
11752else
11753
4a626d0a
PA
11754
11755
11756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11757/* end confdefs.h. */
11758#include <string.h>
8690e634 11759_ACEOF
4a626d0a
PA
11760 case "$host_os" in
11761 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11762 *) gl_absname_cpp="$ac_cpp" ;;
11763 esac
11764
11765 case "$host_os" in
11766 mingw*)
11767 gl_dirsep_regex='[/\\]'
11768 ;;
11769 *)
11770 gl_dirsep_regex='\/'
11771 ;;
11772 esac
11773 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11774 gl_header_literal_regex=`echo 'string.h' \
11775 | sed -e "$gl_make_literal_regex_sed"`
11776 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11777 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11778 s|^/[^/]|//&|
11779 p
11780 q
11781 }'
8690e634 11782
4a626d0a
PA
11783 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11784 sed -n "$gl_absolute_header_sed"`
c971b7fa 11785
4a626d0a
PA
11786 gl_header=$gl_cv_absolute_string_h
11787 gl_cv_next_string_h='"'$gl_header'"'
8690e634
JK
11788
11789
11790fi
11791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
11792$as_echo "$gl_cv_next_string_h" >&6; }
11793 fi
11794 NEXT_STRING_H=$gl_cv_next_string_h
11795
11796 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11797 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11798 gl_next_as_first_directive='<'string.h'>'
11799 else
11800 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11801 gl_next_as_first_directive=$gl_cv_next_string_h
11802 fi
11803 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
11804
11805
11806
11807
11808
11809
11810 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
11811 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11813$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11814if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
11815 $as_echo_n "(cached) " >&6
11816else
11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818/* end confdefs.h. */
11819#include <string.h>
11820
11821int
11822main ()
11823{
11824#undef $gl_func
11825 (void) $gl_func;
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830if ac_fn_c_try_compile "$LINENO"; then :
11831 eval "$as_gl_Symbol=yes"
11832else
11833 eval "$as_gl_Symbol=no"
11834fi
11835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836fi
11837eval ac_res=\$$as_gl_Symbol
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11839$as_echo "$ac_res" >&6; }
11840 eval as_val=\$$as_gl_Symbol
11841 if test "x$as_val" = x""yes; then :
11842 cat >>confdefs.h <<_ACEOF
11843#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11844_ACEOF
11845
11846 eval ac_cv_have_decl_$gl_func=yes
11847fi
11848 done
11849
11850
11851
8839a007 11852
63ce7108
TT
11853
11854 if test "$gl_cv_func_memchr_works" != yes; then
11855 REPLACE_STRSTR=1
11856 else
11857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
11858$as_echo_n "checking whether strstr works... " >&6; }
11859if test "${gl_cv_func_strstr_works_always+set}" = set; then :
11860 $as_echo_n "(cached) " >&6
11861else
11862 if test "$cross_compiling" = yes; then :
11863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864/* end confdefs.h. */
11865
11866#ifdef __GNU_LIBRARY__
11867 #include <features.h>
11868 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
11869 || defined __UCLIBC__
11870 Lucky user
11871 #endif
11872#elif defined __CYGWIN__
11873 #include <cygwin/version.h>
11874 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
11875 Lucky user
11876 #endif
11877#else
11878 Lucky user
11879#endif
11880
11881_ACEOF
11882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11883 $EGREP "Lucky user" >/dev/null 2>&1; then :
11884 gl_cv_func_strstr_works_always="guessing yes"
11885else
11886 gl_cv_func_strstr_works_always="guessing no"
11887fi
11888rm -f conftest*
11889
11890
11891else
11892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h. */
11894
11895#include <string.h> /* for strstr */
11896#define P "_EF_BF_BD"
11897#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
11898#define NEEDLE P P P P P
11899
11900int
11901main ()
11902{
11903return !!strstr (HAYSTACK, NEEDLE);
11904
11905 ;
11906 return 0;
11907}
11908_ACEOF
11909if ac_fn_c_try_run "$LINENO"; then :
11910 gl_cv_func_strstr_works_always=yes
11911else
11912 gl_cv_func_strstr_works_always=no
11913fi
11914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11915 conftest.$ac_objext conftest.beam conftest.$ac_ext
11916fi
11917
11918
11919fi
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
11921$as_echo "$gl_cv_func_strstr_works_always" >&6; }
11922 case "$gl_cv_func_strstr_works_always" in
11923 *yes) ;;
11924 *)
11925 REPLACE_STRSTR=1
11926 ;;
11927 esac
11928 fi
11929
421693b0
PA
11930ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
11931if test "x$ac_cv_have_decl_strtok_r" = x""yes; then :
11932 ac_have_decl=1
11933else
11934 ac_have_decl=0
11935fi
11936
11937cat >>confdefs.h <<_ACEOF
11938#define HAVE_DECL_STRTOK_R $ac_have_decl
11939_ACEOF
11940
09607c9e
TT
11941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11942$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11943if test "${ac_cv_header_stat_broken+set}" = set; then :
11944 $as_echo_n "(cached) " >&6
11945else
11946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11947/* end confdefs.h. */
11948#include <sys/types.h>
11949#include <sys/stat.h>
63ce7108 11950
09607c9e
TT
11951#if defined S_ISBLK && defined S_IFDIR
11952extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11953#endif
8839a007 11954
09607c9e
TT
11955#if defined S_ISBLK && defined S_IFCHR
11956extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11957#endif
11958
11959#if defined S_ISLNK && defined S_IFREG
11960extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11961#endif
11962
11963#if defined S_ISSOCK && defined S_IFREG
11964extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11965#endif
8839a007 11966
8839a007 11967_ACEOF
09607c9e
TT
11968if ac_fn_c_try_compile "$LINENO"; then :
11969 ac_cv_header_stat_broken=no
11970else
11971 ac_cv_header_stat_broken=yes
11972fi
11973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11974fi
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11976$as_echo "$ac_cv_header_stat_broken" >&6; }
11977if test $ac_cv_header_stat_broken = yes; then
11978
11979$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
8839a007
PA
11980
11981fi
11982
09607c9e
TT
11983
11984
8839a007
PA
11985ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11986if test "x$ac_cv_type_mode_t" = x""yes; then :
11987
11988else
11989
11990cat >>confdefs.h <<_ACEOF
11991#define mode_t int
11992_ACEOF
11993
11994fi
11995
8839a007
PA
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
11997$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
11998if test -z "$MKDIR_P"; then
11999 if test "${ac_cv_path_mkdir+set}" = set; then :
12000 $as_echo_n "(cached) " >&6
12001else
12002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12003for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
12004do
12005 IFS=$as_save_IFS
12006 test -z "$as_dir" && as_dir=.
12007 for ac_prog in mkdir gmkdir; do
12008 for ac_exec_ext in '' $ac_executable_extensions; do
12009 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
12010 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
12011 'mkdir (GNU coreutils) '* | \
12012 'mkdir (coreutils) '* | \
12013 'mkdir (fileutils) '4.1*)
12014 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
12015 break 3;;
12016 esac
12017 done
12018 done
12019 done
12020IFS=$as_save_IFS
12021
12022fi
12023
12024 if test "${ac_cv_path_mkdir+set}" = set; then
12025 MKDIR_P="$ac_cv_path_mkdir -p"
12026 else
12027 # As a last resort, use the slow shell script. Don't cache a
12028 # value for MKDIR_P within a source directory, because that will
12029 # break other packages using the cache if that directory is
12030 # removed, or if the value is a relative name.
12031 test -d ./--version && rmdir ./--version
12032 MKDIR_P="$ac_install_sh -d"
12033 fi
12034fi
12035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
12036$as_echo "$MKDIR_P" >&6; }
12037
12038
09607c9e 12039
09607c9e
TT
12040
12041
2196f55f 12042
09607c9e
TT
12043
12044
12045
12046
4a626d0a
PA
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056 if test $gl_cv_have_include_next = yes; then
12057 gl_cv_next_sys_types_h='<'sys/types.h'>'
12058 else
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12060$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
12061if test "${gl_cv_next_sys_types_h+set}" = set; then :
12062 $as_echo_n "(cached) " >&6
12063else
12064
12065
12066
12067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068/* end confdefs.h. */
12069#include <sys/types.h>
12070_ACEOF
12071 case "$host_os" in
12072 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12073 *) gl_absname_cpp="$ac_cpp" ;;
12074 esac
12075
12076 case "$host_os" in
12077 mingw*)
12078 gl_dirsep_regex='[/\\]'
12079 ;;
12080 *)
12081 gl_dirsep_regex='\/'
12082 ;;
12083 esac
12084 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12085 gl_header_literal_regex=`echo 'sys/types.h' \
12086 | sed -e "$gl_make_literal_regex_sed"`
12087 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12088 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12089 s|^/[^/]|//&|
12090 p
12091 q
12092 }'
12093
12094 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12095 sed -n "$gl_absolute_header_sed"`
12096
12097 gl_header=$gl_cv_absolute_sys_types_h
12098 gl_cv_next_sys_types_h='"'$gl_header'"'
12099
12100
12101fi
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12103$as_echo "$gl_cv_next_sys_types_h" >&6; }
12104 fi
12105 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12106
12107 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12108 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12109 gl_next_as_first_directive='<'sys/types.h'>'
12110 else
12111 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12112 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12113 fi
12114 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
09607c9e
TT
12127 GNULIB_MKTIME=0;
12128 GNULIB_NANOSLEEP=0;
12129 GNULIB_STRPTIME=0;
12130 GNULIB_TIMEGM=0;
12131 GNULIB_TIME_R=0;
4a626d0a 12132 GNULIB_TIME_RZ=0;
09607c9e
TT
12133 HAVE_DECL_LOCALTIME_R=1;
12134 HAVE_NANOSLEEP=1;
12135 HAVE_STRPTIME=1;
12136 HAVE_TIMEGM=1;
12137 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12138 REPLACE_MKTIME=GNULIB_PORTCHECK;
12139 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12140 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12141
4a626d0a
PA
12142 : ${GNULIB_GETTIMEOFDAY=0};
12143 REPLACE_GMTIME=0;
12144 REPLACE_LOCALTIME=0;
09607c9e
TT
12145
12146
12147
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
12149$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
12150if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
12151 $as_echo_n "(cached) " >&6
12152else
12153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12154/* end confdefs.h. */
12155#include <time.h>
12156
12157int
12158main ()
12159{
12160static struct timespec x; x.tv_sec = x.tv_nsec;
12161 ;
12162 return 0;
12163}
12164_ACEOF
12165if ac_fn_c_try_compile "$LINENO"; then :
12166 gl_cv_sys_struct_timespec_in_time_h=yes
12167else
12168 gl_cv_sys_struct_timespec_in_time_h=no
12169fi
12170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12171fi
12172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
12173$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
12174
12175 TIME_H_DEFINES_STRUCT_TIMESPEC=0
12176 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
12177 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
4a626d0a 12178 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
09607c9e
TT
12179 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
12180 TIME_H_DEFINES_STRUCT_TIMESPEC=1
12181 else
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
12183$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
12184if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
12185 $as_echo_n "(cached) " >&6
12186else
12187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12188/* end confdefs.h. */
12189#include <sys/time.h>
12190
12191int
12192main ()
12193{
12194static struct timespec x; x.tv_sec = x.tv_nsec;
12195 ;
12196 return 0;
12197}
12198_ACEOF
12199if ac_fn_c_try_compile "$LINENO"; then :
12200 gl_cv_sys_struct_timespec_in_sys_time_h=yes
12201else
12202 gl_cv_sys_struct_timespec_in_sys_time_h=no
12203fi
12204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12205fi
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
12207$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
12208 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
12209 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
12210 else
12211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
12212$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
12213if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
12214 $as_echo_n "(cached) " >&6
12215else
12216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12217/* end confdefs.h. */
12218#include <pthread.h>
12219
12220int
12221main ()
12222{
12223static struct timespec x; x.tv_sec = x.tv_nsec;
12224 ;
12225 return 0;
12226}
12227_ACEOF
12228if ac_fn_c_try_compile "$LINENO"; then :
12229 gl_cv_sys_struct_timespec_in_pthread_h=yes
12230else
12231 gl_cv_sys_struct_timespec_in_pthread_h=no
12232fi
12233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12234fi
12235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
12236$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
12237 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
12238 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
4a626d0a
PA
12239 else
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
12241$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
12242if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then :
12243 $as_echo_n "(cached) " >&6
12244else
12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246/* end confdefs.h. */
12247#include <unistd.h>
12248
12249int
12250main ()
12251{
12252static struct timespec x; x.tv_sec = x.tv_nsec;
12253 ;
12254 return 0;
12255}
12256_ACEOF
12257if ac_fn_c_try_compile "$LINENO"; then :
12258 gl_cv_sys_struct_timespec_in_unistd_h=yes
12259else
12260 gl_cv_sys_struct_timespec_in_unistd_h=no
12261fi
12262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12263fi
12264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
12265$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
12266 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
12267 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
12268 fi
09607c9e
TT
12269 fi
12270 fi
12271 fi
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
4a626d0a 12287
09607c9e
TT
12288 if test $gl_cv_have_include_next = yes; then
12289 gl_cv_next_time_h='<'time.h'>'
12290 else
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
12292$as_echo_n "checking absolute name of <time.h>... " >&6; }
12293if test "${gl_cv_next_time_h+set}" = set; then :
12294 $as_echo_n "(cached) " >&6
12295else
12296
4a626d0a
PA
12297
12298
12299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
12300/* end confdefs.h. */
12301#include <time.h>
09607c9e 12302_ACEOF
4a626d0a
PA
12303 case "$host_os" in
12304 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12305 *) gl_absname_cpp="$ac_cpp" ;;
12306 esac
12307
12308 case "$host_os" in
12309 mingw*)
12310 gl_dirsep_regex='[/\\]'
12311 ;;
12312 *)
12313 gl_dirsep_regex='\/'
12314 ;;
12315 esac
12316 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12317 gl_header_literal_regex=`echo 'time.h' \
12318 | sed -e "$gl_make_literal_regex_sed"`
12319 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12320 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12321 s|^/[^/]|//&|
12322 p
12323 q
12324 }'
09607c9e 12325
4a626d0a
PA
12326 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12327 sed -n "$gl_absolute_header_sed"`
09607c9e 12328
4a626d0a
PA
12329 gl_header=$gl_cv_absolute_time_h
12330 gl_cv_next_time_h='"'$gl_header'"'
09607c9e
TT
12331
12332
12333fi
12334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
12335$as_echo "$gl_cv_next_time_h" >&6; }
12336 fi
12337 NEXT_TIME_H=$gl_cv_next_time_h
12338
12339 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12340 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12341 gl_next_as_first_directive='<'time.h'>'
12342 else
12343 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12344 gl_next_as_first_directive=$gl_cv_next_time_h
12345 fi
12346 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
12347
12348
12349
12350
12351
12352
3d99e817
AK
12353ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
12354if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
12355 ac_have_decl=1
12356else
12357 ac_have_decl=0
12358fi
12359
12360cat >>confdefs.h <<_ACEOF
12361#define HAVE_DECL_UNSETENV $ac_have_decl
12362_ACEOF
12363
09607c9e 12364
8690e634
JK
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
12366$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
12367if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
12368 $as_echo_n "(cached) " >&6
12369else
12370 gl_cv_header_wchar_h_correct_inline=yes
12371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12372/* end confdefs.h. */
12373
12374 #define wcstod renamed_wcstod
12375/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12376 <wchar.h>.
12377 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12378 included before <wchar.h>. */
12379#include <stddef.h>
12380#include <stdio.h>
12381#include <time.h>
12382#include <wchar.h>
12383extern int zero (void);
12384int main () { return zero(); }
12385
12386_ACEOF
49e4877c
PA
12387 save_ac_compile="$ac_compile"
12388 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
8690e634
JK
12389 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12390 (eval $ac_compile) 2>&5
12391 ac_status=$?
12392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12393 test $ac_status = 0; }; then
8690e634
JK
12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395/* end confdefs.h. */
12396
12397 #define wcstod renamed_wcstod
12398/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12399 <wchar.h>.
12400 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12401 included before <wchar.h>. */
12402#include <stddef.h>
12403#include <stdio.h>
12404#include <time.h>
12405#include <wchar.h>
12406int zero (void) { return 0; }
12407
12408_ACEOF
49e4877c 12409 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8690e634
JK
12410 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12411 (eval $ac_compile) 2>&5
12412 ac_status=$?
12413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12414 test $ac_status = 0; }; then
8690e634
JK
12415 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
12416 :
12417 else
12418 gl_cv_header_wchar_h_correct_inline=no
12419 fi
12420 fi
12421 fi
49e4877c 12422 ac_compile="$save_ac_compile"
8690e634
JK
12423 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
12424
12425fi
12426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
12427$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
12428 if test $gl_cv_header_wchar_h_correct_inline = no; then
12429 as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
12430This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
12431C99 mode. You have four options:
12432 - Add the flag -fgnu89-inline to CC and reconfigure, or
12433 - Fix your include files, using parts of
12434 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
12435 - Use a gcc version older than 4.3, or
12436 - Don't use the flags -std=c99 or -std=gnu99.
12437Configuration aborted." "$LINENO" 5
12438 fi
12439
12440
12441
12442
12443
8690e634
JK
12444 if test $ac_cv_header_features_h = yes; then
12445 HAVE_FEATURES_H=1
12446 else
12447 HAVE_FEATURES_H=0
12448 fi
12449
12450
12451
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12453$as_echo_n "checking for wint_t... " >&6; }
12454if test "${gt_cv_c_wint_t+set}" = set; then :
12455 $as_echo_n "(cached) " >&6
12456else
12457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12458/* end confdefs.h. */
12459
12460/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12461 <wchar.h>.
12462 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
12463 before <wchar.h>. */
12464#include <stddef.h>
12465#include <stdio.h>
12466#include <time.h>
12467#include <wchar.h>
12468 wint_t foo = (wchar_t)'\0';
12469int
12470main ()
12471{
12472
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477if ac_fn_c_try_compile "$LINENO"; then :
12478 gt_cv_c_wint_t=yes
12479else
12480 gt_cv_c_wint_t=no
12481fi
12482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12483fi
12484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12485$as_echo "$gt_cv_c_wint_t" >&6; }
12486 if test $gt_cv_c_wint_t = yes; then
12487
12488$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12489
12490 fi
12491
12492
12493 GNULIB_ISWBLANK=0;
12494 GNULIB_WCTYPE=0;
12495 GNULIB_ISWCTYPE=0;
12496 GNULIB_WCTRANS=0;
12497 GNULIB_TOWCTRANS=0;
12498 HAVE_ISWBLANK=1;
12499 HAVE_WCTYPE_T=1;
12500 HAVE_WCTRANS_T=1;
12501 REPLACE_ISWBLANK=0;
12502
12503
12504
12505
8690e634
JK
12506 if false; then
12507 GL_COND_LIBTOOL_TRUE=
12508 GL_COND_LIBTOOL_FALSE='#'
12509else
12510 GL_COND_LIBTOOL_TRUE='#'
12511 GL_COND_LIBTOOL_FALSE=
12512fi
12513
12514 gl_cond_libtool=false
12515 gl_libdeps=
12516 gl_ltlibdeps=
12517 gl_m4_base='import/m4'
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527 gl_source_base='import'
12528
12529
12530 if test $ac_cv_func_alloca_works = no; then
12531 :
12532 fi
12533
12534 # Define an additional variable used in the Makefile substitution.
12535 if test $ac_cv_working_alloca_h = yes; then
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
12537$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
12538if test "${gl_cv_rpl_alloca+set}" = set; then :
12539 $as_echo_n "(cached) " >&6
12540else
12541
12542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12543/* end confdefs.h. */
12544
12545#if defined __GNUC__ || defined _AIX || defined _MSC_VER
12546 Need own alloca
12547#endif
12548
12549_ACEOF
12550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12551 $EGREP "Need own alloca" >/dev/null 2>&1; then :
12552 gl_cv_rpl_alloca=yes
12553else
12554 gl_cv_rpl_alloca=no
12555fi
12556rm -f conftest*
12557
12558
12559fi
12560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
12561$as_echo "$gl_cv_rpl_alloca" >&6; }
12562 if test $gl_cv_rpl_alloca = yes; then
12563
12564$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12565
12566 ALLOCA_H=alloca.h
12567 else
12568 ALLOCA_H=
12569 fi
12570 else
12571 ALLOCA_H=alloca.h
12572 fi
12573
12574 if test -n "$ALLOCA_H"; then
12575 GL_GENERATE_ALLOCA_H_TRUE=
12576 GL_GENERATE_ALLOCA_H_FALSE='#'
12577else
12578 GL_GENERATE_ALLOCA_H_TRUE='#'
12579 GL_GENERATE_ALLOCA_H_FALSE=
12580fi
12581
12582
12583
98399780
YQ
12584
12585
12586 if test $ac_cv_func_canonicalize_file_name = no; then
12587 HAVE_CANONICALIZE_FILE_NAME=0
12588 if test $ac_cv_func_realpath = no; then
12589 HAVE_REALPATH=0
12590 else
12591 case "$gl_cv_func_realpath_works" in
12592 *yes) ;;
12593 *) REPLACE_REALPATH=1 ;;
12594 esac
12595 fi
12596 else
12597 case "$gl_cv_func_realpath_works" in
12598 *yes)
12599 ;;
12600 *)
12601 REPLACE_CANONICALIZE_FILE_NAME=1
12602 REPLACE_REALPATH=1
12603 ;;
12604 esac
12605 fi
12606
12607 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
12608
12609
12610
12611
12612
12613
12614
12615
12616 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
12617
12618 fi
12619
12620
12621cat >>confdefs.h <<_ACEOF
12622#define GNULIB_CANONICALIZE_LGPL 1
12623_ACEOF
12624
12625
12626
12627
12628
12629
12630
12631 GNULIB_CANONICALIZE_FILE_NAME=1
12632
12633
12634
12635
12636
12637$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
12638
12639
12640
12641
12642
12643
12644
12645
12646 GNULIB_REALPATH=1
12647
12648
12649
12650
12651
12652$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
12653
12654
12655
12656
6a29c58e
YQ
12657
12658
12659
12660
12661 GNULIB_CHDIR=1
12662
12663
12664
12665
12666
12667$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
12668
12669
12670
12671
8690e634
JK
12672 if test "x$datarootdir" = x; then
12673 datarootdir='${datadir}'
12674
12675 fi
12676 if test "x$docdir" = x; then
12677 docdir='${datarootdir}/doc/${PACKAGE}'
12678
12679 fi
12680 if test "x$htmldir" = x; then
12681 htmldir='${docdir}'
12682
12683 fi
12684 if test "x$dvidir" = x; then
12685 dvidir='${docdir}'
12686
12687 fi
12688 if test "x$pdfdir" = x; then
12689 pdfdir='${docdir}'
12690
12691 fi
12692 if test "x$psdir" = x; then
12693 psdir='${docdir}'
12694
12695 fi
12696 if test "x$lispdir" = x; then
12697 lispdir='${datarootdir}/emacs/site-lisp'
12698
12699 fi
12700 if test "x$localedir" = x; then
12701 localedir='${datarootdir}/locale'
12702
4a626d0a
PA
12703 fi
12704 if test "x$runstatedir" = x; then
12705 runstatedir='${localstatedir}/run'
12706
8690e634
JK
12707 fi
12708
12709 pkglibexecdir='${libexecdir}/${PACKAGE}'
12710
12711
12712
12713
12714
12715
63ce7108 12716
e26b6bb0
TT
12717
12718
12719
12720
12721
12722
12723
12724 if test $gl_cv_have_include_next = yes; then
12725 gl_cv_next_dirent_h='<'dirent.h'>'
12726 else
12727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
12728$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
12729if test "${gl_cv_next_dirent_h+set}" = set; then :
12730 $as_echo_n "(cached) " >&6
12731else
12732
12733 if test $ac_cv_header_dirent_h = yes; then
12734
12735
4a626d0a
PA
12736
12737
12738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0
TT
12739/* end confdefs.h. */
12740#include <dirent.h>
e26b6bb0 12741_ACEOF
4a626d0a
PA
12742 case "$host_os" in
12743 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12744 *) gl_absname_cpp="$ac_cpp" ;;
12745 esac
12746
12747 case "$host_os" in
12748 mingw*)
12749 gl_dirsep_regex='[/\\]'
12750 ;;
12751 *)
12752 gl_dirsep_regex='\/'
12753 ;;
12754 esac
12755 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12756 gl_header_literal_regex=`echo 'dirent.h' \
12757 | sed -e "$gl_make_literal_regex_sed"`
12758 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12759 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12760 s|^/[^/]|//&|
12761 p
12762 q
12763 }'
12764
12765 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12766 sed -n "$gl_absolute_header_sed"`
12767
12768 gl_header=$gl_cv_absolute_dirent_h
12769 gl_cv_next_dirent_h='"'$gl_header'"'
e26b6bb0
TT
12770 else
12771 gl_cv_next_dirent_h='<'dirent.h'>'
12772 fi
12773
12774
12775fi
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
12777$as_echo "$gl_cv_next_dirent_h" >&6; }
12778 fi
12779 NEXT_DIRENT_H=$gl_cv_next_dirent_h
12780
12781 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12783 gl_next_as_first_directive='<'dirent.h'>'
12784 else
12785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12786 gl_next_as_first_directive=$gl_cv_next_dirent_h
12787 fi
12788 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
12789
12790
12791
12792
12793 if test $ac_cv_header_dirent_h = yes; then
12794 HAVE_DIRENT_H=1
12795 else
12796 HAVE_DIRENT_H=0
12797 fi
12798
12799
12800
12801 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
12802 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12804$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12805if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
12806 $as_echo_n "(cached) " >&6
12807else
12808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12809/* end confdefs.h. */
12810#include <dirent.h>
12811
12812int
12813main ()
12814{
12815#undef $gl_func
12816 (void) $gl_func;
12817 ;
12818 return 0;
12819}
12820_ACEOF
12821if ac_fn_c_try_compile "$LINENO"; then :
12822 eval "$as_gl_Symbol=yes"
12823else
12824 eval "$as_gl_Symbol=no"
12825fi
12826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12827fi
12828eval ac_res=\$$as_gl_Symbol
12829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12830$as_echo "$ac_res" >&6; }
12831 eval as_val=\$$as_gl_Symbol
12832 if test "x$as_val" = x""yes; then :
12833 cat >>confdefs.h <<_ACEOF
12834#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12835_ACEOF
12836
12837 eval ac_cv_have_decl_$gl_func=yes
12838fi
12839 done
12840
12841
12842
12843
12844
12845
18848e28
GF
12846
12847 for ac_func in dirfd
12848do :
12849 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
12850if test "x$ac_cv_func_dirfd" = x""yes; then :
12851 cat >>confdefs.h <<_ACEOF
12852#define HAVE_DIRFD 1
12853_ACEOF
12854
12855fi
12856done
12857
12858 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
12859 #include <dirent.h>
12860"
12861if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
12862 ac_have_decl=1
12863else
12864 ac_have_decl=0
12865fi
12866
12867cat >>confdefs.h <<_ACEOF
12868#define HAVE_DECL_DIRFD $ac_have_decl
12869_ACEOF
12870
12871 if test $ac_cv_have_decl_dirfd = no; then
12872 HAVE_DECL_DIRFD=0
12873 fi
12874
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
12876$as_echo_n "checking whether dirfd is a macro... " >&6; }
12877if test "${gl_cv_func_dirfd_macro+set}" = set; then :
12878 $as_echo_n "(cached) " >&6
12879else
12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881/* end confdefs.h. */
12882
12883#include <sys/types.h>
12884#include <dirent.h>
12885#ifdef dirfd
12886 dirent_header_defines_dirfd
12887#endif
12888_ACEOF
12889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12890 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
12891 gl_cv_func_dirfd_macro=yes
12892else
12893 gl_cv_func_dirfd_macro=no
12894fi
12895rm -f conftest*
12896
12897fi
12898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
12899$as_echo "$gl_cv_func_dirfd_macro" >&6; }
12900
49e4877c
PA
12901 # Use the replacement if we have no function or macro with that name,
12902 # or if OS/2 kLIBC whose dirfd() does not work.
12903 # Replace only if the system declares dirfd already.
12904 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
12905 no,no,*,yes | *,*,os2*,yes)
18848e28 12906 REPLACE_DIRFD=1
18848e28 12907
49e4877c
PA
12908$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
12909;;
12910 esac
12911
12912 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
12913 || test $REPLACE_DIRFD = 1; then
18848e28
GF
12914
12915
12916
12917
12918
12919
12920
12921
12922 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
12923
12924
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
12926$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
12927if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
12928 $as_echo_n "(cached) " >&6
12929else
12930
12931 dirfd_save_CFLAGS=$CFLAGS
12932 for ac_expr in d_fd dd_fd; do
12933
12934 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936/* end confdefs.h. */
12937
12938 #include <sys/types.h>
12939 #include <dirent.h>
12940int
12941main ()
12942{
12943DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
12944 ;
12945 return 0;
12946}
12947_ACEOF
12948if ac_fn_c_try_compile "$LINENO"; then :
12949 dir_fd_found=yes
12950
12951fi
12952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12953 CFLAGS=$dirfd_save_CFLAGS
12954 test "$dir_fd_found" = yes && break
12955 done
12956 test "$dir_fd_found" = yes || ac_expr=no_such_member
12957
12958 gl_cv_sys_dir_fd_member_name=$ac_expr
12959
12960
12961fi
12962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
12963$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
12964 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
12965
12966cat >>confdefs.h <<_ACEOF
12967#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
12968_ACEOF
12969
12970 fi
12971
12972
12973 fi
12974
12975
12976
12977
12978
12979 GNULIB_DIRFD=1
12980
12981
12982
12983
12984
12985$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
12986
12987
12988
12989
12990
12991
12992
12993
6a29c58e
YQ
12994
12995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
12996$as_echo_n "checking whether // is distinct from /... " >&6; }
12997if test "${gl_cv_double_slash_root+set}" = set; then :
12998 $as_echo_n "(cached) " >&6
12999else
13000 if test x"$cross_compiling" = xyes ; then
13001 # When cross-compiling, there is no way to tell whether // is special
13002 # short of a list of hosts. However, the only known hosts to date
13003 # that have a distinct // are Apollo DomainOS (too old to port to),
13004 # Cygwin, and z/OS. If anyone knows of another system for which // has
13005 # special semantics and is distinct from /, please report it to
13006 # <bug-gnulib@gnu.org>.
13007 case $host in
13008 *-cygwin | i370-ibm-openedition)
13009 gl_cv_double_slash_root=yes ;;
13010 *)
13011 # Be optimistic and assume that / and // are the same when we
13012 # don't know.
13013 gl_cv_double_slash_root='unknown, assuming no' ;;
13014 esac
13015 else
13016 set x `ls -di / // 2>/dev/null`
13017 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13018 gl_cv_double_slash_root=no
13019 else
13020 gl_cv_double_slash_root=yes
13021 fi
13022 fi
13023fi
13024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13025$as_echo "$gl_cv_double_slash_root" >&6; }
13026 if test "$gl_cv_double_slash_root" = yes; then
13027
13028$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
13029
13030 fi
13031
13032
13033
13034
3d99e817
AK
13035
13036
13037
13038 GNULIB_ENVIRON=1
13039
13040
13041
13042
13043
13044$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
13045
13046
13047
13048
13049
13050
49e4877c
PA
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
13052$as_echo_n "checking for flexible array member... " >&6; }
13053if test "${ac_cv_c_flexmember+set}" = set; then :
13054 $as_echo_n "(cached) " >&6
13055else
13056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13057/* end confdefs.h. */
13058#include <stdlib.h>
13059 #include <stdio.h>
13060 #include <stddef.h>
13061 struct s { int n; double d[]; };
13062int
13063main ()
13064{
13065int m = getchar ();
13066 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
13067 nbytes += sizeof (struct s) - 1;
13068 nbytes -= nbytes % sizeof (struct s);
13069 struct s *p = malloc (nbytes);
13070 p->d[0] = 0.0;
13071 return p->d != (double *) NULL;
13072 ;
13073 return 0;
13074}
13075_ACEOF
13076if ac_fn_c_try_compile "$LINENO"; then :
13077 ac_cv_c_flexmember=yes
13078else
13079 ac_cv_c_flexmember=no
13080fi
13081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13082fi
13083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13084$as_echo "$ac_cv_c_flexmember" >&6; }
13085 if test $ac_cv_c_flexmember = yes; then
13086
13087$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13088
13089 else
13090 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13091
13092 fi
13093
13094
6a29c58e
YQ
13095
13096
88b48903
WN
13097 FLOAT_H=
13098 REPLACE_FLOAT_LDBL=0
13099 case "$host_os" in
13100 aix* | beos* | openbsd* | mirbsd* | irix*)
13101 FLOAT_H=float.h
13102 ;;
13103 freebsd*)
13104 case "$host_cpu" in
13105 i[34567]86 )
13106 FLOAT_H=float.h
13107 ;;
13108 x86_64 )
13109 # On x86_64 systems, the C compiler may still be generating
13110 # 32-bit code.
13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112/* end confdefs.h. */
13113#if defined __LP64__ || defined __x86_64__ || defined __amd64__
13114 yes
13115 #endif
13116_ACEOF
13117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13118 $EGREP "yes" >/dev/null 2>&1; then :
13119
13120else
13121 FLOAT_H=float.h
13122fi
13123rm -f conftest*
8690e634 13124
88b48903
WN
13125 ;;
13126 esac
13127 ;;
13128 linux*)
13129 case "$host_cpu" in
13130 powerpc*)
13131 FLOAT_H=float.h
13132 ;;
13133 esac
13134 ;;
13135 esac
13136 case "$host_os" in
13137 aix* | freebsd* | linux*)
13138 if test -n "$FLOAT_H"; then
13139 REPLACE_FLOAT_LDBL=1
13140 fi
13141 ;;
13142 esac
a512b375 13143
88b48903
WN
13144 REPLACE_ITOLD=0
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
13146$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
13147if test "${gl_cv_func_itold_works+set}" = set; then :
8690e634
JK
13148 $as_echo_n "(cached) " >&6
13149else
88b48903
WN
13150
13151 if test "$cross_compiling" = yes; then :
13152 case "$host" in
13153 sparc*-*-linux*)
13154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155/* end confdefs.h. */
13156#if defined __LP64__ || defined __arch64__
13157 yes
13158 #endif
13159_ACEOF
13160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13161 $EGREP "yes" >/dev/null 2>&1; then :
13162 gl_cv_func_itold_works="guessing no"
13163else
13164 gl_cv_func_itold_works="guessing yes"
13165fi
13166rm -f conftest*
13167
13168 ;;
13169 *) gl_cv_func_itold_works="guessing yes" ;;
13170 esac
13171
8690e634
JK
13172else
13173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13174/* end confdefs.h. */
8690e634 13175
88b48903
WN
13176int i = -1;
13177volatile long double ld;
13178int main ()
8690e634 13179{
88b48903
WN
13180 ld += i * 1.0L;
13181 if (ld > 0)
13182 return 1;
13183 return 0;
13184}
13185_ACEOF
13186if ac_fn_c_try_run "$LINENO"; then :
13187 gl_cv_func_itold_works=yes
13188else
13189 gl_cv_func_itold_works=no
13190fi
13191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13192 conftest.$ac_objext conftest.beam conftest.$ac_ext
13193fi
13194
13195
13196fi
13197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
13198$as_echo "$gl_cv_func_itold_works" >&6; }
13199 case "$gl_cv_func_itold_works" in
13200 *no)
13201 REPLACE_ITOLD=1
13202 FLOAT_H=float.h
13203 ;;
13204 esac
13205
13206 if test -n "$FLOAT_H"; then
13207
13208
13209
13210
13211
13212
13213
13214
13215 if test $gl_cv_have_include_next = yes; then
13216 gl_cv_next_float_h='<'float.h'>'
13217 else
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
13219$as_echo_n "checking absolute name of <float.h>... " >&6; }
13220if test "${gl_cv_next_float_h+set}" = set; then :
13221 $as_echo_n "(cached) " >&6
13222else
13223
4a626d0a
PA
13224
13225
13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
13227/* end confdefs.h. */
13228#include <float.h>
88b48903 13229_ACEOF
4a626d0a
PA
13230 case "$host_os" in
13231 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13232 *) gl_absname_cpp="$ac_cpp" ;;
13233 esac
13234
13235 case "$host_os" in
13236 mingw*)
13237 gl_dirsep_regex='[/\\]'
13238 ;;
13239 *)
13240 gl_dirsep_regex='\/'
13241 ;;
13242 esac
13243 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13244 gl_header_literal_regex=`echo 'float.h' \
13245 | sed -e "$gl_make_literal_regex_sed"`
13246 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13247 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13248 s|^/[^/]|//&|
13249 p
13250 q
13251 }'
88b48903 13252
4a626d0a
PA
13253 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13254 sed -n "$gl_absolute_header_sed"`
88b48903 13255
4a626d0a
PA
13256 gl_header=$gl_cv_absolute_float_h
13257 gl_cv_next_float_h='"'$gl_header'"'
88b48903
WN
13258
13259
13260fi
13261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
13262$as_echo "$gl_cv_next_float_h" >&6; }
13263 fi
13264 NEXT_FLOAT_H=$gl_cv_next_float_h
13265
13266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13268 gl_next_as_first_directive='<'float.h'>'
13269 else
13270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13271 gl_next_as_first_directive=$gl_cv_next_float_h
13272 fi
13273 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
13274
13275
13276
13277
13278 fi
13279
13280 if test -n "$FLOAT_H"; then
13281 GL_GENERATE_FLOAT_H_TRUE=
13282 GL_GENERATE_FLOAT_H_FALSE='#'
13283else
13284 GL_GENERATE_FLOAT_H_TRUE='#'
13285 GL_GENERATE_FLOAT_H_FALSE=
13286fi
13287
13288
13289
13290 if test $REPLACE_FLOAT_LDBL = 1; then
13291
13292
13293
13294
13295
13296
13297
13298
13299 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
13300
13301 fi
13302 if test $REPLACE_ITOLD = 1; then
13303
13304
13305
13306
13307
13308
13309
13310
13311 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
13312
13313 fi
13314
13315
13316
13317
13318
13319 FNMATCH_H=
13320 gl_fnmatch_required_lowercase=`
13321 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
13322 `
13323 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
13324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
13325$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
13326if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
13327 $as_echo_n "(cached) " >&6
13328else
13329 if test $gl_fnmatch_required = GNU; then
13330 gl_fnmatch_gnu_start=
13331 gl_fnmatch_gnu_end=
13332 else
13333 gl_fnmatch_gnu_start='#if 0'
13334 gl_fnmatch_gnu_end='#endif'
13335 fi
13336 if test "$cross_compiling" = yes; then :
13337 eval "$gl_fnmatch_cache_var=\"guessing no\""
13338else
13339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13340/* end confdefs.h. */
13341#include <fnmatch.h>
13342 static int
13343 y (char const *pattern, char const *string, int flags)
13344 {
13345 return fnmatch (pattern, string, flags) == 0;
13346 }
13347 static int
13348 n (char const *pattern, char const *string, int flags)
13349 {
13350 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
13351 }
13352
13353int
13354main ()
13355{
13356char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
13357 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
13358 static char const A_1[] = { 'A' - 1, 0 };
13359 static char const A01[] = { 'A' + 1, 0 };
13360 static char const a_1[] = { 'a' - 1, 0 };
13361 static char const a01[] = { 'a' + 1, 0 };
13362 static char const bs_1[] = { '\\\\' - 1, 0 };
8690e634
JK
13363 static char const bs01[] = { '\\\\' + 1, 0 };
13364 int result = 0;
13365 if (!n ("a*", "", 0))
13366 return 1;
13367 if (!y ("a*", "abc", 0))
13368 return 1;
13369 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
13370 return 1;
13371 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
13372 return 2;
13373 if (!y ("a\\\\bc", "abc", 0))
13374 return 3;
13375 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
13376 return 3;
13377 if (!y ("*x", ".x", 0))
13378 return 4;
13379 if (!n ("*x", ".x", FNM_PERIOD))
13380 return 4;
13381 if (!y (Apat, "\\\\", 0))
13382 return 5;
13383 if (!y (Apat, "A", 0))
13384 return 5;
13385 if (!y (apat, "\\\\", 0))
13386 return 5;
13387 if (!y (apat, "a", 0))
13388 return 5;
13389 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
13390 return 5;
13391 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
13392 return 5;
13393 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
13394 return 5;
13395 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
13396 return 5;
13397 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
13398 return 5;
13399 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
13400 return 5;
13401 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
13402 return 5;
13403 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
13404 return 5;
13405 $gl_fnmatch_gnu_start
13406 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
13407 result |= 8;
13408 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
13409 result |= 16;
13410 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
13411 result |= 32;
13412 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
13413 result |= 64;
13414 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
13415 result |= 64;
13416 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
13417 result |= 64;
13418 $gl_fnmatch_gnu_end
13419 return result;
13420
13421 ;
13422 return 0;
13423}
13424_ACEOF
13425if ac_fn_c_try_run "$LINENO"; then :
13426 eval "$gl_fnmatch_cache_var=yes"
13427else
13428 eval "$gl_fnmatch_cache_var=no"
13429fi
13430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13431 conftest.$ac_objext conftest.beam conftest.$ac_ext
13432fi
13433
13434
13435fi
13436eval ac_res=\$$gl_fnmatch_cache_var
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13438$as_echo "$ac_res" >&6; }
13439 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
13440 if test "$gl_fnmatch_result" = yes; then
13441 rm -f "$gl_source_base/fnmatch.h"
13442 else
13443 FNMATCH_H=fnmatch.h
13444 fi
13445
13446 if test -n "$FNMATCH_H"; then
13447 GL_GENERATE_FNMATCH_H_TRUE=
13448 GL_GENERATE_FNMATCH_H_FALSE='#'
13449else
13450 GL_GENERATE_FNMATCH_H_TRUE='#'
13451 GL_GENERATE_FNMATCH_H_FALSE=
13452fi
13453
13454
a512b375 13455 if test -n "$FNMATCH_H"; then
8690e634
JK
13456
13457
13458
13459
13460
13461
13462
13463
13464 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
13465
13466
13467
13468cat >>confdefs.h <<_ACEOF
13469#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
13470_ACEOF
13471
13472
13473 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
13474"
13475if test "x$ac_cv_have_decl_isblank" = x""yes; then :
13476 ac_have_decl=1
13477else
13478 ac_have_decl=0
13479fi
13480
13481cat >>confdefs.h <<_ACEOF
13482#define HAVE_DECL_ISBLANK $ac_have_decl
13483_ACEOF
13484
13485
c971b7fa 13486
c971b7fa 13487
a512b375 13488 fi
c971b7fa 13489
c971b7fa 13490
c971b7fa 13491
c971b7fa 13492
c971b7fa 13493
a512b375 13494 if test -n "$FNMATCH_H"; then
c971b7fa 13495
c971b7fa 13496
c971b7fa
PA
13497
13498
c971b7fa
PA
13499
13500
c971b7fa
PA
13501
13502
8690e634 13503 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
c971b7fa 13504
c971b7fa 13505
c971b7fa 13506
8690e634
JK
13507cat >>confdefs.h <<_ACEOF
13508#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
13509_ACEOF
c971b7fa
PA
13510
13511
8690e634
JK
13512 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
13513"
13514if test "x$ac_cv_have_decl_isblank" = x""yes; then :
13515 ac_have_decl=1
13516else
13517 ac_have_decl=0
c971b7fa 13518fi
c971b7fa 13519
8690e634
JK
13520cat >>confdefs.h <<_ACEOF
13521#define HAVE_DECL_ISBLANK $ac_have_decl
c971b7fa
PA
13522_ACEOF
13523
c971b7fa 13524
8690e634 13525
c971b7fa 13526
88b48903
WN
13527 fi
13528
13529
13530
13531 FREXP_LIBM=
13532 if test $gl_cv_func_frexp_no_libm = no; then
13533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
13534$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
13535if test "${gl_cv_func_frexp_in_libm+set}" = set; then :
13536 $as_echo_n "(cached) " >&6
13537else
13538
13539 save_LIBS="$LIBS"
13540 LIBS="$LIBS -lm"
13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542/* end confdefs.h. */
13543#include <math.h>
13544 double x;
13545int
13546main ()
13547{
13548int e; return frexp (x, &e) > 0;
13549 ;
13550 return 0;
13551}
13552_ACEOF
13553if ac_fn_c_try_link "$LINENO"; then :
13554 gl_cv_func_frexp_in_libm=yes
13555else
13556 gl_cv_func_frexp_in_libm=no
13557fi
13558rm -f core conftest.err conftest.$ac_objext \
13559 conftest$ac_exeext conftest.$ac_ext
13560 LIBS="$save_LIBS"
13561
13562fi
13563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
13564$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
13565 if test $gl_cv_func_frexp_in_libm = yes; then
13566 FREXP_LIBM=-lm
13567 fi
13568 fi
13569 if test $gl_cv_func_frexp_no_libm = yes \
13570 || test $gl_cv_func_frexp_in_libm = yes; then
13571 save_LIBS="$LIBS"
13572 LIBS="$LIBS $FREXP_LIBM"
13573
13574
13575
88b48903
WN
13576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
13577$as_echo_n "checking whether frexp works... " >&6; }
13578if test "${gl_cv_func_frexp_works+set}" = set; then :
13579 $as_echo_n "(cached) " >&6
13580else
13581
13582 if test "$cross_compiling" = yes; then :
13583 case "$host_os" in
13584 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
13585 *) gl_cv_func_frexp_works="guessing yes";;
13586 esac
13587
13588else
13589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13590/* end confdefs.h. */
13591
13592#include <float.h>
13593#include <math.h>
13594#include <string.h>
4a626d0a
PA
13595#if HAVE_DECL_ALARM
13596# include <signal.h>
88b48903
WN
13597# include <unistd.h>
13598#endif
13599/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
13600 ICC 10.0 has a bug when optimizing the expression -zero.
13601 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
13602 to PowerPC on Mac OS X 10.5. */
13603#if defined __hpux || defined __sgi || defined __ICC
13604static double
13605compute_minus_zero (void)
13606{
13607 return -DBL_MIN * DBL_MIN;
13608}
13609# define minus_zero compute_minus_zero ()
13610#else
13611double minus_zero = -0.0;
13612#endif
13613int main()
13614{
13615 int result = 0;
13616 int i;
13617 volatile double x;
13618 double zero = 0.0;
4a626d0a 13619#if HAVE_DECL_ALARM
88b48903
WN
13620 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
13621 number. Let the test fail in this case. */
4a626d0a 13622 signal (SIGALRM, SIG_DFL);
88b48903
WN
13623 alarm (5);
13624#endif
13625 /* Test on denormalized numbers. */
13626 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
13627 ;
13628 if (x > 0.0)
13629 {
13630 int exp;
13631 double y = frexp (x, &exp);
13632 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
13633 On NetBSD: y = 0.75. Correct: y = 0.5. */
13634 if (y != 0.5)
13635 result |= 1;
13636 }
13637 /* Test on infinite numbers. */
13638 x = 1.0 / zero;
13639 {
13640 int exp;
13641 double y = frexp (x, &exp);
13642 if (y != x)
13643 result |= 2;
13644 }
13645 /* Test on negative zero. */
13646 x = minus_zero;
13647 {
13648 int exp;
13649 double y = frexp (x, &exp);
13650 if (memcmp (&y, &x, sizeof x))
13651 result |= 4;
13652 }
13653 return result;
13654}
13655_ACEOF
13656if ac_fn_c_try_run "$LINENO"; then :
13657 gl_cv_func_frexp_works=yes
13658else
13659 gl_cv_func_frexp_works=no
13660fi
13661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13662 conftest.$ac_objext conftest.beam conftest.$ac_ext
13663fi
13664
13665
13666fi
13667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
13668$as_echo "$gl_cv_func_frexp_works" >&6; }
13669
13670 LIBS="$save_LIBS"
13671 case "$gl_cv_func_frexp_works" in
13672 *yes) gl_func_frexp=yes ;;
13673 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
13674 esac
13675 else
13676 gl_func_frexp=no
13677 fi
13678 if test $gl_func_frexp = yes; then
13679
13680$as_echo "#define HAVE_FREXP 1" >>confdefs.h
13681
13682 fi
13683
13684
13685 if test $gl_func_frexp != yes; then
13686
13687
13688
13689
13690
13691
13692
13693
13694 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
13695
13696 fi
13697
13698
13699
13700
13701
13702 GNULIB_FREXP=1
13703
13704
13705
13706
13707
13708$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
13719"
13720if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
13721
13722else
13723 HAVE_DECL_FREXPL=0
13724fi
13725
13726
13727 FREXPL_LIBM=
13728 if test $HAVE_DECL_FREXPL = 1; then
13729
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
13731$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
13732if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
13733 $as_echo_n "(cached) " >&6
13734else
13735
13736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13737/* end confdefs.h. */
13738#include <math.h>
13739 long double x;
13740int
13741main ()
13742{
13743int e; return frexpl (x, &e) > 0;
13744 ;
13745 return 0;
13746}
13747_ACEOF
13748if ac_fn_c_try_link "$LINENO"; then :
13749 gl_cv_func_frexpl_no_libm=yes
13750else
13751 gl_cv_func_frexpl_no_libm=no
13752fi
13753rm -f core conftest.err conftest.$ac_objext \
13754 conftest$ac_exeext conftest.$ac_ext
13755
13756fi
13757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
13758$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
13759
13760 if test $gl_cv_func_frexpl_no_libm = no; then
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
13762$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
13763if test "${gl_cv_func_frexpl_in_libm+set}" = set; then :
13764 $as_echo_n "(cached) " >&6
13765else
13766
13767 save_LIBS="$LIBS"
13768 LIBS="$LIBS -lm"
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13770/* end confdefs.h. */
13771#include <math.h>
13772 long double x;
13773int
13774main ()
13775{
13776int e; return frexpl (x, &e) > 0;
13777 ;
13778 return 0;
13779}
13780_ACEOF
13781if ac_fn_c_try_link "$LINENO"; then :
13782 gl_cv_func_frexpl_in_libm=yes
13783else
13784 gl_cv_func_frexpl_in_libm=no
13785fi
13786rm -f core conftest.err conftest.$ac_objext \
13787 conftest$ac_exeext conftest.$ac_ext
13788 LIBS="$save_LIBS"
13789
13790fi
13791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
13792$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
13793 if test $gl_cv_func_frexpl_in_libm = yes; then
13794 FREXPL_LIBM=-lm
13795 fi
13796 fi
13797 if test $gl_cv_func_frexpl_no_libm = yes \
13798 || test $gl_cv_func_frexpl_in_libm = yes; then
13799 save_LIBS="$LIBS"
13800 LIBS="$LIBS $FREXPL_LIBM"
13801
13802
13803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
13804$as_echo_n "checking whether frexpl works... " >&6; }
13805if test "${gl_cv_func_frexpl_works+set}" = set; then :
13806 $as_echo_n "(cached) " >&6
13807else
13808
13809 if test "$cross_compiling" = yes; then :
13810
13811 case "$host_os" in
13812 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
13813 gl_cv_func_frexpl_works="guessing no";;
13814 *) gl_cv_func_frexpl_works="guessing yes";;
13815 esac
13816
13817else
13818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13819/* end confdefs.h. */
13820
13821#include <float.h>
13822#include <math.h>
13823/* Override the values of <float.h>, like done in float.in.h. */
13824#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
13825# undef LDBL_MIN_EXP
13826# define LDBL_MIN_EXP (-16381)
13827#endif
13828#if defined __i386__ && defined __FreeBSD__
13829# undef LDBL_MIN_EXP
13830# define LDBL_MIN_EXP (-16381)
13831#endif
13832#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
13833# undef LDBL_MIN_EXP
13834# define LDBL_MIN_EXP DBL_MIN_EXP
13835#endif
13836#if defined __sgi && (LDBL_MANT_DIG >= 106)
13837# if defined __GNUC__
13838# undef LDBL_MIN_EXP
13839# define LDBL_MIN_EXP DBL_MIN_EXP
13840# endif
13841#endif
13842extern
13843#ifdef __cplusplus
13844"C"
13845#endif
13846long double frexpl (long double, int *);
13847int main()
13848{
13849 int result = 0;
13850 volatile long double x;
13851 /* Test on finite numbers that fails on AIX 5.1. */
13852 x = 16.0L;
13853 {
13854 int exp = -9999;
13855 frexpl (x, &exp);
13856 if (exp != 5)
13857 result |= 1;
13858 }
13859 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
13860 function returns an invalid (incorrectly normalized) value: it returns
13861 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
13862 but the correct result is
13863 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
13864 x = 1.01L;
13865 {
13866 int exp = -9999;
13867 long double y = frexpl (x, &exp);
13868 if (!(exp == 1 && y == 0.505L))
13869 result |= 2;
13870 }
13871 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
13872 LDBL_MAX_EXP = 16384.
13873 In the loop end test, we test x against Infinity, rather than comparing
13874 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
13875 {
13876 int i;
13877 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
13878 {
13879 int exp = -9999;
13880 frexpl (x, &exp);
13881 if (exp != i)
13882 {
13883 result |= 4;
13884 break;
13885 }
13886 }
13887 }
13888 /* Test on denormalized numbers. */
13889 {
13890 int i;
13891 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
13892 ;
13893 if (x > 0.0L)
13894 {
13895 int exp;
13896 long double y = frexpl (x, &exp);
13897 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
13898 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
13899 if (exp != LDBL_MIN_EXP - 1)
13900 result |= 8;
13901 }
13902 }
13903 /* Test on infinite numbers. */
13904 x = 1.0L / 0.0L;
13905 {
13906 int exp;
13907 long double y = frexpl (x, &exp);
13908 if (y != x)
13909 result |= 16;
13910 }
13911 return result;
13912}
13913_ACEOF
13914if ac_fn_c_try_run "$LINENO"; then :
13915 gl_cv_func_frexpl_works=yes
13916else
13917 gl_cv_func_frexpl_works=no
13918fi
13919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13920 conftest.$ac_objext conftest.beam conftest.$ac_ext
13921fi
13922
13923
4a626d0a
PA
13924fi
13925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
13926$as_echo "$gl_cv_func_frexpl_works" >&6; }
13927
13928 LIBS="$save_LIBS"
13929 case "$gl_cv_func_frexpl_works" in
13930 *yes) gl_func_frexpl=yes ;;
13931 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
13932 esac
13933 else
13934 gl_func_frexpl=no
13935 fi
13936 if test $gl_func_frexpl = yes; then
13937
13938$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
13939
13940 fi
13941 fi
13942 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
13943 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
13944
13945 FREXPL_LIBM="$FREXP_LIBM"
13946 else
13947 FREXPL_LIBM=
13948 fi
13949 fi
13950
13951
13952 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
13953
13954
13955
13956
13957
13958
13959
13960
13961 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
13962
13963 fi
13964
13965
13966
13967
13968
13969 GNULIB_FREXPL=1
13970
13971
13972
13973
13974
13975$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985 gl_gettimeofday_timezone=void
13986 if test $ac_cv_func_gettimeofday != yes; then
13987 HAVE_GETTIMEOFDAY=0
13988 else
13989
13990
13991
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
13993$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
13994if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
13995 $as_echo_n "(cached) " >&6
13996else
13997 if test "$cross_compiling" = yes; then :
13998 # When cross-compiling:
13999 case "$host_os" in
14000 # Guess all is fine on glibc systems.
14001 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
14002 # If we don't know, assume the worst.
14003 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
14004 esac
14005
14006else
14007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008/* end confdefs.h. */
14009#include <string.h>
14010 #include <sys/time.h>
14011 #include <time.h>
14012 #include <stdlib.h>
14013
14014int
14015main ()
14016{
14017
14018 time_t t = 0;
14019 struct tm *lt;
14020 struct tm saved_lt;
14021 struct timeval tv;
14022 lt = localtime (&t);
14023 saved_lt = *lt;
14024 gettimeofday (&tv, NULL);
14025 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
14026
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031if ac_fn_c_try_run "$LINENO"; then :
14032 gl_cv_func_gettimeofday_clobber=no
14033else
14034 gl_cv_func_gettimeofday_clobber=yes
14035fi
14036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14037 conftest.$ac_objext conftest.beam conftest.$ac_ext
14038fi
14039
14040fi
14041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
14042$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
14043
14044 case "$gl_cv_func_gettimeofday_clobber" in
14045 *yes)
14046 REPLACE_GETTIMEOFDAY=1
14047
14048 REPLACE_GMTIME=1
14049 REPLACE_LOCALTIME=1
14050
14051
14052$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
14053
14054 ;;
14055 esac
14056
14057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
14058$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
14059if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
14060 $as_echo_n "(cached) " >&6
14061else
14062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14063/* end confdefs.h. */
14064#include <sys/time.h>
14065 struct timeval c;
14066 int gettimeofday (struct timeval *restrict, void *restrict);
14067
14068int
14069main ()
14070{
14071/* glibc uses struct timezone * rather than the POSIX void *
14072 if _GNU_SOURCE is defined. However, since the only portable
14073 use of gettimeofday uses NULL as the second parameter, and
14074 since the glibc definition is actually more typesafe, it is
14075 not worth wrapping this to get a compliant signature. */
14076 int (*f) (struct timeval *restrict, void *restrict)
14077 = gettimeofday;
14078 int x = f (&c, 0);
14079 return !(x | c.tv_sec | c.tv_usec);
14080
14081 ;
14082 return 0;
14083}
14084_ACEOF
14085if ac_fn_c_try_compile "$LINENO"; then :
14086 gl_cv_func_gettimeofday_posix_signature=yes
14087else
14088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14089/* end confdefs.h. */
14090#include <sys/time.h>
14091int gettimeofday (struct timeval *restrict, struct timezone *restrict);
14092
14093int
14094main ()
14095{
14096
14097 ;
14098 return 0;
14099}
14100_ACEOF
14101if ac_fn_c_try_compile "$LINENO"; then :
14102 gl_cv_func_gettimeofday_posix_signature=almost
14103else
14104 gl_cv_func_gettimeofday_posix_signature=no
14105fi
14106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14107fi
14108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14109fi
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
14111$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
14112 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
14113 gl_gettimeofday_timezone='struct timezone'
14114 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
14115 REPLACE_GETTIMEOFDAY=1
14116 fi
14117 if test $REPLACE_STRUCT_TIMEVAL = 1; then
14118 REPLACE_GETTIMEOFDAY=1
14119 fi
14120
14121 fi
14122
14123cat >>confdefs.h <<_ACEOF
14124#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
14125_ACEOF
14126
88b48903 14127
4a626d0a 14128 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 14129
88b48903 14130
88b48903 14131
88b48903
WN
14132
14133
88b48903
WN
14134
14135
14136
4a626d0a 14137 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
88b48903
WN
14138
14139
4a626d0a
PA
14140 for ac_header in sys/timeb.h
14141do :
14142 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
14143if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
14144 cat >>confdefs.h <<_ACEOF
14145#define HAVE_SYS_TIMEB_H 1
14146_ACEOF
88b48903 14147
4a626d0a 14148fi
88b48903 14149
4a626d0a
PA
14150done
14151
14152 for ac_func in _ftime
14153do :
14154 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
14155if test "x$ac_cv_func__ftime" = x""yes; then :
14156 cat >>confdefs.h <<_ACEOF
14157#define HAVE__FTIME 1
14158_ACEOF
14159
14160fi
14161done
88b48903 14162
88b48903
WN
14163
14164 fi
14165
14166
14167
14168
14169
4a626d0a 14170 GNULIB_GETTIMEOFDAY=1
88b48903
WN
14171
14172
14173
14174
14175
4a626d0a 14176$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
88b48903
WN
14177
14178
14179
14180
49e4877c
PA
14181 :
14182
14183
88b48903
WN
14184
14185
14186
14187
14188 PRIPTR_PREFIX=
14189 if test -n "$STDINT_H"; then
14190 PRIPTR_PREFIX='"l"'
14191 else
14192 for glpfx in '' l ll I64; do
14193 case $glpfx in
14194 '') gltype1='int';;
14195 l) gltype1='long int';;
14196 ll) gltype1='long long int';;
14197 I64) gltype1='__int64';;
14198 esac
14199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14200/* end confdefs.h. */
14201#include <stdint.h>
14202 extern intptr_t foo;
14203 extern $gltype1 foo;
14204int
14205main ()
14206{
14207
14208 ;
14209 return 0;
14210}
14211_ACEOF
14212if ac_fn_c_try_compile "$LINENO"; then :
14213 PRIPTR_PREFIX='"'$glpfx'"'
14214fi
14215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216 test -n "$PRIPTR_PREFIX" && break
14217 done
14218 fi
14219
14220
14221
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
14223$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
14224if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
14225 $as_echo_n "(cached) " >&6
14226else
14227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14228/* end confdefs.h. */
14229/* Work also in C++ mode. */
14230 #define __STDC_LIMIT_MACROS 1
14231
14232 /* Work if build is not clean. */
14233 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14234
14235 #include <limits.h>
14236 #if HAVE_STDINT_H
14237 #include <stdint.h>
14238 #endif
14239
14240 #if defined INT32_MAX && defined INTMAX_MAX
14241 #define CONDITION (INT32_MAX < INTMAX_MAX)
14242 #elif HAVE_LONG_LONG_INT
14243 #define CONDITION (sizeof (int) < sizeof (long long int))
14244 #else
14245 #define CONDITION 0
14246 #endif
14247 int test[CONDITION ? 1 : -1];
14248int
14249main ()
14250{
14251
14252 ;
14253 return 0;
14254}
14255_ACEOF
14256if ac_fn_c_try_compile "$LINENO"; then :
14257 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
14258else
14259 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
14260fi
14261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14262fi
14263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
14264$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
14265 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
14266 INT32_MAX_LT_INTMAX_MAX=1;
14267 else
14268 INT32_MAX_LT_INTMAX_MAX=0;
14269 fi
14270
14271
14272 if test $APPLE_UNIVERSAL_BUILD = 0; then
14273
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
14275$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
14276if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
14277 $as_echo_n "(cached) " >&6
14278else
14279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14280/* end confdefs.h. */
14281/* Work also in C++ mode. */
14282 #define __STDC_LIMIT_MACROS 1
14283
14284 /* Work if build is not clean. */
14285 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14286
14287 #include <limits.h>
14288 #if HAVE_STDINT_H
14289 #include <stdint.h>
14290 #endif
14291
14292 #if defined INT64_MAX
14293 #define CONDITION (INT64_MAX == LONG_MAX)
14294 #elif HAVE_LONG_LONG_INT
14295 #define CONDITION (sizeof (long long int) == sizeof (long int))
14296 #else
14297 #define CONDITION 0
14298 #endif
14299 int test[CONDITION ? 1 : -1];
14300int
14301main ()
14302{
14303
14304 ;
14305 return 0;
14306}
14307_ACEOF
14308if ac_fn_c_try_compile "$LINENO"; then :
14309 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
14310else
14311 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
14312fi
14313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14314fi
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
14316$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
14317 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
14318 INT64_MAX_EQ_LONG_MAX=1;
14319 else
14320 INT64_MAX_EQ_LONG_MAX=0;
14321 fi
14322
14323
14324 else
14325 INT64_MAX_EQ_LONG_MAX=-1
14326 fi
14327
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
14329$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
14330if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
14331 $as_echo_n "(cached) " >&6
14332else
14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334/* end confdefs.h. */
14335/* Work also in C++ mode. */
14336 #define __STDC_LIMIT_MACROS 1
14337
14338 /* Work if build is not clean. */
14339 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14340
14341 #include <limits.h>
14342 #if HAVE_STDINT_H
14343 #include <stdint.h>
14344 #endif
14345
14346 #if defined UINT32_MAX && defined UINTMAX_MAX
14347 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
14348 #elif HAVE_LONG_LONG_INT
14349 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
14350 #else
14351 #define CONDITION 0
14352 #endif
14353 int test[CONDITION ? 1 : -1];
14354int
14355main ()
14356{
14357
14358 ;
14359 return 0;
14360}
14361_ACEOF
14362if ac_fn_c_try_compile "$LINENO"; then :
14363 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
14364else
14365 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
14366fi
14367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14368fi
14369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
14370$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
14371 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
14372 UINT32_MAX_LT_UINTMAX_MAX=1;
14373 else
14374 UINT32_MAX_LT_UINTMAX_MAX=0;
14375 fi
14376
14377
14378 if test $APPLE_UNIVERSAL_BUILD = 0; then
14379
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
14381$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
14382if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
14383 $as_echo_n "(cached) " >&6
14384else
14385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14386/* end confdefs.h. */
14387/* Work also in C++ mode. */
14388 #define __STDC_LIMIT_MACROS 1
14389
14390 /* Work if build is not clean. */
14391 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
14392
14393 #include <limits.h>
14394 #if HAVE_STDINT_H
14395 #include <stdint.h>
14396 #endif
14397
14398 #if defined UINT64_MAX
14399 #define CONDITION (UINT64_MAX == ULONG_MAX)
14400 #elif HAVE_LONG_LONG_INT
14401 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
14402 #else
14403 #define CONDITION 0
14404 #endif
14405 int test[CONDITION ? 1 : -1];
14406int
14407main ()
14408{
14409
14410 ;
14411 return 0;
14412}
14413_ACEOF
14414if ac_fn_c_try_compile "$LINENO"; then :
14415 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
14416else
14417 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
14418fi
14419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14420fi
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
14422$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
14423 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
14424 UINT64_MAX_EQ_ULONG_MAX=1;
14425 else
14426 UINT64_MAX_EQ_ULONG_MAX=0;
14427 fi
14428
14429
14430 else
14431 UINT64_MAX_EQ_ULONG_MAX=-1
14432 fi
14433
14434
14435
14436
14437
14438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
14439$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
14440if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
14441 $as_echo_n "(cached) " >&6
14442else
14443
14444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445/* end confdefs.h. */
14446#include <math.h>
14447 #if __GNUC__ >= 4
14448 # undef isnand
14449 # define isnand(x) __builtin_isnan ((double)(x))
14450 #else
14451 # undef isnand
14452 # define isnand(x) isnan ((double)(x))
14453 #endif
14454 double x;
14455int
14456main ()
14457{
14458return isnand (x);
14459 ;
14460 return 0;
14461}
14462_ACEOF
14463if ac_fn_c_try_link "$LINENO"; then :
14464 gl_cv_func_isnand_no_libm=yes
14465else
14466 gl_cv_func_isnand_no_libm=no
14467fi
14468rm -f core conftest.err conftest.$ac_objext \
14469 conftest$ac_exeext conftest.$ac_ext
14470
14471fi
14472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
14473$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
14474
14475 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
14476 if test $gl_cv_func_isnand_no_libm = yes; then
14477
14478$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
14479
14480 fi
14481
14482 if test $gl_func_isnand_no_libm != yes; then
14483
14484
14485
14486
14487
14488
14489
14490
14491 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
14492
14493
14494
14495
14496 fi
14497
14498
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
14500$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
14501if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
14502 $as_echo_n "(cached) " >&6
14503else
14504
14505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14506/* end confdefs.h. */
14507#include <math.h>
14508 #if __GNUC__ >= 4
14509 # undef isnanl
14510 # define isnanl(x) __builtin_isnanl ((long double)(x))
14511 #elif defined isnan
14512 # undef isnanl
14513 # define isnanl(x) isnan ((long double)(x))
14514 #endif
14515 long double x;
14516int
14517main ()
14518{
14519return isnanl (x);
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524if ac_fn_c_try_link "$LINENO"; then :
14525 gl_cv_func_isnanl_no_libm=yes
14526else
14527 gl_cv_func_isnanl_no_libm=no
14528fi
14529rm -f core conftest.err conftest.$ac_objext \
14530 conftest$ac_exeext conftest.$ac_ext
14531
14532fi
14533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
14534$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
14535
14536 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
14537 if test $gl_func_isnanl_no_libm = yes; then
14538
14539
14540
14541
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
14543$as_echo_n "checking whether isnanl works... " >&6; }
14544if test "${gl_cv_func_isnanl_works+set}" = set; then :
14545 $as_echo_n "(cached) " >&6
14546else
14547
14548 if test "$cross_compiling" = yes; then :
4a626d0a 14549 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
14550else
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552/* end confdefs.h. */
14553
14554#include <float.h>
14555#include <limits.h>
14556#include <math.h>
14557#if __GNUC__ >= 4
14558# undef isnanl
14559# define isnanl(x) __builtin_isnanl ((long double)(x))
14560#elif defined isnan
14561# undef isnanl
14562# define isnanl(x) isnan ((long double)(x))
14563#endif
14564#define NWORDS \
14565 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14566typedef union { unsigned int word[NWORDS]; long double value; }
14567 memory_long_double;
14568/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
14569 runtime type conversion. */
14570#ifdef __sgi
14571static long double NaNl ()
14572{
14573 double zero = 0.0;
14574 return zero / zero;
14575}
14576#else
14577# define NaNl() (0.0L / 0.0L)
14578#endif
14579int main ()
14580{
14581 int result = 0;
14582
14583 if (!isnanl (NaNl ()))
14584 result |= 1;
14585
14586 {
14587 memory_long_double m;
14588 unsigned int i;
14589
14590 /* The isnanl function should be immune against changes in the sign bit and
14591 in the mantissa bits. The xor operation twiddles a bit that can only be
14592 a sign bit or a mantissa bit (since the exponent never extends to
14593 bit 31). */
14594 m.value = NaNl ();
14595 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
14596 for (i = 0; i < NWORDS; i++)
14597 m.word[i] |= 1;
14598 if (!isnanl (m.value))
14599 result |= 1;
14600 }
14601
14602#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
14603/* Representation of an 80-bit 'long double' as an initializer for a sequence
14604 of 'unsigned int' words. */
14605# ifdef WORDS_BIGENDIAN
14606# define LDBL80_WORDS(exponent,manthi,mantlo) \
14607 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 14608 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
14609 (unsigned int) (mantlo) << 16 \
14610 }
14611# else
14612# define LDBL80_WORDS(exponent,manthi,mantlo) \
14613 { mantlo, manthi, exponent }
14614# endif
14615 { /* Quiet NaN. */
14616 static memory_long_double x =
14617 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
14618 if (!isnanl (x.value))
14619 result |= 2;
14620 }
14621 {
14622 /* Signalling NaN. */
14623 static memory_long_double x =
14624 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
14625 if (!isnanl (x.value))
14626 result |= 2;
14627 }
4a626d0a 14628 /* isnanl should return something even for noncanonical values. */
88b48903
WN
14629 { /* Pseudo-NaN. */
14630 static memory_long_double x =
14631 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 14632 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14633 result |= 4;
14634 }
14635 { /* Pseudo-Infinity. */
14636 static memory_long_double x =
14637 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 14638 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14639 result |= 8;
14640 }
14641 { /* Pseudo-Zero. */
14642 static memory_long_double x =
14643 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 14644 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14645 result |= 16;
14646 }
14647 { /* Unnormalized number. */
14648 static memory_long_double x =
14649 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 14650 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14651 result |= 32;
14652 }
14653 { /* Pseudo-Denormal. */
14654 static memory_long_double x =
14655 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 14656 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
14657 result |= 64;
14658 }
14659#endif
14660
14661 return result;
14662}
14663_ACEOF
14664if ac_fn_c_try_run "$LINENO"; then :
14665 gl_cv_func_isnanl_works=yes
14666else
14667 gl_cv_func_isnanl_works=no
14668fi
14669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14670 conftest.$ac_objext conftest.beam conftest.$ac_ext
14671fi
14672
14673
14674fi
14675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
14676$as_echo "$gl_cv_func_isnanl_works" >&6; }
14677
14678 case "$gl_cv_func_isnanl_works" in
14679 *yes) ;;
14680 *) gl_func_isnanl_no_libm=no ;;
14681 esac
14682 fi
14683 if test $gl_func_isnanl_no_libm = yes; then
14684
14685$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
14686
14687 fi
14688
14689 if test $gl_func_isnanl_no_libm != yes; then
14690
14691
14692
14693
14694
14695
14696
14697
14698 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
14699
14700
14701
14702
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
14704$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
14705if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
14706 $as_echo_n "(cached) " >&6
14707else
14708
14709 if test "$cross_compiling" = yes; then :
14710
14711 gl_cv_cc_long_double_expbit0="unknown"
14712
14713else
14714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14715/* end confdefs.h. */
14716
14717#include <float.h>
14718#include <stddef.h>
14719#include <stdio.h>
14720#include <string.h>
14721#define NWORDS \
14722 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14723typedef union { long double value; unsigned int word[NWORDS]; }
14724 memory_long_double;
14725static unsigned int ored_words[NWORDS];
14726static unsigned int anded_words[NWORDS];
14727static void add_to_ored_words (long double x)
14728{
14729 memory_long_double m;
14730 size_t i;
14731 /* Clear it first, in case
14732 sizeof (long double) < sizeof (memory_long_double). */
14733 memset (&m, 0, sizeof (memory_long_double));
14734 m.value = x;
14735 for (i = 0; i < NWORDS; i++)
14736 {
14737 ored_words[i] |= m.word[i];
14738 anded_words[i] &= m.word[i];
14739 }
14740}
14741int main ()
14742{
14743 size_t j;
14744 FILE *fp = fopen ("conftest.out", "w");
14745 if (fp == NULL)
14746 return 1;
14747 for (j = 0; j < NWORDS; j++)
14748 anded_words[j] = ~ (unsigned int) 0;
14749 add_to_ored_words (0.25L);
14750 add_to_ored_words (0.5L);
14751 add_to_ored_words (1.0L);
14752 add_to_ored_words (2.0L);
14753 add_to_ored_words (4.0L);
14754 /* Remove bits that are common (e.g. if representation of the first mantissa
14755 bit is explicit). */
14756 for (j = 0; j < NWORDS; j++)
14757 ored_words[j] &= ~anded_words[j];
14758 /* Now find the nonzero word. */
14759 for (j = 0; j < NWORDS; j++)
14760 if (ored_words[j] != 0)
14761 break;
14762 if (j < NWORDS)
14763 {
14764 size_t i;
14765 for (i = j + 1; i < NWORDS; i++)
14766 if (ored_words[i] != 0)
14767 {
14768 fprintf (fp, "unknown");
14769 return (fclose (fp) != 0);
14770 }
14771 for (i = 0; ; i++)
14772 if ((ored_words[j] >> i) & 1)
14773 {
14774 fprintf (fp, "word %d bit %d", (int) j, (int) i);
14775 return (fclose (fp) != 0);
14776 }
14777 }
14778 fprintf (fp, "unknown");
14779 return (fclose (fp) != 0);
14780}
14781
14782_ACEOF
14783if ac_fn_c_try_run "$LINENO"; then :
14784 gl_cv_cc_long_double_expbit0=`cat conftest.out`
14785else
14786 gl_cv_cc_long_double_expbit0="unknown"
14787fi
14788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14789 conftest.$ac_objext conftest.beam conftest.$ac_ext
14790fi
14791
14792 rm -f conftest.out
14793
14794fi
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
14796$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
14797 case "$gl_cv_cc_long_double_expbit0" in
14798 word*bit*)
14799 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14800 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
14801
14802cat >>confdefs.h <<_ACEOF
14803#define LDBL_EXPBIT0_WORD $word
14804_ACEOF
14805
14806
14807cat >>confdefs.h <<_ACEOF
14808#define LDBL_EXPBIT0_BIT $bit
14809_ACEOF
14810
14811 ;;
14812 esac
14813
14814
14815
14816 fi
14817
14818
14819
14820
88b48903
WN
14821
14822
14823
14824
2196f55f 14825
49e4877c 14826
88b48903
WN
14827 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
14828
14829
14830
14831
f45c62c4
YQ
14832 if test $ac_cv_func_lstat = yes; then
14833
14834 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14835 *no)
14836 REPLACE_LSTAT=1
14837 ;;
14838 esac
14839 else
14840 HAVE_LSTAT=0
14841 fi
14842
14843 if test $REPLACE_LSTAT = 1; then
14844
14845
14846
14847
14848
14849
14850
14851
14852 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
14853
14854 :
14855 fi
14856
14857
14858
14859
14860
14861 GNULIB_LSTAT=1
14862
14863
14864
14865
14866
14867$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
14868
14869
14870
14871
14872
14873
6a29c58e
YQ
14874 if test $gl_cv_func_malloc_posix = yes; then
14875
14876$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
14877
14878 else
14879 REPLACE_MALLOC=1
14880 fi
14881
14882 if test $REPLACE_MALLOC = 1; then
14883
14884
14885
14886
14887
14888
14889
14890
14891 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
14892
14893 fi
14894
14895
14896
14897
14898
14899 GNULIB_MALLOC_POSIX=1
14900
14901
14902
14903
14904
14905$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
14906
14907
14908
14909
14910
14911
88b48903
WN
14912
14913
14914
14915
14916
88b48903 14917
c971b7fa 14918
c971b7fa 14919
98399780
YQ
14920
14921
14922
14923
88b48903
WN
14924 if test $gl_cv_have_include_next = yes; then
14925 gl_cv_next_math_h='<'math.h'>'
14926 else
14927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
14928$as_echo_n "checking absolute name of <math.h>... " >&6; }
14929if test "${gl_cv_next_math_h+set}" = set; then :
14930 $as_echo_n "(cached) " >&6
14931else
c971b7fa 14932
88b48903 14933 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
14934
14935
4a626d0a
PA
14936
14937
14938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14939/* end confdefs.h. */
88b48903 14940#include <math.h>
8690e634 14941_ACEOF
4a626d0a
PA
14942 case "$host_os" in
14943 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14944 *) gl_absname_cpp="$ac_cpp" ;;
14945 esac
14946
14947 case "$host_os" in
14948 mingw*)
14949 gl_dirsep_regex='[/\\]'
14950 ;;
14951 *)
14952 gl_dirsep_regex='\/'
14953 ;;
14954 esac
14955 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14956 gl_header_literal_regex=`echo 'math.h' \
14957 | sed -e "$gl_make_literal_regex_sed"`
14958 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14959 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14960 s|^/[^/]|//&|
14961 p
14962 q
14963 }'
14964
14965 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14966 sed -n "$gl_absolute_header_sed"`
14967
14968 gl_header=$gl_cv_absolute_math_h
14969 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
14970 else
14971 gl_cv_next_math_h='<'math.h'>'
14972 fi
8690e634 14973
c971b7fa 14974
88b48903
WN
14975fi
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
14977$as_echo "$gl_cv_next_math_h" >&6; }
14978 fi
14979 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 14980
88b48903
WN
14981 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14983 gl_next_as_first_directive='<'math.h'>'
14984 else
14985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14986 gl_next_as_first_directive=$gl_cv_next_math_h
14987 fi
14988 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 14989
c971b7fa 14990
c971b7fa
PA
14991
14992
c971b7fa 14993
88b48903
WN
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
14995$as_echo_n "checking whether NAN macro works... " >&6; }
14996if test "${gl_cv_header_math_nan_works+set}" = set; then :
c971b7fa
PA
14997 $as_echo_n "(cached) " >&6
14998else
8690e634
JK
14999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15000/* end confdefs.h. */
88b48903 15001#include <math.h>
c971b7fa
PA
15002int
15003main ()
15004{
88b48903
WN
15005/* Solaris 10 has a broken definition of NAN. Other platforms
15006 fail to provide NAN, or provide it only in C99 mode; this
15007 test only needs to fail when NAN is provided but wrong. */
15008 float f = 1.0f;
15009#ifdef NAN
15010 f = NAN;
15011#endif
15012 return f == 0;
c971b7fa
PA
15013 ;
15014 return 0;
15015}
15016_ACEOF
15017if ac_fn_c_try_compile "$LINENO"; then :
88b48903 15018 gl_cv_header_math_nan_works=yes
8690e634 15019else
88b48903 15020 gl_cv_header_math_nan_works=no
c971b7fa
PA
15021fi
15022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 15023fi
88b48903
WN
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
15025$as_echo "$gl_cv_header_math_nan_works" >&6; }
15026 if test $gl_cv_header_math_nan_works = no; then
15027 REPLACE_NAN=1
c971b7fa 15028 fi
88b48903
WN
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
15030$as_echo_n "checking whether HUGE_VAL works... " >&6; }
15031if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
c971b7fa
PA
15032 $as_echo_n "(cached) " >&6
15033else
8690e634 15034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 15035/* end confdefs.h. */
88b48903 15036#include <math.h>
c971b7fa
PA
15037int
15038main ()
15039{
88b48903
WN
15040/* Solaris 10 has a broken definition of HUGE_VAL. */
15041 double d = HUGE_VAL;
15042 return d == 0;
c971b7fa
PA
15043 ;
15044 return 0;
15045}
15046_ACEOF
15047if ac_fn_c_try_compile "$LINENO"; then :
88b48903 15048 gl_cv_header_math_huge_val_works=yes
8690e634 15049else
88b48903 15050 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
15051fi
15052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 15053fi
88b48903
WN
15054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
15055$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
15056 if test $gl_cv_header_math_huge_val_works = no; then
15057 REPLACE_HUGE_VAL=1
8690e634 15058 fi
c971b7fa 15059
c971b7fa 15060
88b48903
WN
15061 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
15062 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15064$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15065if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
8690e634
JK
15066 $as_echo_n "(cached) " >&6
15067else
15068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15069/* end confdefs.h. */
88b48903 15070#include <math.h>
8690e634
JK
15071int
15072main ()
15073{
88b48903
WN
15074#undef $gl_func
15075 (void) $gl_func;
8690e634
JK
15076 ;
15077 return 0;
15078}
15079_ACEOF
15080if ac_fn_c_try_compile "$LINENO"; then :
88b48903 15081 eval "$as_gl_Symbol=yes"
c971b7fa 15082else
88b48903 15083 eval "$as_gl_Symbol=no"
c971b7fa 15084fi
8690e634
JK
15085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15086fi
88b48903
WN
15087eval ac_res=\$$as_gl_Symbol
15088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15089$as_echo "$ac_res" >&6; }
15090 eval as_val=\$$as_gl_Symbol
15091 if test "x$as_val" = x""yes; then :
15092 cat >>confdefs.h <<_ACEOF
15093#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15094_ACEOF
c971b7fa 15095
88b48903
WN
15096 eval ac_cv_have_decl_$gl_func=yes
15097fi
15098 done
c971b7fa
PA
15099
15100
15101
15102
15103
c971b7fa 15104
c971b7fa 15105
c971b7fa 15106
c971b7fa
PA
15107
15108
c971b7fa 15109
8690e634
JK
15110
15111 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
15112
15113
15114
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
15116$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
15117if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
c971b7fa
PA
15118 $as_echo_n "(cached) " >&6
15119else
8690e634
JK
15120
15121 case "$host_os" in
15122 # Guess no on AIX and OSF/1.
15123 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
15124 # Guess yes otherwise.
15125 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
15126 esac
15127 if test $LOCALE_JA != none; then
15128 if test "$cross_compiling" = yes; then :
15129 :
15130else
c971b7fa
PA
15131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15132/* end confdefs.h. */
c971b7fa 15133
8690e634
JK
15134#include <locale.h>
15135#include <string.h>
15136/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15137 <wchar.h>.
15138 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15139 included before <wchar.h>. */
15140#include <stddef.h>
15141#include <stdio.h>
15142#include <time.h>
15143#include <wchar.h>
15144int main ()
c971b7fa 15145{
8690e634
JK
15146 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15147 {
15148 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15149 mbstate_t state;
15150 wchar_t wc;
15151
15152 memset (&state, '\0', sizeof (mbstate_t));
15153 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15154 if (mbsinit (&state))
15155 return 1;
15156 }
c971b7fa
PA
15157 return 0;
15158}
15159_ACEOF
8690e634
JK
15160if ac_fn_c_try_run "$LINENO"; then :
15161 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 15162else
8690e634 15163 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 15164fi
8690e634
JK
15165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15166 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15167fi
c971b7fa 15168
8690e634 15169 fi
c971b7fa 15170
8690e634
JK
15171fi
15172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15173$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 15174
c971b7fa 15175
c971b7fa 15176
c971b7fa 15177
8690e634
JK
15178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15179$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15180if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
15181 $as_echo_n "(cached) " >&6
15182else
15183
8690e634
JK
15184 case "$host_os" in
15185 # Guess no on Solaris 8.
15186 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15187 # Guess yes otherwise.
15188 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15189 esac
15190 if test $LOCALE_ZH_CN != none; then
15191 if test "$cross_compiling" = yes; then :
15192 :
15193else
15194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
15195/* end confdefs.h. */
15196
8690e634
JK
15197#include <locale.h>
15198#include <stdlib.h>
15199#include <string.h>
15200/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15201 <wchar.h>.
15202 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15203 included before <wchar.h>. */
15204#include <stddef.h>
15205#include <stdio.h>
15206#include <time.h>
15207#include <wchar.h>
15208int main ()
c971b7fa 15209{
8690e634
JK
15210 /* This fails on Solaris 8:
15211 mbrtowc returns 2, and sets wc to 0x00F0.
15212 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
15213 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15214 {
15215 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
15216 mbstate_t state;
15217 wchar_t wc;
15218
15219 memset (&state, '\0', sizeof (mbstate_t));
15220 if (mbrtowc (&wc, input + 3, 6, &state) != 4
15221 && mbtowc (&wc, input + 3, 6) == 4)
15222 return 1;
15223 }
c971b7fa
PA
15224 return 0;
15225}
15226_ACEOF
8690e634
JK
15227if ac_fn_c_try_run "$LINENO"; then :
15228 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 15229else
8690e634 15230 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 15231fi
8690e634
JK
15232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15233 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15234fi
c971b7fa 15235
8690e634 15236 fi
c971b7fa 15237
8690e634
JK
15238fi
15239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
15240$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
15241
15242 REPLACE_MBSTATE_T=0
15243 case "$gl_cv_func_mbrtowc_incomplete_state" in
15244 *yes) ;;
15245 *) REPLACE_MBSTATE_T=1 ;;
15246 esac
15247 case "$gl_cv_func_mbrtowc_sanitycheck" in
15248 *yes) ;;
15249 *) REPLACE_MBSTATE_T=1 ;;
15250 esac
c971b7fa 15251 else
8690e634 15252 REPLACE_MBSTATE_T=1
c971b7fa
PA
15253 fi
15254
15255
15256
8690e634
JK
15257 if test $ac_cv_func_mbrtowc = no; then
15258 HAVE_MBRTOWC=0
15259 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
15260/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15261 <wchar.h>.
15262 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15263 included before <wchar.h>. */
15264#include <stddef.h>
15265#include <stdio.h>
15266#include <time.h>
15267#include <wchar.h>
c971b7fa 15268
8690e634
JK
15269"
15270if test "x$ac_cv_have_decl_mbrtowc" = x""yes; then :
15271 ac_have_decl=1
15272else
15273 ac_have_decl=0
c971b7fa 15274fi
c971b7fa 15275
8690e634
JK
15276cat >>confdefs.h <<_ACEOF
15277#define HAVE_DECL_MBRTOWC $ac_have_decl
15278_ACEOF
c971b7fa 15279
8690e634
JK
15280 if test $ac_cv_have_decl_mbrtowc = yes; then
15281 REPLACE_MBRTOWC=1
15282 fi
15283 else
15284 if test $REPLACE_MBSTATE_T = 1; then
15285 REPLACE_MBRTOWC=1
15286 else
c971b7fa
PA
15287
15288
15289
8690e634
JK
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
15291$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
15292if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
15293 $as_echo_n "(cached) " >&6
c971b7fa 15294else
c971b7fa 15295
8690e634
JK
15296 case "$host_os" in
15297 # Guess no on Solaris.
15298 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
15299 # Guess yes otherwise.
15300 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
15301 esac
15302 if test $LOCALE_FR_UTF8 != none; then
15303 if test "$cross_compiling" = yes; then :
15304 :
15305else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
15307/* end confdefs.h. */
15308
8690e634
JK
15309#include <locale.h>
15310#include <stdlib.h>
15311#include <string.h>
15312/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15313 <wchar.h>.
15314 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15315 included before <wchar.h>. */
15316#include <stddef.h>
15317#include <stdio.h>
15318#include <time.h>
15319#include <wchar.h>
15320int main ()
15321{
15322 int result = 0;
15323
15324 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15325 {
15326 char input[] = "\303\237er";
15327 mbstate_t state;
15328 wchar_t wc;
15329 size_t ret;
15330
15331 memset (&state, '\0', sizeof (mbstate_t));
15332 wc = (wchar_t) 0xBADFACE;
15333 ret = mbrtowc (&wc, input, 5, &state);
15334 if (ret != 2)
15335 result |= 1;
15336 if (!mbsinit (&state))
15337 result |= 2;
c971b7fa 15338
8690e634
JK
15339 memset (&state, '\0', sizeof (mbstate_t));
15340 ret = mbrtowc (NULL, input, 5, &state);
15341 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
15342 result |= 4;
15343 if (!mbsinit (&state))
15344 result |= 8;
15345 }
15346 return result;
15347}
c971b7fa 15348_ACEOF
8690e634
JK
15349if ac_fn_c_try_run "$LINENO"; then :
15350 gl_cv_func_mbrtowc_null_arg1=yes
15351else
15352 gl_cv_func_mbrtowc_null_arg1=no
15353fi
15354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15355 conftest.$ac_objext conftest.beam conftest.$ac_ext
15356fi
c971b7fa 15357
8690e634 15358 fi
c971b7fa 15359
c971b7fa 15360fi
8690e634
JK
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
15362$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 15363
c971b7fa 15364
c971b7fa 15365
c971b7fa 15366
8690e634
JK
15367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
15368$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
15369if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
15370 $as_echo_n "(cached) " >&6
15371else
c971b7fa 15372
8690e634
JK
15373 case "$host_os" in
15374 # Guess no on OSF/1.
15375 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
15376 # Guess yes otherwise.
15377 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
15378 esac
15379 if test $LOCALE_FR_UTF8 != none; then
15380 if test "$cross_compiling" = yes; then :
c971b7fa 15381 :
8690e634
JK
15382else
15383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15384/* end confdefs.h. */
15385
15386#include <locale.h>
15387#include <string.h>
15388/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15389 <wchar.h>.
15390 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15391 included before <wchar.h>. */
15392#include <stddef.h>
15393#include <stdio.h>
15394#include <time.h>
15395#include <wchar.h>
15396int main ()
15397{
15398 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15399 {
15400 mbstate_t state;
15401 wchar_t wc;
15402 int ret;
15403
15404 memset (&state, '\0', sizeof (mbstate_t));
15405 wc = (wchar_t) 0xBADFACE;
15406 mbrtowc (&wc, NULL, 5, &state);
15407 /* Check that wc was not modified. */
15408 if (wc != (wchar_t) 0xBADFACE)
15409 return 1;
15410 }
15411 return 0;
15412}
15413_ACEOF
15414if ac_fn_c_try_run "$LINENO"; then :
15415 gl_cv_func_mbrtowc_null_arg2=yes
15416else
15417 gl_cv_func_mbrtowc_null_arg2=no
15418fi
15419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15420 conftest.$ac_objext conftest.beam conftest.$ac_ext
15421fi
15422
15423 fi
15424
15425fi
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
15427$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
15428
15429
15430
15431
15432
15433
8690e634
JK
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
15435$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
15436if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
15437 $as_echo_n "(cached) " >&6
15438else
15439
15440 case "$host_os" in
15441 # Guess no on HP-UX, Solaris, native Windows.
15442 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
15443 # Guess yes otherwise.
15444 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
15445 esac
15446 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
15447 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
15448 if test "$cross_compiling" = yes; then :
c971b7fa 15449 :
8690e634
JK
15450else
15451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15452/* end confdefs.h. */
c971b7fa 15453
8690e634
JK
15454#include <locale.h>
15455#include <string.h>
15456/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15457 <wchar.h>.
15458 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15459 included before <wchar.h>. */
15460#include <stddef.h>
15461#include <stdio.h>
15462#include <time.h>
15463#include <wchar.h>
15464int main ()
15465{
15466 int result = 0;
15467 int found_some_locale = 0;
15468 /* This fails on Solaris. */
15469 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15470 {
15471 char input[] = "B\303\274\303\237er"; /* "Büßer" */
15472 mbstate_t state;
15473 wchar_t wc;
15474
15475 memset (&state, '\0', sizeof (mbstate_t));
15476 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15477 {
15478 input[1] = '\0';
15479 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
15480 result |= 1;
15481 }
15482 found_some_locale = 1;
15483 }
15484 /* This fails on HP-UX 11.11. */
15485 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15486 {
15487 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15488 mbstate_t state;
15489 wchar_t wc;
15490
15491 memset (&state, '\0', sizeof (mbstate_t));
15492 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15493 {
15494 input[1] = '\0';
15495 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
15496 result |= 2;
15497 }
15498 found_some_locale = 1;
15499 }
15500 /* This fails on native Windows. */
15501 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
15502 {
15503 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
15504 mbstate_t state;
15505 wchar_t wc;
15506
15507 memset (&state, '\0', sizeof (mbstate_t));
15508 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15509 {
15510 input[3] = '\0';
15511 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15512 result |= 4;
15513 }
15514 found_some_locale = 1;
15515 }
15516 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
15517 {
15518 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
15519 mbstate_t state;
15520 wchar_t wc;
15521
15522 memset (&state, '\0', sizeof (mbstate_t));
15523 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15524 {
15525 input[3] = '\0';
15526 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15527 result |= 8;
15528 }
15529 found_some_locale = 1;
15530 }
15531 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
15532 {
15533 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
15534 mbstate_t state;
15535 wchar_t wc;
15536
15537 memset (&state, '\0', sizeof (mbstate_t));
15538 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15539 {
15540 input[3] = '\0';
15541 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15542 result |= 16;
15543 }
15544 found_some_locale = 1;
15545 }
15546 return (found_some_locale ? result : 77);
15547}
15548_ACEOF
15549if ac_fn_c_try_run "$LINENO"; then :
15550 gl_cv_func_mbrtowc_retval=yes
15551else
15552 if test $? != 77; then
15553 gl_cv_func_mbrtowc_retval=no
15554 fi
c971b7fa 15555
8690e634
JK
15556fi
15557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15558 conftest.$ac_objext conftest.beam conftest.$ac_ext
15559fi
c971b7fa 15560
8690e634 15561 fi
c971b7fa 15562
8690e634
JK
15563fi
15564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
15565$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
15566
15567
15568
15569
8690e634
JK
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
15571$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
15572if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
c971b7fa
PA
15573 $as_echo_n "(cached) " >&6
15574else
8690e634
JK
15575
15576 case "$host_os" in
15577 # Guess no on Solaris 8 and 9.
15578 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
15579 # Guess yes otherwise.
15580 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
15581 esac
15582 if test $LOCALE_ZH_CN != none; then
15583 if test "$cross_compiling" = yes; then :
15584 :
c971b7fa
PA
15585else
15586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15587/* end confdefs.h. */
15588
8690e634 15589#include <locale.h>
c971b7fa 15590#include <string.h>
8690e634
JK
15591/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15592 <wchar.h>.
15593 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15594 included before <wchar.h>. */
15595#include <stddef.h>
15596#include <stdio.h>
15597#include <time.h>
15598#include <wchar.h>
15599int main ()
c971b7fa 15600{
8690e634
JK
15601 /* This fails on Solaris 8 and 9. */
15602 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 15603 {
8690e634
JK
15604 mbstate_t state;
15605 wchar_t wc;
c971b7fa 15606
8690e634
JK
15607 memset (&state, '\0', sizeof (mbstate_t));
15608 if (mbrtowc (&wc, "", 1, &state) != 0)
15609 return 1;
15610 }
c971b7fa
PA
15611 return 0;
15612}
15613_ACEOF
15614if ac_fn_c_try_run "$LINENO"; then :
8690e634 15615 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 15616else
8690e634 15617 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
15618fi
15619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15620 conftest.$ac_objext conftest.beam conftest.$ac_ext
15621fi
15622
8690e634
JK
15623 fi
15624
c971b7fa 15625fi
8690e634
JK
15626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
15627$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
15628
4a626d0a
PA
15629
15630
15631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
15632$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
15633if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then :
15634 $as_echo_n "(cached) " >&6
15635else
15636
15637 case "$host_os" in
15638 # Guess no on AIX and glibc systems.
15639 aix* | *-gnu*)
15640 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
15641 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
15642 esac
15643 if test "$cross_compiling" = yes; then :
15644 :
15645else
15646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15647/* end confdefs.h. */
15648
15649 #include <wchar.h>
15650 static wchar_t wc;
15651 static mbstate_t mbs;
15652 int
15653 main (void)
15654 {
49e4877c 15655 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
15656 }
15657_ACEOF
15658if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 15659 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
15660else
15661 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
15662fi
15663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15664 conftest.$ac_objext conftest.beam conftest.$ac_ext
15665fi
15666
15667
15668fi
15669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
15670$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
15671
49e4877c
PA
15672
15673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
15674$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
15675if test "${gl_cv_C_locale_sans_EILSEQ+set}" = set; then :
15676 $as_echo_n "(cached) " >&6
15677else
15678
15679 gl_cv_C_locale_sans_EILSEQ="guessing no"
15680
15681 if test "$cross_compiling" = yes; then :
15682 :
15683else
15684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15685/* end confdefs.h. */
15686#include <limits.h>
15687 #include <locale.h>
15688 #include <wchar.h>
15689
15690int
15691main ()
15692{
15693
15694 int i;
15695 char *locale = setlocale (LC_ALL, "C");
15696 if (! locale)
15697 return 1;
15698 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
15699 {
15700 char c = i;
15701 wchar_t wc;
15702 mbstate_t mbs = { 0, };
15703 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
15704 if (1 < ss)
15705 return 1;
15706 }
15707 return 0;
15708
15709 ;
15710 return 0;
15711}
15712_ACEOF
15713if ac_fn_c_try_run "$LINENO"; then :
15714 gl_cv_C_locale_sans_EILSEQ=yes
15715else
15716 gl_cv_C_locale_sans_EILSEQ=no
15717fi
15718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15719 conftest.$ac_objext conftest.beam conftest.$ac_ext
15720fi
15721
15722fi
15723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
15724$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
15725
8690e634
JK
15726 case "$gl_cv_func_mbrtowc_null_arg1" in
15727 *yes) ;;
15728 *)
15729$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
15730
15731 REPLACE_MBRTOWC=1
15732 ;;
15733 esac
15734 case "$gl_cv_func_mbrtowc_null_arg2" in
15735 *yes) ;;
15736 *)
15737$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
15738
15739 REPLACE_MBRTOWC=1
15740 ;;
15741 esac
15742 case "$gl_cv_func_mbrtowc_retval" in
15743 *yes) ;;
15744 *)
15745$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
15746
15747 REPLACE_MBRTOWC=1
15748 ;;
15749 esac
15750 case "$gl_cv_func_mbrtowc_nul_retval" in
15751 *yes) ;;
15752 *)
15753$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
15754
4a626d0a
PA
15755 REPLACE_MBRTOWC=1
15756 ;;
15757 esac
15758 case "$gl_cv_func_mbrtowc_empty_input" in
15759 *yes) ;;
15760 *)
15761$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
15762
49e4877c
PA
15763 REPLACE_MBRTOWC=1
15764 ;;
15765 esac
15766 case $gl_cv_C_locale_sans_EILSEQ in
15767 *yes) ;;
15768 *)
15769$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
15770
8690e634
JK
15771 REPLACE_MBRTOWC=1
15772 ;;
15773 esac
c971b7fa
PA
15774 fi
15775 fi
15776
a512b375 15777 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
c971b7fa 15778
c971b7fa 15779
c971b7fa
PA
15780
15781
15782
15783
15784
15785
8690e634
JK
15786 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
15787
15788
15789 :
c971b7fa 15790
a512b375 15791 fi
c971b7fa 15792
8690e634
JK
15793
15794
15795
15796
15797 GNULIB_MBRTOWC=1
15798
15799
15800
15801
15802
15803$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
c971b7fa 15816
c971b7fa 15817
8690e634 15818 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 15819
8690e634
JK
15820
15821
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
15823$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
15824if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
15825 $as_echo_n "(cached) " >&6
15826else
15827
15828 case "$host_os" in
15829 # Guess no on AIX and OSF/1.
15830 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
15831 # Guess yes otherwise.
15832 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
15833 esac
15834 if test $LOCALE_JA != none; then
15835 if test "$cross_compiling" = yes; then :
15836 :
c971b7fa
PA
15837else
15838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15839/* end confdefs.h. */
15840
8690e634
JK
15841#include <locale.h>
15842#include <string.h>
15843/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15844 <wchar.h>.
15845 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15846 included before <wchar.h>. */
15847#include <stddef.h>
15848#include <stdio.h>
15849#include <time.h>
15850#include <wchar.h>
15851int main ()
c971b7fa 15852{
8690e634 15853 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 15854 {
8690e634
JK
15855 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15856 mbstate_t state;
15857 wchar_t wc;
15858
15859 memset (&state, '\0', sizeof (mbstate_t));
15860 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15861 if (mbsinit (&state))
15862 return 1;
c971b7fa 15863 }
c971b7fa
PA
15864 return 0;
15865}
15866_ACEOF
15867if ac_fn_c_try_run "$LINENO"; then :
8690e634 15868 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 15869else
8690e634 15870 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
15871fi
15872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15873 conftest.$ac_objext conftest.beam conftest.$ac_ext
15874fi
15875
8690e634 15876 fi
c971b7fa
PA
15877
15878fi
8690e634
JK
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15880$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
15881
15882
c971b7fa
PA
15883
15884
8690e634
JK
15885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15886$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15887if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
15888 $as_echo_n "(cached) " >&6
15889else
8690e634
JK
15890
15891 case "$host_os" in
15892 # Guess no on Solaris 8.
15893 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15894 # Guess yes otherwise.
15895 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15896 esac
15897 if test $LOCALE_ZH_CN != none; then
15898 if test "$cross_compiling" = yes; then :
15899 :
15900else
c971b7fa
PA
15901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15902/* end confdefs.h. */
8690e634
JK
15903
15904#include <locale.h>
15905#include <stdlib.h>
15906#include <string.h>
15907/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15908 <wchar.h>.
15909 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15910 included before <wchar.h>. */
c971b7fa 15911#include <stddef.h>
8690e634
JK
15912#include <stdio.h>
15913#include <time.h>
15914#include <wchar.h>
15915int main ()
c971b7fa 15916{
8690e634
JK
15917 /* This fails on Solaris 8:
15918 mbrtowc returns 2, and sets wc to 0x00F0.
15919 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
15920 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15921 {
15922 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
15923 mbstate_t state;
15924 wchar_t wc;
15925
15926 memset (&state, '\0', sizeof (mbstate_t));
15927 if (mbrtowc (&wc, input + 3, 6, &state) != 4
15928 && mbtowc (&wc, input + 3, 6) == 4)
15929 return 1;
15930 }
c971b7fa
PA
15931 return 0;
15932}
15933_ACEOF
8690e634
JK
15934if ac_fn_c_try_run "$LINENO"; then :
15935 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 15936else
8690e634 15937 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 15938fi
8690e634
JK
15939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15940 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 15941fi
c971b7fa 15942
8690e634
JK
15943 fi
15944
15945fi
15946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
15947$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 15948
8690e634
JK
15949 REPLACE_MBSTATE_T=0
15950 case "$gl_cv_func_mbrtowc_incomplete_state" in
15951 *yes) ;;
15952 *) REPLACE_MBSTATE_T=1 ;;
15953 esac
15954 case "$gl_cv_func_mbrtowc_sanitycheck" in
15955 *yes) ;;
15956 *) REPLACE_MBSTATE_T=1 ;;
15957 esac
15958 else
15959 REPLACE_MBSTATE_T=1
c971b7fa
PA
15960 fi
15961
c971b7fa 15962
8690e634 15963
8690e634
JK
15964 if test $ac_cv_func_mbsinit = no; then
15965 HAVE_MBSINIT=0
15966 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
15967/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15968 <wchar.h>.
15969 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15970 included before <wchar.h>. */
15971#include <stddef.h>
15972#include <stdio.h>
15973#include <time.h>
15974#include <wchar.h>
15975
15976"
15977if test "x$ac_cv_have_decl_mbsinit" = x""yes; then :
15978 ac_have_decl=1
15979else
15980 ac_have_decl=0
c971b7fa 15981fi
c971b7fa 15982
8690e634
JK
15983cat >>confdefs.h <<_ACEOF
15984#define HAVE_DECL_MBSINIT $ac_have_decl
c971b7fa 15985_ACEOF
c971b7fa 15986
8690e634
JK
15987 if test $ac_cv_have_decl_mbsinit = yes; then
15988 REPLACE_MBSINIT=1
15989 fi
15990 else
15991 if test $REPLACE_MBSTATE_T = 1; then
15992 REPLACE_MBSINIT=1
15993 else
15994 case "$host_os" in
15995 mingw*) REPLACE_MBSINIT=1 ;;
15996 esac
15997 fi
15998 fi
c971b7fa 15999
a512b375 16000 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa
PA
16001
16002
16003
16004
16005
16006
16007
16008
8690e634 16009 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
c971b7fa
PA
16010
16011
8690e634 16012 :
c971b7fa 16013
a512b375 16014 fi
c971b7fa 16015
c971b7fa 16016
c971b7fa 16017
c971b7fa
PA
16018
16019
8690e634 16020 GNULIB_MBSINIT=1
c971b7fa 16021
c971b7fa
PA
16022
16023
16024
16025
8690e634 16026$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
c971b7fa
PA
16027
16028
c971b7fa 16029
c971b7fa 16030
c971b7fa
PA
16031
16032
16033
c971b7fa 16034
c971b7fa
PA
16035
16036
16037
16038
8690e634
JK
16039
16040 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa
PA
16041
16042
16043
8690e634
JK
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
16045$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
16046if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
16047 $as_echo_n "(cached) " >&6
16048else
c971b7fa 16049
8690e634
JK
16050 case "$host_os" in
16051 # Guess no on AIX and OSF/1.
16052 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
16053 # Guess yes otherwise.
16054 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
c971b7fa 16055 esac
8690e634
JK
16056 if test $LOCALE_JA != none; then
16057 if test "$cross_compiling" = yes; then :
16058 :
16059else
16060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 16061/* end confdefs.h. */
c971b7fa 16062
8690e634
JK
16063#include <locale.h>
16064#include <string.h>
16065/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16066 <wchar.h>.
16067 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16068 included before <wchar.h>. */
16069#include <stddef.h>
16070#include <stdio.h>
16071#include <time.h>
16072#include <wchar.h>
16073int main ()
16074{
16075 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
16076 {
16077 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
16078 mbstate_t state;
16079 wchar_t wc;
16080
16081 memset (&state, '\0', sizeof (mbstate_t));
16082 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
16083 if (mbsinit (&state))
16084 return 1;
16085 }
c971b7fa
PA
16086 return 0;
16087}
16088_ACEOF
8690e634
JK
16089if ac_fn_c_try_run "$LINENO"; then :
16090 gl_cv_func_mbrtowc_incomplete_state=yes
16091else
16092 gl_cv_func_mbrtowc_incomplete_state=no
16093fi
16094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16095 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 16096fi
c971b7fa 16097
8690e634 16098 fi
c971b7fa 16099
8690e634
JK
16100fi
16101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
16102$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 16103
8690e634
JK
16104
16105
16106
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
16108$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
16109if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
c971b7fa
PA
16110 $as_echo_n "(cached) " >&6
16111else
8690e634
JK
16112
16113 case "$host_os" in
16114 # Guess no on Solaris 8.
16115 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
16116 # Guess yes otherwise.
16117 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
16118 esac
16119 if test $LOCALE_ZH_CN != none; then
16120 if test "$cross_compiling" = yes; then :
16121 :
16122else
c971b7fa
PA
16123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16124/* end confdefs.h. */
c971b7fa 16125
8690e634
JK
16126#include <locale.h>
16127#include <stdlib.h>
16128#include <string.h>
16129/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16130 <wchar.h>.
16131 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16132 included before <wchar.h>. */
16133#include <stddef.h>
16134#include <stdio.h>
16135#include <time.h>
16136#include <wchar.h>
16137int main ()
c971b7fa 16138{
8690e634
JK
16139 /* This fails on Solaris 8:
16140 mbrtowc returns 2, and sets wc to 0x00F0.
16141 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
16142 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
16143 {
16144 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
16145 mbstate_t state;
16146 wchar_t wc;
16147
16148 memset (&state, '\0', sizeof (mbstate_t));
16149 if (mbrtowc (&wc, input + 3, 6, &state) != 4
16150 && mbtowc (&wc, input + 3, 6) == 4)
16151 return 1;
16152 }
c971b7fa
PA
16153 return 0;
16154}
16155_ACEOF
8690e634
JK
16156if ac_fn_c_try_run "$LINENO"; then :
16157 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 16158else
8690e634 16159 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 16160fi
8690e634
JK
16161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16162 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 16163fi
8690e634
JK
16164
16165 fi
16166
16167fi
16168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
16169$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
16170
16171 REPLACE_MBSTATE_T=0
16172 case "$gl_cv_func_mbrtowc_incomplete_state" in
16173 *yes) ;;
16174 *) REPLACE_MBSTATE_T=1 ;;
16175 esac
16176 case "$gl_cv_func_mbrtowc_sanitycheck" in
16177 *yes) ;;
16178 *) REPLACE_MBSTATE_T=1 ;;
16179 esac
c971b7fa 16180 else
8690e634 16181 REPLACE_MBSTATE_T=1
c971b7fa
PA
16182 fi
16183
16184
c971b7fa 16185
8690e634
JK
16186 if test $ac_cv_func_mbsrtowcs = no; then
16187 HAVE_MBSRTOWCS=0
16188 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
16189/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16190 <wchar.h>.
16191 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16192 included before <wchar.h>. */
16193#include <stddef.h>
16194#include <stdio.h>
16195#include <time.h>
16196#include <wchar.h>
16197
16198"
16199if test "x$ac_cv_have_decl_mbsrtowcs" = x""yes; then :
16200 ac_have_decl=1
c971b7fa 16201else
8690e634 16202 ac_have_decl=0
c971b7fa 16203fi
c971b7fa 16204
8690e634
JK
16205cat >>confdefs.h <<_ACEOF
16206#define HAVE_DECL_MBSRTOWCS $ac_have_decl
16207_ACEOF
c971b7fa 16208
8690e634
JK
16209 if test $ac_cv_have_decl_mbsrtowcs = yes; then
16210 REPLACE_MBSRTOWCS=1
16211 fi
c971b7fa 16212 else
8690e634
JK
16213 if test $REPLACE_MBSTATE_T = 1; then
16214 REPLACE_MBSRTOWCS=1
16215 else
c971b7fa 16216
8690e634
JK
16217
16218
16219
16220
16221
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
16223$as_echo_n "checking whether mbsrtowcs works... " >&6; }
16224if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
c971b7fa
PA
16225 $as_echo_n "(cached) " >&6
16226else
8690e634
JK
16227
16228 case "$host_os" in
16229 # Guess no on HP-UX, Solaris, mingw.
16230 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
16231 # Guess yes otherwise.
16232 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
16233 esac
16234 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
16235 if test "$cross_compiling" = yes; then :
16236 :
16237else
c971b7fa
PA
16238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16239/* end confdefs.h. */
c971b7fa 16240
8690e634
JK
16241#include <locale.h>
16242#include <string.h>
16243/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16244 <wchar.h>.
16245 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16246 included before <wchar.h>. */
16247#include <stddef.h>
16248#include <stdio.h>
16249#include <time.h>
16250#include <wchar.h>
16251int main ()
c971b7fa 16252{
8690e634
JK
16253 int result = 0;
16254 /* Test whether the function supports a NULL destination argument.
16255 This fails on native Windows. */
16256 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16257 {
16258 const char input[] = "\337er";
16259 const char *src = input;
16260 mbstate_t state;
c971b7fa 16261
8690e634
JK
16262 memset (&state, '\0', sizeof (mbstate_t));
16263 if (mbsrtowcs (NULL, &src, 1, &state) != 3
16264 || src != input)
16265 result |= 1;
16266 }
16267 /* Test whether the function works when started with a conversion state
16268 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
16269 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
16270 {
16271 const char input[] = "B\303\274\303\237er";
16272 mbstate_t state;
16273
16274 memset (&state, '\0', sizeof (mbstate_t));
16275 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
16276 if (!mbsinit (&state))
16277 {
16278 const char *src = input + 2;
16279 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
16280 result |= 2;
16281 }
16282 }
16283 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
16284 {
16285 const char input[] = "<\306\374\313\334\270\354>";
16286 mbstate_t state;
16287
16288 memset (&state, '\0', sizeof (mbstate_t));
16289 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
16290 if (!mbsinit (&state))
16291 {
16292 const char *src = input + 4;
16293 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
16294 result |= 4;
16295 }
16296 }
16297 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
16298 {
16299 const char input[] = "B\250\271\201\060\211\070er";
16300 mbstate_t state;
16301
16302 memset (&state, '\0', sizeof (mbstate_t));
16303 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
16304 if (!mbsinit (&state))
16305 {
16306 const char *src = input + 2;
16307 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
16308 result |= 8;
16309 }
16310 }
16311 return result;
c971b7fa
PA
16312}
16313_ACEOF
8690e634
JK
16314if ac_fn_c_try_run "$LINENO"; then :
16315 gl_cv_func_mbsrtowcs_works=yes
c971b7fa 16316else
8690e634 16317 gl_cv_func_mbsrtowcs_works=no
c971b7fa 16318fi
8690e634
JK
16319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16320 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 16321fi
8690e634
JK
16322
16323 fi
16324
16325fi
16326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
16327$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
16328
16329 case "$gl_cv_func_mbsrtowcs_works" in
16330 *yes) ;;
16331 *) REPLACE_MBSRTOWCS=1 ;;
16332 esac
16333 fi
c971b7fa
PA
16334 fi
16335
a512b375 16336 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa 16337
c971b7fa 16338
c971b7fa 16339
c971b7fa 16340
c971b7fa 16341
c971b7fa 16342
c971b7fa
PA
16343
16344
8690e634
JK
16345 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
16356
16357
16358 :
16359
a512b375 16360 fi
8690e634
JK
16361
16362
16363
16364
16365
16366 GNULIB_MBSRTOWCS=1
16367
16368
16369
16370
16371
16372$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
16373
16374
16375
16376
a512b375 16377 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
16378
16379
16380
16381
16382
16383
16384
16385
16386 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
16387
16388
16389 for ac_header in bp-sym.h
16390do :
16391 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
16392if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
16393 cat >>confdefs.h <<_ACEOF
16394#define HAVE_BP_SYM_H 1
16395_ACEOF
16396
16397fi
16398
16399done
16400
16401
a512b375 16402 fi
c971b7fa
PA
16403
16404
16405
16406
16407
16408 GNULIB_MEMCHR=1
16409
16410
16411
16412
16413
16414$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
16415
16416
16417
16418
16419
16420 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
16422$as_echo_n "checking whether memmem works in linear time... " >&6; }
16423if test "${gl_cv_func_memmem_works_fast+set}" = set; then :
16424 $as_echo_n "(cached) " >&6
16425else
16426 if test "$cross_compiling" = yes; then :
16427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16428/* end confdefs.h. */
16429
16430#include <features.h>
16431#ifdef __GNU_LIBRARY__
16432 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
16433 && !defined __UCLIBC__
16434 Lucky user
16435 #endif
16436#endif
16437#ifdef __CYGWIN__
16438 #include <cygwin/version.h>
16439 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
16440 Lucky user
16441 #endif
16442#endif
16443
16444_ACEOF
16445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16446 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108
TT
16447 gl_cv_func_memmem_works_fast="guessing yes"
16448else
16449 gl_cv_func_memmem_works_fast="guessing no"
16450fi
16451rm -f conftest*
16452
16453
16454else
16455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16456/* end confdefs.h. */
16457
16458#include <signal.h> /* for signal */
16459#include <string.h> /* for memmem */
16460#include <stdlib.h> /* for malloc */
16461#include <unistd.h> /* for alarm */
49e4877c 16462static void quit (int sig) { _exit (sig + 128); }
63ce7108
TT
16463
16464int
16465main ()
16466{
16467
16468 int result = 0;
16469 size_t m = 1000000;
16470 char *haystack = (char *) malloc (2 * m + 1);
16471 char *needle = (char *) malloc (m + 1);
16472 /* Failure to compile this test due to missing alarm is okay,
16473 since all such platforms (mingw) also lack memmem. */
16474 signal (SIGALRM, quit);
16475 alarm (5);
16476 /* Check for quadratic performance. */
16477 if (haystack && needle)
16478 {
16479 memset (haystack, 'A', 2 * m);
16480 haystack[2 * m] = 'B';
16481 memset (needle, 'A', m);
16482 needle[m] = 'B';
16483 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
16484 result |= 1;
16485 }
16486 return result;
16487
16488 ;
16489 return 0;
16490}
16491_ACEOF
16492if ac_fn_c_try_run "$LINENO"; then :
16493 gl_cv_func_memmem_works_fast=yes
16494else
16495 gl_cv_func_memmem_works_fast=no
16496fi
16497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16498 conftest.$ac_objext conftest.beam conftest.$ac_ext
16499fi
16500
16501
16502fi
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
16504$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
16505 case "$gl_cv_func_memmem_works_fast" in
16506 *yes) ;;
16507 *)
16508 REPLACE_MEMMEM=1
16509 ;;
16510 esac
16511 fi
16512
16513 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
16514
16515
16516
16517
16518
16519
16520
16521
16522 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
16523
16524 fi
16525
16526
16527
16528
16529 for ac_func in memmem
16530do :
16531 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
16532if test "x$ac_cv_func_memmem" = x""yes; then :
16533 cat >>confdefs.h <<_ACEOF
16534#define HAVE_MEMMEM 1
16535_ACEOF
16536
16537fi
16538done
16539
16540 if test $ac_cv_func_memmem = yes; then
16541 HAVE_MEMMEM=1
16542 else
16543 HAVE_MEMMEM=0
16544 fi
16545
16546 if test $ac_cv_have_decl_memmem = no; then
16547 HAVE_DECL_MEMMEM=0
16548 else
16549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16550$as_echo_n "checking whether memmem works... " >&6; }
16551if test "${gl_cv_func_memmem_works_always+set}" = set; then :
16552 $as_echo_n "(cached) " >&6
16553else
16554 if test "$cross_compiling" = yes; then :
16555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556/* end confdefs.h. */
16557
16558#ifdef __GNU_LIBRARY__
16559 #include <features.h>
16560 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16561 || __GLIBC_MINOR__ > 12)) \
16562 || (__GLIBC__ > 2)) \
16563 || defined __UCLIBC__
16564 Lucky user
16565 #endif
16566#elif defined __CYGWIN__
16567 #include <cygwin/version.h>
16568 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16569 Lucky user
16570 #endif
16571#else
16572 Lucky user
16573#endif
16574
16575_ACEOF
16576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16577 $EGREP "Lucky user" >/dev/null 2>&1; then :
16578 gl_cv_func_memmem_works_always="guessing yes"
16579else
16580 gl_cv_func_memmem_works_always="guessing no"
16581fi
16582rm -f conftest*
16583
16584
16585else
16586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16587/* end confdefs.h. */
16588
16589#include <string.h> /* for memmem */
16590#define P "_EF_BF_BD"
16591#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16592#define NEEDLE P P P P P
16593
16594int
16595main ()
16596{
16597
16598 int result = 0;
16599 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16600 result |= 1;
16601 /* Check for empty needle behavior. */
16602 {
16603 const char *haystack = "AAA";
16604 if (memmem (haystack, 3, NULL, 0) != haystack)
16605 result |= 2;
16606 }
16607 return result;
16608
16609 ;
16610 return 0;
16611}
16612_ACEOF
16613if ac_fn_c_try_run "$LINENO"; then :
16614 gl_cv_func_memmem_works_always=yes
16615else
16616 gl_cv_func_memmem_works_always=no
16617fi
16618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16619 conftest.$ac_objext conftest.beam conftest.$ac_ext
16620fi
16621
16622
16623fi
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16625$as_echo "$gl_cv_func_memmem_works_always" >&6; }
16626 case "$gl_cv_func_memmem_works_always" in
16627 *yes) ;;
16628 *)
16629 REPLACE_MEMMEM=1
16630 ;;
16631 esac
16632 fi
16633 :
16634
16635 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
16636
16637
16638
16639
16640
16641
16642
16643
16644 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
16645
16646 fi
16647
16648
16649
16650
16651
16652 GNULIB_MEMMEM=1
16653
16654
16655
16656
16657
16658$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
16659
16660
16661
16662
16663
16664
16665
16666
2196f55f
YQ
16667
16668
8424cc97
SM
16669
16670 for ac_func in rawmemchr
16671do :
16672 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
16673if test "x$ac_cv_func_rawmemchr" = x""yes; then :
16674 cat >>confdefs.h <<_ACEOF
16675#define HAVE_RAWMEMCHR 1
16676_ACEOF
16677
16678fi
16679done
16680
16681 if test $ac_cv_func_rawmemchr = no; then
16682 HAVE_RAWMEMCHR=0
16683 fi
16684
16685 if test $HAVE_RAWMEMCHR = 0; then
16686
16687
16688
16689
16690
16691
16692
16693
16694 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
16695
16696 :
16697 fi
16698
16699
16700
16701
16702
16703 GNULIB_RAWMEMCHR=1
16704
16705
16706
16707
16708
16709$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
16710
16711
16712
16713
16714
16715
2196f55f
YQ
16716 if test $ac_cv_func_readlink = no; then
16717 HAVE_READLINK=0
16718 else
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
16720$as_echo_n "checking whether readlink signature is correct... " >&6; }
16721if test "${gl_cv_decl_readlink_works+set}" = set; then :
16722 $as_echo_n "(cached) " >&6
16723else
16724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16725/* end confdefs.h. */
16726#include <unistd.h>
16727 /* Cause compilation failure if original declaration has wrong type. */
16728 ssize_t readlink (const char *, char *, size_t);
16729int
16730main ()
16731{
16732
16733 ;
16734 return 0;
16735}
16736_ACEOF
16737if ac_fn_c_try_compile "$LINENO"; then :
16738 gl_cv_decl_readlink_works=yes
16739else
16740 gl_cv_decl_readlink_works=no
16741fi
16742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16743fi
16744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
16745$as_echo "$gl_cv_decl_readlink_works" >&6; }
16746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
16747$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
16748if test "${gl_cv_func_readlink_works+set}" = set; then :
16749 $as_echo_n "(cached) " >&6
16750else
16751 # We have readlink, so assume ln -s works.
16752 ln -s conftest.no-such conftest.link
16753 ln -s conftest.link conftest.lnk2
16754 if test "$cross_compiling" = yes; then :
16755 case "$host_os" in
16756 # Guess yes on glibc systems.
16757 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
16758 # If we don't know, assume the worst.
16759 *) gl_cv_func_readlink_works="guessing no" ;;
16760 esac
16761
16762else
16763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764/* end confdefs.h. */
16765#include <unistd.h>
16766
16767int
16768main ()
16769{
16770char buf[20];
16771 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
16772 ;
16773 return 0;
16774}
16775_ACEOF
16776if ac_fn_c_try_run "$LINENO"; then :
16777 gl_cv_func_readlink_works=yes
16778else
16779 gl_cv_func_readlink_works=no
16780fi
16781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16782 conftest.$ac_objext conftest.beam conftest.$ac_ext
16783fi
16784
16785 rm -f conftest.link conftest.lnk2
16786fi
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
16788$as_echo "$gl_cv_func_readlink_works" >&6; }
16789 case "$gl_cv_func_readlink_works" in
16790 *yes)
16791 if test "$gl_cv_decl_readlink_works" != yes; then
16792 REPLACE_READLINK=1
16793 fi
16794 ;;
16795 *)
16796
16797$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
16798
16799 REPLACE_READLINK=1
16800 ;;
16801 esac
16802 fi
16803
16804 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
16805
16806
16807
16808
16809
16810
16811
16812
16813 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
16814
16815
16816 :
16817
16818 fi
16819
16820
16821
16822
16823
16824 GNULIB_READLINK=1
16825
16826
16827
16828
16829
16830$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
16831
16832
16833
16834
6a29c58e
YQ
16835
16836
16837
16838
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
16840$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
16841if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
16842 $as_echo_n "(cached) " >&6
16843else
16844 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16845 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16846 as_fn_error "cannot create temporary files" "$LINENO" 5
16847 # Assume that if we have lstat, we can also check symlinks.
16848 if test $ac_cv_func_lstat = yes; then
16849 ln -s conftest.f conftest.lnk
16850 fi
16851 if test "$cross_compiling" = yes; then :
16852 case "$host_os" in
16853 # Guess yes on glibc systems.
16854 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
16855 # If we don't know, assume the worst.
16856 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
16857 esac
16858
16859else
16860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861/* end confdefs.h. */
16862
16863# include <stdio.h>
16864# include <stdlib.h>
16865
16866int
16867main ()
16868{
16869int result = 0;
16870 if (rename ("conftest.f1", "conftest.f2/") == 0)
16871 result |= 1;
16872 if (rename ("conftest.d1", "conftest.d2/") != 0)
16873 result |= 2;
16874#if HAVE_LSTAT
16875 if (rename ("conftest.f", "conftest.lnk/") == 0)
16876 result |= 4;
16877#endif
16878 return result;
16879
16880 ;
16881 return 0;
16882}
16883_ACEOF
16884if ac_fn_c_try_run "$LINENO"; then :
16885 gl_cv_func_rename_slash_dst_works=yes
16886else
16887 gl_cv_func_rename_slash_dst_works=no
16888fi
16889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16890 conftest.$ac_objext conftest.beam conftest.$ac_ext
16891fi
16892
16893 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16894
16895fi
16896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
16897$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
16898 case "$gl_cv_func_rename_slash_dst_works" in
16899 *yes) ;;
16900 *)
16901 REPLACE_RENAME=1
16902
16903$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
16904
16905 ;;
16906 esac
16907
16908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
16909$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
16910if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
16911 $as_echo_n "(cached) " >&6
16912else
16913 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16914 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16915 as_fn_error "cannot create temporary files" "$LINENO" 5
16916 # Assume that if we have lstat, we can also check symlinks.
16917 if test $ac_cv_func_lstat = yes; then
16918 ln -s conftest.f conftest.lnk
16919 fi
16920 if test "$cross_compiling" = yes; then :
16921 case "$host_os" in
16922 # Guess yes on glibc systems.
16923 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
16924 # If we don't know, assume the worst.
16925 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
16926 esac
16927
16928else
16929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16930/* end confdefs.h. */
16931
16932# include <stdio.h>
16933# include <stdlib.h>
16934
16935int
16936main ()
16937{
16938int result = 0;
16939 if (rename ("conftest.f1/", "conftest.d3") == 0)
16940 result |= 1;
16941 if (rename ("conftest.d1/", "conftest.d2") != 0)
16942 result |= 2;
16943#if HAVE_LSTAT
16944 if (rename ("conftest.lnk/", "conftest.f") == 0)
16945 result |= 4;
16946#endif
16947 return result;
16948
16949 ;
16950 return 0;
16951}
16952_ACEOF
16953if ac_fn_c_try_run "$LINENO"; then :
16954 gl_cv_func_rename_slash_src_works=yes
16955else
16956 gl_cv_func_rename_slash_src_works=no
16957fi
16958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16959 conftest.$ac_objext conftest.beam conftest.$ac_ext
16960fi
16961
16962 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16963
16964fi
16965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
16966$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
16967 case "$gl_cv_func_rename_slash_src_works" in
16968 *yes) ;;
16969 *)
16970 REPLACE_RENAME=1
16971
16972$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
16973
16974 ;;
16975 esac
16976
16977
16978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
16979$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
16980if test "${gl_cv_func_rename_link_works+set}" = set; then :
16981 $as_echo_n "(cached) " >&6
16982else
16983 if test $ac_cv_func_link = yes; then
16984 rm -rf conftest.f conftest.f1
16985 if touch conftest.f && ln conftest.f conftest.f1 &&
16986 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
16987 if test "$cross_compiling" = yes; then :
16988 case "$host_os" in
16989 # Guess yes on glibc systems.
16990 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
16991 # If we don't know, assume the worst.
16992 *) gl_cv_func_rename_link_works="guessing no" ;;
16993 esac
16994
16995else
16996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16997/* end confdefs.h. */
16998
16999# include <stdio.h>
17000# include <stdlib.h>
17001# include <unistd.h>
17002
17003int
17004main ()
17005{
17006int result = 0;
17007 if (rename ("conftest.f", "conftest.f1"))
17008 result |= 1;
17009 if (unlink ("conftest.f1"))
17010 result |= 2;
17011 if (rename ("conftest.f", "conftest.f"))
17012 result |= 4;
17013 if (rename ("conftest.f1", "conftest.f1") == 0)
17014 result |= 8;
17015 return result;
17016
17017 ;
17018 return 0;
17019}
17020_ACEOF
17021if ac_fn_c_try_run "$LINENO"; then :
17022 gl_cv_func_rename_link_works=yes
17023else
17024 gl_cv_func_rename_link_works=no
17025fi
17026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17027 conftest.$ac_objext conftest.beam conftest.$ac_ext
17028fi
17029
17030 else
17031 gl_cv_func_rename_link_works="guessing no"
17032 fi
17033 rm -rf conftest.f conftest.f1
17034 else
17035 gl_cv_func_rename_link_works=yes
17036 fi
17037
17038fi
17039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
17040$as_echo "$gl_cv_func_rename_link_works" >&6; }
17041 case "$gl_cv_func_rename_link_works" in
17042 *yes) ;;
17043 *)
17044 REPLACE_RENAME=1
17045
17046$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
17047
17048 ;;
17049 esac
17050
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
17052$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
17053if test "${gl_cv_func_rename_dest_works+set}" = set; then :
17054 $as_echo_n "(cached) " >&6
17055else
17056 rm -rf conftest.f conftest.d1 conftest.d2
17057 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
17058 as_fn_error "cannot create temporary files" "$LINENO" 5
17059 if test "$cross_compiling" = yes; then :
17060 case "$host_os" in
17061 # Guess yes on glibc systems.
17062 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
17063 # If we don't know, assume the worst.
17064 *) gl_cv_func_rename_dest_works="guessing no" ;;
17065 esac
17066
17067else
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069/* end confdefs.h. */
17070
17071# include <stdio.h>
17072# include <stdlib.h>
17073
17074int
17075main ()
17076{
17077int result = 0;
17078 if (rename ("conftest.d1", "conftest.d2") != 0)
17079 result |= 1;
17080 if (rename ("conftest.d2", "conftest.f") == 0)
17081 result |= 2;
17082 return result;
17083
17084 ;
17085 return 0;
17086}
17087_ACEOF
17088if ac_fn_c_try_run "$LINENO"; then :
17089 gl_cv_func_rename_dest_works=yes
17090else
17091 gl_cv_func_rename_dest_works=no
17092fi
17093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17094 conftest.$ac_objext conftest.beam conftest.$ac_ext
17095fi
17096
17097 rm -rf conftest.f conftest.d1 conftest.d2
17098
17099fi
17100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
17101$as_echo "$gl_cv_func_rename_dest_works" >&6; }
17102 case "$gl_cv_func_rename_dest_works" in
17103 *yes) ;;
17104 *)
17105 REPLACE_RENAME=1
17106
17107$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
17108
17109 ;;
17110 esac
17111
17112 if test $REPLACE_RENAME = 1; then
17113
17114
17115
17116
17117
17118
17119
17120
17121 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
17122
17123 fi
17124
17125
17126
17127
17128
17129 GNULIB_RENAME=1
17130
17131
17132
17133
17134
17135$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
17136
17137
17138
17139
17140
17141
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
17143$as_echo_n "checking whether rmdir works... " >&6; }
17144if test "${gl_cv_func_rmdir_works+set}" = set; then :
17145 $as_echo_n "(cached) " >&6
17146else
17147 mkdir conftest.dir
17148 touch conftest.file
17149 if test "$cross_compiling" = yes; then :
17150 case "$host_os" in
17151 # Guess yes on glibc systems.
17152 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
17153 # If we don't know, assume the worst.
17154 *) gl_cv_func_rmdir_works="guessing no" ;;
17155 esac
17156
17157else
17158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17159/* end confdefs.h. */
17160#include <stdio.h>
17161 #include <errno.h>
17162 #if HAVE_UNISTD_H
17163 # include <unistd.h>
17164 #else /* on Windows with MSVC */
17165 # include <direct.h>
17166 #endif
17167
17168int
17169main ()
17170{
17171int result = 0;
17172 if (!rmdir ("conftest.file/"))
17173 result |= 1;
17174 else if (errno != ENOTDIR)
17175 result |= 2;
17176 if (!rmdir ("conftest.dir/./"))
17177 result |= 4;
17178 return result;
17179
17180 ;
17181 return 0;
17182}
17183_ACEOF
17184if ac_fn_c_try_run "$LINENO"; then :
17185 gl_cv_func_rmdir_works=yes
17186else
17187 gl_cv_func_rmdir_works=no
17188fi
17189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17190 conftest.$ac_objext conftest.beam conftest.$ac_ext
17191fi
17192
17193 rm -rf conftest.dir conftest.file
17194fi
17195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
17196$as_echo "$gl_cv_func_rmdir_works" >&6; }
17197 case "$gl_cv_func_rmdir_works" in
17198 *yes) ;;
17199 *)
17200 REPLACE_RMDIR=1
17201 ;;
17202 esac
17203
17204 if test $REPLACE_RMDIR = 1; then
17205
17206
17207
17208
17209
17210
17211
17212
17213 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
17214
17215 fi
17216
17217
17218
17219
17220
17221 GNULIB_RMDIR=1
17222
17223
17224
17225
17226
17227$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
17228
17229
17230
17231
0750520d 17232
3d99e817
AK
17233 if test $ac_cv_func_setenv = no; then
17234 HAVE_SETENV=0
17235 else
17236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
17237$as_echo_n "checking whether setenv validates arguments... " >&6; }
17238if test "${gl_cv_func_setenv_works+set}" = set; then :
17239 $as_echo_n "(cached) " >&6
17240else
17241 if test "$cross_compiling" = yes; then :
17242 case "$host_os" in
17243 # Guess yes on glibc systems.
17244 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
17245 # If we don't know, assume the worst.
17246 *) gl_cv_func_setenv_works="guessing no" ;;
17247 esac
17248
17249else
17250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17251/* end confdefs.h. */
17252
17253 #include <stdlib.h>
17254 #include <errno.h>
17255 #include <string.h>
17256
17257int
17258main ()
17259{
17260
17261 int result = 0;
17262 {
17263 if (setenv ("", "", 0) != -1)
17264 result |= 1;
17265 else if (errno != EINVAL)
17266 result |= 2;
17267 }
17268 {
17269 if (setenv ("a", "=", 1) != 0)
17270 result |= 4;
17271 else if (strcmp (getenv ("a"), "=") != 0)
17272 result |= 8;
17273 }
17274 return result;
17275
17276 ;
17277 return 0;
17278}
17279_ACEOF
17280if ac_fn_c_try_run "$LINENO"; then :
17281 gl_cv_func_setenv_works=yes
17282else
17283 gl_cv_func_setenv_works=no
17284fi
17285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17286 conftest.$ac_objext conftest.beam conftest.$ac_ext
17287fi
17288
17289fi
17290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
17291$as_echo "$gl_cv_func_setenv_works" >&6; }
17292 case "$gl_cv_func_setenv_works" in
17293 *yes) ;;
17294 *)
17295 REPLACE_SETENV=1
17296 ;;
17297 esac
17298 fi
17299
17300 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
17301
17302
17303
17304
17305
17306
17307
17308
17309 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
17310
17311 fi
17312
17313
17314
17315
17316
17317 GNULIB_SETENV=1
17318
17319
17320
17321
17322
17323$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
17324
17325
17326
17327
17328
0750520d
PA
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338 if test $gl_cv_have_include_next = yes; then
17339 gl_cv_next_signal_h='<'signal.h'>'
17340 else
17341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
17342$as_echo_n "checking absolute name of <signal.h>... " >&6; }
17343if test "${gl_cv_next_signal_h+set}" = set; then :
17344 $as_echo_n "(cached) " >&6
17345else
17346
17347
17348
17349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17350/* end confdefs.h. */
17351#include <signal.h>
17352_ACEOF
17353 case "$host_os" in
17354 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17355 *) gl_absname_cpp="$ac_cpp" ;;
17356 esac
17357
17358 case "$host_os" in
17359 mingw*)
17360 gl_dirsep_regex='[/\\]'
17361 ;;
17362 *)
17363 gl_dirsep_regex='\/'
17364 ;;
17365 esac
17366 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17367 gl_header_literal_regex=`echo 'signal.h' \
17368 | sed -e "$gl_make_literal_regex_sed"`
17369 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17370 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17371 s|^/[^/]|//&|
17372 p
17373 q
17374 }'
17375
17376 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17377 sed -n "$gl_absolute_header_sed"`
17378
17379 gl_header=$gl_cv_absolute_signal_h
17380 gl_cv_next_signal_h='"'$gl_header'"'
17381
17382
17383fi
17384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
17385$as_echo "$gl_cv_next_signal_h" >&6; }
17386 fi
17387 NEXT_SIGNAL_H=$gl_cv_next_signal_h
17388
17389 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17390 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17391 gl_next_as_first_directive='<'signal.h'>'
17392 else
17393 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17394 gl_next_as_first_directive=$gl_cv_next_signal_h
17395 fi
17396 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
17397
17398
17399
17400
17401
17402# AIX declares sig_atomic_t to already include volatile, and C89 compilers
17403# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
17404 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
17405#include <signal.h>
17406
17407"
17408if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
17409
17410else
17411 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
17412fi
17413
17414
17415
17416
17417
17418
17419
17420 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
17421#include <signal.h>
17422
17423"
17424if test "x$ac_cv_type_sighandler_t" = x""yes; then :
17425
17426else
17427 HAVE_SIGHANDLER_T=0
17428fi
17429
17430
17431
17432 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
17433 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17435$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17436if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17437 $as_echo_n "(cached) " >&6
17438else
17439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17440/* end confdefs.h. */
17441#include <signal.h>
17442
17443int
17444main ()
17445{
17446#undef $gl_func
17447 (void) $gl_func;
17448 ;
17449 return 0;
17450}
17451_ACEOF
17452if ac_fn_c_try_compile "$LINENO"; then :
17453 eval "$as_gl_Symbol=yes"
17454else
17455 eval "$as_gl_Symbol=no"
17456fi
17457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17458fi
17459eval ac_res=\$$as_gl_Symbol
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17461$as_echo "$ac_res" >&6; }
17462 eval as_val=\$$as_gl_Symbol
17463 if test "x$as_val" = x""yes; then :
17464 cat >>confdefs.h <<_ACEOF
17465#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17466_ACEOF
17467
17468 eval ac_cv_have_decl_$gl_func=yes
17469fi
17470 done
17471
17472
17473
63ce7108
TT
17474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
17475$as_echo_n "checking for ssize_t... " >&6; }
17476if test "${gt_cv_ssize_t+set}" = set; then :
17477 $as_echo_n "(cached) " >&6
17478else
17479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17480/* end confdefs.h. */
17481#include <sys/types.h>
17482int
17483main ()
17484{
17485int x = sizeof (ssize_t *) + sizeof (ssize_t);
17486 return !x;
17487 ;
17488 return 0;
17489}
17490_ACEOF
17491if ac_fn_c_try_compile "$LINENO"; then :
17492 gt_cv_ssize_t=yes
17493else
17494 gt_cv_ssize_t=no
17495fi
17496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17497fi
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
17499$as_echo "$gt_cv_ssize_t" >&6; }
17500 if test $gt_cv_ssize_t = no; then
17501
17502$as_echo "#define ssize_t int" >>confdefs.h
17503
17504 fi
17505
17506
17507
17508
2196f55f
YQ
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
17510$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
17511if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
17512 $as_echo_n "(cached) " >&6
17513else
17514 if test "$cross_compiling" = yes; then :
17515 case $host_os in
17516 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
17517 *) gl_cv_func_stat_dir_slash="guessing yes";;
17518 esac
17519else
17520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17521/* end confdefs.h. */
17522#include <sys/stat.h>
17523
17524int
17525main ()
17526{
17527struct stat st; return stat (".", &st) != stat ("./", &st);
17528 ;
17529 return 0;
17530}
17531_ACEOF
17532if ac_fn_c_try_run "$LINENO"; then :
17533 gl_cv_func_stat_dir_slash=yes
17534else
17535 gl_cv_func_stat_dir_slash=no
17536fi
17537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17538 conftest.$ac_objext conftest.beam conftest.$ac_ext
17539fi
17540
17541fi
17542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
17543$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
17545$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
17546if test "${gl_cv_func_stat_file_slash+set}" = set; then :
17547 $as_echo_n "(cached) " >&6
17548else
17549 touch conftest.tmp
17550 # Assume that if we have lstat, we can also check symlinks.
17551 if test $ac_cv_func_lstat = yes; then
17552 ln -s conftest.tmp conftest.lnk
17553 fi
17554 if test "$cross_compiling" = yes; then :
17555 case "$host_os" in
17556 # Guess yes on glibc systems.
17557 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
17558 # If we don't know, assume the worst.
17559 *) gl_cv_func_stat_file_slash="guessing no" ;;
17560 esac
17561
17562else
17563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17564/* end confdefs.h. */
17565#include <sys/stat.h>
17566
17567int
17568main ()
17569{
17570int result = 0;
17571 struct stat st;
17572 if (!stat ("conftest.tmp/", &st))
17573 result |= 1;
17574#if HAVE_LSTAT
17575 if (!stat ("conftest.lnk/", &st))
17576 result |= 2;
17577#endif
17578 return result;
17579
17580 ;
17581 return 0;
17582}
17583_ACEOF
17584if ac_fn_c_try_run "$LINENO"; then :
17585 gl_cv_func_stat_file_slash=yes
17586else
17587 gl_cv_func_stat_file_slash=no
17588fi
17589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17590 conftest.$ac_objext conftest.beam conftest.$ac_ext
17591fi
17592
17593 rm -f conftest.tmp conftest.lnk
17594fi
17595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
17596$as_echo "$gl_cv_func_stat_file_slash" >&6; }
17597 case $gl_cv_func_stat_dir_slash in
17598 *no) REPLACE_STAT=1
17599
17600$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
17601;;
17602 esac
17603 case $gl_cv_func_stat_file_slash in
17604 *no) REPLACE_STAT=1
17605
17606$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
17607;;
17608 esac
17609
17610 if test $REPLACE_STAT = 1; then
17611
17612
17613
17614
17615
17616
17617
17618
17619 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
17620
17621 :
17622 fi
17623
17624
17625
17626
17627
17628 GNULIB_STAT=1
17629
17630
17631
17632
17633
17634$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
17635
17636
17637
17638
17639
17640
63ce7108
TT
17641 # Define two additional variables used in the Makefile substitution.
17642
17643 if test "$ac_cv_header_stdbool_h" = yes; then
17644 STDBOOL_H=''
17645 else
17646 STDBOOL_H='stdbool.h'
17647 fi
17648
17649 if test -n "$STDBOOL_H"; then
17650 GL_GENERATE_STDBOOL_H_TRUE=
17651 GL_GENERATE_STDBOOL_H_FALSE='#'
17652else
17653 GL_GENERATE_STDBOOL_H_TRUE='#'
17654 GL_GENERATE_STDBOOL_H_FALSE=
17655fi
17656
17657
17658 if test "$ac_cv_type__Bool" = yes; then
17659 HAVE__BOOL=1
17660 else
17661 HAVE__BOOL=0
17662 fi
17663
17664
17665
17666
17667
17668 STDDEF_H=
4a626d0a
PA
17669 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
17670
17671"
17672if test "x$ac_cv_type_max_align_t" = x""yes; then :
17673
17674else
17675 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
17676fi
17677
63ce7108
TT
17678 if test $gt_cv_c_wchar_t = no; then
17679 HAVE_WCHAR_T=0
17680 STDDEF_H=stddef.h
17681 fi
17682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
17683$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
17684if test "${gl_cv_decl_null_works+set}" = set; then :
17685 $as_echo_n "(cached) " >&6
17686else
17687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17688/* end confdefs.h. */
17689#include <stddef.h>
17690 int test[2 * (sizeof NULL == sizeof (void *)) -1];
17691
17692int
17693main ()
17694{
17695
17696 ;
17697 return 0;
17698}
17699_ACEOF
17700if ac_fn_c_try_compile "$LINENO"; then :
17701 gl_cv_decl_null_works=yes
17702else
17703 gl_cv_decl_null_works=no
17704fi
17705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17706fi
17707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
17708$as_echo "$gl_cv_decl_null_works" >&6; }
17709 if test $gl_cv_decl_null_works = no; then
17710 REPLACE_NULL=1
17711 STDDEF_H=stddef.h
17712 fi
17713
17714 if test -n "$STDDEF_H"; then
17715 GL_GENERATE_STDDEF_H_TRUE=
17716 GL_GENERATE_STDDEF_H_FALSE='#'
17717else
17718 GL_GENERATE_STDDEF_H_TRUE='#'
17719 GL_GENERATE_STDDEF_H_FALSE=
17720fi
17721
17722 if test -n "$STDDEF_H"; then
17723
17724
17725
17726
17727
17728
17729
17730
17731 if test $gl_cv_have_include_next = yes; then
17732 gl_cv_next_stddef_h='<'stddef.h'>'
17733 else
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
17735$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
17736if test "${gl_cv_next_stddef_h+set}" = set; then :
17737 $as_echo_n "(cached) " >&6
17738else
17739
4a626d0a
PA
17740
17741
17742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
17743/* end confdefs.h. */
17744#include <stddef.h>
63ce7108 17745_ACEOF
4a626d0a
PA
17746 case "$host_os" in
17747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17748 *) gl_absname_cpp="$ac_cpp" ;;
17749 esac
63ce7108 17750
4a626d0a
PA
17751 case "$host_os" in
17752 mingw*)
17753 gl_dirsep_regex='[/\\]'
17754 ;;
17755 *)
17756 gl_dirsep_regex='\/'
17757 ;;
17758 esac
17759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17760 gl_header_literal_regex=`echo 'stddef.h' \
17761 | sed -e "$gl_make_literal_regex_sed"`
17762 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17763 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17764 s|^/[^/]|//&|
17765 p
17766 q
17767 }'
63ce7108 17768
4a626d0a
PA
17769 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17770 sed -n "$gl_absolute_header_sed"`
17771
17772 gl_header=$gl_cv_absolute_stddef_h
17773 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
17774
17775
17776fi
17777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17778$as_echo "$gl_cv_next_stddef_h" >&6; }
17779 fi
17780 NEXT_STDDEF_H=$gl_cv_next_stddef_h
17781
17782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17784 gl_next_as_first_directive='<'stddef.h'>'
17785 else
17786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17787 gl_next_as_first_directive=$gl_cv_next_stddef_h
17788 fi
17789 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17790
17791
17792
17793
17794 fi
17795
17796
17797
17798
49e4877c 17799 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
17800
17801
17802
98399780
YQ
17803
17804
17805
17806
17807
4a626d0a
PA
17808
17809
6a29c58e
YQ
17810 if test $gl_cv_have_include_next = yes; then
17811 gl_cv_next_stdio_h='<'stdio.h'>'
17812 else
17813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
17814$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
17815if test "${gl_cv_next_stdio_h+set}" = set; then :
17816 $as_echo_n "(cached) " >&6
17817else
17818
4a626d0a
PA
17819
17820
17821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
17822/* end confdefs.h. */
17823#include <stdio.h>
6a29c58e 17824_ACEOF
4a626d0a
PA
17825 case "$host_os" in
17826 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17827 *) gl_absname_cpp="$ac_cpp" ;;
17828 esac
17829
17830 case "$host_os" in
17831 mingw*)
17832 gl_dirsep_regex='[/\\]'
17833 ;;
17834 *)
17835 gl_dirsep_regex='\/'
17836 ;;
17837 esac
17838 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17839 gl_header_literal_regex=`echo 'stdio.h' \
17840 | sed -e "$gl_make_literal_regex_sed"`
17841 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17842 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17843 s|^/[^/]|//&|
17844 p
17845 q
17846 }'
6a29c58e 17847
4a626d0a
PA
17848 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17849 sed -n "$gl_absolute_header_sed"`
6a29c58e 17850
4a626d0a
PA
17851 gl_header=$gl_cv_absolute_stdio_h
17852 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
17853
17854
17855fi
17856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
17857$as_echo "$gl_cv_next_stdio_h" >&6; }
17858 fi
17859 NEXT_STDIO_H=$gl_cv_next_stdio_h
17860
17861 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17862 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17863 gl_next_as_first_directive='<'stdio.h'>'
17864 else
17865 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17866 gl_next_as_first_directive=$gl_cv_next_stdio_h
17867 fi
17868 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
17869
17870
17871
17872
17873
4a626d0a
PA
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
17875$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
17876if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then :
17877 $as_echo_n "(cached) " >&6
17878else
17879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17880/* end confdefs.h. */
17881
17882 #define __STDC_FORMAT_MACROS 1
17883 #include <stdio.h>
17884 #include <inttypes.h>
17885 /* For non-mingw systems, compilation will trivially succeed.
17886 For mingw, compilation will succeed for older mingw (system
17887 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
17888 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
17889 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
17890 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
17891 #endif
17892
17893int
17894main ()
17895{
17896
17897 ;
17898 return 0;
17899}
17900_ACEOF
17901if ac_fn_c_try_compile "$LINENO"; then :
17902 gl_cv_func_printf_attribute_flavor=system
17903else
17904 gl_cv_func_printf_attribute_flavor=gnu
17905fi
17906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17907fi
17908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
17909$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
17910 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
17911
17912$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
17913
17914 fi
17915
6a29c58e
YQ
17916 GNULIB_FSCANF=1
17917
17918
17919cat >>confdefs.h <<_ACEOF
17920#define GNULIB_FSCANF 1
17921_ACEOF
17922
17923
17924 GNULIB_SCANF=1
17925
17926
17927cat >>confdefs.h <<_ACEOF
17928#define GNULIB_SCANF 1
17929_ACEOF
17930
17931
17932 GNULIB_FGETC=1
17933 GNULIB_GETC=1
17934 GNULIB_GETCHAR=1
17935 GNULIB_FGETS=1
17936 GNULIB_FREAD=1
17937
17938
17939 GNULIB_FPRINTF=1
17940 GNULIB_PRINTF=1
17941 GNULIB_VFPRINTF=1
17942 GNULIB_VPRINTF=1
17943 GNULIB_FPUTC=1
17944 GNULIB_PUTC=1
17945 GNULIB_PUTCHAR=1
17946 GNULIB_FPUTS=1
17947 GNULIB_PUTS=1
17948 GNULIB_FWRITE=1
17949
17950
17951
17952
17953 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
17954 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17956$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17957if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
17958 $as_echo_n "(cached) " >&6
17959else
17960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17961/* end confdefs.h. */
17962#include <stdio.h>
17963
17964int
17965main ()
17966{
17967#undef $gl_func
17968 (void) $gl_func;
17969 ;
17970 return 0;
17971}
17972_ACEOF
17973if ac_fn_c_try_compile "$LINENO"; then :
17974 eval "$as_gl_Symbol=yes"
17975else
17976 eval "$as_gl_Symbol=no"
17977fi
17978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17979fi
17980eval ac_res=\$$as_gl_Symbol
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17982$as_echo "$ac_res" >&6; }
17983 eval as_val=\$$as_gl_Symbol
17984 if test "x$as_val" = x""yes; then :
17985 cat >>confdefs.h <<_ACEOF
17986#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17987_ACEOF
17988
17989 eval ac_cv_have_decl_$gl_func=yes
17990fi
17991 done
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
98399780
YQ
18004 if test $gl_cv_have_include_next = yes; then
18005 gl_cv_next_stdlib_h='<'stdlib.h'>'
18006 else
18007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
18008$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
18009if test "${gl_cv_next_stdlib_h+set}" = set; then :
18010 $as_echo_n "(cached) " >&6
18011else
18012
4a626d0a
PA
18013
18014
18015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
18016/* end confdefs.h. */
18017#include <stdlib.h>
98399780 18018_ACEOF
4a626d0a
PA
18019 case "$host_os" in
18020 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18021 *) gl_absname_cpp="$ac_cpp" ;;
18022 esac
18023
18024 case "$host_os" in
18025 mingw*)
18026 gl_dirsep_regex='[/\\]'
18027 ;;
18028 *)
18029 gl_dirsep_regex='\/'
18030 ;;
18031 esac
18032 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18033 gl_header_literal_regex=`echo 'stdlib.h' \
18034 | sed -e "$gl_make_literal_regex_sed"`
18035 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18036 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18037 s|^/[^/]|//&|
18038 p
18039 q
18040 }'
98399780 18041
4a626d0a
PA
18042 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18043 sed -n "$gl_absolute_header_sed"`
98399780 18044
4a626d0a
PA
18045 gl_header=$gl_cv_absolute_stdlib_h
18046 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
18047
18048
18049fi
18050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
18051$as_echo "$gl_cv_next_stdlib_h" >&6; }
18052 fi
18053 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
18054
18055 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18056 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18057 gl_next_as_first_directive='<'stdlib.h'>'
18058 else
18059 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18060 gl_next_as_first_directive=$gl_cv_next_stdlib_h
18061 fi
18062 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
18063
18064
18065
18066
18067
18068
4c62b19f 18069 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
98399780
YQ
18070 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18072$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18073if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
18074 $as_echo_n "(cached) " >&6
18075else
18076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18077/* end confdefs.h. */
18078#include <stdlib.h>
18079#if HAVE_SYS_LOADAVG_H
18080# include <sys/loadavg.h>
18081#endif
18082#if HAVE_RANDOM_H
18083# include <random.h>
18084#endif
18085
18086int
18087main ()
18088{
18089#undef $gl_func
18090 (void) $gl_func;
18091 ;
18092 return 0;
18093}
18094_ACEOF
18095if ac_fn_c_try_compile "$LINENO"; then :
18096 eval "$as_gl_Symbol=yes"
18097else
18098 eval "$as_gl_Symbol=no"
18099fi
18100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18101fi
18102eval ac_res=\$$as_gl_Symbol
18103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18104$as_echo "$ac_res" >&6; }
18105 eval as_val=\$$as_gl_Symbol
18106 if test "x$as_val" = x""yes; then :
18107 cat >>confdefs.h <<_ACEOF
18108#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18109_ACEOF
18110
18111 eval ac_cv_have_decl_$gl_func=yes
18112fi
18113 done
18114
18115
18116
18117
18118
18119
8424cc97
SM
18120 for ac_func in strchrnul
18121do :
18122 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
18123if test "x$ac_cv_func_strchrnul" = x""yes; then :
18124 cat >>confdefs.h <<_ACEOF
18125#define HAVE_STRCHRNUL 1
18126_ACEOF
18127
18128fi
18129done
18130
18131 if test $ac_cv_func_strchrnul = no; then
18132 HAVE_STRCHRNUL=0
18133 else
18134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
18135$as_echo_n "checking whether strchrnul works... " >&6; }
18136if test "${gl_cv_func_strchrnul_works+set}" = set; then :
18137 $as_echo_n "(cached) " >&6
18138else
18139 if test "$cross_compiling" = yes; then :
18140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18141/* end confdefs.h. */
18142
18143#if defined __CYGWIN__
18144 #include <cygwin/version.h>
18145 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
18146 Lucky user
18147 #endif
18148#else
18149 Lucky user
18150#endif
18151
18152_ACEOF
18153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18154 $EGREP "Lucky user" >/dev/null 2>&1; then :
18155 gl_cv_func_strchrnul_works="guessing yes"
18156else
18157 gl_cv_func_strchrnul_works="guessing no"
18158fi
18159rm -f conftest*
18160
18161
18162else
18163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18164/* end confdefs.h. */
18165
18166#include <string.h> /* for strchrnul */
18167
18168int
18169main ()
18170{
18171const char *buf = "a";
18172 return strchrnul (buf, 'b') != buf + 1;
18173
18174 ;
18175 return 0;
18176}
18177_ACEOF
18178if ac_fn_c_try_run "$LINENO"; then :
18179 gl_cv_func_strchrnul_works=yes
18180else
18181 gl_cv_func_strchrnul_works=no
18182fi
18183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18184 conftest.$ac_objext conftest.beam conftest.$ac_ext
18185fi
18186
18187
18188fi
18189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
18190$as_echo "$gl_cv_func_strchrnul_works" >&6; }
18191 case "$gl_cv_func_strchrnul_works" in
18192 *yes) ;;
18193 *) REPLACE_STRCHRNUL=1 ;;
18194 esac
18195 fi
18196
18197 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
18198
18199
18200
18201
18202
18203
18204
18205
18206 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
18207
18208 :
18209 fi
18210
18211
18212
18213
18214
18215 GNULIB_STRCHRNUL=1
18216
18217
18218
18219
18220
18221$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
18222
18223
18224
18225
18226
18227
18228
98399780 18229
63ce7108
TT
18230 if test $REPLACE_STRSTR = 0; then
18231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
18232$as_echo_n "checking whether strstr works in linear time... " >&6; }
18233if test "${gl_cv_func_strstr_linear+set}" = set; then :
18234 $as_echo_n "(cached) " >&6
18235else
18236 if test "$cross_compiling" = yes; then :
18237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18238/* end confdefs.h. */
18239
18240#include <features.h>
18241#ifdef __GNU_LIBRARY__
18242 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18243 && !(defined __i386__ || defined __x86_64__) \
18244 && !defined __UCLIBC__
18245 Lucky user
18246 #endif
18247#endif
18248#ifdef __CYGWIN__
18249 #include <cygwin/version.h>
18250 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18251 Lucky user
18252 #endif
18253#endif
18254
18255_ACEOF
18256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18257 $EGREP "Lucky user" >/dev/null 2>&1; then :
18258 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 18259else
63ce7108 18260 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
18261fi
18262rm -f conftest*
18263
18264
18265else
18266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18267/* end confdefs.h. */
18268
49e4877c
PA
18269#ifdef __MVS__
18270/* z/OS does not deliver signals while strstr() is running (thanks to
18271 restrictions on its LE runtime), which prevents us from limiting the
18272 running time of this test. */
18273# error "This test does not work properly on z/OS"
18274#endif
c971b7fa 18275#include <signal.h> /* for signal */
63ce7108 18276#include <string.h> /* for strstr */
c971b7fa
PA
18277#include <stdlib.h> /* for malloc */
18278#include <unistd.h> /* for alarm */
49e4877c 18279static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
18280
18281int
18282main ()
18283{
18284
18285 int result = 0;
18286 size_t m = 1000000;
63ce7108
TT
18287 char *haystack = (char *) malloc (2 * m + 2);
18288 char *needle = (char *) malloc (m + 2);
c971b7fa 18289 /* Failure to compile this test due to missing alarm is okay,
63ce7108 18290 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
18291 signal (SIGALRM, quit);
18292 alarm (5);
18293 /* Check for quadratic performance. */
18294 if (haystack && needle)
18295 {
18296 memset (haystack, 'A', 2 * m);
18297 haystack[2 * m] = 'B';
63ce7108 18298 haystack[2 * m + 1] = 0;
c971b7fa
PA
18299 memset (needle, 'A', m);
18300 needle[m] = 'B';
63ce7108
TT
18301 needle[m + 1] = 0;
18302 if (!strstr (haystack, needle))
c971b7fa
PA
18303 result |= 1;
18304 }
18305 return result;
18306
18307 ;
18308 return 0;
18309}
18310_ACEOF
18311if ac_fn_c_try_run "$LINENO"; then :
63ce7108 18312 gl_cv_func_strstr_linear=yes
c971b7fa 18313else
63ce7108 18314 gl_cv_func_strstr_linear=no
c971b7fa
PA
18315fi
18316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18317 conftest.$ac_objext conftest.beam conftest.$ac_ext
18318fi
18319
18320
18321fi
63ce7108
TT
18322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
18323$as_echo "$gl_cv_func_strstr_linear" >&6; }
18324 case "$gl_cv_func_strstr_linear" in
40a73391
JK
18325 *yes) ;;
18326 *)
63ce7108 18327 REPLACE_STRSTR=1
40a73391
JK
18328 ;;
18329 esac
c971b7fa
PA
18330 fi
18331
63ce7108 18332 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
18333
18334
18335
18336
18337
18338
18339
18340
63ce7108 18341 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 18342
a512b375 18343 fi
c971b7fa
PA
18344
18345
18346
63ce7108
TT
18347 if test "$gl_cv_func_memchr_works" != yes; then
18348 REPLACE_STRSTR=1
c971b7fa 18349 else
63ce7108
TT
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
18351$as_echo_n "checking whether strstr works... " >&6; }
18352if test "${gl_cv_func_strstr_works_always+set}" = set; then :
c971b7fa
PA
18353 $as_echo_n "(cached) " >&6
18354else
18355 if test "$cross_compiling" = yes; then :
63ce7108 18356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
18357/* end confdefs.h. */
18358
18359#ifdef __GNU_LIBRARY__
18360 #include <features.h>
63ce7108 18361 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
18362 || defined __UCLIBC__
18363 Lucky user
18364 #endif
18365#elif defined __CYGWIN__
18366 #include <cygwin/version.h>
18367 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18368 Lucky user
18369 #endif
18370#else
18371 Lucky user
18372#endif
18373
18374_ACEOF
18375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18376 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 18377 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 18378else
63ce7108 18379 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
18380fi
18381rm -f conftest*
18382
18383
18384else
18385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18386/* end confdefs.h. */
18387
63ce7108 18388#include <string.h> /* for strstr */
c971b7fa
PA
18389#define P "_EF_BF_BD"
18390#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18391#define NEEDLE P P P P P
18392
18393int
18394main ()
18395{
63ce7108 18396return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
18397
18398 ;
18399 return 0;
18400}
18401_ACEOF
18402if ac_fn_c_try_run "$LINENO"; then :
63ce7108 18403 gl_cv_func_strstr_works_always=yes
c971b7fa 18404else
63ce7108 18405 gl_cv_func_strstr_works_always=no
c971b7fa
PA
18406fi
18407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18408 conftest.$ac_objext conftest.beam conftest.$ac_ext
18409fi
18410
18411
18412fi
63ce7108
TT
18413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
18414$as_echo "$gl_cv_func_strstr_works_always" >&6; }
18415 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
18416 *yes) ;;
18417 *)
63ce7108 18418 REPLACE_STRSTR=1
40a73391
JK
18419 ;;
18420 esac
c971b7fa 18421 fi
8839a007 18422
63ce7108 18423 if test $REPLACE_STRSTR = 1; then
8839a007 18424
8690e634
JK
18425
18426
8690e634
JK
18427
18428
18429
18430
18431
63ce7108 18432 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 18433
8690e634
JK
18434 fi
18435
8690e634
JK
18436
18437
8690e634 18438
8690e634 18439
63ce7108 18440 GNULIB_STRSTR=1
8690e634
JK
18441
18442
18443
8690e634
JK
18444
18445
63ce7108 18446$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
18447
18448
18449
18450
18451
18452
18453
421693b0
PA
18454 for ac_func in strtok_r
18455do :
18456 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
18457if test "x$ac_cv_func_strtok_r" = x""yes; then :
18458 cat >>confdefs.h <<_ACEOF
18459#define HAVE_STRTOK_R 1
18460_ACEOF
18461
18462fi
18463done
18464
18465 if test $ac_cv_func_strtok_r = yes; then
18466 HAVE_STRTOK_R=1
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
18468$as_echo_n "checking whether strtok_r works... " >&6; }
18469if test "${gl_cv_func_strtok_r_works+set}" = set; then :
18470 $as_echo_n "(cached) " >&6
18471else
18472 if test "$cross_compiling" = yes; then :
18473
18474 case "$host_os" in
18475 # Guess no on glibc systems.
18476 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
18477 *) gl_cv_func_strtok_r_works="guessing yes";;
18478 esac
18479
18480else
18481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18482/* end confdefs.h. */
18483
18484 #ifndef __OPTIMIZE__
18485 # define __OPTIMIZE__ 1
18486 #endif
18487 #undef __OPTIMIZE_SIZE__
18488 #undef __NO_INLINE__
18489 #include <stdlib.h>
18490 #include <string.h>
18491
18492int
18493main ()
18494{
18495static const char dummy[] = "\177\01a";
18496 char delimiters[] = "xxxxxxxx";
18497 char *save_ptr = (char *) dummy;
18498 strtok_r (delimiters, "x", &save_ptr);
18499 strtok_r (NULL, "x", &save_ptr);
18500 return 0;
18501
18502 ;
18503 return 0;
18504}
18505
18506_ACEOF
18507if ac_fn_c_try_run "$LINENO"; then :
18508 gl_cv_func_strtok_r_works=yes
18509else
18510 gl_cv_func_strtok_r_works=no
18511fi
18512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18513 conftest.$ac_objext conftest.beam conftest.$ac_ext
18514fi
18515
18516
18517fi
18518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
18519$as_echo "$gl_cv_func_strtok_r_works" >&6; }
18520 case "$gl_cv_func_strtok_r_works" in
18521 *no)
18522 UNDEFINE_STRTOK_R=1
18523 ;;
18524 esac
18525 else
18526 HAVE_STRTOK_R=0
18527 fi
18528
18529 if test $ac_cv_have_decl_strtok_r = no; then
18530 HAVE_DECL_STRTOK_R=0
18531 fi
18532
18533 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
18534
18535
18536
18537
18538
18539
18540
18541
18542 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
18543
18544
18545 :
18546
18547 fi
18548
18549
18550
18551
18552
18553 GNULIB_STRTOK_R=1
18554
18555
18556
18557
18558
18559$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
18560
18561
18562
18563
18564
18565
18566
8690e634
JK
18567
18568
18569
18570
18571
8690e634 18572
09607c9e
TT
18573
18574
18575
18576
18577 if test $gl_cv_have_include_next = yes; then
18578 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18579 else
18580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
18581$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
18582if test "${gl_cv_next_sys_stat_h+set}" = set; then :
18583 $as_echo_n "(cached) " >&6
18584else
18585
18586 if test $ac_cv_header_sys_stat_h = yes; then
18587
18588
4a626d0a
PA
18589
18590
18591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
18592/* end confdefs.h. */
18593#include <sys/stat.h>
09607c9e 18594_ACEOF
4a626d0a
PA
18595 case "$host_os" in
18596 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18597 *) gl_absname_cpp="$ac_cpp" ;;
18598 esac
18599
18600 case "$host_os" in
18601 mingw*)
18602 gl_dirsep_regex='[/\\]'
18603 ;;
18604 *)
18605 gl_dirsep_regex='\/'
18606 ;;
18607 esac
18608 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18609 gl_header_literal_regex=`echo 'sys/stat.h' \
18610 | sed -e "$gl_make_literal_regex_sed"`
18611 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18612 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18613 s|^/[^/]|//&|
18614 p
18615 q
18616 }'
18617
18618 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18619 sed -n "$gl_absolute_header_sed"`
18620
18621 gl_header=$gl_cv_absolute_sys_stat_h
18622 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
18623 else
18624 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18625 fi
18626
18627
18628fi
18629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
18630$as_echo "$gl_cv_next_sys_stat_h" >&6; }
18631 fi
18632 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
18633
18634 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18635 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18636 gl_next_as_first_directive='<'sys/stat.h'>'
18637 else
18638 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18639 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
18640 fi
18641 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
18642
18643
18644
18645
18646
18647
18648
18649
2196f55f 18650
09607c9e
TT
18651
18652
18653 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
18654
18655$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
18656
18657 fi
18658
18659 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
18660 #include <sys/stat.h>
18661"
18662if test "x$ac_cv_type_nlink_t" = x""yes; then :
18663
18664else
18665
18666$as_echo "#define nlink_t int" >>confdefs.h
18667
18668fi
18669
18670
18671
18672 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
18673 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18675$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18676if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
18677 $as_echo_n "(cached) " >&6
18678else
18679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18680/* end confdefs.h. */
18681#include <sys/stat.h>
18682
18683int
18684main ()
18685{
18686#undef $gl_func
18687 (void) $gl_func;
18688 ;
18689 return 0;
18690}
18691_ACEOF
18692if ac_fn_c_try_compile "$LINENO"; then :
18693 eval "$as_gl_Symbol=yes"
18694else
18695 eval "$as_gl_Symbol=no"
18696fi
18697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18698fi
18699eval ac_res=\$$as_gl_Symbol
18700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18701$as_echo "$ac_res" >&6; }
18702 eval as_val=\$$as_gl_Symbol
18703 if test "x$as_val" = x""yes; then :
18704 cat >>confdefs.h <<_ACEOF
18705#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18706_ACEOF
18707
18708 eval ac_cv_have_decl_$gl_func=yes
18709fi
18710 done
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
8839a007
PA
18725
18726
18727
18728
09607c9e
TT
18729
18730
8839a007
PA
18731
18732
18733
18734
18735 if test $gl_cv_have_include_next = yes; then
18736 gl_cv_next_unistd_h='<'unistd.h'>'
18737 else
18738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
18739$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
18740if test "${gl_cv_next_unistd_h+set}" = set; then :
18741 $as_echo_n "(cached) " >&6
18742else
18743
18744 if test $ac_cv_header_unistd_h = yes; then
18745
18746
4a626d0a
PA
18747
18748
18749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
18750/* end confdefs.h. */
18751#include <unistd.h>
8839a007 18752_ACEOF
4a626d0a
PA
18753 case "$host_os" in
18754 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18755 *) gl_absname_cpp="$ac_cpp" ;;
18756 esac
18757
18758 case "$host_os" in
18759 mingw*)
18760 gl_dirsep_regex='[/\\]'
18761 ;;
18762 *)
18763 gl_dirsep_regex='\/'
18764 ;;
18765 esac
18766 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18767 gl_header_literal_regex=`echo 'unistd.h' \
18768 | sed -e "$gl_make_literal_regex_sed"`
18769 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18770 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18771 s|^/[^/]|//&|
18772 p
18773 q
18774 }'
18775
18776 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18777 sed -n "$gl_absolute_header_sed"`
18778
18779 gl_header=$gl_cv_absolute_unistd_h
18780 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
18781 else
18782 gl_cv_next_unistd_h='<'unistd.h'>'
18783 fi
18784
18785
18786fi
18787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
18788$as_echo "$gl_cv_next_unistd_h" >&6; }
18789 fi
18790 NEXT_UNISTD_H=$gl_cv_next_unistd_h
18791
18792 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18793 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18794 gl_next_as_first_directive='<'unistd.h'>'
18795 else
18796 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18797 gl_next_as_first_directive=$gl_cv_next_unistd_h
18798 fi
18799 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
18800
18801
18802
18803
18804 if test $ac_cv_header_unistd_h = yes; then
18805 HAVE_UNISTD_H=1
18806 else
18807 HAVE_UNISTD_H=0
18808 fi
18809
18810
18811
18812
18813
18814
18815
18816 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do
18817 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18819$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18820if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
18821 $as_echo_n "(cached) " >&6
18822else
18823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18824/* end confdefs.h. */
18825
18826#if HAVE_UNISTD_H
18827# include <unistd.h>
18828#endif
18829/* Some systems declare various items in the wrong headers. */
18830#if !(defined __GLIBC__ && !defined __UCLIBC__)
18831# include <fcntl.h>
18832# include <stdio.h>
18833# include <stdlib.h>
18834# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18835# include <io.h>
18836# endif
18837#endif
18838
18839int
18840main ()
18841{
18842#undef $gl_func
18843 (void) $gl_func;
18844 ;
18845 return 0;
18846}
18847_ACEOF
18848if ac_fn_c_try_compile "$LINENO"; then :
18849 eval "$as_gl_Symbol=yes"
18850else
18851 eval "$as_gl_Symbol=no"
18852fi
18853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18854fi
18855eval ac_res=\$$as_gl_Symbol
18856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18857$as_echo "$ac_res" >&6; }
18858 eval as_val=\$$as_gl_Symbol
18859 if test "x$as_val" = x""yes; then :
18860 cat >>confdefs.h <<_ACEOF
18861#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18862_ACEOF
18863
18864 eval ac_cv_have_decl_$gl_func=yes
18865fi
18866 done
18867
18868
18869
18870
18871
3d99e817
AK
18872 if test $ac_cv_have_decl_unsetenv = no; then
18873 HAVE_DECL_UNSETENV=0
18874 fi
18875 for ac_func in unsetenv
18876do :
18877 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
18878if test "x$ac_cv_func_unsetenv" = x""yes; then :
18879 cat >>confdefs.h <<_ACEOF
18880#define HAVE_UNSETENV 1
18881_ACEOF
18882
18883fi
18884done
18885
18886 if test $ac_cv_func_unsetenv = no; then
18887 HAVE_UNSETENV=0
18888 else
18889 HAVE_UNSETENV=1
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
18891$as_echo_n "checking for unsetenv() return type... " >&6; }
18892if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
18893 $as_echo_n "(cached) " >&6
18894else
18895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18896/* end confdefs.h. */
18897
18898#undef _BSD
18899#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
18900#include <stdlib.h>
18901extern
18902#ifdef __cplusplus
18903"C"
18904#endif
18905int unsetenv (const char *name);
18906
18907int
18908main ()
18909{
18910
18911 ;
18912 return 0;
18913}
18914_ACEOF
18915if ac_fn_c_try_compile "$LINENO"; then :
18916 gt_cv_func_unsetenv_ret='int'
18917else
18918 gt_cv_func_unsetenv_ret='void'
18919fi
18920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18921fi
18922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
18923$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
18924 if test $gt_cv_func_unsetenv_ret = 'void'; then
18925
18926$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
18927
18928 REPLACE_UNSETENV=1
18929 fi
18930
18931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
18932$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
18933if test "${gl_cv_func_unsetenv_works+set}" = set; then :
18934 $as_echo_n "(cached) " >&6
18935else
18936 if test "$cross_compiling" = yes; then :
18937 case "$host_os" in
18938 # Guess yes on glibc systems.
18939 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
18940 # If we don't know, assume the worst.
18941 *) gl_cv_func_unsetenv_works="guessing no" ;;
18942 esac
18943
18944else
18945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18946/* end confdefs.h. */
18947
18948 #include <stdlib.h>
18949 #include <errno.h>
18950 extern char **environ;
18951
18952int
18953main ()
18954{
18955
18956 char entry1[] = "a=1";
18957 char entry2[] = "b=2";
18958 char *env[] = { entry1, entry2, NULL };
18959 if (putenv ((char *) "a=1")) return 1;
18960 if (putenv (entry2)) return 2;
18961 entry2[0] = 'a';
18962 unsetenv ("a");
18963 if (getenv ("a")) return 3;
18964 if (!unsetenv ("") || errno != EINVAL) return 4;
18965 entry2[0] = 'b';
18966 environ = env;
18967 if (!getenv ("a")) return 5;
18968 entry2[0] = 'a';
18969 unsetenv ("a");
18970 if (getenv ("a")) return 6;
18971
18972 ;
18973 return 0;
18974}
18975_ACEOF
18976if ac_fn_c_try_run "$LINENO"; then :
18977 gl_cv_func_unsetenv_works=yes
18978else
18979 gl_cv_func_unsetenv_works=no
18980fi
18981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18982 conftest.$ac_objext conftest.beam conftest.$ac_ext
18983fi
18984
18985fi
18986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
18987$as_echo "$gl_cv_func_unsetenv_works" >&6; }
18988 case "$gl_cv_func_unsetenv_works" in
18989 *yes) ;;
18990 *)
18991 REPLACE_UNSETENV=1
18992 ;;
18993 esac
18994 fi
18995
18996 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
18997
18998
18999
19000
19001
19002
19003
19004
19005 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
19006
19007
19008
19009
19010
19011 fi
19012
19013
19014
19015
19016
19017 GNULIB_UNSETENV=1
19018
19019
19020
19021
19022
19023$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
19024
19025
19026
19027
19028
19029
8839a007
PA
19030
19031
19032
19033
19034
19035
19036
8690e634
JK
19037
19038
19039 if test $gl_cv_have_include_next = yes; then
19040 gl_cv_next_wchar_h='<'wchar.h'>'
19041 else
19042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
19043$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
19044if test "${gl_cv_next_wchar_h+set}" = set; then :
19045 $as_echo_n "(cached) " >&6
19046else
19047
19048 if test $ac_cv_header_wchar_h = yes; then
19049
19050
4a626d0a
PA
19051
19052
19053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
19054/* end confdefs.h. */
19055#include <wchar.h>
8690e634 19056_ACEOF
4a626d0a
PA
19057 case "$host_os" in
19058 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19059 *) gl_absname_cpp="$ac_cpp" ;;
19060 esac
19061
19062 case "$host_os" in
19063 mingw*)
19064 gl_dirsep_regex='[/\\]'
19065 ;;
19066 *)
19067 gl_dirsep_regex='\/'
19068 ;;
19069 esac
19070 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19071 gl_header_literal_regex=`echo 'wchar.h' \
19072 | sed -e "$gl_make_literal_regex_sed"`
19073 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19074 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19075 s|^/[^/]|//&|
19076 p
19077 q
19078 }'
19079
19080 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19081 sed -n "$gl_absolute_header_sed"`
19082
19083 gl_header=$gl_cv_absolute_wchar_h
19084 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
19085 else
19086 gl_cv_next_wchar_h='<'wchar.h'>'
19087 fi
19088
19089
19090fi
19091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
19092$as_echo "$gl_cv_next_wchar_h" >&6; }
19093 fi
19094 NEXT_WCHAR_H=$gl_cv_next_wchar_h
19095
19096 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19097 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19098 gl_next_as_first_directive='<'wchar.h'>'
19099 else
19100 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19101 gl_next_as_first_directive=$gl_cv_next_wchar_h
19102 fi
19103 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
19104
19105
19106
19107
19108 if test $ac_cv_header_wchar_h = yes; then
19109 HAVE_WCHAR_H=1
19110 else
19111 HAVE_WCHAR_H=0
19112 fi
19113
c971b7fa
PA
19114
19115
19116
19117
8690e634
JK
19118 if test $gt_cv_c_wint_t = yes; then
19119 HAVE_WINT_T=1
19120 else
19121 HAVE_WINT_T=0
19122 fi
c971b7fa
PA
19123
19124
19125
8690e634
JK
19126 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do
19127 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19129$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19130if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
c971b7fa
PA
19131 $as_echo_n "(cached) " >&6
19132else
19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134/* end confdefs.h. */
8690e634
JK
19135
19136/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19137 <wchar.h>.
19138 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19139 included before <wchar.h>. */
19140#if !(defined __GLIBC__ && !defined __UCLIBC__)
19141# include <stddef.h>
19142# include <stdio.h>
19143# include <time.h>
19144#endif
19145#include <wchar.h>
c971b7fa
PA
19146
19147int
19148main ()
19149{
8690e634
JK
19150#undef $gl_func
19151 (void) $gl_func;
c971b7fa
PA
19152 ;
19153 return 0;
19154}
19155_ACEOF
19156if ac_fn_c_try_compile "$LINENO"; then :
8690e634 19157 eval "$as_gl_Symbol=yes"
c971b7fa 19158else
8690e634 19159 eval "$as_gl_Symbol=no"
c971b7fa
PA
19160fi
19161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19162fi
8690e634
JK
19163eval ac_res=\$$as_gl_Symbol
19164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19165$as_echo "$ac_res" >&6; }
19166 eval as_val=\$$as_gl_Symbol
19167 if test "x$as_val" = x""yes; then :
19168 cat >>confdefs.h <<_ACEOF
19169#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19170_ACEOF
c971b7fa 19171
8690e634 19172 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 19173fi
8690e634
JK
19174 done
19175
19176
19177
19178
19179
19180
19181
8690e634
JK
19182 if test $ac_cv_func_iswcntrl = yes; then
19183 HAVE_ISWCNTRL=1
19184 else
19185 HAVE_ISWCNTRL=0
19186 fi
19187
19188
19189
8690e634
JK
19190 if test $gt_cv_c_wint_t = yes; then
19191 HAVE_WINT_T=1
19192 else
19193 HAVE_WINT_T=0
19194 fi
19195
19196
19197
19198
19199
19200
c971b7fa 19201
8690e634 19202
c971b7fa
PA
19203
19204
19205
19206 if test $gl_cv_have_include_next = yes; then
8690e634 19207 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 19208 else
8690e634
JK
19209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
19210$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
19211if test "${gl_cv_next_wctype_h+set}" = set; then :
c971b7fa
PA
19212 $as_echo_n "(cached) " >&6
19213else
19214
8690e634
JK
19215 if test $ac_cv_header_wctype_h = yes; then
19216
19217
4a626d0a
PA
19218
19219
19220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 19221/* end confdefs.h. */
8690e634 19222#include <wctype.h>
c971b7fa 19223_ACEOF
4a626d0a
PA
19224 case "$host_os" in
19225 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19226 *) gl_absname_cpp="$ac_cpp" ;;
19227 esac
19228
19229 case "$host_os" in
19230 mingw*)
19231 gl_dirsep_regex='[/\\]'
19232 ;;
19233 *)
19234 gl_dirsep_regex='\/'
19235 ;;
19236 esac
19237 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19238 gl_header_literal_regex=`echo 'wctype.h' \
19239 | sed -e "$gl_make_literal_regex_sed"`
19240 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19241 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19242 s|^/[^/]|//&|
19243 p
19244 q
19245 }'
19246
19247 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19248 sed -n "$gl_absolute_header_sed"`
19249
19250 gl_header=$gl_cv_absolute_wctype_h
19251 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
19252 else
19253 gl_cv_next_wctype_h='<'wctype.h'>'
19254 fi
c971b7fa
PA
19255
19256
19257fi
8690e634
JK
19258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
19259$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 19260 fi
8690e634 19261 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
19262
19263 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19264 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 19265 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
19266 else
19267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 19268 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 19269 fi
8690e634
JK
19270 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
19271
19272
19273
19274
19275 if test $ac_cv_header_wctype_h = yes; then
19276 if test $ac_cv_func_iswcntrl = yes; then
19277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
19278$as_echo_n "checking whether iswcntrl works... " >&6; }
19279if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
19280 $as_echo_n "(cached) " >&6
19281else
19282
19283 if test "$cross_compiling" = yes; then :
19284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19285/* end confdefs.h. */
19286#include <stdlib.h>
19287 #if __GNU_LIBRARY__ == 1
19288 Linux libc5 i18n is broken.
19289 #endif
19290int
19291main ()
19292{
19293
19294 ;
19295 return 0;
19296}
19297_ACEOF
19298if ac_fn_c_try_compile "$LINENO"; then :
19299 gl_cv_func_iswcntrl_works="guessing yes"
19300else
19301 gl_cv_func_iswcntrl_works="guessing no"
19302fi
19303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19304
19305else
19306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19307/* end confdefs.h. */
19308
19309 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19310 included before <wchar.h>.
19311 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19312 must be included before <wchar.h>. */
19313 #include <stddef.h>
19314 #include <stdio.h>
19315 #include <time.h>
19316 #include <wchar.h>
19317 #include <wctype.h>
19318 int main () { return iswprint ('x') == 0; }
19319
19320_ACEOF
19321if ac_fn_c_try_run "$LINENO"; then :
19322 gl_cv_func_iswcntrl_works=yes
19323else
19324 gl_cv_func_iswcntrl_works=no
19325fi
19326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19327 conftest.$ac_objext conftest.beam conftest.$ac_ext
19328fi
19329
19330
19331fi
19332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
19333$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
19334 fi
19335 HAVE_WCTYPE_H=1
19336 else
19337 HAVE_WCTYPE_H=0
19338 fi
19339
19340
19341 case "$gl_cv_func_iswcntrl_works" in
19342 *yes) REPLACE_ISWCNTRL=0 ;;
19343 *) REPLACE_ISWCNTRL=1 ;;
19344 esac
19345
19346
19347 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
19348 :
19349 fi
19350
19351 if test $REPLACE_ISWCNTRL = 1; then
19352 REPLACE_TOWLOWER=1
19353 else
19354 for ac_func in towlower
19355do :
19356 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
19357if test "x$ac_cv_func_towlower" = x""yes; then :
19358 cat >>confdefs.h <<_ACEOF
19359#define HAVE_TOWLOWER 1
19360_ACEOF
19361
19362fi
19363done
19364
19365 if test $ac_cv_func_towlower = yes; then
19366 REPLACE_TOWLOWER=0
19367 else
19368 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19369 included before <wchar.h>.
19370 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19371 must be included before <wchar.h>. */
19372 #include <stddef.h>
19373 #include <stdio.h>
19374 #include <time.h>
19375 #include <wchar.h>
19376 #if HAVE_WCTYPE_H
19377 # include <wctype.h>
19378 #endif
19379
19380"
19381if test "x$ac_cv_have_decl_towlower" = x""yes; then :
19382 ac_have_decl=1
19383else
19384 ac_have_decl=0
19385fi
19386
19387cat >>confdefs.h <<_ACEOF
19388#define HAVE_DECL_TOWLOWER $ac_have_decl
19389_ACEOF
19390
19391 if test $ac_cv_have_decl_towlower = yes; then
19392 REPLACE_TOWLOWER=1
19393 else
19394 REPLACE_TOWLOWER=0
19395 fi
19396 fi
19397 fi
19398
19399
19400 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
19401 :
19402 fi
19403
19404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
19405$as_echo_n "checking for wctype_t... " >&6; }
19406if test "${gl_cv_type_wctype_t+set}" = set; then :
19407 $as_echo_n "(cached) " >&6
19408else
19409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19410/* end confdefs.h. */
19411/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19412 included before <wchar.h>.
19413 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19414 must be included before <wchar.h>. */
19415 #include <stddef.h>
19416 #include <stdio.h>
19417 #include <time.h>
19418 #include <wchar.h>
19419 #if HAVE_WCTYPE_H
19420 # include <wctype.h>
19421 #endif
19422 wctype_t a;
19423
19424int
19425main ()
19426{
19427
19428 ;
19429 return 0;
19430}
19431_ACEOF
19432if ac_fn_c_try_compile "$LINENO"; then :
19433 gl_cv_type_wctype_t=yes
19434else
19435 gl_cv_type_wctype_t=no
19436fi
19437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19438
8690e634
JK
19439fi
19440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
19441$as_echo "$gl_cv_type_wctype_t" >&6; }
19442 if test $gl_cv_type_wctype_t = no; then
19443 HAVE_WCTYPE_T=0
19444 fi
19445
19446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
19447$as_echo_n "checking for wctrans_t... " >&6; }
19448if test "${gl_cv_type_wctrans_t+set}" = set; then :
19449 $as_echo_n "(cached) " >&6
19450else
19451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19452/* end confdefs.h. */
19453/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19454 included before <wchar.h>.
19455 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19456 must be included before <wchar.h>. */
19457 #include <stddef.h>
19458 #include <stdio.h>
19459 #include <time.h>
19460 #include <wchar.h>
19461 #include <wctype.h>
19462 wctrans_t a;
c971b7fa 19463
8690e634
JK
19464int
19465main ()
19466{
c971b7fa 19467
8690e634
JK
19468 ;
19469 return 0;
19470}
19471_ACEOF
19472if ac_fn_c_try_compile "$LINENO"; then :
19473 gl_cv_type_wctrans_t=yes
19474else
19475 gl_cv_type_wctrans_t=no
19476fi
19477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19478
8690e634
JK
19479fi
19480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
19481$as_echo "$gl_cv_type_wctrans_t" >&6; }
19482 if test $gl_cv_type_wctrans_t = no; then
19483 HAVE_WCTRANS_T=0
c971b7fa
PA
19484 fi
19485
19486
8690e634
JK
19487 for gl_func in wctype iswctype wctrans towctrans ; do
19488 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19490$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19491if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
19492 $as_echo_n "(cached) " >&6
19493else
19494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19495/* end confdefs.h. */
19496
19497/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19498 <wchar.h>.
19499 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19500 included before <wchar.h>. */
19501#if !(defined __GLIBC__ && !defined __UCLIBC__)
19502# include <stddef.h>
19503# include <stdio.h>
19504# include <time.h>
19505# include <wchar.h>
19506#endif
19507#include <wctype.h>
19508
19509int
19510main ()
19511{
19512#undef $gl_func
19513 (void) $gl_func;
19514 ;
19515 return 0;
19516}
19517_ACEOF
19518if ac_fn_c_try_compile "$LINENO"; then :
19519 eval "$as_gl_Symbol=yes"
19520else
19521 eval "$as_gl_Symbol=no"
19522fi
19523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19524fi
19525eval ac_res=\$$as_gl_Symbol
19526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19527$as_echo "$ac_res" >&6; }
19528 eval as_val=\$$as_gl_Symbol
19529 if test "x$as_val" = x""yes; then :
19530 cat >>confdefs.h <<_ACEOF
19531#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19532_ACEOF
c971b7fa 19533
8690e634
JK
19534 eval ac_cv_have_decl_$gl_func=yes
19535fi
19536 done
c971b7fa
PA
19537
19538
19539 # End of code from modules
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549 gltests_libdeps=
19550 gltests_ltlibdeps=
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560 gl_source_base='tests'
19561 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
19562
19563 gl_module_indicator_condition=$gltests_WITNESS
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573 LIBGNU_LIBDEPS="$gl_libdeps"
19574
19575 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
19576
19577
19578
19579# We don't use automake, but gnulib does. This line lets us generate
19580# its Makefile.in.
19581am__api_version='1.11'
19582
19583# Find a good install program. We prefer a C program (faster),
19584# so one script is as good as another. But avoid the broken or
19585# incompatible versions:
19586# SysV /etc/install, /usr/sbin/install
19587# SunOS /usr/etc/install
19588# IRIX /sbin/install
19589# AIX /bin/install
19590# AmigaOS /C/install, which installs bootblocks on floppy discs
19591# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
19592# AFS /usr/afsws/bin/install, which mishandles nonexistent args
19593# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
19594# OS/2's system install, which has a completely different semantic
19595# ./install, which can be erroneously created by make from ./install.sh.
19596# Reject install programs that cannot install multiple files.
19597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
19598$as_echo_n "checking for a BSD-compatible install... " >&6; }
19599if test -z "$INSTALL"; then
19600if test "${ac_cv_path_install+set}" = set; then :
19601 $as_echo_n "(cached) " >&6
19602else
19603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19604for as_dir in $PATH
19605do
19606 IFS=$as_save_IFS
19607 test -z "$as_dir" && as_dir=.
19608 # Account for people who put trailing slashes in PATH elements.
19609case $as_dir/ in #((
19610 ./ | .// | /[cC]/* | \
19611 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
19612 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
19613 /usr/ucb/* ) ;;
19614 *)
19615 # OSF1 and SCO ODT 3.0 have their own names for install.
19616 # Don't use installbsd from OSF since it installs stuff as root
19617 # by default.
19618 for ac_prog in ginstall scoinst install; do
19619 for ac_exec_ext in '' $ac_executable_extensions; do
19620 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
19621 if test $ac_prog = install &&
19622 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
19623 # AIX install. It has an incompatible calling convention.
19624 :
19625 elif test $ac_prog = install &&
19626 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
19627 # program-specific install script used by HP pwplus--don't use.
19628 :
19629 else
19630 rm -rf conftest.one conftest.two conftest.dir
19631 echo one > conftest.one
19632 echo two > conftest.two
19633 mkdir conftest.dir
19634 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
19635 test -s conftest.one && test -s conftest.two &&
19636 test -s conftest.dir/conftest.one &&
19637 test -s conftest.dir/conftest.two
19638 then
19639 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
19640 break 3
19641 fi
19642 fi
19643 fi
19644 done
19645 done
19646 ;;
19647esac
19648
19649 done
19650IFS=$as_save_IFS
19651
19652rm -rf conftest.one conftest.two conftest.dir
19653
19654fi
19655 if test "${ac_cv_path_install+set}" = set; then
19656 INSTALL=$ac_cv_path_install
19657 else
19658 # As a last resort, use the slow shell script. Don't cache a
19659 # value for INSTALL within a source directory, because that will
19660 # break other packages using the cache if that directory is
19661 # removed, or if the value is a relative name.
19662 INSTALL=$ac_install_sh
19663 fi
19664fi
19665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
19666$as_echo "$INSTALL" >&6; }
19667
19668# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
19669# It thinks the first close brace ends the variable substitution.
19670test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
19671
19672test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
19673
19674test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
19675
19676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
19677$as_echo_n "checking whether build environment is sane... " >&6; }
19678# Just in case
19679sleep 1
19680echo timestamp > conftest.file
19681# Reject unsafe characters in $srcdir or the absolute working directory
19682# name. Accept space and tab only in the latter.
19683am_lf='
19684'
19685case `pwd` in
19686 *[\\\"\#\$\&\'\`$am_lf]*)
19687 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
19688esac
19689case $srcdir in
19690 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
19691 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
19692esac
19693
19694# Do `set' in a subshell so we don't clobber the current shell's
19695# arguments. Must try -L first in case configure is actually a
19696# symlink; some systems play weird games with the mod time of symlinks
19697# (eg FreeBSD returns the mod time of the symlink's containing
19698# directory).
19699if (
19700 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
19701 if test "$*" = "X"; then
19702 # -L didn't work.
19703 set X `ls -t "$srcdir/configure" conftest.file`
19704 fi
19705 rm -f conftest.file
19706 if test "$*" != "X $srcdir/configure conftest.file" \
19707 && test "$*" != "X conftest.file $srcdir/configure"; then
19708
19709 # If neither matched, then we have a broken ls. This can happen
19710 # if, for instance, CONFIG_SHELL is bash and it inherits a
19711 # broken ls alias from the environment. This has actually
19712 # happened. Such a system could not be considered "sane".
19713 as_fn_error "ls -t appears to fail. Make sure there is not a broken
19714alias in your environment" "$LINENO" 5
19715 fi
19716
19717 test "$2" = conftest.file
19718 )
19719then
19720 # Ok.
19721 :
19722else
19723 as_fn_error "newly created file is older than distributed files!
19724Check your system clock" "$LINENO" 5
19725fi
19726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19727$as_echo "yes" >&6; }
19728test "$program_prefix" != NONE &&
19729 program_transform_name="s&^&$program_prefix&;$program_transform_name"
19730# Use a double $ so make ignores it.
19731test "$program_suffix" != NONE &&
19732 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
19733# Double any \ or $.
19734# By default was `s,x,x', remove it if useless.
19735ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
19736program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
19737
19738# expand $ac_aux_dir to an absolute path
19739am_aux_dir=`cd $ac_aux_dir && pwd`
19740
19741if test x"${MISSING+set}" != xset; then
19742 case $am_aux_dir in
19743 *\ * | *\ *)
19744 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
19745 *)
19746 MISSING="\${SHELL} $am_aux_dir/missing" ;;
19747 esac
19748fi
19749# Use eval to expand $SHELL
19750if eval "$MISSING --run true"; then
19751 am_missing_run="$MISSING --run "
19752else
19753 am_missing_run=
19754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
19755$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
19756fi
19757
19758if test x"${install_sh}" != xset; then
19759 case $am_aux_dir in
19760 *\ * | *\ *)
19761 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
19762 *)
19763 install_sh="\${SHELL} $am_aux_dir/install-sh"
19764 esac
19765fi
19766
19767# Installed binaries are usually stripped using `strip' when the user
19768# run `make install-strip'. However `strip' might not be the right
19769# tool to use in cross-compilation environments, therefore Automake
19770# will honor the `STRIP' environment variable to overrule this program.
19771if test "$cross_compiling" != no; then
19772 if test -n "$ac_tool_prefix"; then
19773 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
19774set dummy ${ac_tool_prefix}strip; ac_word=$2
19775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19776$as_echo_n "checking for $ac_word... " >&6; }
19777if test "${ac_cv_prog_STRIP+set}" = set; then :
19778 $as_echo_n "(cached) " >&6
19779else
19780 if test -n "$STRIP"; then
19781 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
19782else
19783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19784for as_dir in $PATH
19785do
19786 IFS=$as_save_IFS
19787 test -z "$as_dir" && as_dir=.
19788 for ac_exec_ext in '' $ac_executable_extensions; do
19789 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19790 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
19791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19792 break 2
19793 fi
19794done
19795 done
19796IFS=$as_save_IFS
19797
19798fi
19799fi
19800STRIP=$ac_cv_prog_STRIP
19801if test -n "$STRIP"; then
19802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
19803$as_echo "$STRIP" >&6; }
19804else
19805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19806$as_echo "no" >&6; }
19807fi
19808
19809
19810fi
19811if test -z "$ac_cv_prog_STRIP"; then
19812 ac_ct_STRIP=$STRIP
19813 # Extract the first word of "strip", so it can be a program name with args.
19814set dummy strip; ac_word=$2
19815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19816$as_echo_n "checking for $ac_word... " >&6; }
19817if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
19818 $as_echo_n "(cached) " >&6
19819else
19820 if test -n "$ac_ct_STRIP"; then
19821 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
19822else
19823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19824for as_dir in $PATH
19825do
19826 IFS=$as_save_IFS
19827 test -z "$as_dir" && as_dir=.
19828 for ac_exec_ext in '' $ac_executable_extensions; do
19829 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19830 ac_cv_prog_ac_ct_STRIP="strip"
19831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19832 break 2
19833 fi
19834done
19835 done
19836IFS=$as_save_IFS
19837
19838fi
19839fi
19840ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
19841if test -n "$ac_ct_STRIP"; then
19842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
19843$as_echo "$ac_ct_STRIP" >&6; }
19844else
19845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19846$as_echo "no" >&6; }
19847fi
19848
19849 if test "x$ac_ct_STRIP" = x; then
19850 STRIP=":"
19851 else
19852 case $cross_compiling:$ac_tool_warned in
19853yes:)
19854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19856ac_tool_warned=yes ;;
19857esac
19858 STRIP=$ac_ct_STRIP
19859 fi
19860else
19861 STRIP="$ac_cv_prog_STRIP"
19862fi
19863
19864fi
19865INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
19866
c971b7fa
PA
19867mkdir_p="$MKDIR_P"
19868case $mkdir_p in
19869 [\\/$]* | ?:[\\/]*) ;;
19870 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
19871esac
19872
19873for ac_prog in gawk mawk nawk awk
19874do
19875 # Extract the first word of "$ac_prog", so it can be a program name with args.
19876set dummy $ac_prog; ac_word=$2
19877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19878$as_echo_n "checking for $ac_word... " >&6; }
19879if test "${ac_cv_prog_AWK+set}" = set; then :
19880 $as_echo_n "(cached) " >&6
19881else
19882 if test -n "$AWK"; then
19883 ac_cv_prog_AWK="$AWK" # Let the user override the test.
19884else
19885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19886for as_dir in $PATH
19887do
19888 IFS=$as_save_IFS
19889 test -z "$as_dir" && as_dir=.
19890 for ac_exec_ext in '' $ac_executable_extensions; do
19891 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19892 ac_cv_prog_AWK="$ac_prog"
19893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19894 break 2
19895 fi
19896done
19897 done
19898IFS=$as_save_IFS
19899
19900fi
19901fi
19902AWK=$ac_cv_prog_AWK
19903if test -n "$AWK"; then
19904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
19905$as_echo "$AWK" >&6; }
19906else
19907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19908$as_echo "no" >&6; }
19909fi
19910
19911
19912 test -n "$AWK" && break
19913done
19914
19915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
19916$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
19917set x ${MAKE-make}
19918ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
19919if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
19920 $as_echo_n "(cached) " >&6
19921else
19922 cat >conftest.make <<\_ACEOF
19923SHELL = /bin/sh
19924all:
19925 @echo '@@@%%%=$(MAKE)=@@@%%%'
19926_ACEOF
19927# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
19928case `${MAKE-make} -f conftest.make 2>/dev/null` in
19929 *@@@%%%=?*=@@@%%%*)
19930 eval ac_cv_prog_make_${ac_make}_set=yes;;
19931 *)
19932 eval ac_cv_prog_make_${ac_make}_set=no;;
19933esac
19934rm -f conftest.make
19935fi
19936if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
19937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19938$as_echo "yes" >&6; }
19939 SET_MAKE=
19940else
19941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19942$as_echo "no" >&6; }
19943 SET_MAKE="MAKE=${MAKE-make}"
19944fi
19945
19946rm -rf .tst 2>/dev/null
19947mkdir .tst 2>/dev/null
19948if test -d .tst; then
19949 am__leading_dot=.
19950else
19951 am__leading_dot=_
19952fi
19953rmdir .tst 2>/dev/null
19954
19955DEPDIR="${am__leading_dot}deps"
19956
19957ac_config_commands="$ac_config_commands depfiles"
19958
19959
19960am_make=${MAKE-make}
19961cat > confinc << 'END'
19962am__doit:
19963 @echo this is the am__doit target
19964.PHONY: am__doit
19965END
19966# If we don't find an include directive, just comment out the code.
19967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
19968$as_echo_n "checking for style of include used by $am_make... " >&6; }
19969am__include="#"
19970am__quote=
19971_am_result=none
19972# First try GNU make style include.
19973echo "include confinc" > confmf
19974# Ignore all kinds of additional output from `make'.
19975case `$am_make -s -f confmf 2> /dev/null` in #(
19976*the\ am__doit\ target*)
19977 am__include=include
19978 am__quote=
19979 _am_result=GNU
19980 ;;
19981esac
19982# Now try BSD make style include.
19983if test "$am__include" = "#"; then
19984 echo '.include "confinc"' > confmf
19985 case `$am_make -s -f confmf 2> /dev/null` in #(
19986 *the\ am__doit\ target*)
19987 am__include=.include
19988 am__quote="\""
19989 _am_result=BSD
19990 ;;
19991 esac
19992fi
19993
19994
19995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
19996$as_echo "$_am_result" >&6; }
19997rm -f confinc confmf
19998
19999# Check whether --enable-dependency-tracking was given.
20000if test "${enable_dependency_tracking+set}" = set; then :
20001 enableval=$enable_dependency_tracking;
20002fi
20003
20004if test "x$enable_dependency_tracking" != xno; then
20005 am_depcomp="$ac_aux_dir/depcomp"
20006 AMDEPBACKSLASH='\'
20007fi
20008 if test "x$enable_dependency_tracking" != xno; then
20009 AMDEP_TRUE=
20010 AMDEP_FALSE='#'
20011else
20012 AMDEP_TRUE='#'
20013 AMDEP_FALSE=
20014fi
20015
20016
20017if test "`cd $srcdir && pwd`" != "`pwd`"; then
20018 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
20019 # is not polluted with repeated "-I."
20020 am__isrc=' -I$(srcdir)'
20021 # test to see if srcdir already configured
20022 if test -f $srcdir/config.status; then
20023 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
20024 fi
20025fi
20026
20027# test whether we have cygpath
20028if test -z "$CYGPATH_W"; then
20029 if (cygpath --version) >/dev/null 2>/dev/null; then
20030 CYGPATH_W='cygpath -w'
20031 else
20032 CYGPATH_W=echo
20033 fi
20034fi
20035
20036
20037# Define the identity of the package.
20038 PACKAGE=libgnu
20039 VERSION=UNUSED-VERSION
20040
20041
20042# Some tools Automake needs.
20043
20044ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
20045
20046
20047AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
20048
20049
20050AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
20051
20052
20053AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
20054
20055
20056MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
20057
20058# We need awk for the "check" target. The system "awk" is bad on
20059# some platforms.
20060# Always define AMTAR for backward compatibility.
20061
20062AMTAR=${AMTAR-"${am_missing_run}tar"}
20063
20064am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
20065
20066
20067
20068
20069depcc="$CC" am_compiler_list=
20070
20071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
20072$as_echo_n "checking dependency style of $depcc... " >&6; }
20073if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
20074 $as_echo_n "(cached) " >&6
20075else
20076 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
20077 # We make a subdir and do the tests there. Otherwise we can end up
20078 # making bogus files that we don't know about and never remove. For
20079 # instance it was reported that on HP-UX the gcc test will end up
20080 # making a dummy file named `D' -- because `-MD' means `put the output
20081 # in D'.
20082 mkdir conftest.dir
20083 # Copy depcomp to subdir because otherwise we won't find it if we're
20084 # using a relative directory.
20085 cp "$am_depcomp" conftest.dir
20086 cd conftest.dir
20087 # We will build objects and dependencies in a subdirectory because
20088 # it helps to detect inapplicable dependency modes. For instance
20089 # both Tru64's cc and ICC support -MD to output dependencies as a
20090 # side effect of compilation, but ICC will put the dependencies in
20091 # the current directory while Tru64 will put them in the object
20092 # directory.
20093 mkdir sub
20094
20095 am_cv_CC_dependencies_compiler_type=none
20096 if test "$am_compiler_list" = ""; then
20097 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
20098 fi
20099 am__universal=false
20100 case " $depcc " in #(
20101 *\ -arch\ *\ -arch\ *) am__universal=true ;;
20102 esac
20103
20104 for depmode in $am_compiler_list; do
20105 # Setup a source with many dependencies, because some compilers
20106 # like to wrap large dependency lists on column 80 (with \), and
20107 # we should not choose a depcomp mode which is confused by this.
20108 #
20109 # We need to recreate these files for each test, as the compiler may
20110 # overwrite some of them when testing with obscure command lines.
20111 # This happens at least with the AIX C compiler.
20112 : > sub/conftest.c
20113 for i in 1 2 3 4 5 6; do
20114 echo '#include "conftst'$i'.h"' >> sub/conftest.c
20115 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
20116 # Solaris 8's {/usr,}/bin/sh.
20117 touch sub/conftst$i.h
20118 done
20119 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
20120
20121 # We check with `-c' and `-o' for the sake of the "dashmstdout"
20122 # mode. It turns out that the SunPro C++ compiler does not properly
20123 # handle `-M -o', and we need to detect this. Also, some Intel
20124 # versions had trouble with output in subdirs
20125 am__obj=sub/conftest.${OBJEXT-o}
20126 am__minus_obj="-o $am__obj"
20127 case $depmode in
20128 gcc)
20129 # This depmode causes a compiler race in universal mode.
20130 test "$am__universal" = false || continue
20131 ;;
20132 nosideeffect)
20133 # after this tag, mechanisms are not by side-effect, so they'll
20134 # only be used when explicitly requested
20135 if test "x$enable_dependency_tracking" = xyes; then
20136 continue
20137 else
20138 break
20139 fi
20140 ;;
20141 msvisualcpp | msvcmsys)
20142 # This compiler won't grok `-c -o', but also, the minuso test has
20143 # not run yet. These depmodes are late enough in the game, and
20144 # so weak that their functioning should not be impacted.
20145 am__obj=conftest.${OBJEXT-o}
20146 am__minus_obj=
20147 ;;
20148 none) break ;;
20149 esac
20150 if depmode=$depmode \
20151 source=sub/conftest.c object=$am__obj \
20152 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
20153 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
20154 >/dev/null 2>conftest.err &&
20155 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
20156 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
20157 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
20158 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
20159 # icc doesn't choke on unknown options, it will just issue warnings
20160 # or remarks (even with -Werror). So we grep stderr for any message
20161 # that says an option was ignored or not supported.
20162 # When given -MP, icc 7.0 and 7.1 complain thusly:
20163 # icc: Command line warning: ignoring option '-M'; no argument required
20164 # The diagnosis changed in icc 8.0:
20165 # icc: Command line remark: option '-MP' not supported
20166 if (grep 'ignoring option' conftest.err ||
20167 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
20168 am_cv_CC_dependencies_compiler_type=$depmode
20169 break
20170 fi
20171 fi
20172 done
20173
20174 cd ..
20175 rm -rf conftest.dir
20176else
20177 am_cv_CC_dependencies_compiler_type=none
20178fi
20179
20180fi
20181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
20182$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
20183CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
20184
20185 if
20186 test "x$enable_dependency_tracking" != xno \
20187 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
20188 am__fastdepCC_TRUE=
20189 am__fastdepCC_FALSE='#'
20190else
20191 am__fastdepCC_TRUE='#'
20192 am__fastdepCC_FALSE=
20193fi
20194
20195
20196
20197
20198# --------------------- #
20199# Checks for programs. #
20200# --------------------- #
20201
20202
20203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
20204$as_echo_n "checking whether ln -s works... " >&6; }
20205LN_S=$as_ln_s
20206if test "$LN_S" = "ln -s"; then
20207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20208$as_echo "yes" >&6; }
20209else
20210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
20211$as_echo "no, using $LN_S" >&6; }
20212fi
20213
20214if test -n "$ac_tool_prefix"; then
20215 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
20216set dummy ${ac_tool_prefix}ranlib; ac_word=$2
20217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20218$as_echo_n "checking for $ac_word... " >&6; }
20219if test "${ac_cv_prog_RANLIB+set}" = set; then :
20220 $as_echo_n "(cached) " >&6
20221else
20222 if test -n "$RANLIB"; then
20223 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
20224else
20225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20226for as_dir in $PATH
20227do
20228 IFS=$as_save_IFS
20229 test -z "$as_dir" && as_dir=.
20230 for ac_exec_ext in '' $ac_executable_extensions; do
20231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20232 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
20233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20234 break 2
20235 fi
20236done
20237 done
20238IFS=$as_save_IFS
20239
20240fi
20241fi
20242RANLIB=$ac_cv_prog_RANLIB
20243if test -n "$RANLIB"; then
20244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
20245$as_echo "$RANLIB" >&6; }
20246else
20247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20248$as_echo "no" >&6; }
20249fi
20250
20251
20252fi
20253if test -z "$ac_cv_prog_RANLIB"; then
20254 ac_ct_RANLIB=$RANLIB
20255 # Extract the first word of "ranlib", so it can be a program name with args.
20256set dummy ranlib; ac_word=$2
20257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20258$as_echo_n "checking for $ac_word... " >&6; }
20259if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
20260 $as_echo_n "(cached) " >&6
20261else
20262 if test -n "$ac_ct_RANLIB"; then
20263 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
20264else
20265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20266for as_dir in $PATH
20267do
20268 IFS=$as_save_IFS
20269 test -z "$as_dir" && as_dir=.
20270 for ac_exec_ext in '' $ac_executable_extensions; do
20271 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20272 ac_cv_prog_ac_ct_RANLIB="ranlib"
20273 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20274 break 2
20275 fi
20276done
20277 done
20278IFS=$as_save_IFS
20279
20280fi
20281fi
20282ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
20283if test -n "$ac_ct_RANLIB"; then
20284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
20285$as_echo "$ac_ct_RANLIB" >&6; }
20286else
20287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20288$as_echo "no" >&6; }
20289fi
20290
20291 if test "x$ac_ct_RANLIB" = x; then
20292 RANLIB=":"
20293 else
20294 case $cross_compiling:$ac_tool_warned in
20295yes:)
20296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20298ac_tool_warned=yes ;;
20299esac
20300 RANLIB=$ac_ct_RANLIB
20301 fi
20302else
20303 RANLIB="$ac_cv_prog_RANLIB"
20304fi
20305
20306
20307if test -n "$ac_tool_prefix"; then
20308 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20309set dummy ${ac_tool_prefix}ar; ac_word=$2
20310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20311$as_echo_n "checking for $ac_word... " >&6; }
20312if test "${ac_cv_prog_AR+set}" = set; then :
20313 $as_echo_n "(cached) " >&6
20314else
20315 if test -n "$AR"; then
20316 ac_cv_prog_AR="$AR" # Let the user override the test.
20317else
20318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20319for as_dir in $PATH
20320do
20321 IFS=$as_save_IFS
20322 test -z "$as_dir" && as_dir=.
20323 for ac_exec_ext in '' $ac_executable_extensions; do
20324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20325 ac_cv_prog_AR="${ac_tool_prefix}ar"
20326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20327 break 2
20328 fi
20329done
20330 done
20331IFS=$as_save_IFS
20332
20333fi
20334fi
20335AR=$ac_cv_prog_AR
20336if test -n "$AR"; then
20337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20338$as_echo "$AR" >&6; }
20339else
20340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20341$as_echo "no" >&6; }
20342fi
20343
20344
20345fi
20346if test -z "$ac_cv_prog_AR"; then
20347 ac_ct_AR=$AR
20348 # Extract the first word of "ar", so it can be a program name with args.
20349set dummy ar; ac_word=$2
20350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20351$as_echo_n "checking for $ac_word... " >&6; }
20352if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20353 $as_echo_n "(cached) " >&6
20354else
20355 if test -n "$ac_ct_AR"; then
20356 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20357else
20358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20359for as_dir in $PATH
20360do
20361 IFS=$as_save_IFS
20362 test -z "$as_dir" && as_dir=.
20363 for ac_exec_ext in '' $ac_executable_extensions; do
20364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20365 ac_cv_prog_ac_ct_AR="ar"
20366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20367 break 2
20368 fi
20369done
20370 done
20371IFS=$as_save_IFS
20372
20373fi
20374fi
20375ac_ct_AR=$ac_cv_prog_ac_ct_AR
20376if test -n "$ac_ct_AR"; then
20377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20378$as_echo "$ac_ct_AR" >&6; }
20379else
20380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20381$as_echo "no" >&6; }
20382fi
20383
20384 if test "x$ac_ct_AR" = x; then
20385 AR=""
20386 else
20387 case $cross_compiling:$ac_tool_warned in
20388yes:)
20389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20391ac_tool_warned=yes ;;
20392esac
20393 AR=$ac_ct_AR
20394 fi
20395else
20396 AR="$ac_cv_prog_AR"
20397fi
20398
20399
20400# ---------------------- #
20401# Checks for libraries. #
20402# ---------------------- #
20403
20404ac_config_files="$ac_config_files Makefile import/Makefile"
20405
20406ac_config_commands="$ac_config_commands default"
20407
20408cat >confcache <<\_ACEOF
20409# This file is a shell script that caches the results of configure
20410# tests run on this system so they can be shared between configure
20411# scripts and configure runs, see configure's option --config-cache.
20412# It is not useful on other systems. If it contains results you don't
20413# want to keep, you may remove or edit it.
20414#
20415# config.status only pays attention to the cache file if you give it
20416# the --recheck option to rerun configure.
20417#
20418# `ac_cv_env_foo' variables (set or unset) will be overridden when
20419# loading this file, other *unset* `ac_cv_foo' will be assigned the
20420# following values.
20421
20422_ACEOF
20423
20424# The following way of writing the cache mishandles newlines in values,
20425# but we know of no workaround that is simple, portable, and efficient.
20426# So, we kill variables containing newlines.
20427# Ultrix sh set writes to stderr and can't be redirected directly,
20428# and sets the high bit in the cache file unless we assign to the vars.
20429(
20430 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20431 eval ac_val=\$$ac_var
20432 case $ac_val in #(
20433 *${as_nl}*)
20434 case $ac_var in #(
20435 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20436$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20437 esac
20438 case $ac_var in #(
20439 _ | IFS | as_nl) ;; #(
20440 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20441 *) { eval $ac_var=; unset $ac_var;} ;;
20442 esac ;;
20443 esac
20444 done
20445
20446 (set) 2>&1 |
20447 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20448 *${as_nl}ac_space=\ *)
20449 # `set' does not quote correctly, so add quotes: double-quote
20450 # substitution turns \\\\ into \\, and sed turns \\ into \.
20451 sed -n \
20452 "s/'/'\\\\''/g;
20453 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20454 ;; #(
20455 *)
20456 # `set' quotes correctly as required by POSIX, so do not add quotes.
20457 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20458 ;;
20459 esac |
20460 sort
20461) |
20462 sed '
20463 /^ac_cv_env_/b end
20464 t clear
20465 :clear
20466 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20467 t end
20468 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20469 :end' >>confcache
20470if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20471 if test -w "$cache_file"; then
20472 test "x$cache_file" != "x/dev/null" &&
20473 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20474$as_echo "$as_me: updating cache $cache_file" >&6;}
20475 cat confcache >$cache_file
20476 else
20477 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20478$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20479 fi
20480fi
20481rm -f confcache
20482
20483test "x$prefix" = xNONE && prefix=$ac_default_prefix
20484# Let make expand exec_prefix.
20485test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20486
20487DEFS=-DHAVE_CONFIG_H
20488
20489ac_libobjs=
20490ac_ltlibobjs=
20491for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20492 # 1. Remove the extension, and $U if already installed.
20493 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20494 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20495 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20496 # will be set to the directory where LIBOBJS objects are built.
20497 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20498 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20499done
20500LIBOBJS=$ac_libobjs
20501
20502LTLIBOBJS=$ac_ltlibobjs
20503
20504
20505if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20506 as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
20507Usually this means the macro was only invoked conditionally." "$LINENO" 5
20508fi
20509if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
20510 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
20511Usually this means the macro was only invoked conditionally." "$LINENO" 5
20512fi
8690e634
JK
20513if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
20514 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
20515Usually this means the macro was only invoked conditionally." "$LINENO" 5
20516fi
18848e28
GF
20517if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
20518 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
20519Usually this means the macro was only invoked conditionally." "$LINENO" 5
20520fi
88b48903
WN
20521if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
20522 as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
20523Usually this means the macro was only invoked conditionally." "$LINENO" 5
20524fi
8690e634
JK
20525if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
20526 as_fn_error "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
20527Usually this means the macro was only invoked conditionally." "$LINENO" 5
20528fi
49e4877c
PA
20529if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
20530 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
20531Usually this means the macro was only invoked conditionally." "$LINENO" 5
20532fi
20533if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
20534 as_fn_error "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
20535Usually this means the macro was only invoked conditionally." "$LINENO" 5
20536fi
c971b7fa
PA
20537if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
20538 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
20539Usually this means the macro was only invoked conditionally." "$LINENO" 5
20540fi
88b48903
WN
20541
20542
8690e634
JK
20543if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
20544 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
20545Usually this means the macro was only invoked conditionally." "$LINENO" 5
20546fi
c971b7fa
PA
20547if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
20548 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
20549Usually this means the macro was only invoked conditionally." "$LINENO" 5
20550fi
20551
20552 gl_libobjs=
20553 gl_ltlibobjs=
20554 if test -n "$gl_LIBOBJS"; then
20555 # Remove the extension.
20556 sed_drop_objext='s/\.o$//;s/\.obj$//'
20557 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
20558 gl_libobjs="$gl_libobjs $i.$ac_objext"
20559 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
20560 done
20561 fi
20562 gl_LIBOBJS=$gl_libobjs
20563
20564 gl_LTLIBOBJS=$gl_ltlibobjs
20565
20566
20567
20568 gltests_libobjs=
20569 gltests_ltlibobjs=
20570 if test -n "$gltests_LIBOBJS"; then
20571 # Remove the extension.
20572 sed_drop_objext='s/\.o$//;s/\.obj$//'
20573 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
20574 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
20575 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
20576 done
20577 fi
20578 gltests_LIBOBJS=$gltests_libobjs
20579
20580 gltests_LTLIBOBJS=$gltests_ltlibobjs
20581
20582
20583if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
20584 as_fn_error "conditional \"AMDEP\" was never defined.
20585Usually this means the macro was only invoked conditionally." "$LINENO" 5
20586fi
20587if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
20588 as_fn_error "conditional \"am__fastdepCC\" was never defined.
20589Usually this means the macro was only invoked conditionally." "$LINENO" 5
20590fi
20591 if test -n "$EXEEXT"; then
20592 am__EXEEXT_TRUE=
20593 am__EXEEXT_FALSE='#'
20594else
20595 am__EXEEXT_TRUE='#'
20596 am__EXEEXT_FALSE=
20597fi
20598
20599
20600: ${CONFIG_STATUS=./config.status}
20601ac_write_fail=0
20602ac_clean_files_save=$ac_clean_files
20603ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20604{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20605$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20606as_write_fail=0
20607cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20608#! $SHELL
20609# Generated by $as_me.
20610# Run this file to recreate the current configuration.
20611# Compiler output produced by configure, useful for debugging
20612# configure, is in config.log if it exists.
20613
20614debug=false
20615ac_cs_recheck=false
20616ac_cs_silent=false
20617
20618SHELL=\${CONFIG_SHELL-$SHELL}
20619export SHELL
20620_ASEOF
20621cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20622## -------------------- ##
20623## M4sh Initialization. ##
20624## -------------------- ##
20625
20626# Be more Bourne compatible
20627DUALCASE=1; export DUALCASE # for MKS sh
20628if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20629 emulate sh
20630 NULLCMD=:
20631 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20632 # is contrary to our usage. Disable this feature.
20633 alias -g '${1+"$@"}'='"$@"'
20634 setopt NO_GLOB_SUBST
20635else
20636 case `(set -o) 2>/dev/null` in #(
20637 *posix*) :
20638 set -o posix ;; #(
20639 *) :
20640 ;;
20641esac
20642fi
20643
20644
20645as_nl='
20646'
20647export as_nl
20648# Printing a long string crashes Solaris 7 /usr/bin/printf.
20649as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20650as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20651as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20652# Prefer a ksh shell builtin over an external printf program on Solaris,
20653# but without wasting forks for bash or zsh.
20654if test -z "$BASH_VERSION$ZSH_VERSION" \
20655 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20656 as_echo='print -r --'
20657 as_echo_n='print -rn --'
20658elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20659 as_echo='printf %s\n'
20660 as_echo_n='printf %s'
20661else
20662 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20663 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20664 as_echo_n='/usr/ucb/echo -n'
20665 else
20666 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20667 as_echo_n_body='eval
20668 arg=$1;
20669 case $arg in #(
20670 *"$as_nl"*)
20671 expr "X$arg" : "X\\(.*\\)$as_nl";
20672 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20673 esac;
20674 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20675 '
20676 export as_echo_n_body
20677 as_echo_n='sh -c $as_echo_n_body as_echo'
20678 fi
20679 export as_echo_body
20680 as_echo='sh -c $as_echo_body as_echo'
20681fi
20682
20683# The user is always right.
20684if test "${PATH_SEPARATOR+set}" != set; then
20685 PATH_SEPARATOR=:
20686 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20687 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20688 PATH_SEPARATOR=';'
20689 }
20690fi
20691
20692
20693# IFS
20694# We need space, tab and new line, in precisely that order. Quoting is
20695# there to prevent editors from complaining about space-tab.
20696# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20697# splitting by setting IFS to empty value.)
20698IFS=" "" $as_nl"
20699
20700# Find who we are. Look in the path if we contain no directory separator.
20701case $0 in #((
20702 *[\\/]* ) as_myself=$0 ;;
20703 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20704for as_dir in $PATH
20705do
20706 IFS=$as_save_IFS
20707 test -z "$as_dir" && as_dir=.
20708 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20709 done
20710IFS=$as_save_IFS
20711
20712 ;;
20713esac
20714# We did not find ourselves, most probably we were run as `sh COMMAND'
20715# in which case we are not to be found in the path.
20716if test "x$as_myself" = x; then
20717 as_myself=$0
20718fi
20719if test ! -f "$as_myself"; then
20720 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20721 exit 1
20722fi
20723
20724# Unset variables that we do not need and which cause bugs (e.g. in
20725# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20726# suppresses any "Segmentation fault" message there. '((' could
20727# trigger a bug in pdksh 5.2.14.
20728for as_var in BASH_ENV ENV MAIL MAILPATH
20729do eval test x\${$as_var+set} = xset \
20730 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20731done
20732PS1='$ '
20733PS2='> '
20734PS4='+ '
20735
20736# NLS nuisances.
20737LC_ALL=C
20738export LC_ALL
20739LANGUAGE=C
20740export LANGUAGE
20741
20742# CDPATH.
20743(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20744
20745
20746# as_fn_error ERROR [LINENO LOG_FD]
20747# ---------------------------------
20748# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20749# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20750# script with status $?, using 1 if that was 0.
20751as_fn_error ()
20752{
20753 as_status=$?; test $as_status -eq 0 && as_status=1
20754 if test "$3"; then
20755 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20756 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
20757 fi
20758 $as_echo "$as_me: error: $1" >&2
20759 as_fn_exit $as_status
20760} # as_fn_error
20761
20762
20763# as_fn_set_status STATUS
20764# -----------------------
20765# Set $? to STATUS, without forking.
20766as_fn_set_status ()
20767{
20768 return $1
20769} # as_fn_set_status
20770
20771# as_fn_exit STATUS
20772# -----------------
20773# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20774as_fn_exit ()
20775{
20776 set +e
20777 as_fn_set_status $1
20778 exit $1
20779} # as_fn_exit
20780
20781# as_fn_unset VAR
20782# ---------------
20783# Portably unset VAR.
20784as_fn_unset ()
20785{
20786 { eval $1=; unset $1;}
20787}
20788as_unset=as_fn_unset
20789# as_fn_append VAR VALUE
20790# ----------------------
20791# Append the text in VALUE to the end of the definition contained in VAR. Take
20792# advantage of any shell optimizations that allow amortized linear growth over
20793# repeated appends, instead of the typical quadratic growth present in naive
20794# implementations.
20795if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20796 eval 'as_fn_append ()
20797 {
20798 eval $1+=\$2
20799 }'
20800else
20801 as_fn_append ()
20802 {
20803 eval $1=\$$1\$2
20804 }
20805fi # as_fn_append
20806
20807# as_fn_arith ARG...
20808# ------------------
20809# Perform arithmetic evaluation on the ARGs, and store the result in the
20810# global $as_val. Take advantage of shells that can avoid forks. The arguments
20811# must be portable across $(()) and expr.
20812if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20813 eval 'as_fn_arith ()
20814 {
20815 as_val=$(( $* ))
20816 }'
20817else
20818 as_fn_arith ()
20819 {
20820 as_val=`expr "$@" || test $? -eq 1`
20821 }
20822fi # as_fn_arith
20823
20824
20825if expr a : '\(a\)' >/dev/null 2>&1 &&
20826 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20827 as_expr=expr
20828else
20829 as_expr=false
20830fi
20831
20832if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20833 as_basename=basename
20834else
20835 as_basename=false
20836fi
20837
20838if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20839 as_dirname=dirname
20840else
20841 as_dirname=false
20842fi
20843
20844as_me=`$as_basename -- "$0" ||
20845$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20846 X"$0" : 'X\(//\)$' \| \
20847 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20848$as_echo X/"$0" |
20849 sed '/^.*\/\([^/][^/]*\)\/*$/{
20850 s//\1/
20851 q
20852 }
20853 /^X\/\(\/\/\)$/{
20854 s//\1/
20855 q
20856 }
20857 /^X\/\(\/\).*/{
20858 s//\1/
20859 q
20860 }
20861 s/.*/./; q'`
20862
20863# Avoid depending upon Character Ranges.
20864as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20865as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20866as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20867as_cr_digits='0123456789'
20868as_cr_alnum=$as_cr_Letters$as_cr_digits
20869
20870ECHO_C= ECHO_N= ECHO_T=
20871case `echo -n x` in #(((((
20872-n*)
20873 case `echo 'xy\c'` in
20874 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20875 xy) ECHO_C='\c';;
20876 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20877 ECHO_T=' ';;
20878 esac;;
20879*)
20880 ECHO_N='-n';;
20881esac
20882
20883rm -f conf$$ conf$$.exe conf$$.file
20884if test -d conf$$.dir; then
20885 rm -f conf$$.dir/conf$$.file
20886else
20887 rm -f conf$$.dir
20888 mkdir conf$$.dir 2>/dev/null
20889fi
20890if (echo >conf$$.file) 2>/dev/null; then
20891 if ln -s conf$$.file conf$$ 2>/dev/null; then
20892 as_ln_s='ln -s'
20893 # ... but there are two gotchas:
20894 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20895 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20896 # In both cases, we have to default to `cp -p'.
20897 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20898 as_ln_s='cp -p'
20899 elif ln conf$$.file conf$$ 2>/dev/null; then
20900 as_ln_s=ln
20901 else
20902 as_ln_s='cp -p'
20903 fi
20904else
20905 as_ln_s='cp -p'
20906fi
20907rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20908rmdir conf$$.dir 2>/dev/null
20909
20910
20911# as_fn_mkdir_p
20912# -------------
20913# Create "$as_dir" as a directory, including parents if necessary.
20914as_fn_mkdir_p ()
20915{
20916
20917 case $as_dir in #(
20918 -*) as_dir=./$as_dir;;
20919 esac
20920 test -d "$as_dir" || eval $as_mkdir_p || {
20921 as_dirs=
20922 while :; do
20923 case $as_dir in #(
20924 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20925 *) as_qdir=$as_dir;;
20926 esac
20927 as_dirs="'$as_qdir' $as_dirs"
20928 as_dir=`$as_dirname -- "$as_dir" ||
20929$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20930 X"$as_dir" : 'X\(//\)[^/]' \| \
20931 X"$as_dir" : 'X\(//\)$' \| \
20932 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20933$as_echo X"$as_dir" |
20934 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20935 s//\1/
20936 q
20937 }
20938 /^X\(\/\/\)[^/].*/{
20939 s//\1/
20940 q
20941 }
20942 /^X\(\/\/\)$/{
20943 s//\1/
20944 q
20945 }
20946 /^X\(\/\).*/{
20947 s//\1/
20948 q
20949 }
20950 s/.*/./; q'`
20951 test -d "$as_dir" && break
20952 done
20953 test -z "$as_dirs" || eval "mkdir $as_dirs"
20954 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
20955
20956
20957} # as_fn_mkdir_p
20958if mkdir -p . 2>/dev/null; then
20959 as_mkdir_p='mkdir -p "$as_dir"'
20960else
20961 test -d ./-p && rmdir ./-p
20962 as_mkdir_p=false
20963fi
20964
20965if test -x / >/dev/null 2>&1; then
20966 as_test_x='test -x'
20967else
20968 if ls -dL / >/dev/null 2>&1; then
20969 as_ls_L_option=L
20970 else
20971 as_ls_L_option=
20972 fi
20973 as_test_x='
20974 eval sh -c '\''
20975 if test -d "$1"; then
20976 test -d "$1/.";
20977 else
20978 case $1 in #(
20979 -*)set "./$1";;
20980 esac;
20981 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
20982 ???[sx]*):;;*)false;;esac;fi
20983 '\'' sh
20984 '
20985fi
20986as_executable_p=$as_test_x
20987
20988# Sed expression to map a string onto a valid CPP name.
20989as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20990
20991# Sed expression to map a string onto a valid variable name.
20992as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20993
20994
20995exec 6>&1
20996## ----------------------------------- ##
20997## Main body of $CONFIG_STATUS script. ##
20998## ----------------------------------- ##
20999_ASEOF
21000test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21001
21002cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21003# Save the log message, to keep $0 and so on meaningful, and to
21004# report actual input values of CONFIG_FILES etc. instead of their
21005# values after options handling.
21006ac_log="
21007This file was extended by $as_me, which was
21008generated by GNU Autoconf 2.64. Invocation command line was
21009
21010 CONFIG_FILES = $CONFIG_FILES
21011 CONFIG_HEADERS = $CONFIG_HEADERS
21012 CONFIG_LINKS = $CONFIG_LINKS
21013 CONFIG_COMMANDS = $CONFIG_COMMANDS
21014 $ $0 $@
21015
21016on `(hostname || uname -n) 2>/dev/null | sed 1q`
21017"
21018
21019_ACEOF
21020
21021case $ac_config_files in *"
21022"*) set x $ac_config_files; shift; ac_config_files=$*;;
21023esac
21024
21025case $ac_config_headers in *"
21026"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21027esac
21028
21029
21030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21031# Files that config.status was made for.
21032config_files="$ac_config_files"
21033config_headers="$ac_config_headers"
21034config_commands="$ac_config_commands"
21035
21036_ACEOF
21037
21038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21039ac_cs_usage="\
21040\`$as_me' instantiates files and other configuration actions
21041from templates according to the current configuration. Unless the files
21042and actions are specified as TAGs, all are instantiated by default.
21043
21044Usage: $0 [OPTION]... [TAG]...
21045
21046 -h, --help print this help, then exit
21047 -V, --version print version number and configuration settings, then exit
21048 -q, --quiet, --silent
21049 do not print progress messages
21050 -d, --debug don't remove temporary files
21051 --recheck update $as_me by reconfiguring in the same conditions
21052 --file=FILE[:TEMPLATE]
21053 instantiate the configuration file FILE
21054 --header=FILE[:TEMPLATE]
21055 instantiate the configuration header FILE
21056
21057Configuration files:
21058$config_files
21059
21060Configuration headers:
21061$config_headers
21062
21063Configuration commands:
21064$config_commands
21065
21066Report bugs to the package provider."
21067
21068_ACEOF
21069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21070ac_cs_version="\\
21071config.status
21072configured by $0, generated by GNU Autoconf 2.64,
21073 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
21074
21075Copyright (C) 2009 Free Software Foundation, Inc.
21076This config.status script is free software; the Free Software Foundation
21077gives unlimited permission to copy, distribute and modify it."
21078
21079ac_pwd='$ac_pwd'
21080srcdir='$srcdir'
21081INSTALL='$INSTALL'
21082MKDIR_P='$MKDIR_P'
21083AWK='$AWK'
21084test -n "\$AWK" || AWK=awk
21085_ACEOF
21086
21087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21088# The default lists apply if the user does not specify any file.
21089ac_need_defaults=:
21090while test $# != 0
21091do
21092 case $1 in
21093 --*=*)
21094 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21095 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21096 ac_shift=:
21097 ;;
21098 *)
21099 ac_option=$1
21100 ac_optarg=$2
21101 ac_shift=shift
21102 ;;
21103 esac
21104
21105 case $ac_option in
21106 # Handling of the options.
21107 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21108 ac_cs_recheck=: ;;
21109 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21110 $as_echo "$ac_cs_version"; exit ;;
21111 --debug | --debu | --deb | --de | --d | -d )
21112 debug=: ;;
21113 --file | --fil | --fi | --f )
21114 $ac_shift
21115 case $ac_optarg in
21116 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21117 esac
21118 as_fn_append CONFIG_FILES " '$ac_optarg'"
21119 ac_need_defaults=false;;
21120 --header | --heade | --head | --hea )
21121 $ac_shift
21122 case $ac_optarg in
21123 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21124 esac
21125 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21126 ac_need_defaults=false;;
21127 --he | --h)
21128 # Conflict between --help and --header
21129 as_fn_error "ambiguous option: \`$1'
21130Try \`$0 --help' for more information.";;
21131 --help | --hel | -h )
21132 $as_echo "$ac_cs_usage"; exit ;;
21133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21134 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21135 ac_cs_silent=: ;;
21136
21137 # This is an error.
21138 -*) as_fn_error "unrecognized option: \`$1'
21139Try \`$0 --help' for more information." ;;
21140
21141 *) as_fn_append ac_config_targets " $1"
21142 ac_need_defaults=false ;;
21143
21144 esac
21145 shift
21146done
21147
21148ac_configure_extra_args=
21149
21150if $ac_cs_silent; then
21151 exec 6>/dev/null
21152 ac_configure_extra_args="$ac_configure_extra_args --silent"
21153fi
21154
21155_ACEOF
21156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21157if \$ac_cs_recheck; then
21158 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21159 shift
21160 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21161 CONFIG_SHELL='$SHELL'
21162 export CONFIG_SHELL
21163 exec "\$@"
21164fi
21165
21166_ACEOF
21167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21168exec 5>>config.log
21169{
21170 echo
21171 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21172## Running $as_me. ##
21173_ASBOX
21174 $as_echo "$ac_log"
21175} >&5
21176
21177_ACEOF
21178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21179#
21180# INIT-COMMANDS
21181#
21182AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
21183
21184_ACEOF
21185
21186cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21187
21188# Handling of arguments.
21189for ac_config_target in $ac_config_targets
21190do
21191 case $ac_config_target in
21192 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
21193 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
21194 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21195 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
21196 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21197
21198 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21199 esac
21200done
21201
21202
21203# If the user did not use the arguments to specify the items to instantiate,
21204# then the envvar interface is used. Set only those that are not.
21205# We use the long form for the default assignment because of an extremely
21206# bizarre bug on SunOS 4.1.3.
21207if $ac_need_defaults; then
21208 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21209 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21210 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21211fi
21212
21213# Have a temporary directory for convenience. Make it in the build tree
21214# simply because there is no reason against having it here, and in addition,
21215# creating and moving files from /tmp can sometimes cause problems.
21216# Hook for its removal unless debugging.
21217# Note that there is a small window in which the directory will not be cleaned:
21218# after its creation but before its name has been assigned to `$tmp'.
21219$debug ||
21220{
21221 tmp=
21222 trap 'exit_status=$?
21223 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21224' 0
21225 trap 'as_fn_exit 1' 1 2 13 15
21226}
21227# Create a (secure) tmp directory for tmp files.
21228
21229{
21230 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21231 test -n "$tmp" && test -d "$tmp"
21232} ||
21233{
21234 tmp=./conf$$-$RANDOM
21235 (umask 077 && mkdir "$tmp")
21236} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
21237
21238# Set up the scripts for CONFIG_FILES section.
21239# No need to generate them if there are no CONFIG_FILES.
21240# This happens for instance with `./config.status config.h'.
21241if test -n "$CONFIG_FILES"; then
21242
21243
21244ac_cr=`echo X | tr X '\015'`
21245# On cygwin, bash can eat \r inside `` if the user requested igncr.
21246# But we know of no other shell where ac_cr would be empty at this
21247# point, so we can use a bashism as a fallback.
21248if test "x$ac_cr" = x; then
21249 eval ac_cr=\$\'\\r\'
21250fi
21251ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21252if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21253 ac_cs_awk_cr='\r'
21254else
21255 ac_cs_awk_cr=$ac_cr
21256fi
21257
21258echo 'BEGIN {' >"$tmp/subs1.awk" &&
21259_ACEOF
21260
21261
21262{
21263 echo "cat >conf$$subs.awk <<_ACEOF" &&
21264 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21265 echo "_ACEOF"
21266} >conf$$subs.sh ||
21267 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
21268ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
21269ac_delim='%!_!# '
21270for ac_last_try in false false false false false :; do
21271 . ./conf$$subs.sh ||
21272 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
21273
21274 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21275 if test $ac_delim_n = $ac_delim_num; then
21276 break
21277 elif $ac_last_try; then
21278 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
21279 else
21280 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21281 fi
21282done
21283rm -f conf$$subs.sh
21284
21285cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21286cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
21287_ACEOF
21288sed -n '
21289h
21290s/^/S["/; s/!.*/"]=/
21291p
21292g
21293s/^[^!]*!//
21294:repl
21295t repl
21296s/'"$ac_delim"'$//
21297t delim
21298:nl
21299h
21300s/\(.\{148\}\).*/\1/
21301t more1
21302s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21303p
21304n
21305b repl
21306:more1
21307s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21308p
21309g
21310s/.\{148\}//
21311t nl
21312:delim
21313h
21314s/\(.\{148\}\).*/\1/
21315t more2
21316s/["\\]/\\&/g; s/^/"/; s/$/"/
21317p
21318b
21319:more2
21320s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21321p
21322g
21323s/.\{148\}//
21324t delim
21325' <conf$$subs.awk | sed '
21326/^[^""]/{
21327 N
21328 s/\n//
21329}
21330' >>$CONFIG_STATUS || ac_write_fail=1
21331rm -f conf$$subs.awk
21332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21333_ACAWK
21334cat >>"\$tmp/subs1.awk" <<_ACAWK &&
21335 for (key in S) S_is_set[key] = 1
21336 FS = "\a"
21337
21338}
21339{
21340 line = $ 0
21341 nfields = split(line, field, "@")
21342 substed = 0
21343 len = length(field[1])
21344 for (i = 2; i < nfields; i++) {
21345 key = field[i]
21346 keylen = length(key)
21347 if (S_is_set[key]) {
21348 value = S[key]
21349 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21350 len += length(value) + length(field[++i])
21351 substed = 1
21352 } else
21353 len += 1 + keylen
21354 }
21355
21356 print line
21357}
21358
21359_ACAWK
21360_ACEOF
21361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21362if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21363 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21364else
21365 cat
21366fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
21367 || as_fn_error "could not setup config files machinery" "$LINENO" 5
21368_ACEOF
21369
21370# VPATH may cause trouble with some makes, so we remove $(srcdir),
21371# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21372# trailing colons and then remove the whole line if VPATH becomes empty
21373# (actually we leave an empty line to preserve line numbers).
21374if test "x$srcdir" = x.; then
21375 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21376s/:*\$(srcdir):*/:/
21377s/:*\${srcdir}:*/:/
21378s/:*@srcdir@:*/:/
21379s/^\([^=]*=[ ]*\):*/\1/
21380s/:*$//
21381s/^[^=]*=[ ]*$//
21382}'
21383fi
21384
21385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21386fi # test -n "$CONFIG_FILES"
21387
21388# Set up the scripts for CONFIG_HEADERS section.
21389# No need to generate them if there are no CONFIG_HEADERS.
21390# This happens for instance with `./config.status Makefile'.
21391if test -n "$CONFIG_HEADERS"; then
21392cat >"$tmp/defines.awk" <<\_ACAWK ||
21393BEGIN {
21394_ACEOF
21395
21396# Transform confdefs.h into an awk script `defines.awk', embedded as
21397# here-document in config.status, that substitutes the proper values into
21398# config.h.in to produce config.h.
21399
21400# Create a delimiter string that does not exist in confdefs.h, to ease
21401# handling of long lines.
21402ac_delim='%!_!# '
21403for ac_last_try in false false :; do
21404 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
21405 if test -z "$ac_t"; then
21406 break
21407 elif $ac_last_try; then
21408 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
21409 else
21410 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21411 fi
21412done
21413
21414# For the awk script, D is an array of macro values keyed by name,
21415# likewise P contains macro parameters if any. Preserve backslash
21416# newline sequences.
21417
21418ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21419sed -n '
21420s/.\{148\}/&'"$ac_delim"'/g
21421t rset
21422:rset
21423s/^[ ]*#[ ]*define[ ][ ]*/ /
21424t def
21425d
21426:def
21427s/\\$//
21428t bsnl
21429s/["\\]/\\&/g
21430s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21431D["\1"]=" \3"/p
21432s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21433d
21434:bsnl
21435s/["\\]/\\&/g
21436s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21437D["\1"]=" \3\\\\\\n"\\/p
21438t cont
21439s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21440t cont
21441d
21442:cont
21443n
21444s/.\{148\}/&'"$ac_delim"'/g
21445t clear
21446:clear
21447s/\\$//
21448t bsnlc
21449s/["\\]/\\&/g; s/^/"/; s/$/"/p
21450d
21451:bsnlc
21452s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21453b cont
21454' <confdefs.h | sed '
21455s/'"$ac_delim"'/"\\\
21456"/g' >>$CONFIG_STATUS || ac_write_fail=1
21457
21458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21459 for (key in D) D_is_set[key] = 1
21460 FS = "\a"
21461}
21462/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21463 line = \$ 0
21464 split(line, arg, " ")
21465 if (arg[1] == "#") {
21466 defundef = arg[2]
21467 mac1 = arg[3]
21468 } else {
21469 defundef = substr(arg[1], 2)
21470 mac1 = arg[2]
21471 }
21472 split(mac1, mac2, "(") #)
21473 macro = mac2[1]
21474 prefix = substr(line, 1, index(line, defundef) - 1)
21475 if (D_is_set[macro]) {
21476 # Preserve the white space surrounding the "#".
21477 print prefix "define", macro P[macro] D[macro]
21478 next
21479 } else {
21480 # Replace #undef with comments. This is necessary, for example,
21481 # in the case of _POSIX_SOURCE, which is predefined and required
21482 # on some systems where configure will not decide to define it.
21483 if (defundef == "undef") {
21484 print "/*", prefix defundef, macro, "*/"
21485 next
21486 }
21487 }
21488}
21489{ print }
21490_ACAWK
21491_ACEOF
21492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21493 as_fn_error "could not setup config headers machinery" "$LINENO" 5
21494fi # test -n "$CONFIG_HEADERS"
21495
21496
21497eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
21498shift
21499for ac_tag
21500do
21501 case $ac_tag in
21502 :[FHLC]) ac_mode=$ac_tag; continue;;
21503 esac
21504 case $ac_mode$ac_tag in
21505 :[FHL]*:*);;
21506 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
21507 :[FH]-) ac_tag=-:-;;
21508 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21509 esac
21510 ac_save_IFS=$IFS
21511 IFS=:
21512 set x $ac_tag
21513 IFS=$ac_save_IFS
21514 shift
21515 ac_file=$1
21516 shift
21517
21518 case $ac_mode in
21519 :L) ac_source=$1;;
21520 :[FH])
21521 ac_file_inputs=
21522 for ac_f
21523 do
21524 case $ac_f in
21525 -) ac_f="$tmp/stdin";;
21526 *) # Look for the file first in the build tree, then in the source tree
21527 # (if the path is not absolute). The absolute path cannot be DOS-style,
21528 # because $ac_f cannot contain `:'.
21529 test -f "$ac_f" ||
21530 case $ac_f in
21531 [\\/$]*) false;;
21532 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21533 esac ||
21534 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21535 esac
21536 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21537 as_fn_append ac_file_inputs " '$ac_f'"
21538 done
21539
21540 # Let's still pretend it is `configure' which instantiates (i.e., don't
21541 # use $as_me), people would be surprised to read:
21542 # /* config.h. Generated by config.status. */
21543 configure_input='Generated from '`
21544 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21545 `' by configure.'
21546 if test x"$ac_file" != x-; then
21547 configure_input="$ac_file. $configure_input"
21548 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21549$as_echo "$as_me: creating $ac_file" >&6;}
21550 fi
21551 # Neutralize special characters interpreted by sed in replacement strings.
21552 case $configure_input in #(
21553 *\&* | *\|* | *\\* )
21554 ac_sed_conf_input=`$as_echo "$configure_input" |
21555 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21556 *) ac_sed_conf_input=$configure_input;;
21557 esac
21558
21559 case $ac_tag in
21560 *:-:* | *:-) cat >"$tmp/stdin" \
21561 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
21562 esac
21563 ;;
21564 esac
21565
21566 ac_dir=`$as_dirname -- "$ac_file" ||
21567$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21568 X"$ac_file" : 'X\(//\)[^/]' \| \
21569 X"$ac_file" : 'X\(//\)$' \| \
21570 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21571$as_echo X"$ac_file" |
21572 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21573 s//\1/
21574 q
21575 }
21576 /^X\(\/\/\)[^/].*/{
21577 s//\1/
21578 q
21579 }
21580 /^X\(\/\/\)$/{
21581 s//\1/
21582 q
21583 }
21584 /^X\(\/\).*/{
21585 s//\1/
21586 q
21587 }
21588 s/.*/./; q'`
21589 as_dir="$ac_dir"; as_fn_mkdir_p
21590 ac_builddir=.
21591
21592case "$ac_dir" in
21593.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21594*)
21595 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21596 # A ".." for each directory in $ac_dir_suffix.
21597 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21598 case $ac_top_builddir_sub in
21599 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21600 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21601 esac ;;
21602esac
21603ac_abs_top_builddir=$ac_pwd
21604ac_abs_builddir=$ac_pwd$ac_dir_suffix
21605# for backward compatibility:
21606ac_top_builddir=$ac_top_build_prefix
21607
21608case $srcdir in
21609 .) # We are building in place.
21610 ac_srcdir=.
21611 ac_top_srcdir=$ac_top_builddir_sub
21612 ac_abs_top_srcdir=$ac_pwd ;;
21613 [\\/]* | ?:[\\/]* ) # Absolute name.
21614 ac_srcdir=$srcdir$ac_dir_suffix;
21615 ac_top_srcdir=$srcdir
21616 ac_abs_top_srcdir=$srcdir ;;
21617 *) # Relative name.
21618 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21619 ac_top_srcdir=$ac_top_build_prefix$srcdir
21620 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21621esac
21622ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21623
21624
21625 case $ac_mode in
21626 :F)
21627 #
21628 # CONFIG_FILE
21629 #
21630
21631 case $INSTALL in
21632 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21633 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21634 esac
21635 ac_MKDIR_P=$MKDIR_P
21636 case $MKDIR_P in
21637 [\\/$]* | ?:[\\/]* ) ;;
21638 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21639 esac
21640_ACEOF
21641
21642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21643# If the template does not know about datarootdir, expand it.
21644# FIXME: This hack should be removed a few years after 2.60.
21645ac_datarootdir_hack=; ac_datarootdir_seen=
21646ac_sed_dataroot='
21647/datarootdir/ {
21648 p
21649 q
21650}
21651/@datadir@/p
21652/@docdir@/p
21653/@infodir@/p
21654/@localedir@/p
21655/@mandir@/p'
21656case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21657*datarootdir*) ac_datarootdir_seen=yes;;
21658*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21660$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21661_ACEOF
21662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21663 ac_datarootdir_hack='
21664 s&@datadir@&$datadir&g
21665 s&@docdir@&$docdir&g
21666 s&@infodir@&$infodir&g
21667 s&@localedir@&$localedir&g
21668 s&@mandir@&$mandir&g
21669 s&\\\${datarootdir}&$datarootdir&g' ;;
21670esac
21671_ACEOF
21672
21673# Neutralize VPATH when `$srcdir' = `.'.
21674# Shell code in configure.ac might set extrasub.
21675# FIXME: do we really want to maintain this feature?
21676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21677ac_sed_extra="$ac_vpsub
21678$extrasub
21679_ACEOF
21680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21681:t
21682/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21683s|@configure_input@|$ac_sed_conf_input|;t t
21684s&@top_builddir@&$ac_top_builddir_sub&;t t
21685s&@top_build_prefix@&$ac_top_build_prefix&;t t
21686s&@srcdir@&$ac_srcdir&;t t
21687s&@abs_srcdir@&$ac_abs_srcdir&;t t
21688s&@top_srcdir@&$ac_top_srcdir&;t t
21689s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21690s&@builddir@&$ac_builddir&;t t
21691s&@abs_builddir@&$ac_abs_builddir&;t t
21692s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21693s&@INSTALL@&$ac_INSTALL&;t t
21694s&@MKDIR_P@&$ac_MKDIR_P&;t t
21695$ac_datarootdir_hack
21696"
21697eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
21698 || as_fn_error "could not create $ac_file" "$LINENO" 5
21699
21700test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21701 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21702 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21704which seems to be undefined. Please make sure it is defined." >&5
21705$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21706which seems to be undefined. Please make sure it is defined." >&2;}
21707
21708 rm -f "$tmp/stdin"
21709 case $ac_file in
21710 -) cat "$tmp/out" && rm -f "$tmp/out";;
21711 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
21712 esac \
21713 || as_fn_error "could not create $ac_file" "$LINENO" 5
21714 ;;
21715 :H)
21716 #
21717 # CONFIG_HEADER
21718 #
21719 if test x"$ac_file" != x-; then
21720 {
21721 $as_echo "/* $configure_input */" \
21722 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
21723 } >"$tmp/config.h" \
21724 || as_fn_error "could not create $ac_file" "$LINENO" 5
21725 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
21726 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21727$as_echo "$as_me: $ac_file is unchanged" >&6;}
21728 else
21729 rm -f "$ac_file"
21730 mv "$tmp/config.h" "$ac_file" \
21731 || as_fn_error "could not create $ac_file" "$LINENO" 5
21732 fi
21733 else
21734 $as_echo "/* $configure_input */" \
21735 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
21736 || as_fn_error "could not create -" "$LINENO" 5
21737 fi
21738# Compute "$ac_file"'s index in $config_headers.
21739_am_arg="$ac_file"
21740_am_stamp_count=1
21741for _am_header in $config_headers :; do
21742 case $_am_header in
21743 $_am_arg | $_am_arg:* )
21744 break ;;
21745 * )
21746 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
21747 esac
21748done
21749echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
21750$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21751 X"$_am_arg" : 'X\(//\)[^/]' \| \
21752 X"$_am_arg" : 'X\(//\)$' \| \
21753 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
21754$as_echo X"$_am_arg" |
21755 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21756 s//\1/
21757 q
21758 }
21759 /^X\(\/\/\)[^/].*/{
21760 s//\1/
21761 q
21762 }
21763 /^X\(\/\/\)$/{
21764 s//\1/
21765 q
21766 }
21767 /^X\(\/\).*/{
21768 s//\1/
21769 q
21770 }
21771 s/.*/./; q'`/stamp-h$_am_stamp_count
21772 ;;
21773
21774 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21775$as_echo "$as_me: executing $ac_file commands" >&6;}
21776 ;;
21777 esac
21778
21779
21780 case $ac_file$ac_mode in
21781 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
21782 # Autoconf 2.62 quotes --file arguments for eval, but not when files
21783 # are listed without --file. Let's play safe and only enable the eval
21784 # if we detect the quoting.
21785 case $CONFIG_FILES in
21786 *\'*) eval set x "$CONFIG_FILES" ;;
21787 *) set x $CONFIG_FILES ;;
21788 esac
21789 shift
21790 for mf
21791 do
21792 # Strip MF so we end up with the name of the file.
21793 mf=`echo "$mf" | sed -e 's/:.*$//'`
21794 # Check whether this is an Automake generated Makefile or not.
21795 # We used to match only the files named `Makefile.in', but
21796 # some people rename them; so instead we look at the file content.
21797 # Grep'ing the first line is not enough: some people post-process
21798 # each Makefile.in and add a new line on top of each file to say so.
21799 # Grep'ing the whole file is not good either: AIX grep has a line
21800 # limit of 2048, but all sed's we know have understand at least 4000.
21801 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
21802 dirpart=`$as_dirname -- "$mf" ||
21803$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21804 X"$mf" : 'X\(//\)[^/]' \| \
21805 X"$mf" : 'X\(//\)$' \| \
21806 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
21807$as_echo X"$mf" |
21808 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21809 s//\1/
21810 q
21811 }
21812 /^X\(\/\/\)[^/].*/{
21813 s//\1/
21814 q
21815 }
21816 /^X\(\/\/\)$/{
21817 s//\1/
21818 q
21819 }
21820 /^X\(\/\).*/{
21821 s//\1/
21822 q
21823 }
21824 s/.*/./; q'`
21825 else
21826 continue
21827 fi
21828 # Extract the definition of DEPDIR, am__include, and am__quote
21829 # from the Makefile without running `make'.
21830 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
21831 test -z "$DEPDIR" && continue
21832 am__include=`sed -n 's/^am__include = //p' < "$mf"`
21833 test -z "am__include" && continue
21834 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
21835 # When using ansi2knr, U may be empty or an underscore; expand it
21836 U=`sed -n 's/^U = //p' < "$mf"`
21837 # Find all dependency output files, they are included files with
21838 # $(DEPDIR) in their names. We invoke sed twice because it is the
21839 # simplest approach to changing $(DEPDIR) to its actual value in the
21840 # expansion.
21841 for file in `sed -n "
21842 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
21843 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
21844 # Make sure the directory exists.
21845 test -f "$dirpart/$file" && continue
21846 fdir=`$as_dirname -- "$file" ||
21847$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21848 X"$file" : 'X\(//\)[^/]' \| \
21849 X"$file" : 'X\(//\)$' \| \
21850 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
21851$as_echo X"$file" |
21852 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21853 s//\1/
21854 q
21855 }
21856 /^X\(\/\/\)[^/].*/{
21857 s//\1/
21858 q
21859 }
21860 /^X\(\/\/\)$/{
21861 s//\1/
21862 q
21863 }
21864 /^X\(\/\).*/{
21865 s//\1/
21866 q
21867 }
21868 s/.*/./; q'`
21869 as_dir=$dirpart/$fdir; as_fn_mkdir_p
21870 # echo "creating $dirpart/$file"
21871 echo '# dummy' > "$dirpart/$file"
21872 done
21873 done
21874}
21875 ;;
21876 "default":C)
21877case x$CONFIG_HEADERS in
21878xconfig.h:config.in)
21879echo > stamp-h ;;
21880esac
21881 ;;
21882
21883 esac
21884done # for ac_tag
21885
21886
21887as_fn_exit 0
21888_ACEOF
21889ac_clean_files=$ac_clean_files_save
21890
21891test $ac_write_fail = 0 ||
21892 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
21893
21894
21895# configure is writing to config.log, and then calls config.status.
21896# config.status does its own redirection, appending to config.log.
21897# Unfortunately, on DOS this fails, as config.log is still kept open
21898# by configure, so config.status won't be able to write to it; its
21899# output is simply discarded. So we exec the FD to /dev/null,
21900# effectively closing config.log, so it can be properly (re)opened and
21901# appended to by config.status. When coming back to configure, we
21902# need to make the FD available again.
21903if test "$no_create" != yes; then
21904 ac_cs_success=:
21905 ac_config_status_args=
21906 test "$silent" = yes &&
21907 ac_config_status_args="$ac_config_status_args --quiet"
21908 exec 5>/dev/null
21909 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21910 exec 5>>config.log
21911 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21912 # would make configure fail if this is the last instruction.
21913 $ac_cs_success || as_fn_exit $?
21914fi
21915if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21917$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21918fi
21919
21920
21921exit 0
This page took 1.319835 seconds and 4 git commands to generate.